blob: d4e4aa70d201d9568c2a17ba0192b50d2e5cbda5 [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 Walkindf2edbb2017-10-21 13:40:07 -0700108 -1, /* First extension addition */
Lev Walkin15750402005-07-03 05:27:19 +0000109};
Lev Walkina00d6b32006-03-21 03:40:38 +0000110asn_TYPE_descriptor_t asn_DEF_TestType_16P0 = {
111 "TestType",
112 "TestType",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800113 &asn_OP_SEQUENCE,
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 Walkin0bfea562017-09-29 23:16:48 -0700120 { 0, 0, SEQUENCE_constraint },
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 Walkin20696a42017-10-17 21:27:33 -0700126static int asn_DFL_4_cmp_0(const void *sptr) {
127 const BOOLEAN_t *st = sptr;
128
129 if(!st) {
130 return -1; /* No value is not a default value */
131 }
132
133 /* Test default value 0 */
134 return (*st != 0);
135}
136static int asn_DFL_4_set_0(void **sptr) {
Lev Walkin0c0bca62006-03-21 04:48:15 +0000137 BOOLEAN_t *st = *sptr;
138
139 if(!st) {
140 st = (*sptr = CALLOC(1, sizeof(*st)));
141 if(!st) return -1;
142 }
143
Lev Walkin20696a42017-10-17 21:27:33 -0700144 /* Install default value 0 */
145 *st = 0;
146 return 0;
Lev Walkin0c0bca62006-03-21 04:48:15 +0000147}
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800148asn_TYPE_member_t asn_MBR_TestType_16P1_3[] = {
Lev Walkin0c0bca62006-03-21 04:48:15 +0000149 { ATF_NOFLAGS, 1, offsetof(struct TestType_16P1, common),
Lev Walkin15750402005-07-03 05:27:19 +0000150 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
151 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000152 .type = &asn_DEF_BOOLEAN,
Lev Walkin67a30122017-08-10 05:48:54 -0700153 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700154 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkinb37ee632017-10-18 16:52:18 -0700155 .default_value_cmp = &asn_DFL_4_cmp_0, /* Compare DEFAULT 0 */
156 .default_value_set = &asn_DFL_4_set_0, /* Set DEFAULT 0 */
Lev Walkin15750402005-07-03 05:27:19 +0000157 .name = "common"
158 },
159};
Lev Walkina7591b52014-10-12 18:37:35 -0700160static const ber_tlv_tag_t asn_DEF_TestType_16P1_tags_3[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000161 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
162};
Lev Walkina7591b52014-10-12 18:37:35 -0700163static const asn_TYPE_tag2member_t asn_MAP_TestType_16P1_tag2el_3[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700164 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 } /* common */
Lev Walkin15750402005-07-03 05:27:19 +0000165};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800166asn_SEQUENCE_specifics_t asn_SPC_TestType_16P1_specs_3 = {
Lev Walkina00d6b32006-03-21 03:40:38 +0000167 sizeof(struct TestType_16P1),
168 offsetof(struct TestType_16P1, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700169 .tag2el = asn_MAP_TestType_16P1_tag2el_3,
170 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000171 0, 0, 0, /* Optional elements (not needed) */
Lev Walkindf2edbb2017-10-21 13:40:07 -0700172 -1, /* First extension addition */
Lev Walkin15750402005-07-03 05:27:19 +0000173};
Lev Walkina00d6b32006-03-21 03:40:38 +0000174asn_TYPE_descriptor_t asn_DEF_TestType_16P1 = {
175 "TestType",
176 "TestType",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800177 &asn_OP_SEQUENCE,
Lev Walkina00d6b32006-03-21 03:40:38 +0000178 asn_DEF_TestType_16P1_tags_3,
179 sizeof(asn_DEF_TestType_16P1_tags_3)
180 /sizeof(asn_DEF_TestType_16P1_tags_3[0]), /* 1 */
181 asn_DEF_TestType_16P1_tags_3, /* Same as above */
182 sizeof(asn_DEF_TestType_16P1_tags_3)
183 /sizeof(asn_DEF_TestType_16P1_tags_3[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700184 { 0, 0, SEQUENCE_constraint },
Lev Walkina00d6b32006-03-21 03:40:38 +0000185 asn_MBR_TestType_16P1_3,
Lev Walkin15750402005-07-03 05:27:19 +0000186 1, /* Elements count */
Lev Walkina00d6b32006-03-21 03:40:38 +0000187 &asn_SPC_TestType_16P1_specs_3 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000188};
189
Lev Walkina00d6b32006-03-21 03:40:38 +0000190
191/*** <<< INCLUDES [TestChoice] >>> ***/
192
Lev Walkin22b5ed42006-09-13 02:51:20 +0000193#include "TestType.h"
Lev Walkina00d6b32006-03-21 03:40:38 +0000194#include <constr_CHOICE.h>
195
196/*** <<< DEPS [TestChoice] >>> ***/
197
198typedef enum TestChoice_PR {
199 TestChoice_PR_NOTHING, /* No components present */
200 TestChoice_PR_type1,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000201 TestChoice_PR_type2
Lev Walkina00d6b32006-03-21 03:40:38 +0000202} TestChoice_PR;
203
204/*** <<< TYPE-DECLS [TestChoice] >>> ***/
205
206typedef struct TestChoice {
207 TestChoice_PR present;
208 union TestChoice_u {
209 TestType_16P0_t type1;
210 TestType_16P1_t type2;
211 } choice;
212
213 /* Context for parsing across buffer boundaries */
214 asn_struct_ctx_t _asn_ctx;
215} TestChoice_t;
216
217/*** <<< FUNC-DECLS [TestChoice] >>> ***/
218
219extern asn_TYPE_descriptor_t asn_DEF_TestChoice;
220
221/*** <<< STAT-DEFS [TestChoice] >>> ***/
222
Lev Walkin15750402005-07-03 05:27:19 +0000223static asn_TYPE_member_t asn_MBR_TestChoice_1[] = {
224 { ATF_NOFLAGS, 0, offsetof(struct TestChoice, choice.type1),
225 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
226 .tag_mode = 0,
Lev Walkina00d6b32006-03-21 03:40:38 +0000227 .type = &asn_DEF_TestType_16P0,
Lev Walkin67a30122017-08-10 05:48:54 -0700228 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700229 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700230 0, 0, /* No default value */
Lev Walkin15750402005-07-03 05:27:19 +0000231 .name = "type1"
232 },
233 { ATF_NOFLAGS, 0, offsetof(struct TestChoice, choice.type2),
234 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
235 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkina00d6b32006-03-21 03:40:38 +0000236 .type = &asn_DEF_TestType_16P1,
Lev Walkin67a30122017-08-10 05:48:54 -0700237 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700238 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700239 0, 0, /* No default value */
Lev Walkin15750402005-07-03 05:27:19 +0000240 .name = "type2"
241 },
242};
Lev Walkina7591b52014-10-12 18:37:35 -0700243static const asn_TYPE_tag2member_t asn_MAP_TestChoice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700244 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* type1 */
245 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 } /* type2 */
Lev Walkin15750402005-07-03 05:27:19 +0000246};
Lev Walkin59b176e2005-11-26 11:25:14 +0000247static asn_CHOICE_specifics_t asn_SPC_TestChoice_specs_1 = {
Lev Walkin15750402005-07-03 05:27:19 +0000248 sizeof(struct TestChoice),
249 offsetof(struct TestChoice, _asn_ctx),
250 offsetof(struct TestChoice, present),
251 sizeof(((struct TestChoice *)0)->present),
Lev Walkine3917082017-08-23 10:29:38 -0700252 .tag2el = asn_MAP_TestChoice_tag2el_1,
253 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkin20696a42017-10-17 21:27:33 -0700254 0, 0,
Lev Walkindf2edbb2017-10-21 13:40:07 -0700255 .first_extension = -1 /* Extensions start */
Lev Walkin15750402005-07-03 05:27:19 +0000256};
257asn_TYPE_descriptor_t asn_DEF_TestChoice = {
258 "TestChoice",
259 "TestChoice",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800260 &asn_OP_CHOICE,
Lev Walkin15750402005-07-03 05:27:19 +0000261 0, /* No effective tags (pointer) */
262 0, /* No effective tags (count) */
263 0, /* No tags (pointer) */
264 0, /* No tags (count) */
Lev Walkin0bfea562017-09-29 23:16:48 -0700265 { 0, 0, CHOICE_constraint },
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;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800296extern asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P0_specs_1;
297extern asn_TYPE_member_t asn_MBR_AutoType_34P0_1[1];
Lev Walkina00d6b32006-03-21 03:40:38 +0000298extern asn_TYPE_descriptor_t asn_DEF_AutoType_34P1;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800299extern asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P1_specs_3;
300extern asn_TYPE_member_t asn_MBR_AutoType_34P1_3[1];
Lev Walkin15750402005-07-03 05:27:19 +0000301
Lev Walkina00d6b32006-03-21 03:40:38 +0000302/*** <<< CODE [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000303
304static int
Lev Walkin20696a42017-10-17 21:27:33 -0700305memb_common_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000306 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin15750402005-07-03 05:27:19 +0000307 long value;
308
309 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700310 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +0000311 "%s: value not given (%s:%d)",
312 td->name, __FILE__, __LINE__);
313 return -1;
314 }
315
Lev Walkinc3f0b892005-08-14 02:40:04 +0000316 value = *(const long *)sptr;
Lev Walkin15750402005-07-03 05:27:19 +0000317
318 if((value == 0)) {
319 /* Constraint check succeeded */
320 return 0;
321 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700322 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +0000323 "%s: constraint failed (%s:%d)",
324 td->name, __FILE__, __LINE__);
325 return -1;
326 }
327}
328
329static int
Lev Walkin20696a42017-10-17 21:27:33 -0700330memb_common_constraint_3(const asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000331 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin15750402005-07-03 05:27:19 +0000332 BOOLEAN_t value;
333
334 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700335 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +0000336 "%s: value not given (%s:%d)",
337 td->name, __FILE__, __LINE__);
338 return -1;
339 }
340
341 value = (*(const long *)sptr) ? 1 : 0;
342
343 if((value <= 0)) {
344 /* Constraint check succeeded */
345 return 0;
346 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700347 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +0000348 "%s: constraint failed (%s:%d)",
349 td->name, __FILE__, __LINE__);
350 return -1;
351 }
352}
353
354
Lev Walkina00d6b32006-03-21 03:40:38 +0000355/*** <<< STAT-DEFS [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000356
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800357asn_TYPE_member_t asn_MBR_AutoType_34P0_1[] = {
Lev Walkina00d6b32006-03-21 03:40:38 +0000358 { ATF_NOFLAGS, 0, offsetof(struct AutoType_34P0, common),
Lev Walkin15750402005-07-03 05:27:19 +0000359 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
360 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000361 .type = &asn_DEF_NativeInteger,
Lev Walkin67a30122017-08-10 05:48:54 -0700362 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700363 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_common_constraint_1 },
Lev Walkin20696a42017-10-17 21:27:33 -0700364 0, 0, /* No default value */
Lev Walkin15750402005-07-03 05:27:19 +0000365 .name = "common"
366 },
367};
Lev Walkina7591b52014-10-12 18:37:35 -0700368static const ber_tlv_tag_t asn_DEF_AutoType_34P0_tags_1[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000369 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
370};
Lev Walkina7591b52014-10-12 18:37:35 -0700371static const asn_TYPE_tag2member_t asn_MAP_AutoType_34P0_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700372 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common */
Lev Walkin15750402005-07-03 05:27:19 +0000373};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800374asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P0_specs_1 = {
Lev Walkina00d6b32006-03-21 03:40:38 +0000375 sizeof(struct AutoType_34P0),
376 offsetof(struct AutoType_34P0, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700377 .tag2el = asn_MAP_AutoType_34P0_tag2el_1,
378 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000379 0, 0, 0, /* Optional elements (not needed) */
Lev Walkindf2edbb2017-10-21 13:40:07 -0700380 -1, /* First extension addition */
Lev Walkin15750402005-07-03 05:27:19 +0000381};
Lev Walkina00d6b32006-03-21 03:40:38 +0000382asn_TYPE_descriptor_t asn_DEF_AutoType_34P0 = {
383 "AutoType",
384 "AutoType",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800385 &asn_OP_SEQUENCE,
Lev Walkina00d6b32006-03-21 03:40:38 +0000386 asn_DEF_AutoType_34P0_tags_1,
387 sizeof(asn_DEF_AutoType_34P0_tags_1)
388 /sizeof(asn_DEF_AutoType_34P0_tags_1[0]), /* 1 */
389 asn_DEF_AutoType_34P0_tags_1, /* Same as above */
390 sizeof(asn_DEF_AutoType_34P0_tags_1)
391 /sizeof(asn_DEF_AutoType_34P0_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700392 { 0, 0, SEQUENCE_constraint },
Lev Walkina00d6b32006-03-21 03:40:38 +0000393 asn_MBR_AutoType_34P0_1,
Lev Walkin15750402005-07-03 05:27:19 +0000394 1, /* Elements count */
Lev Walkina00d6b32006-03-21 03:40:38 +0000395 &asn_SPC_AutoType_34P0_specs_1 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000396};
397
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800398asn_TYPE_member_t asn_MBR_AutoType_34P1_3[] = {
Lev Walkina00d6b32006-03-21 03:40:38 +0000399 { ATF_NOFLAGS, 0, offsetof(struct AutoType_34P1, common),
Lev Walkin15750402005-07-03 05:27:19 +0000400 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
401 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000402 .type = &asn_DEF_BOOLEAN,
Lev Walkin67a30122017-08-10 05:48:54 -0700403 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700404 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_common_constraint_3 },
Lev Walkin20696a42017-10-17 21:27:33 -0700405 0, 0, /* No default value */
Lev Walkin15750402005-07-03 05:27:19 +0000406 .name = "common"
407 },
408};
Lev Walkina7591b52014-10-12 18:37:35 -0700409static const ber_tlv_tag_t asn_DEF_AutoType_34P1_tags_3[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000410 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
411};
Lev Walkina7591b52014-10-12 18:37:35 -0700412static const asn_TYPE_tag2member_t asn_MAP_AutoType_34P1_tag2el_3[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700413 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common */
Lev Walkin15750402005-07-03 05:27:19 +0000414};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800415asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P1_specs_3 = {
Lev Walkina00d6b32006-03-21 03:40:38 +0000416 sizeof(struct AutoType_34P1),
417 offsetof(struct AutoType_34P1, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700418 .tag2el = asn_MAP_AutoType_34P1_tag2el_3,
419 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000420 0, 0, 0, /* Optional elements (not needed) */
Lev Walkindf2edbb2017-10-21 13:40:07 -0700421 -1, /* First extension addition */
Lev Walkin15750402005-07-03 05:27:19 +0000422};
Lev Walkina00d6b32006-03-21 03:40:38 +0000423asn_TYPE_descriptor_t asn_DEF_AutoType_34P1 = {
424 "AutoType",
425 "AutoType",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800426 &asn_OP_SEQUENCE,
Lev Walkina00d6b32006-03-21 03:40:38 +0000427 asn_DEF_AutoType_34P1_tags_3,
428 sizeof(asn_DEF_AutoType_34P1_tags_3)
429 /sizeof(asn_DEF_AutoType_34P1_tags_3[0]), /* 1 */
430 asn_DEF_AutoType_34P1_tags_3, /* Same as above */
431 sizeof(asn_DEF_AutoType_34P1_tags_3)
432 /sizeof(asn_DEF_AutoType_34P1_tags_3[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700433 { 0, 0, SEQUENCE_constraint },
Lev Walkina00d6b32006-03-21 03:40:38 +0000434 asn_MBR_AutoType_34P1_3,
Lev Walkin15750402005-07-03 05:27:19 +0000435 1, /* Elements count */
Lev Walkina00d6b32006-03-21 03:40:38 +0000436 &asn_SPC_AutoType_34P1_specs_3 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000437};
438
Lev Walkina00d6b32006-03-21 03:40:38 +0000439
440/*** <<< INCLUDES [AutoChoice] >>> ***/
441
Lev Walkin22b5ed42006-09-13 02:51:20 +0000442#include "AutoType.h"
Lev Walkina00d6b32006-03-21 03:40:38 +0000443#include <constr_CHOICE.h>
444
445/*** <<< DEPS [AutoChoice] >>> ***/
446
447typedef enum AutoChoice_PR {
448 AutoChoice_PR_NOTHING, /* No components present */
449 AutoChoice_PR_type1,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000450 AutoChoice_PR_type2
Lev Walkina00d6b32006-03-21 03:40:38 +0000451} AutoChoice_PR;
452
453/*** <<< TYPE-DECLS [AutoChoice] >>> ***/
454
455typedef struct AutoChoice {
456 AutoChoice_PR present;
457 union AutoChoice_u {
458 AutoType_34P0_t type1;
459 AutoType_34P1_t type2;
460 } choice;
461
462 /* Context for parsing across buffer boundaries */
463 asn_struct_ctx_t _asn_ctx;
464} AutoChoice_t;
465
466/*** <<< FUNC-DECLS [AutoChoice] >>> ***/
467
468extern asn_TYPE_descriptor_t asn_DEF_AutoChoice;
469
470/*** <<< STAT-DEFS [AutoChoice] >>> ***/
471
Lev Walkin15750402005-07-03 05:27:19 +0000472static asn_TYPE_member_t asn_MBR_AutoChoice_1[] = {
473 { ATF_NOFLAGS, 0, offsetof(struct AutoChoice, choice.type1),
474 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
475 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkina00d6b32006-03-21 03:40:38 +0000476 .type = &asn_DEF_AutoType_34P0,
Lev Walkin67a30122017-08-10 05:48:54 -0700477 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700478 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700479 0, 0, /* No default value */
Lev Walkin15750402005-07-03 05:27:19 +0000480 .name = "type1"
481 },
482 { ATF_NOFLAGS, 0, offsetof(struct AutoChoice, choice.type2),
483 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
484 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkina00d6b32006-03-21 03:40:38 +0000485 .type = &asn_DEF_AutoType_34P1,
Lev Walkin67a30122017-08-10 05:48:54 -0700486 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700487 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin20696a42017-10-17 21:27:33 -0700488 0, 0, /* No default value */
Lev Walkin15750402005-07-03 05:27:19 +0000489 .name = "type2"
490 },
491};
Lev Walkina7591b52014-10-12 18:37:35 -0700492static const asn_TYPE_tag2member_t asn_MAP_AutoChoice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700493 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* type1 */
494 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* type2 */
Lev Walkin15750402005-07-03 05:27:19 +0000495};
Lev Walkin59b176e2005-11-26 11:25:14 +0000496static asn_CHOICE_specifics_t asn_SPC_AutoChoice_specs_1 = {
Lev Walkin15750402005-07-03 05:27:19 +0000497 sizeof(struct AutoChoice),
498 offsetof(struct AutoChoice, _asn_ctx),
499 offsetof(struct AutoChoice, present),
500 sizeof(((struct AutoChoice *)0)->present),
Lev Walkine3917082017-08-23 10:29:38 -0700501 .tag2el = asn_MAP_AutoChoice_tag2el_1,
502 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkin20696a42017-10-17 21:27:33 -0700503 0, 0,
Lev Walkindf2edbb2017-10-21 13:40:07 -0700504 .first_extension = -1 /* Extensions start */
Lev Walkin15750402005-07-03 05:27:19 +0000505};
506asn_TYPE_descriptor_t asn_DEF_AutoChoice = {
507 "AutoChoice",
508 "AutoChoice",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800509 &asn_OP_CHOICE,
Lev Walkin15750402005-07-03 05:27:19 +0000510 0, /* No effective tags (pointer) */
511 0, /* No effective tags (count) */
512 0, /* No tags (pointer) */
513 0, /* No tags (count) */
Lev Walkin0bfea562017-09-29 23:16:48 -0700514 { 0, 0, CHOICE_constraint },
Lev Walkin15750402005-07-03 05:27:19 +0000515 asn_MBR_AutoChoice_1,
516 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000517 &asn_SPC_AutoChoice_specs_1 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000518};
519