<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<sbe:messageSchema xmlns:sbe="http://www.fixprotocol.org/ns/simple/RC3"
                   package="mfframing"
                   id="0"
                   version="0"
                   description="Schema for framing of application packets and messages.
                                The protocol is designed to run over various transports (TCP, UDP unicast, shared memory, and UDP multicast)."
                   byteOrder="littleEndian">
    <!-- SBE defined types -->
    <types>
        <composite name="messageHeader" description="The SBE header that is part of each message.">
            <type name="blockLength" primitiveType="uint16" description="The length of the message root block before repeating groups or variable data commences."/>
            <type name="templateId"  primitiveType="uint16" description="The identifier for the template type of the message that is to follow."/>
            <type name="schemaId"    primitiveType="uint16" description="The identifier for the schema that defines the message."/>
            <type name="version"     primitiveType="uint16" description="The version of the schema allowing for extension."/>
        </composite>
    </types>
    <!-- Primitive types -->
    <types>
        <type name="SeqNum"       description="Sequence number for detecting missed messages." primitiveType="uint32" semanticType="SeqNum"/>
        <type name="Timestamp"    description="Number of nanoseconds since epoch" primitiveType="uint64"/>
    </types>
    <!-- Price and Qty types -->
    <sbe:message name="PacketHeader"
                 id="0"
                 description="Non-official sbe message.  This is just used for the layout of the packet framing header.">
        <field name="PacketLength" id="20000" type="uint16" description="Length of the packet.  Should always be small enough so the packet fits in a MTU."/>
        <field name="PacketSeqNum" id="20001" type="uint32" description="The sequence number of the packet, used to detect out of order/dropped packets in UDP based protocols."/>
        <field name="SendingTime" id="52" type="Timestamp" description="The timestamp that this packet was sent to the receiver." semanticType="SendingTime"/>
    </sbe:message>
    <sbe:message name="MessageLength"
                 id="1"
                 description="Non-official sbe message.  This comes before each message to indicate the length of the message.  This should
                              be used to iterate to each additional message in order to support the use case of the sender sending
                              a newer version of the message (which has additional fields) but the decoder still being able to processes
                              without having to change any code.">
        <field name="MessageLength" id="20002" type="uint16" description="Length of the packet.  Should always be small enough so the packet fits in a MTU."/>
    </sbe:message>
</sbe:messageSchema>
