ifw-sup
3.0.0-pre3
|
#include <states.hpp>
Public Types | |
enum class | StateEnum : short { OFF = -8 , UNDEFINED = -7 , NOT_OPERATIONAL = 1 , OPERATIONAL = 2 } |
enum class | SubstateEnum : short { UNDEFINED = 90 , ERROR = 95 , NOT_OP_NOT_READY = 100 , INITIALISING = 101 , NOT_OP_READY = 102 , ENABLING = 103 , RECOVERING = 106 , IDLE = 110 , BUSY = 115 , SETTING_UP = 130 , NOT_RECORDING = 200 , RECORDING = 201 , REC_PAUSED = 202 } |
using | StateNumMap_t = boost::bimap< std::string, StateEnum > |
using | SubstateNumMap_t = boost::bimap< std::string, SubstateEnum > |
Static Public Member Functions | |
static StateEnum | GetState (const std::string &state) |
Get state as an enumeration. More... | |
static std::optional< std::string > | GetStateStr (const StateEnum state) |
Get state as an optional string. More... | |
static SubstateEnum | GetSubstate (const std::string &substate) |
Get state as an enumeration. More... | |
static std::optional< std::string > | GetSubstateStr (const SubstateEnum substate) |
Get substate as an optional string. More... | |
Static Public Attributes | |
static StateNumMap_t | StateMap |
static SubstateNumMap_t | SubstateMap |
The State struct.
This structure is used store the basic state information. It has two bidirectional maps used by classes to get the name or enumeration associated to a state. Methods are static so they can be used without an object.
using sup::syssup::common::State::StateNumMap_t = boost::bimap<std::string, StateEnum> |
using sup::syssup::common::State::SubstateNumMap_t = boost::bimap<std::string, SubstateEnum> |
|
strong |
|
strong |
|
inlinestatic |
Get state as an enumeration.
state | string containing the state |
|
inlinestatic |
Get state as an optional string.
state | enumeration of the state |
|
inlinestatic |
Get state as an enumeration.
substate | string containing the substate |
|
inlinestatic |
Get substate as an optional string.
substate | enumeration of the substate |
|
inlinestatic |
|
inlinestatic |