This class is the interface to the in-memory DB.
More...
#include <dbInterface.hpp>
|
| DbInterface (const std::string &prefix, rad::DbAdapter &runtime_db) |
|
virtual | ~DbInterface () |
|
std::string | GetControlState () |
|
std::string | GetControlSubstate () |
|
std::string | GetControlStatus () |
|
std::string | Get (const std::string &key) |
|
void | SetControlState (const std::string &value) |
|
void | SetControlSubstate (const std::string &value) |
|
void | SetControlStatus (const std::string &value) |
|
void | SetControl (const std::string &state, const std::string &substate, const std::string &status) |
|
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) |
|
void | Set (const std::string &key, const std::string &value) |
|
| DbInterface (const DbInterface &)=delete |
|
DbInterface & | operator= (const DbInterface &)=delete |
|
| DbInterface (const std::string &prefix, rad::DbAdapter &runtime_db) |
|
virtual | ~DbInterface () |
|
std::string | GetControlState () |
|
std::string | GetControlSubstate () |
|
std::string | GetControlStatus () |
|
std::string | Get (const std::string &key) |
|
void | SetControlState (const std::string &value) |
|
void | SetControlSubstate (const std::string &value) |
|
void | SetControlStatus (const std::string &value) |
|
void | SetControl (const std::string &state, const std::string &substate, const std::string &status) |
|
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) |
|
void | Set (const std::string &key, const std::string &value) |
|
| DbInterface (const DbInterface &)=delete |
|
DbInterface & | operator= (const DbInterface &)=delete |
|
This class is the interface to the in-memory DB.
ctd::qatk::qapp2::DbInterface::DbInterface |
( |
const std::string & |
prefix, |
|
|
rad::DbAdapter & |
runtime_db |
|
) |
| |
Constructor.
- Parameters
-
[in] | prefix | String used as prefix when building the keys. |
[in] | runtimeDb | Reference to the in-memory DB adapter. |
ctd::qatk::qapp2::DbInterface::~DbInterface |
( |
| ) |
|
|
virtual |
ctd::qatk::qapp2::DbInterface::DbInterface |
( |
const std::string & |
prefix, |
|
|
rad::DbAdapter & |
runtime_db |
|
) |
| |
Constructor.
- Parameters
-
[in] | prefix | String used as prefix when building the keys. |
[in] | runtimeDb | Reference to the in-memory DB adapter. |
virtual ctd::qatk::qapp2::DbInterface::~DbInterface |
( |
| ) |
|
|
virtual |
std::string ctd::qatk::qapp2::DbInterface::Get |
( |
const std::string & |
key | ) |
|
- Parameters
-
- Returns
- The value stored in the DB associated to the given key.
std::string ctd::qatk::qapp2::DbInterface::Get |
( |
const std::string & |
key | ) |
|
- Parameters
-
- Returns
- The value stored in the DB associated to the given key.
std::string ctd::qatk::qapp2::DbInterface::GetControlState |
( |
| ) |
|
- Returns
- The current state of the application stored in the DB.
std::string ctd::qatk::qapp2::DbInterface::GetControlState |
( |
| ) |
|
- Returns
- The current state of the application stored in the DB.
std::string ctd::qatk::qapp2::DbInterface::GetControlStatus |
( |
| ) |
|
- Returns
- The current state and sub-state of the application stored in the DB.
std::string ctd::qatk::qapp2::DbInterface::GetControlStatus |
( |
| ) |
|
- Returns
- The current state and sub-state of the application stored in the DB.
std::string ctd::qatk::qapp2::DbInterface::GetControlSubstate |
( |
| ) |
|
- Returns
- The current sub-state of the application stored in the DB.
std::string ctd::qatk::qapp2::DbInterface::GetControlSubstate |
( |
| ) |
|
- Returns
- The current sub-state of the application stored in the DB.
void ctd::qatk::qapp2::DbInterface::Set |
( |
const std::string & |
key, |
|
|
const std::string & |
value |
|
) |
| |
- Parameters
-
[in] | key | Key to be written in the DB. |
[in] | value | Value, associated to the given key, to be written in the DB. |
void ctd::qatk::qapp2::DbInterface::Set |
( |
const std::string & |
key, |
|
|
const std::string & |
value |
|
) |
| |
- Parameters
-
[in] | key | Key to be written in the DB. |
[in] | value | Value, associated to the given key, to be written in the DB. |
void ctd::qatk::qapp2::DbInterface::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 |
|
) |
| |
Set the application configuration information in the DB.
- Parameters
-
[in] | reqEndpoint | Request msg endpoint. |
[in] | dbIpAddr | DB IP address. |
[in] | dbPort | DB port. |
[in] | dbTimeout | DB timeout. |
void ctd::qatk::qapp2::DbInterface::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 |
|
) |
| |
Set the application configuration information in the DB.
- Parameters
-
[in] | reqEndpoint | Request msg endpoint. |
[in] | dbIpAddr | DB IP address. |
[in] | dbPort | DB port. |
[in] | dbTimeout | DB timeout. |
- Todo:
- avoid copying strings
- Todo:
- avoid copying strings
void ctd::qatk::qapp2::DbInterface::SetControl |
( |
const std::string & |
state, |
|
|
const std::string & |
substate, |
|
|
const std::string & |
status |
|
) |
| |
Set the application control information in the DB.
- Parameters
-
[in] | state | State to be stored in the DB. |
[in] | substate | Substate to be stored in the DB. |
[in] | status | Status to be stored in the DB. |
- Todo:
- Avoid copying strings
- Todo:
- Avoid copying strings
void ctd::qatk::qapp2::DbInterface::SetControl |
( |
const std::string & |
state, |
|
|
const std::string & |
substate, |
|
|
const std::string & |
status |
|
) |
| |
Set the application control information in the DB.
- Parameters
-
[in] | state | State to be stored in the DB. |
[in] | substate | Substate to be stored in the DB. |
[in] | status | Status to be stored in the DB. |
void ctd::qatk::qapp2::DbInterface::SetControlState |
( |
const std::string & |
value | ) |
|
- Parameters
-
[in] | value | State to be stored in the DB. |
void ctd::qatk::qapp2::DbInterface::SetControlState |
( |
const std::string & |
value | ) |
|
- Parameters
-
[in] | value | State to be stored in the DB. |
void ctd::qatk::qapp2::DbInterface::SetControlStatus |
( |
const std::string & |
value | ) |
|
- Parameters
-
[in] | value | Status (state and substate) to be stored in the DB. |
void ctd::qatk::qapp2::DbInterface::SetControlStatus |
( |
const std::string & |
value | ) |
|
- Parameters
-
[in] | value | Status (state and substate) to be stored in the DB. |
void ctd::qatk::qapp2::DbInterface::SetControlSubstate |
( |
const std::string & |
value | ) |
|
- Parameters
-
[in] | value | Sub-state to be stored in the DB. |
void ctd::qatk::qapp2::DbInterface::SetControlSubstate |
( |
const std::string & |
value | ) |
|
- Parameters
-
[in] | value | Sub-state to be stored in the DB. |
The documentation for this class was generated from the following files: