blob: 538a342de15e7c4e1068dad022579b08d05c69ec [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 Walkina00d6b32006-03-21 03:40:38 +000035memb_common_constraint_1(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 Walkin9f5bb3a2006-08-18 01:46:46 +000062static int asn_DFL_2_set_0(int set_value, void **sptr) {
Lev Walkin0c0bca62006-03-21 04:48:15 +000063 long *st = *sptr;
64
65 if(!st) {
Lev Walkin9f5bb3a2006-08-18 01:46:46 +000066 if(!set_value) return -1; /* Not a default value */
Lev Walkin0c0bca62006-03-21 04:48:15 +000067 st = (*sptr = CALLOC(1, sizeof(*st)));
68 if(!st) return -1;
69 }
70
Lev Walkin9f5bb3a2006-08-18 01:46:46 +000071 if(set_value) {
72 /* Install default value 0 */
73 *st = 0;
74 return 0;
75 } else {
76 /* Test default value 0 */
77 return (*st == 0);
78 }
Lev Walkin0c0bca62006-03-21 04:48:15 +000079}
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080080asn_TYPE_member_t asn_MBR_TestType_16P0_1[] = {
Lev Walkin0c0bca62006-03-21 04:48:15 +000081 { ATF_NOFLAGS, 1, offsetof(struct TestType_16P0, common),
Lev Walkin15750402005-07-03 05:27:19 +000082 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
83 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +000084 .type = &asn_DEF_NativeInteger,
Lev Walkin67a30122017-08-10 05:48:54 -070085 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -070086 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_common_constraint_1 },
Lev Walkin0c0bca62006-03-21 04:48:15 +000087 .default_value = asn_DFL_2_set_0, /* DEFAULT 0 */
Lev Walkin15750402005-07-03 05:27:19 +000088 .name = "common"
89 },
90};
Lev Walkina7591b52014-10-12 18:37:35 -070091static const ber_tlv_tag_t asn_DEF_TestType_16P0_tags_1[] = {
Lev Walkin15750402005-07-03 05:27:19 +000092 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
93};
Lev Walkina7591b52014-10-12 18:37:35 -070094static const asn_TYPE_tag2member_t asn_MAP_TestType_16P0_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070095 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* common */
Lev Walkin15750402005-07-03 05:27:19 +000096};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +080097asn_SEQUENCE_specifics_t asn_SPC_TestType_16P0_specs_1 = {
Lev Walkina00d6b32006-03-21 03:40:38 +000098 sizeof(struct TestType_16P0),
99 offsetof(struct TestType_16P0, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700100 .tag2el = asn_MAP_TestType_16P0_tag2el_1,
101 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000102 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin15750402005-07-03 05:27:19 +0000103 -1, /* Start extensions */
104 -1 /* Stop extensions */
105};
Lev Walkina00d6b32006-03-21 03:40:38 +0000106asn_TYPE_descriptor_t asn_DEF_TestType_16P0 = {
107 "TestType",
108 "TestType",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800109 &asn_OP_SEQUENCE,
Lev Walkina00d6b32006-03-21 03:40:38 +0000110 asn_DEF_TestType_16P0_tags_1,
111 sizeof(asn_DEF_TestType_16P0_tags_1)
112 /sizeof(asn_DEF_TestType_16P0_tags_1[0]), /* 1 */
113 asn_DEF_TestType_16P0_tags_1, /* Same as above */
114 sizeof(asn_DEF_TestType_16P0_tags_1)
115 /sizeof(asn_DEF_TestType_16P0_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700116 { 0, 0, SEQUENCE_constraint },
Lev Walkina00d6b32006-03-21 03:40:38 +0000117 asn_MBR_TestType_16P0_1,
Lev Walkin15750402005-07-03 05:27:19 +0000118 1, /* Elements count */
Lev Walkina00d6b32006-03-21 03:40:38 +0000119 &asn_SPC_TestType_16P0_specs_1 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000120};
121
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000122static int asn_DFL_4_set_0(int set_value, void **sptr) {
Lev Walkin0c0bca62006-03-21 04:48:15 +0000123 BOOLEAN_t *st = *sptr;
124
125 if(!st) {
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000126 if(!set_value) return -1; /* Not a default value */
Lev Walkin0c0bca62006-03-21 04:48:15 +0000127 st = (*sptr = CALLOC(1, sizeof(*st)));
128 if(!st) return -1;
129 }
130
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000131 if(set_value) {
132 /* Install default value 0 */
133 *st = 0;
134 return 0;
135 } else {
136 /* Test default value 0 */
137 return (*st == 0);
138 }
Lev Walkin0c0bca62006-03-21 04:48:15 +0000139}
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800140asn_TYPE_member_t asn_MBR_TestType_16P1_3[] = {
Lev Walkin0c0bca62006-03-21 04:48:15 +0000141 { ATF_NOFLAGS, 1, offsetof(struct TestType_16P1, common),
Lev Walkin15750402005-07-03 05:27:19 +0000142 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
143 .tag_mode = 0,
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000144 .type = &asn_DEF_BOOLEAN,
Lev Walkin67a30122017-08-10 05:48:54 -0700145 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700146 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin0c0bca62006-03-21 04:48:15 +0000147 .default_value = asn_DFL_4_set_0, /* DEFAULT 0 */
Lev Walkin15750402005-07-03 05:27:19 +0000148 .name = "common"
149 },
150};
Lev Walkina7591b52014-10-12 18:37:35 -0700151static const ber_tlv_tag_t asn_DEF_TestType_16P1_tags_3[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000152 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
153};
Lev Walkina7591b52014-10-12 18:37:35 -0700154static const asn_TYPE_tag2member_t asn_MAP_TestType_16P1_tag2el_3[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700155 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 } /* common */
Lev Walkin15750402005-07-03 05:27:19 +0000156};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800157asn_SEQUENCE_specifics_t asn_SPC_TestType_16P1_specs_3 = {
Lev Walkina00d6b32006-03-21 03:40:38 +0000158 sizeof(struct TestType_16P1),
159 offsetof(struct TestType_16P1, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700160 .tag2el = asn_MAP_TestType_16P1_tag2el_3,
161 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000162 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin15750402005-07-03 05:27:19 +0000163 -1, /* Start extensions */
164 -1 /* Stop extensions */
165};
Lev Walkina00d6b32006-03-21 03:40:38 +0000166asn_TYPE_descriptor_t asn_DEF_TestType_16P1 = {
167 "TestType",
168 "TestType",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800169 &asn_OP_SEQUENCE,
Lev Walkina00d6b32006-03-21 03:40:38 +0000170 asn_DEF_TestType_16P1_tags_3,
171 sizeof(asn_DEF_TestType_16P1_tags_3)
172 /sizeof(asn_DEF_TestType_16P1_tags_3[0]), /* 1 */
173 asn_DEF_TestType_16P1_tags_3, /* Same as above */
174 sizeof(asn_DEF_TestType_16P1_tags_3)
175 /sizeof(asn_DEF_TestType_16P1_tags_3[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700176 { 0, 0, SEQUENCE_constraint },
Lev Walkina00d6b32006-03-21 03:40:38 +0000177 asn_MBR_TestType_16P1_3,
Lev Walkin15750402005-07-03 05:27:19 +0000178 1, /* Elements count */
Lev Walkina00d6b32006-03-21 03:40:38 +0000179 &asn_SPC_TestType_16P1_specs_3 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000180};
181
Lev Walkina00d6b32006-03-21 03:40:38 +0000182
183/*** <<< INCLUDES [TestChoice] >>> ***/
184
Lev Walkin22b5ed42006-09-13 02:51:20 +0000185#include "TestType.h"
Lev Walkina00d6b32006-03-21 03:40:38 +0000186#include <constr_CHOICE.h>
187
188/*** <<< DEPS [TestChoice] >>> ***/
189
190typedef enum TestChoice_PR {
191 TestChoice_PR_NOTHING, /* No components present */
192 TestChoice_PR_type1,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000193 TestChoice_PR_type2
Lev Walkina00d6b32006-03-21 03:40:38 +0000194} TestChoice_PR;
195
196/*** <<< TYPE-DECLS [TestChoice] >>> ***/
197
198typedef struct TestChoice {
199 TestChoice_PR present;
200 union TestChoice_u {
201 TestType_16P0_t type1;
202 TestType_16P1_t type2;
203 } choice;
204
205 /* Context for parsing across buffer boundaries */
206 asn_struct_ctx_t _asn_ctx;
207} TestChoice_t;
208
209/*** <<< FUNC-DECLS [TestChoice] >>> ***/
210
211extern asn_TYPE_descriptor_t asn_DEF_TestChoice;
212
213/*** <<< STAT-DEFS [TestChoice] >>> ***/
214
Lev Walkin15750402005-07-03 05:27:19 +0000215static asn_TYPE_member_t asn_MBR_TestChoice_1[] = {
216 { ATF_NOFLAGS, 0, offsetof(struct TestChoice, choice.type1),
217 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
218 .tag_mode = 0,
Lev Walkina00d6b32006-03-21 03:40:38 +0000219 .type = &asn_DEF_TestType_16P0,
Lev Walkin67a30122017-08-10 05:48:54 -0700220 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700221 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +0000222 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000223 .name = "type1"
224 },
225 { ATF_NOFLAGS, 0, offsetof(struct TestChoice, choice.type2),
226 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
227 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkina00d6b32006-03-21 03:40:38 +0000228 .type = &asn_DEF_TestType_16P1,
Lev Walkin67a30122017-08-10 05:48:54 -0700229 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700230 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +0000231 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000232 .name = "type2"
233 },
234};
Lev Walkina7591b52014-10-12 18:37:35 -0700235static const asn_TYPE_tag2member_t asn_MAP_TestChoice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700236 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* type1 */
237 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 } /* type2 */
Lev Walkin15750402005-07-03 05:27:19 +0000238};
Lev Walkin59b176e2005-11-26 11:25:14 +0000239static asn_CHOICE_specifics_t asn_SPC_TestChoice_specs_1 = {
Lev Walkin15750402005-07-03 05:27:19 +0000240 sizeof(struct TestChoice),
241 offsetof(struct TestChoice, _asn_ctx),
242 offsetof(struct TestChoice, present),
243 sizeof(((struct TestChoice *)0)->present),
Lev Walkine3917082017-08-23 10:29:38 -0700244 .tag2el = asn_MAP_TestChoice_tag2el_1,
245 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000246 .canonical_order = 0,
247 .ext_start = -1 /* Extensions start */
Lev Walkin15750402005-07-03 05:27:19 +0000248};
249asn_TYPE_descriptor_t asn_DEF_TestChoice = {
250 "TestChoice",
251 "TestChoice",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800252 &asn_OP_CHOICE,
Lev Walkin15750402005-07-03 05:27:19 +0000253 0, /* No effective tags (pointer) */
254 0, /* No effective tags (count) */
255 0, /* No tags (pointer) */
256 0, /* No tags (count) */
Lev Walkin0bfea562017-09-29 23:16:48 -0700257 { 0, 0, CHOICE_constraint },
Lev Walkin15750402005-07-03 05:27:19 +0000258 asn_MBR_TestChoice_1,
259 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000260 &asn_SPC_TestChoice_specs_1 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000261};
262
263
Lev Walkina00d6b32006-03-21 03:40:38 +0000264/*** <<< INCLUDES [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000265
Lev Walkinc3f0b892005-08-14 02:40:04 +0000266#include <NativeInteger.h>
Lev Walkin15750402005-07-03 05:27:19 +0000267#include <constr_SEQUENCE.h>
268#include <BOOLEAN.h>
Lev Walkin15750402005-07-03 05:27:19 +0000269
Lev Walkina00d6b32006-03-21 03:40:38 +0000270/*** <<< TYPE-DECLS [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000271
Lev Walkina00d6b32006-03-21 03:40:38 +0000272typedef struct AutoType_34P0 {
273 long common;
Lev Walkin15750402005-07-03 05:27:19 +0000274
275 /* Context for parsing across buffer boundaries */
276 asn_struct_ctx_t _asn_ctx;
Lev Walkina00d6b32006-03-21 03:40:38 +0000277} AutoType_34P0_t;
278typedef struct AutoType_34P1 {
279 BOOLEAN_t common;
280
281 /* Context for parsing across buffer boundaries */
282 asn_struct_ctx_t _asn_ctx;
283} AutoType_34P1_t;
Lev Walkin15750402005-07-03 05:27:19 +0000284
Lev Walkina00d6b32006-03-21 03:40:38 +0000285/*** <<< FUNC-DECLS [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000286
Lev Walkina00d6b32006-03-21 03:40:38 +0000287extern asn_TYPE_descriptor_t asn_DEF_AutoType_34P0;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800288extern asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P0_specs_1;
289extern asn_TYPE_member_t asn_MBR_AutoType_34P0_1[1];
Lev Walkina00d6b32006-03-21 03:40:38 +0000290extern asn_TYPE_descriptor_t asn_DEF_AutoType_34P1;
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800291extern asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P1_specs_3;
292extern asn_TYPE_member_t asn_MBR_AutoType_34P1_3[1];
Lev Walkin15750402005-07-03 05:27:19 +0000293
Lev Walkina00d6b32006-03-21 03:40:38 +0000294/*** <<< CODE [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000295
296static int
Lev Walkina00d6b32006-03-21 03:40:38 +0000297memb_common_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000298 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin15750402005-07-03 05:27:19 +0000299 long value;
300
301 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700302 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +0000303 "%s: value not given (%s:%d)",
304 td->name, __FILE__, __LINE__);
305 return -1;
306 }
307
Lev Walkinc3f0b892005-08-14 02:40:04 +0000308 value = *(const long *)sptr;
Lev Walkin15750402005-07-03 05:27:19 +0000309
310 if((value == 0)) {
311 /* Constraint check succeeded */
312 return 0;
313 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700314 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +0000315 "%s: constraint failed (%s:%d)",
316 td->name, __FILE__, __LINE__);
317 return -1;
318 }
319}
320
321static int
Lev Walkina00d6b32006-03-21 03:40:38 +0000322memb_common_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000323 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin15750402005-07-03 05:27:19 +0000324 BOOLEAN_t value;
325
326 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700327 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +0000328 "%s: value not given (%s:%d)",
329 td->name, __FILE__, __LINE__);
330 return -1;
331 }
332
333 value = (*(const long *)sptr) ? 1 : 0;
334
335 if((value <= 0)) {
336 /* Constraint check succeeded */
337 return 0;
338 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700339 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin15750402005-07-03 05:27:19 +0000340 "%s: constraint failed (%s:%d)",
341 td->name, __FILE__, __LINE__);
342 return -1;
343 }
344}
345
346
Lev Walkina00d6b32006-03-21 03:40:38 +0000347/*** <<< STAT-DEFS [AutoType] >>> ***/
Lev Walkin15750402005-07-03 05:27:19 +0000348
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800349asn_TYPE_member_t asn_MBR_AutoType_34P0_1[] = {
Lev Walkina00d6b32006-03-21 03:40:38 +0000350 { ATF_NOFLAGS, 0, offsetof(struct AutoType_34P0, common),
Lev Walkin15750402005-07-03 05:27:19 +0000351 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
352 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000353 .type = &asn_DEF_NativeInteger,
Lev Walkin67a30122017-08-10 05:48:54 -0700354 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700355 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_common_constraint_1 },
Lev Walkin59b176e2005-11-26 11:25:14 +0000356 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000357 .name = "common"
358 },
359};
Lev Walkina7591b52014-10-12 18:37:35 -0700360static const ber_tlv_tag_t asn_DEF_AutoType_34P0_tags_1[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000361 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
362};
Lev Walkina7591b52014-10-12 18:37:35 -0700363static const asn_TYPE_tag2member_t asn_MAP_AutoType_34P0_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700364 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common */
Lev Walkin15750402005-07-03 05:27:19 +0000365};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800366asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P0_specs_1 = {
Lev Walkina00d6b32006-03-21 03:40:38 +0000367 sizeof(struct AutoType_34P0),
368 offsetof(struct AutoType_34P0, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700369 .tag2el = asn_MAP_AutoType_34P0_tag2el_1,
370 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000371 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin15750402005-07-03 05:27:19 +0000372 -1, /* Start extensions */
373 -1 /* Stop extensions */
374};
Lev Walkina00d6b32006-03-21 03:40:38 +0000375asn_TYPE_descriptor_t asn_DEF_AutoType_34P0 = {
376 "AutoType",
377 "AutoType",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800378 &asn_OP_SEQUENCE,
Lev Walkina00d6b32006-03-21 03:40:38 +0000379 asn_DEF_AutoType_34P0_tags_1,
380 sizeof(asn_DEF_AutoType_34P0_tags_1)
381 /sizeof(asn_DEF_AutoType_34P0_tags_1[0]), /* 1 */
382 asn_DEF_AutoType_34P0_tags_1, /* Same as above */
383 sizeof(asn_DEF_AutoType_34P0_tags_1)
384 /sizeof(asn_DEF_AutoType_34P0_tags_1[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700385 { 0, 0, SEQUENCE_constraint },
Lev Walkina00d6b32006-03-21 03:40:38 +0000386 asn_MBR_AutoType_34P0_1,
Lev Walkin15750402005-07-03 05:27:19 +0000387 1, /* Elements count */
Lev Walkina00d6b32006-03-21 03:40:38 +0000388 &asn_SPC_AutoType_34P0_specs_1 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000389};
390
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800391asn_TYPE_member_t asn_MBR_AutoType_34P1_3[] = {
Lev Walkina00d6b32006-03-21 03:40:38 +0000392 { ATF_NOFLAGS, 0, offsetof(struct AutoType_34P1, common),
Lev Walkin15750402005-07-03 05:27:19 +0000393 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
394 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkinae7bf3f2005-08-29 10:31:14 +0000395 .type = &asn_DEF_BOOLEAN,
Lev Walkin67a30122017-08-10 05:48:54 -0700396 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700397 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_common_constraint_3 },
Lev Walkin59b176e2005-11-26 11:25:14 +0000398 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000399 .name = "common"
400 },
401};
Lev Walkina7591b52014-10-12 18:37:35 -0700402static const ber_tlv_tag_t asn_DEF_AutoType_34P1_tags_3[] = {
Lev Walkin15750402005-07-03 05:27:19 +0000403 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
404};
Lev Walkina7591b52014-10-12 18:37:35 -0700405static const asn_TYPE_tag2member_t asn_MAP_AutoType_34P1_tag2el_3[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700406 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common */
Lev Walkin15750402005-07-03 05:27:19 +0000407};
Bi-Ruei, Chiu1fa31c92016-05-16 13:50:09 +0800408asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P1_specs_3 = {
Lev Walkina00d6b32006-03-21 03:40:38 +0000409 sizeof(struct AutoType_34P1),
410 offsetof(struct AutoType_34P1, _asn_ctx),
Lev Walkine3917082017-08-23 10:29:38 -0700411 .tag2el = asn_MAP_AutoType_34P1_tag2el_3,
412 .tag2el_count = 1, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000413 0, 0, 0, /* Optional elements (not needed) */
Lev Walkin15750402005-07-03 05:27:19 +0000414 -1, /* Start extensions */
415 -1 /* Stop extensions */
416};
Lev Walkina00d6b32006-03-21 03:40:38 +0000417asn_TYPE_descriptor_t asn_DEF_AutoType_34P1 = {
418 "AutoType",
419 "AutoType",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800420 &asn_OP_SEQUENCE,
Lev Walkina00d6b32006-03-21 03:40:38 +0000421 asn_DEF_AutoType_34P1_tags_3,
422 sizeof(asn_DEF_AutoType_34P1_tags_3)
423 /sizeof(asn_DEF_AutoType_34P1_tags_3[0]), /* 1 */
424 asn_DEF_AutoType_34P1_tags_3, /* Same as above */
425 sizeof(asn_DEF_AutoType_34P1_tags_3)
426 /sizeof(asn_DEF_AutoType_34P1_tags_3[0]), /* 1 */
Lev Walkin0bfea562017-09-29 23:16:48 -0700427 { 0, 0, SEQUENCE_constraint },
Lev Walkina00d6b32006-03-21 03:40:38 +0000428 asn_MBR_AutoType_34P1_3,
Lev Walkin15750402005-07-03 05:27:19 +0000429 1, /* Elements count */
Lev Walkina00d6b32006-03-21 03:40:38 +0000430 &asn_SPC_AutoType_34P1_specs_3 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000431};
432
Lev Walkina00d6b32006-03-21 03:40:38 +0000433
434/*** <<< INCLUDES [AutoChoice] >>> ***/
435
Lev Walkin22b5ed42006-09-13 02:51:20 +0000436#include "AutoType.h"
Lev Walkina00d6b32006-03-21 03:40:38 +0000437#include <constr_CHOICE.h>
438
439/*** <<< DEPS [AutoChoice] >>> ***/
440
441typedef enum AutoChoice_PR {
442 AutoChoice_PR_NOTHING, /* No components present */
443 AutoChoice_PR_type1,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000444 AutoChoice_PR_type2
Lev Walkina00d6b32006-03-21 03:40:38 +0000445} AutoChoice_PR;
446
447/*** <<< TYPE-DECLS [AutoChoice] >>> ***/
448
449typedef struct AutoChoice {
450 AutoChoice_PR present;
451 union AutoChoice_u {
452 AutoType_34P0_t type1;
453 AutoType_34P1_t type2;
454 } choice;
455
456 /* Context for parsing across buffer boundaries */
457 asn_struct_ctx_t _asn_ctx;
458} AutoChoice_t;
459
460/*** <<< FUNC-DECLS [AutoChoice] >>> ***/
461
462extern asn_TYPE_descriptor_t asn_DEF_AutoChoice;
463
464/*** <<< STAT-DEFS [AutoChoice] >>> ***/
465
Lev Walkin15750402005-07-03 05:27:19 +0000466static asn_TYPE_member_t asn_MBR_AutoChoice_1[] = {
467 { ATF_NOFLAGS, 0, offsetof(struct AutoChoice, choice.type1),
468 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
469 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkina00d6b32006-03-21 03:40:38 +0000470 .type = &asn_DEF_AutoType_34P0,
Lev Walkin67a30122017-08-10 05:48:54 -0700471 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700472 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +0000473 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000474 .name = "type1"
475 },
476 { ATF_NOFLAGS, 0, offsetof(struct AutoChoice, choice.type2),
477 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
478 .tag_mode = -1, /* IMPLICIT tag at current level */
Lev Walkina00d6b32006-03-21 03:40:38 +0000479 .type = &asn_DEF_AutoType_34P1,
Lev Walkin67a30122017-08-10 05:48:54 -0700480 .type_selector = 0,
Lev Walkin0bfea562017-09-29 23:16:48 -0700481 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
Lev Walkin59b176e2005-11-26 11:25:14 +0000482 .default_value = 0,
Lev Walkin15750402005-07-03 05:27:19 +0000483 .name = "type2"
484 },
485};
Lev Walkina7591b52014-10-12 18:37:35 -0700486static const asn_TYPE_tag2member_t asn_MAP_AutoChoice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700487 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* type1 */
488 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* type2 */
Lev Walkin15750402005-07-03 05:27:19 +0000489};
Lev Walkin59b176e2005-11-26 11:25:14 +0000490static asn_CHOICE_specifics_t asn_SPC_AutoChoice_specs_1 = {
Lev Walkin15750402005-07-03 05:27:19 +0000491 sizeof(struct AutoChoice),
492 offsetof(struct AutoChoice, _asn_ctx),
493 offsetof(struct AutoChoice, present),
494 sizeof(((struct AutoChoice *)0)->present),
Lev Walkine3917082017-08-23 10:29:38 -0700495 .tag2el = asn_MAP_AutoChoice_tag2el_1,
496 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000497 .canonical_order = 0,
498 .ext_start = -1 /* Extensions start */
Lev Walkin15750402005-07-03 05:27:19 +0000499};
500asn_TYPE_descriptor_t asn_DEF_AutoChoice = {
501 "AutoChoice",
502 "AutoChoice",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800503 &asn_OP_CHOICE,
Lev Walkin15750402005-07-03 05:27:19 +0000504 0, /* No effective tags (pointer) */
505 0, /* No effective tags (count) */
506 0, /* No tags (pointer) */
507 0, /* No tags (count) */
Lev Walkin0bfea562017-09-29 23:16:48 -0700508 { 0, 0, CHOICE_constraint },
Lev Walkin15750402005-07-03 05:27:19 +0000509 asn_MBR_AutoChoice_1,
510 2, /* Elements count */
Lev Walkin59b176e2005-11-26 11:25:14 +0000511 &asn_SPC_AutoChoice_specs_1 /* Additional specs */
Lev Walkin15750402005-07-03 05:27:19 +0000512};
513