blob: 48e97aec4d1c4f823fa54efa834790e6c7cab13b [file] [log] [blame]
vlmfbceb502006-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[] = {
80 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* t-a at 15 */
81 { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 }, /* t-b at 16 */
82 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* t-c at 17 */
83 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* t-d at 19 */
84};
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[] = {
172 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* c-b at 24 */
173 { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 } /* c-a at 22 */
174};
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[] = {
288 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* c-b at 28 */
289 { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 }, /* c-a at 27 */
290 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* c-d at 29 */
291 { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 3, 0, 0 } /* c-e at 31 */
292};
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;
365 td->ber_decoder = asn_DEF_Choice2.ber_decoder;
366 td->der_encoder = asn_DEF_Choice2.der_encoder;
367 td->xer_decoder = asn_DEF_Choice2.xer_decoder;
368 td->xer_encoder = asn_DEF_Choice2.xer_encoder;
369 td->uper_decoder = asn_DEF_Choice2.uper_decoder;
370 td->uper_encoder = asn_DEF_Choice2.uper_encoder;
371 if(!td->per_constraints)
372 td->per_constraints = asn_DEF_Choice2.per_constraints;
373 td->elements = asn_DEF_Choice2.elements;
374 td->elements_count = asn_DEF_Choice2.elements_count;
375 td->specifics = asn_DEF_Choice2.specifics;
376}
377
378void
379Choice3_free(asn_TYPE_descriptor_t *td,
380 void *struct_ptr, int contents_only) {
381 Choice3_1_inherit_TYPE_descriptor(td);
382 td->free_struct(td, struct_ptr, contents_only);
383}
384
385int
386Choice3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
387 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
388 Choice3_1_inherit_TYPE_descriptor(td);
389 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
390}
391
392asn_dec_rval_t
393Choice3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
394 void **structure, const void *bufptr, size_t size, int tag_mode) {
395 Choice3_1_inherit_TYPE_descriptor(td);
396 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
397}
398
399asn_enc_rval_t
400Choice3_encode_der(asn_TYPE_descriptor_t *td,
401 void *structure, int tag_mode, ber_tlv_tag_t tag,
402 asn_app_consume_bytes_f *cb, void *app_key) {
403 Choice3_1_inherit_TYPE_descriptor(td);
404 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
405}
406
407asn_dec_rval_t
408Choice3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
409 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
410 Choice3_1_inherit_TYPE_descriptor(td);
411 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
412}
413
414asn_enc_rval_t
415Choice3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
416 int ilevel, enum xer_encoder_flags_e flags,
417 asn_app_consume_bytes_f *cb, void *app_key) {
418 Choice3_1_inherit_TYPE_descriptor(td);
419 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
420}
421
422
423/*** <<< STAT-DEFS [Choice3] >>> ***/
424
425static ber_tlv_tag_t asn_DEF_Choice3_tags_1[] = {
426 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
427 (ASN_TAG_CLASS_CONTEXT | (2 << 2))
428};
429asn_TYPE_descriptor_t asn_DEF_Choice3 = {
430 "Choice3",
431 "Choice3",
432 Choice3_free,
433 Choice3_print,
434 Choice3_constraint,
435 Choice3_decode_ber,
436 Choice3_encode_der,
437 Choice3_decode_xer,
438 Choice3_encode_xer,
439 0, 0, /* No PER support, use "-gen-PER" to enable */
440 CHOICE_outmost_tag,
441 asn_DEF_Choice3_tags_1,
442 sizeof(asn_DEF_Choice3_tags_1)
443 /sizeof(asn_DEF_Choice3_tags_1[0]), /* 2 */
444 asn_DEF_Choice3_tags_1, /* Same as above */
445 sizeof(asn_DEF_Choice3_tags_1)
446 /sizeof(asn_DEF_Choice3_tags_1[0]), /* 2 */
447 0, /* No PER visible constraints */
448 0, 0, /* Defined elsewhere */
449 0 /* No specifics */
450};
451
452
453/*** <<< INCLUDES [Choice4] >>> ***/
454
455#include "Choice2.h"
456
457/*** <<< TYPE-DECLS [Choice4] >>> ***/
458
459typedef Choice2_t Choice4_t;
460
461/*** <<< FUNC-DECLS [Choice4] >>> ***/
462
463extern asn_TYPE_descriptor_t asn_DEF_Choice4;
464asn_struct_free_f Choice4_free;
465asn_struct_print_f Choice4_print;
466asn_constr_check_f Choice4_constraint;
467ber_type_decoder_f Choice4_decode_ber;
468der_type_encoder_f Choice4_encode_der;
469xer_type_decoder_f Choice4_decode_xer;
470xer_type_encoder_f Choice4_encode_xer;
471
472/*** <<< CODE [Choice4] >>> ***/
473
474int
475Choice4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
476 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
477 /* Replace with underlying type checker */
478 td->check_constraints = asn_DEF_Choice2.check_constraints;
479 return td->check_constraints(td, sptr, ctfailcb, app_key);
480}
481
482/*
483 * This type is implemented using Choice2,
484 * so here we adjust the DEF accordingly.
485 */
486static void
487Choice4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
488 td->free_struct = asn_DEF_Choice2.free_struct;
489 td->print_struct = asn_DEF_Choice2.print_struct;
490 td->ber_decoder = asn_DEF_Choice2.ber_decoder;
491 td->der_encoder = asn_DEF_Choice2.der_encoder;
492 td->xer_decoder = asn_DEF_Choice2.xer_decoder;
493 td->xer_encoder = asn_DEF_Choice2.xer_encoder;
494 td->uper_decoder = asn_DEF_Choice2.uper_decoder;
495 td->uper_encoder = asn_DEF_Choice2.uper_encoder;
496 if(!td->per_constraints)
497 td->per_constraints = asn_DEF_Choice2.per_constraints;
498 td->elements = asn_DEF_Choice2.elements;
499 td->elements_count = asn_DEF_Choice2.elements_count;
500 td->specifics = asn_DEF_Choice2.specifics;
501}
502
503void
504Choice4_free(asn_TYPE_descriptor_t *td,
505 void *struct_ptr, int contents_only) {
506 Choice4_1_inherit_TYPE_descriptor(td);
507 td->free_struct(td, struct_ptr, contents_only);
508}
509
510int
511Choice4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
512 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
513 Choice4_1_inherit_TYPE_descriptor(td);
514 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
515}
516
517asn_dec_rval_t
518Choice4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
519 void **structure, const void *bufptr, size_t size, int tag_mode) {
520 Choice4_1_inherit_TYPE_descriptor(td);
521 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
522}
523
524asn_enc_rval_t
525Choice4_encode_der(asn_TYPE_descriptor_t *td,
526 void *structure, int tag_mode, ber_tlv_tag_t tag,
527 asn_app_consume_bytes_f *cb, void *app_key) {
528 Choice4_1_inherit_TYPE_descriptor(td);
529 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
530}
531
532asn_dec_rval_t
533Choice4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
534 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
535 Choice4_1_inherit_TYPE_descriptor(td);
536 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
537}
538
539asn_enc_rval_t
540Choice4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
541 int ilevel, enum xer_encoder_flags_e flags,
542 asn_app_consume_bytes_f *cb, void *app_key) {
543 Choice4_1_inherit_TYPE_descriptor(td);
544 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
545}
546
547
548/*** <<< STAT-DEFS [Choice4] >>> ***/
549
550static ber_tlv_tag_t asn_DEF_Choice4_tags_1[] = {
551 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
552 (ASN_TAG_CLASS_CONTEXT | (2 << 2))
553};
554asn_TYPE_descriptor_t asn_DEF_Choice4 = {
555 "Choice4",
556 "Choice4",
557 Choice4_free,
558 Choice4_print,
559 Choice4_constraint,
560 Choice4_decode_ber,
561 Choice4_encode_der,
562 Choice4_decode_xer,
563 Choice4_encode_xer,
564 0, 0, /* No PER support, use "-gen-PER" to enable */
565 CHOICE_outmost_tag,
566 asn_DEF_Choice4_tags_1,
567 sizeof(asn_DEF_Choice4_tags_1)
568 /sizeof(asn_DEF_Choice4_tags_1[0]) - 1, /* 1 */
569 asn_DEF_Choice4_tags_1, /* Same as above */
570 sizeof(asn_DEF_Choice4_tags_1)
571 /sizeof(asn_DEF_Choice4_tags_1[0]), /* 2 */
572 0, /* No PER visible constraints */
573 0, 0, /* Defined elsewhere */
574 0 /* No specifics */
575};
576
577
578/*** <<< INCLUDES [Choice5] >>> ***/
579
580#include "Choice2.h"
581
582/*** <<< TYPE-DECLS [Choice5] >>> ***/
583
584typedef Choice2_t Choice5_t;
585
586/*** <<< FUNC-DECLS [Choice5] >>> ***/
587
588extern asn_TYPE_descriptor_t asn_DEF_Choice5;
589asn_struct_free_f Choice5_free;
590asn_struct_print_f Choice5_print;
591asn_constr_check_f Choice5_constraint;
592ber_type_decoder_f Choice5_decode_ber;
593der_type_encoder_f Choice5_encode_der;
594xer_type_decoder_f Choice5_decode_xer;
595xer_type_encoder_f Choice5_encode_xer;
596
597/*** <<< CODE [Choice5] >>> ***/
598
599int
600Choice5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
601 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
602 /* Replace with underlying type checker */
603 td->check_constraints = asn_DEF_Choice2.check_constraints;
604 return td->check_constraints(td, sptr, ctfailcb, app_key);
605}
606
607/*
608 * This type is implemented using Choice2,
609 * so here we adjust the DEF accordingly.
610 */
611static void
612Choice5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
613 td->free_struct = asn_DEF_Choice2.free_struct;
614 td->print_struct = asn_DEF_Choice2.print_struct;
615 td->ber_decoder = asn_DEF_Choice2.ber_decoder;
616 td->der_encoder = asn_DEF_Choice2.der_encoder;
617 td->xer_decoder = asn_DEF_Choice2.xer_decoder;
618 td->xer_encoder = asn_DEF_Choice2.xer_encoder;
619 td->uper_decoder = asn_DEF_Choice2.uper_decoder;
620 td->uper_encoder = asn_DEF_Choice2.uper_encoder;
621 if(!td->per_constraints)
622 td->per_constraints = asn_DEF_Choice2.per_constraints;
623 td->elements = asn_DEF_Choice2.elements;
624 td->elements_count = asn_DEF_Choice2.elements_count;
625 td->specifics = asn_DEF_Choice2.specifics;
626}
627
628void
629Choice5_free(asn_TYPE_descriptor_t *td,
630 void *struct_ptr, int contents_only) {
631 Choice5_1_inherit_TYPE_descriptor(td);
632 td->free_struct(td, struct_ptr, contents_only);
633}
634
635int
636Choice5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
637 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
638 Choice5_1_inherit_TYPE_descriptor(td);
639 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
640}
641
642asn_dec_rval_t
643Choice5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
644 void **structure, const void *bufptr, size_t size, int tag_mode) {
645 Choice5_1_inherit_TYPE_descriptor(td);
646 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
647}
648
649asn_enc_rval_t
650Choice5_encode_der(asn_TYPE_descriptor_t *td,
651 void *structure, int tag_mode, ber_tlv_tag_t tag,
652 asn_app_consume_bytes_f *cb, void *app_key) {
653 Choice5_1_inherit_TYPE_descriptor(td);
654 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
655}
656
657asn_dec_rval_t
658Choice5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
659 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
660 Choice5_1_inherit_TYPE_descriptor(td);
661 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
662}
663
664asn_enc_rval_t
665Choice5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
666 int ilevel, enum xer_encoder_flags_e flags,
667 asn_app_consume_bytes_f *cb, void *app_key) {
668 Choice5_1_inherit_TYPE_descriptor(td);
669 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
670}
671
672
673/*** <<< STAT-DEFS [Choice5] >>> ***/
674
675static ber_tlv_tag_t asn_DEF_Choice5_tags_1[] = {
676 (ASN_TAG_CLASS_CONTEXT | (2 << 2))
677};
678asn_TYPE_descriptor_t asn_DEF_Choice5 = {
679 "Choice5",
680 "Choice5",
681 Choice5_free,
682 Choice5_print,
683 Choice5_constraint,
684 Choice5_decode_ber,
685 Choice5_encode_der,
686 Choice5_decode_xer,
687 Choice5_encode_xer,
688 0, 0, /* No PER support, use "-gen-PER" to enable */
689 CHOICE_outmost_tag,
690 asn_DEF_Choice5_tags_1,
691 sizeof(asn_DEF_Choice5_tags_1)
692 /sizeof(asn_DEF_Choice5_tags_1[0]), /* 1 */
693 asn_DEF_Choice5_tags_1, /* Same as above */
694 sizeof(asn_DEF_Choice5_tags_1)
695 /sizeof(asn_DEF_Choice5_tags_1[0]), /* 1 */
696 0, /* No PER visible constraints */
697 0, 0, /* Defined elsewhere */
698 0 /* No specifics */
699};
700
701
702/*** <<< INCLUDES [Choice6] >>> ***/
703
704#include "Choice1.h"
705
706/*** <<< TYPE-DECLS [Choice6] >>> ***/
707
708typedef Choice1_t Choice6_t;
709
710/*** <<< FUNC-DECLS [Choice6] >>> ***/
711
712extern asn_TYPE_descriptor_t asn_DEF_Choice6;
713asn_struct_free_f Choice6_free;
714asn_struct_print_f Choice6_print;
715asn_constr_check_f Choice6_constraint;
716ber_type_decoder_f Choice6_decode_ber;
717der_type_encoder_f Choice6_encode_der;
718xer_type_decoder_f Choice6_decode_xer;
719xer_type_encoder_f Choice6_encode_xer;
720
721/*** <<< CODE [Choice6] >>> ***/
722
723int
724Choice6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
725 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
726 /* Replace with underlying type checker */
727 td->check_constraints = asn_DEF_Choice1.check_constraints;
728 return td->check_constraints(td, sptr, ctfailcb, app_key);
729}
730
731/*
732 * This type is implemented using Choice1,
733 * so here we adjust the DEF accordingly.
734 */
735static void
736Choice6_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
737 td->free_struct = asn_DEF_Choice1.free_struct;
738 td->print_struct = asn_DEF_Choice1.print_struct;
739 td->ber_decoder = asn_DEF_Choice1.ber_decoder;
740 td->der_encoder = asn_DEF_Choice1.der_encoder;
741 td->xer_decoder = asn_DEF_Choice1.xer_decoder;
742 td->xer_encoder = asn_DEF_Choice1.xer_encoder;
743 td->uper_decoder = asn_DEF_Choice1.uper_decoder;
744 td->uper_encoder = asn_DEF_Choice1.uper_encoder;
745 if(!td->per_constraints)
746 td->per_constraints = asn_DEF_Choice1.per_constraints;
747 td->elements = asn_DEF_Choice1.elements;
748 td->elements_count = asn_DEF_Choice1.elements_count;
749 td->specifics = asn_DEF_Choice1.specifics;
750}
751
752void
753Choice6_free(asn_TYPE_descriptor_t *td,
754 void *struct_ptr, int contents_only) {
755 Choice6_1_inherit_TYPE_descriptor(td);
756 td->free_struct(td, struct_ptr, contents_only);
757}
758
759int
760Choice6_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
761 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
762 Choice6_1_inherit_TYPE_descriptor(td);
763 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
764}
765
766asn_dec_rval_t
767Choice6_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
768 void **structure, const void *bufptr, size_t size, int tag_mode) {
769 Choice6_1_inherit_TYPE_descriptor(td);
770 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
771}
772
773asn_enc_rval_t
774Choice6_encode_der(asn_TYPE_descriptor_t *td,
775 void *structure, int tag_mode, ber_tlv_tag_t tag,
776 asn_app_consume_bytes_f *cb, void *app_key) {
777 Choice6_1_inherit_TYPE_descriptor(td);
778 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
779}
780
781asn_dec_rval_t
782Choice6_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
783 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
784 Choice6_1_inherit_TYPE_descriptor(td);
785 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
786}
787
788asn_enc_rval_t
789Choice6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
790 int ilevel, enum xer_encoder_flags_e flags,
791 asn_app_consume_bytes_f *cb, void *app_key) {
792 Choice6_1_inherit_TYPE_descriptor(td);
793 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
794}
795
796
797/*** <<< STAT-DEFS [Choice6] >>> ***/
798
799asn_TYPE_descriptor_t asn_DEF_Choice6 = {
800 "Choice6",
801 "Choice6",
802 Choice6_free,
803 Choice6_print,
804 Choice6_constraint,
805 Choice6_decode_ber,
806 Choice6_encode_der,
807 Choice6_decode_xer,
808 Choice6_encode_xer,
809 0, 0, /* No PER support, use "-gen-PER" to enable */
810 CHOICE_outmost_tag,
811 0, /* No effective tags (pointer) */
812 0, /* No effective tags (count) */
813 0, /* No tags (pointer) */
814 0, /* No tags (count) */
815 0, /* No PER visible constraints */
816 0, 0, /* Defined elsewhere */
817 0 /* No specifics */
818};
819