It is perfectly clear, but brings up another thing. You were right assuming that my understanding was that for OPTIONAL of DEFAULT VALUE members I would still have the T and L fields. You say this is wrong and I believe you. But then how would you identify which member is present and which one is missing when decoding a structure that has three real number members and each one is OPTIONAL. Suppose the encoded image only contains two real numbers encoded. Which ones will be decoded of the three real numbers? In OER (which I used more extensively, hence the Id and contents field names) I have the preamble that tells you which field is present and which one is missing. I went through the standard document again and there is nothing to tell me explicitly how to deal with such cases. My assumption was that only the V field will be absent (while the L field would have a value of 0) and this way you could tell the member has the default value or is optional.
I hope I was able to articulate my new confusion.
Dear Mr. Lascu:
You tell them apart by the tag. For example, if I have three optional elements in a SEQUENCE, I have to use tags to avoid any ambiguity, like this
Z ::= SEQUENCE {
a [0] REAL OPTIONAL,
b [1] REAL OPTIONAL,
c [2] REAL OPTIONAL
}If I don't use tags, each REAL would take the default tag and I couldn't tell them apart. Thus, when decoding, if I see [0] and [2] but not [1], I know that a is present, b is absent, and c is present.
In PER, there is a preamble with a bit map specifying which optional elements are present, but your question deals with BER.
===================================================================== Conrad Sigona Voice Mail : 1-732-302-9669 x400 OSS Nokalva Fax : 1-614-388-4156 [EMAIL PROTECTED] My direct line : 1-315-845-1773 _______________________________________________ ASN1 mailing list [email protected] http://lists.asn1.org/mailman/listinfo/asn1
