obus/docs/protocol.txt

104 lines
2.3 KiB
Text
Raw Permalink Normal View History

2020-08-04 21:44:45 +02:00
______________________________________
Recap: message in CAN protocol
↓ 11b ↓ 64b (8 bytes)
+----+-----------------+ - - -
| id | body | dont care for now
2020-08-04 21:44:45 +02:00
+----+-----------------+ - - -
Priority is controlled by the ID: if a message with a higher ID is on the bus, lower messages will
be silenced due to the design of CAN.
2020-08-04 21:44:45 +02:00
______________________________________
OBUS message specification
2020-08-04 21:44:45 +02:00
ID:
b bb bbbbbbbb
| | ↓
| ↓ module-ID: 2⁸=256
↓ type: 2²=4
2020-08-16 01:50:19 +02:00
priority bit (so that each type can send priority messages if need be, 0 = high priority, 1 = low priority)
2020-08-04 21:44:45 +02:00
type:
2020-08-25 21:07:25 +02:00
- 0 module-ID 0: controller, >0: info
2020-08-04 21:44:45 +02:00
- 1 puzzel
- 2 needy
- 3 reserved for future use
Payload:
[ B B B B B B B B ]
-
2020-08-10 22:25:51 +02:00
type of the message (per module type)
2020-08-04 21:44:45 +02:00
- - - - - - - - - - - - - - - - - - -
Types for controller:
- 0 acknowledge register message
2020-08-04 21:44:45 +02:00
[ X B B B B B B B ]
- - ----------
| ↓ reserved
2021-01-30 13:58:45 +01:00
↓ module ID
type
2020-08-04 21:44:45 +02:00
- 1 hello
[ X B B B B B B B ]
--------------
reserved
- 2 game start
[ X B B B B B B B ]
-------- - - -
time left in ms ↓ ↓ #puzzle modules
#strikes #max strikes
2020-08-04 21:44:45 +02:00
- 3 state (every x ms e.g. in the middle of each second)
[ X B B B B B B B ]
-------- - - -
time left in ms ↓ ↓ #puzzle modules left
2020-08-04 21:44:45 +02:00
#strikes #max strikes
- 4-6 solved, timeout, strikeout
[ X B B B B B B B ]
-------- - - -
end time ↓ ↓ #puzzle modules left
2020-08-04 21:44:45 +02:00
#strikes #max strikes
2021-01-30 13:58:45 +01:00
- 7 info start
2020-09-09 16:02:53 +02:00
[ X B B B B B B B ]
2021-02-03 01:25:03 +01:00
-------- -----
↓ reserved
random seed
2020-09-09 16:02:53 +02:00
- 8-255 reserved
2020-08-04 21:44:45 +02:00
- - - - - - - - - - - - - - - - - - -
2020-08-25 21:07:25 +02:00
Types for info:
These are managed by MOANA: the Modules of OBUS Authority for Numbers Assignment.
You can reach MOANA in the ~obus Mattermost channel.
(none yet)
- - - - - - - - - - - - - - - - - - -
2020-08-04 21:44:45 +02:00
Types for modules:
2020-08-16 04:16:36 +02:00
- 0 register
2020-08-04 21:44:45 +02:00
[ X B B B B B B B ]
--------------
reserved
- 1 strike
[ X B B B B B B B ]
↓ -----↓------
#strikes reserved
2020-08-04 21:44:45 +02:00
- 2 solved (not for needy modules)
[ X B B B B B B B ]
--------------
reserved