我对 FAST 消息中的序列有一些问题
例如,我有下一个模板 xml
<template name="DefaultIncrementalRefreshMessage" id="1">
<string name="ApplVerID" id="1128">
<constant value="9"/>
</string>
<string name="MessageType" id="35">
<constant value="X"/>
</string>
<string name="SenderCompID" id="49">
<constant value="MOEX"/>
</string>
<uInt32 name="MsgSeqNum" id="34"/>
<uInt64 name="SendingTime" id="52"/>
<uInt32 name="LastFragment" id="893" presence="optional"/>
<sequence name="MDEntries">
<length name="NoMDEntries" id="268"/>
<uInt32 name="MDUpdateAction" id="279"/>
<string name="MDEntryType" id="269"/>
<uInt64 name="SecurityID" id="48" presence="optional"/>
<uInt32 name="SecurityIDSource" id="22">
<constant value="8"/>
</uInt32>
<string name="Symbol" id="55" presence="optional"/>
<string name="SecurityGroup" id="1151" presence="optional"/>
<uInt32 name="ExchangeTradingSessionID" id="5842" presence="optional"/>
<uInt32 name="RptSeq" id="83"/>
<uInt32 name="MarketDepth" id="264" presence="optional"/>
<uInt32 name="MDPriceLevel" id="1023" presence="optional"/>
<int64 name="MDEntryID" id="278" presence="optional"/>
<decimal name="MDEntryPx" id="270" presence="optional"/>
<int64 name="MDEntrySize" id="271" presence="optional"/>
<uInt32 name="MDEntryDate" id="272" presence="optional"/>
<uInt32 name="MDEntryTime" id="273"/>
<int32 name="NumberOfOrders" id="346" presence="optional"/>
<string name="MDEntryTradeType" id="20003" presence="optional"/>
<int32 name="TrdType" id="828" presence="optional"/>
<decimal name="LastPx" id="31" presence="optional"/>
<int32 name="MDFlags" id="20017" presence="optional"/>
<string name="Currency" id="15" presence="optional"/>
<uInt64 name="Revision" id="20018" presence="optional"/>
<string name="OrderSide" id="10504" presence="optional"/>
</sequence>
</template>
起初我得到我们模板的 PMap,下一步我得到模板 id,然后我一个一个地读取字节并且一切正常,但是如果我得到序列“MDEntries”,我的数据将不正确,因为字节序列将被破坏。
我看到下一张带有 FAST Message 结构的图片,并认为我应该读取序列和长度为 'NoMDEntries' 的 PMap,然后一个接一个地读取字节,是否正确?我曾经认为我应该一个一个地读取字节并删除停止位
帮帮我,我如何正确解析“序列”