______________________________________

Recap: message in CAN protocol
  ↓ 11b     ↓ 64b (8 bytes)
+----+-----------------+ - - -
| id |      body       | don’t care for now
+----+-----------------+ - - -

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.

______________________________________

OBUS message specification

ID:
b bb bbbbbbbb
|  |     ↓
|  ↓     module-ID: 2⁸=256
↓  type: 2²=4
priority bit (so that each type can send priority messages if need be, 0 = high priority, 1 = low priority)

    type:
    - 0 module-ID 0: controller, >0: info
    - 1 puzzel
    - 2 needy
    - 3 reserved for future use

Payload:
[ B B B B  B B B B ]
  -
  ↓
 type of the message (per module type)

- - - - - - - - - - - - - - - - - - -

Types for controller:

    - 0 acknowledge register message
      [ X B B B  B B B B ]
          - - ----------
          | ↓  reserved
          ↓ module ID
       type

    - 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

    - 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
            #strikes #max strikes

    - 4-6 solved, timeout, strikeout
      [ X B B B  B B B B ]
          -------- - - -
          end time ↓ ↓ #puzzle modules left
            #strikes #max strikes

    - 7 info start
      [ X B B B  B B B B ]
          -------- -----
              ↓    reserved
       random seed

    - 8-255 reserved

- - - - - - - - - - - - - - - - - - -

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)

- - - - - - - - - - - - - - - - - - -

Types for modules:

    - 0 register
      [ X B B B  B B B B ]
          --------------
             reserved

    - 1 strike
      [ X B B B  B B B B ]
          ↓ -----↓------
    #strikes  reserved

    - 2 solved (not for needy modules)
      [ X B B B  B B B B ]
          --------------
             reserved
