blob: 41c92044d36855f666f0c5a6a52bb3c165f683ed [file] [log] [blame]
Lev Walkin4696c742005-08-22 12:23:54 +00001
2/*** <<< INCLUDES [Sequence] >>> ***/
3
4#include <INTEGER.h>
5#include <constr_SEQUENCE.h>
6
7/*** <<< TYPE-DECLS [Sequence] >>> ***/
8
9typedef struct Sequence {
10 INTEGER_t ainl;
11 INTEGER_t *aptr;
12
13 /* Context for parsing across buffer boundaries */
14 asn_struct_ctx_t _asn_ctx;
15} Sequence_t;
16
17/*** <<< FUNC-DECLS [Sequence] >>> ***/
18
19extern asn_TYPE_descriptor_t asn_DEF_Sequence;
20
21/*** <<< STAT-DEFS [Sequence] >>> ***/
22
23static asn_TYPE_member_t asn_MBR_Sequence_1[] = {
24 { ATF_NOFLAGS, 0, offsetof(struct Sequence, ainl),
25 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
26 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +000027 .type = &asn_DEF_INTEGER,
Lev Walkin4696c742005-08-22 12:23:54 +000028 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +000029 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
30 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +000031 .name = "ainl"
32 },
33 { ATF_POINTER, 0, offsetof(struct Sequence, aptr),
34 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
35 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +000036 .type = &asn_DEF_INTEGER,
Lev Walkin4696c742005-08-22 12:23:54 +000037 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +000038 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
39 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +000040 .name = "aptr"
41 },
42};
Lev Walkina7591b52014-10-12 18:37:35 -070043static const ber_tlv_tag_t asn_DEF_Sequence_tags_1[] = {
Lev Walkin4696c742005-08-22 12:23:54 +000044 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
45};
Lev Walkina7591b52014-10-12 18:37:35 -070046static const asn_TYPE_tag2member_t asn_MAP_Sequence_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070047 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ainl */
48 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* aptr */
Lev Walkin4696c742005-08-22 12:23:54 +000049};
Lev Walkin59b176e2005-11-26 11:25:14 +000050static asn_SEQUENCE_specifics_t asn_SPC_Sequence_specs_1 = {
Lev Walkin4696c742005-08-22 12:23:54 +000051 sizeof(struct Sequence),
52 offsetof(struct Sequence, _asn_ctx),
Lev Walkin59b176e2005-11-26 11:25:14 +000053 asn_MAP_Sequence_tag2el_1,
Lev Walkin4696c742005-08-22 12:23:54 +000054 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +000055 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin4696c742005-08-22 12:23:54 +000056 -1, /* Start extensions */
57 -1 /* Stop extensions */
58};
59asn_TYPE_descriptor_t asn_DEF_Sequence = {
60 "Sequence",
61 "Sequence",
62 SEQUENCE_free,
63 SEQUENCE_print,
64 SEQUENCE_constraint,
65 SEQUENCE_decode_ber,
66 SEQUENCE_encode_der,
67 SEQUENCE_decode_xer,
68 SEQUENCE_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +000069 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin4696c742005-08-22 12:23:54 +000070 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +000071 asn_DEF_Sequence_tags_1,
72 sizeof(asn_DEF_Sequence_tags_1)
73 /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
74 asn_DEF_Sequence_tags_1, /* Same as above */
75 sizeof(asn_DEF_Sequence_tags_1)
76 /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
77 0, /* No PER visible constraints */
Lev Walkin4696c742005-08-22 12:23:54 +000078 asn_MBR_Sequence_1,
79 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +000080 &asn_SPC_Sequence_specs_1 /* Additional specs */
Lev Walkin4696c742005-08-22 12:23:54 +000081};
82
83
84/*** <<< INCLUDES [Set] >>> ***/
85
Lev Walkin22b5ed42006-09-13 02:51:20 +000086#include "Sequence.h"
Lev Walkin4696c742005-08-22 12:23:54 +000087#include <constr_SET.h>
88
89/*** <<< DEPS [Set] >>> ***/
90
91
92/*
93 * Method of determining the components presence
94 */
95typedef enum Set_PR {
96 Set_PR_ainl, /* Member ainl is present */
97 Set_PR_aptr, /* Member aptr is present */
98} Set_PR;
99
100/*** <<< FWD-DECLS [Set] >>> ***/
101
102struct Sequence;
103
104/*** <<< TYPE-DECLS [Set] >>> ***/
105
106typedef struct Set {
107 Sequence_t ainl;
108 struct Sequence *aptr;
109
110 /* Presence bitmask: ASN_SET_ISPRESENT(pSet, Set_PR_x) */
111 unsigned int _presence_map
112 [((2+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
113
114 /* Context for parsing across buffer boundaries */
115 asn_struct_ctx_t _asn_ctx;
116} Set_t;
117
118/*** <<< FUNC-DECLS [Set] >>> ***/
119
120extern asn_TYPE_descriptor_t asn_DEF_Set;
121
122/*** <<< POST-INCLUDE [Set] >>> ***/
123
Lev Walkin22b5ed42006-09-13 02:51:20 +0000124#include "Sequence.h"
Lev Walkin4696c742005-08-22 12:23:54 +0000125
126/*** <<< STAT-DEFS [Set] >>> ***/
127
128static asn_TYPE_member_t asn_MBR_Set_1[] = {
129 { ATF_NOFLAGS, 0, offsetof(struct Set, ainl),
130 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
131 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000132 .type = &asn_DEF_Sequence,
Lev Walkin4696c742005-08-22 12:23:54 +0000133 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000134 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
135 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +0000136 .name = "ainl"
137 },
138 { ATF_POINTER, 0, offsetof(struct Set, aptr),
139 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
140 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000141 .type = &asn_DEF_Sequence,
Lev Walkin4696c742005-08-22 12:23:54 +0000142 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000143 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
144 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +0000145 .name = "aptr"
146 },
147};
Lev Walkina7591b52014-10-12 18:37:35 -0700148static const ber_tlv_tag_t asn_DEF_Set_tags_1[] = {
Lev Walkin4696c742005-08-22 12:23:54 +0000149 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
150};
Lev Walkina7591b52014-10-12 18:37:35 -0700151static const asn_TYPE_tag2member_t asn_MAP_Set_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700152 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ainl */
153 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* aptr */
Lev Walkin4696c742005-08-22 12:23:54 +0000154};
Lev Walkina7591b52014-10-12 18:37:35 -0700155static const uint8_t asn_MAP_Set_mmap_1[(2 + (8 * sizeof(unsigned int)) - 1) / 8] = {
Lev Walkin4696c742005-08-22 12:23:54 +0000156 (1 << 7) | (1 << 6)
157};
Lev Walkin59b176e2005-11-26 11:25:14 +0000158static asn_SET_specifics_t asn_SPC_Set_specs_1 = {
Lev Walkin4696c742005-08-22 12:23:54 +0000159 sizeof(struct Set),
160 offsetof(struct Set, _asn_ctx),
161 offsetof(struct Set, _presence_map),
Lev Walkin59b176e2005-11-26 11:25:14 +0000162 asn_MAP_Set_tag2el_1,
Lev Walkin4696c742005-08-22 12:23:54 +0000163 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000164 asn_MAP_Set_tag2el_1, /* Same as above */
Lev Walkin4696c742005-08-22 12:23:54 +0000165 2, /* Count of tags in the CXER map */
166 0, /* Whether extensible */
Lev Walkin59b176e2005-11-26 11:25:14 +0000167 (unsigned int *)asn_MAP_Set_mmap_1 /* Mandatory elements map */
Lev Walkin4696c742005-08-22 12:23:54 +0000168};
169asn_TYPE_descriptor_t asn_DEF_Set = {
170 "Set",
171 "Set",
172 SET_free,
173 SET_print,
174 SET_constraint,
175 SET_decode_ber,
176 SET_encode_der,
177 SET_decode_xer,
178 SET_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000179 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin4696c742005-08-22 12:23:54 +0000180 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000181 asn_DEF_Set_tags_1,
182 sizeof(asn_DEF_Set_tags_1)
183 /sizeof(asn_DEF_Set_tags_1[0]), /* 1 */
184 asn_DEF_Set_tags_1, /* Same as above */
185 sizeof(asn_DEF_Set_tags_1)
186 /sizeof(asn_DEF_Set_tags_1[0]), /* 1 */
187 0, /* No PER visible constraints */
Lev Walkin4696c742005-08-22 12:23:54 +0000188 asn_MBR_Set_1,
189 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000190 &asn_SPC_Set_specs_1 /* Additional specs */
Lev Walkin4696c742005-08-22 12:23:54 +0000191};
192
193
194/*** <<< INCLUDES [Choice] >>> ***/
195
Lev Walkin22b5ed42006-09-13 02:51:20 +0000196#include "Sequence.h"
Lev Walkin4696c742005-08-22 12:23:54 +0000197#include <INTEGER.h>
198#include <asn_SET_OF.h>
199#include <constr_SET_OF.h>
200#include <constr_CHOICE.h>
201
202/*** <<< DEPS [Choice] >>> ***/
203
204typedef enum Choice_PR {
205 Choice_PR_NOTHING, /* No components present */
206 Choice_PR_setof,
207 Choice_PR_aptr,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000208 Choice_PR_ainl
Lev Walkin4696c742005-08-22 12:23:54 +0000209} Choice_PR;
210
211/*** <<< FWD-DECLS [Choice] >>> ***/
212
213struct Sequence;
214
215/*** <<< TYPE-DECLS [Choice] >>> ***/
216
217typedef struct Choice {
218 Choice_PR present;
219 union Choice_u {
220 struct setof {
221 A_SET_OF(INTEGER_t) list;
222
223 /* Context for parsing across buffer boundaries */
224 asn_struct_ctx_t _asn_ctx;
225 } *setof;
226 struct Sequence *aptr;
227 Sequence_t ainl;
228 } choice;
229
230 /* Context for parsing across buffer boundaries */
231 asn_struct_ctx_t _asn_ctx;
232} Choice_t;
233
234/*** <<< FUNC-DECLS [Choice] >>> ***/
235
236extern asn_TYPE_descriptor_t asn_DEF_Choice;
237
238/*** <<< POST-INCLUDE [Choice] >>> ***/
239
Lev Walkin22b5ed42006-09-13 02:51:20 +0000240#include "Sequence.h"
Lev Walkin4696c742005-08-22 12:23:54 +0000241
242/*** <<< STAT-DEFS [Choice] >>> ***/
243
244static asn_TYPE_member_t asn_MBR_setof_2[] = {
245 { ATF_POINTER, 0, 0,
246 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
247 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000248 .type = &asn_DEF_INTEGER,
Lev Walkin4696c742005-08-22 12:23:54 +0000249 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000250 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
251 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +0000252 .name = ""
253 },
254};
Lev Walkina7591b52014-10-12 18:37:35 -0700255static const ber_tlv_tag_t asn_DEF_setof_tags_2[] = {
Lev Walkin4696c742005-08-22 12:23:54 +0000256 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
257 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
258};
Lev Walkin59b176e2005-11-26 11:25:14 +0000259static asn_SET_OF_specifics_t asn_SPC_setof_specs_2 = {
Lev Walkin4696c742005-08-22 12:23:54 +0000260 sizeof(struct setof),
261 offsetof(struct setof, _asn_ctx),
262 0, /* XER encoding is XMLDelimitedItemList */
263};
264static /* Use -fall-defs-global to expose */
265asn_TYPE_descriptor_t asn_DEF_setof_2 = {
266 "setof",
267 "setof",
268 SET_OF_free,
269 SET_OF_print,
270 SET_OF_constraint,
271 SET_OF_decode_ber,
272 SET_OF_encode_der,
273 SET_OF_decode_xer,
274 SET_OF_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000275 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin4696c742005-08-22 12:23:54 +0000276 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000277 asn_DEF_setof_tags_2,
278 sizeof(asn_DEF_setof_tags_2)
279 /sizeof(asn_DEF_setof_tags_2[0]) - 1, /* 1 */
280 asn_DEF_setof_tags_2, /* Same as above */
281 sizeof(asn_DEF_setof_tags_2)
282 /sizeof(asn_DEF_setof_tags_2[0]), /* 2 */
283 0, /* No PER visible constraints */
Lev Walkin4696c742005-08-22 12:23:54 +0000284 asn_MBR_setof_2,
285 1, /* Single element */
Lev Walkin59b176e2005-11-26 11:25:14 +0000286 &asn_SPC_setof_specs_2 /* Additional specs */
Lev Walkin4696c742005-08-22 12:23:54 +0000287};
288
289static asn_TYPE_member_t asn_MBR_Choice_1[] = {
290 { ATF_POINTER, 0, offsetof(struct Choice, choice.setof),
291 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
Lev Walkin9ab21b82006-10-19 02:46:01 +0000292 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000293 .type = &asn_DEF_setof_2,
Lev Walkin4696c742005-08-22 12:23:54 +0000294 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000295 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
296 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +0000297 .name = "setof"
298 },
299 { ATF_POINTER, 0, offsetof(struct Choice, choice.aptr),
300 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
301 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000302 .type = &asn_DEF_Sequence,
Lev Walkin4696c742005-08-22 12:23:54 +0000303 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000304 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
305 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +0000306 .name = "aptr"
307 },
308 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.ainl),
309 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
310 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000311 .type = &asn_DEF_Sequence,
Lev Walkin4696c742005-08-22 12:23:54 +0000312 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000313 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
314 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +0000315 .name = "ainl"
316 },
317};
Lev Walkina7591b52014-10-12 18:37:35 -0700318static const asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700319 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* setof */
320 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* aptr */
321 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ainl */
Lev Walkin4696c742005-08-22 12:23:54 +0000322};
Lev Walkin59b176e2005-11-26 11:25:14 +0000323static asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
Lev Walkin4696c742005-08-22 12:23:54 +0000324 sizeof(struct Choice),
325 offsetof(struct Choice, _asn_ctx),
326 offsetof(struct Choice, present),
327 sizeof(((struct Choice *)0)->present),
Lev Walkin59b176e2005-11-26 11:25:14 +0000328 asn_MAP_Choice_tag2el_1,
Lev Walkin4696c742005-08-22 12:23:54 +0000329 3, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000330 .canonical_order = 0,
331 .ext_start = -1 /* Extensions start */
Lev Walkin4696c742005-08-22 12:23:54 +0000332};
333asn_TYPE_descriptor_t asn_DEF_Choice = {
334 "Choice",
335 "Choice",
336 CHOICE_free,
337 CHOICE_print,
338 CHOICE_constraint,
339 CHOICE_decode_ber,
340 CHOICE_encode_der,
341 CHOICE_decode_xer,
342 CHOICE_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000343 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin4696c742005-08-22 12:23:54 +0000344 CHOICE_outmost_tag,
345 0, /* No effective tags (pointer) */
346 0, /* No effective tags (count) */
347 0, /* No tags (pointer) */
348 0, /* No tags (count) */
Lev Walkin59b176e2005-11-26 11:25:14 +0000349 0, /* No PER visible constraints */
Lev Walkin4696c742005-08-22 12:23:54 +0000350 asn_MBR_Choice_1,
351 3, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000352 &asn_SPC_Choice_specs_1 /* Additional specs */
Lev Walkin4696c742005-08-22 12:23:54 +0000353};
354