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