Clarification on "sequence" element

Imported from previous forum

A little clarification is needed for the “sequence” field.

As we know the “sequence” field is used for repeating groups of data. In the stream a sequence is present when the “length field” exists. Each element in the repeating group is represented as a “segment” (Section 6.2.5 - Sequence)

Now according to Section 10 (Transfer Encoding), a “segment” contains a PMAP and an optional Template Identifier. Does that rule apply to segments in a “sequence” field? If so, this means that the PMAP must always have its 1st slot refer to the Template Identifier. I would think no, but the docs are unclear or I did not understand it completely.

For example, the following is a definition of a repeating group with 3 fields in each repeating element.

What would the PMAP look like if all 3 fields are present?

PMAP: 11110000 (Left most bit is the STOP BIT)
1st slot after the STOP BIT refers to "Symbol"
2nd slot after the STOP BIT refers to "Price"
3rd slot after the STOP BIT refers to “Volume”

or

PMAP: 10111000 (Left most bit is the STOP BIT)
1st slot after the STOP BIT refers to Template Identifer.
2nd slot after the STOP BIT refers to "Symbol"
3nd slot after the STOP BIT refers to "Price"
4rd slot after the STOP BIT refers to “Volume”

First paragraph of 6.2.5:

“A sequence field instruction specifies that the field in the application type is of sequence type and that the contained group of instructions should be used repeatedly to encode each element. 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.”

This means that an element is only represented by a segment if any instruction needs to allocate a bit in a pmap.

For example

The instruction in the Simple sequence does not require a bit in the pmap, hence no pmap will appear at the start of each element.

Assuming the sequence {1, 2, 2, 3}, the layout in the stream would be

4 1 2 2 3
LEN INT INT INT INT

on the other hand, the instruction contained in

requires a bit in the pmap, hence each element will start with a pmap. The same input would be laid out as

4 1 1 1 2 0 1 3
LEN PMAP INT PMAP INT PMAP PMAP INT

About segments: Section 10 says

“A segment has a header consisting of a Presence Map followed by an optional Template Identifier. The segment has a template identifier either if it is a message segment, or if the segment appears as the result of a dynamic template reference instruction.”

The segments that results from a sequence are neither “message segments” nor the result of dynamic template reference instructions, hence no slot will be allocated by a TID in a pmap for a sequence element.

/David

A little clarification is needed for the “sequence” field.

As we know the “sequence” field is used for repeating groups of data. In
the stream a sequence is present when the “length field” exists. Each
element in the repeating group is represented as a “segment” (Section
6.2.5 - Sequence)

Now according to Section 10 (Transfer Encoding), a “segment” contains a
PMAP and an optional Template Identifier. Does that rule apply to
segments in a “sequence” field? If so, this means that the PMAP must
always have its 1st slot refer to the Template Identifier. I would think
no, but the docs are unclear or I did not understand it completely.

For example, the following is a definition of a repeating group with 3
fields in each repeating element.


What would the PMAP look like if all 3 fields are present?

PMAP: 11110000 (Left most bit is the STOP BIT) 1st slot after the STOP
BIT refers to “Symbol” 2nd slot after the STOP BIT refers to “Price” 3rd
slot after the STOP BIT refers to “Volume”

or

PMAP: 10111000 (Left most bit is the STOP BIT) 1st slot after the STOP
BIT refers to Template Identifer. 2nd slot after the STOP BIT refers to
“Symbol” 3nd slot after the STOP BIT refers to “Price” 4rd slot after
the STOP BIT refers to “Volume”