ifw-daq  2.1.0-pre1
IFW Data Acquisition modules
Public Member Functions | List of all members
server::DbInterface Class Reference

This class is the interface to the in-memory DB. More...

#include <dbInterface.hpp>

Public Member Functions

 DbInterface (const std::string &prefix, rad::DbAdapter &runtime_db)
 Constructor. More...
 
virtual ~DbInterface ()
 Destructor. More...
 
std::string GetControlState ()
 
std::string Get (const std::string &key)
 
void SetControlState (const std::string &value)
 
void SetConfig (Config &cfg)
 Set the application configuration information in the DB. More...
 
void Set (const std::string &key, const std::string &value)
 
 DbInterface (const DbInterface &)=delete
 
DbInterfaceoperator= (const DbInterface &)=delete
 Disable copy constructor. More...
 

Detailed Description

This class is the interface to the in-memory DB.

Definition at line 46 of file dbInterface.hpp.

Constructor & Destructor Documentation

◆ DbInterface() [1/2]

server::DbInterface::DbInterface ( const std::string &  prefix,
rad::DbAdapter &  runtime_db 
)

Constructor.

Parameters
[in]prefixString used as prefix when building the keys.
[in]runtime_dbReference to the in-memory DB adapter.

Definition at line 20 of file dbInterface.cpp.

◆ ~DbInterface()

server::DbInterface::~DbInterface ( )
virtual

Destructor.

Definition at line 30 of file dbInterface.cpp.

◆ DbInterface() [2/2]

server::DbInterface::DbInterface ( const DbInterface )
delete

Member Function Documentation

◆ Get()

std::string server::DbInterface::Get ( const std::string &  key)
Parameters
[in]keyKey in the DB.
Returns
The value stored in the DB associated to the given key.

Definition at line 39 of file dbInterface.cpp.

◆ GetControlState()

std::string server::DbInterface::GetControlState ( )
Returns
The current state of the application stored in the DB.

Definition at line 34 of file dbInterface.cpp.

◆ operator=()

DbInterface& server::DbInterface::operator= ( const DbInterface )
delete

Disable copy constructor.

◆ Set()

void server::DbInterface::Set ( const std::string &  key,
const std::string &  value 
)
Parameters
[in]keyKey to be written in the DB.
[in]valueValue, associated to the given key, to be written in the DB.

Definition at line 89 of file dbInterface.cpp.

◆ SetConfig()

void server::DbInterface::SetConfig ( Config cfg)

Set the application configuration information in the DB.

Parameters
[in]reqEndpointRequest msg endpoint.
[in]dbIpAddrDB IP address.
[in]dbPortDB port.
[in]dbTimeoutDB timeout.

Definition at line 49 of file dbInterface.cpp.

◆ SetControlState()

void server::DbInterface::SetControlState ( const std::string &  value)
Parameters
[in]valueState to be stored in the DB.

Definition at line 44 of file dbInterface.cpp.


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