Newer
Older
/*
* @author ETSI 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 language "TTCN-3:2005" {
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/*
* @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
* _characters_
*/
group textStringSubTypes {
type charstring String1 length(1) with { encode "length(1)"};
type charstring String2 length(2) with { encode "length(2)"};
type charstring String3 length(3) with { encode "length(3)"};
type charstring String4 length(4) with { encode "length(4)"};
type charstring String5 length(5) with { encode "length(5)"};
type charstring String6 length(6) with { encode "length(6)"};
type charstring String7 length(7) with { encode "length(7)"};
type charstring String8 length(8) with { encode "length(8)"};
type charstring String9 length(9) with { encode "length(9)"};
type charstring String10 length(10) with { encode "length(10)"};
type charstring String11 length(11) with { encode "length(11)"};
type charstring String12 length(12) with { encode "length(12)"};
type charstring String13 length(13) with { encode "length(13)"};
type charstring String14 length(14) with { encode "length(14)"};
type charstring String15 length(15) with { encode "length(15)"};
type charstring String16 length(16) with { encode "length(16)"};
type charstring String1To63 length(1..63) with {encode "length(1..63)"};
type charstring String1To64 length(1..64) with {encode "length(1..64)"};
type charstring String1To127 length(1..127) with {encode "length(1..127)"};
type charstring String1To128 length(1..128) with {encode "length(1..128)"};
type charstring String1to255 length(1..255) with {encode "length(1..255)"};
type charstring String5to253 length (5..253) with {encode "length(5..253)"};
} // end stringSubTypes
group usefulTextStringTypes {
type universal charstring UnicodeText;
type universal charstring UnicodeText1to255 length(1..255)
with {encode "length(1..255)"};
type charstring AlphaNum ("0".."9","a".."z","A".."Z");
type AlphaNum AlphaNum2 length(2) with { encode "length(2)"};
type AlphaNum AlphaNum1To32 length(1..32) with {encode "length(1..32)"};
} // end group usefulTextStringTypes
} // end module LibCommon_TextStrings