blob: 7ea04f31445eb670be8ce920d6542e1ad23707b0 [file] [log] [blame]
Lev Walkin8c2ca0b2006-09-17 06:31:08 +00001
2/*** <<< INCLUDES [T] >>> ***/
3
4#include <INTEGER.h>
5#include <OCTET_STRING.h>
6#include "Choice1.h"
7#include "Choice2.h"
8#include <constr_CHOICE.h>
9
10/*** <<< DEPS [T] >>> ***/
11
12typedef enum T_PR {
13 T_PR_NOTHING, /* No components present */
14 T_PR_t_a,
15 T_PR_t_b,
16 T_PR_t_c,
17 T_PR_t_d
18} T_PR;
19
20/*** <<< TYPE-DECLS [T] >>> ***/
21
22typedef struct T {
23 T_PR present;
24 union T_u {
25 INTEGER_t t_a;
26 OCTET_STRING_t t_b;
27 Choice1_t t_c;
28 Choice2_t t_d;
29 } choice;
30
31 /* Context for parsing across buffer boundaries */
32 asn_struct_ctx_t _asn_ctx;
33} T_t;
34
35/*** <<< FUNC-DECLS [T] >>> ***/
36
37extern asn_TYPE_descriptor_t asn_DEF_T;
38
39/*** <<< STAT-DEFS [T] >>> ***/
40
41static asn_TYPE_member_t asn_MBR_T_1[] = {
42 { ATF_NOFLAGS, 0, offsetof(struct T, choice.t_a),
43 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
44 .tag_mode = 0,
45 .type = &asn_DEF_INTEGER,
46 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040047 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +000048 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
49 .default_value = 0,
50 .name = "t-a"
51 },
52 { ATF_NOFLAGS, 0, offsetof(struct T, choice.t_b),
53 .tag = (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
54 .tag_mode = 0,
55 .type = &asn_DEF_OCTET_STRING,
56 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040057 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +000058 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
59 .default_value = 0,
60 .name = "t-b"
61 },
62 { ATF_NOFLAGS, 0, offsetof(struct T, choice.t_c),
63 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
64 .tag_mode = +1, /* EXPLICIT tag at current level */
65 .type = &asn_DEF_Choice1,
66 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040067 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +000068 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
69 .default_value = 0,
70 .name = "t-c"
71 },
72 { ATF_NOFLAGS, 0, offsetof(struct T, choice.t_d),
73 .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
74 .tag_mode = -1, /* IMPLICIT tag at current level */
75 .type = &asn_DEF_Choice2,
76 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040077 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +000078 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
79 .default_value = 0,
80 .name = "t-d"
81 },
82};
Lev Walkina7591b52014-10-12 18:37:35 -070083static const asn_TYPE_tag2member_t asn_MAP_T_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070084 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* t-a */
85 { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 }, /* t-b */
86 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* t-c */
87 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* t-d */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +000088};
89static asn_CHOICE_specifics_t asn_SPC_T_specs_1 = {
90 sizeof(struct T),
91 offsetof(struct T, _asn_ctx),
92 offsetof(struct T, present),
93 sizeof(((struct T *)0)->present),
94 asn_MAP_T_tag2el_1,
95 4, /* Count of tags in the map */
96 .canonical_order = 0,
97 .ext_start = -1 /* Extensions start */
98};
99asn_TYPE_descriptor_t asn_DEF_T = {
100 "T",
101 "T",
102 CHOICE_free,
103 CHOICE_print,
104 CHOICE_constraint,
105 CHOICE_decode_ber,
106 CHOICE_encode_der,
107 CHOICE_decode_xer,
108 CHOICE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700109 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400110 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000111 CHOICE_outmost_tag,
112 0, /* No effective tags (pointer) */
113 0, /* No effective tags (count) */
114 0, /* No tags (pointer) */
115 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400116 0, /* No OER visible constraints */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000117 0, /* No PER visible constraints */
118 asn_MBR_T_1,
119 4, /* Elements count */
120 &asn_SPC_T_specs_1 /* Additional specs */
121};
122
123
124/*** <<< INCLUDES [Choice1] >>> ***/
125
126#include <OCTET_STRING.h>
127#include <INTEGER.h>
128#include <constr_CHOICE.h>
129
130/*** <<< DEPS [Choice1] >>> ***/
131
132typedef enum Choice1_PR {
133 Choice1_PR_NOTHING, /* No components present */
134 Choice1_PR_c_a,
135 Choice1_PR_c_b
136} Choice1_PR;
137
138/*** <<< TYPE-DECLS [Choice1] >>> ***/
139
140typedef struct Choice1 {
141 Choice1_PR present;
142 union Choice1_u {
143 OCTET_STRING_t c_a;
144 INTEGER_t c_b;
145 } choice;
146
147 /* Context for parsing across buffer boundaries */
148 asn_struct_ctx_t _asn_ctx;
149} Choice1_t;
150
151/*** <<< FUNC-DECLS [Choice1] >>> ***/
152
153extern asn_TYPE_descriptor_t asn_DEF_Choice1;
154
155/*** <<< STAT-DEFS [Choice1] >>> ***/
156
157static asn_TYPE_member_t asn_MBR_Choice1_1[] = {
158 { ATF_NOFLAGS, 0, offsetof(struct Choice1, choice.c_a),
159 .tag = (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
160 .tag_mode = 0,
161 .type = &asn_DEF_OCTET_STRING,
162 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400163 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000164 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
165 .default_value = 0,
166 .name = "c-a"
167 },
168 { ATF_NOFLAGS, 0, offsetof(struct Choice1, choice.c_b),
169 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
170 .tag_mode = 0,
171 .type = &asn_DEF_INTEGER,
172 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400173 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000174 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
175 .default_value = 0,
176 .name = "c-b"
177 },
178};
Lev Walkina7591b52014-10-12 18:37:35 -0700179static const asn_TYPE_tag2member_t asn_MAP_Choice1_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700180 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* c-b */
181 { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 } /* c-a */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000182};
183static asn_CHOICE_specifics_t asn_SPC_Choice1_specs_1 = {
184 sizeof(struct Choice1),
185 offsetof(struct Choice1, _asn_ctx),
186 offsetof(struct Choice1, present),
187 sizeof(((struct Choice1 *)0)->present),
188 asn_MAP_Choice1_tag2el_1,
189 2, /* Count of tags in the map */
190 .canonical_order = 0,
191 .ext_start = -1 /* Extensions start */
192};
193asn_TYPE_descriptor_t asn_DEF_Choice1 = {
194 "Choice1",
195 "Choice1",
196 CHOICE_free,
197 CHOICE_print,
198 CHOICE_constraint,
199 CHOICE_decode_ber,
200 CHOICE_encode_der,
201 CHOICE_decode_xer,
202 CHOICE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700203 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400204 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000205 CHOICE_outmost_tag,
206 0, /* No effective tags (pointer) */
207 0, /* No effective tags (count) */
208 0, /* No tags (pointer) */
209 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400210 0, /* No OER visible constraints */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000211 0, /* No PER visible constraints */
212 asn_MBR_Choice1_1,
213 2, /* Elements count */
214 &asn_SPC_Choice1_specs_1 /* Additional specs */
215};
216
217
218/*** <<< INCLUDES [Choice2] >>> ***/
219
220#include <OCTET_STRING.h>
221#include <INTEGER.h>
222#include "Choice1.h"
223#include <constr_CHOICE.h>
224
225/*** <<< DEPS [Choice2] >>> ***/
226
227typedef enum Choice2_PR {
228 Choice2_PR_NOTHING, /* No components present */
229 Choice2_PR_c_a,
230 Choice2_PR_c_b,
231 Choice2_PR_c_d,
232 Choice2_PR_c_e
233} Choice2_PR;
234
235/*** <<< TYPE-DECLS [Choice2] >>> ***/
236
237typedef struct Choice2 {
238 Choice2_PR present;
239 union Choice2_u {
240 OCTET_STRING_t c_a;
241 INTEGER_t c_b;
242 Choice1_t c_d;
243 Choice1_t c_e;
244 } choice;
245
246 /* Context for parsing across buffer boundaries */
247 asn_struct_ctx_t _asn_ctx;
248} Choice2_t;
249
250/*** <<< FUNC-DECLS [Choice2] >>> ***/
251
252extern asn_TYPE_descriptor_t asn_DEF_Choice2;
253
254/*** <<< STAT-DEFS [Choice2] >>> ***/
255
256static asn_TYPE_member_t asn_MBR_Choice2_1[] = {
257 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.c_a),
258 .tag = (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
259 .tag_mode = 0,
260 .type = &asn_DEF_OCTET_STRING,
261 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400262 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000263 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
264 .default_value = 0,
265 .name = "c-a"
266 },
267 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.c_b),
268 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
269 .tag_mode = 0,
270 .type = &asn_DEF_INTEGER,
271 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400272 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000273 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
274 .default_value = 0,
275 .name = "c-b"
276 },
277 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.c_d),
278 .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
279 .tag_mode = +1, /* EXPLICIT tag at current level */
280 .type = &asn_DEF_Choice1,
281 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400282 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000283 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
284 .default_value = 0,
285 .name = "c-d"
286 },
287 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.c_e),
288 .tag = (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
289 .tag_mode = +1, /* EXPLICIT tag at current level */
290 .type = &asn_DEF_Choice1,
291 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400292 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000293 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
294 .default_value = 0,
295 .name = "c-e"
296 },
297};
Lev Walkina7591b52014-10-12 18:37:35 -0700298static const ber_tlv_tag_t asn_DEF_Choice2_tags_1[] = {
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000299 (ASN_TAG_CLASS_CONTEXT | (2 << 2))
300};
Lev Walkina7591b52014-10-12 18:37:35 -0700301static const asn_TYPE_tag2member_t asn_MAP_Choice2_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700302 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* c-b */
303 { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 }, /* c-a */
304 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* c-d */
305 { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 3, 0, 0 } /* c-e */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000306};
307static asn_CHOICE_specifics_t asn_SPC_Choice2_specs_1 = {
308 sizeof(struct Choice2),
309 offsetof(struct Choice2, _asn_ctx),
310 offsetof(struct Choice2, present),
311 sizeof(((struct Choice2 *)0)->present),
312 asn_MAP_Choice2_tag2el_1,
313 4, /* Count of tags in the map */
314 .canonical_order = 0,
315 .ext_start = -1 /* Extensions start */
316};
317asn_TYPE_descriptor_t asn_DEF_Choice2 = {
318 "Choice2",
319 "Choice2",
320 CHOICE_free,
321 CHOICE_print,
322 CHOICE_constraint,
323 CHOICE_decode_ber,
324 CHOICE_encode_der,
325 CHOICE_decode_xer,
326 CHOICE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700327 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400328 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000329 CHOICE_outmost_tag,
330 asn_DEF_Choice2_tags_1,
331 sizeof(asn_DEF_Choice2_tags_1)
332 /sizeof(asn_DEF_Choice2_tags_1[0]), /* 1 */
333 asn_DEF_Choice2_tags_1, /* Same as above */
334 sizeof(asn_DEF_Choice2_tags_1)
335 /sizeof(asn_DEF_Choice2_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400336 0, /* No OER visible constraints */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000337 0, /* No PER visible constraints */
338 asn_MBR_Choice2_1,
339 4, /* Elements count */
340 &asn_SPC_Choice2_specs_1 /* Additional specs */
341};
342
343
344/*** <<< INCLUDES [Choice3] >>> ***/
345
346#include "Choice2.h"
347
348/*** <<< TYPE-DECLS [Choice3] >>> ***/
349
350typedef Choice2_t Choice3_t;
351
352/*** <<< FUNC-DECLS [Choice3] >>> ***/
353
354extern asn_TYPE_descriptor_t asn_DEF_Choice3;
355asn_struct_free_f Choice3_free;
356asn_struct_print_f Choice3_print;
357asn_constr_check_f Choice3_constraint;
358ber_type_decoder_f Choice3_decode_ber;
359der_type_encoder_f Choice3_encode_der;
360xer_type_decoder_f Choice3_decode_xer;
361xer_type_encoder_f Choice3_encode_xer;
362
363/*** <<< CODE [Choice3] >>> ***/
364
365int
366Choice3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
367 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
368 /* Replace with underlying type checker */
369 td->check_constraints = asn_DEF_Choice2.check_constraints;
370 return td->check_constraints(td, sptr, ctfailcb, app_key);
371}
372
373/*
374 * This type is implemented using Choice2,
375 * so here we adjust the DEF accordingly.
376 */
377static void
378Choice3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
379 td->free_struct = asn_DEF_Choice2.free_struct;
380 td->print_struct = asn_DEF_Choice2.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800381 td->check_constraints = asn_DEF_Choice2.check_constraints;
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000382 td->ber_decoder = asn_DEF_Choice2.ber_decoder;
383 td->der_encoder = asn_DEF_Choice2.der_encoder;
384 td->xer_decoder = asn_DEF_Choice2.xer_decoder;
385 td->xer_encoder = asn_DEF_Choice2.xer_encoder;
386 td->uper_decoder = asn_DEF_Choice2.uper_decoder;
387 td->uper_encoder = asn_DEF_Choice2.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -0700388 td->oer_decoder = asn_DEF_Choice2.oer_decoder;
389 td->oer_encoder = asn_DEF_Choice2.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +0400390 if(!td->oer_constraints)
391 td->oer_constraints = asn_DEF_Choice2.oer_constraints;
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000392 if(!td->per_constraints)
393 td->per_constraints = asn_DEF_Choice2.per_constraints;
394 td->elements = asn_DEF_Choice2.elements;
395 td->elements_count = asn_DEF_Choice2.elements_count;
396 td->specifics = asn_DEF_Choice2.specifics;
397}
398
399void
400Choice3_free(asn_TYPE_descriptor_t *td,
401 void *struct_ptr, int contents_only) {
402 Choice3_1_inherit_TYPE_descriptor(td);
403 td->free_struct(td, struct_ptr, contents_only);
404}
405
406int
407Choice3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
408 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
409 Choice3_1_inherit_TYPE_descriptor(td);
410 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
411}
412
413asn_dec_rval_t
414Choice3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
415 void **structure, const void *bufptr, size_t size, int tag_mode) {
416 Choice3_1_inherit_TYPE_descriptor(td);
417 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
418}
419
420asn_enc_rval_t
421Choice3_encode_der(asn_TYPE_descriptor_t *td,
422 void *structure, int tag_mode, ber_tlv_tag_t tag,
423 asn_app_consume_bytes_f *cb, void *app_key) {
424 Choice3_1_inherit_TYPE_descriptor(td);
425 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
426}
427
428asn_dec_rval_t
429Choice3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
430 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
431 Choice3_1_inherit_TYPE_descriptor(td);
432 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
433}
434
435asn_enc_rval_t
436Choice3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
437 int ilevel, enum xer_encoder_flags_e flags,
438 asn_app_consume_bytes_f *cb, void *app_key) {
439 Choice3_1_inherit_TYPE_descriptor(td);
440 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
441}
442
443
444/*** <<< STAT-DEFS [Choice3] >>> ***/
445
Lev Walkina7591b52014-10-12 18:37:35 -0700446static const ber_tlv_tag_t asn_DEF_Choice3_tags_1[] = {
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000447 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
448 (ASN_TAG_CLASS_CONTEXT | (2 << 2))
449};
450asn_TYPE_descriptor_t asn_DEF_Choice3 = {
451 "Choice3",
452 "Choice3",
453 Choice3_free,
454 Choice3_print,
455 Choice3_constraint,
456 Choice3_decode_ber,
457 Choice3_encode_der,
458 Choice3_decode_xer,
459 Choice3_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700460 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400461 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000462 CHOICE_outmost_tag,
463 asn_DEF_Choice3_tags_1,
464 sizeof(asn_DEF_Choice3_tags_1)
465 /sizeof(asn_DEF_Choice3_tags_1[0]), /* 2 */
466 asn_DEF_Choice3_tags_1, /* Same as above */
467 sizeof(asn_DEF_Choice3_tags_1)
468 /sizeof(asn_DEF_Choice3_tags_1[0]), /* 2 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400469 0, /* No OER visible constraints */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000470 0, /* No PER visible constraints */
471 0, 0, /* Defined elsewhere */
472 0 /* No specifics */
473};
474
475
476/*** <<< INCLUDES [Choice4] >>> ***/
477
478#include "Choice2.h"
479
480/*** <<< TYPE-DECLS [Choice4] >>> ***/
481
482typedef Choice2_t Choice4_t;
483
484/*** <<< FUNC-DECLS [Choice4] >>> ***/
485
486extern asn_TYPE_descriptor_t asn_DEF_Choice4;
487asn_struct_free_f Choice4_free;
488asn_struct_print_f Choice4_print;
489asn_constr_check_f Choice4_constraint;
490ber_type_decoder_f Choice4_decode_ber;
491der_type_encoder_f Choice4_encode_der;
492xer_type_decoder_f Choice4_decode_xer;
493xer_type_encoder_f Choice4_encode_xer;
494
495/*** <<< CODE [Choice4] >>> ***/
496
497int
498Choice4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
499 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
500 /* Replace with underlying type checker */
501 td->check_constraints = asn_DEF_Choice2.check_constraints;
502 return td->check_constraints(td, sptr, ctfailcb, app_key);
503}
504
505/*
506 * This type is implemented using Choice2,
507 * so here we adjust the DEF accordingly.
508 */
509static void
510Choice4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
511 td->free_struct = asn_DEF_Choice2.free_struct;
512 td->print_struct = asn_DEF_Choice2.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800513 td->check_constraints = asn_DEF_Choice2.check_constraints;
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000514 td->ber_decoder = asn_DEF_Choice2.ber_decoder;
515 td->der_encoder = asn_DEF_Choice2.der_encoder;
516 td->xer_decoder = asn_DEF_Choice2.xer_decoder;
517 td->xer_encoder = asn_DEF_Choice2.xer_encoder;
518 td->uper_decoder = asn_DEF_Choice2.uper_decoder;
519 td->uper_encoder = asn_DEF_Choice2.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -0700520 td->oer_decoder = asn_DEF_Choice2.oer_decoder;
521 td->oer_encoder = asn_DEF_Choice2.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +0400522 if(!td->oer_constraints)
523 td->oer_constraints = asn_DEF_Choice2.oer_constraints;
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000524 if(!td->per_constraints)
525 td->per_constraints = asn_DEF_Choice2.per_constraints;
526 td->elements = asn_DEF_Choice2.elements;
527 td->elements_count = asn_DEF_Choice2.elements_count;
528 td->specifics = asn_DEF_Choice2.specifics;
529}
530
531void
532Choice4_free(asn_TYPE_descriptor_t *td,
533 void *struct_ptr, int contents_only) {
534 Choice4_1_inherit_TYPE_descriptor(td);
535 td->free_struct(td, struct_ptr, contents_only);
536}
537
538int
539Choice4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
540 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
541 Choice4_1_inherit_TYPE_descriptor(td);
542 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
543}
544
545asn_dec_rval_t
546Choice4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
547 void **structure, const void *bufptr, size_t size, int tag_mode) {
548 Choice4_1_inherit_TYPE_descriptor(td);
549 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
550}
551
552asn_enc_rval_t
553Choice4_encode_der(asn_TYPE_descriptor_t *td,
554 void *structure, int tag_mode, ber_tlv_tag_t tag,
555 asn_app_consume_bytes_f *cb, void *app_key) {
556 Choice4_1_inherit_TYPE_descriptor(td);
557 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
558}
559
560asn_dec_rval_t
561Choice4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
562 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
563 Choice4_1_inherit_TYPE_descriptor(td);
564 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
565}
566
567asn_enc_rval_t
568Choice4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
569 int ilevel, enum xer_encoder_flags_e flags,
570 asn_app_consume_bytes_f *cb, void *app_key) {
571 Choice4_1_inherit_TYPE_descriptor(td);
572 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
573}
574
575
576/*** <<< STAT-DEFS [Choice4] >>> ***/
577
Lev Walkina7591b52014-10-12 18:37:35 -0700578static const ber_tlv_tag_t asn_DEF_Choice4_tags_1[] = {
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000579 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
580 (ASN_TAG_CLASS_CONTEXT | (2 << 2))
581};
582asn_TYPE_descriptor_t asn_DEF_Choice4 = {
583 "Choice4",
584 "Choice4",
585 Choice4_free,
586 Choice4_print,
587 Choice4_constraint,
588 Choice4_decode_ber,
589 Choice4_encode_der,
590 Choice4_decode_xer,
591 Choice4_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700592 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400593 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000594 CHOICE_outmost_tag,
595 asn_DEF_Choice4_tags_1,
596 sizeof(asn_DEF_Choice4_tags_1)
597 /sizeof(asn_DEF_Choice4_tags_1[0]) - 1, /* 1 */
598 asn_DEF_Choice4_tags_1, /* Same as above */
599 sizeof(asn_DEF_Choice4_tags_1)
600 /sizeof(asn_DEF_Choice4_tags_1[0]), /* 2 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400601 0, /* No OER visible constraints */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000602 0, /* No PER visible constraints */
603 0, 0, /* Defined elsewhere */
604 0 /* No specifics */
605};
606
607
608/*** <<< INCLUDES [Choice5] >>> ***/
609
610#include "Choice2.h"
611
612/*** <<< TYPE-DECLS [Choice5] >>> ***/
613
614typedef Choice2_t Choice5_t;
615
616/*** <<< FUNC-DECLS [Choice5] >>> ***/
617
618extern asn_TYPE_descriptor_t asn_DEF_Choice5;
619asn_struct_free_f Choice5_free;
620asn_struct_print_f Choice5_print;
621asn_constr_check_f Choice5_constraint;
622ber_type_decoder_f Choice5_decode_ber;
623der_type_encoder_f Choice5_encode_der;
624xer_type_decoder_f Choice5_decode_xer;
625xer_type_encoder_f Choice5_encode_xer;
626
627/*** <<< CODE [Choice5] >>> ***/
628
629int
630Choice5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
631 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
632 /* Replace with underlying type checker */
633 td->check_constraints = asn_DEF_Choice2.check_constraints;
634 return td->check_constraints(td, sptr, ctfailcb, app_key);
635}
636
637/*
638 * This type is implemented using Choice2,
639 * so here we adjust the DEF accordingly.
640 */
641static void
642Choice5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
643 td->free_struct = asn_DEF_Choice2.free_struct;
644 td->print_struct = asn_DEF_Choice2.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800645 td->check_constraints = asn_DEF_Choice2.check_constraints;
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000646 td->ber_decoder = asn_DEF_Choice2.ber_decoder;
647 td->der_encoder = asn_DEF_Choice2.der_encoder;
648 td->xer_decoder = asn_DEF_Choice2.xer_decoder;
649 td->xer_encoder = asn_DEF_Choice2.xer_encoder;
650 td->uper_decoder = asn_DEF_Choice2.uper_decoder;
651 td->uper_encoder = asn_DEF_Choice2.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -0700652 td->oer_decoder = asn_DEF_Choice2.oer_decoder;
653 td->oer_encoder = asn_DEF_Choice2.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +0400654 if(!td->oer_constraints)
655 td->oer_constraints = asn_DEF_Choice2.oer_constraints;
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000656 if(!td->per_constraints)
657 td->per_constraints = asn_DEF_Choice2.per_constraints;
658 td->elements = asn_DEF_Choice2.elements;
659 td->elements_count = asn_DEF_Choice2.elements_count;
660 td->specifics = asn_DEF_Choice2.specifics;
661}
662
663void
664Choice5_free(asn_TYPE_descriptor_t *td,
665 void *struct_ptr, int contents_only) {
666 Choice5_1_inherit_TYPE_descriptor(td);
667 td->free_struct(td, struct_ptr, contents_only);
668}
669
670int
671Choice5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
672 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
673 Choice5_1_inherit_TYPE_descriptor(td);
674 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
675}
676
677asn_dec_rval_t
678Choice5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
679 void **structure, const void *bufptr, size_t size, int tag_mode) {
680 Choice5_1_inherit_TYPE_descriptor(td);
681 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
682}
683
684asn_enc_rval_t
685Choice5_encode_der(asn_TYPE_descriptor_t *td,
686 void *structure, int tag_mode, ber_tlv_tag_t tag,
687 asn_app_consume_bytes_f *cb, void *app_key) {
688 Choice5_1_inherit_TYPE_descriptor(td);
689 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
690}
691
692asn_dec_rval_t
693Choice5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
694 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
695 Choice5_1_inherit_TYPE_descriptor(td);
696 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
697}
698
699asn_enc_rval_t
700Choice5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
701 int ilevel, enum xer_encoder_flags_e flags,
702 asn_app_consume_bytes_f *cb, void *app_key) {
703 Choice5_1_inherit_TYPE_descriptor(td);
704 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
705}
706
707
708/*** <<< STAT-DEFS [Choice5] >>> ***/
709
Lev Walkina7591b52014-10-12 18:37:35 -0700710static const ber_tlv_tag_t asn_DEF_Choice5_tags_1[] = {
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000711 (ASN_TAG_CLASS_CONTEXT | (2 << 2))
712};
713asn_TYPE_descriptor_t asn_DEF_Choice5 = {
714 "Choice5",
715 "Choice5",
716 Choice5_free,
717 Choice5_print,
718 Choice5_constraint,
719 Choice5_decode_ber,
720 Choice5_encode_der,
721 Choice5_decode_xer,
722 Choice5_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700723 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400724 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000725 CHOICE_outmost_tag,
726 asn_DEF_Choice5_tags_1,
727 sizeof(asn_DEF_Choice5_tags_1)
728 /sizeof(asn_DEF_Choice5_tags_1[0]), /* 1 */
729 asn_DEF_Choice5_tags_1, /* Same as above */
730 sizeof(asn_DEF_Choice5_tags_1)
731 /sizeof(asn_DEF_Choice5_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400732 0, /* No OER visible constraints */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000733 0, /* No PER visible constraints */
734 0, 0, /* Defined elsewhere */
735 0 /* No specifics */
736};
737
738
739/*** <<< INCLUDES [Choice6] >>> ***/
740
741#include "Choice1.h"
742
743/*** <<< TYPE-DECLS [Choice6] >>> ***/
744
745typedef Choice1_t Choice6_t;
746
747/*** <<< FUNC-DECLS [Choice6] >>> ***/
748
749extern asn_TYPE_descriptor_t asn_DEF_Choice6;
750asn_struct_free_f Choice6_free;
751asn_struct_print_f Choice6_print;
752asn_constr_check_f Choice6_constraint;
753ber_type_decoder_f Choice6_decode_ber;
754der_type_encoder_f Choice6_encode_der;
755xer_type_decoder_f Choice6_decode_xer;
756xer_type_encoder_f Choice6_encode_xer;
757
758/*** <<< CODE [Choice6] >>> ***/
759
760int
761Choice6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
762 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
763 /* Replace with underlying type checker */
764 td->check_constraints = asn_DEF_Choice1.check_constraints;
765 return td->check_constraints(td, sptr, ctfailcb, app_key);
766}
767
768/*
769 * This type is implemented using Choice1,
770 * so here we adjust the DEF accordingly.
771 */
772static void
773Choice6_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
774 td->free_struct = asn_DEF_Choice1.free_struct;
775 td->print_struct = asn_DEF_Choice1.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800776 td->check_constraints = asn_DEF_Choice1.check_constraints;
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000777 td->ber_decoder = asn_DEF_Choice1.ber_decoder;
778 td->der_encoder = asn_DEF_Choice1.der_encoder;
779 td->xer_decoder = asn_DEF_Choice1.xer_decoder;
780 td->xer_encoder = asn_DEF_Choice1.xer_encoder;
781 td->uper_decoder = asn_DEF_Choice1.uper_decoder;
782 td->uper_encoder = asn_DEF_Choice1.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -0700783 td->oer_decoder = asn_DEF_Choice1.oer_decoder;
784 td->oer_encoder = asn_DEF_Choice1.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +0400785 if(!td->oer_constraints)
786 td->oer_constraints = asn_DEF_Choice1.oer_constraints;
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000787 if(!td->per_constraints)
788 td->per_constraints = asn_DEF_Choice1.per_constraints;
789 td->elements = asn_DEF_Choice1.elements;
790 td->elements_count = asn_DEF_Choice1.elements_count;
791 td->specifics = asn_DEF_Choice1.specifics;
792}
793
794void
795Choice6_free(asn_TYPE_descriptor_t *td,
796 void *struct_ptr, int contents_only) {
797 Choice6_1_inherit_TYPE_descriptor(td);
798 td->free_struct(td, struct_ptr, contents_only);
799}
800
801int
802Choice6_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
803 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
804 Choice6_1_inherit_TYPE_descriptor(td);
805 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
806}
807
808asn_dec_rval_t
809Choice6_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
810 void **structure, const void *bufptr, size_t size, int tag_mode) {
811 Choice6_1_inherit_TYPE_descriptor(td);
812 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
813}
814
815asn_enc_rval_t
816Choice6_encode_der(asn_TYPE_descriptor_t *td,
817 void *structure, int tag_mode, ber_tlv_tag_t tag,
818 asn_app_consume_bytes_f *cb, void *app_key) {
819 Choice6_1_inherit_TYPE_descriptor(td);
820 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
821}
822
823asn_dec_rval_t
824Choice6_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
825 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
826 Choice6_1_inherit_TYPE_descriptor(td);
827 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
828}
829
830asn_enc_rval_t
831Choice6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
832 int ilevel, enum xer_encoder_flags_e flags,
833 asn_app_consume_bytes_f *cb, void *app_key) {
834 Choice6_1_inherit_TYPE_descriptor(td);
835 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
836}
837
838
839/*** <<< STAT-DEFS [Choice6] >>> ***/
840
841asn_TYPE_descriptor_t asn_DEF_Choice6 = {
842 "Choice6",
843 "Choice6",
844 Choice6_free,
845 Choice6_print,
846 Choice6_constraint,
847 Choice6_decode_ber,
848 Choice6_encode_der,
849 Choice6_decode_xer,
850 Choice6_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700851 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400852 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000853 CHOICE_outmost_tag,
854 0, /* No effective tags (pointer) */
855 0, /* No effective tags (count) */
856 0, /* No tags (pointer) */
857 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400858 0, /* No OER visible constraints */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000859 0, /* No PER visible constraints */
860 0, 0, /* Defined elsewhere */
861 0 /* No specifics */
862};
863