2 /*** <<< INCLUDES [Type] >>> ***/
4 #include <asn_SEQUENCE_OF.h>
5 #include <constr_SEQUENCE_OF.h>
6 #include <constr_SEQUENCE.h>
8 /*** <<< FWD-DECLS [Type] >>> ***/
12 /*** <<< TYPE-DECLS [Type] >>> ***/
16 A_SEQUENCE_OF(struct EpytRef) list;
18 /* Context for parsing across buffer boundaries */
19 asn_struct_ctx_t _asn_ctx;
22 /* Context for parsing across buffer boundaries */
23 asn_struct_ctx_t _asn_ctx;
26 /*** <<< FUNC-DECLS [Type] >>> ***/
28 extern asn_TYPE_descriptor_t asn_DEF_Type;
29 extern asn_SEQUENCE_specifics_t asn_SPC_Type_specs_1;
30 extern asn_TYPE_member_t asn_MBR_Type_1[1];
32 /*** <<< POST-INCLUDE [Type] >>> ***/
36 /*** <<< STAT-DEFS [Type] >>> ***/
38 static asn_TYPE_member_t asn_MBR_data_2[] = {
40 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
42 .type = &asn_DEF_EpytRef,
44 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
45 0, 0, /* No default value */
49 static const ber_tlv_tag_t asn_DEF_data_tags_2[] = {
50 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
52 static asn_SET_OF_specifics_t asn_SPC_data_specs_2 = {
54 offsetof(struct data, _asn_ctx),
55 0, /* XER encoding is XMLDelimitedItemList */
57 static /* Use -fall-defs-global to expose */
58 asn_TYPE_descriptor_t asn_DEF_data_2 = {
63 sizeof(asn_DEF_data_tags_2)
64 /sizeof(asn_DEF_data_tags_2[0]), /* 1 */
65 asn_DEF_data_tags_2, /* Same as above */
66 sizeof(asn_DEF_data_tags_2)
67 /sizeof(asn_DEF_data_tags_2[0]), /* 1 */
68 { 0, 0, SEQUENCE_OF_constraint },
70 1, /* Single element */
71 &asn_SPC_data_specs_2 /* Additional specs */
74 asn_TYPE_member_t asn_MBR_Type_1[] = {
75 { ATF_NOFLAGS, 0, offsetof(struct Type, data),
76 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
78 .type = &asn_DEF_data_2,
80 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
81 0, 0, /* No default value */
85 static const ber_tlv_tag_t asn_DEF_Type_tags_1[] = {
86 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
88 static const asn_TYPE_tag2member_t asn_MAP_Type_tag2el_1[] = {
89 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* data */
91 asn_SEQUENCE_specifics_t asn_SPC_Type_specs_1 = {
93 offsetof(struct Type, _asn_ctx),
94 .tag2el = asn_MAP_Type_tag2el_1,
95 .tag2el_count = 1, /* Count of tags in the map */
96 0, 0, 0, /* Optional elements (not needed) */
97 -1, /* First extension addition */
99 asn_TYPE_descriptor_t asn_DEF_Type = {
104 sizeof(asn_DEF_Type_tags_1)
105 /sizeof(asn_DEF_Type_tags_1[0]), /* 1 */
106 asn_DEF_Type_tags_1, /* Same as above */
107 sizeof(asn_DEF_Type_tags_1)
108 /sizeof(asn_DEF_Type_tags_1[0]), /* 1 */
109 { 0, 0, SEQUENCE_constraint },
111 1, /* Elements count */
112 &asn_SPC_Type_specs_1 /* Additional specs */
116 /*** <<< INCLUDES [EpytRef] >>> ***/
120 /*** <<< TYPE-DECLS [EpytRef] >>> ***/
122 typedef Epyt_t EpytRef_t;
124 /*** <<< FUNC-DECLS [EpytRef] >>> ***/
126 extern asn_TYPE_descriptor_t asn_DEF_EpytRef;
127 asn_struct_free_f EpytRef_free;
128 asn_struct_print_f EpytRef_print;
129 asn_constr_check_f EpytRef_constraint;
130 ber_type_decoder_f EpytRef_decode_ber;
131 der_type_encoder_f EpytRef_encode_der;
132 xer_type_decoder_f EpytRef_decode_xer;
133 xer_type_encoder_f EpytRef_encode_xer;
135 /*** <<< CODE [EpytRef] >>> ***/
138 * This type is implemented using Epyt,
139 * so here we adjust the DEF accordingly.
142 /*** <<< STAT-DEFS [EpytRef] >>> ***/
144 static const ber_tlv_tag_t asn_DEF_EpytRef_tags_1[] = {
145 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
147 asn_TYPE_descriptor_t asn_DEF_EpytRef = {
151 asn_DEF_EpytRef_tags_1,
152 sizeof(asn_DEF_EpytRef_tags_1)
153 /sizeof(asn_DEF_EpytRef_tags_1[0]), /* 1 */
154 asn_DEF_EpytRef_tags_1, /* Same as above */
155 sizeof(asn_DEF_EpytRef_tags_1)
156 /sizeof(asn_DEF_EpytRef_tags_1[0]), /* 1 */
157 { 0, 0, SEQUENCE_constraint },
159 3, /* Elements count */
160 &asn_SPC_Epyt_specs_1 /* Additional specs */
164 /*** <<< INCLUDES [Epyt] >>> ***/
166 #include <asn_SET_OF.h>
167 #include <constr_SET_OF.h>
168 #include <constr_SEQUENCE.h>
170 /*** <<< FWD-DECLS [Epyt] >>> ***/
175 /*** <<< TYPE-DECLS [Epyt] >>> ***/
177 typedef struct Epyt {
179 A_SET_OF(struct Type) list;
181 /* Context for parsing across buffer boundaries */
182 asn_struct_ctx_t _asn_ctx;
184 struct Type *type; /* OPTIONAL */
185 struct Ypet *ypet; /* OPTIONAL */
187 /* Context for parsing across buffer boundaries */
188 asn_struct_ctx_t _asn_ctx;
191 /*** <<< FUNC-DECLS [Epyt] >>> ***/
193 extern asn_TYPE_descriptor_t asn_DEF_Epyt;
194 extern asn_SEQUENCE_specifics_t asn_SPC_Epyt_specs_1;
195 extern asn_TYPE_member_t asn_MBR_Epyt_1[3];
197 /*** <<< POST-INCLUDE [Epyt] >>> ***/
202 /*** <<< STAT-DEFS [Epyt] >>> ***/
204 static asn_TYPE_member_t asn_MBR_stype_2[] = {
206 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
208 .type = &asn_DEF_Type,
210 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
211 0, 0, /* No default value */
215 static const ber_tlv_tag_t asn_DEF_stype_tags_2[] = {
216 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
218 static asn_SET_OF_specifics_t asn_SPC_stype_specs_2 = {
219 sizeof(struct stype),
220 offsetof(struct stype, _asn_ctx),
221 0, /* XER encoding is XMLDelimitedItemList */
223 static /* Use -fall-defs-global to expose */
224 asn_TYPE_descriptor_t asn_DEF_stype_2 = {
228 asn_DEF_stype_tags_2,
229 sizeof(asn_DEF_stype_tags_2)
230 /sizeof(asn_DEF_stype_tags_2[0]), /* 1 */
231 asn_DEF_stype_tags_2, /* Same as above */
232 sizeof(asn_DEF_stype_tags_2)
233 /sizeof(asn_DEF_stype_tags_2[0]), /* 1 */
234 { 0, 0, SET_OF_constraint },
236 1, /* Single element */
237 &asn_SPC_stype_specs_2 /* Additional specs */
240 asn_TYPE_member_t asn_MBR_Epyt_1[] = {
241 { ATF_NOFLAGS, 0, offsetof(struct Epyt, stype),
242 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
244 .type = &asn_DEF_stype_2,
246 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
247 0, 0, /* No default value */
250 { ATF_POINTER, 2, offsetof(struct Epyt, type),
251 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
253 .type = &asn_DEF_Type,
255 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
256 0, 0, /* No default value */
259 { ATF_POINTER, 1, offsetof(struct Epyt, ypet),
260 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
262 .type = &asn_DEF_Ypet,
264 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
265 0, 0, /* No default value */
269 static const ber_tlv_tag_t asn_DEF_Epyt_tags_1[] = {
270 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
272 static const asn_TYPE_tag2member_t asn_MAP_Epyt_tag2el_1[] = {
273 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* type */
274 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 1 }, /* stype */
275 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 2, -1, 0 } /* ypet */
277 asn_SEQUENCE_specifics_t asn_SPC_Epyt_specs_1 = {
279 offsetof(struct Epyt, _asn_ctx),
280 .tag2el = asn_MAP_Epyt_tag2el_1,
281 .tag2el_count = 3, /* Count of tags in the map */
282 0, 0, 0, /* Optional elements (not needed) */
283 -1, /* First extension addition */
285 asn_TYPE_descriptor_t asn_DEF_Epyt = {
290 sizeof(asn_DEF_Epyt_tags_1)
291 /sizeof(asn_DEF_Epyt_tags_1[0]), /* 1 */
292 asn_DEF_Epyt_tags_1, /* Same as above */
293 sizeof(asn_DEF_Epyt_tags_1)
294 /sizeof(asn_DEF_Epyt_tags_1[0]), /* 1 */
295 { 0, 0, SEQUENCE_constraint },
297 3, /* Elements count */
298 &asn_SPC_Epyt_specs_1 /* Additional specs */
302 /*** <<< INCLUDES [Ypet] >>> ***/
305 #include <IA5String.h>
306 #include "EnumType.h"
307 #include <asn_SET_OF.h>
308 #include <constr_SET_OF.h>
309 #include <constr_SET.h>
311 /*** <<< DEPS [Ypet] >>> ***/
315 * Method of determining the components presence
317 typedef enum Ypet_PR {
318 Ypet_PR_epyt, /* Member epyt is present */
319 Ypet_PR_plain, /* Member plain is present */
320 Ypet_PR_senums, /* Member senums is present */
321 Ypet_PR_patest1, /* Member patest1 is present */
322 Ypet_PR_patest2, /* Member patest2 is present */
325 /*** <<< FWD-DECLS [Ypet] >>> ***/
329 /*** <<< TYPE-DECLS [Ypet] >>> ***/
331 typedef struct Ypet {
333 INTEGER_t *plain; /* DEFAULT 7 */
335 A_SET_OF(EnumType_t) list;
337 /* Context for parsing across buffer boundaries */
338 asn_struct_ctx_t _asn_ctx;
343 /* Presence bitmask: ASN_SET_ISPRESENT(pYpet, Ypet_PR_x) */
344 unsigned int _presence_map
345 [((5+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))];
347 /* Context for parsing across buffer boundaries */
348 asn_struct_ctx_t _asn_ctx;
351 /*** <<< FUNC-DECLS [Ypet] >>> ***/
353 extern asn_TYPE_descriptor_t asn_DEF_Ypet;
354 extern asn_SET_specifics_t asn_SPC_Ypet_specs_1;
355 extern asn_TYPE_member_t asn_MBR_Ypet_1[5];
357 /*** <<< POST-INCLUDE [Ypet] >>> ***/
361 /*** <<< CTABLES [Ypet] >>> ***/
363 static int check_permitted_alphabet_6(const void *sptr) {
364 /* The underlying type is IA5String */
365 const IA5String_t *st = (const IA5String_t *)sptr;
366 const uint8_t *ch = st->buf;
367 const uint8_t *end = ch + st->size;
369 for(; ch < end; ch++) {
371 if(!(cv >= 65 && cv <= 90)) return -1;
376 static int check_permitted_alphabet_7(const void *sptr) {
377 /* The underlying type is IA5String */
378 const IA5String_t *st = (const IA5String_t *)sptr;
379 const uint8_t *ch = st->buf;
380 const uint8_t *end = ch + st->size;
382 for(; ch < end; ch++) {
384 if(!(cv >= 97 && cv <= 122)) return -1;
390 /*** <<< CODE [Ypet] >>> ***/
393 memb_patest1_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
394 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
395 const IA5String_t *st = (const IA5String_t *)sptr;
398 ASN__CTFAIL(app_key, td, sptr,
399 "%s: value not given (%s:%d)",
400 td->name, __FILE__, __LINE__);
405 if(!check_permitted_alphabet_6(st)) {
406 /* Constraint check succeeded */
409 ASN__CTFAIL(app_key, td, sptr,
410 "%s: constraint failed (%s:%d)",
411 td->name, __FILE__, __LINE__);
417 memb_patest2_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
418 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
419 const IA5String_t *st = (const IA5String_t *)sptr;
422 ASN__CTFAIL(app_key, td, sptr,
423 "%s: value not given (%s:%d)",
424 td->name, __FILE__, __LINE__);
429 if(!check_permitted_alphabet_7(st)) {
430 /* Constraint check succeeded */
433 ASN__CTFAIL(app_key, td, sptr,
434 "%s: constraint failed (%s:%d)",
435 td->name, __FILE__, __LINE__);
441 /*** <<< STAT-DEFS [Ypet] >>> ***/
443 static int asn_DFL_3_cmp_7(const void *sptr) {
444 const INTEGER_t *st = sptr;
447 return -1; /* No value is not a default value */
450 /* Test default value 7 */
452 if(asn_INTEGER2long(st, &value))
456 static int asn_DFL_3_set_7(void **sptr) {
457 INTEGER_t *st = *sptr;
460 st = (*sptr = CALLOC(1, sizeof(*st)));
464 /* Install default value 7 */
465 return asn_long2INTEGER(st, 7);
467 static asn_TYPE_member_t asn_MBR_senums_4[] = {
469 .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
471 .type = &asn_DEF_EnumType,
473 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
474 0, 0, /* No default value */
478 static const ber_tlv_tag_t asn_DEF_senums_tags_4[] = {
479 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
481 static asn_SET_OF_specifics_t asn_SPC_senums_specs_4 = {
482 sizeof(struct senums),
483 offsetof(struct senums, _asn_ctx),
484 1, /* XER encoding is XMLValueList */
486 static /* Use -fall-defs-global to expose */
487 asn_TYPE_descriptor_t asn_DEF_senums_4 = {
491 asn_DEF_senums_tags_4,
492 sizeof(asn_DEF_senums_tags_4)
493 /sizeof(asn_DEF_senums_tags_4[0]), /* 1 */
494 asn_DEF_senums_tags_4, /* Same as above */
495 sizeof(asn_DEF_senums_tags_4)
496 /sizeof(asn_DEF_senums_tags_4[0]), /* 1 */
497 { 0, 0, SET_OF_constraint },
499 1, /* Single element */
500 &asn_SPC_senums_specs_4 /* Additional specs */
503 asn_TYPE_member_t asn_MBR_Ypet_1[] = {
504 { ATF_POINTER, 0, offsetof(struct Ypet, epyt),
505 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
507 .type = &asn_DEF_Epyt,
509 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
510 0, 0, /* No default value */
513 { ATF_POINTER, 1, offsetof(struct Ypet, plain),
514 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
516 .type = &asn_DEF_INTEGER,
518 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
519 .default_value_cmp = &asn_DFL_3_cmp_7, /* Compare DEFAULT 7 */
520 .default_value_set = &asn_DFL_3_set_7, /* Set DEFAULT 7 */
523 { ATF_NOFLAGS, 0, offsetof(struct Ypet, senums),
524 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
526 .type = &asn_DEF_senums_4,
528 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
529 0, 0, /* No default value */
532 { ATF_NOFLAGS, 0, offsetof(struct Ypet, patest1),
533 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
534 .tag_mode = +1, /* EXPLICIT tag at current level */
535 .type = &asn_DEF_IA5String,
537 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_patest1_constraint_1 },
538 0, 0, /* No default value */
541 { ATF_NOFLAGS, 0, offsetof(struct Ypet, patest2),
542 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
543 .tag_mode = +1, /* EXPLICIT tag at current level */
544 .type = &asn_DEF_IA5String,
546 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_patest2_constraint_1 },
547 0, 0, /* No default value */
551 static const ber_tlv_tag_t asn_DEF_Ypet_tags_1[] = {
552 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
554 static const asn_TYPE_tag2member_t asn_MAP_Ypet_tag2el_1[] = {
555 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* plain */
556 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* epyt */
557 { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 2, 0, 0 }, /* senums */
558 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 3, 0, 0 }, /* patest1 */
559 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 4, 0, 0 } /* patest2 */
561 static const uint8_t asn_MAP_Ypet_mmap_1[(5 + (8 * sizeof(unsigned int)) - 1) / 8] = {
562 (1 << 7) | (0 << 6) | (1 << 5) | (1 << 4) | (1 << 3)
564 asn_SET_specifics_t asn_SPC_Ypet_specs_1 = {
566 offsetof(struct Ypet, _asn_ctx),
567 offsetof(struct Ypet, _presence_map),
568 .tag2el = asn_MAP_Ypet_tag2el_1,
569 .tag2el_count = 5, /* Count of tags in the map */
570 asn_MAP_Ypet_tag2el_1, /* Same as above */
571 5, /* Count of tags in the CXER map */
572 0, /* Whether extensible */
573 (const unsigned int *)asn_MAP_Ypet_mmap_1 /* Mandatory elements map */
575 asn_TYPE_descriptor_t asn_DEF_Ypet = {
580 sizeof(asn_DEF_Ypet_tags_1)
581 /sizeof(asn_DEF_Ypet_tags_1[0]), /* 1 */
582 asn_DEF_Ypet_tags_1, /* Same as above */
583 sizeof(asn_DEF_Ypet_tags_1)
584 /sizeof(asn_DEF_Ypet_tags_1[0]), /* 1 */
585 { 0, 0, SET_constraint },
587 5, /* Elements count */
588 &asn_SPC_Ypet_specs_1 /* Additional specs */
592 /*** <<< INCLUDES [EnumType] >>> ***/
594 #include <ENUMERATED.h>
596 /*** <<< DEPS [EnumType] >>> ***/
598 typedef enum EnumType {
603 /*** <<< TYPE-DECLS [EnumType] >>> ***/
605 typedef ENUMERATED_t EnumType_t;
607 /*** <<< FUNC-DECLS [EnumType] >>> ***/
609 extern asn_TYPE_descriptor_t asn_DEF_EnumType;
610 extern const asn_INTEGER_specifics_t asn_SPC_EnumType_specs_1;
611 asn_struct_free_f EnumType_free;
612 asn_struct_print_f EnumType_print;
613 asn_constr_check_f EnumType_constraint;
614 ber_type_decoder_f EnumType_decode_ber;
615 der_type_encoder_f EnumType_encode_der;
616 xer_type_decoder_f EnumType_decode_xer;
617 xer_type_encoder_f EnumType_encode_xer;
619 /*** <<< CODE [EnumType] >>> ***/
622 * This type is implemented using ENUMERATED,
623 * so here we adjust the DEF accordingly.
626 /*** <<< STAT-DEFS [EnumType] >>> ***/
628 static const asn_INTEGER_enum_map_t asn_MAP_EnumType_value2enum_1[] = {
632 static const unsigned int asn_MAP_EnumType_enum2value_1[] = {
636 const asn_INTEGER_specifics_t asn_SPC_EnumType_specs_1 = {
637 asn_MAP_EnumType_value2enum_1, /* "tag" => N; sorted by tag */
638 asn_MAP_EnumType_enum2value_1, /* N => "tag"; sorted by N */
639 2, /* Number of elements in the maps */
640 0, /* Enumeration is not extensible */
641 1, /* Strict enumeration */
642 0, /* Native long size */
645 static const ber_tlv_tag_t asn_DEF_EnumType_tags_1[] = {
646 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
648 asn_TYPE_descriptor_t asn_DEF_EnumType = {
652 asn_DEF_EnumType_tags_1,
653 sizeof(asn_DEF_EnumType_tags_1)
654 /sizeof(asn_DEF_EnumType_tags_1[0]), /* 1 */
655 asn_DEF_EnumType_tags_1, /* Same as above */
656 sizeof(asn_DEF_EnumType_tags_1)
657 /sizeof(asn_DEF_EnumType_tags_1[0]), /* 1 */
658 { 0, 0, ENUMERATED_constraint },
659 0, 0, /* Defined elsewhere */
660 &asn_SPC_EnumType_specs_1 /* Additional specs */