Pmap bit for byteVector and Sequence

129 views
Skip to first unread message

Mounika Allagadda

unread,
Aug 4, 2016, 1:37:49 AM8/4/16
to quickfast_users
Hi,

I understand below are the rules to set pmap bits.


But can someone let me know what will be the pmap bits for the byteVector and Sequence?
i understand each sequence will have the pmap bits separately for the fields inside that, but will there be a pmap bit for a sequence also?

If the template is something like the below one:
	<template name="NoLinesOfText" id="22" dictionary="NoLinesOfText">     
        <typeRef name="NoLinesOfText"/>
		<byteVector name="Announcement Text" id="32002" presence="mandatory"></byteVector>
        </template>

		<byteVector name="Headline" id="32001" presence="mandatory"></byteVector>
                <string name="LastRptRequested" id="912" presence="optional"><copy/></string>
		<sequence name="NoLinesOfText" presence="optional"><!--<constant value="1"/> -->
			<length name="NoLinesOfText" id="33"/> 
			<templateRef name="NoLinesOfText"/>		
		</sequence>	


Thanks,
Mounika

Mounika Allagadda

unread,
Aug 4, 2016, 1:47:12 AM8/4/16
to quickfast_users
And also is this quickfast decoder supporting the decoding of byteVector?

Because, When I try to decode the message, I am getting the following error:
[ERR U03] EOF while decoding presence map.

Mounika Allagadda

unread,
Aug 5, 2016, 7:25:59 AM8/5/16
to quickfast_users
i think it's not because of the byteVector.
But, if a sequence is optional and if they are not sending any of the fields in the sequence, do we expect to receive the pmap of that sequence?

Dale Wilson

unread,
Aug 5, 2016, 10:17:10 AM8/5/16
to quickfa...@googlegroups.com
Hi Mounika,
Re sequences vs the PMAP.  If the sequence is optional then it will have a bit in the PMAP to indicate whether it is included in the stream.  If it is required then there will be no bit unless you explicitly define the length field (an advanced, and seldom used technique which I'll ignore for now.)

Byte Vectors are fully supported by QuickFAST.
The error message  you are seeing indicates that QuickFAST ran out of input data while trying to read the PMAP.  This can sometimes occur if the message length passed to QuickFAST is too long so it thinks there is another message in the buffer to be decoded.

Dale

--
You received this message because you are subscribed to the Google Groups "quickfast_users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quickfast_use...@googlegroups.com.
To post to this group, send email to quickfa...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quickfast_users/d623de75-5eee-45a5-a244-ebc4bece39dd%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Turn Observation into Data. Turn Data into Information. Turn Information into Knowledge. Turn Knowledge into Wisdom. Turn Wisdom into Beauty. Turn Beauty into Love .

Mounika Allagadda

unread,
Aug 5, 2016, 11:20:45 AM8/5/16
to quickfast_users
Hi Dale,

I understand that there should be a bit in the pmap of the fast message if the sequence is optional.
But I think every sequence will have it's own pmap. 
And the Field group repeats "sequence length" times, each beginning with its own PMap.
I got this information from here. http://jettekfix.com/node/55

So, can you please explain me if we get the pmap of the sequence if they doesn't want to send the announcement_text.

For eg: If the byte corresponding to "NoLinesOfText"  is '80' and that is the last byte of the fast message(i.e. there is no corresponding pmap for "NoLinesOfText" ).
Is that correct?

Thanks,
Mounika

Dale Wilson

unread,
Aug 5, 2016, 12:55:34 PM8/5/16
to quickfa...@googlegroups.com
On Fri, Aug 5, 2016 at 10:20 AM, Mounika Allagadda <mounik...@gmail.com> wrote:
Hi Dale,

I understand that there should be a bit in the pmap of the fast message if the sequence is optional.
But I think every sequence will have it's own pmap. 
In the template a segment contains a group of fields.  There is no PMAP for the segment itself (which is represented in the stream as a single integer -- the segment length) followed by 'length' instances of the group.

 
And the Field group repeats "sequence length" times, each beginning with its own PMap.
​If any of the fields contained within the group requires a PMAP bit, than each group contained within the segment will begin with a PMAP for that group.  If none of the fields in the group needs a PMAP bit then the group will not contain a PMAP.

 
I got this information from here. http://jettekfix.com/node/55
​That looks like a reasonable explanation of FAST, but the ultimate reference is the FAST specification itself which you can download from here:


​If you are using QuickFAST (or mFast or OpenFAST) all of this is taken care of for you.  If you are writing your own FAST encoder or decoder or simply trying to interpret a message "by hand" you will have to have logic to examine the sequence definition in the Template to determine whether PMAPs are needed for sequence items.
 

So, can you please explain me if we get the pmap of the sequence if they doesn't want to send the announcement_text. 
  ​

For eg: If the byte corresponding to "NoLinesOfText"  is '80' and that is the last byte of the fast message(i.e. there is no corresponding pmap for "NoLinesOfText" ).
Is that correct?

​That would be correct, if the sequence has no entries then there are no PMAPS (even if the contained groups would require one if they were present.)

​Dale

 

For more options, visit https://groups.google.com/d/optout.

Mounika Allagadda

unread,
Aug 9, 2016, 4:47:33 AM8/9/16
to quickfast_users
Hi Dale,

If the byte corresponding to "NoLinesOfText" is 82(10000010), what will be the value of Sequence length?
As per my understanding Seq. length should be considered as 2.

But I have read somewhere that the length is encoded as an unsigned integer and optional unsigned integer values are encoded after adding 1 to the encoded values to distinguish null and 0. 
i.e. 80 => 10000000 corresponds to NULL and 81 => 10000001 corresponds to 0 and similarly 82 corresponds to 1 and so on.

Is that the same way decoding happens in quickfast?

Mounika Allagadda

unread,
Aug 16, 2016, 2:38:43 AM8/16/16
to quickfast_users
Can someone answer my previous question?
What is the difference between seqeuence length 0 and NULL?

Dale Wilson

unread,
Aug 16, 2016, 10:40:46 AM8/16/16
to quickfa...@googlegroups.com
​Mounika,

You say "I have read somewhere that...."    

The rules for FAST encoding/decoding are complex, but very well defined.  They are described in the FAST specification document.  I know there are other sources of information that have tried to simplify things.  These simplifications help when  you are first learning about FAST, but because they are simplifications they omit the details that you need if you are planning to delve deeply into FAST.   For detailed quiestions like this one please use the FAST document itself as the final authority.

You can download the FAST specification from here: www.fixtradingcommunity.org/pg/file/fplpo/read/43062

If the sequence is not present at all, the PMAP bit indicates that.

If it is present the sequence number cannot be NULL so there is no need to reserve a special value to indicate that the sequence number is null.   Therefore a sequence number of 0 means a sequence with no entries, a sequence number of 1 means a sequence with one entry, etc.

Dale


To unsubscribe from this group and stop receiving emails from it, send an email to quickfast_users+unsubscribe@googlegroups.com.
To post to this group, send email to quickfast_users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quickfast_users/be524b09-16c2-4edc-b350-2a84183b235b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages