vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 1 | |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 2 | /*** <<< INCLUDES [TestType] >>> ***/ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 3 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 4 | #include <NativeInteger.h> |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 5 | #include <constr_SEQUENCE.h> |
| 6 | #include <BOOLEAN.h> |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 7 | |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 8 | /*** <<< TYPE-DECLS [TestType] >>> ***/ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 9 | |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 10 | typedef struct TestType_16P0 { |
vlm | 17e65d0 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 11 | long common /* DEFAULT 0 */; |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 12 | |
| 13 | /* Context for parsing across buffer boundaries */ |
| 14 | asn_struct_ctx_t _asn_ctx; |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 15 | } TestType_16P0_t; |
| 16 | typedef struct TestType_16P1 { |
vlm | 17e65d0 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 17 | BOOLEAN_t common /* DEFAULT 0 */; |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 18 | |
| 19 | /* Context for parsing across buffer boundaries */ |
| 20 | asn_struct_ctx_t _asn_ctx; |
| 21 | } TestType_16P1_t; |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 22 | |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 23 | /*** <<< FUNC-DECLS [TestType] >>> ***/ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 24 | |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 25 | extern asn_TYPE_descriptor_t asn_DEF_TestType_16P0; |
| 26 | extern asn_TYPE_descriptor_t asn_DEF_TestType_16P1; |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 27 | |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 28 | /*** <<< CODE [TestType] >>> ***/ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 29 | |
| 30 | static int |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 31 | memb_common_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 32 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 33 | long value; |
| 34 | |
| 35 | if(!sptr) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 36 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 37 | "%s: value not given (%s:%d)", |
| 38 | td->name, __FILE__, __LINE__); |
| 39 | return -1; |
| 40 | } |
| 41 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 42 | value = *(const long *)sptr; |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 43 | |
| 44 | if((value >= 1 && value <= 10)) { |
| 45 | /* Constraint check succeeded */ |
| 46 | return 0; |
| 47 | } else { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 48 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 49 | "%s: constraint failed (%s:%d)", |
| 50 | td->name, __FILE__, __LINE__); |
| 51 | return -1; |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 56 | /*** <<< STAT-DEFS [TestType] >>> ***/ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 57 | |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 58 | static int asn_DFL_2_set_0(int set_value, void **sptr) { |
vlm | 17e65d0 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 59 | long *st = *sptr; |
| 60 | |
| 61 | if(!st) { |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 62 | if(!set_value) return -1; /* Not a default value */ |
vlm | 17e65d0 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 63 | st = (*sptr = CALLOC(1, sizeof(*st))); |
| 64 | if(!st) return -1; |
| 65 | } |
| 66 | |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 67 | if(set_value) { |
| 68 | /* Install default value 0 */ |
| 69 | *st = 0; |
| 70 | return 0; |
| 71 | } else { |
| 72 | /* Test default value 0 */ |
| 73 | return (*st == 0); |
| 74 | } |
vlm | 17e65d0 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 75 | } |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 76 | static asn_TYPE_member_t asn_MBR_TestType_16P0_1[] = { |
vlm | 17e65d0 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 77 | { ATF_NOFLAGS, 1, offsetof(struct TestType_16P0, common), |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 78 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 79 | .tag_mode = 0, |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 80 | .type = &asn_DEF_NativeInteger, |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 81 | .memb_constraints = memb_common_constraint_1, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 82 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
vlm | 17e65d0 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 83 | .default_value = asn_DFL_2_set_0, /* DEFAULT 0 */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 84 | .name = "common" |
| 85 | }, |
| 86 | }; |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 87 | static ber_tlv_tag_t asn_DEF_TestType_16P0_tags_1[] = { |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 88 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 89 | }; |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 90 | static asn_TYPE_tag2member_t asn_MAP_TestType_16P0_tag2el_1[] = { |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 91 | { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* common at 20 */ |
| 92 | }; |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 93 | static asn_SEQUENCE_specifics_t asn_SPC_TestType_16P0_specs_1 = { |
| 94 | sizeof(struct TestType_16P0), |
| 95 | offsetof(struct TestType_16P0, _asn_ctx), |
| 96 | asn_MAP_TestType_16P0_tag2el_1, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 97 | 1, /* Count of tags in the map */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 98 | 0, 0, 0, /* Optional elements (not needed) */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 99 | -1, /* Start extensions */ |
| 100 | -1 /* Stop extensions */ |
| 101 | }; |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 102 | asn_TYPE_descriptor_t asn_DEF_TestType_16P0 = { |
| 103 | "TestType", |
| 104 | "TestType", |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 105 | SEQUENCE_free, |
| 106 | SEQUENCE_print, |
| 107 | SEQUENCE_constraint, |
| 108 | SEQUENCE_decode_ber, |
| 109 | SEQUENCE_encode_der, |
| 110 | SEQUENCE_decode_xer, |
| 111 | SEQUENCE_encode_xer, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 112 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 113 | 0, /* Use generic outmost tag fetcher */ |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 114 | asn_DEF_TestType_16P0_tags_1, |
| 115 | sizeof(asn_DEF_TestType_16P0_tags_1) |
| 116 | /sizeof(asn_DEF_TestType_16P0_tags_1[0]), /* 1 */ |
| 117 | asn_DEF_TestType_16P0_tags_1, /* Same as above */ |
| 118 | sizeof(asn_DEF_TestType_16P0_tags_1) |
| 119 | /sizeof(asn_DEF_TestType_16P0_tags_1[0]), /* 1 */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 120 | 0, /* No PER visible constraints */ |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 121 | asn_MBR_TestType_16P0_1, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 122 | 1, /* Elements count */ |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 123 | &asn_SPC_TestType_16P0_specs_1 /* Additional specs */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 124 | }; |
| 125 | |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 126 | static int asn_DFL_4_set_0(int set_value, void **sptr) { |
vlm | 17e65d0 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 127 | BOOLEAN_t *st = *sptr; |
| 128 | |
| 129 | if(!st) { |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 130 | if(!set_value) return -1; /* Not a default value */ |
vlm | 17e65d0 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 131 | st = (*sptr = CALLOC(1, sizeof(*st))); |
| 132 | if(!st) return -1; |
| 133 | } |
| 134 | |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 135 | if(set_value) { |
| 136 | /* Install default value 0 */ |
| 137 | *st = 0; |
| 138 | return 0; |
| 139 | } else { |
| 140 | /* Test default value 0 */ |
| 141 | return (*st == 0); |
| 142 | } |
vlm | 17e65d0 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 143 | } |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 144 | static asn_TYPE_member_t asn_MBR_TestType_16P1_3[] = { |
vlm | 17e65d0 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 145 | { ATF_NOFLAGS, 1, offsetof(struct TestType_16P1, common), |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 146 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), |
| 147 | .tag_mode = 0, |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 148 | .type = &asn_DEF_BOOLEAN, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 149 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 150 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
vlm | 17e65d0 | 2006-03-21 04:48:15 +0000 | [diff] [blame] | 151 | .default_value = asn_DFL_4_set_0, /* DEFAULT 0 */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 152 | .name = "common" |
| 153 | }, |
| 154 | }; |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 155 | static ber_tlv_tag_t asn_DEF_TestType_16P1_tags_3[] = { |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 156 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 157 | }; |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 158 | static asn_TYPE_tag2member_t asn_MAP_TestType_16P1_tag2el_3[] = { |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 159 | { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 } /* common at 21 */ |
| 160 | }; |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 161 | static asn_SEQUENCE_specifics_t asn_SPC_TestType_16P1_specs_3 = { |
| 162 | sizeof(struct TestType_16P1), |
| 163 | offsetof(struct TestType_16P1, _asn_ctx), |
| 164 | asn_MAP_TestType_16P1_tag2el_3, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 165 | 1, /* Count of tags in the map */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 166 | 0, 0, 0, /* Optional elements (not needed) */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 167 | -1, /* Start extensions */ |
| 168 | -1 /* Stop extensions */ |
| 169 | }; |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 170 | asn_TYPE_descriptor_t asn_DEF_TestType_16P1 = { |
| 171 | "TestType", |
| 172 | "TestType", |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 173 | SEQUENCE_free, |
| 174 | SEQUENCE_print, |
| 175 | SEQUENCE_constraint, |
| 176 | SEQUENCE_decode_ber, |
| 177 | SEQUENCE_encode_der, |
| 178 | SEQUENCE_decode_xer, |
| 179 | SEQUENCE_encode_xer, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 180 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 181 | 0, /* Use generic outmost tag fetcher */ |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 182 | asn_DEF_TestType_16P1_tags_3, |
| 183 | sizeof(asn_DEF_TestType_16P1_tags_3) |
| 184 | /sizeof(asn_DEF_TestType_16P1_tags_3[0]), /* 1 */ |
| 185 | asn_DEF_TestType_16P1_tags_3, /* Same as above */ |
| 186 | sizeof(asn_DEF_TestType_16P1_tags_3) |
| 187 | /sizeof(asn_DEF_TestType_16P1_tags_3[0]), /* 1 */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 188 | 0, /* No PER visible constraints */ |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 189 | asn_MBR_TestType_16P1_3, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 190 | 1, /* Elements count */ |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 191 | &asn_SPC_TestType_16P1_specs_3 /* Additional specs */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 192 | }; |
| 193 | |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 194 | |
| 195 | /*** <<< INCLUDES [TestChoice] >>> ***/ |
| 196 | |
vlm | ea22677 | 2006-09-13 02:51:20 +0000 | [diff] [blame] | 197 | #include "TestType.h" |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 198 | #include <constr_CHOICE.h> |
| 199 | |
| 200 | /*** <<< DEPS [TestChoice] >>> ***/ |
| 201 | |
| 202 | typedef enum TestChoice_PR { |
| 203 | TestChoice_PR_NOTHING, /* No components present */ |
| 204 | TestChoice_PR_type1, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 205 | TestChoice_PR_type2 |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 206 | } TestChoice_PR; |
| 207 | |
| 208 | /*** <<< TYPE-DECLS [TestChoice] >>> ***/ |
| 209 | |
| 210 | typedef struct TestChoice { |
| 211 | TestChoice_PR present; |
| 212 | union TestChoice_u { |
| 213 | TestType_16P0_t type1; |
| 214 | TestType_16P1_t type2; |
| 215 | } choice; |
| 216 | |
| 217 | /* Context for parsing across buffer boundaries */ |
| 218 | asn_struct_ctx_t _asn_ctx; |
| 219 | } TestChoice_t; |
| 220 | |
| 221 | /*** <<< FUNC-DECLS [TestChoice] >>> ***/ |
| 222 | |
| 223 | extern asn_TYPE_descriptor_t asn_DEF_TestChoice; |
| 224 | |
| 225 | /*** <<< STAT-DEFS [TestChoice] >>> ***/ |
| 226 | |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 227 | static asn_TYPE_member_t asn_MBR_TestChoice_1[] = { |
| 228 | { ATF_NOFLAGS, 0, offsetof(struct TestChoice, choice.type1), |
| 229 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 230 | .tag_mode = 0, |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 231 | .type = &asn_DEF_TestType_16P0, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 232 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 233 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 234 | .default_value = 0, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 235 | .name = "type1" |
| 236 | }, |
| 237 | { ATF_NOFLAGS, 0, offsetof(struct TestChoice, choice.type2), |
| 238 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 239 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 240 | .type = &asn_DEF_TestType_16P1, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 241 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 242 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 243 | .default_value = 0, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 244 | .name = "type2" |
| 245 | }, |
| 246 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 247 | static asn_TYPE_tag2member_t asn_MAP_TestChoice_tag2el_1[] = { |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 248 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* type1 at 20 */ |
| 249 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 } /* type2 at 21 */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 250 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 251 | static asn_CHOICE_specifics_t asn_SPC_TestChoice_specs_1 = { |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 252 | sizeof(struct TestChoice), |
| 253 | offsetof(struct TestChoice, _asn_ctx), |
| 254 | offsetof(struct TestChoice, present), |
| 255 | sizeof(((struct TestChoice *)0)->present), |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 256 | asn_MAP_TestChoice_tag2el_1, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 257 | 2, /* Count of tags in the map */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 258 | .canonical_order = 0, |
| 259 | .ext_start = -1 /* Extensions start */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 260 | }; |
| 261 | asn_TYPE_descriptor_t asn_DEF_TestChoice = { |
| 262 | "TestChoice", |
| 263 | "TestChoice", |
| 264 | CHOICE_free, |
| 265 | CHOICE_print, |
| 266 | CHOICE_constraint, |
| 267 | CHOICE_decode_ber, |
| 268 | CHOICE_encode_der, |
| 269 | CHOICE_decode_xer, |
| 270 | CHOICE_encode_xer, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 271 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 272 | CHOICE_outmost_tag, |
| 273 | 0, /* No effective tags (pointer) */ |
| 274 | 0, /* No effective tags (count) */ |
| 275 | 0, /* No tags (pointer) */ |
| 276 | 0, /* No tags (count) */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 277 | 0, /* No PER visible constraints */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 278 | asn_MBR_TestChoice_1, |
| 279 | 2, /* Elements count */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 280 | &asn_SPC_TestChoice_specs_1 /* Additional specs */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 281 | }; |
| 282 | |
| 283 | |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 284 | /*** <<< INCLUDES [AutoType] >>> ***/ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 285 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 286 | #include <NativeInteger.h> |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 287 | #include <constr_SEQUENCE.h> |
| 288 | #include <BOOLEAN.h> |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 289 | |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 290 | /*** <<< TYPE-DECLS [AutoType] >>> ***/ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 291 | |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 292 | typedef struct AutoType_34P0 { |
| 293 | long common; |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 294 | |
| 295 | /* Context for parsing across buffer boundaries */ |
| 296 | asn_struct_ctx_t _asn_ctx; |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 297 | } AutoType_34P0_t; |
| 298 | typedef struct AutoType_34P1 { |
| 299 | BOOLEAN_t common; |
| 300 | |
| 301 | /* Context for parsing across buffer boundaries */ |
| 302 | asn_struct_ctx_t _asn_ctx; |
| 303 | } AutoType_34P1_t; |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 304 | |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 305 | /*** <<< FUNC-DECLS [AutoType] >>> ***/ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 306 | |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 307 | extern asn_TYPE_descriptor_t asn_DEF_AutoType_34P0; |
| 308 | extern asn_TYPE_descriptor_t asn_DEF_AutoType_34P1; |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 309 | |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 310 | /*** <<< CODE [AutoType] >>> ***/ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 311 | |
| 312 | static int |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 313 | memb_common_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 314 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 315 | long value; |
| 316 | |
| 317 | if(!sptr) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 318 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 319 | "%s: value not given (%s:%d)", |
| 320 | td->name, __FILE__, __LINE__); |
| 321 | return -1; |
| 322 | } |
| 323 | |
vlm | a33a216 | 2005-08-14 02:40:04 +0000 | [diff] [blame] | 324 | value = *(const long *)sptr; |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 325 | |
| 326 | if((value == 0)) { |
| 327 | /* Constraint check succeeded */ |
| 328 | return 0; |
| 329 | } else { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 330 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 331 | "%s: constraint failed (%s:%d)", |
| 332 | td->name, __FILE__, __LINE__); |
| 333 | return -1; |
| 334 | } |
| 335 | } |
| 336 | |
| 337 | static int |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 338 | memb_common_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 339 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 340 | BOOLEAN_t value; |
| 341 | |
| 342 | if(!sptr) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 343 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 344 | "%s: value not given (%s:%d)", |
| 345 | td->name, __FILE__, __LINE__); |
| 346 | return -1; |
| 347 | } |
| 348 | |
| 349 | value = (*(const long *)sptr) ? 1 : 0; |
| 350 | |
| 351 | if((value <= 0)) { |
| 352 | /* Constraint check succeeded */ |
| 353 | return 0; |
| 354 | } else { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 355 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 356 | "%s: constraint failed (%s:%d)", |
| 357 | td->name, __FILE__, __LINE__); |
| 358 | return -1; |
| 359 | } |
| 360 | } |
| 361 | |
| 362 | |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 363 | /*** <<< STAT-DEFS [AutoType] >>> ***/ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 364 | |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 365 | static asn_TYPE_member_t asn_MBR_AutoType_34P0_1[] = { |
| 366 | { ATF_NOFLAGS, 0, offsetof(struct AutoType_34P0, common), |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 367 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 368 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 369 | .type = &asn_DEF_NativeInteger, |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 370 | .memb_constraints = memb_common_constraint_1, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 371 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 372 | .default_value = 0, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 373 | .name = "common" |
| 374 | }, |
| 375 | }; |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 376 | static ber_tlv_tag_t asn_DEF_AutoType_34P0_tags_1[] = { |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 377 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 378 | }; |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 379 | static asn_TYPE_tag2member_t asn_MAP_AutoType_34P0_tag2el_1[] = { |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 380 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common at 37 */ |
| 381 | }; |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 382 | static asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P0_specs_1 = { |
| 383 | sizeof(struct AutoType_34P0), |
| 384 | offsetof(struct AutoType_34P0, _asn_ctx), |
| 385 | asn_MAP_AutoType_34P0_tag2el_1, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 386 | 1, /* Count of tags in the map */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 387 | 0, 0, 0, /* Optional elements (not needed) */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 388 | -1, /* Start extensions */ |
| 389 | -1 /* Stop extensions */ |
| 390 | }; |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 391 | asn_TYPE_descriptor_t asn_DEF_AutoType_34P0 = { |
| 392 | "AutoType", |
| 393 | "AutoType", |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 394 | SEQUENCE_free, |
| 395 | SEQUENCE_print, |
| 396 | SEQUENCE_constraint, |
| 397 | SEQUENCE_decode_ber, |
| 398 | SEQUENCE_encode_der, |
| 399 | SEQUENCE_decode_xer, |
| 400 | SEQUENCE_encode_xer, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 401 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 402 | 0, /* Use generic outmost tag fetcher */ |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 403 | asn_DEF_AutoType_34P0_tags_1, |
| 404 | sizeof(asn_DEF_AutoType_34P0_tags_1) |
| 405 | /sizeof(asn_DEF_AutoType_34P0_tags_1[0]), /* 1 */ |
| 406 | asn_DEF_AutoType_34P0_tags_1, /* Same as above */ |
| 407 | sizeof(asn_DEF_AutoType_34P0_tags_1) |
| 408 | /sizeof(asn_DEF_AutoType_34P0_tags_1[0]), /* 1 */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 409 | 0, /* No PER visible constraints */ |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 410 | asn_MBR_AutoType_34P0_1, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 411 | 1, /* Elements count */ |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 412 | &asn_SPC_AutoType_34P0_specs_1 /* Additional specs */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 413 | }; |
| 414 | |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 415 | static asn_TYPE_member_t asn_MBR_AutoType_34P1_3[] = { |
| 416 | { ATF_NOFLAGS, 0, offsetof(struct AutoType_34P1, common), |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 417 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 418 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | e0fea71 | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 419 | .type = &asn_DEF_BOOLEAN, |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 420 | .memb_constraints = memb_common_constraint_3, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 421 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 422 | .default_value = 0, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 423 | .name = "common" |
| 424 | }, |
| 425 | }; |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 426 | static ber_tlv_tag_t asn_DEF_AutoType_34P1_tags_3[] = { |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 427 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 428 | }; |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 429 | static asn_TYPE_tag2member_t asn_MAP_AutoType_34P1_tag2el_3[] = { |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 430 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common at 38 */ |
| 431 | }; |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 432 | static asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P1_specs_3 = { |
| 433 | sizeof(struct AutoType_34P1), |
| 434 | offsetof(struct AutoType_34P1, _asn_ctx), |
| 435 | asn_MAP_AutoType_34P1_tag2el_3, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 436 | 1, /* Count of tags in the map */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 437 | 0, 0, 0, /* Optional elements (not needed) */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 438 | -1, /* Start extensions */ |
| 439 | -1 /* Stop extensions */ |
| 440 | }; |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 441 | asn_TYPE_descriptor_t asn_DEF_AutoType_34P1 = { |
| 442 | "AutoType", |
| 443 | "AutoType", |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 444 | SEQUENCE_free, |
| 445 | SEQUENCE_print, |
| 446 | SEQUENCE_constraint, |
| 447 | SEQUENCE_decode_ber, |
| 448 | SEQUENCE_encode_der, |
| 449 | SEQUENCE_decode_xer, |
| 450 | SEQUENCE_encode_xer, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 451 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 452 | 0, /* Use generic outmost tag fetcher */ |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 453 | asn_DEF_AutoType_34P1_tags_3, |
| 454 | sizeof(asn_DEF_AutoType_34P1_tags_3) |
| 455 | /sizeof(asn_DEF_AutoType_34P1_tags_3[0]), /* 1 */ |
| 456 | asn_DEF_AutoType_34P1_tags_3, /* Same as above */ |
| 457 | sizeof(asn_DEF_AutoType_34P1_tags_3) |
| 458 | /sizeof(asn_DEF_AutoType_34P1_tags_3[0]), /* 1 */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 459 | 0, /* No PER visible constraints */ |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 460 | asn_MBR_AutoType_34P1_3, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 461 | 1, /* Elements count */ |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 462 | &asn_SPC_AutoType_34P1_specs_3 /* Additional specs */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 463 | }; |
| 464 | |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 465 | |
| 466 | /*** <<< INCLUDES [AutoChoice] >>> ***/ |
| 467 | |
vlm | ea22677 | 2006-09-13 02:51:20 +0000 | [diff] [blame] | 468 | #include "AutoType.h" |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 469 | #include <constr_CHOICE.h> |
| 470 | |
| 471 | /*** <<< DEPS [AutoChoice] >>> ***/ |
| 472 | |
| 473 | typedef enum AutoChoice_PR { |
| 474 | AutoChoice_PR_NOTHING, /* No components present */ |
| 475 | AutoChoice_PR_type1, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 476 | AutoChoice_PR_type2 |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 477 | } AutoChoice_PR; |
| 478 | |
| 479 | /*** <<< TYPE-DECLS [AutoChoice] >>> ***/ |
| 480 | |
| 481 | typedef struct AutoChoice { |
| 482 | AutoChoice_PR present; |
| 483 | union AutoChoice_u { |
| 484 | AutoType_34P0_t type1; |
| 485 | AutoType_34P1_t type2; |
| 486 | } choice; |
| 487 | |
| 488 | /* Context for parsing across buffer boundaries */ |
| 489 | asn_struct_ctx_t _asn_ctx; |
| 490 | } AutoChoice_t; |
| 491 | |
| 492 | /*** <<< FUNC-DECLS [AutoChoice] >>> ***/ |
| 493 | |
| 494 | extern asn_TYPE_descriptor_t asn_DEF_AutoChoice; |
| 495 | |
| 496 | /*** <<< STAT-DEFS [AutoChoice] >>> ***/ |
| 497 | |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 498 | static asn_TYPE_member_t asn_MBR_AutoChoice_1[] = { |
| 499 | { ATF_NOFLAGS, 0, offsetof(struct AutoChoice, choice.type1), |
| 500 | .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), |
| 501 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 502 | .type = &asn_DEF_AutoType_34P0, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 503 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 504 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 505 | .default_value = 0, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 506 | .name = "type1" |
| 507 | }, |
| 508 | { ATF_NOFLAGS, 0, offsetof(struct AutoChoice, choice.type2), |
| 509 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 510 | .tag_mode = -1, /* IMPLICIT tag at current level */ |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 511 | .type = &asn_DEF_AutoType_34P1, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 512 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 513 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 514 | .default_value = 0, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 515 | .name = "type2" |
| 516 | }, |
| 517 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 518 | static asn_TYPE_tag2member_t asn_MAP_AutoChoice_tag2el_1[] = { |
vlm | 0c6d381 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 519 | { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* type1 at 37 */ |
| 520 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* type2 at 38 */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 521 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 522 | static asn_CHOICE_specifics_t asn_SPC_AutoChoice_specs_1 = { |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 523 | sizeof(struct AutoChoice), |
| 524 | offsetof(struct AutoChoice, _asn_ctx), |
| 525 | offsetof(struct AutoChoice, present), |
| 526 | sizeof(((struct AutoChoice *)0)->present), |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 527 | asn_MAP_AutoChoice_tag2el_1, |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 528 | 2, /* Count of tags in the map */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 529 | .canonical_order = 0, |
| 530 | .ext_start = -1 /* Extensions start */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 531 | }; |
| 532 | asn_TYPE_descriptor_t asn_DEF_AutoChoice = { |
| 533 | "AutoChoice", |
| 534 | "AutoChoice", |
| 535 | CHOICE_free, |
| 536 | CHOICE_print, |
| 537 | CHOICE_constraint, |
| 538 | CHOICE_decode_ber, |
| 539 | CHOICE_encode_der, |
| 540 | CHOICE_decode_xer, |
| 541 | CHOICE_encode_xer, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 542 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 543 | CHOICE_outmost_tag, |
| 544 | 0, /* No effective tags (pointer) */ |
| 545 | 0, /* No effective tags (count) */ |
| 546 | 0, /* No tags (pointer) */ |
| 547 | 0, /* No tags (count) */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 548 | 0, /* No PER visible constraints */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 549 | asn_MBR_AutoChoice_1, |
| 550 | 2, /* Elements count */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 551 | &asn_SPC_AutoChoice_specs_1 /* Additional specs */ |
vlm | 1a9741e | 2005-07-03 05:27:19 +0000 | [diff] [blame] | 552 | }; |
| 553 | |