11#include <boost/signals2.hpp>
12#include <boost/bimap.hpp>
13#include <boost/assign.hpp>
14#include <boost/algorithm/string.hpp>
81 boost::assign::list_of<State::StateNumMap_t::relation>
88 boost::assign::list_of<State::SubstateNumMap_t::relation>
104 inline static std::optional<StateEnum>
GetState(
const std::string& state);
118 inline static std::optional<SubstateEnum>
GetSubstate(
const std::string& substate);
Definition binarySemaphore.hpp:45
constexpr auto SUBSTATE_READY_STR
Definition state.hpp:32
constexpr auto KEY_STATUS_SUBSYS_STATE
Definition state.hpp:20
constexpr auto SUBSTATE_RECOVERING_STR
Definition state.hpp:34
constexpr auto SUBSTATE_NOTREADY_STR
Definition state.hpp:30
constexpr auto KEY_STATUS_SUBSYS_SUBSTATE
Definition state.hpp:21
constexpr auto STATE_ERROR_STR
Definition state.hpp:25
constexpr auto SUBSTATE_BUSY_STR
Definition state.hpp:36
constexpr auto STATE_NOT_OPERATIONAL_STR
Definition state.hpp:27
constexpr auto STATE_OFF_STR
Definition state.hpp:26
constexpr auto SUBSTATE_ENABLING_STR
Definition state.hpp:33
constexpr auto SUBSTATE_INITIALISING_STR
Definition state.hpp:31
constexpr auto STATE_NOT_OP_ERROR_STR
Definition state.hpp:24
constexpr auto SUBSTATE_IDLE_STR
Definition state.hpp:35
constexpr auto SUBSTATE_ACQUIRING_STR
Definition state.hpp:38
constexpr auto STATE_UNDEFINED_STR
Definition state.hpp:23
constexpr auto STATE_OPERATIONAL_STR
Definition state.hpp:28
State struct defining enums to handle states/substates.
Definition state.hpp:47
StateEnum
State enums definition.
Definition state.hpp:53
@ UNDEFINED
Definition state.hpp:55
@ NOT_OPERATIONAL
Definition state.hpp:56
@ OFF
Definition state.hpp:54
@ OPERATIONAL
Definition state.hpp:57
static std::optional< std::string > GetSubstateStr(const SubstateEnum substate)
Get substate as an optional string.
static std::optional< SubstateEnum > GetSubstate(const std::string &substate)
Get state as an enumeration.
static SubstateNumMap_t SubstateMap
Definition state.hpp:88
SubstateEnum
Substate enums definition.
Definition state.hpp:63
@ UNDEFINED
Definition state.hpp:64
@ INITIALISING
Definition state.hpp:67
@ ENABLING
Definition state.hpp:69
@ BUSY
Definition state.hpp:71
@ IDLE
Definition state.hpp:70
@ ACQUIRING
Definition state.hpp:72
@ ERROR
Definition state.hpp:65
@ NOT_OP_READY
Definition state.hpp:68
@ NOT_OP_NOT_READY
Definition state.hpp:66
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 StateNumMap_t StateMap
Definition state.hpp:81
boost::bimap< std::string, StateEnum > StateNumMap_t
Definition state.hpp:76
boost::bimap< std::string, SubstateEnum > SubstateNumMap_t
Definition state.hpp:77