blob: 73dc8bc49ac86e6086b9f393b251c3071892ceaa [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 Walkin7c1dc052016-03-14 03:08:15 -070036 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 Walkin7c1dc052016-03-14 03:08:15 -070048 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 Walkina7591b52014-10-12 18:37:35 -070087static const 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 Walkina7591b52014-10-12 18:37:35 -070090static const asn_TYPE_tag2member_t asn_MAP_TestType_16P0_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070091 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* common */
Lev Walkin15750402005-07-03 05:27:19 +000092};
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 Walkinba68c912017-07-06 07:52:39 -0700113 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin15750402005-07-03 05:27:19 +0000114 0, /* Use generic outmost tag fetcher */
Lev Walkina00d6b32006-03-21 03:40:38 +0000115 asn_DEF_TestType_16P0_tags_1,
116 sizeof(asn_DEF_TestType_16P0_tags_1)
117 /sizeof(asn_DEF_TestType_16P0_tags_1[0]), /* 1 */
118 asn_DEF_TestType_16P0_tags_1, /* Same as above */
119 sizeof(asn_DEF_TestType_16P0_tags_1)
120 /sizeof(asn_DEF_TestType_16P0_tags_1[0]), /* 1 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000121 0, /* No PER visible constraints */
Lev Walkina00d6b32006-03-21 03:40:38 +0000122 asn_MBR_TestType_16P0_1,
Lev Walkin15750402005-07-03 05:27:19 +0000123 1, /* Elements count */
Lev Walkina00d6b32006-03-21 03:40:38 +0000124 &asn_SPC_TestType_16P0_specs_1 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000125};
126
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000127static int asn_DFL_4_set_0(int set_value, void **sptr) {
Lev Walkin0c0bca62006-03-21 04:48:15 +0000128 BOOLEAN_t *st = *sptr;
129
130 if(!st) {
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000131 if(!set_value) return -1; /* Not a default value */
Lev Walkin0c0bca62006-03-21 04:48:15 +0000132 st = (*sptr = CALLOC(1, sizeof(*st)));
133 if(!st) return -1;
134 }
135
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000136 if(set_value) {
137 /* Install default value 0 */
138 *st = 0;
139 return 0;
140 } else {
141 /* Test default value 0 */
142 return (*st == 0);
143 }
Lev Walkin0c0bca62006-03-21 04:48:15 +0000144}
Lev Walkina00d6b32006-03-21 03:40:38 +0000145static asn_TYPE_member_t asn_MBR_TestType_16P1_3[] = {
Lev Walkin0c0bca62006-03-21 04:48:15 +0000146 { ATF_NOFLAGS, 1, offsetof(struct TestType_16P1, common),
Lev Walkin15750402005-07-03 05:27:19 +0000147 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
148 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000149 .type = &asn_DEF_BOOLEAN,
Lev Walkin15750402005-07-03 05:27:19 +0000150 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000151 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
Lev Walkin0c0bca62006-03-21 04:48:15 +0000152 .default_value = asn_DFL_4_set_0, /* DEFAULT 0 */
Lev Walkin15750402005-07-03 05:27:19 +0000153 .name = "common"
154 },
155};
Lev Walkina7591b52014-10-12 18:37:35 -0700156static const ber_tlv_tag_t asn_DEF_TestType_16P1_tags_3[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000157 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
158};
Lev Walkina7591b52014-10-12 18:37:35 -0700159static const asn_TYPE_tag2member_t asn_MAP_TestType_16P1_tag2el_3[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700160 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 } /* common */
Lev Walkin15750402005-07-03 05:27:19 +0000161};
Lev Walkina00d6b32006-03-21 03:40:38 +0000162static asn_SEQUENCE_specifics_t asn_SPC_TestType_16P1_specs_3 = {
163 sizeof(struct TestType_16P1),
164 offsetof(struct TestType_16P1, _asn_ctx),
165 asn_MAP_TestType_16P1_tag2el_3,
Lev Walkin15750402005-07-03 05:27:19 +0000166 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000167 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin15750402005-07-03 05:27:19 +0000168 -1, /* Start extensions */
169 -1 /* Stop extensions */
170};
Lev Walkina00d6b32006-03-21 03:40:38 +0000171asn_TYPE_descriptor_t asn_DEF_TestType_16P1 = {
172 "TestType",
173 "TestType",
Lev Walkin15750402005-07-03 05:27:19 +0000174 SEQUENCE_free,
175 SEQUENCE_print,
176 SEQUENCE_constraint,
177 SEQUENCE_decode_ber,
178 SEQUENCE_encode_der,
179 SEQUENCE_decode_xer,
180 SEQUENCE_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000181 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinba68c912017-07-06 07:52:39 -0700182 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin15750402005-07-03 05:27:19 +0000183 0, /* Use generic outmost tag fetcher */
Lev Walkina00d6b32006-03-21 03:40:38 +0000184 asn_DEF_TestType_16P1_tags_3,
185 sizeof(asn_DEF_TestType_16P1_tags_3)
186 /sizeof(asn_DEF_TestType_16P1_tags_3[0]), /* 1 */
187 asn_DEF_TestType_16P1_tags_3, /* Same as above */
188 sizeof(asn_DEF_TestType_16P1_tags_3)
189 /sizeof(asn_DEF_TestType_16P1_tags_3[0]), /* 1 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000190 0, /* No PER visible constraints */
Lev Walkina00d6b32006-03-21 03:40:38 +0000191 asn_MBR_TestType_16P1_3,
Lev Walkin15750402005-07-03 05:27:19 +0000192 1, /* Elements count */
Lev Walkina00d6b32006-03-21 03:40:38 +0000193 &asn_SPC_TestType_16P1_specs_3 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000194};
195
Lev Walkina00d6b32006-03-21 03:40:38 +0000196
197/*** <<< INCLUDES [TestChoice] >>> ***/
198
Lev Walkin22b5ed42006-09-13 02:51:20 +0000199#include "TestType.h"
Lev Walkina00d6b32006-03-21 03:40:38 +0000200#include <constr_CHOICE.h>
201
202/*** <<< DEPS [TestChoice] >>> ***/
203
204typedef enum TestChoice_PR {
205 TestChoice_PR_NOTHING, /* No components present */
206 TestChoice_PR_type1,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000207 TestChoice_PR_type2
Lev Walkina00d6b32006-03-21 03:40:38 +0000208} TestChoice_PR;
209
210/*** <<< TYPE-DECLS [TestChoice] >>> ***/
211
212typedef struct TestChoice {
213 TestChoice_PR present;
214 union TestChoice_u {
215 TestType_16P0_t type1;
216 TestType_16P1_t type2;
217 } choice;
218
219 /* Context for parsing across buffer boundaries */
220 asn_struct_ctx_t _asn_ctx;
221} TestChoice_t;
222
223/*** <<< FUNC-DECLS [TestChoice] >>> ***/
224
225extern asn_TYPE_descriptor_t asn_DEF_TestChoice;
226
227/*** <<< STAT-DEFS [TestChoice] >>> ***/
228
Lev Walkin15750402005-07-03 05:27:19 +0000229static asn_TYPE_member_t asn_MBR_TestChoice_1[] = {
230 { ATF_NOFLAGS, 0, offsetof(struct TestChoice, choice.type1),
231 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
232 .tag_mode = 0,
Lev Walkina00d6b32006-03-21 03:40:38 +0000233 .type = &asn_DEF_TestType_16P0,
Lev Walkin15750402005-07-03 05:27:19 +0000234 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000235 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
236 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000237 .name = "type1"
238 },
239 { ATF_NOFLAGS, 0, offsetof(struct TestChoice, choice.type2),
240 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
241 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkina00d6b32006-03-21 03:40:38 +0000242 .type = &asn_DEF_TestType_16P1,
Lev Walkin15750402005-07-03 05:27:19 +0000243 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000244 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
245 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000246 .name = "type2"
247 },
248};
Lev Walkina7591b52014-10-12 18:37:35 -0700249static const asn_TYPE_tag2member_t asn_MAP_TestChoice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700250 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* type1 */
251 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 } /* type2 */
Lev Walkin15750402005-07-03 05:27:19 +0000252};
Lev Walkin59b176e2005-11-26 11:25:14 +0000253static asn_CHOICE_specifics_t asn_SPC_TestChoice_specs_1 = {
Lev Walkin15750402005-07-03 05:27:19 +0000254 sizeof(struct TestChoice),
255 offsetof(struct TestChoice, _asn_ctx),
256 offsetof(struct TestChoice, present),
257 sizeof(((struct TestChoice *)0)->present),
Lev Walkin59b176e2005-11-26 11:25:14 +0000258 asn_MAP_TestChoice_tag2el_1,
Lev Walkin15750402005-07-03 05:27:19 +0000259 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000260 .canonical_order = 0,
261 .ext_start = -1 /* Extensions start */
Lev Walkin15750402005-07-03 05:27:19 +0000262};
263asn_TYPE_descriptor_t asn_DEF_TestChoice = {
264 "TestChoice",
265 "TestChoice",
266 CHOICE_free,
267 CHOICE_print,
268 CHOICE_constraint,
269 CHOICE_decode_ber,
270 CHOICE_encode_der,
271 CHOICE_decode_xer,
272 CHOICE_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000273 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinba68c912017-07-06 07:52:39 -0700274 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin15750402005-07-03 05:27:19 +0000275 CHOICE_outmost_tag,
276 0, /* No effective tags (pointer) */
277 0, /* No effective tags (count) */
278 0, /* No tags (pointer) */
279 0, /* No tags (count) */
Lev Walkin59b176e2005-11-26 11:25:14 +0000280 0, /* No PER visible constraints */
Lev Walkin15750402005-07-03 05:27:19 +0000281 asn_MBR_TestChoice_1,
282 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000283 &asn_SPC_TestChoice_specs_1 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000284};
285
286
Lev Walkina00d6b32006-03-21 03:40:38 +0000287/*** <<< INCLUDES [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000288
Lev Walkinc3f0b892005-08-14 02:40:04 +0000289#include <NativeInteger.h>
Lev Walkin15750402005-07-03 05:27:19 +0000290#include <constr_SEQUENCE.h>
291#include <BOOLEAN.h>
Lev Walkin15750402005-07-03 05:27:19 +0000292
Lev Walkina00d6b32006-03-21 03:40:38 +0000293/*** <<< TYPE-DECLS [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000294
Lev Walkina00d6b32006-03-21 03:40:38 +0000295typedef struct AutoType_34P0 {
296 long common;
Lev Walkin15750402005-07-03 05:27:19 +0000297
298 /* Context for parsing across buffer boundaries */
299 asn_struct_ctx_t _asn_ctx;
Lev Walkina00d6b32006-03-21 03:40:38 +0000300} AutoType_34P0_t;
301typedef struct AutoType_34P1 {
302 BOOLEAN_t common;
303
304 /* Context for parsing across buffer boundaries */
305 asn_struct_ctx_t _asn_ctx;
306} AutoType_34P1_t;
Lev Walkin15750402005-07-03 05:27:19 +0000307
Lev Walkina00d6b32006-03-21 03:40:38 +0000308/*** <<< FUNC-DECLS [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000309
Lev Walkina00d6b32006-03-21 03:40:38 +0000310extern asn_TYPE_descriptor_t asn_DEF_AutoType_34P0;
311extern asn_TYPE_descriptor_t asn_DEF_AutoType_34P1;
Lev Walkin15750402005-07-03 05:27:19 +0000312
Lev Walkina00d6b32006-03-21 03:40:38 +0000313/*** <<< CODE [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000314
315static int
Lev Walkina00d6b32006-03-21 03:40:38 +0000316memb_common_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000317 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin15750402005-07-03 05:27:19 +0000318 long value;
319
320 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700321 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +0000322 "%s: value not given (%s:%d)",
323 td->name, __FILE__, __LINE__);
324 return -1;
325 }
326
Lev Walkinc3f0b892005-08-14 02:40:04 +0000327 value = *(const long *)sptr;
Lev Walkin15750402005-07-03 05:27:19 +0000328
329 if((value == 0)) {
330 /* Constraint check succeeded */
331 return 0;
332 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700333 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +0000334 "%s: constraint failed (%s:%d)",
335 td->name, __FILE__, __LINE__);
336 return -1;
337 }
338}
339
340static int
Lev Walkina00d6b32006-03-21 03:40:38 +0000341memb_common_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000342 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin15750402005-07-03 05:27:19 +0000343 BOOLEAN_t value;
344
345 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700346 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +0000347 "%s: value not given (%s:%d)",
348 td->name, __FILE__, __LINE__);
349 return -1;
350 }
351
352 value = (*(const long *)sptr) ? 1 : 0;
353
354 if((value <= 0)) {
355 /* Constraint check succeeded */
356 return 0;
357 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700358 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +0000359 "%s: constraint failed (%s:%d)",
360 td->name, __FILE__, __LINE__);
361 return -1;
362 }
363}
364
365
Lev Walkina00d6b32006-03-21 03:40:38 +0000366/*** <<< STAT-DEFS [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000367
Lev Walkina00d6b32006-03-21 03:40:38 +0000368static asn_TYPE_member_t asn_MBR_AutoType_34P0_1[] = {
369 { ATF_NOFLAGS, 0, offsetof(struct AutoType_34P0, common),
Lev Walkin15750402005-07-03 05:27:19 +0000370 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
371 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000372 .type = &asn_DEF_NativeInteger,
Lev Walkina00d6b32006-03-21 03:40:38 +0000373 .memb_constraints = memb_common_constraint_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000374 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
375 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000376 .name = "common"
377 },
378};
Lev Walkina7591b52014-10-12 18:37:35 -0700379static const ber_tlv_tag_t asn_DEF_AutoType_34P0_tags_1[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000380 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
381};
Lev Walkina7591b52014-10-12 18:37:35 -0700382static const asn_TYPE_tag2member_t asn_MAP_AutoType_34P0_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700383 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common */
Lev Walkin15750402005-07-03 05:27:19 +0000384};
Lev Walkina00d6b32006-03-21 03:40:38 +0000385static asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P0_specs_1 = {
386 sizeof(struct AutoType_34P0),
387 offsetof(struct AutoType_34P0, _asn_ctx),
388 asn_MAP_AutoType_34P0_tag2el_1,
Lev Walkin15750402005-07-03 05:27:19 +0000389 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000390 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin15750402005-07-03 05:27:19 +0000391 -1, /* Start extensions */
392 -1 /* Stop extensions */
393};
Lev Walkina00d6b32006-03-21 03:40:38 +0000394asn_TYPE_descriptor_t asn_DEF_AutoType_34P0 = {
395 "AutoType",
396 "AutoType",
Lev Walkin15750402005-07-03 05:27:19 +0000397 SEQUENCE_free,
398 SEQUENCE_print,
399 SEQUENCE_constraint,
400 SEQUENCE_decode_ber,
401 SEQUENCE_encode_der,
402 SEQUENCE_decode_xer,
403 SEQUENCE_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000404 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinba68c912017-07-06 07:52:39 -0700405 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin15750402005-07-03 05:27:19 +0000406 0, /* Use generic outmost tag fetcher */
Lev Walkina00d6b32006-03-21 03:40:38 +0000407 asn_DEF_AutoType_34P0_tags_1,
408 sizeof(asn_DEF_AutoType_34P0_tags_1)
409 /sizeof(asn_DEF_AutoType_34P0_tags_1[0]), /* 1 */
410 asn_DEF_AutoType_34P0_tags_1, /* Same as above */
411 sizeof(asn_DEF_AutoType_34P0_tags_1)
412 /sizeof(asn_DEF_AutoType_34P0_tags_1[0]), /* 1 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000413 0, /* No PER visible constraints */
Lev Walkina00d6b32006-03-21 03:40:38 +0000414 asn_MBR_AutoType_34P0_1,
Lev Walkin15750402005-07-03 05:27:19 +0000415 1, /* Elements count */
Lev Walkina00d6b32006-03-21 03:40:38 +0000416 &asn_SPC_AutoType_34P0_specs_1 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000417};
418
Lev Walkina00d6b32006-03-21 03:40:38 +0000419static asn_TYPE_member_t asn_MBR_AutoType_34P1_3[] = {
420 { ATF_NOFLAGS, 0, offsetof(struct AutoType_34P1, common),
Lev Walkin15750402005-07-03 05:27:19 +0000421 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
422 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000423 .type = &asn_DEF_BOOLEAN,
Lev Walkina00d6b32006-03-21 03:40:38 +0000424 .memb_constraints = memb_common_constraint_3,
Lev Walkin59b176e2005-11-26 11:25:14 +0000425 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
426 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000427 .name = "common"
428 },
429};
Lev Walkina7591b52014-10-12 18:37:35 -0700430static const ber_tlv_tag_t asn_DEF_AutoType_34P1_tags_3[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000431 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
432};
Lev Walkina7591b52014-10-12 18:37:35 -0700433static const asn_TYPE_tag2member_t asn_MAP_AutoType_34P1_tag2el_3[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700434 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common */
Lev Walkin15750402005-07-03 05:27:19 +0000435};
Lev Walkina00d6b32006-03-21 03:40:38 +0000436static asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P1_specs_3 = {
437 sizeof(struct AutoType_34P1),
438 offsetof(struct AutoType_34P1, _asn_ctx),
439 asn_MAP_AutoType_34P1_tag2el_3,
Lev Walkin15750402005-07-03 05:27:19 +0000440 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000441 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin15750402005-07-03 05:27:19 +0000442 -1, /* Start extensions */
443 -1 /* Stop extensions */
444};
Lev Walkina00d6b32006-03-21 03:40:38 +0000445asn_TYPE_descriptor_t asn_DEF_AutoType_34P1 = {
446 "AutoType",
447 "AutoType",
Lev Walkin15750402005-07-03 05:27:19 +0000448 SEQUENCE_free,
449 SEQUENCE_print,
450 SEQUENCE_constraint,
451 SEQUENCE_decode_ber,
452 SEQUENCE_encode_der,
453 SEQUENCE_decode_xer,
454 SEQUENCE_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000455 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinba68c912017-07-06 07:52:39 -0700456 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin15750402005-07-03 05:27:19 +0000457 0, /* Use generic outmost tag fetcher */
Lev Walkina00d6b32006-03-21 03:40:38 +0000458 asn_DEF_AutoType_34P1_tags_3,
459 sizeof(asn_DEF_AutoType_34P1_tags_3)
460 /sizeof(asn_DEF_AutoType_34P1_tags_3[0]), /* 1 */
461 asn_DEF_AutoType_34P1_tags_3, /* Same as above */
462 sizeof(asn_DEF_AutoType_34P1_tags_3)
463 /sizeof(asn_DEF_AutoType_34P1_tags_3[0]), /* 1 */
Lev Walkin59b176e2005-11-26 11:25:14 +0000464 0, /* No PER visible constraints */
Lev Walkina00d6b32006-03-21 03:40:38 +0000465 asn_MBR_AutoType_34P1_3,
Lev Walkin15750402005-07-03 05:27:19 +0000466 1, /* Elements count */
Lev Walkina00d6b32006-03-21 03:40:38 +0000467 &asn_SPC_AutoType_34P1_specs_3 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000468};
469
Lev Walkina00d6b32006-03-21 03:40:38 +0000470
471/*** <<< INCLUDES [AutoChoice] >>> ***/
472
Lev Walkin22b5ed42006-09-13 02:51:20 +0000473#include "AutoType.h"
Lev Walkina00d6b32006-03-21 03:40:38 +0000474#include <constr_CHOICE.h>
475
476/*** <<< DEPS [AutoChoice] >>> ***/
477
478typedef enum AutoChoice_PR {
479 AutoChoice_PR_NOTHING, /* No components present */
480 AutoChoice_PR_type1,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000481 AutoChoice_PR_type2
Lev Walkina00d6b32006-03-21 03:40:38 +0000482} AutoChoice_PR;
483
484/*** <<< TYPE-DECLS [AutoChoice] >>> ***/
485
486typedef struct AutoChoice {
487 AutoChoice_PR present;
488 union AutoChoice_u {
489 AutoType_34P0_t type1;
490 AutoType_34P1_t type2;
491 } choice;
492
493 /* Context for parsing across buffer boundaries */
494 asn_struct_ctx_t _asn_ctx;
495} AutoChoice_t;
496
497/*** <<< FUNC-DECLS [AutoChoice] >>> ***/
498
499extern asn_TYPE_descriptor_t asn_DEF_AutoChoice;
500
501/*** <<< STAT-DEFS [AutoChoice] >>> ***/
502
Lev Walkin15750402005-07-03 05:27:19 +0000503static asn_TYPE_member_t asn_MBR_AutoChoice_1[] = {
504 { ATF_NOFLAGS, 0, offsetof(struct AutoChoice, choice.type1),
505 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
506 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkina00d6b32006-03-21 03:40:38 +0000507 .type = &asn_DEF_AutoType_34P0,
Lev Walkin15750402005-07-03 05:27:19 +0000508 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000509 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
510 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000511 .name = "type1"
512 },
513 { ATF_NOFLAGS, 0, offsetof(struct AutoChoice, choice.type2),
514 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
515 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkina00d6b32006-03-21 03:40:38 +0000516 .type = &asn_DEF_AutoType_34P1,
Lev Walkin15750402005-07-03 05:27:19 +0000517 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin59b176e2005-11-26 11:25:14 +0000518 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
519 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000520 .name = "type2"
521 },
522};
Lev Walkina7591b52014-10-12 18:37:35 -0700523static const asn_TYPE_tag2member_t asn_MAP_AutoChoice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700524 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* type1 */
525 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* type2 */
Lev Walkin15750402005-07-03 05:27:19 +0000526};
Lev Walkin59b176e2005-11-26 11:25:14 +0000527static asn_CHOICE_specifics_t asn_SPC_AutoChoice_specs_1 = {
Lev Walkin15750402005-07-03 05:27:19 +0000528 sizeof(struct AutoChoice),
529 offsetof(struct AutoChoice, _asn_ctx),
530 offsetof(struct AutoChoice, present),
531 sizeof(((struct AutoChoice *)0)->present),
Lev Walkin59b176e2005-11-26 11:25:14 +0000532 asn_MAP_AutoChoice_tag2el_1,
Lev Walkin15750402005-07-03 05:27:19 +0000533 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000534 .canonical_order = 0,
535 .ext_start = -1 /* Extensions start */
Lev Walkin15750402005-07-03 05:27:19 +0000536};
537asn_TYPE_descriptor_t asn_DEF_AutoChoice = {
538 "AutoChoice",
539 "AutoChoice",
540 CHOICE_free,
541 CHOICE_print,
542 CHOICE_constraint,
543 CHOICE_decode_ber,
544 CHOICE_encode_der,
545 CHOICE_decode_xer,
546 CHOICE_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000547 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinba68c912017-07-06 07:52:39 -0700548 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin15750402005-07-03 05:27:19 +0000549 CHOICE_outmost_tag,
550 0, /* No effective tags (pointer) */
551 0, /* No effective tags (count) */
552 0, /* No tags (pointer) */
553 0, /* No tags (count) */
Lev Walkin59b176e2005-11-26 11:25:14 +0000554 0, /* No PER visible constraints */
Lev Walkin15750402005-07-03 05:27:19 +0000555 asn_MBR_AutoChoice_1,
556 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000557 &asn_SPC_AutoChoice_specs_1 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000558};
559