|
rad 6.2.0
|
#include <dataContext.hpp>
Public Member Functions | |
| DataContext (Config &config, rad::DbAdapter &db_adapter) | |
| virtual | ~DataContext () |
| void | ReloadConfig () |
| void | UpdateDb () |
| DbInterface & | GetDbInterface () |
| void | GetTargetAltAz (float &alt, float &az) |
| void | SetTargetAltAz (const float alt, const float az) |
| DataContext (const DataContext &)=delete | |
| DataContext & | operator= (const DataContext &)=delete |
| Disable copy constructor. | |
This class provide access to the application run-time data including the in-memory DB.
| exmalserver::DataContext::DataContext | ( | Config & | config, |
| rad::DbAdapter & | db_adapter ) |
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.
| [in] | config | Reference to the application configuration. |
| [in] | db_adapter | Reference to the DB adapter. |
|
virtual |
Destructor
|
delete |
| DbInterface & exmalserver::DataContext::GetDbInterface | ( | ) |
| void exmalserver::DataContext::GetTargetAltAz | ( | float & | alt, |
| float & | az ) |
Get target position for the axes.
|
delete |
Disable copy constructor.
| void exmalserver::DataContext::ReloadConfig | ( | ) |
Reload the configuration from file and reconnect to the in-memory DB.
| void exmalserver::DataContext::SetTargetAltAz | ( | const float | alt, |
| const float | az ) |
Set target position for the axes.
| void exmalserver::DataContext::UpdateDb | ( | ) |
Try to connect to the DB and update the application configuration.