Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [T1] >>> ***/ |
| 3 | |
| 4 | #include <INTEGER.h> |
| 5 | #include <UTF8String.h> |
| 6 | #include <IA5String.h> |
| 7 | #include <constr_CHOICE.h> |
| 8 | #include <constr_SEQUENCE.h> |
| 9 | |
| 10 | /*** <<< DEPS [T1] >>> ***/ |
| 11 | |
| 12 | typedef enum b_PR { |
| 13 | b_PR_NOTHING, /* No components present */ |
| 14 | b_PR_i, |
| 15 | b_PR_n |
| 16 | } b_PR; |
| 17 | |
| 18 | /*** <<< TYPE-DECLS [T1] >>> ***/ |
| 19 | |
| 20 | typedef struct T1 { |
| 21 | INTEGER_t a; |
| 22 | struct b { |
| 23 | b_PR present; |
| 24 | union T1__b_u { |
| 25 | INTEGER_t i; |
| 26 | IA5String_t n; |
| 27 | } choice; |
| 28 | |
| 29 | /* Context for parsing across buffer boundaries */ |
| 30 | asn_struct_ctx_t _asn_ctx; |
| 31 | } b; |
| 32 | UTF8String_t c; |
| 33 | |
| 34 | /* Context for parsing across buffer boundaries */ |
| 35 | asn_struct_ctx_t _asn_ctx; |
| 36 | } T1_t; |
| 37 | |
| 38 | /*** <<< FUNC-DECLS [T1] >>> ***/ |
| 39 | |
| 40 | extern asn_TYPE_descriptor_t asn_DEF_T1; |
| 41 | |
| 42 | /*** <<< STAT-DEFS [T1] >>> ***/ |
| 43 | |
| 44 | static asn_TYPE_member_t asn_MBR_b_3[] = { |
| 45 | { ATF_NOFLAGS, 0, offsetof(struct b, choice.i), |
| 46 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 47 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 48 | .type = &asn_DEF_INTEGER, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 49 | .type_selector = 0, |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 50 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 51 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 52 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 53 | .default_value = 0, |
| 54 | .name = "i" |
| 55 | }, |
| 56 | { ATF_NOFLAGS, 0, offsetof(struct b, choice.n), |
| 57 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 58 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 59 | .type = &asn_DEF_IA5String, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 60 | .type_selector = 0, |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 61 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 62 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 63 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 64 | .default_value = 0, |
| 65 | .name = "n" |
| 66 | }, |
| 67 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 68 | static const asn_TYPE_tag2member_t asn_MAP_b_tag2el_3[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 69 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* i */ |
| 70 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* n */ |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 71 | }; |
| 72 | static asn_CHOICE_specifics_t asn_SPC_b_specs_3 = { |
| 73 | sizeof(struct b), |
| 74 | offsetof(struct b, _asn_ctx), |
| 75 | offsetof(struct b, present), |
| 76 | sizeof(((struct b *)0)->present), |
Lev Walkin | e391708 | 2017-08-23 10:29:38 -0700 | [diff] [blame] | 77 | .tag2el = asn_MAP_b_tag2el_3, |
| 78 | .tag2el_count = 2, /* Count of tags in the map */ |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 79 | .canonical_order = 0, |
| 80 | .ext_start = -1 /* Extensions start */ |
| 81 | }; |
| 82 | static /* Use -fall-defs-global to expose */ |
| 83 | asn_TYPE_descriptor_t asn_DEF_b_3 = { |
| 84 | "b", |
| 85 | "b", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 86 | &asn_OP_CHOICE, |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 87 | CHOICE_constraint, |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 88 | 0, /* No effective tags (pointer) */ |
| 89 | 0, /* No effective tags (count) */ |
| 90 | 0, /* No tags (pointer) */ |
| 91 | 0, /* No tags (count) */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 92 | 0, /* No OER visible constraints */ |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 93 | 0, /* No PER visible constraints */ |
| 94 | asn_MBR_b_3, |
| 95 | 2, /* Elements count */ |
| 96 | &asn_SPC_b_specs_3 /* Additional specs */ |
| 97 | }; |
| 98 | |
| 99 | static asn_TYPE_member_t asn_MBR_T1_1[] = { |
| 100 | { ATF_NOFLAGS, 0, offsetof(struct T1, a), |
| 101 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 102 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 103 | .type = &asn_DEF_INTEGER, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 104 | .type_selector = 0, |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 105 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 106 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 107 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 108 | .default_value = 0, |
| 109 | .name = "a" |
| 110 | }, |
| 111 | { ATF_NOFLAGS, 0, offsetof(struct T1, b), |
| 112 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 113 | .tag_mode = +1, /* EXPLICIT tag at current level */ |
| 114 | .type = &asn_DEF_b_3, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 115 | .type_selector = 0, |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 116 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 117 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 118 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 119 | .default_value = 0, |
| 120 | .name = "b" |
| 121 | }, |
| 122 | { ATF_NOFLAGS, 0, offsetof(struct T1, c), |
| 123 | .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 124 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 125 | .type = &asn_DEF_UTF8String, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 126 | .type_selector = 0, |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 127 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 128 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 129 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 130 | .default_value = 0, |
| 131 | .name = "c" |
| 132 | }, |
| 133 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 134 | static const ber_tlv_tag_t asn_DEF_T1_tags_1[] = { |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 135 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 136 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 137 | static const asn_TYPE_tag2member_t asn_MAP_T1_tag2el_1[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 138 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a */ |
| 139 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* b */ |
| 140 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* c */ |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 141 | }; |
| 142 | static asn_SEQUENCE_specifics_t asn_SPC_T1_specs_1 = { |
| 143 | sizeof(struct T1), |
| 144 | offsetof(struct T1, _asn_ctx), |
Lev Walkin | e391708 | 2017-08-23 10:29:38 -0700 | [diff] [blame] | 145 | .tag2el = asn_MAP_T1_tag2el_1, |
| 146 | .tag2el_count = 3, /* Count of tags in the map */ |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 147 | 0, 0, 0, /* Optional elements (not needed) */ |
| 148 | -1, /* Start extensions */ |
| 149 | -1 /* Stop extensions */ |
| 150 | }; |
| 151 | asn_TYPE_descriptor_t asn_DEF_T1 = { |
| 152 | "T1", |
| 153 | "T1", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 154 | &asn_OP_SEQUENCE, |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 155 | SEQUENCE_constraint, |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 156 | asn_DEF_T1_tags_1, |
| 157 | sizeof(asn_DEF_T1_tags_1) |
| 158 | /sizeof(asn_DEF_T1_tags_1[0]), /* 1 */ |
| 159 | asn_DEF_T1_tags_1, /* Same as above */ |
| 160 | sizeof(asn_DEF_T1_tags_1) |
| 161 | /sizeof(asn_DEF_T1_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 162 | 0, /* No OER visible constraints */ |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 163 | 0, /* No PER visible constraints */ |
| 164 | asn_MBR_T1_1, |
| 165 | 3, /* Elements count */ |
| 166 | &asn_SPC_T1_specs_1 /* Additional specs */ |
| 167 | }; |
| 168 | |