OpenTTCN/Working documents/Mappings/C to TTCN-3 mapping/ApplicationTypes.ttcn

From OpenTTCN

Jump to: navigation, search
////////////////////////////////////////////////////////////////////////
//
// Generated by OpenTTCN C to TTCN-3 converter
//
// Generated from: file ApplicationTypes.h
//
////////////////////////////////////////////////////////////////////////

module ApplicationTypes
{

import from C_types all;

type c_char T1;

type c_short T2;
type c_short T2b;

type c_int T3;

type c_long T4;
type c_long T4b;

type c_signed_char ST1;

type c_short ST2;
type c_short ST2b;

type c_int ST3;
type c_int ST3b;

type c_long ST4;
type c_long ST4b;

type c_unsigned_char UT1;

type c_unsigned_short UT2;
type c_unsigned_short UT2b;

type c_unsigned_int UT3;
type c_unsigned_int UT3b;

type c_unsigned_long UT4;
type c_unsigned_long UT4b;

type c_float FT1;
type c_double FT2;
type c_long_double FT3;

type record BS0
{
    c_char f1,
    c_short f2,
    c_int f3,
    c_char f4
}

type record BS0b
{
    c_short fld0,
    BS0 fld1,
    c_unsigned_char fld2,
    c_short fld3,
    BS0 fld4,
    c_unsigned_char fld5
}

type record BS0c
{
    c_char ff1,
    BS0b ff2,
    c_char ff3,
    BS0 ff4,
    c_signed_char ff5
}

type record BS0d
{
    c_char f1,
    c_signed_char f2,
    c_unsigned_char f3,
    c_short f4,
    c_unsigned_char f5,
    c_unsigned_short f6,
    c_unsigned_char f7,
    c_int f8,
    c_unsigned_char f9,
    c_long f10,
    c_unsigned_char f11,
    c_float f12,
    c_unsigned_char f13,
    c_double f14,
    c_unsigned_char f15,
    c_long_double f16,
    c_unsigned_char f17
}

type record BS1
{
    c_unsigned_char data,
    c_long bits
}

type record BS2
{
    c_char data,
    c_int bits
}

type BS2 BS2Tag;

type record BS3
{
    c_signed_char data,
    c_short bits
}

type record WORDREGS
{
    c_unsigned_short ax,
    c_unsigned_short bx
}

type record BYTEREGS
{
    c_unsigned_char al,
    c_unsigned_char ah,
    c_unsigned_char bl,
    c_unsigned_char bh
}

type record REGS
{
    WORDREGS x optional,
    BYTEREGS h optional
}

type c_int DAY;

const c_int DAY_saturday := 0;
const c_int DAY_sunday := 0;
const c_int DAY_monday := 1;
const c_int DAY_tuesday := 2;
const c_int DAY_wednesday := 3;
const c_int DAY_thursday := 4;
const c_int DAY_friday := 5;

type record ALT_REGS
{
    record {
      c_unsigned_short ax,
      c_unsigned_short bx
    } x optional,
    record {
      c_unsigned_char al,
      c_unsigned_char ah,
      c_unsigned_char bl,
      c_unsigned_char bh
    } h optional
}

type record STRUCT_A
{
    c_int x,
    c_char x2,
    record
    {
      c_int y,
      c_char y2
    } z,
    c_char z2
}

type record STRUCT_B
{
    c_unsigned_char f1,
    REGS f2,
    c_unsigned_char f3
}

type record STRUCT_C
{
    c_unsigned_char f1,
    record
    {
        record
        {
            record
            {
                c_unsigned_char a1,
                c_int a2,
                c_unsigned_char a3
            } uf1 optional,
            record
            {
                c_int b1,
                c_int b2,
                STRUCT_B b3,
                c_int b4
            } uf2 optional,
            record
            {
                c_int c1
            } uf3 optional,
            record
            {
                c_unsigned_char d1 optional,
                c_short d2 optional
            } uf4 optional,
            record
            {
                c_int e1,
                c_unsigned_char e2,
                c_int e3
            } uf5 optional,
            STRUCT_B uf6 optional,
            c_unsigned_char uf7 optional
        } u1 optional,
        c_short u2 optional
    } f2,
    c_unsigned_char f3
}

}
Views
Personal tools