template 90 pmap size mismatch

Imported from previous forum

I am trying to decode temlpate 90 and my decoder expects more pmap entries than available.
It expects to have 8 pmap entries:
the first one is MDUpdateAction (pmap = 0) and the last one is TradingSessionID (mmap = 7) , but I have only 1 byte in the stream.
I guess the my pmap numbering is wrong ?

0x81 num of entries 1
0xae item pmap 10101110 only 7 entries
0x84 level = 4

HEX without 5 byte preambular: 0xc0,0xda,0x3,0x3a,0x1d,0xb4,0x23,0x5c,0x52,0x4a,0x38,0x3f,0x32,0xe6,0x9,0x4b,0x3a,0xf2,0x81,0xae,0x84,0x3d,0x7f,0x46,0x80,0x4,0x5d,0xaf,0x4d,0x34,0x8d,0x0,0x5d,0x82,0xa6,0x8f

(34)seq=7245492 (52)time=20110706130016614 (43)dup= (75)trddate=20110706 (268)numentries=1
(279)action=1 (1023)lvl=4 (269)side=0/0 (273)time=130016000 (48)secid=77487 (83)rptseq=1268237 (270)px_e=0/0 (-270)px_m=11906 (271)sz=38 (336) - fails here

template 90
MsgSeqNum u32 NONE -1 34 nodef
SendingTime l64 NONE -1 52 nodef
PosDupFlag str DEFAULT PMAP:1 43 hasdef
TradeDate u32 NONE -1 75 nodef
sequence MDEntries 268 mand
MDUpdateAction u32 COPY PMAP:0 279 hasdef 1
MDPriceLevel u32 INC PMAP:1 1023 nodef
MDEntryType str COPY PMAP:2 269 hasdef 0
MDEntryTime u32 COPY PMAP:3 273 hasdef
SecurityID u32 COPY PMAP:4 48 hasdef
RptSeq u32 INC PMAP:5 83 nodef
MDEntryPx i32 DEFAULT PMAP:6 -270 hasdef 0
MDEntryPx i32 MDELTA -1 -270 nodef
MDEntrySize i32 MDELTA -1 271 nodef
TradingSessionID str DEFAULT PMAP:7 336 hasdef 2
NumberOfOrders u32 MDELTA -1 346 nodef
end sequence MDEntries
end template 90

trailing zero bytes are stripped from the PMAP. If you need bit #8 and you only have 7 bits, then the PMAP value is zero.

Dale

I am trying to decode temlpate 90 and my decoder expects more pmap entries than available.
It expects to have 8 pmap entries:
the first one is MDUpdateAction (pmap = 0) and the last one is TradingSessionID (mmap = 7) , but I have only 1 byte in the stream.
I guess the my pmap numbering is wrong ?

0x81 num of entries 1
0xae item pmap 10101110 only 7 entries
0x84 level = 4

HEX without 5 byte preambular: 0xc0,0xda,0x3,0x3a,0x1d,0xb4,0x23,0x5c,0x52,0x4a,0x38,0x3f,0x32,0xe6,0x9,0x4b,0x3a,0xf2,0x81,0xae,0x84,0x3d,0x7f,0x46,0x80,0x4,0x5d,0xaf,0x4d,0x34,0x8d,0x0,0x5d,0x82,0xa6,0x8f

(34)seq=7245492 (52)time=20110706130016614 (43)dup= (75)trddate=20110706 (268)numentries=1
(279)action=1 (1023)lvl=4 (269)side=0/0 (273)time=130016000 (48)secid=77487 (83)rptseq=1268237 (270)px_e=0/0 (-270)px_m=11906 (271)sz=38 (336) - fails here

template 90
MsgSeqNum u32 NONE -1 34 nodef
SendingTime l64 NONE -1 52 nodef
PosDupFlag str DEFAULT PMAP:1 43 hasdef
TradeDate u32 NONE -1 75 nodef
sequence MDEntries 268 mand
MDUpdateAction u32 COPY PMAP:0 279 hasdef 1
MDPriceLevel u32 INC PMAP:1 1023 nodef
MDEntryType str COPY PMAP:2 269 hasdef 0
MDEntryTime u32 COPY PMAP:3 273 hasdef
SecurityID u32 COPY PMAP:4 48 hasdef
RptSeq u32 INC PMAP:5 83 nodef
MDEntryPx i32 DEFAULT PMAP:6 -270 hasdef 0
MDEntryPx i32 MDELTA -1 -270 nodef
MDEntrySize i32 MDELTA -1 271 nodef
TradingSessionID str DEFAULT PMAP:7 336 hasdef 2
NumberOfOrders u32 MDELTA -1 346 nodef
end sequence MDEntries
end template 90

The PMAP bytes is optimized so that trailing zeros are trimmed.
See
10.5 Presence Map

Logically a presence map has an infinite suffix of zeroes. This makes it possible to truncate a presence map that ends in a sequence where the bits are all zero. The length of the remaining part must be a multiple of seven.

I am trying to decode temlpate 90 and my decoder expects more pmap entries than available.
It expects to have 8 pmap entries:
the first one is MDUpdateAction (pmap = 0) and the last one is TradingSessionID (mmap = 7) , but I have only 1 byte in the stream.
I guess the my pmap numbering is wrong ?

0x81 num of entries 1
0xae item pmap 10101110 only 7 entries
0x84 level = 4

HEX without 5 byte preambular: 0xc0,0xda,0x3,0x3a,0x1d,0xb4,0x23,0x5c,0x52,0x4a,0x38,0x3f,0x32,0xe6,0x9,0x4b,0x3a,0xf2,0x81,0xae,0x84,0x3d,0x7f,0x46,0x80,0x4,0x5d,0xaf,0x4d,0x34,0x8d,0x0,0x5d,0x82,0xa6,0x8f

(34)seq=7245492 (52)time=20110706130016614 (43)dup= (75)trddate=20110706 (268)numentries=1
(279)action=1 (1023)lvl=4 (269)side=0/0 (273)time=130016000 (48)secid=77487 (83)rptseq=1268237 (270)px_e=0/0 (-270)px_m=11906 (271)sz=38 (336) - fails here

template 90
MsgSeqNum u32 NONE -1 34 nodef
SendingTime l64 NONE -1 52 nodef
PosDupFlag str DEFAULT PMAP:1 43 hasdef
TradeDate u32 NONE -1 75 nodef
sequence MDEntries 268 mand
MDUpdateAction u32 COPY PMAP:0 279 hasdef 1
MDPriceLevel u32 INC PMAP:1 1023 nodef
MDEntryType str COPY PMAP:2 269 hasdef 0
MDEntryTime u32 COPY PMAP:3 273 hasdef
SecurityID u32 COPY PMAP:4 48 hasdef
RptSeq u32 INC PMAP:5 83 nodef
MDEntryPx i32 DEFAULT PMAP:6 -270 hasdef 0
MDEntryPx i32 MDELTA -1 -270 nodef
MDEntrySize i32 MDELTA -1 271 nodef
TradingSessionID str DEFAULT PMAP:7 336 hasdef 2
NumberOfOrders u32 MDELTA -1 346 nodef
end sequence MDEntries
end template 90