rad 6.2.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rad::OldbInterface Class Reference

#include <oldbInterface.hpp>

Inheritance diagram for rad::OldbInterface:
exciiserver::OldbInterface rad::utest::OldbInterface

Public Member Functions

 OldbInterface (const std::string &prefix="")
 
virtual ~OldbInterface ()
 
const std::string & GetPrefix ()
 
rad::cii::OldbAdapterGetOldbAdapter ()
 
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
 
OldbInterfaceoperator= (const OldbInterface &)=delete
 Disable copy constructor.
 

Detailed Description

This class is the interface to the CII OLDB. It uses the cii::rad::OldbAdapter to read/write OLDB attributes.

Constructor & Destructor Documentation

◆ OldbInterface() [1/2]

rad::OldbInterface::OldbInterface ( const std::string & prefix = "")
explicit

Constructor.

Parameters
[in]prefixString used as prefix when building the attributes keys.

◆ ~OldbInterface()

rad::OldbInterface::~OldbInterface ( )
virtual

Destructor

Reimplemented in exciiserver::OldbInterface, and rad::utest::OldbInterface.

◆ OldbInterface() [2/2]

rad::OldbInterface::OldbInterface ( const OldbInterface & )
delete

Member Function Documentation

◆ GetOldbAdapter()

rad::cii::OldbAdapter & rad::OldbInterface::GetOldbAdapter ( )
inline
Returns
A reference to the OldbAadapter object.

◆ GetPrefix()

const std::string & rad::OldbInterface::GetPrefix ( )
inline
Returns
The prefix of the keys.

◆ GetValue()

template<typename T >
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.

Parameters
keyIdentifier of the OLDB attribute.
valueValue of the attribute.
Template Parameters
TType of the value.

◆ operator=()

OldbInterface & rad::OldbInterface::operator= ( const OldbInterface & )
delete

Disable copy constructor.

◆ SetConfig()

void rad::OldbInterface::SetConfig ( const Config & cfg)
virtual

This method tries to write the application configuration to the OLDB.

Parameters
cfgReference to the application configuration.

Reimplemented in rad::utest::OldbInterface.

◆ SetControlState()

void rad::OldbInterface::SetControlState ( const std::string & value)
virtual

This method writes the application State Machine state to the OLDB.

Parameters
valueApplication SM state.

Reimplemented in rad::utest::OldbInterface.

◆ SetPrefix()

void rad::OldbInterface::SetPrefix ( const std::string & prefix)
inline

This method allows to change prefix for the keys.

Parameters
prefixPrefix for the keys.

◆ SetTrsHealth()

void rad::OldbInterface::SetTrsHealth ( const std::string & health,
const std::string & desc )
virtual

This method writes the TRS health status to the OLDB.

Parameters
valueTRS health status and description.

Reimplemented in rad::utest::OldbInterface.

◆ SetValue()

template<typename T >
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.

Parameters
keyIdentifier of the OLDB attribute.
valueValue of the attribute.
Template Parameters
TType of the value.

The documentation for this class was generated from the following files: