Commit | Line | Data |
---|---|---|
970ed795 | 1 | /****************************************************************************** |
3abe9331 | 2 | * Copyright (c) 2000-2015 Ericsson Telecom AB |
970ed795 EL |
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 types { | |
9 | // Types are kept separate to cut down on the size of the generated code | |
10 | // from the actual test (all_from*.ttcn, sapc.ttcn) | |
11 | ||
12 | type component A { | |
13 | var RoI v_roi:={20,21,22}; | |
14 | var SoI v_soi:={20,21,22}; | |
15 | } | |
16 | ||
17 | type record of integer RoI; | |
18 | type set of integer SoI; | |
a38c6d4c | 19 | type record of float RoF; |
970ed795 EL |
20 | type record of SoI RoSoI; |
21 | type record of RoI RoRoI; | |
22 | type record of RoOS RoRoOS; | |
23 | type record of SoOS RoSoOS; | |
24 | ||
25 | type set of integer MySetOfType (0 .. 10); | |
26 | ||
a38c6d4c | 27 | type record of bitstring RoBS; |
28 | ||
29 | type record of hexstring RoHS; | |
30 | ||
970ed795 EL |
31 | type record of charstring RoCS; |
32 | type set of charstring CoCS; | |
33 | ||
34 | type record of octetstring RoOS; | |
35 | type set of octetstring SoOS; | |
36 | ||
a38c6d4c | 37 | type record of universal charstring RoUCS; |
38 | ||
970ed795 EL |
39 | type record MyRecord { |
40 | integer i optional, | |
41 | RoI roi optional, | |
42 | SoI soi optional | |
43 | } | |
44 | ||
45 | type union MyUnion { | |
46 | integer i, | |
47 | RoI roi, | |
48 | SoI soi | |
49 | } | |
50 | ||
51 | type record of MyRecord RoMyRec; | |
52 | type record of MyUnion RoMyUnion; | |
53 | ||
54 | //==== Function Reference ==== | |
55 | //this is just a dummy type to test all from for function references | |
56 | type function F_int2int(in integer pl_i) return integer; | |
57 | ||
58 | type record of F_int2int RoF_int2int; | |
59 | ||
60 | /* * * * * * * * sapc types * * * * * * * */ | |
61 | ||
62 | type record CreateSAPCSubscription | |
63 | { | |
64 | record of charstring pcBlacklistService_list | |
65 | }; | |
66 | ||
67 | type record GetResponseSAPCSubscription | |
68 | { | |
69 | record of charstring pcBlacklistService_list | |
70 | }; | |
71 | ||
72 | /* | |
73 | type record MOD { | |
74 | GetResponseSAPCSubscription getResponseSAPCSubscription | |
75 | } | |
76 | ||
77 | type record MOA { | |
78 | MOD getMODefinition | |
79 | } | |
80 | ||
81 | type record GetResp { | |
82 | MOA mOAttributes | |
83 | } | |
84 | ||
85 | type record CAI3gCommand { | |
86 | GetResp getResponse | |
87 | } | |
88 | */ | |
89 | ||
a38c6d4c | 90 | /* * * * Subtypes * * * */ |
91 | ||
92 | type integer PosInt (0..infinity); | |
93 | ||
94 | type float NegFloat (-infinity..0.0); | |
95 | ||
96 | type bitstring ByteString length (8); | |
97 | ||
98 | type hexstring WordString length (4); | |
99 | ||
100 | type octetstring DWordString length (4); | |
101 | ||
102 | type charstring TtcnFileName (pattern "*.ttcn"); | |
103 | ||
104 | type universal charstring XsdString ( | |
105 | char(0,0,0,9)..char(0,0,0,9), | |
106 | char(0,0,0,10)..char(0,0,0,10), | |
107 | char(0,0,0,12)..char(0,0,0,12), | |
108 | char(0,0,0,32)..char(0,0,215,255), | |
109 | char(0,0,224,0)..char(0,0,255,253), | |
110 | char(0,1,0,0)..char(0,16,255,253) | |
111 | ); | |
112 | ||
113 | type record length (0..3) of integer ShortRoI; | |
114 | ||
115 | type record length (0..3) of float ShortRoF; | |
116 | ||
117 | type record length (0..3) of bitstring ShortRoBS; | |
118 | ||
119 | type record length (0..3) of hexstring ShortRoHS; | |
120 | ||
121 | type record length (0..3) of octetstring ShortRoOS; | |
122 | ||
123 | type record length (0..3) of charstring ShortRoCS; | |
124 | ||
125 | type record length (0..3) of universal charstring ShortRoUCS; | |
126 | ||
970ed795 | 127 | } |