|
HLCC Documentation 3.0.1
|
#include <oldbInterface.hpp>
Public Member Functions | |
| OldbInterface (const std::string &prefix="") | |
| virtual | ~OldbInterface () |
| void | Init (::hlcc::trksim::Config &config) |
| void | PublishTargets (ElapsedTimeStats &stats) |
| void | PublishCurrentPositions (ElapsedTimeStats &stats, const bool &radec_validity, taiclock::TaiClock::time_point timestamp) |
| ptk::HorizonPositionEsoTimestamped | GetCurrentObservedAltAz () |
| void | SetConfig (hlcc::trksim::Config &cfg) |
| void | SetControlState (const std::string &value, const taiclock::TaiClock::time_point ×tamp, ElapsedTimeStats &stats) |
| void | SetTrackingState (const std::string &value, const taiclock::TaiClock::time_point ×tamp, ElapsedTimeStats &stats) |
| void | SetConfig (const rad::Config &cfg) |
| void | SetControlState (const std::string &value) |
| void | SetTrsHksDataState (bool hks_data_ok) |
| void | WriteTrsHksData (ptk::Dut1 dut1, ptk::Arcsecs xp, ptk::Arcsecs yp) |
| std::optional< ptk::Dut1 > | ReadTrsHksDut1 () |
| std::optional< ptk::Arcsecs > | ReadTrsHksPolar (std::string oldb_key) |
| void | UpdateHeartbeat () |
| OldbInterface (const OldbInterface &)=delete | |
| OldbInterface & | operator= (const OldbInterface &)=delete |
| Disable copy constructor. | |
| OldbData & | GetOldbData () |
| Disable assignment operator. | |
This class is the interface to the CII OLDB.
| hlcc::trksim::OldbInterface::OldbInterface | ( | const std::string & | prefix = "" | ) |
Constructor.
| [in] | prefix | String used as prefix when building the keys. Typically prefix will be set by Application::Init calling rad::OldbInterface::SetPrefix. |
|
virtual |
Destructor
|
delete |
| HorizonPositionEsoTimestamped hlcc::trksim::OldbInterface::GetCurrentObservedAltAz | ( | ) |
Publishes current_time. Probably an eltpk task. Retrieves the current observed (alt,az) position and returns it as an HorizonPositionEso
| OldbData & hlcc::trksim::OldbInterface::GetOldbData | ( | ) |
Disable assignment operator.
| void hlcc::trksim::OldbInterface::Init | ( | ::hlcc::trksim::Config & | config | ) |
Creates an ObservablePublisher for pub/sub and OLDB publishing. Initializes OLDB datapoints (target_alt_az) and publishers (target_alt_az_publisher).
|
delete |
Disable copy constructor.
| void hlcc::trksim::OldbInterface::PublishCurrentPositions | ( | ElapsedTimeStats & | stats, |
| const bool & | radec_validity, | ||
| taiclock::TaiClock::time_point | timestamp ) |
Publishes all current positions (currently current_alt_az, tracking_data).
| void hlcc::trksim::OldbInterface::PublishTargets | ( | ElapsedTimeStats & | stats | ) |
Publishes all target coordinates (currently only ALT-AZ target).
| std::optional< ptk::Dut1 > hlcc::trksim::OldbInterface::ReadTrsHksDut1 | ( | ) |
Reads TRS HKS value for DUT1 from the OLDB. Empty return in case of error or bad OLDB quality. This can be used as a fallback mechanism after failure of reading the data from TRS HKS.
| std::optional< ptk::Arcsecs > hlcc::trksim::OldbInterface::ReadTrsHksPolar | ( | std::string | oldb_key | ) |
Reads TRS HKS value for polar motion (X_p or Y_p) from the OLDB. Empty return in case of error or bad OLDB quality. This can be used as a fallback mechanism after failure of reading the data from TRS HKS.
| void hlcc::trksim::OldbInterface::SetConfig | ( | const rad::Config & | cfg | ) |
| void hlcc::trksim::OldbInterface::SetConfig | ( | hlcc::trksim::Config & | cfg | ) |
Will call the base class SetConfig method, and will also write to OLDB all config values specific to this module.
| void hlcc::trksim::OldbInterface::SetControlState | ( | const std::string & | value | ) |
| void hlcc::trksim::OldbInterface::SetControlState | ( | const std::string & | value, |
| const taiclock::TaiClock::time_point & | timestamp, | ||
| ElapsedTimeStats & | stats ) |
We do not use the base class method void SetControlState(const std::string& value) because writing control state to OLDB is done frequently, and we want to use CiiOldbDataPointAsync and also keep the option to evaluate ElapsedTimeStats.
| void hlcc::trksim::OldbInterface::SetTrackingState | ( | const std::string & | value, |
| const taiclock::TaiClock::time_point & | timestamp, | ||
| ElapsedTimeStats & | stats ) |
Sets the LSV tracking state, which is separate from the application/control state.
| void hlcc::trksim::OldbInterface::SetTrsHksDataState | ( | bool | hks_data_ok | ) |
Sets the flag for the quality of the TRS HKS data such as DUT1 cached by this application. The impl currently uses the RAD oldb writer, which is fine as long as we don´t call this method from a fast loop.
| void hlcc::trksim::OldbInterface::UpdateHeartbeat | ( | ) |
| void hlcc::trksim::OldbInterface::WriteTrsHksData | ( | ptk::Dut1 | dut1, |
| ptk::Arcsecs | xp, | ||
| ptk::Arcsecs | yp ) |
Writes the TRS HKS data to the OLDB. The impl currently uses a plain CII oldb writer, which is fine as long as we don´t call this method from a fast loop.