Hello Morton
This is a correct observation, the example is incorrect. This will be corrected in documentation that comes with TTCN Suite in future releases.
The Encode section at User's Manual -> Adaptation of Generated Code -> GCI C Code Reference -> Value Interface will say:
void EncodeT4( Buffer buf, GciValue* v )
{
GciValue* tmp;
BufWriteType( buf, GcT4D );
/* Encode first field */
EncodeT1( buf, GciGetField( v, 1 ));
/* Now encode inline type definition */
tmp = GciGetField( v, 2 );
BufWriteInt( buf, GciGetField( tmp, 1 ));
EncodeT2( buf, GciGetField( tmp, 2 ));
}
Best regards,
Tomas Gustafsson
Edited: 1-Mar-2005
at 16:48
by Tomas Gustafsson