Hi All,

i have a query..

ASN.1 Definition goes like this.

DEFINITIONS IMPLICIT TAG ::=

BEGIN

Employee ::= SET
{
empId                   [1] IA5String (SIZE (1..6)),
childrens               [3] ChildInfo
}

ChildInfo ::= SET OF Name

Name ::=SEQUENCE
{
firstName [0] OCTET STRING,
lastName [1] OCTET STRING
}

assuming encoding multiple Name are encoded..

Now while encoding values for employee following tag should be
generated according , to my understanding.

(multiple )
Tag List should be:

  [Universal 17] (universal tag for Set) [Context Specific 1] (empid's
tag) [Context Specific 3] (for childrens) [Context Specific 0] (for
firstName) [Context Specific 1] (for lastName) because implicit
tagging is being used

But in the encoded file contains tag:

  [Universal 17] (universal tag for Set) [Context Specific 1] (empid's
tag)  [Context Specific 3] (for children) [Universal 16]  [Context
Specific 0] (for firstName) [Context Specific 1] (for lastName)

Can you explain this.


As far as I Know encoder will see tag like this
childInfo               [3] IMPLICIT SET OF IMPLICIT SEQUENCE
so all the tags will be overridden by [3].


And if somehow [universal 16] is explained why [universal 17] (SET OF
Name) is not included!



--
Yours
Piyush Wadhwani
_______________________________________________
Asn1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1

Reply via email to