Skip to content

Commit cebad1a

Browse files
authored
Merge pull request #49 from donmendelson/v2-0-issue48
V2 0 issue48
2 parents 0e86429 + d3c2391 commit cebad1a

File tree

1 file changed

+26
-23
lines changed

1 file changed

+26
-23
lines changed

v2-0-RC1/doc/02FieldEncoding.md

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,8 @@ used to indicate that a field value is null.
336336

337337
### Encoding specifications for decimal types
338338

339-
Decimal encodings are composite types, consisting of two subfields,
340-
mantissa and exponent. The exponent may either be serialized on the wire
339+
Decimal encodings are composite types, consisting of two members, named
340+
mantissa and exponent. They must be listed in that order in the composite type. The exponent may either be serialized on the wire
341341
or may be set to constant. A constant exponent is a way to specify an
342342
assumed number of decimal places.
343343

@@ -569,11 +569,11 @@ A character array constant specification
569569

570570
Variable-length string encoding is used for variable length ASCII
571571
strings or embedded non-ASCII character data (like EncodedText field). A
572-
separate length field coveys the size of the field.
572+
length member conveys the size of the string that follows.
573573

574574
On the wire, length immediately precedes the data.
575575

576-
The length subfield may not be null, but may be set to zero for an empty
576+
The length member may not be null, but may be set to zero for an empty
577577
string. In that case, no space is reserved for the data. No distinction
578578
is made at an encoding layer between an empty string and a null string.
579579
Semantics of an empty variable-length string should be specified at an
@@ -606,8 +606,8 @@ If a field is required, both the Length and data fields must be set to a
606606
### Encoding specifications for variable-length string
607607

608608
Variable length string is encoded as a composite type, consisting of a
609-
length sub field and data subfield. The length attribute of the varData
610-
element is set to zero in the XML message schema as special value to
609+
length member and varData member. In the composite specification, they must be listed with those names and in that order. The length attribute of the varData
610+
member is set to zero in the XML message schema as special value to
611611
indicate that the character data is of variable length.
612612

613613
To map an SBE data field specification to traditional FIX, the field ID
@@ -619,7 +619,7 @@ Encoding specification for variable length data up to 65535 octets
619619
```xml
620620
<composite name="varString" description="Variable-length string">
621621
<type name="length" primitiveType="uint16"/>
622-
<type name="data" length="0" primitiveType="uint8"
622+
<type name="varData" length="0" primitiveType="uint8"
623623
characterEncoding="UTF-16"/>
624624
</composite>
625625

@@ -689,18 +689,18 @@ A fixed-length data encoding specification for a binary user ID
689689
### Variable-length data encoding
690690

691691
Variable-length data is used for variable length non-character data
692-
(such as RawData). A separate length field conveys the size of the field.
692+
(such as RawData). A length member conveys the size of the data that follows.
693693
On the wire, length immediately precedes the data.
694694

695-
The length subfield may not be null, but it may be set to zero. In that
695+
The length member may not be null, but it may be set to zero. In that
696696
case, no space is reserved for the data. Semantics of an empty
697697
variable-length data element should be specified at an application
698698
layer.
699699

700700
| FIX data type | Description | Backing primitives | Length (octets) |
701701
|---------------|---------------------------------------|----------------------------------------------------------------------------------------------------------------------------|-----------------|
702702
| Length | The length of variable data in octets | primitiveType="uint8" or "uint16" May not hold null value. | 1 or 2 |
703-
| data | Raw data | Array of octet of size specified in associated Length field. The data field itself should be specified as variable length. primitiveType="uint8" | variable
703+
| data | Raw data | Array of octet of size specified in associated Length member. The varData member should be specified as variable length. primitiveType="uint8" | variable
704704

705705
Optionally, implementations may support any other unsigned integer types
706706
for length.
@@ -723,7 +723,7 @@ If a field is required, both the Length and data fields must be set to a
723723
### Encoding specifications for variable-length data
724724

725725
Variable length data is encoded as composite type, consisting of a
726-
length sub field and data subfield.
726+
length member and varData member. They must be listed with those names and in that order in the composite specification.
727727

728728
To map an SBE data field specification to traditional FIX, the field ID
729729
of a data field is used. Its associated length is implicitly contained
@@ -734,7 +734,7 @@ Encoding specification for variable length data up to 65535 octets
734734
```xml
735735
<composite name="DATA" description="Variable-length data">
736736
<type name="length" primitiveType="uint16"/>
737-
<type name="data" length="0" primitiveType="uint8"/>
737+
<type name="varData" length="0" primitiveType="uint8"/>
738738
</composite>
739739

740740
<data name="RawData" id="96" type="DATA"/>
@@ -754,7 +754,7 @@ M S F T
754754
MonthYear encoding
755755
---------------------------------------------------------------------------------------------------------------------------------------------------------------
756756

757-
MonthYear encoding contains four subfields representing respectively
757+
MonthYear encoding contains four members representing respectively
758758
year, month, and optionally day or week. A field of this type is not
759759
constrained to one date format. One message may contain only year and
760760
month while another contains year, month and day in the same field, for
@@ -765,7 +765,7 @@ always be populated for a non-null field. Day and week are set to
765765
special value indicating null if not present. If Year is set to the null
766766
value, then the entire field is considered null.
767767

