blob: 6d9bba7f58b5f2a3c5cb36182df6b010609436d9 [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;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080026extern asn_SEQUENCE_specifics_t asn_SPC_TestType_16P0_specs_1;
27extern asn_TYPE_member_t asn_MBR_TestType_16P0_1[1];
Lev Walkina00d6b32006-03-21 03:40:38 +000028extern asn_TYPE_descriptor_t asn_DEF_TestType_16P1;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080029extern asn_SEQUENCE_specifics_t asn_SPC_TestType_16P1_specs_3;
30extern asn_TYPE_member_t asn_MBR_TestType_16P1_3[1];
Lev Walkin15750402005-07-03 05:27:19 +000031
Lev Walkina00d6b32006-03-21 03:40:38 +000032/*** <<< CODE [TestType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +000033
34static int
Lev Walkin20696a42017-10-17 21:27:33 -070035memb_common_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +000036 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin15750402005-07-03 05:27:19 +000037 long value;
38
39 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -070040 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +000041 "%s: value not given (%s:%d)",
42 td->name, __FILE__, __LINE__);
43 return -1;
44 }
45
Lev Walkinc3f0b892005-08-14 02:40:04 +000046 value = *(const long *)sptr;
Lev Walkin15750402005-07-03 05:27:19 +000047
48 if((value >= 1 && value <= 10)) {
49 /* Constraint check succeeded */
50 return 0;
51 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -070052 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +000053 "%s: constraint failed (%s:%d)",
54 td->name, __FILE__, __LINE__);
55 return -1;
56 }
57}
58
59
Lev Walkina00d6b32006-03-21 03:40:38 +000060/*** <<< STAT-DEFS [TestType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +000061
Lev Walkin20696a42017-10-17 21:27:33 -070062static int asn_DFL_2_cmp_0(const void *sptr) {
63 const long *st = sptr;
64
65 if(!st) {
66 return -1; /* No value is not a default value */
67 }
68
69 /* Test default value 0 */
70 return (*st != 0);
71}
72static int asn_DFL_2_set_0(void **sptr) {
Lev Walkin0c0bca62006-03-21 04:48:15 +000073 long *st = *sptr;
74
75 if(!st) {
76 st = (*sptr = CALLOC(1, sizeof(*st)));
77 if(!st) return -1;
78 }
79
Lev Walkin20696a42017-10-17 21:27:33 -070080 /* Install default value 0 */
81 *st = 0;
82 return 0;
Lev Walkin0c0bca62006-03-21 04:48:15 +000083}
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080084asn_TYPE_member_t asn_MBR_TestType_16P0_1[] = {
Lev Walkin0c0bca62006-03-21 04:48:15 +000085 { ATF_NOFLAGS, 1, offsetof(struct TestType_16P0, common),
Lev Walkin15750402005-07-03 05:27:19 +000086 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
87 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +000088 .type = &asn_DEF_NativeInteger,
Lev Walkin67a30122017-08-10 05:48:54 -070089 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -070090 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_common_constraint_1 },
Lev Walkinb37ee632017-10-18 16:52:18 -070091 .default_value_cmp = &asn_DFL_2_cmp_0, /* Compare DEFAULT 0 */
92 .default_value_set = &asn_DFL_2_set_0, /* Set DEFAULT 0 */
Lev Walkin15750402005-07-03 05:27:19 +000093 .name = "common"
94 },
95};
Lev Walkina7591b52014-10-12 18:37:35 -070096static const ber_tlv_tag_t asn_DEF_TestType_16P0_tags_1[] = {
Lev Walkin15750402005-07-03 05:27:19 +000097 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
98};
Lev Walkina7591b52014-10-12 18:37:35 -070099static const asn_TYPE_tag2member_t asn_MAP_TestType_16P0_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700100 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* common */
Lev Walkin15750402005-07-03 05:27:19 +0000101};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800102asn_SEQUENCE_specifics_t asn_SPC_TestType_16P0_specs_1 = {
Lev Walkina00d6b32006-03-21 03:40:38 +0000103 sizeof(struct TestType_16P0),
104 offsetof(struct TestType_16P0, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700105 .tag2el = asn_MAP_TestType_16P0_tag2el_1,
106 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000107 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin15750402005-07-03 05:27:19 +0000108 -1, /* Start extensions */
109 -1 /* Stop extensions */
110};
Lev Walkina00d6b32006-03-21 03:40:38 +0000111asn_TYPE_descriptor_t asn_DEF_TestType_16P0 = {
112 "TestType",
113 "TestType",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800114 &asn_OP_SEQUENCE,
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 Walkin0bfea562017-09-29 23:16:48 -0700121 { 0, 0, SEQUENCE_constraint },
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 Walkin20696a42017-10-17 21:27:33 -0700127static int asn_DFL_4_cmp_0(const void *sptr) {
128 const BOOLEAN_t *st = sptr;
129
130 if(!st) {
131 return -1; /* No value is not a default value */
132 }
133
134 /* Test default value 0 */
135 return (*st != 0);
136}
137static int asn_DFL_4_set_0(void **sptr) {
Lev Walkin0c0bca62006-03-21 04:48:15 +0000138 BOOLEAN_t *st = *sptr;
139
140 if(!st) {
141 st = (*sptr = CALLOC(1, sizeof(*st)));
142 if(!st) return -1;
143 }
144
Lev Walkin20696a42017-10-17 21:27:33 -0700145 /* Install default value 0 */
146 *st = 0;
147 return 0;
Lev Walkin0c0bca62006-03-21 04:48:15 +0000148}
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800149asn_TYPE_member_t asn_MBR_TestType_16P1_3[] = {
Lev Walkin0c0bca62006-03-21 04:48:15 +0000150 { ATF_NOFLAGS, 1, offsetof(struct TestType_16P1, common),
Lev Walkin15750402005-07-03 05:27:19 +0000151 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
152 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000153 .type = &asn_DEF_BOOLEAN,
Lev Walkin67a30122017-08-10 05:48:54 -0700154 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700155 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkinb37ee632017-10-18 16:52:18 -0700156 .default_value_cmp = &asn_DFL_4_cmp_0, /* Compare DEFAULT 0 */
157 .default_value_set = &asn_DFL_4_set_0, /* Set DEFAULT 0 */
Lev Walkin15750402005-07-03 05:27:19 +0000158 .name = "common"
159 },
160};
Lev Walkina7591b52014-10-12 18:37:35 -0700161static const ber_tlv_tag_t asn_DEF_TestType_16P1_tags_3[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000162 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
163};
Lev Walkina7591b52014-10-12 18:37:35 -0700164static const asn_TYPE_tag2member_t asn_MAP_TestType_16P1_tag2el_3[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700165 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 } /* common */
Lev Walkin15750402005-07-03 05:27:19 +0000166};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800167asn_SEQUENCE_specifics_t asn_SPC_TestType_16P1_specs_3 = {
Lev Walkina00d6b32006-03-21 03:40:38 +0000168 sizeof(struct TestType_16P1),
169 offsetof(struct TestType_16P1, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700170 .tag2el = asn_MAP_TestType_16P1_tag2el_3,
171 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000172 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin15750402005-07-03 05:27:19 +0000173 -1, /* Start extensions */
174 -1 /* Stop extensions */
175};
Lev Walkina00d6b32006-03-21 03:40:38 +0000176asn_TYPE_descriptor_t asn_DEF_TestType_16P1 = {
177 "TestType",
178 "TestType",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800179 &asn_OP_SEQUENCE,
Lev Walkina00d6b32006-03-21 03:40:38 +0000180 asn_DEF_TestType_16P1_tags_3,
181 sizeof(asn_DEF_TestType_16P1_tags_3)
182 /sizeof(asn_DEF_TestType_16P1_tags_3[0]), /* 1 */
183 asn_DEF_TestType_16P1_tags_3, /* Same as above */
184 sizeof(asn_DEF_TestType_16P1_tags_3)
185 /sizeof(asn_DEF_TestType_16P1_tags_3[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700186 { 0, 0, SEQUENCE_constraint },
Lev Walkina00d6b32006-03-21 03:40:38 +0000187 asn_MBR_TestType_16P1_3,
Lev Walkin15750402005-07-03 05:27:19 +0000188 1, /* Elements count */
Lev Walkina00d6b32006-03-21 03:40:38 +0000189 &asn_SPC_TestType_16P1_specs_3 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000190};
191
Lev Walkina00d6b32006-03-21 03:40:38 +0000192
193/*** <<< INCLUDES [TestChoice] >>> ***/
194
Lev Walkin22b5ed42006-09-13 02:51:20 +0000195#include "TestType.h"
Lev Walkina00d6b32006-03-21 03:40:38 +0000196#include <constr_CHOICE.h>
197
198/*** <<< DEPS [TestChoice] >>> ***/
199
200typedef enum TestChoice_PR {
201 TestChoice_PR_NOTHING, /* No components present */
202 TestChoice_PR_type1,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000203 TestChoice_PR_type2
Lev Walkina00d6b32006-03-21 03:40:38 +0000204} TestChoice_PR;
205
206/*** <<< TYPE-DECLS [TestChoice] >>> ***/
207
208typedef struct TestChoice {
209 TestChoice_PR present;
210 union TestChoice_u {
211 TestType_16P0_t type1;
212 TestType_16P1_t type2;
213 } choice;
214
215 /* Context for parsing across buffer boundaries */
216 asn_struct_ctx_t _asn_ctx;
217} TestChoice_t;
218
219/*** <<< FUNC-DECLS [TestChoice] >>> ***/
220
221extern asn_TYPE_descriptor_t asn_DEF_TestChoice;
222
223/*** <<< STAT-DEFS [TestChoice] >>> ***/
224
Lev Walkin15750402005-07-03 05:27:19 +0000225static asn_TYPE_member_t asn_MBR_TestChoice_1[] = {
226 { ATF_NOFLAGS, 0, offsetof(struct TestChoice, choice.type1),
227 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
228 .tag_mode = 0,
Lev Walkina00d6b32006-03-21 03:40:38 +0000229 .type = &asn_DEF_TestType_16P0,
Lev Walkin67a30122017-08-10 05:48:54 -0700230 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700231 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700232 0, 0, /* No default value */
Lev Walkin15750402005-07-03 05:27:19 +0000233 .name = "type1"
234 },
235 { ATF_NOFLAGS, 0, offsetof(struct TestChoice, choice.type2),
236 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
237 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkina00d6b32006-03-21 03:40:38 +0000238 .type = &asn_DEF_TestType_16P1,
Lev Walkin67a30122017-08-10 05:48:54 -0700239 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700240 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700241 0, 0, /* No default value */
Lev Walkin15750402005-07-03 05:27:19 +0000242 .name = "type2"
243 },
244};
Lev Walkina7591b52014-10-12 18:37:35 -0700245static const asn_TYPE_tag2member_t asn_MAP_TestChoice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700246 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* type1 */
247 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 } /* type2 */
Lev Walkin15750402005-07-03 05:27:19 +0000248};
Lev Walkin59b176e2005-11-26 11:25:14 +0000249static asn_CHOICE_specifics_t asn_SPC_TestChoice_specs_1 = {
Lev Walkin15750402005-07-03 05:27:19 +0000250 sizeof(struct TestChoice),
251 offsetof(struct TestChoice, _asn_ctx),
252 offsetof(struct TestChoice, present),
253 sizeof(((struct TestChoice *)0)->present),
Lev Walkine3917082017-08-23 10:29:38 -0700254 .tag2el = asn_MAP_TestChoice_tag2el_1,
255 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkin20696a42017-10-17 21:27:33 -0700256 0, 0,
Lev Walkin59b176e2005-11-26 11:25:14 +0000257 .ext_start = -1 /* Extensions start */
Lev Walkin15750402005-07-03 05:27:19 +0000258};
259asn_TYPE_descriptor_t asn_DEF_TestChoice = {
260 "TestChoice",
261 "TestChoice",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800262 &asn_OP_CHOICE,
Lev Walkin15750402005-07-03 05:27:19 +0000263 0, /* No effective tags (pointer) */
264 0, /* No effective tags (count) */
265 0, /* No tags (pointer) */
266 0, /* No tags (count) */
Lev Walkin0bfea562017-09-29 23:16:48 -0700267 { 0, 0, CHOICE_constraint },
Lev Walkin15750402005-07-03 05:27:19 +0000268 asn_MBR_TestChoice_1,
269 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000270 &asn_SPC_TestChoice_specs_1 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000271};
272
273
Lev Walkina00d6b32006-03-21 03:40:38 +0000274/*** <<< INCLUDES [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000275
Lev Walkinc3f0b892005-08-14 02:40:04 +0000276#include <NativeInteger.h>
Lev Walkin15750402005-07-03 05:27:19 +0000277#include <constr_SEQUENCE.h>
278#include <BOOLEAN.h>
Lev Walkin15750402005-07-03 05:27:19 +0000279
Lev Walkina00d6b32006-03-21 03:40:38 +0000280/*** <<< TYPE-DECLS [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000281
Lev Walkina00d6b32006-03-21 03:40:38 +0000282typedef struct AutoType_34P0 {
283 long common;
Lev Walkin15750402005-07-03 05:27:19 +0000284
285 /* Context for parsing across buffer boundaries */
286 asn_struct_ctx_t _asn_ctx;
Lev Walkina00d6b32006-03-21 03:40:38 +0000287} AutoType_34P0_t;
288typedef struct AutoType_34P1 {
289 BOOLEAN_t common;
290
291 /* Context for parsing across buffer boundaries */
292 asn_struct_ctx_t _asn_ctx;
293} AutoType_34P1_t;
Lev Walkin15750402005-07-03 05:27:19 +0000294
Lev Walkina00d6b32006-03-21 03:40:38 +0000295/*** <<< FUNC-DECLS [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000296
Lev Walkina00d6b32006-03-21 03:40:38 +0000297extern asn_TYPE_descriptor_t asn_DEF_AutoType_34P0;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800298extern asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P0_specs_1;
299extern asn_TYPE_member_t asn_MBR_AutoType_34P0_1[1];
Lev Walkina00d6b32006-03-21 03:40:38 +0000300extern asn_TYPE_descriptor_t asn_DEF_AutoType_34P1;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800301extern asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P1_specs_3;
302extern asn_TYPE_member_t asn_MBR_AutoType_34P1_3[1];
Lev Walkin15750402005-07-03 05:27:19 +0000303
Lev Walkina00d6b32006-03-21 03:40:38 +0000304/*** <<< CODE [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000305
306static int
Lev Walkin20696a42017-10-17 21:27:33 -0700307memb_common_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000308 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin15750402005-07-03 05:27:19 +0000309 long value;
310
311 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700312 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +0000313 "%s: value not given (%s:%d)",
314 td->name, __FILE__, __LINE__);
315 return -1;
316 }
317
Lev Walkinc3f0b892005-08-14 02:40:04 +0000318 value = *(const long *)sptr;
Lev Walkin15750402005-07-03 05:27:19 +0000319
320 if((value == 0)) {
321 /* Constraint check succeeded */
322 return 0;
323 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700324 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +0000325 "%s: constraint failed (%s:%d)",
326 td->name, __FILE__, __LINE__);
327 return -1;
328 }
329}
330
331static int
Lev Walkin20696a42017-10-17 21:27:33 -0700332memb_common_constraint_3(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000333 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin15750402005-07-03 05:27:19 +0000334 BOOLEAN_t value;
335
336 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700337 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +0000338 "%s: value not given (%s:%d)",
339 td->name, __FILE__, __LINE__);
340 return -1;
341 }
342
343 value = (*(const long *)sptr) ? 1 : 0;
344
345 if((value <= 0)) {
346 /* Constraint check succeeded */
347 return 0;
348 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700349 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +0000350 "%s: constraint failed (%s:%d)",
351 td->name, __FILE__, __LINE__);
352 return -1;
353 }
354}
355
356
Lev Walkina00d6b32006-03-21 03:40:38 +0000357/*** <<< STAT-DEFS [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000358
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800359asn_TYPE_member_t asn_MBR_AutoType_34P0_1[] = {
Lev Walkina00d6b32006-03-21 03:40:38 +0000360 { ATF_NOFLAGS, 0, offsetof(struct AutoType_34P0, common),
Lev Walkin15750402005-07-03 05:27:19 +0000361 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
362 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000363 .type = &asn_DEF_NativeInteger,
Lev Walkin67a30122017-08-10 05:48:54 -0700364 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700365 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_common_constraint_1 },
Lev Walkin20696a42017-10-17 21:27:33 -0700366 0, 0, /* No default value */
Lev Walkin15750402005-07-03 05:27:19 +0000367 .name = "common"
368 },
369};
Lev Walkina7591b52014-10-12 18:37:35 -0700370static const ber_tlv_tag_t asn_DEF_AutoType_34P0_tags_1[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000371 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
372};
Lev Walkina7591b52014-10-12 18:37:35 -0700373static const asn_TYPE_tag2member_t asn_MAP_AutoType_34P0_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700374 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common */
Lev Walkin15750402005-07-03 05:27:19 +0000375};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800376asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P0_specs_1 = {
Lev Walkina00d6b32006-03-21 03:40:38 +0000377 sizeof(struct AutoType_34P0),
378 offsetof(struct AutoType_34P0, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700379 .tag2el = asn_MAP_AutoType_34P0_tag2el_1,
380 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000381 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin15750402005-07-03 05:27:19 +0000382 -1, /* Start extensions */
383 -1 /* Stop extensions */
384};
Lev Walkina00d6b32006-03-21 03:40:38 +0000385asn_TYPE_descriptor_t asn_DEF_AutoType_34P0 = {
386 "AutoType",
387 "AutoType",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800388 &asn_OP_SEQUENCE,
Lev Walkina00d6b32006-03-21 03:40:38 +0000389 asn_DEF_AutoType_34P0_tags_1,
390 sizeof(asn_DEF_AutoType_34P0_tags_1)
391 /sizeof(asn_DEF_AutoType_34P0_tags_1[0]), /* 1 */
392 asn_DEF_AutoType_34P0_tags_1, /* Same as above */
393 sizeof(asn_DEF_AutoType_34P0_tags_1)
394 /sizeof(asn_DEF_AutoType_34P0_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700395 { 0, 0, SEQUENCE_constraint },
Lev Walkina00d6b32006-03-21 03:40:38 +0000396 asn_MBR_AutoType_34P0_1,
Lev Walkin15750402005-07-03 05:27:19 +0000397 1, /* Elements count */
Lev Walkina00d6b32006-03-21 03:40:38 +0000398 &asn_SPC_AutoType_34P0_specs_1 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000399};
400
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800401asn_TYPE_member_t asn_MBR_AutoType_34P1_3[] = {
Lev Walkina00d6b32006-03-21 03:40:38 +0000402 { ATF_NOFLAGS, 0, offsetof(struct AutoType_34P1, common),
Lev Walkin15750402005-07-03 05:27:19 +0000403 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
404 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000405 .type = &asn_DEF_BOOLEAN,
Lev Walkin67a30122017-08-10 05:48:54 -0700406 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700407 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_common_constraint_3 },
Lev Walkin20696a42017-10-17 21:27:33 -0700408 0, 0, /* No default value */
Lev Walkin15750402005-07-03 05:27:19 +0000409 .name = "common"
410 },
411};
Lev Walkina7591b52014-10-12 18:37:35 -0700412static const ber_tlv_tag_t asn_DEF_AutoType_34P1_tags_3[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000413 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
414};
Lev Walkina7591b52014-10-12 18:37:35 -0700415static const asn_TYPE_tag2member_t asn_MAP_AutoType_34P1_tag2el_3[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700416 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common */
Lev Walkin15750402005-07-03 05:27:19 +0000417};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800418asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P1_specs_3 = {
Lev Walkina00d6b32006-03-21 03:40:38 +0000419 sizeof(struct AutoType_34P1),
420 offsetof(struct AutoType_34P1, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700421 .tag2el = asn_MAP_AutoType_34P1_tag2el_3,
422 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000423 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin15750402005-07-03 05:27:19 +0000424 -1, /* Start extensions */
425 -1 /* Stop extensions */
426};
Lev Walkina00d6b32006-03-21 03:40:38 +0000427asn_TYPE_descriptor_t asn_DEF_AutoType_34P1 = {
428 "AutoType",
429 "AutoType",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800430 &asn_OP_SEQUENCE,
Lev Walkina00d6b32006-03-21 03:40:38 +0000431 asn_DEF_AutoType_34P1_tags_3,
432 sizeof(asn_DEF_AutoType_34P1_tags_3)
433 /sizeof(asn_DEF_AutoType_34P1_tags_3[0]), /* 1 */
434 asn_DEF_AutoType_34P1_tags_3, /* Same as above */
435 sizeof(asn_DEF_AutoType_34P1_tags_3)
436 /sizeof(asn_DEF_AutoType_34P1_tags_3[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700437 { 0, 0, SEQUENCE_constraint },
Lev Walkina00d6b32006-03-21 03:40:38 +0000438 asn_MBR_AutoType_34P1_3,
Lev Walkin15750402005-07-03 05:27:19 +0000439 1, /* Elements count */
Lev Walkina00d6b32006-03-21 03:40:38 +0000440 &asn_SPC_AutoType_34P1_specs_3 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000441};
442
Lev Walkina00d6b32006-03-21 03:40:38 +0000443
444/*** <<< INCLUDES [AutoChoice] >>> ***/
445
Lev Walkin22b5ed42006-09-13 02:51:20 +0000446#include "AutoType.h"
Lev Walkina00d6b32006-03-21 03:40:38 +0000447#include <constr_CHOICE.h>
448
449/*** <<< DEPS [AutoChoice] >>> ***/
450
451typedef enum AutoChoice_PR {
452 AutoChoice_PR_NOTHING, /* No components present */
453 AutoChoice_PR_type1,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000454 AutoChoice_PR_type2
Lev Walkina00d6b32006-03-21 03:40:38 +0000455} AutoChoice_PR;
456
457/*** <<< TYPE-DECLS [AutoChoice] >>> ***/
458
459typedef struct AutoChoice {
460 AutoChoice_PR present;
461 union AutoChoice_u {
462 AutoType_34P0_t type1;
463 AutoType_34P1_t type2;
464 } choice;
465
466 /* Context for parsing across buffer boundaries */
467 asn_struct_ctx_t _asn_ctx;
468} AutoChoice_t;
469
470/*** <<< FUNC-DECLS [AutoChoice] >>> ***/
471
472extern asn_TYPE_descriptor_t asn_DEF_AutoChoice;
473
474/*** <<< STAT-DEFS [AutoChoice] >>> ***/
475
Lev Walkin15750402005-07-03 05:27:19 +0000476static asn_TYPE_member_t asn_MBR_AutoChoice_1[] = {
477 { ATF_NOFLAGS, 0, offsetof(struct AutoChoice, choice.type1),
478 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
479 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkina00d6b32006-03-21 03:40:38 +0000480 .type = &asn_DEF_AutoType_34P0,
Lev Walkin67a30122017-08-10 05:48:54 -0700481 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700482 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700483 0, 0, /* No default value */
Lev Walkin15750402005-07-03 05:27:19 +0000484 .name = "type1"
485 },
486 { ATF_NOFLAGS, 0, offsetof(struct AutoChoice, choice.type2),
487 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
488 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkina00d6b32006-03-21 03:40:38 +0000489 .type = &asn_DEF_AutoType_34P1,
Lev Walkin67a30122017-08-10 05:48:54 -0700490 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700491 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700492 0, 0, /* No default value */
Lev Walkin15750402005-07-03 05:27:19 +0000493 .name = "type2"
494 },
495};
Lev Walkina7591b52014-10-12 18:37:35 -0700496static const asn_TYPE_tag2member_t asn_MAP_AutoChoice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700497 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* type1 */
498 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* type2 */
Lev Walkin15750402005-07-03 05:27:19 +0000499};
Lev Walkin59b176e2005-11-26 11:25:14 +0000500static asn_CHOICE_specifics_t asn_SPC_AutoChoice_specs_1 = {
Lev Walkin15750402005-07-03 05:27:19 +0000501 sizeof(struct AutoChoice),
502 offsetof(struct AutoChoice, _asn_ctx),
503 offsetof(struct AutoChoice, present),
504 sizeof(((struct AutoChoice *)0)->present),
Lev Walkine3917082017-08-23 10:29:38 -0700505 .tag2el = asn_MAP_AutoChoice_tag2el_1,
506 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkin20696a42017-10-17 21:27:33 -0700507 0, 0,
Lev Walkin59b176e2005-11-26 11:25:14 +0000508 .ext_start = -1 /* Extensions start */
Lev Walkin15750402005-07-03 05:27:19 +0000509};
510asn_TYPE_descriptor_t asn_DEF_AutoChoice = {
511 "AutoChoice",
512 "AutoChoice",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800513 &asn_OP_CHOICE,
Lev Walkin15750402005-07-03 05:27:19 +0000514 0, /* No effective tags (pointer) */
515 0, /* No effective tags (count) */
516 0, /* No tags (pointer) */
517 0, /* No tags (count) */
Lev Walkin0bfea562017-09-29 23:16:48 -0700518 { 0, 0, CHOICE_constraint },
Lev Walkin15750402005-07-03 05:27:19 +0000519 asn_MBR_AutoChoice_1,
520 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000521 &asn_SPC_AutoChoice_specs_1 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000522};
523