|
HLCC Documentation 2.2.0
|
#include <dataContext.hpp>
Public Member Functions | |
| DataContext () | |
| virtual | ~DataContext () |
| void | ReloadConfig () override |
| Config & | GetConfig () override |
| void | UpdateDb () override |
| OldbInterface & | GetOldbInterface () 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 () |
| DataAcquisitionList & | GetDataAcquisitionList () |
| RousData & | GetRousData () |
| 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 () |
| OffsetHandler & | GetOffsetHandler () |
| void | GetAndPublishTrexPerfData () |
| void | RecordOpsLog (const std::string &name, const std::string &value) |
| 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.
| hlcc::telif::DataContext::DataContext | ( | ) |
Default Constructor
|
virtual |
Destructor
|
delete |
| bool hlcc::telif::DataContext::ConnectEltpk | ( | ) |
Manages the connection to eltpk
| void hlcc::telif::DataContext::GetAndPublishTrexPerfData | ( | ) |
Reads trex data subscribed from dds
| std::string hlcc::telif::DataContext::GetCommandSource | ( | ) |
Reads the command_source from the Oldb
| DataAcquisitionList & hlcc::telif::DataContext::GetDataAcquisitionList | ( | ) |
| std::string hlcc::telif::DataContext::GetEltpkState | ( | ) |
Reads the Eltpk State Machine current state from the Oldb
| std::shared_ptr< elt::mal::Mal > hlcc::telif::DataContext::GetEntityFactory | ( | ) |
| std::shared_ptr< elt::mal::Mal > hlcc::telif::DataContext::GetEntityFactoryDeterm | ( | ) |
| OffsetHandler & hlcc::telif::DataContext::GetOffsetHandler | ( | ) |
| std::string hlcc::telif::DataContext::GetOffsetSequence | ( | ) |
Sets preset sequence to be used
| telifif::SequenceMode hlcc::telif::DataContext::GetOffsetSequenceMode | ( | ) |
Sets Offset Mode
|
override |
| std::string hlcc::telif::DataContext::GetPresetSequence | ( | ) |
Sets preset sequence to be used
| telifif::SequenceMode hlcc::telif::DataContext::GetPresetSequenceMode | ( | ) |
Sets Preset Mode
| bool hlcc::telif::DataContext::GetReadyForHandover | ( | ) |
Reads the ready_for_handover flag from the Oldb
| std::shared_ptr< elt::mal::Mal > hlcc::telif::DataContext::GetReplyFactory | ( | ) |
| ptk::PositionOnEarth hlcc::telif::DataContext::GetSitePosition | ( | ) |
Gets the configured position of the (ELT) telescope.
| std::string hlcc::telif::DataContext::GetTelifState | ( | ) |
Reads the Telif State Machine current state from the Oldb
|
delete |
Disable copy constructor.
| void hlcc::telif::DataContext::PublishCommandSource | ( | ) |
Publishes the command_source in the Oldb and dds
| void hlcc::telif::DataContext::PublishExtrefInsRef | ( | ) |
| 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
| [in] | sm_adapter | Reference to the state machine adapter so we can publish events. |
| [in] | force_update | If true the estimation will be forced to update even if it sees no change. |
| 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 /".
| name | - name of ops-logger/series |
| value | - content for placeholder in the ops-log message |
|
override |
Reload the configuration from file.
| void hlcc::telif::DataContext::SetAoMirrorHealth | ( | const std::shared_ptr<::ccsinsif::ao::Health > & | x | ) |
Publishes the adaptive optics mirror health to PubSub and Oldb
| void hlcc::telif::DataContext::SetCommandSource | ( | const std::string & | cmd_src | ) |
Set and Publish the command_source
| void hlcc::telif::DataContext::SetObservingWavelength | ( | double | wavelength | ) |
Publishes the wavelength in the Oldb and forwards it to eltpk.
| std::runtime_error | if not successful. |
| void hlcc::telif::DataContext::SetOffsetSequence | ( | const std::string & | sequence | ) |
Sets preset sequence to be used
| [in] | sequence | String name of sequence module |
| void hlcc::telif::DataContext::SetOffsetSequenceMode | ( | const telifif::SequenceMode & | seq_mode | ) |
Sets Offset Mode
| [in] | seq_mode | String with the mode |
| void hlcc::telif::DataContext::SetPresetSequence | ( | const std::string & | sequence | ) |
Sets preset sequence to be used
| [in] | sequence | String name of sequence module |
| void hlcc::telif::DataContext::SetPresetSequenceMode | ( | const telifif::SequenceMode & | seq_mode | ) |
Sets Preset Mode
| [in] | seq_mode | String with the mode |
| void hlcc::telif::DataContext::SetRefrenceAberration | ( | const elt::mal::shared_vector< const double > & | ref_aberration | ) |
| void hlcc::telif::DataContext::SetRefrenceFocus | ( | const double & | ref_focus | ) |
| void hlcc::telif::DataContext::SetStrokeRous | ( | const std::shared_ptr<::ccsinsif::rous::Maneuver > & | x | ) |
Publishes the ROUS Maneuver state to PubSub and Oldb
| void hlcc::telif::DataContext::SetVelocityOffset | ( | const std::shared_ptr<::ccsinsif::VelocityOffset > & | velocity_offset_args | ) |
Publishes the velocity offset in the Oldb
| std::runtime_error | if not successful. |
|
override |
Try to connect to the DB and update the application configuration.