diff options
-rw-r--r-- | .travis.yml | 4 | ||||
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | INSTALL | 1 | ||||
-rw-r--r-- | Makefile.am | 36 | ||||
-rw-r--r-- | configure.ac | 12 | ||||
-rw-r--r-- | src/DabMod.cpp | 7 | ||||
-rw-r--r-- | src/EtiReader.cpp | 5 | ||||
-rw-r--r-- | src/EtiReader.h | 8 | ||||
-rw-r--r-- | src/Utils.cpp | 3 |
9 files changed, 54 insertions, 24 deletions
diff --git a/.travis.yml b/.travis.yml index e664812..03ae6a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,6 +39,10 @@ matrix: compiler: gcc addons: *linuxaddons + - env: MATRIX_EVAL="CC=gcc-6 CXX=g++-6" CONF="--disable-output-uhd --enable-edi" + compiler: gcc + addons: *linuxaddons + - env: MATRIX_EVAL="CC=gcc-6 CXX=g++-6" CONF="--disable-output-uhd --enable-trace" compiler: gcc addons: *linuxaddons @@ -17,6 +17,8 @@ ODR-DabMod in this repository test purposes. Replace usage of non-portable Linux-only clock_gettime(). Add antenna selection to UHD and SoapySDR outputs. + Make EDI input optional (it's not well tested, unfinished and slows + compile time) 2017-11-18: Matthias P. Braendli <matthias@mpb.li> (v1.1.0): @@ -32,6 +32,7 @@ The configure script can be launch with a variety of options: This is meant for distribution package maintainers who want to use their own march option, and for people running into compilation issues due to -march=native. (e.g. GCC bug 70132 on ARM systems) + --enable-edi Enable the EDI input. Debugging options: You should not enable debug if you need good performance. By default, debug is disabled. diff --git a/Makefile.am b/Makefile.am index 9991d63..8393698 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,23 +1,23 @@ # Copyright (C) 2007, 2008, 2009, 2010 Her Majesty the Queen in Right # of Canada (Communications Research Center Canada) # -# Copyright (C) 2017 +# Copyright (C) 2018 # Matthias P. Braendli, matthias.braendli@mpb.li - +# # http://opendigitalradio.org - +# # This file is part of ODR-DabMod. -# +# # ODR-DabMod is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. -# +# # ODR-DabMod is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with ODR-DabMod. If not, see <http://www.gnu.org/licenses/>. @@ -146,17 +146,6 @@ odr_dabmod_SOURCES = src/DabMod.cpp \ src/zmq.hpp \ lib/crc.h \ lib/crc.c \ - lib/InetAddress.h \ - lib/InetAddress.cpp \ - lib/UdpSocket.h \ - lib/UdpSocket.cpp \ - lib/edi/buffer_unpack.hpp \ - lib/edi/eti.cpp \ - lib/edi/ETIDecoder.cpp \ - lib/edi/ETIDecoder.hpp \ - lib/edi/eti.hpp \ - lib/edi/PFT.cpp \ - lib/edi/PFT.hpp \ lib/fec/char.h \ lib/fec/decode_rs_char.c \ lib/fec/decode_rs.h \ @@ -167,3 +156,16 @@ odr_dabmod_SOURCES = src/DabMod.cpp \ lib/fec/init_rs.h \ lib/fec/rs-common.h +if COMPILE_EDI +odr_dabmod_SOURCES += lib/edi/buffer_unpack.hpp \ + lib/edi/eti.hpp \ + lib/edi/eti.cpp \ + lib/edi/ETIDecoder.hpp \ + lib/edi/ETIDecoder.cpp \ + lib/edi/PFT.hpp \ + lib/edi/PFT.cpp \ + lib/UdpSocket.h \ + lib/UdpSocket.cpp \ + lib/InetAddress.h \ + lib/InetAddress.cpp +endif diff --git a/configure.ac b/configure.ac index f32c9d8..5c357ce 100644 --- a/configure.ac +++ b/configure.ac @@ -65,11 +65,14 @@ AC_ARG_ENABLE([trace], [AS_HELP_STRING([--enable-trace], [Enable trace output])], [], [enable_trace=no]) -# ZeroMQ message queue input AC_ARG_ENABLE([zeromq], [AS_HELP_STRING([--disable-zeromq], [Disable ZeroMQ input, output and remote control])], [], [enable_zeromq=yes]) +AC_ARG_ENABLE([edi], + [AS_HELP_STRING([--enable-edi], [Enable EDI input])], + [], [enable_edi=no]) + AC_ARG_ENABLE([native], [AS_HELP_STRING([--disable-native], [Do not compile with -march=native])], [], [enable_native=yes]) @@ -137,6 +140,11 @@ AS_IF([test "x$enable_output_uhd" = "xyes"], AS_IF([test "x$enable_soapysdr" = "xyes"], [AC_DEFINE(HAVE_SOAPYSDR, [1], [Define if SoapySDR output is enabled])]) +AS_IF([test "x$enable_edi" = "xyes"], + [AC_DEFINE(HAVE_EDI, [1], [Define if EDI input is enabled]) ]) + +AM_CONDITIONAL([COMPILE_EDI], [test "x$enable_edi" = "xyes"]) + AX_BOOST_BASE([1.54.0], [], AC_MSG_ERROR([BOOST 1.54 or later is required])) AX_BOOST_SYSTEM AX_BOOST_THREAD @@ -231,7 +239,7 @@ echo "***********************************************" echo enabled="" disabled="" -for feat in debug prof trace output_uhd zeromq soapysdr +for feat in edi debug prof trace output_uhd zeromq soapysdr do eval var=\$enable_$feat AS_IF([test "x$var" = "xyes"], diff --git a/src/DabMod.cpp b/src/DabMod.cpp index d28e755..78393bd 100644 --- a/src/DabMod.cpp +++ b/src/DabMod.cpp @@ -3,7 +3,7 @@ Her Majesty the Queen in Right of Canada (Communications Research Center Canada) - Copyright (C) 2017 + Copyright (C) 2018 Matthias P. Braendli, matthias.braendli@mpb.li http://opendigitalradio.org @@ -279,6 +279,7 @@ int launch_modulator(int argc, char* argv[]) set_thread_name("modulator"); if (mod_settings.inputTransport == "edi") { +#ifdef HAVE_EDI EdiReader ediReader(mod_settings.tist_offset_s); EdiDecoder::ETIDecoder ediInput(ediReader, false); if (mod_settings.edi_max_delay_ms > 0.0f) { @@ -323,6 +324,10 @@ int launch_modulator(int argc, char* argv[]) rcs.check_faults(); } } +#else + throw std::runtime_error("Unable to open input: " + "EDI input transport selected, but not compiled in!"); +#endif // HAVE_EDI } else { shared_ptr<InputReader> inputReader; diff --git a/src/EtiReader.cpp b/src/EtiReader.cpp index 17f4953..a28deb2 100644 --- a/src/EtiReader.cpp +++ b/src/EtiReader.cpp @@ -2,7 +2,7 @@ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty the Queen in Right of Canada (Communications Research Center Canada) - Copyright (C) 2017 + Copyright (C) 2018 Matthias P. Braendli, matthias.braendli@mpb.li http://opendigitalradio.org @@ -304,6 +304,7 @@ uint32_t EtiReader::getPPSOffset() return timestamp; } +#ifdef HAVE_EDI EdiReader::EdiReader( double& tist_offset_s) : m_timestamp_decoder(tist_offset_s) @@ -569,4 +570,4 @@ bool EdiUdpInput::rxPacket() return false; } } - +#endif // HAVE_EDI diff --git a/src/EtiReader.h b/src/EtiReader.h index 8270592..eb97e3b 100644 --- a/src/EtiReader.h +++ b/src/EtiReader.h @@ -2,7 +2,7 @@ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty the Queen in Right of Canada (Communications Research Center Canada) - Copyright (C) 2017 + Copyright (C) 2018 Matthias P. Braendli, matthias.braendli@mpb.li http://opendigitalradio.org @@ -37,7 +37,9 @@ #include "SubchannelSource.h" #include "TimestampDecoder.h" #include "lib/edi/ETIDecoder.hpp" -#include "lib/UdpSocket.h" +#ifdef HAVE_EDI +# include "lib/UdpSocket.h" +#endif #include "ThreadsafeQueue.h" #include <vector> @@ -108,6 +110,7 @@ private: std::vector<std::shared_ptr<SubchannelSource> > mySources; }; +#ifdef HAVE_EDI /* The EdiReader extracts the necessary data using the EDI input library in * lib/edi */ @@ -203,4 +206,5 @@ class EdiUdpInput { UdpReceiver m_udp_rx; EdiDecoder::ETIDecoder& m_decoder; }; +#endif diff --git a/src/Utils.cpp b/src/Utils.cpp index b4816d3..eab4c7b 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -46,6 +46,9 @@ static void printHeader() #if defined(HAVE_ZEROMQ) "zeromq " << #endif +#ifdef HAVE_EDI + "EDI " << +#endif #if defined(HAVE_OUTPUT_UHD) "output_uhd " << #endif |