/** * \page cmd_spec Command Engine, Command Format Specification

All command requests and replies are handled internally as command packets. These packets are transported transparently through the radio interface and serial interface (in binary-mode). They need to be translated only for ascii-mode in- and output.

Table: Command Packet Format
Offset: | 0 | 1 | 2 | 3-9 | 10-n | n+1
Binary mode: | Flags | Protocol | Function | Arguments (optional) | Checksum
ASCII mode: | Flags | Command String (NUL terminated) | Argument string (not terminated, optional) |

Table: Command Packet Field Description
Field | Size | Description
--- | --- | ---
Flags | 8 | (see below)
Protocol | 8 | Protocol Number
Function | 8 | Function Number (0 is reserved)
Arguments | 0-max | Data passed as argument to the command procedure
Command String | 2-9 | Name of command [0-9a-zA-Z], terminated by NUL-character
Argument String | 0-n | Any characters passed as arguments to the command procedure
Checksum | 1 | Checksum (XOR) of bytes 1-n

\note ASCII-mode headers have variable length depending on the length of the command name. The size of the command packet is given by the lower layer.

Table: Command Packet Request Flags
Flag | Description
--- | ---
#CMD_REQFLAG_ASCII | Request is in ASCII-Mode
#CMD_REQFLAG_REPLY | Send Request, if not set, no request is sent

Table: Command Packet Reply Flags
Flag | Description
--- | ---
#CMD_RPLFLAG_ASCII | Reply is in ASCII-Mode
#CMD_RPLFLAG_ERROR | Command execution failed (command not found) or command returned false with no custom reply. Success if not set.

*/