Commit fb857fdd authored by Lev Walkin's avatar Lev Walkin

added CHOICE tag

parent b7bfd1a0
...@@ -11,7 +11,7 @@ ModuleTestExtensibleChoice ...@@ -11,7 +11,7 @@ ModuleTestExtensibleChoice
DEFINITIONS AUTOMATIC TAGS ::= DEFINITIONS AUTOMATIC TAGS ::=
BEGIN BEGIN
Choice ::= CHOICE { Choice ::= [123] CHOICE {
a INTEGER, a INTEGER,
..., ...,
b INTEGER, b INTEGER,
......
...@@ -44,24 +44,27 @@ static asn_TYPE_member_t asn_MBR_Choice[] = { ...@@ -44,24 +44,27 @@ static asn_TYPE_member_t asn_MBR_Choice[] = {
.tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)), .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */ .tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn_DEF_INTEGER, .type = (void *)&asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer constraints checking to the member type */
.name = "a" .name = "a"
}, },
{ ATF_NOFLAGS, 0, offsetof(struct Choice, choice.b), { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.b),
.tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */ .tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn_DEF_INTEGER, .type = (void *)&asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer constraints checking to the member type */
.name = "b" .name = "b"
}, },
{ ATF_POINTER, 0, offsetof(struct Choice, choice.c), { ATF_POINTER, 0, offsetof(struct Choice, choice.c),
.tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
.tag_mode = +1, /* EXPLICIT tag at current level */ .tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn_DEF_Choice, .type = (void *)&asn_DEF_Choice,
.memb_constraints = 0, /* Defer to actual type */ .memb_constraints = 0, /* Defer constraints checking to the member type */
.name = "c" .name = "c"
}, },
}; };
static ber_tlv_tag_t asn_DEF_Choice_tags[] = {
(ASN_TAG_CLASS_CONTEXT | (123 << 2))
};
static asn_TYPE_tag2member_t asn_DEF_Choice_tag2el[] = { static asn_TYPE_tag2member_t asn_DEF_Choice_tag2el[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a at 15 */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a at 15 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* b at 17 */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* b at 17 */
...@@ -87,10 +90,12 @@ asn_TYPE_descriptor_t asn_DEF_Choice = { ...@@ -87,10 +90,12 @@ asn_TYPE_descriptor_t asn_DEF_Choice = {
CHOICE_decode_xer, CHOICE_decode_xer,
CHOICE_encode_xer, CHOICE_encode_xer,
CHOICE_outmost_tag, CHOICE_outmost_tag,
0, /* No effective tags (pointer) */ asn_DEF_Choice_tags,
0, /* No effective tags (count) */ sizeof(asn_DEF_Choice_tags)
0, /* No tags (pointer) */ /sizeof(asn_DEF_Choice_tags[0]), /* 1 */
0, /* No tags (count) */ asn_DEF_Choice_tags, /* Same as above */
sizeof(asn_DEF_Choice_tags)
/sizeof(asn_DEF_Choice_tags[0]), /* 1 */
asn_MBR_Choice, asn_MBR_Choice,
3, /* Elements count */ 3, /* Elements count */
&asn_DEF_Choice_specs /* Additional specs */ &asn_DEF_Choice_specs /* Additional specs */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment