blob: e1c9ed10bc5364d88da0409017cd428d1cafbf6d [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 */
47 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
48 .default_value = 0,
49 .name = "t-a"
50 },
51 { ATF_NOFLAGS, 0, offsetof(struct T, choice.t_b),
52 .tag = (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
53 .tag_mode = 0,
54 .type = &asn_DEF_OCTET_STRING,
55 .memb_constraints = 0, /* Defer constraints checking to the member type */
56 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
57 .default_value = 0,
58 .name = "t-b"
59 },
60 { ATF_NOFLAGS, 0, offsetof(struct T, choice.t_c),
61 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
62 .tag_mode = +1, /* EXPLICIT tag at current level */
63 .type = &asn_DEF_Choice1,
64 .memb_constraints = 0, /* Defer constraints checking to the member type */
65 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
66 .default_value = 0,
67 .name = "t-c"
68 },
69 { ATF_NOFLAGS, 0, offsetof(struct T, choice.t_d),
70 .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
71 .tag_mode = -1, /* IMPLICIT tag at current level */
72 .type = &asn_DEF_Choice2,
73 .memb_constraints = 0, /* Defer constraints checking to the member type */
74 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
75 .default_value = 0,
76 .name = "t-d"
77 },
78};
79static asn_TYPE_tag2member_t asn_MAP_T_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070080 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* t-a */
81 { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 }, /* t-b */
82 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* t-c */
83 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* t-d */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +000084};
85static asn_CHOICE_specifics_t asn_SPC_T_specs_1 = {
86 sizeof(struct T),
87 offsetof(struct T, _asn_ctx),
88 offsetof(struct T, present),
89 sizeof(((struct T *)0)->present),
90 asn_MAP_T_tag2el_1,
91 4, /* Count of tags in the map */
92 .canonical_order = 0,
93 .ext_start = -1 /* Extensions start */
94};
95asn_TYPE_descriptor_t asn_DEF_T = {
96 "T",
97 "T",
98 CHOICE_free,
99 CHOICE_print,
100 CHOICE_constraint,
101 CHOICE_decode_ber,
102 CHOICE_encode_der,
103 CHOICE_decode_xer,
104 CHOICE_encode_xer,
105 0, 0, /* No PER support, use "-gen-PER" to enable */
106 CHOICE_outmost_tag,
107 0, /* No effective tags (pointer) */
108 0, /* No effective tags (count) */
109 0, /* No tags (pointer) */
110 0, /* No tags (count) */
111 0, /* No PER visible constraints */
112 asn_MBR_T_1,
113 4, /* Elements count */
114 &asn_SPC_T_specs_1 /* Additional specs */
115};
116
117
118/*** <<< INCLUDES [Choice1] >>> ***/
119
120#include <OCTET_STRING.h>
121#include <INTEGER.h>
122#include <constr_CHOICE.h>
123
124/*** <<< DEPS [Choice1] >>> ***/
125
126typedef enum Choice1_PR {
127 Choice1_PR_NOTHING, /* No components present */
128 Choice1_PR_c_a,
129 Choice1_PR_c_b
130} Choice1_PR;
131
132/*** <<< TYPE-DECLS [Choice1] >>> ***/
133
134typedef struct Choice1 {
135 Choice1_PR present;
136 union Choice1_u {
137 OCTET_STRING_t c_a;
138 INTEGER_t c_b;
139 } choice;
140
141 /* Context for parsing across buffer boundaries */
142 asn_struct_ctx_t _asn_ctx;
143} Choice1_t;
144
145/*** <<< FUNC-DECLS [Choice1] >>> ***/
146
147extern asn_TYPE_descriptor_t asn_DEF_Choice1;
148
149/*** <<< STAT-DEFS [Choice1] >>> ***/
150
151static asn_TYPE_member_t asn_MBR_Choice1_1[] = {
152 { ATF_NOFLAGS, 0, offsetof(struct Choice1, choice.c_a),
153 .tag = (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
154 .tag_mode = 0,
155 .type = &asn_DEF_OCTET_STRING,
156 .memb_constraints = 0, /* Defer constraints checking to the member type */
157 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
158 .default_value = 0,
159 .name = "c-a"
160 },
161 { ATF_NOFLAGS, 0, offsetof(struct Choice1, choice.c_b),
162 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
163 .tag_mode = 0,
164 .type = &asn_DEF_INTEGER,
165 .memb_constraints = 0, /* Defer constraints checking to the member type */
166 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
167 .default_value = 0,
168 .name = "c-b"
169 },
170};
171static asn_TYPE_tag2member_t asn_MAP_Choice1_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700172 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* c-b */
173 { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 } /* c-a */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000174};
175static asn_CHOICE_specifics_t asn_SPC_Choice1_specs_1 = {
176 sizeof(struct Choice1),
177 offsetof(struct Choice1, _asn_ctx),
178 offsetof(struct Choice1, present),
179 sizeof(((struct Choice1 *)0)->present),
180 asn_MAP_Choice1_tag2el_1,
181 2, /* Count of tags in the map */
182 .canonical_order = 0,
183 .ext_start = -1 /* Extensions start */
184};
185asn_TYPE_descriptor_t asn_DEF_Choice1 = {
186 "Choice1",
187 "Choice1",
188 CHOICE_free,
189 CHOICE_print,
190 CHOICE_constraint,
191 CHOICE_decode_ber,
192 CHOICE_encode_der,
193 CHOICE_decode_xer,
194 CHOICE_encode_xer,
195 0, 0, /* No PER support, use "-gen-PER" to enable */
196 CHOICE_outmost_tag,
197 0, /* No effective tags (pointer) */
198 0, /* No effective tags (count) */
199 0, /* No tags (pointer) */
200 0, /* No tags (count) */
201 0, /* No PER visible constraints */
202 asn_MBR_Choice1_1,
203 2, /* Elements count */
204 &asn_SPC_Choice1_specs_1 /* Additional specs */
205};
206
207
208/*** <<< INCLUDES [Choice2] >>> ***/
209
210#include <OCTET_STRING.h>
211#include <INTEGER.h>
212#include "Choice1.h"
213#include <constr_CHOICE.h>
214
215/*** <<< DEPS [Choice2] >>> ***/
216
217typedef enum Choice2_PR {
218 Choice2_PR_NOTHING, /* No components present */
219 Choice2_PR_c_a,
220 Choice2_PR_c_b,
221 Choice2_PR_c_d,
222 Choice2_PR_c_e
223} Choice2_PR;
224
225/*** <<< TYPE-DECLS [Choice2] >>> ***/
226
227typedef struct Choice2 {
228 Choice2_PR present;
229 union Choice2_u {
230 OCTET_STRING_t c_a;
231 INTEGER_t c_b;
232 Choice1_t c_d;
233 Choice1_t c_e;
234 } choice;
235
236 /* Context for parsing across buffer boundaries */
237 asn_struct_ctx_t _asn_ctx;
238} Choice2_t;
239
240/*** <<< FUNC-DECLS [Choice2] >>> ***/
241
242extern asn_TYPE_descriptor_t asn_DEF_Choice2;
243
244/*** <<< STAT-DEFS [Choice2] >>> ***/
245
246static asn_TYPE_member_t asn_MBR_Choice2_1[] = {
247 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.c_a),
248 .tag = (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
249 .tag_mode = 0,
250 .type = &asn_DEF_OCTET_STRING,
251 .memb_constraints = 0, /* Defer constraints checking to the member type */
252 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
253 .default_value = 0,
254 .name = "c-a"
255 },
256 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.c_b),
257 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
258 .tag_mode = 0,
259 .type = &asn_DEF_INTEGER,
260 .memb_constraints = 0, /* Defer constraints checking to the member type */
261 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
262 .default_value = 0,
263 .name = "c-b"
264 },
265 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.c_d),
266 .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
267 .tag_mode = +1, /* EXPLICIT tag at current level */
268 .type = &asn_DEF_Choice1,
269 .memb_constraints = 0, /* Defer constraints checking to the member type */
270 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
271 .default_value = 0,
272 .name = "c-d"
273 },
274 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.c_e),
275 .tag = (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
276 .tag_mode = +1, /* EXPLICIT tag at current level */
277 .type = &asn_DEF_Choice1,
278 .memb_constraints = 0, /* Defer constraints checking to the member type */
279 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
280 .default_value = 0,
281 .name = "c-e"
282 },
283};
284static ber_tlv_tag_t asn_DEF_Choice2_tags_1[] = {
285 (ASN_TAG_CLASS_CONTEXT | (2 << 2))
286};
287static asn_TYPE_tag2member_t asn_MAP_Choice2_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700288 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* c-b */
289 { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 }, /* c-a */
290 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* c-d */
291 { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 3, 0, 0 } /* c-e */
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000292};
293static asn_CHOICE_specifics_t asn_SPC_Choice2_specs_1 = {
294 sizeof(struct Choice2),
295 offsetof(struct Choice2, _asn_ctx),
296 offsetof(struct Choice2, present),
297 sizeof(((struct Choice2 *)0)->present),
298 asn_MAP_Choice2_tag2el_1,
299 4, /* Count of tags in the map */
300 .canonical_order = 0,
301 .ext_start = -1 /* Extensions start */
302};
303asn_TYPE_descriptor_t asn_DEF_Choice2 = {
304 "Choice2",
305 "Choice2",
306 CHOICE_free,
307 CHOICE_print,
308 CHOICE_constraint,
309 CHOICE_decode_ber,
310 CHOICE_encode_der,
311 CHOICE_decode_xer,
312 CHOICE_encode_xer,
313 0, 0, /* No PER support, use "-gen-PER" to enable */
314 CHOICE_outmost_tag,
315 asn_DEF_Choice2_tags_1,
316 sizeof(asn_DEF_Choice2_tags_1)
317 /sizeof(asn_DEF_Choice2_tags_1[0]), /* 1 */
318 asn_DEF_Choice2_tags_1, /* Same as above */
319 sizeof(asn_DEF_Choice2_tags_1)
320 /sizeof(asn_DEF_Choice2_tags_1[0]), /* 1 */
321 0, /* No PER visible constraints */
322 asn_MBR_Choice2_1,
323 4, /* Elements count */
324 &asn_SPC_Choice2_specs_1 /* Additional specs */
325};
326
327
328/*** <<< INCLUDES [Choice3] >>> ***/
329
330#include "Choice2.h"
331
332/*** <<< TYPE-DECLS [Choice3] >>> ***/
333
334typedef Choice2_t Choice3_t;
335
336/*** <<< FUNC-DECLS [Choice3] >>> ***/
337
338extern asn_TYPE_descriptor_t asn_DEF_Choice3;
339asn_struct_free_f Choice3_free;
340asn_struct_print_f Choice3_print;
341asn_constr_check_f Choice3_constraint;
342ber_type_decoder_f Choice3_decode_ber;
343der_type_encoder_f Choice3_encode_der;
344xer_type_decoder_f Choice3_decode_xer;
345xer_type_encoder_f Choice3_encode_xer;
346
347/*** <<< CODE [Choice3] >>> ***/
348
349int
350Choice3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
351 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
352 /* Replace with underlying type checker */
353 td->check_constraints = asn_DEF_Choice2.check_constraints;
354 return td->check_constraints(td, sptr, ctfailcb, app_key);
355}
356
357/*
358 * This type is implemented using Choice2,
359 * so here we adjust the DEF accordingly.
360 */
361static void
362Choice3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
363 td->free_struct = asn_DEF_Choice2.free_struct;
364 td->print_struct = asn_DEF_Choice2.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800365 td->check_constraints = asn_DEF_Choice2.check_constraints;
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000366 td->ber_decoder = asn_DEF_Choice2.ber_decoder;
367 td->der_encoder = asn_DEF_Choice2.der_encoder;
368 td->xer_decoder = asn_DEF_Choice2.xer_decoder;
369 td->xer_encoder = asn_DEF_Choice2.xer_encoder;
370 td->uper_decoder = asn_DEF_Choice2.uper_decoder;
371 td->uper_encoder = asn_DEF_Choice2.uper_encoder;
372 if(!td->per_constraints)
373 td->per_constraints = asn_DEF_Choice2.per_constraints;
374 td->elements = asn_DEF_Choice2.elements;
375 td->elements_count = asn_DEF_Choice2.elements_count;
376 td->specifics = asn_DEF_Choice2.specifics;
377}
378
379void
380Choice3_free(asn_TYPE_descriptor_t *td,
381 void *struct_ptr, int contents_only) {
382 Choice3_1_inherit_TYPE_descriptor(td);
383 td->free_struct(td, struct_ptr, contents_only);
384}
385
386int
387Choice3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
388 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
389 Choice3_1_inherit_TYPE_descriptor(td);
390 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
391}
392
393asn_dec_rval_t
394Choice3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
395 void **structure, const void *bufptr, size_t size, int tag_mode) {
396 Choice3_1_inherit_TYPE_descriptor(td);
397 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
398}
399
400asn_enc_rval_t
401Choice3_encode_der(asn_TYPE_descriptor_t *td,
402 void *structure, int tag_mode, ber_tlv_tag_t tag,
403 asn_app_consume_bytes_f *cb, void *app_key) {
404 Choice3_1_inherit_TYPE_descriptor(td);
405 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
406}
407
408asn_dec_rval_t
409Choice3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
410 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
411 Choice3_1_inherit_TYPE_descriptor(td);
412 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
413}
414
415asn_enc_rval_t
416Choice3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
417 int ilevel, enum xer_encoder_flags_e flags,
418 asn_app_consume_bytes_f *cb, void *app_key) {
419 Choice3_1_inherit_TYPE_descriptor(td);
420 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
421}
422
423
424/*** <<< STAT-DEFS [Choice3] >>> ***/
425
426static ber_tlv_tag_t asn_DEF_Choice3_tags_1[] = {
427 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
428 (ASN_TAG_CLASS_CONTEXT | (2 << 2))
429};
430asn_TYPE_descriptor_t asn_DEF_Choice3 = {
431 "Choice3",
432 "Choice3",
433 Choice3_free,
434 Choice3_print,
435 Choice3_constraint,
436 Choice3_decode_ber,
437 Choice3_encode_der,
438 Choice3_decode_xer,
439 Choice3_encode_xer,
440 0, 0, /* No PER support, use "-gen-PER" to enable */
441 CHOICE_outmost_tag,
442 asn_DEF_Choice3_tags_1,
443 sizeof(asn_DEF_Choice3_tags_1)
444 /sizeof(asn_DEF_Choice3_tags_1[0]), /* 2 */
445 asn_DEF_Choice3_tags_1, /* Same as above */
446 sizeof(asn_DEF_Choice3_tags_1)
447 /sizeof(asn_DEF_Choice3_tags_1[0]), /* 2 */
448 0, /* No PER visible constraints */
449 0, 0, /* Defined elsewhere */
450 0 /* No specifics */
451};
452
453
454/*** <<< INCLUDES [Choice4] >>> ***/
455
456#include "Choice2.h"
457
458/*** <<< TYPE-DECLS [Choice4] >>> ***/
459
460typedef Choice2_t Choice4_t;
461
462/*** <<< FUNC-DECLS [Choice4] >>> ***/
463
464extern asn_TYPE_descriptor_t asn_DEF_Choice4;
465asn_struct_free_f Choice4_free;
466asn_struct_print_f Choice4_print;
467asn_constr_check_f Choice4_constraint;
468ber_type_decoder_f Choice4_decode_ber;
469der_type_encoder_f Choice4_encode_der;
470xer_type_decoder_f Choice4_decode_xer;
471xer_type_encoder_f Choice4_encode_xer;
472
473/*** <<< CODE [Choice4] >>> ***/
474
475int
476Choice4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
477 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
478 /* Replace with underlying type checker */
479 td->check_constraints = asn_DEF_Choice2.check_constraints;
480 return td->check_constraints(td, sptr, ctfailcb, app_key);
481}
482
483/*
484 * This type is implemented using Choice2,
485 * so here we adjust the DEF accordingly.
486 */
487static void
488Choice4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
489 td->free_struct = asn_DEF_Choice2.free_struct;
490 td->print_struct = asn_DEF_Choice2.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800491 td->check_constraints = asn_DEF_Choice2.check_constraints;
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000492 td->ber_decoder = asn_DEF_Choice2.ber_decoder;
493 td->der_encoder = asn_DEF_Choice2.der_encoder;
494 td->xer_decoder = asn_DEF_Choice2.xer_decoder;
495 td->xer_encoder = asn_DEF_Choice2.xer_encoder;
496 td->uper_decoder = asn_DEF_Choice2.uper_decoder;
497 td->uper_encoder = asn_DEF_Choice2.uper_encoder;
498 if(!td->per_constraints)
499 td->per_constraints = asn_DEF_Choice2.per_constraints;
500 td->elements = asn_DEF_Choice2.elements;
501 td->elements_count = asn_DEF_Choice2.elements_count;
502 td->specifics = asn_DEF_Choice2.specifics;
503}
504
505void
506Choice4_free(asn_TYPE_descriptor_t *td,
507 void *struct_ptr, int contents_only) {
508 Choice4_1_inherit_TYPE_descriptor(td);
509 td->free_struct(td, struct_ptr, contents_only);
510}
511
512int
513Choice4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
514 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
515 Choice4_1_inherit_TYPE_descriptor(td);
516 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
517}
518
519asn_dec_rval_t
520Choice4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
521 void **structure, const void *bufptr, size_t size, int tag_mode) {
522 Choice4_1_inherit_TYPE_descriptor(td);
523 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
524}
525
526asn_enc_rval_t
527Choice4_encode_der(asn_TYPE_descriptor_t *td,
528 void *structure, int tag_mode, ber_tlv_tag_t tag,
529 asn_app_consume_bytes_f *cb, void *app_key) {
530 Choice4_1_inherit_TYPE_descriptor(td);
531 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
532}
533
534asn_dec_rval_t
535Choice4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
536 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
537 Choice4_1_inherit_TYPE_descriptor(td);
538 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
539}
540
541asn_enc_rval_t
542Choice4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
543 int ilevel, enum xer_encoder_flags_e flags,
544 asn_app_consume_bytes_f *cb, void *app_key) {
545 Choice4_1_inherit_TYPE_descriptor(td);
546 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
547}
548
549
550/*** <<< STAT-DEFS [Choice4] >>> ***/
551
552static ber_tlv_tag_t asn_DEF_Choice4_tags_1[] = {
553 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
554 (ASN_TAG_CLASS_CONTEXT | (2 << 2))
555};
556asn_TYPE_descriptor_t asn_DEF_Choice4 = {
557 "Choice4",
558 "Choice4",
559 Choice4_free,
560 Choice4_print,
561 Choice4_constraint,
562 Choice4_decode_ber,
563 Choice4_encode_der,
564 Choice4_decode_xer,
565 Choice4_encode_xer,
566 0, 0, /* No PER support, use "-gen-PER" to enable */
567 CHOICE_outmost_tag,
568 asn_DEF_Choice4_tags_1,
569 sizeof(asn_DEF_Choice4_tags_1)
570 /sizeof(asn_DEF_Choice4_tags_1[0]) - 1, /* 1 */
571 asn_DEF_Choice4_tags_1, /* Same as above */
572 sizeof(asn_DEF_Choice4_tags_1)
573 /sizeof(asn_DEF_Choice4_tags_1[0]), /* 2 */
574 0, /* No PER visible constraints */
575 0, 0, /* Defined elsewhere */
576 0 /* No specifics */
577};
578
579
580/*** <<< INCLUDES [Choice5] >>> ***/
581
582#include "Choice2.h"
583
584/*** <<< TYPE-DECLS [Choice5] >>> ***/
585
586typedef Choice2_t Choice5_t;
587
588/*** <<< FUNC-DECLS [Choice5] >>> ***/
589
590extern asn_TYPE_descriptor_t asn_DEF_Choice5;
591asn_struct_free_f Choice5_free;
592asn_struct_print_f Choice5_print;
593asn_constr_check_f Choice5_constraint;
594ber_type_decoder_f Choice5_decode_ber;
595der_type_encoder_f Choice5_encode_der;
596xer_type_decoder_f Choice5_decode_xer;
597xer_type_encoder_f Choice5_encode_xer;
598
599/*** <<< CODE [Choice5] >>> ***/
600
601int
602Choice5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
603 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
604 /* Replace with underlying type checker */
605 td->check_constraints = asn_DEF_Choice2.check_constraints;
606 return td->check_constraints(td, sptr, ctfailcb, app_key);
607}
608
609/*
610 * This type is implemented using Choice2,
611 * so here we adjust the DEF accordingly.
612 */
613static void
614Choice5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
615 td->free_struct = asn_DEF_Choice2.free_struct;
616 td->print_struct = asn_DEF_Choice2.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800617 td->check_constraints = asn_DEF_Choice2.check_constraints;
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000618 td->ber_decoder = asn_DEF_Choice2.ber_decoder;
619 td->der_encoder = asn_DEF_Choice2.der_encoder;
620 td->xer_decoder = asn_DEF_Choice2.xer_decoder;
621 td->xer_encoder = asn_DEF_Choice2.xer_encoder;
622 td->uper_decoder = asn_DEF_Choice2.uper_decoder;
623 td->uper_encoder = asn_DEF_Choice2.uper_encoder;
624 if(!td->per_constraints)
625 td->per_constraints = asn_DEF_Choice2.per_constraints;
626 td->elements = asn_DEF_Choice2.elements;
627 td->elements_count = asn_DEF_Choice2.elements_count;
628 td->specifics = asn_DEF_Choice2.specifics;
629}
630
631void
632Choice5_free(asn_TYPE_descriptor_t *td,
633 void *struct_ptr, int contents_only) {
634 Choice5_1_inherit_TYPE_descriptor(td);
635 td->free_struct(td, struct_ptr, contents_only);
636}
637
638int
639Choice5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
640 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
641 Choice5_1_inherit_TYPE_descriptor(td);
642 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
643}
644
645asn_dec_rval_t
646Choice5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
647 void **structure, const void *bufptr, size_t size, int tag_mode) {
648 Choice5_1_inherit_TYPE_descriptor(td);
649 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
650}
651
652asn_enc_rval_t
653Choice5_encode_der(asn_TYPE_descriptor_t *td,
654 void *structure, int tag_mode, ber_tlv_tag_t tag,
655 asn_app_consume_bytes_f *cb, void *app_key) {
656 Choice5_1_inherit_TYPE_descriptor(td);
657 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
658}
659
660asn_dec_rval_t
661Choice5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
662 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
663 Choice5_1_inherit_TYPE_descriptor(td);
664 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
665}
666
667asn_enc_rval_t
668Choice5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
669 int ilevel, enum xer_encoder_flags_e flags,
670 asn_app_consume_bytes_f *cb, void *app_key) {
671 Choice5_1_inherit_TYPE_descriptor(td);
672 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
673}
674
675
676/*** <<< STAT-DEFS [Choice5] >>> ***/
677
678static ber_tlv_tag_t asn_DEF_Choice5_tags_1[] = {
679 (ASN_TAG_CLASS_CONTEXT | (2 << 2))
680};
681asn_TYPE_descriptor_t asn_DEF_Choice5 = {
682 "Choice5",
683 "Choice5",
684 Choice5_free,
685 Choice5_print,
686 Choice5_constraint,
687 Choice5_decode_ber,
688 Choice5_encode_der,
689 Choice5_decode_xer,
690 Choice5_encode_xer,
691 0, 0, /* No PER support, use "-gen-PER" to enable */
692 CHOICE_outmost_tag,
693 asn_DEF_Choice5_tags_1,
694 sizeof(asn_DEF_Choice5_tags_1)
695 /sizeof(asn_DEF_Choice5_tags_1[0]), /* 1 */
696 asn_DEF_Choice5_tags_1, /* Same as above */
697 sizeof(asn_DEF_Choice5_tags_1)
698 /sizeof(asn_DEF_Choice5_tags_1[0]), /* 1 */
699 0, /* No PER visible constraints */
700 0, 0, /* Defined elsewhere */
701 0 /* No specifics */
702};
703
704
705/*** <<< INCLUDES [Choice6] >>> ***/
706
707#include "Choice1.h"
708
709/*** <<< TYPE-DECLS [Choice6] >>> ***/
710
711typedef Choice1_t Choice6_t;
712
713/*** <<< FUNC-DECLS [Choice6] >>> ***/
714
715extern asn_TYPE_descriptor_t asn_DEF_Choice6;
716asn_struct_free_f Choice6_free;
717asn_struct_print_f Choice6_print;
718asn_constr_check_f Choice6_constraint;
719ber_type_decoder_f Choice6_decode_ber;
720der_type_encoder_f Choice6_encode_der;
721xer_type_decoder_f Choice6_decode_xer;
722xer_type_encoder_f Choice6_encode_xer;
723
724/*** <<< CODE [Choice6] >>> ***/
725
726int
727Choice6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
728 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
729 /* Replace with underlying type checker */
730 td->check_constraints = asn_DEF_Choice1.check_constraints;
731 return td->check_constraints(td, sptr, ctfailcb, app_key);
732}
733
734/*
735 * This type is implemented using Choice1,
736 * so here we adjust the DEF accordingly.
737 */
738static void
739Choice6_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
740 td->free_struct = asn_DEF_Choice1.free_struct;
741 td->print_struct = asn_DEF_Choice1.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800742 td->check_constraints = asn_DEF_Choice1.check_constraints;
Lev Walkin8c2ca0b2006-09-17 06:31:08 +0000743 td->ber_decoder = asn_DEF_Choice1.ber_decoder;
744 td->der_encoder = asn_DEF_Choice1.der_encoder;
745 td->xer_decoder = asn_DEF_Choice1.xer_decoder;
746 td->xer_encoder = asn_DEF_Choice1.xer_encoder;
747 td->uper_decoder = asn_DEF_Choice1.uper_decoder;
748 td->uper_encoder = asn_DEF_Choice1.uper_encoder;
749 if(!td->per_constraints)
750 td->per_constraints = asn_DEF_Choice1.per_constraints;
751 td->elements = asn_DEF_Choice1.elements;
752 td->elements_count = asn_DEF_Choice1.elements_count;
753 td->specifics = asn_DEF_Choice1.specifics;
754}
755
756void
757Choice6_free(asn_TYPE_descriptor_t *td,
758 void *struct_ptr, int contents_only) {
759 Choice6_1_inherit_TYPE_descriptor(td);
760 td->free_struct(td, struct_ptr, contents_only);
761}
762
763int
764Choice6_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
765 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
766 Choice6_1_inherit_TYPE_descriptor(td);
767 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
768}
769
770asn_dec_rval_t
771Choice6_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
772 void **structure, const void *bufptr, size_t size, int tag_mode) {
773 Choice6_1_inherit_TYPE_descriptor(td);
774 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
775}
776
777asn_enc_rval_t
778Choice6_encode_der(asn_TYPE_descriptor_t *td,
779 void *structure, int tag_mode, ber_tlv_tag_t tag,
780 asn_app_consume_bytes_f *cb, void *app_key) {
781 Choice6_1_inherit_TYPE_descriptor(td);
782 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
783}
784
785asn_dec_rval_t
786Choice6_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
787 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
788 Choice6_1_inherit_TYPE_descriptor(td);
789 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
790}
791
792asn_enc_rval_t
793Choice6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
794 int ilevel, enum xer_encoder_flags_e flags,
795 asn_app_consume_bytes_f *cb, void *app_key) {
796 Choice6_1_inherit_TYPE_descriptor(td);
797 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
798}
799
800
801/*** <<< STAT-DEFS [Choice6] >>> ***/
802
803asn_TYPE_descriptor_t asn_DEF_Choice6 = {
804 "Choice6",
805 "Choice6",
806 Choice6_free,
807 Choice6_print,
808 Choice6_constraint,
809 Choice6_decode_ber,
810 Choice6_encode_der,
811 Choice6_decode_xer,
812 Choice6_encode_xer,
813 0, 0, /* No PER support, use "-gen-PER" to enable */
814 CHOICE_outmost_tag,
815 0, /* No effective tags (pointer) */
816 0, /* No effective tags (count) */
817 0, /* No tags (pointer) */
818 0, /* No tags (count) */
819 0, /* No PER visible constraints */
820 0, 0, /* Defined elsewhere */
821 0 /* No specifics */
822};
823