aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ClockTAI.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2024-05-05 21:20:26 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2024-05-05 21:20:26 +0200
commitaaa415b62f6d1b815aa9a8954d2cf1ddb6a8317d (patch)
tree51636f716a7a3d67e93f8485b3f0e9ee0eb87eb0 /lib/ClockTAI.h
parentecc84973491dd29858eeaf986940d8cfe9986b7c (diff)
downloaddabmux-aaa415b62f6d1b815aa9a8954d2cf1ddb6a8317d.tar.gz
dabmux-aaa415b62f6d1b815aa9a8954d2cf1ddb6a8317d.tar.bz2
dabmux-aaa415b62f6d1b815aa9a8954d2cf1ddb6a8317d.zip
Update common: make remotecontrol optional
Diffstat (limited to 'lib/ClockTAI.h')
-rw-r--r--lib/ClockTAI.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/ClockTAI.h b/lib/ClockTAI.h
index 8cd00e5..d11dd10 100644
--- a/lib/ClockTAI.h
+++ b/lib/ClockTAI.h
@@ -35,8 +35,6 @@
#pragma once
#include <cstdint>
-#include <cstdlib>
-#include <sstream>
#include <chrono>
#include <future>
#include <mutex>
@@ -44,6 +42,7 @@
#include <vector>
#include <optional>
#include <variant>
+
#include "RemoteControl.h"
// EDI needs to know UTC-TAI, but doesn't need the CLOCK_TAI to be set.
@@ -86,7 +85,11 @@ class Bulletin {
};
/* Loads, parses and represents TAI-UTC offset information from the IETF bulletin */
-class ClockTAI : public RemoteControllable {
+class ClockTAI
+#if ENABLE_REMOTECONTROL
+: public RemoteControllable
+#endif // ENABLE_REMOTECONTROL
+{
public:
ClockTAI(const std::vector<std::string>& bulletin_urls);
@@ -125,6 +128,7 @@ class ClockTAI : public RemoteControllable {
std::optional<BulletinState> m_state;
std::chrono::steady_clock::time_point m_state_last_updated;
+#if ENABLE_REMOTECONTROL
public:
/* Remote control */
virtual void set_parameter(const std::string& parameter,
@@ -134,5 +138,6 @@ class ClockTAI : public RemoteControllable {
virtual const std::string get_parameter(const std::string& parameter) const;
virtual const json::map_t get_all_values() const;
+#endif // ENABLE_REMOTECONTROL
};