Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [Enum1] >>> ***/ |
| 3 | |
| 4 | #include <ENUMERATED.h> |
| 5 | |
| 6 | /*** <<< DEPS [Enum1] >>> ***/ |
| 7 | |
| 8 | typedef enum Enum1 { |
| 9 | Enum1_red = 0, |
| 10 | Enum1_green = 1, |
| 11 | Enum1_blue = 4, |
| 12 | Enum1_alpha = 5 |
| 13 | /* |
| 14 | * Enumeration is extensible |
| 15 | */ |
| 16 | } e_Enum1; |
| 17 | |
| 18 | /*** <<< TYPE-DECLS [Enum1] >>> ***/ |
| 19 | |
| 20 | typedef ENUMERATED_t Enum1_t; |
| 21 | |
| 22 | /*** <<< FUNC-DECLS [Enum1] >>> ***/ |
| 23 | |
| 24 | extern asn_TYPE_descriptor_t asn_DEF_Enum1; |
| 25 | asn_struct_free_f Enum1_free; |
| 26 | asn_struct_print_f Enum1_print; |
| 27 | asn_constr_check_f Enum1_constraint; |
| 28 | ber_type_decoder_f Enum1_decode_ber; |
| 29 | der_type_encoder_f Enum1_encode_der; |
| 30 | xer_type_decoder_f Enum1_decode_xer; |
| 31 | xer_type_encoder_f Enum1_encode_xer; |
| 32 | |
| 33 | /*** <<< CODE [Enum1] >>> ***/ |
| 34 | |
| 35 | int |
| 36 | Enum1_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 37 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 38 | /* Replace with underlying type checker */ |
| 39 | td->check_constraints = asn_DEF_ENUMERATED.check_constraints; |
| 40 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
| 41 | } |
| 42 | |
| 43 | /* |
| 44 | * This type is implemented using ENUMERATED, |
| 45 | * so here we adjust the DEF accordingly. |
| 46 | */ |
| 47 | static void |
| 48 | Enum1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 49 | td->free_struct = asn_DEF_ENUMERATED.free_struct; |
| 50 | td->print_struct = asn_DEF_ENUMERATED.print_struct; |
Lev Walkin | 6169b8d | 2013-12-07 11:02:44 -0800 | [diff] [blame] | 51 | td->check_constraints = asn_DEF_ENUMERATED.check_constraints; |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 52 | td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder; |
| 53 | td->der_encoder = asn_DEF_ENUMERATED.der_encoder; |
| 54 | td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder; |
| 55 | td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder; |
| 56 | td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder; |
| 57 | td->uper_encoder = asn_DEF_ENUMERATED.uper_encoder; |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame^] | 58 | td->oer_decoder = asn_DEF_ENUMERATED.oer_decoder; |
| 59 | td->oer_encoder = asn_DEF_ENUMERATED.oer_encoder; |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 60 | if(!td->per_constraints) |
| 61 | td->per_constraints = asn_DEF_ENUMERATED.per_constraints; |
| 62 | td->elements = asn_DEF_ENUMERATED.elements; |
| 63 | td->elements_count = asn_DEF_ENUMERATED.elements_count; |
| 64 | /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */ |
| 65 | } |
| 66 | |
| 67 | void |
| 68 | Enum1_free(asn_TYPE_descriptor_t *td, |
| 69 | void *struct_ptr, int contents_only) { |
| 70 | Enum1_1_inherit_TYPE_descriptor(td); |
| 71 | td->free_struct(td, struct_ptr, contents_only); |
| 72 | } |
| 73 | |
| 74 | int |
| 75 | Enum1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 76 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 77 | Enum1_1_inherit_TYPE_descriptor(td); |
| 78 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 79 | } |
| 80 | |
| 81 | asn_dec_rval_t |
| 82 | Enum1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 83 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 84 | Enum1_1_inherit_TYPE_descriptor(td); |
| 85 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 86 | } |
| 87 | |
| 88 | asn_enc_rval_t |
| 89 | Enum1_encode_der(asn_TYPE_descriptor_t *td, |
| 90 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 91 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 92 | Enum1_1_inherit_TYPE_descriptor(td); |
| 93 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 94 | } |
| 95 | |
| 96 | asn_dec_rval_t |
| 97 | Enum1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 98 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 99 | Enum1_1_inherit_TYPE_descriptor(td); |
| 100 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 101 | } |
| 102 | |
| 103 | asn_enc_rval_t |
| 104 | Enum1_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 105 | int ilevel, enum xer_encoder_flags_e flags, |
| 106 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 107 | Enum1_1_inherit_TYPE_descriptor(td); |
| 108 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 109 | } |
| 110 | |
| 111 | |
| 112 | /*** <<< STAT-DEFS [Enum1] >>> ***/ |
| 113 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 114 | static const asn_INTEGER_enum_map_t asn_MAP_Enum1_value2enum_1[] = { |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 115 | { 0, 3, "red" }, |
| 116 | { 1, 5, "green" }, |
| 117 | { 4, 4, "blue" }, |
| 118 | { 5, 5, "alpha" } |
| 119 | /* This list is extensible */ |
| 120 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 121 | static const unsigned int asn_MAP_Enum1_enum2value_1[] = { |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 122 | 3, /* alpha(5) */ |
| 123 | 2, /* blue(4) */ |
| 124 | 1, /* green(1) */ |
| 125 | 0 /* red(0) */ |
| 126 | /* This list is extensible */ |
| 127 | }; |
johvik | e70c407 | 2017-05-09 11:06:12 +0200 | [diff] [blame] | 128 | static asn_INTEGER_specifics_t asn_SPC_Enum1_specs_1 = { |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 129 | asn_MAP_Enum1_value2enum_1, /* "tag" => N; sorted by tag */ |
| 130 | asn_MAP_Enum1_enum2value_1, /* N => "tag"; sorted by N */ |
| 131 | 4, /* Number of elements in the maps */ |
| 132 | 5, /* Extensions before this member */ |
| 133 | 1, /* Strict enumeration */ |
| 134 | 0, /* Native long size */ |
| 135 | 0 |
| 136 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 137 | static const ber_tlv_tag_t asn_DEF_Enum1_tags_1[] = { |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 138 | (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) |
| 139 | }; |
| 140 | asn_TYPE_descriptor_t asn_DEF_Enum1 = { |
| 141 | "Enum1", |
| 142 | "Enum1", |
| 143 | Enum1_free, |
| 144 | Enum1_print, |
| 145 | Enum1_constraint, |
| 146 | Enum1_decode_ber, |
| 147 | Enum1_encode_der, |
| 148 | Enum1_decode_xer, |
| 149 | Enum1_encode_xer, |
| 150 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | a46ab9c | 2017-07-06 07:57:15 -0700 | [diff] [blame] | 151 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 152 | 0, /* Use generic outmost tag fetcher */ |
| 153 | asn_DEF_Enum1_tags_1, |
| 154 | sizeof(asn_DEF_Enum1_tags_1) |
| 155 | /sizeof(asn_DEF_Enum1_tags_1[0]), /* 1 */ |
| 156 | asn_DEF_Enum1_tags_1, /* Same as above */ |
| 157 | sizeof(asn_DEF_Enum1_tags_1) |
| 158 | /sizeof(asn_DEF_Enum1_tags_1[0]), /* 1 */ |
| 159 | 0, /* No PER visible constraints */ |
| 160 | 0, 0, /* Defined elsewhere */ |
| 161 | &asn_SPC_Enum1_specs_1 /* Additional specs */ |
| 162 | }; |
| 163 | |
| 164 | |
| 165 | /*** <<< INCLUDES [Enum2] >>> ***/ |
| 166 | |
| 167 | #include <ENUMERATED.h> |
| 168 | |
| 169 | /*** <<< DEPS [Enum2] >>> ***/ |
| 170 | |
| 171 | typedef enum Enum2 { |
| 172 | Enum2_red = 0, |
| 173 | Enum2_green = 1, |
| 174 | Enum2_blue = 45, |
| 175 | Enum2_orange = 23, |
| 176 | Enum2_alpha = 46, |
| 177 | /* |
| 178 | * Enumeration is extensible |
| 179 | */ |
| 180 | Enum2_beta = 12, |
| 181 | Enum2_gamma = 103 |
| 182 | } e_Enum2; |
| 183 | |
| 184 | /*** <<< TYPE-DECLS [Enum2] >>> ***/ |
| 185 | |
| 186 | typedef ENUMERATED_t Enum2_t; |
| 187 | |
| 188 | /*** <<< FUNC-DECLS [Enum2] >>> ***/ |
| 189 | |
| 190 | extern asn_TYPE_descriptor_t asn_DEF_Enum2; |
| 191 | asn_struct_free_f Enum2_free; |
| 192 | asn_struct_print_f Enum2_print; |
| 193 | asn_constr_check_f Enum2_constraint; |
| 194 | ber_type_decoder_f Enum2_decode_ber; |
| 195 | der_type_encoder_f Enum2_encode_der; |
| 196 | xer_type_decoder_f Enum2_decode_xer; |
| 197 | xer_type_encoder_f Enum2_encode_xer; |
| 198 | |
| 199 | /*** <<< CODE [Enum2] >>> ***/ |
| 200 | |
| 201 | int |
| 202 | Enum2_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 203 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 204 | /* Replace with underlying type checker */ |
| 205 | td->check_constraints = asn_DEF_ENUMERATED.check_constraints; |
| 206 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
| 207 | } |
| 208 | |
| 209 | /* |
| 210 | * This type is implemented using ENUMERATED, |
| 211 | * so here we adjust the DEF accordingly. |
| 212 | */ |
| 213 | static void |
| 214 | Enum2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 215 | td->free_struct = asn_DEF_ENUMERATED.free_struct; |
| 216 | td->print_struct = asn_DEF_ENUMERATED.print_struct; |
Lev Walkin | 6169b8d | 2013-12-07 11:02:44 -0800 | [diff] [blame] | 217 | td->check_constraints = asn_DEF_ENUMERATED.check_constraints; |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 218 | td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder; |
| 219 | td->der_encoder = asn_DEF_ENUMERATED.der_encoder; |
| 220 | td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder; |
| 221 | td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder; |
| 222 | td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder; |
| 223 | td->uper_encoder = asn_DEF_ENUMERATED.uper_encoder; |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame^] | 224 | td->oer_decoder = asn_DEF_ENUMERATED.oer_decoder; |
| 225 | td->oer_encoder = asn_DEF_ENUMERATED.oer_encoder; |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 226 | if(!td->per_constraints) |
| 227 | td->per_constraints = asn_DEF_ENUMERATED.per_constraints; |
| 228 | td->elements = asn_DEF_ENUMERATED.elements; |
| 229 | td->elements_count = asn_DEF_ENUMERATED.elements_count; |
| 230 | /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */ |
| 231 | } |
| 232 | |
| 233 | void |
| 234 | Enum2_free(asn_TYPE_descriptor_t *td, |
| 235 | void *struct_ptr, int contents_only) { |
| 236 | Enum2_1_inherit_TYPE_descriptor(td); |
| 237 | td->free_struct(td, struct_ptr, contents_only); |
| 238 | } |
| 239 | |
| 240 | int |
| 241 | Enum2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 242 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 243 | Enum2_1_inherit_TYPE_descriptor(td); |
| 244 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 245 | } |
| 246 | |
| 247 | asn_dec_rval_t |
| 248 | Enum2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 249 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 250 | Enum2_1_inherit_TYPE_descriptor(td); |
| 251 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 252 | } |
| 253 | |
| 254 | asn_enc_rval_t |
| 255 | Enum2_encode_der(asn_TYPE_descriptor_t *td, |
| 256 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 257 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 258 | Enum2_1_inherit_TYPE_descriptor(td); |
| 259 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 260 | } |
| 261 | |
| 262 | asn_dec_rval_t |
| 263 | Enum2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 264 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 265 | Enum2_1_inherit_TYPE_descriptor(td); |
| 266 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 267 | } |
| 268 | |
| 269 | asn_enc_rval_t |
| 270 | Enum2_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 271 | int ilevel, enum xer_encoder_flags_e flags, |
| 272 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 273 | Enum2_1_inherit_TYPE_descriptor(td); |
| 274 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 275 | } |
| 276 | |
| 277 | |
| 278 | /*** <<< STAT-DEFS [Enum2] >>> ***/ |
| 279 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 280 | static const asn_INTEGER_enum_map_t asn_MAP_Enum2_value2enum_1[] = { |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 281 | { 0, 3, "red" }, |
| 282 | { 1, 5, "green" }, |
| 283 | { 12, 4, "beta" }, |
| 284 | { 23, 6, "orange" }, |
| 285 | { 45, 4, "blue" }, |
| 286 | { 46, 5, "alpha" }, |
| 287 | { 103, 5, "gamma" } |
| 288 | /* This list is extensible */ |
| 289 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 290 | static const unsigned int asn_MAP_Enum2_enum2value_1[] = { |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 291 | 5, /* alpha(46) */ |
| 292 | 2, /* beta(12) */ |
| 293 | 4, /* blue(45) */ |
| 294 | 6, /* gamma(103) */ |
| 295 | 1, /* green(1) */ |
| 296 | 3, /* orange(23) */ |
| 297 | 0 /* red(0) */ |
| 298 | /* This list is extensible */ |
| 299 | }; |
johvik | e70c407 | 2017-05-09 11:06:12 +0200 | [diff] [blame] | 300 | static asn_INTEGER_specifics_t asn_SPC_Enum2_specs_1 = { |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 301 | asn_MAP_Enum2_value2enum_1, /* "tag" => N; sorted by tag */ |
| 302 | asn_MAP_Enum2_enum2value_1, /* N => "tag"; sorted by N */ |
| 303 | 7, /* Number of elements in the maps */ |
| 304 | 6, /* Extensions before this member */ |
| 305 | 1, /* Strict enumeration */ |
| 306 | 0, /* Native long size */ |
| 307 | 0 |
| 308 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 309 | static const ber_tlv_tag_t asn_DEF_Enum2_tags_1[] = { |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 310 | (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) |
| 311 | }; |
| 312 | asn_TYPE_descriptor_t asn_DEF_Enum2 = { |
| 313 | "Enum2", |
| 314 | "Enum2", |
| 315 | Enum2_free, |
| 316 | Enum2_print, |
| 317 | Enum2_constraint, |
| 318 | Enum2_decode_ber, |
| 319 | Enum2_encode_der, |
| 320 | Enum2_decode_xer, |
| 321 | Enum2_encode_xer, |
| 322 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | a46ab9c | 2017-07-06 07:57:15 -0700 | [diff] [blame] | 323 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 324 | 0, /* Use generic outmost tag fetcher */ |
| 325 | asn_DEF_Enum2_tags_1, |
| 326 | sizeof(asn_DEF_Enum2_tags_1) |
| 327 | /sizeof(asn_DEF_Enum2_tags_1[0]), /* 1 */ |
| 328 | asn_DEF_Enum2_tags_1, /* Same as above */ |
| 329 | sizeof(asn_DEF_Enum2_tags_1) |
| 330 | /sizeof(asn_DEF_Enum2_tags_1[0]), /* 1 */ |
| 331 | 0, /* No PER visible constraints */ |
| 332 | 0, 0, /* Defined elsewhere */ |
| 333 | &asn_SPC_Enum2_specs_1 /* Additional specs */ |
| 334 | }; |
| 335 | |
| 336 | |
| 337 | /*** <<< INCLUDES [Enum3] >>> ***/ |
| 338 | |
| 339 | #include <ENUMERATED.h> |
| 340 | |
| 341 | /*** <<< DEPS [Enum3] >>> ***/ |
| 342 | |
| 343 | typedef enum Enum3 { |
| 344 | Enum3_a = 0, |
| 345 | Enum3_b = 3, |
| 346 | /* |
| 347 | * Enumeration is extensible |
| 348 | */ |
| 349 | Enum3_c = 1 |
| 350 | } e_Enum3; |
| 351 | |
| 352 | /*** <<< TYPE-DECLS [Enum3] >>> ***/ |
| 353 | |
| 354 | typedef ENUMERATED_t Enum3_t; |
| 355 | |
| 356 | /*** <<< FUNC-DECLS [Enum3] >>> ***/ |
| 357 | |
| 358 | extern asn_TYPE_descriptor_t asn_DEF_Enum3; |
| 359 | asn_struct_free_f Enum3_free; |
| 360 | asn_struct_print_f Enum3_print; |
| 361 | asn_constr_check_f Enum3_constraint; |
| 362 | ber_type_decoder_f Enum3_decode_ber; |
| 363 | der_type_encoder_f Enum3_encode_der; |
| 364 | xer_type_decoder_f Enum3_decode_xer; |
| 365 | xer_type_encoder_f Enum3_encode_xer; |
| 366 | |
| 367 | /*** <<< CODE [Enum3] >>> ***/ |
| 368 | |
| 369 | int |
| 370 | Enum3_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 371 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 372 | /* Replace with underlying type checker */ |
| 373 | td->check_constraints = asn_DEF_ENUMERATED.check_constraints; |
| 374 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
| 375 | } |
| 376 | |
| 377 | /* |
| 378 | * This type is implemented using ENUMERATED, |
| 379 | * so here we adjust the DEF accordingly. |
| 380 | */ |
| 381 | static void |
| 382 | Enum3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 383 | td->free_struct = asn_DEF_ENUMERATED.free_struct; |
| 384 | td->print_struct = asn_DEF_ENUMERATED.print_struct; |
Lev Walkin | 6169b8d | 2013-12-07 11:02:44 -0800 | [diff] [blame] | 385 | td->check_constraints = asn_DEF_ENUMERATED.check_constraints; |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 386 | td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder; |
| 387 | td->der_encoder = asn_DEF_ENUMERATED.der_encoder; |
| 388 | td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder; |
| 389 | td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder; |
| 390 | td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder; |
| 391 | td->uper_encoder = asn_DEF_ENUMERATED.uper_encoder; |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame^] | 392 | td->oer_decoder = asn_DEF_ENUMERATED.oer_decoder; |
| 393 | td->oer_encoder = asn_DEF_ENUMERATED.oer_encoder; |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 394 | if(!td->per_constraints) |
| 395 | td->per_constraints = asn_DEF_ENUMERATED.per_constraints; |
| 396 | td->elements = asn_DEF_ENUMERATED.elements; |
| 397 | td->elements_count = asn_DEF_ENUMERATED.elements_count; |
| 398 | /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */ |
| 399 | } |
| 400 | |
| 401 | void |
| 402 | Enum3_free(asn_TYPE_descriptor_t *td, |
| 403 | void *struct_ptr, int contents_only) { |
| 404 | Enum3_1_inherit_TYPE_descriptor(td); |
| 405 | td->free_struct(td, struct_ptr, contents_only); |
| 406 | } |
| 407 | |
| 408 | int |
| 409 | Enum3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 410 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 411 | Enum3_1_inherit_TYPE_descriptor(td); |
| 412 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 413 | } |
| 414 | |
| 415 | asn_dec_rval_t |
| 416 | Enum3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 417 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 418 | Enum3_1_inherit_TYPE_descriptor(td); |
| 419 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 420 | } |
| 421 | |
| 422 | asn_enc_rval_t |
| 423 | Enum3_encode_der(asn_TYPE_descriptor_t *td, |
| 424 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 425 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 426 | Enum3_1_inherit_TYPE_descriptor(td); |
| 427 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 428 | } |
| 429 | |
| 430 | asn_dec_rval_t |
| 431 | Enum3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 432 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 433 | Enum3_1_inherit_TYPE_descriptor(td); |
| 434 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 435 | } |
| 436 | |
| 437 | asn_enc_rval_t |
| 438 | Enum3_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 439 | int ilevel, enum xer_encoder_flags_e flags, |
| 440 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 441 | Enum3_1_inherit_TYPE_descriptor(td); |
| 442 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 443 | } |
| 444 | |
| 445 | |
| 446 | /*** <<< STAT-DEFS [Enum3] >>> ***/ |
| 447 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 448 | static const asn_INTEGER_enum_map_t asn_MAP_Enum3_value2enum_1[] = { |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 449 | { 0, 1, "a" }, |
| 450 | { 1, 1, "c" }, |
| 451 | { 3, 1, "b" } |
| 452 | /* This list is extensible */ |
| 453 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 454 | static const unsigned int asn_MAP_Enum3_enum2value_1[] = { |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 455 | 0, /* a(0) */ |
| 456 | 2, /* b(3) */ |
| 457 | 1 /* c(1) */ |
| 458 | /* This list is extensible */ |
| 459 | }; |
johvik | e70c407 | 2017-05-09 11:06:12 +0200 | [diff] [blame] | 460 | static asn_INTEGER_specifics_t asn_SPC_Enum3_specs_1 = { |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 461 | asn_MAP_Enum3_value2enum_1, /* "tag" => N; sorted by tag */ |
| 462 | asn_MAP_Enum3_enum2value_1, /* N => "tag"; sorted by N */ |
| 463 | 3, /* Number of elements in the maps */ |
| 464 | 3, /* Extensions before this member */ |
| 465 | 1, /* Strict enumeration */ |
| 466 | 0, /* Native long size */ |
| 467 | 0 |
| 468 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 469 | static const ber_tlv_tag_t asn_DEF_Enum3_tags_1[] = { |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 470 | (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) |
| 471 | }; |
| 472 | asn_TYPE_descriptor_t asn_DEF_Enum3 = { |
| 473 | "Enum3", |
| 474 | "Enum3", |
| 475 | Enum3_free, |
| 476 | Enum3_print, |
| 477 | Enum3_constraint, |
| 478 | Enum3_decode_ber, |
| 479 | Enum3_encode_der, |
| 480 | Enum3_decode_xer, |
| 481 | Enum3_encode_xer, |
| 482 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | a46ab9c | 2017-07-06 07:57:15 -0700 | [diff] [blame] | 483 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 484 | 0, /* Use generic outmost tag fetcher */ |
| 485 | asn_DEF_Enum3_tags_1, |
| 486 | sizeof(asn_DEF_Enum3_tags_1) |
| 487 | /sizeof(asn_DEF_Enum3_tags_1[0]), /* 1 */ |
| 488 | asn_DEF_Enum3_tags_1, /* Same as above */ |
| 489 | sizeof(asn_DEF_Enum3_tags_1) |
| 490 | /sizeof(asn_DEF_Enum3_tags_1[0]), /* 1 */ |
| 491 | 0, /* No PER visible constraints */ |
| 492 | 0, 0, /* Defined elsewhere */ |
| 493 | &asn_SPC_Enum3_specs_1 /* Additional specs */ |
| 494 | }; |
| 495 | |
| 496 | |
| 497 | /*** <<< INCLUDES [Enum4] >>> ***/ |
| 498 | |
| 499 | #include <ENUMERATED.h> |
| 500 | |
| 501 | /*** <<< DEPS [Enum4] >>> ***/ |
| 502 | |
| 503 | typedef enum Enum4 { |
| 504 | Enum4_a = 0, |
| 505 | Enum4_b = 1, |
| 506 | /* |
| 507 | * Enumeration is extensible |
| 508 | */ |
| 509 | Enum4_c = 3, |
| 510 | Enum4_d = 4 |
| 511 | } e_Enum4; |
| 512 | |
| 513 | /*** <<< TYPE-DECLS [Enum4] >>> ***/ |
| 514 | |
| 515 | typedef ENUMERATED_t Enum4_t; |
| 516 | |
| 517 | /*** <<< FUNC-DECLS [Enum4] >>> ***/ |
| 518 | |
| 519 | extern asn_TYPE_descriptor_t asn_DEF_Enum4; |
| 520 | asn_struct_free_f Enum4_free; |
| 521 | asn_struct_print_f Enum4_print; |
| 522 | asn_constr_check_f Enum4_constraint; |
| 523 | ber_type_decoder_f Enum4_decode_ber; |
| 524 | der_type_encoder_f Enum4_encode_der; |
| 525 | xer_type_decoder_f Enum4_decode_xer; |
| 526 | xer_type_encoder_f Enum4_encode_xer; |
| 527 | |
| 528 | /*** <<< CODE [Enum4] >>> ***/ |
| 529 | |
| 530 | int |
| 531 | Enum4_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 532 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 533 | /* Replace with underlying type checker */ |
| 534 | td->check_constraints = asn_DEF_ENUMERATED.check_constraints; |
| 535 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
| 536 | } |
| 537 | |
| 538 | /* |
| 539 | * This type is implemented using ENUMERATED, |
| 540 | * so here we adjust the DEF accordingly. |
| 541 | */ |
| 542 | static void |
| 543 | Enum4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 544 | td->free_struct = asn_DEF_ENUMERATED.free_struct; |
| 545 | td->print_struct = asn_DEF_ENUMERATED.print_struct; |
Lev Walkin | 6169b8d | 2013-12-07 11:02:44 -0800 | [diff] [blame] | 546 | td->check_constraints = asn_DEF_ENUMERATED.check_constraints; |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 547 | td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder; |
| 548 | td->der_encoder = asn_DEF_ENUMERATED.der_encoder; |
| 549 | td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder; |
| 550 | td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder; |
| 551 | td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder; |
| 552 | td->uper_encoder = asn_DEF_ENUMERATED.uper_encoder; |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame^] | 553 | td->oer_decoder = asn_DEF_ENUMERATED.oer_decoder; |
| 554 | td->oer_encoder = asn_DEF_ENUMERATED.oer_encoder; |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 555 | if(!td->per_constraints) |
| 556 | td->per_constraints = asn_DEF_ENUMERATED.per_constraints; |
| 557 | td->elements = asn_DEF_ENUMERATED.elements; |
| 558 | td->elements_count = asn_DEF_ENUMERATED.elements_count; |
| 559 | /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */ |
| 560 | } |
| 561 | |
| 562 | void |
| 563 | Enum4_free(asn_TYPE_descriptor_t *td, |
| 564 | void *struct_ptr, int contents_only) { |
| 565 | Enum4_1_inherit_TYPE_descriptor(td); |
| 566 | td->free_struct(td, struct_ptr, contents_only); |
| 567 | } |
| 568 | |
| 569 | int |
| 570 | Enum4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 571 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 572 | Enum4_1_inherit_TYPE_descriptor(td); |
| 573 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 574 | } |
| 575 | |
| 576 | asn_dec_rval_t |
| 577 | Enum4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 578 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 579 | Enum4_1_inherit_TYPE_descriptor(td); |
| 580 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 581 | } |
| 582 | |
| 583 | asn_enc_rval_t |
| 584 | Enum4_encode_der(asn_TYPE_descriptor_t *td, |
| 585 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 586 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 587 | Enum4_1_inherit_TYPE_descriptor(td); |
| 588 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 589 | } |
| 590 | |
| 591 | asn_dec_rval_t |
| 592 | Enum4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 593 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 594 | Enum4_1_inherit_TYPE_descriptor(td); |
| 595 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 596 | } |
| 597 | |
| 598 | asn_enc_rval_t |
| 599 | Enum4_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 600 | int ilevel, enum xer_encoder_flags_e flags, |
| 601 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 602 | Enum4_1_inherit_TYPE_descriptor(td); |
| 603 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 604 | } |
| 605 | |
| 606 | |
| 607 | /*** <<< STAT-DEFS [Enum4] >>> ***/ |
| 608 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 609 | static const asn_INTEGER_enum_map_t asn_MAP_Enum4_value2enum_1[] = { |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 610 | { 0, 1, "a" }, |
| 611 | { 1, 1, "b" }, |
| 612 | { 3, 1, "c" }, |
| 613 | { 4, 1, "d" } |
| 614 | /* This list is extensible */ |
| 615 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 616 | static const unsigned int asn_MAP_Enum4_enum2value_1[] = { |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 617 | 0, /* a(0) */ |
| 618 | 1, /* b(1) */ |
| 619 | 2, /* c(3) */ |
| 620 | 3 /* d(4) */ |
| 621 | /* This list is extensible */ |
| 622 | }; |
johvik | e70c407 | 2017-05-09 11:06:12 +0200 | [diff] [blame] | 623 | static asn_INTEGER_specifics_t asn_SPC_Enum4_specs_1 = { |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 624 | asn_MAP_Enum4_value2enum_1, /* "tag" => N; sorted by tag */ |
| 625 | asn_MAP_Enum4_enum2value_1, /* N => "tag"; sorted by N */ |
| 626 | 4, /* Number of elements in the maps */ |
| 627 | 3, /* Extensions before this member */ |
| 628 | 1, /* Strict enumeration */ |
| 629 | 0, /* Native long size */ |
| 630 | 0 |
| 631 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 632 | static const ber_tlv_tag_t asn_DEF_Enum4_tags_1[] = { |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 633 | (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) |
| 634 | }; |
| 635 | asn_TYPE_descriptor_t asn_DEF_Enum4 = { |
| 636 | "Enum4", |
| 637 | "Enum4", |
| 638 | Enum4_free, |
| 639 | Enum4_print, |
| 640 | Enum4_constraint, |
| 641 | Enum4_decode_ber, |
| 642 | Enum4_encode_der, |
| 643 | Enum4_decode_xer, |
| 644 | Enum4_encode_xer, |
| 645 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | a46ab9c | 2017-07-06 07:57:15 -0700 | [diff] [blame] | 646 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 647 | 0, /* Use generic outmost tag fetcher */ |
| 648 | asn_DEF_Enum4_tags_1, |
| 649 | sizeof(asn_DEF_Enum4_tags_1) |
| 650 | /sizeof(asn_DEF_Enum4_tags_1[0]), /* 1 */ |
| 651 | asn_DEF_Enum4_tags_1, /* Same as above */ |
| 652 | sizeof(asn_DEF_Enum4_tags_1) |
| 653 | /sizeof(asn_DEF_Enum4_tags_1[0]), /* 1 */ |
| 654 | 0, /* No PER visible constraints */ |
| 655 | 0, 0, /* Defined elsewhere */ |
| 656 | &asn_SPC_Enum4_specs_1 /* Additional specs */ |
| 657 | }; |
| 658 | |
| 659 | |
| 660 | /*** <<< INCLUDES [Enum5] >>> ***/ |
| 661 | |
| 662 | #include <ENUMERATED.h> |
| 663 | |
| 664 | /*** <<< DEPS [Enum5] >>> ***/ |
| 665 | |
| 666 | typedef enum Enum5 { |
| 667 | Enum5_a = 0, |
| 668 | Enum5_z = 25, |
| 669 | /* |
| 670 | * Enumeration is extensible |
| 671 | */ |
| 672 | Enum5_d = 26 |
| 673 | } e_Enum5; |
| 674 | |
| 675 | /*** <<< TYPE-DECLS [Enum5] >>> ***/ |
| 676 | |
| 677 | typedef ENUMERATED_t Enum5_t; |
| 678 | |
| 679 | /*** <<< FUNC-DECLS [Enum5] >>> ***/ |
| 680 | |
| 681 | extern asn_TYPE_descriptor_t asn_DEF_Enum5; |
| 682 | asn_struct_free_f Enum5_free; |
| 683 | asn_struct_print_f Enum5_print; |
| 684 | asn_constr_check_f Enum5_constraint; |
| 685 | ber_type_decoder_f Enum5_decode_ber; |
| 686 | der_type_encoder_f Enum5_encode_der; |
| 687 | xer_type_decoder_f Enum5_decode_xer; |
| 688 | xer_type_encoder_f Enum5_encode_xer; |
| 689 | |
| 690 | /*** <<< CODE [Enum5] >>> ***/ |
| 691 | |
| 692 | int |
| 693 | Enum5_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 694 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 695 | /* Replace with underlying type checker */ |
| 696 | td->check_constraints = asn_DEF_ENUMERATED.check_constraints; |
| 697 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
| 698 | } |
| 699 | |
| 700 | /* |
| 701 | * This type is implemented using ENUMERATED, |
| 702 | * so here we adjust the DEF accordingly. |
| 703 | */ |
| 704 | static void |
| 705 | Enum5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 706 | td->free_struct = asn_DEF_ENUMERATED.free_struct; |
| 707 | td->print_struct = asn_DEF_ENUMERATED.print_struct; |
Lev Walkin | 6169b8d | 2013-12-07 11:02:44 -0800 | [diff] [blame] | 708 | td->check_constraints = asn_DEF_ENUMERATED.check_constraints; |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 709 | td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder; |
| 710 | td->der_encoder = asn_DEF_ENUMERATED.der_encoder; |
| 711 | td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder; |
| 712 | td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder; |
| 713 | td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder; |
| 714 | td->uper_encoder = asn_DEF_ENUMERATED.uper_encoder; |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame^] | 715 | td->oer_decoder = asn_DEF_ENUMERATED.oer_decoder; |
| 716 | td->oer_encoder = asn_DEF_ENUMERATED.oer_encoder; |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 717 | if(!td->per_constraints) |
| 718 | td->per_constraints = asn_DEF_ENUMERATED.per_constraints; |
| 719 | td->elements = asn_DEF_ENUMERATED.elements; |
| 720 | td->elements_count = asn_DEF_ENUMERATED.elements_count; |
| 721 | /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */ |
| 722 | } |
| 723 | |
| 724 | void |
| 725 | Enum5_free(asn_TYPE_descriptor_t *td, |
| 726 | void *struct_ptr, int contents_only) { |
| 727 | Enum5_1_inherit_TYPE_descriptor(td); |
| 728 | td->free_struct(td, struct_ptr, contents_only); |
| 729 | } |
| 730 | |
| 731 | int |
| 732 | Enum5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 733 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 734 | Enum5_1_inherit_TYPE_descriptor(td); |
| 735 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 736 | } |
| 737 | |
| 738 | asn_dec_rval_t |
| 739 | Enum5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 740 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 741 | Enum5_1_inherit_TYPE_descriptor(td); |
| 742 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 743 | } |
| 744 | |
| 745 | asn_enc_rval_t |
| 746 | Enum5_encode_der(asn_TYPE_descriptor_t *td, |
| 747 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 748 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 749 | Enum5_1_inherit_TYPE_descriptor(td); |
| 750 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 751 | } |
| 752 | |
| 753 | asn_dec_rval_t |
| 754 | Enum5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 755 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 756 | Enum5_1_inherit_TYPE_descriptor(td); |
| 757 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 758 | } |
| 759 | |
| 760 | asn_enc_rval_t |
| 761 | Enum5_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 762 | int ilevel, enum xer_encoder_flags_e flags, |
| 763 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 764 | Enum5_1_inherit_TYPE_descriptor(td); |
| 765 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 766 | } |
| 767 | |
| 768 | |
| 769 | /*** <<< STAT-DEFS [Enum5] >>> ***/ |
| 770 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 771 | static const asn_INTEGER_enum_map_t asn_MAP_Enum5_value2enum_1[] = { |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 772 | { 0, 1, "a" }, |
| 773 | { 25, 1, "z" }, |
| 774 | { 26, 1, "d" } |
| 775 | /* This list is extensible */ |
| 776 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 777 | static const unsigned int asn_MAP_Enum5_enum2value_1[] = { |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 778 | 0, /* a(0) */ |
| 779 | 2, /* d(26) */ |
| 780 | 1 /* z(25) */ |
| 781 | /* This list is extensible */ |
| 782 | }; |
johvik | e70c407 | 2017-05-09 11:06:12 +0200 | [diff] [blame] | 783 | static asn_INTEGER_specifics_t asn_SPC_Enum5_specs_1 = { |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 784 | asn_MAP_Enum5_value2enum_1, /* "tag" => N; sorted by tag */ |
| 785 | asn_MAP_Enum5_enum2value_1, /* N => "tag"; sorted by N */ |
| 786 | 3, /* Number of elements in the maps */ |
| 787 | 3, /* Extensions before this member */ |
| 788 | 1, /* Strict enumeration */ |
| 789 | 0, /* Native long size */ |
| 790 | 0 |
| 791 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 792 | static const ber_tlv_tag_t asn_DEF_Enum5_tags_1[] = { |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 793 | (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) |
| 794 | }; |
| 795 | asn_TYPE_descriptor_t asn_DEF_Enum5 = { |
| 796 | "Enum5", |
| 797 | "Enum5", |
| 798 | Enum5_free, |
| 799 | Enum5_print, |
| 800 | Enum5_constraint, |
| 801 | Enum5_decode_ber, |
| 802 | Enum5_encode_der, |
| 803 | Enum5_decode_xer, |
| 804 | Enum5_encode_xer, |
| 805 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | a46ab9c | 2017-07-06 07:57:15 -0700 | [diff] [blame] | 806 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | ffe79f4 | 2010-10-25 00:10:34 -0700 | [diff] [blame] | 807 | 0, /* Use generic outmost tag fetcher */ |
| 808 | asn_DEF_Enum5_tags_1, |
| 809 | sizeof(asn_DEF_Enum5_tags_1) |
| 810 | /sizeof(asn_DEF_Enum5_tags_1[0]), /* 1 */ |
| 811 | asn_DEF_Enum5_tags_1, /* Same as above */ |
| 812 | sizeof(asn_DEF_Enum5_tags_1) |
| 813 | /sizeof(asn_DEF_Enum5_tags_1[0]), /* 1 */ |
| 814 | 0, /* No PER visible constraints */ |
| 815 | 0, 0, /* Defined elsewhere */ |
| 816 | &asn_SPC_Enum5_specs_1 /* Additional specs */ |
| 817 | }; |
| 818 | |