-
Notifications
You must be signed in to change notification settings - Fork 0
Home
mbe24 edited this page Nov 13, 2014
·
14 revisions
- [First draft](First draft)
- [Element and bitbased approach](Element and bitbased approach)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<protocol name="hello">
<complex-types>
<type name="person">
<elements>
<element id="first-name" type="string">
<length preceding-length-field="8"/>
</element>
<element id="last-name" type="string">
<length preceding-length-field="8"/>
</element>
<element id="gender" type="string">
<length>
<bit>8</bit>
</length>
</element>
</elements>
</type>
</complex-types>
<header>
<configuration>
<total-length-id>total-length</total-length-id>
<version-id>version</version-id>
</configuration>
<elements>
<element type="byte">
<value hex="DEADBEEF"/>
</element>
<element id="version" type="integer">
<length>
<bit>8</bit>
</length>
</element>
<element id="total-length" type="integer">
<length>
<bit>8</bit>
</length>
</element>
<element id="unit-id" type="byte">
<length>
<bit>8</bit>
</length>
</element>
</elements>
</header>
<units total-length-id="total-length" unique-key-id="unit-id">
<unit name="hello-request">
<unique-key-value>
<value hex="00"/>
</unique-key-value>
<body>
<elements>
<element classification="person">
<length/>
</element>
</elements>
</body>
</unit>
<unit name="hello-response">
<unique-key-value>
<value hex="01"/>
</unique-key-value>
<body>
<elements>
<element classification="person">
<length preceding-length-field="8"/>
</element>
<element classification="ieee754-double" id="average-age" type="double">
<length/>
</element>
</elements>
</body>
</unit>
</units>
</protocol>XML formatted with http://www.freeformatter.com/xml-formatter.html