Re: [EXI] Encoding Basic types

Hi Santhanakrishnan,

The grammars are used to describe how event codes are encoded/decoded.
 They do not contain any information on how specific content is
encoded.  That is specified as part of the semantics.  The information
in the section on type mappings describes how to encode/decode the
content for any given type in schema-informed mode.

Regards,

Ed Day


On Tue, May 6, 2008 at 8:47 AM, santhanakrishnan <santhana@huawei.com> wrote:
> Hi EdDay,
>         Thank you very much for your reply. Sorry for the delay in following
>  it up.
>  While encoding bounded integer in n-bits the range start information is not
>  part of the encoding. So this should be made available in the grammar
>  generated from the schema. Can you please let me know where in the
>  specification the grammar for bounded integer type is dealt ?
>
>  Regards
>  Santhanakrishnan
>
>  -----Original Message-----
>  From: Ed Day [mailto:edday2006@gmail.com]
>  Sent: Monday, April 21, 2008 7:52 PM
>  To: santhana@huawei.com
>  Subject: Re: [EXI] Encoding Basic types
>
>  Hello again,
>
>  On Mon, Apr 21, 2008 at 9:13 AM, santhanakrishnan <santhana@huawei.com>
>  wrote:
>  >
>  >
>  >
>  >
>  > Thank you very much for your reply. Pls see inline(more doubts)
>  >
>  >
>  >
>  >
>  > Hi Santhanakrishnan,
>  >
>  >
>  >
>  > On Mon, Apr 21, 2008 at 8:02 AM, santhanakrishnan <santhana@huawei.com>
>  > wrote:
>  >
>  > >
>  >
>  > > Hi
>  >
>  > >
>  >
>  > > .           While encoding N bit unsigned integer if the range of the
>  >
>  > > bounded integer is greater than 4095 then the spec states that the input
>  >
>  > > should be encoded as Integer. I feel it should be encoded as Unsigned
>  >
>  > > Integer in this case as the original input itself is an N bit Unsigned
>  >
>  > > Integer.
>  >
>  >
>  >
>  > It is possible the number may be negative.  If the range value was
>  >
>  > something like -10,000 to 0, the value would be negative after
>  >
>  > discarding the constraint.
>  >
>  > If the range is -10000(min) to 0(max) and if I want to encode -5000(val),
>  I
>  > would encode (val-min) -5000 - (-10000) = 5000. Am I correct? Howmuchever
>  > -ve it is If I subtract the minimum value it will come to the positive
>  band.
>  > Then why I need to encode it as an Integer.
>
>  The entire constraint is thrown out including the lower bound so you
>  are just left with -5000 which is encoded as a signed integer.
>
>
>  >
>  > >
>  >
>  > >
>  >
>  > >
>  >
>  > > .           Also If we encode a bounded integer as N bit unsigned
>  integer
>  >
>  >
>  > > then how the decoder will know the starting value of range while
>  decoding.
>  >
>  > > The range start value is not part of the encoding. Should the range
>  start
>  >
>  > > information be made available in the grammar generated from the schema ?
>  >
>  >
>  >
>  > Yes.
>  >
>  > Will the EXI specification be updated for this in the Schema to grammar
>  > conversion section ?
>
>  I am not sure what needs to be changed in the EXI specification to
>  make this clearer.  Bounded integer is simply a data type.  The rules
>  for its use are already included.
>
>  >
>  >
>  > >
>  >
>  > >
>  >
>  > >
>  >
>  > > Please clarify the above.
>  >
>  > >
>  >
>  > >
>  >
>  > >
>  >
>  > > Regards
>  >
>  > >
>  >
>  > > Santhanakrishnan
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  > --
>  >
>  > Ed Day
>  >
>  > Objective Systems, Inc.
>  >
>  > http://www.obj-sys.com
>
>
>
>  --
>  Ed Day
>  Objective Systems, Inc.
>  http://www.obj-sys.com
>
>



-- 
Ed Day
Objective Systems, Inc.
http://www.obj-sys.com

Received on Tuesday, 6 May 2008 15:47:48 UTC