-
Notifications
You must be signed in to change notification settings - Fork 4
DML Message Structure
Joshua Scott edited this page Oct 5, 2018
·
3 revisions
When a DML message is being transferred inside a KINP message as application data, there is a header structure to tell the recipient which Service ID and Message Type should be used to find the message template for deserializing the message into a Record.
| Name | Type | Description |
|---|---|---|
| serviceId | uint8_t | Determines which message module/service the message template is from. |
| messageType | uint8_t | Determines which message template from the module was used to construct the data preceding this header. |
| length | uint16_t | The length of the entire message (including this header). |
A binary serialization of a DML record that follows the same structure as the message template then follows.
Given the message template:
<MSG_CHAT>
<RECORD>
<Name TYPE="STR"></Name>
<Message TYPE="STR"></Message>
</RECORD>
</MSG_CHAT>With the ServiceID 0x0A, and the MessageType 0x21, a binary representation may look like this:
0A 21 15 00 08 00 4A 6F 73 68 73 6F 72 61 05 00 48 65 6C 6C 6F
With the values:
serviceId: 10 (0A)
messageType: 33 (21)
length: 21 (15 00)
Name: "Joshsora" (08 00 4A 6F 73 68 73 6F 72 61)
Message: "Hello" (05 00 48 65 6C 6C 6F)
- Introduction
- Data Markup Language (DML)
- Property Class System
- Work in Progress
- KingsIsle Networking Protocol (KINP)
- Sessions
- Message Framing
- Message Structure
- Control Messages
- DML Messages