diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-01-17 09:48:56 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-01-17 09:50:50 +0100 |
commit | 0b7d58968b37dc9d36a90d3fb439891a57b81a18 (patch) | |
tree | 22c3c5106b49d5364f7f926a440fee894889e545 /src/input | |
parent | c2e1b31a7c5a948b6155bc9fcaee4defbf4504bd (diff) | |
download | dabmux-0b7d58968b37dc9d36a90d3fb439891a57b81a18.tar.gz dabmux-0b7d58968b37dc9d36a90d3fb439891a57b81a18.tar.bz2 dabmux-0b7d58968b37dc9d36a90d3fb439891a57b81a18.zip |
Update ClockTAI and RemoteControl
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/Edi.cpp | 21 | ||||
-rw-r--r-- | src/input/Edi.h | 3 | ||||
-rw-r--r-- | src/input/Zmq.cpp | 12 | ||||
-rw-r--r-- | src/input/Zmq.h | 1 |
4 files changed, 34 insertions, 3 deletions
diff --git a/src/input/Edi.cpp b/src/input/Edi.cpp index 692ecb3..3838541 100644 --- a/src/input/Edi.cpp +++ b/src/input/Edi.cpp @@ -2,7 +2,7 @@ Copyright (C) 2009 Her Majesty the Queen in Right of Canada (Communications Research Center Canada) - Copyright (C) 2019 + Copyright (C) 2024 Matthias P. Braendli, matthias.braendli@mpb.li http://www.opendigitalradio.org @@ -470,7 +470,7 @@ const std::string Edi::get_parameter(const std::string& parameter) const ss << "prebuffering"; break; case Inputs::BufferManagement::Timestamped: - ss << "Timestamped"; + ss << "timestamped"; break; } } @@ -483,4 +483,21 @@ const std::string Edi::get_parameter(const std::string& parameter) const return ss.str(); } +const json::map_t Edi::get_all_values() const +{ + json::map_t map; + map["buffer"].v = m_max_frames_overrun; + map["prebuffering"].v = m_num_frames_prebuffering; + switch (getBufferManagement()) { + case Inputs::BufferManagement::Prebuffering: + map["buffermanagement"].v = "prebuffering"; + break; + case Inputs::BufferManagement::Timestamped: + map["buffermanagement"].v = "timestamped"; + break; + } + map["tistdelay"].v = m_tist_delay.count(); + return map; +} + } diff --git a/src/input/Edi.h b/src/input/Edi.h index cf4c576..3de17a7 100644 --- a/src/input/Edi.h +++ b/src/input/Edi.h @@ -2,7 +2,7 @@ Copyright (C) 2009 Her Majesty the Queen in Right of Canada (Communications Research Center Canada) - Copyright (C) 2019 + Copyright (C) 2024 Matthias P. Braendli, matthias.braendli@mpb.li http://www.opendigitalradio.org @@ -78,6 +78,7 @@ class Edi : public InputBase, public RemoteControllable { /* Remote control */ virtual void set_parameter(const std::string& parameter, const std::string& value); virtual const std::string get_parameter(const std::string& parameter) const; + virtual const json::map_t get_all_values() const; protected: void m_run(); diff --git a/src/input/Zmq.cpp b/src/input/Zmq.cpp index be3fd1f..d5e722e 100644 --- a/src/input/Zmq.cpp +++ b/src/input/Zmq.cpp @@ -614,7 +614,19 @@ const string ZmqBase::get_parameter(const string& parameter) const throw ParameterError(ss.str()); } return ss.str(); +} +const json::map_t ZmqBase::get_all_values() const +{ + json::map_t map; + map["buffer"].v = m_config.buffer_size; + map["prebuffering"].v = m_config.prebuffering; + map["enable"].v = m_enable_input; + map["encryption"].v = m_config.enable_encryption; + map["secretkey"].v = m_config.curve_secret_keyfile; + map["publickey"].v = m_config.curve_public_keyfile; + map["encoderkey"].v = m_config.curve_encoder_keyfile; + return map; } }; diff --git a/src/input/Zmq.h b/src/input/Zmq.h index c101da0..72fccbd 100644 --- a/src/input/Zmq.h +++ b/src/input/Zmq.h @@ -194,6 +194,7 @@ class ZmqBase : public InputBase, public RemoteControllable { /* Getting a parameter always returns a string. */ virtual const std::string get_parameter(const std::string& parameter) const; + virtual const json::map_t get_all_values() const; protected: virtual int readFromSocket(size_t framesize) = 0; |