rad  5.2.0
Public Types | Public Member Functions | List of all members
rad::DataContext Class Referenceabstract

#include <dataContext.hpp>

Inheritance diagram for rad::DataContext:
exciiserver::DataContext rad::utest::DataContext

Public Types

enum class  TrsHealthState { UNKNOWN , DISABLED , GOOD , BAD }
 

Public Member Functions

 DataContext ()
 
virtual ~DataContext ()=default
 
virtual void ReloadConfig ()=0
 
virtual ConfigGetConfig ()=0
 
virtual void UpdateDb ()=0
 
virtual OldbInterfaceGetOldbInterface ()=0
 
virtual void SetTrsHealth (TrsHealthState health)
 
virtual TrsHealthState GetTrsHealth ()
 

Detailed Description

This interface contains mandatory methods used by the rad::Application class to retrieve application specific configuration and access/update CII OLDB.

Member Enumeration Documentation

◆ TrsHealthState

Enum gets used for methods SetTrsHealth, GetTrsHealth.

Enumerator
UNKNOWN 

Either we don´t know yet if health checks are enabled or disabled, or they are enabled but we don´t know yet if health is GOOD or BAD.

DISABLED 

TRS health checks are disabled. We do not expect to receive any TrsEvents.HealthGood or TrsEvents.HealthBad events.

GOOD 

TRS health checks are enabled. Last event received was TrsEvents.HealthGood.

BAD 

TRS health checks are enabled. Last event received was TrsEvents.HealthBad.

Constructor & Destructor Documentation

◆ DataContext()

rad::DataContext::DataContext ( )

◆ ~DataContext()

virtual rad::DataContext::~DataContext ( )
virtualdefault

Member Function Documentation

◆ GetConfig()

virtual Config& rad::DataContext::GetConfig ( )
pure virtual
Returns
reference to the Config object.

Implemented in rad::utest::DataContext, and exciiserver::DataContext.

◆ GetOldbInterface()

virtual OldbInterface& rad::DataContext::GetOldbInterface ( )
pure virtual
Returns
A reference to the OLDB interface object.

Implemented in rad::utest::DataContext, and exciiserver::DataContext.

◆ GetTrsHealth()

DataContext::TrsHealthState rad::DataContext::GetTrsHealth ( )
virtual

Gets the TRS health state.

◆ ReloadConfig()

virtual void rad::DataContext::ReloadConfig ( )
pure virtual

Reload the configuration from file.

Implemented in rad::utest::DataContext, and exciiserver::DataContext.

◆ SetTrsHealth()

void rad::DataContext::SetTrsHealth ( TrsHealthState  health)
virtual

Stores the TRS health state.

◆ UpdateDb()

virtual void rad::DataContext::UpdateDb ( )
pure virtual

Try to connect to the DB and write the application configuration to the OLDB.

Implemented in rad::utest::DataContext, and exciiserver::DataContext.


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