2 /*** <<< INCLUDES [TestType] >>> ***/
4 #include <NativeInteger.h>
5 #include <constr_SEQUENCE.h>
8 /*** <<< TYPE-DECLS [TestType] >>> ***/
10 typedef struct TestType_16P0 {
11 long common; /* DEFAULT 0 */
13 /* Context for parsing across buffer boundaries */
14 asn_struct_ctx_t _asn_ctx;
16 typedef struct TestType_16P1 {
17 BOOLEAN_t common; /* DEFAULT 0 */
19 /* Context for parsing across buffer boundaries */
20 asn_struct_ctx_t _asn_ctx;
23 /*** <<< FUNC-DECLS [TestType] >>> ***/
25 extern asn_TYPE_descriptor_t asn_DEF_TestType_16P0;
26 extern asn_SEQUENCE_specifics_t asn_SPC_TestType_16P0_specs_1;
27 extern asn_TYPE_member_t asn_MBR_TestType_16P0_1[1];
28 extern asn_TYPE_descriptor_t asn_DEF_TestType_16P1;
29 extern asn_SEQUENCE_specifics_t asn_SPC_TestType_16P1_specs_3;
30 extern asn_TYPE_member_t asn_MBR_TestType_16P1_3[1];
32 /*** <<< CODE [TestType] >>> ***/
35 memb_common_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
36 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
40 ASN__CTFAIL(app_key, td, sptr,
41 "%s: value not given (%s:%d)",
42 td->name, __FILE__, __LINE__);
46 value = *(const long *)sptr;
48 if((value >= 1 && value <= 10)) {
49 /* Constraint check succeeded */
52 ASN__CTFAIL(app_key, td, sptr,
53 "%s: constraint failed (%s:%d)",
54 td->name, __FILE__, __LINE__);
60 /*** <<< STAT-DEFS [TestType] >>> ***/
62 static int asn_DFL_2_cmp_0(const void *sptr) {
63 const long *st = sptr;
66 return -1; /* No value is not a default value */
69 /* Test default value 0 */
72 static int asn_DFL_2_set_0(void **sptr) {
76 st = (*sptr = CALLOC(1, sizeof(*st)));
80 /* Install default value 0 */
84 asn_TYPE_member_t asn_MBR_TestType_16P0_1[] = {
85 { ATF_NOFLAGS, 1, offsetof(struct TestType_16P0, common),
86 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
88 .type = &asn_DEF_NativeInteger,
90 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_common_constraint_1 },
91 .default_value_cmp = &asn_DFL_2_cmp_0, /* Compare DEFAULT 0 */
92 .default_value_set = &asn_DFL_2_set_0, /* Set DEFAULT 0 */
96 static const ber_tlv_tag_t asn_DEF_TestType_16P0_tags_1[] = {
97 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
99 static const asn_TYPE_tag2member_t asn_MAP_TestType_16P0_tag2el_1[] = {
100 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* common */
102 asn_SEQUENCE_specifics_t asn_SPC_TestType_16P0_specs_1 = {
103 sizeof(struct TestType_16P0),
104 offsetof(struct TestType_16P0, _asn_ctx),
105 .tag2el = asn_MAP_TestType_16P0_tag2el_1,
106 .tag2el_count = 1, /* Count of tags in the map */
107 0, 0, 0, /* Optional elements (not needed) */
108 -1, /* First extension addition */
110 asn_TYPE_descriptor_t asn_DEF_TestType_16P0 = {
114 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 */
120 { 0, 0, SEQUENCE_constraint },
121 asn_MBR_TestType_16P0_1,
122 1, /* Elements count */
123 &asn_SPC_TestType_16P0_specs_1 /* Additional specs */
126 static int asn_DFL_4_cmp_0(const void *sptr) {
127 const BOOLEAN_t *st = sptr;
130 return -1; /* No value is not a default value */
133 /* Test default value 0 */
136 static int asn_DFL_4_set_0(void **sptr) {
137 BOOLEAN_t *st = *sptr;
140 st = (*sptr = CALLOC(1, sizeof(*st)));
144 /* Install default value 0 */
148 asn_TYPE_member_t asn_MBR_TestType_16P1_3[] = {
149 { ATF_NOFLAGS, 1, offsetof(struct TestType_16P1, common),
150 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
152 .type = &asn_DEF_BOOLEAN,
154 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
155 .default_value_cmp = &asn_DFL_4_cmp_0, /* Compare DEFAULT 0 */
156 .default_value_set = &asn_DFL_4_set_0, /* Set DEFAULT 0 */
160 static const ber_tlv_tag_t asn_DEF_TestType_16P1_tags_3[] = {
161 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
163 static const asn_TYPE_tag2member_t asn_MAP_TestType_16P1_tag2el_3[] = {
164 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 } /* common */
166 asn_SEQUENCE_specifics_t asn_SPC_TestType_16P1_specs_3 = {
167 sizeof(struct TestType_16P1),
168 offsetof(struct TestType_16P1, _asn_ctx),
169 .tag2el = asn_MAP_TestType_16P1_tag2el_3,
170 .tag2el_count = 1, /* Count of tags in the map */
171 0, 0, 0, /* Optional elements (not needed) */
172 -1, /* First extension addition */
174 asn_TYPE_descriptor_t asn_DEF_TestType_16P1 = {
178 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 */
184 { 0, 0, SEQUENCE_constraint },
185 asn_MBR_TestType_16P1_3,
186 1, /* Elements count */
187 &asn_SPC_TestType_16P1_specs_3 /* Additional specs */
191 /*** <<< INCLUDES [TestChoice] >>> ***/
193 #include "TestType.h"
194 #include <constr_CHOICE.h>
196 /*** <<< DEPS [TestChoice] >>> ***/
198 typedef enum TestChoice_PR {
199 TestChoice_PR_NOTHING, /* No components present */
204 /*** <<< TYPE-DECLS [TestChoice] >>> ***/
206 typedef struct TestChoice {
207 TestChoice_PR present;
209 TestType_16P0_t type1;
210 TestType_16P1_t type2;
213 /* Context for parsing across buffer boundaries */
214 asn_struct_ctx_t _asn_ctx;
217 /*** <<< FUNC-DECLS [TestChoice] >>> ***/
219 extern asn_TYPE_descriptor_t asn_DEF_TestChoice;
221 /*** <<< STAT-DEFS [TestChoice] >>> ***/
223 static 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)),
227 .type = &asn_DEF_TestType_16P0,
229 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
230 0, 0, /* No default value */
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 */
236 .type = &asn_DEF_TestType_16P1,
238 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
239 0, 0, /* No default value */
243 static const asn_TYPE_tag2member_t asn_MAP_TestChoice_tag2el_1[] = {
244 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* type1 */
245 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 } /* type2 */
247 static asn_CHOICE_specifics_t asn_SPC_TestChoice_specs_1 = {
248 sizeof(struct TestChoice),
249 offsetof(struct TestChoice, _asn_ctx),
250 offsetof(struct TestChoice, present),
251 sizeof(((struct TestChoice *)0)->present),
252 .tag2el = asn_MAP_TestChoice_tag2el_1,
253 .tag2el_count = 2, /* Count of tags in the map */
255 .first_extension = -1 /* Extensions start */
257 asn_TYPE_descriptor_t asn_DEF_TestChoice = {
261 0, /* No effective tags (pointer) */
262 0, /* No effective tags (count) */
263 0, /* No tags (pointer) */
264 0, /* No tags (count) */
265 { 0, 0, CHOICE_constraint },
266 asn_MBR_TestChoice_1,
267 2, /* Elements count */
268 &asn_SPC_TestChoice_specs_1 /* Additional specs */
272 /*** <<< INCLUDES [AutoType] >>> ***/
274 #include <NativeInteger.h>
275 #include <constr_SEQUENCE.h>
278 /*** <<< TYPE-DECLS [AutoType] >>> ***/
280 typedef struct AutoType_34P0 {
283 /* Context for parsing across buffer boundaries */
284 asn_struct_ctx_t _asn_ctx;
286 typedef struct AutoType_34P1 {
289 /* Context for parsing across buffer boundaries */
290 asn_struct_ctx_t _asn_ctx;
293 /*** <<< FUNC-DECLS [AutoType] >>> ***/
295 extern asn_TYPE_descriptor_t asn_DEF_AutoType_34P0;
296 extern asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P0_specs_1;
297 extern asn_TYPE_member_t asn_MBR_AutoType_34P0_1[1];
298 extern asn_TYPE_descriptor_t asn_DEF_AutoType_34P1;
299 extern asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P1_specs_3;
300 extern asn_TYPE_member_t asn_MBR_AutoType_34P1_3[1];
302 /*** <<< CODE [AutoType] >>> ***/
305 memb_common_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
306 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
310 ASN__CTFAIL(app_key, td, sptr,
311 "%s: value not given (%s:%d)",
312 td->name, __FILE__, __LINE__);
316 value = *(const long *)sptr;
319 /* Constraint check succeeded */
322 ASN__CTFAIL(app_key, td, sptr,
323 "%s: constraint failed (%s:%d)",
324 td->name, __FILE__, __LINE__);
330 memb_common_constraint_3(const asn_TYPE_descriptor_t *td, const void *sptr,
331 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
335 ASN__CTFAIL(app_key, td, sptr,
336 "%s: value not given (%s:%d)",
337 td->name, __FILE__, __LINE__);
341 value = (*(const long *)sptr) ? 1 : 0;
344 /* Constraint check succeeded */
347 ASN__CTFAIL(app_key, td, sptr,
348 "%s: constraint failed (%s:%d)",
349 td->name, __FILE__, __LINE__);
355 /*** <<< STAT-DEFS [AutoType] >>> ***/
357 asn_TYPE_member_t asn_MBR_AutoType_34P0_1[] = {
358 { ATF_NOFLAGS, 0, offsetof(struct AutoType_34P0, common),
359 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
360 .tag_mode = -1, /* IMPLICIT tag at current level */
361 .type = &asn_DEF_NativeInteger,
363 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_common_constraint_1 },
364 0, 0, /* No default value */
368 static const ber_tlv_tag_t asn_DEF_AutoType_34P0_tags_1[] = {
369 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
371 static const asn_TYPE_tag2member_t asn_MAP_AutoType_34P0_tag2el_1[] = {
372 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common */
374 asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P0_specs_1 = {
375 sizeof(struct AutoType_34P0),
376 offsetof(struct AutoType_34P0, _asn_ctx),
377 .tag2el = asn_MAP_AutoType_34P0_tag2el_1,
378 .tag2el_count = 1, /* Count of tags in the map */
379 0, 0, 0, /* Optional elements (not needed) */
380 -1, /* First extension addition */
382 asn_TYPE_descriptor_t asn_DEF_AutoType_34P0 = {
386 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 */
392 { 0, 0, SEQUENCE_constraint },
393 asn_MBR_AutoType_34P0_1,
394 1, /* Elements count */
395 &asn_SPC_AutoType_34P0_specs_1 /* Additional specs */
398 asn_TYPE_member_t asn_MBR_AutoType_34P1_3[] = {
399 { ATF_NOFLAGS, 0, offsetof(struct AutoType_34P1, common),
400 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
401 .tag_mode = -1, /* IMPLICIT tag at current level */
402 .type = &asn_DEF_BOOLEAN,
404 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_common_constraint_3 },
405 0, 0, /* No default value */
409 static const ber_tlv_tag_t asn_DEF_AutoType_34P1_tags_3[] = {
410 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
412 static const asn_TYPE_tag2member_t asn_MAP_AutoType_34P1_tag2el_3[] = {
413 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common */
415 asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P1_specs_3 = {
416 sizeof(struct AutoType_34P1),
417 offsetof(struct AutoType_34P1, _asn_ctx),
418 .tag2el = asn_MAP_AutoType_34P1_tag2el_3,
419 .tag2el_count = 1, /* Count of tags in the map */
420 0, 0, 0, /* Optional elements (not needed) */
421 -1, /* First extension addition */
423 asn_TYPE_descriptor_t asn_DEF_AutoType_34P1 = {
427 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 */
433 { 0, 0, SEQUENCE_constraint },
434 asn_MBR_AutoType_34P1_3,
435 1, /* Elements count */
436 &asn_SPC_AutoType_34P1_specs_3 /* Additional specs */
440 /*** <<< INCLUDES [AutoChoice] >>> ***/
442 #include "AutoType.h"
443 #include <constr_CHOICE.h>
445 /*** <<< DEPS [AutoChoice] >>> ***/
447 typedef enum AutoChoice_PR {
448 AutoChoice_PR_NOTHING, /* No components present */
453 /*** <<< TYPE-DECLS [AutoChoice] >>> ***/
455 typedef struct AutoChoice {
456 AutoChoice_PR present;
458 AutoType_34P0_t type1;
459 AutoType_34P1_t type2;
462 /* Context for parsing across buffer boundaries */
463 asn_struct_ctx_t _asn_ctx;
466 /*** <<< FUNC-DECLS [AutoChoice] >>> ***/
468 extern asn_TYPE_descriptor_t asn_DEF_AutoChoice;
470 /*** <<< STAT-DEFS [AutoChoice] >>> ***/
472 static 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 */
476 .type = &asn_DEF_AutoType_34P0,
478 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
479 0, 0, /* No default value */
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 */
485 .type = &asn_DEF_AutoType_34P1,
487 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
488 0, 0, /* No default value */
492 static const asn_TYPE_tag2member_t asn_MAP_AutoChoice_tag2el_1[] = {
493 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* type1 */
494 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* type2 */
496 static asn_CHOICE_specifics_t asn_SPC_AutoChoice_specs_1 = {
497 sizeof(struct AutoChoice),
498 offsetof(struct AutoChoice, _asn_ctx),
499 offsetof(struct AutoChoice, present),
500 sizeof(((struct AutoChoice *)0)->present),
501 .tag2el = asn_MAP_AutoChoice_tag2el_1,
502 .tag2el_count = 2, /* Count of tags in the map */
504 .first_extension = -1 /* Extensions start */
506 asn_TYPE_descriptor_t asn_DEF_AutoChoice = {
510 0, /* No effective tags (pointer) */
511 0, /* No effective tags (count) */
512 0, /* No tags (pointer) */
513 0, /* No tags (count) */
514 { 0, 0, CHOICE_constraint },
515 asn_MBR_AutoChoice_1,
516 2, /* Elements count */
517 &asn_SPC_AutoChoice_specs_1 /* Additional specs */