Commit | Line | Data |
---|---|---|
970ed795 EL |
1 | /****************************************************************************** |
2 | * Copyright (c) 2000-2014 Ericsson Telecom AB | |
3 | * All rights reserved. This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License v1.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * http://www.eclipse.org/legal/epl-v10.html | |
7 | ******************************************************************************/ | |
8 | module UsefulTtcn3Types { | |
9 | ||
10 | ||
11 | type integer byte (-128 .. 127) with { variant "/* 8 bit */" }; | |
12 | ||
13 | type integer unsignedbyte (0 .. 255) with { variant "/*unsigned 8 bit*/" }; | |
14 | ||
15 | type integer short (-32768 .. 32767) with { variant "/*16 bit*/" }; | |
16 | ||
17 | type integer unsignedshort (0 .. 65535) with { variant "/*unsigned 16 bit*/" }; | |
18 | ||
19 | type integer long (-2147483648 .. 2147483647) with { variant "/*32 bit*/" }; | |
20 | ||
21 | type integer unsignedlong (0 .. 4294967295) with { variant "/*unsigned 32 bit*/" }; | |
22 | ||
23 | type integer longlong /* ( -9223372036854775808 .. 9223372036854775807 ) */ with { variant "/*64 bit*/" }; | |
24 | ||
25 | type integer unsignedlonglong /* ( 0 .. 18446744073709551615 ) */ with { variant "/*unsigned 64 bit*/" }; | |
26 | ||
27 | type float IEEE754float with { variant "/*IEEE754 float*/" }; | |
28 | ||
29 | type float IEEE754double with { variant "/*IEEE754 double*/" }; | |
30 | ||
31 | type float IEEE754extfloat with { variant "/*IEEE754 extended float*/" }; | |
32 | ||
33 | type float IEEE754extdouble with { variant "/*IEEE754 extended double*/" }; | |
34 | ||
35 | type universal charstring utf8string with { variant "/*UTF-8*/" }; | |
36 | ||
37 | type universal charstring bmpstring ( char ( 0,0,0,0 ) .. char ( 0,0,255,255) ) with { variant "/*UCS-2*/" }; | |
38 | ||
39 | type universal charstring utf16string ( char ( 0,0,0,0 ) .. char ( 0,16,255,255) ) with { variant "/*UTF-16*/" }; | |
40 | ||
41 | type universal charstring iso8859string ( char ( 0,0,0,0 ) .. char ( 0,0,0,255) ) with { variant "/*8 bit*/" }; | |
42 | ||
43 | type record IDLfixed | |
44 | { | |
45 | unsignedshort digits, | |
46 | short scale, | |
47 | charstring value_ | |
48 | } | |
49 | with { | |
50 | variant "/*IDL:fixed FORMAL/01-12-01 v.2.6*/"; | |
51 | }; | |
52 | ||
53 | /* | |
54 | type charstring char length (1); | |
55 | ||
56 | NOTE 1: The name of this useful type is the same as the TTCN-3 keyword used to denote universal | |
57 | charstring values in the quadraple form. In general it is disallowed to use TTCN-3 keywords as | |
58 | identifiers. The "char" useful type is a solitary exception and allowed only for backward compatibility | |
59 | with previous versions of the TTCN-3 standard. (except Titan doesn't) | |
60 | ||
61 | NOTE 2: The special string "8 bit" defined in clause 28.2.3 may be used with this type to specify a given encoding | |
62 | for its values. Also, other properties of the base type can be changed by using attribute mechanisms. | |
63 | */ | |
64 | ||
65 | type universal charstring uchar length (1); | |
66 | ||
67 | /* | |
68 | NOTE: Special strings defined in clause 28.2.3 except "8 bit" may be used with this type to specify a given | |
69 | encoding for its values. Also, other properties of the base type can be changed by using attribute | |
70 | mechanisms. | |
71 | */ | |
72 | ||
73 | type bitstring bit length (1); | |
74 | ||
75 | type hexstring hex length (1); | |
76 | ||
77 | type octetstring octet length (1); | |
78 | ||
79 | } | |
80 | with { | |
81 | encode "XML"; | |
82 | } |