rad 6.2.0
|
#include <oldbInterface.hpp>
Public Member Functions | |
OldbInterface (const std::string &prefix="") | |
virtual | ~OldbInterface () |
const std::string & | GetPrefix () |
rad::cii::OldbAdapter & | GetOldbAdapter () |
void | SetPrefix (const std::string &prefix) |
template<typename T > | |
void | SetValue (const std::string &key, const T &value) |
template<typename T > | |
void | GetValue (const std::string &key, T &value) |
virtual void | SetConfig (const Config &cfg) |
virtual void | SetControlState (const std::string &value) |
virtual void | SetTrsHealth (const std::string &health, const std::string &desc) |
OldbInterface (const OldbInterface &)=delete | |
OldbInterface & | operator= (const OldbInterface &)=delete |
Disable copy constructor. | |
This class is the interface to the CII OLDB. It uses the cii::rad::OldbAdapter to read/write OLDB attributes.
|
explicit |
Constructor.
[in] | prefix | String used as prefix when building the attributes keys. |
|
virtual |
Destructor
Reimplemented in exciiserver::OldbInterface, and rad::utest::OldbInterface.
|
delete |
|
inline |
|
inline |
void rad::OldbInterface::GetValue | ( | const std::string & | key, |
T & | value ) |
Helper method to try to read a value from the OLDB. In case it fails, it logs a warning.
key | Identifier of the OLDB attribute. |
value | Value of the attribute. |
T | Type of the value. |
|
delete |
Disable copy constructor.
|
virtual |
This method tries to write the application configuration to the OLDB.
cfg | Reference to the application configuration. |
Reimplemented in rad::utest::OldbInterface.
|
virtual |
This method writes the application State Machine state to the OLDB.
value | Application SM state. |
Reimplemented in rad::utest::OldbInterface.
|
inline |
This method allows to change prefix for the keys.
prefix | Prefix for the keys. |
|
virtual |
This method writes the TRS health status to the OLDB.
value | TRS health status and description. |
Reimplemented in rad::utest::OldbInterface.
void rad::OldbInterface::SetValue | ( | const std::string & | key, |
const T & | value ) |
Helper method to try to write a value to the OLDB. In case it fails, it logs a warning.
key | Identifier of the OLDB attribute. |
value | Value of the attribute. |
T | Type of the value. |