blob: 8f1dc3df0b4ba9f33140d67ccdbe2aaee0ee90e9 [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 Walkin1eded352006-07-13 11:19:01 +000032 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin15750402005-07-03 05:27:19 +000033 long value;
34
35 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +000036 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +000037 "%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 {
Lev Walkin739d9bf2006-07-13 13:28:32 +000048 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +000049 "%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 Walkin9f5bb3a2006-08-18 01:46:46 +000058static int asn_DFL_2_set_0(int set_value, void **sptr) {
Lev Walkin0c0bca62006-03-21 04:48:15 +000059 long *st = *sptr;
60
61 if(!st) {
Lev Walkin9f5bb3a2006-08-18 01:46:46 +000062 if(!set_value) return -1; /* Not a default value */
Lev Walkin0c0bca62006-03-21 04:48:15 +000063 st = (*sptr = CALLOC(1, sizeof(*st)));
64 if(!st) return -1;
65 }
66
Lev Walkin9f5bb3a2006-08-18 01:46:46 +000067 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 }
Lev Walkin0c0bca62006-03-21 04:48:15 +000075}
Lev Walkina00d6b32006-03-21 03:40:38 +000076static asn_TYPE_member_t asn_MBR_TestType_16P0_1[] = {
Lev Walkin0c0bca62006-03-21 04:48:15 +000077 { ATF_NOFLAGS, 1, offsetof(struct TestType_16P0, common),
Lev Walkin15750402005-07-03 05:27:19 +000078 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
79 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +000080 .type = &asn_DEF_NativeInteger,
Lev Walkina00d6b32006-03-21 03:40:38 +000081 .memb_constraints = memb_common_constraint_1,
Lev Walkin59b176e2005-11-26 11:25:14 +000082 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
Lev Walkin0c0bca62006-03-21 04:48:15 +000083 .default_value = asn_DFL_2_set_0, /* DEFAULT 0 */
Lev Walkin15750402005-07-03 05:27:19 +000084 .name = "common"
85 },
86};
Lev Walkina00d6b32006-03-21 03:40:38 +000087static ber_tlv_tag_t asn_DEF_TestType_16P0_tags_1[] = {
Lev Walkin15750402005-07-03 05:27:19 +000088 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
89};
Lev Walkina00d6b32006-03-21 03:40:38 +000090static asn_TYPE_tag2member_t asn_MAP_TestType_16P0_tag2el_1[] = {
Lev Walkin15750402005-07-03 05:27:19 +000091 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* common at 20 */
92};
Lev Walkina00d6b32006-03-21 03:40:38 +000093static 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,
Lev Walkin15750402005-07-03 05:27:19 +000097 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +000098 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin15750402005-07-03 05:27:19 +000099 -1, /* Start extensions */
100 -1 /* Stop extensions */
101};
Lev Walkina00d6b32006-03-21 03:40:38 +0000102asn_TYPE_descriptor_t asn_DEF_TestType_16P0 = {
103 "TestType",
104 "TestType",
Lev Walkin15750402005-07-03 05:27:19 +0000105 SEQUENCE_free,
106 SEQUENCE_print,
107 SEQUENCE_constraint,
108 SEQUENCE_decode_ber,
109 SEQUENCE_encode_der,
110 SEQUENCE_decode_xer,
111 SEQUENCE_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000112 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin15750402005-07-03 05:27:19 +0000113 0, /* Use generic outmost tag fetcher */
Lev Walkina00d6b32006-03-21 03:40:38 +0000114 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 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000120 0, /* No PER visible constraints */
Lev Walkina00d6b32006-03-21 03:40:38 +0000121 asn_MBR_TestType_16P0_1,
Lev Walkin15750402005-07-03 05:27:19 +0000122 1, /* Elements count */
Lev Walkina00d6b32006-03-21 03:40:38 +0000123 &asn_SPC_TestType_16P0_specs_1 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000124};
125
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000126static int asn_DFL_4_set_0(int set_value, void **sptr) {
Lev Walkin0c0bca62006-03-21 04:48:15 +0000127 BOOLEAN_t *st = *sptr;
128
129 if(!st) {
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000130 if(!set_value) return -1; /* Not a default value */
Lev Walkin0c0bca62006-03-21 04:48:15 +0000131 st = (*sptr = CALLOC(1, sizeof(*st)));
132 if(!st) return -1;
133 }
134
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000135 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 }
Lev Walkin0c0bca62006-03-21 04:48:15 +0000143}
Lev Walkina00d6b32006-03-21 03:40:38 +0000144static asn_TYPE_member_t asn_MBR_TestType_16P1_3[] = {
Lev Walkin0c0bca62006-03-21 04:48:15 +0000145 { ATF_NOFLAGS, 1, offsetof(struct TestType_16P1, common),
Lev Walkin15750402005-07-03 05:27:19 +0000146 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
147 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000148 .type = &asn_DEF_BOOLEAN,
Lev Walkin15750402005-07-03 05:27:19 +0000149 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000150 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
Lev Walkin0c0bca62006-03-21 04:48:15 +0000151 .default_value = asn_DFL_4_set_0, /* DEFAULT 0 */
Lev Walkin15750402005-07-03 05:27:19 +0000152 .name = "common"
153 },
154};
Lev Walkina00d6b32006-03-21 03:40:38 +0000155static ber_tlv_tag_t asn_DEF_TestType_16P1_tags_3[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000156 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
157};
Lev Walkina00d6b32006-03-21 03:40:38 +0000158static asn_TYPE_tag2member_t asn_MAP_TestType_16P1_tag2el_3[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000159 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 } /* common at 21 */
160};
Lev Walkina00d6b32006-03-21 03:40:38 +0000161static 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,
Lev Walkin15750402005-07-03 05:27:19 +0000165 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000166 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin15750402005-07-03 05:27:19 +0000167 -1, /* Start extensions */
168 -1 /* Stop extensions */
169};
Lev Walkina00d6b32006-03-21 03:40:38 +0000170asn_TYPE_descriptor_t asn_DEF_TestType_16P1 = {
171 "TestType",
172 "TestType",
Lev Walkin15750402005-07-03 05:27:19 +0000173 SEQUENCE_free,
174 SEQUENCE_print,
175 SEQUENCE_constraint,
176 SEQUENCE_decode_ber,
177 SEQUENCE_encode_der,
178 SEQUENCE_decode_xer,
179 SEQUENCE_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000180 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin15750402005-07-03 05:27:19 +0000181 0, /* Use generic outmost tag fetcher */
Lev Walkina00d6b32006-03-21 03:40:38 +0000182 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 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000188 0, /* No PER visible constraints */
Lev Walkina00d6b32006-03-21 03:40:38 +0000189 asn_MBR_TestType_16P1_3,
Lev Walkin15750402005-07-03 05:27:19 +0000190 1, /* Elements count */
Lev Walkina00d6b32006-03-21 03:40:38 +0000191 &asn_SPC_TestType_16P1_specs_3 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000192};
193
Lev Walkina00d6b32006-03-21 03:40:38 +0000194
195/*** <<< INCLUDES [TestChoice] >>> ***/
196
197#include <TestType.h>
198#include <constr_CHOICE.h>
199
200/*** <<< DEPS [TestChoice] >>> ***/
201
202typedef enum TestChoice_PR {
203 TestChoice_PR_NOTHING, /* No components present */
204 TestChoice_PR_type1,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000205 TestChoice_PR_type2
Lev Walkina00d6b32006-03-21 03:40:38 +0000206} TestChoice_PR;
207
208/*** <<< TYPE-DECLS [TestChoice] >>> ***/
209
210typedef 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
223extern asn_TYPE_descriptor_t asn_DEF_TestChoice;
224
225/*** <<< STAT-DEFS [TestChoice] >>> ***/
226
Lev Walkin15750402005-07-03 05:27:19 +0000227static 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,
Lev Walkina00d6b32006-03-21 03:40:38 +0000231 .type = &asn_DEF_TestType_16P0,
Lev Walkin15750402005-07-03 05:27:19 +0000232 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000233 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
234 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000235 .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 */
Lev Walkina00d6b32006-03-21 03:40:38 +0000240 .type = &asn_DEF_TestType_16P1,
Lev Walkin15750402005-07-03 05:27:19 +0000241 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000242 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
243 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000244 .name = "type2"
245 },
246};
Lev Walkin59b176e2005-11-26 11:25:14 +0000247static asn_TYPE_tag2member_t asn_MAP_TestChoice_tag2el_1[] = {
Lev Walkina00d6b32006-03-21 03:40:38 +0000248 { (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 */
Lev Walkin15750402005-07-03 05:27:19 +0000250};
Lev Walkin59b176e2005-11-26 11:25:14 +0000251static asn_CHOICE_specifics_t asn_SPC_TestChoice_specs_1 = {
Lev Walkin15750402005-07-03 05:27:19 +0000252 sizeof(struct TestChoice),
253 offsetof(struct TestChoice, _asn_ctx),
254 offsetof(struct TestChoice, present),
255 sizeof(((struct TestChoice *)0)->present),
Lev Walkin59b176e2005-11-26 11:25:14 +0000256 asn_MAP_TestChoice_tag2el_1,
Lev Walkin15750402005-07-03 05:27:19 +0000257 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000258 .canonical_order = 0,
259 .ext_start = -1 /* Extensions start */
Lev Walkin15750402005-07-03 05:27:19 +0000260};
261asn_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,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000271 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin15750402005-07-03 05:27:19 +0000272 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) */
Lev Walkin59b176e2005-11-26 11:25:14 +0000277 0, /* No PER visible constraints */
Lev Walkin15750402005-07-03 05:27:19 +0000278 asn_MBR_TestChoice_1,
279 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000280 &asn_SPC_TestChoice_specs_1 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000281};
282
283
Lev Walkina00d6b32006-03-21 03:40:38 +0000284/*** <<< INCLUDES [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000285
Lev Walkinc3f0b892005-08-14 02:40:04 +0000286#include <NativeInteger.h>
Lev Walkin15750402005-07-03 05:27:19 +0000287#include <constr_SEQUENCE.h>
288#include <BOOLEAN.h>
Lev Walkin15750402005-07-03 05:27:19 +0000289
Lev Walkina00d6b32006-03-21 03:40:38 +0000290/*** <<< TYPE-DECLS [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000291
Lev Walkina00d6b32006-03-21 03:40:38 +0000292typedef struct AutoType_34P0 {
293 long common;
Lev Walkin15750402005-07-03 05:27:19 +0000294
295 /* Context for parsing across buffer boundaries */
296 asn_struct_ctx_t _asn_ctx;
Lev Walkina00d6b32006-03-21 03:40:38 +0000297} AutoType_34P0_t;
298typedef 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;
Lev Walkin15750402005-07-03 05:27:19 +0000304
Lev Walkina00d6b32006-03-21 03:40:38 +0000305/*** <<< FUNC-DECLS [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000306
Lev Walkina00d6b32006-03-21 03:40:38 +0000307extern asn_TYPE_descriptor_t asn_DEF_AutoType_34P0;
308extern asn_TYPE_descriptor_t asn_DEF_AutoType_34P1;
Lev Walkin15750402005-07-03 05:27:19 +0000309
Lev Walkina00d6b32006-03-21 03:40:38 +0000310/*** <<< CODE [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000311
312static int
Lev Walkina00d6b32006-03-21 03:40:38 +0000313memb_common_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000314 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin15750402005-07-03 05:27:19 +0000315 long value;
316
317 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000318 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +0000319 "%s: value not given (%s:%d)",
320 td->name, __FILE__, __LINE__);
321 return -1;
322 }
323
Lev Walkinc3f0b892005-08-14 02:40:04 +0000324 value = *(const long *)sptr;
Lev Walkin15750402005-07-03 05:27:19 +0000325
326 if((value == 0)) {
327 /* Constraint check succeeded */
328 return 0;
329 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000330 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +0000331 "%s: constraint failed (%s:%d)",
332 td->name, __FILE__, __LINE__);
333 return -1;
334 }
335}
336
337static int
Lev Walkina00d6b32006-03-21 03:40:38 +0000338memb_common_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000339 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin15750402005-07-03 05:27:19 +0000340 BOOLEAN_t value;
341
342 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000343 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +0000344 "%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 {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000355 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +0000356 "%s: constraint failed (%s:%d)",
357 td->name, __FILE__, __LINE__);
358 return -1;
359 }
360}
361
362
Lev Walkina00d6b32006-03-21 03:40:38 +0000363/*** <<< STAT-DEFS [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000364
Lev Walkina00d6b32006-03-21 03:40:38 +0000365static asn_TYPE_member_t asn_MBR_AutoType_34P0_1[] = {
366 { ATF_NOFLAGS, 0, offsetof(struct AutoType_34P0, common),
Lev Walkin15750402005-07-03 05:27:19 +0000367 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
368 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000369 .type = &asn_DEF_NativeInteger,
Lev Walkina00d6b32006-03-21 03:40:38 +0000370 .memb_constraints = memb_common_constraint_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000371 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
372 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000373 .name = "common"
374 },
375};
Lev Walkina00d6b32006-03-21 03:40:38 +0000376static ber_tlv_tag_t asn_DEF_AutoType_34P0_tags_1[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000377 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
378};
Lev Walkina00d6b32006-03-21 03:40:38 +0000379static asn_TYPE_tag2member_t asn_MAP_AutoType_34P0_tag2el_1[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000380 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common at 37 */
381};
Lev Walkina00d6b32006-03-21 03:40:38 +0000382static 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,
Lev Walkin15750402005-07-03 05:27:19 +0000386 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000387 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin15750402005-07-03 05:27:19 +0000388 -1, /* Start extensions */
389 -1 /* Stop extensions */
390};
Lev Walkina00d6b32006-03-21 03:40:38 +0000391asn_TYPE_descriptor_t asn_DEF_AutoType_34P0 = {
392 "AutoType",
393 "AutoType",
Lev Walkin15750402005-07-03 05:27:19 +0000394 SEQUENCE_free,
395 SEQUENCE_print,
396 SEQUENCE_constraint,
397 SEQUENCE_decode_ber,
398 SEQUENCE_encode_der,
399 SEQUENCE_decode_xer,
400 SEQUENCE_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000401 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin15750402005-07-03 05:27:19 +0000402 0, /* Use generic outmost tag fetcher */
Lev Walkina00d6b32006-03-21 03:40:38 +0000403 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 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000409 0, /* No PER visible constraints */
Lev Walkina00d6b32006-03-21 03:40:38 +0000410 asn_MBR_AutoType_34P0_1,
Lev Walkin15750402005-07-03 05:27:19 +0000411 1, /* Elements count */
Lev Walkina00d6b32006-03-21 03:40:38 +0000412 &asn_SPC_AutoType_34P0_specs_1 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000413};
414
Lev Walkina00d6b32006-03-21 03:40:38 +0000415static asn_TYPE_member_t asn_MBR_AutoType_34P1_3[] = {
416 { ATF_NOFLAGS, 0, offsetof(struct AutoType_34P1, common),
Lev Walkin15750402005-07-03 05:27:19 +0000417 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
418 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000419 .type = &asn_DEF_BOOLEAN,
Lev Walkina00d6b32006-03-21 03:40:38 +0000420 .memb_constraints = memb_common_constraint_3,
Lev Walkin59b176e2005-11-26 11:25:14 +0000421 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
422 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000423 .name = "common"
424 },
425};
Lev Walkina00d6b32006-03-21 03:40:38 +0000426static ber_tlv_tag_t asn_DEF_AutoType_34P1_tags_3[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000427 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
428};
Lev Walkina00d6b32006-03-21 03:40:38 +0000429static asn_TYPE_tag2member_t asn_MAP_AutoType_34P1_tag2el_3[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000430 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common at 38 */
431};
Lev Walkina00d6b32006-03-21 03:40:38 +0000432static 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,
Lev Walkin15750402005-07-03 05:27:19 +0000436 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000437 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin15750402005-07-03 05:27:19 +0000438 -1, /* Start extensions */
439 -1 /* Stop extensions */
440};
Lev Walkina00d6b32006-03-21 03:40:38 +0000441asn_TYPE_descriptor_t asn_DEF_AutoType_34P1 = {
442 "AutoType",
443 "AutoType",
Lev Walkin15750402005-07-03 05:27:19 +0000444 SEQUENCE_free,
445 SEQUENCE_print,
446 SEQUENCE_constraint,
447 SEQUENCE_decode_ber,
448 SEQUENCE_encode_der,
449 SEQUENCE_decode_xer,
450 SEQUENCE_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000451 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin15750402005-07-03 05:27:19 +0000452 0, /* Use generic outmost tag fetcher */
Lev Walkina00d6b32006-03-21 03:40:38 +0000453 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 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000459 0, /* No PER visible constraints */
Lev Walkina00d6b32006-03-21 03:40:38 +0000460 asn_MBR_AutoType_34P1_3,
Lev Walkin15750402005-07-03 05:27:19 +0000461 1, /* Elements count */
Lev Walkina00d6b32006-03-21 03:40:38 +0000462 &asn_SPC_AutoType_34P1_specs_3 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000463};
464
Lev Walkina00d6b32006-03-21 03:40:38 +0000465
466/*** <<< INCLUDES [AutoChoice] >>> ***/
467
468#include <AutoType.h>
469#include <constr_CHOICE.h>
470
471/*** <<< DEPS [AutoChoice] >>> ***/
472
473typedef enum AutoChoice_PR {
474 AutoChoice_PR_NOTHING, /* No components present */
475 AutoChoice_PR_type1,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000476 AutoChoice_PR_type2
Lev Walkina00d6b32006-03-21 03:40:38 +0000477} AutoChoice_PR;
478
479/*** <<< TYPE-DECLS [AutoChoice] >>> ***/
480
481typedef 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
494extern asn_TYPE_descriptor_t asn_DEF_AutoChoice;
495
496/*** <<< STAT-DEFS [AutoChoice] >>> ***/
497
Lev Walkin15750402005-07-03 05:27:19 +0000498static 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 */
Lev Walkina00d6b32006-03-21 03:40:38 +0000502 .type = &asn_DEF_AutoType_34P0,
Lev Walkin15750402005-07-03 05:27:19 +0000503 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000504 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
505 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000506 .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 */
Lev Walkina00d6b32006-03-21 03:40:38 +0000511 .type = &asn_DEF_AutoType_34P1,
Lev Walkin15750402005-07-03 05:27:19 +0000512 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000513 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
514 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000515 .name = "type2"
516 },
517};
Lev Walkin59b176e2005-11-26 11:25:14 +0000518static asn_TYPE_tag2member_t asn_MAP_AutoChoice_tag2el_1[] = {
Lev Walkina00d6b32006-03-21 03:40:38 +0000519 { (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 */
Lev Walkin15750402005-07-03 05:27:19 +0000521};
Lev Walkin59b176e2005-11-26 11:25:14 +0000522static asn_CHOICE_specifics_t asn_SPC_AutoChoice_specs_1 = {
Lev Walkin15750402005-07-03 05:27:19 +0000523 sizeof(struct AutoChoice),
524 offsetof(struct AutoChoice, _asn_ctx),
525 offsetof(struct AutoChoice, present),
526 sizeof(((struct AutoChoice *)0)->present),
Lev Walkin59b176e2005-11-26 11:25:14 +0000527 asn_MAP_AutoChoice_tag2el_1,
Lev Walkin15750402005-07-03 05:27:19 +0000528 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000529 .canonical_order = 0,
530 .ext_start = -1 /* Extensions start */
Lev Walkin15750402005-07-03 05:27:19 +0000531};
532asn_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,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000542 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin15750402005-07-03 05:27:19 +0000543 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) */
Lev Walkin59b176e2005-11-26 11:25:14 +0000548 0, /* No PER visible constraints */
Lev Walkin15750402005-07-03 05:27:19 +0000549 asn_MBR_AutoChoice_1,
550 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000551 &asn_SPC_AutoChoice_specs_1 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000552};
553