You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: v1-0-RC4/doc/04MessageSchema.md
+39-8Lines changed: 39 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ their encodings.
58
58
| id | Unique identifier of a schema | unsignedInt || Should be unique between counterparties |
59
59
| version | Version of this schema | nonnegativeInteger || Initial version is zero and is incremented for each version |
60
60
| semanticVersion | Version of FIX semantics | string | optional | FIX versions, such as “FIX.5.0\_SP2” |
61
-
| byteOrder | Byte order of encoding | token | default = littleEndian | littleEndian bigEndian |
61
+
| byteOrder | Byte order of encoding | token | default = littleEndian | littleEndian bigEndian |
62
62
| description | Documentation of the schema | string | optional ||
63
63
| headerType | Name of the encoding type of the message header, which is the same for all messages in a schema. | string | default= messageHeader | An encoding with this name must be contained by \<types\>. |
64
64
@@ -145,8 +145,7 @@ The element value represents a constant if attribute
145
145
| maxValue | Highest acceptable value | string |||
146
146
| length | Number of elements of the primitive data type | nonnegativeInteger | default = 1 | Value “0” represents variable length. |
147
147
| offset | If a member of a composite type, tells the offset from the beginning of the composite. By default, the offset is the sum of preceding element sizes, but it may be increased to effect byte alignment. | unsignedInt | optional | See section 4.4.4.3 below |
148
-
| primitiveType | The primitive data type that backs the encoding | token | required | char int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double
149
-
|
148
+
| primitiveType | The primitive data type that backs the encoding | token | required | char int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double |
150
149
| semanticType | Represents a FIX data type | token | optional | Same as field semanticType – see below. |
151
150
| sinceVersion | Documents the version of a schema in which a type was added | nonnegativeInteger | default = 0 | Must be less than or equal to the version of the message schema. |
152
151
| deprecated | Documents the version of a schema in which a type was deprecated. It should no longer be used in new messages. | nonnegativeInteger | optional | Must be less than or equal to the version of the message schema. |
@@ -208,7 +207,7 @@ constant exponent, which is not sent on the wire.
208
207
209
208
If a message designer wishes to control byte boundary alignment or map
210
209
to an existing data structure, element offset may optionally be
211
-
specified on simple types within a composite type. Offset is the number
210
+
specified on a simple type, enum or bitset within a composite type. Offset is the number
212
211
of octets from the start of the composite; it is a zero-based index.
213
212
214
213
If specified, offset must be greater than or equal to the sum of the
@@ -221,6 +220,37 @@ For a composite type, nullness is indicated by the value of its first
221
220
element. For example, if a price field is optional, a null value in its
222
221
mantissa element indicates that the price is null.
223
222
223
+
### Reference to reusable types
224
+
225
+
A composite type often has its elements defined in-line within the `<composite>` XML element as shown in the example above. Alternatively, a common type may be defined once on its own, and then referred to by name with the composite type using a `<ref>` element.
226
+
227
+
#### `<ref>` attributes
228
+
229
+
|\<ref\> attribute | Description | XML type | Usage | Valid values |
| name | Usage of the type in this composite | symbolicName\_t | required ||
232
+
| type | Name of referenced encoding | symbolicName\_t | required | Must match a defined type, enum or set name attribute. |
233
+
| sinceVersion | Documents the version of a schema in which a type was added | nonnegativeInteger | default = 0 | Must be less than or equal to the version of the message schema. |
234
+
| deprecated | Documents the version of a schema in which a type was deprecated. It should no longer be used in new messages. | nonnegativeInteger | optional | Must be less than or equal to the version of the message schema. |
235
+
236
+
#### Type reference example
237
+
238
+
In this example, a futuresPrice is encoded as 64 bit integer mantissa, 8 bit exponent, and a reused enum type. Note that a
239
+
reference may carry an offset within the composite encoding that contains it.
| name | Name of encoding | symbolicName\_t | required | Must be unique among all encoding types. |
240
270
| description | Documentation of the type | string | optional ||
241
-
| encodingType | Name of a simple encoding type | symbolicName\_t | required | Must match the name attribute of a scalar \<type\> element *or* a primitive type: char uint8 uint16 uint32 uint64
242
-
| sinceVersion | Documents the version of a schema in which a type was added | nonnegativeInteger | default = 0 | Must be less than or equal to the version of the message schema. |
271
+
| encodingType | Name of a simple encoding type | symbolicName\_t | required | Must match the name attribute of a scalar \<type\> element *or* a primitive type: char uint8 uint16 uint32 uint64 |
272
+
| sinceVersion | Documents the version of a schema in which a type was added | nonnegativeInteger | default = 0 | Must be less than or equal to the version of the message schema. |
243
273
| deprecated | Documents the version of a schema in which a type was deprecated. It should no longer be used in new messages. | nonnegativeInteger | optional | Must be less than or equal to the version of the message schema. |
244
-
274
+
| offset | If a member of a composite type, tells the offset from the beginning of the composite. By default, the offset is the sum of preceding element sizes, but it may be increased to effect byte alignment. | unsignedInt | optional |
245
275
246
276
#### `<validValue>` element attributes
247
277
@@ -300,6 +330,7 @@ The encoding of a bitset should be an unsigned integer type.
300
330
| encodingType | Name of a simple encoding type | string | required | Must match the name attribute of a scalar \<type\> element *or* a primitive type: uint8 uint16 uint32 uint64 |
301
331
| sinceVersion | Documents the version of a schema in which a type was added | nonnegativeInteger | default = 0 | Must be less than or equal to the version of the message schema. |
302
332
| deprecated | Documents the version of a schema in which a type was deprecated. It should no longer be used in new messages. | nonnegativeInteger | optional | Must be less than or equal to the version of the message schema.
333
+
| offset | If a member of a composite type, tells the offset from the beginning of the composite. By default, the offset is the sum of preceding element sizes, but it may be increased to effect byte alignment. | unsignedInt | optional |
0 commit comments