On Wed, 21 Nov 2001, Krishna Reddy Gaddam wrote:

> Hi Bancroft Scott and Gy�rgy
>
> Thank you for your help.
>
> I have the following specific question.
>
> Please consider the following definitions.
> The encoding rule is ASN.1 PER (unaligned).
>
> ------------------------------------------------------------------------
> Class-definitions DEFINITIONS AUTOMATIC TAGS ::=
> BEGIN
>
> myCHOICE_1 ::= CHOICE {
>       firstAlternative        [9]        FirstAlternative,
>       secondAlternative       [8]        SecondAlternative
> }
>
>
> mySEQUENCE_1 ::= SEQUENCE {
>       firstField      [9]        FirstField,
>       secondField     [8]        SecondField
> }
>
> myCHOICE_2 ::= CHOICE {
>       firstAlternative          FirstAlternative,
>       secondAlternative      SecondAlternative
> }
>
> mySEQUENCE_2 ::= SEQUENCE {
>       firstField         FirstField,
>       secondField        SecondField
> }
>
> END

Note that the above ASN.1 is invalid, in that underscore is not in the
ASN.1 character set, and typereferences must start with an upper case
letter.

> ------------------------------------------------------------------------
>
> MyCHOICE_2 would be encoded as follows.
>
>       for firstAlternative:           <0 i.e. prefix>  <encoding of the
> firstAlternative>
>       for secondAlternative:  <1 i.e. prefix>  <encoding of the
> secondAlternative >
>
> MySEQUENCE_2 would be encoded as follows.
>
>       <encoding of the firstField > <encoding of the secondField >

Correct.

> Questions:
> ----------
>
>       Will the specification of tags (9 and 8) in myCHOICE_1 effect the
> prefix value of FirstAlternative and SecondAlternative?
>       If yes then how will the encoding of myCHOICE_1 be?

Yes.  The alternatives must be sorted in ascending tag order before the
choice index is assigned.

>       And will IMPLICIT or EXPLICIT tagging have different effects on
> encoding of myCHOICE_1?

No.

>       Will the specification of tags (9 and 8) in mySEQUENCE_1 effect the
> encoding of mySEQUENCE_1?

No.

> Please provide us with pointers (Books/References), if any.

See X.691, clause 18 and 22, and X.680 clause 24.7 - 24.7, 28.3.

I also suggest that you get a copy of the most recent ASN.1 books
available from bookstores or in electronic form at
http://www.oss.com/asn1/booksintro.html.  If you are writing any
sort of ASN.1 parsing tool, these books and the ASN.1 docs, are vital.

-------------------------------------------------------------------------
Bancroft Scott                               Toll Free    :1-888-OSS-ASN1
OSS Nokalva                                  International:1-732-302-0750
[EMAIL PROTECTED]                                 Tech Support :1-732-302-9669 x-1
1-732-302-9669 x-200                         Fax          :1-732-302-0023
http://www.oss.com

> Thanks and Regards
> Krishna
>
>
> -----Original Message-----
> From: Gyorgy Rethy (ETH) [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 20, 2001 4:10 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: [ASN.1] AUTOMATIC Tagging and Unaligned-PER
>
>
> Hi,
>
> No, not at all. I would say quite the opposit. Automatic tagging works only
> on types, which does not contain "hand-written" tags. If textual taggs are
> removed from a module, automatic tagging may allocate a different tag to
> components of SEQUENCEs, SETs  or alternatives of CHOICEs as the textual tag
> was. This may cause a different re-ordering of SET components or CHOICE
> alternatives as it would be with textual taggs and spoile encoding.
>
> This is a different issue, that there may be modules not using automatic
> tagging but tagged quite the same way manually as the automatic mechanism
> would do.
>
> By the way it is unimportant from this point of view if the encoding is
> aligned or unaligned.
>
> Best Regards, Gy�rgy
>
> ============================================
> dr. Gy�rgy R�THY
> Ericsson Communications Systems Hungary Lim.
> Conformance Center
> tel.: +36 1 437-7006; fax: +36 1 437-7767
> mobile: +36 30 297-7862
> e-mail: [EMAIL PROTECTED]
> web: http://www.r.eth.ericsson.se/~ethgry
> ============================================
>
>
> >-----Original Message-----
> >From: Krishna Reddy Gaddam [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, November 19, 2001 9:58 AM
> >To: [EMAIL PROTECTED]
> >Cc: '[EMAIL PROTECTED]'
> >Subject: [ASN.1] AUTOMATIC Tagging and Unaligned-PER
> >
> >
> >Hi All
> >
> >Is it correct to say :
> >--------------------
> >If an ASN.1 module header says AUTOMATIC TAGS,
> >the Unaligned-PER encoder need not bother to look into the any
> >of the TAGS
> >in the whole module.
> >
> >Other way of saying :
> >---------------------
> >Is the module is just equivalent to all the TAGS removed from
> >the module ?
> >
> >
> >Please clarify.
> >
> >Thanks in advance.
> >
> >Regards
> >Krishna [mailto:[EMAIL PROTECTED]]
> >
>

Reply via email to