311 lines
7.3 KiB
Plaintext
311 lines
7.3 KiB
Plaintext
|
|
General Message Format
|
|
======================
|
|
|
|
Currently messages can maximally use 22 bytes for data because:
|
|
- maximum buffer size if 24 bytes
|
|
- the internal buffer needs an additional flags byte
|
|
- a message contains a checksum byte
|
|
|
|
|
|
Offset Length Meaning
|
|
---------------------------------------------------------
|
|
0 1 destination address
|
|
1 1 remaining message length
|
|
2 1 command code
|
|
3 1 source address
|
|
---------------------------------------------------------
|
|
4 n payload data (depending on command code)
|
|
---------------------------------------------------------
|
|
4+n 1 CRC8 byte
|
|
|
|
|
|
|
|
PING Message
|
|
============
|
|
|
|
Offset Length Meaning
|
|
---------------------------------------------------------
|
|
0 1 destination address
|
|
1 1 remaining message length
|
|
2 1 command code
|
|
3 1 source address
|
|
|
|
|
|
|
|
PONG Message
|
|
============
|
|
|
|
Offset Length Meaning
|
|
---------------------------------------------------------
|
|
0 1 destination address
|
|
1 1 remaining message length
|
|
2 1 command code
|
|
3 1 source address
|
|
|
|
|
|
|
|
Address Messages
|
|
================
|
|
|
|
This includes HAVE_ADDRESS, CLAIM_ADDRESS and DENY_ADDRESS.
|
|
|
|
Offset Length Meaning
|
|
---------------------------------------------------------
|
|
0 1 destination address
|
|
1 1 remaining message length
|
|
2 1 command code
|
|
3 1 source address
|
|
---------------------------------------------------------
|
|
4 4 UID of the sending node
|
|
8 1 bus address
|
|
|
|
|
|
|
|
RANGE Message
|
|
=============
|
|
|
|
Offset Length Meaning
|
|
---------------------------------------------------------
|
|
0 1 destination address
|
|
1 1 remaining message length
|
|
2 1 command code
|
|
3 1 source address
|
|
---------------------------------------------------------
|
|
4 1 first available address
|
|
5 1 last available address
|
|
|
|
|
|
|
|
FLASH_START Message
|
|
===================
|
|
|
|
Offset Length Meaning
|
|
---------------------------------------------------------
|
|
0 1 destination address
|
|
1 1 remaining message length
|
|
2 1 command code
|
|
3 1 source address
|
|
---------------------------------------------------------
|
|
4 2 message number
|
|
6 2 address
|
|
|
|
|
|
|
|
FLASH_ADDR Message
|
|
==================
|
|
|
|
Offset Length Meaning
|
|
---------------------------------------------------------
|
|
0 1 destination address
|
|
1 1 remaining message length
|
|
2 1 command code
|
|
3 1 source address
|
|
---------------------------------------------------------
|
|
4 2 message number
|
|
6 2 address
|
|
|
|
|
|
|
|
FLASH_DATA Message
|
|
==================
|
|
|
|
Offset Length Meaning
|
|
---------------------------------------------------------
|
|
0 1 destination address
|
|
1 1 remaining message length
|
|
2 1 command code
|
|
3 1 source address
|
|
---------------------------------------------------------
|
|
4 2 message number
|
|
6 n up to 8 words to write at given address
|
|
|
|
|
|
|
|
FLASH_END Message
|
|
=================
|
|
|
|
Offset Length Meaning
|
|
---------------------------------------------------------
|
|
0 1 destination address
|
|
1 1 remaining message length
|
|
2 1 command code
|
|
3 1 source address
|
|
---------------------------------------------------------
|
|
4 2 message number
|
|
|
|
|
|
|
|
Flash_Response Message
|
|
======================
|
|
|
|
Offset Length Meaning
|
|
---------------------------------------------------------
|
|
0 1 destination address
|
|
1 1 remaining message length
|
|
2 1 command code
|
|
3 1 source address
|
|
---------------------------------------------------------
|
|
4 2 message number
|
|
6 1 response code (0 if okay, error code otherwise)
|
|
|
|
|
|
|
|
VALUE2 Message
|
|
==============
|
|
|
|
Offset Length Meaning
|
|
---------------------------------------------------------
|
|
0 1 destination address
|
|
1 1 remaining message length
|
|
2 1 command code
|
|
3 1 source address
|
|
---------------------------------------------------------
|
|
4 4 UID of the sending node
|
|
8 1 value id
|
|
9 1 value type
|
|
10 2 value
|
|
12 2 denom
|
|
|
|
|
|
|
|
DEVICE Message
|
|
==============
|
|
|
|
Offset Length Meaning
|
|
---------------------------------------------------------
|
|
0 1 destination address
|
|
1 1 remaining message length
|
|
2 1 command code
|
|
3 1 source address
|
|
---------------------------------------------------------
|
|
4 4 UID of the sending node
|
|
8 2 firmware type
|
|
10 2 firmware version
|
|
12 2 modules mask
|
|
|
|
|
|
|
|
SENDSTATS Message
|
|
=================
|
|
|
|
Offset Length Meaning
|
|
---------------------------------------------------------
|
|
0 1 destination address
|
|
1 1 remaining message length
|
|
2 1 command code
|
|
3 1 source address
|
|
---------------------------------------------------------
|
|
4 4 UID of the sending node
|
|
8 2 packets out
|
|
10 2 collisions
|
|
12 2 line busy errors
|
|
|
|
|
|
|
|
RECVSTATS Message
|
|
=================
|
|
|
|
Offset Length Meaning
|
|
---------------------------------------------------------
|
|
0 1 destination address
|
|
1 1 remaining message length
|
|
2 1 command code
|
|
3 1 source address
|
|
---------------------------------------------------------
|
|
4 4 UID of the sending node
|
|
8 2 packets in
|
|
10 2 content errors (invalid msg length, CRC errors)
|
|
12 2 io errors
|
|
14 2 no buffer errors
|
|
16 2 handled packets
|
|
18 2 missed packets
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FLASHSTART Message
|
|
==================
|
|
|
|
Offset Length Meaning
|
|
---------------------------------------------------------
|
|
0 1 destination address
|
|
1 1 remaining message length
|
|
2 1 command code
|
|
3 1 source address
|
|
---------------------------------------------------------
|
|
4 4 UID
|
|
8 2 firmware type
|
|
10 2 firmware version
|
|
|
|
|
|
|
|
FLASHREADY Message
|
|
==================
|
|
|
|
Offset Length Meaning
|
|
---------------------------------------------------------
|
|
0 1 destination address
|
|
1 1 remaining message length
|
|
2 1 command code
|
|
3 1 source address
|
|
---------------------------------------------------------
|
|
4 4 UID
|
|
8 2 firmware type
|
|
10 2 firmware version
|
|
12 2 page size in bytes
|
|
|
|
|
|
|
|
FLASHDATA Message
|
|
=================
|
|
|
|
Offset Length Meaning
|
|
---------------------------------------------------------
|
|
0 1 destination address
|
|
1 1 remaining message length
|
|
2 1 command code
|
|
3 1 source address
|
|
---------------------------------------------------------
|
|
4 2 address
|
|
6 n data bytes (max 124 bytes)
|
|
|
|
|
|
|
|
FLASHEND Message
|
|
================
|
|
|
|
Offset Length Meaning
|
|
---------------------------------------------------------
|
|
0 1 destination address
|
|
1 1 remaining message length
|
|
2 1 command code
|
|
3 1 source address
|
|
---------------------------------------------------------
|
|
4 1 reason (0 if okay, error code to abort)
|
|
|
|
|
|
|
|
FLASHRESPONSE Message
|
|
=====================
|
|
|
|
Offset Length Meaning
|
|
---------------------------------------------------------
|
|
0 1 destination address
|
|
1 1 remaining message length
|
|
2 1 command code
|
|
3 1 source address
|
|
---------------------------------------------------------
|
|
4 1 response code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|