blob: 736fe5f33d17c2849c5d9aff462e74fd5f036d56 [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 Walkinb33425f2017-07-14 14:59:52 +040029 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000030 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
31 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +000032 .name = "ainl"
33 },
34 { ATF_POINTER, 0, offsetof(struct Sequence, aptr),
35 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
36 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +000037 .type = &asn_DEF_INTEGER,
Lev Walkin4696c742005-08-22 12:23:54 +000038 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040039 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000040 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
41 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +000042 .name = "aptr"
43 },
44};
Lev Walkina7591b52014-10-12 18:37:35 -070045static const ber_tlv_tag_t asn_DEF_Sequence_tags_1[] = {
Lev Walkin4696c742005-08-22 12:23:54 +000046 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
47};
Lev Walkina7591b52014-10-12 18:37:35 -070048static const asn_TYPE_tag2member_t asn_MAP_Sequence_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070049 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ainl */
50 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* aptr */
Lev Walkin4696c742005-08-22 12:23:54 +000051};
Lev Walkin59b176e2005-11-26 11:25:14 +000052static asn_SEQUENCE_specifics_t asn_SPC_Sequence_specs_1 = {
Lev Walkin4696c742005-08-22 12:23:54 +000053 sizeof(struct Sequence),
54 offsetof(struct Sequence, _asn_ctx),
Lev Walkin59b176e2005-11-26 11:25:14 +000055 asn_MAP_Sequence_tag2el_1,
Lev Walkin4696c742005-08-22 12:23:54 +000056 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +000057 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin4696c742005-08-22 12:23:54 +000058 -1, /* Start extensions */
59 -1 /* Stop extensions */
60};
61asn_TYPE_descriptor_t asn_DEF_Sequence = {
62 "Sequence",
63 "Sequence",
64 SEQUENCE_free,
65 SEQUENCE_print,
66 SEQUENCE_constraint,
67 SEQUENCE_decode_ber,
68 SEQUENCE_encode_der,
69 SEQUENCE_decode_xer,
70 SEQUENCE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -070071 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +040072 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin4696c742005-08-22 12:23:54 +000073 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +000074 asn_DEF_Sequence_tags_1,
75 sizeof(asn_DEF_Sequence_tags_1)
76 /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
77 asn_DEF_Sequence_tags_1, /* Same as above */
78 sizeof(asn_DEF_Sequence_tags_1)
79 /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +040080 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +000081 0, /* No PER visible constraints */
Lev Walkin4696c742005-08-22 12:23:54 +000082 asn_MBR_Sequence_1,
83 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +000084 &asn_SPC_Sequence_specs_1 /* Additional specs */
Lev Walkin4696c742005-08-22 12:23:54 +000085};
86
87
88/*** <<< INCLUDES [Set] >>> ***/
89
Lev Walkin22b5ed42006-09-13 02:51:20 +000090#include "Sequence.h"
Lev Walkin4696c742005-08-22 12:23:54 +000091#include <constr_SET.h>
92
93/*** <<< DEPS [Set] >>> ***/
94
95
96/*
97 * Method of determining the components presence
98 */
99typedef enum Set_PR {
100 Set_PR_ainl, /* Member ainl is present */
101 Set_PR_aptr, /* Member aptr is present */
102} Set_PR;
103
104/*** <<< FWD-DECLS [Set] >>> ***/
105
106struct Sequence;
107
108/*** <<< TYPE-DECLS [Set] >>> ***/
109
110typedef struct Set {
111 Sequence_t ainl;
112 struct Sequence *aptr;
113
114 /* Presence bitmask: ASN_SET_ISPRESENT(pSet, Set_PR_x) */
115 unsigned int _presence_map
116 [((2+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
117
118 /* Context for parsing across buffer boundaries */
119 asn_struct_ctx_t _asn_ctx;
120} Set_t;
121
122/*** <<< FUNC-DECLS [Set] >>> ***/
123
124extern asn_TYPE_descriptor_t asn_DEF_Set;
125
126/*** <<< POST-INCLUDE [Set] >>> ***/
127
Lev Walkin22b5ed42006-09-13 02:51:20 +0000128#include "Sequence.h"
Lev Walkin4696c742005-08-22 12:23:54 +0000129
130/*** <<< STAT-DEFS [Set] >>> ***/
131
132static asn_TYPE_member_t asn_MBR_Set_1[] = {
133 { ATF_NOFLAGS, 0, offsetof(struct Set, ainl),
134 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
135 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000136 .type = &asn_DEF_Sequence,
Lev Walkin4696c742005-08-22 12:23:54 +0000137 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400138 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000139 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
140 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +0000141 .name = "ainl"
142 },
143 { ATF_POINTER, 0, offsetof(struct Set, aptr),
144 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
145 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000146 .type = &asn_DEF_Sequence,
Lev Walkin4696c742005-08-22 12:23:54 +0000147 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400148 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000149 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
150 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +0000151 .name = "aptr"
152 },
153};
Lev Walkina7591b52014-10-12 18:37:35 -0700154static const ber_tlv_tag_t asn_DEF_Set_tags_1[] = {
Lev Walkin4696c742005-08-22 12:23:54 +0000155 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
156};
Lev Walkina7591b52014-10-12 18:37:35 -0700157static const asn_TYPE_tag2member_t asn_MAP_Set_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700158 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ainl */
159 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* aptr */
Lev Walkin4696c742005-08-22 12:23:54 +0000160};
Lev Walkina7591b52014-10-12 18:37:35 -0700161static const uint8_t asn_MAP_Set_mmap_1[(2 + (8 * sizeof(unsigned int)) - 1) / 8] = {
Lev Walkin4696c742005-08-22 12:23:54 +0000162 (1 << 7) | (1 << 6)
163};
Lev Walkin59b176e2005-11-26 11:25:14 +0000164static asn_SET_specifics_t asn_SPC_Set_specs_1 = {
Lev Walkin4696c742005-08-22 12:23:54 +0000165 sizeof(struct Set),
166 offsetof(struct Set, _asn_ctx),
167 offsetof(struct Set, _presence_map),
Lev Walkin59b176e2005-11-26 11:25:14 +0000168 asn_MAP_Set_tag2el_1,
Lev Walkin4696c742005-08-22 12:23:54 +0000169 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000170 asn_MAP_Set_tag2el_1, /* Same as above */
Lev Walkin4696c742005-08-22 12:23:54 +0000171 2, /* Count of tags in the CXER map */
172 0, /* Whether extensible */
Lev Walkin46ef3f32017-07-06 08:47:53 -0700173 (const unsigned int *)asn_MAP_Set_mmap_1 /* Mandatory elements map */
Lev Walkin4696c742005-08-22 12:23:54 +0000174};
175asn_TYPE_descriptor_t asn_DEF_Set = {
176 "Set",
177 "Set",
178 SET_free,
179 SET_print,
180 SET_constraint,
181 SET_decode_ber,
182 SET_encode_der,
183 SET_decode_xer,
184 SET_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700185 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400186 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin4696c742005-08-22 12:23:54 +0000187 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000188 asn_DEF_Set_tags_1,
189 sizeof(asn_DEF_Set_tags_1)
190 /sizeof(asn_DEF_Set_tags_1[0]), /* 1 */
191 asn_DEF_Set_tags_1, /* Same as above */
192 sizeof(asn_DEF_Set_tags_1)
193 /sizeof(asn_DEF_Set_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400194 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000195 0, /* No PER visible constraints */
Lev Walkin4696c742005-08-22 12:23:54 +0000196 asn_MBR_Set_1,
197 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000198 &asn_SPC_Set_specs_1 /* Additional specs */
Lev Walkin4696c742005-08-22 12:23:54 +0000199};
200
201
202/*** <<< INCLUDES [Choice] >>> ***/
203
Lev Walkin22b5ed42006-09-13 02:51:20 +0000204#include "Sequence.h"
Lev Walkin4696c742005-08-22 12:23:54 +0000205#include <INTEGER.h>
206#include <asn_SET_OF.h>
207#include <constr_SET_OF.h>
208#include <constr_CHOICE.h>
209
210/*** <<< DEPS [Choice] >>> ***/
211
212typedef enum Choice_PR {
213 Choice_PR_NOTHING, /* No components present */
214 Choice_PR_setof,
215 Choice_PR_aptr,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000216 Choice_PR_ainl
Lev Walkin4696c742005-08-22 12:23:54 +0000217} Choice_PR;
218
219/*** <<< FWD-DECLS [Choice] >>> ***/
220
221struct Sequence;
222
223/*** <<< TYPE-DECLS [Choice] >>> ***/
224
225typedef struct Choice {
226 Choice_PR present;
227 union Choice_u {
228 struct setof {
229 A_SET_OF(INTEGER_t) list;
230
231 /* Context for parsing across buffer boundaries */
232 asn_struct_ctx_t _asn_ctx;
233 } *setof;
234 struct Sequence *aptr;
235 Sequence_t ainl;
236 } choice;
237
238 /* Context for parsing across buffer boundaries */
239 asn_struct_ctx_t _asn_ctx;
240} Choice_t;
241
242/*** <<< FUNC-DECLS [Choice] >>> ***/
243
244extern asn_TYPE_descriptor_t asn_DEF_Choice;
245
246/*** <<< POST-INCLUDE [Choice] >>> ***/
247
Lev Walkin22b5ed42006-09-13 02:51:20 +0000248#include "Sequence.h"
Lev Walkin4696c742005-08-22 12:23:54 +0000249
250/*** <<< STAT-DEFS [Choice] >>> ***/
251
252static asn_TYPE_member_t asn_MBR_setof_2[] = {
253 { ATF_POINTER, 0, 0,
254 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
255 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000256 .type = &asn_DEF_INTEGER,
Lev Walkin4696c742005-08-22 12:23:54 +0000257 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400258 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000259 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
260 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +0000261 .name = ""
262 },
263};
Lev Walkina7591b52014-10-12 18:37:35 -0700264static const ber_tlv_tag_t asn_DEF_setof_tags_2[] = {
Lev Walkin4696c742005-08-22 12:23:54 +0000265 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
266 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
267};
Lev Walkin59b176e2005-11-26 11:25:14 +0000268static asn_SET_OF_specifics_t asn_SPC_setof_specs_2 = {
Lev Walkin4696c742005-08-22 12:23:54 +0000269 sizeof(struct setof),
270 offsetof(struct setof, _asn_ctx),
271 0, /* XER encoding is XMLDelimitedItemList */
272};
273static /* Use -fall-defs-global to expose */
274asn_TYPE_descriptor_t asn_DEF_setof_2 = {
275 "setof",
276 "setof",
277 SET_OF_free,
278 SET_OF_print,
279 SET_OF_constraint,
280 SET_OF_decode_ber,
281 SET_OF_encode_der,
282 SET_OF_decode_xer,
283 SET_OF_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700284 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400285 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin4696c742005-08-22 12:23:54 +0000286 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000287 asn_DEF_setof_tags_2,
288 sizeof(asn_DEF_setof_tags_2)
289 /sizeof(asn_DEF_setof_tags_2[0]) - 1, /* 1 */
290 asn_DEF_setof_tags_2, /* Same as above */
291 sizeof(asn_DEF_setof_tags_2)
292 /sizeof(asn_DEF_setof_tags_2[0]), /* 2 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400293 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000294 0, /* No PER visible constraints */
Lev Walkin4696c742005-08-22 12:23:54 +0000295 asn_MBR_setof_2,
296 1, /* Single element */
Lev Walkin59b176e2005-11-26 11:25:14 +0000297 &asn_SPC_setof_specs_2 /* Additional specs */
Lev Walkin4696c742005-08-22 12:23:54 +0000298};
299
300static asn_TYPE_member_t asn_MBR_Choice_1[] = {
301 { ATF_POINTER, 0, offsetof(struct Choice, choice.setof),
302 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
Lev Walkin9ab21b82006-10-19 02:46:01 +0000303 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000304 .type = &asn_DEF_setof_2,
Lev Walkin4696c742005-08-22 12:23:54 +0000305 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400306 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000307 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
308 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +0000309 .name = "setof"
310 },
311 { ATF_POINTER, 0, offsetof(struct Choice, choice.aptr),
312 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
313 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000314 .type = &asn_DEF_Sequence,
Lev Walkin4696c742005-08-22 12:23:54 +0000315 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400316 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000317 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
318 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +0000319 .name = "aptr"
320 },
321 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.ainl),
322 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
323 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000324 .type = &asn_DEF_Sequence,
Lev Walkin4696c742005-08-22 12:23:54 +0000325 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400326 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000327 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
328 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +0000329 .name = "ainl"
330 },
331};
Lev Walkina7591b52014-10-12 18:37:35 -0700332static const asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700333 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* setof */
334 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* aptr */
335 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ainl */
Lev Walkin4696c742005-08-22 12:23:54 +0000336};
Lev Walkin59b176e2005-11-26 11:25:14 +0000337static asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
Lev Walkin4696c742005-08-22 12:23:54 +0000338 sizeof(struct Choice),
339 offsetof(struct Choice, _asn_ctx),
340 offsetof(struct Choice, present),
341 sizeof(((struct Choice *)0)->present),
Lev Walkin59b176e2005-11-26 11:25:14 +0000342 asn_MAP_Choice_tag2el_1,
Lev Walkin4696c742005-08-22 12:23:54 +0000343 3, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000344 .canonical_order = 0,
345 .ext_start = -1 /* Extensions start */
Lev Walkin4696c742005-08-22 12:23:54 +0000346};
347asn_TYPE_descriptor_t asn_DEF_Choice = {
348 "Choice",
349 "Choice",
350 CHOICE_free,
351 CHOICE_print,
352 CHOICE_constraint,
353 CHOICE_decode_ber,
354 CHOICE_encode_der,
355 CHOICE_decode_xer,
356 CHOICE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700357 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400358 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin4696c742005-08-22 12:23:54 +0000359 CHOICE_outmost_tag,
360 0, /* No effective tags (pointer) */
361 0, /* No effective tags (count) */
362 0, /* No tags (pointer) */
363 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400364 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000365 0, /* No PER visible constraints */
Lev Walkin4696c742005-08-22 12:23:54 +0000366 asn_MBR_Choice_1,
367 3, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000368 &asn_SPC_Choice_specs_1 /* Additional specs */
Lev Walkin4696c742005-08-22 12:23:54 +0000369};
370