8 #ifndef DEVMGR_COMMON_DB_INTERFACE_HPP_
9 #define DEVMGR_COMMON_DB_INTERFACE_HPP_
16 #include <rad/DbAdapter.hpp>
87 std::string
Get(
const std::string& key);
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;
157 std::timed_mutex m_mutex;
163 #endif // DEVMGR_COMMON_DB_INTERFACE_HPP_
double value
Definition: easylogging++.h:814
void Set(const std::string &key, const std::string &value)
Definition: dbInterface.cpp:172
std::string GetControlSubstate()
Definition: dbInterface.cpp:42
std::string Get(const std::string &key)
Definition: dbInterface.cpp:52
const std::string KEY_CONFIG_PREFIX
Definition: dbInterface.hpp:47
const std::string KEY_CONFIG_CMDTOUT
Definition: dbInterface.hpp:44
const std::string KEY_CONFIG_SERVER
Definition: dbInterface.hpp:41
void SetControl(const std::string &state, const std::string &substate)
Definition: dbInterface.cpp:86
void SetControlSubstate(const std::string &value)
Definition: dbInterface.cpp:67
Definition: DbAdapter.hpp:29
const std::string KEY_CONFIG_SM_SCXML
Definition: dbInterface.hpp:36
void SetControlState(const std::string &value)
Definition: dbInterface.cpp:57
const std::string KEY_CONTROL_STATE
Definition: dbInterface.hpp:22
const std::string KEY_CONFIG_DEVFILE
Definition: dbInterface.hpp:43
std::string GetControlState()
Definition: dbInterface.cpp:37
void SetControlStatus(const std::string &value)
Definition: dbInterface.cpp:77
const std::string KEY_CONFIG_LOG_LEVEL
Definition: dbInterface.hpp:38
const std::string KEY_CONFIG_EXT_SUB_ENDPOINT
Definition: dbInterface.hpp:33
const std::string KEY_CONFIG_DEVICES
Definition: dbInterface.hpp:42
optional int32 substate
Definition: topics.proto:77
const std::string KEY_CONFIG_SUB_ENDPOINT
Definition: dbInterface.hpp:31
std::string GetControlStatus()
Definition: dbInterface.cpp:47
const std::string KEY_CONFIG_DICTIONARIES
Definition: dbInterface.hpp:46
const std::string KEY_CONFIG_PUB_ENDPOINT
Definition: dbInterface.hpp:30
const std::string KEY_CONFIG_DB_ENDPOINT
Definition: dbInterface.hpp:34
DbInterface & operator=(const DbInterface &)=delete
Disable assignment operator.
const std::string KEY_CONTROL_STATUS
Definition: dbInterface.hpp:24
const std::string KEY_CONTROL_SUBSTATE
Definition: dbInterface.hpp:23
const std::string KEY_CONTROL_SUBSTATE_STR
Definition: dbInterface.hpp:27
const std::string KEY_CONTROL_STATE_STR
Definition: dbInterface.hpp:26
const std::string KEY_CONFIG_FILENAME
Definition: dbInterface.hpp:37
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:116
void MultiSet(std::vector< std::string > &kvs)
Definition: dbInterface.cpp:146
const std::string KEY_CONFIG_DB_TIMEOUT
Definition: dbInterface.hpp:35
DbInterface(const std::string &prefix, rad::DbAdapter &runtime_db)
Definition: dbInterface.cpp:23
const std::string KEY_CONFIG_TYPE
Definition: dbInterface.hpp:45
const std::string KEY_CONFIG_SERVER_ID
Definition: dbInterface.hpp:40
const std::string KEY_CONFIG_REQ_ENDPOINT
Definition: dbInterface.hpp:29
const std::string KEY_CONFIG_EXT_PUB_ENDPOINT
Definition: dbInterface.hpp:32
virtual ~DbInterface()
Definition: dbInterface.cpp:33