Sorry, the answer was intended to go to the list. It'll take a while
until I learn that simply hitting reply does not work on this list.
---------- Forwarded message ----------
From: Heinrich Nirschl <[EMAIL PROTECTED]>
Date: Fri, Feb 29, 2008 at 5:53 PM
Subject: Re: [Asn1] ASN.1 Choice tag
To: Piyush Wadhwani <[EMAIL PROTECTED]>
On Fri, Feb 29, 2008 at 5:39 PM, Piyush Wadhwani
<[EMAIL PROTECTED]> wrote:
> Default Tagging mode is IMPLICIT
>
>
>
> Record ::= SET {
>
> Name [0] OCTET STRING
>
> address [1] My-Address
>
> }
>
>
>
> My-Address ::= Address
>
>
>
> Address ::= CHOICE --willl tag for BinaryAddress or
> TextRepresentedAddress Will be present while encoding the address in
> default
>
> {
>
> BinaryAddress BinaryAddress,
>
> TextRepresentedAddress TextRepresentedAddress
>
> }
>
>
>
> --if tag would have been given for BinaryAddress and
> TextRepresentedAddress then explicit tagging (which is being used)
> must have been included
>
>
>
> BinaryAddress ::= CHOICE
>
> {
>
> V4Address [0] OCTET
STRING (SIZE(4)),
>
> V6Address [1] OCTET
STRING (SIZE(16))
>
> }
>
> TextRepresentedAddress ::= CHOICE
>
> {
>
> TextV4Address [2] IA5String
(SIZE(7..15)),
>
> TextV6Address [3] IA5String
(SIZE(15..45))
>
> }
>
>
>
> Thanks
>
> Piyush
> _______________________________________________
> Asn1 mailing list
> [email protected]
> http://lists.asn1.org/mailman/listinfo/asn1
>
I am not sure I understand your question fully but explicit tagging is
used for address [1] My-Address because My-Address is an untagged
CHOICE type (See X.680 30.6 c for details).
If implicit tagging was used, you could not distinguish the CHOICE
alternatives in a value.
Henry
_______________________________________________
Asn1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1