aboutsummaryrefslogtreecommitdiffstats
path: root/src/ClockTAI.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-12-18 10:06:07 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-12-18 10:06:07 +0100
commit5a0633d70a82e15f63a006489ffa1544fa37cb90 (patch)
tree5bc9ff8c7721a7f15b5fa322d50ebeed51225e9a /src/ClockTAI.h
parentc56781de33a257cc83978132dee0b28e2cbfc719 (diff)
downloaddabmux-5a0633d70a82e15f63a006489ffa1544fa37cb90.tar.gz
dabmux-5a0633d70a82e15f63a006489ffa1544fa37cb90.tar.bz2
dabmux-5a0633d70a82e15f63a006489ffa1544fa37cb90.zip
Allow user to specify TAI bulletin URLs
Diffstat (limited to 'src/ClockTAI.h')
-rw-r--r--src/ClockTAI.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ClockTAI.h b/src/ClockTAI.h
index e0dc439..4436ba9 100644
--- a/src/ClockTAI.h
+++ b/src/ClockTAI.h
@@ -40,6 +40,8 @@
#include <chrono>
#include <future>
#include <mutex>
+#include <string>
+#include <vector>
#include "RemoteControl.h"
// EDI needs to know UTC-TAI, but doesn't need the CLOCK_TAI to be set.
@@ -49,7 +51,7 @@
/* Loads, parses and represents TAI-UTC offset information from the IETF bulletin */
class ClockTAI : public RemoteControllable {
public:
- ClockTAI();
+ ClockTAI(const std::vector<std::string>& bulletin_urls);
// Fetch the bulletin from the IETF website and return the current
// TAI-UTC offset.
@@ -81,6 +83,8 @@ class ClockTAI : public RemoteControllable {
int m_offset = 0;
int m_offset_valid = false;
+ std::vector<std::string> m_bulletin_urls;
+
mutable std::stringstream m_bulletin;
std::chrono::system_clock::time_point m_bulletin_download_time;