IBM
Contents Index Previous Next



ISM Value Encoding


The ISM Value Encoding defines how values are encoded when sent, or decoded when received. It also defines the format for values when printed or read as test suite parameters. The format is not 100% compatible with the SDL Simulator format, or the MSC generation format, though in most cases it will be able to read those values as well.

The general syntax for the value notation is as follows. Rules named with all capital letters are tokens.

ISMValueEncoding ::= OptionalTypeAndValue ;
OptionalTypeAndValue ::= [TYPE] Value ;
TYPE ::= <Name of type defined in TTCN test suite> ;
Value ::= Composite | Atomic | OMIT;
Atomic ::= CSTRING | OSTRING | HSTRING | BSTRING | INTEGER | BOOLEAN ;
Composite ::= LPAR {OptionalTypeAndValue OPTCOMMA } RPAR;
CSTRING  ::= '"' .* '"' ;
OSTRING  ::= ''' ([09afAF][09afAF])* ''O' ;
HSTRING  ::= ''' [09afAF]* ''H' ;
BSTRING  ::= ''' [01]* ''B' ;
INTEGER  ::= '-' [09]* | [09]* ;
BOOLEAN  ::= 'TRUE' | 'FALSE' | 'true' | 'false' ;
LPAR     ::= '{' | '(' ;
RPAR     ::= '}' | ')' ;
OPTCOMMA ::= ',' | ;
OMIT     ::= '-';

The CSTRING type is by default IA5String, use TYPE to override with a different character string type. Note also that in TTCN, the character string types are compatible and it may not be necessary to make the distinction.

Examples of this encoding include:

Encoding Description
1

The INTEGER value 1

FALSE

The BOOLEAN value FALSE

MyINTEGER 23

The INTEGER derivate MyINTEGER value 23

BIT4 '1001'B

The BITSTRING derivate BIT4 value `1001'B

{ 1 , 2 , 3 }

A composite type with field values 1, 2 and 3

ASP1 { 711, 
TRUE }

An ASP1 with field 1 = 711 and field 2 = TRUE

ASP2(BIT4 
'1001'B PDU1(1 
2))

An ASP2 with second field being a PDU1


http://www.ibm.com/rational
Contents Index Previous Next