HLCC Documentation 2.2.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
hlcc::telif::DataContext Class Reference

#include <dataContext.hpp>

Inheritance diagram for hlcc::telif::DataContext:

Public Member Functions

 DataContext ()
 
virtual ~DataContext ()
 
void ReloadConfig () override
 
ConfigGetConfig () override
 
void UpdateDb () override
 
OldbInterfaceGetOldbInterface () override
 
ptk::PositionOnEarth GetSitePosition ()
 
bool ConnectEltpk ()
 
void SetObservingWavelength (double wavelength)
 
void SetVelocityOffset (const std::shared_ptr<::ccsinsif::VelocityOffset > &velocity_offset_args)
 
void SetRefrenceAberration (const elt::mal::shared_vector< const double > &ref_aberration)
 
void SetRefrenceFocus (const double &ref_focus)
 
void PublishExtrefInsRef ()
 
void SetStrokeRous (const std::shared_ptr<::ccsinsif::rous::Maneuver > &x)
 
void SetAoMirrorHealth (const std::shared_ptr<::ccsinsif::ao::Health > &x)
 
bool GetReadyForHandover ()
 
std::string GetTelifState ()
 
std::string GetEltpkState ()
 
std::string GetCommandSource ()
 
void SetCommandSource (const std::string &)
 
void PublishCommandSource ()
 
DataAcquisitionListGetDataAcquisitionList ()
 
RousDataGetRousData ()
 
void ReadyForHandoverEstimation (rad::SMAdapter &sm_adapter, bool force_update=false)
 
std::shared_ptr< elt::mal::Mal > GetEntityFactory ()
 
std::shared_ptr< elt::mal::Mal > GetEntityFactoryDeterm ()
 
std::shared_ptr< elt::mal::Mal > GetReplyFactory ()
 
void SetPresetSequenceMode (const telifif::SequenceMode &seq_mode)
 
telifif::SequenceMode GetPresetSequenceMode ()
 
void SetPresetSequence (const std::string &sequence)
 
std::string GetPresetSequence ()
 
void SetOffsetSequenceMode (const telifif::SequenceMode &seq_mode)
 
telifif::SequenceMode GetOffsetSequenceMode ()
 
void SetOffsetSequence (const std::string &sequence)
 
std::string GetOffsetSequence ()
 
OffsetHandlerGetOffsetHandler ()
 
void GetAndPublishTrexPerfData ()
 
void RecordOpsLog (const std::string &name, const std::string &value)
 
 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]

hlcc::telif::DataContext::DataContext ( )

Default Constructor

◆ ~DataContext()

hlcc::telif::DataContext::~DataContext ( )
virtual

Destructor

◆ DataContext() [2/2]

hlcc::telif::DataContext::DataContext ( const DataContext & )
delete

Member Function Documentation

◆ ConnectEltpk()

bool hlcc::telif::DataContext::ConnectEltpk ( )

Manages the connection to eltpk

Returns
true if the connection is established.

◆ GetAndPublishTrexPerfData()

void hlcc::telif::DataContext::GetAndPublishTrexPerfData ( )

Reads trex data subscribed from dds

◆ GetCommandSource()

std::string hlcc::telif::DataContext::GetCommandSource ( )

Reads the command_source from the Oldb

◆ GetConfig()

Config & hlcc::telif::DataContext::GetConfig ( )
override
Returns
reference to the Config object.

◆ GetDataAcquisitionList()

DataAcquisitionList & hlcc::telif::DataContext::GetDataAcquisitionList ( )
Returns
A reference to the DataAcquisition list object.

◆ GetEltpkState()

std::string hlcc::telif::DataContext::GetEltpkState ( )

Reads the Eltpk State Machine current state from the Oldb

◆ GetEntityFactory()

std::shared_ptr< elt::mal::Mal > hlcc::telif::DataContext::GetEntityFactory ( )
Returns
A reference to the RousData object.

◆ GetEntityFactoryDeterm()

std::shared_ptr< elt::mal::Mal > hlcc::telif::DataContext::GetEntityFactoryDeterm ( )
Returns
A reference to the RousData object.

◆ GetOffsetHandler()

OffsetHandler & hlcc::telif::DataContext::GetOffsetHandler ( )
Returns
A reference to the OffsetHandler object.

◆ GetOffsetSequence()

std::string hlcc::telif::DataContext::GetOffsetSequence ( )

Sets preset sequence to be used

Returns
string with value read from Oldb

◆ GetOffsetSequenceMode()

telifif::SequenceMode hlcc::telif::DataContext::GetOffsetSequenceMode ( )

Sets Offset Mode

Returns
telifif::SequenceMode with value read from Oldb

◆ GetOldbInterface()

OldbInterface & hlcc::telif::DataContext::GetOldbInterface ( )
override
Returns
A reference to the DB interface object.

◆ GetPresetSequence()

std::string hlcc::telif::DataContext::GetPresetSequence ( )

