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