fix-orchestra
fix-orchestra copied to clipboard
[repository schema] Byte ordering of mapped data type
The proposal is to add ability to define the byte order (endianness) as discussed in https://github.com/FIXTradingCommunity/fix-orchestra/discussions/197.
Issue
Binary protocols may choose either big-endian or little-endian byte order for specific reasons. It's important for message protocols to clearly state its byte order in an Orchestra file. In FIX SBE, for instance, the byte order is globally specified in a message schema.
Proposal
Since datatypes are closely related to the encoding protocol, we recommend adding optional byteOrder attribute to the mappedDatatype element. Valid values should be bigEndian and littleEndian. The absence of the attribute would mean byte order is unspecified (e.g. for character types).
Example
<datatypes>
<datatype name="int16">
<mappedDatatype standard="ISO11404" base="integer" byteOrder="bigEndian" ... />
</datatype>
<datatype name="price">
<mappedDatatype standard="ISO11404" base="scaled" byteOrder="bigEndian" ... />
</datatype>
...
</datatypes>