aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2005-01-17 12:17:41 +0000
committerLev Walkin <vlm@lionet.info>2005-01-17 12:17:41 +0000
commitfb857fddf84b0435966e240b64628dd0e8315811 (patch)
treec5c8486b7a7f91a1c1233c104897a9f0169bcb76
parentb7bfd1a0976abc616f42ae6236d5e8571ccf4355 (diff)
added CHOICE tag
-rw-r--r--tests/59-choice-extended-OK.asn12
-rw-r--r--tests/59-choice-extended-OK.asn1.-P21
2 files changed, 14 insertions, 9 deletions
diff --git a/tests/59-choice-extended-OK.asn1 b/tests/59-choice-extended-OK.asn1
index 06b3bc75..0e492219 100644
--- a/tests/59-choice-extended-OK.asn1
+++ b/tests/59-choice-extended-OK.asn1
@@ -11,7 +11,7 @@ ModuleTestExtensibleChoice
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
- Choice ::= CHOICE {
+ Choice ::= [123] CHOICE {
a INTEGER,
...,
b INTEGER,
diff --git a/tests/59-choice-extended-OK.asn1.-P b/tests/59-choice-extended-OK.asn1.-P
index 15941e00..942d9f5b 100644
--- a/tests/59-choice-extended-OK.asn1.-P
+++ b/tests/59-choice-extended-OK.asn1.-P
@@ -44,24 +44,27 @@ static asn_TYPE_member_t asn_MBR_Choice[] = {
.tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn_DEF_INTEGER,
- .memb_constraints = 0, /* Defer to actual type */
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
.name = "a"
},
{ ATF_NOFLAGS, 0, offsetof(struct Choice, choice.b),
.tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = (void *)&asn_DEF_INTEGER,
- .memb_constraints = 0, /* Defer to actual type */
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
.name = "b"
},
{ ATF_POINTER, 0, offsetof(struct Choice, choice.c),
.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,
- .memb_constraints = 0, /* Defer to actual type */
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
.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[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a at 15 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* b at 17 */
@@ -87,10 +90,12 @@ asn_TYPE_descriptor_t asn_DEF_Choice = {
CHOICE_decode_xer,
CHOICE_encode_xer,
CHOICE_outmost_tag,
- 0, /* No effective tags (pointer) */
- 0, /* No effective tags (count) */
- 0, /* No tags (pointer) */
- 0, /* No tags (count) */
+ asn_DEF_Choice_tags,
+ sizeof(asn_DEF_Choice_tags)
+ /sizeof(asn_DEF_Choice_tags[0]), /* 1 */
+ asn_DEF_Choice_tags, /* Same as above */
+ sizeof(asn_DEF_Choice_tags)
+ /sizeof(asn_DEF_Choice_tags[0]), /* 1 */
asn_MBR_Choice,
3, /* Elements count */
&asn_DEF_Choice_specs /* Additional specs */