Imported from previous forum
I have issue with encoding template Id with multiple templates. If the the input encoding template Id is of type COPY_CODE and the order of encoding is t1, t2 and t1; how the decoder will understand the template Id for t1 second time. Since it comes with PMAP bit set to 0 and decoder dont have any idea of previous one( which could take to t2).
Can anybody throw light on this ?
I have issue with encoding template Id with multiple templates. If the
the input encoding template Id is of type COPY_CODE and the order of
encoding is t1, t2 and t1; how the decoder will understand the template
Id for t1 second time. Since it comes with PMAP bit set to 0 and decoder
dont have any idea of previous one( which could take to t2). Can anybody
throw light on this ?
The PMAP bit for the template ID will be one in the second and third messages in your example. It will probably be a one in the first message, too, depending on what happened before this message was sent.
If not there is an error in the encoder.
Dale
I have issue with encoding template Id with multiple templates. If the
the input encoding template Id is of type COPY_CODE and the order of
encoding is t1, t2 and t1; how the decoder will understand the
template Id for t1 second time. Since it comes with PMAP bit set to 0
and decoder dont have any idea of previous one( which could take to
t2). Can anybody throw light on this ?The PMAP bit for the template ID will be one in the second and third
messages in your example. It will probably be a one in the first
message, too, depending on what happened before this message was sent.If not there is an error in the encoder.
Dale
Thanks for your reply, here template Id is not common across the messages. Each message is having different template Id. For the corresponding message, if it is already present in the previous message, so it wont send again.(since its COPY CODE ).
Message 1 : templaet Id = 1, bitmap =1
Message 2 : template Id = 2 , bitmpa = 1
Messaeg 3 : template Id = 1 , bitmap =0 ( since its already encoded for that template previously)
Sat,
as Dale points out, the pmap bit should be set in the third message.
the example in your latest mail is incorrect
/Rolf
I have issue with encoding template Id with multiple templates. If
the the input encoding template Id is of type COPY_CODE and the
order of encoding is t1, t2 and t1; how the decoder will understand
the template Id for t1 second time. Since it comes with PMAP bit set
to 0 and decoder dont have any idea of previous one( which could
take to
t2). Can anybody throw light on this ?The PMAP bit for the template ID will be one in the second and third
messages in your example. It will probably be a one in the first
message, too, depending on what happened before this message was sent.If not there is an error in the encoder.
Dale
Thanks for your reply, here template Id is not common across the
messages. Each message is having different template Id. For the
corresponding message, if it is already present in the previous message,
so it wont send again.(since its COPY CODE ).Message 1 : templaet Id = 1, bitmap =1 Message 2 : template Id = 2 ,
bitmpa = 1 Messaeg 3 : template Id = 1 , bitmap =0 ( since its already
encoded for that template previously)
Thanks for your reply, here template Id is not common across the
messages. Each message is having different template Id. For the
corresponding message, if it is already present in the previous message,
so it wont send again.(since its COPY CODE ).Message 1 : templaet Id = 1, bitmap =1
Message 2 : template Id = 2 ,bitmpap = 1
Message 3 : template Id = 1 , bitmap =0 ( since its already
encoded for that template previously)
Since this obviously doesn’t work, your understanding of the standard must be incorrect. You need to understand that the template ID is stored globally, not in a template-specific dictionary. For message 3 the saved template ID is 2, so in order to use template id 1, the template ID must appear on the wire – hence pmap bit = 1.
Note that using the global dictionary is the default, so not only the template ID, but any other field in message 3 that occurred in message 2 will be encoded/decoded using the message 2 value as the base. This can be overridden using the dictionary or key attributes.
Dale
Dale Wilson & Rolf Anderson,
Thanks for your effort to clarify my doubts. I am first time using the multiple template Ids for the encoding/decoding, I am having some doubts. Let me explain the above discussed with a example.,
Template 1
This template has the following different fields
Field1 - Symbol
Field2 - Price1
Field3 - Size1
Field4 - Price2
Field5 - Size2
Field6 - Price3
Field7 - Size3
Field8 - Price4
Field8 - Size4
Template 2
This template has the following different fields.
Field1 - Symbol
Field2 - Price1
Field3 - Price2
Field4 - Price3
Field5 - Price4
All above field operators are COPY_CODE
Here I have the following questions in mind
If the template Id is global, what about the rest of the fields? Whether they will be global acros the two templates, if field name is same?
What about the PMAP ? is it common for both the templates?. If the field Price1 of template 1 is same as Price1 of template 2, shouldnt it be sent again on the wire? Whether Price3 across templates occupy the same slot in the PMAP array ?
My initial understanding was that the values of the fields are maintained in the context of templates( Template1 and Template2). I assumed same field across two templates ex, price3 will occupy different slots in PMAP in both templates.
Please throw some light on this.
Thanks
Satish
Satish,
The answer to your questions can be find in section “6.3.1 Dictionaries and Previous Values” in the FAST Specification 1.x.1. You need to understand this standard if you are planning to implement the FAST protocol.
Dale
Dale Wilson & Rolf Anderson,
Thanks for your effort to clarify my doubts. I am first time using
the multiple template Ids for the encoding/decoding, I am having some
doubts. Let me explain the above discussed with a example.,Template 1 This template has the following different fields Field1 -
Symbol Field2 - Price1 Field3 - Size1 Field4 - Price2 Field5 - Size2
Field6 - Price3 Field7 - Size3 Field8 - Price4 Field8 - Size4Template 2 This template has the following different fields. Field1 -
Symbol Field2 - Price1 Field3 - Price2 Field4 - Price3 Field5 - Price4All above field operators are COPY_CODE
Here I have the following questions in mind If the template Id is
global, what about the rest of the fields? Whether they will be global
acros the two templates, if field name is same? What about the PMAP ? is
it common for both the templates?. If the field Price1 of template 1 is
same as Price1 of template 2, shouldnt it be sent again on the wire?
Whether Price3 across templates occupy the same slot in the PMAP array ?My initial understanding was that the values of the fields are
maintained in the context of templates( Template1 and Template2). I
assumed same field across two templates ex, price3 will occupy
different slots in PMAP in both templates.Please throw some light on this.
Thanks Satish