Imported from previous forum
[ original email was from Darshan Khedekar - darshan.khedekar.ext@deutsche-boerse.com ]
If one uses XML to specify FAST templates which format is corect
Layout 1:
Layout 2:
noOfEntries specifies - number of repeating groups
As mentioned the group is optional, which means if the pmat bit is not set none of the elements including the noOfEntries field does not occur.
If pmat bit is set noOfEntries occurs only once and specifies the number of times the remaining elements of the group occur.
Thanks and Regards
- Darshan
The most suitable FAST construct for repeating groups is ‘sequence’. Using your example, it would look like this:
<sequence name=“priceEntries” presence"optional">
This tells the encoder to encode the number of elements that follow as a nullable unsigned integer. Each element is encoded as specified by the instructions within the sequence element. In this particular example the element does not provide any information to the encoder but rather serves as a way to convey the name of the length field to the application. Also, since no field operators are involved in this example, it will not use any bits in the presence map.
/David
If one uses XML to specify FAST templates which format is corect Layout
1:Layout 2:
noOfEntries specifies - number of repeating groups As mentioned
the group is optional, which means if the pmat bit is not set none of
the elements including the noOfEntries field does not occur. If pmat bit
is set noOfEntries occurs only once and specifies the number of times
the remaining elements of the group occur.Thanks and Regards
- Darshan
[ original email was from Darshan Khedekar - darshan.khedekar.ext@deutsche-boerse.com ]
Hi
In section “6.2.5 Sequence Field Instruction” of “FAST Specification
Version 1.x.1 2006-12-20” the paragraph says
“A sequence has an associated length field containing an unsigned integer indicating the number of encoded elements.”
section “6.2.6 Group Field Instruction” says
“The main purpose of the group field instruction is to enable a single bit in the presence map to indicate the presence of a whole group of fields.”
I was driven by the above 2 statements. What I derive from the explanation in 6.2.5 is that a length can only be used to specify number of actually occurring elements in the set of fields in the example length will take value 3.
But I have a repeating set of all mandatory fields 3 in this case and I am looking for a way to convey dynamically how many times this group occurs. Also the statement in 6.2.6 says that I can make a group optional as a whole thus utilising only 1 bit in the presence map.
Which means that if the premap bit is not set the repeating group elements along with the noOfEntries (i.e. no. of times the repeating group occurs)is not sent.
Please clarify
- Darshan
The most suitable FAST construct for repeating groups is ‘sequence’.
Using your example, it would look like this:<sequence name=“priceEntries” presence"optional">
This tells the encoder to encode the number of elements that follow as a
nullable unsigned integer. Each element is encoded as specified by the
instructions within the sequence element. In this particular example the
element does not provide any information to the encoder but
rather serves as a way to convey the name of the length field to the
application. Also, since no field operators are involved in this
example, it will not use any bits in the presence map./David
If one uses XML to specify FAST templates which format is
corect Layout
1:Layout 2: noOfEntries specifies - number of
repeating groups As mentioned the group is optional, which means if
the pmat bit is not set none of the elements including the
noOfEntries field does not occur. If pmat bit is set noOfEntries
occurs only once and specifies the number of times the remaining
elements of the group occur.Thanks and Regards
- Darshan
I’m not sure I follow, but I think you’re confusing elements of a sequence with the XML elements use to define the template of a sequence. As I read your intentions, sequence is exactly what you need. The “associated length field” indicates, dynamically, how many “sequence elements” that follow. Each element in the sequence is defined by the instructions within the .
Given the following instruction
Hi
In section “6.2.5 Sequence Field Instruction” of “FAST Specification
Version 1.x.1 2006-12-20” the paragraph says “A sequence has an
associated length field containing an unsigned integer indicating the
number of encoded elements.”section “6.2.6 Group Field Instruction” says “The main purpose of the
group field instruction is to enable a single bit in the presence map to
indicate the presence of a whole group of fields.” I was driven by the
above 2 statements. What I derive from the explanation in 6.2.5 is that
a length can only be used to specify number of actually occurring
elements in the set of fields in the example length will take value 3.
But I have a repeating set of all mandatory fields 3 in this case and I
am looking for a way to convey dynamically how many times this group
occurs. Also the statement in 6.2.6 says that I can make a group
optional as a whole thus utilising only 1 bit in the presence map. Which
means that if the premap bit is not set the repeating group elements
along with the noOfEntries (i.e. no. of times the repeating group
occurs)is not sent. Please clarify
- Darshan
The most suitable FAST construct for repeating groups is ‘sequence’.
Using your example, it would look like this:<sequence name=“priceEntries” presence"optional">
This tells the encoder to encode the number of elements that follow as
a nullable unsigned integer. Each element is encoded as specified by
the instructions within the sequence element. In this particular
example the element does not provide any information to the
encoder but rather serves as a way to convey the name of the length
field to the application. Also, since no field operators are involved
in this example, it will not use any bits in the presence map./David
If one uses XML to specify FAST templates which format is corect
Layout
1:Layout 2: noOfEntries specifies - number of
repeating groups As mentioned the group is optional, which means if
the pmat bit is not set none of the elements including the
noOfEntries field does not occur. If pmat bit is set noOfEntries
occurs only once and specifies the number of times the remaining
elements of the group occur.Thanks and Regards
- Darshan
Oops, accidentally hit that post button 
Here’s the full post:
I’m not sure I follow, but I think you’re confusing elements of a
sequence with the XML elements use to define the template of a sequence.
As I read your intentions, sequence is exactly what you need. The
"associated length field" indicates, dynamically, how many “sequence
elements” that follow. Each element in the sequence is defined by the
instructions within the .
Given the following instruction
Let’s assume you have a sequence with length 3: {{1, 2} {3, 4} {5, 6}}
Then it would be encoded as
0x84 // Sequence length: 3, incremented since it’s nullable, sbit
0x81 // Examples [0].x = 1, sbit
0x82 // Examples [0].y = 2, sbit
0x83 // Examples [1].x = 3, sbit
0x84 // Examples [1].y = 4, sbit
0x85 // Examples [2].x = 5, sbit
0x86 // Examples [2].y = 5, sbit
The group construct is suitable when you’ve exactly zero or one occurences of a group.
/David
<
[ original email was from Darshan Khedekar - darshan.khedekar.ext@deutsche-boerse.com ]
Got it.
Thanks David. I was indeed confusing in the 2 names.
But would suggest you to include this very example in the FAST specs so to make the concepts clear.
Thanks again
- Darshan
Oops, accidentally hit that post button
Here’s the full post:
I’m not sure I follow, but I think you’re confusing elements of a
sequence with the XML elements use to define the template of a sequence.
As I read your intentions, sequence is exactly what you need. The
“associated length field” indicates, dynamically, how many “sequence
elements” that follow. Each element in the sequence is defined by the
instructions within the .Given the following instruction
Let’s assume you have a sequence with length 3: {{1, 2} {3, 4} {5, 6}}
Then it would be encoded as
0x84 // Sequence length: 3, incremented since it’s nullable, sbit 0x81
// Examples [0].x = 1, sbit 0x82 // Examples [0].y = 2, sbit 0x83 //
Examples [1].x = 3, sbit 0x84 // Examples [1].y = 4, sbit 0x85 //
Examples [2].x = 5, sbit 0x86 // Examples [2].y = 5, sbitThe group construct is suitable when you’ve exactly zero or one
occurences of a group./David
<