diff options
Diffstat (limited to 'src/Utils.h')
-rw-r--r-- | src/Utils.h | 8 |
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. |