This repository contains the shared protocol between MOD's devices controller and mod-ui.
The protocol and its header file must follow these strict rules:
-
all different types of command, menu id, flags etc must each have a unique prefix
(commands are "CMD_", menu ids are "MENU_ID_", etc) -
All shared commands must be unique
-
Each device can have its own specific set of commands, but they also be unique for a device usage.
They do not need to be unique across devices though. -
Menu IDs must be unique
-
Bank function IDs must be unique
-
Flags are hexadecimal bitmask values, so they must be unique and a power of 2
Their name syntax should beFLAG_<key>_<name>
Running make
will run a script and build the protocol in C to ensure these rules are being followed.