HLCC Documentation 2.2.0
Loading...
Searching...
No Matches
ambientData.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2020-2025 European Southern Observatory (ESO)
2//
3// SPDX-License-Identifier: LGPL-3.0-only
4
13#ifndef HLCC_TRKSIM_AMBIENTDATA_HPP
14#define HLCC_TRKSIM_AMBIENTDATA_HPP
15
16#include <mutex>
17#include <memory>
18
19#include <boost/asio/thread_pool.hpp>
20#include <taiclock/taiClock.hpp>
21#include "Ccsinsif.hpp"
22#include "Ccsinsdetif.hpp"
23
24#include "trksim/config.hpp"
26#include "trksim/monitoring.hpp"
27
28
29
30namespace hlcc::trksim {
31
35public:
39 AmbientData(std::shared_ptr<OldbInterface> oldb);
40
41 virtual ~AmbientData();
42
48 void RefreshAsm();
49
54 void RefreshAsmAsync();
55
60 double GetTemperature();
61
66 double GetPressure();
67
72 double GetHumidity();
73
79 double GetObservingWavelength() const;
80
84 void SetObservingWavelength(double observing_wavelength);
85
89 ptk::Dut1 GetDut1() const;
90
94 void SetDut1(ptk::Dut1 dut1);
95
99 const ptk::Radians GetXp();
100
105 const ptk::Radians GetYp();
106private:
107 mutable std::recursive_mutex m_mutex {};
108
116 boost::asio::thread_pool m_async_exec;
117
127 std::atomic<bool> m_reading_busy;
131 const ptk::Radians m_xp {0.0};
132
136 const ptk::Radians m_yp {0.0};
140 double m_temperature = 273.15;
141
145 double m_pressure = 70108;
146
150 double m_humidity = 0.1;
151
170 double m_observing_wavelength {650*1e-9};
171
177 ptk::Dut1 m_dut1 {0.0};
178
182 std::shared_ptr<OldbInterface> m_oldb;
183};
184
185} // namespace hlcc::trksim
186
187#endif // HLCC_TRKSIM_AMBIENTDATA_HPP
Definition ambientData.hpp:34
double GetTemperature()
Definition ambientData.cpp:86
virtual ~AmbientData()
Definition ambientData.cpp:36
const ptk::Radians GetYp()
Definition ambientData.cpp:135
void RefreshAsmAsync()
Definition ambientData.cpp:68
const ptk::Radians GetXp()
Definition ambientData.cpp:132
void RefreshAsm()
Definition ambientData.cpp:40
void SetObservingWavelength(double observing_wavelength)
Definition ambientData.cpp:110
AmbientData(std::shared_ptr< OldbInterface > oldb)
Definition ambientData.cpp:29
double GetHumidity()
Definition ambientData.cpp:98
ptk::Dut1 GetDut1() const
Definition ambientData.cpp:121
double GetPressure()
Definition ambientData.cpp:92
void SetDut1(ptk::Dut1 dut1)
Definition ambientData.cpp:127
double GetObservingWavelength() const
Definition ambientData.cpp:104
Definition actionMgr.cpp:35
Config class header file.
Performance and other monitoring.
OldbInterface class header file.