ArdProto
Implementation a very simple protocol with small 64 byte framed commands and asynchronous event posting. The basic packet layout includes:
- 1-byte
sizefield, includes entire packets. Max 64 bytes. - 1-byte
user ackfield, to be returned with each successful command. - 1-byte
commandfield. - X-5 bytes of repeated
data, max 59 bytes - 2-byte Fletcher-16 checksum fields that should equal to zero on recieving side.
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
┌─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┐
│ size │ user ack │
├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤
│ command │ data0 │
├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤
│ │
│ ... data(size - 5) │
│ │
├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤
│ flch16-sum2 │ flch16-sum1 │
└─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┘
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
Enums
- Direction
-
Direction of
Knobturn orButtonpress.
Classes
- ArdProto
-
Arduino serial protocol handler.
- KnobAction
-
Actions returned from the arduino board.