asn1c/tests/84-param-tags-OK.asn1.-Pfwi...

582 lines
17 KiB
Plaintext
Raw Normal View History

2005-07-03 05:27:19 +00:00
2006-03-21 03:40:38 +00:00
/*** <<< INCLUDES [TestType] >>> ***/
2005-07-03 05:27:19 +00:00
#include <NativeInteger.h>
2005-07-03 05:27:19 +00:00
#include <constr_SEQUENCE.h>
#include <BOOLEAN.h>
2006-03-21 03:40:38 +00:00
/*** <<< TYPE-DECLS [TestType] >>> ***/
2005-07-03 05:27:19 +00:00
2006-03-21 03:40:38 +00:00
typedef struct TestType_16P0 {
2006-03-21 04:48:15 +00:00
long common /* DEFAULT 0 */;
2005-07-03 05:27:19 +00:00
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
2006-03-21 03:40:38 +00:00
} TestType_16P0_t;
typedef struct TestType_16P1 {
2006-03-21 04:48:15 +00:00
BOOLEAN_t common /* DEFAULT 0 */;
2006-03-21 03:40:38 +00:00
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} TestType_16P1_t;
2005-07-03 05:27:19 +00:00
2006-03-21 03:40:38 +00:00
/*** <<< FUNC-DECLS [TestType] >>> ***/
2005-07-03 05:27:19 +00:00
2006-03-21 03:40:38 +00:00
extern asn_TYPE_descriptor_t asn_DEF_TestType_16P0;
extern asn_SEQUENCE_specifics_t asn_SPC_TestType_16P0_specs_1;
extern asn_TYPE_member_t asn_MBR_TestType_16P0_1[1];
2006-03-21 03:40:38 +00:00
extern asn_TYPE_descriptor_t asn_DEF_TestType_16P1;
extern asn_SEQUENCE_specifics_t asn_SPC_TestType_16P1_specs_3;
extern asn_TYPE_member_t asn_MBR_TestType_16P1_3[1];
2005-07-03 05:27:19 +00:00
2006-03-21 03:40:38 +00:00
/*** <<< CODE [TestType] >>> ***/
2005-07-03 05:27:19 +00:00
static int
2006-03-21 03:40:38 +00:00
memb_common_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
2006-07-13 11:19:01 +00:00
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
2005-07-03 05:27:19 +00:00
long value;
if(!sptr) {
2016-03-14 10:08:15 +00:00
ASN__CTFAIL(app_key, td, sptr,
2005-07-03 05:27:19 +00:00
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
value = *(const long *)sptr;
2005-07-03 05:27:19 +00:00
if((value >= 1 && value <= 10)) {
/* Constraint check succeeded */
return 0;
} else {
2016-03-14 10:08:15 +00:00
ASN__CTFAIL(app_key, td, sptr,
2005-07-03 05:27:19 +00:00
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
2006-03-21 03:40:38 +00:00
/*** <<< STAT-DEFS [TestType] >>> ***/
2005-07-03 05:27:19 +00:00
2006-08-18 01:46:46 +00:00
static int asn_DFL_2_set_0(int set_value, void **sptr) {
2006-03-21 04:48:15 +00:00
long *st = *sptr;
if(!st) {
2006-08-18 01:46:46 +00:00
if(!set_value) return -1; /* Not a default value */
2006-03-21 04:48:15 +00:00
st = (*sptr = CALLOC(1, sizeof(*st)));
if(!st) return -1;
}
2006-08-18 01:46:46 +00:00
if(set_value) {
/* Install default value 0 */
*st = 0;
return 0;
} else {
/* Test default value 0 */
return (*st == 0);
}
2006-03-21 04:48:15 +00:00
}
asn_TYPE_member_t asn_MBR_TestType_16P0_1[] = {
2006-03-21 04:48:15 +00:00
{ ATF_NOFLAGS, 1, offsetof(struct TestType_16P0, common),
2005-07-03 05:27:19 +00:00
.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
.tag_mode = 0,
.type = &asn_DEF_NativeInteger,
2006-03-21 03:40:38 +00:00
.memb_constraints = memb_common_constraint_1,
2017-07-14 10:59:52 +00:00
.oer_constraints = 0, /* OER is not compiled, use -gen-OER */
2005-11-26 11:25:14 +00:00
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
2006-03-21 04:48:15 +00:00
.default_value = asn_DFL_2_set_0, /* DEFAULT 0 */
2005-07-03 05:27:19 +00:00
.name = "common"
},
};
2014-10-13 01:37:35 +00:00
static const ber_tlv_tag_t asn_DEF_TestType_16P0_tags_1[] = {
2005-07-03 05:27:19 +00:00
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
2014-10-13 01:37:35 +00:00
static const asn_TYPE_tag2member_t asn_MAP_TestType_16P0_tag2el_1[] = {
2013-10-11 21:29:38 +00:00
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* common */
2005-07-03 05:27:19 +00:00
};
asn_SEQUENCE_specifics_t asn_SPC_TestType_16P0_specs_1 = {
2006-03-21 03:40:38 +00:00
sizeof(struct TestType_16P0),
offsetof(struct TestType_16P0, _asn_ctx),
asn_MAP_TestType_16P0_tag2el_1,
2005-07-03 05:27:19 +00:00
1, /* Count of tags in the map */
2005-11-26 11:25:14 +00:00
0, 0, 0, /* Optional elements (not needed) */
2005-07-03 05:27:19 +00:00
-1, /* Start extensions */
-1 /* Stop extensions */
};
2006-03-21 03:40:38 +00:00
asn_TYPE_descriptor_t asn_DEF_TestType_16P0 = {
"TestType",
"TestType",
2005-07-03 05:27:19 +00:00
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
2017-07-06 14:52:39 +00:00
0, 0, /* No OER support, use "-gen-OER" to enable */
2017-07-14 10:59:52 +00:00
0, 0, /* No PER support, use "-gen-PER" to enable */
2005-07-03 05:27:19 +00:00
0, /* Use generic outmost tag fetcher */
2006-03-21 03:40:38 +00:00
asn_DEF_TestType_16P0_tags_1,
sizeof(asn_DEF_TestType_16P0_tags_1)
/sizeof(asn_DEF_TestType_16P0_tags_1[0]), /* 1 */
asn_DEF_TestType_16P0_tags_1, /* Same as above */
sizeof(asn_DEF_TestType_16P0_tags_1)
/sizeof(asn_DEF_TestType_16P0_tags_1[0]), /* 1 */
2017-07-14 10:59:52 +00:00
0, /* No OER visible constraints */
2005-11-26 11:25:14 +00:00
0, /* No PER visible constraints */
2006-03-21 03:40:38 +00:00
asn_MBR_TestType_16P0_1,
2005-07-03 05:27:19 +00:00
1, /* Elements count */
2006-03-21 03:40:38 +00:00
&asn_SPC_TestType_16P0_specs_1 /* Additional specs */
2005-07-03 05:27:19 +00:00
};
2006-08-18 01:46:46 +00:00
static int asn_DFL_4_set_0(int set_value, void **sptr) {
2006-03-21 04:48:15 +00:00
BOOLEAN_t *st = *sptr;
if(!st) {
2006-08-18 01:46:46 +00:00
if(!set_value) return -1; /* Not a default value */
2006-03-21 04:48:15 +00:00
st = (*sptr = CALLOC(1, sizeof(*st)));
if(!st) return -1;
}
2006-08-18 01:46:46 +00:00
if(set_value) {
/* Install default value 0 */
*st = 0;
return 0;
} else {
/* Test default value 0 */
return (*st == 0);
}
2006-03-21 04:48:15 +00:00
}
asn_TYPE_member_t asn_MBR_TestType_16P1_3[] = {
2006-03-21 04:48:15 +00:00
{ ATF_NOFLAGS, 1, offsetof(struct TestType_16P1, common),
2005-07-03 05:27:19 +00:00
.tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
.tag_mode = 0,
.type = &asn_DEF_BOOLEAN,
2005-07-03 05:27:19 +00:00
.memb_constraints = 0, /* Defer constraints checking to the member type */
2017-07-14 10:59:52 +00:00
.oer_constraints = 0, /* OER is not compiled, use -gen-OER */
2005-11-26 11:25:14 +00:00
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
2006-03-21 04:48:15 +00:00
.default_value = asn_DFL_4_set_0, /* DEFAULT 0 */
2005-07-03 05:27:19 +00:00
.name = "common"
},
};
2014-10-13 01:37:35 +00:00
static const ber_tlv_tag_t asn_DEF_TestType_16P1_tags_3[] = {
2005-07-03 05:27:19 +00:00
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
2014-10-13 01:37:35 +00:00
static const asn_TYPE_tag2member_t asn_MAP_TestType_16P1_tag2el_3[] = {
2013-10-11 21:29:38 +00:00
{ (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 } /* common */
2005-07-03 05:27:19 +00:00
};
asn_SEQUENCE_specifics_t asn_SPC_TestType_16P1_specs_3 = {
2006-03-21 03:40:38 +00:00
sizeof(struct TestType_16P1),
offsetof(struct TestType_16P1, _asn_ctx),
asn_MAP_TestType_16P1_tag2el_3,
2005-07-03 05:27:19 +00:00
1, /* Count of tags in the map */
2005-11-26 11:25:14 +00:00
0, 0, 0, /* Optional elements (not needed) */
2005-07-03 05:27:19 +00:00
-1, /* Start extensions */
-1 /* Stop extensions */
};
2006-03-21 03:40:38 +00:00
asn_TYPE_descriptor_t asn_DEF_TestType_16P1 = {
"TestType",
"TestType",
2005-07-03 05:27:19 +00:00
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
2017-07-06 14:52:39 +00:00
0, 0, /* No OER support, use "-gen-OER" to enable */
2017-07-14 10:59:52 +00:00
0, 0, /* No PER support, use "-gen-PER" to enable */
2005-07-03 05:27:19 +00:00
0, /* Use generic outmost tag fetcher */
2006-03-21 03:40:38 +00:00
asn_DEF_TestType_16P1_tags_3,
sizeof(asn_DEF_TestType_16P1_tags_3)
/sizeof(asn_DEF_TestType_16P1_tags_3[0]), /* 1 */
asn_DEF_TestType_16P1_tags_3, /* Same as above */
sizeof(asn_DEF_TestType_16P1_tags_3)
/sizeof(asn_DEF_TestType_16P1_tags_3[0]), /* 1 */
2017-07-14 10:59:52 +00:00
0, /* No OER visible constraints */
2005-11-26 11:25:14 +00:00
0, /* No PER visible constraints */
2006-03-21 03:40:38 +00:00
asn_MBR_TestType_16P1_3,
2005-07-03 05:27:19 +00:00
1, /* Elements count */
2006-03-21 03:40:38 +00:00
&asn_SPC_TestType_16P1_specs_3 /* Additional specs */
2005-07-03 05:27:19 +00:00
};
2006-03-21 03:40:38 +00:00
/*** <<< INCLUDES [TestChoice] >>> ***/
2006-09-13 02:51:20 +00:00
#include "TestType.h"
2006-03-21 03:40:38 +00:00
#include <constr_CHOICE.h>
/*** <<< DEPS [TestChoice] >>> ***/
typedef enum TestChoice_PR {
TestChoice_PR_NOTHING, /* No components present */
TestChoice_PR_type1,
2006-08-18 01:46:46 +00:00
TestChoice_PR_type2
2006-03-21 03:40:38 +00:00
} TestChoice_PR;
/*** <<< TYPE-DECLS [TestChoice] >>> ***/
typedef struct TestChoice {
TestChoice_PR present;
union TestChoice_u {
TestType_16P0_t type1;
TestType_16P1_t type2;
} choice;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} TestChoice_t;
/*** <<< FUNC-DECLS [TestChoice] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_TestChoice;
/*** <<< STAT-DEFS [TestChoice] >>> ***/
2005-07-03 05:27:19 +00:00
static asn_TYPE_member_t asn_MBR_TestChoice_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct TestChoice, choice.type1),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0,
2006-03-21 03:40:38 +00:00
.type = &asn_DEF_TestType_16P0,
2005-07-03 05:27:19 +00:00
.memb_constraints = 0, /* Defer constraints checking to the member type */
2017-07-14 10:59:52 +00:00
.oer_constraints = 0, /* OER is not compiled, use -gen-OER */
2005-11-26 11:25:14 +00:00
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
2005-07-03 05:27:19 +00:00
.name = "type1"
},
{ ATF_NOFLAGS, 0, offsetof(struct TestChoice, choice.type2),
.tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */
2006-03-21 03:40:38 +00:00
.type = &asn_DEF_TestType_16P1,
2005-07-03 05:27:19 +00:00
.memb_constraints = 0, /* Defer constraints checking to the member type */
2017-07-14 10:59:52 +00:00
.oer_constraints = 0, /* OER is not compiled, use -gen-OER */
2005-11-26 11:25:14 +00:00
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
2005-07-03 05:27:19 +00:00
.name = "type2"
},
};
2014-10-13 01:37:35 +00:00
static const asn_TYPE_tag2member_t asn_MAP_TestChoice_tag2el_1[] = {
2013-10-11 21:29:38 +00:00
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* type1 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 } /* type2 */
2005-07-03 05:27:19 +00:00
};
2005-11-26 11:25:14 +00:00
static asn_CHOICE_specifics_t asn_SPC_TestChoice_specs_1 = {
2005-07-03 05:27:19 +00:00
sizeof(struct TestChoice),
offsetof(struct TestChoice, _asn_ctx),
offsetof(struct TestChoice, present),
sizeof(((struct TestChoice *)0)->present),
2005-11-26 11:25:14 +00:00
asn_MAP_TestChoice_tag2el_1,
2005-07-03 05:27:19 +00:00
2, /* Count of tags in the map */
2005-11-26 11:25:14 +00:00
.canonical_order = 0,
.ext_start = -1 /* Extensions start */
2005-07-03 05:27:19 +00:00
};
asn_TYPE_descriptor_t asn_DEF_TestChoice = {
"TestChoice",
"TestChoice",
CHOICE_free,
CHOICE_print,
CHOICE_constraint,
CHOICE_decode_ber,
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
2017-07-06 14:52:39 +00:00
0, 0, /* No OER support, use "-gen-OER" to enable */
2017-07-14 10:59:52 +00:00
0, 0, /* No PER support, use "-gen-PER" to enable */
2005-07-03 05:27:19 +00:00
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
2017-07-14 10:59:52 +00:00
0, /* No OER visible constraints */
2005-11-26 11:25:14 +00:00
0, /* No PER visible constraints */
2005-07-03 05:27:19 +00:00
asn_MBR_TestChoice_1,
2, /* Elements count */
2005-11-26 11:25:14 +00:00
&asn_SPC_TestChoice_specs_1 /* Additional specs */
2005-07-03 05:27:19 +00:00
};
2006-03-21 03:40:38 +00:00
/*** <<< INCLUDES [AutoType] >>> ***/
2005-07-03 05:27:19 +00:00
#include <NativeInteger.h>
2005-07-03 05:27:19 +00:00
#include <constr_SEQUENCE.h>
#include <BOOLEAN.h>
2006-03-21 03:40:38 +00:00
/*** <<< TYPE-DECLS [AutoType] >>> ***/
2005-07-03 05:27:19 +00:00
2006-03-21 03:40:38 +00:00
typedef struct AutoType_34P0 {
long common;
2005-07-03 05:27:19 +00:00
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
2006-03-21 03:40:38 +00:00
} AutoType_34P0_t;
typedef struct AutoType_34P1 {
BOOLEAN_t common;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} AutoType_34P1_t;
2005-07-03 05:27:19 +00:00
2006-03-21 03:40:38 +00:00
/*** <<< FUNC-DECLS [AutoType] >>> ***/
2005-07-03 05:27:19 +00:00
2006-03-21 03:40:38 +00:00
extern asn_TYPE_descriptor_t asn_DEF_AutoType_34P0;
extern asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P0_specs_1;
extern asn_TYPE_member_t asn_MBR_AutoType_34P0_1[1];
2006-03-21 03:40:38 +00:00
extern asn_TYPE_descriptor_t asn_DEF_AutoType_34P1;
extern asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P1_specs_3;
extern asn_TYPE_member_t asn_MBR_AutoType_34P1_3[1];
2005-07-03 05:27:19 +00:00
2006-03-21 03:40:38 +00:00
/*** <<< CODE [AutoType] >>> ***/
2005-07-03 05:27:19 +00:00
static int
2006-03-21 03:40:38 +00:00
memb_common_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
2006-07-13 11:19:01 +00:00
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
2005-07-03 05:27:19 +00:00
long value;
if(!sptr) {
2016-03-14 10:08:15 +00:00
ASN__CTFAIL(app_key, td, sptr,
2005-07-03 05:27:19 +00:00
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
value = *(const long *)sptr;
2005-07-03 05:27:19 +00:00
if((value == 0)) {
/* Constraint check succeeded */
return 0;
} else {
2016-03-14 10:08:15 +00:00
ASN__CTFAIL(app_key, td, sptr,
2005-07-03 05:27:19 +00:00
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static int
2006-03-21 03:40:38 +00:00
memb_common_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr,
2006-07-13 11:19:01 +00:00
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
2005-07-03 05:27:19 +00:00
BOOLEAN_t value;
if(!sptr) {
2016-03-14 10:08:15 +00:00
ASN__CTFAIL(app_key, td, sptr,
2005-07-03 05:27:19 +00:00
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
value = (*(const long *)sptr) ? 1 : 0;
if((value <= 0)) {
/* Constraint check succeeded */
return 0;
} else {
2016-03-14 10:08:15 +00:00
ASN__CTFAIL(app_key, td, sptr,
2005-07-03 05:27:19 +00:00
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
2006-03-21 03:40:38 +00:00
/*** <<< STAT-DEFS [AutoType] >>> ***/
2005-07-03 05:27:19 +00:00
asn_TYPE_member_t asn_MBR_AutoType_34P0_1[] = {
2006-03-21 03:40:38 +00:00
{ ATF_NOFLAGS, 0, offsetof(struct AutoType_34P0, common),
2005-07-03 05:27:19 +00:00
.tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_NativeInteger,
2006-03-21 03:40:38 +00:00
.memb_constraints = memb_common_constraint_1,
2017-07-14 10:59:52 +00:00
.oer_constraints = 0, /* OER is not compiled, use -gen-OER */
2005-11-26 11:25:14 +00:00
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
2005-07-03 05:27:19 +00:00
.name = "common"
},
};
2014-10-13 01:37:35 +00:00
static const ber_tlv_tag_t asn_DEF_AutoType_34P0_tags_1[] = {
2005-07-03 05:27:19 +00:00
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
2014-10-13 01:37:35 +00:00
static const asn_TYPE_tag2member_t asn_MAP_AutoType_34P0_tag2el_1[] = {
2013-10-11 21:29:38 +00:00
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common */
2005-07-03 05:27:19 +00:00
};
asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P0_specs_1 = {
2006-03-21 03:40:38 +00:00
sizeof(struct AutoType_34P0),
offsetof(struct AutoType_34P0, _asn_ctx),
asn_MAP_AutoType_34P0_tag2el_1,
2005-07-03 05:27:19 +00:00
1, /* Count of tags in the map */
2005-11-26 11:25:14 +00:00
0, 0, 0, /* Optional elements (not needed) */
2005-07-03 05:27:19 +00:00
-1, /* Start extensions */
-1 /* Stop extensions */
};
2006-03-21 03:40:38 +00:00
asn_TYPE_descriptor_t asn_DEF_AutoType_34P0 = {
"AutoType",
"AutoType",
2005-07-03 05:27:19 +00:00
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
2017-07-06 14:52:39 +00:00
0, 0, /* No OER support, use "-gen-OER" to enable */
2017-07-14 10:59:52 +00:00
0, 0, /* No PER support, use "-gen-PER" to enable */
2005-07-03 05:27:19 +00:00
0, /* Use generic outmost tag fetcher */
2006-03-21 03:40:38 +00:00
asn_DEF_AutoType_34P0_tags_1,
sizeof(asn_DEF_AutoType_34P0_tags_1)
/sizeof(asn_DEF_AutoType_34P0_tags_1[0]), /* 1 */
asn_DEF_AutoType_34P0_tags_1, /* Same as above */
sizeof(asn_DEF_AutoType_34P0_tags_1)
/sizeof(asn_DEF_AutoType_34P0_tags_1[0]), /* 1 */
2017-07-14 10:59:52 +00:00
0, /* No OER visible constraints */
2005-11-26 11:25:14 +00:00
0, /* No PER visible constraints */
2006-03-21 03:40:38 +00:00
asn_MBR_AutoType_34P0_1,
2005-07-03 05:27:19 +00:00
1, /* Elements count */
2006-03-21 03:40:38 +00:00
&asn_SPC_AutoType_34P0_specs_1 /* Additional specs */
2005-07-03 05:27:19 +00:00
};
asn_TYPE_member_t asn_MBR_AutoType_34P1_3[] = {
2006-03-21 03:40:38 +00:00
{ ATF_NOFLAGS, 0, offsetof(struct AutoType_34P1, common),
2005-07-03 05:27:19 +00:00
.tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_BOOLEAN,
2006-03-21 03:40:38 +00:00
.memb_constraints = memb_common_constraint_3,
2017-07-14 10:59:52 +00:00
.oer_constraints = 0, /* OER is not compiled, use -gen-OER */
2005-11-26 11:25:14 +00:00
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
2005-07-03 05:27:19 +00:00
.name = "common"
},
};
2014-10-13 01:37:35 +00:00
static const ber_tlv_tag_t asn_DEF_AutoType_34P1_tags_3[] = {
2005-07-03 05:27:19 +00:00
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
2014-10-13 01:37:35 +00:00
static const asn_TYPE_tag2member_t asn_MAP_AutoType_34P1_tag2el_3[] = {
2013-10-11 21:29:38 +00:00
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common */
2005-07-03 05:27:19 +00:00
};
asn_SEQUENCE_specifics_t asn_SPC_AutoType_34P1_specs_3 = {
2006-03-21 03:40:38 +00:00
sizeof(struct AutoType_34P1),
offsetof(struct AutoType_34P1, _asn_ctx),
asn_MAP_AutoType_34P1_tag2el_3,
2005-07-03 05:27:19 +00:00
1, /* Count of tags in the map */
2005-11-26 11:25:14 +00:00
0, 0, 0, /* Optional elements (not needed) */
2005-07-03 05:27:19 +00:00
-1, /* Start extensions */
-1 /* Stop extensions */
};
2006-03-21 03:40:38 +00:00
asn_TYPE_descriptor_t asn_DEF_AutoType_34P1 = {
"AutoType",
"AutoType",
2005-07-03 05:27:19 +00:00
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
2017-07-06 14:52:39 +00:00
0, 0, /* No OER support, use "-gen-OER" to enable */
2017-07-14 10:59:52 +00:00
0, 0, /* No PER support, use "-gen-PER" to enable */
2005-07-03 05:27:19 +00:00
0, /* Use generic outmost tag fetcher */
2006-03-21 03:40:38 +00:00
asn_DEF_AutoType_34P1_tags_3,
sizeof(asn_DEF_AutoType_34P1_tags_3)
/sizeof(asn_DEF_AutoType_34P1_tags_3[0]), /* 1 */
asn_DEF_AutoType_34P1_tags_3, /* Same as above */
sizeof(asn_DEF_AutoType_34P1_tags_3)
/sizeof(asn_DEF_AutoType_34P1_tags_3[0]), /* 1 */
2017-07-14 10:59:52 +00:00
0, /* No OER visible constraints */
2005-11-26 11:25:14 +00:00
0, /* No PER visible constraints */
2006-03-21 03:40:38 +00:00
asn_MBR_AutoType_34P1_3,
2005-07-03 05:27:19 +00:00
1, /* Elements count */
2006-03-21 03:40:38 +00:00
&asn_SPC_AutoType_34P1_specs_3 /* Additional specs */
2005-07-03 05:27:19 +00:00
};
2006-03-21 03:40:38 +00:00
/*** <<< INCLUDES [AutoChoice] >>> ***/
2006-09-13 02:51:20 +00:00
#include "AutoType.h"
2006-03-21 03:40:38 +00:00
#include <constr_CHOICE.h>
/*** <<< DEPS [AutoChoice] >>> ***/
typedef enum AutoChoice_PR {
AutoChoice_PR_NOTHING, /* No components present */
AutoChoice_PR_type1,
2006-08-18 01:46:46 +00:00
AutoChoice_PR_type2
2006-03-21 03:40:38 +00:00
} AutoChoice_PR;
/*** <<< TYPE-DECLS [AutoChoice] >>> ***/
typedef struct AutoChoice {
AutoChoice_PR present;
union AutoChoice_u {
AutoType_34P0_t type1;
AutoType_34P1_t type2;
} choice;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} AutoChoice_t;
/*** <<< FUNC-DECLS [AutoChoice] >>> ***/
extern asn_TYPE_descriptor_t asn_DEF_AutoChoice;
/*** <<< STAT-DEFS [AutoChoice] >>> ***/
2005-07-03 05:27:19 +00:00
static asn_TYPE_member_t asn_MBR_AutoChoice_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct AutoChoice, choice.type1),
.tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */
2006-03-21 03:40:38 +00:00
.type = &asn_DEF_AutoType_34P0,
2005-07-03 05:27:19 +00:00
.memb_constraints = 0, /* Defer constraints checking to the member type */
2017-07-14 10:59:52 +00:00
.oer_constraints = 0, /* OER is not compiled, use -gen-OER */
2005-11-26 11:25:14 +00:00
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
2005-07-03 05:27:19 +00:00
.name = "type1"
},
{ ATF_NOFLAGS, 0, offsetof(struct AutoChoice, choice.type2),
.tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */
2006-03-21 03:40:38 +00:00
.type = &asn_DEF_AutoType_34P1,
2005-07-03 05:27:19 +00:00
.memb_constraints = 0, /* Defer constraints checking to the member type */
2017-07-14 10:59:52 +00:00
.oer_constraints = 0, /* OER is not compiled, use -gen-OER */
2005-11-26 11:25:14 +00:00
.per_constraints = 0, /* PER is not compiled, use -gen-PER */
.default_value = 0,
2005-07-03 05:27:19 +00:00
.name = "type2"
},
};
2014-10-13 01:37:35 +00:00
static const asn_TYPE_tag2member_t asn_MAP_AutoChoice_tag2el_1[] = {
2013-10-11 21:29:38 +00:00
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* type1 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* type2 */
2005-07-03 05:27:19 +00:00
};
2005-11-26 11:25:14 +00:00
static asn_CHOICE_specifics_t asn_SPC_AutoChoice_specs_1 = {
2005-07-03 05:27:19 +00:00
sizeof(struct AutoChoice),
offsetof(struct AutoChoice, _asn_ctx),
offsetof(struct AutoChoice, present),
sizeof(((struct AutoChoice *)0)->present),
2005-11-26 11:25:14 +00:00
asn_MAP_AutoChoice_tag2el_1,
2005-07-03 05:27:19 +00:00
2, /* Count of tags in the map */
2005-11-26 11:25:14 +00:00
.canonical_order = 0,
.ext_start = -1 /* Extensions start */
2005-07-03 05:27:19 +00:00
};
asn_TYPE_descriptor_t asn_DEF_AutoChoice = {
"AutoChoice",
"AutoChoice",
CHOICE_free,
CHOICE_print,
CHOICE_constraint,
CHOICE_decode_ber,
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
2017-07-06 14:52:39 +00:00
0, 0, /* No OER support, use "-gen-OER" to enable */
2017-07-14 10:59:52 +00:00
0, 0, /* No PER support, use "-gen-PER" to enable */
2005-07-03 05:27:19 +00:00
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
2017-07-14 10:59:52 +00:00
0, /* No OER visible constraints */
2005-11-26 11:25:14 +00:00
0, /* No PER visible constraints */
2005-07-03 05:27:19 +00:00
asn_MBR_AutoChoice_1,
2, /* Elements count */
2005-11-26 11:25:14 +00:00
&asn_SPC_AutoChoice_specs_1 /* Additional specs */
2005-07-03 05:27:19 +00:00
};