From 1c9e1fdb3c438d79bbfc47ac9711267b6e5336c3 Mon Sep 17 00:00:00 2001 From: Andrew Benson Date: Wed, 14 Aug 2019 17:10:56 -0500 Subject: [PATCH 1/7] New package: mpir-3.0.0 --- common/shlibs | 2 ++ srcpkgs/mpir-devel | 1 + srcpkgs/mpir/template | 24 ++++++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 120000 srcpkgs/mpir-devel create mode 100644 srcpkgs/mpir/template diff --git a/common/shlibs b/common/shlibs index 611abc88b12..712264cdec8 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3709,3 +3709,5 @@ libnvpair.so.1 zfs-0.8.2_1 libjsonnet.so.0 jsonnet-0.14.0_2 libjsonnet++.so.0 jsonnet-0.14.0_2 libigdgmm.so.12 intel-gmmlib-19.3.4_1 +libmpir.so.23 mpir-3.0.0_1 +libmpirxx.so.8 mpir-3.0.0_1 diff --git a/srcpkgs/mpir-devel b/srcpkgs/mpir-devel new file mode 120000 index 00000000000..a316ff20552 --- /dev/null +++ b/srcpkgs/mpir-devel @@ -0,0 +1 @@ +mpir \ No newline at end of file diff --git a/srcpkgs/mpir/template b/srcpkgs/mpir/template new file mode 100644 index 00000000000..2b35d50eec8 --- /dev/null +++ b/srcpkgs/mpir/template @@ -0,0 +1,24 @@ +# Template file for 'mpir' +pkgname=mpir +version=3.0.0 +revision=1 +build_style=gnu-configure +configure_args="--enable-cxx" +hostmakedepends="m4 yasm" +short_desc="Multiple Precision Integers and Rationals" +maintainer="Andrew Benson " +license="LGPL-3.0-or-later" +homepage="http://mpir.org" +distfiles="${homepage}/mpir-${version}.tar.bz2" +checksum=52f63459cf3f9478859de29e00357f004050ead70b45913f2c2269d9708675bb + +mpir-devel_package() { + short_desc+=" - development files" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/include + vmove usr/share + vmove "usr/lib/*.a" + vmove "usr/lib/*.so" + } +} From 0d41278cc023a85dfd56c62b74a3737da4409950 Mon Sep 17 00:00:00 2001 From: Andrew Benson Date: Wed, 14 Aug 2019 16:49:08 -0500 Subject: [PATCH 2/7] volk: update to 2.1.0. --- common/shlibs | 19 ++++++++++++++++++- srcpkgs/volk/template | 15 ++++++++------- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/common/shlibs b/common/shlibs index 712264cdec8..fe785751f0d 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3083,7 +3083,7 @@ libarcan_shmif_server.so.0.11 arcan-0.5.4.3_1 libarcan_tui.so.0.11 arcan-0.5.4.3_1 liblwipv6.so.2 lwipv6-1.5a_1 libpipewire-0.2.so.1 libpipewire-0.2.2_1 -libvolk.so.1.4 volk-1.4_1 +libvolk.so.2.0 volk-2.0.0_1 libgnuradio-runtime-3.7.13.5.so.0.0.0 gnuradio-3.7.13.5_1 libgnuradio-pmt-3.7.13.5.so.0.0.0 gnuradio-3.7.13.5_1 libgnuradio-blocks-3.7.13.5.so.0.0.0 gnuradio-3.7.13.5_1 @@ -3105,6 +3105,23 @@ libgnuradio-fcd-3.7.13.5.so.0.0.0 gnuradio-3.7.13.5_1 libgnuradio-wavelet-3.7.13.5.so.0.0.0 gnuradio-3.7.13.5_1 libgnuradio-wxgui-3.7.13.5.so.0.0.0 gnuradio-3.7.13.5_1 libgnuradio-uhd-3.7.13.5.so.0.0.0 gnuradio-3.7.13.5_1 +libvolk.so.2.1 volk-2.1.0_1 +libgnuradio-runtime.so.3.8.0 gnuradio-3.8.0.0_1 +libgnuradio-pmt.so.3.8.0 gnuradio-3.8.0.0_1 +libgnuradio-blocks.so.3.8.0 gnuradio-3.8.0.0_1 +libgnuradio-audio.so.3.8.0 gnuradio-3.8.0.0_1 +libgnuradio-fec.so.3.8.0 gnuradio-3.8.0.0_1 +libgnuradio-fft.so.3.8.0 gnuradio-3.8.0.0_1 +libgnuradio-filter.so.3.8.0 gnuradio-3.8.0.0_1 +libgnuradio-analog.so.3.8.0 gnuradio-3.8.0.0_1 +libgnuradio-digital.so.3.8.0 gnuradio-3.8.0.0_1 +libgnuradio-dtv.so.3.8.0 gnuradio-3.8.0.0_1 +libgnuradio-channels.so.3.8.0 gnuradio-3.8.0.0_1 +libgnuradio-trellis.so.3.8.0 gnuradio-3.8.0.0_1 +libgnuradio-video-sdl.so.3.8.0 gnuradio-3.8.0.0_1 +libgnuradio-vocoder.so.3.8.0 gnuradio-3.8.0.0_1 +libgnuradio-wavelet.so.3.8.0 gnuradio-3.8.0.0_1 +libgnuradio-uhd.so.3.8.0 gnuradio-3.8.0.0_1 libgnuradio-osmosdr-0.1.4.so.0.0.0 gnuradio-osmosdr-0.1.4_1 libflann_cpp.so.1.9 flann-1.9.1_1 libflann.so.1.9 flann-1.9.1_1 diff --git a/srcpkgs/volk/template b/srcpkgs/volk/template index abcb263cb0b..a95eb127f14 100644 --- a/srcpkgs/volk/template +++ b/srcpkgs/volk/template @@ -1,18 +1,19 @@ # Template file for 'volk' pkgname=volk -version=1.4 -revision=4 +version=2.1.0 +revision=1 build_style=cmake -hostmakedepends="pkg-config python-cheetah git python-Mako - python-six" -makedepends="boost-devel python-cheetah python-devel - python-Mako python-six" +hostmakedepends="pkg-config python3-cheetah3 git python3-Mako + python3-six" +makedepends="boost-devel python3-cheetah3 python3-devel + python3-Mako python3-six" short_desc="Vector-Optimized Library of Kernels" maintainer="Andrew Benson " license="GPL-3.0-or-later" homepage="http://libvolk.org/" distfiles="https://github.com/gnuradio/volk/archive/v${version}.tar.gz" -checksum=32131ba17846850c07270bc5897dd2de7130ec02ca029875a36966335120e7bf +checksum=fe422f10b880d10cb72bdd1a3362a0f65d2d6d655dd1296459773c89fae51781 +nocross="not complete for arm" case "$XBPS_TARGET_MACHINE" in armv6l*) From bc74a02dfb1b1aaa35ecc433884b3ccdcd615397 Mon Sep 17 00:00:00 2001 From: Andrew Benson Date: Wed, 14 Aug 2019 16:49:11 -0500 Subject: [PATCH 3/7] gnuradio: update to 3.8.0.0. --- srcpkgs/gnuradio/template | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/srcpkgs/gnuradio/template b/srcpkgs/gnuradio/template index d450b7674be..fd2d51920c9 100644 --- a/srcpkgs/gnuradio/template +++ b/srcpkgs/gnuradio/template @@ -1,23 +1,24 @@ # Template file for 'gnuradio' pkgname=gnuradio -version=3.7.13.5 -revision=2 +version=3.8.0.0 +revision=1 build_style=cmake -nocross="relies on volk, which is not complete for arm" conf_files="/etc/gnuradio/conf.d/*" -configure_args="-DENABLE_INTERNAL_VOLK=OFF" -pycompile_module="gnuradio grc_gnuradio pmt" -hostmakedepends="pkg-config doxygen swig python-cheetah python-lxml - python-numpy python-Sphinx" +configure_args="-DENABLE_INTERNAL_VOLK=OFF -DGR_PYTHON_DIR=${py3_sitelib}" +pycompile_module="gnuradio pmt" +hostmakedepends="pkg-config doxygen swig python3-Mako python3-Sphinx + python3-cairo python3-numpy python3-yaml" makedepends="SDL-devel boost-devel fftw-devel gsl-devel jack-devel libgsm-devel - libusb-devel pygtk-devel volk-devel wxPython-devel uhd-devel python-devel" -depends="pygtk python-cheetah python-lxml python-numpy" + libusb-devel volk-devel uhd-devel gtk+3-devel python3-devel python3-gobject-devel + log4cpp-devel gmpxx-devel mpir-devel" +depends="python3-cheetah3 python3-numpy python3-Mako python3-gobject python3-yaml" short_desc="Framework for software defined radio" maintainer="Andrew Benson " license="GPL-3.0-or-later" homepage="https://www.gnuradio.org" distfiles="https://github.com/gnuradio/gnuradio/archive/v${version}.tar.gz" -checksum=9afcd0e4499160bce17c8c5c100f461791ad26b4bcb967d956fb9567e74dd57f +checksum=03fd01f0b27033befb91709b3d56f95e0869b5fb8bc71bec2662266a3f0dedf5 +nocross="relies on volk, which is not complete for arm" if [ "$CROSS_BUILD" ]; then nocross="https://build.voidlinux.org/builders/armv7l_builder/builds/7596/steps/shell_3/logs/stdio" @@ -25,7 +26,6 @@ fi post_install() { rm ${DESTDIR}/usr/share/gnuradio/examples/audio/dial_tone \ - ${DESTDIR}/usr/share/gnuradio/examples/fcd/fcd_nfm_rx \ ${DESTDIR}/usr/share/gnuradio/examples/uhd/tags_demo vinstall grc/scripts/freedesktop/gnuradio-grc.desktop 644 \ usr/share/applications From 41449b493c20ac43411aa052814da2ea16bcf4f3 Mon Sep 17 00:00:00 2001 From: Andrew Benson Date: Wed, 4 Sep 2019 21:19:55 -0500 Subject: [PATCH 4/7] gqrx: rebuild for gnuradio --- srcpkgs/gqrx/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/gqrx/template b/srcpkgs/gqrx/template index 9fbb38c9392..968d118506d 100644 --- a/srcpkgs/gqrx/template +++ b/srcpkgs/gqrx/template @@ -1,7 +1,7 @@ # Template file for 'gqrx' pkgname=gqrx version=2.11.5 -revision=5 +revision=6 wrksrc="gqrx-sdr-${version}" build_style=cmake configure_args="$(vopt_if gr_audio -DLINUX_AUDIO_BACKEND=Gr-audio) From 42c1fb9af7c30051226d9a4bc832acc53581642d Mon Sep 17 00:00:00 2001 From: Andrew Benson Date: Wed, 4 Sep 2019 21:19:55 -0500 Subject: [PATCH 5/7] gnuradio-osmosdr: update to 0.1.5. --- srcpkgs/gnuradio-osmosdr/template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/gnuradio-osmosdr/template b/srcpkgs/gnuradio-osmosdr/template index 83603dd207d..7c27426de2d 100644 --- a/srcpkgs/gnuradio-osmosdr/template +++ b/srcpkgs/gnuradio-osmosdr/template @@ -1,19 +1,19 @@ # Template file for 'gnuradio-osmosdr' pkgname=gnuradio-osmosdr -version=0.1.4 -revision=6 +version=0.1.5 +revision=1 wrksrc="gr-osmosdr-${version}" build_style=cmake pycompile_module="osmosdr" hostmakedepends="pkg-config python-cheetah swig" makedepends="boost-devel gnuradio-devel libairspy-devel libhackrf-devel librtlsdr-devel - python-devel uhd-devel" + python3-devel uhd-devel log4cpp-devel gmp-devel mpir-devel SoapySDR-devel" short_desc="GNU Radio source block for rtlsdr, hackrf and airspy" maintainer="bra1nwave " license="GPL-3.0-or-later" homepage="https://sdr.osmocom.org/trac/" distfiles="https://github.com/osmocom/gr-osmosdr/archive/v${version}.tar.gz" -checksum=bcf9a9b1760e667c41a354e8cd41ef911d0929d5e4a18e0594ccb3320d735066 +checksum=a5820e80465d895a9b4b73e0ff01924d6b612a9a390bbd3488177379a9539d00 gnuradio-osmosdr-devel_package() { short_desc+=" - development files" From 0f2da46b1a311f581ac8268ee90f4f782f052524 Mon Sep 17 00:00:00 2001 From: Andrew Benson Date: Wed, 4 Sep 2019 21:19:56 -0500 Subject: [PATCH 6/7] gnuradio-nrsc5: rebuild for gnuradio --- srcpkgs/gnuradio-nrsc5/patches/py3.8.patch | 13121 +++++++++++++++++++ srcpkgs/gnuradio-nrsc5/template | 6 +- 2 files changed, 13125 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/gnuradio-nrsc5/patches/py3.8.patch diff --git a/srcpkgs/gnuradio-nrsc5/patches/py3.8.patch b/srcpkgs/gnuradio-nrsc5/patches/py3.8.patch new file mode 100644 index 00000000000..902a0de4355 --- /dev/null +++ b/srcpkgs/gnuradio-nrsc5/patches/py3.8.patch @@ -0,0 +1,13121 @@ +https://github.com/argilo/gr-nrsc5/commit/4f5fe69e69dd2dcef99582f7d4393660f78308bf.patch + +From 4f5fe69e69dd2dcef99582f7d4393660f78308bf Mon Sep 17 00:00:00 2001 +From: Clayton Smith +Date: Sat, 27 Jul 2019 10:34:29 -0400 +Subject: [PATCH] GNU Radio 3.8 support. + +--- + CMakeLists.txt | 147 +- + README.md | 1 - + apps/CMakeLists.txt | 3 +- + apps/hd_tx_hackrf.grc | 2679 ------------- + apps/hd_tx_hackrf.py | 157 - + apps/hd_tx_rtl_file.grc | 1908 +++------- + apps/hd_tx_rtl_file.py | 52 +- + apps/hd_tx_usrp.grc | 3333 +++++------------ + apps/hd_tx_usrp.py | 90 +- + cmake/Modules/CMakeParseArgumentsCopy.cmake | 2 +- + cmake/Modules/FindCppUnit.cmake | 39 - + cmake/Modules/FindGnuradioRuntime.cmake | 36 - + cmake/Modules/GrMiscUtils.cmake | 528 --- + cmake/Modules/GrPlatform.cmake | 62 - + cmake/Modules/GrPython.cmake | 241 -- + cmake/Modules/GrSwig.cmake | 256 -- + cmake/Modules/GrTest.cmake | 143 - + cmake/Modules/UseSWIG.cmake | 304 -- + cmake/Modules/nrsc5Config.cmake | 5 +- + .../Modules/targetConfig.cmake.in | 40 +- + docs/CMakeLists.txt | 3 +- + docs/doxygen/CMakeLists.txt | 3 +- + docs/doxygen/Doxyfile.in | 10 +- + docs/doxygen/Doxyfile.swig_doc.in | 8 +- + docs/doxygen/doxyxml/__init__.py | 6 +- + docs/doxygen/doxyxml/base.py | 21 +- + docs/doxygen/doxyxml/doxyindex.py | 11 +- + docs/doxygen/doxyxml/generated/__init__.py | 1 + + docs/doxygen/doxyxml/generated/compound.py | 8 +- + .../doxyxml/generated/compoundsuper.py | 40 +- + docs/doxygen/doxyxml/generated/index.py | 6 +- + docs/doxygen/doxyxml/generated/indexsuper.py | 21 +- + docs/doxygen/doxyxml/text.py | 8 +- + docs/doxygen/swig_doc.py | 26 +- + grc/CMakeLists.txt | 27 +- + grc/nrsc5_hdc_encoder.block.yml | 33 + + grc/nrsc5_hdc_encoder.xml | 31 - + grc/nrsc5_l1_fm_encoder_mp1.block.yml | 26 + + grc/nrsc5_l1_fm_encoder_mp1.xml | 23 - + grc/nrsc5_l1_fm_encoder_mp11.block.yml | 34 + + grc/nrsc5_l1_fm_encoder_mp11.xml | 33 - + grc/nrsc5_l1_fm_encoder_mp2.block.yml | 30 + + grc/nrsc5_l1_fm_encoder_mp2.xml | 28 - + grc/nrsc5_l1_fm_encoder_mp3.block.yml | 30 + + grc/nrsc5_l1_fm_encoder_mp3.xml | 28 - + grc/nrsc5_l1_fm_encoder_mp5.block.yml | 34 + + grc/nrsc5_l1_fm_encoder_mp5.xml | 33 - + grc/nrsc5_l1_fm_encoder_mp5_ms1.block.yml | 46 + + grc/nrsc5_l1_fm_encoder_mp5_ms1.xml | 48 - + grc/nrsc5_l1_fm_encoder_mp6.block.yml | 30 + + grc/nrsc5_l1_fm_encoder_mp6.xml | 28 - + grc/nrsc5_l1_fm_encoder_mp6_ms1.block.yml | 42 + + grc/nrsc5_l1_fm_encoder_mp6_ms1.xml | 43 - + grc/nrsc5_l2_encoder.block.yml | 44 + + grc/nrsc5_l2_encoder.xml | 71 - + grc/nrsc5_psd_encoder.block.yml | 31 + + grc/nrsc5_psd_encoder.xml | 31 - + grc/nrsc5_sis_encoder.block.yml | 24 + + grc/nrsc5_sis_encoder.xml | 20 - + include/nrsc5/CMakeLists.txt | 9 +- + include/nrsc5/api.h | 3 +- + include/nrsc5/hdc_encoder.h | 1 - + include/nrsc5/l1_fm_encoder.h | 1 - + include/nrsc5/l2_encoder.h | 1 - + include/nrsc5/psd_encoder.h | 1 - + include/nrsc5/sis_encoder.h | 1 - + lib/CMakeLists.txt | 64 +- + lib/hdc_encoder_impl.cc | 1 + + lib/hdc_encoder_impl.h | 1 + + lib/l1_fm_encoder_impl.cc | 1 + + lib/l1_fm_encoder_impl.h | 1 + + lib/l2_encoder_impl.cc | 1 + + lib/l2_encoder_impl.h | 1 + + lib/psd_encoder_impl.cc | 1 + + lib/qa_nrsc5.cc | 36 - + lib/qa_nrsc5.h | 38 - + lib/sis_encoder_impl.cc | 1 + + lib/test_nrsc5.cc | 48 - + python/CMakeLists.txt | 7 +- + python/__init__.py | 7 +- + python/build_utils.py | 226 -- + python/qa_hdc_encoder.py | 14 +- + python/qa_l1_fm_encoder.py | 14 +- + python/qa_l2_encoder.py | 14 +- + python/qa_psd_encoder.py | 14 +- + python/qa_sis_encoder.py | 14 +- + swig/CMakeLists.txt | 15 +- + swig/nrsc5_swig.i | 15 +- + 88 files changed, 2112 insertions(+), 9485 deletions(-) + delete mode 100644 apps/hd_tx_hackrf.grc + delete mode 100755 apps/hd_tx_hackrf.py + delete mode 100644 cmake/Modules/FindCppUnit.cmake + delete mode 100644 cmake/Modules/FindGnuradioRuntime.cmake + delete mode 100644 cmake/Modules/GrMiscUtils.cmake + delete mode 100644 cmake/Modules/GrPlatform.cmake + delete mode 100644 cmake/Modules/GrPython.cmake + delete mode 100644 cmake/Modules/GrSwig.cmake + delete mode 100644 cmake/Modules/GrTest.cmake + delete mode 100644 cmake/Modules/UseSWIG.cmake + rename python/build_utils_codes.py => cmake/Modules/targetConfig.cmake.in (52%) + create mode 100644 grc/nrsc5_hdc_encoder.block.yml + delete mode 100644 grc/nrsc5_hdc_encoder.xml + create mode 100644 grc/nrsc5_l1_fm_encoder_mp1.block.yml + delete mode 100644 grc/nrsc5_l1_fm_encoder_mp1.xml + create mode 100644 grc/nrsc5_l1_fm_encoder_mp11.block.yml + delete mode 100644 grc/nrsc5_l1_fm_encoder_mp11.xml + create mode 100644 grc/nrsc5_l1_fm_encoder_mp2.block.yml + delete mode 100644 grc/nrsc5_l1_fm_encoder_mp2.xml + create mode 100644 grc/nrsc5_l1_fm_encoder_mp3.block.yml + delete mode 100644 grc/nrsc5_l1_fm_encoder_mp3.xml + create mode 100644 grc/nrsc5_l1_fm_encoder_mp5.block.yml + delete mode 100644 grc/nrsc5_l1_fm_encoder_mp5.xml + create mode 100644 grc/nrsc5_l1_fm_encoder_mp5_ms1.block.yml + delete mode 100644 grc/nrsc5_l1_fm_encoder_mp5_ms1.xml + create mode 100644 grc/nrsc5_l1_fm_encoder_mp6.block.yml + delete mode 100644 grc/nrsc5_l1_fm_encoder_mp6.xml + create mode 100644 grc/nrsc5_l1_fm_encoder_mp6_ms1.block.yml + delete mode 100644 grc/nrsc5_l1_fm_encoder_mp6_ms1.xml + create mode 100644 grc/nrsc5_l2_encoder.block.yml + delete mode 100644 grc/nrsc5_l2_encoder.xml + create mode 100644 grc/nrsc5_psd_encoder.block.yml + delete mode 100644 grc/nrsc5_psd_encoder.xml + create mode 100644 grc/nrsc5_sis_encoder.block.yml + delete mode 100644 grc/nrsc5_sis_encoder.xml + delete mode 100644 lib/qa_nrsc5.cc + delete mode 100644 lib/qa_nrsc5.h + delete mode 100644 lib/test_nrsc5.cc + delete mode 100644 python/build_utils.py + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1beb55f..dd5c257 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,7 @@ +-# Copyright 2011,2012,2014,2016 Free Software Foundation, Inc. ++# Copyright 2011,2012,2014,2016,2018 Free Software Foundation, Inc. + # +-# This file is part of GNU Radio ++# This file was generated by gr_modtool, a tool from the GNU Radio framework ++# This file is a part of gr-nrsc5 + # + # GNU Radio is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -20,94 +21,86 @@ + ######################################################################## + # Project setup + ######################################################################## +-cmake_minimum_required(VERSION 2.6) ++cmake_minimum_required(VERSION 3.8) + project(gr-nrsc5 CXX C) + enable_testing() + +-#install to PyBOMBS target prefix if defined ++# Install to PyBOMBS target prefix if defined + if(DEFINED ENV{PYBOMBS_PREFIX}) + set(CMAKE_INSTALL_PREFIX $ENV{PYBOMBS_PREFIX}) + message(STATUS "PyBOMBS installed GNU Radio. Setting CMAKE_INSTALL_PREFIX to $ENV{PYBOMBS_PREFIX}") + endif() + +-#select the release build type by default to get optimization flags ++# Select the release build type by default to get optimization flags + if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release") + message(STATUS "Build type not specified: defaulting to release.") + endif(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "") + +-#make sure our local CMake Modules path comes first ++# Make sure our local CMake Modules path comes first + list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules) + + # Set the version information here +-set(VERSION_INFO_MAJOR_VERSION 1) +-set(VERSION_INFO_API_COMPAT 0) +-set(VERSION_INFO_MINOR_VERSION 0) +-set(VERSION_INFO_MAINT_VERSION git) ++set(VERSION_MAJOR 1) ++set(VERSION_API 0) ++set(VERSION_ABI 0) ++set(VERSION_PATCH git) + +-# Set cmake policies. +-# This will suppress developer warnings during the cmake process that can occur +-# if a newer cmake version than the minimum is used. ++cmake_policy(SET CMP0011 NEW) + +-if(POLICY CMP0026) +- cmake_policy(SET CMP0026 OLD) +-endif() +-if(POLICY CMP0043) +- cmake_policy(SET CMP0043 OLD) +-endif() +-if(POLICY CMP0045) +- cmake_policy(SET CMP0045 OLD) +-endif() +-if(POLICY CMP0046) +- cmake_policy(SET CMP0046 OLD) +-endif() ++# Enable generation of compile_commands.json for code completion engines ++set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + + ######################################################################## + # Compiler specific setup + ######################################################################## +-if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32) ++if((CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR ++ CMAKE_CXX_COMPILER_ID STREQUAL "GNU") ++ AND NOT WIN32) + #http://gcc.gnu.org/wiki/Visibility + add_definitions(-fvisibility=hidden) + endif() + +-######################################################################## +-# Find boost +-######################################################################## +-if(UNIX AND EXISTS "/usr/lib64") +- list(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix +-endif(UNIX AND EXISTS "/usr/lib64") +-set(Boost_ADDITIONAL_VERSIONS +- "1.35.0" "1.35" "1.36.0" "1.36" "1.37.0" "1.37" "1.38.0" "1.38" "1.39.0" "1.39" +- "1.40.0" "1.40" "1.41.0" "1.41" "1.42.0" "1.42" "1.43.0" "1.43" "1.44.0" "1.44" +- "1.45.0" "1.45" "1.46.0" "1.46" "1.47.0" "1.47" "1.48.0" "1.48" "1.49.0" "1.49" +- "1.50.0" "1.50" "1.51.0" "1.51" "1.52.0" "1.52" "1.53.0" "1.53" "1.54.0" "1.54" +- "1.55.0" "1.55" "1.56.0" "1.56" "1.57.0" "1.57" "1.58.0" "1.58" "1.59.0" "1.59" +- "1.60.0" "1.60" "1.61.0" "1.61" "1.62.0" "1.62" "1.63.0" "1.63" "1.64.0" "1.64" +- "1.65.0" "1.65" "1.66.0" "1.66" "1.67.0" "1.67" "1.68.0" "1.68" "1.69.0" "1.69" +-) +-find_package(Boost "1.35" COMPONENTS filesystem system) +- +-if(NOT Boost_FOUND) +- message(FATAL_ERROR "Boost required to compile nrsc5") +-endif() ++IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") ++ SET(CMAKE_CXX_STANDARD 11) ++ELSEIF(CMAKE_CXX_COMPILER_ID MATCHES "Clang") ++ SET(CMAKE_CXX_STANDARD 11) ++ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") ++ SET(CMAKE_CXX_STANDARD 11) ++ELSE() ++ message(WARNING "C++ standard could not be set because compiler is not GNU, Clang or MSVC.") ++ENDIF() ++ ++IF(CMAKE_C_COMPILER_ID STREQUAL "GNU") ++ SET(CMAKE_C_STANDARD 11) ++ELSEIF(CMAKE_C_COMPILER_ID MATCHES "Clang") ++ SET(CMAKE_C_STANDARD 11) ++ELSEIF(CMAKE_C_COMPILER_ID STREQUAL "MSVC") ++ SET(CMAKE_C_STANDARD 11) ++ELSE() ++ message(WARNING "C standard could not be set because compiler is not GNU, Clang or MSVC.") ++ENDIF() + + ######################################################################## + # Install directories + ######################################################################## ++find_package(Gnuradio "3.8" REQUIRED COMPONENTS blocks fec) ++find_package(GSL) ++include(GrVersion) ++ + include(GrPlatform) #define LIB_SUFFIX +-set(GR_RUNTIME_DIR bin) +-set(GR_LIBRARY_DIR lib${LIB_SUFFIX}) ++ ++if(NOT CMAKE_MODULES_DIR) ++ set(CMAKE_MODULES_DIR lib${LIB_SUFFIX}/cmake) ++endif(NOT CMAKE_MODULES_DIR) ++ + set(GR_INCLUDE_DIR include/nrsc5) +-set(GR_DATA_DIR share) ++set(GR_CMAKE_DIR ${CMAKE_MODULES_DIR}/nrsc5) + set(GR_PKG_DATA_DIR ${GR_DATA_DIR}/${CMAKE_PROJECT_NAME}) +-set(GR_DOC_DIR ${GR_DATA_DIR}/doc) + set(GR_PKG_DOC_DIR ${GR_DOC_DIR}/${CMAKE_PROJECT_NAME}) +-set(GR_CONF_DIR etc) + set(GR_PKG_CONF_DIR ${GR_CONF_DIR}/${CMAKE_PROJECT_NAME}/conf.d) +-set(GR_LIBEXEC_DIR libexec) + set(GR_PKG_LIBEXEC_DIR ${GR_LIBEXEC_DIR}/${CMAKE_PROJECT_NAME}) +-set(GRC_BLOCKS_DIR ${GR_PKG_DATA_DIR}/grc/blocks) + + ######################################################################## + # On Apple only, set install name and use rpath correctly, if not already set +@@ -132,54 +125,17 @@ endif(APPLE) + ######################################################################## + # Find gnuradio build dependencies + ######################################################################## +-find_package(CppUnit) + find_package(Doxygen) + +-# Search for GNU Radio and its components and versions. Add any +-# components required to the list of GR_REQUIRED_COMPONENTS (in all +-# caps such as FILTER or FFT) and change the version to the minimum +-# API compatible version required. +-set(GR_REQUIRED_COMPONENTS RUNTIME FEC PMT) +-find_package(Gnuradio "3.7.2" REQUIRED) +-list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules) +-include(GrVersion) +- +-if(NOT CPPUNIT_FOUND) +- message(FATAL_ERROR "CppUnit required to compile nrsc5") +-endif() +- + ######################################################################## + # Setup doxygen option + ######################################################################## + if(DOXYGEN_FOUND) +- option(ENABLE_DOXYGEN "Build docs using Doxygen" ON) ++ option(ENABLE_DOXYGEN "Build docs using Doxygen" ON) + else(DOXYGEN_FOUND) +- option(ENABLE_DOXYGEN "Build docs using Doxygen" OFF) ++ option(ENABLE_DOXYGEN "Build docs using Doxygen" OFF) + endif(DOXYGEN_FOUND) + +-######################################################################## +-# Setup the include and linker paths +-######################################################################## +-include_directories( +- ${CMAKE_SOURCE_DIR}/lib +- ${CMAKE_SOURCE_DIR}/include +- ${CMAKE_BINARY_DIR}/lib +- ${CMAKE_BINARY_DIR}/include +- ${Boost_INCLUDE_DIRS} +- ${CPPUNIT_INCLUDE_DIRS} +- ${GNURADIO_ALL_INCLUDE_DIRS} +-) +- +-link_directories( +- ${Boost_LIBRARY_DIRS} +- ${CPPUNIT_LIBRARY_DIRS} +- ${GNURADIO_RUNTIME_LIBRARY_DIRS} +-) +- +-# Set component parameters +-set(GR_NRSC5_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "" FORCE) +-set(GR_NRSC5_SWIG_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/swig CACHE INTERNAL "" FORCE) +- + ######################################################################## + # Create uninstall target + ######################################################################## +@@ -226,18 +182,15 @@ endif() + ######################################################################## + add_subdirectory(include/nrsc5) + add_subdirectory(lib) ++add_subdirectory(apps) ++add_subdirectory(docs) + add_subdirectory(swig) + add_subdirectory(python) + add_subdirectory(grc) +-add_subdirectory(apps) +-add_subdirectory(docs) + + ######################################################################## + # Install cmake search helper for this library + ######################################################################## +-if(NOT CMAKE_MODULES_DIR) +- set(CMAKE_MODULES_DIR lib${LIB_SUFFIX}/cmake) +-endif(NOT CMAKE_MODULES_DIR) + + install(FILES cmake/Modules/nrsc5Config.cmake + DESTINATION ${CMAKE_MODULES_DIR}/nrsc5 +diff --git a/README.md b/README.md +index 366f5a7..c11286a 100644 +--- a/README.md ++++ b/README.md +@@ -84,7 +84,6 @@ The output bytes map to symbols as follows: + Several sample flowgraphs are available in the apps folder: + + * hd_tx_usrp.grc, hd_tx_usrp.py: tested on a USRP B200 +-* hd_tx_hackrf.grc, hd_tx_hackrf.py: tested on a HackRF One + * hd_tx_rtl_file.grc, hd_tx_rtl_file.py: produces an output file in the format used by https://github.com/theori-io/nrsc5/ + + These flowgraphs read a WAV file named sample.wav, which must be encoded at 44,100 samples per second. The license for the supplied sample.wav file is as follows: +diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt +index c837d77..408bf6a 100644 +--- a/apps/CMakeLists.txt ++++ b/apps/CMakeLists.txt +@@ -1,6 +1,7 @@ + # Copyright 2011 Free Software Foundation, Inc. + # +-# This file is part of GNU Radio ++# This file was generated by gr_modtool, a tool from the GNU Radio framework ++# This file is a part of gr-nrsc5 + # + # GNU Radio is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +diff --git a/apps/hd_tx_hackrf.grc b/apps/hd_tx_hackrf.grc +deleted file mode 100644 +index 7f93279..0000000 +--- a/apps/hd_tx_hackrf.grc ++++ /dev/null +@@ -1,2679 +0,0 @@ +- +- +- +- Fri Sep 16 01:35:53 2016 +- +- options +- +- author +- +- +- +- window_size +- +- +- +- category +- [GRC Hier Blocks] +- +- +- comment +- +- +- +- description +- +- +- +- _enabled +- True +- +- +- _coordinate +- (8, 12) +- +- +- _rotation +- 0 +- +- +- generate_options +- no_gui +- +- +- hier_block_src_path +- .: +- +- +- id +- hd_tx_hackrf +- +- +- max_nouts +- 0 +- +- +- qt_qss_theme +- +- +- +- realtime_scheduling +- +- +- +- run_command +- {python} -u {filename} +- +- +- run_options +- prompt +- +- +- run +- True +- +- +- thread_safe_setters +- +- +- +- title +- +- +- +- +- variable +- +- comment +- +- +- +- _enabled +- True +- +- +- _coordinate +- (8, 164) +- +- +- _rotation +- 0 +- +- +- id +- freq +- +- +- value +- 95.7e6 +- +- +- +- variable +- +- comment +- +- +- +- _enabled +- True +- +- +- _coordinate +- (8, 100) +- +- +- _rotation +- 0 +- +- +- id +- samp_rate +- +- +- value +- 2000000 +- +- +- +- analog_sig_source_x +- +- amp +- 0.1 +- +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- freq +- 1000 +- +- +- _coordinate +- (896, 584) +- +- +- _rotation +- 180 +- +- +- id +- analog_sig_source_x_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- offset +- 0 +- +- +- type +- float +- +- +- samp_rate +- 50000 +- +- +- waveform +- analog.GR_COS_WAVE +- +- +- +- analog_wfm_tx +- +- audio_rate +- 50000 +- +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (640, 584) +- +- +- _rotation +- 180 +- +- +- id +- analog_wfm_tx_0 +- +- +- max_dev +- 75e3 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- fh +- -1.0 +- +- +- quad_rate +- 200000 +- +- +- tau +- 75e-6 +- +- +- +- blocks_add_xx +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (424, 472) +- +- +- _rotation +- 0 +- +- +- id +- blocks_add_xx_0 +- +- +- type +- complex +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- num_inputs +- 2 +- +- +- vlen +- 1 +- +- +- +- blocks_conjugate_cc +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (624, 376) +- +- +- _rotation +- 180 +- +- +- id +- blocks_conjugate_cc_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- +- blocks_keep_m_in_n +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (952, 340) +- +- +- _rotation +- 180 +- +- +- id +- blocks_keep_m_in_n_0 +- +- +- m +- 2160 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- n +- 4096 +- +- +- type +- complex +- +- +- offset +- 0 +- +- +- +- blocks_multiply_const_vxx +- +- alias +- +- +- +- comment +- +- +- +- const +- 0.001 +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (248, 468) +- +- +- _rotation +- 0 +- +- +- id +- blocks_multiply_const_vxx_0 +- +- +- type +- complex +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- vlen +- 1 +- +- +- +- blocks_multiply_const_vxx +- +- alias +- +- +- +- comment +- +- +- +- const +- 0.1 +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (104, 612) +- +- +- _rotation +- 180 +- +- +- id +- blocks_multiply_const_vxx_1 +- +- +- type +- complex +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- vlen +- 1 +- +- +- +- blocks_multiply_xx +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- 1 +- +- +- _coordinate +- (816, 360) +- +- +- _rotation +- 180 +- +- +- id +- blocks_multiply_xx_0 +- +- +- type +- complex +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- num_inputs +- 2 +- +- +- vlen +- 1 +- +- +- +- blocks_repeat +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (1104, 244) +- +- +- _rotation +- 0 +- +- +- id +- blocks_repeat_0 +- +- +- interp +- 2 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- type +- complex +- +- +- vlen +- 2048 +- +- +- +- blocks_stream_to_vector +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (696, 252) +- +- +- _rotation +- 0 +- +- +- id +- blocks_stream_to_vector_0 +- +- +- type +- complex +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- num_items +- 2048 +- +- +- vlen +- 1 +- +- +- +- blocks_vector_source_x +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- 1 +- +- +- _coordinate +- (952, 428) +- +- +- _rotation +- 180 +- +- +- id +- blocks_vector_source_x_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- type +- complex +- +- +- repeat +- True +- +- +- tags +- [] +- +- +- vlen +- 1 +- +- +- vector +- [math.sin(math.pi / 2 * i / 112) for i in range(112)] + [1] * (2048-112) + [math.cos(math.pi / 2 * i / 112) for i in range(112)] +- +- +- +- blocks_vector_to_stream +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (1104, 356) +- +- +- _rotation +- 180 +- +- +- id +- blocks_vector_to_stream_0 +- +- +- type +- complex +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- num_items +- 2048 +- +- +- vlen +- 1 +- +- +- +- blocks_vector_to_stream +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (288, 252) +- +- +- _rotation +- 0 +- +- +- id +- blocks_vector_to_stream_1 +- +- +- type +- byte +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- num_items +- 1048576 +- +- +- vlen +- 1 +- +- +- +- blocks_wavfile_source +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- file +- sample.wav +- +- +- _coordinate +- (328, 16) +- +- +- _rotation +- 0 +- +- +- id +- blocks_wavfile_source_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- nchan +- 2 +- +- +- repeat +- True +- +- +- +- digital_chunks_to_symbols_xx +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- dimension +- 1 +- +- +- _enabled +- True +- +- +- _coordinate +- (472, 244) +- +- +- _rotation +- 0 +- +- +- id +- digital_chunks_to_symbols_xx_0 +- +- +- in_type +- byte +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- num_ports +- 1 +- +- +- out_type +- complex +- +- +- symbol_table +- -1-1j, -1+1j, 1-1j, 1+1j, 0 +- +- +- +- fft_vxx +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- fft_size +- 2048 +- +- +- forward +- False +- +- +- _coordinate +- (880, 224) +- +- +- _rotation +- 0 +- +- +- id +- fft_vxx_0 +- +- +- type +- complex +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- nthreads +- 1 +- +- +- shift +- True +- +- +- window +- window.rectangular(2048) +- +- +- +- import +- +- alias +- +- +- +- comment +- +- +- +- _enabled +- True +- +- +- _coordinate +- (8, 236) +- +- +- _rotation +- 0 +- +- +- id +- import_0 +- +- +- import +- import math +- +- +- +- low_pass_filter +- +- beta +- 6.76 +- +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- cutoff_freq +- 80000 +- +- +- decim +- 1 +- +- +- _enabled +- True +- +- +- type +- fir_filter_ccf +- +- +- _coordinate +- (264, 568) +- +- +- _rotation +- 180 +- +- +- gain +- 1 +- +- +- id +- low_pass_filter_0 +- +- +- interp +- 1 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- samp_rate +- samp_rate +- +- +- width +- 20000 +- +- +- win +- firdes.WIN_HAMMING +- +- +- +- nrsc5_hdc_encoder +- +- bitrate +- 64000 +- +- +- alias +- +- +- +- channels +- 2 +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (512, 16) +- +- +- _rotation +- 0 +- +- +- id +- nrsc5_hdc_encoder_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- +- nrsc5_l1_fm_encoder_mp1 +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (888, 48) +- +- +- _rotation +- 0 +- +- +- id +- nrsc5_l1_fm_encoder_mp1_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- +- nrsc5_l2_encoder +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- first_prog +- 0 +- +- +- size +- 146176 +- +- +- _coordinate +- (696, 32) +- +- +- _rotation +- 0 +- +- +- id +- nrsc5_l2_encoder_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- num_progs +- 1 +- +- +- +- nrsc5_sis_encoder +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (688, 108) +- +- +- _rotation +- 0 +- +- +- id +- nrsc5_sis_encoder_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- short_name +- ABCD +- +- +- +- nrsc5_psd_encoder +- +- artist +- Artist +- +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (488, 92) +- +- +- _rotation +- 0 +- +- +- id +- nrsc5_psd_encoder_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- prog_num +- 0 +- +- +- title +- Title +- +- +- +- osmosdr_sink +- +- alias +- +- +- +- ant0 +- +- +- +- bb_gain0 +- 0 +- +- +- bw0 +- 1.5e6 +- +- +- corr0 +- 0 +- +- +- freq0 +- freq +- +- +- if_gain0 +- 40 +- +- +- gain0 +- 0 +- +- +- ant10 +- +- +- +- bb_gain10 +- 20 +- +- +- bw10 +- 0 +- +- +- corr10 +- 0 +- +- +- freq10 +- 100e6 +- +- +- if_gain10 +- 20 +- +- +- gain10 +- 10 +- +- +- ant11 +- +- +- +- bb_gain11 +- 20 +- +- +- bw11 +- 0 +- +- +- corr11 +- 0 +- +- +- freq11 +- 100e6 +- +- +- if_gain11 +- 20 +- +- +- gain11 +- 10 +- +- +- ant12 +- +- +- +- bb_gain12 +- 20 +- +- +- bw12 +- 0 +- +- +- corr12 +- 0 +- +- +- freq12 +- 100e6 +- +- +- if_gain12 +- 20 +- +- +- gain12 +- 10 +- +- +- ant13 +- +- +- +- bb_gain13 +- 20 +- +- +- bw13 +- 0 +- +- +- corr13 +- 0 +- +- +- freq13 +- 100e6 +- +- +- if_gain13 +- 20 +- +- +- gain13 +- 10 +- +- +- ant14 +- +- +- +- bb_gain14 +- 20 +- +- +- bw14 +- 0 +- +- +- corr14 +- 0 +- +- +- freq14 +- 100e6 +- +- +- if_gain14 +- 20 +- +- +- gain14 +- 10 +- +- +- ant15 +- +- +- +- bb_gain15 +- 20 +- +- +- bw15 +- 0 +- +- +- corr15 +- 0 +- +- +- freq15 +- 100e6 +- +- +- if_gain15 +- 20 +- +- +- gain15 +- 10 +- +- +- ant16 +- +- +- +- bb_gain16 +- 20 +- +- +- bw16 +- 0 +- +- +- corr16 +- 0 +- +- +- freq16 +- 100e6 +- +- +- if_gain16 +- 20 +- +- +- gain16 +- 10 +- +- +- ant17 +- +- +- +- bb_gain17 +- 20 +- +- +- bw17 +- 0 +- +- +- corr17 +- 0 +- +- +- freq17 +- 100e6 +- +- +- if_gain17 +- 20 +- +- +- gain17 +- 10 +- +- +- ant18 +- +- +- +- bb_gain18 +- 20 +- +- +- bw18 +- 0 +- +- +- corr18 +- 0 +- +- +- freq18 +- 100e6 +- +- +- if_gain18 +- 20 +- +- +- gain18 +- 10 +- +- +- ant19 +- +- +- +- bb_gain19 +- 20 +- +- +- bw19 +- 0 +- +- +- corr19 +- 0 +- +- +- freq19 +- 100e6 +- +- +- if_gain19 +- 20 +- +- +- gain19 +- 10 +- +- +- ant1 +- +- +- +- bb_gain1 +- 20 +- +- +- bw1 +- 0 +- +- +- corr1 +- 0 +- +- +- freq1 +- 100e6 +- +- +- if_gain1 +- 20 +- +- +- gain1 +- 10 +- +- +- ant20 +- +- +- +- bb_gain20 +- 20 +- +- +- bw20 +- 0 +- +- +- corr20 +- 0 +- +- +- freq20 +- 100e6 +- +- +- if_gain20 +- 20 +- +- +- gain20 +- 10 +- +- +- ant21 +- +- +- +- bb_gain21 +- 20 +- +- +- bw21 +- 0 +- +- +- corr21 +- 0 +- +- +- freq21 +- 100e6 +- +- +- if_gain21 +- 20 +- +- +- gain21 +- 10 +- +- +- ant22 +- +- +- +- bb_gain22 +- 20 +- +- +- bw22 +- 0 +- +- +- corr22 +- 0 +- +- +- freq22 +- 100e6 +- +- +- if_gain22 +- 20 +- +- +- gain22 +- 10 +- +- +- ant23 +- +- +- +- bb_gain23 +- 20 +- +- +- bw23 +- 0 +- +- +- corr23 +- 0 +- +- +- freq23 +- 100e6 +- +- +- if_gain23 +- 20 +- +- +- gain23 +- 10 +- +- +- ant24 +- +- +- +- bb_gain24 +- 20 +- +- +- bw24 +- 0 +- +- +- corr24 +- 0 +- +- +- freq24 +- 100e6 +- +- +- if_gain24 +- 20 +- +- +- gain24 +- 10 +- +- +- ant25 +- +- +- +- bb_gain25 +- 20 +- +- +- bw25 +- 0 +- +- +- corr25 +- 0 +- +- +- freq25 +- 100e6 +- +- +- if_gain25 +- 20 +- +- +- gain25 +- 10 +- +- +- ant26 +- +- +- +- bb_gain26 +- 20 +- +- +- bw26 +- 0 +- +- +- corr26 +- 0 +- +- +- freq26 +- 100e6 +- +- +- if_gain26 +- 20 +- +- +- gain26 +- 10 +- +- +- ant27 +- +- +- +- bb_gain27 +- 20 +- +- +- bw27 +- 0 +- +- +- corr27 +- 0 +- +- +- freq27 +- 100e6 +- +- +- if_gain27 +- 20 +- +- +- gain27 +- 10 +- +- +- ant28 +- +- +- +- bb_gain28 +- 20 +- +- +- bw28 +- 0 +- +- +- corr28 +- 0 +- +- +- freq28 +- 100e6 +- +- +- if_gain28 +- 20 +- +- +- gain28 +- 10 +- +- +- ant29 +- +- +- +- bb_gain29 +- 20 +- +- +- bw29 +- 0 +- +- +- corr29 +- 0 +- +- +- freq29 +- 100e6 +- +- +- if_gain29 +- 20 +- +- +- gain29 +- 10 +- +- +- ant2 +- +- +- +- bb_gain2 +- 20 +- +- +- bw2 +- 0 +- +- +- corr2 +- 0 +- +- +- freq2 +- 100e6 +- +- +- if_gain2 +- 20 +- +- +- gain2 +- 10 +- +- +- ant30 +- +- +- +- bb_gain30 +- 20 +- +- +- bw30 +- 0 +- +- +- corr30 +- 0 +- +- +- freq30 +- 100e6 +- +- +- if_gain30 +- 20 +- +- +- gain30 +- 10 +- +- +- ant31 +- +- +- +- bb_gain31 +- 20 +- +- +- bw31 +- 0 +- +- +- corr31 +- 0 +- +- +- freq31 +- 100e6 +- +- +- if_gain31 +- 20 +- +- +- gain31 +- 10 +- +- +- ant3 +- +- +- +- bb_gain3 +- 20 +- +- +- bw3 +- 0 +- +- +- corr3 +- 0 +- +- +- freq3 +- 100e6 +- +- +- if_gain3 +- 20 +- +- +- gain3 +- 10 +- +- +- ant4 +- +- +- +- bb_gain4 +- 20 +- +- +- bw4 +- 0 +- +- +- corr4 +- 0 +- +- +- freq4 +- 100e6 +- +- +- if_gain4 +- 20 +- +- +- gain4 +- 10 +- +- +- ant5 +- +- +- +- bb_gain5 +- 20 +- +- +- bw5 +- 0 +- +- +- corr5 +- 0 +- +- +- freq5 +- 100e6 +- +- +- if_gain5 +- 20 +- +- +- gain5 +- 10 +- +- +- ant6 +- +- +- +- bb_gain6 +- 20 +- +- +- bw6 +- 0 +- +- +- corr6 +- 0 +- +- +- freq6 +- 100e6 +- +- +- if_gain6 +- 20 +- +- +- gain6 +- 10 +- +- +- ant7 +- +- +- +- bb_gain7 +- 20 +- +- +- bw7 +- 0 +- +- +- corr7 +- 0 +- +- +- freq7 +- 100e6 +- +- +- if_gain7 +- 20 +- +- +- gain7 +- 10 +- +- +- ant8 +- +- +- +- bb_gain8 +- 20 +- +- +- bw8 +- 0 +- +- +- corr8 +- 0 +- +- +- freq8 +- 100e6 +- +- +- if_gain8 +- 20 +- +- +- gain8 +- 10 +- +- +- ant9 +- +- +- +- bb_gain9 +- 20 +- +- +- bw9 +- 0 +- +- +- corr9 +- 0 +- +- +- freq9 +- 100e6 +- +- +- if_gain9 +- 20 +- +- +- gain9 +- 10 +- +- +- comment +- +- +- +- affinity +- +- +- +- args +- +- +- +- _enabled +- True +- +- +- _coordinate +- (536, 440) +- +- +- _rotation +- 0 +- +- +- id +- osmosdr_sink_0 +- +- +- type +- fc32 +- +- +- clock_source0 +- +- +- +- time_source0 +- +- +- +- clock_source1 +- +- +- +- time_source1 +- +- +- +- clock_source2 +- +- +- +- time_source2 +- +- +- +- clock_source3 +- +- +- +- time_source3 +- +- +- +- clock_source4 +- +- +- +- time_source4 +- +- +- +- clock_source5 +- +- +- +- time_source5 +- +- +- +- clock_source6 +- +- +- +- time_source6 +- +- +- +- clock_source7 +- +- +- +- time_source7 +- +- +- +- nchan +- 1 +- +- +- num_mboards +- 1 +- +- +- sample_rate +- samp_rate +- +- +- sync +- +- +- +- +- rational_resampler_xxx +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- decim +- 1 +- +- +- _enabled +- True +- +- +- fbw +- 0 +- +- +- _coordinate +- (448, 592) +- +- +- _rotation +- 180 +- +- +- id +- rational_resampler_xxx_0 +- +- +- interp +- samp_rate / 200000 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- taps +- +- +- +- type +- ccc +- +- +- +- rational_resampler_xxx +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- decim +- 49 +- +- +- _enabled +- True +- +- +- fbw +- 0 +- +- +- _coordinate +- (432, 352) +- +- +- _rotation +- 180 +- +- +- id +- rational_resampler_xxx_1 +- +- +- interp +- 125 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- taps +- +- +- +- type +- ccc +- +- +- +- rational_resampler_xxx +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- decim +- 243 +- +- +- _enabled +- True +- +- +- fbw +- 0 +- +- +- _coordinate +- (240, 352) +- +- +- _rotation +- 180 +- +- +- id +- rational_resampler_xxx_2 +- +- +- interp +- 256 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- taps +- +- +- +- type +- ccc +- +- +- +- analog_sig_source_x_0 +- analog_wfm_tx_0 +- 0 +- 0 +- +- +- analog_wfm_tx_0 +- rational_resampler_xxx_0 +- 0 +- 0 +- +- +- blocks_add_xx_0 +- osmosdr_sink_0 +- 0 +- 0 +- +- +- blocks_conjugate_cc_0 +- rational_resampler_xxx_1 +- 0 +- 0 +- +- +- blocks_keep_m_in_n_0 +- blocks_multiply_xx_0 +- 0 +- 1 +- +- +- blocks_multiply_const_vxx_0 +- blocks_add_xx_0 +- 0 +- 0 +- +- +- blocks_multiply_const_vxx_1 +- blocks_add_xx_0 +- 0 +- 1 +- +- +- blocks_multiply_xx_0 +- blocks_conjugate_cc_0 +- 0 +- 0 +- +- +- blocks_repeat_0 +- blocks_vector_to_stream_0 +- 0 +- 0 +- +- +- blocks_stream_to_vector_0 +- fft_vxx_0 +- 0 +- 0 +- +- +- blocks_vector_source_x_0 +- blocks_multiply_xx_0 +- 0 +- 0 +- +- +- blocks_vector_to_stream_0 +- blocks_keep_m_in_n_0 +- 0 +- 0 +- +- +- blocks_vector_to_stream_1 +- digital_chunks_to_symbols_xx_0 +- 0 +- 0 +- +- +- blocks_wavfile_source_0 +- nrsc5_hdc_encoder_0 +- 0 +- 0 +- +- +- blocks_wavfile_source_0 +- nrsc5_hdc_encoder_0 +- 1 +- 1 +- +- +- digital_chunks_to_symbols_xx_0 +- blocks_stream_to_vector_0 +- 0 +- 0 +- +- +- fft_vxx_0 +- blocks_repeat_0 +- 0 +- 0 +- +- +- low_pass_filter_0 +- blocks_multiply_const_vxx_1 +- 0 +- 0 +- +- +- nrsc5_hdc_encoder_0 +- nrsc5_l2_encoder_0 +- 0 +- 0 +- +- +- nrsc5_l1_fm_encoder_mp1_0 +- blocks_vector_to_stream_1 +- 0 +- 0 +- +- +- nrsc5_l2_encoder_0 +- nrsc5_l1_fm_encoder_mp1_0 +- 0 +- 0 +- +- +- nrsc5_sis_encoder_0 +- nrsc5_l1_fm_encoder_mp1_0 +- 0 +- 1 +- +- +- nrsc5_psd_encoder_0 +- nrsc5_l2_encoder_0 +- 0 +- 1 +- +- +- rational_resampler_xxx_0 +- low_pass_filter_0 +- 0 +- 0 +- +- +- rational_resampler_xxx_1 +- rational_resampler_xxx_2 +- 0 +- 0 +- +- +- rational_resampler_xxx_2 +- blocks_multiply_const_vxx_0 +- 0 +- 0 +- +- +diff --git a/apps/hd_tx_hackrf.py b/apps/hd_tx_hackrf.py +deleted file mode 100755 +index ab96f73..0000000 +--- a/apps/hd_tx_hackrf.py ++++ /dev/null +@@ -1,157 +0,0 @@ +-#!/usr/bin/env python2 +-# -*- coding: utf-8 -*- +-################################################## +-# GNU Radio Python Flow Graph +-# Title: Hd Tx Hackrf +-# Generated: Sun Oct 15 00:11:49 2017 +-################################################## +- +-from gnuradio import analog +-from gnuradio import blocks +-from gnuradio import digital +-from gnuradio import eng_notation +-from gnuradio import fft +-from gnuradio import filter +-from gnuradio import gr +-from gnuradio.eng_option import eng_option +-from gnuradio.fft import window +-from gnuradio.filter import firdes +-from optparse import OptionParser +-import math +-import nrsc5 +-import osmosdr +-import time +- +- +-class hd_tx_hackrf(gr.top_block): +- +- def __init__(self): +- gr.top_block.__init__(self, "Hd Tx Hackrf") +- +- ################################################## +- # Variables +- ################################################## +- self.samp_rate = samp_rate = 2000000 +- self.freq = freq = 95.7e6 +- +- ################################################## +- # Blocks +- ################################################## +- self.rational_resampler_xxx_2 = filter.rational_resampler_ccc( +- interpolation=256, +- decimation=243, +- taps=None, +- fractional_bw=None, +- ) +- self.rational_resampler_xxx_1 = filter.rational_resampler_ccc( +- interpolation=125, +- decimation=49, +- taps=None, +- fractional_bw=None, +- ) +- self.rational_resampler_xxx_0 = filter.rational_resampler_ccc( +- interpolation=samp_rate / 200000, +- decimation=1, +- taps=None, +- fractional_bw=None, +- ) +- self.osmosdr_sink_0 = osmosdr.sink( args="numchan=" + str(1) + " " + '' ) +- self.osmosdr_sink_0.set_sample_rate(samp_rate) +- self.osmosdr_sink_0.set_center_freq(freq, 0) +- self.osmosdr_sink_0.set_freq_corr(0, 0) +- self.osmosdr_sink_0.set_gain(0, 0) +- self.osmosdr_sink_0.set_if_gain(40, 0) +- self.osmosdr_sink_0.set_bb_gain(0, 0) +- self.osmosdr_sink_0.set_antenna('', 0) +- self.osmosdr_sink_0.set_bandwidth(1.5e6, 0) +- +- self.nrsc5_sis_encoder_0 = nrsc5.sis_encoder('ABCD') +- self.nrsc5_psd_encoder_0 = nrsc5.psd_encoder(0, 'Title', 'Artist') +- self.nrsc5_l2_encoder_0 = nrsc5.l2_encoder(1, 0, 146176) +- self.nrsc5_l1_fm_encoder_mp1_0 = nrsc5.l1_fm_encoder(1) +- self.nrsc5_hdc_encoder_0 = nrsc5.hdc_encoder(2, 64000) +- self.low_pass_filter_0 = filter.fir_filter_ccf(1, firdes.low_pass( +- 1, samp_rate, 80000, 20000, firdes.WIN_HAMMING, 6.76)) +- self.fft_vxx_0 = fft.fft_vcc(2048, False, (window.rectangular(2048)), True, 1) +- self.digital_chunks_to_symbols_xx_0 = digital.chunks_to_symbols_bc((-1-1j, -1+1j, 1-1j, 1+1j, 0), 1) +- self.blocks_wavfile_source_0 = blocks.wavfile_source('sample.wav', True) +- self.blocks_vector_to_stream_1 = blocks.vector_to_stream(gr.sizeof_char*1, 1048576) +- self.blocks_vector_to_stream_0 = blocks.vector_to_stream(gr.sizeof_gr_complex*1, 2048) +- self.blocks_vector_source_x_0 = blocks.vector_source_c([math.sin(math.pi / 2 * i / 112) for i in range(112)] + [1] * (2048-112) + [math.cos(math.pi / 2 * i / 112) for i in range(112)], True, 1, []) +- self.blocks_stream_to_vector_0 = blocks.stream_to_vector(gr.sizeof_gr_complex*1, 2048) +- self.blocks_repeat_0 = blocks.repeat(gr.sizeof_gr_complex*2048, 2) +- self.blocks_multiply_xx_0 = blocks.multiply_vcc(1) +- self.blocks_multiply_const_vxx_1 = blocks.multiply_const_vcc((0.1, )) +- self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vcc((0.001, )) +- self.blocks_keep_m_in_n_0 = blocks.keep_m_in_n(gr.sizeof_gr_complex, 2160, 4096, 0) +- self.blocks_conjugate_cc_0 = blocks.conjugate_cc() +- self.blocks_add_xx_0 = blocks.add_vcc(1) +- self.analog_wfm_tx_0 = analog.wfm_tx( +- audio_rate=50000, +- quad_rate=200000, +- tau=75e-6, +- max_dev=75e3, +- fh=-1.0, +- ) +- self.analog_sig_source_x_0 = analog.sig_source_f(50000, analog.GR_COS_WAVE, 1000, 0.1, 0) +- +- ################################################## +- # Connections +- ################################################## +- self.connect((self.analog_sig_source_x_0, 0), (self.analog_wfm_tx_0, 0)) +- self.connect((self.analog_wfm_tx_0, 0), (self.rational_resampler_xxx_0, 0)) +- self.connect((self.blocks_add_xx_0, 0), (self.osmosdr_sink_0, 0)) +- self.connect((self.blocks_conjugate_cc_0, 0), (self.rational_resampler_xxx_1, 0)) +- self.connect((self.blocks_keep_m_in_n_0, 0), (self.blocks_multiply_xx_0, 1)) +- self.connect((self.blocks_multiply_const_vxx_0, 0), (self.blocks_add_xx_0, 0)) +- self.connect((self.blocks_multiply_const_vxx_1, 0), (self.blocks_add_xx_0, 1)) +- self.connect((self.blocks_multiply_xx_0, 0), (self.blocks_conjugate_cc_0, 0)) +- self.connect((self.blocks_repeat_0, 0), (self.blocks_vector_to_stream_0, 0)) +- self.connect((self.blocks_stream_to_vector_0, 0), (self.fft_vxx_0, 0)) +- self.connect((self.blocks_vector_source_x_0, 0), (self.blocks_multiply_xx_0, 0)) +- self.connect((self.blocks_vector_to_stream_0, 0), (self.blocks_keep_m_in_n_0, 0)) +- self.connect((self.blocks_vector_to_stream_1, 0), (self.digital_chunks_to_symbols_xx_0, 0)) +- self.connect((self.blocks_wavfile_source_0, 0), (self.nrsc5_hdc_encoder_0, 0)) +- self.connect((self.blocks_wavfile_source_0, 1), (self.nrsc5_hdc_encoder_0, 1)) +- self.connect((self.digital_chunks_to_symbols_xx_0, 0), (self.blocks_stream_to_vector_0, 0)) +- self.connect((self.fft_vxx_0, 0), (self.blocks_repeat_0, 0)) +- self.connect((self.low_pass_filter_0, 0), (self.blocks_multiply_const_vxx_1, 0)) +- self.connect((self.nrsc5_hdc_encoder_0, 0), (self.nrsc5_l2_encoder_0, 0)) +- self.connect((self.nrsc5_l1_fm_encoder_mp1_0, 0), (self.blocks_vector_to_stream_1, 0)) +- self.connect((self.nrsc5_l2_encoder_0, 0), (self.nrsc5_l1_fm_encoder_mp1_0, 0)) +- self.connect((self.nrsc5_psd_encoder_0, 0), (self.nrsc5_l2_encoder_0, 1)) +- self.connect((self.nrsc5_sis_encoder_0, 0), (self.nrsc5_l1_fm_encoder_mp1_0, 1)) +- self.connect((self.rational_resampler_xxx_0, 0), (self.low_pass_filter_0, 0)) +- self.connect((self.rational_resampler_xxx_1, 0), (self.rational_resampler_xxx_2, 0)) +- self.connect((self.rational_resampler_xxx_2, 0), (self.blocks_multiply_const_vxx_0, 0)) +- +- def get_samp_rate(self): +- return self.samp_rate +- +- def set_samp_rate(self, samp_rate): +- self.samp_rate = samp_rate +- self.osmosdr_sink_0.set_sample_rate(self.samp_rate) +- self.low_pass_filter_0.set_taps(firdes.low_pass(1, self.samp_rate, 80000, 20000, firdes.WIN_HAMMING, 6.76)) +- +- def get_freq(self): +- return self.freq +- +- def set_freq(self, freq): +- self.freq = freq +- self.osmosdr_sink_0.set_center_freq(self.freq, 0) +- +- +-def main(top_block_cls=hd_tx_hackrf, options=None): +- +- tb = top_block_cls() +- tb.start() +- try: +- raw_input('Press Enter to quit: ') +- except EOFError: +- pass +- tb.stop() +- tb.wait() +- +- +-if __name__ == '__main__': +- main() +diff --git a/apps/hd_tx_rtl_file.grc b/apps/hd_tx_rtl_file.grc +index 2994383..92f5351 100644 +--- a/apps/hd_tx_rtl_file.grc ++++ b/apps/hd_tx_rtl_file.grc +@@ -1,1420 +1,488 @@ +- +- +- +- Fri Sep 16 01:35:53 2016 +- +- options +- +- author +- +- +- +- window_size +- +- +- +- category +- [GRC Hier Blocks] +- +- +- comment +- +- +- +- description +- +- +- +- _enabled +- True +- +- +- _coordinate +- (8, 12) +- +- +- _rotation +- 0 +- +- +- generate_options +- no_gui +- +- +- hier_block_src_path +- .: +- +- +- id +- hd_tx_rtl_file +- +- +- max_nouts +- 0 +- +- +- qt_qss_theme +- +- +- +- realtime_scheduling +- +- +- +- run_command +- {python} -u {filename} +- +- +- run_options +- run +- +- +- run +- True +- +- +- thread_safe_setters +- +- +- +- title +- +- +- +- +- blocks_add_const_vxx +- +- alias +- +- +- +- comment +- +- +- +- const +- 127.5 +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (600, 564) +- +- +- _rotation +- 0 +- +- +- id +- blocks_add_const_vxx_0_0 +- +- +- type +- float +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- vlen +- 1 +- +- +- +- blocks_complex_to_float +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (296, 552) +- +- +- _rotation +- 0 +- +- +- id +- blocks_complex_to_float_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- vlen +- 1 +- +- +- +- blocks_conjugate_cc +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (624, 376) +- +- +- _rotation +- 180 +- +- +- id +- blocks_conjugate_cc_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- +- blocks_file_sink +- +- append +- False +- +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- file +- hd-generated.raw +- +- +- _coordinate +- (904, 548) +- +- +- _rotation +- 0 +- +- +- id +- blocks_file_sink_0 +- +- +- type +- byte +- +- +- unbuffered +- False +- +- +- vlen +- 1 +- +- +- +- blocks_float_to_uchar +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (744, 568) +- +- +- _rotation +- 0 +- +- +- id +- blocks_float_to_uchar_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- +- blocks_interleave +- +- alias +- +- +- +- blocksize +- 1 +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (472, 552) +- +- +- _rotation +- 0 +- +- +- id +- blocks_interleave_0 +- +- +- type +- float +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- num_streams +- 2 +- +- +- vlen +- 1 +- +- +- +- blocks_keep_m_in_n +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (952, 340) +- +- +- _rotation +- 180 +- +- +- id +- blocks_keep_m_in_n_0 +- +- +- m +- 2160 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- n +- 4096 +- +- +- type +- complex +- +- +- offset +- 0 +- +- +- +- blocks_multiply_const_vxx +- +- alias +- +- +- +- comment +- +- +- +- const +- 0.5 +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (264, 372) +- +- +- _rotation +- 180 +- +- +- id +- blocks_multiply_const_vxx_0 +- +- +- type +- complex +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- vlen +- 1 +- +- +- +- blocks_multiply_xx +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- 1 +- +- +- _coordinate +- (816, 360) +- +- +- _rotation +- 180 +- +- +- id +- blocks_multiply_xx_0 +- +- +- type +- complex +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- num_inputs +- 2 +- +- +- vlen +- 1 +- +- +- +- blocks_repeat +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (1104, 244) +- +- +- _rotation +- 0 +- +- +- id +- blocks_repeat_0 +- +- +- interp +- 2 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- type +- complex +- +- +- vlen +- 2048 +- +- +- +- blocks_stream_to_vector +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (696, 252) +- +- +- _rotation +- 0 +- +- +- id +- blocks_stream_to_vector_0 +- +- +- type +- complex +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- num_items +- 2048 +- +- +- vlen +- 1 +- +- +- +- blocks_vector_source_x +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- 1 +- +- +- _coordinate +- (952, 428) +- +- +- _rotation +- 180 +- +- +- id +- blocks_vector_source_x_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- type +- complex +- +- +- repeat +- True +- +- +- tags +- [] +- +- +- vlen +- 1 +- +- +- vector +- [math.sin(math.pi / 2 * i / 112) for i in range(112)] + [1] * (2048-112) + [math.cos(math.pi / 2 * i / 112) for i in range(112)] +- +- +- +- blocks_vector_to_stream +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (1104, 356) +- +- +- _rotation +- 180 +- +- +- id +- blocks_vector_to_stream_0 +- +- +- type +- complex +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- num_items +- 2048 +- +- +- vlen +- 1 +- +- +- +- blocks_vector_to_stream +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (288, 252) +- +- +- _rotation +- 0 +- +- +- id +- blocks_vector_to_stream_1 +- +- +- type +- byte +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- num_items +- 1048576 +- +- +- vlen +- 1 +- +- +- +- blocks_wavfile_source +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- file +- sample.wav +- +- +- _coordinate +- (328, 16) +- +- +- _rotation +- 0 +- +- +- id +- blocks_wavfile_source_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- nchan +- 2 +- +- +- repeat +- False +- +- +- +- digital_chunks_to_symbols_xx +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- dimension +- 1 +- +- +- _enabled +- True +- +- +- _coordinate +- (472, 244) +- +- +- _rotation +- 0 +- +- +- id +- digital_chunks_to_symbols_xx_0 +- +- +- in_type +- byte +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- num_ports +- 1 +- +- +- out_type +- complex +- +- +- symbol_table +- -1-1j, -1+1j, 1-1j, 1+1j, 0 +- +- +- +- fft_vxx +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- fft_size +- 2048 +- +- +- forward +- False +- +- +- _coordinate +- (880, 224) +- +- +- _rotation +- 0 +- +- +- id +- fft_vxx_0 +- +- +- type +- complex +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- nthreads +- 1 +- +- +- shift +- True +- +- +- window +- window.rectangular(2048) +- +- +- +- import +- +- alias +- +- +- +- comment +- +- +- +- _enabled +- True +- +- +- _coordinate +- (8, 196) +- +- +- _rotation +- 0 +- +- +- id +- import_0 +- +- +- import +- import math +- +- +- +- nrsc5_hdc_encoder +- +- bitrate +- 64000 +- +- +- alias +- +- +- +- channels +- 2 +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (512, 16) +- +- +- _rotation +- 0 +- +- +- id +- nrsc5_hdc_encoder_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- +- nrsc5_l1_fm_encoder_mp1 +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (888, 48) +- +- +- _rotation +- 0 +- +- +- id +- nrsc5_l1_fm_encoder_mp1_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- +- nrsc5_l2_encoder +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- first_prog +- 0 +- +- +- size +- 146176 +- +- +- _coordinate +- (696, 32) +- +- +- _rotation +- 0 +- +- +- id +- nrsc5_l2_encoder_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- num_progs +- 1 +- +- +- +- nrsc5_sis_encoder +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (688, 108) +- +- +- _rotation +- 0 +- +- +- id +- nrsc5_sis_encoder_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- short_name +- ABCD +- +- +- +- nrsc5_psd_encoder +- +- artist +- Artist +- +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (488, 92) +- +- +- _rotation +- 0 +- +- +- id +- nrsc5_psd_encoder_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- prog_num +- 0 +- +- +- title +- Title +- +- +- +- rational_resampler_xxx +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- decim +- 1 +- +- +- _enabled +- True +- +- +- fbw +- 0 +- +- +- _coordinate +- (432, 352) +- +- +- _rotation +- 180 +- +- +- id +- rational_resampler_xxx_1 +- +- +- interp +- 2 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- taps +- +- +- +- type +- ccc +- +- +- +- blocks_add_const_vxx_0_0 +- blocks_float_to_uchar_0 +- 0 +- 0 +- +- +- blocks_complex_to_float_0 +- blocks_interleave_0 +- 1 +- 1 +- +- +- blocks_complex_to_float_0 +- blocks_interleave_0 +- 0 +- 0 +- +- +- blocks_conjugate_cc_0 +- rational_resampler_xxx_1 +- 0 +- 0 +- +- +- blocks_float_to_uchar_0 +- blocks_file_sink_0 +- 0 +- 0 +- +- +- blocks_interleave_0 +- blocks_add_const_vxx_0_0 +- 0 +- 0 +- +- +- blocks_keep_m_in_n_0 +- blocks_multiply_xx_0 +- 0 +- 1 +- +- +- blocks_multiply_const_vxx_0 +- blocks_complex_to_float_0 +- 0 +- 0 +- +- +- blocks_multiply_xx_0 +- blocks_conjugate_cc_0 +- 0 +- 0 +- +- +- blocks_repeat_0 +- blocks_vector_to_stream_0 +- 0 +- 0 +- +- +- blocks_stream_to_vector_0 +- fft_vxx_0 +- 0 +- 0 +- +- +- blocks_vector_source_x_0 +- blocks_multiply_xx_0 +- 0 +- 0 +- +- +- blocks_vector_to_stream_0 +- blocks_keep_m_in_n_0 +- 0 +- 0 +- +- +- blocks_vector_to_stream_1 +- digital_chunks_to_symbols_xx_0 +- 0 +- 0 +- +- +- blocks_wavfile_source_0 +- nrsc5_hdc_encoder_0 +- 0 +- 0 +- +- +- blocks_wavfile_source_0 +- nrsc5_hdc_encoder_0 +- 1 +- 1 +- +- +- digital_chunks_to_symbols_xx_0 +- blocks_stream_to_vector_0 +- 0 +- 0 +- +- +- fft_vxx_0 +- blocks_repeat_0 +- 0 +- 0 +- +- +- nrsc5_hdc_encoder_0 +- nrsc5_l2_encoder_0 +- 0 +- 0 +- +- +- nrsc5_l1_fm_encoder_mp1_0 +- blocks_vector_to_stream_1 +- 0 +- 0 +- +- +- nrsc5_l2_encoder_0 +- nrsc5_l1_fm_encoder_mp1_0 +- 0 +- 0 +- +- +- nrsc5_sis_encoder_0 +- nrsc5_l1_fm_encoder_mp1_0 +- 0 +- 1 +- +- +- nrsc5_psd_encoder_0 +- nrsc5_l2_encoder_0 +- 0 +- 1 +- +- +- rational_resampler_xxx_1 +- blocks_multiply_const_vxx_0 +- 0 +- 0 +- +- ++options: ++ parameters: ++ author: '' ++ category: '[GRC Hier Blocks]' ++ cmake_opt: '' ++ comment: '' ++ copyright: '' ++ description: '' ++ gen_cmake: 'On' ++ gen_linking: dynamic ++ generate_options: no_gui ++ hier_block_src_path: '.:' ++ id: hd_tx_rtl_file ++ max_nouts: '0' ++ output_language: python ++ placement: (0,0) ++ qt_qss_theme: '' ++ realtime_scheduling: '' ++ run: 'True' ++ run_command: '{python} -u {filename}' ++ run_options: prompt ++ sizing_mode: fixed ++ thread_safe_setters: '' ++ title: '' ++ window_size: '' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [8, 12] ++ rotation: 0 ++ state: enabled ++ ++blocks: ++- name: blocks_add_const_vxx_0_0 ++ id: blocks_add_const_vxx ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ const: '127.5' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ type: float ++ vlen: '1' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [576, 548.0] ++ rotation: 0 ++ state: enabled ++- name: blocks_complex_to_float_0 ++ id: blocks_complex_to_float ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ vlen: '1' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [272, 536.0] ++ rotation: 0 ++ state: enabled ++- name: blocks_conjugate_cc_0 ++ id: blocks_conjugate_cc ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [624, 424.0] ++ rotation: 180 ++ state: enabled ++- name: blocks_file_sink_0 ++ id: blocks_file_sink ++ parameters: ++ affinity: '' ++ alias: '' ++ append: 'False' ++ comment: '' ++ file: hd-generated.raw ++ type: byte ++ unbuffered: 'False' ++ vlen: '1' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [880, 532.0] ++ rotation: 0 ++ state: enabled ++- name: blocks_float_to_uchar_0 ++ id: blocks_float_to_uchar ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [720, 552.0] ++ rotation: 0 ++ state: enabled ++- name: blocks_interleave_0 ++ id: blocks_interleave ++ parameters: ++ affinity: '' ++ alias: '' ++ blocksize: '1' ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ num_streams: '2' ++ type: float ++ vlen: '1' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [448, 536.0] ++ rotation: 0 ++ state: enabled ++- name: blocks_keep_m_in_n_0 ++ id: blocks_keep_m_in_n ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ m: '2160' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ n: '4096' ++ offset: '0' ++ type: complex ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [952, 420.0] ++ rotation: 180 ++ state: enabled ++- name: blocks_multiply_const_vxx_0 ++ id: blocks_multiply_const_vxx ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ const: '0.5' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ type: complex ++ vlen: '1' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [272, 420.0] ++ rotation: 180 ++ state: enabled ++- name: blocks_multiply_xx_0 ++ id: blocks_multiply_xx ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ num_inputs: '2' ++ type: complex ++ vlen: '1' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [816, 408.0] ++ rotation: 180 ++ state: enabled ++- name: blocks_repeat_0 ++ id: blocks_repeat ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ interp: '2' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ type: complex ++ vlen: '2048' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [1104, 244] ++ rotation: 0 ++ state: enabled ++- name: blocks_stream_to_vector_0 ++ id: blocks_stream_to_vector ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ num_items: '2048' ++ type: complex ++ vlen: '1' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [696, 256.0] ++ rotation: 0 ++ state: enabled ++- name: blocks_vector_source_x_0 ++ id: blocks_vector_source_x ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ repeat: 'True' ++ tags: '[]' ++ type: complex ++ vector: '[math.sin(math.pi / 2 * i / 112) for i in range(112)] + [1] * (2048-112) ++ + [math.cos(math.pi / 2 * i / 112) for i in range(112)]' ++ vlen: '1' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [952, 340.0] ++ rotation: 180 ++ state: enabled ++- name: blocks_vector_to_stream_0 ++ id: blocks_vector_to_stream ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ num_items: '2048' ++ type: complex ++ vlen: '1' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [1104, 440.0] ++ rotation: 180 ++ state: enabled ++- name: blocks_vector_to_stream_1 ++ id: blocks_vector_to_stream ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ num_items: '1048576' ++ type: byte ++ vlen: '1' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [288, 256.0] ++ rotation: 0 ++ state: enabled ++- name: blocks_wavfile_source_0 ++ id: blocks_wavfile_source ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ file: sample.wav ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ nchan: '2' ++ repeat: 'True' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [896, 56.0] ++ rotation: 180 ++ state: enabled ++- name: digital_chunks_to_symbols_xx_0 ++ id: digital_chunks_to_symbols_xx ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ dimension: '1' ++ in_type: byte ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ num_ports: '1' ++ out_type: complex ++ symbol_table: (-1-1j, -1+1j, 1-1j, 1+1j, 0) ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [472, 256.0] ++ rotation: 0 ++ state: enabled ++- name: fft_vxx_0 ++ id: fft_vxx ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ fft_size: '2048' ++ forward: 'False' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ nthreads: '1' ++ shift: 'True' ++ type: complex ++ window: window.rectangular(2048) ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [880, 220.0] ++ rotation: 0 ++ state: enabled ++- name: import_0 ++ id: import ++ parameters: ++ alias: '' ++ comment: '' ++ imports: import math ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [8, 236] ++ rotation: 0 ++ state: enabled ++- name: nrsc5_hdc_encoder_0 ++ id: nrsc5_hdc_encoder ++ parameters: ++ affinity: '' ++ alias: '' ++ bitrate: '64000' ++ channels: '2' ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [728, 56.0] ++ rotation: 180 ++ state: enabled ++- name: nrsc5_l1_fm_encoder_mp1_0 ++ id: nrsc5_l1_fm_encoder_mp1 ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [288, 88.0] ++ rotation: 180 ++ state: enabled ++- name: nrsc5_l2_encoder_0 ++ id: nrsc5_l2_encoder ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ first_prog: '0' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ num_progs: '1' ++ size: '146176' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [528, 68.0] ++ rotation: 180 ++ state: enabled ++- name: nrsc5_psd_encoder_0 ++ id: nrsc5_psd_encoder ++ parameters: ++ affinity: '' ++ alias: '' ++ artist: Artist ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ prog_num: '0' ++ title: Title ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [728, 132.0] ++ rotation: 180 ++ state: enabled ++- name: nrsc5_sis_encoder_0 ++ id: nrsc5_sis_encoder ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ short_name: ABCD ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [528, 148.0] ++ rotation: 180 ++ state: enabled ++- name: rational_resampler_xxx_1 ++ id: rational_resampler_xxx ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ decim: '1' ++ fbw: '0' ++ interp: '2' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ taps: '' ++ type: ccc ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [440, 396.0] ++ rotation: 180 ++ state: enabled ++ ++connections: ++- [blocks_add_const_vxx_0_0, '0', blocks_float_to_uchar_0, '0'] ++- [blocks_complex_to_float_0, '0', blocks_interleave_0, '0'] ++- [blocks_complex_to_float_0, '1', blocks_interleave_0, '1'] ++- [blocks_conjugate_cc_0, '0', rational_resampler_xxx_1, '0'] ++- [blocks_float_to_uchar_0, '0', blocks_file_sink_0, '0'] ++- [blocks_interleave_0, '0', blocks_add_const_vxx_0_0, '0'] ++- [blocks_keep_m_in_n_0, '0', blocks_multiply_xx_0, '1'] ++- [blocks_multiply_const_vxx_0, '0', blocks_complex_to_float_0, '0'] ++- [blocks_multiply_xx_0, '0', blocks_conjugate_cc_0, '0'] ++- [blocks_repeat_0, '0', blocks_vector_to_stream_0, '0'] ++- [blocks_stream_to_vector_0, '0', fft_vxx_0, '0'] ++- [blocks_vector_source_x_0, '0', blocks_multiply_xx_0, '0'] ++- [blocks_vector_to_stream_0, '0', blocks_keep_m_in_n_0, '0'] ++- [blocks_vector_to_stream_1, '0', digital_chunks_to_symbols_xx_0, '0'] ++- [blocks_wavfile_source_0, '0', nrsc5_hdc_encoder_0, '0'] ++- [blocks_wavfile_source_0, '1', nrsc5_hdc_encoder_0, '1'] ++- [digital_chunks_to_symbols_xx_0, '0', blocks_stream_to_vector_0, '0'] ++- [fft_vxx_0, '0', blocks_repeat_0, '0'] ++- [nrsc5_hdc_encoder_0, '0', nrsc5_l2_encoder_0, '0'] ++- [nrsc5_l1_fm_encoder_mp1_0, '0', blocks_vector_to_stream_1, '0'] ++- [nrsc5_l2_encoder_0, '0', nrsc5_l1_fm_encoder_mp1_0, '0'] ++- [nrsc5_psd_encoder_0, '0', nrsc5_l2_encoder_0, '1'] ++- [nrsc5_sis_encoder_0, '0', nrsc5_l1_fm_encoder_mp1_0, '1'] ++- [rational_resampler_xxx_1, '0', blocks_multiply_const_vxx_0, '0'] ++ ++metadata: ++ file_format: 1 +diff --git a/apps/hd_tx_rtl_file.py b/apps/hd_tx_rtl_file.py +index 41d19b1..77e7eb0 100755 +--- a/apps/hd_tx_rtl_file.py ++++ b/apps/hd_tx_rtl_file.py +@@ -1,25 +1,28 @@ +-#!/usr/bin/env python2 ++#!/usr/bin/env python3 + # -*- coding: utf-8 -*- +-################################################## ++ ++# ++# SPDX-License-Identifier: GPL-3.0 ++# + # GNU Radio Python Flow Graph + # Title: Hd Tx Rtl File +-# Generated: Sun Oct 15 00:14:13 2017 +-################################################## ++# GNU Radio version: 3.8.0.0-rc2 + + from gnuradio import blocks + from gnuradio import digital +-from gnuradio import eng_notation + from gnuradio import fft +-from gnuradio import filter +-from gnuradio import gr +-from gnuradio.eng_option import eng_option + from gnuradio.fft import window ++from gnuradio import filter + from gnuradio.filter import firdes +-from optparse import OptionParser ++from gnuradio import gr ++import sys ++import signal ++from argparse import ArgumentParser ++from gnuradio.eng_arg import eng_float, intx ++from gnuradio import eng_notation + import math + import nrsc5 + +- + class hd_tx_rtl_file(gr.top_block): + + def __init__(self): +@@ -32,23 +35,22 @@ def __init__(self): + interpolation=2, + decimation=1, + taps=None, +- fractional_bw=None, +- ) ++ fractional_bw=None) + self.nrsc5_sis_encoder_0 = nrsc5.sis_encoder('ABCD') + self.nrsc5_psd_encoder_0 = nrsc5.psd_encoder(0, 'Title', 'Artist') + self.nrsc5_l2_encoder_0 = nrsc5.l2_encoder(1, 0, 146176) + self.nrsc5_l1_fm_encoder_mp1_0 = nrsc5.l1_fm_encoder(1) + self.nrsc5_hdc_encoder_0 = nrsc5.hdc_encoder(2, 64000) +- self.fft_vxx_0 = fft.fft_vcc(2048, False, (window.rectangular(2048)), True, 1) ++ self.fft_vxx_0 = fft.fft_vcc(2048, False, window.rectangular(2048), True, 1) + self.digital_chunks_to_symbols_xx_0 = digital.chunks_to_symbols_bc((-1-1j, -1+1j, 1-1j, 1+1j, 0), 1) +- self.blocks_wavfile_source_0 = blocks.wavfile_source('sample.wav', False) ++ self.blocks_wavfile_source_0 = blocks.wavfile_source('sample.wav', True) + self.blocks_vector_to_stream_1 = blocks.vector_to_stream(gr.sizeof_char*1, 1048576) + self.blocks_vector_to_stream_0 = blocks.vector_to_stream(gr.sizeof_gr_complex*1, 2048) + self.blocks_vector_source_x_0 = blocks.vector_source_c([math.sin(math.pi / 2 * i / 112) for i in range(112)] + [1] * (2048-112) + [math.cos(math.pi / 2 * i / 112) for i in range(112)], True, 1, []) + self.blocks_stream_to_vector_0 = blocks.stream_to_vector(gr.sizeof_gr_complex*1, 2048) + self.blocks_repeat_0 = blocks.repeat(gr.sizeof_gr_complex*2048, 2) + self.blocks_multiply_xx_0 = blocks.multiply_vcc(1) +- self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vcc((0.5, )) ++ self.blocks_multiply_const_vxx_0 = blocks.multiply_const_cc(0.5) + self.blocks_keep_m_in_n_0 = blocks.keep_m_in_n(gr.sizeof_gr_complex, 2160, 4096, 0) + self.blocks_interleave_0 = blocks.interleave(gr.sizeof_float*1, 1) + self.blocks_float_to_uchar_0 = blocks.float_to_uchar() +@@ -56,7 +58,9 @@ def __init__(self): + self.blocks_file_sink_0.set_unbuffered(False) + self.blocks_conjugate_cc_0 = blocks.conjugate_cc() + self.blocks_complex_to_float_0 = blocks.complex_to_float(1) +- self.blocks_add_const_vxx_0_0 = blocks.add_const_vff((127.5, )) ++ self.blocks_add_const_vxx_0_0 = blocks.add_const_ff(127.5) ++ ++ + + ################################################## + # Connections +@@ -87,10 +91,24 @@ def __init__(self): + self.connect((self.rational_resampler_xxx_1, 0), (self.blocks_multiply_const_vxx_0, 0)) + + +-def main(top_block_cls=hd_tx_rtl_file, options=None): + ++def main(top_block_cls=hd_tx_rtl_file, options=None): + tb = top_block_cls() ++ ++ def sig_handler(sig=None, frame=None): ++ tb.stop() ++ tb.wait() ++ sys.exit(0) ++ ++ signal.signal(signal.SIGINT, sig_handler) ++ signal.signal(signal.SIGTERM, sig_handler) ++ + tb.start() ++ try: ++ input('Press Enter to quit: ') ++ except EOFError: ++ pass ++ tb.stop() + tb.wait() + + +diff --git a/apps/hd_tx_usrp.grc b/apps/hd_tx_usrp.grc +index fc6fc4e..8e34368 100644 +--- a/apps/hd_tx_usrp.grc ++++ b/apps/hd_tx_usrp.grc +@@ -1,2487 +1,846 @@ +- +- +- +- Fri Sep 16 01:35:53 2016 +- +- options +- +- author +- +- +- +- window_size +- +- +- +- category +- [GRC Hier Blocks] +- +- +- comment +- +- +- +- description +- +- +- +- _enabled +- True +- +- +- _coordinate +- (8, 12) +- +- +- _rotation +- 0 +- +- +- generate_options +- no_gui +- +- +- hier_block_src_path +- .: +- +- +- id +- hd_tx_usrp +- +- +- max_nouts +- 0 +- +- +- qt_qss_theme +- +- +- +- realtime_scheduling +- +- +- +- run_command +- {python} -u {filename} +- +- +- run_options +- prompt +- +- +- run +- True +- +- +- thread_safe_setters +- +- +- +- title +- +- +- +- +- variable +- +- comment +- +- +- +- _enabled +- True +- +- +- _coordinate +- (8, 164) +- +- +- _rotation +- 0 +- +- +- id +- freq +- +- +- value +- 95.7e6 +- +- +- +- variable +- +- comment +- +- +- +- _enabled +- True +- +- +- _coordinate +- (8, 100) +- +- +- _rotation +- 0 +- +- +- id +- samp_rate +- +- +- value +- 2000000 +- +- +- +- analog_sig_source_x +- +- amp +- 0.1 +- +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- freq +- 1000 +- +- +- _coordinate +- (896, 584) +- +- +- _rotation +- 180 +- +- +- id +- analog_sig_source_x_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- offset +- 0 +- +- +- type +- float +- +- +- samp_rate +- 50000 +- +- +- waveform +- analog.GR_COS_WAVE +- +- +- +- analog_wfm_tx +- +- audio_rate +- 50000 +- +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (640, 584) +- +- +- _rotation +- 180 +- +- +- id +- analog_wfm_tx_0 +- +- +- max_dev +- 75e3 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- fh +- -1.0 +- +- +- quad_rate +- 200000 +- +- +- tau +- 75e-6 +- +- +- +- blocks_add_xx +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (424, 472) +- +- +- _rotation +- 0 +- +- +- id +- blocks_add_xx_0 +- +- +- type +- complex +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- num_inputs +- 2 +- +- +- vlen +- 1 +- +- +- +- blocks_conjugate_cc +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (624, 376) +- +- +- _rotation +- 180 +- +- +- id +- blocks_conjugate_cc_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- +- blocks_keep_m_in_n +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (952, 340) +- +- +- _rotation +- 180 +- +- +- id +- blocks_keep_m_in_n_0 +- +- +- m +- 2160 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- n +- 4096 +- +- +- type +- complex +- +- +- offset +- 0 +- +- +- +- blocks_multiply_const_vxx +- +- alias +- +- +- +- comment +- +- +- +- const +- 0.001 +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (248, 468) +- +- +- _rotation +- 0 +- +- +- id +- blocks_multiply_const_vxx_0 +- +- +- type +- complex +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- vlen +- 1 +- +- +- +- blocks_multiply_const_vxx +- +- alias +- +- +- +- comment +- +- +- +- const +- 0.1 +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (104, 612) +- +- +- _rotation +- 180 +- +- +- id +- blocks_multiply_const_vxx_1 +- +- +- type +- complex +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- vlen +- 1 +- +- +- +- blocks_multiply_xx +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- 1 +- +- +- _coordinate +- (816, 360) +- +- +- _rotation +- 180 +- +- +- id +- blocks_multiply_xx_0 +- +- +- type +- complex +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- num_inputs +- 2 +- +- +- vlen +- 1 +- +- +- +- blocks_repeat +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (1104, 244) +- +- +- _rotation +- 0 +- +- +- id +- blocks_repeat_0 +- +- +- interp +- 2 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- type +- complex +- +- +- vlen +- 2048 +- +- +- +- blocks_stream_to_vector +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (696, 252) +- +- +- _rotation +- 0 +- +- +- id +- blocks_stream_to_vector_0 +- +- +- type +- complex +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- num_items +- 2048 +- +- +- vlen +- 1 +- +- +- +- blocks_vector_source_x +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- 1 +- +- +- _coordinate +- (952, 428) +- +- +- _rotation +- 180 +- +- +- id +- blocks_vector_source_x_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- type +- complex +- +- +- repeat +- True +- +- +- tags +- [] +- +- +- vlen +- 1 +- +- +- vector +- [math.sin(math.pi / 2 * i / 112) for i in range(112)] + [1] * (2048-112) + [math.cos(math.pi / 2 * i / 112) for i in range(112)] +- +- +- +- blocks_vector_to_stream +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (1104, 356) +- +- +- _rotation +- 180 +- +- +- id +- blocks_vector_to_stream_0 +- +- +- type +- complex +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- num_items +- 2048 +- +- +- vlen +- 1 +- +- +- +- blocks_vector_to_stream +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (288, 252) +- +- +- _rotation +- 0 +- +- +- id +- blocks_vector_to_stream_1 +- +- +- type +- byte +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- num_items +- 1048576 +- +- +- vlen +- 1 +- +- +- +- blocks_wavfile_source +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- file +- sample.wav +- +- +- _coordinate +- (328, 16) +- +- +- _rotation +- 0 +- +- +- id +- blocks_wavfile_source_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- nchan +- 2 +- +- +- repeat +- True +- +- +- +- digital_chunks_to_symbols_xx +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- dimension +- 1 +- +- +- _enabled +- True +- +- +- _coordinate +- (472, 244) +- +- +- _rotation +- 0 +- +- +- id +- digital_chunks_to_symbols_xx_0 +- +- +- in_type +- byte +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- num_ports +- 1 +- +- +- out_type +- complex +- +- +- symbol_table +- -1-1j, -1+1j, 1-1j, 1+1j, 0 +- +- +- +- fft_vxx +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- fft_size +- 2048 +- +- +- forward +- False +- +- +- _coordinate +- (880, 224) +- +- +- _rotation +- 0 +- +- +- id +- fft_vxx_0 +- +- +- type +- complex +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- nthreads +- 1 +- +- +- shift +- True +- +- +- window +- window.rectangular(2048) +- +- +- +- import +- +- alias +- +- +- +- comment +- +- +- +- _enabled +- True +- +- +- _coordinate +- (8, 236) +- +- +- _rotation +- 0 +- +- +- id +- import_0 +- +- +- import +- import math +- +- +- +- low_pass_filter +- +- beta +- 6.76 +- +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- cutoff_freq +- 80000 +- +- +- decim +- 1 +- +- +- _enabled +- True +- +- +- type +- fir_filter_ccf +- +- +- _coordinate +- (264, 568) +- +- +- _rotation +- 180 +- +- +- gain +- 1 +- +- +- id +- low_pass_filter_0 +- +- +- interp +- 1 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- samp_rate +- samp_rate +- +- +- width +- 20000 +- +- +- win +- firdes.WIN_HAMMING +- +- +- +- nrsc5_hdc_encoder +- +- bitrate +- 64000 +- +- +- alias +- +- +- +- channels +- 2 +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (512, 16) +- +- +- _rotation +- 0 +- +- +- id +- nrsc5_hdc_encoder_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- +- nrsc5_l1_fm_encoder_mp1 +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (888, 48) +- +- +- _rotation +- 0 +- +- +- id +- nrsc5_l1_fm_encoder_mp1_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- +- nrsc5_l2_encoder +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- first_prog +- 0 +- +- +- size +- 146176 +- +- +- _coordinate +- (696, 32) +- +- +- _rotation +- 0 +- +- +- id +- nrsc5_l2_encoder_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- num_progs +- 1 +- +- +- +- nrsc5_sis_encoder +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (688, 108) +- +- +- _rotation +- 0 +- +- +- id +- nrsc5_sis_encoder_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- short_name +- ABCD +- +- +- +- nrsc5_psd_encoder +- +- artist +- Artist +- +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- _enabled +- True +- +- +- _coordinate +- (488, 92) +- +- +- _rotation +- 0 +- +- +- id +- nrsc5_psd_encoder_0 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- prog_num +- 0 +- +- +- title +- Title +- +- +- +- rational_resampler_xxx +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- decim +- 1 +- +- +- _enabled +- True +- +- +- fbw +- 0 +- +- +- _coordinate +- (448, 592) +- +- +- _rotation +- 180 +- +- +- id +- rational_resampler_xxx_0 +- +- +- interp +- samp_rate / 200000 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- taps +- +- +- +- type +- ccc +- +- +- +- rational_resampler_xxx +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- decim +- 49 +- +- +- _enabled +- True +- +- +- fbw +- 0 +- +- +- _coordinate +- (432, 352) +- +- +- _rotation +- 180 +- +- +- id +- rational_resampler_xxx_1 +- +- +- interp +- 125 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- taps +- +- +- +- type +- ccc +- +- +- +- rational_resampler_xxx +- +- alias +- +- +- +- comment +- +- +- +- affinity +- +- +- +- decim +- 243 +- +- +- _enabled +- True +- +- +- fbw +- 0 +- +- +- _coordinate +- (240, 352) +- +- +- _rotation +- 180 +- +- +- id +- rational_resampler_xxx_2 +- +- +- interp +- 256 +- +- +- maxoutbuf +- 0 +- +- +- minoutbuf +- 0 +- +- +- taps +- +- +- +- type +- ccc +- +- +- +- uhd_usrp_sink +- +- alias +- +- +- +- ant0 +- +- +- +- bw0 +- 0 +- +- +- center_freq0 +- freq +- +- +- norm_gain0 +- False +- +- +- gain0 +- 70 +- +- +- ant10 +- +- +- +- bw10 +- 0 +- +- +- center_freq10 +- 0 +- +- +- norm_gain10 +- False +- +- +- gain10 +- 0 +- +- +- ant11 +- +- +- +- bw11 +- 0 +- +- +- center_freq11 +- 0 +- +- +- norm_gain11 +- False +- +- +- gain11 +- 0 +- +- +- ant12 +- +- +- +- bw12 +- 0 +- +- +- center_freq12 +- 0 +- +- +- norm_gain12 +- False +- +- +- gain12 +- 0 +- +- +- ant13 +- +- +- +- bw13 +- 0 +- +- +- center_freq13 +- 0 +- +- +- norm_gain13 +- False +- +- +- gain13 +- 0 +- +- +- ant14 +- +- +- +- bw14 +- 0 +- +- +- center_freq14 +- 0 +- +- +- norm_gain14 +- False +- +- +- gain14 +- 0 +- +- +- ant15 +- +- +- +- bw15 +- 0 +- +- +- center_freq15 +- 0 +- +- +- norm_gain15 +- False +- +- +- gain15 +- 0 +- +- +- ant16 +- +- +- +- bw16 +- 0 +- +- +- center_freq16 +- 0 +- +- +- norm_gain16 +- False +- +- +- gain16 +- 0 +- +- +- ant17 +- +- +- +- bw17 +- 0 +- +- +- center_freq17 +- 0 +- +- +- norm_gain17 +- False +- +- +- gain17 +- 0 +- +- +- ant18 +- +- +- +- bw18 +- 0 +- +- +- center_freq18 +- 0 +- +- +- norm_gain18 +- False +- +- +- gain18 +- 0 +- +- +- ant19 +- +- +- +- bw19 +- 0 +- +- +- center_freq19 +- 0 +- +- +- norm_gain19 +- False +- +- +- gain19 +- 0 +- +- +- ant1 +- +- +- +- bw1 +- 0 +- +- +- center_freq1 +- 0 +- +- +- norm_gain1 +- False +- +- +- gain1 +- 0 +- +- +- ant20 +- +- +- +- bw20 +- 0 +- +- +- center_freq20 +- 0 +- +- +- norm_gain20 +- False +- +- +- gain20 +- 0 +- +- +- ant21 +- +- +- +- bw21 +- 0 +- +- +- center_freq21 +- 0 +- +- +- norm_gain21 +- False +- +- +- gain21 +- 0 +- +- +- ant22 +- +- +- +- bw22 +- 0 +- +- +- center_freq22 +- 0 +- +- +- norm_gain22 +- False +- +- +- gain22 +- 0 +- +- +- ant23 +- +- +- +- bw23 +- 0 +- +- +- center_freq23 +- 0 +- +- +- norm_gain23 +- False +- +- +- gain23 +- 0 +- +- +- ant24 +- +- +- +- bw24 +- 0 +- +- +- center_freq24 +- 0 +- +- +- norm_gain24 +- False +- +- +- gain24 +- 0 +- +- +- ant25 +- +- +- +- bw25 +- 0 +- +- +- center_freq25 +- 0 +- +- +- norm_gain25 +- False +- +- +- gain25 +- 0 +- +- +- ant26 +- +- +- +- bw26 +- 0 +- +- +- center_freq26 +- 0 +- +- +- norm_gain26 +- False +- +- +- gain26 +- 0 +- +- +- ant27 +- +- +- +- bw27 +- 0 +- +- +- center_freq27 +- 0 +- +- +- norm_gain27 +- False +- +- +- gain27 +- 0 +- +- +- ant28 +- +- +- +- bw28 +- 0 +- +- +- center_freq28 +- 0 +- +- +- norm_gain28 +- False +- +- +- gain28 +- 0 +- +- +- ant29 +- +- +- +- bw29 +- 0 +- +- +- center_freq29 +- 0 +- +- +- norm_gain29 +- False +- +- +- gain29 +- 0 +- +- +- ant2 +- +- +- +- bw2 +- 0 +- +- +- center_freq2 +- 0 +- +- +- norm_gain2 +- False +- +- +- gain2 +- 0 +- +- +- ant30 +- +- +- +- bw30 +- 0 +- +- +- center_freq30 +- 0 +- +- +- norm_gain30 +- False +- +- +- gain30 +- 0 +- +- +- ant31 +- +- +- +- bw31 +- 0 +- +- +- center_freq31 +- 0 +- +- +- norm_gain31 +- False +- +- +- gain31 +- 0 +- +- +- ant3 +- +- +- +- bw3 +- 0 +- +- +- center_freq3 +- 0 +- +- +- norm_gain3 +- False +- +- +- gain3 +- 0 +- +- +- ant4 +- +- +- +- bw4 +- 0 +- +- +- center_freq4 +- 0 +- +- +- norm_gain4 +- False +- +- +- gain4 +- 0 +- +- +- ant5 +- +- +- +- bw5 +- 0 +- +- +- center_freq5 +- 0 +- +- +- norm_gain5 +- False +- +- +- gain5 +- 0 +- +- +- ant6 +- +- +- +- bw6 +- 0 +- +- +- center_freq6 +- 0 +- +- +- norm_gain6 +- False +- +- +- gain6 +- 0 +- +- +- ant7 +- +- +- +- bw7 +- 0 +- +- +- center_freq7 +- 0 +- +- +- norm_gain7 +- False +- +- +- gain7 +- 0 +- +- +- ant8 +- +- +- +- bw8 +- 0 +- +- +- center_freq8 +- 0 +- +- +- norm_gain8 +- False +- +- +- gain8 +- 0 +- +- +- ant9 +- +- +- +- bw9 +- 0 +- +- +- center_freq9 +- 0 +- +- +- norm_gain9 +- False +- +- +- gain9 +- 0 +- +- +- clock_rate +- 0.0 +- +- +- comment +- +- +- +- affinity +- +- +- +- dev_addr +- "" +- +- +- dev_args +- "send_frame_size=65536,num_send_frames=128" +- +- +- _enabled +- 1 +- +- +- _coordinate +- (528, 440) +- +- +- _rotation +- 0 +- +- +- id +- uhd_usrp_sink_0 +- +- +- type +- fc32 +- +- +- clock_source0 +- +- +- +- sd_spec0 +- +- +- +- time_source0 +- +- +- +- clock_source1 +- +- +- +- sd_spec1 +- +- +- +- time_source1 +- +- +- +- clock_source2 +- +- +- +- sd_spec2 +- +- +- +- time_source2 +- +- +- +- clock_source3 +- +- +- +- sd_spec3 +- +- +- +- time_source3 +- +- +- +- clock_source4 +- +- +- +- sd_spec4 +- +- +- +- time_source4 +- +- +- +- clock_source5 +- +- +- +- sd_spec5 +- +- +- +- time_source5 +- +- +- +- clock_source6 +- +- +- +- sd_spec6 +- +- +- +- time_source6 +- +- +- +- clock_source7 +- +- +- +- sd_spec7 +- +- +- +- time_source7 +- +- +- +- nchan +- 1 +- +- +- num_mboards +- 1 +- +- +- samp_rate +- samp_rate +- +- +- hide_cmd_port +- False +- +- +- hide_lo_controls +- True +- +- +- stream_args +- +- +- +- stream_chans +- [] +- +- +- sync +- +- +- +- len_tag_name +- +- +- +- otw +- +- +- +- +- analog_sig_source_x_0 +- analog_wfm_tx_0 +- 0 +- 0 +- +- +- analog_wfm_tx_0 +- rational_resampler_xxx_0 +- 0 +- 0 +- +- +- blocks_add_xx_0 +- uhd_usrp_sink_0 +- 0 +- 0 +- +- +- blocks_conjugate_cc_0 +- rational_resampler_xxx_1 +- 0 +- 0 +- +- +- blocks_keep_m_in_n_0 +- blocks_multiply_xx_0 +- 0 +- 1 +- +- +- blocks_multiply_const_vxx_0 +- blocks_add_xx_0 +- 0 +- 0 +- +- +- blocks_multiply_const_vxx_1 +- blocks_add_xx_0 +- 0 +- 1 +- +- +- blocks_multiply_xx_0 +- blocks_conjugate_cc_0 +- 0 +- 0 +- +- +- blocks_repeat_0 +- blocks_vector_to_stream_0 +- 0 +- 0 +- +- +- blocks_stream_to_vector_0 +- fft_vxx_0 +- 0 +- 0 +- +- +- blocks_vector_source_x_0 +- blocks_multiply_xx_0 +- 0 +- 0 +- +- +- blocks_vector_to_stream_0 +- blocks_keep_m_in_n_0 +- 0 +- 0 +- +- +- blocks_vector_to_stream_1 +- digital_chunks_to_symbols_xx_0 +- 0 +- 0 +- +- +- blocks_wavfile_source_0 +- nrsc5_hdc_encoder_0 +- 0 +- 0 +- +- +- blocks_wavfile_source_0 +- nrsc5_hdc_encoder_0 +- 1 +- 1 +- +- +- digital_chunks_to_symbols_xx_0 +- blocks_stream_to_vector_0 +- 0 +- 0 +- +- +- fft_vxx_0 +- blocks_repeat_0 +- 0 +- 0 +- +- +- low_pass_filter_0 +- blocks_multiply_const_vxx_1 +- 0 +- 0 +- +- +- nrsc5_hdc_encoder_0 +- nrsc5_l2_encoder_0 +- 0 +- 0 +- +- +- nrsc5_l1_fm_encoder_mp1_0 +- blocks_vector_to_stream_1 +- 0 +- 0 +- +- +- nrsc5_l2_encoder_0 +- nrsc5_l1_fm_encoder_mp1_0 +- 0 +- 0 +- +- +- nrsc5_sis_encoder_0 +- nrsc5_l1_fm_encoder_mp1_0 +- 0 +- 1 +- +- +- nrsc5_psd_encoder_0 +- nrsc5_l2_encoder_0 +- 0 +- 1 +- +- +- rational_resampler_xxx_0 +- low_pass_filter_0 +- 0 +- 0 +- +- +- rational_resampler_xxx_1 +- rational_resampler_xxx_2 +- 0 +- 0 +- +- +- rational_resampler_xxx_2 +- blocks_multiply_const_vxx_0 +- 0 +- 0 +- +- ++options: ++ parameters: ++ author: '' ++ category: '[GRC Hier Blocks]' ++ cmake_opt: '' ++ comment: '' ++ copyright: '' ++ description: '' ++ gen_cmake: 'On' ++ gen_linking: dynamic ++ generate_options: no_gui ++ hier_block_src_path: '.:' ++ id: hd_tx_usrp ++ max_nouts: '0' ++ output_language: python ++ placement: (0,0) ++ qt_qss_theme: '' ++ realtime_scheduling: '' ++ run: 'True' ++ run_command: '{python} -u {filename}' ++ run_options: prompt ++ sizing_mode: fixed ++ thread_safe_setters: '' ++ title: '' ++ window_size: '' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [8, 12] ++ rotation: 0 ++ state: enabled ++ ++blocks: ++- name: freq ++ id: variable ++ parameters: ++ comment: '' ++ value: 87.5e6 ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [8, 164] ++ rotation: 0 ++ state: enabled ++- name: samp_rate ++ id: variable ++ parameters: ++ comment: '' ++ value: '2000000' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [8, 100] ++ rotation: 0 ++ state: enabled ++- name: analog_sig_source_x_0 ++ id: analog_sig_source_x ++ parameters: ++ affinity: '' ++ alias: '' ++ amp: '0.1' ++ comment: '' ++ freq: '1000' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ offset: '0' ++ phase: '0' ++ samp_rate: '50000' ++ type: float ++ waveform: analog.GR_COS_WAVE ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [1152, 644.0] ++ rotation: 180 ++ state: enabled ++- name: analog_wfm_tx_0 ++ id: analog_wfm_tx ++ parameters: ++ affinity: '' ++ alias: '' ++ audio_rate: '50000' ++ comment: '' ++ fh: '-1.0' ++ max_dev: 75e3 ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ quad_rate: '200000' ++ tau: 75e-6 ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [896, 652.0] ++ rotation: 180 ++ state: enabled ++- name: blocks_add_xx_0 ++ id: blocks_add_xx ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ num_inputs: '2' ++ type: complex ++ vlen: '1' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [424, 544.0] ++ rotation: 0 ++ state: enabled ++- name: blocks_conjugate_cc_0 ++ id: blocks_conjugate_cc ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [624, 424.0] ++ rotation: 180 ++ state: enabled ++- name: blocks_keep_m_in_n_0 ++ id: blocks_keep_m_in_n ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ m: '2160' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ n: '4096' ++ offset: '0' ++ type: complex ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [952, 420.0] ++ rotation: 180 ++ state: enabled ++- name: blocks_multiply_const_vxx_0 ++ id: blocks_multiply_const_vxx ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ const: '0.001' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ type: complex ++ vlen: '1' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [248, 540.0] ++ rotation: 0 ++ state: enabled ++- name: blocks_multiply_const_vxx_1 ++ id: blocks_multiply_const_vxx ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ const: '0.1' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ type: complex ++ vlen: '1' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [368, 684.0] ++ rotation: 180 ++ state: enabled ++- name: blocks_multiply_xx_0 ++ id: blocks_multiply_xx ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ num_inputs: '2' ++ type: complex ++ vlen: '1' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [816, 408.0] ++ rotation: 180 ++ state: enabled ++- name: blocks_repeat_0 ++ id: blocks_repeat ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ interp: '2' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ type: complex ++ vlen: '2048' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [1104, 244] ++ rotation: 0 ++ state: enabled ++- name: blocks_stream_to_vector_0 ++ id: blocks_stream_to_vector ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ num_items: '2048' ++ type: complex ++ vlen: '1' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [696, 256.0] ++ rotation: 0 ++ state: enabled ++- name: blocks_vector_source_x_0 ++ id: blocks_vector_source_x ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ repeat: 'True' ++ tags: '[]' ++ type: complex ++ vector: '[math.sin(math.pi / 2 * i / 112) for i in range(112)] + [1] * (2048-112) ++ + [math.cos(math.pi / 2 * i / 112) for i in range(112)]' ++ vlen: '1' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [952, 340.0] ++ rotation: 180 ++ state: enabled ++- name: blocks_vector_to_stream_0 ++ id: blocks_vector_to_stream ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ num_items: '2048' ++ type: complex ++ vlen: '1' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [1104, 440.0] ++ rotation: 180 ++ state: enabled ++- name: blocks_vector_to_stream_1 ++ id: blocks_vector_to_stream ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ num_items: '1048576' ++ type: byte ++ vlen: '1' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [288, 256.0] ++ rotation: 0 ++ state: enabled ++- name: blocks_wavfile_source_0 ++ id: blocks_wavfile_source ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ file: sample.wav ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ nchan: '2' ++ repeat: 'True' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [896, 56.0] ++ rotation: 180 ++ state: enabled ++- name: digital_chunks_to_symbols_xx_0 ++ id: digital_chunks_to_symbols_xx ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ dimension: '1' ++ in_type: byte ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ num_ports: '1' ++ out_type: complex ++ symbol_table: (-1-1j, -1+1j, 1-1j, 1+1j, 0) ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [472, 256.0] ++ rotation: 0 ++ state: enabled ++- name: fft_vxx_0 ++ id: fft_vxx ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ fft_size: '2048' ++ forward: 'False' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ nthreads: '1' ++ shift: 'True' ++ type: complex ++ window: window.rectangular(2048) ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [880, 220.0] ++ rotation: 0 ++ state: enabled ++- name: import_0 ++ id: import ++ parameters: ++ alias: '' ++ comment: '' ++ imports: import math ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [8, 236] ++ rotation: 0 ++ state: enabled ++- name: low_pass_filter_0 ++ id: low_pass_filter ++ parameters: ++ affinity: '' ++ alias: '' ++ beta: '6.76' ++ comment: '' ++ cutoff_freq: '80000' ++ decim: '1' ++ gain: '1' ++ interp: '1' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ samp_rate: samp_rate ++ type: fir_filter_ccf ++ width: '20000' ++ win: firdes.WIN_HAMMING ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [528, 636.0] ++ rotation: 180 ++ state: enabled ++- name: nrsc5_hdc_encoder_0 ++ id: nrsc5_hdc_encoder ++ parameters: ++ affinity: '' ++ alias: '' ++ bitrate: '64000' ++ channels: '2' ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [728, 56.0] ++ rotation: 180 ++ state: enabled ++- name: nrsc5_l1_fm_encoder_mp1_0 ++ id: nrsc5_l1_fm_encoder_mp1 ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [288, 88.0] ++ rotation: 180 ++ state: enabled ++- name: nrsc5_l2_encoder_0 ++ id: nrsc5_l2_encoder ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ first_prog: '0' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ num_progs: '1' ++ size: '146176' ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [528, 68.0] ++ rotation: 180 ++ state: enabled ++- name: nrsc5_psd_encoder_0 ++ id: nrsc5_psd_encoder ++ parameters: ++ affinity: '' ++ alias: '' ++ artist: Artist ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ prog_num: '0' ++ title: Title ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [728, 132.0] ++ rotation: 180 ++ state: enabled ++- name: nrsc5_sis_encoder_0 ++ id: nrsc5_sis_encoder ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ short_name: ABCD ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [528, 148.0] ++ rotation: 180 ++ state: enabled ++- name: rational_resampler_xxx_0 ++ id: rational_resampler_xxx ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ decim: '1' ++ fbw: '0' ++ interp: samp_rate // 200000 ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ taps: '' ++ type: ccc ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [704, 660.0] ++ rotation: 180 ++ state: enabled ++- name: rational_resampler_xxx_1 ++ id: rational_resampler_xxx ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ decim: '49' ++ fbw: '0' ++ interp: '125' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ taps: '' ++ type: ccc ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [432, 396.0] ++ rotation: 180 ++ state: enabled ++- name: rational_resampler_xxx_2 ++ id: rational_resampler_xxx ++ parameters: ++ affinity: '' ++ alias: '' ++ comment: '' ++ decim: '243' ++ fbw: '0' ++ interp: '256' ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ taps: '' ++ type: ccc ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [240, 396.0] ++ rotation: 180 ++ state: enabled ++- name: uhd_usrp_sink_0 ++ id: uhd_usrp_sink ++ parameters: ++ affinity: '' ++ alias: '' ++ ant0: TX/RX ++ ant1: '' ++ ant10: '' ++ ant11: '' ++ ant12: '' ++ ant13: '' ++ ant14: '' ++ ant15: '' ++ ant16: '' ++ ant17: '' ++ ant18: '' ++ ant19: '' ++ ant2: '' ++ ant20: '' ++ ant21: '' ++ ant22: '' ++ ant23: '' ++ ant24: '' ++ ant25: '' ++ ant26: '' ++ ant27: '' ++ ant28: '' ++ ant29: '' ++ ant3: '' ++ ant30: '' ++ ant31: '' ++ ant4: '' ++ ant5: '' ++ ant6: '' ++ ant7: '' ++ ant8: '' ++ ant9: '' ++ bw0: '0' ++ bw1: '0' ++ bw10: '0' ++ bw11: '0' ++ bw12: '0' ++ bw13: '0' ++ bw14: '0' ++ bw15: '0' ++ bw16: '0' ++ bw17: '0' ++ bw18: '0' ++ bw19: '0' ++ bw2: '0' ++ bw20: '0' ++ bw21: '0' ++ bw22: '0' ++ bw23: '0' ++ bw24: '0' ++ bw25: '0' ++ bw26: '0' ++ bw27: '0' ++ bw28: '0' ++ bw29: '0' ++ bw3: '0' ++ bw30: '0' ++ bw31: '0' ++ bw4: '0' ++ bw5: '0' ++ bw6: '0' ++ bw7: '0' ++ bw8: '0' ++ bw9: '0' ++ center_freq0: freq ++ center_freq1: '0' ++ center_freq10: '0' ++ center_freq11: '0' ++ center_freq12: '0' ++ center_freq13: '0' ++ center_freq14: '0' ++ center_freq15: '0' ++ center_freq16: '0' ++ center_freq17: '0' ++ center_freq18: '0' ++ center_freq19: '0' ++ center_freq2: '0' ++ center_freq20: '0' ++ center_freq21: '0' ++ center_freq22: '0' ++ center_freq23: '0' ++ center_freq24: '0' ++ center_freq25: '0' ++ center_freq26: '0' ++ center_freq27: '0' ++ center_freq28: '0' ++ center_freq29: '0' ++ center_freq3: '0' ++ center_freq30: '0' ++ center_freq31: '0' ++ center_freq4: '0' ++ center_freq5: '0' ++ center_freq6: '0' ++ center_freq7: '0' ++ center_freq8: '0' ++ center_freq9: '0' ++ clock_rate: '0.0' ++ clock_source0: '' ++ clock_source1: '' ++ clock_source2: '' ++ clock_source3: '' ++ clock_source4: '' ++ clock_source5: '' ++ clock_source6: '' ++ clock_source7: '' ++ comment: '' ++ dev_addr: '""' ++ dev_args: '' ++ gain0: '70' ++ gain1: '0' ++ gain10: '0' ++ gain11: '0' ++ gain12: '0' ++ gain13: '0' ++ gain14: '0' ++ gain15: '0' ++ gain16: '0' ++ gain17: '0' ++ gain18: '0' ++ gain19: '0' ++ gain2: '0' ++ gain20: '0' ++ gain21: '0' ++ gain22: '0' ++ gain23: '0' ++ gain24: '0' ++ gain25: '0' ++ gain26: '0' ++ gain27: '0' ++ gain28: '0' ++ gain29: '0' ++ gain3: '0' ++ gain30: '0' ++ gain31: '0' ++ gain4: '0' ++ gain5: '0' ++ gain6: '0' ++ gain7: '0' ++ gain8: '0' ++ gain9: '0' ++ len_tag_name: '' ++ lo_export0: 'False' ++ lo_export1: 'False' ++ lo_export10: 'False' ++ lo_export11: 'False' ++ lo_export12: 'False' ++ lo_export13: 'False' ++ lo_export14: 'False' ++ lo_export15: 'False' ++ lo_export16: 'False' ++ lo_export17: 'False' ++ lo_export18: 'False' ++ lo_export19: 'False' ++ lo_export2: 'False' ++ lo_export20: 'False' ++ lo_export21: 'False' ++ lo_export22: 'False' ++ lo_export23: 'False' ++ lo_export24: 'False' ++ lo_export25: 'False' ++ lo_export26: 'False' ++ lo_export27: 'False' ++ lo_export28: 'False' ++ lo_export29: 'False' ++ lo_export3: 'False' ++ lo_export30: 'False' ++ lo_export31: 'False' ++ lo_export4: 'False' ++ lo_export5: 'False' ++ lo_export6: 'False' ++ lo_export7: 'False' ++ lo_export8: 'False' ++ lo_export9: 'False' ++ lo_source0: internal ++ lo_source1: internal ++ lo_source10: internal ++ lo_source11: internal ++ lo_source12: internal ++ lo_source13: internal ++ lo_source14: internal ++ lo_source15: internal ++ lo_source16: internal ++ lo_source17: internal ++ lo_source18: internal ++ lo_source19: internal ++ lo_source2: internal ++ lo_source20: internal ++ lo_source21: internal ++ lo_source22: internal ++ lo_source23: internal ++ lo_source24: internal ++ lo_source25: internal ++ lo_source26: internal ++ lo_source27: internal ++ lo_source28: internal ++ lo_source29: internal ++ lo_source3: internal ++ lo_source30: internal ++ lo_source31: internal ++ lo_source4: internal ++ lo_source5: internal ++ lo_source6: internal ++ lo_source7: internal ++ lo_source8: internal ++ lo_source9: internal ++ maxoutbuf: '0' ++ minoutbuf: '0' ++ nchan: '1' ++ norm_gain0: 'False' ++ norm_gain1: 'False' ++ norm_gain10: 'False' ++ norm_gain11: 'False' ++ norm_gain12: 'False' ++ norm_gain13: 'False' ++ norm_gain14: 'False' ++ norm_gain15: 'False' ++ norm_gain16: 'False' ++ norm_gain17: 'False' ++ norm_gain18: 'False' ++ norm_gain19: 'False' ++ norm_gain2: 'False' ++ norm_gain20: 'False' ++ norm_gain21: 'False' ++ norm_gain22: 'False' ++ norm_gain23: 'False' ++ norm_gain24: 'False' ++ norm_gain25: 'False' ++ norm_gain26: 'False' ++ norm_gain27: 'False' ++ norm_gain28: 'False' ++ norm_gain29: 'False' ++ norm_gain3: 'False' ++ norm_gain30: 'False' ++ norm_gain31: 'False' ++ norm_gain4: 'False' ++ norm_gain5: 'False' ++ norm_gain6: 'False' ++ norm_gain7: 'False' ++ norm_gain8: 'False' ++ norm_gain9: 'False' ++ num_mboards: '1' ++ otw: '' ++ samp_rate: samp_rate ++ sd_spec0: '' ++ sd_spec1: '' ++ sd_spec2: '' ++ sd_spec3: '' ++ sd_spec4: '' ++ sd_spec5: '' ++ sd_spec6: '' ++ sd_spec7: '' ++ show_lo_controls: 'False' ++ stream_args: '' ++ stream_chans: '[]' ++ sync: sync ++ time_source0: '' ++ time_source1: '' ++ time_source2: '' ++ time_source3: '' ++ time_source4: '' ++ time_source5: '' ++ time_source6: '' ++ time_source7: '' ++ type: fc32 ++ states: ++ bus_sink: false ++ bus_source: false ++ bus_structure: null ++ coordinate: [528, 500.0] ++ rotation: 0 ++ state: enabled ++ ++connections: ++- [analog_sig_source_x_0, '0', analog_wfm_tx_0, '0'] ++- [analog_wfm_tx_0, '0', rational_resampler_xxx_0, '0'] ++- [blocks_add_xx_0, '0', uhd_usrp_sink_0, '0'] ++- [blocks_conjugate_cc_0, '0', rational_resampler_xxx_1, '0'] ++- [blocks_keep_m_in_n_0, '0', blocks_multiply_xx_0, '1'] ++- [blocks_multiply_const_vxx_0, '0', blocks_add_xx_0, '0'] ++- [blocks_multiply_const_vxx_1, '0', blocks_add_xx_0, '1'] ++- [blocks_multiply_xx_0, '0', blocks_conjugate_cc_0, '0'] ++- [blocks_repeat_0, '0', blocks_vector_to_stream_0, '0'] ++- [blocks_stream_to_vector_0, '0', fft_vxx_0, '0'] ++- [blocks_vector_source_x_0, '0', blocks_multiply_xx_0, '0'] ++- [blocks_vector_to_stream_0, '0', blocks_keep_m_in_n_0, '0'] ++- [blocks_vector_to_stream_1, '0', digital_chunks_to_symbols_xx_0, '0'] ++- [blocks_wavfile_source_0, '0', nrsc5_hdc_encoder_0, '0'] ++- [blocks_wavfile_source_0, '1', nrsc5_hdc_encoder_0, '1'] ++- [digital_chunks_to_symbols_xx_0, '0', blocks_stream_to_vector_0, '0'] ++- [fft_vxx_0, '0', blocks_repeat_0, '0'] ++- [low_pass_filter_0, '0', blocks_multiply_const_vxx_1, '0'] ++- [nrsc5_hdc_encoder_0, '0', nrsc5_l2_encoder_0, '0'] ++- [nrsc5_l1_fm_encoder_mp1_0, '0', blocks_vector_to_stream_1, '0'] ++- [nrsc5_l2_encoder_0, '0', nrsc5_l1_fm_encoder_mp1_0, '0'] ++- [nrsc5_psd_encoder_0, '0', nrsc5_l2_encoder_0, '1'] ++- [nrsc5_sis_encoder_0, '0', nrsc5_l1_fm_encoder_mp1_0, '1'] ++- [rational_resampler_xxx_0, '0', low_pass_filter_0, '0'] ++- [rational_resampler_xxx_1, '0', rational_resampler_xxx_2, '0'] ++- [rational_resampler_xxx_2, '0', blocks_multiply_const_vxx_0, '0'] ++ ++metadata: ++ file_format: 1 +diff --git a/apps/hd_tx_usrp.py b/apps/hd_tx_usrp.py +index 45c7145..37426ab 100755 +--- a/apps/hd_tx_usrp.py ++++ b/apps/hd_tx_usrp.py +@@ -1,27 +1,30 @@ +-#!/usr/bin/env python2 ++#!/usr/bin/env python3 + # -*- coding: utf-8 -*- +-################################################## ++ ++# ++# SPDX-License-Identifier: GPL-3.0 ++# + # GNU Radio Python Flow Graph + # Title: Hd Tx Usrp +-# Generated: Sun Oct 15 00:12:12 2017 +-################################################## ++# GNU Radio version: 3.8.0.0-rc2 + + from gnuradio import analog + from gnuradio import blocks + from gnuradio import digital +-from gnuradio import eng_notation + from gnuradio import fft ++from gnuradio.fft import window + from gnuradio import filter ++from gnuradio.filter import firdes + from gnuradio import gr ++import sys ++import signal ++from argparse import ArgumentParser ++from gnuradio.eng_arg import eng_float, intx ++from gnuradio import eng_notation + from gnuradio import uhd +-from gnuradio.eng_option import eng_option +-from gnuradio.fft import window +-from gnuradio.filter import firdes +-from optparse import OptionParser ++import time + import math + import nrsc5 +-import time +- + + class hd_tx_usrp(gr.top_block): + +@@ -32,47 +35,55 @@ def __init__(self): + # Variables + ################################################## + self.samp_rate = samp_rate = 2000000 +- self.freq = freq = 95.7e6 ++ self.freq = freq = 87.5e6 + + ################################################## + # Blocks + ################################################## + self.uhd_usrp_sink_0 = uhd.usrp_sink( +- ",".join(("", "send_frame_size=65536,num_send_frames=128")), +- uhd.stream_args( +- cpu_format="fc32", +- channels=range(1), +- ), ++ ",".join(("", '')), ++ uhd.stream_args( ++ cpu_format="fc32", ++ args='', ++ channels=[], ++ ), ++ '', + ) +- self.uhd_usrp_sink_0.set_samp_rate(samp_rate) + self.uhd_usrp_sink_0.set_center_freq(freq, 0) + self.uhd_usrp_sink_0.set_gain(70, 0) ++ self.uhd_usrp_sink_0.set_antenna('TX/RX', 0) ++ self.uhd_usrp_sink_0.set_samp_rate(samp_rate) ++ self.uhd_usrp_sink_0.set_time_unknown_pps(uhd.time_spec()) + self.rational_resampler_xxx_2 = filter.rational_resampler_ccc( + interpolation=256, + decimation=243, + taps=None, +- fractional_bw=None, +- ) ++ fractional_bw=None) + self.rational_resampler_xxx_1 = filter.rational_resampler_ccc( + interpolation=125, + decimation=49, + taps=None, +- fractional_bw=None, +- ) ++ fractional_bw=None) + self.rational_resampler_xxx_0 = filter.rational_resampler_ccc( +- interpolation=samp_rate / 200000, ++ interpolation=samp_rate // 200000, + decimation=1, + taps=None, +- fractional_bw=None, +- ) ++ fractional_bw=None) + self.nrsc5_sis_encoder_0 = nrsc5.sis_encoder('ABCD') + self.nrsc5_psd_encoder_0 = nrsc5.psd_encoder(0, 'Title', 'Artist') + self.nrsc5_l2_encoder_0 = nrsc5.l2_encoder(1, 0, 146176) + self.nrsc5_l1_fm_encoder_mp1_0 = nrsc5.l1_fm_encoder(1) + self.nrsc5_hdc_encoder_0 = nrsc5.hdc_encoder(2, 64000) +- self.low_pass_filter_0 = filter.fir_filter_ccf(1, firdes.low_pass( +- 1, samp_rate, 80000, 20000, firdes.WIN_HAMMING, 6.76)) +- self.fft_vxx_0 = fft.fft_vcc(2048, False, (window.rectangular(2048)), True, 1) ++ self.low_pass_filter_0 = filter.fir_filter_ccf( ++ 1, ++ firdes.low_pass( ++ 1, ++ samp_rate, ++ 80000, ++ 20000, ++ firdes.WIN_HAMMING, ++ 6.76)) ++ self.fft_vxx_0 = fft.fft_vcc(2048, False, window.rectangular(2048), True, 1) + self.digital_chunks_to_symbols_xx_0 = digital.chunks_to_symbols_bc((-1-1j, -1+1j, 1-1j, 1+1j, 0), 1) + self.blocks_wavfile_source_0 = blocks.wavfile_source('sample.wav', True) + self.blocks_vector_to_stream_1 = blocks.vector_to_stream(gr.sizeof_char*1, 1048576) +@@ -81,8 +92,8 @@ def __init__(self): + self.blocks_stream_to_vector_0 = blocks.stream_to_vector(gr.sizeof_gr_complex*1, 2048) + self.blocks_repeat_0 = blocks.repeat(gr.sizeof_gr_complex*2048, 2) + self.blocks_multiply_xx_0 = blocks.multiply_vcc(1) +- self.blocks_multiply_const_vxx_1 = blocks.multiply_const_vcc((0.1, )) +- self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vcc((0.001, )) ++ self.blocks_multiply_const_vxx_1 = blocks.multiply_const_cc(0.1) ++ self.blocks_multiply_const_vxx_0 = blocks.multiply_const_cc(0.001) + self.blocks_keep_m_in_n_0 = blocks.keep_m_in_n(gr.sizeof_gr_complex, 2160, 4096, 0) + self.blocks_conjugate_cc_0 = blocks.conjugate_cc() + self.blocks_add_xx_0 = blocks.add_vcc(1) +@@ -93,7 +104,9 @@ def __init__(self): + max_dev=75e3, + fh=-1.0, + ) +- self.analog_sig_source_x_0 = analog.sig_source_f(50000, analog.GR_COS_WAVE, 1000, 0.1, 0) ++ self.analog_sig_source_x_0 = analog.sig_source_f(50000, analog.GR_COS_WAVE, 1000, 0.1, 0, 0) ++ ++ + + ################################################## + # Connections +@@ -130,8 +143,8 @@ def get_samp_rate(self): + + def set_samp_rate(self, samp_rate): + self.samp_rate = samp_rate +- self.uhd_usrp_sink_0.set_samp_rate(self.samp_rate) + self.low_pass_filter_0.set_taps(firdes.low_pass(1, self.samp_rate, 80000, 20000, firdes.WIN_HAMMING, 6.76)) ++ self.uhd_usrp_sink_0.set_samp_rate(self.samp_rate) + + def get_freq(self): + return self.freq +@@ -141,12 +154,21 @@ def set_freq(self, freq): + self.uhd_usrp_sink_0.set_center_freq(self.freq, 0) + + +-def main(top_block_cls=hd_tx_usrp, options=None): + ++def main(top_block_cls=hd_tx_usrp, options=None): + tb = top_block_cls() ++ ++ def sig_handler(sig=None, frame=None): ++ tb.stop() ++ tb.wait() ++ sys.exit(0) ++ ++ signal.signal(signal.SIGINT, sig_handler) ++ signal.signal(signal.SIGTERM, sig_handler) ++ + tb.start() + try: +- raw_input('Press Enter to quit: ') ++ input('Press Enter to quit: ') + except EOFError: + pass + tb.stop() +diff --git a/cmake/Modules/CMakeParseArgumentsCopy.cmake b/cmake/Modules/CMakeParseArgumentsCopy.cmake +index 7ce4c49..66016cb 100644 +--- a/cmake/Modules/CMakeParseArgumentsCopy.cmake ++++ b/cmake/Modules/CMakeParseArgumentsCopy.cmake +@@ -58,7 +58,7 @@ + # the new option. + # E.g. my_install(TARGETS foo DESTINATION OPTIONAL) would result in + # MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION would +-# be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor. ++# be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefore. + + #============================================================================= + # Copyright 2010 Alexander Neundorf +diff --git a/cmake/Modules/FindCppUnit.cmake b/cmake/Modules/FindCppUnit.cmake +deleted file mode 100644 +index f93ade3..0000000 +--- a/cmake/Modules/FindCppUnit.cmake ++++ /dev/null +@@ -1,39 +0,0 @@ +-# http://www.cmake.org/pipermail/cmake/2006-October/011446.html +-# Modified to use pkg config and use standard var names +- +-# +-# Find the CppUnit includes and library +-# +-# This module defines +-# CPPUNIT_INCLUDE_DIR, where to find tiff.h, etc. +-# CPPUNIT_LIBRARIES, the libraries to link against to use CppUnit. +-# CPPUNIT_FOUND, If false, do not try to use CppUnit. +- +-INCLUDE(FindPkgConfig) +-PKG_CHECK_MODULES(PC_CPPUNIT "cppunit") +- +-FIND_PATH(CPPUNIT_INCLUDE_DIRS +- NAMES cppunit/TestCase.h +- HINTS ${PC_CPPUNIT_INCLUDE_DIR} +- ${CMAKE_INSTALL_PREFIX}/include +- PATHS +- /usr/local/include +- /usr/include +-) +- +-FIND_LIBRARY(CPPUNIT_LIBRARIES +- NAMES cppunit +- HINTS ${PC_CPPUNIT_LIBDIR} +- ${CMAKE_INSTALL_PREFIX}/lib +- ${CMAKE_INSTALL_PREFIX}/lib64 +- PATHS +- ${CPPUNIT_INCLUDE_DIRS}/../lib +- /usr/local/lib +- /usr/lib +-) +- +-LIST(APPEND CPPUNIT_LIBRARIES ${CMAKE_DL_LIBS}) +- +-INCLUDE(FindPackageHandleStandardArgs) +-FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPPUNIT DEFAULT_MSG CPPUNIT_LIBRARIES CPPUNIT_INCLUDE_DIRS) +-MARK_AS_ADVANCED(CPPUNIT_LIBRARIES CPPUNIT_INCLUDE_DIRS) +diff --git a/cmake/Modules/FindGnuradioRuntime.cmake b/cmake/Modules/FindGnuradioRuntime.cmake +deleted file mode 100644 +index afed684..0000000 +--- a/cmake/Modules/FindGnuradioRuntime.cmake ++++ /dev/null +@@ -1,36 +0,0 @@ +-INCLUDE(FindPkgConfig) +-PKG_CHECK_MODULES(PC_GNURADIO_RUNTIME gnuradio-runtime) +- +-if(PC_GNURADIO_RUNTIME_FOUND) +- # look for include files +- FIND_PATH( +- GNURADIO_RUNTIME_INCLUDE_DIRS +- NAMES gnuradio/top_block.h +- HINTS $ENV{GNURADIO_RUNTIME_DIR}/include +- ${PC_GNURADIO_RUNTIME_INCLUDE_DIRS} +- ${CMAKE_INSTALL_PREFIX}/include +- PATHS /usr/local/include +- /usr/include +- ) +- +- # look for libs +- FIND_LIBRARY( +- GNURADIO_RUNTIME_LIBRARIES +- NAMES gnuradio-runtime +- HINTS $ENV{GNURADIO_RUNTIME_DIR}/lib +- ${PC_GNURADIO_RUNTIME_LIBDIR} +- ${CMAKE_INSTALL_PREFIX}/lib/ +- ${CMAKE_INSTALL_PREFIX}/lib64/ +- PATHS /usr/local/lib +- /usr/local/lib64 +- /usr/lib +- /usr/lib64 +- ) +- +- set(GNURADIO_RUNTIME_FOUND ${PC_GNURADIO_RUNTIME_FOUND}) +-endif(PC_GNURADIO_RUNTIME_FOUND) +- +-INCLUDE(FindPackageHandleStandardArgs) +-# do not check GNURADIO_RUNTIME_INCLUDE_DIRS, is not set when default include path us used. +-FIND_PACKAGE_HANDLE_STANDARD_ARGS(GNURADIO_RUNTIME DEFAULT_MSG GNURADIO_RUNTIME_LIBRARIES) +-MARK_AS_ADVANCED(GNURADIO_RUNTIME_LIBRARIES GNURADIO_RUNTIME_INCLUDE_DIRS) +diff --git a/cmake/Modules/GrMiscUtils.cmake b/cmake/Modules/GrMiscUtils.cmake +deleted file mode 100644 +index 5bad57c..0000000 +--- a/cmake/Modules/GrMiscUtils.cmake ++++ /dev/null +@@ -1,528 +0,0 @@ +-# Copyright 2010-2011,2014 Free Software Foundation, Inc. +-# +-# This file is part of GNU Radio +-# +-# GNU Radio 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, or (at your option) +-# any later version. +-# +-# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +-# the Free Software Foundation, Inc., 51 Franklin Street, +-# Boston, MA 02110-1301, USA. +- +-if(DEFINED __INCLUDED_GR_MISC_UTILS_CMAKE) +- return() +-endif() +-set(__INCLUDED_GR_MISC_UTILS_CMAKE TRUE) +- +-######################################################################## +-# Set global variable macro. +-# Used for subdirectories to export settings. +-# Example: include and library paths. +-######################################################################## +-function(GR_SET_GLOBAL var) +- set(${var} ${ARGN} CACHE INTERNAL "" FORCE) +-endfunction(GR_SET_GLOBAL) +- +-######################################################################## +-# Set the pre-processor definition if the condition is true. +-# - def the pre-processor definition to set and condition name +-######################################################################## +-function(GR_ADD_COND_DEF def) +- if(${def}) +- add_definitions(-D${def}) +- endif(${def}) +-endfunction(GR_ADD_COND_DEF) +- +-######################################################################## +-# Check for a header and conditionally set a compile define. +-# - hdr the relative path to the header file +-# - def the pre-processor definition to set +-######################################################################## +-function(GR_CHECK_HDR_N_DEF hdr def) +- include(CheckIncludeFileCXX) +- CHECK_INCLUDE_FILE_CXX(${hdr} ${def}) +- GR_ADD_COND_DEF(${def}) +-endfunction(GR_CHECK_HDR_N_DEF) +- +-######################################################################## +-# Include subdirectory macro. +-# Sets the CMake directory variables, +-# includes the subdirectory CMakeLists.txt, +-# resets the CMake directory variables. +-# +-# This macro includes subdirectories rather than adding them +-# so that the subdirectory can affect variables in the level above. +-# This provides a work-around for the lack of convenience libraries. +-# This way a subdirectory can append to the list of library sources. +-######################################################################## +-macro(GR_INCLUDE_SUBDIRECTORY subdir) +- #insert the current directories on the front of the list +- list(INSERT _cmake_source_dirs 0 ${CMAKE_CURRENT_SOURCE_DIR}) +- list(INSERT _cmake_binary_dirs 0 ${CMAKE_CURRENT_BINARY_DIR}) +- +- #set the current directories to the names of the subdirs +- set(CMAKE_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${subdir}) +- set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${subdir}) +- +- #include the subdirectory CMakeLists to run it +- file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +- include(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt) +- +- #reset the value of the current directories +- list(GET _cmake_source_dirs 0 CMAKE_CURRENT_SOURCE_DIR) +- list(GET _cmake_binary_dirs 0 CMAKE_CURRENT_BINARY_DIR) +- +- #pop the subdir names of the front of the list +- list(REMOVE_AT _cmake_source_dirs 0) +- list(REMOVE_AT _cmake_binary_dirs 0) +-endmacro(GR_INCLUDE_SUBDIRECTORY) +- +-######################################################################## +-# Check if a compiler flag works and conditionally set a compile define. +-# - flag the compiler flag to check for +-# - have the variable to set with result +-######################################################################## +-macro(GR_ADD_CXX_COMPILER_FLAG_IF_AVAILABLE flag have) +- include(CheckCXXCompilerFlag) +- CHECK_CXX_COMPILER_FLAG(${flag} ${have}) +- if(${have}) +- if(${CMAKE_VERSION} VERSION_GREATER "2.8.4") +- STRING(FIND "${CMAKE_CXX_FLAGS}" "${flag}" flag_dup) +- if(${flag_dup} EQUAL -1) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}") +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}") +- endif(${flag_dup} EQUAL -1) +- endif(${CMAKE_VERSION} VERSION_GREATER "2.8.4") +- endif(${have}) +-endmacro(GR_ADD_CXX_COMPILER_FLAG_IF_AVAILABLE) +- +-######################################################################## +-# Generates the .la libtool file +-# This appears to generate libtool files that cannot be used by auto*. +-# Usage GR_LIBTOOL(TARGET [target] DESTINATION [dest]) +-# Notice: there is not COMPONENT option, these will not get distributed. +-######################################################################## +-function(GR_LIBTOOL) +- if(NOT DEFINED GENERATE_LIBTOOL) +- set(GENERATE_LIBTOOL OFF) #disabled by default +- endif() +- +- if(GENERATE_LIBTOOL) +- include(CMakeParseArgumentsCopy) +- CMAKE_PARSE_ARGUMENTS(GR_LIBTOOL "" "TARGET;DESTINATION" "" ${ARGN}) +- +- find_program(LIBTOOL libtool) +- if(LIBTOOL) +- include(CMakeMacroLibtoolFile) +- CREATE_LIBTOOL_FILE(${GR_LIBTOOL_TARGET} /${GR_LIBTOOL_DESTINATION}) +- endif(LIBTOOL) +- endif(GENERATE_LIBTOOL) +- +-endfunction(GR_LIBTOOL) +- +-######################################################################## +-# Do standard things to the library target +-# - set target properties +-# - make install rules +-# Also handle gnuradio custom naming conventions w/ extras mode. +-######################################################################## +-function(GR_LIBRARY_FOO target) +- #parse the arguments for component names +- include(CMakeParseArgumentsCopy) +- CMAKE_PARSE_ARGUMENTS(GR_LIBRARY "" "RUNTIME_COMPONENT;DEVEL_COMPONENT" "" ${ARGN}) +- +- #set additional target properties +- set_target_properties(${target} PROPERTIES SOVERSION ${LIBVER}) +- +- #install the generated files like so... +- install(TARGETS ${target} +- LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT ${GR_LIBRARY_RUNTIME_COMPONENT} # .so/.dylib file +- ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT ${GR_LIBRARY_DEVEL_COMPONENT} # .lib file +- RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT ${GR_LIBRARY_RUNTIME_COMPONENT} # .dll file +- ) +- +- #extras mode enabled automatically on linux +- if(NOT DEFINED LIBRARY_EXTRAS) +- set(LIBRARY_EXTRAS ${LINUX}) +- endif() +- +- #special extras mode to enable alternative naming conventions +- if(LIBRARY_EXTRAS) +- +- #create .la file before changing props +- GR_LIBTOOL(TARGET ${target} DESTINATION ${GR_LIBRARY_DIR}) +- +- #give the library a special name with ultra-zero soversion +- set_target_properties(${target} PROPERTIES OUTPUT_NAME ${target}-${LIBVER} SOVERSION "0.0.0") +- set(target_name lib${target}-${LIBVER}.so.0.0.0) +- +- #custom command to generate symlinks +- add_custom_command( +- TARGET ${target} +- POST_BUILD +- COMMAND ${CMAKE_COMMAND} -E create_symlink ${target_name} ${CMAKE_CURRENT_BINARY_DIR}/lib${target}.so +- COMMAND ${CMAKE_COMMAND} -E create_symlink ${target_name} ${CMAKE_CURRENT_BINARY_DIR}/lib${target}-${LIBVER}.so.0 +- COMMAND ${CMAKE_COMMAND} -E touch ${target_name} #so the symlinks point to something valid so cmake 2.6 will install +- ) +- +- #and install the extra symlinks +- install( +- FILES +- ${CMAKE_CURRENT_BINARY_DIR}/lib${target}.so +- ${CMAKE_CURRENT_BINARY_DIR}/lib${target}-${LIBVER}.so.0 +- DESTINATION ${GR_LIBRARY_DIR} COMPONENT ${GR_LIBRARY_RUNTIME_COMPONENT} +- ) +- +- endif(LIBRARY_EXTRAS) +-endfunction(GR_LIBRARY_FOO) +- +-######################################################################## +-# Create a dummy custom command that depends on other targets. +-# Usage: +-# GR_GEN_TARGET_DEPS(unique_name target_deps ...) +-# ADD_CUSTOM_COMMAND( ${target_deps}) +-# +-# Custom command cant depend on targets, but can depend on executables, +-# and executables can depend on targets. So this is the process: +-######################################################################## +-function(GR_GEN_TARGET_DEPS name var) +- file( +- WRITE ${CMAKE_CURRENT_BINARY_DIR}/${name}.cpp.in +- "int main(void){return 0;}\n" +- ) +- execute_process( +- COMMAND ${CMAKE_COMMAND} -E copy_if_different +- ${CMAKE_CURRENT_BINARY_DIR}/${name}.cpp.in +- ${CMAKE_CURRENT_BINARY_DIR}/${name}.cpp +- ) +- add_executable(${name} ${CMAKE_CURRENT_BINARY_DIR}/${name}.cpp) +- if(ARGN) +- add_dependencies(${name} ${ARGN}) +- endif(ARGN) +- +- if(CMAKE_CROSSCOMPILING) +- set(${var} "DEPENDS;${name}" PARENT_SCOPE) #cant call command when cross +- else() +- set(${var} "DEPENDS;${name};COMMAND;${name}" PARENT_SCOPE) +- endif() +-endfunction(GR_GEN_TARGET_DEPS) +- +-######################################################################## +-# Control use of gr_logger +-# Usage: +-# GR_LOGGING() +-# +-# Will set ENABLE_GR_LOG to 1 by default. +-# Can manually set with -DENABLE_GR_LOG=0|1 +-######################################################################## +-function(GR_LOGGING) +- find_package(Log4cpp) +- +- OPTION(ENABLE_GR_LOG "Use gr_logger" ON) +- if(ENABLE_GR_LOG) +- # If gr_logger is enabled, make it usable +- add_definitions( -DENABLE_GR_LOG ) +- +- # also test LOG4CPP; if we have it, use this version of the logger +- # otherwise, default to the stdout/stderr model. +- if(LOG4CPP_FOUND) +- SET(HAVE_LOG4CPP True CACHE INTERNAL "" FORCE) +- add_definitions( -DHAVE_LOG4CPP ) +- else(not LOG4CPP_FOUND) +- SET(HAVE_LOG4CPP False CACHE INTERNAL "" FORCE) +- SET(LOG4CPP_INCLUDE_DIRS "" CACHE INTERNAL "" FORCE) +- SET(LOG4CPP_LIBRARY_DIRS "" CACHE INTERNAL "" FORCE) +- SET(LOG4CPP_LIBRARIES "" CACHE INTERNAL "" FORCE) +- endif(LOG4CPP_FOUND) +- +- SET(ENABLE_GR_LOG ${ENABLE_GR_LOG} CACHE INTERNAL "" FORCE) +- +- else(ENABLE_GR_LOG) +- SET(HAVE_LOG4CPP False CACHE INTERNAL "" FORCE) +- SET(LOG4CPP_INCLUDE_DIRS "" CACHE INTERNAL "" FORCE) +- SET(LOG4CPP_LIBRARY_DIRS "" CACHE INTERNAL "" FORCE) +- SET(LOG4CPP_LIBRARIES "" CACHE INTERNAL "" FORCE) +- endif(ENABLE_GR_LOG) +- +- message(STATUS "ENABLE_GR_LOG set to ${ENABLE_GR_LOG}.") +- message(STATUS "HAVE_LOG4CPP set to ${HAVE_LOG4CPP}.") +- message(STATUS "LOG4CPP_LIBRARIES set to ${LOG4CPP_LIBRARIES}.") +- +-endfunction(GR_LOGGING) +- +-######################################################################## +-# Run GRCC to compile .grc files into .py files. +-# +-# Usage: GRCC(filename, directory) +-# - filenames: List of file name of .grc file +-# - directory: directory of built .py file - usually in +-# ${CMAKE_CURRENT_BINARY_DIR} +-# - Sets PYFILES: output converted GRC file names to Python files. +-######################################################################## +-function(GRCC) +- # Extract directory from list of args, remove it for the list of filenames. +- list(GET ARGV -1 directory) +- list(REMOVE_AT ARGV -1) +- set(filenames ${ARGV}) +- file(MAKE_DIRECTORY ${directory}) +- +- SET(GRCC_COMMAND ${CMAKE_SOURCE_DIR}/gr-utils/python/grcc) +- +- # GRCC uses some stuff in grc and gnuradio-runtime, so we force +- # the known paths here +- list(APPEND PYTHONPATHS +- ${CMAKE_SOURCE_DIR} +- ${CMAKE_SOURCE_DIR}/gnuradio-runtime/python +- ${CMAKE_SOURCE_DIR}/gnuradio-runtime/lib/swig +- ${CMAKE_BINARY_DIR}/gnuradio-runtime/lib/swig +- ) +- +- if(WIN32) +- #SWIG generates the python library files into a subdirectory. +- #Therefore, we must append this subdirectory into PYTHONPATH. +- #Only do this for the python directories matching the following: +- foreach(pydir ${PYTHONPATHS}) +- get_filename_component(name ${pydir} NAME) +- if(name MATCHES "^(swig|lib|src)$") +- list(APPEND PYTHONPATHS ${pydir}/${CMAKE_BUILD_TYPE}) +- endif() +- endforeach(pydir) +- endif(WIN32) +- +- file(TO_NATIVE_PATH "${PYTHONPATHS}" pypath) +- +- if(UNIX) +- list(APPEND pypath "$PYTHONPATH") +- string(REPLACE ";" ":" pypath "${pypath}") +- set(ENV{PYTHONPATH} ${pypath}) +- endif(UNIX) +- +- if(WIN32) +- list(APPEND pypath "%PYTHONPATH%") +- string(REPLACE ";" "\\;" pypath "${pypath}") +- #list(APPEND environs "PYTHONPATH=${pypath}") +- set(ENV{PYTHONPATH} ${pypath}) +- endif(WIN32) +- +- foreach(f ${filenames}) +- execute_process( +- COMMAND ${GRCC_COMMAND} -d ${directory} ${f} +- ) +- string(REPLACE ".grc" ".py" pyfile "${f}") +- string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" pyfile "${pyfile}") +- list(APPEND pyfiles ${pyfile}) +- endforeach(f) +- +- set(PYFILES ${pyfiles} PARENT_SCOPE) +-endfunction(GRCC) +- +-######################################################################## +-# Check if HAVE_PTHREAD_SETSCHEDPARAM and HAVE_SCHED_SETSCHEDULER +-# should be defined +-######################################################################## +-macro(GR_CHECK_LINUX_SCHED_AVAIL) +-set(CMAKE_REQUIRED_LIBRARIES -lpthread) +- CHECK_CXX_SOURCE_COMPILES(" +- #include +- int main(){ +- pthread_t pthread; +- pthread_setschedparam(pthread, 0, 0); +- return 0; +- } " HAVE_PTHREAD_SETSCHEDPARAM +- ) +- GR_ADD_COND_DEF(HAVE_PTHREAD_SETSCHEDPARAM) +- +- CHECK_CXX_SOURCE_COMPILES(" +- #include +- int main(){ +- pid_t pid; +- sched_setscheduler(pid, 0, 0); +- return 0; +- } " HAVE_SCHED_SETSCHEDULER +- ) +- GR_ADD_COND_DEF(HAVE_SCHED_SETSCHEDULER) +-endmacro(GR_CHECK_LINUX_SCHED_AVAIL) +- +-######################################################################## +-# Macros to generate source and header files from template +-######################################################################## +-macro(GR_EXPAND_X_H component root) +- +- include(GrPython) +- +- file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py +-"#!${PYTHON_EXECUTABLE} +- +-import sys, os, re +-sys.path.append('${GR_RUNTIME_PYTHONPATH}') +-sys.path.append('${CMAKE_SOURCE_DIR}/python') +-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}' +-os.chdir('${CMAKE_CURRENT_BINARY_DIR}') +- +-if __name__ == '__main__': +- import build_utils +- root, inp = sys.argv[1:3] +- for sig in sys.argv[3:]: +- name = re.sub ('X+', sig, root) +- d = build_utils.standard_dict2(name, sig, '${component}') +- build_utils.expand_template(d, inp) +-") +- +- #make a list of all the generated headers +- unset(expanded_files_h) +- foreach(sig ${ARGN}) +- string(REGEX REPLACE "X+" ${sig} name ${root}) +- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h) +- endforeach(sig) +- unset(name) +- +- #create a command to generate the headers +- add_custom_command( +- OUTPUT ${expanded_files_h} +- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t +- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} +- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py +- ${root} ${root}.h.t ${ARGN} +- ) +- +- #install rules for the generated headers +- list(APPEND generated_includes ${expanded_files_h}) +- +-endmacro(GR_EXPAND_X_H) +- +-macro(GR_EXPAND_X_CC_H component root) +- +- include(GrPython) +- +- file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py +-"#!${PYTHON_EXECUTABLE} +- +-import sys, os, re +-sys.path.append('${GR_RUNTIME_PYTHONPATH}') +-sys.path.append('${CMAKE_SOURCE_DIR}/python') +-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}' +-os.chdir('${CMAKE_CURRENT_BINARY_DIR}') +- +-if __name__ == '__main__': +- import build_utils +- root, inp = sys.argv[1:3] +- for sig in sys.argv[3:]: +- name = re.sub ('X+', sig, root) +- d = build_utils.standard_impl_dict2(name, sig, '${component}') +- build_utils.expand_template(d, inp) +-") +- +- #make a list of all the generated files +- unset(expanded_files_cc) +- unset(expanded_files_h) +- foreach(sig ${ARGN}) +- string(REGEX REPLACE "X+" ${sig} name ${root}) +- list(APPEND expanded_files_cc ${CMAKE_CURRENT_BINARY_DIR}/${name}.cc) +- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h) +- endforeach(sig) +- unset(name) +- +- #create a command to generate the source files +- add_custom_command( +- OUTPUT ${expanded_files_cc} +- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.cc.t +- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} +- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py +- ${root} ${root}.cc.t ${ARGN} +- ) +- +- #create a command to generate the header files +- add_custom_command( +- OUTPUT ${expanded_files_h} +- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t +- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} +- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py +- ${root} ${root}.h.t ${ARGN} +- ) +- +- #make source files depends on headers to force generation +- set_source_files_properties(${expanded_files_cc} +- PROPERTIES OBJECT_DEPENDS "${expanded_files_h}" +- ) +- +- #install rules for the generated files +- list(APPEND generated_sources ${expanded_files_cc}) +- list(APPEND generated_headers ${expanded_files_h}) +- +-endmacro(GR_EXPAND_X_CC_H) +- +-macro(GR_EXPAND_X_CC_H_IMPL component root) +- +- include(GrPython) +- +- file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py +-"#!${PYTHON_EXECUTABLE} +- +-import sys, os, re +-sys.path.append('${GR_RUNTIME_PYTHONPATH}') +-sys.path.append('${CMAKE_SOURCE_DIR}/python') +-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}' +-os.chdir('${CMAKE_CURRENT_BINARY_DIR}') +- +-if __name__ == '__main__': +- import build_utils +- root, inp = sys.argv[1:3] +- for sig in sys.argv[3:]: +- name = re.sub ('X+', sig, root) +- d = build_utils.standard_dict(name, sig, '${component}') +- build_utils.expand_template(d, inp, '_impl') +-") +- +- #make a list of all the generated files +- unset(expanded_files_cc_impl) +- unset(expanded_files_h_impl) +- unset(expanded_files_h) +- foreach(sig ${ARGN}) +- string(REGEX REPLACE "X+" ${sig} name ${root}) +- list(APPEND expanded_files_cc_impl ${CMAKE_CURRENT_BINARY_DIR}/${name}_impl.cc) +- list(APPEND expanded_files_h_impl ${CMAKE_CURRENT_BINARY_DIR}/${name}_impl.h) +- list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/../include/gnuradio/${component}/${name}.h) +- endforeach(sig) +- unset(name) +- +- #create a command to generate the _impl.cc files +- add_custom_command( +- OUTPUT ${expanded_files_cc_impl} +- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.cc.t +- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} +- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py +- ${root} ${root}_impl.cc.t ${ARGN} +- ) +- +- #create a command to generate the _impl.h files +- add_custom_command( +- OUTPUT ${expanded_files_h_impl} +- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}_impl.h.t +- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} +- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py +- ${root} ${root}_impl.h.t ${ARGN} +- ) +- +- #make _impl.cc source files depend on _impl.h to force generation +- set_source_files_properties(${expanded_files_cc_impl} +- PROPERTIES OBJECT_DEPENDS "${expanded_files_h_impl}" +- ) +- +- #make _impl.h source files depend on headers to force generation +- set_source_files_properties(${expanded_files_h_impl} +- PROPERTIES OBJECT_DEPENDS "${expanded_files_h}" +- ) +- +- #install rules for the generated files +- list(APPEND generated_sources ${expanded_files_cc_impl}) +- list(APPEND generated_headers ${expanded_files_h_impl}) +- +-endmacro(GR_EXPAND_X_CC_H_IMPL) +diff --git a/cmake/Modules/GrPlatform.cmake b/cmake/Modules/GrPlatform.cmake +deleted file mode 100644 +index 00a53d0..0000000 +--- a/cmake/Modules/GrPlatform.cmake ++++ /dev/null +@@ -1,62 +0,0 @@ +-# Copyright 2011 Free Software Foundation, Inc. +-# +-# This file is part of GNU Radio +-# +-# GNU Radio 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, or (at your option) +-# any later version. +-# +-# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +-# the Free Software Foundation, Inc., 51 Franklin Street, +-# Boston, MA 02110-1301, USA. +- +-if(DEFINED __INCLUDED_GR_PLATFORM_CMAKE) +- return() +-endif() +-set(__INCLUDED_GR_PLATFORM_CMAKE TRUE) +- +-######################################################################## +-# Setup additional defines for OS types +-######################################################################## +-if(CMAKE_SYSTEM_NAME STREQUAL "Linux") +- set(LINUX TRUE) +-endif() +- +-if(NOT CMAKE_CROSSCOMPILING AND LINUX AND EXISTS "/etc/debian_version") +- set(DEBIAN TRUE) +-endif() +- +-if(NOT CMAKE_CROSSCOMPILING AND LINUX AND EXISTS "/etc/redhat-release") +- set(REDHAT TRUE) +-endif() +- +-if(NOT CMAKE_CROSSCOMPILING AND LINUX AND EXISTS "/etc/slackware-version") +- set(SLACKWARE TRUE) +-endif() +- +-######################################################################## +-# when the library suffix should be 64 (applies to redhat linux family) +-######################################################################## +-if (REDHAT OR SLACKWARE) +- set(LIB64_CONVENTION TRUE) +-endif() +- +-if(NOT DEFINED LIB_SUFFIX AND LIB64_CONVENTION AND CMAKE_SYSTEM_PROCESSOR MATCHES "64$") +- set(LIB_SUFFIX 64) +-endif() +- +-######################################################################## +-# Detect /lib versus /lib64 +-######################################################################## +-if (CMAKE_INSTALL_LIBDIR MATCHES lib64) +- set(LIB_SUFFIX 64) +-endif() +- +-set(LIB_SUFFIX ${LIB_SUFFIX} CACHE STRING "lib directory suffix") +diff --git a/cmake/Modules/GrPython.cmake b/cmake/Modules/GrPython.cmake +deleted file mode 100644 +index 06e061e..0000000 +--- a/cmake/Modules/GrPython.cmake ++++ /dev/null +@@ -1,241 +0,0 @@ +-# Copyright 2010-2011 Free Software Foundation, Inc. +-# +-# This file is part of GNU Radio +-# +-# GNU Radio 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, or (at your option) +-# any later version. +-# +-# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +-# the Free Software Foundation, Inc., 51 Franklin Street, +-# Boston, MA 02110-1301, USA. +- +-if(DEFINED __INCLUDED_GR_PYTHON_CMAKE) +- return() +-endif() +-set(__INCLUDED_GR_PYTHON_CMAKE TRUE) +- +-######################################################################## +-# Setup the python interpreter: +-# This allows the user to specify a specific interpreter, +-# or finds the interpreter via the built-in cmake module. +-######################################################################## +-#this allows the user to override PYTHON_EXECUTABLE +-if(PYTHON_EXECUTABLE) +- +- set(PYTHONINTERP_FOUND TRUE) +- +-#otherwise if not set, try to automatically find it +-else(PYTHON_EXECUTABLE) +- +- #use the built-in find script +- find_package(PythonInterp 2) +- +- #and if that fails use the find program routine +- if(NOT PYTHONINTERP_FOUND) +- find_program(PYTHON_EXECUTABLE NAMES python python2 python2.7 python2.6 python2.5) +- if(PYTHON_EXECUTABLE) +- set(PYTHONINTERP_FOUND TRUE) +- endif(PYTHON_EXECUTABLE) +- endif(NOT PYTHONINTERP_FOUND) +- +-endif(PYTHON_EXECUTABLE) +- +-if (CMAKE_CROSSCOMPILING) +- set(QA_PYTHON_EXECUTABLE "/usr/bin/python") +-else (CMAKE_CROSSCOMPILING) +- set(QA_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE}) +-endif(CMAKE_CROSSCOMPILING) +- +-#make the path to the executable appear in the cmake gui +-set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter") +-set(QA_PYTHON_EXECUTABLE ${QA_PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter for QA tests") +- +-#make sure we can use -B with python (introduced in 2.6) +-if(PYTHON_EXECUTABLE) +- execute_process( +- COMMAND ${PYTHON_EXECUTABLE} -B -c "" +- OUTPUT_QUIET ERROR_QUIET +- RESULT_VARIABLE PYTHON_HAS_DASH_B_RESULT +- ) +- if(PYTHON_HAS_DASH_B_RESULT EQUAL 0) +- set(PYTHON_DASH_B "-B") +- endif() +-endif(PYTHON_EXECUTABLE) +- +-######################################################################## +-# Check for the existence of a python module: +-# - desc a string description of the check +-# - mod the name of the module to import +-# - cmd an additional command to run +-# - have the result variable to set +-######################################################################## +-macro(GR_PYTHON_CHECK_MODULE desc mod cmd have) +- message(STATUS "") +- message(STATUS "Python checking for ${desc}") +- execute_process( +- COMMAND ${PYTHON_EXECUTABLE} -c " +-######################################### +-try: +- import ${mod} +- assert ${cmd} +-except ImportError, AssertionError: exit(-1) +-except: pass +-#########################################" +- RESULT_VARIABLE ${have} +- ) +- if(${have} EQUAL 0) +- message(STATUS "Python checking for ${desc} - found") +- set(${have} TRUE) +- else(${have} EQUAL 0) +- message(STATUS "Python checking for ${desc} - not found") +- set(${have} FALSE) +- endif(${have} EQUAL 0) +-endmacro(GR_PYTHON_CHECK_MODULE) +- +-######################################################################## +-# Sets the python installation directory GR_PYTHON_DIR +-######################################################################## +-if(NOT DEFINED GR_PYTHON_DIR) +-execute_process(COMMAND ${PYTHON_EXECUTABLE} -c " +-from distutils import sysconfig +-print sysconfig.get_python_lib(plat_specific=True, prefix='') +-" OUTPUT_VARIABLE GR_PYTHON_DIR OUTPUT_STRIP_TRAILING_WHITESPACE +-) +-endif() +-file(TO_CMAKE_PATH ${GR_PYTHON_DIR} GR_PYTHON_DIR) +- +-######################################################################## +-# Create an always-built target with a unique name +-# Usage: GR_UNIQUE_TARGET( ) +-######################################################################## +-function(GR_UNIQUE_TARGET desc) +- file(RELATIVE_PATH reldir ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}) +- execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import re, hashlib +-unique = hashlib.md5('${reldir}${ARGN}').hexdigest()[:5] +-print(re.sub('\\W', '_', '${desc} ${reldir} ' + unique))" +- OUTPUT_VARIABLE _target OUTPUT_STRIP_TRAILING_WHITESPACE) +- add_custom_target(${_target} ALL DEPENDS ${ARGN}) +-endfunction(GR_UNIQUE_TARGET) +- +-######################################################################## +-# Install python sources (also builds and installs byte-compiled python) +-######################################################################## +-function(GR_PYTHON_INSTALL) +- include(CMakeParseArgumentsCopy) +- CMAKE_PARSE_ARGUMENTS(GR_PYTHON_INSTALL "" "DESTINATION;COMPONENT" "FILES;PROGRAMS" ${ARGN}) +- +- #################################################################### +- if(GR_PYTHON_INSTALL_FILES) +- #################################################################### +- install(${ARGN}) #installs regular python files +- +- #create a list of all generated files +- unset(pysrcfiles) +- unset(pycfiles) +- unset(pyofiles) +- foreach(pyfile ${GR_PYTHON_INSTALL_FILES}) +- get_filename_component(pyfile ${pyfile} ABSOLUTE) +- list(APPEND pysrcfiles ${pyfile}) +- +- #determine if this file is in the source or binary directory +- file(RELATIVE_PATH source_rel_path ${CMAKE_CURRENT_SOURCE_DIR} ${pyfile}) +- string(LENGTH "${source_rel_path}" source_rel_path_len) +- file(RELATIVE_PATH binary_rel_path ${CMAKE_CURRENT_BINARY_DIR} ${pyfile}) +- string(LENGTH "${binary_rel_path}" binary_rel_path_len) +- +- #and set the generated path appropriately +- if(${source_rel_path_len} GREATER ${binary_rel_path_len}) +- set(pygenfile ${CMAKE_CURRENT_BINARY_DIR}/${binary_rel_path}) +- else() +- set(pygenfile ${CMAKE_CURRENT_BINARY_DIR}/${source_rel_path}) +- endif() +- list(APPEND pycfiles ${pygenfile}c) +- list(APPEND pyofiles ${pygenfile}o) +- +- #ensure generation path exists +- get_filename_component(pygen_path ${pygenfile} PATH) +- file(MAKE_DIRECTORY ${pygen_path}) +- +- endforeach(pyfile) +- +- #the command to generate the pyc files +- add_custom_command( +- DEPENDS ${pysrcfiles} OUTPUT ${pycfiles} +- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_BINARY_DIR}/python_compile_helper.py ${pysrcfiles} ${pycfiles} +- ) +- +- #the command to generate the pyo files +- add_custom_command( +- DEPENDS ${pysrcfiles} OUTPUT ${pyofiles} +- COMMAND ${PYTHON_EXECUTABLE} -O ${CMAKE_BINARY_DIR}/python_compile_helper.py ${pysrcfiles} ${pyofiles} +- ) +- +- #create install rule and add generated files to target list +- set(python_install_gen_targets ${pycfiles} ${pyofiles}) +- install(FILES ${python_install_gen_targets} +- DESTINATION ${GR_PYTHON_INSTALL_DESTINATION} +- COMPONENT ${GR_PYTHON_INSTALL_COMPONENT} +- ) +- +- #################################################################### +- elseif(GR_PYTHON_INSTALL_PROGRAMS) +- #################################################################### +- file(TO_NATIVE_PATH ${PYTHON_EXECUTABLE} pyexe_native) +- +- if (CMAKE_CROSSCOMPILING) +- set(pyexe_native "/usr/bin/env python") +- endif() +- +- foreach(pyfile ${GR_PYTHON_INSTALL_PROGRAMS}) +- get_filename_component(pyfile_name ${pyfile} NAME) +- get_filename_component(pyfile ${pyfile} ABSOLUTE) +- string(REPLACE "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" pyexefile "${pyfile}.exe") +- list(APPEND python_install_gen_targets ${pyexefile}) +- +- get_filename_component(pyexefile_path ${pyexefile} PATH) +- file(MAKE_DIRECTORY ${pyexefile_path}) +- +- add_custom_command( +- OUTPUT ${pyexefile} DEPENDS ${pyfile} +- COMMAND ${PYTHON_EXECUTABLE} -c +- "import re; R=re.compile('^\#!.*$\\n',flags=re.MULTILINE); open('${pyexefile}','w').write('\#!${pyexe_native}\\n'+R.sub('',open('${pyfile}','r').read()))" +- COMMENT "Shebangin ${pyfile_name}" +- VERBATIM +- ) +- +- #on windows, python files need an extension to execute +- get_filename_component(pyfile_ext ${pyfile} EXT) +- if(WIN32 AND NOT pyfile_ext) +- set(pyfile_name "${pyfile_name}.py") +- endif() +- +- install(PROGRAMS ${pyexefile} RENAME ${pyfile_name} +- DESTINATION ${GR_PYTHON_INSTALL_DESTINATION} +- COMPONENT ${GR_PYTHON_INSTALL_COMPONENT} +- ) +- endforeach(pyfile) +- +- endif() +- +- GR_UNIQUE_TARGET("pygen" ${python_install_gen_targets}) +- +-endfunction(GR_PYTHON_INSTALL) +- +-######################################################################## +-# Write the python helper script that generates byte code files +-######################################################################## +-file(WRITE ${CMAKE_BINARY_DIR}/python_compile_helper.py " +-import sys, py_compile +-files = sys.argv[1:] +-srcs, gens = files[:len(files)/2], files[len(files)/2:] +-for src, gen in zip(srcs, gens): +- py_compile.compile(file=src, cfile=gen, doraise=True) +-") +diff --git a/cmake/Modules/GrSwig.cmake b/cmake/Modules/GrSwig.cmake +deleted file mode 100644 +index 33f37d2..0000000 +--- a/cmake/Modules/GrSwig.cmake ++++ /dev/null +@@ -1,256 +0,0 @@ +-# Copyright 2010-2011 Free Software Foundation, Inc. +-# +-# This file is part of GNU Radio +-# +-# GNU Radio 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, or (at your option) +-# any later version. +-# +-# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +-# the Free Software Foundation, Inc., 51 Franklin Street, +-# Boston, MA 02110-1301, USA. +- +-if(DEFINED __INCLUDED_GR_SWIG_CMAKE) +- return() +-endif() +-set(__INCLUDED_GR_SWIG_CMAKE TRUE) +- +-include(GrPython) +- +-######################################################################## +-# Builds a swig documentation file to be generated into python docstrings +-# Usage: GR_SWIG_MAKE_DOCS(output_file input_path input_path....) +-# +-# Set the following variable to specify extra dependent targets: +-# - GR_SWIG_DOCS_SOURCE_DEPS +-# - GR_SWIG_DOCS_TARGET_DEPS +-######################################################################## +-function(GR_SWIG_MAKE_DOCS output_file) +- if(ENABLE_DOXYGEN) +- +- #setup the input files variable list, quote formated +- set(input_files) +- unset(INPUT_PATHS) +- foreach(input_path ${ARGN}) +- if(IS_DIRECTORY ${input_path}) #when input path is a directory +- file(GLOB input_path_h_files ${input_path}/*.h) +- else() #otherwise its just a file, no glob +- set(input_path_h_files ${input_path}) +- endif() +- list(APPEND input_files ${input_path_h_files}) +- set(INPUT_PATHS "${INPUT_PATHS} \"${input_path}\"") +- endforeach(input_path) +- +- #determine the output directory +- get_filename_component(name ${output_file} NAME_WE) +- get_filename_component(OUTPUT_DIRECTORY ${output_file} PATH) +- set(OUTPUT_DIRECTORY ${OUTPUT_DIRECTORY}/${name}_swig_docs) +- make_directory(${OUTPUT_DIRECTORY}) +- +- #generate the Doxyfile used by doxygen +- configure_file( +- ${CMAKE_SOURCE_DIR}/docs/doxygen/Doxyfile.swig_doc.in +- ${OUTPUT_DIRECTORY}/Doxyfile +- @ONLY) +- +- #Create a dummy custom command that depends on other targets +- include(GrMiscUtils) +- GR_GEN_TARGET_DEPS(_${name}_tag tag_deps ${GR_SWIG_DOCS_TARGET_DEPS}) +- +- #call doxygen on the Doxyfile + input headers +- add_custom_command( +- OUTPUT ${OUTPUT_DIRECTORY}/xml/index.xml +- DEPENDS ${input_files} ${GR_SWIG_DOCS_SOURCE_DEPS} ${tag_deps} +- COMMAND ${DOXYGEN_EXECUTABLE} ${OUTPUT_DIRECTORY}/Doxyfile +- COMMENT "Generating doxygen xml for ${name} docs" +- ) +- +- #call the swig_doc script on the xml files +- add_custom_command( +- OUTPUT ${output_file} +- DEPENDS ${input_files} ${stamp-file} ${OUTPUT_DIRECTORY}/xml/index.xml +- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} +- ${CMAKE_SOURCE_DIR}/docs/doxygen/swig_doc.py +- ${OUTPUT_DIRECTORY}/xml +- ${output_file} +- COMMENT "Generating python docstrings for ${name}" +- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/docs/doxygen +- ) +- +- else(ENABLE_DOXYGEN) +- file(WRITE ${output_file} "\n") #no doxygen -> empty file +- endif(ENABLE_DOXYGEN) +-endfunction(GR_SWIG_MAKE_DOCS) +- +-######################################################################## +-# Build a swig target for the common gnuradio use case. Usage: +-# GR_SWIG_MAKE(target ifile ifile ifile...) +-# +-# Set the following variables before calling: +-# - GR_SWIG_FLAGS +-# - GR_SWIG_INCLUDE_DIRS +-# - GR_SWIG_LIBRARIES +-# - GR_SWIG_SOURCE_DEPS +-# - GR_SWIG_TARGET_DEPS +-# - GR_SWIG_DOC_FILE +-# - GR_SWIG_DOC_DIRS +-######################################################################## +-macro(GR_SWIG_MAKE name) +- set(ifiles ${ARGN}) +- +- # Shimming this in here to take care of a SWIG bug with handling +- # vector and vector (on 32-bit machines) and +- # vector (on 64-bit machines). Use this to test +- # the size of size_t, then set SIZE_T_32 if it's a 32-bit machine +- # or not if it's 64-bit. The logic in gr_type.i handles the rest. +- INCLUDE(CheckTypeSize) +- CHECK_TYPE_SIZE("size_t" SIZEOF_SIZE_T) +- CHECK_TYPE_SIZE("unsigned int" SIZEOF_UINT) +- if(${SIZEOF_SIZE_T} EQUAL ${SIZEOF_UINT}) +- list(APPEND GR_SWIG_FLAGS -DSIZE_T_32) +- endif(${SIZEOF_SIZE_T} EQUAL ${SIZEOF_UINT}) +- +- #do swig doc generation if specified +- if(GR_SWIG_DOC_FILE) +- set(GR_SWIG_DOCS_SOURCE_DEPS ${GR_SWIG_SOURCE_DEPS}) +- list(APPEND GR_SWIG_DOCS_TARGET_DEPS ${GR_SWIG_TARGET_DEPS}) +- GR_SWIG_MAKE_DOCS(${GR_SWIG_DOC_FILE} ${GR_SWIG_DOC_DIRS}) +- add_custom_target(${name}_swig_doc DEPENDS ${GR_SWIG_DOC_FILE}) +- list(APPEND GR_SWIG_TARGET_DEPS ${name}_swig_doc ${GR_RUNTIME_SWIG_DOC_FILE}) +- endif() +- +- #append additional include directories +- find_package(PythonLibs 2) +- list(APPEND GR_SWIG_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH}) #deprecated name (now dirs) +- list(APPEND GR_SWIG_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS}) +- +- #prepend local swig directories +- list(INSERT GR_SWIG_INCLUDE_DIRS 0 ${CMAKE_CURRENT_SOURCE_DIR}) +- list(INSERT GR_SWIG_INCLUDE_DIRS 0 ${CMAKE_CURRENT_BINARY_DIR}) +- +- #determine include dependencies for swig file +- execute_process( +- COMMAND ${PYTHON_EXECUTABLE} +- ${CMAKE_BINARY_DIR}/get_swig_deps.py +- "${ifiles}" "${GR_SWIG_INCLUDE_DIRS}" +- OUTPUT_STRIP_TRAILING_WHITESPACE +- OUTPUT_VARIABLE SWIG_MODULE_${name}_EXTRA_DEPS +- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +- ) +- +- #Create a dummy custom command that depends on other targets +- include(GrMiscUtils) +- GR_GEN_TARGET_DEPS(_${name}_swig_tag tag_deps ${GR_SWIG_TARGET_DEPS}) +- set(tag_file ${CMAKE_CURRENT_BINARY_DIR}/${name}.tag) +- add_custom_command( +- OUTPUT ${tag_file} +- DEPENDS ${GR_SWIG_SOURCE_DEPS} ${tag_deps} +- COMMAND ${CMAKE_COMMAND} -E touch ${tag_file} +- ) +- +- #append the specified include directories +- include_directories(${GR_SWIG_INCLUDE_DIRS}) +- list(APPEND SWIG_MODULE_${name}_EXTRA_DEPS ${tag_file}) +- +- #setup the swig flags with flags and include directories +- set(CMAKE_SWIG_FLAGS -fvirtual -modern -keyword -w511 -module ${name} ${GR_SWIG_FLAGS}) +- foreach(dir ${GR_SWIG_INCLUDE_DIRS}) +- list(APPEND CMAKE_SWIG_FLAGS "-I${dir}") +- endforeach(dir) +- +- #set the C++ property on the swig .i file so it builds +- set_source_files_properties(${ifiles} PROPERTIES CPLUSPLUS ON) +- +- #setup the actual swig library target to be built +- include(UseSWIG) +- SWIG_ADD_MODULE(${name} python ${ifiles}) +- if(APPLE) +- set(PYTHON_LINK_OPTIONS "-undefined dynamic_lookup") +- else() +- set(PYTHON_LINK_OPTIONS ${PYTHON_LIBRARIES}) +- endif(APPLE) +- SWIG_LINK_LIBRARIES(${name} ${PYTHON_LINK_OPTIONS} ${GR_SWIG_LIBRARIES}) +- if(${name} STREQUAL "runtime_swig") +- SET_TARGET_PROPERTIES(${SWIG_MODULE_runtime_swig_REAL_NAME} PROPERTIES DEFINE_SYMBOL "gnuradio_runtime_EXPORTS") +- endif(${name} STREQUAL "runtime_swig") +- +-endmacro(GR_SWIG_MAKE) +- +-######################################################################## +-# Install swig targets generated by GR_SWIG_MAKE. Usage: +-# GR_SWIG_INSTALL( +-# TARGETS target target target... +-# [DESTINATION destination] +-# [COMPONENT component] +-# ) +-######################################################################## +-macro(GR_SWIG_INSTALL) +- +- include(CMakeParseArgumentsCopy) +- CMAKE_PARSE_ARGUMENTS(GR_SWIG_INSTALL "" "DESTINATION;COMPONENT" "TARGETS" ${ARGN}) +- +- foreach(name ${GR_SWIG_INSTALL_TARGETS}) +- install(TARGETS ${SWIG_MODULE_${name}_REAL_NAME} +- DESTINATION ${GR_SWIG_INSTALL_DESTINATION} +- COMPONENT ${GR_SWIG_INSTALL_COMPONENT} +- ) +- +- include(GrPython) +- GR_PYTHON_INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${name}.py +- DESTINATION ${GR_SWIG_INSTALL_DESTINATION} +- COMPONENT ${GR_SWIG_INSTALL_COMPONENT} +- ) +- +- GR_LIBTOOL( +- TARGET ${SWIG_MODULE_${name}_REAL_NAME} +- DESTINATION ${GR_SWIG_INSTALL_DESTINATION} +- ) +- +- endforeach(name) +- +-endmacro(GR_SWIG_INSTALL) +- +-######################################################################## +-# Generate a python file that can determine swig dependencies. +-# Used by the make macro above to determine extra dependencies. +-# When you build C++, CMake figures out the header dependencies. +-# This code essentially performs that logic for swig includes. +-######################################################################## +-file(WRITE ${CMAKE_BINARY_DIR}/get_swig_deps.py " +- +-import os, sys, re +- +-i_include_matcher = re.compile('%(include|import)\\s*[<|\"](.*)[>|\"]') +-h_include_matcher = re.compile('#(include)\\s*[<|\"](.*)[>|\"]') +-include_dirs = sys.argv[2].split(';') +- +-def get_swig_incs(file_path): +- if file_path.endswith('.i'): matcher = i_include_matcher +- else: matcher = h_include_matcher +- file_contents = open(file_path, 'r').read() +- return matcher.findall(file_contents, re.MULTILINE) +- +-def get_swig_deps(file_path, level): +- deps = [file_path] +- if level == 0: return deps +- for keyword, inc_file in get_swig_incs(file_path): +- for inc_dir in include_dirs: +- inc_path = os.path.join(inc_dir, inc_file) +- if not os.path.exists(inc_path): continue +- deps.extend(get_swig_deps(inc_path, level-1)) +- break #found, we dont search in lower prio inc dirs +- return deps +- +-if __name__ == '__main__': +- ifiles = sys.argv[1].split(';') +- deps = sum([get_swig_deps(ifile, 3) for ifile in ifiles], []) +- #sys.stderr.write(';'.join(set(deps)) + '\\n\\n') +- print(';'.join(set(deps))) +-") +diff --git a/cmake/Modules/GrTest.cmake b/cmake/Modules/GrTest.cmake +deleted file mode 100644 +index 62caab4..0000000 +--- a/cmake/Modules/GrTest.cmake ++++ /dev/null +@@ -1,143 +0,0 @@ +-# Copyright 2010-2011 Free Software Foundation, Inc. +-# +-# This file is part of GNU Radio +-# +-# GNU Radio 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, or (at your option) +-# any later version. +-# +-# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +-# the Free Software Foundation, Inc., 51 Franklin Street, +-# Boston, MA 02110-1301, USA. +- +-if(DEFINED __INCLUDED_GR_TEST_CMAKE) +- return() +-endif() +-set(__INCLUDED_GR_TEST_CMAKE TRUE) +- +-######################################################################## +-# Add a unit test and setup the environment for a unit test. +-# Takes the same arguments as the ADD_TEST function. +-# +-# Before calling set the following variables: +-# GR_TEST_TARGET_DEPS - built targets for the library path +-# GR_TEST_LIBRARY_DIRS - directories for the library path +-# GR_TEST_PYTHON_DIRS - directories for the python path +-# GR_TEST_ENVIRONS - other environment key/value pairs +-######################################################################## +-function(GR_ADD_TEST test_name) +- +- #Ensure that the build exe also appears in the PATH. +- list(APPEND GR_TEST_TARGET_DEPS ${ARGN}) +- +- #In the land of windows, all libraries must be in the PATH. +- #Since the dependent libraries are not yet installed, +- #we must manually set them in the PATH to run tests. +- #The following appends the path of a target dependency. +- foreach(target ${GR_TEST_TARGET_DEPS}) +- get_target_property(location ${target} LOCATION) +- if(location) +- get_filename_component(path ${location} PATH) +- string(REGEX REPLACE "\\$\\(.*\\)" ${CMAKE_BUILD_TYPE} path ${path}) +- list(APPEND GR_TEST_LIBRARY_DIRS ${path}) +- endif(location) +- endforeach(target) +- +- if(WIN32) +- #SWIG generates the python library files into a subdirectory. +- #Therefore, we must append this subdirectory into PYTHONPATH. +- #Only do this for the python directories matching the following: +- foreach(pydir ${GR_TEST_PYTHON_DIRS}) +- get_filename_component(name ${pydir} NAME) +- if(name MATCHES "^(swig|lib|src)$") +- list(APPEND GR_TEST_PYTHON_DIRS ${pydir}/${CMAKE_BUILD_TYPE}) +- endif() +- endforeach(pydir) +- endif(WIN32) +- +- file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} srcdir) +- file(TO_NATIVE_PATH "${GR_TEST_LIBRARY_DIRS}" libpath) #ok to use on dir list? +- file(TO_NATIVE_PATH "${GR_TEST_PYTHON_DIRS}" pypath) #ok to use on dir list? +- +- set(environs "VOLK_GENERIC=1" "GR_DONT_LOAD_PREFS=1" "srcdir=${srcdir}") +- list(APPEND environs ${GR_TEST_ENVIRONS}) +- +- #http://www.cmake.org/pipermail/cmake/2009-May/029464.html +- #Replaced this add test + set environs code with the shell script generation. +- #Its nicer to be able to manually run the shell script to diagnose problems. +- #ADD_TEST(${ARGV}) +- #SET_TESTS_PROPERTIES(${test_name} PROPERTIES ENVIRONMENT "${environs}") +- +- if(UNIX) +- set(LD_PATH_VAR "LD_LIBRARY_PATH") +- if(APPLE) +- set(LD_PATH_VAR "DYLD_LIBRARY_PATH") +- endif() +- +- set(binpath "${CMAKE_CURRENT_BINARY_DIR}:$PATH") +- list(APPEND libpath "$${LD_PATH_VAR}") +- list(APPEND pypath "$PYTHONPATH") +- +- #replace list separator with the path separator +- string(REPLACE ";" ":" libpath "${libpath}") +- string(REPLACE ";" ":" pypath "${pypath}") +- list(APPEND environs "PATH=${binpath}" "${LD_PATH_VAR}=${libpath}" "PYTHONPATH=${pypath}") +- +- #generate a bat file that sets the environment and runs the test +- if (CMAKE_CROSSCOMPILING) +- set(SHELL "/bin/sh") +- else(CMAKE_CROSSCOMPILING) +- find_program(SHELL sh) +- endif(CMAKE_CROSSCOMPILING) +- set(sh_file ${CMAKE_CURRENT_BINARY_DIR}/${test_name}_test.sh) +- file(WRITE ${sh_file} "#!${SHELL}\n") +- #each line sets an environment variable +- foreach(environ ${environs}) +- file(APPEND ${sh_file} "export ${environ}\n") +- endforeach(environ) +- #load the command to run with its arguments +- foreach(arg ${ARGN}) +- file(APPEND ${sh_file} "${arg} ") +- endforeach(arg) +- file(APPEND ${sh_file} "\n") +- +- #make the shell file executable +- execute_process(COMMAND chmod +x ${sh_file}) +- +- add_test(${test_name} ${SHELL} ${sh_file}) +- +- endif(UNIX) +- +- if(WIN32) +- list(APPEND libpath ${DLL_PATHS} "%PATH%") +- list(APPEND pypath "%PYTHONPATH%") +- +- #replace list separator with the path separator (escaped) +- string(REPLACE ";" "\\;" libpath "${libpath}") +- string(REPLACE ";" "\\;" pypath "${pypath}") +- list(APPEND environs "PATH=${libpath}" "PYTHONPATH=${pypath}") +- +- #generate a bat file that sets the environment and runs the test +- set(bat_file ${CMAKE_CURRENT_BINARY_DIR}/${test_name}_test.bat) +- file(WRITE ${bat_file} "@echo off\n") +- #each line sets an environment variable +- foreach(environ ${environs}) +- file(APPEND ${bat_file} "SET ${environ}\n") +- endforeach(environ) +- #load the command to run with its arguments +- foreach(arg ${ARGN}) +- file(APPEND ${bat_file} "${arg} ") +- endforeach(arg) +- file(APPEND ${bat_file} "\n") +- +- add_test(${test_name} ${bat_file}) +- endif(WIN32) +- +-endfunction(GR_ADD_TEST) +diff --git a/cmake/Modules/UseSWIG.cmake b/cmake/Modules/UseSWIG.cmake +deleted file mode 100644 +index b7e3e05..0000000 +--- a/cmake/Modules/UseSWIG.cmake ++++ /dev/null +@@ -1,304 +0,0 @@ +-# - SWIG module for CMake +-# Defines the following macros: +-# SWIG_ADD_MODULE(name language [ files ]) +-# - Define swig module with given name and specified language +-# SWIG_LINK_LIBRARIES(name [ libraries ]) +-# - Link libraries to swig module +-# All other macros are for internal use only. +-# To get the actual name of the swig module, +-# use: ${SWIG_MODULE_${name}_REAL_NAME}. +-# Set Source files properties such as CPLUSPLUS and SWIG_FLAGS to specify +-# special behavior of SWIG. Also global CMAKE_SWIG_FLAGS can be used to add +-# special flags to all swig calls. +-# Another special variable is CMAKE_SWIG_OUTDIR, it allows one to specify +-# where to write all the swig generated module (swig -outdir option) +-# The name-specific variable SWIG_MODULE__EXTRA_DEPS may be used +-# to specify extra dependencies for the generated modules. +-# If the source file generated by swig need some special flag you can use +-# set_source_files_properties( ${swig_generated_file_fullname} +-# PROPERTIES COMPILE_FLAGS "-bla") +- +- +-#============================================================================= +-# Copyright 2004-2009 Kitware, Inc. +-# Copyright 2009 Mathieu Malaterre +-# +-# Distributed under the OSI-approved BSD License (the "License"); +-# see accompanying file Copyright.txt for details. +-# +-# This software is distributed WITHOUT ANY WARRANTY; without even the +-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +-# See the License for more information. +-#============================================================================= +-# (To distribute this file outside of CMake, substitute the full +-# License text for the above reference.) +- +-set(SWIG_CXX_EXTENSION "cxx") +-set(SWIG_EXTRA_LIBRARIES "") +- +-set(SWIG_PYTHON_EXTRA_FILE_EXTENSION "py") +- +-# +-# For given swig module initialize variables associated with it +-# +-macro(SWIG_MODULE_INITIALIZE name language) +- string(TOUPPER "${language}" swig_uppercase_language) +- string(TOLOWER "${language}" swig_lowercase_language) +- set(SWIG_MODULE_${name}_LANGUAGE "${swig_uppercase_language}") +- set(SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG "${swig_lowercase_language}") +- +- set(SWIG_MODULE_${name}_REAL_NAME "${name}") +- if("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "UNKNOWN") +- message(FATAL_ERROR "SWIG Error: Language \"${language}\" not found") +- elseif("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "PYTHON") +- # when swig is used without the -interface it will produce in the module.py +- # a 'import _modulename' statement, which implies having a corresponding +- # _modulename.so (*NIX), _modulename.pyd (Win32). +- set(SWIG_MODULE_${name}_REAL_NAME "_${name}") +- elseif("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "PERL") +- set(SWIG_MODULE_${name}_EXTRA_FLAGS "-shadow") +- endif() +-endmacro() +- +-# +-# For a given language, input file, and output file, determine extra files that +-# will be generated. This is internal swig macro. +-# +- +-macro(SWIG_GET_EXTRA_OUTPUT_FILES language outfiles generatedpath infile) +- set(${outfiles} "") +- get_source_file_property(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename +- ${infile} SWIG_MODULE_NAME) +- if(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename STREQUAL "NOTFOUND") +- get_filename_component(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename "${infile}" NAME_WE) +- endif() +- foreach(it ${SWIG_${language}_EXTRA_FILE_EXTENSION}) +- set(${outfiles} ${${outfiles}} +- "${generatedpath}/${SWIG_GET_EXTRA_OUTPUT_FILES_module_basename}.${it}") +- endforeach() +-endmacro() +- +-# +-# Take swig (*.i) file and add proper custom commands for it +-# +-macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) +- set(swig_full_infile ${infile}) +- get_filename_component(swig_source_file_path "${infile}" PATH) +- get_filename_component(swig_source_file_name_we "${infile}" NAME_WE) +- get_source_file_property(swig_source_file_generated ${infile} GENERATED) +- get_source_file_property(swig_source_file_cplusplus ${infile} CPLUSPLUS) +- get_source_file_property(swig_source_file_flags ${infile} SWIG_FLAGS) +- if("${swig_source_file_flags}" STREQUAL "NOTFOUND") +- set(swig_source_file_flags "") +- endif() +- set(swig_source_file_fullname "${infile}") +- if(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_SOURCE_DIR}") +- string(REGEX REPLACE +- "^${CMAKE_CURRENT_SOURCE_DIR}" "" +- swig_source_file_relative_path +- "${swig_source_file_path}") +- else() +- if(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_BINARY_DIR}") +- string(REGEX REPLACE +- "^${CMAKE_CURRENT_BINARY_DIR}" "" +- swig_source_file_relative_path +- "${swig_source_file_path}") +- set(swig_source_file_generated 1) +- else() +- set(swig_source_file_relative_path "${swig_source_file_path}") +- if(swig_source_file_generated) +- set(swig_source_file_fullname "${CMAKE_CURRENT_BINARY_DIR}/${infile}") +- else() +- set(swig_source_file_fullname "${CMAKE_CURRENT_SOURCE_DIR}/${infile}") +- endif() +- endif() +- endif() +- +- set(swig_generated_file_fullname +- "${CMAKE_CURRENT_BINARY_DIR}") +- if(swig_source_file_relative_path) +- set(swig_generated_file_fullname +- "${swig_generated_file_fullname}/${swig_source_file_relative_path}") +- endif() +- # If CMAKE_SWIG_OUTDIR was specified then pass it to -outdir +- if(CMAKE_SWIG_OUTDIR) +- set(swig_outdir ${CMAKE_SWIG_OUTDIR}) +- else() +- set(swig_outdir ${CMAKE_CURRENT_BINARY_DIR}) +- endif() +- SWIG_GET_EXTRA_OUTPUT_FILES(${SWIG_MODULE_${name}_LANGUAGE} +- swig_extra_generated_files +- "${swig_outdir}" +- "${infile}") +- set(swig_generated_file_fullname +- "${swig_generated_file_fullname}/${swig_source_file_name_we}") +- # add the language into the name of the file (i.e. TCL_wrap) +- # this allows for the same .i file to be wrapped into different languages +- set(swig_generated_file_fullname +- "${swig_generated_file_fullname}${SWIG_MODULE_${name}_LANGUAGE}_wrap") +- +- if(swig_source_file_cplusplus) +- set(swig_generated_file_fullname +- "${swig_generated_file_fullname}.${SWIG_CXX_EXTENSION}") +- else() +- set(swig_generated_file_fullname +- "${swig_generated_file_fullname}.c") +- endif() +- +- # Shut up some warnings from poor SWIG code generation that we +- # can do nothing about, when this flag is available +- include(CheckCXXCompilerFlag) +- check_cxx_compiler_flag("-Wno-unused-but-set-variable" HAVE_WNO_UNUSED_BUT_SET_VARIABLE) +- if(HAVE_WNO_UNUSED_BUT_SET_VARIABLE) +- set_source_files_properties(${swig_generated_file_fullname} +- PROPERTIES COMPILE_FLAGS "-Wno-unused-but-set-variable") +- endif(HAVE_WNO_UNUSED_BUT_SET_VARIABLE) +- +- get_directory_property(cmake_include_directories INCLUDE_DIRECTORIES) +- set(swig_include_dirs) +- foreach(it ${cmake_include_directories}) +- set(swig_include_dirs ${swig_include_dirs} "-I${it}") +- endforeach() +- +- set(swig_special_flags) +- # default is c, so add c++ flag if it is c++ +- if(swig_source_file_cplusplus) +- set(swig_special_flags ${swig_special_flags} "-c++") +- endif() +- set(swig_extra_flags) +- if(SWIG_MODULE_${name}_EXTRA_FLAGS) +- set(swig_extra_flags ${swig_extra_flags} ${SWIG_MODULE_${name}_EXTRA_FLAGS}) +- endif() +- +- # hack to work around CMake bug in add_custom_command with multiple OUTPUT files +- +- file(RELATIVE_PATH reldir ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}) +- execute_process( +- COMMAND ${PYTHON_EXECUTABLE} -c "import re, hashlib +-unique = hashlib.md5('${reldir}${ARGN}').hexdigest()[:5] +-print(re.sub('\\W', '_', '${name} ${reldir} ' + unique))" +- OUTPUT_VARIABLE _target OUTPUT_STRIP_TRAILING_WHITESPACE +- ) +- +- file( +- WRITE ${CMAKE_CURRENT_BINARY_DIR}/${_target}.cpp.in +- "int main(void){return 0;}\n" +- ) +- +- # create dummy dependencies +- add_custom_command( +- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_target}.cpp +- COMMAND ${CMAKE_COMMAND} -E copy +- ${CMAKE_CURRENT_BINARY_DIR}/${_target}.cpp.in +- ${CMAKE_CURRENT_BINARY_DIR}/${_target}.cpp +- DEPENDS "${swig_source_file_fullname}" ${SWIG_MODULE_${name}_EXTRA_DEPS} +- COMMENT "" +- ) +- +- # create the dummy target +- add_executable(${_target} ${CMAKE_CURRENT_BINARY_DIR}/${_target}.cpp) +- +- # add a custom command to the dummy target +- add_custom_command( +- TARGET ${_target} +- # Let's create the ${swig_outdir} at execution time, in case dir contains $(OutDir) +- COMMAND ${CMAKE_COMMAND} -E make_directory ${swig_outdir} +- COMMAND "${SWIG_EXECUTABLE}" +- ARGS "-${SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG}" +- ${swig_source_file_flags} +- ${CMAKE_SWIG_FLAGS} +- -outdir ${swig_outdir} +- ${swig_special_flags} +- ${swig_extra_flags} +- ${swig_include_dirs} +- -o "${swig_generated_file_fullname}" +- "${swig_source_file_fullname}" +- COMMENT "Swig source" +- ) +- +- #add dummy independent dependencies from the _target to each file +- #that will be generated by the SWIG command above +- +- set(${outfiles} "${swig_generated_file_fullname}" ${swig_extra_generated_files}) +- +- foreach(swig_gen_file ${${outfiles}}) +- add_custom_command( +- OUTPUT ${swig_gen_file} +- COMMAND "${CMAKE_COMMAND}" -E touch_nocreate "${swig_gen_file}" +- DEPENDS ${_target} +- COMMENT "dummy command to show ${_target} dependency of ${swig_gen_file}" +- ) +- endforeach() +- +- set_source_files_properties( +- ${outfiles} PROPERTIES GENERATED 1 +- ) +- +-endmacro() +- +-# +-# Create Swig module +-# +-macro(SWIG_ADD_MODULE name language) +- SWIG_MODULE_INITIALIZE(${name} ${language}) +- set(swig_dot_i_sources) +- set(swig_other_sources) +- foreach(it ${ARGN}) +- if(${it} MATCHES ".*\\.i$") +- set(swig_dot_i_sources ${swig_dot_i_sources} "${it}") +- else() +- set(swig_other_sources ${swig_other_sources} "${it}") +- endif() +- endforeach() +- +- set(swig_generated_sources) +- foreach(it ${swig_dot_i_sources}) +- SWIG_ADD_SOURCE_TO_MODULE(${name} swig_generated_source ${it}) +- set(swig_generated_sources ${swig_generated_sources} "${swig_generated_source}") +- endforeach() +- get_directory_property(swig_extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES) +- set_directory_properties(PROPERTIES +- ADDITIONAL_MAKE_CLEAN_FILES "${swig_extra_clean_files};${swig_generated_sources}") +- add_library(${SWIG_MODULE_${name}_REAL_NAME} +- MODULE +- ${swig_generated_sources} +- ${swig_other_sources}) +- string(TOLOWER "${language}" swig_lowercase_language) +- if ("${swig_lowercase_language}" STREQUAL "java") +- if (APPLE) +- # In java you want: +- # System.loadLibrary("LIBRARY"); +- # then JNI will look for a library whose name is platform dependent, namely +- # MacOS : libLIBRARY.jnilib +- # Windows: LIBRARY.dll +- # Linux : libLIBRARY.so +- set_target_properties (${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".jnilib") +- endif () +- endif () +- if ("${swig_lowercase_language}" STREQUAL "python") +- # this is only needed for the python case where a _modulename.so is generated +- set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "") +- # Python extension modules on Windows must have the extension ".pyd" +- # instead of ".dll" as of Python 2.5. Older python versions do support +- # this suffix. +- # http://docs.python.org/whatsnew/ports.html#SECTION0001510000000000000000 +- # +- # Windows: .dll is no longer supported as a filename extension for extension modules. +- # .pyd is now the only filename extension that will be searched for. +- # +- if(WIN32 AND NOT CYGWIN) +- set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".pyd") +- endif() +- endif () +-endmacro() +- +-# +-# Like TARGET_LINK_LIBRARIES but for swig modules +-# +-macro(SWIG_LINK_LIBRARIES name) +- if(SWIG_MODULE_${name}_REAL_NAME) +- target_link_libraries(${SWIG_MODULE_${name}_REAL_NAME} ${ARGN}) +- else() +- message(SEND_ERROR "Cannot find Swig library \"${name}\".") +- endif() +-endmacro() +diff --git a/cmake/Modules/nrsc5Config.cmake b/cmake/Modules/nrsc5Config.cmake +index 2cd34a4..0911a25 100644 +--- a/cmake/Modules/nrsc5Config.cmake ++++ b/cmake/Modules/nrsc5Config.cmake +@@ -22,9 +22,10 @@ FIND_LIBRARY( + /usr/local/lib64 + /usr/lib + /usr/lib64 +-) ++ ) ++ ++include("${CMAKE_CURRENT_LIST_DIR}/nrsc5Target.cmake") + + INCLUDE(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(NRSC5 DEFAULT_MSG NRSC5_LIBRARIES NRSC5_INCLUDE_DIRS) + MARK_AS_ADVANCED(NRSC5_LIBRARIES NRSC5_INCLUDE_DIRS) +- +diff --git a/python/build_utils_codes.py b/cmake/Modules/targetConfig.cmake.in +similarity index 52% +rename from python/build_utils_codes.py +rename to cmake/Modules/targetConfig.cmake.in +index 9ea96ba..79e4a28 100644 +--- a/python/build_utils_codes.py ++++ b/cmake/Modules/targetConfig.cmake.in +@@ -1,5 +1,4 @@ +-# +-# Copyright 2004 Free Software Foundation, Inc. ++# Copyright 2018 Free Software Foundation, Inc. + # + # This file is part of GNU Radio + # +@@ -17,36 +16,11 @@ + # along with GNU Radio; see the file COPYING. If not, write to + # the Free Software Foundation, Inc., 51 Franklin Street, + # Boston, MA 02110-1301, USA. +-# +- +-def i_code (code3): +- return code3[0] +- +-def o_code (code3): +- if len (code3) >= 2: +- return code3[1] +- else: +- return code3[0] +- +-def tap_code (code3): +- if len (code3) >= 3: +- return code3[2] +- else: +- return code3[0] +- +-def i_type (code3): +- return char_to_type[i_code (code3)] +- +-def o_type (code3): +- return char_to_type[o_code (code3)] +- +-def tap_type (code3): +- return char_to_type[tap_code (code3)] + ++include(CMakeFindDependencyMacro) + +-char_to_type = {} +-char_to_type['s'] = 'short' +-char_to_type['i'] = 'int' +-char_to_type['f'] = 'float' +-char_to_type['c'] = 'gr_complex' +-char_to_type['b'] = 'unsigned char' ++set(target_deps "@TARGET_DEPENDENCIES@") ++foreach(dep IN LISTS target_deps) ++ find_dependency(${dep}) ++endforeach() ++include("${CMAKE_CURRENT_LIST_DIR}/@TARGET@Targets.cmake") +diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt +index f16fbf6..2c318ee 100644 +--- a/docs/CMakeLists.txt ++++ b/docs/CMakeLists.txt +@@ -1,6 +1,7 @@ + # Copyright 2011 Free Software Foundation, Inc. + # +-# This file is part of GNU Radio ++# This file was generated by gr_modtool, a tool from the GNU Radio framework ++# This file is a part of gr-nrsc5 + # + # GNU Radio is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +diff --git a/docs/doxygen/CMakeLists.txt b/docs/doxygen/CMakeLists.txt +index 1b44799..d5d98b8 100644 +--- a/docs/doxygen/CMakeLists.txt ++++ b/docs/doxygen/CMakeLists.txt +@@ -1,6 +1,7 @@ + # Copyright 2011 Free Software Foundation, Inc. + # +-# This file is part of GNU Radio ++# This file was generated by gr_modtool, a tool from the GNU Radio framework ++# This file is a part of gr-nrsc5 + # + # GNU Radio is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +diff --git a/docs/doxygen/Doxyfile.in b/docs/doxygen/Doxyfile.in +index 3ad1a67..20dfc97 100644 +--- a/docs/doxygen/Doxyfile.in ++++ b/docs/doxygen/Doxyfile.in +@@ -654,8 +654,8 @@ WARN_LOGFILE = + # directories like "/usr/src/myproject". Separate the files or directories + # with spaces. + +-INPUT = @top_srcdir@ \ +- @top_builddir@ ++INPUT = "@top_srcdir@" \ ++ "@top_builddir@" + + # This tag can be used to specify the character encoding of the source files + # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +@@ -791,7 +791,7 @@ INPUT_FILTER = + # info on how filters are used. If FILTER_PATTERNS is empty or if + # non of the patterns match the file name, INPUT_FILTER is applied. + +-FILTER_PATTERNS = *.py=@top_srcdir@/doc/doxygen/other/doxypy.py ++FILTER_PATTERNS = *.py="@top_srcdir@"/doc/doxygen/other/doxypy.py + + # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using + # INPUT_FILTER) will be used to filter the input files when producing source +@@ -946,7 +946,7 @@ HTML_STYLESHEET = + # user-defined cascading style sheet that is included after the standard + # style sheets created by doxygen. Using this option one can overrule + # certain style aspects. This is preferred over using HTML_STYLESHEET +-# since it does not replace the standard style sheet and is therefor more ++# since it does not replace the standard style sheet and is therefore more + # robust against future updates. Doxygen will copy the style sheet file to + # the output directory. + +@@ -990,7 +990,7 @@ HTML_COLORSTYLE_GAMMA = 80 + # page will contain the date and time when the page was generated. Setting + # this to NO can help when comparing the output of multiple runs. + +-HTML_TIMESTAMP = YES ++HTML_TIMESTAMP = NO + + # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML + # documentation will contain sections that can be hidden and shown after the +diff --git a/docs/doxygen/Doxyfile.swig_doc.in b/docs/doxygen/Doxyfile.swig_doc.in +index 19e17dc..cbe06d6 100644 +--- a/docs/doxygen/Doxyfile.swig_doc.in ++++ b/docs/doxygen/Doxyfile.swig_doc.in +@@ -54,7 +54,7 @@ PROJECT_LOGO = + # If a relative path is entered, it will be relative to the location + # where doxygen was started. If left blank the current directory will be used. + +-OUTPUT_DIRECTORY = @OUTPUT_DIRECTORY@ ++OUTPUT_DIRECTORY = "@OUTPUT_DIRECTORY@" + + # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create + # 4096 sub-directories (in 2 levels) under the output directory of each output +@@ -121,7 +121,7 @@ INLINE_INHERITED_MEMB = NO + # path before files name in the file list and in the header files. If set + # to NO the shortest path that makes the file name unique will be used. + +-FULL_PATH_NAMES = YES ++FULL_PATH_NAMES = NO + + # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag + # can be used to strip a user-defined part of the path. Stripping is +@@ -913,7 +913,7 @@ HTML_STYLESHEET = + # user-defined cascading style sheet that is included after the standard + # style sheets created by doxygen. Using this option one can overrule + # certain style aspects. This is preferred over using HTML_STYLESHEET +-# since it does not replace the standard style sheet and is therefor more ++# since it does not replace the standard style sheet and is therefore more + # robust against future updates. Doxygen will copy the style sheet file to + # the output directory. + +@@ -957,7 +957,7 @@ HTML_COLORSTYLE_GAMMA = 80 + # page will contain the date and time when the page was generated. Setting + # this to NO can help when comparing the output of multiple runs. + +-HTML_TIMESTAMP = YES ++HTML_TIMESTAMP = NO + + # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML + # documentation will contain sections that can be hidden and shown after the +diff --git a/docs/doxygen/doxyxml/__init__.py b/docs/doxygen/doxyxml/__init__.py +index 5cd0b3c..5145b54 100644 +--- a/docs/doxygen/doxyxml/__init__.py ++++ b/docs/doxygen/doxyxml/__init__.py +@@ -1,7 +1,8 @@ + # + # Copyright 2010 Free Software Foundation, Inc. + # +-# This file is part of GNU Radio ++# This file was generated by gr_modtool, a tool from the GNU Radio framework ++# This file is a part of gr-nrsc5 + # + # GNU Radio is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -63,8 +64,9 @@ + u'Outputs the vital aadvark statistics.' + + """ ++from __future__ import unicode_literals + +-from doxyindex import DoxyIndex, DoxyFunction, DoxyParam, DoxyClass, DoxyFile, DoxyNamespace, DoxyGroup, DoxyFriend, DoxyOther ++from .doxyindex import DoxyIndex, DoxyFunction, DoxyParam, DoxyClass, DoxyFile, DoxyNamespace, DoxyGroup, DoxyFriend, DoxyOther + + def _test(): + import os +diff --git a/docs/doxygen/doxyxml/base.py b/docs/doxygen/doxyxml/base.py +index e8f026a..4404c97 100644 +--- a/docs/doxygen/doxyxml/base.py ++++ b/docs/doxygen/doxyxml/base.py +@@ -1,7 +1,8 @@ + # + # Copyright 2010 Free Software Foundation, Inc. + # +-# This file is part of GNU Radio ++# This file was generated by gr_modtool, a tool from the GNU Radio framework ++# This file is a part of gr-nrsc5 + # + # GNU Radio is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -24,24 +25,26 @@ + Classes based upon this are used to make more user-friendly interfaces + to the doxygen xml docs than the generated classes provide. + """ ++from __future__ import print_function ++from __future__ import unicode_literals + + import os + import pdb + + from xml.parsers.expat import ExpatError + +-from generated import compound ++from .generated import compound + + + class Base(object): + +- class Duplicate(StandardError): ++ class Duplicate(Exception): + pass + +- class NoSuchMember(StandardError): ++ class NoSuchMember(Exception): + pass + +- class ParsingError(StandardError): ++ class ParsingError(Exception): + pass + + def __init__(self, parse_data, top=None): +@@ -94,7 +97,7 @@ def get_cls(self, mem): + for cls in self.mem_classes: + if cls.can_parse(mem): + return cls +- raise StandardError(("Did not find a class for object '%s'." \ ++ raise Exception(("Did not find a class for object '%s'." \ + % (mem.get_name()))) + + def convert_mem(self, mem): +@@ -102,11 +105,11 @@ def convert_mem(self, mem): + cls = self.get_cls(mem) + converted = cls.from_parse_data(mem, self.top) + if converted is None: +- raise StandardError('No class matched this object.') ++ raise Exception('No class matched this object.') + self.add_ref(converted) + return converted +- except StandardError, e: +- print e ++ except Exception as e: ++ print(e) + + @classmethod + def includes(cls, inst): +diff --git a/docs/doxygen/doxyxml/doxyindex.py b/docs/doxygen/doxyxml/doxyindex.py +index 78e8153..30baf12 100644 +--- a/docs/doxygen/doxyxml/doxyindex.py ++++ b/docs/doxygen/doxyxml/doxyindex.py +@@ -1,7 +1,8 @@ + # + # Copyright 2010 Free Software Foundation, Inc. + # +-# This file is part of GNU Radio ++# This file was generated by gr_modtool, a tool from the GNU Radio framework ++# This file is a part of gr-nrsc5 + # + # GNU Radio is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -22,12 +23,14 @@ + Classes providing more user-friendly interfaces to the doxygen xml + docs than the generated classes provide. + """ ++from __future__ import absolute_import ++from __future__ import unicode_literals + + import os + +-from generated import index +-from base import Base +-from text import description ++from .generated import index ++from .base import Base ++from .text import description + + class DoxyIndex(Base): + """ +diff --git a/docs/doxygen/doxyxml/generated/__init__.py b/docs/doxygen/doxyxml/generated/__init__.py +index 3982397..23095c1 100644 +--- a/docs/doxygen/doxyxml/generated/__init__.py ++++ b/docs/doxygen/doxyxml/generated/__init__.py +@@ -5,3 +5,4 @@ + resultant classes are not very friendly to navigate so the rest of the + doxyxml module processes them further. + """ ++from __future__ import unicode_literals +diff --git a/docs/doxygen/doxyxml/generated/compound.py b/docs/doxygen/doxyxml/generated/compound.py +index 1522ac2..acfa0dd 100644 +--- a/docs/doxygen/doxyxml/generated/compound.py ++++ b/docs/doxygen/doxyxml/generated/compound.py +@@ -3,15 +3,17 @@ + """ + Generated Mon Feb 9 19:08:05 2009 by generateDS.py. + """ ++from __future__ import absolute_import ++from __future__ import unicode_literals ++ + +-from string import lower as str_lower + from xml.dom import minidom + from xml.dom import Node + + import sys + +-import compoundsuper as supermod +-from compoundsuper import MixedContainer ++from . import compoundsuper as supermod ++from .compoundsuper import MixedContainer + + + class DoxygenTypeSub(supermod.DoxygenType): +diff --git a/docs/doxygen/doxyxml/generated/compoundsuper.py b/docs/doxygen/doxyxml/generated/compoundsuper.py +index 6255dda..6e984e1 100644 +--- a/docs/doxygen/doxyxml/generated/compoundsuper.py ++++ b/docs/doxygen/doxyxml/generated/compoundsuper.py +@@ -4,12 +4,17 @@ + # Generated Thu Jun 11 18:44:25 2009 by generateDS.py. + # + ++from __future__ import print_function ++from __future__ import unicode_literals ++ + import sys +-import getopt +-from string import lower as str_lower ++ + from xml.dom import minidom + from xml.dom import Node + ++import six ++ ++ + # + # User methods + # +@@ -19,9 +24,9 @@ + + try: + from generatedssuper import GeneratedsSuper +-except ImportError, exp: ++except ImportError as exp: + +- class GeneratedsSuper: ++ class GeneratedsSuper(object): + def format_string(self, input_data, input_name=''): + return input_data + def format_integer(self, input_data, input_name=''): +@@ -64,7 +69,7 @@ def showIndent(outfile, level): + outfile.write(' ') + + def quote_xml(inStr): +- s1 = (isinstance(inStr, basestring) and inStr or ++ s1 = (isinstance(inStr, six.string_types) and inStr or + '%s' % inStr) + s1 = s1.replace('&', '&') + s1 = s1.replace('<', '<') +@@ -72,7 +77,7 @@ def quote_xml(inStr): + return s1 + + def quote_attrib(inStr): +- s1 = (isinstance(inStr, basestring) and inStr or ++ s1 = (isinstance(inStr, six.string_types) and inStr or + '%s' % inStr) + s1 = s1.replace('&', '&') + s1 = s1.replace('<', '<') +@@ -102,7 +107,7 @@ def quote_python(inStr): + return '"""%s"""' % s1 + + +-class MixedContainer: ++class MixedContainer(object): + # Constants for category: + CategoryNone = 0 + CategoryText = 1 +@@ -4221,7 +4226,7 @@ def buildAttributes(self, attrs): + if attrs.get('lineno'): + try: + self.lineno = int(attrs.get('lineno').value) +- except ValueError, exp: ++ except ValueError as exp: + raise ValueError('Bad integer attribute (lineno): %s' % exp) + if attrs.get('refkind'): + self.refkind = attrs.get('refkind').value +@@ -4504,12 +4509,12 @@ def buildAttributes(self, attrs): + if attrs.get('endline'): + try: + self.endline = int(attrs.get('endline').value) +- except ValueError, exp: ++ except ValueError as exp: + raise ValueError('Bad integer attribute (endline): %s' % exp) + if attrs.get('startline'): + try: + self.startline = int(attrs.get('startline').value) +- except ValueError, exp: ++ except ValueError as exp: + raise ValueError('Bad integer attribute (startline): %s' % exp) + if attrs.get('refid'): + self.refid = attrs.get('refid').value +@@ -4627,17 +4632,17 @@ def buildAttributes(self, attrs): + if attrs.get('bodystart'): + try: + self.bodystart = int(attrs.get('bodystart').value) +- except ValueError, exp: ++ except ValueError as exp: + raise ValueError('Bad integer attribute (bodystart): %s' % exp) + if attrs.get('line'): + try: + self.line = int(attrs.get('line').value) +- except ValueError, exp: ++ except ValueError as exp: + raise ValueError('Bad integer attribute (line): %s' % exp) + if attrs.get('bodyend'): + try: + self.bodyend = int(attrs.get('bodyend').value) +- except ValueError, exp: ++ except ValueError as exp: + raise ValueError('Bad integer attribute (bodyend): %s' % exp) + if attrs.get('bodyfile'): + self.bodyfile = attrs.get('bodyfile').value +@@ -6778,12 +6783,12 @@ def buildAttributes(self, attrs): + if attrs.get('rows'): + try: + self.rows = int(attrs.get('rows').value) +- except ValueError, exp: ++ except ValueError as exp: + raise ValueError('Bad integer attribute (rows): %s' % exp) + if attrs.get('cols'): + try: + self.cols = int(attrs.get('cols').value) +- except ValueError, exp: ++ except ValueError as exp: + raise ValueError('Bad integer attribute (cols): %s' % exp) + def buildChildren(self, child_, nodeName_): + if child_.nodeType == Node.ELEMENT_NODE and \ +@@ -7108,7 +7113,7 @@ def buildAttributes(self, attrs): + if attrs.get('level'): + try: + self.level = int(attrs.get('level').value) +- except ValueError, exp: ++ except ValueError as exp: + raise ValueError('Bad integer attribute (level): %s' % exp) + def buildChildren(self, child_, nodeName_): + if child_.nodeType == Node.TEXT_NODE: +@@ -8283,7 +8288,7 @@ def buildChildren(self, child_, nodeName_): + """ + + def usage(): +- print USAGE_TEXT ++ print(USAGE_TEXT) + sys.exit(1) + + +@@ -8339,4 +8344,3 @@ def main(): + main() + #import pdb + #pdb.run('main()') +- +diff --git a/docs/doxygen/doxyxml/generated/index.py b/docs/doxygen/doxyxml/generated/index.py +index 7a70e14..0c63512 100644 +--- a/docs/doxygen/doxyxml/generated/index.py ++++ b/docs/doxygen/doxyxml/generated/index.py +@@ -3,14 +3,16 @@ + """ + Generated Mon Feb 9 19:08:05 2009 by generateDS.py. + """ ++from __future__ import absolute_import ++from __future__ import unicode_literals + + from xml.dom import minidom + + import os + import sys +-import compound ++from . import compound + +-import indexsuper as supermod ++from . import indexsuper as supermod + + class DoxygenTypeSub(supermod.DoxygenType): + def __init__(self, version=None, compound=None): +diff --git a/docs/doxygen/doxyxml/generated/indexsuper.py b/docs/doxygen/doxyxml/generated/indexsuper.py +index a991530..11312db 100644 +--- a/docs/doxygen/doxyxml/generated/indexsuper.py ++++ b/docs/doxygen/doxyxml/generated/indexsuper.py +@@ -4,12 +4,16 @@ + # Generated Thu Jun 11 18:43:54 2009 by generateDS.py. + # + ++from __future__ import print_function ++from __future__ import unicode_literals ++ + import sys +-import getopt +-from string import lower as str_lower ++ + from xml.dom import minidom + from xml.dom import Node + ++import six ++ + # + # User methods + # +@@ -19,9 +23,9 @@ + + try: + from generatedssuper import GeneratedsSuper +-except ImportError, exp: ++except ImportError as exp: + +- class GeneratedsSuper: ++ class GeneratedsSuper(object): + def format_string(self, input_data, input_name=''): + return input_data + def format_integer(self, input_data, input_name=''): +@@ -64,7 +68,7 @@ def showIndent(outfile, level): + outfile.write(' ') + + def quote_xml(inStr): +- s1 = (isinstance(inStr, basestring) and inStr or ++ s1 = (isinstance(inStr, six.string_types) and inStr or + '%s' % inStr) + s1 = s1.replace('&', '&') + s1 = s1.replace('<', '<') +@@ -72,7 +76,7 @@ def quote_xml(inStr): + return s1 + + def quote_attrib(inStr): +- s1 = (isinstance(inStr, basestring) and inStr or ++ s1 = (isinstance(inStr, six.string_types) and inStr or + '%s' % inStr) + s1 = s1.replace('&', '&') + s1 = s1.replace('<', '<') +@@ -102,7 +106,7 @@ def quote_python(inStr): + return '"""%s"""' % s1 + + +-class MixedContainer: ++class MixedContainer(object): + # Constants for category: + CategoryNone = 0 + CategoryText = 1 +@@ -462,7 +466,7 @@ def buildChildren(self, child_, nodeName_): + """ + + def usage(): +- print USAGE_TEXT ++ print(USAGE_TEXT) + sys.exit(1) + + +@@ -520,4 +524,3 @@ def main(): + main() + #import pdb + #pdb.run('main()') +- +diff --git a/docs/doxygen/doxyxml/text.py b/docs/doxygen/doxyxml/text.py +index 629edd1..e7066ba 100644 +--- a/docs/doxygen/doxyxml/text.py ++++ b/docs/doxygen/doxyxml/text.py +@@ -1,7 +1,8 @@ + # + # Copyright 2010 Free Software Foundation, Inc. + # +-# This file is part of GNU Radio ++# This file was generated by gr_modtool, a tool from the GNU Radio framework ++# This file is a part of gr-nrsc5 + # + # GNU Radio is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -21,12 +22,13 @@ + """ + Utilities for extracting text from generated classes. + """ ++from __future__ import unicode_literals + + def is_string(txt): + if isinstance(txt, str): + return True + try: +- if isinstance(txt, unicode): ++ if isinstance(txt, str): + return True + except NameError: + pass +@@ -49,7 +51,7 @@ def description_bit(obj): + elif is_string(obj): + return obj + else: +- raise StandardError('Expecting a string or something with content, content_ or value attribute') ++ raise Exception('Expecting a string or something with content, content_ or value attribute') + # If this bit is a paragraph then add one some line breaks. + if hasattr(obj, 'name') and obj.name == 'para': + result += "\n\n" +diff --git a/docs/doxygen/swig_doc.py b/docs/doxygen/swig_doc.py +index d3536db..c127b9e 100644 +--- a/docs/doxygen/swig_doc.py ++++ b/docs/doxygen/swig_doc.py +@@ -1,7 +1,8 @@ + # + # Copyright 2010-2012 Free Software Foundation, Inc. + # +-# This file is part of GNU Radio ++# This file was generated by gr_modtool, a tool from the GNU Radio framework ++# This file is a part of gr-nrsc5 + # + # GNU Radio is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -26,6 +27,7 @@ + python docstrings. + + """ ++from __future__ import unicode_literals + + import sys, time + +@@ -79,13 +81,15 @@ def includes(cls, item): + + def utoascii(text): + """ +- Convert unicode text into ascii and escape quotes. ++ Convert unicode text into ascii and escape quotes and backslashes. + """ + if text is None: + return '' + out = text.encode('ascii', 'replace') +- out = out.replace('"', '\\"') +- return out ++ # swig will require us to replace blackslash with 4 backslashes ++ out = out.replace(b'\\', b'\\\\\\\\') ++ out = out.replace(b'"', b'\\"').decode('ascii') ++ return str(out) + + + def combine_descriptions(obj): +@@ -135,7 +139,7 @@ def make_entry(obj, name=None, templ="{description}", description=None, params=[ + return entry_templ.format( + name=name, + docstring=docstring, +- ) ++ ) + + + def make_func_entry(func, name=None, description=None, params=None): +@@ -226,12 +230,12 @@ def make_block2_entry(di, block): + # the make function. + output = [] + output.append(make_class_entry( +- block, description=description, +- ignored_methods=['make'], params=make_func.params)) ++ block, description=description, ++ ignored_methods=['make'], params=make_func.params)) + makename = block.name() + '::make' + output.append(make_func_entry( +- make_func, name=makename, description=description, +- params=make_func.params)) ++ make_func, name=makename, description=description, ++ params=make_func.params)) + return "\n\n".join(output) + + def make_swig_interface_file(di, swigdocfilename, custom_output=None): +@@ -301,7 +305,7 @@ def make_swig_interface_file(di, swigdocfilename, custom_output=None): + + output = "\n\n".join(output) + +- swig_doc = file(swigdocfilename, 'w') ++ swig_doc = open(swigdocfilename, 'w') + swig_doc.write(output) + swig_doc.close() + +@@ -309,7 +313,7 @@ def make_swig_interface_file(di, swigdocfilename, custom_output=None): + # Parse command line options and set up doxyxml. + err_msg = "Execute using: python swig_doc.py xml_path outputfilename" + if len(sys.argv) != 3: +- raise StandardError(err_msg) ++ raise Exception(err_msg) + xml_path = sys.argv[1] + swigdocfilename = sys.argv[2] + di = DoxyIndex(xml_path) +diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt +index 1b5c801..8bc75e4 100644 +--- a/grc/CMakeLists.txt ++++ b/grc/CMakeLists.txt +@@ -1,6 +1,7 @@ + # Copyright 2011 Free Software Foundation, Inc. + # +-# This file is part of GNU Radio ++# This file was generated by gr_modtool, a tool from the GNU Radio framework ++# This file is a part of gr-nrsc5 + # + # GNU Radio is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -18,16 +19,16 @@ + # Boston, MA 02110-1301, USA. + + install(FILES +- nrsc5_l1_fm_encoder_mp1.xml +- nrsc5_l1_fm_encoder_mp2.xml +- nrsc5_l1_fm_encoder_mp3.xml +- nrsc5_l1_fm_encoder_mp11.xml +- nrsc5_l1_fm_encoder_mp5.xml +- nrsc5_l1_fm_encoder_mp5_ms1.xml +- nrsc5_l1_fm_encoder_mp6.xml +- nrsc5_l1_fm_encoder_mp6_ms1.xml +- nrsc5_sis_encoder.xml +- nrsc5_l2_encoder.xml +- nrsc5_hdc_encoder.xml +- nrsc5_psd_encoder.xml DESTINATION share/gnuradio/grc/blocks ++ nrsc5_hdc_encoder.block.yml ++ nrsc5_l1_fm_encoder_mp1.block.yml ++ nrsc5_l1_fm_encoder_mp2.block.yml ++ nrsc5_l1_fm_encoder_mp3.block.yml ++ nrsc5_l1_fm_encoder_mp11.block.yml ++ nrsc5_l1_fm_encoder_mp5.block.yml ++ nrsc5_l1_fm_encoder_mp5_ms1.block.yml ++ nrsc5_l1_fm_encoder_mp6.block.yml ++ nrsc5_l1_fm_encoder_mp6_ms1.block.yml ++ nrsc5_l2_encoder.block.yml ++ nrsc5_psd_encoder.block.yml ++ nrsc5_sis_encoder.block.yml DESTINATION share/gnuradio/grc/blocks + ) +diff --git a/grc/nrsc5_hdc_encoder.block.yml b/grc/nrsc5_hdc_encoder.block.yml +new file mode 100644 +index 0000000..520dcbe +--- /dev/null ++++ b/grc/nrsc5_hdc_encoder.block.yml +@@ -0,0 +1,33 @@ ++# auto-generated by grc.converter ++ ++id: nrsc5_hdc_encoder ++label: HDC Encoder ++category: '[NRSC-5]' ++ ++parameters: ++- id: channels ++ label: Channels ++ dtype: int ++ default: 2 ++- id: bitrate ++ label: Bitrate ++ dtype: int ++ default: 64000 ++ ++inputs: ++- domain: stream ++ dtype: float ++ multiplicity: ${ channels } ++ ++outputs: ++- domain: stream ++ dtype: byte ++asserts: ++- ${ 1 <= channels <= 2 } ++- ${ 0 < bitrate } ++ ++templates: ++ imports: import nrsc5 ++ make: nrsc5.hdc_encoder(${channels}, ${bitrate}) ++ ++file_format: 1 +diff --git a/grc/nrsc5_hdc_encoder.xml b/grc/nrsc5_hdc_encoder.xml +deleted file mode 100644 +index b4e472e..0000000 +--- a/grc/nrsc5_hdc_encoder.xml ++++ /dev/null +@@ -1,31 +0,0 @@ +- +- +- HDC Encoder +- nrsc5_hdc_encoder +- [NRSC-5] +- import nrsc5 +- nrsc5.hdc_encoder($channels, $bitrate) +- +- Channels +- channels +- 2 +- int +- +- +- Bitrate +- bitrate +- 64000 +- int +- +- 1 <= $channels <= 2 +- 0 < $bitrate +- +- in +- float +- $channels +- +- +- out +- byte +- +- +diff --git a/grc/nrsc5_l1_fm_encoder_mp1.block.yml b/grc/nrsc5_l1_fm_encoder_mp1.block.yml +new file mode 100644 +index 0000000..2b69d4c +--- /dev/null ++++ b/grc/nrsc5_l1_fm_encoder_mp1.block.yml +@@ -0,0 +1,26 @@ ++# auto-generated by grc.converter ++ ++id: nrsc5_l1_fm_encoder_mp1 ++label: 'Layer 1 FM encoder: MP1' ++category: '[NRSC-5]' ++ ++inputs: ++- label: p1 ++ domain: stream ++ dtype: byte ++ vlen: 146176 ++- label: pids ++ domain: stream ++ dtype: byte ++ vlen: 80 ++ ++outputs: ++- domain: stream ++ dtype: byte ++ vlen: 1048576 ++ ++templates: ++ imports: import nrsc5 ++ make: nrsc5.l1_fm_encoder(1) ++ ++file_format: 1 +diff --git a/grc/nrsc5_l1_fm_encoder_mp1.xml b/grc/nrsc5_l1_fm_encoder_mp1.xml +deleted file mode 100644 +index 46714a7..0000000 +--- a/grc/nrsc5_l1_fm_encoder_mp1.xml ++++ /dev/null +@@ -1,23 +0,0 @@ +- +- +- Layer 1 FM encoder: MP1 +- nrsc5_l1_fm_encoder_mp1 +- [NRSC-5] +- import nrsc5 +- nrsc5.l1_fm_encoder(1) +- +- p1 +- byte +- 146176 +- +- +- pids +- byte +- 80 +- +- +- out +- byte +- 1048576 +- +- +diff --git a/grc/nrsc5_l1_fm_encoder_mp11.block.yml b/grc/nrsc5_l1_fm_encoder_mp11.block.yml +new file mode 100644 +index 0000000..8c109f3 +--- /dev/null ++++ b/grc/nrsc5_l1_fm_encoder_mp11.block.yml +@@ -0,0 +1,34 @@ ++# auto-generated by grc.converter ++ ++id: nrsc5_l1_fm_encoder_mp11 ++label: 'Layer 1 FM encoder: MP11' ++category: '[NRSC-5]' ++ ++inputs: ++- label: p1 ++ domain: stream ++ dtype: byte ++ vlen: 146176 ++- label: p3 ++ domain: stream ++ dtype: byte ++ vlen: 4608 ++- label: p4 ++ domain: stream ++ dtype: byte ++ vlen: 4608 ++- label: pids ++ domain: stream ++ dtype: byte ++ vlen: 80 ++ ++outputs: ++- domain: stream ++ dtype: byte ++ vlen: 1048576 ++ ++templates: ++ imports: import nrsc5 ++ make: nrsc5.l1_fm_encoder(11) ++ ++file_format: 1 +diff --git a/grc/nrsc5_l1_fm_encoder_mp11.xml b/grc/nrsc5_l1_fm_encoder_mp11.xml +deleted file mode 100644 +index cba0837..0000000 +--- a/grc/nrsc5_l1_fm_encoder_mp11.xml ++++ /dev/null +@@ -1,33 +0,0 @@ +- +- +- Layer 1 FM encoder: MP11 +- nrsc5_l1_fm_encoder_mp11 +- [NRSC-5] +- import nrsc5 +- nrsc5.l1_fm_encoder(11) +- +- p1 +- byte +- 146176 +- +- +- p3 +- byte +- 4608 +- +- +- p4 +- byte +- 4608 +- +- +- pids +- byte +- 80 +- +- +- out +- byte +- 1048576 +- +- +diff --git a/grc/nrsc5_l1_fm_encoder_mp2.block.yml b/grc/nrsc5_l1_fm_encoder_mp2.block.yml +new file mode 100644 +index 0000000..6e049b5 +--- /dev/null ++++ b/grc/nrsc5_l1_fm_encoder_mp2.block.yml +@@ -0,0 +1,30 @@ ++# auto-generated by grc.converter ++ ++id: nrsc5_l1_fm_encoder_mp2 ++label: 'Layer 1 FM encoder: MP2' ++category: '[NRSC-5]' ++ ++inputs: ++- label: p1 ++ domain: stream ++ dtype: byte ++ vlen: 146176 ++- label: p3 ++ domain: stream ++ dtype: byte ++ vlen: 2304 ++- label: pids ++ domain: stream ++ dtype: byte ++ vlen: 80 ++ ++outputs: ++- domain: stream ++ dtype: byte ++ vlen: 1048576 ++ ++templates: ++ imports: import nrsc5 ++ make: nrsc5.l1_fm_encoder(2) ++ ++file_format: 1 +diff --git a/grc/nrsc5_l1_fm_encoder_mp2.xml b/grc/nrsc5_l1_fm_encoder_mp2.xml +deleted file mode 100644 +index a176309..0000000 +--- a/grc/nrsc5_l1_fm_encoder_mp2.xml ++++ /dev/null +@@ -1,28 +0,0 @@ +- +- +- Layer 1 FM encoder: MP2 +- nrsc5_l1_fm_encoder_mp2 +- [NRSC-5] +- import nrsc5 +- nrsc5.l1_fm_encoder(2) +- +- p1 +- byte +- 146176 +- +- +- p3 +- byte +- 2304 +- +- +- pids +- byte +- 80 +- +- +- out +- byte +- 1048576 +- +- +diff --git a/grc/nrsc5_l1_fm_encoder_mp3.block.yml b/grc/nrsc5_l1_fm_encoder_mp3.block.yml +new file mode 100644 +index 0000000..e5077ca +--- /dev/null ++++ b/grc/nrsc5_l1_fm_encoder_mp3.block.yml +@@ -0,0 +1,30 @@ ++# auto-generated by grc.converter ++ ++id: nrsc5_l1_fm_encoder_mp3 ++label: 'Layer 1 FM encoder: MP3' ++category: '[NRSC-5]' ++ ++inputs: ++- label: p1 ++ domain: stream ++ dtype: byte ++ vlen: 146176 ++- label: p3 ++ domain: stream ++ dtype: byte ++ vlen: 4608 ++- label: pids ++ domain: stream ++ dtype: byte ++ vlen: 80 ++ ++outputs: ++- domain: stream ++ dtype: byte ++ vlen: 1048576 ++ ++templates: ++ imports: import nrsc5 ++ make: nrsc5.l1_fm_encoder(3) ++ ++file_format: 1 +diff --git a/grc/nrsc5_l1_fm_encoder_mp3.xml b/grc/nrsc5_l1_fm_encoder_mp3.xml +deleted file mode 100644 +index 11af89a..0000000 +--- a/grc/nrsc5_l1_fm_encoder_mp3.xml ++++ /dev/null +@@ -1,28 +0,0 @@ +- +- +- Layer 1 FM encoder: MP3 +- nrsc5_l1_fm_encoder_mp3 +- [NRSC-5] +- import nrsc5 +- nrsc5.l1_fm_encoder(3) +- +- p1 +- byte +- 146176 +- +- +- p3 +- byte +- 4608 +- +- +- pids +- byte +- 80 +- +- +- out +- byte +- 1048576 +- +- +diff --git a/grc/nrsc5_l1_fm_encoder_mp5.block.yml b/grc/nrsc5_l1_fm_encoder_mp5.block.yml +new file mode 100644 +index 0000000..5a79a23 +--- /dev/null ++++ b/grc/nrsc5_l1_fm_encoder_mp5.block.yml +@@ -0,0 +1,34 @@ ++# auto-generated by grc.converter ++ ++id: nrsc5_l1_fm_encoder_mp5 ++label: 'Layer 1 FM encoder: MP5' ++category: '[NRSC-5]' ++ ++inputs: ++- label: p1 ++ domain: stream ++ dtype: byte ++ vlen: 4608 ++- label: p2 ++ domain: stream ++ dtype: byte ++ vlen: 109312 ++- label: p3 ++ domain: stream ++ dtype: byte ++ vlen: 4608 ++- label: pids ++ domain: stream ++ dtype: byte ++ vlen: 80 ++ ++outputs: ++- domain: stream ++ dtype: byte ++ vlen: 1048576 ++ ++templates: ++ imports: import nrsc5 ++ make: nrsc5.l1_fm_encoder(5) ++ ++file_format: 1 +diff --git a/grc/nrsc5_l1_fm_encoder_mp5.xml b/grc/nrsc5_l1_fm_encoder_mp5.xml +deleted file mode 100644 +index e5b5209..0000000 +--- a/grc/nrsc5_l1_fm_encoder_mp5.xml ++++ /dev/null +@@ -1,33 +0,0 @@ +- +- +- Layer 1 FM encoder: MP5 +- nrsc5_l1_fm_encoder_mp5 +- [NRSC-5] +- import nrsc5 +- nrsc5.l1_fm_encoder(5) +- +- p1 +- byte +- 4608 +- +- +- p2 +- byte +- 109312 +- +- +- p3 +- byte +- 4608 +- +- +- pids +- byte +- 80 +- +- +- out +- byte +- 1048576 +- +- +diff --git a/grc/nrsc5_l1_fm_encoder_mp5_ms1.block.yml b/grc/nrsc5_l1_fm_encoder_mp5_ms1.block.yml +new file mode 100644 +index 0000000..34f9d93 +--- /dev/null ++++ b/grc/nrsc5_l1_fm_encoder_mp5_ms1.block.yml +@@ -0,0 +1,46 @@ ++# auto-generated by grc.converter ++ ++id: nrsc5_l1_fm_encoder_mp5_ms1 ++label: 'Layer 1 FM encoder: MP5+MS1' ++category: '[NRSC-5]' ++ ++inputs: ++- label: p1 ++ domain: stream ++ dtype: byte ++ vlen: 4608 ++- label: p2 ++ domain: stream ++ dtype: byte ++ vlen: 109312 ++- label: p3 ++ domain: stream ++ dtype: byte ++ vlen: 4608 ++- label: pids ++ domain: stream ++ dtype: byte ++ vlen: 80 ++- label: s4 ++ domain: stream ++ dtype: byte ++ vlen: 18272 ++- label: s5 ++ domain: stream ++ dtype: byte ++ vlen: 512 ++- label: sids ++ domain: stream ++ dtype: byte ++ vlen: 80 ++ ++outputs: ++- domain: stream ++ dtype: byte ++ vlen: 1048576 ++ ++templates: ++ imports: import nrsc5 ++ make: nrsc5.l1_fm_encoder(5, 1) ++ ++file_format: 1 +diff --git a/grc/nrsc5_l1_fm_encoder_mp5_ms1.xml b/grc/nrsc5_l1_fm_encoder_mp5_ms1.xml +deleted file mode 100644 +index fd66e29..0000000 +--- a/grc/nrsc5_l1_fm_encoder_mp5_ms1.xml ++++ /dev/null +@@ -1,48 +0,0 @@ +- +- +- Layer 1 FM encoder: MP5+MS1 +- nrsc5_l1_fm_encoder_mp5_ms1 +- [NRSC-5] +- import nrsc5 +- nrsc5.l1_fm_encoder(5, 1) +- +- p1 +- byte +- 4608 +- +- +- p2 +- byte +- 109312 +- +- +- p3 +- byte +- 4608 +- +- +- pids +- byte +- 80 +- +- +- s4 +- byte +- 18272 +- +- +- s5 +- byte +- 512 +- +- +- sids +- byte +- 80 +- +- +- out +- byte +- 1048576 +- +- +diff --git a/grc/nrsc5_l1_fm_encoder_mp6.block.yml b/grc/nrsc5_l1_fm_encoder_mp6.block.yml +new file mode 100644 +index 0000000..32ee051 +--- /dev/null ++++ b/grc/nrsc5_l1_fm_encoder_mp6.block.yml +@@ -0,0 +1,30 @@ ++# auto-generated by grc.converter ++ ++id: nrsc5_l1_fm_encoder_mp6 ++label: 'Layer 1 FM encoder: MP6' ++category: '[NRSC-5]' ++ ++inputs: ++- label: p1 ++ domain: stream ++ dtype: byte ++ vlen: 9216 ++- label: p2 ++ domain: stream ++ dtype: byte ++ vlen: 72448 ++- label: pids ++ domain: stream ++ dtype: byte ++ vlen: 80 ++ ++outputs: ++- domain: stream ++ dtype: byte ++ vlen: 1048576 ++ ++templates: ++ imports: import nrsc5 ++ make: nrsc5.l1_fm_encoder(6) ++ ++file_format: 1 +diff --git a/grc/nrsc5_l1_fm_encoder_mp6.xml b/grc/nrsc5_l1_fm_encoder_mp6.xml +deleted file mode 100644 +index b1b3f07..0000000 +--- a/grc/nrsc5_l1_fm_encoder_mp6.xml ++++ /dev/null +@@ -1,28 +0,0 @@ +- +- +- Layer 1 FM encoder: MP6 +- nrsc5_l1_fm_encoder_mp6 +- [NRSC-5] +- import nrsc5 +- nrsc5.l1_fm_encoder(6) +- +- p1 +- byte +- 9216 +- +- +- p2 +- byte +- 72448 +- +- +- pids +- byte +- 80 +- +- +- out +- byte +- 1048576 +- +- +diff --git a/grc/nrsc5_l1_fm_encoder_mp6_ms1.block.yml b/grc/nrsc5_l1_fm_encoder_mp6_ms1.block.yml +new file mode 100644 +index 0000000..fe35996 +--- /dev/null ++++ b/grc/nrsc5_l1_fm_encoder_mp6_ms1.block.yml +@@ -0,0 +1,42 @@ ++# auto-generated by grc.converter ++ ++id: nrsc5_l1_fm_encoder_mp6_ms1 ++label: 'Layer 1 FM encoder: MP6+MS1' ++category: '[NRSC-5]' ++ ++inputs: ++- label: p1 ++ domain: stream ++ dtype: byte ++ vlen: 9216 ++- label: p2 ++ domain: stream ++ dtype: byte ++ vlen: 72448 ++- label: pids ++ domain: stream ++ dtype: byte ++ vlen: 80 ++- label: s4 ++ domain: stream ++ dtype: byte ++ vlen: 18272 ++- label: s5 ++ domain: stream ++ dtype: byte ++ vlen: 512 ++- label: sids ++ domain: stream ++ dtype: byte ++ vlen: 80 ++ ++outputs: ++- domain: stream ++ dtype: byte ++ vlen: 1048576 ++ ++templates: ++ imports: import nrsc5 ++ make: nrsc5.l1_fm_encoder(6, 1) ++ ++file_format: 1 +diff --git a/grc/nrsc5_l1_fm_encoder_mp6_ms1.xml b/grc/nrsc5_l1_fm_encoder_mp6_ms1.xml +deleted file mode 100644 +index 2302341..0000000 +--- a/grc/nrsc5_l1_fm_encoder_mp6_ms1.xml ++++ /dev/null +@@ -1,43 +0,0 @@ +- +- +- Layer 1 FM encoder: MP6+MS1 +- nrsc5_l1_fm_encoder_mp6_ms1 +- [NRSC-5] +- import nrsc5 +- nrsc5.l1_fm_encoder(6, 1) +- +- p1 +- byte +- 9216 +- +- +- p2 +- byte +- 72448 +- +- +- pids +- byte +- 80 +- +- +- s4 +- byte +- 18272 +- +- +- s5 +- byte +- 512 +- +- +- sids +- byte +- 80 +- +- +- out +- byte +- 1048576 +- +- +diff --git a/grc/nrsc5_l2_encoder.block.yml b/grc/nrsc5_l2_encoder.block.yml +new file mode 100644 +index 0000000..f946b2a +--- /dev/null ++++ b/grc/nrsc5_l2_encoder.block.yml +@@ -0,0 +1,44 @@ ++# auto-generated by grc.converter ++ ++id: nrsc5_l2_encoder ++label: Layer 2 encoder ++category: '[NRSC-5]' ++ ++parameters: ++- id: num_progs ++ label: Programs ++ dtype: int ++ default: 1 ++- id: first_prog ++ label: First prog. no. ++ dtype: int ++ default: 0 ++- id: size ++ label: Frame size ++ dtype: int ++ default: 146176 ++ options: [146176, 109312, 72448, 18272, 9216, 4608, 2304] ++ ++inputs: ++- label: hdc ++ domain: stream ++ dtype: byte ++ multiplicity: ${ num_progs } ++- label: psd ++ domain: stream ++ dtype: byte ++ multiplicity: ${ num_progs } ++ ++outputs: ++- domain: stream ++ dtype: byte ++ vlen: ${ size } ++asserts: ++- ${ 0 <= first_prog <= 7 } ++- ${ 1 <= num_progs <= 8 - first_prog } ++ ++templates: ++ imports: import nrsc5 ++ make: nrsc5.l2_encoder(${num_progs}, ${first_prog}, ${size}) ++ ++file_format: 1 +diff --git a/grc/nrsc5_l2_encoder.xml b/grc/nrsc5_l2_encoder.xml +deleted file mode 100644 +index 216969a..0000000 +--- a/grc/nrsc5_l2_encoder.xml ++++ /dev/null +@@ -1,71 +0,0 @@ +- +- +- Layer 2 encoder +- nrsc5_l2_encoder +- [NRSC-5] +- import nrsc5 +- nrsc5.l2_encoder($num_progs, $first_prog, $size) +- +- Programs +- num_progs +- 1 +- int +- +- +- First prog. no. +- first_prog +- 0 +- int +- +- +- Frame size +- size +- 146176 +- int +- +- +- +- +- +- +- +- +- 0 <= $first_prog <= 7 +- 1 <= $num_progs <= 8 - $first_prog +- +- hdc +- byte +- $num_progs +- +- +- psd +- byte +- $num_progs +- +- +- out +- byte +- $size +- +- +diff --git a/grc/nrsc5_psd_encoder.block.yml b/grc/nrsc5_psd_encoder.block.yml +new file mode 100644 +index 0000000..b0d25ea +--- /dev/null ++++ b/grc/nrsc5_psd_encoder.block.yml +@@ -0,0 +1,31 @@ ++# auto-generated by grc.converter ++ ++id: nrsc5_psd_encoder ++label: PSD encoder ++category: '[NRSC-5]' ++ ++parameters: ++- id: prog_num ++ label: Program number ++ dtype: int ++ default: 0 ++- id: title ++ label: Title ++ dtype: string ++ default: Title ++- id: artist ++ label: Artist ++ dtype: string ++ default: Artist ++ ++outputs: ++- domain: stream ++ dtype: byte ++asserts: ++- ${ 0 <= prog_num <= 7 } ++ ++templates: ++ imports: import nrsc5 ++ make: nrsc5.psd_encoder(${prog_num}, ${title}, ${artist}) ++ ++file_format: 1 +diff --git a/grc/nrsc5_psd_encoder.xml b/grc/nrsc5_psd_encoder.xml +deleted file mode 100644 +index 8828da4..0000000 +--- a/grc/nrsc5_psd_encoder.xml ++++ /dev/null +@@ -1,31 +0,0 @@ +- +- +- PSD encoder +- nrsc5_psd_encoder +- [NRSC-5] +- import nrsc5 +- nrsc5.psd_encoder($prog_num, $title, $artist) +- +- Program number +- prog_num +- 0 +- int +- +- +- Title +- title +- Title +- string +- +- +- Artist +- artist +- Artist +- string +- +- 0 <= $prog_num <= 7 +- +- out +- byte +- +- +diff --git a/grc/nrsc5_sis_encoder.block.yml b/grc/nrsc5_sis_encoder.block.yml +new file mode 100644 +index 0000000..448a753 +--- /dev/null ++++ b/grc/nrsc5_sis_encoder.block.yml +@@ -0,0 +1,24 @@ ++# auto-generated by grc.converter ++ ++id: nrsc5_sis_encoder ++label: SIS encoder ++category: '[NRSC-5]' ++ ++parameters: ++- id: short_name ++ label: Station name ++ dtype: string ++ default: ABCD ++ ++outputs: ++- domain: stream ++ dtype: byte ++ vlen: 80 ++asserts: ++- ${ len(short_name) == 4 } ++ ++templates: ++ imports: import nrsc5 ++ make: nrsc5.sis_encoder(${short_name}) ++ ++file_format: 1 +diff --git a/grc/nrsc5_sis_encoder.xml b/grc/nrsc5_sis_encoder.xml +deleted file mode 100644 +index 2bd6f1a..0000000 +--- a/grc/nrsc5_sis_encoder.xml ++++ /dev/null +@@ -1,20 +0,0 @@ +- +- +- SIS encoder +- nrsc5_sis_encoder +- [NRSC-5] +- import nrsc5 +- nrsc5.sis_encoder($short_name) +- +- Station name +- short_name +- ABCD +- string +- +- len($short_name) == 4 +- +- out +- byte +- 80 +- +- +diff --git a/include/nrsc5/CMakeLists.txt b/include/nrsc5/CMakeLists.txt +index b3c2c5d..04c74c3 100644 +--- a/include/nrsc5/CMakeLists.txt ++++ b/include/nrsc5/CMakeLists.txt +@@ -1,6 +1,7 @@ + # Copyright 2011,2012 Free Software Foundation, Inc. + # +-# This file is part of GNU Radio ++# This file was generated by gr_modtool, a tool from the GNU Radio framework ++# This file is a part of gr-nrsc5 + # + # GNU Radio is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -22,9 +23,9 @@ + ######################################################################## + install(FILES + api.h ++ hdc_encoder.h + l1_fm_encoder.h +- sis_encoder.h + l2_encoder.h +- hdc_encoder.h +- psd_encoder.h DESTINATION include/nrsc5 ++ psd_encoder.h ++ sis_encoder.h DESTINATION include/nrsc5 + ) +diff --git a/include/nrsc5/api.h b/include/nrsc5/api.h +index f0e8af7..449b586 100644 +--- a/include/nrsc5/api.h ++++ b/include/nrsc5/api.h +@@ -1,7 +1,8 @@ + /* + * Copyright 2011 Free Software Foundation, Inc. + * +- * This file is part of GNU Radio ++ * This file was generated by gr_modtool, a tool from the GNU Radio framework ++ * This file is a part of gr-nrsc5 + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +diff --git a/include/nrsc5/hdc_encoder.h b/include/nrsc5/hdc_encoder.h +index 5de1490..4b40b14 100644 +--- a/include/nrsc5/hdc_encoder.h ++++ b/include/nrsc5/hdc_encoder.h +@@ -18,7 +18,6 @@ + * Boston, MA 02110-1301, USA. + */ + +- + #ifndef INCLUDED_NRSC5_HDC_ENCODER_H + #define INCLUDED_NRSC5_HDC_ENCODER_H + +diff --git a/include/nrsc5/l1_fm_encoder.h b/include/nrsc5/l1_fm_encoder.h +index 9cebec6..52df09d 100644 +--- a/include/nrsc5/l1_fm_encoder.h ++++ b/include/nrsc5/l1_fm_encoder.h +@@ -18,7 +18,6 @@ + * Boston, MA 02110-1301, USA. + */ + +- + #ifndef INCLUDED_NRSC5_L1_FM_ENCODER_H + #define INCLUDED_NRSC5_L1_FM_ENCODER_H + +diff --git a/include/nrsc5/l2_encoder.h b/include/nrsc5/l2_encoder.h +index 935f3b6..4a3bac0 100644 +--- a/include/nrsc5/l2_encoder.h ++++ b/include/nrsc5/l2_encoder.h +@@ -18,7 +18,6 @@ + * Boston, MA 02110-1301, USA. + */ + +- + #ifndef INCLUDED_NRSC5_L2_ENCODER_H + #define INCLUDED_NRSC5_L2_ENCODER_H + +diff --git a/include/nrsc5/psd_encoder.h b/include/nrsc5/psd_encoder.h +index f916c71..d6cbca5 100644 +--- a/include/nrsc5/psd_encoder.h ++++ b/include/nrsc5/psd_encoder.h +@@ -18,7 +18,6 @@ + * Boston, MA 02110-1301, USA. + */ + +- + #ifndef INCLUDED_NRSC5_PSD_ENCODER_H + #define INCLUDED_NRSC5_PSD_ENCODER_H + +diff --git a/include/nrsc5/sis_encoder.h b/include/nrsc5/sis_encoder.h +index ae65c2f..73e26de 100644 +--- a/include/nrsc5/sis_encoder.h ++++ b/include/nrsc5/sis_encoder.h +@@ -18,7 +18,6 @@ + * Boston, MA 02110-1301, USA. + */ + +- + #ifndef INCLUDED_NRSC5_SIS_ENCODER_H + #define INCLUDED_NRSC5_SIS_ENCODER_H + +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 9f87e20..a23aef5 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -1,6 +1,7 @@ +-# Copyright 2011,2012,2016 Free Software Foundation, Inc. ++# Copyright 2011,2012,2016,2018,2019 Free Software Foundation, Inc. + # +-# This file is part of GNU Radio ++# This file was generated by gr_modtool, a tool from the GNU Radio framework ++# This file is a part of gr-nrsc5 + # + # GNU Radio is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -22,25 +23,26 @@ + ######################################################################## + include(GrPlatform) #define LIB_SUFFIX + +-include_directories(${Boost_INCLUDE_DIR}) +-link_directories(${Boost_LIBRARY_DIRS}) +- + list(APPEND nrsc5_sources ++ hdc_encoder_impl.cc + l1_fm_encoder_impl.cc +- sis_encoder_impl.cc + l2_encoder_impl.cc +- hdc_encoder_impl.cc + psd_encoder_impl.cc ++ sis_encoder_impl.cc + ) + + set(nrsc5_sources "${nrsc5_sources}" PARENT_SCOPE) + if(NOT nrsc5_sources) +- MESSAGE(STATUS "No C++ sources... skipping lib/") +- return() ++ MESSAGE(STATUS "No C++ sources... skipping lib/") ++ return() + endif(NOT nrsc5_sources) + + add_library(gnuradio-nrsc5 SHARED ${nrsc5_sources}) +-target_link_libraries(gnuradio-nrsc5 ${Boost_LIBRARIES} ${GNURADIO_ALL_LIBRARIES} fdk-aac) ++target_link_libraries(gnuradio-nrsc5 gnuradio::gnuradio-runtime gnuradio::gnuradio-fec fdk-aac) ++target_include_directories(gnuradio-nrsc5 ++ PUBLIC $ ++ PUBLIC $ ++ ) + set_target_properties(gnuradio-nrsc5 PROPERTIES DEFINE_SYMBOL "gnuradio_nrsc5_EXPORTS") + + if(APPLE) +@@ -53,34 +55,34 @@ endif(APPLE) + # Install built library files + ######################################################################## + include(GrMiscUtils) +-GR_LIBRARY_FOO(gnuradio-nrsc5 RUNTIME_COMPONENT "nrsc5_runtime" DEVEL_COMPONENT "nrsc5_devel") ++GR_LIBRARY_FOO(gnuradio-nrsc5) ++ ++######################################################################## ++# Print summary ++######################################################################## ++message(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}") ++message(STATUS "Building for version: ${VERSION} / ${LIBVER}") + + ######################################################################## + # Build and register unit test + ######################################################################## + include(GrTest) + +-include_directories(${CPPUNIT_INCLUDE_DIRS}) +- ++# If your unit tests require special include paths, add them here ++#include_directories() ++# List all files that contain Boost.UTF unit tests here + list(APPEND test_nrsc5_sources +- ${CMAKE_CURRENT_SOURCE_DIR}/test_nrsc5.cc +- ${CMAKE_CURRENT_SOURCE_DIR}/qa_nrsc5.cc + ) ++# Anything we need to link to for the unit tests go here ++list(APPEND GR_TEST_TARGET_DEPS gnuradio-nrsc5) + +-add_executable(test-nrsc5 ${test_nrsc5_sources}) +- +-target_link_libraries( +- test-nrsc5 +- ${GNURADIO_RUNTIME_LIBRARIES} +- ${Boost_LIBRARIES} +- ${CPPUNIT_LIBRARIES} +- gnuradio-nrsc5 +-) ++if(NOT test_nrsc5_sources) ++ MESSAGE(STATUS "No C++ unit tests... skipping") ++ return() ++endif(NOT test_nrsc5_sources) + +-GR_ADD_TEST(test_nrsc5 test-nrsc5) +- +-######################################################################## +-# Print summary +-######################################################################## +-message(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}") +-message(STATUS "Building for version: ${VERSION} / ${LIBVER}") ++foreach(qa_file ${test_nrsc5_sources}) ++ GR_ADD_CPP_TEST("nrsc5_${qa_file}" ++ ${CMAKE_CURRENT_SOURCE_DIR}/${qa_file} ++ ) ++endforeach(qa_file) +diff --git a/lib/hdc_encoder_impl.cc b/lib/hdc_encoder_impl.cc +index 706c2ac..89b1374 100644 +--- a/lib/hdc_encoder_impl.cc ++++ b/lib/hdc_encoder_impl.cc +@@ -35,6 +35,7 @@ namespace gr { + (new hdc_encoder_impl(channels, bitrate)); + } + ++ + /* + * The private constructor + */ +diff --git a/lib/hdc_encoder_impl.h b/lib/hdc_encoder_impl.h +index ff6b1d2..aa5a5a6 100644 +--- a/lib/hdc_encoder_impl.h ++++ b/lib/hdc_encoder_impl.h +@@ -54,6 +54,7 @@ namespace gr { + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); ++ + }; + + } // namespace nrsc5 +diff --git a/lib/l1_fm_encoder_impl.cc b/lib/l1_fm_encoder_impl.cc +index 6861700..bef95ea 100644 +--- a/lib/l1_fm_encoder_impl.cc ++++ b/lib/l1_fm_encoder_impl.cc +@@ -105,6 +105,7 @@ namespace gr { + (new l1_fm_encoder_impl(psm, ssm)); + } + ++ + /* + * The private constructor + */ +diff --git a/lib/l1_fm_encoder_impl.h b/lib/l1_fm_encoder_impl.h +index e0bba24..a1db3c2 100644 +--- a/lib/l1_fm_encoder_impl.h ++++ b/lib/l1_fm_encoder_impl.h +@@ -105,6 +105,7 @@ namespace gr { + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); ++ + }; + + } // namespace nrsc5 +diff --git a/lib/l2_encoder_impl.cc b/lib/l2_encoder_impl.cc +index ce14714..2ef81c8 100644 +--- a/lib/l2_encoder_impl.cc ++++ b/lib/l2_encoder_impl.cc +@@ -41,6 +41,7 @@ namespace gr { + (new l2_encoder_impl(num_progs, first_prog, size)); + } + ++ + /* + * The private constructor + */ +diff --git a/lib/l2_encoder_impl.h b/lib/l2_encoder_impl.h +index 9fa9494..084395a 100644 +--- a/lib/l2_encoder_impl.h ++++ b/lib/l2_encoder_impl.h +@@ -85,6 +85,7 @@ namespace gr { + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); ++ + }; + + } // namespace nrsc5 +diff --git a/lib/psd_encoder_impl.cc b/lib/psd_encoder_impl.cc +index acb4010..29c9ed7 100644 +--- a/lib/psd_encoder_impl.cc ++++ b/lib/psd_encoder_impl.cc +@@ -35,6 +35,7 @@ namespace gr { + (new psd_encoder_impl(prog_num, title, artist)); + } + ++ + /* + * The private constructor + */ +diff --git a/lib/qa_nrsc5.cc b/lib/qa_nrsc5.cc +deleted file mode 100644 +index b523eb2..0000000 +--- a/lib/qa_nrsc5.cc ++++ /dev/null +@@ -1,36 +0,0 @@ +-/* +- * Copyright 2012 Free Software Foundation, Inc. +- * +- * This file is part of GNU Radio +- * +- * GNU Radio 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, or (at your option) +- * any later version. +- * +- * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +- * the Free Software Foundation, Inc., 51 Franklin Street, +- * Boston, MA 02110-1301, USA. +- */ +- +-/* +- * This class gathers together all the test cases for the gr-filter +- * directory into a single test suite. As you create new test cases, +- * add them here. +- */ +- +-#include "qa_nrsc5.h" +- +-CppUnit::TestSuite * +-qa_nrsc5::suite() +-{ +- CppUnit::TestSuite *s = new CppUnit::TestSuite("nrsc5"); +- +- return s; +-} +diff --git a/lib/qa_nrsc5.h b/lib/qa_nrsc5.h +deleted file mode 100644 +index 8ccf0f5..0000000 +--- a/lib/qa_nrsc5.h ++++ /dev/null +@@ -1,38 +0,0 @@ +-/* -*- c++ -*- */ +-/* +- * Copyright 2012 Free Software Foundation, Inc. +- * +- * This file is part of GNU Radio +- * +- * GNU Radio 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, or (at your option) +- * any later version. +- * +- * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +- * the Free Software Foundation, Inc., 51 Franklin Street, +- * Boston, MA 02110-1301, USA. +- */ +- +-#ifndef _QA_NRSC5_H_ +-#define _QA_NRSC5_H_ +- +-#include +-#include +- +-//! collect all the tests for the gr-filter directory +- +-class __GR_ATTR_EXPORT qa_nrsc5 +-{ +- public: +- //! return suite of tests for all of gr-filter directory +- static CppUnit::TestSuite *suite(); +-}; +- +-#endif /* _QA_NRSC5_H_ */ +diff --git a/lib/sis_encoder_impl.cc b/lib/sis_encoder_impl.cc +index 2e1cb19..714bfb0 100644 +--- a/lib/sis_encoder_impl.cc ++++ b/lib/sis_encoder_impl.cc +@@ -35,6 +35,7 @@ namespace gr { + (new sis_encoder_impl(short_name)); + } + ++ + /* + * The private constructor + */ +diff --git a/lib/test_nrsc5.cc b/lib/test_nrsc5.cc +deleted file mode 100644 +index 59bd57c..0000000 +--- a/lib/test_nrsc5.cc ++++ /dev/null +@@ -1,48 +0,0 @@ +-/* -*- c++ -*- */ +-/* +- * Copyright 2012 Free Software Foundation, Inc. +- * +- * This file is part of GNU Radio +- * +- * GNU Radio 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, or (at your option) +- * any later version. +- * +- * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +- * the Free Software Foundation, Inc., 51 Franklin Street, +- * Boston, MA 02110-1301, USA. +- */ +- +-#ifdef HAVE_CONFIG_H +-#include "config.h" +-#endif +- +-#include +-#include +- +-#include +-#include "qa_nrsc5.h" +-#include +-#include +- +-int +-main (int argc, char **argv) +-{ +- CppUnit::TextTestRunner runner; +- std::ofstream xmlfile(get_unittest_path("nrsc5.xml").c_str()); +- CppUnit::XmlOutputter *xmlout = new CppUnit::XmlOutputter(&runner.result(), xmlfile); +- +- runner.addTest(qa_nrsc5::suite()); +- runner.setOutputter(xmlout); +- +- bool was_successful = runner.run("", false); +- +- return was_successful ? 0 : 1; +-} +diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt +index d0b133e..9b25913 100644 +--- a/python/CMakeLists.txt ++++ b/python/CMakeLists.txt +@@ -1,6 +1,7 @@ + # Copyright 2011 Free Software Foundation, Inc. + # +-# This file is part of GNU Radio ++# This file was generated by gr_modtool, a tool from the GNU Radio framework ++# This file is a part of gr-nrsc5 + # + # GNU Radio is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -41,8 +42,8 @@ include(GrTest) + + set(GR_TEST_TARGET_DEPS gnuradio-nrsc5) + set(GR_TEST_PYTHON_DIRS ${CMAKE_BINARY_DIR}/swig) ++GR_ADD_TEST(qa_hdc_encoder ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_hdc_encoder.py) + GR_ADD_TEST(qa_l1_fm_encoder ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_l1_fm_encoder.py) +-GR_ADD_TEST(qa_sis_encoder ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_sis_encoder.py) + GR_ADD_TEST(qa_l2_encoder ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_l2_encoder.py) +-GR_ADD_TEST(qa_hdc_encoder ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_hdc_encoder.py) + GR_ADD_TEST(qa_psd_encoder ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_psd_encoder.py) ++GR_ADD_TEST(qa_sis_encoder ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_sis_encoder.py) +diff --git a/python/__init__.py b/python/__init__.py +index f192a2d..476fb00 100644 +--- a/python/__init__.py ++++ b/python/__init__.py +@@ -22,13 +22,14 @@ + This is the GNU Radio NRSC5 module. Place your Python package + description here (python/__init__.py). + ''' ++from __future__ import unicode_literals + + # import swig generated symbols into the nrsc5 namespace + try: +- # this might fail if the module is python-only +- from nrsc5_swig import * ++ # this might fail if the module is python-only ++ from .nrsc5_swig import * + except ImportError: +- pass ++ pass + + # import any pure python here + # +diff --git a/python/build_utils.py b/python/build_utils.py +deleted file mode 100644 +index cf58a97..0000000 +--- a/python/build_utils.py ++++ /dev/null +@@ -1,226 +0,0 @@ +-# +-# Copyright 2004,2009,2012 Free Software Foundation, Inc. +-# +-# This file is part of GNU Radio +-# +-# GNU Radio 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, or (at your option) +-# any later version. +-# +-# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +-# the Free Software Foundation, Inc., 51 Franklin Street, +-# Boston, MA 02110-1301, USA. +-# +- +-"""Misc utilities used at build time +-""" +- +-import re, os, os.path +-from build_utils_codes import * +- +- +-# set srcdir to the directory that contains Makefile.am +-try: +- srcdir = os.environ['srcdir'] +-except KeyError, e: +- srcdir = "." +-srcdir = srcdir + '/' +- +-# set do_makefile to either true or false dependeing on the environment +-try: +- if os.environ['do_makefile'] == '0': +- do_makefile = False +- else: +- do_makefile = True +-except KeyError, e: +- do_makefile = False +- +-# set do_sources to either true or false dependeing on the environment +-try: +- if os.environ['do_sources'] == '0': +- do_sources = False +- else: +- do_sources = True +-except KeyError, e: +- do_sources = True +- +-name_dict = {} +- +-def log_output_name (name): +- (base, ext) = os.path.splitext (name) +- ext = ext[1:] # drop the leading '.' +- +- entry = name_dict.setdefault (ext, []) +- entry.append (name) +- +-def open_and_log_name (name, dir): +- global do_sources +- if do_sources: +- f = open (name, dir) +- else: +- f = None +- log_output_name (name) +- return f +- +-def expand_template (d, template_filename, extra = ""): +- '''Given a dictionary D and a TEMPLATE_FILENAME, expand template into output file +- ''' +- global do_sources +- output_extension = extract_extension (template_filename) +- template = open_src (template_filename, 'r') +- output_name = d['NAME'] + extra + '.' + output_extension +- log_output_name (output_name) +- if do_sources: +- output = open (output_name, 'w') +- do_substitution (d, template, output) +- output.close () +- template.close () +- +-def output_glue (dirname): +- output_makefile_fragment () +- output_ifile_include (dirname) +- +-def output_makefile_fragment (): +- global do_makefile +- if not do_makefile: +- return +-# overwrite the source, which must be writable; this should have been +-# checked for beforehand in the top-level Makefile.gen.gen . +- f = open (os.path.join (os.environ.get('gendir', os.environ.get('srcdir', '.')), 'Makefile.gen'), 'w') +- f.write ('#\n# This file is machine generated. All edits will be overwritten\n#\n') +- output_subfrag (f, 'h') +- output_subfrag (f, 'i') +- output_subfrag (f, 'cc') +- f.close () +- +-def output_ifile_include (dirname): +- global do_sources +- if do_sources: +- f = open ('%s_generated.i' % (dirname,), 'w') +- f.write ('//\n// This file is machine generated. All edits will be overwritten\n//\n') +- files = name_dict.setdefault ('i', []) +- files.sort () +- f.write ('%{\n') +- for file in files: +- f.write ('#include <%s>\n' % (file[0:-1] + 'h',)) +- f.write ('%}\n\n') +- for file in files: +- f.write ('%%include <%s>\n' % (file,)) +- +-def output_subfrag (f, ext): +- files = name_dict.setdefault (ext, []) +- files.sort () +- f.write ("GENERATED_%s =" % (ext.upper ())) +- for file in files: +- f.write (" \\\n\t%s" % (file,)) +- f.write ("\n\n") +- +-def extract_extension (template_name): +- # template name is something like: GrFIRfilterXXX.h.t +- # we return everything between the penultimate . and .t +- mo = re.search (r'\.([a-z]+)\.t$', template_name) +- if not mo: +- raise ValueError, "Incorrectly formed template_name '%s'" % (template_name,) +- return mo.group (1) +- +-def open_src (name, mode): +- global srcdir +- return open (os.path.join (srcdir, name), mode) +- +-def do_substitution (d, in_file, out_file): +- def repl (match_obj): +- key = match_obj.group (1) +- # print key +- return d[key] +- +- inp = in_file.read () +- out = re.sub (r"@([a-zA-Z0-9_]+)@", repl, inp) +- out_file.write (out) +- +- +- +-copyright = '''/* -*- c++ -*- */ +-/* +- * Copyright 2003,2004 Free Software Foundation, Inc. +- * +- * This file is part of GNU Radio +- * +- * GNU Radio 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, or (at your option) +- * any later version. +- * +- * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to +- * the Free Software Foundation, Inc., 51 Franklin Street, +- * Boston, MA 02110-1301, USA. +- */ +-''' +- +-def is_complex (code3): +- if i_code (code3) == 'c' or o_code (code3) == 'c': +- return '1' +- else: +- return '0' +- +- +-def standard_dict (name, code3, package='gr'): +- d = {} +- d['NAME'] = name +- d['NAME_IMPL'] = name+'_impl' +- d['GUARD_NAME'] = 'INCLUDED_%s_%s_H' % (package.upper(), name.upper()) +- d['GUARD_NAME_IMPL'] = 'INCLUDED_%s_%s_IMPL_H' % (package.upper(), name.upper()) +- d['BASE_NAME'] = re.sub ('^' + package + '_', '', name) +- d['SPTR_NAME'] = '%s_sptr' % name +- d['WARNING'] = 'WARNING: this file is machine generated. Edits will be overwritten' +- d['COPYRIGHT'] = copyright +- d['TYPE'] = i_type (code3) +- d['I_TYPE'] = i_type (code3) +- d['O_TYPE'] = o_type (code3) +- d['TAP_TYPE'] = tap_type (code3) +- d['IS_COMPLEX'] = is_complex (code3) +- return d +- +- +-def standard_dict2 (name, code3, package): +- d = {} +- d['NAME'] = name +- d['BASE_NAME'] = name +- d['GUARD_NAME'] = 'INCLUDED_%s_%s_H' % (package.upper(), name.upper()) +- d['WARNING'] = 'WARNING: this file is machine generated. Edits will be overwritten' +- d['COPYRIGHT'] = copyright +- d['TYPE'] = i_type (code3) +- d['I_TYPE'] = i_type (code3) +- d['O_TYPE'] = o_type (code3) +- d['TAP_TYPE'] = tap_type (code3) +- d['IS_COMPLEX'] = is_complex (code3) +- return d +- +-def standard_impl_dict2 (name, code3, package): +- d = {} +- d['NAME'] = name +- d['IMPL_NAME'] = name +- d['BASE_NAME'] = name.rstrip("impl").rstrip("_") +- d['GUARD_NAME'] = 'INCLUDED_%s_%s_H' % (package.upper(), name.upper()) +- d['WARNING'] = 'WARNING: this file is machine generated. Edits will be overwritten' +- d['COPYRIGHT'] = copyright +- d['FIR_TYPE'] = "fir_filter_" + code3 +- d['CFIR_TYPE'] = "fir_filter_" + code3[0:2] + 'c' +- d['TYPE'] = i_type (code3) +- d['I_TYPE'] = i_type (code3) +- d['O_TYPE'] = o_type (code3) +- d['TAP_TYPE'] = tap_type (code3) +- d['IS_COMPLEX'] = is_complex (code3) +- return d +diff --git a/python/qa_hdc_encoder.py b/python/qa_hdc_encoder.py +index b57d841..7266aa9 100755 +--- a/python/qa_hdc_encoder.py ++++ b/python/qa_hdc_encoder.py +@@ -23,19 +23,19 @@ + from gnuradio import blocks + import nrsc5_swig as nrsc5 + +-class qa_hdc_encoder (gr_unittest.TestCase): ++class qa_hdc_encoder(gr_unittest.TestCase): + +- def setUp (self): +- self.tb = gr.top_block () ++ def setUp(self): ++ self.tb = gr.top_block() + +- def tearDown (self): ++ def tearDown(self): + self.tb = None + +- def test_001_t (self): ++ def test_001_t(self): + # set up fg +- self.tb.run () ++ self.tb.run() + # check data + + + if __name__ == '__main__': +- gr_unittest.run(qa_hdc_encoder, "qa_hdc_encoder.xml") ++ gr_unittest.run(qa_hdc_encoder) +diff --git a/python/qa_l1_fm_encoder.py b/python/qa_l1_fm_encoder.py +index 9b22e0e..3ebd761 100755 +--- a/python/qa_l1_fm_encoder.py ++++ b/python/qa_l1_fm_encoder.py +@@ -23,19 +23,19 @@ + from gnuradio import blocks + import nrsc5_swig as nrsc5 + +-class qa_l1_fm_encoder (gr_unittest.TestCase): ++class qa_l1_fm_encoder(gr_unittest.TestCase): + +- def setUp (self): +- self.tb = gr.top_block () ++ def setUp(self): ++ self.tb = gr.top_block() + +- def tearDown (self): ++ def tearDown(self): + self.tb = None + +- def test_001_t (self): ++ def test_001_t(self): + # set up fg +- self.tb.run () ++ self.tb.run() + # check data + + + if __name__ == '__main__': +- gr_unittest.run(qa_l1_fm_encoder, "qa_l1_fm_encoder.xml") ++ gr_unittest.run(qa_l1_fm_encoder) +diff --git a/python/qa_l2_encoder.py b/python/qa_l2_encoder.py +index cb71f27..cb48bd2 100755 +--- a/python/qa_l2_encoder.py ++++ b/python/qa_l2_encoder.py +@@ -23,19 +23,19 @@ + from gnuradio import blocks + import nrsc5_swig as nrsc5 + +-class qa_l2_encoder (gr_unittest.TestCase): ++class qa_l2_encoder(gr_unittest.TestCase): + +- def setUp (self): +- self.tb = gr.top_block () ++ def setUp(self): ++ self.tb = gr.top_block() + +- def tearDown (self): ++ def tearDown(self): + self.tb = None + +- def test_001_t (self): ++ def test_001_t(self): + # set up fg +- self.tb.run () ++ self.tb.run() + # check data + + + if __name__ == '__main__': +- gr_unittest.run(qa_l2_encoder, "qa_l2_encoder.xml") ++ gr_unittest.run(qa_l2_encoder) +diff --git a/python/qa_psd_encoder.py b/python/qa_psd_encoder.py +index a274a9c..944240d 100755 +--- a/python/qa_psd_encoder.py ++++ b/python/qa_psd_encoder.py +@@ -23,19 +23,19 @@ + from gnuradio import blocks + import nrsc5_swig as nrsc5 + +-class qa_psd_encoder (gr_unittest.TestCase): ++class qa_psd_encoder(gr_unittest.TestCase): + +- def setUp (self): +- self.tb = gr.top_block () ++ def setUp(self): ++ self.tb = gr.top_block() + +- def tearDown (self): ++ def tearDown(self): + self.tb = None + +- def test_001_t (self): ++ def test_001_t(self): + # set up fg +- self.tb.run () ++ self.tb.run() + # check data + + + if __name__ == '__main__': +- gr_unittest.run(qa_psd_encoder, "qa_psd_encoder.xml") ++ gr_unittest.run(qa_psd_encoder) +diff --git a/python/qa_sis_encoder.py b/python/qa_sis_encoder.py +index 96a83cd..485ab68 100755 +--- a/python/qa_sis_encoder.py ++++ b/python/qa_sis_encoder.py +@@ -23,19 +23,19 @@ + from gnuradio import blocks + import nrsc5_swig as nrsc5 + +-class qa_sis_encoder (gr_unittest.TestCase): ++class qa_sis_encoder(gr_unittest.TestCase): + +- def setUp (self): +- self.tb = gr.top_block () ++ def setUp(self): ++ self.tb = gr.top_block() + +- def tearDown (self): ++ def tearDown(self): + self.tb = None + +- def test_001_t (self): ++ def test_001_t(self): + # set up fg +- self.tb.run () ++ self.tb.run() + # check data + + + if __name__ == '__main__': +- gr_unittest.run(qa_sis_encoder, "qa_sis_encoder.xml") ++ gr_unittest.run(qa_sis_encoder) +diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt +index 06747c5..351aa9b 100644 +--- a/swig/CMakeLists.txt ++++ b/swig/CMakeLists.txt +@@ -1,6 +1,7 @@ + # Copyright 2011 Free Software Foundation, Inc. + # +-# This file is part of GNU Radio ++# This file was generated by gr_modtool, a tool from the GNU Radio framework ++# This file is a part of gr-nrsc5 + # + # GNU Radio is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -21,15 +22,15 @@ + # Check if there is C++ code at all + ######################################################################## + if(NOT nrsc5_sources) +- MESSAGE(STATUS "No C++ sources... skipping swig/") +- return() ++ MESSAGE(STATUS "No C++ sources... skipping swig/") ++ return() + endif(NOT nrsc5_sources) + + ######################################################################## + # Include swig generation macros + ######################################################################## + find_package(SWIG) +-find_package(PythonLibs 2) ++find_package(PythonLibs) + if(NOT SWIG_FOUND OR NOT PYTHONLIBS_FOUND) + return() + endif() +@@ -39,11 +40,11 @@ include(GrPython) + ######################################################################## + # Setup swig generation + ######################################################################## +-foreach(incdir ${GNURADIO_RUNTIME_INCLUDE_DIRS}) +- list(APPEND GR_SWIG_INCLUDE_DIRS ${incdir}/gnuradio/swig) +-endforeach(incdir) ++set(GR_SWIG_INCLUDE_DIRS $) ++set(GR_SWIG_TARGET_DEPS gnuradio::runtime_swig) + + set(GR_SWIG_LIBRARIES gnuradio-nrsc5) ++ + set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/nrsc5_swig_doc.i) + set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include) + +diff --git a/swig/nrsc5_swig.i b/swig/nrsc5_swig.i +index 99841a3..4b75b62 100644 +--- a/swig/nrsc5_swig.i ++++ b/swig/nrsc5_swig.i +@@ -2,27 +2,26 @@ + + #define NRSC5_API + +-%include "gnuradio.i" // the common stuff ++%include "gnuradio.i" // the common stuff + + //load generated python docstrings + %include "nrsc5_swig_doc.i" + + %{ ++#include "nrsc5/hdc_encoder.h" + #include "nrsc5/l1_fm_encoder.h" +-#include "nrsc5/sis_encoder.h" + #include "nrsc5/l2_encoder.h" +-#include "nrsc5/hdc_encoder.h" + #include "nrsc5/psd_encoder.h" ++#include "nrsc5/sis_encoder.h" + %} + +- ++%include "nrsc5/hdc_encoder.h" ++GR_SWIG_BLOCK_MAGIC2(nrsc5, hdc_encoder); + %include "nrsc5/l1_fm_encoder.h" + GR_SWIG_BLOCK_MAGIC2(nrsc5, l1_fm_encoder); +-%include "nrsc5/sis_encoder.h" +-GR_SWIG_BLOCK_MAGIC2(nrsc5, sis_encoder); + %include "nrsc5/l2_encoder.h" + GR_SWIG_BLOCK_MAGIC2(nrsc5, l2_encoder); +-%include "nrsc5/hdc_encoder.h" +-GR_SWIG_BLOCK_MAGIC2(nrsc5, hdc_encoder); + %include "nrsc5/psd_encoder.h" + GR_SWIG_BLOCK_MAGIC2(nrsc5, psd_encoder); ++%include "nrsc5/sis_encoder.h" ++GR_SWIG_BLOCK_MAGIC2(nrsc5, sis_encoder); diff --git a/srcpkgs/gnuradio-nrsc5/template b/srcpkgs/gnuradio-nrsc5/template index 88ca56272d6..5d911852847 100644 --- a/srcpkgs/gnuradio-nrsc5/template +++ b/srcpkgs/gnuradio-nrsc5/template @@ -1,11 +1,13 @@ # Template file for 'gnuradio-nrsc5' pkgname=gnuradio-nrsc5 version=1.0.0 -revision=2 +revision=3 wrksrc="gr-nrsc5-${version}" +patch_args="-Np1" build_style=cmake hostmakedepends="git autoconf automake libtool swig" -makedepends="gnuradio-devel boost-devel libcppunit-devel python-devel" +makedepends="gnuradio-devel boost-devel libcppunit-devel python3-devel + log4cpp-devel mpir-devel gsl-devel" short_desc="GNU Radio implementation of HD Radio" maintainer="Remi Pommarel " license="GPL-3.0-or-later" From be4d0310ffdd2e9f0679a064062870b9fd0d09c8 Mon Sep 17 00:00:00 2001 From: Andrew Benson Date: Wed, 4 Sep 2019 21:19:56 -0500 Subject: [PATCH 7/7] gnuradio-rds: update to 1.1.0. --- srcpkgs/gnuradio-rds/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/gnuradio-rds/template b/srcpkgs/gnuradio-rds/template index 08947d1a975..4f54748186d 100644 --- a/srcpkgs/gnuradio-rds/template +++ b/srcpkgs/gnuradio-rds/template @@ -1,11 +1,11 @@ # Template file for 'gnuradio-rds' pkgname=gnuradio-rds version=1.1.0 -revision=2 +revision=3 wrksrc="gr-rds-${version}" build_style=cmake hostmakedepends="pkg-config swig" -makedepends="gnuradio-devel python-devel boost-devel" +makedepends="gnuradio-devel python3-devel boost-devel" short_desc="GNUradio FM RDS/TMC Transceiver" maintainer="Remi Pommarel " license="GPL-2.0-or-later"