diff options
-rw-r--r-- | INSTALL.md | 33 | ||||
-rw-r--r-- | src/ConfigParser.cpp | 6 | ||||
-rw-r--r-- | src/DabMod.cpp | 2 | ||||
-rw-r--r-- | src/Events.cpp | 10 | ||||
-rw-r--r-- | src/Events.h | 20 | ||||
-rw-r--r-- | src/Utils.cpp | 7 | ||||
-rw-r--r-- | src/Utils.h | 1 |
7 files changed, 29 insertions, 50 deletions
@@ -1,33 +1,18 @@ You have 3 ways to install odr-dabmod on your host: -# Using binary debian packages -If your host is running a debian-based OS on amd64, arm64 or arm/v7, then you can install this tool using the standard debian packaging system: -1. Update the debian apt repository list: - ``` - # Replace bullseye (debian-11) with bookworm (debian-12) if applicable +# Using your linux distribution packaging system +`odr-dabmod` is available on the official repositories of several debian-based distributions, such as Debian +(from Debian 12), Ubuntu (from 24.10), Opensuse and Arch. - curl -fsSL http://debian.opendigitalradio.org/opendigitalradio-bullseye.sources > /etc/apt/sources.list.d/opendigitalradio-bullseye.sources - - curl -fsSL http://debian.opendigitalradio.org/opendigitalradio.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/opendigitalradio.gpg - ``` -1. Refresh the debian packages list: - ``` - apt update - ``` -1. Install the package: - ``` - sudo apt install --yes odr-dabmod - ``` +If you are using Debian 12 (Bookworm), you will need to +[add the backports repository](https://backports.debian.org/Instructions/) **Notice**: this package does not include the web-based GUI and Digital Predistortion Computation engine -# Using the dab-scripts -You can compile this tool as well as the other main components of the mmbTools set with an installation script: -1. Clone the dab-scripts repository: - ``` - git clone https://github.com/opendigitalradio/dab-scripts.git - ``` -1. Follow the [instructions](https://github.com/Opendigitalradio/dab-scripts/tree/master/install) +# Using installation scripts +If your linux distribution is debian-based, you can install odr-dabmod +as well as the other main components of the mmbTools set with the +[Opendigitalradio dab-scripts](https://github.com/opendigitalradio/dab-scripts.git) # Compiling manually Unlike the 2 previous options, this one allows you to compile odr-dabmod with the features you really need. diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp index 5d9f6f3..c92a520 100644 --- a/src/ConfigParser.cpp +++ b/src/ConfigParser.cpp @@ -38,8 +38,6 @@ #include "Utils.h" #include "Log.h" #include "Events.h" -#include "DabModulator.h" -#include "output/SDR.h" using namespace std; @@ -145,7 +143,11 @@ static void parse_configfile( // log parameters: const string events_endpoint = pt.Get("log.events_endpoint", ""); if (not events_endpoint.empty()) { +#if defined(HAVE_ZEROMQ) events.bind(events_endpoint); +#else + throw std::runtime_error("Cannot configure events sender when compiled without zeromq"); +#endif } if (pt.GetInteger("log.syslog", 0) == 1) { diff --git a/src/DabMod.cpp b/src/DabMod.cpp index 361e0d4..7866818 100644 --- a/src/DabMod.cpp +++ b/src/DabMod.cpp @@ -380,7 +380,9 @@ int launch_modulator(int argc, char* argv[]) mod_settings_t mod_settings; parse_args(argc, argv, mod_settings); +#if defined(HAVE_ZEROMQ) etiLog.register_backend(make_shared<LogToEventSender>()); +#endif // defined(HAVE_ZEROMQ) etiLog.level(info) << "Configuration parsed. Starting up version " << #if defined(GITVERSION) diff --git a/src/Events.cpp b/src/Events.cpp index 3171cda..f8cc2b8 100644 --- a/src/Events.cpp +++ b/src/Events.cpp @@ -3,7 +3,7 @@ Her Majesty the Queen in Right of Canada (Communications Research Center Canada) - Copyright (C) 2023 + Copyright (C) 2024 Matthias P. Braendli, matthias.braendli@mpb.li http://www.opendigitalradio.org @@ -22,16 +22,13 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. */ -#include <list> #include <string> -#include <iostream> -#include <sstream> -#include <iomanip> #include <string> -#include <algorithm> #include "Events.h" +#if defined(HAVE_ZEROMQ) + EventSender events; EventSender::EventSender() : @@ -95,3 +92,4 @@ std::string LogToEventSender::get_name() const { return "EventSender"; } +#endif // defined(HAVE_ZEROMQ) diff --git a/src/Events.h b/src/Events.h index 9f838e5..ea1ace2 100644 --- a/src/Events.h +++ b/src/Events.h @@ -3,12 +3,10 @@ Her Majesty the Queen in Right of Canada (Communications Research Center Canada) - Copyright (C) 2023 + Copyright (C) 2024 Matthias P. Braendli, matthias.braendli@mpb.li http://www.opendigitalradio.org - - This module adds remote-control capability to some of the dabmux/dabmod modules. */ /* This program is free software: you can redistribute it and/or modify @@ -33,18 +31,9 @@ #if defined(HAVE_ZEROMQ) # include "zmq.hpp" -#endif - -#include <list> -#include <unordered_map> -#include <variant> -#include <map> -#include <memory> -#include <string> -#include <stdexcept> - -#include "Log.h" -#include "Json.h" +# include <string> +# include "Log.h" +# include "Json.h" class EventSender { public: @@ -75,3 +64,4 @@ class LogToEventSender: public LogBackend { * It is constructed in Events.cpp */ extern EventSender events; +#endif // defined(HAVE_ZEROMQ) diff --git a/src/Utils.cpp b/src/Utils.cpp index f54122c..f947acd 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -25,14 +25,17 @@ along with ODR-DabMod. If not, see <http://www.gnu.org/licenses/>. */ +#include "Utils.h" + #include <ctime> #include <cstring> #include <sstream> -#include "Utils.h" +#include <iomanip> +#include <pthread.h> #if defined(HAVE_PRCTL) # include <sys/prctl.h> #endif -#include <pthread.h> + static void printHeader() { diff --git a/src/Utils.h b/src/Utils.h index 584a756..b71c3b2 100644 --- a/src/Utils.h +++ b/src/Utils.h @@ -37,7 +37,6 @@ #include <cstdio> #include <ctime> #include <cstdlib> -#include <cstdint> #include <unistd.h> #include "ConfigParser.h" |