HLCC Documentation 3.0.1
Loading...
Searching...
No Matches
oldbInterface.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_TELIF_TELMON_OLDBINTERFACE_HPP
14#define HLCC_TELIF_TELMON_OLDBINTERFACE_HPP
15
16#include <string>
17#include <vector>
18#include <memory> // shared_ptr
19
21#include <rad/oldbInterface.hpp>
22#include <rad/cii/oldbAdapter.hpp>
23#include <rad/exceptions.hpp>
24#include "Stdif.hpp"
25#include "Ccsinsif.hpp"
26#include "Ccsinsdetif.hpp"
27#include "Ccsinsifextref.hpp"
28#include "Ccsinsifstroke.hpp"
29#include "Ccsinsifao.hpp"
31
32#include "telmon/config.hpp"
33
34namespace hlcc::telmon {
35
39class OldbInterface : public rad::OldbInterface {
40 public:
46 OldbInterface(const std::string& prefix="");
47
51 virtual ~OldbInterface();
52
57 void Init(Config& config);
58
59 void SetConfig(const hlcc::telmon::Config& cfg);
60
61 void SetControlState(const std::string& status) override;
62
64 std::string GetControlState();
65 void SetConfig(const rad::Config& cfg); // solves hidden virtual function
66 void UpdateHeartbeat();
67 OldbInterface(const OldbInterface&) = delete;
69
70 private:
71 std::shared_ptr<::stdif::Status> status_data;
72 std::shared_ptr<::hlcc::oldbmux::ObservablePublisher<::stdif::Status>> status_data_publisher;
73 std::shared_ptr<::hlcc::oldbmux::CiiOldbDataPointAsync<double>> heartbeat_subscriber;
74
84 boost::asio::thread_pool m_async_exec {3};
85
91 log4cplus::Logger m_logger_oldb_async;
92
93};
94
95} // namespace hlcc::eltpk
96
97#endif // HLCC_TELIF_TELMON_OLDBINTERFACE_HPP
Config class header file.
Definition config.hpp:262
OldbInterface(const OldbInterface &)=delete
std::string GetControlState()
Definition oldbInterface.cpp:260
OldbInterface & operator=(const OldbInterface &)=delete
Disable copy constructor.
void SetControlState(const std::string &status) override
Definition oldbInterface.cpp:244
OldbInterface(const std::string &prefix="")
Definition oldbInterface.cpp:47
void Init(Config &config)
Definition oldbInterface.cpp:63
virtual ~OldbInterface()
Definition oldbInterface.cpp:56
void UpdateHeartbeat()
Definition oldbInterface.cpp:251
void SetConfig(const hlcc::telmon::Config &cfg)
Definition oldbInterface.cpp:149
Definition actionMgr.cpp:31