Sets preset sequence to be used

Returns
string with value read from Oldb

◆ GetPresetSequenceMode()

telifif::SequenceMode hlcc::telif::DataContext::GetPresetSequenceMode ( )

Sets Preset Mode

Returns
telifif::SequenceMode with value read from Oldb

◆ GetReadyForHandover()

bool hlcc::telif::DataContext::GetReadyForHandover ( )

Reads the ready_for_handover flag from the Oldb

◆ GetReplyFactory()

std::shared_ptr< elt::mal::Mal > hlcc::telif::DataContext::GetReplyFactory ( )
Returns
A reference to the RousData object.

◆ GetRousData()

RousData & hlcc::telif::DataContext::GetRousData ( )
Returns
A reference to the RousData object.

◆ GetSitePosition()

ptk::PositionOnEarth hlcc::telif::DataContext::GetSitePosition ( )

Gets the configured position of the (ELT) telescope.

◆ GetTelifState()

std::string hlcc::telif::DataContext::GetTelifState ( )

Reads the Telif State Machine current state from the Oldb

◆ operator=()

DataContext & hlcc::telif::DataContext::operator= ( const DataContext & )
delete

Disable copy constructor.

◆ PublishCommandSource()

void hlcc::telif::DataContext::PublishCommandSource ( )

Publishes the command_source in the Oldb and dds

◆ PublishExtrefInsRef()

void hlcc::telif::DataContext::PublishExtrefInsRef ( )

◆ ReadyForHandoverEstimation()

void hlcc::telif::DataContext::ReadyForHandoverEstimation ( rad::SMAdapter & sm_adapter,
bool force_update = false )

Ready for handover estimation This method estimates the the ready for handover region of the On::Operational telif state The estimation is based in the ready for handover flag published in Oldb by telmon. Every time the estimation changes an event will be published in the state machine to trigger the state transition. In case the Ready for handover is estimated false we also remove control from instruments

Parameters
[in]sm_adapterReference to the state machine adapter so we can publish events.
[in]force_updateIf true the estimation will be forced to update even if it sees no change.

◆ RecordOpsLog()

void hlcc::telif::DataContext::RecordOpsLog ( const std::string & name,
const std::string & value )

Write an ops-log (a preformatted log for commands and state-changes) to the opslogger with the given name. The resulting log message will read " > name = value /".

Parameters
name- name of ops-logger/series
value- content for placeholder in the ops-log message

◆ ReloadConfig()

void hlcc::telif::DataContext::ReloadConfig ( )
override

Reload the configuration from file.

◆ SetAoMirrorHealth()

void hlcc::telif::DataContext::SetAoMirrorHealth ( const std::shared_ptr<::ccsinsif::ao::Health > & x)

Publishes the adaptive optics mirror health to PubSub and Oldb

◆ SetCommandSource()

void hlcc::telif::DataContext::SetCommandSource ( const std::string & cmd_src)

Set and Publish the command_source

◆ SetObservingWavelength()

void hlcc::telif::DataContext::SetObservingWavelength ( double wavelength)

Publishes the wavelength in the Oldb and forwards it to eltpk.

Exceptions
std::runtime_errorif not successful.

◆ SetOffsetSequence()

void hlcc::telif::DataContext::SetOffsetSequence ( const std::string & sequence)

Sets preset sequence to be used

Parameters
[in]sequenceString name of sequence module

◆ SetOffsetSequenceMode()

void hlcc::telif::DataContext::SetOffsetSequenceMode ( const telifif::SequenceMode & seq_mode)

Sets Offset Mode

Parameters
[in]seq_modeString with the mode

◆ SetPresetSequence()

void hlcc::telif::DataContext::SetPresetSequence ( const std::string & sequence)

Sets preset sequence to be used

Parameters
[in]sequenceString name of sequence module

◆ SetPresetSequenceMode()

void hlcc::telif::DataContext::SetPresetSequenceMode ( const telifif::SequenceMode & seq_mode)

Sets Preset Mode

Parameters
[in]seq_modeString with the mode

◆ SetRefrenceAberration()

void hlcc::telif::DataContext::SetRefrenceAberration ( const elt::mal::shared_vector< const double > & ref_aberration)

◆ SetRefrenceFocus()

void hlcc::telif::DataContext::SetRefrenceFocus ( const double & ref_focus)

◆ SetStrokeRous()

void hlcc::telif::DataContext::SetStrokeRous ( const std::shared_ptr<::ccsinsif::rous::Maneuver > & x)

Publishes the ROUS Maneuver state to PubSub and Oldb

◆ SetVelocityOffset()

void hlcc::telif::DataContext::SetVelocityOffset ( const std::shared_ptr<::ccsinsif::VelocityOffset > & velocity_offset_args)

Publishes the velocity offset in the Oldb

Exceptions
std::runtime_errorif not successful.

◆ UpdateDb()

void hlcc::telif::DataContext::UpdateDb ( )
override

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


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