Skip to content

Commit c8a3afb

Browse files
committed
Update 03MessageStructure.md
Limiting occurrences of repeating group #6
1 parent 29458c9 commit c8a3afb

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

v1-0-RC4/doc/03MessageStructure.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ value does not include the group dimensions itself.
301301

302302
Each group is associated with a required counter field of semantic data
303303
type NumInGroup to tell how many entries are contained by a message. The
304-
value of the counter is a non-negative integer. See section 3.4.8 below
304+
value of the counter is a non-negative integer. See "Encoding of repeating group dimensions" section below
305305
for encoding of that counter.
306306

307307
### Empty group
@@ -385,11 +385,15 @@ Implementations should support uint8 and uint16 types for repeating
385385
group entry counts. Optionally, implementations may support any other
386386
unsigned integer types.
387387

388+
By default, the minimum number of entries is zero, and the maximum number is the largest value of the primitiveType of the counter.
389+
388390
| Primitive type | Description | Length (octets) | Maximum number of entries |
389391
|----------------|-------------------------|----------------:|--------------------------:|
390392
| uint8 | 8-bit unsigned integer | 1 | 255 |
391393
| uint16 | 16-bit unsigned integer | 2 | 65535 |
392394

395+
The number of entries may be restricted to a specific range; see "Restricting repeating group entries" below.
396+
393397
#### Encoding of repeating group dimensions
394398

395399
Conventionally in FIX, a NumInGroup field conveys the number of entries
@@ -416,6 +420,19 @@ Wire format of NumInGroup with block length 55 octets by 3 entries
416420

417421
`37000300`
418422

423+
#### Restricting repeating group entries
424+
425+
The occurrences of a repeating group may be restricted to a specific range by modifying the numInGroup member of the group dimension encoding. The minValue attribute controls the minimum number of entries, overriding the default of zero, and the maxValue attribute restricts the maximum entry count to something less than the maximum corresponding to its primitiveType. Either or both attributes may be specified.
426+
427+
Example of a restricted group encoding
428+
429+
```xml
430+
<composite name="restrictedGroupSizeEncoding">
431+
<type name="blockLength" primitiveType="uint16"/>
432+
<type name="numInGroup" primitiveType="uint16" semanticType="NumInGroup" minValue="1" maxValue="10" />
433+
</composite>
434+
```
435+
419436
Sequence of message body elements
420437
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
421438

@@ -459,4 +476,4 @@ to the session protocol.
459476
| Wrong message size in header | A message size value smaller than the actual message may cause a message to be truncated. |
460477
| Wrong or unknown template ID in header | A mismatch of message schema would likely render a message unintelligible or cause fields to be misinterpreted. |
461478
| Fixed-length field after repeating group or variable-length field | All fixed-length fields in the root of a message or in a repeating group entry must be listed before any (nested) repeating group or variable-length field. |
462-
| Repeating group after variable-length field | All repeating groups at the root level or in a nested repeating group must be listed before any variable length field at the same level. |
479+
| Repeating group after variable-length field | All repeating groups at the root level or in a nested repeating group must be listed before any variable length field at the same level. |

0 commit comments

Comments
 (0)