Midnight Sun Firmware
|
Commands Supported by the Simulation. More...
Enumerations | |
enum class | CommandCode { METADATA , GPIO_SET_PIN_STATE , GPIO_SET_ALL_STATES , GPIO_GET_PIN_STATE , GPIO_GET_ALL_STATES , GPIO_GET_PIN_MODE , GPIO_GET_ALL_MODES , GPIO_GET_PIN_ALT_FUNCTION , GPIO_GET_ALL_ALT_FUNCTIONS , NUM_COMMAND_CODES } |
Command Code Class. More... | |
Functions | |
std::string | encodeCommand (const CommandCode commandCode, std::string &message) |
Encode a command code into an existing data payload. More... | |
std::pair< CommandCode, std::string > | decodeCommand (std::string &message) |
Decode a command code from existing data. More... | |
Commands Supported by the Simulation.
|
strong |
Command Code Class.
Enumerator | |
---|---|
METADATA | Retrieve Client Metadata Command |
GPIO_SET_PIN_STATE | Set a Gpio Pin state |
GPIO_SET_ALL_STATES | Set all Gpio Pin states |
GPIO_GET_PIN_STATE | Get a Gpio Pin state |
GPIO_GET_ALL_STATES | Get all Gpio Pin states |
GPIO_GET_PIN_MODE | Get a Gpio Pin mode |
GPIO_GET_ALL_MODES | Get all Gpio Pin modes |
GPIO_GET_PIN_ALT_FUNCTION | Get a Gpio Pin alternate function |
GPIO_GET_ALL_ALT_FUNCTIONS | Get all Gpio Pin alternate functions |
NUM_COMMAND_CODES | Number of command codes |
std::pair< CommandCode, std::string > decodeCommand | ( | std::string & | message | ) |
Decode a command code from existing data.
message | String data payload to be decoded |
std::string encodeCommand | ( | const CommandCode | commandCode, |
std::string & | message | ||
) |
Encode a command code into an existing data payload.
commandCode | Command code to be encoded |
message | String data payload to be modified |