|
FAST Protocol
< Previous Next >
Re: Nullable Integers in Templates
Mikael Brannstrom / Nordic Growth Market <> 10 Aug 2010 9:21AM ET <uInt32 name="TheField" id="123" presence="optional"/>
The default value for the 'presence' attribute is 'mandatory'. This is the template syntax in FAST 1.1.
Hanno is correct that when sending TheField=null it is actually sent as 0 (zero) and TheField=1 would mean that the value 2 is sent over the wire.
/Mikael
> If I am not mistaken, zero is the NULL value and all "real" integers are shifted by one, i.e. 0 is 1, 1 is 2 etc. on the wire. The decoder then needs to subtract 1 to provide the real value to the application. Zeor on the wire then represents the NULL value and can be given to the application in whatever way it expects to see NULL values.
>
> > I knwo this is probably a ver simple question BUT how is a UInt32 field defined as having null support in the template defination?
Re: Nullable Integers in Templates Mikael Brannstrom / Nordic Growth Market 10 Aug 2010 9:21AM ET |