You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are cases where a repeating group's block length is bigger than the sum of its fields. For example:
<groupname="NoMDEntries"id="268"description="Number of entries in Market Data message"blockLength="32"dimensionType="groupSize">
<fieldname="MDEntryPx"id="270"type="PRICENULL9"description="Market Data entry price"offset="0"semanticType="Price"/>
<fieldname="MDEntrySize"id="271"type="Int32NULL"description="Market Data entry size"offset="8"semanticType="Qty"/>
<fieldname="SecurityID"id="48"type="Int32"description="Security ID"offset="12"semanticType="int"/>
<fieldname="RptSeq"id="83"type="uInt32"description="Market Data entry sequence number per instrument update"offset="16"semanticType="int"/>
<fieldname="NumberOfOrders"id="346"type="Int32NULL"description="In Book entry - aggregate number of orders at given price level"offset="20"semanticType="int"/>
<fieldname="MDPriceLevel"id="1023"type="uInt8"description="Aggregate book level"offset="24"semanticType="int"/>
<fieldname="MDUpdateAction"id="279"type="MDUpdateAction"description=" Market Data update action"offset="25"semanticType="int"/>
<fieldname="MDEntryType"id="269"type="MDEntryTypeBook"description="Market Data entry type"offset="26"semanticType="char"/>
</group>
Here, blockLength is 32 but sum(fields) = 27 < 32. The Go generator should account for those 32 - 27 = 5 bytes of padding but it does not. The C++ generator does the right thing.
There are cases where a repeating group's block length is bigger than the sum of its fields. For example:
Here,
blockLength
is 32 butsum(fields) = 27 < 32
. The Go generator should account for those32 - 27 = 5
bytes of padding but it does not. The C++ generator does the right thing.This is what the Go generator does right now:
This is what the Go generator should do:
This is what the C++ generator does:
I have a potential fix here, however I'm unsure of its correctness, I need some input from you.
You can run the example above here.
CC @theodosiosandreou
The text was updated successfully, but these errors were encountered: