blob: 82854af19ebd46b8a58587c6a5823255911e4ea7 [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;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080020extern asn_SEQUENCE_specifics_t asn_SPC_Sequence_specs_1;
21extern asn_TYPE_member_t asn_MBR_Sequence_1[2];
Lev Walkin4696c742005-08-22 12:23:54 +000022
23/*** <<< STAT-DEFS [Sequence] >>> ***/
24
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080025asn_TYPE_member_t asn_MBR_Sequence_1[] = {
Lev Walkin4696c742005-08-22 12:23:54 +000026 { ATF_NOFLAGS, 0, offsetof(struct Sequence, ainl),
27 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
28 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +000029 .type = &asn_DEF_INTEGER,
Lev Walkin4696c742005-08-22 12:23:54 +000030 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040031 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000032 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
33 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +000034 .name = "ainl"
35 },
36 { ATF_POINTER, 0, offsetof(struct Sequence, aptr),
37 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
38 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +000039 .type = &asn_DEF_INTEGER,
Lev Walkin4696c742005-08-22 12:23:54 +000040 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040041 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000042 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
43 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +000044 .name = "aptr"
45 },
46};
Lev Walkina7591b52014-10-12 18:37:35 -070047static const ber_tlv_tag_t asn_DEF_Sequence_tags_1[] = {
Lev Walkin4696c742005-08-22 12:23:54 +000048 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
49};
Lev Walkina7591b52014-10-12 18:37:35 -070050static const asn_TYPE_tag2member_t asn_MAP_Sequence_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070051 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ainl */
52 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* aptr */
Lev Walkin4696c742005-08-22 12:23:54 +000053};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080054asn_SEQUENCE_specifics_t asn_SPC_Sequence_specs_1 = {
Lev Walkin4696c742005-08-22 12:23:54 +000055 sizeof(struct Sequence),
56 offsetof(struct Sequence, _asn_ctx),
Lev Walkin59b176e2005-11-26 11:25:14 +000057 asn_MAP_Sequence_tag2el_1,
Lev Walkin4696c742005-08-22 12:23:54 +000058 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +000059 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin4696c742005-08-22 12:23:54 +000060 -1, /* Start extensions */
61 -1 /* Stop extensions */
62};
63asn_TYPE_descriptor_t asn_DEF_Sequence = {
64 "Sequence",
65 "Sequence",
66 SEQUENCE_free,
67 SEQUENCE_print,
68 SEQUENCE_constraint,
69 SEQUENCE_decode_ber,
70 SEQUENCE_encode_der,
71 SEQUENCE_decode_xer,
72 SEQUENCE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -070073 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +040074 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin4696c742005-08-22 12:23:54 +000075 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +000076 asn_DEF_Sequence_tags_1,
77 sizeof(asn_DEF_Sequence_tags_1)
78 /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
79 asn_DEF_Sequence_tags_1, /* Same as above */
80 sizeof(asn_DEF_Sequence_tags_1)
81 /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +040082 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +000083 0, /* No PER visible constraints */
Lev Walkin4696c742005-08-22 12:23:54 +000084 asn_MBR_Sequence_1,
85 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +000086 &asn_SPC_Sequence_specs_1 /* Additional specs */
Lev Walkin4696c742005-08-22 12:23:54 +000087};
88
89
90/*** <<< INCLUDES [Set] >>> ***/
91
Lev Walkin22b5ed42006-09-13 02:51:20 +000092#include "Sequence.h"
Lev Walkin4696c742005-08-22 12:23:54 +000093#include <constr_SET.h>
94
95/*** <<< DEPS [Set] >>> ***/
96
97
98/*
99 * Method of determining the components presence
100 */
101typedef enum Set_PR {
102 Set_PR_ainl, /* Member ainl is present */
103 Set_PR_aptr, /* Member aptr is present */
104} Set_PR;
105
106/*** <<< FWD-DECLS [Set] >>> ***/
107
108struct Sequence;
109
110/*** <<< TYPE-DECLS [Set] >>> ***/
111
112typedef struct Set {
113 Sequence_t ainl;
114 struct Sequence *aptr;
115
116 /* Presence bitmask: ASN_SET_ISPRESENT(pSet, Set_PR_x) */
117 unsigned int _presence_map
118 [((2+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
119
120 /* Context for parsing across buffer boundaries */
121 asn_struct_ctx_t _asn_ctx;
122} Set_t;
123
124/*** <<< FUNC-DECLS [Set] >>> ***/
125
126extern asn_TYPE_descriptor_t asn_DEF_Set;
127
128/*** <<< POST-INCLUDE [Set] >>> ***/
129
Lev Walkin22b5ed42006-09-13 02:51:20 +0000130#include "Sequence.h"
Lev Walkin4696c742005-08-22 12:23:54 +0000131
132/*** <<< STAT-DEFS [Set] >>> ***/
133
134static asn_TYPE_member_t asn_MBR_Set_1[] = {
135 { ATF_NOFLAGS, 0, offsetof(struct Set, ainl),
136 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
137 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000138 .type = &asn_DEF_Sequence,
Lev Walkin4696c742005-08-22 12:23:54 +0000139 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400140 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000141 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
142 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +0000143 .name = "ainl"
144 },
145 { ATF_POINTER, 0, offsetof(struct Set, aptr),
146 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
147 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000148 .type = &asn_DEF_Sequence,
Lev Walkin4696c742005-08-22 12:23:54 +0000149 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400150 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000151 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
152 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +0000153 .name = "aptr"
154 },
155};
Lev Walkina7591b52014-10-12 18:37:35 -0700156static const ber_tlv_tag_t asn_DEF_Set_tags_1[] = {
Lev Walkin4696c742005-08-22 12:23:54 +0000157 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
158};
Lev Walkina7591b52014-10-12 18:37:35 -0700159static const asn_TYPE_tag2member_t asn_MAP_Set_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700160 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ainl */
161 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* aptr */
Lev Walkin4696c742005-08-22 12:23:54 +0000162};
Lev Walkina7591b52014-10-12 18:37:35 -0700163static const uint8_t asn_MAP_Set_mmap_1[(2 + (8 * sizeof(unsigned int)) - 1) / 8] = {
Lev Walkin4696c742005-08-22 12:23:54 +0000164 (1 << 7) | (1 << 6)
165};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800166static
167asn_SET_specifics_t asn_SPC_Set_specs_1 = {
Lev Walkin4696c742005-08-22 12:23:54 +0000168 sizeof(struct Set),
169 offsetof(struct Set, _asn_ctx),
170 offsetof(struct Set, _presence_map),
Lev Walkin59b176e2005-11-26 11:25:14 +0000171 asn_MAP_Set_tag2el_1,
Lev Walkin4696c742005-08-22 12:23:54 +0000172 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000173 asn_MAP_Set_tag2el_1, /* Same as above */
Lev Walkin4696c742005-08-22 12:23:54 +0000174 2, /* Count of tags in the CXER map */
175 0, /* Whether extensible */
Lev Walkin46ef3f32017-07-06 08:47:53 -0700176 (const unsigned int *)asn_MAP_Set_mmap_1 /* Mandatory elements map */
Lev Walkin4696c742005-08-22 12:23:54 +0000177};
178asn_TYPE_descriptor_t asn_DEF_Set = {
179 "Set",
180 "Set",
181 SET_free,
182 SET_print,
183 SET_constraint,
184 SET_decode_ber,
185 SET_encode_der,
186 SET_decode_xer,
187 SET_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700188 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400189 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin4696c742005-08-22 12:23:54 +0000190 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000191 asn_DEF_Set_tags_1,
192 sizeof(asn_DEF_Set_tags_1)
193 /sizeof(asn_DEF_Set_tags_1[0]), /* 1 */
194 asn_DEF_Set_tags_1, /* Same as above */
195 sizeof(asn_DEF_Set_tags_1)
196 /sizeof(asn_DEF_Set_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400197 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000198 0, /* No PER visible constraints */
Lev Walkin4696c742005-08-22 12:23:54 +0000199 asn_MBR_Set_1,
200 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000201 &asn_SPC_Set_specs_1 /* Additional specs */
Lev Walkin4696c742005-08-22 12:23:54 +0000202};
203
204
205/*** <<< INCLUDES [Choice] >>> ***/
206
Lev Walkin22b5ed42006-09-13 02:51:20 +0000207#include "Sequence.h"
Lev Walkin4696c742005-08-22 12:23:54 +0000208#include <INTEGER.h>
209#include <asn_SET_OF.h>
210#include <constr_SET_OF.h>
211#include <constr_CHOICE.h>
212
213/*** <<< DEPS [Choice] >>> ***/
214
215typedef enum Choice_PR {
216 Choice_PR_NOTHING, /* No components present */
217 Choice_PR_setof,
218 Choice_PR_aptr,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000219 Choice_PR_ainl
Lev Walkin4696c742005-08-22 12:23:54 +0000220} Choice_PR;
221
222/*** <<< FWD-DECLS [Choice] >>> ***/
223
224struct Sequence;
225
226/*** <<< TYPE-DECLS [Choice] >>> ***/
227
228typedef struct Choice {
229 Choice_PR present;
230 union Choice_u {
231 struct setof {
232 A_SET_OF(INTEGER_t) list;
233
234 /* Context for parsing across buffer boundaries */
235 asn_struct_ctx_t _asn_ctx;
236 } *setof;
237 struct Sequence *aptr;
238 Sequence_t ainl;
239 } choice;
240
241 /* Context for parsing across buffer boundaries */
242 asn_struct_ctx_t _asn_ctx;
243} Choice_t;
244
245/*** <<< FUNC-DECLS [Choice] >>> ***/
246
247extern asn_TYPE_descriptor_t asn_DEF_Choice;
248
249/*** <<< POST-INCLUDE [Choice] >>> ***/
250
Lev Walkin22b5ed42006-09-13 02:51:20 +0000251#include "Sequence.h"
Lev Walkin4696c742005-08-22 12:23:54 +0000252
253/*** <<< STAT-DEFS [Choice] >>> ***/
254
255static asn_TYPE_member_t asn_MBR_setof_2[] = {
256 { ATF_POINTER, 0, 0,
257 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
258 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000259 .type = &asn_DEF_INTEGER,
Lev Walkin4696c742005-08-22 12:23:54 +0000260 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400261 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000262 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
263 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +0000264 .name = ""
265 },
266};
Lev Walkina7591b52014-10-12 18:37:35 -0700267static const ber_tlv_tag_t asn_DEF_setof_tags_2[] = {
Lev Walkin4696c742005-08-22 12:23:54 +0000268 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
269 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
270};
Lev Walkin59b176e2005-11-26 11:25:14 +0000271static asn_SET_OF_specifics_t asn_SPC_setof_specs_2 = {
Lev Walkin4696c742005-08-22 12:23:54 +0000272 sizeof(struct setof),
273 offsetof(struct setof, _asn_ctx),
274 0, /* XER encoding is XMLDelimitedItemList */
275};
276static /* Use -fall-defs-global to expose */
277asn_TYPE_descriptor_t asn_DEF_setof_2 = {
278 "setof",
279 "setof",
280 SET_OF_free,
281 SET_OF_print,
282 SET_OF_constraint,
283 SET_OF_decode_ber,
284 SET_OF_encode_der,
285 SET_OF_decode_xer,
286 SET_OF_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700287 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400288 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin4696c742005-08-22 12:23:54 +0000289 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000290 asn_DEF_setof_tags_2,
291 sizeof(asn_DEF_setof_tags_2)
292 /sizeof(asn_DEF_setof_tags_2[0]) - 1, /* 1 */
293 asn_DEF_setof_tags_2, /* Same as above */
294 sizeof(asn_DEF_setof_tags_2)
295 /sizeof(asn_DEF_setof_tags_2[0]), /* 2 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400296 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000297 0, /* No PER visible constraints */
Lev Walkin4696c742005-08-22 12:23:54 +0000298 asn_MBR_setof_2,
299 1, /* Single element */
Lev Walkin59b176e2005-11-26 11:25:14 +0000300 &asn_SPC_setof_specs_2 /* Additional specs */
Lev Walkin4696c742005-08-22 12:23:54 +0000301};
302
303static asn_TYPE_member_t asn_MBR_Choice_1[] = {
304 { ATF_POINTER, 0, offsetof(struct Choice, choice.setof),
305 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
Lev Walkin9ab21b82006-10-19 02:46:01 +0000306 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000307 .type = &asn_DEF_setof_2,
Lev Walkin4696c742005-08-22 12:23:54 +0000308 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400309 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000310 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
311 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +0000312 .name = "setof"
313 },
314 { ATF_POINTER, 0, offsetof(struct Choice, choice.aptr),
315 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
316 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000317 .type = &asn_DEF_Sequence,
Lev Walkin4696c742005-08-22 12:23:54 +0000318 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400319 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000320 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
321 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +0000322 .name = "aptr"
323 },
324 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.ainl),
325 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
326 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000327 .type = &asn_DEF_Sequence,
Lev Walkin4696c742005-08-22 12:23:54 +0000328 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400329 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000330 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
331 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +0000332 .name = "ainl"
333 },
334};
Lev Walkina7591b52014-10-12 18:37:35 -0700335static const asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700336 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* setof */
337 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* aptr */
338 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ainl */
Lev Walkin4696c742005-08-22 12:23:54 +0000339};
Lev Walkin59b176e2005-11-26 11:25:14 +0000340static asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
Lev Walkin4696c742005-08-22 12:23:54 +0000341 sizeof(struct Choice),
342 offsetof(struct Choice, _asn_ctx),
343 offsetof(struct Choice, present),
344 sizeof(((struct Choice *)0)->present),
Lev Walkin59b176e2005-11-26 11:25:14 +0000345 asn_MAP_Choice_tag2el_1,
Lev Walkin4696c742005-08-22 12:23:54 +0000346 3, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000347 .canonical_order = 0,
348 .ext_start = -1 /* Extensions start */
Lev Walkin4696c742005-08-22 12:23:54 +0000349};
350asn_TYPE_descriptor_t asn_DEF_Choice = {
351 "Choice",
352 "Choice",
353 CHOICE_free,
354 CHOICE_print,
355 CHOICE_constraint,
356 CHOICE_decode_ber,
357 CHOICE_encode_der,
358 CHOICE_decode_xer,
359 CHOICE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700360 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400361 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin4696c742005-08-22 12:23:54 +0000362 CHOICE_outmost_tag,
363 0, /* No effective tags (pointer) */
364 0, /* No effective tags (count) */
365 0, /* No tags (pointer) */
366 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400367 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000368 0, /* No PER visible constraints */
Lev Walkin4696c742005-08-22 12:23:54 +0000369 asn_MBR_Choice_1,
370 3, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000371 &asn_SPC_Choice_specs_1 /* Additional specs */
Lev Walkin4696c742005-08-22 12:23:54 +0000372};
373