768-
| Subfield | Primitive type | Length (octets) | Null value |
768+
| Member | Primitive type | Length (octets) | Null value |
769769
|----------------------------------|----------------|----------------:|-----------:|
770770
| Year | uint16 | 2 | 65535 |
771771
| Month (1-12) | uint8 | 1 ||
@@ -775,14 +775,14 @@ value, then the entire field is considered null.
775775

776776
### Composite encoding padding
777777

778-
The four subfields of MonthYear are packed at an octet level by default.
778+
The four members of MonthYear are packed at an octet level by default.
779779
However, byte alignment may be controlled by specifying offset of the
780780
elements within the composite encoding. See section 4.4.4.3 below.
781781

782782
### Encoding specifications for MonthYear
783783

784784
MonthYear data type is based on a composite encoding that carries its
785-
required and optional elements.
785+
required and optional elements. The members must listed with the names and in the order shown.
786786

787787
The standard encoding specification for MonthYear
788788

@@ -857,6 +857,7 @@ Enumeration of time units:
857857
<validValue name="nanosecond">9</validValue>
858858
</enum>
859859
```
860+
Composite type members must listed with the names and in the order shown.
860861

861862
Timestamp with variable time units:
862863

@@ -982,17 +983,19 @@ indicator as defined in ISO 8601:2004.
982983

983984
### Composite encoding padding
984985

985-
The subfields of TZTimestamp are packed at an octet level by default.
986+
The members of TZTimestamp are packed at an octet level by default.
986987
However, byte alignment may be controlled by specifying offset of the
987988
elements within the composite encoding. See section 4.4.4.3 below.
988989

990+
The members must listed with the names and in the order shown.
991+
989992
Standard TZTimestamp encoding specification
990993

991994
```xml
992995
<composite name="tzTimestamp">
993996
<type name="time" primitiveType="uint64" />
994997
<type name="unit" primitiveType="uint8" />
995-
<!-- Sign of timezone offset is on hour subfield -->
998+
<!-- Sign of timezone offset is on the hour member -->
996999
<type name="timezoneHour" primitiveType="int8" minValue="-12" maxValue="14" />
9971000
<type name="timezoneMinute" primitiveType="uint8" maxValue="59" />
9981001
</composite>
@@ -1010,7 +1013,7 @@ indicator as defined in ISO 8601:2004.
10101013

10111014
The time zone hour offset tells the number of hours different to UTC
10121015
time. The time zone minute tells the number of minutes different to UTC.
1013-
The sign telling ahead or behind UTC is on the hour subfield.
1016+
The sign telling ahead or behind UTC is on the hour member.
10141017

10151018
| FIX data type | Description | Backing primitives | Length (octets) | Schema attributes |
10161019
|---------------|------------------------------------------------------------|--------------------|----------------:|-------------------|
@@ -1021,7 +1024,7 @@ The sign telling ahead or behind UTC is on the hour subfield.
10211024

10221025
### Composite encoding padding
10231026

1024-
The subfields of TZTimeOnly are packed at an octet level by default.
1027+
The members of TZTimeOnly are packed at an octet level by default.
10251028
However, byte alignment may be controlled by specifying offset of the
10261029
elements within the composite encoding. See section 4.4.4.3 below.
10271030

@@ -1031,7 +1034,7 @@ Standard TZTimeOnly encoding specification
10311034
<composite name="tzTimeOnly">
10321035
<type name="time" primitiveType="uint64" />
10331036
<type name="unit" primitiveType="uint8" />
1034-
<!-- Sign of timezone offset is on hour subfield -->
1037+
<!-- Sign of timezone offset is on the hour member -->
10351038
<type name="timezoneHour" primitiveType="int8"
10361039
minValue="-12" maxValue="14" />
10371040
<type name="timezoneMinute" primitiveType="uint8" minValue="0"
@@ -1294,7 +1297,7 @@ session protocol.
12941297
| Field value greater than maxValue | The encoded value exceeds the specified valid range. |
12951298
| Null value set for required field | The null value of a data type is invalid for a required field. |
12961299
| String contains invalid characters | A String contains non-US-ASCII printable characters or other invalid sequence if a different characterEncoding is specified. |
1297-
| Required subfields not populated in MonthYear | Year and month must be populated with non-null values, and the month must be in the range 1-12. |
1300+
| Required members not populated in MonthYear | Year and month must be populated with non-null values, and the month must be in the range 1-12. |
12981301
| UTCTimeOnly exceeds day range | The value must not exceed the number of time units in a day, e.g. greater than 86400 seconds. |
1299-
| TZTimestamp and TZTimeOnly has missing or invalid time zone | The time zone hour and minute offset subfields must correspond to an actual time zone recognized by international standards. |
1302+
| TZTimestamp and TZTimeOnly has missing or invalid time zone | The time zone hour and minute offset members must correspond to an actual time zone recognized by international standards. |
13001303
| Value must match valid value of an enumeration field | A value is invalid if it does not match one of the explicitly listed valid values. |

0 commit comments

Comments
 (0)