/* * @author STF 276 * @version $Id$ * @desc A collection of text string type and value definitions which * may be useful in the implementation of any TTCN-3 test * suite. "Text string" refers to TTCN-3 charstring and universal * charstring types. * @remark End users should be aware that any changes made to the in * definitions this module may be overwritten in future releases. * End users are encouraged to contact the distributers of this * module regarding their modifications or additions so that future * updates will include your changes. */ module LibCommon_TextStrings { /* * @desc These constants can be used to add special characters into * TTCN-3 text strings by using the concatenation operator. * Example use: * var charstring v_text := "Hi!" & c_CRLF & "Hello!"; */ group usefulConstants { const charstring c_NUL := oct2str('00'O); const charstring c_SOH := oct2str('01'O); const charstring c_STX := oct2str('02'O); const charstring c_ETX := oct2str('03'O); const charstring c_EOT := oct2str('04'O); const charstring c_ENQ := oct2str('05'O); const charstring c_ACK := oct2str('06'O); const charstring c_BEL := oct2str('07'O); const charstring c_BS := oct2str('08'O); const charstring c_TAB := oct2str('09'O); const charstring c_LF := oct2str('0A'O); const charstring c_VT := oct2str('0B'O); const charstring c_FF := oct2str('0C'O); const charstring c_CR := oct2str('0D'O); const charstring c_SO := oct2str('0E'O); const charstring c_SI := oct2str('0F'O); const charstring c_DLE := oct2str('10'O); const charstring c_DC1 := oct2str('11'O); const charstring c_DC2 := oct2str('12'O); const charstring c_DC3 := oct2str('13'O); const charstring c_DC4 := oct2str('14'O); const charstring c_NAK := oct2str('15'O); const charstring c_SYN := oct2str('16'O); const charstring c_ETB := oct2str('17'O); const charstring c_CAN := oct2str('18'O); const charstring c_EM := oct2str('19'O); const charstring c_SUB := oct2str('1A'O); const charstring c_ESC := oct2str('1B'O); const charstring c_FS := oct2str('1C'O); const charstring c_GS := oct2str('1D'O); const charstring c_RS := oct2str('1E'O); const charstring c_US := oct2str('1F'O); const charstring c_DEL := oct2str('7F'O); const charstring c_CRLF := oct2str('0D'O) & oct2str('0A'O); } // end group usefulConstants /* * @remark Number in name indicates string length in number of * _chars_ */ group textStringSubTypes { type charstring String1 length(1) with { encode "1 byte"}; type charstring String2 length(2) with { encode "2 bytes"}; type charstring String3 length(3) with { encode "3 bytes"}; type charstring String4 length(4) with { encode "4 bytes"}; type charstring String5 length(5) with { encode "5 bytes"}; type charstring String6 length(6) with { encode "6 bytes"}; type charstring String7 length(7) with { encode "7 bytes"}; type charstring String8 length(8) with { encode "8 bytes"}; type charstring String9 length(9) with { encode "9 bytes"}; type charstring String10 length(10) with { encode "10 bytes"}; type charstring String11 length(11) with { encode "11 bytes"}; type charstring String12 length(12) with { encode "12 bytes"}; type charstring String13 length(13) with { encode "13 bytes"}; type charstring String14 length(14) with { encode "14 bytes"}; type charstring String15 length(15) with { encode "15 bytes"}; type charstring String16 length(16) with { encode "16 bytes"}; type charstring String1To63 length(1..63) with {encode "1 to 63 bytes"}; type charstring String1To64 length(1..64) with {encode "1 to 64 bytes"}; type charstring String1To127 length(1..127) with {encode "1 to 127 bytes"}; type charstring String1To128 length(1..128) with {encode "1 to 128 bytes"}; type charstring String1to255 length(1..255) with {encode "1 to 255 bytes"}; } // end stringSubTypes group usefulTextStringTypes { // NOTE STS: below universal commented due to serious RTS problems in Tau 2.3 and before type /*universal*/ charstring UnicodeText; // NOTE STS: below universal commented due to serious RTS problems in Tau 2.3 and before type /*universal*/ charstring UnicodeText1to255 length(1..255) with {encode "1 to 255 bytes"}; type charstring AlphaNum ("0".."9","a".."z","A".."Z"); type AlphaNum AlphaNum2 length(2); type AlphaNum AlphaNum1To32 length(1..32); } // end group usefulTextStringTypes } // end module LibCommon_TextStrings