Page tree
Skip to end of metadata
Go to start of metadata

General packet structure


Header
1 Byte

[Size01]
1 Byte


[Fields]
0-10 Bytes


[Payload]
0-65536 Bytes

[Size10]
2 Bytes

Elements in brackets are optional. The header specifies which of them are enabled or not. The only way to have a packet without everything except of the header is the null header: 0x00.

Fields and payload

A packet consists of the following unsigned fields. An additional header of one byte is sent in front of each packet which is calculated out of those fields.

SizeNameFunction
1CommandCommand to send to server
1Sessionwhen the client receives a reply it can identify the matching request by the session
2Base Address
1Sub Address
4

ID


1Helper
0-65536Payloadbig data

Header Byte

A set bit will indicate that the corresponding field of the packet is sent and therefore must be read. If the value of a field is 0, than a field shouldn't be sent.

Bit positionField exists
1.......Command
.1......Session
..00....No payload
..01....Payload up to 256 bytes
..10....Payload up to 65536 bytes
..11....Out-of-band (fill packets without payload)
....1...Base address
.....1..Sub address
......1.Id
.......1Helper
  • No labels