]> mj.ucw.cz Git - arexx.git/blob - PROTOCOL
One more rename for my sensors
[arexx.git] / PROTOCOL
1 Arexx Data Logger Protocol
2 ~~~~~~~~~~~~~~~~~~~~~~~~~~
3 All packets have fixed size of 64 bytes. The first byte is a packet
4 type, followed by type-dependent data.
5
6 Timestamps are 32-bit integers representing the number of seconds
7 since 2000-01-01 00:00:00 UTC.
8
9 Request packets  (from the PC to the logger)
10 ~~~~~~~~~~~~~~~
11
12 type 03         Request sensor data
13                 The data part is probably unused.
14
15 type 04         Set clock
16                 Data:   u32le   timestamp
17
18
19 Reply packets  (from the logger to the PC)
20 ~~~~~~~~~~~~~
21
22 type 00         Report sensor data
23                 The data part is a sequence of tuples, each tuple
24                 starts with its length.
25
26                 9-byte tuples:
27                         u8      tuple length (0x09)
28                         u16le   sensor ID
29                         u16be!  raw value
30                         u32le   timestamp
31
32                 10-byte tuples contain one extra byte:
33                         u8      signal quality (units unknown)
34
35                 A 0-byte tuple serves as a terminator.