TTworkbench: How to convert a string to octet string in TTCN-3?

Knowledge Base - FAQ

TTworkbench: How to convert a string to octet string in TTCN-3?
According to C.26 Character string to octetstring in standard Core Languge str2oct(charstring invalue) return octetstring This function converts a string of the type charstring to an octetstring. The string invalue shall contain even number characters and each shall be one of the "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "A", "B", "C", "D", "E" or "F" characters only. Therefore all other characters are not recognized. For ASCII string conversion, please use the following function instead.  char2oct(in charstring invalue) return octetstring