obus/docs/protocol.txt

104 lines
2.3 KiB
Plaintext
Raw Normal View History

2020-08-04 19:44:45 +00:00
______________________________________
Recap: message in CAN protocol
↓ 11b ↓ 64b (8 bytes)
+----+-----------------+ - - -
| id | body | dont care for now
2020-08-04 19:44:45 +00: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 19:44:45 +00:00
______________________________________
OBUS message specification
2020-08-04 19:44:45 +00:00
ID:
b bb bbbbbbbb
| | ↓
| ↓ module-ID: 2⁸=256
↓ type: 2²=4
2020-08-15 23:50:19 +00:00
priority bit (so that each type can send priority messages if need be, 0 = high priority, 1 = low priority)
2020-08-04 19:44:45 +00:00
type:
2020-08-25 19:07:25 +00:00
- 0 module-ID 0: controller, >0: info
2020-08-04 19:44:45 +00:00
- 1 puzzel
- 2 needy
- 3 reserved for future use
Payload:
[ B B B B B B B B ]
-
2020-08-10 20:25:51 +00:00
type of the message (per module type)
2020-08-04 19:44:45 +00:00
- - - - - - - - - - - - - - - - - - -
Types for controller:
- 0 acknowledge valid message
[ X B B B B B B B ]
- - ----------
| ↓ reserved
2021-01-30 12:58:45 +00:00
↓ module ID
type
2020-08-04 19:44:45 +00: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 ↓ ↓ #puzzle modules
#strikes #max strikes
2020-08-04 19:44:45 +00:00
- 3 state (every x ms e.g. in the middle of each second)
[ X B B B B B B B ]
-------- - - -
time left ↓ ↓ #puzzle modules left
2020-08-04 19:44:45 +00: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 19:44:45 +00:00
#strikes #max strikes
2021-01-30 12:58:45 +00:00
- 7 info start
2020-09-09 14:02:53 +00:00
[ X B B B B B B B ]
2021-02-03 00:25:03 +00:00
-------- -----
↓ reserved
random seed
2020-09-09 14:02:53 +00:00
- 8-255 reserved
2020-08-04 19:44:45 +00:00
- - - - - - - - - - - - - - - - - - -
2020-08-25 19:07:25 +00: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 19:44:45 +00:00
Types for modules:
2020-08-16 02:16:36 +00:00
- 0 register
2020-08-04 19:44:45 +00: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 19:44:45 +00:00
- 2 solved (not for needy modules)
[ X B B B B B B B ]
--------------
reserved