ifw-slm 0.1.2
 
Loading...
Searching...
No Matches
ifw::slm::DataContext Class Reference

#include <dataContext.hpp>

Inheritance diagram for ifw::slm::DataContext:

Public Member Functions

 DataContext ()
 
virtual ~DataContext ()
 
void Initialize () override
 
OldbInterfaceGetOldbInterface ()
 
ConfigGetConfig ()
 
void ReloadConfig ()
 
void UpdateDb ()
 
rad::OldbAsyncWriter & GetOldbAsyncWriter ()
 
void PublishStatus (const std::string &status)
 
 DataContext (const DataContext &)=delete
 
DataContextoperator= (const DataContext &)=delete
 Disable copy constructor.
 

Detailed Description

This class provide access to the application run-time data including the in-memory DB.

Constructor & Destructor Documentation

◆ DataContext() [1/2]

ifw::slm::DataContext::DataContext ( )

This constructor uses the application configuration to initialize the adapter object to the in-memory DB. The DB adapter is then used to initialize the DB interface object that can be used to access the DB key-value pairs.

◆ ~DataContext()

ifw::slm::DataContext::~DataContext ( )
virtual

Destructor

◆ DataContext() [2/2]

ifw::slm::DataContext::DataContext ( const DataContext & )
delete

Member Function Documentation

◆ GetConfig()

Config & ifw::slm::DataContext::GetConfig ( )
Returns
A reference to the Config object.

◆ GetOldbAsyncWriter()

rad::OldbAsyncWriter & ifw::slm::DataContext::GetOldbAsyncWriter ( )
inline
Returns
A reference to the GetOldbAsyncWriter object.

◆ GetOldbInterface()

OldbInterface & ifw::slm::DataContext::GetOldbInterface ( )
Returns
A reference to the DB interface object.

◆ Initialize()

void ifw::slm::DataContext::Initialize ( )
override

Initialize the class and attributes after they have been created and the configuration has been loaded.

◆ operator=()

DataContext & ifw::slm::DataContext::operator= ( const DataContext & )
delete

Disable copy constructor.

◆ PublishStatus()

void ifw::slm::DataContext::PublishStatus ( const std::string & status)

Publish status via MAL pub/sub.

Parameters
statusStatus string in format "State;Substate" (e.g., "Operational;Idle")

◆ ReloadConfig()

void ifw::slm::DataContext::ReloadConfig ( )

Reload the configuration from file and reconnect to the in-memory DB.

◆ UpdateDb()

void ifw::slm::DataContext::UpdateDb ( )

Try to connect to the DB and update the application configuration.


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