Difference between NULL and 0 value of an optional unsigned integer!

88 views
Skip to first unread message

Mounika Allagadda

unread,
Aug 25, 2016, 2:47:01 AM8/25/16
to quickfast_users


Hello,

Can someone explain me the difference between NULL and 0 value of an optional unsigned integer.

























Thanks,
Mounika

Lars Mattsson

unread,
Aug 31, 2016, 7:36:06 AM8/31/16
to quickfast_users
in this case an null value means that is not part of the message. While 0 means that is part of the message and have value 0.  (In FIX it´s the same as having 32=0 or not having tag 32 in the fix message). 

Chetan Singh Bisht

unread,
May 17, 2017, 2:27:52 AM5/17/17
to objectcomputing_financial
Hi Mounika,

I recently started learning Quick FAST protocol. I was able to successfully deploy application on linux (c++) and compile the programs.
I started with testSequence application provided with the package and was able to successfully able to decode a message using a template
The issue is when I use the same template and Fast encoded message, I was not able to decode it using the TutorialApplication exe provided with the package. Below is the template xml:

<templates>
  <template id="4" name="nxAccountDefinition">
    <typeRef name="nxAccountDefinition"/>
    <uInt32 id="1" name="objectType">
      <constant value="3"/>
    </uInt32>
    <uInt32 id="2" name="ID">
      <default value="0"/>
    </uInt32>
    <sequence id="3" name="childNodes">
      <length name="childNodesLength"/>
      <uInt32 name="childNodesSeq"/>
    </sequence>
    <sequence name="childNodes4" presence="optional">
      <length name="childNodesLength4"/>
      <templateRef name="nxAccountDefinition"/>
    </sequence>
    <sequence name="childNodes5" presence="optional">
      <length name="childNodesLength5"/>
      <templateRef name="nxAccountGroupDefinition"/>
    </sequence>
    <uInt32 id="5" name="state">
      <default value="0"/>
    </uInt32>
    <string id="6" name="strName">
      <default value=""/>
    </string>
    <uInt32 id="7" name="accessLevel">
      <default value="0"/>
    </uInt32>
    <string id="8" name="clearingAccount">
      <default value="HelloWorld"/>
    </string>
  </template>
  <template id="5" name="nxAccountGroupDefinition">
    <typeRef name="nxAccountGroupDefinition"/>
    <uInt32 id="1" name="objectType">
      <constant value="3"/>
    </uInt32>
    <uInt32 id="2" name="ID">
      <default value="0"/>
    </uInt32>
    <sequence id="3" name="childNodes">
      <length name="childNodesLength"/>
      <uInt32 name="childNodesSeq"/>
    </sequence>
    <sequence name="childNodes4" presence="optional">
      <length name="childNodesLength4"/>
      <templateRef name="nxAccountDefinition"/>
    </sequence>
    <sequence name="childNodes5" presence="optional">
      <length name="childNodesLength5"/>
      <templateRef name="nxAccountGroupDefinition"/>
    </sequence>
    <uInt32 id="5" name="state">
      <default value="0"/>
    </uInt32>
    <string id="6" name="strName">
      <default value=""/>
    </string>
    <uInt32 id="7" name="accessLevel">
      <default value="0"/>
    </uInt32>
    <string id="8" name="clearingAccount">
      <default value="HelloWorld"/>
    </string>
  </template>
</templates>


The hex encoded data is :

da 85 81 84 82 b4 80 80 80 15 f1 54 65 73 74 65
72 c1 48 65 6c 6c 6f 20 57 6f 72 6c 64 20 b1 80
15 f1 54 65 73 74 65 72 f3 80


Binary Format for above hex:

11011010 10000101 10000001 10000100 10000010 10110100 10000000 10000000 10000000 00010101 11110001 01010100 01100101 01110011 01110100 01100101 01110010 11000001 01001000 01100101 01101100 01101100 01101111 00100000 10110001 10000000 00010101 11110001 01010100 01100101 01110011 01110100 01100101 01110010 11110011 10000000



On providing Template xml + binary data as input to TutorialApplication exe , It was not able to decode it.

Can you please let me know if they find anything wrong with the template xml / binary data or if you can provide with some sample template xml with encoded data so that I can work that out and find how Decoding works in quick fast.

Also I would really appreciate if you can provide me with documentation links to quick fast (c++)  as I do not find much help online for this product.(I really want to lean this).
Reply all
Reply to author
Forward
0 new messages