blob: 8e48c258890eeaea101ab268ada2470b5071730c [file] [log] [blame]
vlm1a9741e2005-07-03 05:27:19 +00001
vlm0c6d3812006-03-21 03:40:38 +00002/*** <<< INCLUDES [TestType] >>> ***/
vlm1a9741e2005-07-03 05:27:19 +00003
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>
vlm1a9741e2005-07-03 05:27:19 +00007
vlm0c6d3812006-03-21 03:40:38 +00008/*** <<< TYPE-DECLS [TestType] >>> ***/
vlm1a9741e2005-07-03 05:27:19 +00009
vlm0c6d3812006-03-21 03:40:38 +000010typedef struct TestType_16P0 {
11 long common;
vlm1a9741e2005-07-03 05:27:19 +000012
13 /* Context for parsing across buffer boundaries */
14 asn_struct_ctx_t _asn_ctx;
vlm0c6d3812006-03-21 03:40:38 +000015} TestType_16P0_t;
16typedef struct TestType_16P1 {
17 BOOLEAN_t common;
18
19 /* Context for parsing across buffer boundaries */
20 asn_struct_ctx_t _asn_ctx;
21} TestType_16P1_t;
vlm1a9741e2005-07-03 05:27:19 +000022
vlm0c6d3812006-03-21 03:40:38 +000023/*** <<< FUNC-DECLS [TestType] >>> ***/
vlm1a9741e2005-07-03 05:27:19 +000024
vlm0c6d3812006-03-21 03:40:38 +000025extern asn_TYPE_descriptor_t asn_DEF_TestType_16P0;
26extern asn_TYPE_descriptor_t asn_DEF_TestType_16P1;
vlm1a9741e2005-07-03 05:27:19 +000027
vlm0c6d3812006-03-21 03:40:38 +000028/*** <<< CODE [TestType] >>> ***/
vlm1a9741e2005-07-03 05:27:19 +000029
30static int
vlm0c6d3812006-03-21 03:40:38 +000031memb_common_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
vlm1a9741e2005-07-03 05:27:19 +000032 asn_app_consume_bytes_f *app_errlog, void *app_key) {
vlm1a9741e2005-07-03 05:27:19 +000033 long value;
34
35 if(!sptr) {
36 _ASN_ERRLOG(app_errlog, app_key,
37 "%s: value not given (%s:%d)",
38 td->name, __FILE__, __LINE__);
39 return -1;
40 }
41
vlma33a2162005-08-14 02:40:04 +000042 value = *(const long *)sptr;
vlm1a9741e2005-07-03 05:27:19 +000043
44 if((value >= 1 && value <= 10)) {
45 /* Constraint check succeeded */
46 return 0;
47 } else {
48 _ASN_ERRLOG(app_errlog, app_key,
49 "%s: constraint failed (%s:%d)",
50 td->name, __FILE__, __LINE__);
51 return -1;
52 }
53}
54
55
vlm0c6d3812006-03-21 03:40:38 +000056/*** <<< STAT-DEFS [TestType] >>> ***/
vlm1a9741e2005-07-03 05:27:19 +000057
vlm0c6d3812006-03-21 03:40:38 +000058static asn_TYPE_member_t asn_MBR_TestType_16P0_1[] = {
59 { ATF_NOFLAGS, 0, offsetof(struct TestType_16P0, common),
vlm1a9741e2005-07-03 05:27:19 +000060 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
61 .tag_mode = 0,
vlme0fea712005-08-29 10:31:14 +000062 .type = &asn_DEF_NativeInteger,
vlm0c6d3812006-03-21 03:40:38 +000063 .memb_constraints = memb_common_constraint_1,
vlm337167e2005-11-26 11:25:14 +000064 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
vlm0c6d3812006-03-21 03:40:38 +000065 .default_value = 0,
vlm1a9741e2005-07-03 05:27:19 +000066 .name = "common"
67 },
68};
vlm0c6d3812006-03-21 03:40:38 +000069static ber_tlv_tag_t asn_DEF_TestType_16P0_tags_1[] = {
vlm1a9741e2005-07-03 05:27:19 +000070 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
71};
vlm0c6d3812006-03-21 03:40:38 +000072static asn_TYPE_tag2member_t asn_MAP_TestType_16P0_tag2el_1[] = {
vlm1a9741e2005-07-03 05:27:19 +000073 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* common at 20 */
74};
vlm0c6d3812006-03-21 03:40:38 +000075static asn_SEQUENCE_specifics_t asn_SPC_TestType_16P0_specs_1 = {
76 sizeof(struct TestType_16P0),
77 offsetof(struct TestType_16P0, _asn_ctx),
78 asn_MAP_TestType_16P0_tag2el_1,
vlm1a9741e2005-07-03 05:27:19 +000079 1, /* Count of tags in the map */
vlm337167e2005-11-26 11:25:14 +000080 0, 0, 0, /* Optional elements (not needed) */
vlm1a9741e2005-07-03 05:27:19 +000081 -1, /* Start extensions */
82 -1 /* Stop extensions */
83};
vlm0c6d3812006-03-21 03:40:38 +000084asn_TYPE_descriptor_t asn_DEF_TestType_16P0 = {
85 "TestType",
86 "TestType",
vlm1a9741e2005-07-03 05:27:19 +000087 SEQUENCE_free,
88 SEQUENCE_print,
89 SEQUENCE_constraint,
90 SEQUENCE_decode_ber,
91 SEQUENCE_encode_der,
92 SEQUENCE_decode_xer,
93 SEQUENCE_encode_xer,
vlm337167e2005-11-26 11:25:14 +000094 0, /* No PER decoder, -gen-PER to enable */
vlm1a9741e2005-07-03 05:27:19 +000095 0, /* Use generic outmost tag fetcher */
vlm0c6d3812006-03-21 03:40:38 +000096 asn_DEF_TestType_16P0_tags_1,
97 sizeof(asn_DEF_TestType_16P0_tags_1)
98 /sizeof(asn_DEF_TestType_16P0_tags_1[0]), /* 1 */
99 asn_DEF_TestType_16P0_tags_1, /* Same as above */
100 sizeof(asn_DEF_TestType_16P0_tags_1)
101 /sizeof(asn_DEF_TestType_16P0_tags_1[0]), /* 1 */
vlm337167e2005-11-26 11:25:14 +0000102 0, /* No PER visible constraints */
vlm0c6d3812006-03-21 03:40:38 +0000103 asn_MBR_TestType_16P0_1,
vlm1a9741e2005-07-03 05:27:19 +0000104 1, /* Elements count */
vlm0c6d3812006-03-21 03:40:38 +0000105 &asn_SPC_TestType_16P0_specs_1 /* Additional specs */
vlm1a9741e2005-07-03 05:27:19 +0000106};
107
vlm0c6d3812006-03-21 03:40:38 +0000108static asn_TYPE_member_t asn_MBR_TestType_16P1_3[] = {
109 { ATF_NOFLAGS, 0, offsetof(struct TestType_16P1, common),
vlm1a9741e2005-07-03 05:27:19 +0000110 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
111 .tag_mode = 0,
vlme0fea712005-08-29 10:31:14 +0000112 .type = &asn_DEF_BOOLEAN,
vlm1a9741e2005-07-03 05:27:19 +0000113 .memb_constraints = 0, /* Defer constraints checking to the member type */
vlm337167e2005-11-26 11:25:14 +0000114 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
vlm0c6d3812006-03-21 03:40:38 +0000115 .default_value = 0,
vlm1a9741e2005-07-03 05:27:19 +0000116 .name = "common"
117 },
118};
vlm0c6d3812006-03-21 03:40:38 +0000119static ber_tlv_tag_t asn_DEF_TestType_16P1_tags_3[] = {
vlm1a9741e2005-07-03 05:27:19 +0000120 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
121};
vlm0c6d3812006-03-21 03:40:38 +0000122static asn_TYPE_tag2member_t asn_MAP_TestType_16P1_tag2el_3[] = {
vlm1a9741e2005-07-03 05:27:19 +0000123 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 } /* common at 21 */
124};
vlm0c6d3812006-03-21 03:40:38 +0000125static asn_SEQUENCE_specifics_t asn_SPC_TestType_16P1_specs_3 = {
126 sizeof(struct TestType_16P1),
127 offsetof(struct TestType_16P1, _asn_ctx),
128 asn_MAP_TestType_16P1_tag2el_3,
vlm1a9741e2005-07-03 05:27:19 +0000129 1, /* Count of tags in the map */
vlm337167e2005-11-26 11:25:14 +0000130 0, 0, 0, /* Optional elements (not needed) */
vlm1a9741e2005-07-03 05:27:19 +0000131 -1, /* Start extensions */
132 -1 /* Stop extensions */
133};
vlm0c6d3812006-03-21 03:40:38 +0000134asn_TYPE_descriptor_t asn_DEF_TestType_16P1 = {
135 "TestType",
136 "TestType",
vlm1a9741e2005-07-03 05:27:19 +0000137 SEQUENCE_free,
138 SEQUENCE_print,
139 SEQUENCE_constraint,
140 SEQUENCE_decode_ber,
141 SEQUENCE_encode_der,
142 SEQUENCE_decode_xer,
143 SEQUENCE_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000144 0, /* No PER decoder, -gen-PER to enable */
vlm1a9741e2005-07-03 05:27:19 +0000145 0, /* Use generic outmost tag fetcher */
vlm0c6d3812006-03-21 03:40:38 +0000146 asn_DEF_TestType_16P1_tags_3,
147 sizeof(asn_DEF_TestType_16P1_tags_3)
148 /sizeof(asn_DEF_TestType_16P1_tags_3[0]), /* 1 */
149 asn_DEF_TestType_16P1_tags_3, /* Same as above */
150 sizeof(asn_DEF_TestType_16P1_tags_3)
151 /sizeof(asn_DEF_TestType_16P1_tags_3[0]), /* 1 */
vlm337167e2005-11-26 11:25:14 +0000152 0, /* No PER visible constraints */
vlm0c6d3812006-03-21 03:40:38 +0000153 asn_MBR_TestType_16P1_3,
vlm1a9741e2005-07-03 05:27:19 +0000154 1, /* Elements count */
vlm0c6d3812006-03-21 03:40:38 +0000155 &asn_SPC_TestType_16P1_specs_3 /* Additional specs */
vlm1a9741e2005-07-03 05:27:19 +0000156};
157
vlm0c6d3812006-03-21 03:40:38 +0000158
159/*** <<< INCLUDES [TestChoice] >>> ***/
160
161#include <TestType.h>
162#include <constr_CHOICE.h>
163
164/*** <<< DEPS [TestChoice] >>> ***/
165
166typedef enum TestChoice_PR {
167 TestChoice_PR_NOTHING, /* No components present */
168 TestChoice_PR_type1,
169 TestChoice_PR_type2,
170} TestChoice_PR;
171
172/*** <<< TYPE-DECLS [TestChoice] >>> ***/
173
174typedef struct TestChoice {
175 TestChoice_PR present;
176 union TestChoice_u {
177 TestType_16P0_t type1;
178 TestType_16P1_t type2;
179 } choice;
180
181 /* Context for parsing across buffer boundaries */
182 asn_struct_ctx_t _asn_ctx;
183} TestChoice_t;
184
185/*** <<< FUNC-DECLS [TestChoice] >>> ***/
186
187extern asn_TYPE_descriptor_t asn_DEF_TestChoice;
188
189/*** <<< STAT-DEFS [TestChoice] >>> ***/
190
vlm1a9741e2005-07-03 05:27:19 +0000191static asn_TYPE_member_t asn_MBR_TestChoice_1[] = {
192 { ATF_NOFLAGS, 0, offsetof(struct TestChoice, choice.type1),
193 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
194 .tag_mode = 0,
vlm0c6d3812006-03-21 03:40:38 +0000195 .type = &asn_DEF_TestType_16P0,
vlm1a9741e2005-07-03 05:27:19 +0000196 .memb_constraints = 0, /* Defer constraints checking to the member type */
vlm337167e2005-11-26 11:25:14 +0000197 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
198 .default_value = 0,
vlm1a9741e2005-07-03 05:27:19 +0000199 .name = "type1"
200 },
201 { ATF_NOFLAGS, 0, offsetof(struct TestChoice, choice.type2),
202 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
203 .tag_mode = -1, /* IMPLICIT tag at current level */
vlm0c6d3812006-03-21 03:40:38 +0000204 .type = &asn_DEF_TestType_16P1,
vlm1a9741e2005-07-03 05:27:19 +0000205 .memb_constraints = 0, /* Defer constraints checking to the member type */
vlm337167e2005-11-26 11:25:14 +0000206 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
207 .default_value = 0,
vlm1a9741e2005-07-03 05:27:19 +0000208 .name = "type2"
209 },
210};
vlm337167e2005-11-26 11:25:14 +0000211static asn_TYPE_tag2member_t asn_MAP_TestChoice_tag2el_1[] = {
vlm0c6d3812006-03-21 03:40:38 +0000212 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* type1 at 20 */
213 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 } /* type2 at 21 */
vlm1a9741e2005-07-03 05:27:19 +0000214};
vlm337167e2005-11-26 11:25:14 +0000215static asn_CHOICE_specifics_t asn_SPC_TestChoice_specs_1 = {
vlm1a9741e2005-07-03 05:27:19 +0000216 sizeof(struct TestChoice),
217 offsetof(struct TestChoice, _asn_ctx),
218 offsetof(struct TestChoice, present),
219 sizeof(((struct TestChoice *)0)->present),
vlm337167e2005-11-26 11:25:14 +0000220 asn_MAP_TestChoice_tag2el_1,
vlm1a9741e2005-07-03 05:27:19 +0000221 2, /* Count of tags in the map */
vlm337167e2005-11-26 11:25:14 +0000222 .canonical_order = 0,
223 .ext_start = -1 /* Extensions start */
vlm1a9741e2005-07-03 05:27:19 +0000224};
225asn_TYPE_descriptor_t asn_DEF_TestChoice = {
226 "TestChoice",
227 "TestChoice",
228 CHOICE_free,
229 CHOICE_print,
230 CHOICE_constraint,
231 CHOICE_decode_ber,
232 CHOICE_encode_der,
233 CHOICE_decode_xer,
234 CHOICE_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000235 0, /* No PER decoder, -gen-PER to enable */
vlm1a9741e2005-07-03 05:27:19 +0000236 CHOICE_outmost_tag,
237 0, /* No effective tags (pointer) */
238 0, /* No effective tags (count) */
239 0, /* No tags (pointer) */
240 0, /* No tags (count) */
vlm337167e2005-11-26 11:25:14 +0000241 0, /* No PER visible constraints */
vlm1a9741e2005-07-03 05:27:19 +0000242 asn_MBR_TestChoice_1,
243 2, /* Elements count */
vlm337167e2005-11-26 11:25:14 +0000244 &asn_SPC_TestChoice_specs_1 /* Additional specs */
vlm1a9741e2005-07-03 05:27:19 +0000245};
246
247
vlm0c6d3812006-03-21 03:40:38 +0000248/*** <<< INCLUDES [AutoType] >>> ***/
vlm1a9741e2005-07-03 05:27:19 +0000249
vlma33a2162005-08-14 02:40:04 +0000250#include <NativeInteger.h>
vlm1a9741e2005-07-03 05:27:19 +0000251#include <constr_SEQUENCE.h>
252#include <BOOLEAN.h>
vlm1a9741e2005-07-03 05:27:19 +0000253
vlm0c6d3812006-03-21 03:40:38 +0000254/*** <<< TYPE-DECLS [AutoType] >>> ***/
vlm1a9741e2005-07-03 05:27:19 +0000255
vlm0c6d3812006-03-21 03:40:38 +0000256typedef struct AutoType_34P0 {
257 long common;
vlm1a9741e2005-07-03 05:27:19 +0000258
259 /* Context for parsing across buffer boundaries */
260 asn_struct_ctx_t _asn_ctx;
vlm0c6d3812006-03-21 03:40:38 +0000261} AutoType_34P0_t;
262typedef struct AutoType_34P1 {
263 BOOLEAN_t common;
264
265 /* Context for parsing across buffer boundaries */
266 asn_struct_ctx_t _asn_ctx;
267} AutoType_34P1_t;
vlm1a9741e2005-07-03 05:27:19 +0000268
vlm0c6d3812006-03-21 03:40:38 +0000269/*** <<< FUNC-DECLS [AutoType] >>> ***/
vlm1a9741e2005-07-03 05:27:19 +0000270
vlm0c6d3812006-03-21 03:40:38 +0000271extern asn_TYPE_descriptor_t asn_DEF_AutoType_34P0;
272extern asn_TYPE_descriptor_t asn_DEF_AutoType_34P1;
vlm1a9741e2005-07-03 05:27:19 +0000273
vlm0c6d3812006-03-21 03:40:38 +0000274/*** <<< CODE [AutoType] >>> ***/
vlm1a9741e2005-07-03 05:27:19 +0000275
276static int
vlm0c6d3812006-03-21 03:40:38 +0000277memb_common_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
vlm1a9741e2005-07-03 05:27:19 +0000278 asn_app_consume_bytes_f *app_errlog, void *app_key) {
vlm1a9741e2005-07-03 05:27:19 +0000279 long value;
280
281 if(!sptr) {
282 _ASN_ERRLOG(app_errlog, app_key,
283 "%s: value not given (%s:%d)",
284 td->name, __FILE__, __LINE__);
285 return -1;
286 }
287
vlma33a2162005-08-14 02:40:04 +0000288 value = *(const long *)sptr;
vlm1a9741e2005-07-03 05:27:19 +0000289
290 if((value == 0)) {
291 /* Constraint check succeeded */
292 return 0;
293 } else {
294 _ASN_ERRLOG(app_errlog, app_key,
295 "%s: constraint failed (%s:%d)",
296 td->name, __FILE__, __LINE__);
297 return -1;
298 }
299}
300
301static int
vlm0c6d3812006-03-21 03:40:38 +0000302memb_common_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr,
vlm1a9741e2005-07-03 05:27:19 +0000303 asn_app_consume_bytes_f *app_errlog, void *app_key) {
304 BOOLEAN_t value;
305
306 if(!sptr) {
307 _ASN_ERRLOG(app_errlog, app_key,
308 "%s: value not given (%s:%d)",
309 td->name, __FILE__, __LINE__);
310 return -1;
311 }
312
313 value = (*(const long *)sptr) ? 1 : 0;
314
315 if((value <= 0)) {
316 /* Constraint check succeeded */
317 return 0;
318 } else {
319 _ASN_ERRLOG(app_errlog, app_key,
320 "%s: constraint failed (%s:%d)",
321 td->name, __FILE__, __LINE__);
322 return -1;
323 }
324}
325
326
vlm0c6d3812006-03-21 03:40:38 +0000327/*** <<< STAT-DEFS [AutoType] >>> ***/
vlm1a9741e2005-07-03 05:27:19 +0000328
vlm0c6d3812006-03-21 03:40:38 +0000329static asn_TYPE_member_t asn_MBR_AutoType_34P0_1[] = {
330 { ATF_NOFLAGS, 0, offsetof(struct AutoType_34P0, common),
vlm1a9741e2005-07-03 05:27:19 +0000331 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
332 .tag_mode = -1, /* IMPLICIT tag at current level */
vlme0fea712005-08-29 10:31:14 +0000333 .type = &asn_DEF_NativeInteger,
vlm0c6d3812006-03-21 03:40:38 +0000334 .memb_constraints = memb_common_constraint_1,
vlm337167e2005-11-26 11:25:14 +0000335 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
336 .default_value = 0,
vlm1a9741e2005-07-03 05:27:19 +0000337 .name = "common"
338 },
339};
vlm0c6d3812006-03-21 03:40:38 +0000340static ber_tlv_tag_t asn_DEF_AutoType_34P0_tags_1[] = {
vlm1a9741e2005-07-03 05:27:19 +0000341 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
342};
vlm0c6d3812006-03-21 03:40:38 +0000343static asn_TYPE_tag2member_t asn_MAP_AutoType_34P0_tag2el_1[] = {
vlm1a9741e2005-07-03 05:27:19 +0000344 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common at 37 */
345};
vlm0c6d3812006-03-21 03:40:38 +0000346static asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P0_specs_1 = {
347 sizeof(struct AutoType_34P0),
348 offsetof(struct AutoType_34P0, _asn_ctx),
349 asn_MAP_AutoType_34P0_tag2el_1,
vlm1a9741e2005-07-03 05:27:19 +0000350 1, /* Count of tags in the map */
vlm337167e2005-11-26 11:25:14 +0000351 0, 0, 0, /* Optional elements (not needed) */
vlm1a9741e2005-07-03 05:27:19 +0000352 -1, /* Start extensions */
353 -1 /* Stop extensions */
354};
vlm0c6d3812006-03-21 03:40:38 +0000355asn_TYPE_descriptor_t asn_DEF_AutoType_34P0 = {
356 "AutoType",
357 "AutoType",
vlm1a9741e2005-07-03 05:27:19 +0000358 SEQUENCE_free,
359 SEQUENCE_print,
360 SEQUENCE_constraint,
361 SEQUENCE_decode_ber,
362 SEQUENCE_encode_der,
363 SEQUENCE_decode_xer,
364 SEQUENCE_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000365 0, /* No PER decoder, -gen-PER to enable */
vlm1a9741e2005-07-03 05:27:19 +0000366 0, /* Use generic outmost tag fetcher */
vlm0c6d3812006-03-21 03:40:38 +0000367 asn_DEF_AutoType_34P0_tags_1,
368 sizeof(asn_DEF_AutoType_34P0_tags_1)
369 /sizeof(asn_DEF_AutoType_34P0_tags_1[0]), /* 1 */
370 asn_DEF_AutoType_34P0_tags_1, /* Same as above */
371 sizeof(asn_DEF_AutoType_34P0_tags_1)
372 /sizeof(asn_DEF_AutoType_34P0_tags_1[0]), /* 1 */
vlm337167e2005-11-26 11:25:14 +0000373 0, /* No PER visible constraints */
vlm0c6d3812006-03-21 03:40:38 +0000374 asn_MBR_AutoType_34P0_1,
vlm1a9741e2005-07-03 05:27:19 +0000375 1, /* Elements count */
vlm0c6d3812006-03-21 03:40:38 +0000376 &asn_SPC_AutoType_34P0_specs_1 /* Additional specs */
vlm1a9741e2005-07-03 05:27:19 +0000377};
378
vlm0c6d3812006-03-21 03:40:38 +0000379static asn_TYPE_member_t asn_MBR_AutoType_34P1_3[] = {
380 { ATF_NOFLAGS, 0, offsetof(struct AutoType_34P1, common),
vlm1a9741e2005-07-03 05:27:19 +0000381 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
382 .tag_mode = -1, /* IMPLICIT tag at current level */
vlme0fea712005-08-29 10:31:14 +0000383 .type = &asn_DEF_BOOLEAN,
vlm0c6d3812006-03-21 03:40:38 +0000384 .memb_constraints = memb_common_constraint_3,
vlm337167e2005-11-26 11:25:14 +0000385 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
386 .default_value = 0,
vlm1a9741e2005-07-03 05:27:19 +0000387 .name = "common"
388 },
389};
vlm0c6d3812006-03-21 03:40:38 +0000390static ber_tlv_tag_t asn_DEF_AutoType_34P1_tags_3[] = {
vlm1a9741e2005-07-03 05:27:19 +0000391 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
392};
vlm0c6d3812006-03-21 03:40:38 +0000393static asn_TYPE_tag2member_t asn_MAP_AutoType_34P1_tag2el_3[] = {
vlm1a9741e2005-07-03 05:27:19 +0000394 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common at 38 */
395};
vlm0c6d3812006-03-21 03:40:38 +0000396static asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P1_specs_3 = {
397 sizeof(struct AutoType_34P1),
398 offsetof(struct AutoType_34P1, _asn_ctx),
399 asn_MAP_AutoType_34P1_tag2el_3,
vlm1a9741e2005-07-03 05:27:19 +0000400 1, /* Count of tags in the map */
vlm337167e2005-11-26 11:25:14 +0000401 0, 0, 0, /* Optional elements (not needed) */
vlm1a9741e2005-07-03 05:27:19 +0000402 -1, /* Start extensions */
403 -1 /* Stop extensions */
404};
vlm0c6d3812006-03-21 03:40:38 +0000405asn_TYPE_descriptor_t asn_DEF_AutoType_34P1 = {
406 "AutoType",
407 "AutoType",
vlm1a9741e2005-07-03 05:27:19 +0000408 SEQUENCE_free,
409 SEQUENCE_print,
410 SEQUENCE_constraint,
411 SEQUENCE_decode_ber,
412 SEQUENCE_encode_der,
413 SEQUENCE_decode_xer,
414 SEQUENCE_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000415 0, /* No PER decoder, -gen-PER to enable */
vlm1a9741e2005-07-03 05:27:19 +0000416 0, /* Use generic outmost tag fetcher */
vlm0c6d3812006-03-21 03:40:38 +0000417 asn_DEF_AutoType_34P1_tags_3,
418 sizeof(asn_DEF_AutoType_34P1_tags_3)
419 /sizeof(asn_DEF_AutoType_34P1_tags_3[0]), /* 1 */
420 asn_DEF_AutoType_34P1_tags_3, /* Same as above */
421 sizeof(asn_DEF_AutoType_34P1_tags_3)
422 /sizeof(asn_DEF_AutoType_34P1_tags_3[0]), /* 1 */
vlm337167e2005-11-26 11:25:14 +0000423 0, /* No PER visible constraints */
vlm0c6d3812006-03-21 03:40:38 +0000424 asn_MBR_AutoType_34P1_3,
vlm1a9741e2005-07-03 05:27:19 +0000425 1, /* Elements count */
vlm0c6d3812006-03-21 03:40:38 +0000426 &asn_SPC_AutoType_34P1_specs_3 /* Additional specs */
vlm1a9741e2005-07-03 05:27:19 +0000427};
428
vlm0c6d3812006-03-21 03:40:38 +0000429
430/*** <<< INCLUDES [AutoChoice] >>> ***/
431
432#include <AutoType.h>
433#include <constr_CHOICE.h>
434
435/*** <<< DEPS [AutoChoice] >>> ***/
436
437typedef enum AutoChoice_PR {
438 AutoChoice_PR_NOTHING, /* No components present */
439 AutoChoice_PR_type1,
440 AutoChoice_PR_type2,
441} AutoChoice_PR;
442
443/*** <<< TYPE-DECLS [AutoChoice] >>> ***/
444
445typedef struct AutoChoice {
446 AutoChoice_PR present;
447 union AutoChoice_u {
448 AutoType_34P0_t type1;
449 AutoType_34P1_t type2;
450 } choice;
451
452 /* Context for parsing across buffer boundaries */
453 asn_struct_ctx_t _asn_ctx;
454} AutoChoice_t;
455
456/*** <<< FUNC-DECLS [AutoChoice] >>> ***/
457
458extern asn_TYPE_descriptor_t asn_DEF_AutoChoice;
459
460/*** <<< STAT-DEFS [AutoChoice] >>> ***/
461
vlm1a9741e2005-07-03 05:27:19 +0000462static asn_TYPE_member_t asn_MBR_AutoChoice_1[] = {
463 { ATF_NOFLAGS, 0, offsetof(struct AutoChoice, choice.type1),
464 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
465 .tag_mode = -1, /* IMPLICIT tag at current level */
vlm0c6d3812006-03-21 03:40:38 +0000466 .type = &asn_DEF_AutoType_34P0,
vlm1a9741e2005-07-03 05:27:19 +0000467 .memb_constraints = 0, /* Defer constraints checking to the member type */
vlm337167e2005-11-26 11:25:14 +0000468 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
469 .default_value = 0,
vlm1a9741e2005-07-03 05:27:19 +0000470 .name = "type1"
471 },
472 { ATF_NOFLAGS, 0, offsetof(struct AutoChoice, choice.type2),
473 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
474 .tag_mode = -1, /* IMPLICIT tag at current level */
vlm0c6d3812006-03-21 03:40:38 +0000475 .type = &asn_DEF_AutoType_34P1,
vlm1a9741e2005-07-03 05:27:19 +0000476 .memb_constraints = 0, /* Defer constraints checking to the member type */
vlm337167e2005-11-26 11:25:14 +0000477 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
478 .default_value = 0,
vlm1a9741e2005-07-03 05:27:19 +0000479 .name = "type2"
480 },
481};
vlm337167e2005-11-26 11:25:14 +0000482static asn_TYPE_tag2member_t asn_MAP_AutoChoice_tag2el_1[] = {
vlm0c6d3812006-03-21 03:40:38 +0000483 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* type1 at 37 */
484 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* type2 at 38 */
vlm1a9741e2005-07-03 05:27:19 +0000485};
vlm337167e2005-11-26 11:25:14 +0000486static asn_CHOICE_specifics_t asn_SPC_AutoChoice_specs_1 = {
vlm1a9741e2005-07-03 05:27:19 +0000487 sizeof(struct AutoChoice),
488 offsetof(struct AutoChoice, _asn_ctx),
489 offsetof(struct AutoChoice, present),
490 sizeof(((struct AutoChoice *)0)->present),
vlm337167e2005-11-26 11:25:14 +0000491 asn_MAP_AutoChoice_tag2el_1,
vlm1a9741e2005-07-03 05:27:19 +0000492 2, /* Count of tags in the map */
vlm337167e2005-11-26 11:25:14 +0000493 .canonical_order = 0,
494 .ext_start = -1 /* Extensions start */
vlm1a9741e2005-07-03 05:27:19 +0000495};
496asn_TYPE_descriptor_t asn_DEF_AutoChoice = {
497 "AutoChoice",
498 "AutoChoice",
499 CHOICE_free,
500 CHOICE_print,
501 CHOICE_constraint,
502 CHOICE_decode_ber,
503 CHOICE_encode_der,
504 CHOICE_decode_xer,
505 CHOICE_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000506 0, /* No PER decoder, -gen-PER to enable */
vlm1a9741e2005-07-03 05:27:19 +0000507 CHOICE_outmost_tag,
508 0, /* No effective tags (pointer) */
509 0, /* No effective tags (count) */
510 0, /* No tags (pointer) */
511 0, /* No tags (count) */
vlm337167e2005-11-26 11:25:14 +0000512 0, /* No PER visible constraints */
vlm1a9741e2005-07-03 05:27:19 +0000513 asn_MBR_AutoChoice_1,
514 2, /* Elements count */
vlm337167e2005-11-26 11:25:14 +0000515 &asn_SPC_AutoChoice_specs_1 /* Additional specs */
vlm1a9741e2005-07-03 05:27:19 +0000516};
517