|
ifw-fgf 1.0.0-pre1
|
State struct defining enums to handle states/substates. More...
#include <state.hpp>
Public Types | |
| enum class | StateEnum : short { OFF = -8 , UNDEFINED = -7 , NOT_OPERATIONAL = 1 , OPERATIONAL = 2 } |
| State enums definition. More... | |
| enum class | SubstateEnum : short { UNDEFINED = 90 , ERROR = 95 , NOT_OP_NOT_READY = 100 , INITIALISING = 101 , NOT_OP_READY = 102 , ENABLING = 103 , IDLE = 110 , BUSY = 115 , ACQUIRING = 130 } |
| Substate enums definition. More... | |
| using | StateNumMap_t = boost::bimap<std::string, StateEnum> |
| using | SubstateNumMap_t = boost::bimap<std::string, SubstateEnum> |
Static Public Member Functions | |
| static std::optional< StateEnum > | GetState (const std::string &state) |
| Get state as an enumeration. | |
| static std::optional< std::string > | GetStateStr (const StateEnum state) |
| Get state as an optional string. | |
| static std::optional< SubstateEnum > | GetSubstate (const std::string &substate) |
| Get state as an enumeration. | |
| static std::optional< std::string > | GetSubstateStr (const SubstateEnum substate) |
| Get substate as an optional string. | |
Static Public Attributes | |
| static StateNumMap_t | StateMap |
| static SubstateNumMap_t | SubstateMap |
State struct defining enums to handle states/substates.
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 ifw::fgf::common::State::StateNumMap_t = boost::bimap<std::string, StateEnum> |
| using ifw::fgf::common::State::SubstateNumMap_t = boost::bimap<std::string, SubstateEnum> |
|
strong |
State enums definition.
| Enumerator | |
|---|---|
| OFF | |
| UNDEFINED | |
| NOT_OPERATIONAL | |
| OPERATIONAL | |
|
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 |