|
hlcc 2.0.0-beta2+pre1
|
#include <dataContext.hpp>
Public Member Functions | |
| DataContext () | |
| virtual | ~DataContext () |
| void | ReloadConfig () override |
| Config & | GetConfig () override |
| void | UpdateDb () override |
| OldbInterface & | GetOldbInterface () override |
| ecos::ptk::PositionOnEarth | GetSitePosition () |
| bool | ConnectEltpk () |
| void | SetPresetArgs (const std::shared_ptr<::ccsinsif::PresetArgs > &preset_args) |
| void | SetObservingWavelength (double wavelength) |
| void | SetAltAzPos (double alt_pos, double az_pos) |
| void | SetVelocityOffset (const std::shared_ptr<::ccsinsif::VelocityOffset > &velocity_offset_args) |
| void | SkyOffset (const std::shared_ptr<::ccsinsif::OffsetSkyArgs > &offset_sky_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 | GetTelifsimState () |
| 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 telifsimif::SequenceMode &seq_mode) |
| telifsimif::SequenceMode | GetPresetSequenceMode () |
| void | SetPresetSequence (const std::string &sequence) |
| std::string | GetPresetSequence () |
| void | SetOffsetSequenceMode (const telifsimif::SequenceMode &seq_mode) |
| telifsimif::SequenceMode | GetOffsetSequenceMode () |
| void | SetOffsetSequence (const std::string &sequence) |
| std::string | GetOffsetSequence () |
| OffsetHandler & | GetOffsetHandler () |
| 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::telifsim::DataContext::DataContext | ( | ) |
Default Constructor
|
virtual |
Destructor
|
delete |
| bool hlcc::telifsim::DataContext::ConnectEltpk | ( | ) |
Manages the connection to eltpk
| std::string hlcc::telifsim::DataContext::GetCommandSource | ( | ) |
Reads the command_source from the Oldb
| DataAcquisitionList & hlcc::telifsim::DataContext::GetDataAcquisitionList | ( | ) |
| std::string hlcc::telifsim::DataContext::GetEltpkState | ( | ) |
Reads the Eltpk State Machine current state from the Oldb
| std::shared_ptr< elt::mal::Mal > hlcc::telifsim::DataContext::GetEntityFactory | ( | ) |
| std::shared_ptr< elt::mal::Mal > hlcc::telifsim::DataContext::GetEntityFactoryDeterm | ( | ) |
| OffsetHandler & hlcc::telifsim::DataContext::GetOffsetHandler | ( | ) |
| std::string hlcc::telifsim::DataContext::GetOffsetSequence | ( | ) |
Sets preset sequence to be used
| telifsimif::SequenceMode hlcc::telifsim::DataContext::GetOffsetSequenceMode | ( | ) |
Sets Offset Mode
|
override |
| std::string hlcc::telifsim::DataContext::GetPresetSequence | ( | ) |
Sets preset sequence to be used
| telifsimif::SequenceMode hlcc::telifsim::DataContext::GetPresetSequenceMode | ( | ) |
Sets Preset Mode
| bool hlcc::telifsim::DataContext::GetReadyForHandover | ( | ) |
Reads the ready_for_handover flag from the Oldb
| std::shared_ptr< elt::mal::Mal > hlcc::telifsim::DataContext::GetReplyFactory | ( | ) |
| ecos::ptk::PositionOnEarth hlcc::telifsim::DataContext::GetSitePosition | ( | ) |
Gets the configured position of the (ELT) telescope.
| std::string hlcc::telifsim::DataContext::GetTelifsimState | ( | ) |
Reads the Telifsim State Machine current state from the Oldb
|
delete |
Disable copy constructor.
| void hlcc::telifsim::DataContext::PublishCommandSource | ( | ) |
Publishes the command_source in the Oldb and dds
| void hlcc::telifsim::DataContext::PublishExtrefInsRef | ( | ) |
| void hlcc::telifsim::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 telifsim 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. |
|
override |
Reload the configuration from file.
| void hlcc::telifsim::DataContext::SetAltAzPos | ( | double | alt_pos, |
| double | az_pos | ||
| ) |
Forwards the position to the eltpk
| std::runtime_error | if not successful. |
| void hlcc::telifsim::DataContext::SetAoMirrorHealth | ( | const std::shared_ptr<::ccsinsif::ao::Health > & | x | ) |
Publishes the adaptive optics mirror health to PubSub and Oldb
| void hlcc::telifsim::DataContext::SetCommandSource | ( | const std::string & | cmd_src | ) |
Set and Publish the command_source
| void hlcc::telifsim::DataContext::SetObservingWavelength | ( | double | wavelength | ) |
Publishes the wavelength in the Oldb and forwards it to eltpk.
| std::runtime_error | if not successful. |
| void hlcc::telifsim::DataContext::SetOffsetSequence | ( | const std::string & | sequence | ) |
Sets preset sequence to be used
| [in] | sequence | String name of sequence module |
| void hlcc::telifsim::DataContext::SetOffsetSequenceMode | ( | const telifsimif::SequenceMode & | seq_mode | ) |
Sets Offset Mode
| [in] | seq_mode | String with the mode |
| void hlcc::telifsim::DataContext::SetPresetArgs | ( | const std::shared_ptr<::ccsinsif::PresetArgs > & | preset_args | ) |
Stores the Preset data and forwards it to the eltpk application. TODO: Make storage and forwarding depend on simulation mode.
| preset_args | preset arguments |
| send_preset | true for sending the preset to eltpk |
| std::runtime_error | if not successful. |
| void hlcc::telifsim::DataContext::SetPresetSequence | ( | const std::string & | sequence | ) |
Sets preset sequence to be used
| [in] | sequence | String name of sequence module |
| void hlcc::telifsim::DataContext::SetPresetSequenceMode | ( | const telifsimif::SequenceMode & | seq_mode | ) |
Sets Preset Mode
| [in] | seq_mode | String with the mode |
| void hlcc::telifsim::DataContext::SetRefrenceAberration | ( | const elt::mal::shared_vector< const double > & | ref_aberration | ) |
| void hlcc::telifsim::DataContext::SetRefrenceFocus | ( | const double & | ref_focus | ) |
| void hlcc::telifsim::DataContext::SetStrokeRous | ( | const std::shared_ptr<::ccsinsif::rous::Maneuver > & | x | ) |
Publishes the ROUS Maneuver state to PubSub and Oldb
| void hlcc::telifsim::DataContext::SetVelocityOffset | ( | const std::shared_ptr<::ccsinsif::VelocityOffset > & | velocity_offset_args | ) |
Publishes the velocity offset in the Oldb
| std::runtime_error | if not successful. |
| void hlcc::telifsim::DataContext::SkyOffset | ( | const std::shared_ptr<::ccsinsif::OffsetSkyArgs > & | offset_sky_args | ) |
Forwards the arguments to the eltpk
| offset_sky_args | offset arguments |
| std::runtime_error | if not successful. |
|
override |
Try to connect to the DB and update the application configuration.