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 types { | |
9 | ||
10 | type component MC {} | |
11 | ||
12 | ||
13 | ||
14 | group g_boolean { | |
15 | type record of boolean RoB; | |
16 | }//g_boolean | |
17 | ||
18 | group g_integer { | |
19 | ||
20 | type record of integer RoI; | |
21 | type integer int_1_3 (1..3) | |
22 | ||
23 | } //g_integer | |
24 | ||
25 | group g_float{ | |
26 | type record of float RoF | |
27 | ||
28 | } //g_float | |
29 | ||
30 | group g_bitstring { | |
31 | type bitstring BitStrings1 ('0'B, '1'B ); | |
32 | type bitstring BitStrings2 ('00'B, '01'B, '10'B, '11'B); | |
33 | type bitstring BitStrings_1_2 (BitStrings1, BitStrings2); | |
34 | ||
35 | type record of hexstring RoBS; | |
36 | //wrapper to test charstring in record: | |
37 | type record RBS { | |
38 | bitstring bs optional | |
39 | } | |
40 | ||
41 | type record of RBS RoRBS; | |
42 | ||
43 | template RBS t_rbs(template bitstring pl_bs) := { bs:=pl_bs } | |
44 | ||
45 | }//g_bitstring | |
46 | ||
47 | group g_octetstring { | |
48 | type record of octetstring RoOS; | |
49 | //wrapper to test charstring in record: | |
50 | type record ROS { | |
51 | octetstring os optional | |
52 | } | |
53 | ||
54 | type record of ROS RoROS; | |
55 | ||
56 | template ROS t_ros(template octetstring pl_os) := { os:=pl_os } | |
57 | ||
58 | }//g_octetstring | |
59 | ||
60 | group g_hexstring { | |
61 | type record of hexstring RoHS; | |
62 | //wrapper to test charstring in record: | |
63 | type record RHS { | |
64 | hexstring hs optional | |
65 | } | |
66 | ||
67 | type record of RHS RoRHS; | |
68 | ||
69 | template RHS t_rhs(template hexstring pl_hs) := { hs:=pl_hs } | |
70 | ||
71 | }//g_hexstring | |
72 | ||
73 | group g_charstring { | |
74 | ||
75 | type record of charstring RoCS; | |
76 | //wrapper to test charstring in record: | |
77 | type record RCS { | |
78 | charstring cs optional | |
79 | } | |
80 | ||
81 | type record of RCS RoRCS; | |
82 | ||
83 | template RCS t_rcs(template charstring pl_cs) := { cs:=pl_cs } | |
84 | ||
85 | }//g_charstring | |
86 | ||
87 | group g_universal_charstring { | |
88 | ||
89 | type record of universal charstring RoUCS; | |
90 | //wrapper to test charstring in record: | |
91 | type record RUCS { | |
92 | universal charstring ucs optional | |
93 | } | |
94 | ||
95 | type record of RUCS RoRUCS; | |
96 | ||
97 | template RUCS t_rucs(template universal charstring pl_ucs) := { ucs:=pl_ucs } | |
98 | ||
99 | }//g_charstring | |
100 | ||
101 | group g_record { | |
102 | ||
103 | //REC | |
104 | type record REC { | |
105 | integer i optional, | |
106 | float f optional, | |
107 | charstring cs optional, | |
108 | bitstring bs optional | |
109 | } | |
110 | type record of REC RoREC; | |
111 | ||
112 | type record RREC { REC rec optional }; | |
113 | ||
114 | template RoREC t_rorec(template REC pl_rec) := { pl_rec } | |
115 | template RREC t_rrec( template REC pl_rec) := { rec := pl_rec } | |
116 | //REC2 | |
117 | type record REC2 { | |
118 | boolean b optional, | |
119 | charstring cs optional, | |
120 | int_1_3 i optional | |
121 | } | |
122 | type record of REC2 RoREC2; | |
123 | ||
124 | //record of boolean, octetstring, hexstring: | |
125 | type record REC_BOH { | |
126 | boolean b optional, | |
127 | octetstring o optional, | |
128 | hexstring h optional | |
129 | } | |
130 | ||
131 | type record REC_BAI3 { | |
132 | boolean b optional, | |
133 | AI3 ai3 optional | |
134 | } | |
135 | ||
136 | template REC t_rec(template integer pl_i, template float pl_f, template charstring pl_cs, template bitstring pl_bs) := { | |
137 | i:= pl_i, | |
138 | f:= pl_f, | |
139 | cs:=pl_cs, | |
140 | bs:=pl_bs | |
141 | } | |
142 | ||
143 | ||
144 | }//g_record | |
145 | ||
146 | group g_recordof { | |
147 | // see earlier: type record of integer RoI | |
148 | type record of RoI RoRoI; | |
149 | type record of RoB RoRoB; | |
150 | //type record of float RoF; | |
151 | type record of RoF RoRoF; | |
152 | ||
153 | }//g_recordof | |
154 | ||
155 | group g_array { | |
156 | //array of boolean; | |
157 | //array of integers; | |
158 | type integer AI3[3]; | |
159 | type integer AI2x3[2][3]; | |
160 | ||
161 | type record of AI3 RoAI3; | |
162 | type record of AI2x3 RoAI2x3; | |
163 | ||
164 | type record RAI3 { | |
165 | AI3 ai3 optional | |
166 | } | |
167 | ||
168 | type record of RAI3 RoRAI3; | |
169 | template RAI3 t_rai3(template AI3 pl_ai3) := { ai3 := pl_ai3 }; | |
170 | ||
171 | //array of floats | |
172 | //array of bitstrings | |
173 | //array of octetstrings | |
174 | //array of hexstrings | |
175 | //array of charstrings | |
176 | //array of records | |
177 | //arrays of sets | |
178 | //arrays of set of | |
179 | //array of enum | |
180 | //array of union | |
181 | //array of anytype | |
182 | //array of user type | |
183 | ||
184 | //see also REC_BAI3 | |
185 | }//g_array | |
186 | ||
187 | ||
188 | group g_set { | |
189 | ||
190 | type set SET { | |
191 | boolean b optional, | |
192 | integer i optional, | |
193 | float f optional, | |
194 | bitstring bs optional, | |
195 | octetstring os optional, | |
196 | hexstring hs optional, | |
197 | charstring cs optional | |
198 | } | |
199 | type record of SET RoSET; | |
200 | //template RoSET t_roset(template SET pl_set) := { pl_set }; | |
201 | ||
202 | type record RSET { SET s optional } | |
203 | template RSET t_rset(template SET pl_set) := {s:= pl_set }; | |
204 | type record of RSET RoRSET; | |
205 | ||
206 | }//g_set | |
207 | ||
208 | group g_setof { | |
209 | type set of charstring SoCS; | |
210 | type record of SoCS RoSoCS; | |
211 | type record RSoCS { SoCS s optional } | |
212 | template RSoCS t_rsocs(template SoCS pl_s) := { s := pl_s } | |
213 | type record of RSoCS RoRSoCS | |
214 | ||
215 | }//g_setof | |
216 | ||
217 | group g_enumerated { | |
218 | type enumerated MyEnum { first, second, third } | |
219 | ||
220 | type record REnum { MyEnum e optional } | |
221 | template REnum t_renum(template MyEnum pl_e) := { e := pl_e } | |
222 | }//g_enumerated | |
223 | ||
224 | group g_union { | |
225 | type union U { | |
226 | boolean b, | |
227 | integer i, | |
228 | float f, | |
229 | bitstring bs, | |
230 | octetstring os, | |
231 | hexstring hs, | |
232 | charstring cs, | |
233 | REC r, | |
234 | RoI roi, | |
235 | SET s, | |
236 | SoCS socs, | |
237 | MyEnum e, | |
238 | U u | |
239 | } | |
240 | ||
241 | type record RU { U u optional } | |
242 | template RU t_ru(template U pl_u) := { u := pl_u } | |
243 | ||
244 | }//g_union | |
245 | ||
246 | group g_anytype { | |
247 | ||
248 | }//g_anytype | |
249 | ||
250 | }//module |