File: example-data.xml

package info (click to toggle)
openhft-chronicle-wire 1.1.13-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,316 kB
  • sloc: java: 15,687; xml: 3,085; makefile: 2
file content (49 lines) | stat: -rw-r--r-- 1,967 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<sbe:messageSchema xmlns:sbe="http://www.fixprotocol.org/ns/simple/1.0"
                   package="baseline"
                   id="1"
                   version="0"
                   semanticVersion="5.2"
                   description="Code generation unit test support"
                   byteOrder="littleEndian">

    <types>
        <composite name="messageHeader" description="Message identifiers and length of message root">
            <type name="blockLength" primitiveType="uint16"/>
            <type name="templateId" primitiveType="uint16"/>
            <type name="schemaId" primitiveType="uint16"/>
            <type name="version" primitiveType="uint16"/>
        </composite>
        <composite name="varDataEncoding">
            <type name="length" primitiveType="uint8"/>
            <type name="varData" primitiveType="uint8" length="0" characterEncoding="UTF-8"/>
        </composite>
        <enum name="BooleanType" encodingType="uint8">
            <validValue name="FALSE">0</validValue>
            <validValue name="TRUE">1</validValue>
        </enum>
        <enum name="Side" encodingType="uint8">
            <validValue name="Buy">0</validValue>
            <validValue name="Sell">1</validValue>
        </enum>
    </types>

    <!--
    public class Data implements Marshallable {
    int smallInt = 0;
    long longInt = 0;
    double price = 0;
    boolean flag = false;
    StringBuilder text = new StringBuilder();
    Side side;
    -->

    <sbe:message name="Data" id="1" description="Description of Data">
        <field name="smallInt" id="1" type="int32"/>
        <field name="longInt" id="2" type="int64"/>
        <field name="price" id="3" type="double"/>
        <field name="flag" id="4" type="BooleanType"/>
        <field name="text" id="5" type="varDataEncoding"/>
        <field name="side" id="6" type="Side"/>
    </sbe:message>
</sbe:messageSchema>