|
| 1 | +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
| 2 | +<sbe:messageSchema xmlns:sbe="http://fixprotocol.io/2016/sbe" |
| 3 | + package="code.generation.test.version" |
| 4 | + id="6" |
| 5 | + version="1" |
| 6 | + semanticVersion="5.2" |
| 7 | + description="Example schema" |
| 8 | + byteOrder="littleEndian"> |
| 9 | + <types> |
| 10 | + <composite name="BoosterT"> |
| 11 | + <enum name="BoostType" encodingType="char"> |
| 12 | + <validValue name="TURBO">T</validValue> |
| 13 | + <validValue name="SUPERCHARGER">S</validValue> |
| 14 | + <validValue name="NITROUS">N</validValue> |
| 15 | + <validValue name="KERS">K</validValue> |
| 16 | + </enum> |
| 17 | + <type name="horsePower" primitiveType="uint8"/> |
| 18 | + </composite> |
| 19 | + <composite name="messageHeader" description="Message identifiers and length of message root"> |
| 20 | + <type name="blockLength" primitiveType="uint16"/> |
| 21 | + <type name="templateId" primitiveType="uint16"/> |
| 22 | + <type name="schemaId" primitiveType="uint16"/> |
| 23 | + <type name="version" primitiveType="uint16"/> |
| 24 | + </composite> |
| 25 | + <composite name="groupSizeEncoding" description="Repeating group dimensions"> |
| 26 | + <type name="blockLength" primitiveType="uint16"/> |
| 27 | + <type name="numInGroup" primitiveType="uint16"/> |
| 28 | + </composite> |
| 29 | + <composite name="varStringEncoding"> |
| 30 | + <type name="length" primitiveType="uint16"/> |
| 31 | + <type name="varData" primitiveType="uint8" length="0" characterEncoding="UTF-8"/> |
| 32 | + </composite> |
| 33 | + <composite name="varAsciiStringEncoding"> |
| 34 | + <type name="length" primitiveType="uint32" maxValue="1073741824"/> |
| 35 | + <type name="varData" primitiveType="uint8" length="0" characterEncoding="ASCII"/> |
| 36 | + </composite> |
| 37 | + </types> |
| 38 | + <types> |
| 39 | + <type name="ModelYear" primitiveType="uint16"/> |
| 40 | + <type name="VehicleCode" primitiveType="char" length="6" characterEncoding="ASCII"/> |
| 41 | + <type name="someNumbers" primitiveType="int32" length="5"/> |
| 42 | + <type name="Ron" primitiveType="uint8" minValue="90" maxValue="110"/> |
| 43 | + <composite name="Engine"> |
| 44 | + <type name="capacity" primitiveType="uint16"/> |
| 45 | + <type name="numCylinders" primitiveType="uint8"/> |
| 46 | + <type name="maxRpm" primitiveType="uint16" presence="constant">9000</type> |
| 47 | + <type name="manufacturerCode" primitiveType="char" length="3"/> |
| 48 | + <type name="fuel" primitiveType="char" presence="constant">Petrol</type> |
| 49 | + <ref name="booster" type="BoosterT"/> |
| 50 | + </composite> |
| 51 | + <enum name="BooleanType" encodingType="uint8"> |
| 52 | + <validValue name="F">0</validValue> |
| 53 | + <validValue name="T">1</validValue> |
| 54 | + </enum> |
| 55 | + <enum name="Model" encodingType="char"> |
| 56 | + <validValue name="A">A</validValue> |
| 57 | + <validValue name="B">B</validValue> |
| 58 | + <validValue name="C">C</validValue> |
| 59 | + </enum> |
| 60 | + <set name="OptionalExtras" encodingType="uint8"> |
| 61 | + <choice name="sunRoof">0</choice> |
| 62 | + <choice name="sportsPack">1</choice> |
| 63 | + <choice name="cruiseControl">2</choice> |
| 64 | + </set> |
| 65 | + </types> |
| 66 | + <sbe:message name="Car" id="1" description="Description of a basic Car"> |
| 67 | + <field name="serialNumber" id="1" type="uint64" sinceVersion="1"/> |
| 68 | + <field name="modelYear" id="2" type="ModelYear" sinceVersion="1"/> |
| 69 | + <field name="available" id="3" type="BooleanType" sinceVersion="1"/> |
| 70 | + <field name="code" id="4" type="Model" sinceVersion="1"/> |
| 71 | + <field name="someNumbers" id="5" type="someNumbers" sinceVersion="1"/> |
| 72 | + <field name="vehicleCode" id="6" type="VehicleCode" sinceVersion="1"/> |
| 73 | + <field name="extras" id="7" type="OptionalExtras" sinceVersion="1"/> |
| 74 | + <field name="discountedModel" id="8" type="Model" presence="constant" valueRef="Model.C" sinceVersion="1"/> |
| 75 | + <field name="engine" id="9" type="Engine" sinceVersion="1"/> |
| 76 | + <group name="fuelFigures" id="10" dimensionType="groupSizeEncoding" sinceVersion="1"> |
| 77 | + <field name="speed" id="11" type="uint16" sinceVersion="1"/> |
| 78 | + <field name="mpg" id="12" type="float" sinceVersion="1"/> |
| 79 | + <data name="usageDescription" id="200" type="varStringEncoding" sinceVersion="1"/> |
| 80 | + </group> |
| 81 | + <group name="performanceFigures" id="13" dimensionType="groupSizeEncoding" sinceVersion="1"> |
| 82 | + <field name="octaneRating" id="14" type="Ron" sinceVersion="1"/> |
| 83 | + <group name="acceleration" id="15" dimensionType="groupSizeEncoding" sinceVersion="1"> |
| 84 | + <field name="mph" id="16" type="uint16" sinceVersion="1"/> |
| 85 | + <field name="seconds" id="17" type="float" sinceVersion="1"/> |
| 86 | + </group> |
| 87 | + </group> |
| 88 | + <data name="manufacturer" id="18" type="varStringEncoding" sinceVersion="1"/> |
| 89 | + <data name="model" id="19" type="varStringEncoding" sinceVersion="1"/> |
| 90 | + <data name="activationCode" id="20" type="varStringEncoding" sinceVersion="1"/> |
| 91 | + <data name="color" id="21" type="varAsciiStringEncoding" sinceVersion="1"/> |
| 92 | + </sbe:message> |
| 93 | +</sbe:messageSchema> |
0 commit comments