In Mr. Dubuisson's book ("ASN.1 - Communication between Heterogenous
Systems") it is suggested (page 236) that if AUTOMATIC TAGS clause is not
used in the header module, a tag of class context-specific should be
inserted before each CHOICE type. The example reads:

T ::= CHOICE { a [0] INTEGER,
               b [1] NULL }

U ::= SET { x [0] REAL,
            y [1] T,
            z [2] CHOICE { c [1] BIT STRING,
                           d [2] OCTET STRING } }

If U were a SEQUENCE, I guess the correct definitions would be:

T ::= CHOICE { a [0] INTEGER,
               b [1] NULL }

U ::= SEQUENCE { x [0] REAL,
                 y [1] T,
                 z [2] CHOICE { c [1] BIT STRING,
                                d [2] OCTET STRING } }

Does that mean that when (BER) encoding the object, the choice will have two
tags in a row: first to tell that the CHOICE is present within its parent
SET or SEQUENCE type and the second to indicate which is the chosen
object/type inside the CHOICE?

Regards,
Eddie L

Eddie Lascu
Senior Software Developer, Associate
IBI Group
230 Richmond St. W., 5th Floor
Toronto   ON   M5V 1V6
Tel. (416) 596-1930 x312
Fax. (416) 596-0644
www.ibigroup.com


NOTE: This e-mail message and attachments may contain privileged and
confidential information.  If you have received this message in error,
please immediately notify the sender and delete this e-mail message.

"NOTE: Ce courriel peut contenir de l'information privil�gi�e et
confidentielle.  Si vous avez re�u ce message par erreur, veuillez le
mentionner imm�diatement � l'exp�diteur et effacer ce courriel."

_______________________________________________
ASN1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1

Reply via email to