Presentation is loading. Please wait.

Presentation is loading. Please wait.

IDL to TTCN-3 mapping issues

Similar presentations


Presentation on theme: "IDL to TTCN-3 mapping issues"— Presentation transcript:

1 IDL to TTCN-3 mapping issues
due to practical experiences with e.g. Parlay IDLs some gaps identified major issue: missing modules scopes in TTCN-3 consider module declarations introduce prefixes for interface definitions discriminated unions: additional aux. record of type needed additional type definitions to express link bw. union and discr. types. sequence: max. size mapping missing name clashes due to added suffixes (“Type”, “Enum”, “Object”, “Interfaces”)

2 (1) consider module declarations
to consider module scope to avoid name clashes IDL module identifier1 { typedef long mylong1; module identifier2 { typedef string mystring2; typedef mylong1 mylong2; } TTCN module identifier1 {type long mylong1;} module identifier1__identifier2 { import from identifier1 all; type iso8859string mystring2; type identifier1.mylong1 mylong2;

3 (2) interface related definitions
introduce prefixes to consider IDL scopes to avoid name clashes IDL interface identifier { attribute long attributeId ; void operationname (in string param_value ) raises ( ExceptionType ) ; //... other body definitions ... }; TTCN group identifierInterface { signature identifier__attributeIdGet () return long; signature identifier__attributeIdSet (in long identifier__attributeId); signature identifier__operationname (in iso8859string identifier__param_value) exception ( ExceptionType ) ; //...other body definitions ... }

4 (3) discriminated unions: (a) additional aux. type needed
in case of sequences used in discr. unions additional aux. record of type needed union MyUnion switch( long ) { case ‘0’ : boolean b; case ‘1’ : char c; case ‘2’ : octet o; case ‘3’ : sequence<char> h; case ‘4’ : short s; }; type union MyUnionType { boolean b, iso8859string c, octetstring o, MyUnion__3 h, short s } need to be introduced (generated): type record of iso8859char MyUnion__3;

5 (3) discriminated unions: (b) link bw. union and discr. types
different IDL types map to same TTCN-3 definitions additional types to keep the link information (needed at runtime by CORBA adapter implementation) enum TpUIVariablePartType {P_UI_VARIABLE_PART_TIME, P_UI_VARIABLE_PART_DATE}; union TpUIVariableInfo switch(TpUIVariablePartType) { case P_UI_VARIABLE_PART_TIME: TpTime VariablePartTime; case P_UI_VARIABLE_PART_DATE: TpDate VariablePartDate;}; NEW in TTCN type TpUIVariablePartType TpUIVariableInfo__Switch; type enumerated TpUIVariableInfo__CasesType {case_P_UI_VARIABLE_PART_TIME, case_P_UI_VARIABLE_PART_DATE};

6 (4) mapping for IDL sequence
Extend the mapping for IDL sequence if a maximum size is specified: We recommend a mapping to record of in TTCN-3 with limited number of elements: IDL Example: typedef sequence <NameComponent, maximum_size> Name; TTCN Example: type record length (0, maximum_size - 1) of NameComponent Name;

7 (5) name clases due suffixes
aux. types are declared by adding suffixes: “Type”, “Enum”, “Object”, “Interfaces” name clashes may occur if constructed types are already defined e.g. introduce protected suffix: _ IDL enum TpUIInfoType {P_UI_INFO_DATA,P_UI_INFO_ADDRESS}; union TpUIInfo switch(TpUIInfoType) { case P_UI_INFO_DATA: TpString InfoData; case P_UI_INFO_ADDRESS: TpURL InfoAddress;}; TTCN type enumerated TpUIInfoType {P_UI_INFO_ID, P_UI_INFO_DATA, P_UI_INFO_ADDRESS} type union TpUIInfoType_ [instead of standard rule: TpUIInfoType] {org__csapi.TpString InfoData, org__csapi.TpURL InfoAddress} type enumerated TpUIInfoEnumType_ [instead of: TpUIInfoEnumType] {org__csapi_TpInt32_InfoID, org__csapi_TpString_InfoData, org__csapi_TpURL_InfoAddress} type record TpUIInfo {TpUIInfoEnumType__ETSI kind, TpUIInfoType__ETSI value_}


Download ppt "IDL to TTCN-3 mapping issues"

Similar presentations


Ads by Google