blob: d3a61c67eca1bae8332dc861e4ac1ac4155c2572 [file] [log] [blame]
Lev Walkin15750402005-07-03 05:27:19 +00001
Lev Walkina00d6b32006-03-21 03:40:38 +00002/*** <<< INCLUDES [TestType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +00003
Lev Walkinc3f0b892005-08-14 02:40:04 +00004#include <NativeInteger.h>
Lev Walkin15750402005-07-03 05:27:19 +00005#include <constr_SEQUENCE.h>
6#include <BOOLEAN.h>
Lev Walkin15750402005-07-03 05:27:19 +00007
Lev Walkina00d6b32006-03-21 03:40:38 +00008/*** <<< TYPE-DECLS [TestType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +00009
Lev Walkina00d6b32006-03-21 03:40:38 +000010typedef struct TestType_16P0 {
Lev Walkin0c0bca62006-03-21 04:48:15 +000011 long common /* DEFAULT 0 */;
Lev Walkin15750402005-07-03 05:27:19 +000012
13 /* Context for parsing across buffer boundaries */
14 asn_struct_ctx_t _asn_ctx;
Lev Walkina00d6b32006-03-21 03:40:38 +000015} TestType_16P0_t;
16typedef struct TestType_16P1 {
Lev Walkin0c0bca62006-03-21 04:48:15 +000017 BOOLEAN_t common /* DEFAULT 0 */;
Lev Walkina00d6b32006-03-21 03:40:38 +000018
19 /* Context for parsing across buffer boundaries */
20 asn_struct_ctx_t _asn_ctx;
21} TestType_16P1_t;
Lev Walkin15750402005-07-03 05:27:19 +000022
Lev Walkina00d6b32006-03-21 03:40:38 +000023/*** <<< FUNC-DECLS [TestType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +000024
Lev Walkina00d6b32006-03-21 03:40:38 +000025extern asn_TYPE_descriptor_t asn_DEF_TestType_16P0;
26extern asn_TYPE_descriptor_t asn_DEF_TestType_16P1;
Lev Walkin15750402005-07-03 05:27:19 +000027
Lev Walkina00d6b32006-03-21 03:40:38 +000028/*** <<< CODE [TestType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +000029
30static int
Lev Walkina00d6b32006-03-21 03:40:38 +000031memb_common_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin15750402005-07-03 05:27:19 +000032 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin15750402005-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
Lev Walkinc3f0b892005-08-14 02:40:04 +000042 value = *(const long *)sptr;
Lev Walkin15750402005-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
Lev Walkina00d6b32006-03-21 03:40:38 +000056/*** <<< STAT-DEFS [TestType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +000057
Lev Walkin0c0bca62006-03-21 04:48:15 +000058static int asn_DFL_2_set_0(void **sptr) {
59 long *st = *sptr;
60
61 if(!st) {
62 st = (*sptr = CALLOC(1, sizeof(*st)));
63 if(!st) return -1;
64 }
65
66 /* Install default value 0 */
67 *st = 0;
68 return 0;
69}
Lev Walkina00d6b32006-03-21 03:40:38 +000070static asn_TYPE_member_t asn_MBR_TestType_16P0_1[] = {
Lev Walkin0c0bca62006-03-21 04:48:15 +000071 { ATF_NOFLAGS, 1, offsetof(struct TestType_16P0, common),
Lev Walkin15750402005-07-03 05:27:19 +000072 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
73 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +000074 .type = &asn_DEF_NativeInteger,
Lev Walkina00d6b32006-03-21 03:40:38 +000075 .memb_constraints = memb_common_constraint_1,
Lev Walkin59b176e2005-11-26 11:25:14 +000076 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
Lev Walkin0c0bca62006-03-21 04:48:15 +000077 .default_value = asn_DFL_2_set_0, /* DEFAULT 0 */
Lev Walkin15750402005-07-03 05:27:19 +000078 .name = "common"
79 },
80};
Lev Walkina00d6b32006-03-21 03:40:38 +000081static ber_tlv_tag_t asn_DEF_TestType_16P0_tags_1[] = {
Lev Walkin15750402005-07-03 05:27:19 +000082 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
83};
Lev Walkina00d6b32006-03-21 03:40:38 +000084static asn_TYPE_tag2member_t asn_MAP_TestType_16P0_tag2el_1[] = {
Lev Walkin15750402005-07-03 05:27:19 +000085 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* common at 20 */
86};
Lev Walkina00d6b32006-03-21 03:40:38 +000087static asn_SEQUENCE_specifics_t asn_SPC_TestType_16P0_specs_1 = {
88 sizeof(struct TestType_16P0),
89 offsetof(struct TestType_16P0, _asn_ctx),
90 asn_MAP_TestType_16P0_tag2el_1,
Lev Walkin15750402005-07-03 05:27:19 +000091 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +000092 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin15750402005-07-03 05:27:19 +000093 -1, /* Start extensions */
94 -1 /* Stop extensions */
95};
Lev Walkina00d6b32006-03-21 03:40:38 +000096asn_TYPE_descriptor_t asn_DEF_TestType_16P0 = {
97 "TestType",
98 "TestType",
Lev Walkin15750402005-07-03 05:27:19 +000099 SEQUENCE_free,
100 SEQUENCE_print,
101 SEQUENCE_constraint,
102 SEQUENCE_decode_ber,
103 SEQUENCE_encode_der,
104 SEQUENCE_decode_xer,
105 SEQUENCE_encode_xer,
Lev Walkin59b176e2005-11-26 11:25:14 +0000106 0, /* No PER decoder, -gen-PER to enable */
Lev Walkin15750402005-07-03 05:27:19 +0000107 0, /* Use generic outmost tag fetcher */
Lev Walkina00d6b32006-03-21 03:40:38 +0000108 asn_DEF_TestType_16P0_tags_1,
109 sizeof(asn_DEF_TestType_16P0_tags_1)
110 /sizeof(asn_DEF_TestType_16P0_tags_1[0]), /* 1 */
111 asn_DEF_TestType_16P0_tags_1, /* Same as above */
112 sizeof(asn_DEF_TestType_16P0_tags_1)
113 /sizeof(asn_DEF_TestType_16P0_tags_1[0]), /* 1 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000114 0, /* No PER visible constraints */
Lev Walkina00d6b32006-03-21 03:40:38 +0000115 asn_MBR_TestType_16P0_1,
Lev Walkin15750402005-07-03 05:27:19 +0000116 1, /* Elements count */
Lev Walkina00d6b32006-03-21 03:40:38 +0000117 &asn_SPC_TestType_16P0_specs_1 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000118};
119
Lev Walkin0c0bca62006-03-21 04:48:15 +0000120static int asn_DFL_4_set_0(void **sptr) {
121 BOOLEAN_t *st = *sptr;
122
123 if(!st) {
124 st = (*sptr = CALLOC(1, sizeof(*st)));
125 if(!st) return -1;
126 }
127
128 /* Install default value 0 */
129 *st = 0;
130 return 0;
131}
Lev Walkina00d6b32006-03-21 03:40:38 +0000132static asn_TYPE_member_t asn_MBR_TestType_16P1_3[] = {
Lev Walkin0c0bca62006-03-21 04:48:15 +0000133 { ATF_NOFLAGS, 1, offsetof(struct TestType_16P1, common),
Lev Walkin15750402005-07-03 05:27:19 +0000134 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
135 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000136 .type = &asn_DEF_BOOLEAN,
Lev Walkin15750402005-07-03 05:27:19 +0000137 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000138 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
Lev Walkin0c0bca62006-03-21 04:48:15 +0000139 .default_value = asn_DFL_4_set_0, /* DEFAULT 0 */
Lev Walkin15750402005-07-03 05:27:19 +0000140 .name = "common"
141 },
142};
Lev Walkina00d6b32006-03-21 03:40:38 +0000143static ber_tlv_tag_t asn_DEF_TestType_16P1_tags_3[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000144 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
145};
Lev Walkina00d6b32006-03-21 03:40:38 +0000146static asn_TYPE_tag2member_t asn_MAP_TestType_16P1_tag2el_3[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000147 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 } /* common at 21 */
148};
Lev Walkina00d6b32006-03-21 03:40:38 +0000149static asn_SEQUENCE_specifics_t asn_SPC_TestType_16P1_specs_3 = {
150 sizeof(struct TestType_16P1),
151 offsetof(struct TestType_16P1, _asn_ctx),
152 asn_MAP_TestType_16P1_tag2el_3,
Lev Walkin15750402005-07-03 05:27:19 +0000153 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000154 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin15750402005-07-03 05:27:19 +0000155 -1, /* Start extensions */
156 -1 /* Stop extensions */
157};
Lev Walkina00d6b32006-03-21 03:40:38 +0000158asn_TYPE_descriptor_t asn_DEF_TestType_16P1 = {
159 "TestType",
160 "TestType",
Lev Walkin15750402005-07-03 05:27:19 +0000161 SEQUENCE_free,
162 SEQUENCE_print,
163 SEQUENCE_constraint,
164 SEQUENCE_decode_ber,
165 SEQUENCE_encode_der,
166 SEQUENCE_decode_xer,
167 SEQUENCE_encode_xer,
Lev Walkin59b176e2005-11-26 11:25:14 +0000168 0, /* No PER decoder, -gen-PER to enable */
Lev Walkin15750402005-07-03 05:27:19 +0000169 0, /* Use generic outmost tag fetcher */
Lev Walkina00d6b32006-03-21 03:40:38 +0000170 asn_DEF_TestType_16P1_tags_3,
171 sizeof(asn_DEF_TestType_16P1_tags_3)
172 /sizeof(asn_DEF_TestType_16P1_tags_3[0]), /* 1 */
173 asn_DEF_TestType_16P1_tags_3, /* Same as above */
174 sizeof(asn_DEF_TestType_16P1_tags_3)
175 /sizeof(asn_DEF_TestType_16P1_tags_3[0]), /* 1 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000176 0, /* No PER visible constraints */
Lev Walkina00d6b32006-03-21 03:40:38 +0000177 asn_MBR_TestType_16P1_3,
Lev Walkin15750402005-07-03 05:27:19 +0000178 1, /* Elements count */
Lev Walkina00d6b32006-03-21 03:40:38 +0000179 &asn_SPC_TestType_16P1_specs_3 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000180};
181
Lev Walkina00d6b32006-03-21 03:40:38 +0000182
183/*** <<< INCLUDES [TestChoice] >>> ***/
184
185#include <TestType.h>
186#include <constr_CHOICE.h>
187
188/*** <<< DEPS [TestChoice] >>> ***/
189
190typedef enum TestChoice_PR {
191 TestChoice_PR_NOTHING, /* No components present */
192 TestChoice_PR_type1,
193 TestChoice_PR_type2,
194} TestChoice_PR;
195
196/*** <<< TYPE-DECLS [TestChoice] >>> ***/
197
198typedef struct TestChoice {
199 TestChoice_PR present;
200 union TestChoice_u {
201 TestType_16P0_t type1;
202 TestType_16P1_t type2;
203 } choice;
204
205 /* Context for parsing across buffer boundaries */
206 asn_struct_ctx_t _asn_ctx;
207} TestChoice_t;
208
209/*** <<< FUNC-DECLS [TestChoice] >>> ***/
210
211extern asn_TYPE_descriptor_t asn_DEF_TestChoice;
212
213/*** <<< STAT-DEFS [TestChoice] >>> ***/
214
Lev Walkin15750402005-07-03 05:27:19 +0000215static asn_TYPE_member_t asn_MBR_TestChoice_1[] = {
216 { ATF_NOFLAGS, 0, offsetof(struct TestChoice, choice.type1),
217 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
218 .tag_mode = 0,
Lev Walkina00d6b32006-03-21 03:40:38 +0000219 .type = &asn_DEF_TestType_16P0,
Lev Walkin15750402005-07-03 05:27:19 +0000220 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000221 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
222 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000223 .name = "type1"
224 },
225 { ATF_NOFLAGS, 0, offsetof(struct TestChoice, choice.type2),
226 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
227 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkina00d6b32006-03-21 03:40:38 +0000228 .type = &asn_DEF_TestType_16P1,
Lev Walkin15750402005-07-03 05:27:19 +0000229 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000230 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
231 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000232 .name = "type2"
233 },
234};
Lev Walkin59b176e2005-11-26 11:25:14 +0000235static asn_TYPE_tag2member_t asn_MAP_TestChoice_tag2el_1[] = {
Lev Walkina00d6b32006-03-21 03:40:38 +0000236 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* type1 at 20 */
237 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 } /* type2 at 21 */
Lev Walkin15750402005-07-03 05:27:19 +0000238};
Lev Walkin59b176e2005-11-26 11:25:14 +0000239static asn_CHOICE_specifics_t asn_SPC_TestChoice_specs_1 = {
Lev Walkin15750402005-07-03 05:27:19 +0000240 sizeof(struct TestChoice),
241 offsetof(struct TestChoice, _asn_ctx),
242 offsetof(struct TestChoice, present),
243 sizeof(((struct TestChoice *)0)->present),
Lev Walkin59b176e2005-11-26 11:25:14 +0000244 asn_MAP_TestChoice_tag2el_1,
Lev Walkin15750402005-07-03 05:27:19 +0000245 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000246 .canonical_order = 0,
247 .ext_start = -1 /* Extensions start */
Lev Walkin15750402005-07-03 05:27:19 +0000248};
249asn_TYPE_descriptor_t asn_DEF_TestChoice = {
250 "TestChoice",
251 "TestChoice",
252 CHOICE_free,
253 CHOICE_print,
254 CHOICE_constraint,
255 CHOICE_decode_ber,
256 CHOICE_encode_der,
257 CHOICE_decode_xer,
258 CHOICE_encode_xer,
Lev Walkin59b176e2005-11-26 11:25:14 +0000259 0, /* No PER decoder, -gen-PER to enable */
Lev Walkin15750402005-07-03 05:27:19 +0000260 CHOICE_outmost_tag,
261 0, /* No effective tags (pointer) */
262 0, /* No effective tags (count) */
263 0, /* No tags (pointer) */
264 0, /* No tags (count) */
Lev Walkin59b176e2005-11-26 11:25:14 +0000265 0, /* No PER visible constraints */
Lev Walkin15750402005-07-03 05:27:19 +0000266 asn_MBR_TestChoice_1,
267 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000268 &asn_SPC_TestChoice_specs_1 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000269};
270
271
Lev Walkina00d6b32006-03-21 03:40:38 +0000272/*** <<< INCLUDES [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000273
Lev Walkinc3f0b892005-08-14 02:40:04 +0000274#include <NativeInteger.h>
Lev Walkin15750402005-07-03 05:27:19 +0000275#include <constr_SEQUENCE.h>
276#include <BOOLEAN.h>
Lev Walkin15750402005-07-03 05:27:19 +0000277
Lev Walkina00d6b32006-03-21 03:40:38 +0000278/*** <<< TYPE-DECLS [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000279
Lev Walkina00d6b32006-03-21 03:40:38 +0000280typedef struct AutoType_34P0 {
281 long common;
Lev Walkin15750402005-07-03 05:27:19 +0000282
283 /* Context for parsing across buffer boundaries */
284 asn_struct_ctx_t _asn_ctx;
Lev Walkina00d6b32006-03-21 03:40:38 +0000285} AutoType_34P0_t;
286typedef struct AutoType_34P1 {
287 BOOLEAN_t common;
288
289 /* Context for parsing across buffer boundaries */
290 asn_struct_ctx_t _asn_ctx;
291} AutoType_34P1_t;
Lev Walkin15750402005-07-03 05:27:19 +0000292
Lev Walkina00d6b32006-03-21 03:40:38 +0000293/*** <<< FUNC-DECLS [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000294
Lev Walkina00d6b32006-03-21 03:40:38 +0000295extern asn_TYPE_descriptor_t asn_DEF_AutoType_34P0;
296extern asn_TYPE_descriptor_t asn_DEF_AutoType_34P1;
Lev Walkin15750402005-07-03 05:27:19 +0000297
Lev Walkina00d6b32006-03-21 03:40:38 +0000298/*** <<< CODE [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000299
300static int
Lev Walkina00d6b32006-03-21 03:40:38 +0000301memb_common_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin15750402005-07-03 05:27:19 +0000302 asn_app_consume_bytes_f *app_errlog, void *app_key) {
Lev Walkin15750402005-07-03 05:27:19 +0000303 long value;
304
305 if(!sptr) {
306 _ASN_ERRLOG(app_errlog, app_key,
307 "%s: value not given (%s:%d)",
308 td->name, __FILE__, __LINE__);
309 return -1;
310 }
311
Lev Walkinc3f0b892005-08-14 02:40:04 +0000312 value = *(const long *)sptr;
Lev Walkin15750402005-07-03 05:27:19 +0000313
314 if((value == 0)) {
315 /* Constraint check succeeded */
316 return 0;
317 } else {
318 _ASN_ERRLOG(app_errlog, app_key,
319 "%s: constraint failed (%s:%d)",
320 td->name, __FILE__, __LINE__);
321 return -1;
322 }
323}
324
325static int
Lev Walkina00d6b32006-03-21 03:40:38 +0000326memb_common_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin15750402005-07-03 05:27:19 +0000327 asn_app_consume_bytes_f *app_errlog, void *app_key) {
328 BOOLEAN_t value;
329
330 if(!sptr) {
331 _ASN_ERRLOG(app_errlog, app_key,
332 "%s: value not given (%s:%d)",
333 td->name, __FILE__, __LINE__);
334 return -1;
335 }
336
337 value = (*(const long *)sptr) ? 1 : 0;
338
339 if((value <= 0)) {
340 /* Constraint check succeeded */
341 return 0;
342 } else {
343 _ASN_ERRLOG(app_errlog, app_key,
344 "%s: constraint failed (%s:%d)",
345 td->name, __FILE__, __LINE__);
346 return -1;
347 }
348}
349
350
Lev Walkina00d6b32006-03-21 03:40:38 +0000351/*** <<< STAT-DEFS [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000352
Lev Walkina00d6b32006-03-21 03:40:38 +0000353static asn_TYPE_member_t asn_MBR_AutoType_34P0_1[] = {
354 { ATF_NOFLAGS, 0, offsetof(struct AutoType_34P0, common),
Lev Walkin15750402005-07-03 05:27:19 +0000355 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
356 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000357 .type = &asn_DEF_NativeInteger,
Lev Walkina00d6b32006-03-21 03:40:38 +0000358 .memb_constraints = memb_common_constraint_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000359 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
360 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000361 .name = "common"
362 },
363};
Lev Walkina00d6b32006-03-21 03:40:38 +0000364static ber_tlv_tag_t asn_DEF_AutoType_34P0_tags_1[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000365 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
366};
Lev Walkina00d6b32006-03-21 03:40:38 +0000367static asn_TYPE_tag2member_t asn_MAP_AutoType_34P0_tag2el_1[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000368 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common at 37 */
369};
Lev Walkina00d6b32006-03-21 03:40:38 +0000370static asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P0_specs_1 = {
371 sizeof(struct AutoType_34P0),
372 offsetof(struct AutoType_34P0, _asn_ctx),
373 asn_MAP_AutoType_34P0_tag2el_1,
Lev Walkin15750402005-07-03 05:27:19 +0000374 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000375 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin15750402005-07-03 05:27:19 +0000376 -1, /* Start extensions */
377 -1 /* Stop extensions */
378};
Lev Walkina00d6b32006-03-21 03:40:38 +0000379asn_TYPE_descriptor_t asn_DEF_AutoType_34P0 = {
380 "AutoType",
381 "AutoType",
Lev Walkin15750402005-07-03 05:27:19 +0000382 SEQUENCE_free,
383 SEQUENCE_print,
384 SEQUENCE_constraint,
385 SEQUENCE_decode_ber,
386 SEQUENCE_encode_der,
387 SEQUENCE_decode_xer,
388 SEQUENCE_encode_xer,
Lev Walkin59b176e2005-11-26 11:25:14 +0000389 0, /* No PER decoder, -gen-PER to enable */
Lev Walkin15750402005-07-03 05:27:19 +0000390 0, /* Use generic outmost tag fetcher */
Lev Walkina00d6b32006-03-21 03:40:38 +0000391 asn_DEF_AutoType_34P0_tags_1,
392 sizeof(asn_DEF_AutoType_34P0_tags_1)
393 /sizeof(asn_DEF_AutoType_34P0_tags_1[0]), /* 1 */
394 asn_DEF_AutoType_34P0_tags_1, /* Same as above */
395 sizeof(asn_DEF_AutoType_34P0_tags_1)
396 /sizeof(asn_DEF_AutoType_34P0_tags_1[0]), /* 1 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000397 0, /* No PER visible constraints */
Lev Walkina00d6b32006-03-21 03:40:38 +0000398 asn_MBR_AutoType_34P0_1,
Lev Walkin15750402005-07-03 05:27:19 +0000399 1, /* Elements count */
Lev Walkina00d6b32006-03-21 03:40:38 +0000400 &asn_SPC_AutoType_34P0_specs_1 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000401};
402
Lev Walkina00d6b32006-03-21 03:40:38 +0000403static asn_TYPE_member_t asn_MBR_AutoType_34P1_3[] = {
404 { ATF_NOFLAGS, 0, offsetof(struct AutoType_34P1, common),
Lev Walkin15750402005-07-03 05:27:19 +0000405 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
406 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000407 .type = &asn_DEF_BOOLEAN,
Lev Walkina00d6b32006-03-21 03:40:38 +0000408 .memb_constraints = memb_common_constraint_3,
Lev Walkin59b176e2005-11-26 11:25:14 +0000409 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
410 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000411 .name = "common"
412 },
413};
Lev Walkina00d6b32006-03-21 03:40:38 +0000414static ber_tlv_tag_t asn_DEF_AutoType_34P1_tags_3[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000415 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
416};
Lev Walkina00d6b32006-03-21 03:40:38 +0000417static asn_TYPE_tag2member_t asn_MAP_AutoType_34P1_tag2el_3[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000418 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common at 38 */
419};
Lev Walkina00d6b32006-03-21 03:40:38 +0000420static asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P1_specs_3 = {
421 sizeof(struct AutoType_34P1),
422 offsetof(struct AutoType_34P1, _asn_ctx),
423 asn_MAP_AutoType_34P1_tag2el_3,
Lev Walkin15750402005-07-03 05:27:19 +0000424 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000425 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin15750402005-07-03 05:27:19 +0000426 -1, /* Start extensions */
427 -1 /* Stop extensions */
428};
Lev Walkina00d6b32006-03-21 03:40:38 +0000429asn_TYPE_descriptor_t asn_DEF_AutoType_34P1 = {
430 "AutoType",
431 "AutoType",
Lev Walkin15750402005-07-03 05:27:19 +0000432 SEQUENCE_free,
433 SEQUENCE_print,
434 SEQUENCE_constraint,
435 SEQUENCE_decode_ber,
436 SEQUENCE_encode_der,
437 SEQUENCE_decode_xer,
438 SEQUENCE_encode_xer,
Lev Walkin59b176e2005-11-26 11:25:14 +0000439 0, /* No PER decoder, -gen-PER to enable */
Lev Walkin15750402005-07-03 05:27:19 +0000440 0, /* Use generic outmost tag fetcher */
Lev Walkina00d6b32006-03-21 03:40:38 +0000441 asn_DEF_AutoType_34P1_tags_3,
442 sizeof(asn_DEF_AutoType_34P1_tags_3)
443 /sizeof(asn_DEF_AutoType_34P1_tags_3[0]), /* 1 */
444 asn_DEF_AutoType_34P1_tags_3, /* Same as above */
445 sizeof(asn_DEF_AutoType_34P1_tags_3)
446 /sizeof(asn_DEF_AutoType_34P1_tags_3[0]), /* 1 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000447 0, /* No PER visible constraints */
Lev Walkina00d6b32006-03-21 03:40:38 +0000448 asn_MBR_AutoType_34P1_3,
Lev Walkin15750402005-07-03 05:27:19 +0000449 1, /* Elements count */
Lev Walkina00d6b32006-03-21 03:40:38 +0000450 &asn_SPC_AutoType_34P1_specs_3 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000451};
452
Lev Walkina00d6b32006-03-21 03:40:38 +0000453
454/*** <<< INCLUDES [AutoChoice] >>> ***/
455
456#include <AutoType.h>
457#include <constr_CHOICE.h>
458
459/*** <<< DEPS [AutoChoice] >>> ***/
460
461typedef enum AutoChoice_PR {
462 AutoChoice_PR_NOTHING, /* No components present */
463 AutoChoice_PR_type1,
464 AutoChoice_PR_type2,
465} AutoChoice_PR;
466
467/*** <<< TYPE-DECLS [AutoChoice] >>> ***/
468
469typedef struct AutoChoice {
470 AutoChoice_PR present;
471 union AutoChoice_u {
472 AutoType_34P0_t type1;
473 AutoType_34P1_t type2;
474 } choice;
475
476 /* Context for parsing across buffer boundaries */
477 asn_struct_ctx_t _asn_ctx;
478} AutoChoice_t;
479
480/*** <<< FUNC-DECLS [AutoChoice] >>> ***/
481
482extern asn_TYPE_descriptor_t asn_DEF_AutoChoice;
483
484/*** <<< STAT-DEFS [AutoChoice] >>> ***/
485
Lev Walkin15750402005-07-03 05:27:19 +0000486static asn_TYPE_member_t asn_MBR_AutoChoice_1[] = {
487 { ATF_NOFLAGS, 0, offsetof(struct AutoChoice, choice.type1),
488 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
489 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkina00d6b32006-03-21 03:40:38 +0000490 .type = &asn_DEF_AutoType_34P0,
Lev Walkin15750402005-07-03 05:27:19 +0000491 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000492 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
493 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000494 .name = "type1"
495 },
496 { ATF_NOFLAGS, 0, offsetof(struct AutoChoice, choice.type2),
497 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
498 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkina00d6b32006-03-21 03:40:38 +0000499 .type = &asn_DEF_AutoType_34P1,
Lev Walkin15750402005-07-03 05:27:19 +0000500 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000501 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
502 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000503 .name = "type2"
504 },
505};
Lev Walkin59b176e2005-11-26 11:25:14 +0000506static asn_TYPE_tag2member_t asn_MAP_AutoChoice_tag2el_1[] = {
Lev Walkina00d6b32006-03-21 03:40:38 +0000507 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* type1 at 37 */
508 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* type2 at 38 */
Lev Walkin15750402005-07-03 05:27:19 +0000509};
Lev Walkin59b176e2005-11-26 11:25:14 +0000510static asn_CHOICE_specifics_t asn_SPC_AutoChoice_specs_1 = {
Lev Walkin15750402005-07-03 05:27:19 +0000511 sizeof(struct AutoChoice),
512 offsetof(struct AutoChoice, _asn_ctx),
513 offsetof(struct AutoChoice, present),
514 sizeof(((struct AutoChoice *)0)->present),
Lev Walkin59b176e2005-11-26 11:25:14 +0000515 asn_MAP_AutoChoice_tag2el_1,
Lev Walkin15750402005-07-03 05:27:19 +0000516 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000517 .canonical_order = 0,
518 .ext_start = -1 /* Extensions start */
Lev Walkin15750402005-07-03 05:27:19 +0000519};
520asn_TYPE_descriptor_t asn_DEF_AutoChoice = {
521 "AutoChoice",
522 "AutoChoice",
523 CHOICE_free,
524 CHOICE_print,
525 CHOICE_constraint,
526 CHOICE_decode_ber,
527 CHOICE_encode_der,
528 CHOICE_decode_xer,
529 CHOICE_encode_xer,
Lev Walkin59b176e2005-11-26 11:25:14 +0000530 0, /* No PER decoder, -gen-PER to enable */
Lev Walkin15750402005-07-03 05:27:19 +0000531 CHOICE_outmost_tag,
532 0, /* No effective tags (pointer) */
533 0, /* No effective tags (count) */
534 0, /* No tags (pointer) */
535 0, /* No tags (count) */
Lev Walkin59b176e2005-11-26 11:25:14 +0000536 0, /* No PER visible constraints */
Lev Walkin15750402005-07-03 05:27:19 +0000537 asn_MBR_AutoChoice_1,
538 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000539 &asn_SPC_AutoChoice_specs_1 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000540};
541