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