8#ifndef SUP_SUBSIM_COMMON_DATA_CONTEXT_HPP_
9#define SUP_SUBSIM_COMMON_DATA_CONTEXT_HPP_
11#include <unordered_map>
13#include <rad/topicPub.hpp>
14#include <rad/mal/publisher.hpp>
17#include <ifw/core/utils/bat/dbInterface.hpp>
130 void SetState(
const std::string state);
143 std::unique_ptr<ifw::core::utils::bat::DbInterface> m_db_interface;
145 std::unique_ptr<rad::cii::Publisher<stdif::Status>> m_publisher;
149 log4cplus::Logger m_logger;
DataContext & operator=(const DataContext &)=delete
Disable assignment operator.
std::string GetStateStr()
Definition dataContext.cpp:92
void SetState(const short state)
Definition dataContext.cpp:102
DataContext(Config &config, bool with_publisher=true, bool with_oldb=true)
Definition dataContext.cpp:20
short GetSubstate()
Definition dataContext.cpp:116
short GetState()
Definition dataContext.cpp:88
void SetSubstate(const short state)
Definition dataContext.cpp:130
Config & GetConfig()
Definition dataContext.cpp:83
std::string GetSubstateStr()
Definition dataContext.cpp:120
void UpdateDb()
Definition dataContext.cpp:63
virtual ~DataContext()
Definition dataContext.cpp:50
void PublishStates()
Definition dataContext.cpp:145
DataContext(const DataContext &)=delete
Disable copy constructor.
void ReloadConfig()
Definition dataContext.cpp:56
ActionMgr class source file.
Definition actionMgr.cpp:28
const std::string SRV_SUBSTATE_ERROR_STR
Definition dataContext.hpp:48
const short SRV_SUBSTATE_IDLE
Definition dataContext.hpp:30
const short SRV_SUBSTATE_ERROR
Definition dataContext.hpp:34
const std::string SRV_SUBSTATE_SETTINGUP_STR
Definition dataContext.hpp:47
const std::string SRV_STATE_NOT_OPERATIONAL_STR
Definition dataContext.hpp:38
const std::string SRV_SUBSTATE_READY_STR
Definition dataContext.hpp:43
const short SRV_SUBSTATE_INITIALISING
Definition dataContext.hpp:31
const short SRV_SUBSTATE_SETTINGUP
Definition dataContext.hpp:33
const std::string SRV_STATE_OPERATIONAL_STR
Definition dataContext.hpp:39
const std::string SRV_SUBSTATE_INITIALISING_STR
Definition dataContext.hpp:45
const std::unordered_map< short, std::string > SrvSubstateMap
Definition dataContext.hpp:63
const std::unordered_map< std::string, short > SrvSubstateStrMap
Definition dataContext.hpp:75
const short SRV_STATE_OPERATIONAL
Definition dataContext.hpp:25
const std::string SRV_SUBSTATE_OPENLOOP_STR
Definition dataContext.hpp:49
const short SRV_SUBSTATE_CLOSEDLOOP
Definition dataContext.hpp:36
const short SRV_SUBSTATE_READY
Definition dataContext.hpp:29
const std::string SRV_SUBSTATE_ENABLING_STR
Definition dataContext.hpp:46
const std::string SRV_STATE_UNAVAILABLE_STR
Definition dataContext.hpp:40
const std::unordered_map< short, std::string > SrvStateMap
Definition dataContext.hpp:53
const std::string SRV_SUBSTATE_IDLE_STR
Definition dataContext.hpp:44
const std::string SRV_SUBSTATE_CLOSEDLOOP_STR
Definition dataContext.hpp:50
const short SRV_SUBSTATE_NOTREADY
Definition dataContext.hpp:28
const short SRV_SUBSTATE_OPENLOOP
Definition dataContext.hpp:35
const short SRV_SUBSTATE_ENABLING
Definition dataContext.hpp:32
const std::string SRV_SUBSTATE_NOTREADY_STR
Definition dataContext.hpp:42
const short SRV_STATE_NOT_OPERATIONAL
Definition dataContext.hpp:24
const std::unordered_map< std::string, short > SrvStateStrMap
Definition dataContext.hpp:58