blob: b99a5d5d0cd8758910c6e03e53035f5ba97794ab [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 Walkinba68c912017-07-06 07:52:39 -070070 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin4696c742005-08-22 12:23:54 +000071 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +000072 asn_DEF_Sequence_tags_1,
73 sizeof(asn_DEF_Sequence_tags_1)
74 /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
75 asn_DEF_Sequence_tags_1, /* Same as above */
76 sizeof(asn_DEF_Sequence_tags_1)
77 /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
78 0, /* No PER visible constraints */
Lev Walkin4696c742005-08-22 12:23:54 +000079 asn_MBR_Sequence_1,
80 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +000081 &asn_SPC_Sequence_specs_1 /* Additional specs */
Lev Walkin4696c742005-08-22 12:23:54 +000082};
83
84
85/*** <<< INCLUDES [Set] >>> ***/
86
Lev Walkin22b5ed42006-09-13 02:51:20 +000087#include "Sequence.h"
Lev Walkin4696c742005-08-22 12:23:54 +000088#include <constr_SET.h>
89
90/*** <<< DEPS [Set] >>> ***/
91
92
93/*
94 * Method of determining the components presence
95 */
96typedef enum Set_PR {
97 Set_PR_ainl, /* Member ainl is present */
98 Set_PR_aptr, /* Member aptr is present */
99} Set_PR;
100
101/*** <<< FWD-DECLS [Set] >>> ***/
102
103struct Sequence;
104
105/*** <<< TYPE-DECLS [Set] >>> ***/
106
107typedef struct Set {
108 Sequence_t ainl;
109 struct Sequence *aptr;
110
111 /* Presence bitmask: ASN_SET_ISPRESENT(pSet, Set_PR_x) */
112 unsigned int _presence_map
113 [((2+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
114
115 /* Context for parsing across buffer boundaries */
116 asn_struct_ctx_t _asn_ctx;
117} Set_t;
118
119/*** <<< FUNC-DECLS [Set] >>> ***/
120
121extern asn_TYPE_descriptor_t asn_DEF_Set;
122
123/*** <<< POST-INCLUDE [Set] >>> ***/
124
Lev Walkin22b5ed42006-09-13 02:51:20 +0000125#include "Sequence.h"
Lev Walkin4696c742005-08-22 12:23:54 +0000126
127/*** <<< STAT-DEFS [Set] >>> ***/
128
129static asn_TYPE_member_t asn_MBR_Set_1[] = {
130 { ATF_NOFLAGS, 0, offsetof(struct Set, ainl),
131 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
132 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000133 .type = &asn_DEF_Sequence,
Lev Walkin4696c742005-08-22 12:23:54 +0000134 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000135 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
136 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +0000137 .name = "ainl"
138 },
139 { ATF_POINTER, 0, offsetof(struct Set, aptr),
140 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
141 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000142 .type = &asn_DEF_Sequence,
Lev Walkin4696c742005-08-22 12:23:54 +0000143 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000144 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
145 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +0000146 .name = "aptr"
147 },
148};
Lev Walkina7591b52014-10-12 18:37:35 -0700149static const ber_tlv_tag_t asn_DEF_Set_tags_1[] = {
Lev Walkin4696c742005-08-22 12:23:54 +0000150 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
151};
Lev Walkina7591b52014-10-12 18:37:35 -0700152static const asn_TYPE_tag2member_t asn_MAP_Set_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700153 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ainl */
154 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* aptr */
Lev Walkin4696c742005-08-22 12:23:54 +0000155};
Lev Walkina7591b52014-10-12 18:37:35 -0700156static const uint8_t asn_MAP_Set_mmap_1[(2 + (8 * sizeof(unsigned int)) - 1) / 8] = {
Lev Walkin4696c742005-08-22 12:23:54 +0000157 (1 << 7) | (1 << 6)
158};
Lev Walkin59b176e2005-11-26 11:25:14 +0000159static asn_SET_specifics_t asn_SPC_Set_specs_1 = {
Lev Walkin4696c742005-08-22 12:23:54 +0000160 sizeof(struct Set),
161 offsetof(struct Set, _asn_ctx),
162 offsetof(struct Set, _presence_map),
Lev Walkin59b176e2005-11-26 11:25:14 +0000163 asn_MAP_Set_tag2el_1,
Lev Walkin4696c742005-08-22 12:23:54 +0000164 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000165 asn_MAP_Set_tag2el_1, /* Same as above */
Lev Walkin4696c742005-08-22 12:23:54 +0000166 2, /* Count of tags in the CXER map */
167 0, /* Whether extensible */
Lev Walkin46ef3f32017-07-06 08:47:53 -0700168 (const unsigned int *)asn_MAP_Set_mmap_1 /* Mandatory elements map */
Lev Walkin4696c742005-08-22 12:23:54 +0000169};
170asn_TYPE_descriptor_t asn_DEF_Set = {
171 "Set",
172 "Set",
173 SET_free,
174 SET_print,
175 SET_constraint,
176 SET_decode_ber,
177 SET_encode_der,
178 SET_decode_xer,
179 SET_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000180 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinba68c912017-07-06 07:52:39 -0700181 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin4696c742005-08-22 12:23:54 +0000182 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000183 asn_DEF_Set_tags_1,
184 sizeof(asn_DEF_Set_tags_1)
185 /sizeof(asn_DEF_Set_tags_1[0]), /* 1 */
186 asn_DEF_Set_tags_1, /* Same as above */
187 sizeof(asn_DEF_Set_tags_1)
188 /sizeof(asn_DEF_Set_tags_1[0]), /* 1 */
189 0, /* No PER visible constraints */
Lev Walkin4696c742005-08-22 12:23:54 +0000190 asn_MBR_Set_1,
191 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000192 &asn_SPC_Set_specs_1 /* Additional specs */
Lev Walkin4696c742005-08-22 12:23:54 +0000193};
194
195
196/*** <<< INCLUDES [Choice] >>> ***/
197
Lev Walkin22b5ed42006-09-13 02:51:20 +0000198#include "Sequence.h"
Lev Walkin4696c742005-08-22 12:23:54 +0000199#include <INTEGER.h>
200#include <asn_SET_OF.h>
201#include <constr_SET_OF.h>
202#include <constr_CHOICE.h>
203
204/*** <<< DEPS [Choice] >>> ***/
205
206typedef enum Choice_PR {
207 Choice_PR_NOTHING, /* No components present */
208 Choice_PR_setof,
209 Choice_PR_aptr,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000210 Choice_PR_ainl
Lev Walkin4696c742005-08-22 12:23:54 +0000211} Choice_PR;
212
213/*** <<< FWD-DECLS [Choice] >>> ***/
214
215struct Sequence;
216
217/*** <<< TYPE-DECLS [Choice] >>> ***/
218
219typedef struct Choice {
220 Choice_PR present;
221 union Choice_u {
222 struct setof {
223 A_SET_OF(INTEGER_t) list;
224
225 /* Context for parsing across buffer boundaries */
226 asn_struct_ctx_t _asn_ctx;
227 } *setof;
228 struct Sequence *aptr;
229 Sequence_t ainl;
230 } choice;
231
232 /* Context for parsing across buffer boundaries */
233 asn_struct_ctx_t _asn_ctx;
234} Choice_t;
235
236/*** <<< FUNC-DECLS [Choice] >>> ***/
237
238extern asn_TYPE_descriptor_t asn_DEF_Choice;
239
240/*** <<< POST-INCLUDE [Choice] >>> ***/
241
Lev Walkin22b5ed42006-09-13 02:51:20 +0000242#include "Sequence.h"
Lev Walkin4696c742005-08-22 12:23:54 +0000243
244/*** <<< STAT-DEFS [Choice] >>> ***/
245
246static asn_TYPE_member_t asn_MBR_setof_2[] = {
247 { ATF_POINTER, 0, 0,
248 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
249 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000250 .type = &asn_DEF_INTEGER,
Lev Walkin4696c742005-08-22 12:23:54 +0000251 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000252 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
253 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +0000254 .name = ""
255 },
256};
Lev Walkina7591b52014-10-12 18:37:35 -0700257static const ber_tlv_tag_t asn_DEF_setof_tags_2[] = {
Lev Walkin4696c742005-08-22 12:23:54 +0000258 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
259 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
260};
Lev Walkin59b176e2005-11-26 11:25:14 +0000261static asn_SET_OF_specifics_t asn_SPC_setof_specs_2 = {
Lev Walkin4696c742005-08-22 12:23:54 +0000262 sizeof(struct setof),
263 offsetof(struct setof, _asn_ctx),
264 0, /* XER encoding is XMLDelimitedItemList */
265};
266static /* Use -fall-defs-global to expose */
267asn_TYPE_descriptor_t asn_DEF_setof_2 = {
268 "setof",
269 "setof",
270 SET_OF_free,
271 SET_OF_print,
272 SET_OF_constraint,
273 SET_OF_decode_ber,
274 SET_OF_encode_der,
275 SET_OF_decode_xer,
276 SET_OF_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000277 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinba68c912017-07-06 07:52:39 -0700278 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin4696c742005-08-22 12:23:54 +0000279 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000280 asn_DEF_setof_tags_2,
281 sizeof(asn_DEF_setof_tags_2)
282 /sizeof(asn_DEF_setof_tags_2[0]) - 1, /* 1 */
283 asn_DEF_setof_tags_2, /* Same as above */
284 sizeof(asn_DEF_setof_tags_2)
285 /sizeof(asn_DEF_setof_tags_2[0]), /* 2 */
286 0, /* No PER visible constraints */
Lev Walkin4696c742005-08-22 12:23:54 +0000287 asn_MBR_setof_2,
288 1, /* Single element */
Lev Walkin59b176e2005-11-26 11:25:14 +0000289 &asn_SPC_setof_specs_2 /* Additional specs */
Lev Walkin4696c742005-08-22 12:23:54 +0000290};
291
292static asn_TYPE_member_t asn_MBR_Choice_1[] = {
293 { ATF_POINTER, 0, offsetof(struct Choice, choice.setof),
294 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
Lev Walkin9ab21b82006-10-19 02:46:01 +0000295 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000296 .type = &asn_DEF_setof_2,
Lev Walkin4696c742005-08-22 12:23:54 +0000297 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000298 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
299 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +0000300 .name = "setof"
301 },
302 { ATF_POINTER, 0, offsetof(struct Choice, choice.aptr),
303 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
304 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000305 .type = &asn_DEF_Sequence,
Lev Walkin4696c742005-08-22 12:23:54 +0000306 .memb_constraints = 0, /* Defer constraints checking to the member type */
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 = "aptr"
310 },
311 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.ainl),
312 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 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 Walkin59b176e2005-11-26 11:25:14 +0000316 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
317 .default_value = 0,
Lev Walkin4696c742005-08-22 12:23:54 +0000318 .name = "ainl"
319 },
320};
Lev Walkina7591b52014-10-12 18:37:35 -0700321static const asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700322 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* setof */
323 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* aptr */
324 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ainl */
Lev Walkin4696c742005-08-22 12:23:54 +0000325};
Lev Walkin59b176e2005-11-26 11:25:14 +0000326static asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
Lev Walkin4696c742005-08-22 12:23:54 +0000327 sizeof(struct Choice),
328 offsetof(struct Choice, _asn_ctx),
329 offsetof(struct Choice, present),
330 sizeof(((struct Choice *)0)->present),
Lev Walkin59b176e2005-11-26 11:25:14 +0000331 asn_MAP_Choice_tag2el_1,
Lev Walkin4696c742005-08-22 12:23:54 +0000332 3, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000333 .canonical_order = 0,
334 .ext_start = -1 /* Extensions start */
Lev Walkin4696c742005-08-22 12:23:54 +0000335};
336asn_TYPE_descriptor_t asn_DEF_Choice = {
337 "Choice",
338 "Choice",
339 CHOICE_free,
340 CHOICE_print,
341 CHOICE_constraint,
342 CHOICE_decode_ber,
343 CHOICE_encode_der,
344 CHOICE_decode_xer,
345 CHOICE_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000346 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinba68c912017-07-06 07:52:39 -0700347 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin4696c742005-08-22 12:23:54 +0000348 CHOICE_outmost_tag,
349 0, /* No effective tags (pointer) */
350 0, /* No effective tags (count) */
351 0, /* No tags (pointer) */
352 0, /* No tags (count) */
Lev Walkin59b176e2005-11-26 11:25:14 +0000353 0, /* No PER visible constraints */
Lev Walkin4696c742005-08-22 12:23:54 +0000354 asn_MBR_Choice_1,
355 3, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000356 &asn_SPC_Choice_specs_1 /* Additional specs */
Lev Walkin4696c742005-08-22 12:23:54 +0000357};
358