On Fri, 27 Jul 2001, Benoit POSTE wrote:

> 
>    Thank you very much Mr. Scott for resending you e-mail.
> 
>    So, just to get this straight (last question, I promise!), if
> I understood well:
> > Toto ::= SEQUENCE {
> >     one     BOOLEAN,
> >     ...,
> >     two     BOOLEAN OPTIONAL,
> >     three   BOOLEAN OPTIONAL,
> >     four    BOOLEAN OPTIONAL
> >     }
>    A value with "one" set to true and all other components absent
> will be encoded:
> 
> 0     no addition value present
> 1     encoding of "one"
> 0000011       number of additions in the type (small whole number 3)
> 000   additions presence bitmap
> 
>    Am I correct? If so, it is a good thing I asked, I think I had
> it wrong.

No, not correct.  If no extension addition value is present then the
encoding is (produced by OSS ASN-1Step utility):

        ossPrintPER output...

        value Toto ::= 
        {
          --TYPE INFORMATION: SEQUENCE
          --OFFSET: 0,0
          --extension flag: <.0>
          one TRUE
            --TYPE INFORMATION: BOOLEAN
            --OFFSET: 0,1; LENGTH: 0,1
            --contents: <1>
        }
        --PDU padding: <000000>
        --TOTAL LENGTH: 1,0

Simply put, the encoding is:

        0       no addition value present
        1       encoding of "one"
        000000  PDU padding

Here it shows what X.691 clause 18.6 says - that once the extension 
root has been encoded the type is fully encoded.

> Similarly:
> > Toto ::= SEQUENCE {
> >     one     BOOLEAN,
> >     ...
> >     }
>    Would be encoded:
> 
> 0     no addition value present
> 1     encoding of "one"
> 0000000       number of additions in the type (small whole number 0)
>       (no additions presence bitmap)
> 
>    Right?

No.  The encoding would be *exactly* as shown above.  That is:
 
        0       no addition value present
        1       encoding of "one"
        000000  PDU padding     

Bancroft

>    Again, thanks a lot for patience and your time.
> 
>    Benoit Poste.
> 
> 
> Bancroft Scott wrote:
> > 
> > On Wed, 25 Jul 2001, Benoit POSTE wrote:
> > 
> > >
> > > > X.691 clause 18.1 is abundantly clear on this:
> > > >
> > > >         ... The bit shall be one if values of extension
> > > >         additions are present in this encoding, and zero
> > > >         otherwise....
> > > >
> > > > What is the source of your confusion as to how the SEQUENCE
> > > > should be encoded?  It is clear to me.
> > >
> > >    Oh all right, so "present" of the additions is to be taken in the
> > > OPTIONAL/DEFAULT sense. I only have the French version of X.691 and in
> > > French it either meant "present" as in OPTIONAL/DEFAULT, or "possess"
> > > (from the type's point of view).
> > 
> > No, it hasn't anything to do with OPTIONAL/DEFAULT or with anything from
> > the type's point of view.  It speaks of *values* of encoding additions.
> > That is, it is a matter of whether the extension addition values are
> > actually present that determines if the extension bit at the front of
> > the SEQUENCE is to 1.
> > 
> > > > ... Ce bit doit être mis à 1 si ce codage contient des
> > > > valeurs d'adjonction d'extension ...
> > > Which literally could mean:
> > > > ... The bit shall be one if this encoding contains
> > > > extension additions ...
> > >    I guess I am just going to get the English version too.
> > >
> > >  However, 18.7 uses the words "number of extension additions to
> > > encode" so ...
> > 
> > Look again at 18.7.  It says "number of extension additions in the type
> > being encoded".  Here it is referring to the type notation, not the actual
> > value.
> > 
> > > I was beginning to wonder if it meant "number of
> > > additions, whether present or not". Of course, one could argue
> > > that encoding an all 0 presence bitmap is rather pointless, but
> > > one benefit is that it tells the receiver the encoder's version.
> > > Hence my confusion about the way to encode it.
> > >
> > > > It would be nice if you were to show us which comment you
> > > > are referring to instead of having everyone spend their time
> > > > trying to figure out which of Mr. Andersen's emails you are
> > > > referring to.
> > >
> > <snip>
> 

Reply via email to