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, |
| 49 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 50 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 51 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 52 | .default_value = 0, |
| 53 | .name = "i" |
| 54 | }, |
| 55 | { ATF_NOFLAGS, 0, offsetof(struct b, choice.n), |
| 56 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 57 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 58 | .type = &asn_DEF_IA5String, |
| 59 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 60 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 61 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 62 | .default_value = 0, |
| 63 | .name = "n" |
| 64 | }, |
| 65 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 66 | static const asn_TYPE_tag2member_t asn_MAP_b_tag2el_3[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 67 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* i */ |
| 68 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* n */ |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 69 | }; |
| 70 | static asn_CHOICE_specifics_t asn_SPC_b_specs_3 = { |
| 71 | sizeof(struct b), |
| 72 | offsetof(struct b, _asn_ctx), |
| 73 | offsetof(struct b, present), |
| 74 | sizeof(((struct b *)0)->present), |
| 75 | asn_MAP_b_tag2el_3, |
| 76 | 2, /* Count of tags in the map */ |
| 77 | .canonical_order = 0, |
| 78 | .ext_start = -1 /* Extensions start */ |
| 79 | }; |
| 80 | static /* Use -fall-defs-global to expose */ |
| 81 | asn_TYPE_descriptor_t asn_DEF_b_3 = { |
| 82 | "b", |
| 83 | "b", |
| 84 | CHOICE_free, |
| 85 | CHOICE_print, |
| 86 | CHOICE_constraint, |
| 87 | CHOICE_decode_ber, |
| 88 | CHOICE_encode_der, |
| 89 | CHOICE_decode_xer, |
| 90 | CHOICE_encode_xer, |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 91 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 92 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 93 | CHOICE_outmost_tag, |
| 94 | 0, /* No effective tags (pointer) */ |
| 95 | 0, /* No effective tags (count) */ |
| 96 | 0, /* No tags (pointer) */ |
| 97 | 0, /* No tags (count) */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 98 | 0, /* No OER visible constraints */ |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 99 | 0, /* No PER visible constraints */ |
| 100 | asn_MBR_b_3, |
| 101 | 2, /* Elements count */ |
| 102 | &asn_SPC_b_specs_3 /* Additional specs */ |
| 103 | }; |
| 104 | |
| 105 | static asn_TYPE_member_t asn_MBR_T1_1[] = { |
| 106 | { ATF_NOFLAGS, 0, offsetof(struct T1, a), |
| 107 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 108 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 109 | .type = &asn_DEF_INTEGER, |
| 110 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 111 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 112 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 113 | .default_value = 0, |
| 114 | .name = "a" |
| 115 | }, |
| 116 | { ATF_NOFLAGS, 0, offsetof(struct T1, b), |
| 117 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 118 | .tag_mode = +1, /* EXPLICIT tag at current level */ |
| 119 | .type = &asn_DEF_b_3, |
| 120 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 121 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 122 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 123 | .default_value = 0, |
| 124 | .name = "b" |
| 125 | }, |
| 126 | { ATF_NOFLAGS, 0, offsetof(struct T1, c), |
| 127 | .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 128 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
| 129 | .type = &asn_DEF_UTF8String, |
| 130 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 131 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 132 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 133 | .default_value = 0, |
| 134 | .name = "c" |
| 135 | }, |
| 136 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 137 | static const ber_tlv_tag_t asn_DEF_T1_tags_1[] = { |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 138 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 139 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 140 | static const asn_TYPE_tag2member_t asn_MAP_T1_tag2el_1[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 141 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a */ |
| 142 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* b */ |
| 143 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* c */ |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 144 | }; |
| 145 | static asn_SEQUENCE_specifics_t asn_SPC_T1_specs_1 = { |
| 146 | sizeof(struct T1), |
| 147 | offsetof(struct T1, _asn_ctx), |
| 148 | asn_MAP_T1_tag2el_1, |
| 149 | 3, /* Count of tags in the map */ |
| 150 | 0, 0, 0, /* Optional elements (not needed) */ |
| 151 | -1, /* Start extensions */ |
| 152 | -1 /* Stop extensions */ |
| 153 | }; |
| 154 | asn_TYPE_descriptor_t asn_DEF_T1 = { |
| 155 | "T1", |
| 156 | "T1", |
| 157 | SEQUENCE_free, |
| 158 | SEQUENCE_print, |
| 159 | SEQUENCE_constraint, |
| 160 | SEQUENCE_decode_ber, |
| 161 | SEQUENCE_encode_der, |
| 162 | SEQUENCE_decode_xer, |
| 163 | SEQUENCE_encode_xer, |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 164 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 165 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 166 | 0, /* Use generic outmost tag fetcher */ |
| 167 | asn_DEF_T1_tags_1, |
| 168 | sizeof(asn_DEF_T1_tags_1) |
| 169 | /sizeof(asn_DEF_T1_tags_1[0]), /* 1 */ |
| 170 | asn_DEF_T1_tags_1, /* Same as above */ |
| 171 | sizeof(asn_DEF_T1_tags_1) |
| 172 | /sizeof(asn_DEF_T1_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 173 | 0, /* No OER visible constraints */ |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 174 | 0, /* No PER visible constraints */ |
| 175 | asn_MBR_T1_1, |
| 176 | 3, /* Elements count */ |
| 177 | &asn_SPC_T1_specs_1 /* Additional specs */ |
| 178 | }; |
| 179 | |