[This message was posted by Naresh Maharaj of Instinet Europe plc <[email protected]> to the "FAST Protocol" discussion forum at http://fixprotocol.org/discuss/46. You can reply to it on-line at http://fixprotocol.org/discuss/read/8f6a3b4b - PLEASE DO NOT REPLY BY MAIL.]
Rolf Thanks for the reply it does make sense. Is a group a set of fields? Because in my template there is no group keyword. I think the notion of the group might be implicit under the sequence keyword. In order I have a: Sequence . length of 1 ( which must be 1 element ) .. pmap 14 bits but no group keyword as such. So with this I can probably conclude that the whole set of fields under sequence must be the group which is 1 element. Naresh Naresh, > > element refers to an instance of a group. A sequence may have zero or > more elements, ie. zero or more instances of the group. Each group > will have a pmap prepended if at least one field in the group requires > a pmap bit. > > the wire representation of such a sequence will be something like: > > length pmap group pmap group ... > > HTH, Rolf > > > David / All > > > > Am a little confused by a statement in the spec: 6.2.5 regarding the > > decoding of a sequence and the pmap bits used. > > > > It says that: > > > > 6.2.5 "If any instruction of the group needs to allocate a bit in a > > presence map, each element is represented as a segment in the > > transfer encoding." > > > > By this statement I see that within the sequence there will be fields. > > And before each fields there will be a new presence map iff any of the > > fields in the sequence did require a presence map. > > > > So with this being the case, if there were 2 copy operators and 1 tail > > operator and 1 increment operator then there would need to be a a > > minimum of 4 separate pmaps within the sequence because each fields > > would be treated a segment. Segment definition is below. > > > > > > "A segment has a header consisting of a Presence Map followed by an > > optional Template Identifier." > > > > Would this be the correct interpretation. > > > > Naresh > > > > > > > The first pmap bit is used for the implicit copy operator for the > > > > > template identifier (TID). This is specified in section 10 Transfer > > > Encoding, in the paragraph defining 'segment'. > > > > > > Thus the bit for PossResend is 0. > > > > > > /D > > > > > > > Thanks David. > > > > > > > > The only issue I have now is getting the pmap bits to correspond > > > > directly to the operators in the template and the incoming message > > > > > > > > See my illustration below with this message: > > > > > > > > 00 D4 F7 01 C8 53 57 58 47 52 4F 55 50 2D 4D 44 .....SWXGROUP-MD > > > > 49 2E 50 30 B1 03 09 57 BE 32 30 30 39 30 39 32 I.P0...W.2009092 > > > > 35 2D 31 30 3A 32 31 3A 35 30 2E 35 31 B7 81 81 5-10:21:50.51... > > > > 57 B8 B1 43 48 30 30 33 31 30 31 34 38 37 B8 A1 W..CH003101487.. > > > > 80 31 30 3A 32 31 3A 35 30 2E 34 39 B3 44 45 D3 .10:21:50.49.DE. > > > > 80 80 80 80 01 BC ...... > > > > > > > > 00 D4 is the block length stop bit encoded The size is 84 > > > > > > > > Next stop bit entity is F7 Pmap byte hex 0xF7 When encoded = > > > > 1110111 > > > > > > > > This give me 7 bits > > > > > > > > > > > > [string name="BeginString" id="8"] [constant > > > > value="FIXT.1.1"/] [/string] [string name="MessageType" > > > > id="35"] [constant value="X"/] [/string] [string > > > > name="ApplVerID" id="1128"] [constant value="7"/] > > > > [/string] [!-- 7: FIX50 --] 1 [string name="SenderCompID" > > > > id="49"] [copy/] [/string] [string name="TargetCompID" > > > > id="56"] [constant value="SWXGROUP-MDC"/] [/string] [!-- > > > > Market Data Consumer --] 1 [uInt32 name="MsgSeqNum" > > > > id="34"] [increment/] [/uInt32] 1 [string > > > > name="PossResend" id="97"][copy value="N"/][/string] [!-- > > > > N: Original Transmission --] [string name="SendingTime" > > > > id="52"] [tail/] [/string] > > > > > > > > > > > > I have put the pmap bits on the left above. > > > > > > > > I know that the PossResend is not in the feed and the pmap value > > > > for PossResend should be 0. I can't get the pmap bits to > > > > correspond to the entities. From the spec I can determine that the > > > > pmap bits would not apply to a mandatory constant. > > > > > > > > > > > > > > > > > > > > > Naresh - > > > > > > > > > > The use of pbits is specified in section 10.5.1 Presence Map and > > > > > NULL Utilization, in the FAST specification. > > > > > > > > > > For the copy operator, the corresponding bit in the pmap > > > > > indicates whether the value is present in the stream or if it > > > > > should be the same as the previous occurence of the field. If > > > > > the bit is 1, then the value is in the stream, if it is 0, then > > > > > it isn't and the previous value should be used. > > > > > > > > > > The value specified in the value attribute on the operator is > > > > > called the initial value. The initial value is only used for the > > > > > very first instance of the field and only if the corresponding > > > > > bit is 0 at the same time. > > > > > > > > > > The fact that a field is optional isn't related to the use of > > > > > bits in the pmap. An absent optional field is indicated by the > > > > > special value NULL in the stream. > > > > > > > > > > /David > > > > > > > > > > > Please can you help with this query. > > > > > > > > > > > > If I can get this resolved then it will further help in the > > > > > > logic and scope of using the presence map. > > > > > > > > > > > > I have a template as below: > > > > > > > > > > > > [Please read “less than char“ as “(” and “greater than char” > > > > > > as “)”] > > > > > > > > > > > > "(template name="StandardHeaderPart2") (string > > > > > > name="ApplVerID" id="1128") (constant value="7"/) (/string) > > > > > > (string name="SenderCompID" id="49") (copy/) (/string) (string > > > > > > name="TargetCompID" id="56") (constant value="SWXGROUP-MDC"/) > > > > > > (/string) (uInt32 name="MsgSeqNum" id="34") (increment/) > > > > > > (/uInt32) (string name="PossResend" id="97")(copy > > > > > > value="N"/)(/string) (string name="SendingTime" id="52") > > > > > > (tail/) (/string) (/template)" > > > > > > > > > > > > > > > > > > And here is the data output that I see from the stream as I > > > > > > process the message. > > > > > > > > > > > > [OUTPUT] SenderCompID:SWXGROUP-MDI.P01| MsgSeqNum:1290984| > > > > > > PossResend:20090929- > > > > > > 12:31:06.532| SendingTime > > > > > > > > > > > > > > > > > > Note the PossResend was not in the stream so the next entity > > > > > > read inadvertently was the Sendtime and this was added the > > > > > > field PossResend. This happened because there was no way to > > > > > > determine if the PossResend value was in the stream or not. > > > > > > > > > > > > If indicated then I would have read the next data entity as > > > > > > the field SendingTime instead. > > > > > > > > > > > > I refer to the template above and the line: (string > > > > > > name="PossResend" id="97")(copy value="N"/)(/string) > > > > > > > > > > > > The FAST Spec confirms the copy operator value of a field can > > > > > > be optional and may or may not be in the stream. So I intepret > > > > > > this as > > > > > > :- "if not in the stream add 'N' as part of your message > > > > > > construction". "else if present in the stream use and copy the > > > > > > value". > > > > > > > > > > > > The question is :- How do I determine if present in the > > > > > > stream? > > > > > > > > > > > > Do I use the presence map in the messsage to determine if the > > > > > > PossResend is in the stream? Or is the Presence map bits > > > > > > reserved only for fields that have the optional tag? > > > > > > > > > > > > e.g. below: > > > > > > > > > > > > (string name="MDExecTime" id="6572" > > > > > > presence="optional") (tail/) > > > > > > > > > > > > > > > > > > > > > > > > Regards > > > > > > > > > > > > > > > > > > Naresh [You can unsubscribe from this discussion group by sending a message to mailto:[email protected]] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Financial Information eXchange" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/fix-protocol?hl=en -~----------~----~----~----~------~----~------~--~---
