8 #ifndef FCF_DEVMGR_COMMON_DB_INTERFACE_HPP_
9 #define FCF_DEVMGR_COMMON_DB_INTERFACE_HPP_
16 #include <rad/dbAdapter.hpp>
61 DbInterface(
const std::string& prefix, rad::DbAdapter& runtime_db);
87 std::string
Get(
const std::string& key);
111 const std::string& substate);
120 const short substate);
132 void SetConfig(
const std::string& req_endpoint,
133 const std::string& db_endpoint,
134 const timeval& db_timeout,
135 const std::string& scxml_filename,
136 const std::string& config_filename,
137 const std::string& log_level);
143 void Set(
const std::string& key,
const std::string& value);
149 void MultiSet(std::vector<std::string>& kvs);
155 std::string m_prefix;
156 rad::DbAdapter& m_runtime_db;
157 std::timed_mutex m_mutex;
164 #endif // FCF_DEVMGR_COMMON_DB_INTERFACE_HPP_
const std::string KEY_CONTROL_STATE_STR
Definition: dbInterface.hpp:26
std::string GetControlSubstate()
Definition: dbInterface.cpp:43
void MultiSet(std::vector< std::string > &kvs)
Definition: dbInterface.cpp:147
void SetConfig(const std::string &req_endpoint, const std::string &db_endpoint, const timeval &db_timeout, const std::string &scxml_filename, const std::string &config_filename, const std::string &log_level)
Definition: dbInterface.cpp:117
const std::string KEY_CONFIG_SERVER
Definition: dbInterface.hpp:41
const std::string KEY_CONFIG_DB_TIMEOUT
Definition: dbInterface.hpp:35
const std::string KEY_CONFIG_DB_ENDPOINT
Definition: dbInterface.hpp:34
std::string GetControlState()
Definition: dbInterface.cpp:38
Definition: dbInterface.hpp:53
const std::string KEY_CONFIG_DEVFILE
Definition: dbInterface.hpp:43
const std::string KEY_CONFIG_SUB_ENDPOINT
Definition: dbInterface.hpp:31
const std::string KEY_CONFIG_LOG_LEVEL
Definition: dbInterface.hpp:38
const std::string KEY_CONFIG_REQ_ENDPOINT
Definition: dbInterface.hpp:29
const std::string KEY_CONTROL_STATE
Definition: dbInterface.hpp:22
DbInterface & operator=(const DbInterface &)=delete
Disable assignment operator.
const std::string KEY_CONFIG_DEVICES
Definition: dbInterface.hpp:42
const std::string KEY_CONFIG_EXT_PUB_ENDPOINT
Definition: dbInterface.hpp:32
DbInterface(const std::string &prefix, rad::DbAdapter &runtime_db)
Definition: dbInterface.cpp:24
virtual ~DbInterface()
Definition: dbInterface.cpp:34
void SetControlState(const std::string &value)
Definition: dbInterface.cpp:58
const std::string KEY_CONTROL_SUBSTATE
Definition: dbInterface.hpp:23
const std::string KEY_CONFIG_SERVER_ID
Definition: dbInterface.hpp:40
const std::string KEY_CONTROL_SUBSTATE_STR
Definition: dbInterface.hpp:27
const std::string KEY_CONFIG_PREFIX
Definition: dbInterface.hpp:47
const std::string KEY_CONFIG_FILENAME
Definition: dbInterface.hpp:37
std::string GetControlStatus()
Definition: dbInterface.cpp:48
const std::string KEY_CONFIG_CMDTOUT
Definition: dbInterface.hpp:44
const std::string KEY_CONTROL_STATUS
Definition: dbInterface.hpp:24
const std::string KEY_CONFIG_SM_SCXML
Definition: dbInterface.hpp:36
void SetControlSubstate(const std::string &value)
Definition: dbInterface.cpp:68
void SetControlStatus(const std::string &value)
Definition: dbInterface.cpp:78
void SetControl(const std::string &state, const std::string &substate)
Definition: dbInterface.cpp:87
const std::string KEY_CONFIG_TYPE
Definition: dbInterface.hpp:45
std::string Get(const std::string &key)
Definition: dbInterface.cpp:53
const std::string KEY_CONFIG_DICTIONARIES
Definition: dbInterface.hpp:46
const std::string KEY_CONFIG_PUB_ENDPOINT
Definition: dbInterface.hpp:30
void Set(const std::string &key, const std::string &value)
Definition: dbInterface.cpp:173
const std::string KEY_CONFIG_EXT_SUB_ENDPOINT
Definition: dbInterface.hpp:33