Printer FriendlyEmail Article Link

TTworkbench: How do I decode a union?

Environment/Versions
TTworkbench 32/64 Bit Linux/Windows
Answer
The information must ne taken out of the message itself. The decoding hypothesis doesn't give the answer which type in the union is needed.

Example:
In the TTworkbench built-in example, AddressBookMessageBased,  see the TTCN-3 union Contact defined in the module AddressBookMessageBased.ttcn3 and how it is decoded in the codec class AddressBookMsgCodec.java by the method private void decodeContact(byte[] message, UnionValue contact) {...}

Product : TTplugins,TTCN-3 Language