aboutsummaryrefslogtreecommitdiffstats
path: root/src/Utils.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2023-08-24 15:35:30 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2023-08-24 15:35:30 +0200
commitb102ff50555518606b8356bbc1dd70e233d0466c (patch)
treed7f52504d3ea43af6f379cd206bc2d8ab84c315a /src/Utils.h
parent61b3fa742e24acc6b1b7747b3e863dff43670d51 (diff)
downloaddabmod-b102ff50555518606b8356bbc1dd70e233d0466c.tar.gz
dabmod-b102ff50555518606b8356bbc1dd70e233d0466c.tar.bz2
dabmod-b102ff50555518606b8356bbc1dd70e233d0466c.zip
Add channel to SDR RC
Diffstat (limited to 'src/Utils.h')
-rw-r--r--src/Utils.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Utils.h b/src/Utils.h
index 367dd48..584a756 100644
--- a/src/Utils.h
+++ b/src/Utils.h
@@ -31,6 +31,7 @@
# include "config.h"
#endif
+#include <optional>
#include <string>
#include <chrono>
#include <cstdio>
@@ -54,8 +55,11 @@ int set_realtime_prio(int prio);
// Set the name of the thread
void set_thread_name(const char *name);
-// Convert a channel like 10A to a frequency
-double parseChannel(const std::string& chan);
+// Convert a channel like 10A to a frequency in Hz
+double parse_channel(const std::string& chan);
+
+// Convert a frequency in Hz to a channel.
+std::optional<std::string> convert_frequency_to_channel(double frequency);
// dabMode is either 1, 2, 3, 4, corresponding to TM I, TM II, TM III and TM IV.
// throws a runtime_error if dabMode is not one of these values.