vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [Type] >>> ***/ |
| 3 | |
| 4 | #include <asn_SEQUENCE_OF.h> |
| 5 | #include <constr_SEQUENCE_OF.h> |
| 6 | #include <constr_SEQUENCE.h> |
| 7 | |
| 8 | /*** <<< FWD-DECLS [Type] >>> ***/ |
| 9 | |
vlm | 5feb752 | 2005-03-04 23:50:56 +0000 | [diff] [blame] | 10 | struct Epyt; |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 11 | |
| 12 | /*** <<< TYPE-DECLS [Type] >>> ***/ |
| 13 | |
| 14 | typedef struct Type { |
| 15 | struct data { |
| 16 | A_SEQUENCE_OF(struct Epyt) list; |
| 17 | |
| 18 | /* Context for parsing across buffer boundaries */ |
| 19 | asn_struct_ctx_t _asn_ctx; |
| 20 | } data; |
| 21 | |
| 22 | /* Context for parsing across buffer boundaries */ |
| 23 | asn_struct_ctx_t _asn_ctx; |
| 24 | } Type_t; |
| 25 | |
| 26 | /*** <<< FUNC-DECLS [Type] >>> ***/ |
| 27 | |
| 28 | extern asn_TYPE_descriptor_t asn_DEF_Type; |
| 29 | |
| 30 | /*** <<< POST-INCLUDE [Type] >>> ***/ |
| 31 | |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 32 | #include <EpytRef.h> |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 33 | |
| 34 | /*** <<< STAT-DEFS [Type] >>> ***/ |
| 35 | |
| 36 | static asn_TYPE_member_t asn_MBR_data_2[] = { |
vlm | 2cebdf3 | 2005-08-16 16:57:17 +0000 | [diff] [blame] | 37 | { ATF_POINTER, 0, 0, |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 38 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 39 | .tag_mode = 0, |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 40 | .type = (void *)&asn_DEF_EpytRef, |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 41 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 42 | .name = "" |
| 43 | }, |
| 44 | }; |
| 45 | static ber_tlv_tag_t asn_DEF_data_2_tags[] = { |
| 46 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 47 | }; |
| 48 | static asn_SET_OF_specifics_t asn_SPC_data_2_specs = { |
| 49 | sizeof(struct data), |
| 50 | offsetof(struct data, _asn_ctx), |
| 51 | 0, /* XER encoding is XMLDelimitedItemList */ |
| 52 | }; |
| 53 | static /* Use -fall-defs-global to expose */ |
| 54 | asn_TYPE_descriptor_t asn_DEF_data_2 = { |
| 55 | "data", |
| 56 | "data", |
| 57 | SEQUENCE_OF_free, |
| 58 | SEQUENCE_OF_print, |
| 59 | SEQUENCE_OF_constraint, |
| 60 | SEQUENCE_OF_decode_ber, |
| 61 | SEQUENCE_OF_encode_der, |
| 62 | SEQUENCE_OF_decode_xer, |
| 63 | SEQUENCE_OF_encode_xer, |
| 64 | 0, /* Use generic outmost tag fetcher */ |
| 65 | asn_DEF_data_2_tags, |
| 66 | sizeof(asn_DEF_data_2_tags) |
| 67 | /sizeof(asn_DEF_data_2_tags[0]), /* 1 */ |
| 68 | asn_DEF_data_2_tags, /* Same as above */ |
| 69 | sizeof(asn_DEF_data_2_tags) |
| 70 | /sizeof(asn_DEF_data_2_tags[0]), /* 1 */ |
| 71 | asn_MBR_data_2, |
| 72 | 1, /* Single element */ |
| 73 | &asn_SPC_data_2_specs /* Additional specs */ |
| 74 | }; |
| 75 | |
| 76 | static asn_TYPE_member_t asn_MBR_Type_1[] = { |
| 77 | { ATF_NOFLAGS, 0, offsetof(struct Type, data), |
| 78 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 79 | .tag_mode = 0, |
| 80 | .type = (void *)&asn_DEF_data_2, |
| 81 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 82 | .name = "data" |
| 83 | }, |
| 84 | }; |
| 85 | static ber_tlv_tag_t asn_DEF_Type_1_tags[] = { |
| 86 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 87 | }; |
| 88 | static asn_TYPE_tag2member_t asn_MAP_Type_1_tag2el[] = { |
| 89 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* data at 16 */ |
| 90 | }; |
| 91 | static asn_SEQUENCE_specifics_t asn_SPC_Type_1_specs = { |
| 92 | sizeof(struct Type), |
| 93 | offsetof(struct Type, _asn_ctx), |
| 94 | asn_MAP_Type_1_tag2el, |
| 95 | 1, /* Count of tags in the map */ |
| 96 | -1, /* Start extensions */ |
| 97 | -1 /* Stop extensions */ |
| 98 | }; |
| 99 | asn_TYPE_descriptor_t asn_DEF_Type = { |
| 100 | "Type", |
| 101 | "Type", |
| 102 | SEQUENCE_free, |
| 103 | SEQUENCE_print, |
| 104 | SEQUENCE_constraint, |
| 105 | SEQUENCE_decode_ber, |
| 106 | SEQUENCE_encode_der, |
| 107 | SEQUENCE_decode_xer, |
| 108 | SEQUENCE_encode_xer, |
| 109 | 0, /* Use generic outmost tag fetcher */ |
| 110 | asn_DEF_Type_1_tags, |
| 111 | sizeof(asn_DEF_Type_1_tags) |
| 112 | /sizeof(asn_DEF_Type_1_tags[0]), /* 1 */ |
| 113 | asn_DEF_Type_1_tags, /* Same as above */ |
| 114 | sizeof(asn_DEF_Type_1_tags) |
| 115 | /sizeof(asn_DEF_Type_1_tags[0]), /* 1 */ |
| 116 | asn_MBR_Type_1, |
| 117 | 1, /* Elements count */ |
| 118 | &asn_SPC_Type_1_specs /* Additional specs */ |
| 119 | }; |
| 120 | |
| 121 | |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 122 | /*** <<< INCLUDES [EpytRef] >>> ***/ |
| 123 | |
| 124 | #include <Epyt.h> |
| 125 | |
| 126 | /*** <<< TYPE-DECLS [EpytRef] >>> ***/ |
| 127 | |
| 128 | typedef Epyt_t EpytRef_t; |
| 129 | |
| 130 | /*** <<< FUNC-DECLS [EpytRef] >>> ***/ |
| 131 | |
| 132 | extern asn_TYPE_descriptor_t asn_DEF_EpytRef; |
| 133 | asn_struct_free_f EpytRef_free; |
| 134 | asn_struct_print_f EpytRef_print; |
| 135 | asn_constr_check_f EpytRef_constraint; |
| 136 | ber_type_decoder_f EpytRef_decode_ber; |
| 137 | der_type_encoder_f EpytRef_encode_der; |
| 138 | xer_type_decoder_f EpytRef_decode_xer; |
| 139 | xer_type_encoder_f EpytRef_encode_xer; |
| 140 | |
| 141 | /*** <<< CODE [EpytRef] >>> ***/ |
| 142 | |
| 143 | int |
| 144 | EpytRef_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 145 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 146 | /* Replace with underlying type checker */ |
| 147 | td->check_constraints = asn_DEF_Epyt.check_constraints; |
| 148 | return td->check_constraints(td, sptr, app_errlog, app_key); |
| 149 | } |
| 150 | |
| 151 | /* |
| 152 | * This type is implemented using Epyt, |
| 153 | * so here we adjust the DEF accordingly. |
| 154 | */ |
| 155 | static void |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 156 | EpytRef_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 157 | td->free_struct = asn_DEF_Epyt.free_struct; |
| 158 | td->print_struct = asn_DEF_Epyt.print_struct; |
| 159 | td->ber_decoder = asn_DEF_Epyt.ber_decoder; |
| 160 | td->der_encoder = asn_DEF_Epyt.der_encoder; |
| 161 | td->xer_decoder = asn_DEF_Epyt.xer_decoder; |
| 162 | td->xer_encoder = asn_DEF_Epyt.xer_encoder; |
| 163 | td->elements = asn_DEF_Epyt.elements; |
| 164 | td->elements_count = asn_DEF_Epyt.elements_count; |
| 165 | td->specifics = asn_DEF_Epyt.specifics; |
| 166 | } |
| 167 | |
| 168 | void |
| 169 | EpytRef_free(asn_TYPE_descriptor_t *td, |
| 170 | void *struct_ptr, int contents_only) { |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 171 | EpytRef_1_inherit_TYPE_descriptor(td); |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 172 | td->free_struct(td, struct_ptr, contents_only); |
| 173 | } |
| 174 | |
| 175 | int |
| 176 | EpytRef_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 177 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 178 | EpytRef_1_inherit_TYPE_descriptor(td); |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 179 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 180 | } |
| 181 | |
| 182 | asn_dec_rval_t |
| 183 | EpytRef_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
vlm | c04faea | 2005-03-17 21:57:19 +0000 | [diff] [blame] | 184 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 185 | EpytRef_1_inherit_TYPE_descriptor(td); |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 186 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 187 | } |
| 188 | |
| 189 | asn_enc_rval_t |
| 190 | EpytRef_encode_der(asn_TYPE_descriptor_t *td, |
| 191 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 192 | asn_app_consume_bytes_f *cb, void *app_key) { |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 193 | EpytRef_1_inherit_TYPE_descriptor(td); |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 194 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 195 | } |
| 196 | |
| 197 | asn_dec_rval_t |
| 198 | EpytRef_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
vlm | c04faea | 2005-03-17 21:57:19 +0000 | [diff] [blame] | 199 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 200 | EpytRef_1_inherit_TYPE_descriptor(td); |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 201 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 202 | } |
| 203 | |
| 204 | asn_enc_rval_t |
| 205 | EpytRef_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 206 | int ilevel, enum xer_encoder_flags_e flags, |
| 207 | asn_app_consume_bytes_f *cb, void *app_key) { |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 208 | EpytRef_1_inherit_TYPE_descriptor(td); |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 209 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 210 | } |
| 211 | |
| 212 | |
| 213 | /*** <<< STAT-DEFS [EpytRef] >>> ***/ |
| 214 | |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 215 | static ber_tlv_tag_t asn_DEF_EpytRef_1_tags[] = { |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 216 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 217 | }; |
| 218 | asn_TYPE_descriptor_t asn_DEF_EpytRef = { |
| 219 | "EpytRef", |
| 220 | "EpytRef", |
| 221 | EpytRef_free, |
| 222 | EpytRef_print, |
| 223 | EpytRef_constraint, |
| 224 | EpytRef_decode_ber, |
| 225 | EpytRef_encode_der, |
| 226 | EpytRef_decode_xer, |
| 227 | EpytRef_encode_xer, |
| 228 | 0, /* Use generic outmost tag fetcher */ |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 229 | asn_DEF_EpytRef_1_tags, |
| 230 | sizeof(asn_DEF_EpytRef_1_tags) |
| 231 | /sizeof(asn_DEF_EpytRef_1_tags[0]), /* 1 */ |
| 232 | asn_DEF_EpytRef_1_tags, /* Same as above */ |
| 233 | sizeof(asn_DEF_EpytRef_1_tags) |
| 234 | /sizeof(asn_DEF_EpytRef_1_tags[0]), /* 1 */ |
vlm | 1f7df78 | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 235 | 0, 0, /* Defined elsewhere */ |
| 236 | 0 /* No specifics */ |
| 237 | }; |
| 238 | |
| 239 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 240 | /*** <<< INCLUDES [Epyt] >>> ***/ |
| 241 | |
| 242 | #include <asn_SET_OF.h> |
| 243 | #include <constr_SET_OF.h> |
| 244 | #include <constr_SEQUENCE.h> |
| 245 | |
| 246 | /*** <<< FWD-DECLS [Epyt] >>> ***/ |
| 247 | |
vlm | 5feb752 | 2005-03-04 23:50:56 +0000 | [diff] [blame] | 248 | struct Type; |
| 249 | struct Ypet; |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 250 | |
| 251 | /*** <<< TYPE-DECLS [Epyt] >>> ***/ |
| 252 | |
| 253 | typedef struct Epyt { |
| 254 | struct stype { |
| 255 | A_SET_OF(struct Type) list; |
| 256 | |
| 257 | /* Context for parsing across buffer boundaries */ |
| 258 | asn_struct_ctx_t _asn_ctx; |
| 259 | } stype; |
| 260 | struct Type *type /* OPTIONAL */; |
| 261 | struct Ypet *ypet /* OPTIONAL */; |
| 262 | |
| 263 | /* Context for parsing across buffer boundaries */ |
| 264 | asn_struct_ctx_t _asn_ctx; |
| 265 | } Epyt_t; |
| 266 | |
| 267 | /*** <<< FUNC-DECLS [Epyt] >>> ***/ |
| 268 | |
| 269 | extern asn_TYPE_descriptor_t asn_DEF_Epyt; |
| 270 | |
| 271 | /*** <<< POST-INCLUDE [Epyt] >>> ***/ |
| 272 | |
| 273 | #include <Type.h> |
| 274 | #include <Ypet.h> |
| 275 | |
| 276 | /*** <<< STAT-DEFS [Epyt] >>> ***/ |
| 277 | |
| 278 | static asn_TYPE_member_t asn_MBR_stype_2[] = { |
vlm | 2cebdf3 | 2005-08-16 16:57:17 +0000 | [diff] [blame] | 279 | { ATF_POINTER, 0, 0, |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 280 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 281 | .tag_mode = 0, |
| 282 | .type = (void *)&asn_DEF_Type, |
| 283 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 284 | .name = "" |
| 285 | }, |
| 286 | }; |
| 287 | static ber_tlv_tag_t asn_DEF_stype_2_tags[] = { |
| 288 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 289 | }; |
| 290 | static asn_SET_OF_specifics_t asn_SPC_stype_2_specs = { |
| 291 | sizeof(struct stype), |
| 292 | offsetof(struct stype, _asn_ctx), |
| 293 | 0, /* XER encoding is XMLDelimitedItemList */ |
| 294 | }; |
| 295 | static /* Use -fall-defs-global to expose */ |
| 296 | asn_TYPE_descriptor_t asn_DEF_stype_2 = { |
| 297 | "stype", |
| 298 | "stype", |
| 299 | SET_OF_free, |
| 300 | SET_OF_print, |
| 301 | SET_OF_constraint, |
| 302 | SET_OF_decode_ber, |
| 303 | SET_OF_encode_der, |
| 304 | SET_OF_decode_xer, |
| 305 | SET_OF_encode_xer, |
| 306 | 0, /* Use generic outmost tag fetcher */ |
| 307 | asn_DEF_stype_2_tags, |
| 308 | sizeof(asn_DEF_stype_2_tags) |
| 309 | /sizeof(asn_DEF_stype_2_tags[0]), /* 1 */ |
| 310 | asn_DEF_stype_2_tags, /* Same as above */ |
| 311 | sizeof(asn_DEF_stype_2_tags) |
| 312 | /sizeof(asn_DEF_stype_2_tags[0]), /* 1 */ |
| 313 | asn_MBR_stype_2, |
| 314 | 1, /* Single element */ |
| 315 | &asn_SPC_stype_2_specs /* Additional specs */ |
| 316 | }; |
| 317 | |
| 318 | static asn_TYPE_member_t asn_MBR_Epyt_1[] = { |
| 319 | { ATF_NOFLAGS, 0, offsetof(struct Epyt, stype), |
| 320 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), |
| 321 | .tag_mode = 0, |
| 322 | .type = (void *)&asn_DEF_stype_2, |
| 323 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 324 | .name = "stype" |
| 325 | }, |
| 326 | { ATF_POINTER, 2, offsetof(struct Epyt, type), |
| 327 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 328 | .tag_mode = 0, |
| 329 | .type = (void *)&asn_DEF_Type, |
| 330 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 331 | .name = "type" |
| 332 | }, |
| 333 | { ATF_POINTER, 1, offsetof(struct Epyt, ypet), |
| 334 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), |
| 335 | .tag_mode = 0, |
| 336 | .type = (void *)&asn_DEF_Ypet, |
| 337 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 338 | .name = "ypet" |
| 339 | }, |
| 340 | }; |
| 341 | static ber_tlv_tag_t asn_DEF_Epyt_1_tags[] = { |
| 342 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 343 | }; |
| 344 | static asn_TYPE_tag2member_t asn_MAP_Epyt_1_tag2el[] = { |
| 345 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* type at 22 */ |
| 346 | { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 1 }, /* stype at 21 */ |
| 347 | { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 2, -1, 0 } /* ypet at 23 */ |
| 348 | }; |
| 349 | static asn_SEQUENCE_specifics_t asn_SPC_Epyt_1_specs = { |
| 350 | sizeof(struct Epyt), |
| 351 | offsetof(struct Epyt, _asn_ctx), |
| 352 | asn_MAP_Epyt_1_tag2el, |
| 353 | 3, /* Count of tags in the map */ |
| 354 | -1, /* Start extensions */ |
| 355 | -1 /* Stop extensions */ |
| 356 | }; |
| 357 | asn_TYPE_descriptor_t asn_DEF_Epyt = { |
| 358 | "Epyt", |
| 359 | "Epyt", |
| 360 | SEQUENCE_free, |
| 361 | SEQUENCE_print, |
| 362 | SEQUENCE_constraint, |
| 363 | SEQUENCE_decode_ber, |
| 364 | SEQUENCE_encode_der, |
| 365 | SEQUENCE_decode_xer, |
| 366 | SEQUENCE_encode_xer, |
| 367 | 0, /* Use generic outmost tag fetcher */ |
| 368 | asn_DEF_Epyt_1_tags, |
| 369 | sizeof(asn_DEF_Epyt_1_tags) |
| 370 | /sizeof(asn_DEF_Epyt_1_tags[0]), /* 1 */ |
| 371 | asn_DEF_Epyt_1_tags, /* Same as above */ |
| 372 | sizeof(asn_DEF_Epyt_1_tags) |
| 373 | /sizeof(asn_DEF_Epyt_1_tags[0]), /* 1 */ |
| 374 | asn_MBR_Epyt_1, |
| 375 | 3, /* Elements count */ |
| 376 | &asn_SPC_Epyt_1_specs /* Additional specs */ |
| 377 | }; |
| 378 | |
| 379 | |
| 380 | /*** <<< INCLUDES [Ypet] >>> ***/ |
| 381 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 382 | #include <INTEGER.h> |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 383 | #include <IA5String.h> |
vlm | 6c5d5e5 | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 384 | #include <EnumType.h> |
| 385 | #include <asn_SET_OF.h> |
| 386 | #include <constr_SET_OF.h> |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 387 | #include <constr_SET.h> |
| 388 | |
| 389 | /*** <<< DEPS [Ypet] >>> ***/ |
| 390 | |
| 391 | |
| 392 | /* |
| 393 | * Method of determining the components presence |
| 394 | */ |
| 395 | typedef enum Ypet_PR { |
| 396 | Ypet_PR_epyt, /* Member epyt is present */ |
| 397 | Ypet_PR_plain, /* Member plain is present */ |
vlm | 6c5d5e5 | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 398 | Ypet_PR_senums, /* Member senums is present */ |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 399 | Ypet_PR_patest1, /* Member patest1 is present */ |
| 400 | Ypet_PR_patest2, /* Member patest2 is present */ |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 401 | } Ypet_PR; |
| 402 | |
vlm | 6c4a850 | 2005-08-18 13:38:19 +0000 | [diff] [blame] | 403 | /*** <<< FWD-DECLS [Ypet] >>> ***/ |
| 404 | |
| 405 | struct Epyt; |
| 406 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 407 | /*** <<< TYPE-DECLS [Ypet] >>> ***/ |
| 408 | |
| 409 | typedef struct Ypet { |
vlm | 6c4a850 | 2005-08-18 13:38:19 +0000 | [diff] [blame] | 410 | struct Epyt *epyt; |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 411 | INTEGER_t *plain /* DEFAULT 7 */; |
vlm | 6c5d5e5 | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 412 | struct senums { |
| 413 | A_SET_OF(EnumType_t) list; |
| 414 | |
| 415 | /* Context for parsing across buffer boundaries */ |
| 416 | asn_struct_ctx_t _asn_ctx; |
| 417 | } senums; |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 418 | IA5String_t patest1; |
| 419 | IA5String_t patest2; |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 420 | |
| 421 | /* Presence bitmask: ASN_SET_ISPRESENT(pYpet, Ypet_PR_x) */ |
| 422 | unsigned int _presence_map |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 423 | [((5+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))]; |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 424 | |
| 425 | /* Context for parsing across buffer boundaries */ |
| 426 | asn_struct_ctx_t _asn_ctx; |
| 427 | } Ypet_t; |
| 428 | |
| 429 | /*** <<< FUNC-DECLS [Ypet] >>> ***/ |
| 430 | |
| 431 | extern asn_TYPE_descriptor_t asn_DEF_Ypet; |
| 432 | |
vlm | 6c4a850 | 2005-08-18 13:38:19 +0000 | [diff] [blame] | 433 | /*** <<< POST-INCLUDE [Ypet] >>> ***/ |
| 434 | |
| 435 | #include <Epyt.h> |
| 436 | |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 437 | /*** <<< CTABLES [Ypet] >>> ***/ |
| 438 | |
| 439 | static int check_permitted_alphabet_6(const void *sptr) { |
| 440 | /* The underlying type is IA5String */ |
| 441 | const IA5String_t *st = (const IA5String_t *)sptr; |
| 442 | const uint8_t *ch = st->buf; |
| 443 | const uint8_t *end = ch + st->size; |
| 444 | |
| 445 | for(; ch < end; ch++) { |
| 446 | uint8_t cv = *ch; |
| 447 | if(!(cv >= 65 && cv <= 90)) return -1; |
| 448 | } |
| 449 | return 0; |
| 450 | } |
| 451 | |
| 452 | static int check_permitted_alphabet_7(const void *sptr) { |
| 453 | /* The underlying type is IA5String */ |
| 454 | const IA5String_t *st = (const IA5String_t *)sptr; |
| 455 | const uint8_t *ch = st->buf; |
| 456 | const uint8_t *end = ch + st->size; |
| 457 | |
| 458 | for(; ch < end; ch++) { |
| 459 | uint8_t cv = *ch; |
| 460 | if(!(cv >= 97 && cv <= 122)) return -1; |
| 461 | } |
| 462 | return 0; |
| 463 | } |
| 464 | |
| 465 | |
| 466 | /*** <<< CODE [Ypet] >>> ***/ |
| 467 | |
| 468 | static int |
| 469 | memb_patest1_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 470 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 471 | const IA5String_t *st = (const IA5String_t *)sptr; |
| 472 | |
| 473 | if(!sptr) { |
| 474 | _ASN_ERRLOG(app_errlog, app_key, |
| 475 | "%s: value not given (%s:%d)", |
| 476 | td->name, __FILE__, __LINE__); |
| 477 | return -1; |
| 478 | } |
| 479 | |
| 480 | |
| 481 | if(!check_permitted_alphabet_6(st)) { |
| 482 | /* Constraint check succeeded */ |
| 483 | return 0; |
| 484 | } else { |
| 485 | _ASN_ERRLOG(app_errlog, app_key, |
| 486 | "%s: constraint failed (%s:%d)", |
| 487 | td->name, __FILE__, __LINE__); |
| 488 | return -1; |
| 489 | } |
| 490 | } |
| 491 | |
| 492 | static int |
| 493 | memb_patest2_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 494 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 495 | const IA5String_t *st = (const IA5String_t *)sptr; |
| 496 | |
| 497 | if(!sptr) { |
| 498 | _ASN_ERRLOG(app_errlog, app_key, |
| 499 | "%s: value not given (%s:%d)", |
| 500 | td->name, __FILE__, __LINE__); |
| 501 | return -1; |
| 502 | } |
| 503 | |
| 504 | |
| 505 | if(!check_permitted_alphabet_7(st)) { |
| 506 | /* Constraint check succeeded */ |
| 507 | return 0; |
| 508 | } else { |
| 509 | _ASN_ERRLOG(app_errlog, app_key, |
| 510 | "%s: constraint failed (%s:%d)", |
| 511 | td->name, __FILE__, __LINE__); |
| 512 | return -1; |
| 513 | } |
| 514 | } |
| 515 | |
| 516 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 517 | /*** <<< STAT-DEFS [Ypet] >>> ***/ |
| 518 | |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 519 | static asn_TYPE_member_t asn_MBR_senums_4[] = { |
vlm | 2cebdf3 | 2005-08-16 16:57:17 +0000 | [diff] [blame] | 520 | { ATF_POINTER, 0, 0, |
vlm | 6c5d5e5 | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 521 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), |
| 522 | .tag_mode = 0, |
| 523 | .type = (void *)&asn_DEF_EnumType, |
| 524 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 525 | .name = "" |
| 526 | }, |
| 527 | }; |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 528 | static ber_tlv_tag_t asn_DEF_senums_4_tags[] = { |
vlm | 6c5d5e5 | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 529 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 530 | }; |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 531 | static asn_SET_OF_specifics_t asn_SPC_senums_4_specs = { |
vlm | 6c5d5e5 | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 532 | sizeof(struct senums), |
| 533 | offsetof(struct senums, _asn_ctx), |
| 534 | 1, /* XER encoding is XMLValueList */ |
| 535 | }; |
| 536 | static /* Use -fall-defs-global to expose */ |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 537 | asn_TYPE_descriptor_t asn_DEF_senums_4 = { |
vlm | 6c5d5e5 | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 538 | "senums", |
| 539 | "senums", |
| 540 | SET_OF_free, |
| 541 | SET_OF_print, |
| 542 | SET_OF_constraint, |
| 543 | SET_OF_decode_ber, |
| 544 | SET_OF_encode_der, |
| 545 | SET_OF_decode_xer, |
| 546 | SET_OF_encode_xer, |
| 547 | 0, /* Use generic outmost tag fetcher */ |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 548 | asn_DEF_senums_4_tags, |
| 549 | sizeof(asn_DEF_senums_4_tags) |
| 550 | /sizeof(asn_DEF_senums_4_tags[0]), /* 1 */ |
| 551 | asn_DEF_senums_4_tags, /* Same as above */ |
| 552 | sizeof(asn_DEF_senums_4_tags) |
| 553 | /sizeof(asn_DEF_senums_4_tags[0]), /* 1 */ |
| 554 | asn_MBR_senums_4, |
vlm | 6c5d5e5 | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 555 | 1, /* Single element */ |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 556 | &asn_SPC_senums_4_specs /* Additional specs */ |
vlm | 6c5d5e5 | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 557 | }; |
| 558 | |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 559 | static asn_TYPE_member_t asn_MBR_Ypet_1[] = { |
vlm | 6c4a850 | 2005-08-18 13:38:19 +0000 | [diff] [blame] | 560 | { ATF_POINTER, 0, offsetof(struct Ypet, epyt), |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 561 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 562 | .tag_mode = 0, |
| 563 | .type = (void *)&asn_DEF_Epyt, |
| 564 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 565 | .name = "epyt" |
| 566 | }, |
| 567 | { ATF_POINTER, 1, offsetof(struct Ypet, plain), |
| 568 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 569 | .tag_mode = 0, |
| 570 | .type = (void *)&asn_DEF_INTEGER, |
| 571 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 572 | .name = "plain" |
| 573 | }, |
vlm | 6c5d5e5 | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 574 | { ATF_NOFLAGS, 0, offsetof(struct Ypet, senums), |
| 575 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), |
| 576 | .tag_mode = 0, |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 577 | .type = (void *)&asn_DEF_senums_4, |
vlm | 6c5d5e5 | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 578 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 579 | .name = "senums" |
| 580 | }, |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 581 | { ATF_NOFLAGS, 0, offsetof(struct Ypet, patest1), |
| 582 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 583 | .tag_mode = +1, /* EXPLICIT tag at current level */ |
| 584 | .type = (void *)&asn_DEF_IA5String, |
| 585 | .memb_constraints = memb_patest1_1_constraint, |
| 586 | .name = "patest1" |
| 587 | }, |
| 588 | { ATF_NOFLAGS, 0, offsetof(struct Ypet, patest2), |
| 589 | .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 590 | .tag_mode = +1, /* EXPLICIT tag at current level */ |
| 591 | .type = (void *)&asn_DEF_IA5String, |
| 592 | .memb_constraints = memb_patest2_1_constraint, |
| 593 | .name = "patest2" |
| 594 | }, |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 595 | }; |
| 596 | static ber_tlv_tag_t asn_DEF_Ypet_1_tags[] = { |
| 597 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 598 | }; |
| 599 | static asn_TYPE_tag2member_t asn_MAP_Ypet_1_tag2el[] = { |
| 600 | { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* plain at 28 */ |
vlm | 6c5d5e5 | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 601 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* epyt at 27 */ |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 602 | { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 2, 0, 0 }, /* senums at 29 */ |
| 603 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 3, 0, 0 }, /* patest1 at 30 */ |
| 604 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 4, 0, 0 } /* patest2 at 31 */ |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 605 | }; |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 606 | static uint8_t asn_MAP_Ypet_1_mmap[(5 + (8 * sizeof(unsigned int)) - 1) / 8] = { |
| 607 | (1 << 7) | (0 << 6) | (1 << 5) | (1 << 4) | (1 << 3) |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 608 | }; |
| 609 | static asn_SET_specifics_t asn_SPC_Ypet_1_specs = { |
| 610 | sizeof(struct Ypet), |
| 611 | offsetof(struct Ypet, _asn_ctx), |
| 612 | offsetof(struct Ypet, _presence_map), |
| 613 | asn_MAP_Ypet_1_tag2el, |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 614 | 5, /* Count of tags in the map */ |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 615 | asn_MAP_Ypet_1_tag2el, /* Same as above */ |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 616 | 5, /* Count of tags in the CXER map */ |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 617 | 0, /* Whether extensible */ |
| 618 | (unsigned int *)asn_MAP_Ypet_1_mmap /* Mandatory elements map */ |
| 619 | }; |
| 620 | asn_TYPE_descriptor_t asn_DEF_Ypet = { |
| 621 | "Ypet", |
| 622 | "Ypet", |
| 623 | SET_free, |
| 624 | SET_print, |
| 625 | SET_constraint, |
| 626 | SET_decode_ber, |
| 627 | SET_encode_der, |
| 628 | SET_decode_xer, |
| 629 | SET_encode_xer, |
| 630 | 0, /* Use generic outmost tag fetcher */ |
| 631 | asn_DEF_Ypet_1_tags, |
| 632 | sizeof(asn_DEF_Ypet_1_tags) |
| 633 | /sizeof(asn_DEF_Ypet_1_tags[0]), /* 1 */ |
| 634 | asn_DEF_Ypet_1_tags, /* Same as above */ |
| 635 | sizeof(asn_DEF_Ypet_1_tags) |
| 636 | /sizeof(asn_DEF_Ypet_1_tags[0]), /* 1 */ |
| 637 | asn_MBR_Ypet_1, |
vlm | 67d57fe | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 638 | 5, /* Elements count */ |
vlm | 0b567bf | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 639 | &asn_SPC_Ypet_1_specs /* Additional specs */ |
| 640 | }; |
| 641 | |
vlm | 6c5d5e5 | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 642 | |
| 643 | /*** <<< INCLUDES [EnumType] >>> ***/ |
| 644 | |
| 645 | #include <ENUMERATED.h> |
| 646 | |
| 647 | /*** <<< DEPS [EnumType] >>> ***/ |
| 648 | |
| 649 | typedef enum EnumType { |
| 650 | EnumType_one = 0, |
| 651 | EnumType_two = 1 |
| 652 | } EnumType_e; |
| 653 | |
| 654 | /*** <<< TYPE-DECLS [EnumType] >>> ***/ |
| 655 | |
| 656 | typedef ENUMERATED_t EnumType_t; |
| 657 | |
| 658 | /*** <<< FUNC-DECLS [EnumType] >>> ***/ |
| 659 | |
| 660 | extern asn_TYPE_descriptor_t asn_DEF_EnumType; |
| 661 | asn_struct_free_f EnumType_free; |
| 662 | asn_struct_print_f EnumType_print; |
| 663 | asn_constr_check_f EnumType_constraint; |
| 664 | ber_type_decoder_f EnumType_decode_ber; |
| 665 | der_type_encoder_f EnumType_encode_der; |
| 666 | xer_type_decoder_f EnumType_decode_xer; |
| 667 | xer_type_encoder_f EnumType_encode_xer; |
| 668 | |
| 669 | /*** <<< CODE [EnumType] >>> ***/ |
| 670 | |
| 671 | int |
| 672 | EnumType_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 673 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 674 | /* Replace with underlying type checker */ |
| 675 | td->check_constraints = asn_DEF_ENUMERATED.check_constraints; |
| 676 | return td->check_constraints(td, sptr, app_errlog, app_key); |
| 677 | } |
| 678 | |
| 679 | /* |
| 680 | * This type is implemented using ENUMERATED, |
| 681 | * so here we adjust the DEF accordingly. |
| 682 | */ |
| 683 | static void |
| 684 | EnumType_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 685 | td->free_struct = asn_DEF_ENUMERATED.free_struct; |
| 686 | td->print_struct = asn_DEF_ENUMERATED.print_struct; |
| 687 | td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder; |
| 688 | td->der_encoder = asn_DEF_ENUMERATED.der_encoder; |
| 689 | td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder; |
| 690 | td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder; |
| 691 | td->elements = asn_DEF_ENUMERATED.elements; |
| 692 | td->elements_count = asn_DEF_ENUMERATED.elements_count; |
vlm | 541def9 | 2005-03-29 19:05:37 +0000 | [diff] [blame] | 693 | /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */ |
vlm | 6c5d5e5 | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 694 | } |
| 695 | |
| 696 | void |
| 697 | EnumType_free(asn_TYPE_descriptor_t *td, |
| 698 | void *struct_ptr, int contents_only) { |
| 699 | EnumType_1_inherit_TYPE_descriptor(td); |
| 700 | td->free_struct(td, struct_ptr, contents_only); |
| 701 | } |
| 702 | |
| 703 | int |
| 704 | EnumType_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 705 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 706 | EnumType_1_inherit_TYPE_descriptor(td); |
| 707 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 708 | } |
| 709 | |
| 710 | asn_dec_rval_t |
| 711 | EnumType_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
vlm | c04faea | 2005-03-17 21:57:19 +0000 | [diff] [blame] | 712 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
vlm | 6c5d5e5 | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 713 | EnumType_1_inherit_TYPE_descriptor(td); |
| 714 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 715 | } |
| 716 | |
| 717 | asn_enc_rval_t |
| 718 | EnumType_encode_der(asn_TYPE_descriptor_t *td, |
| 719 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 720 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 721 | EnumType_1_inherit_TYPE_descriptor(td); |
| 722 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 723 | } |
| 724 | |
| 725 | asn_dec_rval_t |
| 726 | EnumType_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
vlm | c04faea | 2005-03-17 21:57:19 +0000 | [diff] [blame] | 727 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
vlm | 6c5d5e5 | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 728 | EnumType_1_inherit_TYPE_descriptor(td); |
| 729 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 730 | } |
| 731 | |
| 732 | asn_enc_rval_t |
| 733 | EnumType_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 734 | int ilevel, enum xer_encoder_flags_e flags, |
| 735 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 736 | EnumType_1_inherit_TYPE_descriptor(td); |
| 737 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 738 | } |
| 739 | |
| 740 | |
| 741 | /*** <<< STAT-DEFS [EnumType] >>> ***/ |
| 742 | |
| 743 | static asn_INTEGER_enum_map_t asn_MAP_EnumType_1_value2enum[] = { |
| 744 | { 0, 3, "one" }, |
| 745 | { 1, 3, "two" } |
| 746 | }; |
| 747 | static unsigned int asn_MAP_EnumType_1_enum2value[] = { |
| 748 | 0, /* one(0) */ |
| 749 | 1 /* two(1) */ |
| 750 | }; |
| 751 | static asn_INTEGER_specifics_t asn_SPC_EnumType_1_specs = { |
| 752 | asn_MAP_EnumType_1_value2enum, /* "tag" => N; sorted by tag */ |
| 753 | asn_MAP_EnumType_1_enum2value, /* N => "tag"; sorted by N */ |
| 754 | 2, /* Number of elements in the maps */ |
| 755 | 0, /* Enumeration is not extensible */ |
| 756 | 1 /* Strict enumeration */ |
| 757 | }; |
| 758 | static ber_tlv_tag_t asn_DEF_EnumType_1_tags[] = { |
| 759 | (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) |
| 760 | }; |
| 761 | asn_TYPE_descriptor_t asn_DEF_EnumType = { |
| 762 | "EnumType", |
| 763 | "EnumType", |
| 764 | EnumType_free, |
| 765 | EnumType_print, |
| 766 | EnumType_constraint, |
| 767 | EnumType_decode_ber, |
| 768 | EnumType_encode_der, |
| 769 | EnumType_decode_xer, |
| 770 | EnumType_encode_xer, |
| 771 | 0, /* Use generic outmost tag fetcher */ |
| 772 | asn_DEF_EnumType_1_tags, |
| 773 | sizeof(asn_DEF_EnumType_1_tags) |
| 774 | /sizeof(asn_DEF_EnumType_1_tags[0]), /* 1 */ |
| 775 | asn_DEF_EnumType_1_tags, /* Same as above */ |
| 776 | sizeof(asn_DEF_EnumType_1_tags) |
| 777 | /sizeof(asn_DEF_EnumType_1_tags[0]), /* 1 */ |
| 778 | 0, 0, /* Defined elsewhere */ |
| 779 | &asn_SPC_EnumType_1_specs /* Additional specs */ |
| 780 | }; |
| 781 | |