blob: f7353dbffe86f725789274a3c39ec078cbf8d557 [file] [log] [blame]
vlm1a9741e2005-07-03 05:27:19 +00001
2/*** <<< INCLUDES [TestChoice] >>> ***/
3
vlma33a2162005-08-14 02:40:04 +00004#include <NativeInteger.h>
vlm1a9741e2005-07-03 05:27:19 +00005#include <constr_SEQUENCE.h>
6#include <BOOLEAN.h>
7#include <constr_CHOICE.h>
8
9/*** <<< DEPS [TestChoice] >>> ***/
10
11typedef enum TestChoice_PR {
12 TestChoice_PR_NOTHING, /* No components present */
13 TestChoice_PR_type1,
14 TestChoice_PR_type2,
15} TestChoice_PR;
16
17/*** <<< TYPE-DECLS [TestChoice] >>> ***/
18
19typedef struct TestChoice {
20 TestChoice_PR present;
vlm2e774282005-08-14 15:03:31 +000021 union TestChoice_u {
vlm1a9741e2005-07-03 05:27:19 +000022 struct type1 {
vlm337167e2005-11-26 11:25:14 +000023 long common /* DEFAULT 0 */;
vlm1a9741e2005-07-03 05:27:19 +000024
25 /* Context for parsing across buffer boundaries */
26 asn_struct_ctx_t _asn_ctx;
27 } type1;
28 struct type2 {
vlm337167e2005-11-26 11:25:14 +000029 BOOLEAN_t common /* DEFAULT 0 */;
vlm1a9741e2005-07-03 05:27:19 +000030
31 /* Context for parsing across buffer boundaries */
32 asn_struct_ctx_t _asn_ctx;
33 } type2;
34 } choice;
35
36 /* Context for parsing across buffer boundaries */
37 asn_struct_ctx_t _asn_ctx;
38} TestChoice_t;
39
40/*** <<< FUNC-DECLS [TestChoice] >>> ***/
41
42extern asn_TYPE_descriptor_t asn_DEF_TestChoice;
43
44/*** <<< CODE [TestChoice] >>> ***/
45
46static int
vlm337167e2005-11-26 11:25:14 +000047memb_common_constraint_2(asn_TYPE_descriptor_t *td, const void *sptr,
vlm1a9741e2005-07-03 05:27:19 +000048 asn_app_consume_bytes_f *app_errlog, void *app_key) {
vlm1a9741e2005-07-03 05:27:19 +000049 long value;
50
51 if(!sptr) {
52 _ASN_ERRLOG(app_errlog, app_key,
53 "%s: value not given (%s:%d)",
54 td->name, __FILE__, __LINE__);
55 return -1;
56 }
57
vlma33a2162005-08-14 02:40:04 +000058 value = *(const long *)sptr;
vlm1a9741e2005-07-03 05:27:19 +000059
60 if((value >= 1 && value <= 10)) {
61 /* Constraint check succeeded */
62 return 0;
63 } else {
64 _ASN_ERRLOG(app_errlog, app_key,
65 "%s: constraint failed (%s:%d)",
66 td->name, __FILE__, __LINE__);
67 return -1;
68 }
69}
70
71
72/*** <<< STAT-DEFS [TestChoice] >>> ***/
73
vlm337167e2005-11-26 11:25:14 +000074static int asn_DFL_3_set_0(void **sptr) {
75 long *st = *sptr;
76
77 if(!st) {
78 st = (*sptr = CALLOC(1, sizeof(*st)));
79 if(!st) return -1;
80 }
81
82 /* Install default value 0 */
83 *st = 0;
84 return 0;
85}
vlm1a9741e2005-07-03 05:27:19 +000086static asn_TYPE_member_t asn_MBR_type1_2[] = {
vlm337167e2005-11-26 11:25:14 +000087 { ATF_NOFLAGS, 1, offsetof(struct type1, common),
vlm1a9741e2005-07-03 05:27:19 +000088 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
89 .tag_mode = 0,
vlme0fea712005-08-29 10:31:14 +000090 .type = &asn_DEF_NativeInteger,
vlm337167e2005-11-26 11:25:14 +000091 .memb_constraints = memb_common_constraint_2,
92 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
93 .default_value = asn_DFL_3_set_0, /* DEFAULT 0 */
vlm1a9741e2005-07-03 05:27:19 +000094 .name = "common"
95 },
96};
vlm337167e2005-11-26 11:25:14 +000097static ber_tlv_tag_t asn_DEF_type1_tags_2[] = {
vlm1a9741e2005-07-03 05:27:19 +000098 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
99};
vlm337167e2005-11-26 11:25:14 +0000100static asn_TYPE_tag2member_t asn_MAP_type1_tag2el_2[] = {
vlm1a9741e2005-07-03 05:27:19 +0000101 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* common at 20 */
102};
vlm337167e2005-11-26 11:25:14 +0000103static asn_SEQUENCE_specifics_t asn_SPC_type1_specs_2 = {
vlm1a9741e2005-07-03 05:27:19 +0000104 sizeof(struct type1),
105 offsetof(struct type1, _asn_ctx),
vlm337167e2005-11-26 11:25:14 +0000106 asn_MAP_type1_tag2el_2,
vlm1a9741e2005-07-03 05:27:19 +0000107 1, /* Count of tags in the map */
vlm337167e2005-11-26 11:25:14 +0000108 0, 0, 0, /* Optional elements (not needed) */
vlm1a9741e2005-07-03 05:27:19 +0000109 -1, /* Start extensions */
110 -1 /* Stop extensions */
111};
112static /* Use -fall-defs-global to expose */
113asn_TYPE_descriptor_t asn_DEF_type1_2 = {
114 "type1",
115 "type1",
116 SEQUENCE_free,
117 SEQUENCE_print,
118 SEQUENCE_constraint,
119 SEQUENCE_decode_ber,
120 SEQUENCE_encode_der,
121 SEQUENCE_decode_xer,
122 SEQUENCE_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000123 0, /* No PER decoder, -gen-PER to enable */
vlm1a9741e2005-07-03 05:27:19 +0000124 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +0000125 asn_DEF_type1_tags_2,
126 sizeof(asn_DEF_type1_tags_2)
127 /sizeof(asn_DEF_type1_tags_2[0]), /* 1 */
128 asn_DEF_type1_tags_2, /* Same as above */
129 sizeof(asn_DEF_type1_tags_2)
130 /sizeof(asn_DEF_type1_tags_2[0]), /* 1 */
131 0, /* No PER visible constraints */
vlm1a9741e2005-07-03 05:27:19 +0000132 asn_MBR_type1_2,
133 1, /* Elements count */
vlm337167e2005-11-26 11:25:14 +0000134 &asn_SPC_type1_specs_2 /* Additional specs */
vlm1a9741e2005-07-03 05:27:19 +0000135};
136
vlm337167e2005-11-26 11:25:14 +0000137static int asn_DFL_5_set_0(void **sptr) {
138 BOOLEAN_t *st = *sptr;
139
140 if(!st) {
141 st = (*sptr = CALLOC(1, sizeof(*st)));
142 if(!st) return -1;
143 }
144
145 /* Install default value 0 */
146 *st = 0;
147 return 0;
148}
vlm1a9741e2005-07-03 05:27:19 +0000149static asn_TYPE_member_t asn_MBR_type2_4[] = {
vlm337167e2005-11-26 11:25:14 +0000150 { ATF_NOFLAGS, 1, offsetof(struct type2, common),
vlm1a9741e2005-07-03 05:27:19 +0000151 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
152 .tag_mode = 0,
vlme0fea712005-08-29 10:31:14 +0000153 .type = &asn_DEF_BOOLEAN,
vlm1a9741e2005-07-03 05:27:19 +0000154 .memb_constraints = 0, /* Defer constraints checking to the member type */
vlm337167e2005-11-26 11:25:14 +0000155 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
156 .default_value = asn_DFL_5_set_0, /* DEFAULT 0 */
vlm1a9741e2005-07-03 05:27:19 +0000157 .name = "common"
158 },
159};
vlm337167e2005-11-26 11:25:14 +0000160static ber_tlv_tag_t asn_DEF_type2_tags_4[] = {
vlm1a9741e2005-07-03 05:27:19 +0000161 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
162 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
163};
vlm337167e2005-11-26 11:25:14 +0000164static asn_TYPE_tag2member_t asn_MAP_type2_tag2el_4[] = {
vlm1a9741e2005-07-03 05:27:19 +0000165 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 } /* common at 21 */
166};
vlm337167e2005-11-26 11:25:14 +0000167static asn_SEQUENCE_specifics_t asn_SPC_type2_specs_4 = {
vlm1a9741e2005-07-03 05:27:19 +0000168 sizeof(struct type2),
169 offsetof(struct type2, _asn_ctx),
vlm337167e2005-11-26 11:25:14 +0000170 asn_MAP_type2_tag2el_4,
vlm1a9741e2005-07-03 05:27:19 +0000171 1, /* Count of tags in the map */
vlm337167e2005-11-26 11:25:14 +0000172 0, 0, 0, /* Optional elements (not needed) */
vlm1a9741e2005-07-03 05:27:19 +0000173 -1, /* Start extensions */
174 -1 /* Stop extensions */
175};
176static /* Use -fall-defs-global to expose */
177asn_TYPE_descriptor_t asn_DEF_type2_4 = {
178 "type2",
179 "type2",
180 SEQUENCE_free,
181 SEQUENCE_print,
182 SEQUENCE_constraint,
183 SEQUENCE_decode_ber,
184 SEQUENCE_encode_der,
185 SEQUENCE_decode_xer,
186 SEQUENCE_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000187 0, /* No PER decoder, -gen-PER to enable */
vlm1a9741e2005-07-03 05:27:19 +0000188 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +0000189 asn_DEF_type2_tags_4,
190 sizeof(asn_DEF_type2_tags_4)
191 /sizeof(asn_DEF_type2_tags_4[0]) - 1, /* 1 */
192 asn_DEF_type2_tags_4, /* Same as above */
193 sizeof(asn_DEF_type2_tags_4)
194 /sizeof(asn_DEF_type2_tags_4[0]), /* 2 */
195 0, /* No PER visible constraints */
vlm1a9741e2005-07-03 05:27:19 +0000196 asn_MBR_type2_4,
197 1, /* Elements count */
vlm337167e2005-11-26 11:25:14 +0000198 &asn_SPC_type2_specs_4 /* Additional specs */
vlm1a9741e2005-07-03 05:27:19 +0000199};
200
201static asn_TYPE_member_t asn_MBR_TestChoice_1[] = {
202 { ATF_NOFLAGS, 0, offsetof(struct TestChoice, choice.type1),
203 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
204 .tag_mode = 0,
vlme0fea712005-08-29 10:31:14 +0000205 .type = &asn_DEF_type1_2,
vlm1a9741e2005-07-03 05:27:19 +0000206 .memb_constraints = 0, /* Defer constraints checking to the member type */
vlm337167e2005-11-26 11:25:14 +0000207 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
208 .default_value = 0,
vlm1a9741e2005-07-03 05:27:19 +0000209 .name = "type1"
210 },
211 { ATF_NOFLAGS, 0, offsetof(struct TestChoice, choice.type2),
212 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
213 .tag_mode = -1, /* IMPLICIT tag at current level */
vlme0fea712005-08-29 10:31:14 +0000214 .type = &asn_DEF_type2_4,
vlm1a9741e2005-07-03 05:27:19 +0000215 .memb_constraints = 0, /* Defer constraints checking to the member type */
vlm337167e2005-11-26 11:25:14 +0000216 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
217 .default_value = 0,
vlm1a9741e2005-07-03 05:27:19 +0000218 .name = "type2"
219 },
220};
vlm337167e2005-11-26 11:25:14 +0000221static asn_TYPE_tag2member_t asn_MAP_TestChoice_tag2el_1[] = {
vlm1a9741e2005-07-03 05:27:19 +0000222 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* type1 at 16 */
223 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 } /* type2 at 16 */
224};
vlm337167e2005-11-26 11:25:14 +0000225static asn_CHOICE_specifics_t asn_SPC_TestChoice_specs_1 = {
vlm1a9741e2005-07-03 05:27:19 +0000226 sizeof(struct TestChoice),
227 offsetof(struct TestChoice, _asn_ctx),
228 offsetof(struct TestChoice, present),
229 sizeof(((struct TestChoice *)0)->present),
vlm337167e2005-11-26 11:25:14 +0000230 asn_MAP_TestChoice_tag2el_1,
vlm1a9741e2005-07-03 05:27:19 +0000231 2, /* Count of tags in the map */
vlm337167e2005-11-26 11:25:14 +0000232 .canonical_order = 0,
233 .ext_start = -1 /* Extensions start */
vlm1a9741e2005-07-03 05:27:19 +0000234};
235asn_TYPE_descriptor_t asn_DEF_TestChoice = {
236 "TestChoice",
237 "TestChoice",
238 CHOICE_free,
239 CHOICE_print,
240 CHOICE_constraint,
241 CHOICE_decode_ber,
242 CHOICE_encode_der,
243 CHOICE_decode_xer,
244 CHOICE_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000245 0, /* No PER decoder, -gen-PER to enable */
vlm1a9741e2005-07-03 05:27:19 +0000246 CHOICE_outmost_tag,
247 0, /* No effective tags (pointer) */
248 0, /* No effective tags (count) */
249 0, /* No tags (pointer) */
250 0, /* No tags (count) */
vlm337167e2005-11-26 11:25:14 +0000251 0, /* No PER visible constraints */
vlm1a9741e2005-07-03 05:27:19 +0000252 asn_MBR_TestChoice_1,
253 2, /* Elements count */
vlm337167e2005-11-26 11:25:14 +0000254 &asn_SPC_TestChoice_specs_1 /* Additional specs */
vlm1a9741e2005-07-03 05:27:19 +0000255};
256
257
258/*** <<< INCLUDES [AutoChoice] >>> ***/
259
vlma33a2162005-08-14 02:40:04 +0000260#include <NativeInteger.h>
vlm1a9741e2005-07-03 05:27:19 +0000261#include <constr_SEQUENCE.h>
262#include <BOOLEAN.h>
263#include <constr_CHOICE.h>
264
265/*** <<< DEPS [AutoChoice] >>> ***/
266
267typedef enum AutoChoice_PR {
268 AutoChoice_PR_NOTHING, /* No components present */
269 AutoChoice_PR_type1,
270 AutoChoice_PR_type2,
271} AutoChoice_PR;
272
273/*** <<< TYPE-DECLS [AutoChoice] >>> ***/
274
275typedef struct AutoChoice {
276 AutoChoice_PR present;
vlm2e774282005-08-14 15:03:31 +0000277 union AutoChoice_u {
vlm1a9741e2005-07-03 05:27:19 +0000278 struct type1 {
vlma33a2162005-08-14 02:40:04 +0000279 long common;
vlm1a9741e2005-07-03 05:27:19 +0000280
281 /* Context for parsing across buffer boundaries */
282 asn_struct_ctx_t _asn_ctx;
283 } type1;
284 struct type2 {
285 BOOLEAN_t common;
286
287 /* Context for parsing across buffer boundaries */
288 asn_struct_ctx_t _asn_ctx;
289 } type2;
290 } choice;
291
292 /* Context for parsing across buffer boundaries */
293 asn_struct_ctx_t _asn_ctx;
294} AutoChoice_t;
295
296/*** <<< FUNC-DECLS [AutoChoice] >>> ***/
297
298extern asn_TYPE_descriptor_t asn_DEF_AutoChoice;
299
300/*** <<< CODE [AutoChoice] >>> ***/
301
302static int
vlm337167e2005-11-26 11:25:14 +0000303memb_common_constraint_2(asn_TYPE_descriptor_t *td, const void *sptr,
vlm1a9741e2005-07-03 05:27:19 +0000304 asn_app_consume_bytes_f *app_errlog, void *app_key) {
vlm1a9741e2005-07-03 05:27:19 +0000305 long value;
306
307 if(!sptr) {
308 _ASN_ERRLOG(app_errlog, app_key,
309 "%s: value not given (%s:%d)",
310 td->name, __FILE__, __LINE__);
311 return -1;
312 }
313
vlma33a2162005-08-14 02:40:04 +0000314 value = *(const long *)sptr;
vlm1a9741e2005-07-03 05:27:19 +0000315
316 if((value == 0)) {
317 /* Constraint check succeeded */
318 return 0;
319 } else {
320 _ASN_ERRLOG(app_errlog, app_key,
321 "%s: constraint failed (%s:%d)",
322 td->name, __FILE__, __LINE__);
323 return -1;
324 }
325}
326
327static int
vlm337167e2005-11-26 11:25:14 +0000328memb_common_constraint_4(asn_TYPE_descriptor_t *td, const void *sptr,
vlm1a9741e2005-07-03 05:27:19 +0000329 asn_app_consume_bytes_f *app_errlog, void *app_key) {
330 BOOLEAN_t value;
331
332 if(!sptr) {
333 _ASN_ERRLOG(app_errlog, app_key,
334 "%s: value not given (%s:%d)",
335 td->name, __FILE__, __LINE__);
336 return -1;
337 }
338
339 value = (*(const long *)sptr) ? 1 : 0;
340
341 if((value <= 0)) {
342 /* Constraint check succeeded */
343 return 0;
344 } else {
345 _ASN_ERRLOG(app_errlog, app_key,
346 "%s: constraint failed (%s:%d)",
347 td->name, __FILE__, __LINE__);
348 return -1;
349 }
350}
351
352
353/*** <<< STAT-DEFS [AutoChoice] >>> ***/
354
355static asn_TYPE_member_t asn_MBR_type1_2[] = {
356 { ATF_NOFLAGS, 0, offsetof(struct type1, common),
357 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
358 .tag_mode = -1, /* IMPLICIT tag at current level */
vlme0fea712005-08-29 10:31:14 +0000359 .type = &asn_DEF_NativeInteger,
vlm337167e2005-11-26 11:25:14 +0000360 .memb_constraints = memb_common_constraint_2,
361 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
362 .default_value = 0,
vlm1a9741e2005-07-03 05:27:19 +0000363 .name = "common"
364 },
365};
vlm337167e2005-11-26 11:25:14 +0000366static ber_tlv_tag_t asn_DEF_type1_tags_2[] = {
vlm1a9741e2005-07-03 05:27:19 +0000367 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
368 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
369};
vlm337167e2005-11-26 11:25:14 +0000370static asn_TYPE_tag2member_t asn_MAP_type1_tag2el_2[] = {
vlm1a9741e2005-07-03 05:27:19 +0000371 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common at 37 */
372};
vlm337167e2005-11-26 11:25:14 +0000373static asn_SEQUENCE_specifics_t asn_SPC_type1_specs_2 = {
vlm1a9741e2005-07-03 05:27:19 +0000374 sizeof(struct type1),
375 offsetof(struct type1, _asn_ctx),
vlm337167e2005-11-26 11:25:14 +0000376 asn_MAP_type1_tag2el_2,
vlm1a9741e2005-07-03 05:27:19 +0000377 1, /* Count of tags in the map */
vlm337167e2005-11-26 11:25:14 +0000378 0, 0, 0, /* Optional elements (not needed) */
vlm1a9741e2005-07-03 05:27:19 +0000379 -1, /* Start extensions */
380 -1 /* Stop extensions */
381};
382static /* Use -fall-defs-global to expose */
383asn_TYPE_descriptor_t asn_DEF_type1_2 = {
384 "type1",
385 "type1",
386 SEQUENCE_free,
387 SEQUENCE_print,
388 SEQUENCE_constraint,
389 SEQUENCE_decode_ber,
390 SEQUENCE_encode_der,
391 SEQUENCE_decode_xer,
392 SEQUENCE_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000393 0, /* No PER decoder, -gen-PER to enable */
vlm1a9741e2005-07-03 05:27:19 +0000394 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +0000395 asn_DEF_type1_tags_2,
396 sizeof(asn_DEF_type1_tags_2)
397 /sizeof(asn_DEF_type1_tags_2[0]) - 1, /* 1 */
398 asn_DEF_type1_tags_2, /* Same as above */
399 sizeof(asn_DEF_type1_tags_2)
400 /sizeof(asn_DEF_type1_tags_2[0]), /* 2 */
401 0, /* No PER visible constraints */
vlm1a9741e2005-07-03 05:27:19 +0000402 asn_MBR_type1_2,
403 1, /* Elements count */
vlm337167e2005-11-26 11:25:14 +0000404 &asn_SPC_type1_specs_2 /* Additional specs */
vlm1a9741e2005-07-03 05:27:19 +0000405};
406
407static asn_TYPE_member_t asn_MBR_type2_4[] = {
408 { ATF_NOFLAGS, 0, offsetof(struct type2, common),
409 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
410 .tag_mode = -1, /* IMPLICIT tag at current level */
vlme0fea712005-08-29 10:31:14 +0000411 .type = &asn_DEF_BOOLEAN,
vlm337167e2005-11-26 11:25:14 +0000412 .memb_constraints = memb_common_constraint_4,
413 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
414 .default_value = 0,
vlm1a9741e2005-07-03 05:27:19 +0000415 .name = "common"
416 },
417};
vlm337167e2005-11-26 11:25:14 +0000418static ber_tlv_tag_t asn_DEF_type2_tags_4[] = {
vlm1a9741e2005-07-03 05:27:19 +0000419 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
420 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
421};
vlm337167e2005-11-26 11:25:14 +0000422static asn_TYPE_tag2member_t asn_MAP_type2_tag2el_4[] = {
vlm1a9741e2005-07-03 05:27:19 +0000423 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common at 38 */
424};
vlm337167e2005-11-26 11:25:14 +0000425static asn_SEQUENCE_specifics_t asn_SPC_type2_specs_4 = {
vlm1a9741e2005-07-03 05:27:19 +0000426 sizeof(struct type2),
427 offsetof(struct type2, _asn_ctx),
vlm337167e2005-11-26 11:25:14 +0000428 asn_MAP_type2_tag2el_4,
vlm1a9741e2005-07-03 05:27:19 +0000429 1, /* Count of tags in the map */
vlm337167e2005-11-26 11:25:14 +0000430 0, 0, 0, /* Optional elements (not needed) */
vlm1a9741e2005-07-03 05:27:19 +0000431 -1, /* Start extensions */
432 -1 /* Stop extensions */
433};
434static /* Use -fall-defs-global to expose */
435asn_TYPE_descriptor_t asn_DEF_type2_4 = {
436 "type2",
437 "type2",
438 SEQUENCE_free,
439 SEQUENCE_print,
440 SEQUENCE_constraint,
441 SEQUENCE_decode_ber,
442 SEQUENCE_encode_der,
443 SEQUENCE_decode_xer,
444 SEQUENCE_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000445 0, /* No PER decoder, -gen-PER to enable */
vlm1a9741e2005-07-03 05:27:19 +0000446 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +0000447 asn_DEF_type2_tags_4,
448 sizeof(asn_DEF_type2_tags_4)
449 /sizeof(asn_DEF_type2_tags_4[0]) - 1, /* 1 */
450 asn_DEF_type2_tags_4, /* Same as above */
451 sizeof(asn_DEF_type2_tags_4)
452 /sizeof(asn_DEF_type2_tags_4[0]), /* 2 */
453 0, /* No PER visible constraints */
vlm1a9741e2005-07-03 05:27:19 +0000454 asn_MBR_type2_4,
455 1, /* Elements count */
vlm337167e2005-11-26 11:25:14 +0000456 &asn_SPC_type2_specs_4 /* Additional specs */
vlm1a9741e2005-07-03 05:27:19 +0000457};
458
459static asn_TYPE_member_t asn_MBR_AutoChoice_1[] = {
460 { ATF_NOFLAGS, 0, offsetof(struct AutoChoice, choice.type1),
461 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
462 .tag_mode = -1, /* IMPLICIT tag at current level */
vlme0fea712005-08-29 10:31:14 +0000463 .type = &asn_DEF_type1_2,
vlm1a9741e2005-07-03 05:27:19 +0000464 .memb_constraints = 0, /* Defer constraints checking to the member type */
vlm337167e2005-11-26 11:25:14 +0000465 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
466 .default_value = 0,
vlm1a9741e2005-07-03 05:27:19 +0000467 .name = "type1"
468 },
469 { ATF_NOFLAGS, 0, offsetof(struct AutoChoice, choice.type2),
470 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
471 .tag_mode = -1, /* IMPLICIT tag at current level */
vlme0fea712005-08-29 10:31:14 +0000472 .type = &asn_DEF_type2_4,
vlm1a9741e2005-07-03 05:27:19 +0000473 .memb_constraints = 0, /* Defer constraints checking to the member type */
vlm337167e2005-11-26 11:25:14 +0000474 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
475 .default_value = 0,
vlm1a9741e2005-07-03 05:27:19 +0000476 .name = "type2"
477 },
478};
vlm337167e2005-11-26 11:25:14 +0000479static asn_TYPE_tag2member_t asn_MAP_AutoChoice_tag2el_1[] = {
vlm1a9741e2005-07-03 05:27:19 +0000480 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* type1 at 34 */
481 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* type2 at 34 */
482};
vlm337167e2005-11-26 11:25:14 +0000483static asn_CHOICE_specifics_t asn_SPC_AutoChoice_specs_1 = {
vlm1a9741e2005-07-03 05:27:19 +0000484 sizeof(struct AutoChoice),
485 offsetof(struct AutoChoice, _asn_ctx),
486 offsetof(struct AutoChoice, present),
487 sizeof(((struct AutoChoice *)0)->present),
vlm337167e2005-11-26 11:25:14 +0000488 asn_MAP_AutoChoice_tag2el_1,
vlm1a9741e2005-07-03 05:27:19 +0000489 2, /* Count of tags in the map */
vlm337167e2005-11-26 11:25:14 +0000490 .canonical_order = 0,
491 .ext_start = -1 /* Extensions start */
vlm1a9741e2005-07-03 05:27:19 +0000492};
493asn_TYPE_descriptor_t asn_DEF_AutoChoice = {
494 "AutoChoice",
495 "AutoChoice",
496 CHOICE_free,
497 CHOICE_print,
498 CHOICE_constraint,
499 CHOICE_decode_ber,
500 CHOICE_encode_der,
501 CHOICE_decode_xer,
502 CHOICE_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000503 0, /* No PER decoder, -gen-PER to enable */
vlm1a9741e2005-07-03 05:27:19 +0000504 CHOICE_outmost_tag,
505 0, /* No effective tags (pointer) */
506 0, /* No effective tags (count) */
507 0, /* No tags (pointer) */
508 0, /* No tags (count) */
vlm337167e2005-11-26 11:25:14 +0000509 0, /* No PER visible constraints */
vlm1a9741e2005-07-03 05:27:19 +0000510 asn_MBR_AutoChoice_1,
511 2, /* Elements count */
vlm337167e2005-11-26 11:25:14 +0000512 &asn_SPC_AutoChoice_specs_1 /* Additional specs */
vlm1a9741e2005-07-03 05:27:19 +0000513};
514