diff --git a/.github/workflows/pkg-debian.yml b/.github/workflows/pkg-debian.yml new file mode 100644 index 00000000000..101741206c5 --- /dev/null +++ b/.github/workflows/pkg-debian.yml @@ -0,0 +1,76 @@ +name: 'Package-Debian' +on: + workflow_dispatch: + inputs: + build_branch: + description: 'Branch to build from' + required: true + default: 'master' + rev: + description: 'Package revision' + required: true + default: '1' + distribution: + description: 'Target distribution' + required: true + default: 'focal' +jobs: + linux-docker: + runs-on: ubuntu-20.04 + # The GH default is 360 minutes (it's also the max as of Feb-2021). However + # we should fail sooner. The only reason to exceed this time is if a test + # hangs. + timeout-minutes: 120 + strategy: + # Enabling fail-fast would kill all Dockers if one of them fails. We want + # maximum output. + fail-fast: false + matrix: + # For every distro we want to test here, add one key 'distro' with a + # descriptive name, and one key 'containerid' with the name of the + # container (i.e., what you want to docker-pull) + include: + - distro: 'Ubuntu 20.04' + containerid: 'gnuradio/ci:ubuntu-20.04-3.9' + cxxflags: -Werror + name: ${{ matrix.distro }} + container: + image: ${{ matrix.containerid }} + volumes: + - build_data:/build + options: --cpus 2 + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + ref: ${{ github.event.inputs.build_branch }} + - uses: actions/setup-python@v1 + with: + python-version: "3.x" + - run: apt-get update && apt-get install -yq devscripts debhelper dh-python + - name: Import GPG key + id: import_gpg + uses: crazy-max/ghaction-import-gpg@v3 + with: + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.PASSPHRASE }} + - name: GPG user IDs + run: | + echo "fingerprint: ${{ steps.import_gpg.outputs.fingerprint }}" + echo "keyid: ${{ steps.import_gpg.outputs.keyid }}" + echo "name: ${{ steps.import_gpg.outputs.name }}" + echo "email: ${{ steps.import_gpg.outputs.email }}" + - name: Run Packaging Script + run: | + export NAME="${{secrets.NAME}}" + export EMAIL="${{secrets.EMAIL}}" + export DEBFULLNAME="${{secrets.NAME}}" + export DEBEMAIL="${{secrets.EMAIL}}" + export UBUEMAIL="${{secrets.EMAIL}}" + export DISTRIBUTION="${{ github.event.inputs.distribution }}" + export GITBRANCH="master" + export REV="${{ github.event.inputs.rev }}" + cd /build && sh $GITHUB_WORKSPACE/.packaging/scripts/pkg-debian.sh + - name: Push to Launchpad + run: + cd /build && dput -c $GITHUB_WORKSPACE/.packaging/launchpad/dput.cf $GITBRANCH $(ls *.changes) diff --git a/.github/workflows/pkg-fedora.yml b/.github/workflows/pkg-fedora.yml new file mode 100644 index 00000000000..74c842a4be2 --- /dev/null +++ b/.github/workflows/pkg-fedora.yml @@ -0,0 +1,76 @@ +name: 'Package-Fedora' +on: + workflow_dispatch: + inputs: + build_branch: + description: 'Branch to build from' + required: true + default: 'master' + rev: + description: 'Package revision' + required: true + default: '1' +jobs: + linux-docker: + runs-on: ubuntu-20.04 + # The GH default is 360 minutes (it's also the max as of Feb-2021). However + # we should fail sooner. The only reason to exceed this time is if a test + # hangs. + timeout-minutes: 240 + strategy: + # Enabling fail-fast would kill all Dockers if one of them fails. We want + # maximum output. + fail-fast: false + matrix: + # For every distro we want to test here, add one key 'distro' with a + # descriptive name, and one key 'containerid' with the name of the + # container (i.e., what you want to docker-pull) + include: + - distro: 'Fedora 33' + containerid: 'gnuradio/ci:fedora-33-3.9' + cxxflags: -Werror + name: ${{ matrix.distro }} + container: + image: ${{ matrix.containerid }} + volumes: + - build_data:/build + options: --cpus 2 + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + ref: ${{ github.event.inputs.build_branch }} + - uses: actions/setup-python@v1 + with: + python-version: "3.x" + - run: dnf install -y fedora-packager copr-cli + - name: Import GPG key + id: import_gpg + uses: crazy-max/ghaction-import-gpg@v3 + with: + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.PASSPHRASE }} + - name: GPG user IDs + run: | + echo "fingerprint: ${{ steps.import_gpg.outputs.fingerprint }}" + echo "keyid: ${{ steps.import_gpg.outputs.keyid }}" + echo "name: ${{ steps.import_gpg.outputs.name }}" + echo "email: ${{ steps.import_gpg.outputs.email }}" + - name: Run Packaging Script + run: | + export DISTRIBUTION="fedora" + export GITBRANCH="master" + export REV="${{ github.event.inputs.rev }}" + cd /build && sh $GITHUB_WORKSPACE/.packaging/scripts/pkg-fedora.sh + - name: Archive SRPM + uses: actions/upload-artifact@v2 + with: + name: srpm + path: /build/rpmbuild/SRPMS + - name: Save COPR Token + run: cd /build && echo "$COPR_TOKEN" > copr + shell: bash + env: + COPR_TOKEN: ${{secrets.COPR_TOKEN}} + - name: Submit to COPR + run: cd /build && copr-cli --config copr build gnuradio $(ls rpmbuild/SRPMS/*.src.rpm) diff --git a/.packaging/debian/changelog b/.packaging/debian/changelog new file mode 100644 index 00000000000..7eb437c04ab --- /dev/null +++ b/.packaging/debian/changelog @@ -0,0 +1,1743 @@ +gnuradio (3.9.0.0-1) experimental; urgency=medium + + * New upstream release + + -- A. Maitland Bottoms Sun, 17 Jan 2021 19:30:58 -0500 + +gnuradio (3.9.0.0~rc2-1) experimental; urgency=medium + + * New upstream release candidate + + -- A. Maitland Bottoms Thu, 07 Jan 2021 16:22:20 -0500 + +gnuradio (3.9~rc0-1) experimental; urgency=medium + + * v3.8.0.0-845-g592dfc78a aka 3.9.0.RC0 from new maint-3.9 branch + pybind11 branch merged onto master + Headed toward a 3.9 release. + + -- A. Maitland Bottoms Wed, 23 Dec 2020 12:40:17 -0500 + +gnuradio (3.8.1.0~pybind-1) unstable; urgency=medium + + * New upstream branch + + -- A. Maitland Bottoms Sat, 30 May 2020 19:46:02 -0400 + +gnuradio (3.8.1.0-1) unstable; urgency=medium + + * Release 3.8.1.0 + + -- A. Maitland Bottoms Thu, 09 Apr 2020 17:30:29 -0400 + +gnuradio (3.8.1.0~rc1-2) unstable; urgency=medium + + * Upload to unstable + * build with volk 2.2.0 + + -- A. Maitland Bottoms Tue, 18 Feb 2020 21:53:02 -0500 + +gnuradio (3.8.1.0~rc1-1) experimental; urgency=medium + + * New upstream release candidate + + -- A. Maitland Bottoms Sun, 16 Feb 2020 16:33:39 -0500 + +gnuradio (3.8.0.0-8) unstable; urgency=medium + + * update to v3.8.0.0-96-g510da612e8 + but without volk 2.0 work-around since Debiuan has a fixed volk 2.1 + + -- A. Maitland Bottoms Thu, 13 Feb 2020 20:46:03 -0500 + +gnuradio (3.8.0.0-7) unstable; urgency=medium + + * update to v3.8.0.0-79-gf87f2dbab + * build with volk 2.1 and uhd 3.15.0.0 + + -- A. Maitland Bottoms Mon, 06 Jan 2020 19:19:37 -0500 + +gnuradio (3.8.0.0-6) unstable; urgency=medium + + * update to v3.8.0.0-41-g2f5c81d555 + * gnuradio-dev depends upon libgmp-dev, thanks vorlon! (Closes: #943965) + * gnuradio depends upon gir1.2-gtk-3.0, thanks kc0bfv! + (Closes: #943778, #943864) + + -- A. Maitland Bottoms Fri, 15 Nov 2019 00:05:28 -0500 + +gnuradio (3.8.0.0-5) unstable; urgency=medium + + * grcc from gnuradio 3.8 no longer adds timestamps (Closes: #914252) + * depend upon python3-pyqtgraph for gr_filter_design (Closes: #926790) + * add depends for canberra modules (Closes: #921377) + * Use .bcep file to keep gr_modtool template un-bytecompiled. + + -- A. Maitland Bottoms Fri, 30 Aug 2019 20:21:31 -0400 + +gnuradio (3.8.0.0-4) unstable; urgency=medium + + * limit architectures for thrift availability + + -- A. Maitland Bottoms Sat, 24 Aug 2019 12:25:47 -0400 + +gnuradio (3.8.0.0-3) unstable; urgency=medium + + * update to v3.8.0.0-14-gcfefe6e0ba + * update package references: libvolk1-bin => libvolk2-bin (Closes: #935417) + + -- A. Maitland Bottoms Thu, 22 Aug 2019 20:28:52 -0400 + +gnuradio (3.8.0.0-2) unstable; urgency=medium + + * update dependencies + * build for Python3 (Closes: #912960, #885294) + + -- A. Maitland Bottoms Mon, 12 Aug 2019 22:30:03 -0400 + +gnuradio (3.8.0.0-1) experimental; urgency=medium + + * New upstream release + + -- A. Maitland Bottoms Fri, 09 Aug 2019 19:18:15 -0400 + +gnuradio (3.7.13.4-4) unstable; urgency=medium + + * more hurd-i386 build fixes. Thanks again, Samuel! (Closes: #918481) + + -- A. Maitland Bottoms Sun, 06 Jan 2019 20:12:41 -0500 + +gnuradio (3.7.13.4-3) unstable; urgency=medium + + * update to v3.7.13.4-5-g556c511fc3 + * improve hurd-i386 build. Thanks Samuel! (Closes: #918481) + + -- A. Maitland Bottoms Sun, 06 Jan 2019 11:19:49 -0500 + +gnuradio (3.7.13.4-2) unstable; urgency=high + + * update to v3.7.13.4-2-gbd159f5ce3 + * gnuradio-companion and grcc still requires python-gtk2 + (Closes: #902371, #910001) + + -- A. Maitland Bottoms Thu, 08 Nov 2018 17:22:38 -0500 + +gnuradio (3.7.13.4-1) unstable; urgency=medium + + * New upstream release + * Fix Boost 1.67 linking issue + * gnuradio-runtime + - Logging: fixed issues where messages weren't properly written + to stdout/stderr due to incorrect strings + * gr-analog fmdet_cf's derivative coefficients were wrong. + * gr-blocks skiphead used to incorrectly handle tags, now properly shifts + * gr-digital qa_packet_format: Unit test used to potentially lock up due + to incorrect conditionals + clock_recovery_cc, crc32_bb: Accessing the `[0]` element of an empty + vector is UB, even if you don't use the result afterwards. + * gr-fec polar_encoder/_common: Fixed multiple out-of-bound accesses + due to insufficient vector length checks + * gr-filter fft_filter, filter_delay: Accessing the `[0]` element + of an empty vector is UB, even if you don't use the result afterwards. + + -- A. Maitland Bottoms Mon, 16 Jul 2018 21:09:14 -0400 + +gnuradio (3.7.13.3-1) unstable; urgency=medium + + * New upstream release - For non-C++11 compilers, + the new cstdint include doesn't work out; conditionalized it. + * remove qt5-maint-0018-qtgui-Expose-qt-time-sink-stem-plot-option.patch + Fix missing QT Time Sink. (Closes: #898544) + * Use Doxygen jquery since 3.7.11-7, side nav bar back (Closes: #887509) + * depend upon python-gobject-2 for pygtk + * Use direct-freedesktop-install patch since 3.7.11-9 (Closes: #847087) + + -- A. Maitland Bottoms Mon, 18 Jun 2018 21:21:33 -0400 + +gnuradio (3.7.13.2-2) unstable; urgency=medium + + * build with uhd 3.12.0.0 + + -- A. Maitland Bottoms Fri, 08 Jun 2018 00:09:08 -0400 + +gnuradio (3.7.13.2-1) experimental; urgency=medium + + * New upstream release tag + upload to experimental to start new library abi transition + * Update freedv and codec2 blocks + + -- A. Maitland Bottoms Tue, 05 Jun 2018 15:50:26 -0400 + +gnuradio (3.7.12.0-3) unstable; urgency=medium + + * update to v3.7.12.0-8-g4c82185a26 + Fixed GRC bug which broke WX and Qt (by altering the template code) + * rebuild with codec2 0.8 + + -- A. Maitland Bottoms Sun, 27 May 2018 10:01:19 -0400 + +gnuradio (3.7.12.0-2) unstable; urgency=medium + + * improve direct-freedesktop-install to avoid piuparts trouble + + -- A. Maitland Bottoms Wed, 11 Apr 2018 21:39:26 -0400 + +gnuradio (3.7.12.0-1) unstable; urgency=medium + + * New upstream release tag + * Bump volk dependency version to 1.4 + + -- A. Maitland Bottoms Fri, 30 Mar 2018 17:07:09 -0400 + +gnuradio (3.7.11-11) unstable; urgency=medium + + * update to v3.7.11-157-g486cd82702 + * no longer shipping a menu file + + -- A. Maitland Bottoms Wed, 28 Mar 2018 09:58:15 -0400 + +gnuradio (3.7.11-10) unstable; urgency=medium + + * import Qt5 QtWidgets in gr-qtgui util.py (Closes: #891495) + + -- A. Maitland Bottoms Mon, 26 Feb 2018 21:40:13 -0500 + +gnuradio (3.7.11-9) unstable; urgency=medium + + * update to v3.7.11-137-g4579e7b647 + * update qt5 patches + * direct-freedesktop-install + + -- A. Maitland Bottoms Sat, 24 Feb 2018 21:36:39 -0500 + +gnuradio (3.7.11-8) unstable; urgency=medium + + * update to v3.7.11-132-g72e085515b + * 'git am'-able debian/patches + + -- A. Maitland Bottoms Sat, 10 Feb 2018 19:06:32 -0500 + +gnuradio (3.7.11-7) unstable; urgency=medium + + * update to v3.7.11-129-g7365f030cd + * use PyQt5 QtCore.QByteArray (Thanks Vasil!) (Closes: #886807) + * Standards-Version to 4.1.3 (no changes needed) + * Change Vcs fields in debian/control to point to salsa.debian.org + + -- A. Maitland Bottoms Sun, 04 Feb 2018 12:00:34 -0500 + +gnuradio (3.7.11-6) unstable; urgency=medium + + * grc and apps using qt5 + * from next branch runtime: replace std::auto_ptr with std::unique_ptr + + -- A. Maitland Bottoms Sun, 26 Nov 2017 19:42:29 -0500 + +gnuradio (3.7.11-5) unstable; urgency=medium + + * python-pyqt5 is available on kFreeBSD + + -- A. Maitland Bottoms Thu, 23 Nov 2017 23:56:41 -0500 + +gnuradio (3.7.11-4) unstable; urgency=medium + + * use installable dependencies + * python-pyqt5 is linux-any + + -- A. Maitland Bottoms Wed, 22 Nov 2017 07:12:47 -0500 + +gnuradio (3.7.11-3) unstable; urgency=medium + + * update to v3.7.11-118-g6d22211960 + * Add Suggests: to gnuradio-dev to help guide OOT users + Add Qt and Qwt details from build into gnuradio-qtgui.pc (Closes: #879110) + * qt4-qt5 patch - build with with qt5 (Closes: #874893) + + -- A. Maitland Bottoms Tue, 21 Nov 2017 20:55:34 -0500 + +gnuradio (3.7.11-2) unstable; urgency=medium + + * update to v3.7.11-113-gbbed667ecc + * python-qwt5-qt4 only used in gr-filter and gr-zeromq GUIs + + -- A. Maitland Bottoms Sun, 24 Sep 2017 14:49:08 -0400 + +gnuradio (3.7.11-1) unstable; urgency=medium + + * New upstream release + * update to v3.7.11-100-gec71327d29 + * improve desktop search metadata (Closes: #847087) + * Fix a segfault issue for QT time sink (Closes: #860295) + * michaelld - cmake: Fix for CppUnit and C11 (Closes: #862133) + * gnuradio depends upon python-numpy (LP: #1471351) + + -- A. Maitland Bottoms Sun, 27 Aug 2017 10:10:44 -0400 + +gnuradio (3.7.10.1-2) unstable; urgency=medium + + * update to v3.7.10.1-24-gea2aeca + * add freedvapi blocks + + -- A. Maitland Bottoms Sun, 09 Oct 2016 22:16:42 -0400 + +gnuradio (3.7.10.1-1) unstable; urgency=medium + + * New upstream release + + -- A. Maitland Bottoms Sat, 27 Aug 2016 00:06:08 -0400 + +gnuradio (3.7.10-1) unstable; urgency=medium + + * New upstream release + + -- A. Maitland Bottoms Wed, 06 Jul 2016 18:38:12 -0400 + +gnuradio (3.7.9.2-4) unstable; urgency=medium + + * update to v3.7.9.2-56-g2a6c82f + + -- A. Maitland Bottoms Sun, 19 Jun 2016 17:06:10 -0400 + +gnuradio (3.7.9.2-3) unstable; urgency=medium + + * update to v3.7.9.2-33-g2e77960 + * fix-dvbt-assertions + + -- A. Maitland Bottoms Fri, 29 Apr 2016 19:54:52 -0400 + +gnuradio (3.7.9.2-2) unstable; urgency=medium + + * Spell Viterbi correctly. Thanks Damien! (Closes: #818355) + + -- A. Maitland Bottoms Tue, 26 Apr 2016 15:39:35 -0400 + +gnuradio (3.7.9.2-1) unstable; urgency=medium + + * New upstream release + + -- A. Maitland Bottoms Mon, 11 Apr 2016 18:09:05 -0400 + +gnuradio (3.7.9.1-2) unstable; urgency=medium + + * Update to v3.7.9.1-26-g0a1a76d (Closes: #812029) + + -- A. Maitland Bottoms Fri, 11 Mar 2016 16:35:08 -0500 + +gnuradio (3.7.9.1-1) unstable; urgency=medium + + * New upstream point release, notes in the gnuradio + package: in file /usr/share/doc/gnuradio/RELEASE-NOTES-3.7.9.1.md + + -- A. Maitland Bottoms Tue, 09 Feb 2016 00:43:23 -0500 + +gnuradio (3.7.9-4) unstable; urgency=medium + + * use comedilib again + * update to v3.7.9-16-g4ce1d49 + grc: fix Parser errors menu item + analog: Addresses issue 831 + analog: enable setting max dev. during runtime for NB + gru: Fixes an obsolete numpy function call + digital: Addresses issue 812 + Updated URL to UHD manual in USRP sink and source blocks + gr-utils: Update error message + + -- A. Maitland Bottoms Tue, 19 Jan 2016 15:11:08 -0500 + +gnuradio (3.7.9-3) unstable; urgency=medium + + * Do *not* try test on any i386 arch due to scipy sgegv_ errors + + -- A. Maitland Bottoms Fri, 08 Jan 2016 21:48:22 -0500 + +gnuradio (3.7.9-2) unstable; urgency=medium + + * Do not try test on any i386 arch due to scipy sgegv_ errors + + -- A. Maitland Bottoms Fri, 08 Jan 2016 12:14:48 -0500 + +gnuradio (3.7.9-1) unstable; urgency=medium + + * New upstream release + * Update to v3.7.9-5-gdec480a + Fixed delayed tag propagation + added unit test for tag forwarding to delay + gr-fec Repair puncture and depuncture XML files + blocks resolve char sign ambiguity causing build bre + Fix 64-bit OpenEmbedded builds + + -- A. Maitland Bottoms Mon, 04 Jan 2016 19:03:42 -0500 + +gnuradio (3.7.9~rc1-2) experimental; urgency=medium + + * Add copyright info for unused embedded copy of volk from upstream tarball + * Not re-packing upstream tarball to make use of upstream source signature + + -- A. Maitland Bottoms Mon, 14 Dec 2015 20:24:41 -0500 + +gnuradio (3.7.9~rc1-1) experimental; urgency=medium + + * New upstream release candidate + + -- A. Maitland Bottoms Fri, 11 Dec 2015 15:51:37 -0500 + +gnuradio (3.7.8.1-2) unstable; urgency=medium + + * Update to v3.7.8.1-2-g4bbe46e + dtv-fix-coverity-issue-1327836 + grc-fix-858-category-string-splitting + * update build depends to libgsl-dev (>= 2.0) (Closes: #804495) + * update build depends, libuhd-dev is available on hppa (Closes: #803129) + * do not use comedilib until it does the libgsl transition + + -- A. Maitland Bottoms Thu, 19 Nov 2015 00:23:23 -0500 + +gnuradio (3.7.8.1-1) unstable; urgency=medium + + * New upstream release + + -- A. Maitland Bottoms Sun, 01 Nov 2015 20:02:06 -0500 + +gnuradio (3.7.8-8) unstable; urgency=medium + + * Update to 3.7.9git-28-ga42b7dc + * Use cmake-policies to surpress warnings + + -- A. Maitland Bottoms Mon, 05 Oct 2015 19:12:34 -0400 + +gnuradio (3.7.8-7) unstable; urgency=medium + + * That would be python-gtk2 dependency + + -- A. Maitland Bottoms Mon, 05 Oct 2015 01:00:28 -0400 + +gnuradio (3.7.8-6) unstable; urgency=medium + + * add python-gtk dependency (Closes: #800688) + also added python-sip and promoted python-qt4 to a dependency + + -- A. Maitland Bottoms Fri, 02 Oct 2015 20:41:21 -0400 + +gnuradio (3.7.8-5) unstable; urgency=medium + + * fix dh_makeshlibs usage bugs + + -- A. Maitland Bottoms Wed, 30 Sep 2015 21:23:30 -0400 + +gnuradio (3.7.8-4) unstable; urgency=medium + + * Tighten libuhd003 versioned dependency via dh_makeshlibs + * Add new codec2 700 modes to grc template + * wrap-and-sort makes it easier to see unnecessary libqwtplot3d-qt4-dev + dependency was removed in 3.7.8-3 (Closes: #793075) + + -- A. Maitland Bottoms Tue, 29 Sep 2015 23:02:00 -0400 + +gnuradio (3.7.8-3) unstable; urgency=low + + * Acknowlegde NMUs + * Update to v3.7.8-22-g2fa3642 + * update dependencies to uhd 3.9.0, volk 1.1, codec2 0.4 + * Absolute path for temporary HOME to allow tests to run + + -- A. Maitland Bottoms Mon, 07 Sep 2015 16:10:48 -0400 + +gnuradio (3.7.8-2.2) unstable; urgency=medium + + * Non-maintainer upload. + * Updated dependencies for libvolk to latest package names: + - libvolk1.0-bin -> libvolk1-bin + + -- Iain R. Learmonth Thu, 03 Sep 2015 11:33:49 +0100 + +gnuradio (3.7.8-2.1) unstable; urgency=medium + + * Non-maintainer upload. + * Updated dependencies for libvolk to latest package names: + - libvolk1.0-dev -> libvolk1-dev + - libvolk1.0 -> libvolk1.1 + * Updated dependencies for libuhd to latest package names: + - libuhd003 -> libuhd003v5 (Closes: #797754) + + -- Iain R. Learmonth Wed, 02 Sep 2015 19:55:47 +0100 + +gnuradio (3.7.8-2) unstable; urgency=medium + + * build with log4cpp + + -- A. Maitland Bottoms Thu, 13 Aug 2015 20:33:16 -0400 + +gnuradio (3.7.8-1) unstable; urgency=medium + + * New upstream release + * Update to codec2 version 0.3 + * Funcube Dongle udev rule is current syntax (Closes: #669601) + * gnuradio-dev brings in more common -dev packages (Closes: #770520) + * removed unused build-dependency on libqwtplot3d-qt4-dev (Closes: #793075) + * removed unused build-dependency on liboil0.3-dev (Closes: #793625) + * built without log4cpp pending GCC ABI transition #791191. + * built without thrift until version > 0.9.2-2 enters unstable + + -- A. Maitland Bottoms Wed, 05 Aug 2015 20:43:26 -0400 + +gnuradio (3.7.5-5) unstable; urgency=low + + * Use Breaks/Replaces to manage upgrades now that the newer libvolk-bin + has files formerly found in gnuradio (Closes: #762072) + + -- A. Maitland Bottoms Sun, 09 Nov 2014 10:18:34 -0500 + +gnuradio (3.7.5-4) unstable; urgency=low + + * Use Breaks/Replaces to manage upgrades now that the newer libvolk-dev + has files formerly found in gnuradio-dev (Closes: #762072, #767838) + + -- A. Maitland Bottoms Tue, 04 Nov 2014 22:21:46 -0500 + +gnuradio (3.7.5-3) unstable; urgency=low + + * Actual release notes in the gnuradio + package /usr/share/doc/gnuradio/ChangeLogV3_7_5 + + -- A. Maitland Bottoms Fri, 05 Sep 2014 23:35:13 -0400 + +gnuradio (3.7.5-2) unstable; urgency=low + + * Handle lack of zeromq on hurd-i386 + * trial fix for native armv7 build support + + -- A. Maitland Bottoms Mon, 01 Sep 2014 20:24:11 -0400 + +gnuradio (3.7.5-1) unstable; urgency=low + + * New upstream release, see extended release notes in the gnuradio + package /usr/share/doc/gnuradio/ChangeLogV3_7_5 + + -- A. Maitland Bottoms Sat, 30 Aug 2014 13:08:50 -0400 + +gnuradio (3.7.4-4) unstable; urgency=low + + * Update to v3.7.4-50-gcbb0698 + + -- A. Maitland Bottoms Sat, 30 Aug 2014 12:38:45 -0400 + +gnuradio (3.7.4-3) unstable; urgency=low + + * Update to v3.7.4-43-gb3927e7 + * Include 10 more bug fixes from the maint branch + + -- A. Maitland Bottoms Tue, 26 Aug 2014 21:16:36 -0400 + +gnuradio (3.7.4-2) unstable; urgency=low + + * wxPython fixes from Olly Betts (Closes: #758846) + - Update dependencies on wxPython to all be python-wxgtk3.0|python-wxgtk2.8. + - Drop unused build dependency on libwxgtk3.0-dev|libwxgtk2.8-dev. + - New patch wxpy3.0-compat to improve wxPython 3.0 compatibility. + * No zmq on hurd, build-depend upon python-zmq for build testing + + -- A. Maitland Bottoms Fri, 22 Aug 2014 17:22:09 -0400 + +gnuradio (3.7.4-1) unstable; urgency=low + + * package based upon git maint branch v3.7.4-28-g3897c85 + * New upstream release, see extended release notes in the gnuradio + package /usr/share/doc/gnuradio/ChangeLogV3_7_4 + * Build gr-wxgui with wxwidgets3.0 if available + * New 0MQ support using libzmq3-dev + + -- A. Maitland Bottoms Fri, 15 Aug 2014 00:14:35 -0400 + +gnuradio (3.7.3-10) unstable; urgency=low + + * restore comedilib + * Avoid buggy gr-ctrlport + * fix fcd udev rules for modern kernel udev (Closes: #757236) + + -- A. Maitland Bottoms Sun, 10 Aug 2014 23:26:46 -0400 + +gnuradio (3.7.3-9) unstable; urgency=low + + * Update to v3.7.3-37-gaffda0b + * Additional codec2 updates + * Avoid buggy comedilib + + -- A. Maitland Bottoms Sun, 04 May 2014 14:07:49 -0400 + +gnuradio (3.7.3-8) unstable; urgency=low + + * No gr-fcd on hurd + + -- A. Maitland Bottoms Tue, 15 Apr 2014 07:09:35 -0400 + +gnuradio (3.7.3-7) unstable; urgency=low + + * No comedi on hurd + + -- A. Maitland Bottoms Mon, 14 Apr 2014 00:12:10 -0400 + +gnuradio (3.7.3-6) unstable; urgency=low + + * Avoid ALSA on hurd (patch bsd-hurd-alsa) + + -- A. Maitland Bottoms Sun, 13 Apr 2014 08:11:53 -0400 + +gnuradio (3.7.3-5) unstable; urgency=low + + * no thread affinity for hurd + + -- A. Maitland Bottoms Sat, 12 Apr 2014 20:55:12 -0400 + +gnuradio (3.7.3-4) unstable; urgency=low + + * Update to v3.7.3-20-gb0dce1e + * disable gr-fcd if libusb is not found on hurd (rather than fail) + + -- A. Maitland Bottoms Sat, 12 Apr 2014 17:08:58 -0400 + +gnuradio (3.7.3-3) unstable; urgency=low + + * Update to v3.7.3-18-gb1855f7 + * Update debian/patches/bsd-fcd since special case handling for + kFreeBSD libusb is no longer needed since freebsd-libs 10.0-4 + + -- A. Maitland Bottoms Thu, 10 Apr 2014 19:12:43 -0400 + +gnuradio (3.7.3-2) unstable; urgency=low + + * Update to v3.7.3-17-gc3ef245 + * Update Codec2 library + * Update Codec2 gnuradio blocks: Clayton Smith (argilo, VE3IRR) + + -- A. Maitland Bottoms Wed, 09 Apr 2014 00:28:09 -0400 + +gnuradio (3.7.3-1) unstable; urgency=low + + * New upstream release + + -- A. Maitland Bottoms Sun, 09 Mar 2014 20:55:45 -0400 + +gnuradio (3.7.2.2-1) unstable; urgency=low + + * New upstream bugfix release + + -- A. Maitland Bottoms Sat, 08 Mar 2014 23:29:48 -0500 + +gnuradio (3.7.2.1-5~bpo70+1) wheezy-backports; urgency=low + + * Rebuild for wheezy-backports. + + -- A. Maitland Bottoms Mon, 27 Jan 2014 23:14:55 -0500 + +gnuradio (3.7.2.1-5) unstable; urgency=low + + * use correct compiler for unstable build + + -- A. Maitland Bottoms Sun, 05 Jan 2014 12:14:43 -0500 + +gnuradio (3.7.2.1-4) unstable; urgency=low + + * Clarify gnuradio.install (Closes: #734207) + + -- A. Maitland Bottoms Sat, 04 Jan 2014 16:22:02 -0500 + +gnuradio (3.7.2.1-3) unstable; urgency=low + + * Remove Feature 606 patch, caused more problems rather than solved. + + -- A. Maitland Bottoms Thu, 02 Jan 2014 00:16:41 -0500 + +gnuradio (3.7.2.1-2) unstable; urgency=low + + * New upstream bugfix release + * New upstream release, see extended release notes in the gnuradio + package /usr/share/doc/gnuradio/ChangeLogV3_7_2 + and /usr/share/doc/gnuradio/ChangeLogV3_7_2_1 + * Avoid functions not in FreeBSD libusb (Closes: #729270) + * Implement Feature 606 + + -- A. Maitland Bottoms Thu, 26 Dec 2013 00:05:24 -0500 + +gnuradio (3.7.2.1-1) unstable; urgency=low + + * New upstream bugfix release + + -- A. Maitland Bottoms Fri, 06 Dec 2013 06:46:38 -0500 + +gnuradio (3.7.1.1-1) unstable; urgency=low + + * New upstream bugfix release + + -- A. Maitland Bottoms Sun, 10 Nov 2013 17:35:42 -0500 + +gnuradio (3.7.1-2) unstable; urgency=low + + * Match GNU Radio live distribution 2013-0926 + * Use libsndfile if available + + -- A. Maitland Bottoms Tue, 01 Oct 2013 18:36:54 -0400 + +gnuradio (3.7.1-1) unstable; urgency=low + + * New upstream release + Important new features + GRC Bus Ports (Nicholas McCarthy) + + Bus ports in the GNU Radio Companion (GRC) allow ganging block input + or output ports into a single port for display and connections. This + simplifies flowgraph entry when dealing with blocks that work with an + arbitrary number of streams. + + For further information, see: + + http://gnuradio.org/redmine/projects/gnuradio/wiki/Busports + + Minor features/updates (3.7.1): + atsc: created atsc_rx.py and removed obsolete scripts (Andrew Davis) + blocks: added interleaved_char_to_complex block (Tim O'Shea) + blocks: Added QA code for all ControlPort probe types. (Tom Rondeau) + blocks: adding a complex VCO block. (Tom Rondeau) + blocks: adding a tags strobing block to help test tag stream. (Tom Rondeau) + blocks: modified tag_debug block to publish number of tags queued + (Tom Rondeau) + build: Windows packages automatically include compiler runtime DLLs + (Nicholas Corgan) + build: installing all cmake files into lib/cmake/gnuradio directory + (Tom Rondeau) + channels: Added hardware impairments blocks from Matt Ettus' GRCon11 talk + (Tom Rondeau) + channels: added second channel model to dynamically change freq/timing + offsets. (Tom Rondeau) + channels: updated quantization demo for new histogram constructor + (Tom Rondeau) + channels: using new qtgui histogram sink in quantization demo. (Tom Rondeau) + digital: added lo_offset and external clock utilisation to OFDM (Mike Jameson) + digital: added lo_offset and external clock source to narrowband examples + (Mike Jameson) + digital: delay ofdm benchmark_tx exit to allow TX to empty (Mike Jameson) + filter: added optional second input that dynamically adjusts + resampling rate (Tom Rondeau) + grc: Sorts the block tree column at start-up. (Julien Olivain) + grc: Remove *out from sinks, *in from sources (Marcus Müller) + grc: allow set_min_output_buffer on any blocks that have output ports + (Tim O'Shea) + grc: added special variable objects to represent constellations (Tom Rondeau) + qtgui: Added histogram sink (Tom Rondeau) + runtime: added tag_propagation_policy_t to block_gateway (Marcus Müller) + runtime: Improved display handling for gr-ctrlport-monitor (Tim Newman) + runtime: Added probes for byte, short, and int data types (Tom Rondeau) + runtime: allow setting thread affinity to all blocks under a hier_block2 + (Tom Rondeau) + uhd: squashed per-channel stream support (Josh Blum) + + Bug Fixes (3.7.1, 3.7.0.1): + analog: agc3_cc: Fix uninitialized variable error. (Philip Balister) + analog: agc3_cc: bug fix for input values of zero (Tim O'Shea) + atsc: Fix bugs in atsc_field_sync_mux (Clayton Smith) + blocks: expose set_period callback for blocks.message_strobe in GRC + (Tim O'Shea) + blocks: moved type conversions to use Volk dispatchers. (Tom Rondeau) + blocks: set file_descriptor_source default to repeat=false (Tom Rondeau) + build: don't install controlport config file in two places (Tom Rondeau) + build: fix for finding and handling ICE 3.5 or 3.4 (Tom Rondeau) + build: fix to allow reconfiguring install prefix (Johnathan Corgan) + build: fixed some differences between handling Ice 3.4 and 3.5. (Tom Rondeau) + build: fixes FindQwt cmake module to check that Qwt is >= 5.2.0. (Tom Rondeau) + build: force detection to Python 2.x only (Julien Olivain) + build: more robust FindICE operation with multiple ICE installs (Tom Rondeau) + build: require Python v2 for build configuration (Jiri Pinkava) + digital: fix digital.cpmmod_bc XML for new constants location + (Johnathan Corgan) + digital: fix for OFDM serializer QA after FFT block fix (Johnathan Corgan) + digital: fix for moving average filter in OFDM equalizer. (Stefano Banti) + digital: ofdm benchmark_rx fft conflict fix (Mike Jameson) + docs: Fixes sphinx docs for user set LD_LIBRARY_PATH (Tom Rondeau) + docs: Minor corrections, fixes to ControlPort documentation. (Tom Rondeau) + docs: Updated and improved the message passing docs page. (Tom Rondeau) + docs: added doc page on Performance Counters. (Tom Rondeau) + docs: added documentation of the stream tags interface. (Tom Rondeau) + docs: added information about the new pfb_arb_resampler kernel. (Tom Rondeau) + examples: fix examples using 3.7 API without importing namespaces + (Nathan West) + fec: fix uninitialized class member in decode_ccsds_27 (Johnathan Corgan) + fft: Remove the default constructor for fft::goertzel. (Philip Balister) + fft: fix XML import for logpwrfft block (Andrej Lajovic) + fft: fix missing set_window call on initialization (Johnathan Corgan) + grc: added utf8 encoding line to python templates (Marcus Müller) + grc: applying hidapi update patch from Hans de Goede (Volker Schroer) + grc: fix to allow grcc to execute in headless mode (Roy Thompson) + grc: fixes grcc to exit with error in case of a compilation error. + (Julien Olivain) + modtool: fixes using templates in OOT projects created with modtool. + (Tom Rondeau) + modtool: more robust checks for gnuradio-runtime include dirs and libs. + (Tom Rondeau) + modtool: fix finding gnuradio-runtime (Jiri Pinkava) + modtool: fix detection of GNU Radio module directory (Jiri Pinkava) + qtgui: fix missing API declarations (Nicholas McCarthy) + qtgui: fixes some bugs between qwt 5 and 6, some reorg. (Tom Rondeau) + runtime: Fixed runtime SWIG linker error (Nicholas Corgan) + runtime: fix asynch messages delivery when handler not defined (Tim O'Shea) + runtime: fix hier_block2 disconnect_all() (Johnathan Corgan) + runtime: fixed copy/paste error in volk_types.py (Alexandru Csete) + runtime: vmcircbuf_sysv_shm workaround for shmem race condition (Tim O'Shea) + uhd: fix GRC wrapper generation to match UHD change (fixes #562) + (Timo Lindfors) + uhd: fix USRP config info strings to account for B2x0 (Nicholas Corgan) + volk: fix ARM test functions that resulted in an infinite loop (Tom Rondeau) + volk: fix xgetbv tests for OSX/gcc (Michael Dickens) + volk: fix QA test to use non-integer multiples of register sizes (Doug Geiger) + volk: fix Volk profiler to use non integer multiples of register sizes + (Doug Geiger) + wxgui: Prevent crash displaying a tooltip before initialization + (Miklos Maroti) + * Handle lack of freedesktop icon directories better (Closes: #720389) + + -- A. Maitland Bottoms Thu, 29 Aug 2013 23:25:22 -0400 + +gnuradio (3.7.0-5) unstable; urgency=low + + * Following zeroc-ice to unstable + + -- A. Maitland Bottoms Mon, 12 Aug 2013 22:32:03 -0400 + +gnuradio (3.7.0-4) experimental; urgency=low + + * Using zeroc-ice 3.5 in experimental + * fixup volk versioned depends + * Include upstream maint branch fixes - but not + Applying-hidapi-patch-from-Hans-de-Goede + - conflicts with Debian BSD kernel patches + * Debian uses default library locations, so NO_DEFAULT_PATH isn't good. + * version depends on libvolk (Closes: #705867, #718707) + + -- A. Maitland Bottoms Sun, 11 Aug 2013 18:11:24 -0400 + +gnuradio (3.7.0-3) experimental; urgency=low + + * Ship cmake files (Closes: #718310) + * Include upstream maint branch fixes + + -- A. Maitland Bottoms Tue, 30 Jul 2013 12:26:13 -0400 + +gnuradio (3.7.0-2) experimental; urgency=low + + * Update bsd-no-thread-affinity + * Add comma between arguments of atsc/xlate.py (Closes: #714987) + + -- A. Maitland Bottoms Fri, 05 Jul 2013 08:05:12 -0400 + +gnuradio (3.7.0-1) experimental; urgency=low + + * New upstream release + * In experimental until zeroc-ice 3.5 is available in unstable. + * Code Structure Changes (Johnathan Corgan, Tom Rondeau) + + The GNU Radio source code was restructured and flattened. All top-level + components now use the same structure for consistency and ease of + use. All blocks were moved out of gnuradio-core, which has been + renamed to gnuradio-runtime. The blocks are now in their appropriate + top-level components and reimplemented with the new 3.7 API style. The + new API makes use of C++ namespaces and the virtual private + implementation class pattern to better hide GNU Radio internals from + user code. + + Details about this can be found here: + http://gnuradio.org/redmine/projects/gnuradio/wiki/Move_3-6_to_3-7 + + A Google doc showing all items that were moved from one place to another + in the new style is here: http://ow.ly/mDpey + + Blocks not listed were already in their own components. Many blocks were + removed. All columns marked with ‘-----’ means that column is not + applicable to that block or class. Any column (except those marked as + Remove) that are blank means that we might be able to improve upon it, + which normally indicates using VOLK or improving documentation. + + A Google doc showing the new component and Doxygen categories for all + components is here: http://ow.ly/mDplO + + * Important new features: + * ControlPort (Tom Rondeau, Tim O’Shea) + + ControlPort is a new interface for standardizing remote procedure + calls in GNU Radio: + + Remote control and visualization. + Use of ControlPort to enable debugging without requiring extra debug + streams. + Abstracted interface, but currently using ICE (www.zeroc.com). + No additional CPU usage while no monitoring is occurring. + Can connect multiple remotes to same GNU Radio application. + Can also have single ControlPort app control multiple GR apps. + + Each block creates interfaces to control data members, by defining + ‘get’ and ‘set’ interface to query and update values of block + variables. Preference files control the state of ControlPort in + section [ControlPort] of gnuradio-runtime.conf. + + ControlPort comes with a generic utility to allow you to see all + interfaces of a flowgraph: + + gr-ctrlport-monitor -p + + Within a flowgraph, one can also use ControlPort probes to pass + vectors of data to a ControlPort client, including complex IQ + data. One useful probe calculates the power spectral density of a + block output for remote display. + + See the ControlPort page in the GNU Radio manual for more information: + + http://gnuradio.org/doc/doxygen/page_ctrlport.html + + * Performance Measurement Tools + + Performance Counters were first built into GNU Radio in 3.6.5, but could + only be accessed locally. Now, all Performance Counters can be + exported over ControlPort. + + Performance Counters must be compiled into GNU Radio using + -DENABLE_PERFORMANCE_COUNTERS=True. They can be toggled on/off at + runtime using the [PerfCounters] section in gnuradio-runtime.conf. Use + option ‘export’ to export Performance Counters over ControlPort. + + We now include a new tool to visualize the Performance Counters over + ControlPort. This is installed as gr-perf-monitorx and requires the + Python modules Scipy, NetworkX, and Matplotlib. Nodes of the flowgraph + are represented as blue squares. The size of the square is + proportional to the amount of time spent in the work function (either + thread time or monotonic (wall clock) time). The size and depth of the + shade of red of the edges is proportional to how full the block’s + output buffer is. + + * QTGUI Enhancements (Tom Rondeau, Nick Foster, Ben Reynwar) + + The QTGUI widgets defined in gr-qtgui have had a major overhaul in + 3.7. All plots are now split out into individual components, + including: + + Time plots (amplitude versus time) + FFT plots (or PSD) (log magnitude versus frequency) + Waterfall plots (or spectrograms) (time versus frequency with + magnitude as the color intensity) + Constellation plots (imaginary (quadrature) versus real (inphase)) + Time raster plots (time vs. time) + + Each plot can accept multiple connections that will overlay the + signals on them. Zooming and unzooming are the same using the left and + right mouse buttons. The center mouse button will pull up a context + menu to allow manipulations of all kinds of properties of the display, + such as line and marker styles, the size of the FFT, averaging, line + transparency, etc. Significant work has gone into improving the + performance, including the use of VOLK and more intelligent ways of + handling the display to reduce the computational load. + + QT defined QT Style Sheets (QSS) that allow us to specify looks, colors, + and other properties of a display. Support for the use of QSS has been + added to gr-qtgui to make establishing your preferences easier. + + gr-qtgui/examples contains a number of examples showing how to use each + type of plot and the QSS definition and interface. + + * Uninstalled imports (Ben Reynwar) + + The GNU Radio source tree was updated to allow us to directly import + all GNU Radio components in-tree before install but using the same + syntax. This change greatly reduces problems and complexity of writing + Python code for use in both normal installations and QA code. This + change will also allow us to automatically build the Sphinx Python + manual during make. + + * Updated gr_filter_design (Sreeraj Rajendran) + + Overhauled the current gr_filter_design to add better visualization + and interactive tools. Installed as part of the gr-filter component + now, the gr_filter_design tool adds many new features for visualizing + filters as well as support for IIR filter tap design. The new tool + also includes a programmatic API that allows a user to launch the + filter design tool inline in a program, design the new filter, and + pass back an object containing the filter taps and parameters. Passing + a callback function allows the designer to run in a separate thread + and every time a new filter is designed, the callback function can be + triggered to update a filter. + + Examples of using the programmatic access to gr_filter_design can be + found in gr-filter/examples/gr_filtdes_*. + + * Other New Components and Features + New blocks added + + gr::analog::fast_noise_source - pre-generates a table of random + samples from the selected PDF and randomly samples from them. This has + somewhat less entropy than the normal noise_source block but is + significantly faster. + + gr::analog::agc3_*: Performs an initial linear gain ramp to quickly + converge on a signal during startup and then falls back to an + iterative loop similar to agc2. + + The agc, agc2, and agc3 blocks have been made to use a unified + interface that now includes a default maximum gain value (set to 2^16 + so that it can scale up even the LSB of a USRP’s device). + + * New gr-fec component + + This new top-level component mainly functions as a placeholder for new + FEC block implementations. Currently contains only a couple of + purpose-built FEC blocks. + + * New gr-channels component (Tim O'Shea) + + This new top-level component holds current and future channel model + blocks. The standard AWGN channel_model has moved here. In addition, + there are two new channel models: + + fading_model - Uses configurable max Doppler shift, Rician power + factor, and lists of the delays (in samples) and magnitudes of a power + delay profile. + + selective_fading model - Basic fading model that can have a number + of sinusoids, max Doppler shift, and Rician power factor defined for + it. + + * GnuradioConfig.cmake (Tom Rondeau, Tim O’Shea) + + New GnuradioConfig.cmake and GnuradioConfigVersion.cmake cmake files are + installed into the system under $prefix/lib/cmake/gnuradio. These + files can be used by any other project to easily test if any GNU Radio + components are installed and the minimum API-compatible version + required. + + Set GR_REQUIRED_MODULES to any of the top-level components in GNU Radio + in all caps. Then use find_package(Gnuradio) to search for them. The + second optional argument is the API compatible version is was built + against. For example, to test if gnuradio-runtime, gnuradio-blocks, + and gnuradio-filter are installed, we would use: + + set(GR_REQUIRED_MODULES RUNTIME BLOCKS FILTER) + find_package(Gnuradio 3.7.0) + + * Additional Fixes (Ben Reynwar, Tom Rondeau, Josh Blum, Nicholas Corgan) + + Added symbol output stream from constellation_receiver so we can see + the locked constellation as well as the output bits. + + Introduced a new pfb_arb_resampler kernel class that can be used by + other blocks. We have used this to significantly simplify the + pfb_arb_resampler_ccf/fff blocks. + + All PFB code has new QA and fixed a few minor bugs in the + calculation of some of the filters. + + Added more QAM support with Gray coding. + + Reworked VOLK. All kernels are now in volk/kernels/volk, made all + kernels consistent in use of num_points, and redid any kernels that + used num_bytes. + + Removed assumptions that were Linux-only to continue to support + native MSVC builds. + + * Obsoleted and/or removed functionality + + The following items have been removed or redone: + + gr-shd (removed) + gruel (removed; all functionality now in gnuradio-runtime) + gr-howto-write-a-block (functionality replaced by gr_modtool) + + For more removed components, see: http://ow.ly/mDpey + + * Deprecated functionality + + These are items that are currently part of GNU Radio, but are planned + to be removed in the next API release (3.8). + + gr-noaa - will be reimplemented as a stand-alone, out-of-tree + project and supported with PyBOMBS + gr-pager - will be reimplemented as a stand-alone, out-of-tree + project and supported with PyBOMBS + + -- A. Maitland Bottoms Wed, 03 Jul 2013 17:00:23 -0400 + +gnuradio (3.6.5.1-1) unstable; urgency=low + + * New upstream release + * Bug fixes + audio: fix default alsa device from hw:0,0 to default, Bug #551 (Tim O'Shea) + blocks: fix big-endian issue in wavefile blocks (Jaroslav Škarvada) + blocks: fix erroneous linkage to gr-filter (#547) (Johnathan Corgan) + blocks: fix for ~file_source crash, Bug #550 (Tim O'Shea) + blocks: fix param test in keep_me_in_n GRC wrapper (Tim Monahan-Mitchell) + blocks: fix use of assertGreater in QA for older Python (Johnathan Corgan) + cmake: fix CRLF to LF in in some modules (fixes #549) (Johnathan Corgan) + cmake: make install directory of GNU Radio cmakes files configurable + (Jaroslav Škarvada) + core: ensure message passing blocks marked done are handled + (Johnathan Corgan) + core: fir_filter_with_buffer using consistent error margins in all + QA tests (Tom Rondeau) + core: fix vmcircbuf file read/compare to use strncmp instead of strcmp + (Tom Rondeau) + core: makes sure if capping to max_noutput_items with output_multiple + that the value is always an output_multiple. (Tom Rondeau) + core: making block_registry thread-safe for multiple flowgraphs to + access it (Tom Rondeau) + core: fix 2 threading issues with the shared memory system. (Tom Rondeau) + digital: a block should not hold a reference to itself (Josh Blum) + digital: bugfixes to ofdm_chanest, HPD and frame EQ (Martin Braun) + digital: hack to prevent the HPD from crashing flow graphs (Martin Braun) + digital: remove stray import from QA test (Johnathan Corgan) + grcc: set grc file path, which is required for hier blocks (Bastian Bloessl) + wavelet: fix for -lgslcblas getting stripped out of link flags (Tim O'Shea) + wavelet: do not use unsupported compile flags for OSX (Michael Dickens) + wxgui: Fixes to solve issues using GL sinks on OS X (Balint Seeber) + wxgui: fix exception in callback before label set (Marcus D. Leech) + wxgui: fix flickering on Linux created by bea6d506 (Sylvain Munaut) + + -- A. Maitland Bottoms Mon, 01 Jul 2013 06:51:25 -0400 + +gnuradio (3.7.0~rc0-1) experimental; urgency=low + + * New upstream release candidate + * This is a snapshot of the repository master branch at tag v3.7.0rc0, + and is intended for final testing by users. + + As this is not a formal release, it is not accompanied by release + notes. The full list of changes between the 3.6 and 3.7 APIs will be + made available at the time of 3.7.0 release. + + It does indicate, however, that the 3.7 API is now frozen and we will + only be merging bug fixes into the source code until the final + release. + + -- A. Maitland Bottoms Fri, 21 Jun 2013 09:51:22 -0400 + +gnuradio (3.6.5-1) unstable; urgency=low + + * New upstream release + * Important new features (3.6.5): + + New OFDM PHY layer (Martin Braun, Ben Reynwar) + This release includes new OFDM PHY layer blocks in gr-digital. These + have been rewritten from scratch to allow more configurability and to use + some of the newer GNU Radio features (stream tags, async messages). Some + work remains to tie these into a full over-the-air transceiver, so further + development will be happening in the GNU Radio 3.7.x release series. + + * New runtime logging capability (Tom Rondeau) + GNU Radio has a logging interface to enable various levels of logging + information to be printed to the console or a file. The logger derives + from log4cpp (http://log4cpp.sourceforge.net/) which is readily + available in most Linux distributions. This is an optional dependency + and GNU Radio will work without it. See: + http://gnuradio.org/cgit/gnuradio.git/tree/docs/doxygen/other/logger.dox + + * Minor features/changes (3.6.5): + build: git now ignores the build/ directory (Ben Hilburn) + build: create and install a config.h for external projects (Tom Rondeau) + build: install our cmake modules into share/gnuradio/cmake/Modules + (Tom Rondeau) + blocks: fixed udp_source to avoid permanent work blockage (Josh Blum) + blocks: added proper EOF for msg tags test (Josh Blum) + blocks: added gr::blocks::socket_pdu (Tim O'Shea) + blocks: added gr::blocks::taptun_pdu (Tim O'Shea) + blocks: added gr::blocks::pdu_to_tagged_stream (Tim O'Shea) + blocks: added gr::blocks::tagged_stream_to_pdu (Tim O'Shea) + blocks: added default arg value to mute_XX (Tim O'Shea) + blocks: added probe_rate block (Tim O'Shea) + blocks: fixed probe_signal_vx vector utilisation (Mike Jameson) + blocks: fixed XML data type in gr::blocks::deinterleave (Miklos Maroti) + docs: updated pfb introduction (Ben Reynwar) + digital: added option to QAM to help with frequency locking (Ben Reynwar) + digital: made qa_constellation_receiver more reliable (Ben Reynwar) + digital: added QAM32-like constellation (Ben Reynwar) + filter: added callback to adjust resampling rate of pfb_arb_resampler + block (Tom Rondeau) + filter: added fractional_resampler as a renamed + fractional_interpolator (Tom Rondeau) + grc: added sorting ability to GRC category tree (Gregory Warnes) + grc: made 'float' an acceptable alias to 'real' in parameter types + (Tom Rondeau) + modtool: added tagged_stream block as an option (Martin Braun) + modtool: fixed general python block template (Mike Jameson) + uhd: added a usrp PC sync option (Josh Blum) + uhd: added getters for bandwidth setting and range (Josh Blum) + uhd: updated usrp_spectrum_sense with frequency readout (Mike Jameson) + + -- A. Maitland Bottoms Mon, 27 May 2013 15:28:27 -0400 + +gnuradio (3.6.4.2-1) unstable; urgency=low + + * New upstream release + * Bug fixes: + docs: fixed QT docs keywords (Ben Reynwar) + blocks: fixed XML wrapper for gr::blocks::complex_to_real (Johnathan Corgan) + blocks: fixed file meta data source to handle repeat of files (Tom Rondeau) + blocks: fixed XML data type in gr::blocks::plateau_detector_fb + (Johnathan Corgan) + digital: fixed virtual destructor for constellation class (Tom Rondeau) + digital: fixed SNR estimators (Tom Rondeau) + filter: fixed pfb_arb_resampler XML for I/O types (Johnathan Corgan) + filter: fixed exception when using interpolating filter with no taps + (Tom Rondeau) + filter: fixed pfb_arb_resampler to handle default taps (None) case + (Tom Rondeau) + grc: fixed (removed) "c" key shortcut for create heir action (Tim O'Shea) + grc: fixed problem with order of message ports vs. data ports (Tom Rondeau) + runtime: fixed thread safety issue with tags and perf counters (Tim O'Shea) + runtime: fixed gr types for setting processor affinity (Tom Rondeau) + runtime: fixed swig issue with affinity mask vector (Tom Rondeau) + modtool: fixed gr-modtool template output signature (Johnathan Corgan) + modtool: fixed case when module name ends in 0 (Martin Braun) + modtool: fixed typo in help string (Tim Monahan-Mitchell) + modtool: fixed wording in modtool for 'float' sink/source type (Tom Rondeau) + modtool: fixed some setup for noblock gen (Tom Rondeau) + modtool: fixed initial templates of a block (Tom Rondeau) + pkg: fixed packages for Ubuntu 13.04 (Nicholas Corgan) + qtgui: fixed init FFT Size box for QTGUI sink (Tom Rondeau) + video-sdl: fixed typo in .pc file (Johnathan Corgan) + volk: fixed CentOS build failure with extra lib64 in path (Johnathan Corgan) + wxgui: fixed GL sinks issues on OS X (Balint Seeber) + wxgui: fixed set_callback failure in nongl sinks (Marcus Leech) + wxgui: fixed scaling issue of nongl FFT plot (issue #523) (Tom Rondeau) + + -- A. Maitland Bottoms Mon, 27 May 2013 00:28:52 -0400 + +gnuradio (3.6.4.1-1) unstable; urgency=low + + * New upstream release + * Bug fixes: + core: fixed filename path operator (Tim O'Shea) + core: fixed async message queue max length (Tom Rondeau) + docs: fixed missing gr-uhd to sphinx docs. (Ben Reynwar) + docs: fixed a section name collision (Tom Rondeau) + modtool: fixed Python general blocks syntax (Martin Braun) + modtool: fixed general python block template (Mike Jameson) + modtool: fixed extra comma bug in gr_modtool Python (Tom Rondeau) + volk: fixed MSVC include directory (Nicholas Corgan) + + -- A. Maitland Bottoms Tue, 19 Mar 2013 17:12:54 -0400 + +gnuradio (3.6.4-1) unstable; urgency=low + + * Include arm build fix from Peter Michael Green (Closes: #682595) + * Include debian/watch file by Bart Martens + * postinst, do not specify --theme for xdg-icon-resource (Closes: #673597) + * gnuradio-dev depends on same version of gnuradio (Closes: #678919) + * fix debian/control format (Closes: #689357) + * New upstream release + http://gnuradio.org/redmine/projects/gnuradio/wiki/ChangeLogV3_6_4 + + Ability to set processor affinity for GNU Radio blocks + http://www.trondeau.com/home/2013/2/7/block-core-affinity.html + + Inclusion of gr_modtool by Martin Braun + http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModules + + Use of GNU Radio preferences in native C++ applications + http://gnuradio.org/cgit/gnuradio.git/commit/?id=3643a858 + + Addition of GNU Radio block performance counters + http://gnuradio.org/redmine/projects/gnuradio/wiki/PerformanceCounters + + -- A. Maitland Bottoms Tue, 26 Feb 2013 21:44:34 -0500 + +gnuradio (3.6.3.1-1) experimental; urgency=low + + * New upstream bugfix release + analog: fixed floating point accuracy issue in CTCSS squelch (Tom Rondeau) + blocks: fixed use of bare boost::mutex::scoped_lock (Johnathan Corgan) + blocks: fixed missing include in file_source_impl (Josh Blum) + cmake: fixed chrono as a necessary Boost library under MSVC (Nicholas Corgan) + cmake: allow user to override check for bad versions of boost (Tom Rondeau) + cmake: disable certain buggy Boost versions to fix Issue #513. (Tom Rondeau) + cmake: fixing generated includes, deps, and header installation. + core: fixed gr_pdu_to_tagged_stream XML for type (Johnathan Corgan) + core: fixed gr_message_debug for printing PDUs (Johnathan Corgan) + core: fixed missing include in gr_socket_pdu (Josh Blum) + core: fixed missing include for gruel thread (Josh Blum) + core: fixed redundant test settings (Josh Blum) + core: fixed gr_random_pdu MSVC incompatibility issue (Nicholas Corgan) + core: fixed missing include to gr_block_registry.h (Tim O'Shea) + digital: fixed bug in digital_bert_rx.py (Ben Reynwar)(thanks Charles Ru) + digital: fixed pfb_clock_sync grc xml file for loop bandwidth (Ben Reynwar) + filter: fixed synthesis filter output rate (Tom Rondeau) + grc: fixed failing drag-n-drop in GRC on Windows (Balint Seeber) + grc: fixed Bug #485 by gracefully exiting (Martin Braun) + howto: fixed block parameters documentation (Julien Olivain) + uhd: fixed gain defaults in usrp_wfm_rcv*.py examples (Mike Jameson) + uhd: fixed default midpoint gain for usrp_am_mw_rcv.py example (Mike Jameson) + uhd: fixed usrp_nbfm_ptt.py example receive path (Mike Jameson) + uhd: fixed audio_alsa_sink busy using default in examples (Mike Jameson) + volk: fixed bad find_package missing components (Josh Blum) + volk: fixed cmake, the profiler is no longer strictly unix (Josh Blum) + volk: fixed volk_profile MSVC incompatibility (Nicholas Corgan) + + -- A. Maitland Bottoms Tue, 26 Feb 2013 20:14:48 -0500 + +gnuradio (3.6.3-2) experimental; urgency=low + + * postinst, do not specify --theme gnome for xdg-icon-resource (673597) + * gnuradio-dev depends on same version of gnuradio (678919) + * Debian build uses generic arm, not v7 (682595) + * fix debian/control format (689357) + * build with portaudio19-dev and libjack-jackd2-dev + (in addition to pulseaudio and alsa) + + -- A. Maitland Bottoms Sun, 10 Feb 2013 10:37:05 -0500 + +gnuradio (3.7git-1) experimental; urgency=low + + * New upstream next git branch ba015f + * Build with ZeroC's Ice, the Internet Communications Engine + * new components gr-channels, gr-ctrlport, gr-fec + * new executables: + gr_constellation_plot + gr_psd_plot_[bcfis] + gr_spectrogram_plot_[bcfis] + gr_time_plot_[bcfis] + + -- A. Maitland Bottoms Mon, 04 Feb 2013 12:15:28 -0500 + +gnuradio (3.6.3-1) experimental; urgency=low + + * New upstream release + Bug fixes: + Overhaul of cmake include directory ordering (Michael Dickens) + Fixed use of default noise seed in channel model (Alick Zhao) + Fixed file_meta_source/sink incompatibilities with MSVC (Nicholas Corgan) + Fixed some unused parameter warnings (Alexandru Csete) + + -- A. Maitland Bottoms Mon, 28 Jan 2013 00:10:46 -0500 + +gnuradio (3.6.3~rc0-1) experimental; urgency=low + + * New upstream release + * Addition/upgrade of message passing infrastructure (Tim O'Shea, Tom + Rondeau, Johnathan Corgan, Josh Blum) + + This introduces the ability to add and connect formally defined + asychronous message ports to signal processing blocks and + hierarchical blocks. These message ports can be connected to pass + asynchronous data in the form of PMTs (polymorphic types) among + blocks in a flowgraph. It is also possible to implement pure + message passing blocks that have no requirement for streaming + ports or work functions. + + We've also introduced the concept of PDUs (Protocol Data Units) as + a convention for passing data+metadata using the new messaging + ports. A PDU is a PMT pair that combines a PMT dictionary of + metadata keys/values along with a PMT blob to hold a vector of + data in memory. + + A few new general purpose blocks supporting these capabilties are + in gnuradio-core: + + gr_message_debug + gr_message_strobe + gr_tagged_stream_to_pdu + gr_pdu_to_tagged_stream + + Two new blocks for interfacing with networking stacks using the + new PDU semantics: + + gr_socket_pdu + gr_tuntap_pdu + + This new message passing capability and PDU convention is aimed at + providing the infrastructure to better support software radio + implementations using packet-oriented semantics, such as MAC-layer + processing. + + * Addition of new Python-based signal processing blocks (Josh Blum) + + This feature, originally introduced by Josh Blum as part of + GrExtras, allows implementing signal processing blocks directly in + Python, and has now become a standard feature of GNU Radio. + + * Addition of gr-analog top-level component (Tom Rondeau) + + This implements the current gnuradio-core signal processing blocks + used for analog signal processing into their own top-level + component, gr-analog, and uses the new 3.7 API organization. The + original blocks in gnuradio-core will be removed on the 3.7 branch + prior to 3.7 release. + + * Addition of gr-blocks top-level component (Johnathan Corgan) + + This implements a large portion of the gnuradio-core non-signal + processing blocks in the 3.7 API form. The original blocks in + gnuradio-core will be removed on the 3.7 branch prior to 3.7 + release. + + * Metadata file source and sink blocks (Tom Rondeau) + + Two new blocks implement enhanced file source and sink blocks that + incorporate metadata passed using the stream tags feature in GNU + Radio. It is now possible to store things like frequency and + sample rate into capture files, or whatever key/value pairs you + tag onto data streams inside a flowgraph. + + http://www.trondeau.com/home/2012/12/15/metadata-file-format.html + + * GNU Radio buffer latency control (Tim O'Shea, Tom Rondeau) + + For finer-grained control over latency inside a GNU Radio + flowgraph, it is now possible to adjust, on a per-block basis, the + maximum noutput_items that will be used to call a block work + function. In addition, it is possible to set the maximum size an + output buffer can grow to before a work function is called. + + * New GNU Radio Companion (GRC) capabilities + + Added optional flag to pad source and sink (Josh Blum) + Added wildcard type to pad source and sink (Josh Blum) + Added ability to reload XML for block (Tim O'Shea) + Added ability to automatically create hier_blocks + from a flowgraph (Tim Newman) + Added ability to open custom GRC hier block definitions (Tim O'Shea) + Added new grcc command line GRC-to-Python utility (Tom Rondeau) + + * New Documentation Updates (Tom Rondeau) + + We are introducing documentation into the Doxygen manual + describing features and capabilities of GNU Radio, above and + beyond just documenting the API functions. Tom Rondeau has + written about this here: + + http://www.trondeau.com/home/2012/12/18/new-documentation-for-new-features.html + + Some examples of commits where this has been done: + + gnuradio.org/cgit/gnuradio.git/commit/?id=77ea309 (PMT type usage) + gnuradio.org/cgit/gnuradio.git/commit/?id=a21c5f7 (Message passing interface) + gnuradio.org/cgit/gnuradio.git/commit/?id=996e599 (Metatdata format) + gnuradio.org/cgit/gnuradio.git/commit/?id=5fcb7eb (Max output buffer control) + + * Other new features: + + Allow file source to open new files while running (Brett L. Trotter) + Allow source blocks to return none/yield (Josh Blum) + Improved capabilities of uhd_fft.grc example in gr-uhd (Ben Hilburn) + Added parameter in qtgui sink's GRC block + to set the update rate (Julien Olivain) + Added source block hook in gr-uhd for issue stream cmd (Josh Blum) + Added cmake package support for Ubuntu 12.10 (Nicholas Corgan) + Added gr::blocks::patterned_interleaver (Tim O'Shea) + Allow user to set Python path during cmake configuration (Tom Rondeau) + Enabled serialize/deserialize for PMT vectors (Tom Rondeau) + Added unsigned long long int support to the PMT sugar functions (Tom Rondeau) + Allow using pmt_init_Xvector methods in python (Tom Rondeau) + Bug fixes: + + * Numerous cmake related bug-fixes (Josh Blum, Johnathan Corgan, Tom Rondeau) + Fixed parallel build failures in cmake (Tom Rondeau) + Fixed segfaults due to old, no longer nedded SWIG workaround (Tom Rondeau) + Fixed memory leak issue in arbitrary resampler blocks (Tom ROndeau) + Fixed use of default noise seed in channel model (Alick Zhao) + Fixed scaling bug in QAM constellations (Ben Reynwar) + Fixed installation of grc examples (Johnathan Corgan) + Fixed finding Qwt6 installed on OSX using MacPorts (Ben Reynwar) + Fixed implicit assumption in skiphead (Josh Blum) + Fixed include tag include usage throughout core (Josh Blum) + Fixed incorrect private usage in gr_endian_swap (Josh Blum) + Fixed segfault in gr-filter due to memory free bug (Josh Blum) + Fixed UHD pmt tuple ref namespace issue (Josh Blum) + Fixed gr_tag_debug to handle lacking srcid (Martin Braun) + Fixed gr-analog for 'sincos(f)' on MacOSX (Michael Dickens) + Fixed gr-analog build issues on Windows (Nicholas Corgan) + Fixed qtgui time sink to take the bandwidth parameter + to set x-axis correctly (Tom Rondeau) + Fixed float-in, complex-out fft block to use the right io sig (Tom Rondeau) + Fixed Clang imcompatibility by removing '.version' lines + in ASM code in core (Tom Rondeau) + + * Contributors this release: + + Alick Zhao + Ben Hilburn + Ben Reynwar + Brett L. Trotter + Johnathan Corgan + Josh Blum + Julien Olivain + Martin Braun + Michael Dickens + Nicholas Corgan + Tim O'Shea + Tim Newman + Tom Rondeau + + -- A. Maitland Bottoms Wed, 26 Dec 2012 18:56:06 -0500 + +gnuradio (3.6.2-1) experimental; urgency=low + + * New upstream release + * Build system changes + + Added support for setting SYSCONFDIR + + * Top-level component changes + + A new top-level component, gr-filter, has been created. This component + implements all the filter-related functionality that is in + gnuradio-core, and uses the new style 3.7 API. The filter blocks in + gnuradio-core are now deprecated; but will remain in gnuradio-core + until the 3.7 release. Developers are encouraged to begin using the + new blocks in preparation. + + * New signal processing blocks + + gr_and_const_bb: adds bb type to gr_and_const* block + gr_annotator_raw: allows tagging stream with pmt key, value pair from + outside GNU Radio + gr_endian_swap: change item endianness through block + gr_message_burst_source: turn received messages into a stream and tag them + gr_tag_debug: debug display of all tags going through block` + digital_gfsk_demod, digital_gfsk_mod: Gaussian Frequency Shift Keying + modulator and demodulator + + * New feature additions + + Support has now been added for ARM processors that do not implement + NEON. gr-uhd has added rx tagging for changes in sample rate and + center frequency. + Added support for serializing pmt tuples + Added BER/SNR simulation example + Removed gruel dependency on inet.h + + * Bug fixes + + core: fix minor bug in gri_wavefile endian swapping + core: only check for *.conf in preferences directory + digital: fixed incorrect variable name in qam_demod XML + digital: fix FLL block to use fir_filter + digital: remove unused parameter from DPSK demod GRC block + digital: fix use of Gray code in digital mod/demod GRC files + fcd: fix copy and paste error in documentation + uhd: fix stopping flowgraph while streaming + volk: don't initialize zero phase in rotator kernel + volk: don't use ORC for volk_16u_byteswap_u kernel + volk: add missing AVX support in volk_32f_x2_dot_prod_32f kernels + volk: fix __m128 cast in volk_32fc_x2_dot_prod_32fc_a kernel + volk: fix volk_32f_x2_dot_prod_32f_u_sse tail case + volk: use loadu for unaligned volk_32f_x2_dot_prod_32f_u_sse* + volk: fix for win64 MSVC not having MMX support + volk: special werror unused cmd line arg for clang + + * Contributors + + Ben Reynwar + Chí-Thanh Christopher Nguyễn + Hendrik van Wyk + Jaroslav Skarvada + Johnathan Corgan + Josh Blum + Martin Braun + Nicholas Corgan + Nick Foster + Tim O'Shea + Tom Rondeau + Wayne Roberts + + -- A. Maitland Bottoms Wed, 05 Sep 2012 23:56:07 -0400 + +gnuradio (3.6.1-1) unstable; urgency=low + + * New upstream release + http://gnuradio.org/redmine/projects/gnuradio/wiki/ChangeLogV3_6_1 + * With Sphinx Python documentation + * new gr-fft component, more gr-digital component features + * Supports click-to-tune operation via GRC FFT display + + -- A. Maitland Bottoms Mon, 11 Jun 2012 13:34:12 -0400 + +gnuradio (3.6.0-1) unstable; urgency=low + + * New upstream release + - gr-wavelet component enabled + - Python and grc examples in /usr/share/gnuradio/examples + - Python applications have .py extension removed (Closes: #671825) + * Debian package installs c++ examples in /usr/bin + * More robust postinst (Closes: #672102) + + -- A. Maitland Bottoms Wed, 9 May 2012 23:51:05 -0400 + +gnuradio (3.5.3.2-1) unstable; urgency=low + + * New upstream release + + -- A. Maitland Bottoms Sun, 22 Apr 2012 11:19:14 -0400 + +gnuradio (3.5.3.1-1) unstable; urgency=low + + * New upstream release + Fixed segfault in PMT library + Fixed QA for constellation to always reset the seed for deterministic tests + Updated volk AVX tests to workaround buggy Xen hypervisors + * gnuradio-dev ships .pc files. (Closes: #669117) + + -- A. Maitland Bottoms Wed, 18 Apr 2012 12:21:17 -0400 + +gnuradio (3.5.3-3) unstable; urgency=low + + * kfreebsd patches + + -- A. Maitland Bottoms Sat, 14 Apr 2012 00:27:43 -0400 + +gnuradio (3.5.3-2) unstable; urgency=low + + * build depend on libusb-1.0-0-dev [linux-any], libusb2-dev [kfreebsd-any] + (Closes: #668471) + + -- A. Maitland Bottoms Thu, 12 Apr 2012 00:58:50 -0400 + +gnuradio (3.5.3-1) unstable; urgency=low + + * New upstream release + * with Support for FunCube Dongle (gr-fcd) (Closes: #660570) + * gnuradio now depends upon python-lxml python-wxgtk2.8 + to make gnuradio-companion work well. (Closes: #664607, #664608) + + -- A. Maitland Bottoms Mon, 09 Apr 2012 01:08:06 -0400 + +gnuradio (3.5.2.1-1) unstable; urgency=low + + * New upstream release. + + -- A. Maitland Bottoms Fri, 16 Mar 2012 20:30:18 -0400 + +gnuradio (3.5.1-1) unstable; urgency=low + + * new upstream version, re-packaged from scratch with modern tools + closes: #642716, #645332, #394849, #616832, #590048, #642580, + #647018, #557050, #559640, #631863 + * CMake build + + -- A. Maitland Bottoms Sun, 26 Feb 2012 21:26:16 -0500 + +gnuradio (3.4.1-1) unstable; urgency=low + + * New upstream release + * comedi: fix to use comedi 0.8 API + * support for the Ettus UHD interface + * deprecating libusrp and libusrp2 + + -- A. Maitland Bottoms Wed, 28 Sep 2011 02:13:45 -0000 + +gnuradio (3.3.0.dfsg-1) UNRELEASED; urgency=low + + * new upstream version + * add Vcs entries to the control file + * use maintainer-clean target, always run bootstrap before configure + * switch from using python-central to dh_python2 + * switch to doxygen-latex as a build dep, closes: #616252 + + -- Bdale Garbee Fri, 04 Mar 2011 08:33:04 -0700 + +gnuradio (3.2.2.dfsg-2) unstable; urgency=low + + * fix typos in short package descriptions, closes: #556572 + * resolve gnuradio-companion conflict with grc by renaming our binary, + closes: #557050 + * accept patches that remove moc files and make libusrp packages depend + on adduser, closes: #566564, #566565, #574209, #574231, #574209 + * stop delivering custom prefs.py, closes: #559640 + * lose the conflicts on python-wxgtk2.6, closes: #582486 + + -- Bdale Garbee Tue, 08 Jun 2010 20:05:02 -0600 + +gnuradio (3.2.2.dfsg-1) unstable; urgency=low + + * new upstream version, includes gcc4.3 support, closes: #474801, #524387 + * upstream tarball modified to elide unnecessary Altera-licensed files + * merge debian/ content restructuring from upstream svn + * change build-dep from fftw3-dev to libfftw3-dev, closes: #458231 + * fix problem with rebuilding, closes: #441739 + * no longer need to move to contrib now that sdcc is fully back in main, + we just need to build depend on sdcc 2.9.0 or later, closes: #457402 + * rebuild reflects python-central file location change, closes: #490513 + * change Jack build depend to libjack-dev, closes: #527413 + + -- Bdale Garbee Sun, 01 Nov 2009 15:13:54 -0700 + +gnuradio (3.0.4-2) unstable; urgency=high + + * rebuild with new version number and upload to finally (?) recover from + over-zealous removal in response to bug 453154 + * recommend udev instead of hotplug, closes: #448907 + + -- Bdale Garbee Sun, 23 Dec 2007 12:11:49 -0700 + +gnuradio (3.0.4-1) unstable; urgency=low + + * new upstream version + * fix build failure with gcc-4.3 by adding a #include, closes: #420896 + + -- Bdale Garbee Tue, 14 Aug 2007 22:38:32 -0600 + +gnuradio (3.0.3-1) unstable; urgency=low + + * new upstream version + * tweak gnuradio-doc package to eliminate spurious subdirectory level + * add a usrp-doc binary package, recommended by the usrp package, and + include xmlto in build dependencies so usrp_guide.html gets generated, + closes: #407368 + + -- Bdale Garbee Sun, 11 Mar 2007 23:55:32 -0600 + +gnuradio (3.0.2-2) unstable; urgency=high + + * add run-time dependency on python-wxgtk2.6. leaving urgency high since + this would be a silly bug to release etch with if we can avoid it. + + -- Bdale Garbee Mon, 4 Dec 2006 15:35:53 -0700 + +gnuradio (3.0.2-1) unstable; urgency=high + + * new upstream version, fixes FTBFS issues + + -- Bdale Garbee Sun, 12 Nov 2006 14:52:33 -0800 + +gnuradio (3.0-3) unstable; urgency=high + + * put python-all-dev back in the build-depends list, closes: #398246 + * move gr-wxgui conflicts/depends to python-gnuradio, closes: #396302 + * fix up sections in control to match overrides + + -- Bdale Garbee Sun, 12 Nov 2006 10:59:58 -0800 + +gnuradio (3.0-2) unstable; urgency=high + + * reworked package dependencies so that the 'gnuradio' binary package no + longer depends on the pieces in contrib. instead, the 'usrp' binary + package in contrib now depends on all the USRP-related pieces. A user + who doesn't have a USRP board can just install 'gnuradio' and get all + the relevant pieces, a USRP user needs to install both 'gnuradio' and + 'usrp'. Closes: #394533 + * improve consistency of references to 'GNU Radio' as upstream project name + * make the gnuradio package dependencies on python-gnuradio and python-usrp + be version specific on suggestion from Ramakrishnan Muthukrishnan + + -- Bdale Garbee Fri, 10 Nov 2006 00:39:38 -0800 + +gnuradio (3.0-1) unstable; urgency=low + + * new maintainer, new upstream version + * Restructuring source and binary packages to follow upstream changes, more + or less repackaging from scratch taking ideas from the previous packaging + by Ramakrishnan Muthukrishnan and Steinar H. Gunderson. This single + source package replaces all of: + gnuradio-core + gnuradio-examples + gr-audio-alsa + gr-audio-jack + gr-audio-oss + gr-usrp + gr-wxgui + usrp + In addition, the 'gnuradio' binary package is a new meta-package that + conveniently depends on everything gnuradio related to ease installation. + + -- Bdale Garbee Sun, 8 Oct 2006 13:28:21 -0600 diff --git a/.packaging/debian/compat b/.packaging/debian/compat new file mode 100644 index 00000000000..48082f72f08 --- /dev/null +++ b/.packaging/debian/compat @@ -0,0 +1 @@ +12 diff --git a/.packaging/debian/control b/.packaging/debian/control new file mode 100644 index 00000000000..f9285f1bfd2 --- /dev/null +++ b/.packaging/debian/control @@ -0,0 +1,380 @@ +Source: gnuradio +Section: comm +Priority: optional +Maintainer: A. Maitland Bottoms +Build-Depends: cmake, + debhelper (>= 12~), + dh-python, + doxygen, + gir1.2-gtk-3.0, + gir1.2-pango-1.0, + graphviz, + libasound2-dev, + libboost-date-time-dev, + libboost-dev, + libboost-filesystem-dev, + libboost-program-options-dev, + libboost-regex-dev, + libboost-system-dev, + libboost-test-dev, + libboost-thread-dev, + libcodec2-dev (>=0.8), + libfftw3-dev, + libfontconfig1-dev, + libgmp-dev, + libgsl-dev (>= 2.0), + libgsm1-dev, + libjack-jackd2-dev, + liblog4cpp5-dev, + liborc-0.4-dev, + libpangocairo-1.0-0, + libportaudio2, + libpulse-dev, + libqwt-qt5-dev, + libsdl1.2-dev, + libsndfile1-dev, + libthrift-dev [amd64 arm64 armel armhf i386], + libuhd-dev (>=3.13.1) [!hurd-i386], + libusb-1.0-0-dev [!kfreebsd-any], + libusb2-dev [kfreebsd-any], + libvolk2-dev, + libxi-dev, + libxrender-dev, + libzmq3-dev [!hurd-i386] | libzmq-dev [!hurd-i386], + pkg-config, + portaudio19-dev, + pybind11-dev (>=2.4.3), + python3-click, + python3-click-plugins, + python3-dev, + python3-gi, + python3-gi-cairo, + python3-lxml, + python3-mako, + python3-numpy, + python3-opengl, + python3-pyqt5 [!hurd-i386], + python3-scipy, + python3-yaml, + python3-zmq [!hurd-i386], + qt5-qmake, + qtbase5-dev, + qttools5-dev, + thrift-compiler [amd64 arm64 armel armhf i386], + xmlto +Standards-Version: 4.4.0 +Homepage: http://gnuradio.org/ +Vcs-Browser: https://github.com/gnuradio/pkg-gnuradio +Vcs-Git: https://github.com/gnuradio/pkg-gnuradio.git + +Package: gnuradio +Architecture: any +Depends: libcanberra-gtk-module, + libcanberra-gtk3-module, + libvolk2-bin, + python3-click, + python3-click-plugins, + python3-gi, + python3-gi-cairo, + python3-lxml, + python3-mako, + python3-numpy, + python3-opengl, + python3-pyqt5 [!hurd-i386], + python3-pyqtgraph, + python3-sip, + python3-yaml, + python3-zmq [!hurd-i386], + ${misc:Depends}, + ${python3:Depends}, + ${shlibs:Depends} +Recommends: gnuradio-dev, + python3-matplotlib, + python3-networkx, + python3-qwt-qt5, + python3-scipy, + rtl-sdr, + uhd-host +Suggests: gr-fosphor, gr-osmosdr +Multi-Arch: foreign +Description: GNU Radio Software Radio Toolkit + GNU Radio provides signal processing blocks to implement software + radios. It can be used with readily-available low-cost external RF + hardware to create software-defined radios, or without hardware in a + simulation-like environment. It is widely used in hobbyist, academic + and commercial environments to support both wireless communications + research and real-world radio systems. + . + GNU Radio applications are primarily written using the Python + programming language, while the supplied performance-critical signal + processing path is implemented in C++ using processor floating-point + extensions, where available. Thus, the developer is able to implement + real-time, high-throughput radio systems in a simple-to-use, + rapid-application-development environment. + . + While not primarily a simulation tool, GNU Radio does support + development of signal processing algorithms using pre-recorded or + generated data, avoiding the need for actual RF hardware. + . + This package contains the gnuradio-companion, a graphical tool for + creating signal flow graphs and generating flow-graph source code. + Also included are a variety of tools and utility programs. + +Package: gnuradio-doc +Section: doc +Architecture: all +Depends: ${misc:Depends} +Multi-Arch: foreign +Description: GNU Software Defined Radio toolkit documentation + Documentation for the GNU Radio software defined radio system + in html and xml form. + . + Part of the main gnuradio build. + +Package: gnuradio-dev +Section: libdevel +Architecture: any +Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same +Depends: gnuradio (= ${binary:Version}), + libboost-date-time-dev, + libboost-filesystem-dev, + libboost-program-options-dev, + libboost-regex-dev, + libboost-system-dev, + libboost-test-dev, + libboost-thread-dev, + libfftw3-dev, + libgmp-dev, + libgsm1-dev, + liblog4cpp5-dev, + libvolk2-dev, + python3-dev, + ${misc:Depends} +Suggests: cmake, qtbase5-dev, libqwt-qt5-dev, pkg-config, pybind11-dev +Description: GNU Software Defined Radio toolkit development + Header files for the GNU Radio software defined radio system. + Since GNU Radio is a framework for development of SDR + applications, you are likely to need this installed. + . + Part of the main gnuradio build. + +# Package: libgnuradio-analog +# Section: libs +# Architecture: any +# Pre-Depends: ${misc:Pre-Depends} +# Depends: ${misc:Depends}, ${shlibs:Depends} +# Multi-Arch: same +# Description: gnuradio analog functions +# Library for handling analog signal processing functions. +# These functions are also in gnuradio-core. +# Part of the main gnuradio build. + +# Package: libgnuradio-audio +# Section: libs +# Architecture: any +# Pre-Depends: ${misc:Pre-Depends} +# Depends: ${misc:Depends}, ${shlibs:Depends} +# Multi-Arch: same +# Description: gnuradio audio functions +# This is the gr-audio library, used to connect to audio sources +# (mic-in) and sinks (speaker-out) ports on a computer. The underlying +# hardware driver is system and OS dependent and this module should +# automatically discover the correct one to use. Part of the main +# gnuradio build. + +# Package: libgnuradio-blocks +# Section: libs +# Architecture: any +# Pre-Depends: ${misc:Pre-Depends} +# Depends: ${misc:Depends}, ${shlibs:Depends} +# Multi-Arch: same +# Description: gnuradio blocks functions +# Some non-signal processing blocks. +# These functions are also in gnuradio-core. +# Part of the main gnuradio build. + +# Package: libgnuradio-channels +# Section: libs +# Architecture: any +# Pre-Depends: ${misc:Pre-Depends} +# Depends: ${misc:Depends}, ${shlibs:Depends} +# Multi-Arch: same +# Description: gnuradio channels functions +# Some channel oriented processing blocks. +# These functions are also in gnuradio-core. +# Part of the main gnuradio build. + +# Package: libgnuradio-digital +# Section: libs +# Architecture: any +# Pre-Depends: ${misc:Pre-Depends} +# Depends: ${misc:Depends}, ${shlibs:Depends} +# Multi-Arch: same +# Description: gnuradio digital communications functions +# All the functions for doing digital modulation and demodulation, +# including bpsk, qpsk, gmsk and ofdm signals. +# Part of the main gnuradio build. + +# Package: libgnuradio-dtv +# Section: libs +# Architecture: any +# Pre-Depends: ${misc:Pre-Depends} +# Depends: ${misc:Depends}, ${shlibs:Depends} +# Multi-Arch: same +# Description: gnuradio digital TV signal processing blocks +# ATSC support, gr-atsc ported to a new framework, as well as +# DVB-S2, DVB-T, DVB-T2 digital video broadcast standards. +# Part of the main gnuradio build. + +# Package: libgnuradio-fec +# Section: libs +# Architecture: any +# Pre-Depends: ${misc:Pre-Depends} +# Depends: ${misc:Depends}, ${shlibs:Depends} +# Multi-Arch: same +# Description: gnuradio forward error correction support +# Handle forward error correction processing in gnuradio. +# Implements the GNU Radio FEC API, supporting encoders and +# decoders for no-op dummmy, repetition, and convolutional classes. +# Part of the main gnuradio build. + +# Package: libgnuradio-fft +# Section: libs +# Architecture: any +# Pre-Depends: ${misc:Pre-Depends} +# Depends: ${misc:Depends}, ${shlibs:Depends} +# Multi-Arch: same +# Description: gnuradio fast Fourier transform functions +# Library for Fourier transform techniques used in gnuradio. +# Uses single precision FFT from libfftw3-single3. +# Part of the main gnuradio build. + +# Package: libgnuradio-filter +# Section: libs +# Architecture: any +# Pre-Depends: ${misc:Pre-Depends} +# Depends: ${misc:Depends}, ${shlibs:Depends} +# Multi-Arch: same +# Description: gnuradio filter functions +# Library of filter blocks used in gnuradio. Implements +# FIR, IIR and FFT filters, as well as Polyphase filterbank and +# PFB arbitrary resampler methods. +# Part of the main gnuradio build. + +# Package: libgnuradio-network +# Section: libs +# Architecture: any +# Pre-Depends: ${misc:Pre-Depends} +# Depends: ${misc:Depends}, ${shlibs:Depends} +# Multi-Arch: same +# Description: gnuradio network transport functions +# Library for network transport, TCP, UDP functions. + +# Package: libgnuradio-pmt +# Section: libs +# Architecture: any +# Pre-Depends: ${misc:Pre-Depends} +# Depends: ${misc:Depends}, ${shlibs:Depends} +# Multi-Arch: same +# Description: gnuradio pmt container library +# Polymorphic Types are opaque data types that are designed as generic +# containers of data that can be safely passed around between blocks +# and threads in GNU Radio. +# Part of the main gnuradio build. + +# Package: libgnuradio-qtgui +# Section: libs +# Architecture: kfreebsd-any linux-any +# Pre-Depends: ${misc:Pre-Depends} +# Depends: ${misc:Depends}, ${shlibs:Depends} +# Multi-Arch: same +# Description: gnuradio Qt graphical user interface functions +# QT-based graphical sinks for gnuradio applications. +# Implements opengl, raster and native plotting methods, and +# supports a QT Style Sheet (QSS) file to adjust the look. +# Part of the main gnuradio build. + +# Package: libgnuradio-runtime +# Section: libs +# Architecture: any +# Pre-Depends: ${misc:Pre-Depends} +# Depends: ${misc:Depends}, ${shlibs:Depends} +# Multi-Arch: same +# Description: gnuradio core runtime +# Top level component library. Defines core blocks. Handles +# settings for logging, performance counters, and control port. +# Part of the main gnuradio build. + +# Package: libgnuradio-trellis +# Section: libs +# Architecture: any +# Pre-Depends: ${misc:Pre-Depends} +# Depends: ${misc:Depends}, ${shlibs:Depends} +# Multi-Arch: same +# Description: gnuradio trellis modulation functions +# Library for trellis coding modulation, including the Viterbi +# Algorithm, Concatenated Coding and Turbo Decoding +# based upon finite state machine (FSM) class. +# Part of the main gnuradio build. + +# Package: libgnuradio-uhd +# Section: libs +# Architecture: any +# Pre-Depends: ${misc:Pre-Depends} +# Depends: ${misc:Depends}, ${shlibs:Depends} +# Multi-Arch: same +# Description: gnuradio universal hardware driver functions +# The gnuradio interface to the UHD library to connect to and send and +# receive data between to the Ettus Research, LLC product line - +# including the USRP family of software radio peripheral devices. +# Part of the main gnuradio build. + +# Package: libgnuradio-video-sdl +# Section: libs +# Architecture: any +# Pre-Depends: ${misc:Pre-Depends} +# Depends: ${misc:Depends}, ${shlibs:Depends} +# Multi-Arch: same +# Description: gnuradio video functions +# Library for handling SDL (Simple DirectMedia Layer) video data. +# Implements input and output blocks. +# Part of the main gnuradio build. + +# Package: libgnuradio-vocoder +# Section: libs +# Architecture: any +# Pre-Depends: ${misc:Pre-Depends} +# Depends: ${misc:Depends}, ${shlibs:Depends} +# Multi-Arch: same +# Description: gnuradio vocoder functions +# Library of vocoder blocks, including ulaw, alaw, gsm and codec2. +# Debian uses external libraries for gsm and codec2. +# . +# Part of the main gnuradio build. + +# Package: libgnuradio-wavelet +# Section: libs +# Architecture: any +# Pre-Depends: ${misc:Pre-Depends} +# Depends: ${misc:Depends}, ${shlibs:Depends} +# Multi-Arch: same +# Description: gnuradio wavelet functions +# Library of Daubechies wavelet function blocks. +# wvps computes the Wavelet Power Spectrum from +# a set of wavelet coefficients. +# . +# Part of the main gnuradio build. + +# Package: libgnuradio-zeromq +# Section: libs +# Architecture: kfreebsd-any linux-any +# Pre-Depends: ${misc:Pre-Depends} +# Depends: ${misc:Depends}, ${shlibs:Depends} +# Multi-Arch: same +# Description: gnuradio zeromq functions +# 0MQ messaging library support. Provide network socket +# endpoints for gnuradio data and message streams. +# PUB/SUB, PUSH/PULL, REP/REQ models supported. +# . +# Part of the main gnuradio build. diff --git a/.packaging/debian/copyright b/.packaging/debian/copyright new file mode 100644 index 00000000000..04f8becad05 --- /dev/null +++ b/.packaging/debian/copyright @@ -0,0 +1,272 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: gnuradio +Upstream-Contact: http://gnuradio.org/ +Source: + git archive --format=tar --prefix=gnuradio-3.7.10/ v3.7.10 | xz > ../gnuradio_3.7.10.orig.tar.xz +Comment: + Packages of versions 3.4 and up by A. Maitland Bottoms , + GNU Radio was re-packaged by Bdale Garbee to reflect + upstream restructuring on Wed, 6 Sep 2006 16:02:03 -0600. Much was + learned and portions were taken from the previous Debian packages built + by Ramakrishnan Muthukrishnan and Steinar H. Gunderson. + . + GNU Radio was downloaded from http://gnuradio.org/ + . + Upstream Authors: + Eric Blossom + Matt Ettus + Johnathan Corgan + . + See the AUTHORS file for a more complete list of contributors. + The current upstream maintainer is Johnathan Corgan. +Copyright: 2001-2012 Free Software Foundation, Inc. +License: GPL-3+ + +Files: CMakeLists.txt README README.building-boost README.hacking + cmake/* config.h.in docs/* dtools/* gnuradio-runtime/* gr-*/* grc/* + RELEASE-NOTES.md README.md CHANGELOG.md .clang-format +Copyright: 2010-2016 Free Software Foundation, Inc. +License: GPL-3+ + +Files: volk/* +Copyright: 2014-2015 Free Software Foundation, Inc. +License: GPL-3+ +Comment: Unused embedded copy. Debian has separate volk packages. + +Files: COPYING volk/COPYING +Copyright: 1989, 1991 Free Software Foundation, Inc. +License: COPYING + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +Files: cmake/msvc/inttypes.h cmake/msvc/stdint.h + volk/cmake/msvc/inttypes.h volk/cmake/msvc/stdint.h +Copyright: 2006-2008 Alexander Chemeris +License: BSD-3 + +Files: gr-vocoder/lib/g7xx/* +Copyright: 1992 Public Domain +License: public-domain + This source code is released by Sun Microsystems, Inc. to the public + domain. Please give your acknowledgement in product literature if + this code is used in your product implementation. + . + This source code is a product of Sun Microsystems, Inc. and is provided + for unrestricted use. Users may copy or modify this source code without + charge. + . + SUN SOURCE CODE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING + THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR + PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. + . + Sun source code is provided with no support and without any obligation on + the part of Sun Microsystems, Inc. to assist in its use, correction, + modification or enhancement. + . + SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE + INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS SOFTWARE + OR ANY PART THEREOF. + . + In no event will Sun Microsystems, Inc. be liable for any lost revenue + or profits or other special, indirect and consequential damages, even if + Sun has been advised of the possibility of such damages. + . + Sun Microsystems, Inc. + 2550 Garcia Avenue + Mountain View, California 94043 + . + Copyright year based on timestamps of files retrieved from + http://web.archive.org/web/20060721140319/http://www.cwi.nl/ftp/audio/ccitt-adpcm.tar.gz + +Files: gnuradio-runtime/lib/malloc16.c +Copyright: 2001 Phil Karn, KA9Q +License: GPL-3+ + +Files: gr-fec/lib/reed-solomon/* +Copyright: 2002, Phil Karn, KA9Q +License: GPL-3+ + +Files: gr-fec/lib/viterbi/* +Copyright: 1995 Phil Karn, KA9Q + Copyright 2008 Free Software Foundation, Inc. +License: GPL-3+ + +Files: gr-vocoder/lib/gsm/* +Copyright: 1992, 1993, 1994 by Jutta Degener and Carsten Bormann, Technische Universitaet Berlin +Comment: MIT-like license +License: TUB + +Files: gnuradio-runtime/include/gnuradio/thread/thread_group.h gnuradio-runtime/lib/thread/thread_group.cc +Copyright: (C) 2001-2003 William E. Kempf + Copyright (C) 2007 Anthony Williams + Copyright 2008 Free Software Foundation, Inc. +License: GPL-3+ +Comment: + The original was distributed under the Boost Software License, + Version 1.0, but this derivative work is now covered by the overall + license assertion for GNU Radio. + +Files: gr-filter/lib/pm_remez.cc +Copyright: (c) 1995,1998 Jake Janovetz (janovetz@uiuc.edu) + Copyright (c) 2004 Free Software Foundation, Inc. +License: GPL-3+ +Comment: + The original was distributed under LGPL version 2 or later, this + derivative work is now covered by the overall license assertion + for GNU Radio. + +Files: gr-wxgui/python/wxgui/plot.py +Copyright: (C) 2002, 2007 Gordon Williams +License: GPL-3+ +Comment: + The original was licensed "Use as you wish", this derivative work + is now covered by the overall license assertion for GNU Radio. + +Files: gr-wxgui/python/wxgui/plotter/gltext.py +Copyright: (C) 2007 Christian Brugger, Stefan Hacker +License: GPL-3+ +Comment: + The original was distributed under GPL version 2 or later, this + derivative work is now covered by the overall license assertion + for GNU Radio. + +Files: gnuradio-runtime/python/gnuradio/gr_xmlrunner.py +Copyright: 2006 Public Domain +License: public-domain + Written by Sebastian Rittau and placed in + the Public Domain. With contributions by Paolo Borelli and others. + Added to GNU Radio Oct. 3, 2010 + . + Copyright year based upon blog post of the author: + http://www.rittau.org/blog/20060714-01 + http://www.rittau.org/python/xmlrunner.py + +Files: gr-vocoder/lib/codec2/* +Copyright: (C) 1990-2013 David Rowe +License: LGPL-2.1+ + +Files: gr-vocoder/lib/codec2/*kiss* +Copyright: 2003-2010, Mark Borgerding +License: KISS-BSD + +Files: debian/* +Copyright: 2011-2013 A. Maitland Bottoms + Copyright 2011-2013 Free Software Foundation, Inc. +License: GPL-3+ + +Files: gr-fcd/* +Copyright: 2012 Free Software Foundation, Inc. +License: GPL-3+ + +Files: gr-fcd/lib/hid/* +Copyright: 2009 Alan Ott, Signal 11 Software +License: GPL-3 + +Files: gr-fcd/lib/fcd/* +Copyright: 2010 Howard Long, G6LVB + Copyright 2011 Alexandru Csete, OZ9AEC ; Mario Lorenz, DL5MLO +License: GPL-3 + +License: TUB + Any use of this software is permitted provided that this notice is not + removed and that neither the authors nor the Technische Universitaet Berlin + are deemed to have made any representations as to the suitability of this + software for any purpose nor are held responsible for any defects of + this software. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. + . + As a matter of courtesy, the authors request to be informed about uses + this software has found, about bugs in this software, and about any + improvements that may be of general interest. + . + Berlin, 28.11.1994 + Jutta Degener + Carsten Bormann + +License: KISS-BSD + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + . + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIM ED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF U SE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +License: BSD-3 + Copyright (c) 2006 Alexander Chemeris + . + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + . + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + . + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + . + 3. The name of the author may be used to endorse or promote products + derived from this software without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +License: LGPL-2.1+ + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License version 2.1, as + published by the Free Software Foundation. This program 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. + . + On Debian systems, the complete text of the GNU Lesser General Public + License (LGPL) version 2.1 can be found in the file + '/usr/share/common-licenses/LGPL-2.1'. + +License: GPL-3+ + 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. + . + On Debian systems, the complete text of the GNU General Public + License (GPL) version 3 can be found in the file + '/usr/share/common-licenses/LGPL-3'. + +License: GPL-3 + 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. + . + On Debian systems, the complete text of the GNU General Public + License (GPL) version 3 can be found in the file + '/usr/share/common-licenses/LGPL-3'. diff --git a/.packaging/debian/gnuradio-dev.install b/.packaging/debian/gnuradio-dev.install new file mode 100644 index 00000000000..6cda82776a3 --- /dev/null +++ b/.packaging/debian/gnuradio-dev.install @@ -0,0 +1,4 @@ +usr/include +usr/lib/*/*.so +usr/lib/*/cmake/gnuradio +usr/lib/*/pkgconfig/*.pc diff --git a/.packaging/debian/gnuradio-doc.doc-base b/.packaging/debian/gnuradio-doc.doc-base new file mode 100644 index 00000000000..8a6a041ccc5 --- /dev/null +++ b/.packaging/debian/gnuradio-doc.doc-base @@ -0,0 +1,8 @@ +Document: gnuradio-doc +Title: Programmer API for GNU Radio +Author: Free Software Foundation +Section: Programming + +Format: HTML +Index: /usr/share/doc/gnuradio-doc/html/index.html +Files: /usr/share/doc/gnuradio-doc/html/* diff --git a/.packaging/debian/gnuradio-doc.install b/.packaging/debian/gnuradio-doc.install new file mode 100644 index 00000000000..b5a638e2b13 --- /dev/null +++ b/.packaging/debian/gnuradio-doc.install @@ -0,0 +1,4 @@ +usr/share/doc/gnuradio*/CHANGELOG* /usr/share/doc/gnuradio-doc +usr/share/doc/gnuradio*/README* /usr/share/doc/gnuradio-doc +usr/share/doc/gnuradio*/html usr/share/doc/gnuradio-doc +usr/share/doc/gnuradio*/xml usr/share/doc/gnuradio-doc diff --git a/.packaging/debian/gnuradio.bcep b/.packaging/debian/gnuradio.bcep new file mode 100644 index 00000000000..cf3e2786890 --- /dev/null +++ b/.packaging/debian/gnuradio.bcep @@ -0,0 +1 @@ +dir|-4.0|/usr/share/gnuradio/|.* diff --git a/.packaging/debian/gnuradio.dirs b/.packaging/debian/gnuradio.dirs new file mode 100644 index 00000000000..d0ac8d2368f --- /dev/null +++ b/.packaging/debian/gnuradio.dirs @@ -0,0 +1,4 @@ +etc +usr/bin +usr/lib +usr/share/gnuradio diff --git a/.packaging/debian/gnuradio.docs b/.packaging/debian/gnuradio.docs new file mode 100644 index 00000000000..71d45a337f3 --- /dev/null +++ b/.packaging/debian/gnuradio.docs @@ -0,0 +1,42 @@ +CHANGELOG.md +docs/RELEASE-NOTES-3.7.11.md +docs/RELEASE-NOTES-3.7.10.2.md +docs/RELEASE-NOTES-3.7.10.1.md +docs/RELEASE-NOTES-3.7.10.md +docs/RELEASE-NOTES-3.7.9.1.md +docs/RELEASE-NOTES-3.7.9.2.md +docs/RELEASE-NOTES-3.7.9.3.md +gr-fec/python/fec/polar/README.md +gr-audio/docs/README.audio +gr-fec/python/fec/polar/README.md +gr-fec/python/fec/LDPC/README +gr-fec/lib/reed-solomon/README +gr-fec/lib/reed-solomon/README.karn +gr-fec/docs/README.fec +gr-zeromq/examples/python/README +gr-zeromq/docs/README.zeromq +gr-channels/docs/README.channels +dtools/README +gr-uhd/docs/README.uhd +gr-digital/docs/README.digital +gr-blocks/docs/README.blocks +gr-filter/lib/gen_interpolator_taps/README +gr-filter/docs/README.filter +gr-dtv/examples/README.dvbt2 +gr-dtv/examples/README.dvbs2 +gr-dtv/examples/README.dvbt +gr-dtv/docs/README.dtv +gr-utils/plot_tools/README.plot +gr-utils/modtool/README.modtool +gr-utils/modtool/templates/gr-newmod/examples/README +gr-utils/modtool/templates/gr-newmod/docs/README.howto +gr-vocoder/lib/g7xx/README +gr-vocoder/docs/README.vocoder +gr-trellis/examples/python/README +gr-trellis/README +gnuradio-runtime/examples/volk_benchmark/README +gnuradio-runtime/examples/mp-sched/README +gnuradio-runtime/lib/controlport/thrift/README +gr-fft/docs/README.fft +gr-analog/docs/README.analog +gr-qtgui/docs/README.qtgui diff --git a/.packaging/debian/gnuradio.install b/.packaging/debian/gnuradio.install new file mode 100644 index 00000000000..fd9e6503eeb --- /dev/null +++ b/.packaging/debian/gnuradio.install @@ -0,0 +1,27 @@ +etc +usr/bin +usr/lib/python* +usr/share/applications +usr/share/gnuradio +usr/share/icons +usr/share/mime +usr/lib/*/libgnuradio-analog.so.* +usr/lib/*/libgnuradio-audio.so.* +usr/lib/*/libgnuradio-blocks.so.* +usr/lib/*/libgnuradio-channels.so.* +usr/lib/*/libgnuradio-digital.so.* +usr/lib/*/libgnuradio-dtv.so.* +usr/lib/*/libgnuradio-fec.so.* +usr/lib/*/libgnuradio-fft.so.* +usr/lib/*/libgnuradio-filter.so.* +usr/lib/*/libgnuradio-network.so.* +usr/lib/*/libgnuradio-pmt.so.* +usr/lib/*/libgnuradio-pdu.so.* +usr/lib/*/libgnuradio-qtgui.so.* +usr/lib/*/libgnuradio-runtime.so.* +usr/lib/*/libgnuradio-trellis.so.* +usr/lib/*/libgnuradio-uhd.so.* +usr/lib/*/libgnuradio-video-sdl.so.* +usr/lib/*/libgnuradio-vocoder.so.* +usr/lib/*/libgnuradio-wavelet.so.* +usr/lib/*/libgnuradio-zeromq.so.* \ No newline at end of file diff --git a/.packaging/debian/gnuradio.manpages b/.packaging/debian/gnuradio.manpages new file mode 100644 index 00000000000..5ed5bcf0b8e --- /dev/null +++ b/.packaging/debian/gnuradio.manpages @@ -0,0 +1 @@ +usr/share/man/man1/*.1 diff --git a/.packaging/debian/gnuradio.sharedmimeinfo b/.packaging/debian/gnuradio.sharedmimeinfo new file mode 100644 index 00000000000..ae39478f862 --- /dev/null +++ b/.packaging/debian/gnuradio.sharedmimeinfo @@ -0,0 +1 @@ +/usr/share/gnuradio/grc/freedesktop/gnuradio-grc.xml diff --git a/.packaging/debian/rules b/.packaging/debian/rules new file mode 100755 index 00000000000..906299cd136 --- /dev/null +++ b/.packaging/debian/rules @@ -0,0 +1,26 @@ +#!/usr/bin/make -f +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) +export DEB_HOST_MULTIARCH + +%: + dh $@ --with python3 + +override_dh_auto_configure: + dh_auto_configure -- -DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" -DPYTHON_EXECUTABLE:STRING="/usr/bin/python3" -DENABLE_INTERNAL_VOLK=OFF -DENABLE_PYTHON=ON + +override_dh_python3: + dh_python3 --no-ext-rename + +override_dh_auto_test: + mkdir debian/test + mkdir debian/test/.gnuradio + - if case "$(DEB_BUILD_ARCH)" in *"i386"*) false;; *) true;; esac; then HOME=$(CURDIR)/debian/test dh_auto_test -- ARGS+='--timeout 10 -E systematic' ; fi + rm -rf debian/test + +override_dh_acc: + - dh_acc $@ + - cat logs/gnuradio-dev/*/log.txt + +override_dh_installmime: + dh_installmime + rm -f debian/gnuradio/usr/share/mime/packages/gnuradio.xml diff --git a/.packaging/debian/source/format b/.packaging/debian/source/format new file mode 100644 index 00000000000..163aaf8d82b --- /dev/null +++ b/.packaging/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/.packaging/debian/source/include-binaries b/.packaging/debian/source/include-binaries new file mode 100644 index 00000000000..419e5f1a9f5 --- /dev/null +++ b/.packaging/debian/source/include-binaries @@ -0,0 +1 @@ +debian/gnuradio-dev.abi.tar.gz.amd64 diff --git a/.packaging/debian/watch b/.packaging/debian/watch new file mode 100644 index 00000000000..c44d75460b5 --- /dev/null +++ b/.packaging/debian/watch @@ -0,0 +1,2 @@ +version=4 +opts="pgpsigurlmangle=s%$%.asc%" https://www.gnuradio.org/releases/gnuradio/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ diff --git a/.packaging/fedora/gnuradio.spec b/.packaging/fedora/gnuradio.spec new file mode 100644 index 00000000000..b89ff85cd9e --- /dev/null +++ b/.packaging/fedora/gnuradio.spec @@ -0,0 +1,870 @@ +# gnuradio.spec downloaded from here and modified for automation: +# https://src.fedoraproject.org/rpms/gnuradio/raw/rawhide/f/gnuradio.spec + +# NEON support is by default enabled on aarch64 and disabled on other ARMs (it can be overridden) +%ifarch aarch64 +%bcond_without neon +%else +%bcond_with neon +%endif + +%ifarch %{arm} +%if %{with neon} +%global my_optflags %(echo -n "%{optflags}" | sed 's/-mfpu=[^ \\t]\\+//g'; echo " -mfpu=neon") +%{expand: %global optflags %{my_optflags}} +%global mfpu_neon -Dhave_mfpu_neon=1 +%else +%global mfpu_neon -Dhave_mfpu_neon=0 +%endif +%endif + +# For versions not yet on ftp, pull from git +#%%global git_commit 441a3767e05d15e62c519ea66b848b5adb0f4b3a + +#%%global alphatag rc1 + +Name: gnuradio +Version: %{VERSION} +Release: %{RELEASE}%{?alphatag:.%{alphatag}}%{?dist} +Summary: Software defined radio framework + +License: GPLv3 +URL: https://www.gnuradio.org/ +#Source0: http://gnuradio.org/releases/gnuradio/gnuradio-%%{version}%%{?alphatag}.tar.xz +#Source0: http://gnuradio.org/releases/gnuradio/gnuradio-%%{version}.tar.gz +# Source0: https://github.com/gnuradio/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz +Source: %{SOURCE} +# git clone git://gnuradio.org/gnuradio +# cd gnuradio +# git archive --format=tar --prefix=%%{name}-%%{version}/ %%{git_commit} | \ +# gzip > ../%%{name}-%%{version}.tar.gz + +Requires(pre): shadow-utils +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: libtool +BuildRequires: alsa-lib-devel +BuildRequires: boost-devel +BuildRequires: codec2-devel +BuildRequires: cppzmq-devel +BuildRequires: desktop-file-utils +BuildRequires: doxygen +BuildRequires: fftw-devel +BuildRequires: findutils +BuildRequires: gmp-devel +BuildRequires: graphviz +BuildRequires: gsl-devel +BuildRequires: gsm-devel +BuildRequires: gtk3-devel +BuildRequires: jack-audio-connection-kit-devel +BuildRequires: log4cpp-devel +BuildRequires: orc-devel +BuildRequires: portaudio-devel +BuildRequires: python3-devel +BuildRequires: python3-cairo +BuildRequires: python3-click-plugins +BuildRequires: python3-gobject +BuildRequires: python3-numpy +BuildRequires: python3-pyyaml +BuildRequires: python3-lxml +BuildRequires: python3-mako +BuildRequires: python3-qt5-devel +BuildRequires: python3-scipy +BuildRequires: python3-thrift +BuildRequires: qwt-qt5-devel +#BuildRequires: tex(latex) +BuildRequires: SDL-devel +BuildRequires: thrift +BuildRequires: uhd-devel +BuildRequires: xdg-utils +BuildRequires: xmlto +BuildRequires: zeromq-devel +BuildRequires: python3-gobject +BuildRequires: pybind11-devel +BuildRequires: volk-devel +BuildRequires: libsndfile-devel + +Requires: python3-%{name} = %{version}-%{release} +Requires: python3-numpy +Requires: python3-thrift +%if ! 0%{?rhel} +Requires: python3-pyopengl +%endif +Requires: python3-pyyaml +Requires: python3-gobject +Requires: python3-mako +Requires: python3-click-plugins +Requires: gtk3 + +%description +GNU Radio is a collection of software that when combined with minimal +hardware, allows the construction of radios where the actual waveforms +transmitted and received are defined by software. What this means is +that it turns the digital modulation schemes used in today's high +performance wireless devices into software problems. + +%package -n python3-%{name} +Summary: GNU Radio Python 3 module + +%description -n python3-%{name} +GNU Radio Python 3 module + +%package devel +Summary: GNU Radio +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: cmake +Requires: boost-devel%{?_isa} + +%description devel +GNU Radio Headers + +%package doc +Summary: GNU Radio +Requires: %{name} = %{version}-%{release} + +%description doc +GNU Radio Documentation + +%package examples +Summary: GNU Radio +Requires: %{name} = %{version}-%{release} + +%description examples +GNU Radio examples + +%prep +%setup -q -n %{name}-%{version}%{?alphatag} + +%build +# this could be dropped when f32 get retired (not counting EPEL) +%undefine __cmake_in_source_build + +%cmake \ +-DSYSCONFDIR=%{_sysconfdir} \ +-DGR_PKG_DOC_DIR=%{_docdir}/%{name} \ +-DGR_PYTHON_DIR=%{python3_sitearch} \ +-DPYTHON_EXECUTABLE=%{__python3} \ +%{?mfpu_neon} +#-DENABLE_DOXYGEN=FALSE \ + +%cmake_build + +%install +%cmake_install +desktop-file-validate %{buildroot}%{_datadir}/applications/gnuradio-grc.desktop +# Remove extraneous desktop/icon/mime files +rm -r %{buildroot}%{_datadir}/%{name}/grc/freedesktop + +%ldconfig_scriptlets + +%files +%license COPYING +%{_bindir}/* +%{_libdir}/lib*.so.* +%{_libexecdir}/* +%{_datadir}/gnuradio +%{_datadir}/applications/gnuradio-grc.desktop +%{_datadir}/mime/packages/gnuradio-grc.xml +%{_datadir}/icons/hicolor/*/apps/gnuradio-grc.png +%{_datadir}/metainfo/org.gnuradio.grc.metainfo.xml +%config(noreplace) %{_sysconfdir}/gnuradio +%exclude %{_datadir}/gnuradio/examples +%exclude %{_docdir}/%{name}/html +%exclude %{_docdir}/%{name}/xml +%doc %{_docdir}/%{name} +%{_datadir}/man + +%files -n python3-%{name} +%{python3_sitearch}/%{name}/ +%{python3_sitearch}/pmt/ + +%files devel +%{_includedir}/* +%{_libdir}/lib*.so +%{_libdir}/pkgconfig/*.pc +%{_libdir}/cmake/gnuradio + +%files doc +%doc %{_docdir}/%{name}/html +%doc %{_docdir}/%{name}/xml + +%files examples +%{_datadir}/gnuradio/examples + +%changelog +* Wed Feb 17 2021 Jaroslav Škarvada - 3.9.0.0-5 +- Built with libsndfile + +* Wed Feb 3 2021 Jaroslav Škarvada - 3.9.0.0-4 +- Fixed FTBFS + Resolves: rhbz#1919794 + Resolves: rhbz#1921503 + +* Tue Jan 26 2021 Fedora Release Engineering - 3.9.0.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Fri Jan 22 2021 Jonathan Wakely - 3.9.0.0-2 +- Rebuilt for Boost 1.75 + +* Mon Jan 18 2021 Jaroslav Škarvada - 3.9.0.0-1 +- New version + Resolves: rhbz#1917167 + +* Mon Nov 30 2020 Dan Horák - 3.8.2.0-3 +- use GMP exclusively + +* Tue Aug 25 2020 Jaroslav Škarvada - 3.8.2.0-2 +- Explicitly disabled in-source build + +* Mon Aug 24 2020 Jaroslav Škarvada - 3.8.2.0-1 +- New version + Resolves: rhbz#1871259 + +* Tue Aug 4 2020 Jaroslav Škarvada - 3.8.1.0-7 +- Fixed FTBFS due to cmake changes + Resolves: rhbz#1863736 + +* Sat Aug 01 2020 Fedora Release Engineering - 3.8.1.0-6 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 3.8.1.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jun 03 2020 Jonathan Wakely - 3.8.1.0-4 +- Rebuilt and patched for Boost 1.73.0 + +* Tue May 26 2020 Miro Hrončok - 3.8.1.0-3 +- Rebuilt for Python 3.9 + +* Mon May 4 2020 Jaroslav Škarvada - 3.8.1.0-2 +- Rebuilt for new codec2 + Resolves: rhbz#1830672 + +* Tue Apr 14 2020 Jaroslav Škarvada - 3.8.1.0-1 +- New version + Resolves: rhbz#1822797 + Resolves: rhbz#1822842 + +* Tue Mar 24 2020 Jaroslav Škarvada - 3.8.0.0-7 +- Added requirement on python3-six and python3-mako + +* Mon Mar 23 2020 Jaroslav Škarvada - 3.8.0.0-6 +- Dropped python3-pyopengl on RHEL + Resolves: rhbz#1816179 + +* Tue Jan 28 2020 Fedora Release Engineering - 3.8.0.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Dec 05 2019 Orion Poplawski - 3.8.0.0-4 +- Rebuild for thrift-0.13 + +* Wed Nov 13 2019 Jaroslav Škarvada - 3.8.0.0-3 +- Added gtk3 requirements + +* Wed Nov 13 2019 Jaroslav Škarvada - 3.8.0.0-2 +- Added python3-pyyaml requirement + +* Thu Oct 31 2019 Orion Poplawski - 3.8.0.0-1 +- Update to 3.8.0.0 +- Drop old obsoletes +- Split out python modules into separate package +- Use https in URLs +- Re-enable Doxygen doc build + +* Mon Aug 26 2019 Jaroslav Škarvada - 3.7.13.5-8 +- Rebuilt for new GSL + +* Tue Aug 20 2019 Susi Lehtola - 3.7.13.5-7 +- Rebuilt for GSL 2.6. + +* Mon Aug 5 2019 Jaroslav Škarvada - 3.7.13.5-6 +- Rebuilt for new uhd + +* Thu Jul 25 2019 Fedora Release Engineering - 3.7.13.5-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue Jul 09 2019 Filipe Rosset - 3.7.13.5-4 +- Rebuilt for comedilib 0.11 + +* Mon May 6 2019 Jaroslav Škarvada - 3.7.13.5-2 +- Dropped PyQwt in f31+ + +* Wed Apr 24 2019 Jaroslav Škarvada - 3.7.13.5-1 +- New version +- Updated source URL to point to github +- Dropped python2-sphinx support (not in Fedora) + +* Thu Jan 31 2019 Fedora Release Engineering - 3.7.13.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jan 25 2019 Jonathan Wakely - 3.7.13.4-4 +- Rebuilt for Boost 1.69 + +* Fri Aug 10 2018 Jaroslav Škarvada - 3.7.13.4-3 +- Dropped patented content + Resolves: rhbz#1608973 +- Enabled ZeroMQ, sphinx, comedilib, jack, and log4cpp + Resolves: rhbz#1610513 +- Temporaly disabled doxygen (the doc subpackage is mostly useless now), + because due to various bugs in different packages the documentation builds + differently on different architectures +- Fixed python hashbangs +- Unlimited number of make processes + +* Sun Jul 22 2018 Jaroslav Škarvada - 3.7.13.4-2 +- Rebuilt for new uhd + +* Tue Jul 17 2018 Jaroslav Škarvada - 3.7.13.4-1 +- New version + Resolves: rhbz#1601288 + Resolves: rhbz#1601263 + +* Mon Jul 16 2018 Jaroslav Škarvada - 3.7.13.3-7 +- Fixed python2 macros + +* Fri Jul 13 2018 Fedora Release Engineering - 3.7.13.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Jul 4 2018 Jaroslav Škarvada - 3.7.13.3-5 +- Rebuild to fix provides + +* Wed Jul 4 2018 Jaroslav Škarvada - 3.7.13.3-4 +- Fixed python requirements + +* Wed Jun 27 2018 Jaroslav Škarvada - 3.7.13.3-3 +- Added all upstream cmake modules + +* Mon Jun 18 2018 Jaroslav Škarvada - 3.7.13.3-2 +- Added some missing cmake modules + +* Fri Jun 15 2018 Jaroslav Škarvada - 3.7.13.3-1 +- New version + Resolves: rhbz#1591524 +- Dropped gcc-7-compile fix patch (not needed) +- De-fuzzified size_t patch + +* Thu Feb 22 2018 Jaroslav Škarvada - 3.7.11-10 +- Rebuilt for new python-cheetah + +* Wed Feb 07 2018 Fedora Release Engineering - 3.7.11-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Fri Feb 2 2018 Jaroslav Škarvada - 3.7.11-8 +- Rebuilt for new boost + +* Sat Jan 06 2018 Igor Gnatenko - 3.7.11-7 +- Remove obsolete scriptlets + +* Mon Aug 07 2017 Björn Esser - 3.7.11-6 +- Rebuilt for AutoReq cmake-filesystem + +* Wed Aug 02 2017 Fedora Release Engineering - 3.7.11-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Sun Jul 30 2017 Florian Weimer - 3.7.11-4 +- Rebuild with binutils fix for ppc64le (#1475636) + +* Wed Jul 26 2017 Jaroslav Škarvada - 3.7.11-3 +- Rebuilt for new gsl + +* Fri Jul 21 2017 Kalev Lember - 3.7.11-2 +- Rebuilt for Boost 1.64 + +* Wed May 24 2017 Jaroslav Škarvada - 3.7.11-1 +- New version + +* Tue Feb 07 2017 Kalev Lember - 3.7.10.1-5 +- Rebuilt for Boost 1.63 + +* Tue Nov 22 2016 Jaroslav Škarvada - 3.7.10.1-4 +- Rebuilt for new uhd + +* Thu Sep 22 2016 Jaroslav Škarvada - 3.7.10.1-3 +- Uncoditionally enabled NEON support on aarch64 + +* Fri Sep 16 2016 Peter Robinson 3.7.10.1-2 +- NEON is compulary part of aarch64 so enable unconditionally on that arch + +* Wed Aug 31 2016 Jaroslav Škarvada - 3.7.10.1-1 +- New version + Resolves: rhbz#1370728 + +* Tue Jul 19 2016 Fedora Release Engineering - 3.7.10-2 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Mon Jul 4 2016 Jaroslav Škarvada - 3.7.10-1 +- New version + Resolves: rhbz#1352483 +- Dropped stdc11-fix and cmake35 patches (both upstreamed) +- Defuzzified size_t patch + +* Tue May 10 2016 Jaroslav Škarvada - 3.7.9.1-4 +- Rebuilt for new uhd + +* Mon Mar 7 2016 Jaroslav Škarvada - 3.7.9.1-3 +- Rebuilt for new gsl + +* Tue Feb 23 2016 Orion Poplawski - 3.7.9.1-2 +- Rebuild for gsl 2.1 +- Add patch for cmake 3.5 (bug #1311358) + +* Wed Feb 10 2016 Jaroslav Škarvada - 3.7.9.1-1 +- New version + Resolves: rhbz#1306066 + +* Wed Feb 03 2016 Fedora Release Engineering - 3.7.9-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Sat Jan 16 2016 Jonathan Wakely - 3.7.9-2 +- Rebuilt for Boost 1.60 + +* Mon Jan 4 2016 Jaroslav Škarvada - 3.7.9-1 +- New version + Resolves: rhbz#1294379 + +* Tue Dec 15 2015 Jaroslav Škarvada - 3.7.9-0.1.rc1 +- New version + Resolves: rhbz#1291659 +- Dropped dos2unix and conversion from CR + LF to LF (not needed) + +* Thu Nov 5 2015 Jaroslav Škarvada - 3.7.8.1-1 +- New version + Resolves: rhbz#1276888 + +* Thu Oct 1 2015 Jaroslav Škarvada - 3.7.8-3 +- Fixed icon and desktop file locations + Resolves: rhbz#1266700 + +* Thu Aug 27 2015 Jonathan Wakely - 3.7.8-2 +- Rebuilt for Boost 1.59 + +* Wed Aug 12 2015 Jaroslav Škarvada - 3.7.8-1 +- New version + Resolves: rhbz#1251650 + +* Wed Jul 29 2015 Fedora Release Engineering - 3.7.8-0.2.rc1 +- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159 + +* Mon Jul 27 2015 Jaroslav Škarvada - 3.7.8-0.1.rc1 +- New version + Resolves: rhbz#1246803 +- Updated size_t patch +- Dropped docdir-override (not needed) + +* Wed Jul 22 2015 David Tardon - 3.7.7.1-3 +- rebuild for Boost 1.58 + +* Wed Jun 17 2015 Fedora Release Engineering - 3.7.7.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Tue May 12 2015 Jaroslav Škarvada - 3.7.7.1-1 +- New version + Resolves: rhbz#1220588 +- Rebased size_t patch +- Dropped volk-memalign-fix patch (not needed) +- Dropped wxpython3-gtk3 patch (upstreamed) +- Set DOCDIR to match Fedora documentation location (by docdir-override patch) + +* Sun May 03 2015 Kalev Lember - 3.7.6.1-4 +- Rebuilt for GCC 5 C++11 ABI change + +* Thu Mar 12 2015 Jaroslav Škarvada - 3.7.6.1-3 +- Enabled uhd on ppc64 on RHEL-7 +- Built with -j2 to speed-up the build process a bit + +* Wed Mar 11 2015 Jaroslav Škarvada - 3.7.6.1-2 +- Enabled optional building with NEON support on aarch64 +- Built with -j1 to prevent internal compiler errors due to excessive + use of resources + +* Thu Feb 19 2015 Jaroslav Škarvada - 3.7.6.1-1 +- New version + Resolves: rhbz#1193588 +- De-fuzzified size_t patch + +* Wed Feb 04 2015 Petr Machata - 3.7.5.1-5 +- Bump for rebuild. + +* Thu Jan 29 2015 Jaroslav Škarvada - 3.7.5.1-4 +- Added fix for wxPython3 (by wxpython3-gtk3 patch). Patch + provided by Scott Talbert + +* Tue Jan 27 2015 Petr Machata - 3.7.5.1-3 +- Rebuild for boost 1.57.0 + +* Mon Jan 26 2015 Jaroslav Škarvada - 3.7.5.1-2 +- Workaround for volk memalign (by volk-memalign-fix patch) + Resolves: rhbz#1185710 +- Rebuilt for current uhd + Resolves: rhbz#1185508 + +* Tue Oct 21 2014 Jaroslav Škarvada - 3.7.5.1-1 +- New versio + Resolves: rhbz#1155252 + +* Tue Oct 7 2014 Jaroslav Škarvada - 3.7.5-3 +- Fixed swig bug regarding size_t (by size_t patch) + This fixes building on s390 + Resolves: rhbz#1143914 + +* Wed Sep 17 2014 Jaroslav Škarvada - 3.7.5-2 +- Added PyOpenGL requirement + Resolves: rhbz#1049770 + +* Mon Sep 1 2014 Jaroslav Škarvada - 3.7.5-1 +- New version + Resolves: rhbz#1135814 + +* Mon Aug 18 2014 Jaroslav Škarvada - 3.7.4-6 +- Removed explicit PyQwt requirement on RHEL-7 + +* Sat Aug 16 2014 Fedora Release Engineering - 3.7.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Fri Aug 8 2014 Jaroslav Škarvada - 3.7.4-4 +- Fixed building on RHEL-7 + +* Fri Aug 8 2014 Jaroslav Škarvada - 3.7.4-3 +- Enabled UHD on RHEL-7 non ppc64 + +* Fri Aug 8 2014 Jaroslav Škarvada - 3.7.4-2 +- Added workaround to build on RHEL-7 + +* Wed Jul 16 2014 Jaroslav Škarvada - 3.7.4-1 +- New version + Resolves: rhbz#1120106 +- Dropped system-gsm patch (not needed) + +* Sat Jun 07 2014 Fedora Release Engineering - 3.7.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri May 23 2014 David Tardon - 3.7.3-3 +- rebuild for boost 1.55.0 + +* Sun Mar 16 2014 Ville Skyttä - 3.7.3-2 +- Use system gsm instead of bundled one + +* Tue Mar 11 2014 Jaroslav Škarvada - 3.7.3-1 +- New version + Resolves: rhbz#1074899 +- Dropped qwt61 patch (not needed) + +* Tue Feb 11 2014 Jaroslav Škarvada - 3.7.2.1-4 +- Rebuilt due to new uhd + +* Mon Jan 6 2014 Jaroslav Škarvada - 3.7.2.1-3 +- Enabled use of qwt61 (by qwt61 patch) + Resolves: rhbz#1045935 +- Added sphinx to buildrequires + Related: rhbz#1045935 +- Fixed whitespaces in description + +* Fri Jan 3 2014 Jaroslav Škarvada - 3.7.2.1-2 +- Added boost-devel as requirement for gnuradio-devel + Resolves: rhbz#1002148 + +* Mon Dec 2 2013 Jaroslav Škarvada - 3.7.2.1-1 +- New version + Resolves: rhbz#1036554 + +* Mon Nov 18 2013 Jaroslav Škarvada - 3.7.2-1 +- New version + Resolves: rhbz#1030865 +- Dropped uhd-fft-err, cmake-libdir patches (all upstreamed) + +* Tue Sep 17 2013 Jaroslav Škarvada - 3.7.1-5 +- Fixed defaults to use libdir for cmake modules (by cmake-libdir patch) +- Defuzzified uhd-fft-err patch + +* Tue Sep 17 2013 Jaroslav Škarvada - 3.7.1-4 +- Moved cmake modules to libdir/cmake + +* Wed Sep 4 2013 Jaroslav Škarvada - 3.7.1-3 +- Fixed FindGnuradio.cmake (by findgnuradio-cmake-fix patch) + +* Mon Sep 2 2013 Jaroslav Škarvada - 3.7.1-2 +- Do not install bundled cmake modules + +* Mon Sep 2 2013 Jaroslav Škarvada - 3.7.1-1 +- New version + Resolves: rhbz#1003319 +- Dropped cmake-modules-fix, bigendian, build-fix patches (upstreamed) +- Fixed uhd_fft error handling + Resolves: rhbz#1003075 + +* Tue Aug 6 2013 Jaroslav Škarvada - 3.7.0-0.5.rc0 +- Used unversioned doc directory + Resolves: rhbz#993794 + +* Tue Jul 30 2013 Dennis Gilmore - 3.7.0-0.4.rc0 +- rebuild against 1.54.0 again + +* Mon Jul 29 2013 Jaroslav Škarvada - 3.7.0-0.3.rc0 +- Symlinked FindGnuradio.cmake + +* Sun Jul 28 2013 Petr Machata - 3.7.0-0.2.rc0 +- Rebuild for boost 1.54.0 + +* Mon Jun 24 2013 Jaroslav Škarvada - 3.7.0-0.1.rc0 +- New version + Resolves: rhbz#976982 +- Defuzzified cmake-modules-fix patch + +* Wed Jun 12 2013 Dan Horák - 3.6.5-2 +- fix build on big endian arches + +* Tue Jun 4 2013 Jaroslav Škarvada - 3.6.5-1 +- New version + Resolves: rhbz#967804 +- Make cmake modules installation directory configurable + (by cmake-modules-fix patch) +- Tried to switch back to parallel build (hopefully the koji builder + machines have now enough resources) + +* Wed Mar 20 2013 Jaroslav Škarvada - 3.6.4.1-1 +- New version + Resolves: rhbz#923699 + +* Thu Feb 28 2013 Jaroslav Škarvada - 3.6.4-1 +- New version + Resolves: rhbz#916530 + +* Sun Feb 10 2013 Denis Arnaud - 3.6.3-0.4.rc0 +- Rebuild for Boost-1.53.0 + +* Sat Feb 09 2013 Denis Arnaud - 3.6.3-0.3.rc0 +- Rebuild for Boost-1.53.0 + +* Fri Jan 11 2013 Jaroslav Škarvada - 3.6.3-0.2.rc0 +- Fixed unowned directories + Resolves: rhbz#894200 + +* Wed Jan 2 2013 Jaroslav Škarvada - 3.6.3-0.1.rc0 +- New version + Resolves: rhbz#890393 +- Fixed bogus date in changelog + +* Thu Nov 15 2012 Jaroslav Škarvada - 3.6.2-4 +- Added PyQwt requirement + Resolves: rhbz#876830 + +* Wed Oct 31 2012 Jaroslav Škarvada - 3.6.2-3 +- Forced gr-core build + +* Tue Oct 30 2012 Jaroslav Škarvada - 3.6.2-2 +- Fixed libusb requirements +- Enabled gr-fcd + Resolves: rhbz#871513 + +* Thu Oct 25 2012 Jaroslav Škarvada - 3.6.2-1 +- New version + Resolves: rhbz#869840 +- Dropped neon patch (upstreamed) + +* Fri Oct 19 2012 Rex Dieter 3.6.1-8 +- rebuild (qwt) + +* Mon Sep 24 2012 Jaroslav Škarvada - 3.6.1-7 +- Fixed doc subpackage to be noarch + +* Wed Aug 29 2012 Jaroslav Škarvada - 3.6.1-6 +- Added conditional for ARM NEON build (%%bcond_with neon) + +* Fri Aug 10 2012 Jaroslav Škarvada - 3.6.1-5 +- Rebuilt for new boost + +* Tue Jul 24 2012 Jaroslav Škarvada - 3.6.1-4 +- On non ARM expand disable_mfpu_neon macro to empty string + +* Thu Jul 19 2012 Fedora Release Engineering - 3.6.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jul 13 2012 Jaroslav Škarvada - 3.6.1-2 +- Disabled NEON optimisations (neon patch, sent upstream) + Resolves: rhbz#837028 +- Removed sdcc build requires (not needed) + +* Tue Jun 12 2012 Jaroslav Škarvada - 3.6.1-1 +- New version + Resolves: rhbz#831187 + Dropped pygtk2-no-x-detect patch (upstreamed) + +* Mon Apr 23 2012 Jaroslav Škarvada - 3.6.0-1 +- New version + Resolves: rhbz#815070 +- Dropped ARM patch (not used in new buildsystem) +- Fixed pygtk detection (pygtk2-no-x-detect patch) + +* Wed Apr 18 2012 Jaroslav Škarvada - 3.5.3.1-1 +- New version + Resolves: rhbz#813725 + +* Wed Apr 18 2012 Peter Robinson - 3.5.3-2 +- Fix building on ARM + +* Tue Apr 10 2012 Jaroslav Škarvada - 3.5.3-1 +- New version + Resolves: rhbz#810683 + +* Tue Mar 27 2012 Jaroslav Škarvada - 3.5.2.1-2 +- Rebuilt with new uhd + +* Fri Mar 16 2012 Jaroslav Škarvada - 3.5.2.1-1 +- New version + Resolves: rhbz#804032 + +* Thu Mar 15 2012 Jaroslav Škarvada - 3.5.2-1 +- New version + Resolves: rhbz#802950 +- Dropped compile-fix patch (upstreamed) + +* Tue Feb 28 2012 Fedora Release Engineering - 3.5.1-3 +- Rebuilt for c++ ABI breakage + +* Tue Jan 17 2012 Jaroslav Škarvada - 3.5.1-2 +- Added explicit requires on PyQt4 + Resolves: rhbz#781494 + +* Fri Jan 13 2012 Jaroslav Škarvada - 3.5.1-1 +- New version + Resolves: rhbz#781355 +- Fixed compilation with gcc-4.7.0 (compile-fix patch) + +* Fri Jan 13 2012 Fedora Release Engineering - 3.5.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Dec 20 2011 Jaroslav Škarvada - 3.5.0-2 +- Fixed double packaging of doc + Resolves: rhbz#769069 +- Fixed rpmlint warnings + +* Tue Dec 13 2011 Jaroslav Škarvada - 3.5.0-1 +- New version +- Used macros instead of variables in spec +- Dropped sdcc hack, was needed by obsoleted libusrp + +* Sun Dec 4 2011 Jaroslav Škarvada - 3.5.0-0.2.rc0 +- Added python-cheetah dependency + Resolves: rhbz#759834 + +* Fri Dec 02 2011 Jaroslav Škarvada - 3.5.0-0.1.rc0 +- New pre-release version +- Followed upstream and dropped support for usrp, use uhd instead +- Dropped sdcc3 and libusb-detect-fix patches +- Dropped 10-usrp.rules and usrp group creation, now handled by uhd + +* Sun Nov 20 2011 Jaroslav Škarvada - 3.4.2-2 +- Rebuilt for new boost + +* Thu Oct 27 2011 Jaroslav Škarvada - 3.4.2-1 +- New version +- Dropped retval patch + +* Fri Oct 21 2011 Dan Horák - 3.4.0-5 +- add missing return value in generated code +- add BR: orc-devel - needed for secondary arches in volk + +* Thu Oct 20 2011 Dan Horák - 3.4.0-4 +- explicitly set boost libdir to workaround build failures on non-x86 64-bit arches + +* Thu Jul 21 2011 Jaroslav Škarvada - 3.4.0-3 +- Enabled volk +- Rebuilt for new boost + +* Sun Jul 03 2011 Jaroslav Škarvada - 3.4.0-2 +- Rebuilt with -j1, otherwise the build process may fail on machines with low RAM +- Define changed to global + +* Mon Jun 27 2011 Jaroslav Škarvada - 3.4.0-1 +- New version +- Updated 10-usrp.rules + Resolves: rhbz#597023 +- Merged usrp to gnuradio, fixes some packaging bugs + Resolves: rhbz#516352 + Resolves: rhbz#619195 +- Rebuilt with included grc, obsoleted grc package + Resolves: rhbz#592486 +- Removed unneeded patches (libtool, configure, gcc45, ptrdifft-std) +- Fixed compilation with sdcc3 (sdcc3 patch) +- Fixed detection of libusb (libusb-detect-fix patch) +- Compiled with -fno-strict-aliasing + +* Thu Apr 07 2011 Jaroslav Škarvada - 3.2.2-13 +- Rebuild for new boost + +* Tue Mar 15 2011 Jaroslav Škarvada - 3.2.2-12 +- Rebuild for new boost + +* Tue Feb 15 2011 Jaroslav Škarvada - 3.2.2-11 +- Fix compilation with ptrdifft-std patch +- Rebuild for new boost + +* Tue Feb 08 2011 Fedora Release Engineering - 3.2.2-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Feb 07 2011 Thomas Spura - 3.2.2-9 +- rebuild for new boost + +* Tue Sep 07 2010 Dan Horák - 3.2.2-8 +- Add sparc64 and s390x to 64-bit platforms + +* Sun Aug 01 2010 Orcan Ogetbil - 3.2.2-7 +- Fix gcc-4.5 build errors + +* Wed Jul 21 2010 David Malcolm - 3.2.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Fri May 21 2010 Tom "spot" Callaway - 3.2.2-5 +- re-export PATH for %%install + +* Fri May 21 2010 Tom "spot" Callaway - 3.2.2-4 +- don't BuildRequires: comedilib-devel, code doesn't use it + +* Tue Feb 09 2010 Caolán McNamara - 3.2.2-3 +- Resolves: rhbz#539069 FTBFS + +* Fri Jan 22 2010 Rahul Sundaram - 3.2.2-2 +- Rebuild for Boost soname bump + +* Wed Jul 29 2009 Marek Mahut - 3.2.2-1 +- Upstream release 3.2.2 +- Dropped patch gnuradio-3.2-gcc44.patch + +* Sat Jul 25 2009 Marek Mahut - 3.2-1 +- Upstream release 3.2 + +* Wed Mar 4 2009 Lubomir Rintel - 3.1.3-5 +- Fix build with GCC 4.4 + +* Tue Feb 24 2009 Fedora Release Engineering - 3.1.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Dec 31 2008 Marek Mahut - 3.1.3-3 +- Adding udev rule for USRP device +- Adding usrp system group + +* Fri Dec 19 2008 Marek Mahut - 3.1.3-2 +- Upstream release 3.1.3 +- Comedi support +- RHBZ#473928 Unowned directories + +* Sat Nov 29 2008 Ignacio Vazquez-Abrams - 3.1.2-3 +- Rebuild for Python 2.6 + +* Tue Jun 10 2008 Marek Mahut - 3.1.2-2 +- Moving usrp header files to usrp-devel (reported by Philip Balister) + +* Fri Apr 4 2008 Marek Mahut - 3.1.2-1 +- Upstream release +- Modification of gnuradio-3.1.2-gcc34.patch to the new release + +* Thu Mar 27 2008 Marek Mahut - 3.1.1-4 +- Moving libusrp to gnuradio package + +* Wed Feb 20 2008 Marek Mahut - 3.1.1-2 +- Upstream release +- Spec file rewrite + +* Mon Mar 12 2007 Trond Danielsen - 3.0.3-1 +- Initial version. diff --git a/.packaging/launchpad/dput.cf b/.packaging/launchpad/dput.cf new file mode 100644 index 00000000000..c05a0bdde20 --- /dev/null +++ b/.packaging/launchpad/dput.cf @@ -0,0 +1,13 @@ +[ftp-master] +fqdn = ppa.launchpad.net +method = ftp +incoming = ~gnuradio/ubuntu/gnuradio-master/ +login = anonymous +allow_unsigned_uploads = 0 + +[ftp-maint-3.9] +fqdn = ppa.launchpad.net +method = ftp +incoming = ~gnuradio/ubuntu/gnuradio-maint-3.9/ +login = anonymous +allow_unsigned_uploads = 0 diff --git a/.packaging/scripts/pkg-debian.sh b/.packaging/scripts/pkg-debian.sh new file mode 100755 index 00000000000..1073a1053ec --- /dev/null +++ b/.packaging/scripts/pkg-debian.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +DATESTR=$(date +"%a, %d %b %Y %T %z") +GITBRANCH_CLEAN=$(echo "$GITBRANCH" | sed "s/-//") +# Clone gnuradio repo +cd /build +cp -r $GITHUB_WORKSPACE /build/ +cd /build/gnuradio +GITREV="$(git rev-list --count HEAD)" + +# Scrape the version number from CMakeLists.txt +VERSION_MAJOR="$(cat CMakeLists.txt | grep "SET(VERSION_MAJOR" | tr -s ' ' | cut -d' ' -f2 | cut -d')' -f1)" +VERSION_API="$(cat CMakeLists.txt | grep "SET(VERSION_API" | tr -s ' ' | cut -d' ' -f2 | cut -d')' -f1)" +VERSION_ABI="$(cat CMakeLists.txt | grep "SET(VERSION_ABI" | tr -s ' ' | cut -d' ' -f2 | cut -d')' -f1)" +VERSION_PATCH="$(cat CMakeLists.txt | grep "SET(VERSION_PATCH" | tr -s ' ' | cut -d' ' -f2 | cut -d')' -f1)" + +# Remove '-' from the patch +#VERSION_PATCH="${VERSION_PATCH/-/}" +VERSION_PATCH=$(echo "$VERSION_PATCH" | sed "s/-//") +VERSION_STRING=$VERSION_MAJOR"."$VERSION_API"."$VERSION_ABI"."$VERSION_PATCH +echo "Creating build for GNU Radio "$VERSION_STRING + +GIT_COMMIT="$(git log --pretty=oneline | head -n 1)" +echo $GIT_COMMIT + +cp -r .packaging/debian ../ + +# Tar.gz it +rm -rf .git +rm -rf .packaging + +cd .. +cp -r debian gnuradio/ +tar -cf gnuradio_$VERSION_STRING~$GITBRANCH_CLEAN~$GITREV~$DISTRIBUTION.orig.tar gnuradio +gzip gnuradio_$VERSION_STRING~$GITBRANCH_CLEAN~$GITREV~$DISTRIBUTION.orig.tar + +# Update changelog +# gnuradio (3.9.0.0~368-6~bionic) bionic; urgency=medium +cd gnuradio/debian +# Update the changelog +# Increment the Debian Revision +cp changelog changelog.prev +echo "gnuradio ($VERSION_STRING~$GITBRANCH_CLEAN~$GITREV~$DISTRIBUTION-$REV) $DISTRIBUTION; urgency=medium\n\n * $GITBRANCH at $GIT_COMMIT\n\n -- $NAME $EMAIL $DATESTR\n\n$(cat changelog)" > changelog + +debuild -S -d diff --git a/.packaging/scripts/pkg-fedora.sh b/.packaging/scripts/pkg-fedora.sh new file mode 100644 index 00000000000..33f01738268 --- /dev/null +++ b/.packaging/scripts/pkg-fedora.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +cp $GITHUB_WORKSPACE/.packaging/fedora/gnuradio.spec ./ +cp -r $GITHUB_WORKSPACE /build/ + +mkdir -p rpmbuild +mkdir -p rpmbuild/BUILD +mkdir -p rpmbuild/BUILDROOT +mkdir -p rpmbuild/RPMS +mkdir -p rpmbuild/SOURCES +mkdir -p rpmbuild/SRPMS + +DATESTR=$(date +"%a, %d %b %Y %T %z") +GITBRANCH_CLEAN=${GITBRANCH/-/} + +cd gnuradio +GITREV="$(git rev-list --count HEAD)" + +# Scrape the version number from CMakeLists.txt +VERSION_MAJOR="$(cat CMakeLists.txt | grep "SET(VERSION_MAJOR" | tr -s ' ' | cut -d' ' -f2 | cut -d')' -f1)" +VERSION_API="$(cat CMakeLists.txt | grep "SET(VERSION_API" | tr -s ' ' | cut -d' ' -f2 | cut -d')' -f1)" +VERSION_ABI="$(cat CMakeLists.txt | grep "SET(VERSION_ABI" | tr -s ' ' | cut -d' ' -f2 | cut -d')' -f1)" +VERSION_PATCH="$(cat CMakeLists.txt | grep "SET(VERSION_PATCH" | tr -s ' ' | cut -d' ' -f2 | cut -d')' -f1)" + +# Remove '-' from the patch +VERSION_PATCH=${VERSION_PATCH/-/} + +VERSION_STRING=$VERSION_MAJOR"."$VERSION_API"."$VERSION_ABI"."$VERSION_PATCH +echo "Creating build for GNU Radio "$VERSION_STRING + +GIT_COMMIT="$(git log --pretty=oneline | head -n 1)" +echo $GIT_COMMIT + +# Tar.gz it +cd .. +cp -r gnuradio "gnuradio-$VERSION_STRING" +cd "gnuradio-$VERSION_STRING" +rm -rf .git +cd .. +tar cfJ rpmbuild/SOURCES/gnuradio_$VERSION_STRING~$GITBRANCH_CLEAN~$GITREV~$DISTRIBUTION.tar.xz gnuradio-$VERSION_STRING + +ls rpmbuild/SOURCES +ls + +sed -i 's/\%{VERSION}/'$VERSION_STRING'/g' gnuradio.spec +sed -i 's/\%{RELEASE}/'$REV'/g' gnuradio.spec + +SOURCE="gnuradio_$VERSION_STRING~$GITBRANCH~$GITREV~fedora.tar.xz" +sed -i 's/\%{SOURCE}/'$SOURCE'/g' gnuradio.spec + +# build the source packages +rpmbuild \ + --define "_topdir %(pwd)" \ + --define "_builddir %{_topdir}/rpmbuild/BUILD" \ + --define "_buildrootdir %{_topdir}/rpmbuild/BUILDROOT" \ + --define "_rpmdir %{_topdir}/rpmbuild/RPMS" \ + --define "_srcrpmdir %{_topdir}/rpmbuild/SRPMS" \ + --define "_specdir %{_topdir}" \ + --define "_sourcedir %{_topdir}/rpmbuild/SOURCES" \ + -bs gnuradio.spec diff --git a/CHANGELOG.md b/CHANGELOG.md index 00ed1c0af79..012ee630a0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,15 @@ Older Logs can be found in `docs/RELEASE-NOTES-*`. ### Changed +- Moved PDU blocks from gr-blocks to gr-network and gr-pdu + - Compatibility shim included to allow access to these blocks from gr-blocks + but these are deprecated from the gr-blocks namespace and the shim is + scheduled for removal in 3.11. +- gr::blocks::pdu namespace has been reorganized in gr + - PDU vector types are accessible in gr::types + - PDU functions are accessible in gr::pdu + - Common msg port names are accessible in gr::ports + #### Project Scope - C++17 @@ -19,6 +28,8 @@ Older Logs can be found in `docs/RELEASE-NOTES-*`. ### Added +- New in-tree module gr-pdu + #### Misc. - dtools: Added run-clang-tidy-on-codebase, which does what the name suggests, diff --git a/CMakeLists.txt b/CMakeLists.txt index 01f31118e05..b65e37bec98 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -358,6 +358,9 @@ execute_process( COMMAND "${PYTHON_EXECUTABLE}" -c "try:\n import numpy\n import os\n inc_path = numpy.get_include()\n if os.path.exists(os.path.join(inc_path, 'numpy', 'arrayobject.h')):\n print(inc_path, end='')\nexcept:\n pass" OUTPUT_VARIABLE PYTHON_NUMPY_INCLUDE_DIR) +# format path in CMake-style for consistency with other path variables +# (a consistent style helps conda builds by using the same path separators) +file(TO_CMAKE_PATH "${PYTHON_NUMPY_INCLUDE_DIR}" PYTHON_NUMPY_INCLUDE_DIR) include(GrComponent) GR_REGISTER_COMPONENT("python-support" ENABLE_PYTHON @@ -478,6 +481,7 @@ add_subdirectory(gr-digital) add_subdirectory(gr-dtv) add_subdirectory(gr-audio) add_subdirectory(gr-channels) +add_subdirectory(gr-pdu) add_subdirectory(gr-qtgui) add_subdirectory(gr-trellis) add_subdirectory(gr-uhd) diff --git a/cmake/Modules/FindMPLIB.cmake b/cmake/Modules/FindMPLIB.cmake index 37673b136b7..daa381b6431 100644 --- a/cmake/Modules/FindMPLIB.cmake +++ b/cmake/Modules/FindMPLIB.cmake @@ -1,7 +1,7 @@ find_package(GMP) -find_package(MPIR) if(GMP_FOUND) + message(STATUS "Using GMP.") set(GR_MPLIB_GMP True) set(MPLIB_DEFINITIONS "-DGR_MPLIB_GMP" ${GMP_DEFINITIONS}) set(MPLIB_INCLUDE_DIR ${GMP_INCLUDE_DIR}) @@ -10,6 +10,9 @@ if(GMP_FOUND) set(MPLIB_PC_ADD_CFLAGS ${GMP_PC_ADD_CFLAGS}) set(MPLIB_PC_ADD_LIBS ${GMP_PC_ADD_LIBS}) else(GMP_FOUND) + message(STATUS "GMP not found; this is not a problem if MPIR can be found.") + find_package(MPIR REQUIRED) + message(STATUS "MPIR found") set(GR_MPLIB_MPIR True) set(MPLIB_DEFINITIONS "-DGR_MPLIB_MPIR" ${MPIR_DEFINITIONS}) set(MPLIB_INCLUDE_DIR ${MPIR_INCLUDE_DIR}) diff --git a/cmake/Modules/GnuradioConfig.cmake.in b/cmake/Modules/GnuradioConfig.cmake.in index 74815b9ee13..4e8ba901e2b 100644 --- a/cmake/Modules/GnuradioConfig.cmake.in +++ b/cmake/Modules/GnuradioConfig.cmake.in @@ -16,7 +16,6 @@ find_dependency(MPLIB) set(BOOST_REQUIRED_COMPONENTS date_time program_options - filesystem system regex thread @@ -84,6 +83,7 @@ set(GR_COMPONENTS dtv audio channels + pdu qtgui trellis uhd diff --git a/cmake/Modules/GrBoost.cmake b/cmake/Modules/GrBoost.cmake index f73dd856ad9..a48bb232d64 100644 --- a/cmake/Modules/GrBoost.cmake +++ b/cmake/Modules/GrBoost.cmake @@ -17,7 +17,6 @@ set(__INCLUDED_GR_BOOST_CMAKE TRUE) set(BOOST_REQUIRED_COMPONENTS date_time program_options - filesystem system regex thread diff --git a/docs/doxygen/Doxyfile.in b/docs/doxygen/Doxyfile.in index 7c2e3fc608b..b02047d3b6f 100644 --- a/docs/doxygen/Doxyfile.in +++ b/docs/doxygen/Doxyfile.in @@ -161,6 +161,8 @@ STRIP_FROM_INC_PATH = @CMAKE_SOURCE_DIR@/gnuradio-runtime/include \ @CMAKE_BINARY_DIR@/gr-fft/include \ @CMAKE_SOURCE_DIR@/gr-filter/include \ @CMAKE_BINARY_DIR@/gr-filter/include \ + @CMAKE_SOURCE_DIR@/gr-pdu/include \ + @CMAKE_BINARY_DIR@/gr-pdu/include \ @CMAKE_SOURCE_DIR@/gr-qtgui/include \ @CMAKE_BINARY_DIR@/gr-qtgui/include \ @CMAKE_SOURCE_DIR@/gr-trellis/include \ @@ -725,6 +727,7 @@ EXCLUDE = @abs_top_builddir@/cmake/msvc \ @abs_top_builddir@/gnuradio-runtime/python/gnuradio/gr/gr_threading.py \ @abs_top_builddir@/gnuradio-runtime/python/gnuradio/gr/gr_threading_23.py \ @abs_top_builddir@/gnuradio-runtime/python/gnuradio/gr/gr_threading_24.py \ + @abs_top_builddir@/gr-pdu/doc \ @abs_top_builddir@/gr-trellis/doc \ @abs_top_builddir@/grc \ @abs_top_builddir@/_CPack_Packages \ @@ -760,6 +763,8 @@ EXCLUDE = @abs_top_builddir@/cmake/msvc \ @abs_top_builddir@/gr-filter/lib \ @abs_top_srcdir@/gr-fft/lib \ @abs_top_builddir@/gr-fft/lib \ + @abs_top_srcdir@/gr-pdu/lib \ + @abs_top_builddir@/gr-pdu/lib \ @abs_top_srcdir@/gr-qtgui/lib \ @abs_top_builddir@/gr-qtgui/lib \ @abs_top_srcdir@/gr-trellis/lib \ diff --git a/docs/doxygen/other/group_defs.dox b/docs/doxygen/other/group_defs.dox index 7ec67bde23e..f0283404e2e 100644 --- a/docs/doxygen/other/group_defs.dox +++ b/docs/doxygen/other/group_defs.dox @@ -43,6 +43,7 @@ /*! \defgroup ofdm_blk OFDM Blocks */ /*! \defgroup packet_operators_blk Packet/Frame Operators */ /*! \defgroup peak_detectors_blk Peak Detectors */ +/*! \defgroup pdu_blk PDU Operators */ /*! \defgroup qtgui_blk QT Graphical Interfaces */ /*! \defgroup resamplers_blk Resamplers */ /*! \defgroup stream_operators_blk Streams Operators */ diff --git a/docs/usage-manual/(exported from wiki) Message Passing.txt b/docs/usage-manual/(exported from wiki) Message Passing.txt index 9abb0084a82..18dd28407e6 100644 --- a/docs/usage-manual/(exported from wiki) Message Passing.txt +++ b/docs/usage-manual/(exported from wiki) Message Passing.txt @@ -168,7 +168,7 @@ can call a block's gr::basic_block::_post method directly and pass it a message. So any block with an input message port can receive messages from the outside in this way. -The following example uses a gr::blocks::pdu_to_tagged_stream block +The following example uses a gr::pdu::pdu_to_tagged_stream block as the source block to a flowgraph. Its purpose is to wait for messages as PDUs posted to it and convert them to a normal stream. The payload will be sent on as a normal stream while the meta data will be @@ -229,7 +229,7 @@ However, there are some very good reasons to stick to this format: The following is snippets of code from blocks currently in GNU Radio that take advantage of message passing. We will be using -gr::blocks::message_debug and gr::blocks::tagged_stream_to_pdu below +gr::blocks::message_debug and gr::pdu::tagged_stream_to_pdu below to show setting up both input and output message passing capabilities. The gr::blocks::message_debug block is used for debugging the message @@ -284,7 +284,7 @@ The function simply takes in the PMT message and prints it. The method pmt::print is a function in the PMT library to print the PMT in a friendly and (mostly) pretty manner. -The gr::blocks::tagged_stream_to_pdu block only defines a single +The gr::pdu::tagged_stream_to_pdu block only defines a single output message port. In this case, its constructor contains the line: { @@ -306,7 +306,7 @@ dictionary while the data segment is a PMT uniform vector of either bytes, floats, or complex values. In the end, when a PDU message is ready, the block calls its -gr::blocks::tagged_stream_to_pdu_impl::send_message function that is +gr::pdu::tagged_stream_to_pdu_impl::send_message function that is shown below. @@ -335,14 +335,14 @@ is published that is important to this discussion. Here, the block posts the PDU message to any subscribers by calling gr::basic_block::message_port_pub publishing method. -There is similarly a gr::blocks::pdu_to_tagged_stream block that essentially +There is similarly a gr::pdu::pdu_to_tagged_stream block that essentially does the opposite. It acts as a source to a flowgraph and waits for PDU messages to be posted to it on its input port ''pdus''. It extracts the metadata and data and processes them. The metadata dictionary is split up into key:value pairs and stream tags are created out of them. The data is then converted into an output stream of items and passed along. The next section describes how PDUs can be passed into a -flowgraph using the gr::blocks::pdu_to_tagged_stream block. +flowgraph using the gr::pdu::pdu_to_tagged_stream block. === Python === @@ -367,4 +367,4 @@ A Python Block example: es5ic6domqmdirvs8232ksas04tdf0n - \ No newline at end of file + diff --git a/gnuradio-runtime/include/gnuradio/CMakeLists.txt b/gnuradio-runtime/include/gnuradio/CMakeLists.txt index 4789a71bbea..9f38af335ab 100644 --- a/gnuradio-runtime/include/gnuradio/CMakeLists.txt +++ b/gnuradio-runtime/include/gnuradio/CMakeLists.txt @@ -40,6 +40,7 @@ install(FILES msg_handler.h msg_queue.h nco.h + pdu.h prefs.h pycallback_object.h random.h diff --git a/gnuradio-runtime/include/gnuradio/logger.h b/gnuradio-runtime/include/gnuradio/logger.h index 31c763cc93a..4c7555f89b2 100644 --- a/gnuradio-runtime/include/gnuradio/logger.h +++ b/gnuradio-runtime/include/gnuradio/logger.h @@ -31,11 +31,11 @@ typedef int mode_t; #include #include #include -#include #include #include #include #include +#include #include #include diff --git a/gnuradio-runtime/include/gnuradio/pdu.h b/gnuradio-runtime/include/gnuradio/pdu.h new file mode 100644 index 00000000000..187f01abd07 --- /dev/null +++ b/gnuradio-runtime/include/gnuradio/pdu.h @@ -0,0 +1,46 @@ +/* -*- c++ -*- */ +/* + * Copyright 2013,2021 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + + +#ifndef INCLUDED_GR_PDU_H +#define INCLUDED_GR_PDU_H + +#include +#include + +namespace gr { +namespace msgport_names { +// static const PMT interned string getters for standard port names +GR_RUNTIME_API const pmt::pmt_t bpdu(); +GR_RUNTIME_API const pmt::pmt_t cpdu(); +GR_RUNTIME_API const pmt::pmt_t dict(); +GR_RUNTIME_API const pmt::pmt_t fpdu(); +GR_RUNTIME_API const pmt::pmt_t msg(); +GR_RUNTIME_API const pmt::pmt_t pdu(); +GR_RUNTIME_API const pmt::pmt_t pdus(); // compatibility, use of pdu() preferred +GR_RUNTIME_API const pmt::pmt_t vec(); +} /* namespace msgport_names */ + +namespace types { +enum vector_type { byte_t, short_t, int_t, float_t, complex_t }; +} /* namespace types */ + +namespace pdu { +// pdu functions +GR_RUNTIME_API size_t itemsize(types::vector_type type); +GR_RUNTIME_API bool type_matches(types::vector_type type, pmt::pmt_t v); +GR_RUNTIME_API pmt::pmt_t +make_pdu_vector(types::vector_type type, const uint8_t* buf, size_t items); +GR_RUNTIME_API types::vector_type type_from_pmt(pmt::pmt_t vector); + +} // namespace pdu +} // namespace gr + +#endif /* INCLUDED_GR_PDU_H */ diff --git a/gnuradio-runtime/include/gnuradio/thrift_application_base.h b/gnuradio-runtime/include/gnuradio/thrift_application_base.h index 370e50eabf7..c8bb8ed3f50 100644 --- a/gnuradio-runtime/include/gnuradio/thrift_application_base.h +++ b/gnuradio-runtime/include/gnuradio/thrift_application_base.h @@ -202,8 +202,8 @@ void thrift_application_base::start_application() "thrift", "init_attempts", d_default_max_init_attempts)); if (!p_impl->d_application_initialized) { - p_impl->d_start_thrift_thread.reset((new gr::thread::thread( - boost::bind(&thrift_application_base::start_thrift, d_application)))); + p_impl->d_start_thrift_thread = std::make_shared( + [app = d_application] { app->start_thrift(); }); bool app_started(false); for (unsigned int attempts(0); (!app_started && attempts < max_init_attempts); diff --git a/gnuradio-runtime/include/gnuradio/unittests.h b/gnuradio-runtime/include/gnuradio/unittests.h index 0627ee674b1..62e19a091e3 100644 --- a/gnuradio-runtime/include/gnuradio/unittests.h +++ b/gnuradio-runtime/include/gnuradio/unittests.h @@ -17,15 +17,13 @@ #ifndef _MSC_VER #include #endif +#include #include -#include -#include - static std::string get_unittest_path(const std::string& filename) { - boost::filesystem::path path = boost::filesystem::current_path() / ".unittests"; - if (!boost::filesystem::is_directory(path)) - boost::filesystem::create_directory(path); + std::filesystem::path path = std::filesystem::current_path() / ".unittests"; + if (!std::filesystem::is_directory(path)) + std::filesystem::create_directory(path); return (path / filename).string(); } diff --git a/gnuradio-runtime/lib/CMakeLists.txt b/gnuradio-runtime/lib/CMakeLists.txt index 5c1c8a1d503..9a6cd4488f8 100644 --- a/gnuradio-runtime/lib/CMakeLists.txt +++ b/gnuradio-runtime/lib/CMakeLists.txt @@ -72,6 +72,7 @@ add_library(gnuradio-runtime msg_handler.cc msg_queue.cc pagesize.cc + pdu.cc prefs.cc realtime.cc realtime_impl.cc @@ -203,7 +204,6 @@ target_link_libraries(gnuradio-runtime PUBLIC gnuradio-pmt Volk::volk Boost::program_options - Boost::filesystem Boost::system Boost::regex Boost::thread @@ -219,6 +219,9 @@ target_link_libraries(gnuradio-runtime PUBLIC Python::Python ) +# Address linker issues with std::filesystem on Centos 8 and Debian +target_link_libraries(gnuradio-runtime PUBLIC $<$,$,9.0>>:stdc++fs>) + target_include_directories(gnuradio-runtime PUBLIC ${PYTHON_NUMPY_INCLUDE_DIR} @@ -230,6 +233,9 @@ target_include_directories(gnuradio-runtime ${CMAKE_CURRENT_SOURCE_DIR} ) +# constants.cc includes boost::dll headers, force them to use std::filesystem +target_compile_definitions(gnuradio-runtime PRIVATE BOOST_DLL_USE_STD_FS) + if(ENABLE_GR_CTRLPORT) target_compile_definitions(gnuradio-runtime PUBLIC GR_CTRLPORT) endif() diff --git a/gnuradio-runtime/lib/constants.cc.in b/gnuradio-runtime/lib/constants.cc.in index 2c93d364493..33705a78bb7 100644 --- a/gnuradio-runtime/lib/constants.cc.in +++ b/gnuradio-runtime/lib/constants.cc.in @@ -15,7 +15,7 @@ #include #include #include -#include +#include namespace gr { @@ -26,28 +26,28 @@ const std::string prefix() if (prefix != NULL) return prefix; - boost::filesystem::path prefix_rel_lib = "@prefix_relative_to_lib@"; - boost::filesystem::path gr_runtime_lib_path = boost::dll::this_line_location(); + std::filesystem::path prefix_rel_lib = "@prefix_relative_to_lib@"; + std::filesystem::path gr_runtime_lib_path = boost::dll::this_line_location().string(); // Normalize before decomposing path so result is reliable - boost::filesystem::path prefix_path = + std::filesystem::path prefix_path = gr_runtime_lib_path.lexically_normal().parent_path() / prefix_rel_lib; return prefix_path.lexically_normal().string(); } const std::string sysconfdir() { - boost::filesystem::path sysconfdir_rel_prefix = "@SYSCONFDIR_relative_to_prefix@"; - boost::filesystem::path prefix_path = prefix(); - boost::filesystem::path sysconfdir_path = prefix_path / sysconfdir_rel_prefix; + std::filesystem::path sysconfdir_rel_prefix = "@SYSCONFDIR_relative_to_prefix@"; + std::filesystem::path prefix_path = prefix(); + std::filesystem::path sysconfdir_path = prefix_path / sysconfdir_rel_prefix; return sysconfdir_path.lexically_normal().string(); } const std::string prefsdir() { - boost::filesystem::path prefsdir_rel_prefix = "@GR_PREFSDIR_relative_to_prefix@"; - boost::filesystem::path prefix_path = prefix(); - boost::filesystem::path prefsdir_path = prefix_path / prefsdir_rel_prefix; + std::filesystem::path prefsdir_rel_prefix = "@GR_PREFSDIR_relative_to_prefix@"; + std::filesystem::path prefix_path = prefix(); + std::filesystem::path prefsdir_path = prefix_path / prefsdir_rel_prefix; return prefsdir_path.lexically_normal().string(); } diff --git a/gnuradio-runtime/lib/logger.cc b/gnuradio-runtime/lib/logger.cc index 4dbab39aa01..c344f050be1 100644 --- a/gnuradio-runtime/lib/logger.cc +++ b/gnuradio-runtime/lib/logger.cc @@ -56,11 +56,10 @@ unsigned int logger_config::get_watch_period() // Method to watch config file for changes void logger_config::watch_file(std::string filename, unsigned int watch_period) { - std::time_t last_write(boost::filesystem::last_write_time(filename)); - std::time_t current_time(0); + auto last_write = std::filesystem::last_write_time(filename); while (true) { try { - current_time = boost::filesystem::last_write_time(filename); + auto current_time = std::filesystem::last_write_time(filename); if (current_time > last_write) { // std::cout<<"GNURadio Reloading logger // configuration:"< +#include +#include + +namespace gr { +namespace msgport_names { + +const pmt::pmt_t bpdu() +{ + static const pmt::pmt_t val = pmt::mp("bpdu"); + return val; +} +const pmt::pmt_t cpdu() +{ + static const pmt::pmt_t val = pmt::mp("cpdu"); + return val; +} +const pmt::pmt_t dict() +{ + static const pmt::pmt_t val = pmt::mp("dict"); + return val; +} +const pmt::pmt_t fpdu() +{ + static const pmt::pmt_t val = pmt::mp("fpdu"); + return val; +} +const pmt::pmt_t msg() +{ + static const pmt::pmt_t val = pmt::mp("msg"); + return val; +} +const pmt::pmt_t pdu() +{ + static const pmt::pmt_t val = pmt::mp("pdu"); + return val; +} +const pmt::pmt_t pdus() +{ + static const pmt::pmt_t val = pmt::mp("pdus"); + return val; +} +const pmt::pmt_t vec() +{ + static const pmt::pmt_t val = pmt::mp("vec"); + return val; +} + +} /* namespace msgport_names */ + +namespace pdu { + +size_t itemsize(types::vector_type type) +{ + switch (type) { + case types::byte_t: + return sizeof(char); + case types::short_t: + return sizeof(short); + case types::int_t: + return sizeof(int); + case types::float_t: + return sizeof(float); + case types::complex_t: + return sizeof(gr_complex); + default: + throw std::runtime_error("bad PDU type"); + } +} + +bool type_matches(types::vector_type type, pmt::pmt_t v) +{ + switch (type) { + case types::byte_t: + return pmt::is_u8vector(v); + case types::short_t: + return pmt::is_s16vector(v); + case types::int_t: + return pmt::is_s32vector(v); + case types::float_t: + return pmt::is_f32vector(v); + case types::complex_t: + return pmt::is_c32vector(v); + default: + throw std::runtime_error("bad PDU type"); + } +} + +pmt::pmt_t make_pdu_vector(types::vector_type type, const uint8_t* buf, size_t items) +{ + switch (type) { + case types::byte_t: + return pmt::init_u8vector(items, buf); + case types::short_t: + return pmt::init_s16vector(items, (const short*)buf); + case types::int_t: + return pmt::init_s32vector(items, (const int*)buf); + case types::float_t: + return pmt::init_f32vector(items, (const float*)buf); + case types::complex_t: + return pmt::init_c32vector(items, (const gr_complex*)buf); + default: + throw std::runtime_error("bad PDU type"); + } +} + +types::vector_type type_from_pmt(pmt::pmt_t vector) +{ + if (pmt::is_u8vector(vector)) + return types::byte_t; + if (pmt::is_s16vector(vector)) + return types::short_t; + if (pmt::is_s32vector(vector)) + return types::int_t; + if (pmt::is_f32vector(vector)) + return types::float_t; + if (pmt::is_c32vector(vector)) + return types::complex_t; + throw std::runtime_error("bad PDU type"); +} + +} /* namespace pdu */ +} /* namespace gr */ diff --git a/gnuradio-runtime/lib/prefs.cc b/gnuradio-runtime/lib/prefs.cc index f87bb7a10c5..5b5557f9cc8 100644 --- a/gnuradio-runtime/lib/prefs.cc +++ b/gnuradio-runtime/lib/prefs.cc @@ -17,14 +17,12 @@ #include #include +#include #include #include -#include -#include -#include #include -namespace fs = boost::filesystem; +namespace fs = std::filesystem; namespace po = boost::program_options; typedef std::ifstream::char_type char_t; @@ -141,7 +139,7 @@ void prefs::save() { std::string conf = to_string(); fs::path userconf = fs::path(gr::userconf_path()) / "config.conf"; - fs::ofstream fout(userconf); + std::ofstream fout(userconf); fout << conf; fout.close(); } diff --git a/gnuradio-runtime/lib/sys_paths.cc b/gnuradio-runtime/lib/sys_paths.cc index 91d2ff12d8c..1ec46c9c40c 100644 --- a/gnuradio-runtime/lib/sys_paths.cc +++ b/gnuradio-runtime/lib/sys_paths.cc @@ -10,8 +10,7 @@ #include #include //P_tmpdir (maybe) #include //getenv - -#include +#include namespace gr { @@ -58,7 +57,7 @@ std::string __userconf_path() // First determine if there is an environment variable specifying the prefs path path = getenv("GR_PREFS_PATH"); - boost::filesystem::path p; + std::filesystem::path p; if (path) { p = path; } else { diff --git a/gnuradio-runtime/lib/vmcircbuf_prefs.cc b/gnuradio-runtime/lib/vmcircbuf_prefs.cc index 2ffa74c2356..80be2f59397 100644 --- a/gnuradio-runtime/lib/vmcircbuf_prefs.cc +++ b/gnuradio-runtime/lib/vmcircbuf_prefs.cc @@ -21,10 +21,8 @@ #include #include #include - -#include -#include -namespace fs = boost::filesystem; +#include +namespace fs = std::filesystem; namespace gr { diff --git a/gnuradio-runtime/python/gnuradio/__init__.py b/gnuradio-runtime/python/gnuradio/__init__.py index db7bc5cc484..45bc91bf4db 100644 --- a/gnuradio-runtime/python/gnuradio/__init__.py +++ b/gnuradio-runtime/python/gnuradio/__init__.py @@ -56,4 +56,6 @@ __path__.append(os.path.join(build_path, 'gr-fec', 'python')) __path__.append(os.path.join(build_path, 'gr-utils')) __path__.append(os.path.join(build_path, 'gr-uhd', 'python')) + __path__.append(os.path.join(build_path, 'gr-pdu', 'python')) + __path__.append(os.path.join(build_path, 'gr-network', 'python')) __path__.append(os.path.join(build_path, 'gr-zeromq', 'python')) diff --git a/gnuradio-runtime/python/gnuradio/gr/bindings/CMakeLists.txt b/gnuradio-runtime/python/gnuradio/gr/bindings/CMakeLists.txt index 17b1a305909..ef8f1f10ddb 100644 --- a/gnuradio-runtime/python/gnuradio/gr/bindings/CMakeLists.txt +++ b/gnuradio-runtime/python/gnuradio/gr/bindings/CMakeLists.txt @@ -42,6 +42,7 @@ messages/msg_queue_python.cc msg_handler_python.cc msg_queue_python.cc nco_python.cc + pdu_python.cc prefs_python.cc # pycallback_object_python.cc random_python.cc @@ -81,7 +82,7 @@ messages/msg_queue_python.cc # xoroshiro128p_python.cc python_bindings.cc) -GR_PYBIND_MAKE_CHECK_HASH(gr +GR_PYBIND_MAKE_CHECK_HASH(gr ../../../.. gr::gr "${gr_python_files}") diff --git a/gnuradio-runtime/python/gnuradio/gr/bindings/docstrings/pdu_pydoc_template.h b/gnuradio-runtime/python/gnuradio/gr/bindings/docstrings/pdu_pydoc_template.h new file mode 100644 index 00000000000..8ba6b5ddd02 --- /dev/null +++ b/gnuradio-runtime/python/gnuradio/gr/bindings/docstrings/pdu_pydoc_template.h @@ -0,0 +1,51 @@ +/* + * Copyright 2021 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_msgport_names_bpdu = R"doc()doc"; + + +static const char* __doc_gr_msgport_names_cpdu = R"doc()doc"; + + +static const char* __doc_gr_msgport_names_dict = R"doc()doc"; + + +static const char* __doc_gr_msgport_names_fpdu = R"doc()doc"; + + +static const char* __doc_gr_msgport_names_msg = R"doc()doc"; + + +static const char* __doc_gr_msgport_names_pdu = R"doc()doc"; + + +static const char* __doc_gr_msgport_names_pdus = R"doc()doc"; + + +static const char* __doc_gr_msgport_names_vec = R"doc()doc"; + + +static const char* __doc_gr_pdu_itemsize = R"doc()doc"; + + +static const char* __doc_gr_pdu_type_matches = R"doc()doc"; + + +static const char* __doc_gr_pdu_make_pdu_vector = R"doc()doc"; + + +static const char* __doc_gr_pdu_type_from_pmt = R"doc()doc"; diff --git a/gnuradio-runtime/python/gnuradio/gr/bindings/logger_python.cc b/gnuradio-runtime/python/gnuradio/gr/bindings/logger_python.cc index 2c59fcde785..1c5263a5bcf 100644 --- a/gnuradio-runtime/python/gnuradio/gr/bindings/logger_python.cc +++ b/gnuradio-runtime/python/gnuradio/gr/bindings/logger_python.cc @@ -14,7 +14,7 @@ /* BINDTOOL_GEN_AUTOMATIC(0) */ /* BINDTOOL_USE_PYGCCXML(0) */ /* BINDTOOL_HEADER_FILE(logger.h) */ -/* BINDTOOL_HEADER_FILE_HASH(92bf454f642caf2a1de6cdf3cbda722e) */ +/* BINDTOOL_HEADER_FILE_HASH(2a6f012c037ce0d331d09bcf2c3d600a) */ /***********************************************************************************/ #include diff --git a/gnuradio-runtime/python/gnuradio/gr/bindings/pdu_python.cc b/gnuradio-runtime/python/gnuradio/gr/bindings/pdu_python.cc new file mode 100644 index 00000000000..29af6036777 --- /dev/null +++ b/gnuradio-runtime/python/gnuradio/gr/bindings/pdu_python.cc @@ -0,0 +1,96 @@ +/* + * Copyright 2021 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(pdu.h) */ +/* BINDTOOL_HEADER_FILE_HASH(d5f32198890a9b1099e6b7ed492650f9) */ +/***********************************************************************************/ + +#include +#include +#include + +namespace py = pybind11; + +#include +// pydoc.h is automatically generated in the build directory +#include + +void bind_pdu(py::module& m) +{ + + py::module m_types = m.def_submodule("types"); + + py::enum_<::gr::types::vector_type>(m_types, "vector_type") + .value("byte_t", ::gr::types::byte_t) // 0 + .value("short_t", ::gr::types::short_t) // 1 + .value("int_t", ::gr::types::int_t) // 2 + .value("float_t", ::gr::types::float_t) // 3 + .value("complex_t", ::gr::types::complex_t) // 4 + .export_values(); + + py::implicitly_convertible(); + + + py::module m_msgport_names = m.def_submodule("msgport_names"); + + m_msgport_names.def("bpdu", &::gr::msgport_names::bpdu, D(msgport_names, bpdu)); + + + m_msgport_names.def("cpdu", &::gr::msgport_names::cpdu, D(msgport_names, cpdu)); + + + m_msgport_names.def("dict", &::gr::msgport_names::dict, D(msgport_names, dict)); + + + m_msgport_names.def("fpdu", &::gr::msgport_names::fpdu, D(msgport_names, fpdu)); + + + m_msgport_names.def("msg", &::gr::msgport_names::msg, D(msgport_names, msg)); + + + m_msgport_names.def("pdu", &::gr::msgport_names::pdu, D(msgport_names, pdu)); + + + m_msgport_names.def("pdus", &::gr::msgport_names::pdus, D(msgport_names, pdus)); + + + m_msgport_names.def("vec", &::gr::msgport_names::vec, D(msgport_names, vec)); + + + py::module m_pdu = m.def_submodule("pdu"); + + m_pdu.def("itemsize", &::gr::pdu::itemsize, py::arg("type"), D(pdu, itemsize)); + + + m_pdu.def("type_matches", + &::gr::pdu::type_matches, + py::arg("type"), + py::arg("v"), + D(pdu, type_matches)); + + + m_pdu.def("make_pdu_vector", + &::gr::pdu::make_pdu_vector, + py::arg("type"), + py::arg("buf"), + py::arg("items"), + D(pdu, make_pdu_vector)); + + + m_pdu.def("type_from_pmt", + &::gr::pdu::type_from_pmt, + py::arg("vector"), + D(pdu, type_from_pmt)); +} diff --git a/gnuradio-runtime/python/gnuradio/gr/bindings/python_bindings.cc b/gnuradio-runtime/python/gnuradio/gr/bindings/python_bindings.cc index 8307fa87900..c180116c80a 100644 --- a/gnuradio-runtime/python/gnuradio/gr/bindings/python_bindings.cc +++ b/gnuradio-runtime/python/gnuradio/gr/bindings/python_bindings.cc @@ -52,6 +52,7 @@ void bind_msg_queue(py::module&); void bind_msg_handler(py::module&); void bind_msg_queue(py::module&); void bind_nco(py::module&); +void bind_pdu(py::module&); void bind_prefs(py::module&); // void bind_pycallback_object(py::module&); void bind_random(py::module&); @@ -152,6 +153,7 @@ PYBIND11_MODULE(gr_python, m) bind_nco(m); + bind_pdu(m); bind_prefs(m); // // bind_pycallback_object(m); bind_random(m); diff --git a/gnuradio-runtime/python/gnuradio/gr/bindings/thrift_application_base_python.cc b/gnuradio-runtime/python/gnuradio/gr/bindings/thrift_application_base_python.cc index b7e5fa0f233..46f78f7fd0e 100644 --- a/gnuradio-runtime/python/gnuradio/gr/bindings/thrift_application_base_python.cc +++ b/gnuradio-runtime/python/gnuradio/gr/bindings/thrift_application_base_python.cc @@ -14,7 +14,7 @@ /* BINDTOOL_GEN_AUTOMATIC(0) */ /* BINDTOOL_USE_PYGCCXML(0) */ /* BINDTOOL_HEADER_FILE(thrift_application_base.h) */ -/* BINDTOOL_HEADER_FILE_HASH(6308813ad7a4fccf1d2baa9ab79a8634) */ +/* BINDTOOL_HEADER_FILE_HASH(a27f23a8d3fc9fff2ecc054d43abbcaa) */ /***********************************************************************************/ #include diff --git a/gnuradio-runtime/python/gnuradio/gr/qa_flowgraph.py b/gnuradio-runtime/python/gnuradio/gr/qa_flowgraph.py index 893b02cb07c..a59d0437a53 100644 --- a/gnuradio-runtime/python/gnuradio/gr/qa_flowgraph.py +++ b/gnuradio-runtime/python/gnuradio/gr/qa_flowgraph.py @@ -11,7 +11,7 @@ import time import pmt -from gnuradio import gr, gr_unittest, blocks +from gnuradio import gr, gr_unittest, blocks, pdu class test_flowgraph (gr_unittest.TestCase): @@ -27,7 +27,7 @@ def test_000(self): self.tb.start() self.tb.lock() - rem = blocks.pdu_remove(pmt.intern('foo')) + rem = pdu.pdu_remove(pmt.intern('foo')) dbg = blocks.message_debug() self.tb.msg_connect((rem, 'pdus'), (dbg, 'store')) diff --git a/gr-audio/lib/audio_registry.cc b/gr-audio/lib/audio_registry.cc index 5ca9c264f07..da26de6dd11 100644 --- a/gr-audio/lib/audio_registry.cc +++ b/gr-audio/lib/audio_registry.cc @@ -50,7 +50,7 @@ static std::vector& get_source_registry(void) #ifdef WIN32_FOUND s_registry.push_back( - register_source(REG_PRIO_HIGH, "windows", windows_source_fcn)); + register_source(REG_PRIO_LOW, "windows", windows_source_fcn)); #endif /* WIN32_FOUND */ src_reg = true; diff --git a/gr-blocks/examples/msg_passing/strobe.grc b/gr-blocks/examples/msg_passing/strobe.grc index e5208713ef8..6f599dff887 100644 --- a/gr-blocks/examples/msg_passing/strobe.grc +++ b/gr-blocks/examples/msg_passing/strobe.grc @@ -83,8 +83,8 @@ blocks: coordinate: [56, 180.0] rotation: 0 state: enabled -- name: blocks_pdu_to_tagged_stream_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_1 + id: pdu_pdu_to_tagged_stream parameters: affinity: '' alias: '' @@ -97,8 +97,8 @@ blocks: coordinate: [272, 188.0] rotation: 0 state: enabled -- name: blocks_tagged_stream_to_pdu_0 - id: blocks_tagged_stream_to_pdu +- name: pdu_tagged_stream_to_pdu_0 + id: pdu_tagged_stream_to_pdu parameters: affinity: '' alias: '' @@ -113,11 +113,11 @@ blocks: state: enabled connections: -- [blocks_copy_0, '0', blocks_tagged_stream_to_pdu_0, '0'] +- [blocks_copy_0, '0', pdu_tagged_stream_to_pdu_0, '0'] - [blocks_message_strobe_0, strobe, blocks_message_debug_0, print] -- [blocks_message_strobe_0_0, strobe, blocks_pdu_to_tagged_stream_0, pdus] -- [blocks_pdu_to_tagged_stream_0, '0', blocks_copy_0, '0'] -- [blocks_tagged_stream_to_pdu_0, pdus, blocks_message_debug_0, print_pdu] +- [blocks_message_strobe_0_0, strobe, pdu_pdu_to_tagged_stream_1, pdus] +- [pdu_pdu_to_tagged_stream_1, '0', blocks_copy_0, '0'] +- [pdu_tagged_stream_to_pdu_0, pdus, blocks_message_debug_0, print_pdu] metadata: file_format: 1 diff --git a/gr-blocks/grc/blocks.tree.yml b/gr-blocks/grc/blocks.tree.yml index c6a67cf39f1..6e36974084e 100644 --- a/gr-blocks/grc/blocks.tree.yml +++ b/gr-blocks/grc/blocks.tree.yml @@ -24,7 +24,6 @@ - blocks_vector_sink_x - blocks_tag_debug - blocks_message_debug - - blocks_random_pdu - blocks_message_strobe - blocks_message_strobe_random - blocks_tags_strobe @@ -87,13 +86,7 @@ - blocks_message_strobe - blocks_message_strobe_random - blocks_message_debug - - blocks_pdu_filter - - blocks_pdu_remove - - blocks_pdu_set - - blocks_pdu_to_tagged_stream - blocks_tagged_stream_multiply_length - - blocks_tagged_stream_to_pdu - - blocks_random_pdu - blocks_var_to_msg - blocks_msgpair_to_var - blocks_msg_meta_to_pair @@ -114,9 +107,6 @@ - Modulators: - blocks_vco_f - blocks_vco_c -- Networking Tools: - - blocks_tuntap_pdu - - blocks_socket_pdu - Peak Detectors: - blocks_burst_tagger - blocks_peak_detector_xb diff --git a/gr-blocks/grc/blocks_pdu_to_tagged_stream.block.yml b/gr-blocks/grc/blocks_pdu_to_tagged_stream.block.yml deleted file mode 100644 index ae7271f767a..00000000000 --- a/gr-blocks/grc/blocks_pdu_to_tagged_stream.block.yml +++ /dev/null @@ -1,37 +0,0 @@ -id: blocks_pdu_to_tagged_stream -label: PDU to Tagged Stream -flags: [ python, cpp ] - -parameters: -- id: type - label: Item Type - dtype: enum - options: [byte, complex, float] - option_attributes: - tv: [blocks.byte_t, blocks.complex_t, blocks.float_t] - hide: part -- id: tag - label: Length tag name - dtype: string - default: packet_len - -inputs: -- domain: message - id: pdus - -outputs: -- domain: stream - dtype: ${ type } - -templates: - imports: from gnuradio import blocks - make: blocks.pdu_to_tagged_stream(${type.tv}, ${tag}) - -cpp_templates: - includes: ['#include '] - declarations: 'blocks::pdu_to_tagged_stream::sptr ${id};' - make: 'this->${id} = blocks::pdu_to_tagged_stream::make(${type.tv}, ${tag});' - translations: - blocks.: 'blocks::' - -file_format: 1 diff --git a/gr-blocks/include/gnuradio/blocks/CMakeLists.txt b/gr-blocks/include/gnuradio/blocks/CMakeLists.txt index 9f887922215..cadc355f7a0 100644 --- a/gr-blocks/include/gnuradio/blocks/CMakeLists.txt +++ b/gr-blocks/include/gnuradio/blocks/CMakeLists.txt @@ -112,13 +112,7 @@ install(FILES or_blk.h pack_k_bits_bb.h patterned_interleaver.h - pdu.h - pdu_filter.h - pdu_set.h - pdu_remove.h - pdu_to_tagged_stream.h peak_detector2_fb.h - random_pdu.h plateau_detector_fb.h probe_rate.h regenerate_bb.h @@ -130,7 +124,6 @@ install(FILES short_to_char.h short_to_float.h skiphead.h - socket_pdu.h stream_demux.h stream_mux.h stream_to_streams.h @@ -146,14 +139,12 @@ install(FILES tagged_stream_align.h tagged_stream_mux.h tagged_stream_multiply_length.h - tagged_stream_to_pdu.h tags_strobe.h tcp_server_sink.h test_tag_variable_rate_ff.h threshold_ff.h throttle.h transcendental.h - tuntap_pdu.h uchar_to_float.h udp_sink.h udp_source.h diff --git a/gr-blocks/include/gnuradio/blocks/message_debug.h b/gr-blocks/include/gnuradio/blocks/message_debug.h index 14ded692f4a..fb7263faf30 100644 --- a/gr-blocks/include/gnuradio/blocks/message_debug.h +++ b/gr-blocks/include/gnuradio/blocks/message_debug.h @@ -52,7 +52,7 @@ class BLOCKS_API message_debug : virtual public block /*! * \brief Reports the number of messages received by this block. */ - virtual int num_messages() = 0; + virtual size_t num_messages() = 0; /*! * \brief Get a message (as a PMT) from the message vector at index \p i. @@ -67,7 +67,7 @@ class BLOCKS_API message_debug : virtual public block * * \return a message at index \p i as a pmt_t. */ - virtual pmt::pmt_t get_message(int i) = 0; + virtual pmt::pmt_t get_message(size_t i) = 0; /*! * \brief Enables or disables printing of PDU uniform vector data. diff --git a/gr-blocks/include/gnuradio/blocks/pdu.h b/gr-blocks/include/gnuradio/blocks/pdu.h deleted file mode 100644 index 5a54c9afe0c..00000000000 --- a/gr-blocks/include/gnuradio/blocks/pdu.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2013 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * SPDX-License-Identifier: GPL-3.0-or-later - * - */ - -#ifndef INCLUDED_BLOCKS_PDU_H -#define INCLUDED_BLOCKS_PDU_H - -#include -#include -#include - - -namespace gr { -namespace blocks { -namespace pdu { -enum vector_type { byte_t, float_t, complex_t }; - -BLOCKS_API const pmt::pmt_t pdu_port_id(); -BLOCKS_API size_t itemsize(vector_type type); -BLOCKS_API bool type_matches(vector_type type, pmt::pmt_t v); -BLOCKS_API pmt::pmt_t make_pdu_vector(vector_type type, const uint8_t* buf, size_t items); -BLOCKS_API vector_type type_from_pmt(pmt::pmt_t vector); - -} /* namespace pdu */ -} /* namespace blocks */ -} /* namespace gr */ - -#endif /* INCLUDED_BLOCKS_PDU_H */ diff --git a/gr-blocks/lib/CMakeLists.txt b/gr-blocks/lib/CMakeLists.txt index bfe3eaa91e6..d9dd44692cf 100644 --- a/gr-blocks/lib/CMakeLists.txt +++ b/gr-blocks/lib/CMakeLists.txt @@ -115,14 +115,8 @@ set(BLOCKS_SOURCES null_source_impl.cc pack_k_bits_bb_impl.cc patterned_interleaver_impl.cc - pdu.cc tag_debug_impl.cc - pdu_filter_impl.cc - pdu_set_impl.cc - pdu_remove_impl.cc - pdu_to_tagged_stream_impl.cc peak_detector2_fb_impl.cc - random_pdu_impl.cc plateau_detector_fb_impl.cc probe_rate_impl.cc regenerate_bb_impl.cc @@ -134,10 +128,8 @@ set(BLOCKS_SOURCES short_to_char_impl.cc short_to_float_impl.cc skiphead_impl.cc - socket_pdu_impl.cc stream_demux_impl.cc stream_mux_impl.cc - stream_pdu_base.cc stream_to_streams_impl.cc stream_to_tagged_stream_impl.cc stream_to_vector_impl.cc @@ -146,16 +138,13 @@ set(BLOCKS_SOURCES stretch_ff_impl.cc tag_share_impl.cc tagged_file_sink_impl.cc - tagged_stream_to_pdu_impl.cc tagged_stream_multiply_length_impl.cc tags_strobe_impl.cc test_tag_variable_rate_ff_impl.cc threshold_ff_impl.cc throttle_impl.cc transcendental_impl.cc - tcp_connection.cc tcp_server_sink_impl.cc - tuntap_pdu_impl.cc tag_gate_impl.cc tagged_stream_align_impl.cc tagged_stream_mux_impl.cc diff --git a/gr-blocks/lib/correctiq_auto_impl.cc b/gr-blocks/lib/correctiq_auto_impl.cc index efd97a540eb..784a2d69985 100644 --- a/gr-blocks/lib/correctiq_auto_impl.cc +++ b/gr-blocks/lib/correctiq_auto_impl.cc @@ -123,11 +123,13 @@ float correctiq_auto_impl::get_gain() const { return d_gain; } void correctiq_auto_impl::set_freq(double new_value) { + d_freq = new_value; trigger_resync("Frequency change detected"); } void correctiq_auto_impl::set_gain(float new_value) { + d_gain = new_value; trigger_resync("Gain change detected"); } @@ -158,10 +160,10 @@ int correctiq_auto_impl::work(int noutput_items, const float* in = (const float*)input_items[0]; float* out = (float*)output_items[0]; - volk_32f_x2_add_32f(out, - in, - reinterpret_cast(d_volk_const_buffer.data()), - 2 * noutput_items); + volk_32f_x2_subtract_32f(out, + in, + reinterpret_cast(d_volk_const_buffer.data()), + 2 * noutput_items); } if (!d_synchronized && (d_sync_counter >= d_max_sync_samples)) { diff --git a/gr-blocks/lib/message_debug_impl.cc b/gr-blocks/lib/message_debug_impl.cc index 0dd2c834de9..d7bfd7edc2f 100644 --- a/gr-blocks/lib/message_debug_impl.cc +++ b/gr-blocks/lib/message_debug_impl.cc @@ -30,25 +30,27 @@ message_debug_impl::message_debug_impl(bool en_uvec) d_en_uvec(en_uvec) { message_port_register_in(pmt::mp("print")); - set_msg_handler(pmt::mp("print"), [this](pmt::pmt_t msg) { this->print(msg); }); + set_msg_handler(pmt::mp("print"), + [this](const pmt::pmt_t& msg) { this->print(msg); }); message_port_register_in(pmt::mp("store")); - set_msg_handler(pmt::mp("store"), [this](pmt::pmt_t msg) { this->store(msg); }); + set_msg_handler(pmt::mp("store"), + [this](const pmt::pmt_t& msg) { this->store(msg); }); message_port_register_in(pmt::mp("print_pdu")); set_msg_handler(pmt::mp("print_pdu"), - [this](pmt::pmt_t msg) { this->print_pdu(msg); }); + [this](const pmt::pmt_t& msg) { this->print_pdu(msg); }); } message_debug_impl::~message_debug_impl() {} -void message_debug_impl::print(pmt::pmt_t msg) +void message_debug_impl::print(const pmt::pmt_t& msg) { std::stringstream sout; if (pmt::is_pdu(msg)) { - pmt::pmt_t meta = pmt::car(msg); - pmt::pmt_t vector = pmt::cdr(msg); + const auto& meta = pmt::car(msg); + const auto& vector = pmt::cdr(msg); sout << "***** VERBOSE PDU DEBUG PRINT ******" << std::endl << pmt::write_string(meta) << std::endl; @@ -82,14 +84,14 @@ void message_debug_impl::print(pmt::pmt_t msg) std::cout << sout.str(); } -void message_debug_impl::store(pmt::pmt_t msg) +void message_debug_impl::store(const pmt::pmt_t& msg) { gr::thread::scoped_lock guard(d_mutex); d_messages.push_back(msg); } // ! DEPRECATED as of 3.10 use print() for all printing! -void message_debug_impl::print_pdu(pmt::pmt_t pdu) +void message_debug_impl::print_pdu(const pmt::pmt_t& pdu) { if (pmt::is_pdu(pdu)) { GR_LOG_INFO(d_logger, @@ -102,13 +104,17 @@ void message_debug_impl::print_pdu(pmt::pmt_t pdu) } } -int message_debug_impl::num_messages() { return (int)d_messages.size(); } +size_t message_debug_impl::num_messages() +{ + gr::thread::scoped_lock guard(d_mutex); + return d_messages.size(); +} -pmt::pmt_t message_debug_impl::get_message(int i) +pmt::pmt_t message_debug_impl::get_message(size_t i) { gr::thread::scoped_lock guard(d_mutex); - if ((size_t)i >= d_messages.size()) { + if (i >= d_messages.size()) { throw std::runtime_error("message_debug: index for message out of bounds."); } diff --git a/gr-blocks/lib/message_debug_impl.h b/gr-blocks/lib/message_debug_impl.h index b7eba501604..5027bfe7453 100644 --- a/gr-blocks/lib/message_debug_impl.h +++ b/gr-blocks/lib/message_debug_impl.h @@ -35,7 +35,7 @@ class message_debug_impl : public message_debug * * \param msg A pmt message passed from the scheduler's message handling. */ - void print(pmt::pmt_t msg); + void print(const pmt::pmt_t& msg); /*! * \brief PDU formatted messages received in this port are printed to stdout. @@ -49,7 +49,7 @@ class message_debug_impl : public message_debug * * \param pdu A PDU message passed from the scheduler's message handling. */ - void print_pdu(pmt::pmt_t pdu); + void print_pdu(const pmt::pmt_t& pdu); /*! * \brief Messages received in this port are stored in a vector. @@ -62,7 +62,7 @@ class message_debug_impl : public message_debug * * \param msg A pmt message passed from the scheduler's message handling. */ - void store(pmt::pmt_t msg); + void store(const pmt::pmt_t& msg); gr::thread::mutex d_mutex; std::vector d_messages; @@ -71,8 +71,8 @@ class message_debug_impl : public message_debug message_debug_impl(bool en_uvec); ~message_debug_impl() override; - int num_messages() override; - pmt::pmt_t get_message(int i) override; + size_t num_messages() override; + pmt::pmt_t get_message(size_t i) override; void set_vector_print(bool en) override { d_en_uvec = en; }; }; diff --git a/gr-blocks/lib/message_strobe_impl.cc b/gr-blocks/lib/message_strobe_impl.cc index f3b367542b4..8a65094ef14 100644 --- a/gr-blocks/lib/message_strobe_impl.cc +++ b/gr-blocks/lib/message_strobe_impl.cc @@ -41,7 +41,7 @@ message_strobe_impl::~message_strobe_impl() {} bool message_strobe_impl::start() { d_finished = false; - d_thread = gr::thread::thread(std::bind(&message_strobe_impl::run, this)); + d_thread = gr::thread::thread([this] { run(); }); return block::start(); } diff --git a/gr-blocks/lib/message_strobe_random_impl.cc b/gr-blocks/lib/message_strobe_random_impl.cc index 704070b48c3..c0c241e7342 100644 --- a/gr-blocks/lib/message_strobe_random_impl.cc +++ b/gr-blocks/lib/message_strobe_random_impl.cc @@ -50,7 +50,7 @@ message_strobe_random_impl::message_strobe_random_impl( { // set up ports message_port_register_out(d_port); - d_thread = gr::thread::thread(std::bind(&message_strobe_random_impl::run, this)); + d_thread = gr::thread::thread([this] { run(); }); message_port_register_in(pmt::mp("set_msg")); set_msg_handler(pmt::mp("set_msg"), [this](pmt::pmt_t msg) { this->set_msg(msg); }); diff --git a/gr-blocks/lib/pdu.cc b/gr-blocks/lib/pdu.cc deleted file mode 100644 index ec44a10e579..00000000000 --- a/gr-blocks/lib/pdu.cc +++ /dev/null @@ -1,82 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2013 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * SPDX-License-Identifier: GPL-3.0-or-later - * - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -namespace gr { -namespace blocks { -namespace pdu { - -const pmt::pmt_t pdu_port_id() -{ - static const pmt::pmt_t pdu_port_id = pmt::mp("pdus"); - return pdu_port_id; -} - -size_t itemsize(vector_type type) -{ - switch (type) { - case byte_t: - return sizeof(char); - case float_t: - return sizeof(float); - case complex_t: - return sizeof(gr_complex); - default: - throw std::runtime_error("bad PDU type"); - } -} - -bool type_matches(vector_type type, pmt::pmt_t v) -{ - switch (type) { - case byte_t: - return pmt::is_u8vector(v); - case float_t: - return pmt::is_f32vector(v); - case complex_t: - return pmt::is_c32vector(v); - default: - throw std::runtime_error("bad PDU type"); - } -} - -pmt::pmt_t make_pdu_vector(vector_type type, const uint8_t* buf, size_t items) -{ - switch (type) { - case byte_t: - return pmt::init_u8vector(items, buf); - case float_t: - return pmt::init_f32vector(items, (const float*)buf); - case complex_t: - return pmt::init_c32vector(items, (const gr_complex*)buf); - default: - throw std::runtime_error("bad PDU type"); - } -} - -vector_type type_from_pmt(pmt::pmt_t vector) -{ - if (pmt::is_u8vector(vector)) - return byte_t; - if (pmt::is_f32vector(vector)) - return float_t; - if (pmt::is_c32vector(vector)) - return complex_t; - throw std::runtime_error("bad PDU type"); -} - -} /* namespace pdu */ -} /* namespace blocks */ -} /* namespace gr */ diff --git a/gr-blocks/python/blocks/CMakeLists.txt b/gr-blocks/python/blocks/CMakeLists.txt index ab1176c7659..25ae7755d54 100644 --- a/gr-blocks/python/blocks/CMakeLists.txt +++ b/gr-blocks/python/blocks/CMakeLists.txt @@ -16,6 +16,7 @@ GR_PYTHON_INSTALL( msg_pair_to_var.py msg_meta_to_pair.py var_to_msg.py + pdu_compatibility.py # REMOVE IN 3.11 DESTINATION ${GR_PYTHON_DIR}/gnuradio/blocks ) diff --git a/gr-blocks/python/blocks/__init__.py b/gr-blocks/python/blocks/__init__.py index 270c26fd1a2..337380d8196 100644 --- a/gr-blocks/python/blocks/__init__.py +++ b/gr-blocks/python/blocks/__init__.py @@ -35,3 +35,6 @@ multiply_vff = multiply_ff multiply_vii = multiply_ii multiply_vss = multiply_ss + +# Compatibility layer for transition to gr-pdu. Scheduled for removal in 3.11. +from .pdu_compatibility import * diff --git a/gr-blocks/python/blocks/bindings/CMakeLists.txt b/gr-blocks/python/blocks/bindings/CMakeLists.txt index 257afe01198..28e9c225379 100644 --- a/gr-blocks/python/blocks/bindings/CMakeLists.txt +++ b/gr-blocks/python/blocks/bindings/CMakeLists.txt @@ -104,11 +104,6 @@ list(APPEND blocks_python_files pack_k_bits_bb_python.cc packed_to_unpacked_python.cc patterned_interleaver_python.cc - pdu_python.cc - pdu_filter_python.cc - pdu_remove_python.cc - pdu_set_python.cc - pdu_to_tagged_stream_python.cc peak_detector_python.cc peak_detector2_fb_python.cc phase_shift_python.cc @@ -116,7 +111,6 @@ list(APPEND blocks_python_files probe_rate_python.cc probe_signal_python.cc probe_signal_v_python.cc - random_pdu_python.cc regenerate_bb_python.cc repack_bits_bb_python.cc repeat_python.cc @@ -129,7 +123,6 @@ list(APPEND blocks_python_files short_to_char_python.cc short_to_float_python.cc skiphead_python.cc - socket_pdu_python.cc stream_demux_python.cc stream_mux_python.cc stream_to_streams_python.cc @@ -146,7 +139,6 @@ list(APPEND blocks_python_files tagged_stream_align_python.cc tagged_stream_multiply_length_python.cc tagged_stream_mux_python.cc - tagged_stream_to_pdu_python.cc tags_strobe_python.cc tcp_server_sink_python.cc test_tag_variable_rate_ff_python.cc @@ -154,7 +146,6 @@ list(APPEND blocks_python_files throttle_python.cc transcendental_python.cc tsb_vector_sink_python.cc - tuntap_pdu_python.cc uchar_to_float_python.cc udp_sink_python.cc udp_source_python.cc diff --git a/gr-blocks/python/blocks/bindings/docstrings/pdu_filter_pydoc_template.h b/gr-blocks/python/blocks/bindings/docstrings/pdu_filter_pydoc_template.h deleted file mode 100644 index a4e9d0d06b0..00000000000 --- a/gr-blocks/python/blocks/bindings/docstrings/pdu_filter_pydoc_template.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2020 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * SPDX-License-Identifier: GPL-3.0-or-later - * - */ -#include "pydoc_macros.h" -#define D(...) DOC(gr, blocks, __VA_ARGS__) -/* - This file contains placeholders for docstrings for the Python bindings. - Do not edit! These were automatically extracted during the binding process - and will be overwritten during the build process - */ - - -static const char* __doc_gr_blocks_pdu_filter = R"doc()doc"; - - -static const char* __doc_gr_blocks_pdu_filter_pdu_filter_0 = R"doc()doc"; - - -static const char* __doc_gr_blocks_pdu_filter_pdu_filter_1 = R"doc()doc"; - - -static const char* __doc_gr_blocks_pdu_filter_make = R"doc()doc"; - - -static const char* __doc_gr_blocks_pdu_filter_set_key = R"doc()doc"; - - -static const char* __doc_gr_blocks_pdu_filter_set_val = R"doc()doc"; - - -static const char* __doc_gr_blocks_pdu_filter_set_inversion = R"doc()doc"; diff --git a/gr-blocks/python/blocks/bindings/docstrings/pdu_pydoc_template.h b/gr-blocks/python/blocks/bindings/docstrings/pdu_pydoc_template.h deleted file mode 100644 index 8f16734a4c1..00000000000 --- a/gr-blocks/python/blocks/bindings/docstrings/pdu_pydoc_template.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2020 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * SPDX-License-Identifier: GPL-3.0-or-later - * - */ -#include "pydoc_macros.h" -#define D(...) DOC(gr, blocks, __VA_ARGS__) -/* - This file contains placeholders for docstrings for the Python bindings. - Do not edit! These were automatically extracted during the binding process - and will be overwritten during the build process - */ - - -static const char* __doc_gr_blocks_pdu_pdu_port_id = R"doc()doc"; - - -static const char* __doc_gr_blocks_pdu_itemsize = R"doc()doc"; - - -static const char* __doc_gr_blocks_pdu_type_matches = R"doc()doc"; - - -static const char* __doc_gr_blocks_pdu_make_pdu_vector = R"doc()doc"; - - -static const char* __doc_gr_blocks_pdu_type_from_pmt = R"doc()doc"; diff --git a/gr-blocks/python/blocks/bindings/docstrings/pdu_remove_pydoc_template.h b/gr-blocks/python/blocks/bindings/docstrings/pdu_remove_pydoc_template.h deleted file mode 100644 index 62b512fde5c..00000000000 --- a/gr-blocks/python/blocks/bindings/docstrings/pdu_remove_pydoc_template.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2020 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * SPDX-License-Identifier: GPL-3.0-or-later - * - */ -#include "pydoc_macros.h" -#define D(...) DOC(gr, blocks, __VA_ARGS__) -/* - This file contains placeholders for docstrings for the Python bindings. - Do not edit! These were automatically extracted during the binding process - and will be overwritten during the build process - */ - - -static const char* __doc_gr_blocks_pdu_remove = R"doc()doc"; - - -static const char* __doc_gr_blocks_pdu_remove_pdu_remove_0 = R"doc()doc"; - - -static const char* __doc_gr_blocks_pdu_remove_pdu_remove_1 = R"doc()doc"; - - -static const char* __doc_gr_blocks_pdu_remove_make = R"doc()doc"; - - -static const char* __doc_gr_blocks_pdu_remove_set_key = R"doc()doc"; diff --git a/gr-blocks/python/blocks/bindings/docstrings/pdu_set_pydoc_template.h b/gr-blocks/python/blocks/bindings/docstrings/pdu_set_pydoc_template.h deleted file mode 100644 index cbe2a27503a..00000000000 --- a/gr-blocks/python/blocks/bindings/docstrings/pdu_set_pydoc_template.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2020 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * SPDX-License-Identifier: GPL-3.0-or-later - * - */ -#include "pydoc_macros.h" -#define D(...) DOC(gr, blocks, __VA_ARGS__) -/* - This file contains placeholders for docstrings for the Python bindings. - Do not edit! These were automatically extracted during the binding process - and will be overwritten during the build process - */ - - -static const char* __doc_gr_blocks_pdu_set = R"doc()doc"; - - -static const char* __doc_gr_blocks_pdu_set_pdu_set_0 = R"doc()doc"; - - -static const char* __doc_gr_blocks_pdu_set_pdu_set_1 = R"doc()doc"; - - -static const char* __doc_gr_blocks_pdu_set_make = R"doc()doc"; - - -static const char* __doc_gr_blocks_pdu_set_set_key = R"doc()doc"; - - -static const char* __doc_gr_blocks_pdu_set_set_val = R"doc()doc"; diff --git a/gr-blocks/python/blocks/bindings/message_debug_python.cc b/gr-blocks/python/blocks/bindings/message_debug_python.cc index a351c8c968a..58d6d62ae09 100644 --- a/gr-blocks/python/blocks/bindings/message_debug_python.cc +++ b/gr-blocks/python/blocks/bindings/message_debug_python.cc @@ -14,7 +14,7 @@ /* BINDTOOL_GEN_AUTOMATIC(0) */ /* BINDTOOL_USE_PYGCCXML(0) */ /* BINDTOOL_HEADER_FILE(message_debug.h) */ -/* BINDTOOL_HEADER_FILE_HASH(27c3ba26dd33d2ecd535857d5ea26ed8) */ +/* BINDTOOL_HEADER_FILE_HASH(23b39e92e05151acfe9f9c5ed93c3c43) */ /***********************************************************************************/ #include diff --git a/gr-blocks/python/blocks/bindings/pdu_python.cc b/gr-blocks/python/blocks/bindings/pdu_python.cc deleted file mode 100644 index 89cd8a11a4d..00000000000 --- a/gr-blocks/python/blocks/bindings/pdu_python.cc +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2020 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * SPDX-License-Identifier: GPL-3.0-or-later - * - */ - -/***********************************************************************************/ -/* This file is automatically generated using bindtool and can be manually edited */ -/* The following lines can be configured to regenerate this file during cmake */ -/* If manual edits are made, the following tags should be modified accordingly. */ -/* BINDTOOL_GEN_AUTOMATIC(0) */ -/* BINDTOOL_USE_PYGCCXML(0) */ -/* BINDTOOL_HEADER_FILE(pdu.h) */ -/* BINDTOOL_HEADER_FILE_HASH(8c678dd50c4df86cbc74dc58b1b5010d) */ -/***********************************************************************************/ - -#include -#include -#include - -namespace py = pybind11; - -#include -// pydoc.h is automatically generated in the build directory -#include - -void bind_pdu(py::module& m) -{ - - - py::module m_pdu = m.def_submodule("pdu"); - - // TODO - clean up pdu subnamespace -- should these enums go under pdu, or under - // blocks? - py::enum_<::gr::blocks::pdu::vector_type>(m, "vector_type") - .value("byte_t", ::gr::blocks::pdu::byte_t) // 0 - .value("float_t", ::gr::blocks::pdu::float_t) // 1 - .value("complex_t", ::gr::blocks::pdu::complex_t) // 2 - .export_values(); - - py::implicitly_convertible(); - - m_pdu.def("pdu_port_id", &::gr::blocks::pdu::pdu_port_id, D(pdu, pdu_port_id)); - - - m_pdu.def( - "itemsize", &::gr::blocks::pdu::itemsize, py::arg("type"), D(pdu, itemsize)); - - - m_pdu.def("type_matches", - &::gr::blocks::pdu::type_matches, - py::arg("type"), - py::arg("v"), - D(pdu, type_matches)); - - - m_pdu.def("make_pdu_vector", - &::gr::blocks::pdu::make_pdu_vector, - py::arg("type"), - py::arg("buf"), - py::arg("items"), - D(pdu, make_pdu_vector)); - - - m_pdu.def("type_from_pmt", - &::gr::blocks::pdu::type_from_pmt, - py::arg("vector"), - D(pdu, type_from_pmt)); -} diff --git a/gr-blocks/python/blocks/bindings/python_bindings.cc b/gr-blocks/python/blocks/bindings/python_bindings.cc index 155ce38b195..a9435c71076 100644 --- a/gr-blocks/python/blocks/bindings/python_bindings.cc +++ b/gr-blocks/python/blocks/bindings/python_bindings.cc @@ -108,11 +108,6 @@ void bind_or_blk(py::module&); void bind_pack_k_bits_bb(py::module&); void bind_packed_to_unpacked(py::module&); void bind_patterned_interleaver(py::module&); -void bind_pdu(py::module&); -void bind_pdu_filter(py::module&); -void bind_pdu_remove(py::module&); -void bind_pdu_set(py::module&); -void bind_pdu_to_tagged_stream(py::module&); void bind_peak_detector(py::module&); void bind_peak_detector2_fb(py::module&); void bind_phase_shift(py::module&); @@ -120,7 +115,6 @@ void bind_plateau_detector_fb(py::module&); void bind_probe_rate(py::module&); void bind_probe_signal(py::module&); void bind_probe_signal_v(py::module&); -void bind_random_pdu(py::module&); void bind_regenerate_bb(py::module&); void bind_repack_bits_bb(py::module&); void bind_repeat(py::module&); @@ -133,7 +127,6 @@ void bind_selector(py::module&); void bind_short_to_char(py::module&); void bind_short_to_float(py::module&); void bind_skiphead(py::module&); -void bind_socket_pdu(py::module&); void bind_stream_demux(py::module&); void bind_stream_mux(py::module&); void bind_stream_to_streams(py::module&); @@ -150,7 +143,6 @@ void bind_tagged_file_sink(py::module&); void bind_tagged_stream_align(py::module&); void bind_tagged_stream_multiply_length(py::module&); void bind_tagged_stream_mux(py::module&); -void bind_tagged_stream_to_pdu(py::module&); void bind_tags_strobe(py::module&); void bind_tcp_server_sink(py::module&); void bind_test_tag_variable_rate_ff(py::module&); @@ -158,7 +150,6 @@ void bind_threshold_ff(py::module&); void bind_throttle(py::module&); void bind_transcendental(py::module&); void bind_tsb_vector_sink(py::module&); -void bind_tuntap_pdu(py::module&); void bind_uchar_to_float(py::module&); void bind_udp_sink(py::module&); void bind_udp_source(py::module&); @@ -292,18 +283,12 @@ PYBIND11_MODULE(blocks_python, m) bind_pack_k_bits_bb(m); bind_packed_to_unpacked(m); bind_patterned_interleaver(m); - bind_pdu(m); - bind_pdu_filter(m); - bind_pdu_remove(m); - bind_pdu_set(m); - bind_pdu_to_tagged_stream(m); bind_peak_detector(m); bind_peak_detector2_fb(m); bind_plateau_detector_fb(m); bind_probe_rate(m); bind_probe_signal(m); bind_probe_signal_v(m); - bind_random_pdu(m); bind_regenerate_bb(m); bind_repack_bits_bb(m); bind_repeat(m); @@ -316,7 +301,6 @@ PYBIND11_MODULE(blocks_python, m) bind_short_to_char(m); bind_short_to_float(m); bind_skiphead(m); - bind_socket_pdu(m); bind_stream_demux(m); bind_stream_mux(m); bind_stream_to_streams(m); @@ -333,7 +317,6 @@ PYBIND11_MODULE(blocks_python, m) bind_tagged_stream_align(m); bind_tagged_stream_multiply_length(m); bind_tagged_stream_mux(m); - bind_tagged_stream_to_pdu(m); bind_tags_strobe(m); bind_tcp_server_sink(m); bind_test_tag_variable_rate_ff(m); @@ -341,7 +324,6 @@ PYBIND11_MODULE(blocks_python, m) bind_throttle(m); bind_transcendental(m); bind_tsb_vector_sink(m); - bind_tuntap_pdu(m); bind_uchar_to_float(m); bind_udp_sink(m); bind_udp_source(m); diff --git a/gr-blocks/python/blocks/pdu_compatibility.py b/gr-blocks/python/blocks/pdu_compatibility.py new file mode 100644 index 00000000000..3d6af5f5483 --- /dev/null +++ b/gr-blocks/python/blocks/pdu_compatibility.py @@ -0,0 +1,60 @@ +# +# Copyright 2021 Jacob Gilbert +# +# This file is part of GNU Radio +# +# SPDX-License-Identifier: GPL-3.0-or-later +# +# + +''' +Compatibility layer for transition to gr-pdu. Scheduled for removal in 3.11. +''' + + +from gnuradio import gr, network, pdu + +######## PDU BLOCKS MOVED TO GR-PDU ######## + +class pdu_filter(pdu.pdu_filter): + def __init__(self, *args, **kwargs): + gr.log.warn('`pdu_filter` has moved to gr-pdu and will be removed from gr-blocks soon. Please update to use pdu.pdu_filter()') + pdu.pdu_filter.__init__(self, *args, **kwargs) + +class pdu_remove(pdu.pdu_remove): + def __init__(self, *args, **kwargs): + gr.log.warn('`pdu_remove` has moved to gr-pdu and will be removed from gr-blocks soon. Please update to use pdu.pdu_remove()') + pdu.pdu_remove.__init__(self, *args, **kwargs) + +class pdu_set(pdu.pdu_set): + def __init__(self, *args, **kwargs): + gr.log.warn('`pdu_set` has moved to gr-pdu and will be removed from gr-blocks soon. Please update to use pdu.pdu_set()') + pdu.pdu_set.__init__(self, *args, **kwargs) + +class pdu_to_tagged_stream(pdu.pdu_to_tagged_stream): + def __init__(self, *args, **kwargs): + gr.log.warn('`pdu_to_tagged_stream` has moved to gr-pdu and will be removed from gr-blocks soon. Please update to use pdu.pdu_to_tagged_stream()') + pdu.pdu_to_tagged_stream.__init__(self, *args, **kwargs) + +class random_pdu(pdu.random_pdu): + def __init__(self, *args, **kwargs): + gr.log.warn('`random_pdu` has moved to gr-pdu and will be removed from gr-blocks soon. Please update to use pdu.random_pdu()') + pdu.random_pdu.__init__(self, *args, **kwargs) + +class tagged_stream_to_pdu(pdu.tagged_stream_to_pdu): + def __init__(self, *args, **kwargs): + gr.log.warn('`tagged_stream_to_pdu` has moved to gr-pdu and will be removed from gr-blocks soon. Please update to use pdu.tagged_stream_to_pdu()') + pdu.tagged_stream_to_pdu.__init__(self, *args, **kwargs) + + +######## PDU BLOCKS MOVED TO GR-NETWORK ######## + +class socket_pdu(network.socket_pdu): + def __init__(self, *args, **kwargs): + gr.log.warn('`socket_pdu` has moved to gr-network and will be removed from gr-blocks soon. Please update to use network.socket_pdu()') + network.socket_pdu.__init__(self, *args, **kwargs) + +class tuntap_pdu(network.tuntap_pdu): + def __init__(self, *args, **kwargs): + gr.log.warn('`tuntap_pdu` has moved to gr-network and will be removed from gr-blocks soon. Please update to use network.tuntap_pdu()') + network.tuntap_pdu.__init__(self, *args, **kwargs) diff --git a/gr-digital/docs/packet_comms.dox b/gr-digital/docs/packet_comms.dox index bce0948301e..f853081e3d1 100644 --- a/gr-digital/docs/packet_comms.dox +++ b/gr-digital/docs/packet_comms.dox @@ -190,9 +190,9 @@ The following examples exist to showcase how to control each stage of the transmit processing. - tx_stage0.grc: simple creation of PDUs to input into the - transmitter. By default, this generates \ref gr::blocks::random_pdu + transmitter. By default, this generates \ref gr::pdu::random_pdu "random PDUs" for testing. However, we can switch in the \ref - gr::blocks::tuntap_pdu "TUNTAP PDU" block to create a tun or tap + gr::network::tuntap_pdu "TUNTAP PDU" block to create a tun or tap device as the input of samples from some OS application. Note that you will need root privileges to create a tun/tap device and configure it. diff --git a/gr-digital/examples/CMakeLists.txt b/gr-digital/examples/CMakeLists.txt index 5c0e8987809..6bba43656f7 100644 --- a/gr-digital/examples/CMakeLists.txt +++ b/gr-digital/examples/CMakeLists.txt @@ -22,6 +22,7 @@ GR_PYTHON_INSTALL(PROGRAMS install( FILES burst_shaper.grc + mpsk_stage6.grc DESTINATION ${GR_PKG_DIGITAL_EXAMPLES_DIR} ) diff --git a/gr-digital/examples/burst_shaper.grc b/gr-digital/examples/burst_shaper.grc index 34ac8bea7da..1deb67ed78f 100644 --- a/gr-digital/examples/burst_shaper.grc +++ b/gr-digital/examples/burst_shaper.grc @@ -99,8 +99,8 @@ blocks: coordinate: [704, 388.0] rotation: 0 state: enabled -- name: blocks_tagged_stream_to_pdu_0 - id: blocks_tagged_stream_to_pdu +- name: pdu_tagged_stream_to_pdu_0 + id: pdu_tagged_stream_to_pdu parameters: affinity: '' alias: '' @@ -113,8 +113,8 @@ blocks: coordinate: [704, 188.0] rotation: 0 state: enabled -- name: blocks_tagged_stream_to_pdu_1 - id: blocks_tagged_stream_to_pdu +- name: pdu_tagged_stream_to_pdu_1 + id: pdu_tagged_stream_to_pdu parameters: affinity: '' alias: '' @@ -253,12 +253,12 @@ blocks: state: enabled connections: -- [blocks_tagged_stream_to_pdu_0, pdus, blocks_message_debug_0, print] -- [blocks_tagged_stream_to_pdu_1, pdus, blocks_message_debug_0_0, print] +- [pdu_tagged_stream_to_pdu_0, pdus, blocks_message_debug_0, print] +- [pdu_tagged_stream_to_pdu_1, pdus, blocks_message_debug_0_0, print] - [blocks_throttle_0, '0', blocks_tag_debug_0, '0'] -- [blocks_throttle_0, '0', blocks_tagged_stream_to_pdu_0, '0'] +- [blocks_throttle_0, '0', pdu_tagged_stream_to_pdu_0, '0'] - [blocks_throttle_0_0, '0', blocks_tag_debug_0_0, '0'] -- [blocks_throttle_0_0, '0', blocks_tagged_stream_to_pdu_1, '0'] +- [blocks_throttle_0_0, '0', pdu_tagged_stream_to_pdu_1, '0'] - [blocks_vector_source_x_0, '0', digital_burst_shaper_xx_0_0, '0'] - [blocks_vector_source_x_0_0, '0', digital_burst_shaper_xx_0, '0'] - [digital_burst_shaper_xx_0, '0', blocks_throttle_0, '0'] diff --git a/gr-digital/examples/packet/formatter_crc.grc b/gr-digital/examples/packet/formatter_crc.grc index 206c6608f80..45169cbc768 100644 --- a/gr-digital/examples/packet/formatter_crc.grc +++ b/gr-digital/examples/packet/formatter_crc.grc @@ -111,8 +111,8 @@ blocks: coordinate: [24, 293] rotation: 0 state: enabled -- name: blocks_pdu_to_tagged_stream_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0 + id: pdu_pdu_to_tagged_stream parameters: affinity: '' alias: '' @@ -125,8 +125,8 @@ blocks: coordinate: [56, 132] rotation: 0 state: enabled -- name: blocks_pdu_to_tagged_stream_0_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0_0 + id: pdu_pdu_to_tagged_stream parameters: affinity: '' alias: '' @@ -139,8 +139,8 @@ blocks: coordinate: [64, 420] rotation: 0 state: enabled -- name: blocks_random_pdu_0 - id: blocks_random_pdu +- name: pdu_random_pdu_0 + id: pdu_random_pdu parameters: affinity: '' alias: '' @@ -273,17 +273,17 @@ blocks: state: enabled connections: -- [blocks_message_strobe_0, strobe, blocks_random_pdu_0, generate] -- [blocks_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0, '0'] -- [blocks_pdu_to_tagged_stream_0_0, '0', digital_protocol_formatter_bb_0, '0'] -- [blocks_random_pdu_0, pdus, digital_crc32_async_bb_1, in] +- [blocks_message_strobe_0, strobe, pdu_random_pdu_0, generate] +- [pdu_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0, '0'] +- [pdu_pdu_to_tagged_stream_0_0, '0', digital_protocol_formatter_bb_0, '0'] +- [pdu_random_pdu_0, pdus, digital_crc32_async_bb_1, in] - [blocks_repack_bits_bb_0, '0', digital_protocol_parser_b_0, '0'] - [blocks_repack_bits_bb_0_0, '0', blocks_tag_debug_0, '0'] - [blocks_repack_bits_bb_0_0, '0', digital_protocol_parser_b_0_0, '0'] -- [digital_crc32_async_bb_1, out, blocks_pdu_to_tagged_stream_0_0, pdus] +- [digital_crc32_async_bb_1, out, pdu_pdu_to_tagged_stream_0_0, pdus] - [digital_crc32_async_bb_1, out, digital_protocol_formatter_async_0, in] - [digital_protocol_formatter_async_0, header, blocks_message_debug_0, print_pdu] -- [digital_protocol_formatter_async_0, header, blocks_pdu_to_tagged_stream_0, pdus] +- [digital_protocol_formatter_async_0, header, pdu_pdu_to_tagged_stream_0, pdus] - [digital_protocol_formatter_bb_0, '0', blocks_repack_bits_bb_0_0, '0'] - [digital_protocol_parser_b_0, info, blocks_message_debug_0_0, print] - [digital_protocol_parser_b_0_0, info, blocks_message_debug_0_0_0, print] diff --git a/gr-digital/examples/packet/formatter_ofdm.grc b/gr-digital/examples/packet/formatter_ofdm.grc index 7b406946e4a..8db82511ae9 100644 --- a/gr-digital/examples/packet/formatter_ofdm.grc +++ b/gr-digital/examples/packet/formatter_ofdm.grc @@ -175,8 +175,8 @@ blocks: coordinate: [24, 293] rotation: 0 state: enabled -- name: blocks_pdu_to_tagged_stream_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0 + id: pdu_pdu_to_tagged_stream parameters: affinity: '' alias: '' @@ -189,8 +189,8 @@ blocks: coordinate: [56, 132] rotation: 0 state: enabled -- name: blocks_pdu_to_tagged_stream_0_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0_0 + id: pdu_pdu_to_tagged_stream parameters: affinity: '' alias: '' @@ -203,8 +203,8 @@ blocks: coordinate: [64, 420] rotation: 0 state: enabled -- name: blocks_random_pdu_0 - id: blocks_random_pdu +- name: pdu_random_pdu_0 + id: pdu_random_pdu parameters: affinity: '' alias: '' @@ -337,17 +337,17 @@ blocks: state: enabled connections: -- [blocks_message_strobe_0, strobe, blocks_random_pdu_0, generate] -- [blocks_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0, '0'] -- [blocks_pdu_to_tagged_stream_0_0, '0', digital_protocol_formatter_bb_0, '0'] -- [blocks_random_pdu_0, pdus, digital_crc32_async_bb_1, in] +- [blocks_message_strobe_0, strobe, pdu_random_pdu_0, generate] +- [pdu_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0, '0'] +- [pdu_pdu_to_tagged_stream_0_0, '0', digital_protocol_formatter_bb_0, '0'] +- [pdu_random_pdu_0, pdus, digital_crc32_async_bb_1, in] - [blocks_repack_bits_bb_0, '0', digital_protocol_parser_b_0, '0'] - [blocks_repack_bits_bb_0_0, '0', blocks_tag_debug_0, '0'] - [blocks_repack_bits_bb_0_0, '0', digital_protocol_parser_b_0_0, '0'] -- [digital_crc32_async_bb_1, out, blocks_pdu_to_tagged_stream_0_0, pdus] +- [digital_crc32_async_bb_1, out, pdu_pdu_to_tagged_stream_0_0, pdus] - [digital_crc32_async_bb_1, out, digital_protocol_formatter_async_0, in] - [digital_protocol_formatter_async_0, header, blocks_message_debug_0, print_pdu] -- [digital_protocol_formatter_async_0, header, blocks_pdu_to_tagged_stream_0, pdus] +- [digital_protocol_formatter_async_0, header, pdu_pdu_to_tagged_stream_0, pdus] - [digital_protocol_formatter_bb_0, '0', blocks_repack_bits_bb_0_0, '0'] - [digital_protocol_parser_b_0, info, blocks_message_debug_0_0, print] - [digital_protocol_parser_b_0_0, info, blocks_message_debug_0_0_0, print] diff --git a/gr-digital/examples/packet/packet_loopback_hier.grc b/gr-digital/examples/packet/packet_loopback_hier.grc index 77c72a12492..7814b718cf7 100644 --- a/gr-digital/examples/packet/packet_loopback_hier.grc +++ b/gr-digital/examples/packet/packet_loopback_hier.grc @@ -439,8 +439,8 @@ blocks: coordinate: [72, 499] rotation: 0 state: enabled -- name: blocks_random_pdu_0 - id: blocks_random_pdu +- name: pdu_random_pdu_0 + id: pdu_random_pdu parameters: affinity: '' alias: '' @@ -1210,9 +1210,9 @@ blocks: state: enabled connections: -- [blocks_message_strobe_0, strobe, blocks_random_pdu_0, generate] +- [blocks_message_strobe_0, strobe, pdu_random_pdu_0, generate] - [blocks_multiply_const_vxx_0, '0', packet_rx_0, '0'] -- [blocks_random_pdu_0, pdus, packet_tx_0, in] +- [pdu_random_pdu_0, pdus, packet_tx_0, in] - [channels_channel_model_0, '0', chan_data, '0'] - [channels_channel_model_0, '0', qtgui_const_sink_x_0, '0'] - [channels_channel_model_0, '0', qtgui_freq_sink_x_0, '0'] diff --git a/gr-digital/examples/packet/packet_rx.grc b/gr-digital/examples/packet/packet_rx.grc index c231a012188..b95a0d29276 100644 --- a/gr-digital/examples/packet/packet_rx.grc +++ b/gr-digital/examples/packet/packet_rx.grc @@ -183,8 +183,8 @@ blocks: coordinate: [1320, 496.0] rotation: 180 state: enabled -- name: blocks_tagged_stream_to_pdu_0 - id: blocks_tagged_stream_to_pdu +- name: pdu_tagged_stream_to_pdu_0 + id: pdu_tagged_stream_to_pdu parameters: affinity: '' alias: '' @@ -694,8 +694,8 @@ blocks: connections: - [blocks_multiply_by_tag_value_cc_0, '0', digital_pfb_clock_sync_xxx_0, '0'] -- [blocks_tagged_stream_multiply_length_0, '0', blocks_tagged_stream_to_pdu_0, '0'] -- [blocks_tagged_stream_to_pdu_0, pdus, fec_async_decoder_0, in] +- [blocks_tagged_stream_multiply_length_0, '0', pdu_tagged_stream_to_pdu_0, '0'] +- [pdu_tagged_stream_to_pdu_0, pdus, fec_async_decoder_0, in] - [digital_constellation_soft_decoder_cf_0, '0', blocks_tagged_stream_multiply_length_0, '0'] - [digital_constellation_soft_decoder_cf_0_0, '0', fec_generic_decoder_0, '0'] diff --git a/gr-digital/examples/packet/packet_tx.grc b/gr-digital/examples/packet/packet_tx.grc index ce41403c335..5f676935a17 100644 --- a/gr-digital/examples/packet/packet_tx.grc +++ b/gr-digital/examples/packet/packet_tx.grc @@ -68,8 +68,8 @@ blocks: coordinate: [736, 444.0] rotation: 0 state: enabled -- name: blocks_pdu_to_tagged_stream_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0 + id: pdu_pdu_to_tagged_stream parameters: affinity: '' alias: '' @@ -85,8 +85,8 @@ blocks: coordinate: [544, 252.0] rotation: 0 state: enabled -- name: blocks_pdu_to_tagged_stream_0_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0_0 + id: pdu_pdu_to_tagged_stream parameters: affinity: '' alias: '' @@ -635,8 +635,8 @@ blocks: state: enabled connections: -- [blocks_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0_0, '0'] -- [blocks_pdu_to_tagged_stream_0_0, '0', blocks_repack_bits_bb_0, '0'] +- [pdu_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0_0, '0'] +- [pdu_pdu_to_tagged_stream_0_0, '0', blocks_repack_bits_bb_0, '0'] - [blocks_repack_bits_bb_0, '0', digital_map_bb_1, '0'] - [blocks_repack_bits_bb_0_0, '0', digital_map_bb_1_0, '0'] - [blocks_tagged_stream_multiply_length_0, '0', pad_sink_0, '0'] @@ -651,9 +651,9 @@ connections: - [digital_map_bb_1, '0', digital_chunks_to_symbols_xx_0, '0'] - [digital_map_bb_1_0, '0', digital_chunks_to_symbols_xx_0_0, '0'] - [digital_protocol_formatter_async_0, header, fec_async_encoder_0_0, in] -- [digital_protocol_formatter_async_0, payload, blocks_pdu_to_tagged_stream_0, pdus] +- [digital_protocol_formatter_async_0, payload, pdu_pdu_to_tagged_stream_0, pdus] - [fec_async_encoder_0, out, digital_protocol_formatter_async_0, in] -- [fec_async_encoder_0_0, out, blocks_pdu_to_tagged_stream_0_0, pdus] +- [fec_async_encoder_0_0, out, pdu_pdu_to_tagged_stream_0_0, pdus] - [pad_source_0, out, digital_crc32_async_bb_1, in] - [pfb_arb_resampler_xxx_0, '0', blocks_tagged_stream_multiply_length_0, '0'] - [rx_mod_header, '0', blocks_tagged_stream_mux_0, '0'] diff --git a/gr-digital/examples/packet/simple_bpsk_tx.grc b/gr-digital/examples/packet/simple_bpsk_tx.grc index 254c4950c9d..c11bfbac730 100644 --- a/gr-digital/examples/packet/simple_bpsk_tx.grc +++ b/gr-digital/examples/packet/simple_bpsk_tx.grc @@ -193,8 +193,8 @@ blocks: coordinate: [1072, 332.0] rotation: 0 state: enabled -- name: blocks_pdu_to_tagged_stream_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0 + id: pdu_pdu_to_tagged_stream parameters: affinity: '' alias: '' @@ -207,8 +207,8 @@ blocks: coordinate: [192, 244.0] rotation: 180 state: enabled -- name: blocks_random_pdu_0 - id: blocks_random_pdu +- name: pdu_random_pdu_0 + id: pdu_random_pdu parameters: affinity: '' alias: '' @@ -883,15 +883,15 @@ blocks: state: disabled connections: -- [blocks_message_strobe_0, strobe, blocks_random_pdu_0, generate] +- [blocks_message_strobe_0, strobe, pdu_random_pdu_0, generate] - [blocks_multiply_const_vxx_0, '0', blocks_tag_debug_0, '0'] - [blocks_multiply_const_vxx_0, '0', qtgui_const_sink_x_0, '0'] - [blocks_multiply_const_vxx_0, '0', qtgui_freq_sink_x_0, '0'] - [blocks_multiply_const_vxx_0, '0', qtgui_time_sink_x_1, '0'] - [blocks_multiply_const_vxx_0, '0', uhd_usrp_sink_0, '0'] -- [blocks_pdu_to_tagged_stream_0, '0', blocks_unpack_k_bits_bb_0, '0'] -- [blocks_random_pdu_0, pdus, blocks_message_debug_0, print_pdu] -- [blocks_random_pdu_0, pdus, blocks_pdu_to_tagged_stream_0, pdus] +- [pdu_pdu_to_tagged_stream_0, '0', blocks_unpack_k_bits_bb_0, '0'] +- [pdu_random_pdu_0, pdus, blocks_message_debug_0, print_pdu] +- [pdu_random_pdu_0, pdus, pdu_pdu_to_tagged_stream_0, pdus] - [blocks_tagged_stream_multiply_length_0, '0', fir_filter_xxx_0, '0'] - [blocks_unpack_k_bits_bb_0, '0', digital_chunks_to_symbols_xx_0, '0'] - [digital_chunks_to_symbols_xx_0, '0', interp_fir_filter_xxx_0, '0'] diff --git a/gr-digital/examples/packet/transmitter_sim_hier.grc b/gr-digital/examples/packet/transmitter_sim_hier.grc index 7c8ad34ffb2..97367527bd8 100644 --- a/gr-digital/examples/packet/transmitter_sim_hier.grc +++ b/gr-digital/examples/packet/transmitter_sim_hier.grc @@ -370,8 +370,8 @@ blocks: coordinate: [56, 211] rotation: 0 state: enabled -- name: blocks_random_pdu_0 - id: blocks_random_pdu +- name: pdu_random_pdu_0 + id: pdu_random_pdu parameters: affinity: '' alias: '' @@ -736,8 +736,8 @@ blocks: state: enabled connections: -- [blocks_message_strobe_0, strobe, blocks_random_pdu_0, generate] -- [blocks_random_pdu_0, pdus, packet_tx_0, in] +- [blocks_message_strobe_0, strobe, pdu_random_pdu_0, generate] +- [pdu_random_pdu_0, pdus, packet_tx_0, in] - [fir_filter_xxx_0, '0', qtgui_const_sink_x_0, '0'] - [fir_filter_xxx_0, '0', qtgui_freq_sink_x_0, '0'] - [fir_filter_xxx_0, '0', qtgui_time_sink_x_1, '0'] diff --git a/gr-digital/examples/packet/tx_stage0.grc b/gr-digital/examples/packet/tx_stage0.grc index 58236240cfa..e094e94258c 100644 --- a/gr-digital/examples/packet/tx_stage0.grc +++ b/gr-digital/examples/packet/tx_stage0.grc @@ -53,8 +53,8 @@ blocks: coordinate: [48, 140.0] rotation: 0 state: enabled -- name: blocks_random_pdu_0 - id: blocks_random_pdu +- name: pdu_random_pdu_0 + id: pdu_random_pdu parameters: affinity: '' alias: '' @@ -69,8 +69,8 @@ blocks: coordinate: [224, 124.0] rotation: 0 state: enabled -- name: blocks_tuntap_pdu_0 - id: blocks_tuntap_pdu +- name: network_tuntap_pdu_0 + id: network_tuntap_pdu parameters: affinity: '' alias: '' @@ -86,9 +86,9 @@ blocks: state: disabled connections: -- [blocks_message_strobe_0, strobe, blocks_random_pdu_0, generate] -- [blocks_random_pdu_0, pdus, blocks_message_debug_0, print_pdu] -- [blocks_tuntap_pdu_0, pdus, blocks_message_debug_0, print_pdu] +- [blocks_message_strobe_0, strobe, pdu_random_pdu_0, generate] +- [pdu_random_pdu_0, pdus, blocks_message_debug_0, print_pdu] +- [network_tuntap_pdu_0, pdus, blocks_message_debug_0, print_pdu] metadata: file_format: 1 diff --git a/gr-digital/examples/packet/tx_stage1.grc b/gr-digital/examples/packet/tx_stage1.grc index 698a29295d6..16fc6641c85 100644 --- a/gr-digital/examples/packet/tx_stage1.grc +++ b/gr-digital/examples/packet/tx_stage1.grc @@ -53,8 +53,8 @@ blocks: coordinate: [32, 156.0] rotation: 0 state: enabled -- name: blocks_random_pdu_0 - id: blocks_random_pdu +- name: pdu_random_pdu_0 + id: pdu_random_pdu parameters: affinity: '' alias: '' @@ -84,9 +84,9 @@ blocks: state: enabled connections: -- [blocks_message_strobe_0, strobe, blocks_random_pdu_0, generate] -- [blocks_random_pdu_0, pdus, blocks_message_debug_0, print_pdu] -- [blocks_random_pdu_0, pdus, digital_crc32_async_bb_1, in] +- [blocks_message_strobe_0, strobe, pdu_random_pdu_0, generate] +- [pdu_random_pdu_0, pdus, blocks_message_debug_0, print_pdu] +- [pdu_random_pdu_0, pdus, digital_crc32_async_bb_1, in] - [digital_crc32_async_bb_1, out, blocks_message_debug_0, print_pdu] metadata: diff --git a/gr-digital/examples/packet/tx_stage2.grc b/gr-digital/examples/packet/tx_stage2.grc index 049322d533a..190172f8e04 100644 --- a/gr-digital/examples/packet/tx_stage2.grc +++ b/gr-digital/examples/packet/tx_stage2.grc @@ -96,8 +96,8 @@ blocks: coordinate: [24, 108.0] rotation: 0 state: enabled -- name: blocks_random_pdu_0 - id: blocks_random_pdu +- name: pdu_random_pdu_0 + id: pdu_random_pdu parameters: affinity: '' alias: '' @@ -144,8 +144,8 @@ blocks: state: enabled connections: -- [blocks_message_strobe_0, strobe, blocks_random_pdu_0, generate] -- [blocks_random_pdu_0, pdus, digital_crc32_async_bb_1, in] +- [blocks_message_strobe_0, strobe, pdu_random_pdu_0, generate] +- [pdu_random_pdu_0, pdus, digital_crc32_async_bb_1, in] - [digital_crc32_async_bb_1, out, blocks_message_debug_0, print_pdu] - [digital_crc32_async_bb_1, out, fec_async_encoder_0, in] - [fec_async_encoder_0, out, blocks_message_debug_0, print_pdu] diff --git a/gr-digital/examples/packet/tx_stage3.grc b/gr-digital/examples/packet/tx_stage3.grc index c63556ee496..e5ba585724b 100644 --- a/gr-digital/examples/packet/tx_stage3.grc +++ b/gr-digital/examples/packet/tx_stage3.grc @@ -100,8 +100,8 @@ blocks: coordinate: [32, 107] rotation: 0 state: enabled -- name: blocks_random_pdu_0 - id: blocks_random_pdu +- name: pdu_random_pdu_0 + id: pdu_random_pdu parameters: affinity: '' alias: '' @@ -153,8 +153,8 @@ blocks: state: enabled connections: -- [blocks_message_strobe_0, strobe, blocks_random_pdu_0, generate] -- [blocks_random_pdu_0, pdus, digital_crc32_async_bb_1, in] +- [blocks_message_strobe_0, strobe, pdu_random_pdu_0, generate] +- [pdu_random_pdu_0, pdus, digital_crc32_async_bb_1, in] - [digital_crc32_async_bb_1, out, digital_protocol_formatter_async_0, in] - [digital_protocol_formatter_async_0, header, blocks_message_debug_0, print_pdu] - [digital_protocol_formatter_async_0, payload, blocks_message_debug_0, print_pdu] diff --git a/gr-digital/examples/packet/tx_stage4.grc b/gr-digital/examples/packet/tx_stage4.grc index 97d6250d208..552f83c2ce1 100644 --- a/gr-digital/examples/packet/tx_stage4.grc +++ b/gr-digital/examples/packet/tx_stage4.grc @@ -136,8 +136,8 @@ blocks: coordinate: [24, 99] rotation: 0 state: enabled -- name: blocks_pdu_to_tagged_stream_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0 + id: pdu_pdu_to_tagged_stream parameters: affinity: '' alias: '' @@ -153,8 +153,8 @@ blocks: coordinate: [312, 291] rotation: 0 state: enabled -- name: blocks_pdu_to_tagged_stream_0_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0_0 + id: pdu_pdu_to_tagged_stream parameters: affinity: '' alias: '' @@ -170,8 +170,8 @@ blocks: coordinate: [312, 219] rotation: 0 state: enabled -- name: blocks_random_pdu_0 - id: blocks_random_pdu +- name: pdu_random_pdu_0 + id: pdu_random_pdu parameters: affinity: '' alias: '' @@ -618,10 +618,10 @@ blocks: state: enabled connections: -- [blocks_message_strobe_0, strobe, blocks_random_pdu_0, generate] -- [blocks_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0_0, '0'] -- [blocks_pdu_to_tagged_stream_0_0, '0', blocks_repack_bits_bb_0, '0'] -- [blocks_random_pdu_0, pdus, digital_crc32_async_bb_1, in] +- [blocks_message_strobe_0, strobe, pdu_random_pdu_0, generate] +- [pdu_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0_0, '0'] +- [pdu_pdu_to_tagged_stream_0_0, '0', blocks_repack_bits_bb_0, '0'] +- [pdu_random_pdu_0, pdus, digital_crc32_async_bb_1, in] - [blocks_repack_bits_bb_0, '0', digital_map_bb_1, '0'] - [blocks_repack_bits_bb_0_0, '0', digital_map_bb_1_0, '0'] - [blocks_tagged_stream_mux_0, '0', qtgui_freq_sink_x_0, '0'] @@ -631,8 +631,8 @@ connections: - [digital_crc32_async_bb_1, out, digital_protocol_formatter_async_0, in] - [digital_map_bb_1, '0', digital_chunks_to_symbols_xx_0, '0'] - [digital_map_bb_1_0, '0', digital_chunks_to_symbols_xx_0_0, '0'] -- [digital_protocol_formatter_async_0, header, blocks_pdu_to_tagged_stream_0_0, pdus] -- [digital_protocol_formatter_async_0, payload, blocks_pdu_to_tagged_stream_0, pdus] +- [digital_protocol_formatter_async_0, header, pdu_pdu_to_tagged_stream_0_0, pdus] +- [digital_protocol_formatter_async_0, payload, pdu_pdu_to_tagged_stream_0, pdus] - [rx_mod_header, '0', blocks_tagged_stream_mux_0, '0'] - [rx_mod_payload, '0', blocks_tagged_stream_mux_0, '1'] diff --git a/gr-digital/examples/packet/tx_stage5.grc b/gr-digital/examples/packet/tx_stage5.grc index ef0e1b90a39..db8f47b5899 100644 --- a/gr-digital/examples/packet/tx_stage5.grc +++ b/gr-digital/examples/packet/tx_stage5.grc @@ -136,8 +136,8 @@ blocks: coordinate: [24, 99] rotation: 0 state: enabled -- name: blocks_pdu_to_tagged_stream_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0 + id: pdu_pdu_to_tagged_stream parameters: affinity: '' alias: '' @@ -153,8 +153,8 @@ blocks: coordinate: [312, 292.0] rotation: 0 state: enabled -- name: blocks_pdu_to_tagged_stream_0_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0_0 + id: pdu_pdu_to_tagged_stream parameters: affinity: '' alias: '' @@ -170,8 +170,8 @@ blocks: coordinate: [312, 220.0] rotation: 0 state: enabled -- name: blocks_random_pdu_0 - id: blocks_random_pdu +- name: pdu_random_pdu_0 + id: pdu_random_pdu parameters: affinity: '' alias: '' @@ -639,10 +639,10 @@ blocks: state: enabled connections: -- [blocks_message_strobe_0, strobe, blocks_random_pdu_0, generate] -- [blocks_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0_0, '0'] -- [blocks_pdu_to_tagged_stream_0_0, '0', blocks_repack_bits_bb_0, '0'] -- [blocks_random_pdu_0, pdus, digital_crc32_async_bb_1, in] +- [blocks_message_strobe_0, strobe, pdu_random_pdu_0, generate] +- [pdu_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0_0, '0'] +- [pdu_pdu_to_tagged_stream_0_0, '0', blocks_repack_bits_bb_0, '0'] +- [pdu_random_pdu_0, pdus, digital_crc32_async_bb_1, in] - [blocks_repack_bits_bb_0, '0', digital_map_bb_1, '0'] - [blocks_repack_bits_bb_0_0, '0', digital_map_bb_1_0, '0'] - [blocks_tagged_stream_mux_0, '0', digital_burst_shaper_xx_0, '0'] @@ -653,8 +653,8 @@ connections: - [digital_crc32_async_bb_1, out, digital_protocol_formatter_async_0, in] - [digital_map_bb_1, '0', digital_chunks_to_symbols_xx_0, '0'] - [digital_map_bb_1_0, '0', digital_chunks_to_symbols_xx_0_0, '0'] -- [digital_protocol_formatter_async_0, header, blocks_pdu_to_tagged_stream_0_0, pdus] -- [digital_protocol_formatter_async_0, payload, blocks_pdu_to_tagged_stream_0, pdus] +- [digital_protocol_formatter_async_0, header, pdu_pdu_to_tagged_stream_0_0, pdus] +- [digital_protocol_formatter_async_0, payload, pdu_pdu_to_tagged_stream_0, pdus] - [rx_mod_header, '0', blocks_tagged_stream_mux_0, '0'] - [rx_mod_payload, '0', blocks_tagged_stream_mux_0, '1'] diff --git a/gr-digital/examples/packet/tx_stage6.grc b/gr-digital/examples/packet/tx_stage6.grc index 0a1cbe3d377..db65cb2e2aa 100644 --- a/gr-digital/examples/packet/tx_stage6.grc +++ b/gr-digital/examples/packet/tx_stage6.grc @@ -212,8 +212,8 @@ blocks: coordinate: [24, 99] rotation: 0 state: enabled -- name: blocks_pdu_to_tagged_stream_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0 + id: pdu_pdu_to_tagged_stream parameters: affinity: '' alias: '' @@ -229,8 +229,8 @@ blocks: coordinate: [312, 291] rotation: 0 state: enabled -- name: blocks_pdu_to_tagged_stream_0_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0_0 + id: pdu_pdu_to_tagged_stream parameters: affinity: '' alias: '' @@ -246,8 +246,8 @@ blocks: coordinate: [312, 219] rotation: 0 state: enabled -- name: blocks_random_pdu_0 - id: blocks_random_pdu +- name: pdu_random_pdu_0 + id: pdu_random_pdu parameters: affinity: '' alias: '' @@ -736,10 +736,10 @@ blocks: state: enabled connections: -- [blocks_message_strobe_0, strobe, blocks_random_pdu_0, generate] -- [blocks_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0_0, '0'] -- [blocks_pdu_to_tagged_stream_0_0, '0', blocks_repack_bits_bb_0, '0'] -- [blocks_random_pdu_0, pdus, digital_crc32_async_bb_1, in] +- [blocks_message_strobe_0, strobe, pdu_random_pdu_0, generate] +- [pdu_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0_0, '0'] +- [pdu_pdu_to_tagged_stream_0_0, '0', blocks_repack_bits_bb_0, '0'] +- [pdu_random_pdu_0, pdus, digital_crc32_async_bb_1, in] - [blocks_repack_bits_bb_0, '0', digital_map_bb_1, '0'] - [blocks_repack_bits_bb_0_0, '0', digital_map_bb_1_0, '0'] - [blocks_tagged_stream_mux_0, '0', digital_burst_shaper_xx_0, '0'] @@ -749,8 +749,8 @@ connections: - [digital_crc32_async_bb_1, out, digital_protocol_formatter_async_0, in] - [digital_map_bb_1, '0', digital_chunks_to_symbols_xx_0, '0'] - [digital_map_bb_1_0, '0', digital_chunks_to_symbols_xx_0_0, '0'] -- [digital_protocol_formatter_async_0, header, blocks_pdu_to_tagged_stream_0_0, pdus] -- [digital_protocol_formatter_async_0, payload, blocks_pdu_to_tagged_stream_0, pdus] +- [digital_protocol_formatter_async_0, header, pdu_pdu_to_tagged_stream_0_0, pdus] +- [digital_protocol_formatter_async_0, payload, pdu_pdu_to_tagged_stream_0, pdus] - [pfb_arb_resampler_xxx_0, '0', qtgui_freq_sink_x_0, '0'] - [pfb_arb_resampler_xxx_0, '0', qtgui_time_sink_x_0, '0'] - [rx_mod_header, '0', blocks_tagged_stream_mux_0, '0'] diff --git a/gr-digital/examples/packet/tx_stage6a.grc b/gr-digital/examples/packet/tx_stage6a.grc index 90c38bd3a82..fe5507ca77e 100644 --- a/gr-digital/examples/packet/tx_stage6a.grc +++ b/gr-digital/examples/packet/tx_stage6a.grc @@ -228,8 +228,8 @@ blocks: coordinate: [24, 99] rotation: 0 state: enabled -- name: blocks_pdu_to_tagged_stream_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0 + id: pdu_pdu_to_tagged_stream parameters: affinity: '' alias: '' @@ -245,8 +245,8 @@ blocks: coordinate: [312, 291] rotation: 0 state: enabled -- name: blocks_pdu_to_tagged_stream_0_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0_0 + id: pdu_pdu_to_tagged_stream parameters: affinity: '' alias: '' @@ -262,8 +262,8 @@ blocks: coordinate: [312, 219] rotation: 0 state: enabled -- name: blocks_random_pdu_0 - id: blocks_random_pdu +- name: pdu_random_pdu_0 + id: pdu_random_pdu parameters: affinity: '' alias: '' @@ -771,10 +771,10 @@ blocks: state: enabled connections: -- [blocks_message_strobe_0, strobe, blocks_random_pdu_0, generate] -- [blocks_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0_0, '0'] -- [blocks_pdu_to_tagged_stream_0_0, '0', blocks_repack_bits_bb_0, '0'] -- [blocks_random_pdu_0, pdus, digital_crc32_async_bb_1, in] +- [blocks_message_strobe_0, strobe, pdu_random_pdu_0, generate] +- [pdu_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0_0, '0'] +- [pdu_pdu_to_tagged_stream_0_0, '0', blocks_repack_bits_bb_0, '0'] +- [pdu_random_pdu_0, pdus, digital_crc32_async_bb_1, in] - [blocks_repack_bits_bb_0, '0', digital_map_bb_1, '0'] - [blocks_repack_bits_bb_0_0, '0', digital_map_bb_1_0, '0'] - [blocks_tagged_stream_mux_0, '0', digital_burst_shaper_xx_0, '0'] @@ -784,8 +784,8 @@ connections: - [digital_crc32_async_bb_1, out, digital_protocol_formatter_async_0, in] - [digital_map_bb_1, '0', digital_chunks_to_symbols_xx_0, '0'] - [digital_map_bb_1_0, '0', digital_chunks_to_symbols_xx_0_0, '0'] -- [digital_protocol_formatter_async_0, header, blocks_pdu_to_tagged_stream_0_0, pdus] -- [digital_protocol_formatter_async_0, payload, blocks_pdu_to_tagged_stream_0, pdus] +- [digital_protocol_formatter_async_0, header, pdu_pdu_to_tagged_stream_0_0, pdus] +- [digital_protocol_formatter_async_0, payload, pdu_pdu_to_tagged_stream_0, pdus] - [fir_filter_xxx_0, '0', qtgui_freq_sink_x_0, '0'] - [fir_filter_xxx_0, '0', qtgui_time_sink_x_0, '0'] - [pfb_arb_resampler_xxx_0, '0', fir_filter_xxx_0, '0'] diff --git a/gr-digital/examples/packet/uhd_packet_rx_tun.grc b/gr-digital/examples/packet/uhd_packet_rx_tun.grc index e3259fd3aab..7c488550597 100644 --- a/gr-digital/examples/packet/uhd_packet_rx_tun.grc +++ b/gr-digital/examples/packet/uhd_packet_rx_tun.grc @@ -358,8 +358,8 @@ blocks: coordinate: [528, 307] rotation: 0 state: enabled -- name: blocks_tuntap_pdu_0 - id: blocks_tuntap_pdu +- name: network_tuntap_pdu_0 + id: network_tuntap_pdu parameters: affinity: '' alias: '' @@ -1184,7 +1184,7 @@ connections: - [packet_rx_0, '0', qtgui_const_sink_x_0_0_0, '0'] - [packet_rx_0, '1', qtgui_time_sink_x_1_0_0_1, '0'] - [packet_rx_0, pkt out, blocks_message_debug_0, print_pdu] -- [packet_rx_0, pkt out, blocks_tuntap_pdu_0, pdus] +- [packet_rx_0, pkt out, network_tuntap_pdu_0, pdus] - [uhd_usrp_source_0, '0', blocks_multiply_const_vxx_0, '0'] - [uhd_usrp_source_0, '0', blocks_multiply_const_vxx_1, '0'] - [uhd_usrp_source_0, '0', digital_fll_band_edge_cc_0, '0'] diff --git a/gr-digital/examples/packet/uhd_packet_tx.grc b/gr-digital/examples/packet/uhd_packet_tx.grc index a899c18fa9f..04885deeb9d 100644 --- a/gr-digital/examples/packet/uhd_packet_tx.grc +++ b/gr-digital/examples/packet/uhd_packet_tx.grc @@ -346,8 +346,8 @@ blocks: coordinate: [952, 211] rotation: 0 state: enabled -- name: blocks_random_pdu_0 - id: blocks_random_pdu +- name: pdu_random_pdu_0 + id: pdu_random_pdu parameters: affinity: '' alias: '' @@ -964,13 +964,13 @@ blocks: state: disabled connections: -- [blocks_message_strobe_0, strobe, blocks_random_pdu_0, generate] +- [blocks_message_strobe_0, strobe, pdu_random_pdu_0, generate] - [blocks_multiply_const_vxx_0, '0', blocks_tag_debug_0, '0'] - [blocks_multiply_const_vxx_0, '0', qtgui_const_sink_x_0, '0'] - [blocks_multiply_const_vxx_0, '0', qtgui_freq_sink_x_0, '0'] - [blocks_multiply_const_vxx_0, '0', qtgui_time_sink_x_1, '0'] - [blocks_multiply_const_vxx_0, '0', uhd_usrp_sink_0, '0'] -- [blocks_random_pdu_0, pdus, packet_tx_0, in] +- [pdu_random_pdu_0, pdus, packet_tx_0, in] - [packet_tx_0, '0', blocks_multiply_const_vxx_0, '0'] - [packet_tx_0, postcrc, blocks_message_debug_0, print_pdu] diff --git a/gr-digital/examples/packet/uhd_packet_tx_tun.grc b/gr-digital/examples/packet/uhd_packet_tx_tun.grc index 6a77395fef4..d456afe2414 100644 --- a/gr-digital/examples/packet/uhd_packet_tx_tun.grc +++ b/gr-digital/examples/packet/uhd_packet_tx_tun.grc @@ -348,8 +348,8 @@ blocks: coordinate: [1472, 275] rotation: 0 state: disabled -- name: blocks_tuntap_pdu_0 - id: blocks_tuntap_pdu +- name: network_tuntap_pdu_0 + id: network_tuntap_pdu parameters: affinity: '' alias: '' @@ -954,7 +954,7 @@ connections: - [blocks_multiply_const_vxx_0, '0', qtgui_freq_sink_x_0, '0'] - [blocks_multiply_const_vxx_0, '0', qtgui_time_sink_x_1, '0'] - [blocks_multiply_const_vxx_0, '0', uhd_usrp_sink_0, '0'] -- [blocks_tuntap_pdu_0, pdus, packet_tx_0, in] +- [network_tuntap_pdu_0, pdus, packet_tx_0, in] - [packet_tx_0, '0', blocks_multiply_const_vxx_0, '0'] - [packet_tx_0, postcrc, blocks_message_debug_0, print_pdu] diff --git a/gr-dtv/examples/uhd_atsc_rx.grc b/gr-dtv/examples/uhd_atsc_rx.grc index 77c8d711ca3..c22687e4ccb 100644 --- a/gr-dtv/examples/uhd_atsc_rx.grc +++ b/gr-dtv/examples/uhd_atsc_rx.grc @@ -189,7 +189,7 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [872, 556.0] + coordinate: [904, 556.0] rotation: 0 state: enabled - name: dc_blocker_xx_0 @@ -222,7 +222,7 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [144, 576.0] + coordinate: [120, 576.0] rotation: 0 state: enabled - name: dtv_atsc_depad_0 @@ -237,7 +237,7 @@ blocks: bus_sink: false bus_source: false bus_structure: null - coordinate: [736, 576.0] + coordinate: [752, 588.0] rotation: 0 state: enabled - name: dtv_atsc_derandomizer_0 @@ -870,14 +870,19 @@ connections: - [agc, '0', dtv_atsc_sync_0, '0'] - [dc_blocker_xx_0, '0', agc, '0'] - [dtv_atsc_deinterleaver_0, '0', dtv_atsc_rs_decoder_0, '0'] +- [dtv_atsc_deinterleaver_0, '1', dtv_atsc_rs_decoder_0, '1'] - [dtv_atsc_depad_0, '0', blocks_file_sink_0, '0'] - [dtv_atsc_derandomizer_0, '0', dtv_atsc_depad_0, '0'] - [dtv_atsc_equalizer_0, '0', dtv_atsc_viterbi_decoder_0, '0'] +- [dtv_atsc_equalizer_0, '1', dtv_atsc_viterbi_decoder_0, '1'] - [dtv_atsc_fpll_0, '0', dc_blocker_xx_0, '0'] - [dtv_atsc_fs_checker_0, '0', dtv_atsc_equalizer_0, '0'] +- [dtv_atsc_fs_checker_0, '1', dtv_atsc_equalizer_0, '1'] - [dtv_atsc_rs_decoder_0, '0', dtv_atsc_derandomizer_0, '0'] +- [dtv_atsc_rs_decoder_0, '1', dtv_atsc_derandomizer_0, '1'] - [dtv_atsc_sync_0, '0', dtv_atsc_fs_checker_0, '0'] - [dtv_atsc_viterbi_decoder_0, '0', dtv_atsc_deinterleaver_0, '0'] +- [dtv_atsc_viterbi_decoder_0, '1', dtv_atsc_deinterleaver_0, '1'] - [filter_fft_rrc_filter_0, '0', dtv_atsc_fpll_0, '0'] - [filter_fft_rrc_filter_0, '0', usrp_freq_sink, '1'] - [u, '0', filter_fft_rrc_filter_0, '0'] diff --git a/gr-dtv/grc/dtv_atsc_deinterleaver.block.yml b/gr-dtv/grc/dtv_atsc_deinterleaver.block.yml index 7628bc8bc23..de1febe8ab2 100644 --- a/gr-dtv/grc/dtv_atsc_deinterleaver.block.yml +++ b/gr-dtv/grc/dtv_atsc_deinterleaver.block.yml @@ -6,11 +6,19 @@ inputs: - domain: stream dtype: byte vlen: 207 +- domain: stream + label: plinfo + dtype: short + vlen: 2 outputs: - domain: stream dtype: byte vlen: 207 +- domain: stream + label: plinfo + dtype: short + vlen: 2 templates: imports: from gnuradio import dtv diff --git a/gr-dtv/grc/dtv_atsc_derandomizer.block.yml b/gr-dtv/grc/dtv_atsc_derandomizer.block.yml index 3329965030c..4949e8329d8 100644 --- a/gr-dtv/grc/dtv_atsc_derandomizer.block.yml +++ b/gr-dtv/grc/dtv_atsc_derandomizer.block.yml @@ -6,7 +6,11 @@ inputs: - domain: stream dtype: byte vlen: 188 - +- domain: stream + label: plinfo + dtype: short + vlen: 2 + outputs: - domain: stream dtype: byte diff --git a/gr-dtv/grc/dtv_atsc_equalizer.block.yml b/gr-dtv/grc/dtv_atsc_equalizer.block.yml index 3d55d85af71..b299f1e3b41 100644 --- a/gr-dtv/grc/dtv_atsc_equalizer.block.yml +++ b/gr-dtv/grc/dtv_atsc_equalizer.block.yml @@ -6,11 +6,19 @@ inputs: - domain: stream dtype: float vlen: 832 +- domain: stream + label: plinfo + dtype: short + vlen: 2 outputs: - domain: stream dtype: float vlen: 832 +- domain: stream + label: plinfo + dtype: short + vlen: 2 templates: imports: from gnuradio import dtv diff --git a/gr-dtv/grc/dtv_atsc_fs_checker.block.yml b/gr-dtv/grc/dtv_atsc_fs_checker.block.yml index 098a4403829..f8de6b9aa83 100644 --- a/gr-dtv/grc/dtv_atsc_fs_checker.block.yml +++ b/gr-dtv/grc/dtv_atsc_fs_checker.block.yml @@ -12,6 +12,11 @@ outputs: dtype: float vlen: 832 +- domain: stream + label: plinfo + dtype: short + vlen: 2 + templates: imports: from gnuradio import dtv make: dtv.atsc_fs_checker() diff --git a/gr-dtv/grc/dtv_atsc_rs_decoder.block.yml b/gr-dtv/grc/dtv_atsc_rs_decoder.block.yml index 08bb6393393..7f43752ade8 100644 --- a/gr-dtv/grc/dtv_atsc_rs_decoder.block.yml +++ b/gr-dtv/grc/dtv_atsc_rs_decoder.block.yml @@ -6,11 +6,19 @@ inputs: - domain: stream dtype: byte vlen: 207 +- domain: stream + label: plinfo + dtype: short + vlen: 2 outputs: - domain: stream dtype: byte vlen: 188 +- domain: stream + label: plinfo + dtype: short + vlen: 2 templates: imports: from gnuradio import dtv diff --git a/gr-dtv/grc/dtv_atsc_viterbi_decoder.block.yml b/gr-dtv/grc/dtv_atsc_viterbi_decoder.block.yml index 199560c9257..27a7f08d185 100644 --- a/gr-dtv/grc/dtv_atsc_viterbi_decoder.block.yml +++ b/gr-dtv/grc/dtv_atsc_viterbi_decoder.block.yml @@ -6,11 +6,19 @@ inputs: - domain: stream dtype: float vlen: 832 +- domain: stream + label: plinfo + dtype: short + vlen: 2 outputs: - domain: stream dtype: byte vlen: 207 +- domain: stream + label: plinfo + dtype: short + vlen: 2 templates: imports: from gnuradio import dtv diff --git a/gr-dtv/include/gnuradio/dtv/atsc_plinfo.h b/gr-dtv/include/gnuradio/dtv/atsc_plinfo.h index 4496ca80929..6d96fd32a59 100644 --- a/gr-dtv/include/gnuradio/dtv/atsc_plinfo.h +++ b/gr-dtv/include/gnuradio/dtv/atsc_plinfo.h @@ -12,8 +12,8 @@ #define DTV_INCLUDED_ATSC_PLINFO_H #include -#include #include +#include #include #include @@ -38,20 +38,6 @@ class DTV_API plinfo */ void reset(); - /** - * @brief Load the flags and segno from an endian safe value that came over the tags - * - * @param tag_value - */ - void from_tag_value(uint32_t tag_value); - - /** - * @brief Return an endian safe value containing the flags and segno - * - * @return uint32_t - */ - uint32_t get_tag_value() const; - // accessors bool field_sync1_p() const; bool field_sync2_p() const; diff --git a/gr-dtv/lib/atsc/atsc_deinterleaver_impl.cc b/gr-dtv/lib/atsc/atsc_deinterleaver_impl.cc index d83d0a625fc..df4ad5c2c0f 100644 --- a/gr-dtv/lib/atsc/atsc_deinterleaver_impl.cc +++ b/gr-dtv/lib/atsc/atsc_deinterleaver_impl.cc @@ -27,8 +27,10 @@ atsc_deinterleaver::sptr atsc_deinterleaver::make() atsc_deinterleaver_impl::atsc_deinterleaver_impl() : gr::sync_block( "atsc_deinterleaver", - io_signature::make(1, 1, ATSC_MPEG_RS_ENCODED_LENGTH * sizeof(uint8_t)), - io_signature::make(1, 1, ATSC_MPEG_RS_ENCODED_LENGTH * sizeof(uint8_t))), + io_signature::make2( + 2, 2, ATSC_MPEG_RS_ENCODED_LENGTH * sizeof(uint8_t), sizeof(plinfo)), + io_signature::make2( + 2, 2, ATSC_MPEG_RS_ENCODED_LENGTH * sizeof(uint8_t), sizeof(plinfo))), alignment_fifo(156) { m_fifo.reserve(s_interleavers); @@ -37,8 +39,6 @@ atsc_deinterleaver_impl::atsc_deinterleaver_impl() m_fifo.emplace_back((s_interleavers - 1 - i) * 4); sync(); - - set_tag_propagation_policy(TPP_CUSTOM); } atsc_deinterleaver_impl::~atsc_deinterleaver_impl() {} @@ -57,31 +57,20 @@ int atsc_deinterleaver_impl::work(int noutput_items, { auto in = static_cast(input_items[0]); auto out = static_cast(output_items[0]); + auto plin = static_cast(input_items[1]); + auto plout = static_cast(output_items[1]); - std::vector tags; - auto tag_pmt = pmt::intern("plinfo"); - for (int i = 0; i < noutput_items; i++) { - plinfo pli_in; - get_tags_in_window(tags, 0, i, i + 1, tag_pmt); - if (tags.size() > 0) { - pli_in.from_tag_value(pmt::to_uint64(tags[0].value)); - } else { - throw std::runtime_error( - "Atsc Deinterleaver: Plinfo Tag not found on sample"); - } - assert(pli_in.regular_seg_p()); + for (int i = 0; i < noutput_items; i++) { + assert(plin[i].regular_seg_p()); // reset commutator if required using INPUT pipeline info - if (pli_in.first_regular_seg_p()) + if (plin[i].first_regular_seg_p()) sync(); // remap OUTPUT pipeline info to reflect all data segment end-to-end delay - plinfo pli_out; - plinfo::delay(pli_out, pli_in, s_interleavers); - - add_item_tag( - 0, nitems_written(0) + i, tag_pmt, pmt::from_uint64(pli_out.get_tag_value())); + plout[i] = plinfo(); + plinfo::delay(plout[i], plin[i], s_interleavers); // now do the actual deinterleaving for (unsigned int j = 0; j < ATSC_MPEG_RS_ENCODED_LENGTH; j++) { diff --git a/gr-dtv/lib/atsc/atsc_derandomizer_impl.cc b/gr-dtv/lib/atsc/atsc_derandomizer_impl.cc index 33dcf47600e..b7f654a507b 100644 --- a/gr-dtv/lib/atsc/atsc_derandomizer_impl.cc +++ b/gr-dtv/lib/atsc/atsc_derandomizer_impl.cc @@ -26,11 +26,11 @@ atsc_derandomizer::sptr atsc_derandomizer::make() atsc_derandomizer_impl::atsc_derandomizer_impl() : gr::sync_block("dtv_atsc_derandomizer", - io_signature::make(1, 1, ATSC_MPEG_PKT_LENGTH * sizeof(uint8_t)), + io_signature::make2( + 2, 2, ATSC_MPEG_PKT_LENGTH * sizeof(uint8_t), sizeof(plinfo)), io_signature::make(1, 1, ATSC_MPEG_PKT_LENGTH * sizeof(uint8_t))) { d_rand.reset(); - set_tag_propagation_policy(TPP_DONT); } int atsc_derandomizer_impl::work(int noutput_items, @@ -39,20 +39,12 @@ int atsc_derandomizer_impl::work(int noutput_items, { auto in = static_cast(input_items[0]); auto out = static_cast(output_items[0]); + auto plin = static_cast(input_items[1]); - std::vector tags; - auto tag_pmt = pmt::intern("plinfo"); for (int i = 0; i < noutput_items; i++) { - plinfo pli_in; - get_tags_in_window(tags, 0, i, i + 1, tag_pmt); - if (tags.size() > 0) { - pli_in.from_tag_value(pmt::to_uint64(tags[0].value)); - } else { - throw std::runtime_error("Atsc Derandomizer: Plinfo Tag not found on sample"); - } - assert(pli_in.regular_seg_p()); + assert(plin[i].regular_seg_p()); - if (pli_in.first_regular_seg_p()) + if (plin[i].first_regular_seg_p()) d_rand.reset(); d_rand.derandomize(&out[i * ATSC_MPEG_PKT_LENGTH], &in[i * ATSC_MPEG_PKT_LENGTH]); @@ -60,7 +52,7 @@ int atsc_derandomizer_impl::work(int noutput_items, // Check the pipeline info for error status and and set the // corresponding bit in transport packet header. - if (pli_in.transport_error_p()) + if (plin[i].transport_error_p()) out[i * ATSC_MPEG_PKT_LENGTH + 1] |= MPEG_TRANSPORT_ERROR_BIT; else out[i * ATSC_MPEG_PKT_LENGTH + 1] &= ~MPEG_TRANSPORT_ERROR_BIT; diff --git a/gr-dtv/lib/atsc/atsc_equalizer_impl.cc b/gr-dtv/lib/atsc/atsc_equalizer_impl.cc index 5970fb5d63e..ae9c5f971c8 100644 --- a/gr-dtv/lib/atsc/atsc_equalizer_impl.cc +++ b/gr-dtv/lib/atsc/atsc_equalizer_impl.cc @@ -17,6 +17,7 @@ #include "atsc_types.h" #include #include +#include namespace gr { namespace dtv { @@ -52,20 +53,18 @@ static void init_field_sync_common(float* p, int mask) atsc_equalizer_impl::atsc_equalizer_impl() : gr::block("dtv_atsc_equalizer", - io_signature::make(1, 1, ATSC_DATA_SEGMENT_LENGTH * sizeof(float)), - io_signature::make(1, 1, ATSC_DATA_SEGMENT_LENGTH * sizeof(float))) + io_signature::make2( + 2, 2, ATSC_DATA_SEGMENT_LENGTH * sizeof(float), sizeof(plinfo)), + io_signature::make2( + 2, 2, ATSC_DATA_SEGMENT_LENGTH * sizeof(float), sizeof(plinfo))) { init_field_sync_common(training_sequence1, 0); init_field_sync_common(training_sequence2, 1); d_taps.resize(NTAPS, 0.0f); - d_buff_not_filled = true; - const int alignment_multiple = volk_get_alignment() / sizeof(float); set_alignment(std::max(1, alignment_multiple)); - - set_tag_propagation_policy(TPP_CUSTOM); // use manual tag propagation } atsc_equalizer_impl::~atsc_equalizer_impl() {} @@ -118,12 +117,13 @@ int atsc_equalizer_impl::general_work(int noutput_items, { auto in = static_cast(input_items[0]); auto out = static_cast(output_items[0]); + auto in_pl = static_cast(input_items[1]); + auto out_pl = static_cast(output_items[1]); int output_produced = 0; int i = 0; std::vector tags; - auto tag_pmt = pmt::intern("plinfo"); plinfo pli_in; if (d_buff_not_filled) { @@ -131,14 +131,9 @@ int atsc_equalizer_impl::general_work(int noutput_items, memcpy(&data_mem[NPRETAPS], in + i * ATSC_DATA_SEGMENT_LENGTH, ATSC_DATA_SEGMENT_LENGTH * sizeof(float)); - get_tags_in_window(tags, 0, 0, 1, tag_pmt); - if (tags.size() > 0) { - pli_in.from_tag_value(pmt::to_uint64(tags[0].value)); - d_flags = pli_in.flags(); - d_segno = pli_in.segno(); - } else { - throw std::runtime_error("Atsc Equalizer: Plinfo Tag not found on sample"); - } + + d_flags = in_pl[i].flags(); + d_segno = in_pl[i].segno(); d_buff_not_filled = false; i++; @@ -164,12 +159,7 @@ int atsc_equalizer_impl::general_work(int noutput_items, ATSC_DATA_SEGMENT_LENGTH * sizeof(float)); plinfo pli_out(d_flags, d_segno); - add_item_tag(0, - nitems_written(0) + output_produced, - tag_pmt, - pmt::from_uint64(pli_out.get_tag_value())); - - output_produced++; + out_pl[output_produced++] = pli_out; } memcpy(data_mem, &data_mem[ATSC_DATA_SEGMENT_LENGTH], NPRETAPS * sizeof(float)); @@ -177,14 +167,8 @@ int atsc_equalizer_impl::general_work(int noutput_items, in + i * ATSC_DATA_SEGMENT_LENGTH, ATSC_DATA_SEGMENT_LENGTH * sizeof(float)); - get_tags_in_window(tags, 0, i, i + 1, tag_pmt); - if (tags.size() > 0) { - pli_in.from_tag_value(pmt::to_uint64(tags[0].value)); - d_flags = pli_in.flags(); - d_segno = pli_in.segno(); - } else { - throw std::runtime_error("Atsc Equalizer: Plinfo Tag not found on sample"); - } + d_flags = in_pl[i].flags(); + d_segno = in_pl[i].segno(); } consume_each(noutput_items); diff --git a/gr-dtv/lib/atsc/atsc_equalizer_impl.h b/gr-dtv/lib/atsc/atsc_equalizer_impl.h index bf413518073..7977dbe20ef 100644 --- a/gr-dtv/lib/atsc/atsc_equalizer_impl.h +++ b/gr-dtv/lib/atsc/atsc_equalizer_impl.h @@ -44,7 +44,7 @@ class atsc_equalizer_impl : public atsc_equalizer unsigned short d_flags; short d_segno; - bool d_buff_not_filled; + bool d_buff_not_filled = true; public: atsc_equalizer_impl(); diff --git a/gr-dtv/lib/atsc/atsc_fs_checker_impl.cc b/gr-dtv/lib/atsc/atsc_fs_checker_impl.cc index cf00be36eea..82d15a8814f 100644 --- a/gr-dtv/lib/atsc/atsc_fs_checker_impl.cc +++ b/gr-dtv/lib/atsc/atsc_fs_checker_impl.cc @@ -36,9 +36,9 @@ atsc_fs_checker::sptr atsc_fs_checker::make() atsc_fs_checker_impl::atsc_fs_checker_impl() : gr::block("dtv_atsc_fs_checker", io_signature::make(1, 1, ATSC_DATA_SEGMENT_LENGTH * sizeof(float)), - io_signature::make(1, 1, ATSC_DATA_SEGMENT_LENGTH * sizeof(float))) + io_signature::make2( + 2, 2, ATSC_DATA_SEGMENT_LENGTH * sizeof(float), sizeof(plinfo))) { - gr::configure_default_loggers(d_logger, d_debug_logger, "dtv_atsc_fs_checker"); reset(); } @@ -59,13 +59,12 @@ int atsc_fs_checker_impl::general_work(int noutput_items, gr_vector_const_void_star& input_items, gr_vector_void_star& output_items) { - const float* in = static_cast(input_items[0]); - float* out = static_cast(output_items[0]); + auto in = static_cast(input_items[0]); + auto out = static_cast(output_items[0]); + auto out_pl = static_cast(output_items[1]); int output_produced = 0; - auto tag_pmt = pmt::intern("plinfo"); - for (int i = 0; i < noutput_items; i++) { // check for a hit on the PN 511 pattern int errors = 0; @@ -114,12 +113,7 @@ int atsc_fs_checker_impl::general_work(int noutput_items, d_field_num = 0; d_segment_num = 0; } else { - add_item_tag(0, - nitems_written(0) + output_produced, - tag_pmt, - pmt::from_uint64(pli_out.get_tag_value())); - - output_produced++; + out_pl[output_produced++] = pli_out; } } } diff --git a/gr-dtv/lib/atsc/atsc_plinfo.cc b/gr-dtv/lib/atsc/atsc_plinfo.cc index 3f14b0c7822..1610f8b9aae 100644 --- a/gr-dtv/lib/atsc/atsc_plinfo.cc +++ b/gr-dtv/lib/atsc/atsc_plinfo.cc @@ -22,18 +22,6 @@ void plinfo::reset() d_segno = 0; } -void plinfo::from_tag_value(uint32_t tag_value) -{ - auto native_val = boost::endian::big_to_native(tag_value); - d_flags = (native_val >> 16) & 0xFFFF; - d_segno = native_val & 0xFFFF; -} - -uint32_t plinfo::get_tag_value() const -{ - return boost::endian::native_to_big(((d_flags & 0xFFFF) << 16) | (d_segno & 0xFFFF)); -} - // accessors bool plinfo::field_sync1_p() const { return (d_flags & fl_field_sync1) != 0; } bool plinfo::field_sync2_p() const { return (d_flags & fl_field_sync2) != 0; } diff --git a/gr-dtv/lib/atsc/atsc_rs_decoder_impl.cc b/gr-dtv/lib/atsc/atsc_rs_decoder_impl.cc index 4e6afe27536..9220783b486 100644 --- a/gr-dtv/lib/atsc/atsc_rs_decoder_impl.cc +++ b/gr-dtv/lib/atsc/atsc_rs_decoder_impl.cc @@ -37,8 +37,10 @@ atsc_rs_decoder::sptr atsc_rs_decoder::make() atsc_rs_decoder_impl::atsc_rs_decoder_impl() : gr::sync_block( "dtv_atsc_rs_decoder", - io_signature::make(1, 1, sizeof(uint8_t) * ATSC_MPEG_RS_ENCODED_LENGTH), - io_signature::make(1, 1, sizeof(uint8_t) * ATSC_MPEG_PKT_LENGTH)) + io_signature::make2( + 2, 2, sizeof(uint8_t) * ATSC_MPEG_RS_ENCODED_LENGTH, sizeof(plinfo)), + io_signature::make2( + 2, 2, sizeof(uint8_t) * ATSC_MPEG_PKT_LENGTH, sizeof(plinfo))) { d_rs = init_rs_char( rs_init_symsize, rs_init_gfpoly, rs_init_fcr, rs_init_prim, rs_init_nroots); @@ -46,8 +48,6 @@ atsc_rs_decoder_impl::atsc_rs_decoder_impl() d_nerrors_corrected_count = 0; d_bad_packet_count = 0; d_total_packets = 0; - - set_tag_propagation_policy(TPP_CUSTOM); } int atsc_rs_decoder_impl::decode(uint8_t* out, const uint8_t* in) @@ -93,27 +93,17 @@ int atsc_rs_decoder_impl::work(int noutput_items, { auto in = static_cast(input_items[0]); auto out = static_cast(output_items[0]); + auto plin = static_cast(input_items[1]); + auto plout = static_cast(output_items[1]); - std::vector tags; - auto tag_pmt = pmt::intern("plinfo"); for (int i = 0; i < noutput_items; i++) { - plinfo pli_in; - get_tags_in_window(tags, 0, i, i + 1, tag_pmt); - if (tags.size() > 0) { - pli_in.from_tag_value(pmt::to_uint64(tags[0].value)); - } else { - throw std::runtime_error( - "Atsc Viterbi Decoder: Plinfo Tag not found on sample"); - } - - assert(pli_in.regular_seg_p()); - - plinfo pli_out = pli_in; // copy pipeline info... + assert(plin[i].regular_seg_p()); + plout[i] = plin[i]; // copy pipeline info... int nerrors_corrected = decode(&out[i * ATSC_MPEG_PKT_LENGTH], &in[i * ATSC_MPEG_RS_ENCODED_LENGTH]); - pli_out.set_transport_error(nerrors_corrected == -1); + plout[i].set_transport_error(nerrors_corrected == -1); if (nerrors_corrected == -1) { d_bad_packet_count++; d_nerrors_corrected_count += 10; // lower bound estimate; most this RS can fix @@ -121,9 +111,6 @@ int atsc_rs_decoder_impl::work(int noutput_items, d_nerrors_corrected_count += nerrors_corrected; } - add_item_tag( - 0, nitems_written(0) + i, tag_pmt, pmt::from_uint64(pli_out.get_tag_value())); - d_total_packets++; #if 0 if (d_total_packets > 1000) { diff --git a/gr-dtv/lib/atsc/atsc_viterbi_decoder_impl.cc b/gr-dtv/lib/atsc/atsc_viterbi_decoder_impl.cc index 5b807f3fce9..02193793238 100644 --- a/gr-dtv/lib/atsc/atsc_viterbi_decoder_impl.cc +++ b/gr-dtv/lib/atsc/atsc_viterbi_decoder_impl.cc @@ -28,8 +28,10 @@ atsc_viterbi_decoder::sptr atsc_viterbi_decoder::make() atsc_viterbi_decoder_impl::atsc_viterbi_decoder_impl() : sync_block( "dtv_atsc_viterbi_decoder", - io_signature::make(1, 1, sizeof(float) * ATSC_DATA_SEGMENT_LENGTH), - io_signature::make(1, 1, sizeof(unsigned char) * ATSC_MPEG_RS_ENCODED_LENGTH)) + io_signature::make2( + 2, 2, sizeof(float) * ATSC_DATA_SEGMENT_LENGTH, sizeof(plinfo)), + io_signature::make2( + 2, 2, sizeof(unsigned char) * ATSC_MPEG_RS_ENCODED_LENGTH, sizeof(plinfo))) { set_output_multiple(NCODERS); @@ -50,8 +52,6 @@ atsc_viterbi_decoder_impl::atsc_viterbi_decoder_impl() fifo.emplace_back(fifo_size); reset(); - - set_tag_propagation_policy(TPP_CUSTOM); } atsc_viterbi_decoder_impl::~atsc_viterbi_decoder_impl() {} @@ -76,6 +76,8 @@ int atsc_viterbi_decoder_impl::work(int noutput_items, { auto in = static_cast(input_items[0]); auto out = static_cast(output_items[0]); + auto plin = static_cast(input_items[1]); + auto plout = static_cast(output_items[1]); // The way the fs_checker works ensures we start getting packets // starting with a field sync, and out input multiple is set to @@ -91,9 +93,7 @@ int atsc_viterbi_decoder_impl::work(int noutput_items, unsigned char out_copy[OUTPUT_SIZE]; std::vector tags; - auto tag_pmt = pmt::intern("plinfo"); for (int i = 0; i < noutput_items; i += NCODERS) { - /* Build a continuous symbol buffer for each encoder */ for (unsigned int encoder = 0; encoder < NCODERS; encoder++) for (unsigned int k = 0; k < enco_which_max; k++) @@ -102,7 +102,6 @@ int atsc_viterbi_decoder_impl::work(int noutput_items, ATSC_DATA_SEGMENT_LENGTH + enco_which_syms[encoder][k] % ATSC_DATA_SEGMENT_LENGTH]; - /* Now run each of the 12 Viterbi decoders over their subset of the input symbols */ for (unsigned int encoder = 0; encoder < NCODERS; encoder++) @@ -123,26 +122,13 @@ int atsc_viterbi_decoder_impl::work(int noutput_items, // copy output from contiguous temp buffer into final output for (int j = 0; j < NCODERS; j++) { - plinfo pli_in; - get_tags_in_window(tags, 0, i + j, i + j + 1, tag_pmt); - if (tags.size() > 0) { - pli_in.from_tag_value(pmt::to_uint64(tags[0].value)); - } else { - throw std::runtime_error("No plinfo on tag"); - } - memcpy(&out[(i + j) * ATSC_MPEG_RS_ENCODED_LENGTH], &out_copy[j * ATSC_MPEG_RS_ENCODED_LENGTH], ATSC_MPEG_RS_ENCODED_LENGTH * sizeof(out_copy[0])); - plinfo pli_out; + plout[i + j] = plinfo(); // adjust pipeline info to reflect 12 segment delay - plinfo::delay(pli_out, pli_in, NCODERS); - - add_item_tag(0, - nitems_written(0) + i + j, - tag_pmt, - pmt::from_uint64(pli_out.get_tag_value())); + plinfo::delay(plout[i + j], plin[i + j], NCODERS); } } diff --git a/gr-dtv/python/dtv/atsc_rx.py b/gr-dtv/python/dtv/atsc_rx.py index 9306c9f8d9c..88efa89a59f 100644 --- a/gr-dtv/python/dtv/atsc_rx.py +++ b/gr-dtv/python/dtv/atsc_rx.py @@ -66,5 +66,16 @@ def __init__(self, input_rate, sps): dep = dtv.atsc_depad() # Connect pipeline - self.connect(self, rx_filt, pll, dcr, agc, btl, fsc, equ) - self.connect(equ, vit, dei, rsd, der, dep, self) + self.connect(self, rx_filt, pll, dcr, agc, btl, fsc) + self.connect((fsc,0),(equ,0)) + self.connect((fsc,1),(equ,1)) + self.connect((equ,0),(vit,0)) + self.connect((equ,1),(vit,1)) + self.connect((vit,0),(dei,0)) + self.connect((vit,1),(dei,1)) + self.connect((dei,0),(rsd,0)) + self.connect((dei,1),(rsd,1)) + self.connect((rsd,0),(der,0)) + self.connect((rsd,1),(der,1)) + self.connect((der,0),(dep,0)) + self.connect((dep,0),(self,0)) diff --git a/gr-fec/examples/fecapi_async_decoders.grc b/gr-fec/examples/fecapi_async_decoders.grc index b680feb4a8b..e29c6eef0d8 100644 --- a/gr-fec/examples/fecapi_async_decoders.grc +++ b/gr-fec/examples/fecapi_async_decoders.grc @@ -262,8 +262,8 @@ blocks: coordinate: [366, 10] rotation: 0 state: disabled -- name: blocks_pdu_to_tagged_stream_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0 + id: pdu_pdu_to_tagged_stream parameters: affinity: '' alias: '' @@ -276,8 +276,8 @@ blocks: coordinate: [368, 235] rotation: 0 state: enabled -- name: blocks_pdu_to_tagged_stream_0_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0_0 + id: pdu_pdu_to_tagged_stream parameters: affinity: '' alias: '' @@ -323,8 +323,8 @@ blocks: coordinate: [69, 281] rotation: 180 state: enabled -- name: blocks_tagged_stream_to_pdu_0 - id: blocks_tagged_stream_to_pdu +- name: pdu_tagged_stream_to_pdu_0 + id: pdu_tagged_stream_to_pdu parameters: affinity: '' alias: '' @@ -337,8 +337,8 @@ blocks: coordinate: [344, 147] rotation: 0 state: enabled -- name: blocks_tagged_stream_to_pdu_1 - id: blocks_tagged_stream_to_pdu +- name: pdu_tagged_stream_to_pdu_1 + id: pdu_tagged_stream_to_pdu parameters: affinity: '' alias: '' @@ -650,21 +650,21 @@ blocks: connections: - [analog_random_source_x_0, '0', blocks_throttle_0, '0'] - [blocks_char_to_float_0_0_0_0, '0', qtgui_time_sink_x_0, '0'] -- [blocks_char_to_float_0_1, '0', blocks_tagged_stream_to_pdu_1, '0'] +- [blocks_char_to_float_0_1, '0', pdu_tagged_stream_to_pdu_1, '0'] - [blocks_char_to_float_0_1, '0', qtgui_time_sink_x_1, '0'] - [blocks_char_to_float_0_1_0, '0', qtgui_time_sink_x_0, '1'] -- [blocks_pdu_to_tagged_stream_0, '0', digital_map_bb_0, '0'] -- [blocks_pdu_to_tagged_stream_0_0, '0', blocks_char_to_float_0_0_0_0, '0'] +- [pdu_pdu_to_tagged_stream_0, '0', digital_map_bb_0, '0'] +- [pdu_pdu_to_tagged_stream_0_0, '0', blocks_char_to_float_0_0_0_0, '0'] - [blocks_repack_bits_bb_0_0, '0', blocks_char_to_float_0_1_0, '0'] -- [blocks_repack_bits_bb_0_0, '0', blocks_tagged_stream_to_pdu_0, '0'] +- [blocks_repack_bits_bb_0_0, '0', pdu_tagged_stream_to_pdu_0, '0'] - [blocks_stream_to_tagged_stream_0_0, '0', blocks_repack_bits_bb_0_0, '0'] -- [blocks_tagged_stream_to_pdu_0, pdus, fec_async_encoder_0, in] -- [blocks_tagged_stream_to_pdu_1, pdus, fec_async_decoder_0, in] +- [pdu_tagged_stream_to_pdu_0, pdus, fec_async_encoder_0, in] +- [pdu_tagged_stream_to_pdu_1, pdus, fec_async_decoder_0, in] - [blocks_throttle_0, '0', blocks_stream_to_tagged_stream_0_0, '0'] - [blocks_vector_source_x_0_1_0, '0', blocks_throttle_0, '0'] - [digital_map_bb_0, '0', blocks_char_to_float_0_1, '0'] -- [fec_async_decoder_0, out, blocks_pdu_to_tagged_stream_0_0, pdus] -- [fec_async_encoder_0, out, blocks_pdu_to_tagged_stream_0, pdus] +- [fec_async_decoder_0, out, pdu_pdu_to_tagged_stream_0_0, pdus] +- [fec_async_encoder_0, out, pdu_pdu_to_tagged_stream_0, pdus] metadata: file_format: 1 diff --git a/gr-fec/examples/fecapi_async_encoders.grc b/gr-fec/examples/fecapi_async_encoders.grc index f67a4c286c7..9318f03209a 100644 --- a/gr-fec/examples/fecapi_async_encoders.grc +++ b/gr-fec/examples/fecapi_async_encoders.grc @@ -176,8 +176,8 @@ blocks: coordinate: [366, 10] rotation: 0 state: disabled -- name: blocks_pdu_to_tagged_stream_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0 + id: pdu_pdu_to_tagged_stream parameters: maxoutbuf: '0' minoutbuf: '0' @@ -228,8 +228,8 @@ blocks: coordinate: [58, 273] rotation: 180 state: enabled -- name: blocks_tagged_stream_to_pdu_0 - id: blocks_tagged_stream_to_pdu +- name: pdu_tagged_stream_to_pdu_0 + id: pdu_tagged_stream_to_pdu parameters: maxoutbuf: '0' minoutbuf: '0' @@ -402,15 +402,15 @@ connections: - [analog_random_source_x_0, '0', blocks_throttle_0, '0'] - [blocks_char_to_float_0_1, '0', qtgui_time_sink_x_0, '0'] - [blocks_char_to_float_1, '0', qtgui_time_sink_x_0, '1'] -- [blocks_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0, '0'] +- [pdu_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0, '0'] - [blocks_repack_bits_bb_0, '0', blocks_char_to_float_0_1, '0'] - [blocks_repack_bits_bb_0_0, '0', fec_extended_tagged_encoder_0, '0'] - [blocks_stream_to_tagged_stream_0_0, '0', blocks_repack_bits_bb_0_0, '0'] -- [blocks_stream_to_tagged_stream_0_0, '0', blocks_tagged_stream_to_pdu_0, '0'] -- [blocks_tagged_stream_to_pdu_0, pdus, fec_async_encoder_0, in] +- [blocks_stream_to_tagged_stream_0_0, '0', pdu_tagged_stream_to_pdu_0, '0'] +- [pdu_tagged_stream_to_pdu_0, pdus, fec_async_encoder_0, in] - [blocks_throttle_0, '0', blocks_stream_to_tagged_stream_0_0, '0'] - [blocks_vector_source_x_0_1_0, '0', blocks_throttle_0, '0'] -- [fec_async_encoder_0, out, blocks_pdu_to_tagged_stream_0, pdus] +- [fec_async_encoder_0, out, pdu_pdu_to_tagged_stream_0, pdus] - [fec_extended_tagged_encoder_0, '0', blocks_char_to_float_1, '0'] metadata: diff --git a/gr-fec/examples/fecapi_async_ldpc_decoders.grc b/gr-fec/examples/fecapi_async_ldpc_decoders.grc index de26d5e274b..8e1639e7e14 100644 --- a/gr-fec/examples/fecapi_async_ldpc_decoders.grc +++ b/gr-fec/examples/fecapi_async_ldpc_decoders.grc @@ -109,8 +109,8 @@ blocks: coordinate: [420, 430] rotation: 0 state: enabled -- name: blocks_pdu_to_tagged_stream_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0 + id: pdu_pdu_to_tagged_stream parameters: maxoutbuf: '0' minoutbuf: '0' @@ -120,8 +120,8 @@ blocks: coordinate: [368, 243] rotation: 0 state: enabled -- name: blocks_pdu_to_tagged_stream_0_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0_0 + id: pdu_pdu_to_tagged_stream parameters: maxoutbuf: '0' minoutbuf: '0' @@ -158,8 +158,8 @@ blocks: coordinate: [69, 281] rotation: 180 state: enabled -- name: blocks_tagged_stream_to_pdu_0 - id: blocks_tagged_stream_to_pdu +- name: pdu_tagged_stream_to_pdu_0 + id: pdu_tagged_stream_to_pdu parameters: maxoutbuf: '0' minoutbuf: '0' @@ -169,8 +169,8 @@ blocks: coordinate: [368, 147] rotation: 0 state: enabled -- name: blocks_tagged_stream_to_pdu_1 - id: blocks_tagged_stream_to_pdu +- name: pdu_tagged_stream_to_pdu_1 + id: pdu_tagged_stream_to_pdu parameters: maxoutbuf: '0' minoutbuf: '0' @@ -431,21 +431,21 @@ blocks: connections: - [analog_random_source_x_0, '0', blocks_throttle_0, '0'] - [blocks_char_to_float_0_0_0_0, '0', qtgui_time_sink_x_0, '0'] -- [blocks_char_to_float_0_1, '0', blocks_tagged_stream_to_pdu_1, '0'] +- [blocks_char_to_float_0_1, '0', pdu_tagged_stream_to_pdu_1, '0'] - [blocks_char_to_float_0_1, '0', qtgui_time_sink_x_1, '0'] - [blocks_char_to_float_0_1_0, '0', qtgui_time_sink_x_0, '1'] -- [blocks_pdu_to_tagged_stream_0, '0', digital_map_bb_0, '0'] -- [blocks_pdu_to_tagged_stream_0_0, '0', blocks_char_to_float_0_0_0_0, '0'] +- [pdu_pdu_to_tagged_stream_0, '0', digital_map_bb_0, '0'] +- [pdu_pdu_to_tagged_stream_0_0, '0', blocks_char_to_float_0_0_0_0, '0'] - [blocks_repack_bits_bb_0_0, '0', blocks_char_to_float_0_1_0, '0'] -- [blocks_repack_bits_bb_0_0, '0', blocks_tagged_stream_to_pdu_0, '0'] +- [blocks_repack_bits_bb_0_0, '0', pdu_tagged_stream_to_pdu_0, '0'] - [blocks_stream_to_tagged_stream_0_0, '0', blocks_repack_bits_bb_0_0, '0'] -- [blocks_tagged_stream_to_pdu_0, pdus, fec_async_encoder_0, in] -- [blocks_tagged_stream_to_pdu_1, pdus, fec_async_decoder_0, in] +- [pdu_tagged_stream_to_pdu_0, pdus, fec_async_encoder_0, in] +- [pdu_tagged_stream_to_pdu_1, pdus, fec_async_decoder_0, in] - [blocks_throttle_0, '0', blocks_stream_to_tagged_stream_0_0, '0'] - [blocks_vector_source_x_0_1_0, '0', blocks_throttle_0, '0'] - [digital_map_bb_0, '0', blocks_char_to_float_0_1, '0'] -- [fec_async_decoder_0, out, blocks_pdu_to_tagged_stream_0_0, pdus] -- [fec_async_encoder_0, out, blocks_pdu_to_tagged_stream_0, pdus] +- [fec_async_decoder_0, out, pdu_pdu_to_tagged_stream_0_0, pdus] +- [fec_async_encoder_0, out, pdu_pdu_to_tagged_stream_0, pdus] metadata: file_format: 1 diff --git a/gr-fec/examples/fecapi_async_ldpc_encoders.grc b/gr-fec/examples/fecapi_async_ldpc_encoders.grc index 54bde126a1d..6a9133d6e59 100644 --- a/gr-fec/examples/fecapi_async_ldpc_encoders.grc +++ b/gr-fec/examples/fecapi_async_ldpc_encoders.grc @@ -168,8 +168,8 @@ blocks: coordinate: [992, 252.0] rotation: 0 state: enabled -- name: blocks_pdu_to_tagged_stream_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0 + id: pdu_pdu_to_tagged_stream parameters: affinity: '' alias: '' @@ -185,8 +185,8 @@ blocks: coordinate: [560, 164.0] rotation: 0 state: enabled -- name: blocks_pdu_to_tagged_stream_0_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0_0 + id: pdu_pdu_to_tagged_stream parameters: affinity: '' alias: '' @@ -261,8 +261,8 @@ blocks: coordinate: [56, 283] rotation: 180 state: enabled -- name: blocks_tagged_stream_to_pdu_0 - id: blocks_tagged_stream_to_pdu +- name: pdu_tagged_stream_to_pdu_0 + id: pdu_tagged_stream_to_pdu parameters: affinity: '' alias: '' @@ -493,17 +493,17 @@ connections: - [analog_random_source_x_0, '0', blocks_throttle_0, '0'] - [blocks_char_to_float_0_1, '0', qtgui_time_sink_x_0, '0'] - [blocks_char_to_float_0_1_0, '0', qtgui_time_sink_x_0, '1'] -- [blocks_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0, '0'] -- [blocks_pdu_to_tagged_stream_0_0, '0', blocks_repack_bits_bb_0_0, '0'] +- [pdu_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0, '0'] +- [pdu_pdu_to_tagged_stream_0_0, '0', blocks_repack_bits_bb_0_0, '0'] - [blocks_repack_bits_bb_0, '0', blocks_char_to_float_0_1, '0'] - [blocks_repack_bits_bb_0_0, '0', blocks_char_to_float_0_1_0, '0'] -- [blocks_stream_to_tagged_stream_0_0, '0', blocks_tagged_stream_to_pdu_0, '0'] -- [blocks_tagged_stream_to_pdu_0, pdus, fec_async_encoder_0, in] -- [blocks_tagged_stream_to_pdu_0, pdus, fec_async_encoder_0_0, in] +- [blocks_stream_to_tagged_stream_0_0, '0', pdu_tagged_stream_to_pdu_0, '0'] +- [pdu_tagged_stream_to_pdu_0, pdus, fec_async_encoder_0, in] +- [pdu_tagged_stream_to_pdu_0, pdus, fec_async_encoder_0_0, in] - [blocks_throttle_0, '0', blocks_stream_to_tagged_stream_0_0, '0'] - [blocks_vector_source_x_0_1_0, '0', blocks_throttle_0, '0'] -- [fec_async_encoder_0, out, blocks_pdu_to_tagged_stream_0, pdus] -- [fec_async_encoder_0_0, out, blocks_pdu_to_tagged_stream_0_0, pdus] +- [fec_async_encoder_0, out, pdu_pdu_to_tagged_stream_0, pdus] +- [fec_async_encoder_0_0, out, pdu_pdu_to_tagged_stream_0_0, pdus] metadata: file_format: 1 diff --git a/gr-fec/examples/fecapi_async_packed_decoders.grc b/gr-fec/examples/fecapi_async_packed_decoders.grc index 05202cbe599..f590ca47732 100644 --- a/gr-fec/examples/fecapi_async_packed_decoders.grc +++ b/gr-fec/examples/fecapi_async_packed_decoders.grc @@ -215,8 +215,8 @@ blocks: coordinate: [366, 10] rotation: 0 state: disabled -- name: blocks_pdu_to_tagged_stream_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0 + id: pdu_pdu_to_tagged_stream parameters: maxoutbuf: '0' minoutbuf: '0' @@ -226,8 +226,8 @@ blocks: coordinate: [408, 190] rotation: 0 state: enabled -- name: blocks_pdu_to_tagged_stream_0_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0_0 + id: pdu_pdu_to_tagged_stream parameters: maxoutbuf: '0' minoutbuf: '0' @@ -264,8 +264,8 @@ blocks: coordinate: [93, 328] rotation: 0 state: enabled -- name: blocks_tagged_stream_to_pdu_0 - id: blocks_tagged_stream_to_pdu +- name: pdu_tagged_stream_to_pdu_0 + id: pdu_tagged_stream_to_pdu parameters: maxoutbuf: '0' minoutbuf: '0' @@ -275,8 +275,8 @@ blocks: coordinate: [363, 112] rotation: 0 state: enabled -- name: blocks_tagged_stream_to_pdu_1 - id: blocks_tagged_stream_to_pdu +- name: pdu_tagged_stream_to_pdu_1 + id: pdu_tagged_stream_to_pdu parameters: maxoutbuf: '0' minoutbuf: '0' @@ -467,20 +467,20 @@ blocks: connections: - [analog_random_source_x_0, '0', blocks_throttle_0, '0'] - [blocks_char_to_float_0_0_0_0, '0', qtgui_time_sink_x_0, '0'] -- [blocks_char_to_float_0_1, '0', blocks_tagged_stream_to_pdu_1, '0'] +- [blocks_char_to_float_0_1, '0', pdu_tagged_stream_to_pdu_1, '0'] - [blocks_char_to_float_0_1_0, '0', qtgui_time_sink_x_0, '1'] -- [blocks_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0, '0'] -- [blocks_pdu_to_tagged_stream_0_0, '0', blocks_char_to_float_0_0_0_0, '0'] +- [pdu_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0, '0'] +- [pdu_pdu_to_tagged_stream_0_0, '0', blocks_char_to_float_0_0_0_0, '0'] - [blocks_repack_bits_bb_0, '0', digital_map_bb_0, '0'] - [blocks_stream_to_tagged_stream_0_0, '0', blocks_char_to_float_0_1_0, '0'] -- [blocks_stream_to_tagged_stream_0_0, '0', blocks_tagged_stream_to_pdu_0, '0'] -- [blocks_tagged_stream_to_pdu_0, pdus, fec_async_encoder_0, in] -- [blocks_tagged_stream_to_pdu_1, pdus, fec_async_decoder_0, in] +- [blocks_stream_to_tagged_stream_0_0, '0', pdu_tagged_stream_to_pdu_0, '0'] +- [pdu_tagged_stream_to_pdu_0, pdus, fec_async_encoder_0, in] +- [pdu_tagged_stream_to_pdu_1, pdus, fec_async_decoder_0, in] - [blocks_throttle_0, '0', blocks_stream_to_tagged_stream_0_0, '0'] - [blocks_vector_source_x_0_1_0, '0', blocks_throttle_0, '0'] - [digital_map_bb_0, '0', blocks_char_to_float_0_1, '0'] -- [fec_async_decoder_0, out, blocks_pdu_to_tagged_stream_0_0, pdus] -- [fec_async_encoder_0, out, blocks_pdu_to_tagged_stream_0, pdus] +- [fec_async_decoder_0, out, pdu_pdu_to_tagged_stream_0_0, pdus] +- [fec_async_encoder_0, out, pdu_pdu_to_tagged_stream_0, pdus] metadata: file_format: 1 diff --git a/gr-fec/examples/fecapi_async_to_stream.grc b/gr-fec/examples/fecapi_async_to_stream.grc index ce3cbece70c..0a46a7e495a 100644 --- a/gr-fec/examples/fecapi_async_to_stream.grc +++ b/gr-fec/examples/fecapi_async_to_stream.grc @@ -181,8 +181,8 @@ blocks: coordinate: [366, 10] rotation: 0 state: disabled -- name: blocks_pdu_to_tagged_stream_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0 + id: pdu_pdu_to_tagged_stream parameters: maxoutbuf: '0' minoutbuf: '0' @@ -233,8 +233,8 @@ blocks: coordinate: [83, 279] rotation: 180 state: enabled -- name: blocks_tagged_stream_to_pdu_0 - id: blocks_tagged_stream_to_pdu +- name: pdu_tagged_stream_to_pdu_0 + id: pdu_tagged_stream_to_pdu parameters: maxoutbuf: '0' minoutbuf: '0' @@ -526,17 +526,17 @@ connections: - [blocks_char_to_float_0_0_0_0, '0', qtgui_time_sink_x_0, '0'] - [blocks_char_to_float_0_1, '0', fec_extended_tagged_decoder_0, '0'] - [blocks_char_to_float_0_1, '0', qtgui_time_sink_x_0_0, '0'] -- [blocks_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0, '0'] +- [pdu_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0, '0'] - [blocks_repack_bits_bb_0, '0', digital_map_bb_0, '0'] - [blocks_repack_bits_bb_0_0, '0', digital_crc32_bb_0, '0'] -- [blocks_stream_to_tagged_stream_0_0, '0', blocks_tagged_stream_to_pdu_0, '0'] -- [blocks_tagged_stream_to_pdu_0, pdus, digital_crc32_async_bb_0, in] +- [blocks_stream_to_tagged_stream_0_0, '0', pdu_tagged_stream_to_pdu_0, '0'] +- [pdu_tagged_stream_to_pdu_0, pdus, digital_crc32_async_bb_0, in] - [blocks_throttle_0, '0', blocks_stream_to_tagged_stream_0_0, '0'] - [blocks_vector_source_x_0_1_0, '0', blocks_throttle_0, '0'] - [digital_crc32_async_bb_0, out, fec_async_encoder_0, in] - [digital_crc32_bb_0, '0', blocks_char_to_float_0_0_0_0, '0'] - [digital_map_bb_0, '0', blocks_char_to_float_0_1, '0'] -- [fec_async_encoder_0, out, blocks_pdu_to_tagged_stream_0, pdus] +- [fec_async_encoder_0, out, pdu_pdu_to_tagged_stream_0, pdus] - [fec_extended_tagged_decoder_0, '0', blocks_repack_bits_bb_0_0, '0'] metadata: diff --git a/gr-fec/examples/fecapi_polar_async_packed_decoders.grc b/gr-fec/examples/fecapi_polar_async_packed_decoders.grc index e833d6d5852..fc73c5f938f 100644 --- a/gr-fec/examples/fecapi_polar_async_packed_decoders.grc +++ b/gr-fec/examples/fecapi_polar_async_packed_decoders.grc @@ -152,8 +152,8 @@ blocks: coordinate: [384, 11] rotation: 0 state: disabled -- name: blocks_pdu_to_tagged_stream_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0 + id: pdu_pdu_to_tagged_stream parameters: maxoutbuf: '0' minoutbuf: '0' @@ -163,8 +163,8 @@ blocks: coordinate: [952, 155] rotation: 0 state: enabled -- name: blocks_pdu_to_tagged_stream_0_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0_0 + id: pdu_pdu_to_tagged_stream parameters: maxoutbuf: '0' minoutbuf: '0' @@ -201,8 +201,8 @@ blocks: coordinate: [168, 387] rotation: 0 state: enabled -- name: blocks_tagged_stream_to_pdu_0 - id: blocks_tagged_stream_to_pdu +- name: pdu_tagged_stream_to_pdu_0 + id: pdu_tagged_stream_to_pdu parameters: maxoutbuf: '0' minoutbuf: '0' @@ -212,8 +212,8 @@ blocks: coordinate: [488, 155] rotation: 0 state: enabled -- name: blocks_tagged_stream_to_pdu_1 - id: blocks_tagged_stream_to_pdu +- name: pdu_tagged_stream_to_pdu_1 + id: pdu_tagged_stream_to_pdu parameters: maxoutbuf: '0' minoutbuf: '0' @@ -395,20 +395,20 @@ blocks: connections: - [analog_random_source_x_0, '0', blocks_throttle_0, '0'] - [blocks_char_to_float_0_0_0_0, '0', qtgui_time_sink_x_0, '0'] -- [blocks_char_to_float_0_1, '0', blocks_tagged_stream_to_pdu_1, '0'] +- [blocks_char_to_float_0_1, '0', pdu_tagged_stream_to_pdu_1, '0'] - [blocks_char_to_float_0_1_0, '0', qtgui_time_sink_x_0, '1'] -- [blocks_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0, '0'] -- [blocks_pdu_to_tagged_stream_0_0, '0', blocks_char_to_float_0_0_0_0, '0'] +- [pdu_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0, '0'] +- [pdu_pdu_to_tagged_stream_0_0, '0', blocks_char_to_float_0_0_0_0, '0'] - [blocks_repack_bits_bb_0, '0', digital_map_bb_0, '0'] - [blocks_stream_to_tagged_stream_0_0, '0', blocks_char_to_float_0_1_0, '0'] -- [blocks_stream_to_tagged_stream_0_0, '0', blocks_tagged_stream_to_pdu_0, '0'] -- [blocks_tagged_stream_to_pdu_0, pdus, fec_async_encoder_0, in] -- [blocks_tagged_stream_to_pdu_1, pdus, fec_async_decoder_0, in] +- [blocks_stream_to_tagged_stream_0_0, '0', pdu_tagged_stream_to_pdu_0, '0'] +- [pdu_tagged_stream_to_pdu_0, pdus, fec_async_encoder_0, in] +- [pdu_tagged_stream_to_pdu_1, pdus, fec_async_decoder_0, in] - [blocks_throttle_0, '0', blocks_stream_to_tagged_stream_0_0, '0'] - [blocks_vector_source_x_0_1_0, '0', blocks_throttle_0, '0'] - [digital_map_bb_0, '0', blocks_char_to_float_0_1, '0'] -- [fec_async_decoder_0, out, blocks_pdu_to_tagged_stream_0_0, pdus] -- [fec_async_encoder_0, out, blocks_pdu_to_tagged_stream_0, pdus] +- [fec_async_decoder_0, out, pdu_pdu_to_tagged_stream_0_0, pdus] +- [fec_async_encoder_0, out, pdu_pdu_to_tagged_stream_0, pdus] metadata: file_format: 1 diff --git a/gr-fec/examples/fecapi_polar_encoders.grc b/gr-fec/examples/fecapi_polar_encoders.grc index df68b350628..c71c22d48c9 100644 --- a/gr-fec/examples/fecapi_polar_encoders.grc +++ b/gr-fec/examples/fecapi_polar_encoders.grc @@ -173,8 +173,8 @@ blocks: coordinate: [496, 11] rotation: 0 state: disabled -- name: blocks_pdu_to_tagged_stream_0 - id: blocks_pdu_to_tagged_stream +- name: pdu_pdu_to_tagged_stream_0 + id: pdu_pdu_to_tagged_stream parameters: maxoutbuf: '0' minoutbuf: '0' @@ -238,8 +238,8 @@ blocks: coordinate: [424, 411] rotation: 0 state: enabled -- name: blocks_tagged_stream_to_pdu_0 - id: blocks_tagged_stream_to_pdu +- name: pdu_tagged_stream_to_pdu_0 + id: pdu_tagged_stream_to_pdu parameters: maxoutbuf: '0' minoutbuf: '0' @@ -433,18 +433,18 @@ connections: - [blocks_char_to_float_0_1, '0', qtgui_time_sink_x_0_0_1, '2'] - [blocks_char_to_float_1_0_0, '0', qtgui_time_sink_x_0_0_1, '0'] - [blocks_char_to_float_1_0_0_1, '0', qtgui_time_sink_x_0_0_1, '1'] -- [blocks_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0, '0'] +- [pdu_pdu_to_tagged_stream_0, '0', blocks_repack_bits_bb_0, '0'] - [blocks_repack_bits_bb_0, '0', blocks_char_to_float_0_1, '0'] - [blocks_repack_bits_bb_0_0, '0', fec_extended_tagged_encoder_0_0, '0'] - [blocks_stream_to_tagged_stream_0, '0', blocks_repack_bits_bb_0_0, '0'] -- [blocks_stream_to_tagged_stream_0_0, '0', blocks_tagged_stream_to_pdu_0, '0'] -- [blocks_tagged_stream_to_pdu_0, pdus, fec_async_encoder_0, in] +- [blocks_stream_to_tagged_stream_0_0, '0', pdu_tagged_stream_to_pdu_0, '0'] +- [pdu_tagged_stream_to_pdu_0, pdus, fec_async_encoder_0, in] - [blocks_throttle_0, '0', blocks_stream_to_tagged_stream_0, '0'] - [blocks_throttle_0, '0', blocks_stream_to_tagged_stream_0_0, '0'] - [blocks_throttle_0, '0', blocks_unpack_k_bits_bb_0, '0'] - [blocks_unpack_k_bits_bb_0, '0', fec_extended_encoder_0_0_0, '0'] - [blocks_vector_source_x_0_1_0, '0', blocks_throttle_0, '0'] -- [fec_async_encoder_0, out, blocks_pdu_to_tagged_stream_0, pdus] +- [fec_async_encoder_0, out, pdu_pdu_to_tagged_stream_0, pdus] - [fec_extended_encoder_0_0_0, '0', blocks_char_to_float_1_0_0, '0'] - [fec_extended_tagged_encoder_0_0, '0', blocks_char_to_float_1_0_0_1, '0'] diff --git a/gr-fec/lib/CMakeLists.txt b/gr-fec/lib/CMakeLists.txt index b8c3796c4eb..b57815c1a0b 100644 --- a/gr-fec/lib/CMakeLists.txt +++ b/gr-fec/lib/CMakeLists.txt @@ -86,6 +86,9 @@ target_link_libraries(gnuradio-fec PUBLIC gnuradio-blocks ) +# Address linker issues with std::filesystem on Centos 8 and Debian +target_link_libraries(gnuradio-fec PRIVATE $<$,$,9.0>>:stdc++fs>) + # Only include the LDPC work if we have GSL installed if(GSL_FOUND) target_link_libraries(gnuradio-fec PUBLIC GSL::gsl) diff --git a/gr-fec/lib/ldpc_decoder.cc b/gr-fec/lib/ldpc_decoder.cc index f29b6b62eab..e493228e9dc 100644 --- a/gr-fec/lib/ldpc_decoder.cc +++ b/gr-fec/lib/ldpc_decoder.cc @@ -17,6 +17,7 @@ #include #include #include // for memcpy +#include #include #include @@ -33,7 +34,7 @@ ldpc_decoder::make(std::string alist_file, float sigma, int max_iterations) ldpc_decoder::ldpc_decoder(std::string alist_file, float sigma, int max_iterations) : generic_decoder("ldpc_decoder") { - if (!boost::filesystem::exists(alist_file)) + if (!std::filesystem::exists(alist_file)) throw std::runtime_error("Bad AList file name!"); d_list.read(alist_file.c_str()); diff --git a/gr-fec/lib/ldpc_encoder_impl.cc b/gr-fec/lib/ldpc_encoder_impl.cc index 5d8e1453af0..45699dd6eda 100644 --- a/gr-fec/lib/ldpc_encoder_impl.cc +++ b/gr-fec/lib/ldpc_encoder_impl.cc @@ -14,6 +14,7 @@ #include // for std::reverse #include #include // for memcpy +#include #include namespace gr { @@ -26,7 +27,7 @@ generic_encoder::sptr ldpc_encoder::make(std::string alist_file) ldpc_encoder_impl::ldpc_encoder_impl(std::string alist_file) { - if (!boost::filesystem::exists(alist_file)) { + if (!std::filesystem::exists(alist_file)) { throw std::runtime_error("Bad AList file name!"); } diff --git a/gr-fec/python/fec/qa_fecapi_cc_buffer_overflow.py b/gr-fec/python/fec/qa_fecapi_cc_buffer_overflow.py index 98344b51757..0998408256f 100644 --- a/gr-fec/python/fec/qa_fecapi_cc_buffer_overflow.py +++ b/gr-fec/python/fec/qa_fecapi_cc_buffer_overflow.py @@ -10,7 +10,7 @@ from gnuradio import gr, gr_unittest from gnuradio import fec -from gnuradio import blocks, analog +from gnuradio import blocks, analog, pdu # This test tries to checks for the kind of buffer overflows in the # FECAPI convolutional decoder that were fixed in #2965 @@ -24,7 +24,7 @@ def run_with_frame_len(self, frame_len): head = blocks.head(gr.sizeof_float, self.n_frames * frame_len) tag = blocks.stream_to_tagged_stream( gr.sizeof_float, 1, frame_len, "packet_len") - stream2pdu = blocks.tagged_stream_to_pdu(blocks.float_t, 'packet_len') + stream2pdu = pdu.tagged_stream_to_pdu(gr.types.float_t, 'packet_len') viterbi = fec.cc_decoder.make( frame_len // 2, 7, 2, [79, -109], 0, -1, fec.CC_TERMINATED, False) diff --git a/gr-fft/lib/CMakeLists.txt b/gr-fft/lib/CMakeLists.txt index 48495f03f84..6ab4ea4b95c 100644 --- a/gr-fft/lib/CMakeLists.txt +++ b/gr-fft/lib/CMakeLists.txt @@ -22,6 +22,9 @@ target_link_libraries(gnuradio-fft PUBLIC Volk::volk ) +# Address linker issues with std::filesystem on Centos 8 and Debian +target_link_libraries(gnuradio-fft PRIVATE $<$,$,9.0>>:stdc++fs>) + target_include_directories(gnuradio-fft PUBLIC $ diff --git a/gr-fft/lib/fft.cc b/gr-fft/lib/fft.cc index 6b50d1f2614..72393571967 100644 --- a/gr-fft/lib/fft.cc +++ b/gr-fft/lib/fft.cc @@ -35,12 +35,11 @@ static int my_fftw_read_char(void* f) { return fgetc((FILE*)f); } #include #include #include +#include #include -#include -#include #include -namespace fs = boost::filesystem; +namespace fs = std::filesystem; namespace gr { namespace fft { diff --git a/gr-filter/include/gnuradio/filter/polyphase_filterbank.h b/gr-filter/include/gnuradio/filter/polyphase_filterbank.h index a60417e3d86..289fde0735e 100644 --- a/gr-filter/include/gnuradio/filter/polyphase_filterbank.h +++ b/gr-filter/include/gnuradio/filter/polyphase_filterbank.h @@ -108,8 +108,6 @@ class FILTER_API polyphase_filterbank */ polyphase_filterbank(unsigned int nfilts, const std::vector& taps); - polyphase_filterbank(polyphase_filterbank&&) = default; - virtual ~polyphase_filterbank() = default; /*! diff --git a/gr-filter/python/filter/bindings/polyphase_filterbank_python.cc b/gr-filter/python/filter/bindings/polyphase_filterbank_python.cc index cb9934065c6..a65f94dea51 100644 --- a/gr-filter/python/filter/bindings/polyphase_filterbank_python.cc +++ b/gr-filter/python/filter/bindings/polyphase_filterbank_python.cc @@ -14,7 +14,7 @@ /* BINDTOOL_GEN_AUTOMATIC(0) */ /* BINDTOOL_USE_PYGCCXML(0) */ /* BINDTOOL_HEADER_FILE(polyphase_filterbank.h) */ -/* BINDTOOL_HEADER_FILE_HASH(e673704c47c71da031740b78273e34b6) */ +/* BINDTOOL_HEADER_FILE_HASH(0620fc61d0f1e06eff20066e6505076a) */ /***********************************************************************************/ #include diff --git a/gr-network/grc/CMakeLists.txt b/gr-network/grc/CMakeLists.txt index 8ac8bb68c86..622624e4e18 100644 --- a/gr-network/grc/CMakeLists.txt +++ b/gr-network/grc/CMakeLists.txt @@ -7,8 +7,10 @@ # install(FILES + network_socket_pdu.block.yml network_tcp_sink.block.yml network_tcp_source.block.yml + network_tuntap_pdu.block.yml network_udp_sink.block.yml network_udp_source.block.yml DESTINATION share/gnuradio/grc/blocks diff --git a/gr-blocks/grc/blocks_socket_pdu.block.yml b/gr-network/grc/network_socket_pdu.block.yml similarity index 72% rename from gr-blocks/grc/blocks_socket_pdu.block.yml rename to gr-network/grc/network_socket_pdu.block.yml index 74108accb54..0033c769ef7 100644 --- a/gr-blocks/grc/blocks_socket_pdu.block.yml +++ b/gr-network/grc/network_socket_pdu.block.yml @@ -1,5 +1,6 @@ -id: blocks_socket_pdu +id: network_socket_pdu label: Socket PDU +category: '[Core]/Networking Tools' flags: [ python, cpp ] parameters: @@ -39,13 +40,13 @@ outputs: optional: true templates: - imports: from gnuradio import blocks - make: blocks.socket_pdu(${repr(type)}, ${host}, ${port}, ${mtu}, ${tcp_no_delay}) + imports: from gnuradio import network + make: network.socket_pdu(${repr(type)}, ${host}, ${port}, ${mtu}, ${tcp_no_delay}) cpp_templates: - includes: ['#include '] - declarations: 'blocks::socket_pdu::sptr ${id};' - make: 'this->${id} = blocks::socket_pdu::make("${type}", ${host}, ${port}, ${mtu}, ${tcp_no_delay});' + includes: ['#include '] + declarations: 'network::socket_pdu::sptr ${id};' + make: 'this->${id} = network::socket_pdu::make("${type}", ${host}, ${port}, ${mtu}, ${tcp_no_delay});' translations: 'True': 'true' 'False': 'false' diff --git a/gr-blocks/grc/blocks_tuntap_pdu.block.yml b/gr-network/grc/network_tuntap_pdu.block.yml similarity index 62% rename from gr-blocks/grc/blocks_tuntap_pdu.block.yml rename to gr-network/grc/network_tuntap_pdu.block.yml index 2ab124eb02b..1542b89a989 100644 --- a/gr-blocks/grc/blocks_tuntap_pdu.block.yml +++ b/gr-network/grc/network_tuntap_pdu.block.yml @@ -1,5 +1,6 @@ -id: blocks_tuntap_pdu +id: network_tuntap_pdu label: TUNTAP PDU +category: '[Core]/Networking Tools' flags: [ python, cpp ] parameters: @@ -29,13 +30,13 @@ outputs: optional: true templates: - imports: from gnuradio import blocks - make: blocks.tuntap_pdu(${ifn}, ${mtu}, ${istunflag}) + imports: from gnuradio import network + make: network.tuntap_pdu(${ifn}, ${mtu}, ${istunflag}) cpp_templates: - includes: ['#include '] - declarations: 'blocks::tuntap_pdu::sptr ${id};' - make: 'this->${id} = blocks::tuntap_pdu::make(${ifn}, ${mtu}, ${istunflag});' + includes: ['#include '] + declarations: 'network::tuntap_pdu::sptr ${id};' + make: 'this->${id} = network::tuntap_pdu::make(${ifn}, ${mtu}, ${istunflag});' translations: 'True': 'true' 'False': 'false' diff --git a/gr-network/include/gnuradio/network/CMakeLists.txt b/gr-network/include/gnuradio/network/CMakeLists.txt index 8712ed00d26..36ff1b48a7a 100644 --- a/gr-network/include/gnuradio/network/CMakeLists.txt +++ b/gr-network/include/gnuradio/network/CMakeLists.txt @@ -11,7 +11,9 @@ install(FILES api.h packet_headers.h + socket_pdu.h tcp_sink.h + tuntap_pdu.h udp_header_types.h udp_sink.h udp_source.h diff --git a/gr-blocks/include/gnuradio/blocks/socket_pdu.h b/gr-network/include/gnuradio/network/socket_pdu.h similarity index 76% rename from gr-blocks/include/gnuradio/blocks/socket_pdu.h rename to gr-network/include/gnuradio/network/socket_pdu.h index 50841a52373..dba2522fabc 100644 --- a/gr-blocks/include/gnuradio/blocks/socket_pdu.h +++ b/gr-network/include/gnuradio/network/socket_pdu.h @@ -8,23 +8,23 @@ * */ -#ifndef INCLUDED_BLOCKS_SOCKET_PDU_H -#define INCLUDED_BLOCKS_SOCKET_PDU_H +#ifndef INCLUDED_NETWORK_SOCKET_PDU_H +#define INCLUDED_NETWORK_SOCKET_PDU_H #include -#include +#include namespace gr { -namespace blocks { +namespace network { /*! * \brief Creates socket interface and translates traffic to PDUs * \ingroup networking_tools_blk */ -class BLOCKS_API socket_pdu : virtual public block +class NETWORK_API socket_pdu : virtual public block { public: - // gr::blocks::socket_pdu::sptr + // gr::network::socket_pdu::sptr typedef std::shared_ptr sptr; /*! @@ -42,7 +42,7 @@ class BLOCKS_API socket_pdu : virtual public block bool tcp_no_delay = false); }; -} /* namespace blocks */ +} /* namespace network */ } /* namespace gr */ -#endif /* INCLUDED_BLOCKS_SOCKET_PDU_H */ +#endif /* INCLUDED_NETWORK_SOCKET_PDU_H */ diff --git a/gr-blocks/include/gnuradio/blocks/tuntap_pdu.h b/gr-network/include/gnuradio/network/tuntap_pdu.h similarity index 70% rename from gr-blocks/include/gnuradio/blocks/tuntap_pdu.h rename to gr-network/include/gnuradio/network/tuntap_pdu.h index 90424d928d0..6ef34aeee21 100644 --- a/gr-blocks/include/gnuradio/blocks/tuntap_pdu.h +++ b/gr-network/include/gnuradio/network/tuntap_pdu.h @@ -8,23 +8,23 @@ * */ -#ifndef INCLUDED_BLOCKS_TUNTAP_PDU_H -#define INCLUDED_BLOCKS_TUNTAP_PDU_H +#ifndef INCLUDED_NETWORK_TUNTAP_PDU_H +#define INCLUDED_NETWORK_TUNTAP_PDU_H #include -#include +#include namespace gr { -namespace blocks { +namespace network { /*! * \brief Creates TUNTAP interface and translates traffic to PDUs * \ingroup networking_tools_blk */ -class BLOCKS_API tuntap_pdu : virtual public block +class NETWORK_API tuntap_pdu : virtual public block { public: - // gr::blocks::tuntap_pdu::sptr + // gr::network::tuntap_pdu::sptr typedef std::shared_ptr sptr; /*! @@ -36,7 +36,7 @@ class BLOCKS_API tuntap_pdu : virtual public block static sptr make(std::string dev, int MTU = 10000, bool istunflag = false); }; -} /* namespace blocks */ +} /* namespace network */ } /* namespace gr */ -#endif /* INCLUDED_BLOCKS_TUNTAP_PDU_H */ +#endif /* INCLUDED_NETWORK_TUNTAP_PDU_H */ diff --git a/gr-network/lib/CMakeLists.txt b/gr-network/lib/CMakeLists.txt index 52a267079a6..0eecda139fe 100644 --- a/gr-network/lib/CMakeLists.txt +++ b/gr-network/lib/CMakeLists.txt @@ -13,7 +13,11 @@ include(GrPlatform) #define LIB_SUFFIX list(APPEND network_sources + socket_pdu_impl.cc + stream_pdu_base.cc + tcp_connection.cc tcp_sink_impl.cc + tuntap_pdu_impl.cc udp_sink_impl.cc udp_source_impl.cc ) diff --git a/gr-blocks/lib/socket_pdu_impl.cc b/gr-network/lib/socket_pdu_impl.cc similarity index 92% rename from gr-blocks/lib/socket_pdu_impl.cc rename to gr-network/lib/socket_pdu_impl.cc index f30e944d7b1..fbe95553fea 100644 --- a/gr-blocks/lib/socket_pdu_impl.cc +++ b/gr-network/lib/socket_pdu_impl.cc @@ -14,11 +14,11 @@ #include "socket_pdu_impl.h" #include "tcp_connection.h" -#include #include +#include namespace gr { -namespace blocks { +namespace network { socket_pdu::sptr socket_pdu::make(std::string type, std::string addr, @@ -40,15 +40,15 @@ socket_pdu_impl::socket_pdu_impl(std::string type, { d_rxbuf.resize(MTU); - message_port_register_in(pdu::pdu_port_id()); - message_port_register_out(pdu::pdu_port_id()); + message_port_register_in(msgport_names::pdus()); + message_port_register_out(msgport_names::pdus()); if ((type == "TCP_SERVER") && ((addr.empty()) || (addr == "0.0.0.0"))) { // Bind on all interfaces int port_num = atoi(port.c_str()); if (port_num == 0) throw std::invalid_argument( - "gr::blocks:socket_pdu: invalid port for TCP_SERVER"); + "gr::pdu:socket_pdu: invalid port for TCP_SERVER"); d_tcp_endpoint = boost::asio::ip::tcp::endpoint(boost::asio::ip::tcp::v4(), port_num); } else if ((type == "TCP_SERVER") || (type == "TCP_CLIENT")) { @@ -64,7 +64,7 @@ socket_pdu_impl::socket_pdu_impl(std::string type, int port_num = atoi(port.c_str()); if (port_num == 0) throw std::invalid_argument( - "gr::blocks:socket_pdu: invalid port for UDP_SERVER"); + "gr::pdu:socket_pdu: invalid port for UDP_SERVER"); d_udp_endpoint = boost::asio::ip::udp::endpoint(boost::asio::ip::udp::v4(), port_num); } else if ((type == "UDP_SERVER") || (type == "UDP_CLIENT")) { @@ -88,7 +88,7 @@ socket_pdu_impl::socket_pdu_impl(std::string type, start_tcp_accept(); - set_msg_handler(pdu::pdu_port_id(), + set_msg_handler(msgport_names::pdus(), [this](pmt::pmt_t msg) { this->tcp_server_send(msg); }); } else if (type == "TCP_CLIENT") { boost::system::error_code error = boost::asio::error::host_not_found; @@ -98,7 +98,7 @@ socket_pdu_impl::socket_pdu_impl(std::string type, throw boost::system::system_error(error); d_tcp_socket->set_option(boost::asio::ip::tcp::no_delay(d_tcp_no_delay)); - set_msg_handler(pdu::pdu_port_id(), + set_msg_handler(msgport_names::pdus(), [this](pmt::pmt_t msg) { this->tcp_client_send(msg); }); d_tcp_socket->async_read_some( @@ -118,7 +118,7 @@ socket_pdu_impl::socket_pdu_impl(std::string type, boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); - set_msg_handler(pdu::pdu_port_id(), + set_msg_handler(msgport_names::pdus(), [this](pmt::pmt_t msg) { this->udp_send(msg); }); } else if (type == "UDP_CLIENT") { d_udp_socket = @@ -131,12 +131,12 @@ socket_pdu_impl::socket_pdu_impl(std::string type, boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); - set_msg_handler(pdu::pdu_port_id(), + set_msg_handler(msgport_names::pdus(), [this](pmt::pmt_t msg) { this->udp_send(msg); }); } else - throw std::runtime_error("gr::blocks:socket_pdu: unknown socket type"); + throw std::runtime_error("gr::pdu:socket_pdu: unknown socket type"); - d_thread = gr::thread::thread(boost::bind(&socket_pdu_impl::run_io_service, this)); + d_thread = gr::thread::thread([this] { run_io_service(); }); d_started = true; } @@ -160,7 +160,7 @@ void socket_pdu_impl::handle_tcp_read(const boost::system::error_code& error, pmt::pmt_t vector = pmt::init_u8vector(bytes_transferred, (const uint8_t*)&d_rxbuf[0]); pmt::pmt_t pdu = pmt::cons(pmt::PMT_NIL, vector); - message_port_pub(pdu::pdu_port_id(), pdu); + message_port_pub(msgport_names::pdus(), pdu); d_tcp_socket->async_read_some( boost::asio::buffer(d_rxbuf), @@ -255,7 +255,7 @@ void socket_pdu_impl::handle_udp_read(const boost::system::error_code& error, pmt::init_u8vector(bytes_transferred, (const uint8_t*)&d_rxbuf[0]); pmt::pmt_t pdu = pmt::cons(pmt::PMT_NIL, vector); - message_port_pub(pdu::pdu_port_id(), pdu); + message_port_pub(msgport_names::pdus(), pdu); d_udp_socket->async_receive_from( boost::asio::buffer(d_rxbuf), @@ -267,5 +267,5 @@ void socket_pdu_impl::handle_udp_read(const boost::system::error_code& error, } } -} /* namespace blocks */ +} /* namespace network */ } /* namespace gr */ diff --git a/gr-blocks/lib/socket_pdu_impl.h b/gr-network/lib/socket_pdu_impl.h similarity index 88% rename from gr-blocks/lib/socket_pdu_impl.h rename to gr-network/lib/socket_pdu_impl.h index d885c665c42..9175290a4e0 100644 --- a/gr-blocks/lib/socket_pdu_impl.h +++ b/gr-network/lib/socket_pdu_impl.h @@ -8,14 +8,14 @@ * */ -#ifndef INCLUDED_BLOCKS_SOCKET_PDU_IMPL_H -#define INCLUDED_BLOCKS_SOCKET_PDU_IMPL_H +#ifndef INCLUDED_NETWORK_SOCKET_PDU_IMPL_H +#define INCLUDED_NETWORK_SOCKET_PDU_IMPL_H #include "tcp_connection.h" -#include +#include namespace gr { -namespace blocks { +namespace network { class socket_pdu_impl : public socket_pdu { @@ -62,7 +62,7 @@ class socket_pdu_impl : public socket_pdu bool stop() override; }; -} /* namespace blocks */ +} /* namespace network */ } /* namespace gr */ -#endif /* INCLUDED_BLOCKS_SOCKET_PDU_IMPL_H */ +#endif /* INCLUDED_NETWORK_SOCKET_PDU_IMPL_H */ diff --git a/gr-blocks/lib/stream_pdu_base.cc b/gr-network/lib/stream_pdu_base.cc similarity index 94% rename from gr-blocks/lib/stream_pdu_base.cc rename to gr-network/lib/stream_pdu_base.cc index 97e99e8886b..7b747e598d5 100644 --- a/gr-blocks/lib/stream_pdu_base.cc +++ b/gr-network/lib/stream_pdu_base.cc @@ -22,14 +22,14 @@ #include "stream_pdu_base.h" #include -#include #include +#include #include static const long timeout_us = 100 * 1000; // 100ms namespace gr { -namespace blocks { +namespace network { stream_pdu_base::stream_pdu_base(int MTU) : d_fd(-1), d_started(false), d_finished(false) { @@ -44,7 +44,7 @@ void stream_pdu_base::start_rxthread(basic_block* blk, pmt::pmt_t port) { d_blk = blk; d_port = port; - d_thread = gr::thread::thread(std::bind(&stream_pdu_base::run, this)); + d_thread = gr::thread::thread([this] { run(); }); d_started = true; } @@ -106,5 +106,5 @@ void stream_pdu_base::send(pmt::pmt_t msg) } } -} /* namespace blocks */ +} /* namespace network */ } /* namespace gr */ diff --git a/gr-blocks/lib/stream_pdu_base.h b/gr-network/lib/stream_pdu_base.h similarity index 95% rename from gr-blocks/lib/stream_pdu_base.h rename to gr-network/lib/stream_pdu_base.h index 9ca1f32043a..40940de7def 100644 --- a/gr-blocks/lib/stream_pdu_base.h +++ b/gr-network/lib/stream_pdu_base.h @@ -19,7 +19,7 @@ class basic_block; namespace gr { -namespace blocks { +namespace network { class stream_pdu_base { @@ -46,7 +46,7 @@ class stream_pdu_base gr::logger_ptr d_pdu_logger, d_pdu_debug_logger; }; -} /* namespace blocks */ +} /* namespace network */ } /* namespace gr */ #endif /* INCLUDED_STREAM_PDU_BASE_H */ diff --git a/gr-blocks/lib/tcp_connection.cc b/gr-network/lib/tcp_connection.cc similarity index 95% rename from gr-blocks/lib/tcp_connection.cc rename to gr-network/lib/tcp_connection.cc index 76f42614e99..dfb511e0530 100644 --- a/gr-blocks/lib/tcp_connection.cc +++ b/gr-network/lib/tcp_connection.cc @@ -14,10 +14,10 @@ #include "tcp_connection.h" #include -#include +#include namespace gr { -namespace blocks { +namespace network { tcp_connection::sptr tcp_connection::make(boost::asio::io_service& io_service, int MTU /*= 10000*/, @@ -83,7 +83,7 @@ void tcp_connection::handle_read(const boost::system::error_code& error, pmt::init_u8vector(bytes_transferred, (const uint8_t*)&d_buf[0]); pmt::pmt_t pdu = pmt::cons(pmt::PMT_NIL, vector); - d_block->message_port_pub(pdu::pdu_port_id(), pdu); + d_block->message_port_pub(msgport_names::pdus(), pdu); } d_socket.async_read_some( @@ -97,5 +97,5 @@ void tcp_connection::handle_read(const boost::system::error_code& error, d_socket.close(); } } -} /* namespace blocks */ +} /* namespace network */ } /* namespace gr */ diff --git a/gr-blocks/lib/tcp_connection.h b/gr-network/lib/tcp_connection.h similarity index 96% rename from gr-blocks/lib/tcp_connection.h rename to gr-network/lib/tcp_connection.h index f97f8a605ba..29a2bd79fb5 100644 --- a/gr-blocks/lib/tcp_connection.h +++ b/gr-network/lib/tcp_connection.h @@ -20,7 +20,7 @@ namespace gr { class basic_block; -namespace blocks { +namespace network { class tcp_connection { @@ -48,7 +48,7 @@ class tcp_connection void send(pmt::pmt_t vector); }; -} /* namespace blocks */ +} /* namespace network */ } /* namespace gr */ #endif /* INCLUDED_TCP_CONNECTION_H */ diff --git a/gr-network/lib/tcp_sink_impl.cc b/gr-network/lib/tcp_sink_impl.cc index 8d164697a16..6bc3892b1f5 100644 --- a/gr-network/lib/tcp_sink_impl.cc +++ b/gr-network/lib/tcp_sink_impl.cc @@ -98,8 +98,7 @@ tcp_sink_impl::tcp_sink_impl( // In this mode, we're starting a local port listener and waiting // for inbound connections. d_start_new_listener = true; - d_listener_thread = - new boost::thread(boost::bind(&tcp_sink_impl::run_listener, this)); + d_listener_thread = new boost::thread([this] { run_listener(); }); } } diff --git a/gr-blocks/lib/tuntap_pdu_impl.cc b/gr-network/lib/tuntap_pdu_impl.cc similarity index 93% rename from gr-blocks/lib/tuntap_pdu_impl.cc rename to gr-network/lib/tuntap_pdu_impl.cc index 048c33c3920..87c3750fd90 100644 --- a/gr-blocks/lib/tuntap_pdu_impl.cc +++ b/gr-network/lib/tuntap_pdu_impl.cc @@ -13,8 +13,8 @@ #endif #include "tuntap_pdu_impl.h" -#include #include +#include #include #include @@ -28,7 +28,7 @@ #endif namespace gr { -namespace blocks { +namespace network { tuntap_pdu::sptr tuntap_pdu::make(std::string dev, int MTU, bool istunflag) { @@ -52,6 +52,7 @@ tuntap_pdu_impl::tuntap_pdu_impl(std::string dev, int MTU, bool istunflag) strncpy(dev_cstr, dev.c_str(), IFNAMSIZ); dev_cstr[IFNAMSIZ - 1] = '\0'; + bool istun = d_istunflag; if (istun) { d_fd = tun_alloc(dev_cstr, (IFF_TUN | IFF_NO_PI)); @@ -82,12 +83,12 @@ tuntap_pdu_impl::tuntap_pdu_impl(std::string dev, int MTU, bool istunflag) << std::endl; // set up output message port - message_port_register_out(pdu::pdu_port_id()); - start_rxthread(this, pdu::pdu_port_id()); + message_port_register_out(msgport_names::pdus()); + start_rxthread(this, msgport_names::pdus()); // set up input message port - message_port_register_in(pdu::pdu_port_id()); - set_msg_handler(pdu::pdu_port_id(), [this](pmt::pmt_t msg) { this->send(msg); }); + message_port_register_in(msgport_names::pdus()); + set_msg_handler(msgport_names::pdus(), [this](pmt::pmt_t msg) { this->send(msg); }); } int tuntap_pdu_impl::tun_alloc(char* dev, int flags) @@ -167,5 +168,5 @@ int tuntap_pdu_impl::set_mtu(const char* dev, int MTU) } #endif -} /* namespace blocks */ +} /* namespace network */ } /* namespace gr */ diff --git a/gr-blocks/lib/tuntap_pdu_impl.h b/gr-network/lib/tuntap_pdu_impl.h similarity index 75% rename from gr-blocks/lib/tuntap_pdu_impl.h rename to gr-network/lib/tuntap_pdu_impl.h index 86149443f9b..6811712fe8f 100644 --- a/gr-blocks/lib/tuntap_pdu_impl.h +++ b/gr-network/lib/tuntap_pdu_impl.h @@ -8,18 +8,18 @@ * */ -#ifndef INCLUDED_BLOCKS_TUNTAP_PDU_IMPL_H -#define INCLUDED_BLOCKS_TUNTAP_PDU_IMPL_H +#ifndef INCLUDED_NETWORK_TUNTAP_PDU_IMPL_H +#define INCLUDED_NETWORK_TUNTAP_PDU_IMPL_H #include "stream_pdu_base.h" -#include +#include #if (defined(linux) || defined(__linux) || defined(__linux__)) #include #endif namespace gr { -namespace blocks { +namespace network { class tuntap_pdu_impl : public tuntap_pdu, public stream_pdu_base { @@ -35,7 +35,7 @@ class tuntap_pdu_impl : public tuntap_pdu, public stream_pdu_base #endif }; -} /* namespace blocks */ +} /* namespace network */ } /* namespace gr */ -#endif /* INCLUDED_BLOCKS_TUNTAP_PDU_IMPL_H */ +#endif /* INCLUDED_NETWORK_TUNTAP_PDU_IMPL_H */ diff --git a/gr-network/python/network/CMakeLists.txt b/gr-network/python/network/CMakeLists.txt index a524e6390f1..c6feaffc22e 100644 --- a/gr-network/python/network/CMakeLists.txt +++ b/gr-network/python/network/CMakeLists.txt @@ -27,8 +27,18 @@ GR_PYTHON_INSTALL( ######################################################################## # Handle the unit tests ######################################################################## -include(GrTest) - -set(GR_TEST_TARGET_DEPS gnuradio-network) +if(ENABLE_TESTING) + set(GR_TEST_TARGET_DEPS "") + set(GR_TEST_LIBRARY_DIRS "") + set(GR_TEST_PYTHON_DIRS + ${CMAKE_BINARY_DIR}/gnuradio-runtime/python + ) + include(GrTest) + file(GLOB py_qa_test_files "qa_*.py") + foreach(py_qa_test_file ${py_qa_test_files}) + get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE) + GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} -B ${py_qa_test_file}) + endforeach(py_qa_test_file) +endif(ENABLE_TESTING) add_subdirectory(bindings) diff --git a/gr-network/python/network/bindings/CMakeLists.txt b/gr-network/python/network/bindings/CMakeLists.txt index 80f02c00b2a..d87f644fd8b 100644 --- a/gr-network/python/network/bindings/CMakeLists.txt +++ b/gr-network/python/network/bindings/CMakeLists.txt @@ -6,14 +6,16 @@ include(GrPybind) list(APPEND network_python_files # packet_headers_python.cc + socket_pdu_python.cc tcp_sink_python.cc + tuntap_pdu_python.cc # udp_header_types_python.cc udp_sink_python.cc udp_source_python.cc python_bindings.cc) -GR_PYBIND_MAKE_CHECK_HASH(network - ../../.. +GR_PYBIND_MAKE_CHECK_HASH(network + ../../.. gr::network "${network_python_files}") diff --git a/gr-network/python/network/bindings/docstrings/socket_pdu_pydoc_template.h b/gr-network/python/network/bindings/docstrings/socket_pdu_pydoc_template.h new file mode 100644 index 00000000000..f7b9cb72bf4 --- /dev/null +++ b/gr-network/python/network/bindings/docstrings/socket_pdu_pydoc_template.h @@ -0,0 +1,24 @@ +/* + * Copyright 2021 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, network, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_network_socket_pdu = R"doc()doc"; + + +static const char* __doc_gr_network_socket_pdu_socket_pdu = R"doc()doc"; + + +static const char* __doc_gr_network_socket_pdu_make = R"doc()doc"; diff --git a/gr-blocks/python/blocks/bindings/docstrings/tuntap_pdu_pydoc_template.h b/gr-network/python/network/bindings/docstrings/tuntap_pdu_pydoc_template.h similarity index 53% rename from gr-blocks/python/blocks/bindings/docstrings/tuntap_pdu_pydoc_template.h rename to gr-network/python/network/bindings/docstrings/tuntap_pdu_pydoc_template.h index eea7349e62e..ec5bf4be2ec 100644 --- a/gr-blocks/python/blocks/bindings/docstrings/tuntap_pdu_pydoc_template.h +++ b/gr-network/python/network/bindings/docstrings/tuntap_pdu_pydoc_template.h @@ -1,5 +1,5 @@ /* - * Copyright 2020 Free Software Foundation, Inc. + * Copyright 2021 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -7,7 +7,7 @@ * */ #include "pydoc_macros.h" -#define D(...) DOC(gr, blocks, __VA_ARGS__) +#define D(...) DOC(gr, network, __VA_ARGS__) /* This file contains placeholders for docstrings for the Python bindings. Do not edit! These were automatically extracted during the binding process @@ -15,10 +15,10 @@ */ -static const char* __doc_gr_blocks_tuntap_pdu = R"doc()doc"; +static const char* __doc_gr_network_tuntap_pdu = R"doc()doc"; -static const char* __doc_gr_blocks_tuntap_pdu_tuntap_pdu = R"doc()doc"; +static const char* __doc_gr_network_tuntap_pdu_tuntap_pdu = R"doc()doc"; -static const char* __doc_gr_blocks_tuntap_pdu_make = R"doc()doc"; +static const char* __doc_gr_network_tuntap_pdu_make = R"doc()doc"; diff --git a/gr-network/python/network/bindings/python_bindings.cc b/gr-network/python/network/bindings/python_bindings.cc index 3de111aa795..cacd4a1bf7d 100644 --- a/gr-network/python/network/bindings/python_bindings.cc +++ b/gr-network/python/network/bindings/python_bindings.cc @@ -16,7 +16,9 @@ namespace py = pybind11; // void bind_packet_headers(py::module&); +void bind_socket_pdu(py::module&); void bind_tcp_sink(py::module&); +void bind_tuntap_pdu(py::module&); // void bind_udp_header_types(py::module&); void bind_udp_sink(py::module&); void bind_udp_source(py::module&); @@ -41,7 +43,9 @@ PYBIND11_MODULE(network_python, m) py::module::import("gnuradio.gr"); // bind_packet_headers(m); + bind_socket_pdu(m); bind_tcp_sink(m); + bind_tuntap_pdu(m); // bind_udp_header_types(m); bind_udp_sink(m); bind_udp_source(m); diff --git a/gr-blocks/python/blocks/bindings/socket_pdu_python.cc b/gr-network/python/network/bindings/socket_pdu_python.cc similarity index 86% rename from gr-blocks/python/blocks/bindings/socket_pdu_python.cc rename to gr-network/python/network/bindings/socket_pdu_python.cc index 138567bd5e8..a3fb134ec10 100644 --- a/gr-blocks/python/blocks/bindings/socket_pdu_python.cc +++ b/gr-network/python/network/bindings/socket_pdu_python.cc @@ -1,5 +1,5 @@ /* - * Copyright 2020 Free Software Foundation, Inc. + * Copyright 2021 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -13,8 +13,8 @@ /* If manual edits are made, the following tags should be modified accordingly. */ /* BINDTOOL_GEN_AUTOMATIC(0) */ /* BINDTOOL_USE_PYGCCXML(0) */ -/* BINDTOOL_HEADER_FILE(socket_pdu.h) */ -/* BINDTOOL_HEADER_FILE_HASH(22b717395ed280a5f4f9ac0bd31d2986) */ +/* BINDTOOL_HEADER_FILE(socket_pdu.h) */ +/* BINDTOOL_HEADER_FILE_HASH(4c11b80b4561122125568a9ab76cea3a) */ /***********************************************************************************/ #include @@ -23,14 +23,14 @@ namespace py = pybind11; -#include +#include // pydoc.h is automatically generated in the build directory #include void bind_socket_pdu(py::module& m) { - using socket_pdu = ::gr::blocks::socket_pdu; + using socket_pdu = gr::network::socket_pdu; py::class_>( diff --git a/gr-blocks/python/blocks/bindings/tuntap_pdu_python.cc b/gr-network/python/network/bindings/tuntap_pdu_python.cc similarity index 85% rename from gr-blocks/python/blocks/bindings/tuntap_pdu_python.cc rename to gr-network/python/network/bindings/tuntap_pdu_python.cc index 376bfc05271..a5a09f25162 100644 --- a/gr-blocks/python/blocks/bindings/tuntap_pdu_python.cc +++ b/gr-network/python/network/bindings/tuntap_pdu_python.cc @@ -1,5 +1,5 @@ /* - * Copyright 2020 Free Software Foundation, Inc. + * Copyright 2021 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -13,8 +13,8 @@ /* If manual edits are made, the following tags should be modified accordingly. */ /* BINDTOOL_GEN_AUTOMATIC(0) */ /* BINDTOOL_USE_PYGCCXML(0) */ -/* BINDTOOL_HEADER_FILE(tuntap_pdu.h) */ -/* BINDTOOL_HEADER_FILE_HASH(b56c8af7086f7d50d4d768ab5e99b839) */ +/* BINDTOOL_HEADER_FILE(tuntap_pdu.h) */ +/* BINDTOOL_HEADER_FILE_HASH(26b7f31af528ff1bf62a965e6b0dd636) */ /***********************************************************************************/ #include @@ -23,14 +23,14 @@ namespace py = pybind11; -#include +#include // pydoc.h is automatically generated in the build directory #include void bind_tuntap_pdu(py::module& m) { - using tuntap_pdu = ::gr::blocks::tuntap_pdu; + using tuntap_pdu = gr::network::tuntap_pdu; py::class_>( diff --git a/gr-blocks/python/blocks/qa_socket_pdu.py b/gr-network/python/network/qa_socket_pdu.py similarity index 82% rename from gr-blocks/python/blocks/qa_socket_pdu.py rename to gr-network/python/network/qa_socket_pdu.py index 16e118dafbd..136f7e4cc61 100644 --- a/gr-blocks/python/blocks/qa_socket_pdu.py +++ b/gr-network/python/network/qa_socket_pdu.py @@ -9,7 +9,8 @@ # -from gnuradio import gr, gr_unittest, blocks +from gnuradio import gr, gr_unittest, blocks, pdu +from gnuradio import network import random import pmt import time @@ -27,8 +28,8 @@ def tearDown(self): def test_001(self): # Test that blocks can be created and destroyed without hanging port = str(random.Random().randint(0, 30000) + 10000) - self.pdu_send = blocks.socket_pdu("UDP_CLIENT", "localhost", port) - self.pdu_recv = blocks.socket_pdu("UDP_SERVER", "localhost", port) + self.pdu_send = network.socket_pdu("UDP_CLIENT", "localhost", port) + self.pdu_recv = network.socket_pdu("UDP_SERVER", "localhost", port) self.pdu_send = None self.pdu_recv = None @@ -40,8 +41,8 @@ def test_002(self): pdu_msg = pmt.cons(pmt.PMT_NIL, data) self.pdu_source = blocks.message_strobe(pdu_msg, 500) - self.pdu_recv = blocks.socket_pdu("UDP_SERVER", "localhost", port) - self.pdu_send = blocks.socket_pdu("UDP_CLIENT", "localhost", port) + self.pdu_recv = network.socket_pdu("UDP_SERVER", "localhost", port) + self.pdu_send = network.socket_pdu("UDP_CLIENT", "localhost", port) self.dbg = blocks.message_debug() @@ -91,10 +92,10 @@ def test_003(self): tags = [tag1, tag2] src = blocks.vector_source_b(srcdata, False, 1, tags) - ts_to_pdu = blocks.tagged_stream_to_pdu(blocks.byte_t, "len") - pdu_send = blocks.socket_pdu("UDP_CLIENT", "localhost", "4141") - #pdu_recv = blocks.socket_pdu("UDP_SERVER", "localhost", port) - pdu_to_ts = blocks.pdu_to_tagged_stream(blocks.byte_t, "len") + ts_to_pdu = pdu.tagged_stream_to_pdu(gr.types.byte_t, "len") + pdu_send = network.socket_pdu("UDP_CLIENT", "localhost", "4141") + #pdu_recv = network.socket_pdu("UDP_SERVER", "localhost", port) + pdu_to_ts = pdu.pdu_to_tagged_stream(gr.types.byte_t, "len") head = blocks.head(gr.sizeof_char, 10) sink = blocks.vector_sink_b(1) @@ -116,8 +117,8 @@ def test_004(self): pdu_msg = pmt.cons(pmt.PMT_NIL, data) self.pdu_source = blocks.message_strobe(pdu_msg, 500) - self.pdu_send = blocks.socket_pdu("TCP_SERVER", "localhost", port, mtu) - self.pdu_recv = blocks.socket_pdu("TCP_CLIENT", "localhost", port, mtu) + self.pdu_send = network.socket_pdu("TCP_SERVER", "localhost", port, mtu) + self.pdu_recv = network.socket_pdu("TCP_CLIENT", "localhost", port, mtu) self.pdu_sink = blocks.message_debug() self.tb.msg_connect(self.pdu_source, "strobe", self.pdu_send, "pdus") diff --git a/gr-pdu/CMakeLists.txt b/gr-pdu/CMakeLists.txt new file mode 100644 index 00000000000..d0a94d6f918 --- /dev/null +++ b/gr-pdu/CMakeLists.txt @@ -0,0 +1,57 @@ +# Copyright 2021 Jacob Gilbert +# +# This file is part of GNU Radio +# +# SPDX-License-Identifier: GPL-3.0-or-later +# + +######################################################################## +# Setup dependencies +######################################################################## +include(GrBoost) + +######################################################################## +# Register component +######################################################################## +include(GrComponent) +GR_REGISTER_COMPONENT("gr-pdu" ENABLE_GR_PDU + Boost_FOUND + ENABLE_GNURADIO_RUNTIME + ENABLE_GR_BLOCKS + ENABLE_GR_FILTER + ) + +######################################################################## +# Begin conditional configuration +######################################################################## +if(ENABLE_GR_PDU) + +######################################################################## +# Add subdirectories +######################################################################## +add_subdirectory(include/gnuradio/pdu) +add_subdirectory(lib) +if(ENABLE_PYTHON) + add_subdirectory(python/pdu) + if(ENABLE_EXAMPLES) + add_subdirectory(examples) + endif(ENABLE_EXAMPLES) +endif(ENABLE_PYTHON) +if(ENABLE_GRC) + add_subdirectory(grc) +endif(ENABLE_GRC) + +######################################################################## +# Create Pkg Config File +######################################################################## +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-pdu.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-pdu.pc +@ONLY) + +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-pdu.pc + DESTINATION ${GR_LIBRARY_DIR}/pkgconfig +) + +endif(ENABLE_GR_PDU) diff --git a/gr-pdu/docs/CMakeLists.txt b/gr-pdu/docs/CMakeLists.txt new file mode 100644 index 00000000000..6614de37197 --- /dev/null +++ b/gr-pdu/docs/CMakeLists.txt @@ -0,0 +1,11 @@ +# Copyright 2021 Jacob Gilbert +# +# This file is part of GNU Radio +# +# SPDX-License-Identifier: GPL-3.0-or-later +# + +install( + FILES README.pdu + DESTINATION ${GR_PKG_DOC_DIR} +) diff --git a/gr-pdu/docs/README.pdu b/gr-pdu/docs/README.pdu new file mode 100644 index 00000000000..f70b18648d4 --- /dev/null +++ b/gr-pdu/docs/README.pdu @@ -0,0 +1,12 @@ +This is the GNU Radio PDU package. It contains signal processing +blocks that operate on Protocol Data Unit format messages. Many +such blocks are analogs of streaming API functionality. To use the +network blocks, the Python namespace is in 'network', which is +imported as: + + from gnuradio import pdu + +A quick listing of the details can be found in Python after +importing by using: + + help(pdu) diff --git a/gr-pdu/examples/CMakeLists.txt b/gr-pdu/examples/CMakeLists.txt new file mode 100644 index 00000000000..c3f1df7c0d8 --- /dev/null +++ b/gr-pdu/examples/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright 2021 Jacob Gilbert +# +# This file is part of GNU Radio +# +# SPDX-License-Identifier: GPL-3.0-or-later +# + +install( + FILES + DESTINATION ${GR_PKG_DATA_DIR}/examples/pdu +) + diff --git a/gr-pdu/gnuradio-pdu.pc.in b/gr-pdu/gnuradio-pdu.pc.in new file mode 100644 index 00000000000..825b41e8071 --- /dev/null +++ b/gr-pdu/gnuradio-pdu.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: gnuradio-pdu +Description: GNU Radio blocks for PDU based processing +Requires: gnuradio-runtime +Version: @LIBVER@ +Libs: -L${libdir} -lgnuradio-pdu +Cflags: -I${includedir} diff --git a/gr-pdu/grc/CMakeLists.txt b/gr-pdu/grc/CMakeLists.txt new file mode 100644 index 00000000000..fd0870c6cbf --- /dev/null +++ b/gr-pdu/grc/CMakeLists.txt @@ -0,0 +1,11 @@ +# Copyright 2021 Jacob Gilbert +# +# This file is part of GNU Radio +# +# SPDX-License-Identifier: GPL-3.0-or-later +# + +######################################################################## +file(GLOB yml_files "*.yml") + +install(FILES ${yml_files} DESTINATION ${GRC_BLOCKS_DIR}) diff --git a/gr-pdu/grc/pdu.tree.yml b/gr-pdu/grc/pdu.tree.yml new file mode 100644 index 00000000000..da988d007df --- /dev/null +++ b/gr-pdu/grc/pdu.tree.yml @@ -0,0 +1,9 @@ +'[Core]': +- Message Tools: + - pdu_pdu_filter + - pdu_pdu_remove + - pdu_pdu_set + - pdu_pdu_split + - pdu_pdu_to_tagged_stream + - pdu_tagged_stream_to_pdu + - pdu_random_pdu diff --git a/gr-blocks/grc/blocks_pdu_filter.block.yml b/gr-pdu/grc/pdu_pdu_filter.block.yml similarity index 84% rename from gr-blocks/grc/blocks_pdu_filter.block.yml rename to gr-pdu/grc/pdu_pdu_filter.block.yml index e2138c5118e..292b7ab9757 100644 --- a/gr-blocks/grc/blocks_pdu_filter.block.yml +++ b/gr-pdu/grc/pdu_pdu_filter.block.yml @@ -1,4 +1,4 @@ -id: blocks_pdu_filter +id: pdu_pdu_filter label: PDU Filter flags: [ python ] @@ -30,9 +30,9 @@ outputs: templates: imports: |- - from gnuradio import blocks + from gnuradio import pdu import pmt - make: blocks.pdu_filter(${k}, ${v}, ${invert}) + make: pdu.pdu_filter(${k}, ${v}, ${invert}) callbacks: - set_key(${k}) - set_val(${v}) diff --git a/gr-blocks/grc/blocks_pdu_remove.block.yml b/gr-pdu/grc/pdu_pdu_remove.block.yml similarity index 78% rename from gr-blocks/grc/blocks_pdu_remove.block.yml rename to gr-pdu/grc/pdu_pdu_remove.block.yml index 225d57005e4..bcb582f0b49 100644 --- a/gr-blocks/grc/blocks_pdu_remove.block.yml +++ b/gr-pdu/grc/pdu_pdu_remove.block.yml @@ -1,4 +1,4 @@ -id: blocks_pdu_remove +id: pdu_pdu_remove label: PDU Remove flags: [ python ] @@ -20,9 +20,9 @@ outputs: templates: imports: |- - from gnuradio import blocks + from gnuradio import pdu import pmt - make: blocks.pdu_remove(${k}) + make: pdu.pdu_remove(${k}) callbacks: - set_key(${k}) diff --git a/gr-blocks/grc/blocks_pdu_set.block.yml b/gr-pdu/grc/pdu_pdu_set.block.yml similarity index 82% rename from gr-blocks/grc/blocks_pdu_set.block.yml rename to gr-pdu/grc/pdu_pdu_set.block.yml index 7d90be3dadb..f3d3633d4d1 100644 --- a/gr-blocks/grc/blocks_pdu_set.block.yml +++ b/gr-pdu/grc/pdu_pdu_set.block.yml @@ -1,4 +1,4 @@ -id: blocks_pdu_set +id: pdu_pdu_set label: PDU Set flags: [ python ] @@ -24,9 +24,9 @@ outputs: templates: imports: |- - from gnuradio import blocks + from gnuradio import pdu import pmt - make: blocks.pdu_set(${k}, ${v}) + make: pdu.pdu_set(${k}, ${v}) callbacks: - set_key(${k}) - set_val(${v}) diff --git a/gr-pdu/grc/pdu_pdu_split.block.yml b/gr-pdu/grc/pdu_pdu_split.block.yml new file mode 100644 index 00000000000..1f9ca1a75f4 --- /dev/null +++ b/gr-pdu/grc/pdu_pdu_split.block.yml @@ -0,0 +1,28 @@ +id: pdu_pdu_split +label: PDU Split +category: '[Core]/PDU' + +parameters: +- id: pass_empty + label: Empty + dtype: enum + options: ['False', 'True'] + option_labels: [Drop, Print] + +inputs: +- domain: message + id: pdus + +outputs: +- domain: message + id: dict + optional: true +- domain: message + id: data + optional: true + +templates: + imports: from gnuradio import pdu + make: pdu.pdu_split(${pass_empty}) + +file_format: 1 diff --git a/gr-pdu/grc/pdu_pdu_to_tagged_stream.block.yml b/gr-pdu/grc/pdu_pdu_to_tagged_stream.block.yml new file mode 100644 index 00000000000..1d8ebfc21b9 --- /dev/null +++ b/gr-pdu/grc/pdu_pdu_to_tagged_stream.block.yml @@ -0,0 +1,37 @@ +id: pdu_pdu_to_tagged_stream +label: PDU to Tagged Stream +flags: [ python, cpp ] + +parameters: +- id: type + label: Item Type + dtype: enum + options: [byte, complex, float] + option_attributes: + tv: [gr.types.byte_t, gr.types.complex_t, gr.types.float_t] + hide: part +- id: tag + label: Length tag name + dtype: string + default: packet_len + +inputs: +- domain: message + id: pdus + +outputs: +- domain: stream + dtype: ${ type } + +templates: + imports: from gnuradio import gr, pdu + make: pdu.pdu_to_tagged_stream(${type.tv}, ${tag}) + +cpp_templates: + includes: ['#include '] + declarations: 'pdu::pdu_to_tagged_stream::sptr ${id};' + make: 'this->${id} = pdu::pdu_to_tagged_stream::make(${type.tv}, ${tag});' + translations: + pdu.: 'pdu::' + +file_format: 1 diff --git a/gr-blocks/grc/blocks_random_pdu.block.yml b/gr-pdu/grc/pdu_random_pdu.block.yml similarity index 79% rename from gr-blocks/grc/blocks_random_pdu.block.yml rename to gr-pdu/grc/pdu_random_pdu.block.yml index 540c1441927..ec2bf724602 100644 --- a/gr-blocks/grc/blocks_random_pdu.block.yml +++ b/gr-pdu/grc/pdu_random_pdu.block.yml @@ -1,4 +1,4 @@ -id: blocks_random_pdu +id: pdu_random_pdu label: Random PDU Generator flags: [ python ] @@ -32,8 +32,8 @@ outputs: templates: imports: |- - from gnuradio import blocks + from gnuradio import pdu import pmt - make: blocks.random_pdu(${minsize}, ${maxsize}, ${mask}, ${length_modulo}) + make: pdu.random_pdu(${minsize}, ${maxsize}, ${mask}, ${length_modulo}) file_format: 1 diff --git a/gr-blocks/grc/blocks_tagged_stream_to_pdu.block.yml b/gr-pdu/grc/pdu_tagged_stream_to_pdu.block.yml similarity index 50% rename from gr-blocks/grc/blocks_tagged_stream_to_pdu.block.yml rename to gr-pdu/grc/pdu_tagged_stream_to_pdu.block.yml index 54fafdeec11..96cb4575889 100644 --- a/gr-blocks/grc/blocks_tagged_stream_to_pdu.block.yml +++ b/gr-pdu/grc/pdu_tagged_stream_to_pdu.block.yml @@ -1,4 +1,4 @@ -id: blocks_tagged_stream_to_pdu +id: pdu_tagged_stream_to_pdu label: Tagged Stream to PDU flags: [ python ] @@ -8,7 +8,7 @@ parameters: dtype: enum options: [byte, complex, float] option_attributes: - tv: [blocks.byte_t, blocks.complex_t, blocks.float_t] + tv: [gr.types.byte_t, gr.types.complex_t, gr.types.float_t] hide: part - id: tag label: Length tag name @@ -25,12 +25,12 @@ outputs: optional: true templates: - imports: from gnuradio import blocks - make: blocks.tagged_stream_to_pdu(${type.tv}, ${tag}) + imports: from gnuradio import gr, pdu + make: pdu.tagged_stream_to_pdu(${type.tv}, ${tag}) cpp_templates: - includes: ['#include '] - declarations: 'blocks::tagged_stream_to_pdu::sptr ${id};' - make: 'this->${id} = blocks::tagged_stream_to_pdu::make(${type.tv}, ${tag});' + includes: ['#include '] + declarations: 'pdu::tagged_stream_to_pdu::sptr ${id};' + make: 'this->${id} = pdu::tagged_stream_to_pdu::make(${type.tv}, ${tag});' file_format: 1 diff --git a/gr-pdu/include/gnuradio/pdu/CMakeLists.txt b/gr-pdu/include/gnuradio/pdu/CMakeLists.txt new file mode 100644 index 00000000000..987a54f45b6 --- /dev/null +++ b/gr-pdu/include/gnuradio/pdu/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright 2021 Jacob Gilbert +# +# This file is part of GNU Radio +# +# SPDX-License-Identifier: GPL-3.0-or-later +# + +######################################################################## +# Install header files +######################################################################## +install(FILES + api.h + pdu_filter.h + pdu_remove.h + pdu_set.h + pdu_split.h + pdu_to_tagged_stream.h + random_pdu.h + tagged_stream_to_pdu.h + DESTINATION ${GR_INCLUDE_DIR}/gnuradio/pdu +) + diff --git a/gr-pdu/include/gnuradio/pdu/api.h b/gr-pdu/include/gnuradio/pdu/api.h new file mode 100644 index 00000000000..6f31dde8f31 --- /dev/null +++ b/gr-pdu/include/gnuradio/pdu/api.h @@ -0,0 +1,21 @@ +/* + * Copyright 2021 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +#ifndef INCLUDED_PDU_API_H +#define INCLUDED_PDU_API_H + +#include + +#ifdef gnuradio_pdu_EXPORTS +#define PDU_API __GR_ATTR_EXPORT +#else +#define PDU_API __GR_ATTR_IMPORT +#endif + +#endif /* INCLUDED_PDU_API_H */ diff --git a/gr-blocks/include/gnuradio/blocks/pdu_filter.h b/gr-pdu/include/gnuradio/pdu/pdu_filter.h similarity index 70% rename from gr-blocks/include/gnuradio/blocks/pdu_filter.h rename to gr-pdu/include/gnuradio/pdu/pdu_filter.h index db43fc914e9..6437c040523 100644 --- a/gr-blocks/include/gnuradio/blocks/pdu_filter.h +++ b/gr-pdu/include/gnuradio/pdu/pdu_filter.h @@ -8,24 +8,24 @@ * */ -#ifndef INCLUDED_BLOCKS_PDU_FILTER_H -#define INCLUDED_BLOCKS_PDU_FILTER_H +#ifndef INCLUDED_PDU_PDU_FILTER_H +#define INCLUDED_PDU_PDU_FILTER_H #include -#include +#include namespace gr { -namespace blocks { +namespace pdu { /*! * \brief Propagates only pdus containing k=>v in meta * \ingroup message_tools_blk * \ingroup debug_tools_blk */ -class BLOCKS_API pdu_filter : virtual public block +class PDU_API pdu_filter : virtual public block { public: - // gr::blocks::pdu_filter::sptr + // gr::pdu::pdu_filter::sptr typedef std::shared_ptr sptr; /*! @@ -37,7 +37,7 @@ class BLOCKS_API pdu_filter : virtual public block virtual void set_inversion(bool invert) = 0; }; -} /* namespace blocks */ +} /* namespace pdu */ } /* namespace gr */ -#endif /* INCLUDED_BLOCKS_PDU_FILTER_H */ +#endif /* INCLUDED_PDU_PDU_FILTER_H */ diff --git a/gr-blocks/include/gnuradio/blocks/pdu_remove.h b/gr-pdu/include/gnuradio/pdu/pdu_remove.h similarity index 66% rename from gr-blocks/include/gnuradio/blocks/pdu_remove.h rename to gr-pdu/include/gnuradio/pdu/pdu_remove.h index 266d917486a..22122b8a59a 100644 --- a/gr-blocks/include/gnuradio/blocks/pdu_remove.h +++ b/gr-pdu/include/gnuradio/pdu/pdu_remove.h @@ -8,24 +8,24 @@ * */ -#ifndef INCLUDED_BLOCKS_PDU_REMOVE_H -#define INCLUDED_BLOCKS_PDU_REMOVE_H +#ifndef INCLUDED_PDU_PDU_REMOVE_H +#define INCLUDED_PDU_PDU_REMOVE_H #include -#include +#include namespace gr { -namespace blocks { +namespace pdu { /*! * \brief remove key k in pdu's meta field and pass on * \ingroup message_tools_blk * \ingroup debug_tools_blk */ -class BLOCKS_API pdu_remove : virtual public block +class PDU_API pdu_remove : virtual public block { public: - // gr::blocks::pdu_remove::sptr + // gr::pdu::pdu_remove::sptr typedef std::shared_ptr sptr; /*! @@ -35,7 +35,7 @@ class BLOCKS_API pdu_remove : virtual public block virtual void set_key(pmt::pmt_t key) = 0; }; -} /* namespace blocks */ +} /* namespace pdu */ } /* namespace gr */ -#endif /* INCLUDED_BLOCKS_PDU_REMOVE_H */ +#endif /* INCLUDED_PDU_PDU_REMOVE_H */ diff --git a/gr-blocks/include/gnuradio/blocks/pdu_set.h b/gr-pdu/include/gnuradio/pdu/pdu_set.h similarity index 69% rename from gr-blocks/include/gnuradio/blocks/pdu_set.h rename to gr-pdu/include/gnuradio/pdu/pdu_set.h index fad755a9dcc..1874cbe87e1 100644 --- a/gr-blocks/include/gnuradio/blocks/pdu_set.h +++ b/gr-pdu/include/gnuradio/pdu/pdu_set.h @@ -8,24 +8,24 @@ * */ -#ifndef INCLUDED_BLOCKS_PDU_SET_H -#define INCLUDED_BLOCKS_PDU_SET_H +#ifndef INCLUDED_PDU_PDU_SET_H +#define INCLUDED_PDU_PDU_SET_H #include -#include +#include namespace gr { -namespace blocks { +namespace pdu { /*! * \brief Set k=>v in pdu's meta field and pass on * \ingroup message_tools_blk * \ingroup debug_tools_blk */ -class BLOCKS_API pdu_set : virtual public block +class PDU_API pdu_set : virtual public block { public: - // gr::blocks::pdu_set::sptr + // gr::pdu::pdu_set::sptr typedef std::shared_ptr sptr; /*! @@ -36,7 +36,7 @@ class BLOCKS_API pdu_set : virtual public block virtual void set_val(pmt::pmt_t val) = 0; }; -} /* namespace blocks */ +} /* namespace pdu */ } /* namespace gr */ -#endif /* INCLUDED_BLOCKS_PDU_SET_H */ +#endif /* INCLUDED_PDU_PDU_SET_H */ diff --git a/gr-pdu/include/gnuradio/pdu/pdu_split.h b/gr-pdu/include/gnuradio/pdu/pdu_split.h new file mode 100644 index 00000000000..8f4f3f91e2e --- /dev/null +++ b/gr-pdu/include/gnuradio/pdu/pdu_split.h @@ -0,0 +1,46 @@ +/* -*- c++ -*- */ +/* + * Copyright 2021 NTESS LLC. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +#ifndef INCLUDED_PDU_PDU_SPLIT_H +#define INCLUDED_PDU_PDU_SPLIT_H + +#include +#include + +namespace gr { +namespace pdu { + +/*! + * \brief Split PDU dict and data to separate ports + * \ingroup debug_tools_blk + * \ingroup pdu_blk + * + * Splits a PDU into its metadata dictionary and vector, + * outputs nothing if the input message is not a PDU. Useful for stripping metadata out + * for printing or saving. + * + */ +class PDU_API pdu_split : virtual public gr::block +{ +public: + typedef std::shared_ptr sptr; + + /*! + * \brief Return a shared_ptr to a new instance of pdu::pdu_split. + * + * @param pass_empty_data - true to pass PDU vectors that are length 0 + */ + static sptr make(bool pass_empty_data = false); +}; + +} // namespace pdu +} // namespace gr + +#endif /* INCLUDED_PDU_PDU_SPLIT_H */ diff --git a/gr-blocks/include/gnuradio/blocks/pdu_to_tagged_stream.h b/gr-pdu/include/gnuradio/pdu/pdu_to_tagged_stream.h similarity index 59% rename from gr-blocks/include/gnuradio/blocks/pdu_to_tagged_stream.h rename to gr-pdu/include/gnuradio/pdu/pdu_to_tagged_stream.h index ec364a42486..ed0c7b8064f 100644 --- a/gr-blocks/include/gnuradio/blocks/pdu_to_tagged_stream.h +++ b/gr-pdu/include/gnuradio/pdu/pdu_to_tagged_stream.h @@ -8,37 +8,37 @@ * */ -#ifndef INCLUDED_BLOCKS_PDU_TO_TAGGED_STREAM_H -#define INCLUDED_BLOCKS_PDU_TO_TAGGED_STREAM_H +#ifndef INCLUDED_PDU_PDU_TO_TAGGED_STREAM_H +#define INCLUDED_PDU_PDU_TO_TAGGED_STREAM_H -#include -#include +#include +#include #include namespace gr { -namespace blocks { +namespace pdu { /*! * \brief Turns received PDUs into a tagged stream of items * \ingroup message_tools_blk */ -class BLOCKS_API pdu_to_tagged_stream : virtual public tagged_stream_block +class PDU_API pdu_to_tagged_stream : virtual public tagged_stream_block { public: - // gr::blocks::pdu_to_tagged_stream::sptr + // gr::pdu::pdu_to_tagged_stream::sptr typedef std::shared_ptr sptr; /*! * \brief Construct a pdu_to_tagged_stream block - * \param type PDU type of pdu::vector_type + * \param type PDU type of gr::types::vector_type * \param lengthtagname The name of the tag that specifies how long the packet is. * Defaults to 'packet_len'. */ - static sptr make(pdu::vector_type type, + static sptr make(gr::types::vector_type type, const std::string& lengthtagname = "packet_len"); }; -} /* namespace blocks */ +} /* namespace pdu */ } /* namespace gr */ -#endif /* INCLUDED_BLOCKS_PDU_TO_TAGGED_STREAM_H */ +#endif /* INCLUDED_PDU_PDU_TO_TAGGED_STREAM_H */ diff --git a/gr-blocks/include/gnuradio/blocks/random_pdu.h b/gr-pdu/include/gnuradio/pdu/random_pdu.h similarity index 67% rename from gr-blocks/include/gnuradio/blocks/random_pdu.h rename to gr-pdu/include/gnuradio/pdu/random_pdu.h index 7c57d1de6c6..a9b8b6ed786 100644 --- a/gr-blocks/include/gnuradio/blocks/random_pdu.h +++ b/gr-pdu/include/gnuradio/pdu/random_pdu.h @@ -8,24 +8,24 @@ * */ -#ifndef INCLUDED_BLOCKS_RANDOM_PDU_H -#define INCLUDED_BLOCKS_RANDOM_PDU_H +#ifndef INCLUDED_PDU_RANDOM_PDU_H +#define INCLUDED_PDU_RANDOM_PDU_H #include -#include +#include namespace gr { -namespace blocks { +namespace pdu { /*! * \brief Sends a random PDU at intervals * \ingroup message_tools_blk * \ingroup debug_tools_blk */ -class BLOCKS_API random_pdu : virtual public block +class PDU_API random_pdu : virtual public block { public: - // gr::blocks::random_pdu::sptr + // gr::pdu::random_pdu::sptr typedef std::shared_ptr sptr; /*! @@ -35,7 +35,7 @@ class BLOCKS_API random_pdu : virtual public block make(int mintime, int maxtime, unsigned char byte_mask = 0xFF, int length_modulo = 1); }; -} /* namespace blocks */ +} /* namespace pdu */ } /* namespace gr */ -#endif /* INCLUDED_BLOCKS_RANDOM_PDU_H */ +#endif /* INCLUDED_PDU_RANDOM_PDU_H */ diff --git a/gr-blocks/include/gnuradio/blocks/tagged_stream_to_pdu.h b/gr-pdu/include/gnuradio/pdu/tagged_stream_to_pdu.h similarity index 65% rename from gr-blocks/include/gnuradio/blocks/tagged_stream_to_pdu.h rename to gr-pdu/include/gnuradio/pdu/tagged_stream_to_pdu.h index 74c7b747735..c46ac729829 100644 --- a/gr-blocks/include/gnuradio/blocks/tagged_stream_to_pdu.h +++ b/gr-pdu/include/gnuradio/pdu/tagged_stream_to_pdu.h @@ -8,15 +8,15 @@ * */ -#ifndef INCLUDED_BLOCKS_TAGGED_STREAM_TO_PDU_H -#define INCLUDED_BLOCKS_TAGGED_STREAM_TO_PDU_H +#ifndef INCLUDED_PDU_TAGGED_STREAM_TO_PDU_H +#define INCLUDED_PDU_TAGGED_STREAM_TO_PDU_H -#include -#include +#include +#include #include namespace gr { -namespace blocks { +namespace pdu { /*! * \brief Turns received stream data and tags into PDUs and sends @@ -27,23 +27,23 @@ namespace blocks { * first element is a dictionary containing all the tags. The * second is a vector containing the actual data. */ -class BLOCKS_API tagged_stream_to_pdu : virtual public tagged_stream_block +class PDU_API tagged_stream_to_pdu : virtual public tagged_stream_block { public: - // gr::blocks::tagged_stream_to_pdu::sptr + // gr::pdu::tagged_stream_to_pdu::sptr typedef std::shared_ptr sptr; /*! * \brief Construct a tagged_stream_to_pdu block - * \param type PDU type of pdu::vector_type + * \param type PDU type of gr::types::vector_type * \param lengthtagname The name of the tag that specifies * how long the packet is. */ - static sptr make(pdu::vector_type type, + static sptr make(gr::types::vector_type type, const std::string& lengthtagname = "packet_len"); }; -} /* namespace blocks */ +} /* namespace pdu */ } /* namespace gr */ -#endif /* INCLUDED_BLOCKS_TAGGED_STREAM_TO_PDU_H */ +#endif /* INCLUDED_PDU_TAGGED_STREAM_TO_PDU_H */ diff --git a/gr-pdu/lib/CMakeLists.txt b/gr-pdu/lib/CMakeLists.txt new file mode 100644 index 00000000000..7de8a52bf86 --- /dev/null +++ b/gr-pdu/lib/CMakeLists.txt @@ -0,0 +1,54 @@ +# Copyright 2021 Jacob Gilbert +# +# This file is part of GNU Radio +# +# SPDX-License-Identifier: GPL-3.0-or-later +# + +######################################################################## +# Setup library +######################################################################## +add_library(gnuradio-pdu + pdu_filter_impl.cc + pdu_remove_impl.cc + pdu_set_impl.cc + pdu_split_impl.cc + pdu_to_tagged_stream_impl.cc + random_pdu_impl.cc + tagged_stream_to_pdu_impl.cc +) + +#Add Windows DLL resource file if using MSVC +if(MSVC) + include(${CMAKE_SOURCE_DIR}/cmake/Modules/GrVersion.cmake) + + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-pdu.rc.in + ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-pdu.rc + @ONLY) + + target_sources(gnuradio-pdu PRIVATE + ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-pdu.rc + ) +endif(MSVC) + +target_link_libraries(gnuradio-pdu PUBLIC + gnuradio-runtime + gnuradio-blocks + gnuradio-filter +) + +target_include_directories(gnuradio-pdu + PUBLIC $ + PUBLIC $ + ) + + +# we need -no-as-needed or else -lgslcblas gets stripped out on newer version of gcc +if(CMAKE_COMPILER_IS_GNUCC AND NOT APPLE) + SET_TARGET_PROPERTIES(gnuradio-pdu PROPERTIES LINK_FLAGS "-Wl,--no-as-needed") +endif() + +if(BUILD_SHARED_LIBS) + GR_LIBRARY_FOO(gnuradio-pdu) +endif() diff --git a/gr-pdu/lib/gnuradio-pdu.rc.in b/gr-pdu/lib/gnuradio-pdu.rc.in new file mode 100644 index 00000000000..eb050a0b685 --- /dev/null +++ b/gr-pdu/lib/gnuradio-pdu.rc.in @@ -0,0 +1,43 @@ +/* -*- c++ -*- */ +/* + * Copyright 2021 Jacob Gilbert + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +#include + +VS_VERSION_INFO VERSIONINFO + FILEVERSION @MAJOR_VERSION@,@API_COMPAT@,@RC_MINOR_VERSION@,@RC_MAINT_VERSION@ + PRODUCTVERSION @MAJOR_VERSION@,@API_COMPAT@,@RC_MINOR_VERSION@,@RC_MAINT_VERSION@ + FILEFLAGSMASK 0x3fL +#ifndef NDEBUG + FILEFLAGS 0x0L +#else + FILEFLAGS 0x1L +#endif + FILEOS VOS__WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE VFT2_DRV_INSTALLABLE + BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "FileDescription", "gnuradio-pdu" + VALUE "FileVersion", "@VERSION@" + VALUE "InternalName", "gnuradio-pdu.dll" + VALUE "LegalCopyright", "Licensed under GPLv3 or any later version" + VALUE "OriginalFilename", "gnuradio-pdu.dll" + VALUE "ProductName", "gnuradio-pdu" + VALUE "ProductVersion", "@VERSION@" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END + END diff --git a/gr-blocks/lib/pdu_filter_impl.cc b/gr-pdu/lib/pdu_filter_impl.cc similarity index 81% rename from gr-blocks/lib/pdu_filter_impl.cc rename to gr-pdu/lib/pdu_filter_impl.cc index 686e7b678d9..34c519a1f6f 100644 --- a/gr-blocks/lib/pdu_filter_impl.cc +++ b/gr-pdu/lib/pdu_filter_impl.cc @@ -13,11 +13,11 @@ #endif #include "pdu_filter_impl.h" -#include #include +#include namespace gr { -namespace blocks { +namespace pdu { pdu_filter::sptr pdu_filter::make(pmt::pmt_t k, pmt::pmt_t v, bool invert) { @@ -30,9 +30,9 @@ pdu_filter_impl::pdu_filter_impl(pmt::pmt_t k, pmt::pmt_t v, bool invert) d_v(v), d_invert(invert) { - message_port_register_out(pdu::pdu_port_id()); - message_port_register_in(pdu::pdu_port_id()); - set_msg_handler(pdu::pdu_port_id(), + message_port_register_out(msgport_names::pdus()); + message_port_register_in(msgport_names::pdus()); + set_msg_handler(msgport_names::pdus(), [this](pmt::pmt_t msg) { this->handle_msg(msg); }); } @@ -51,9 +51,9 @@ void pdu_filter_impl::handle_msg(pmt::pmt_t pdu) // if all tests pass, propagate the pdu if (output) { - message_port_pub(pdu::pdu_port_id(), pdu); + message_port_pub(msgport_names::pdus(), pdu); } } -} /* namespace blocks */ +} /* namespace pdu */ } /* namespace gr */ diff --git a/gr-blocks/lib/pdu_filter_impl.h b/gr-pdu/lib/pdu_filter_impl.h similarity index 74% rename from gr-blocks/lib/pdu_filter_impl.h rename to gr-pdu/lib/pdu_filter_impl.h index 7d3d9e7acde..e8f532f132c 100644 --- a/gr-blocks/lib/pdu_filter_impl.h +++ b/gr-pdu/lib/pdu_filter_impl.h @@ -8,13 +8,13 @@ * */ -#ifndef INCLUDED_BLOCKS_PDU_FILTER_IMPL_H -#define INCLUDED_BLOCKS_PDU_FILTER_IMPL_H +#ifndef INCLUDED_PDU_PDU_FILTER_IMPL_H +#define INCLUDED_PDU_PDU_FILTER_IMPL_H -#include +#include namespace gr { -namespace blocks { +namespace pdu { class pdu_filter_impl : public pdu_filter { @@ -31,7 +31,7 @@ class pdu_filter_impl : public pdu_filter void set_inversion(bool invert) override { d_invert = invert; }; }; -} /* namespace blocks */ +} /* namespace pdu */ } /* namespace gr */ -#endif /* INCLUDED_BLOCKS_PDU_FILTER_IMPL_H */ +#endif /* INCLUDED_PDU_PDU_FILTER_IMPL_H */ diff --git a/gr-blocks/lib/pdu_remove_impl.cc b/gr-pdu/lib/pdu_remove_impl.cc similarity index 77% rename from gr-blocks/lib/pdu_remove_impl.cc rename to gr-pdu/lib/pdu_remove_impl.cc index ded25b6d494..a23869a9ffe 100644 --- a/gr-blocks/lib/pdu_remove_impl.cc +++ b/gr-pdu/lib/pdu_remove_impl.cc @@ -13,11 +13,11 @@ #endif #include "pdu_remove_impl.h" -#include #include +#include namespace gr { -namespace blocks { +namespace pdu { pdu_remove::sptr pdu_remove::make(pmt::pmt_t k) { @@ -28,9 +28,9 @@ pdu_remove_impl::pdu_remove_impl(pmt::pmt_t k) : block("pdu_remove", io_signature::make(0, 0, 0), io_signature::make(0, 0, 0)), d_k(k) { - message_port_register_out(pdu::pdu_port_id()); - message_port_register_in(pdu::pdu_port_id()); - set_msg_handler(pdu::pdu_port_id(), + message_port_register_out(msgport_names::pdus()); + message_port_register_in(msgport_names::pdus()); + set_msg_handler(msgport_names::pdus(), [this](pmt::pmt_t msg) { this->handle_msg(msg); }); } @@ -44,8 +44,8 @@ void pdu_remove_impl::handle_msg(pmt::pmt_t pdu) throw std::runtime_error("pdu_remove received non PDU input"); } meta = pmt::dict_delete(meta, d_k); - message_port_pub(pdu::pdu_port_id(), pmt::cons(meta, pmt::cdr(pdu))); + message_port_pub(msgport_names::pdus(), pmt::cons(meta, pmt::cdr(pdu))); } -} /* namespace blocks */ +} /* namespace pdu */ } /* namespace gr */ diff --git a/gr-blocks/lib/pdu_remove_impl.h b/gr-pdu/lib/pdu_remove_impl.h similarity index 66% rename from gr-blocks/lib/pdu_remove_impl.h rename to gr-pdu/lib/pdu_remove_impl.h index 74c77d6e456..43da752ddfa 100644 --- a/gr-blocks/lib/pdu_remove_impl.h +++ b/gr-pdu/lib/pdu_remove_impl.h @@ -8,13 +8,13 @@ * */ -#ifndef INCLUDED_BLOCKS_PDU_REMOVE_IMPL_H -#define INCLUDED_BLOCKS_PDU_REMOVE_IMPL_H +#ifndef INCLUDED_PDU_PDU_REMOVE_IMPL_H +#define INCLUDED_PDU_PDU_REMOVE_IMPL_H -#include +#include namespace gr { -namespace blocks { +namespace pdu { class pdu_remove_impl : public pdu_remove { @@ -27,7 +27,7 @@ class pdu_remove_impl : public pdu_remove void set_key(pmt::pmt_t key) override { d_k = key; }; }; -} /* namespace blocks */ +} /* namespace pdu */ } /* namespace gr */ -#endif /* INCLUDED_BLOCKS_PDU_REMOVE_IMPL_H */ +#endif /* INCLUDED_PDU_PDU_REMOVE_IMPL_H */ diff --git a/gr-blocks/lib/pdu_set_impl.cc b/gr-pdu/lib/pdu_set_impl.cc similarity index 77% rename from gr-blocks/lib/pdu_set_impl.cc rename to gr-pdu/lib/pdu_set_impl.cc index 70a84877204..08dd68d2b04 100644 --- a/gr-blocks/lib/pdu_set_impl.cc +++ b/gr-pdu/lib/pdu_set_impl.cc @@ -13,11 +13,11 @@ #endif #include "pdu_set_impl.h" -#include #include +#include namespace gr { -namespace blocks { +namespace pdu { pdu_set::sptr pdu_set::make(pmt::pmt_t k, pmt::pmt_t v) { @@ -29,9 +29,9 @@ pdu_set_impl::pdu_set_impl(pmt::pmt_t k, pmt::pmt_t v) d_k(k), d_v(v) { - message_port_register_out(pdu::pdu_port_id()); - message_port_register_in(pdu::pdu_port_id()); - set_msg_handler(pdu::pdu_port_id(), + message_port_register_out(msgport_names::pdus()); + message_port_register_in(msgport_names::pdus()); + set_msg_handler(msgport_names::pdus(), [this](pmt::pmt_t msg) { this->handle_msg(msg); }); } @@ -45,8 +45,8 @@ void pdu_set_impl::handle_msg(pmt::pmt_t pdu) throw std::runtime_error("pdu_set received non PDU input"); } meta = pmt::dict_add(meta, d_k, d_v); - message_port_pub(pdu::pdu_port_id(), pmt::cons(meta, pmt::cdr(pdu))); + message_port_pub(msgport_names::pdus(), pmt::cons(meta, pmt::cdr(pdu))); } -} /* namespace blocks */ +} /* namespace pdu */ } /* namespace gr */ diff --git a/gr-blocks/lib/pdu_set_impl.h b/gr-pdu/lib/pdu_set_impl.h similarity index 71% rename from gr-blocks/lib/pdu_set_impl.h rename to gr-pdu/lib/pdu_set_impl.h index fbfae9dd030..4ecfb8db446 100644 --- a/gr-blocks/lib/pdu_set_impl.h +++ b/gr-pdu/lib/pdu_set_impl.h @@ -8,13 +8,13 @@ * */ -#ifndef INCLUDED_BLOCKS_PDU_SET_IMPL_H -#define INCLUDED_BLOCKS_PDU_SET_IMPL_H +#ifndef INCLUDED_PDU_PDU_SET_IMPL_H +#define INCLUDED_PDU_PDU_SET_IMPL_H -#include +#include namespace gr { -namespace blocks { +namespace pdu { class pdu_set_impl : public pdu_set { @@ -29,7 +29,7 @@ class pdu_set_impl : public pdu_set void set_val(pmt::pmt_t val) override { d_v = val; }; }; -} /* namespace blocks */ +} /* namespace pdu */ } /* namespace gr */ -#endif /* INCLUDED_BLOCKS_PDU_SET_IMPL_H */ +#endif /* INCLUDED_PDU_PDU_SET_IMPL_H */ diff --git a/gr-pdu/lib/pdu_split_impl.cc b/gr-pdu/lib/pdu_split_impl.cc new file mode 100644 index 00000000000..678e650ee2b --- /dev/null +++ b/gr-pdu/lib/pdu_split_impl.cc @@ -0,0 +1,61 @@ +/* -*- c++ -*- */ +/* + * Copyright 2021 NTESS LLC. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "pdu_split_impl.h" +#include +#include + +namespace gr { +namespace pdu { + +pdu_split::sptr pdu_split::make(const bool pass_empty_data) +{ + return gnuradio::make_block_sptr(pass_empty_data); +} + +pdu_split_impl::pdu_split_impl(const bool pass_empty_data) + : gr::block("pdu_split", io_signature::make(0, 0, 0), io_signature::make(0, 0, 0)), + d_pass_empty_data(pass_empty_data) +{ + message_port_register_in(msgport_names::pdus()); + set_msg_handler(msgport_names::pdus(), + [this](pmt::pmt_t msg) { this->handle_pdu(msg); }); + message_port_register_out(msgport_names::dict()); + message_port_register_out(msgport_names::vec()); +} + +pdu_split_impl::~pdu_split_impl() {} + +void pdu_split_impl::handle_pdu(pmt::pmt_t pdu) +{ + // make sure the data is a PDU + if (!(pmt::is_pdu(pdu))) { + GR_LOG_WARN(d_logger, "Message received is not a PDU, dropping"); + return; + } + + pmt::pmt_t meta = pmt::car(pdu); + pmt::pmt_t data = pmt::cdr(pdu); + + if ((!pmt::equal(meta, pmt::PMT_NIL)) | d_pass_empty_data) { + message_port_pub(msgport_names::dict(), meta); + } + + if (pmt::length(data) | d_pass_empty_data) { + message_port_pub(msgport_names::vec(), data); + } +} + +} /* namespace pdu */ +} /* namespace gr */ diff --git a/gr-pdu/lib/pdu_split_impl.h b/gr-pdu/lib/pdu_split_impl.h new file mode 100644 index 00000000000..cf26b5055ec --- /dev/null +++ b/gr-pdu/lib/pdu_split_impl.h @@ -0,0 +1,40 @@ +/* -*- c++ -*- */ +/* + * Copyright 2021 NTESS LLC. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +#ifndef INCLUDED_PDU_PDU_SPLIT_IMPL_H +#define INCLUDED_PDU_PDU_SPLIT_IMPL_H + +#include + +namespace gr { +namespace pdu { + +class pdu_split_impl : public pdu_split +{ +private: + const bool d_pass_empty_data; + + /*! + * \brief PDU formatted messages received in this port are split into theier + * dictionary and vector which are each emitted on separate output ports. + * + * \param pdu A PDU message passed from the scheduler's message handling. + */ + void handle_pdu(pmt::pmt_t pdu); + +public: + pdu_split_impl(const bool pass_empty_data); + ~pdu_split_impl() override; +}; + +} // namespace pdu +} // namespace gr + +#endif /* INCLUDED_PDU_PDU_SPLIT_IMPL_H */ diff --git a/gr-blocks/lib/pdu_to_tagged_stream_impl.cc b/gr-pdu/lib/pdu_to_tagged_stream_impl.cc similarity index 88% rename from gr-blocks/lib/pdu_to_tagged_stream_impl.cc rename to gr-pdu/lib/pdu_to_tagged_stream_impl.cc index 26b86bee833..035e8f85af2 100644 --- a/gr-blocks/lib/pdu_to_tagged_stream_impl.cc +++ b/gr-pdu/lib/pdu_to_tagged_stream_impl.cc @@ -13,19 +13,19 @@ #endif #include "pdu_to_tagged_stream_impl.h" -#include #include +#include namespace gr { -namespace blocks { +namespace pdu { -pdu_to_tagged_stream::sptr pdu_to_tagged_stream::make(pdu::vector_type type, +pdu_to_tagged_stream::sptr pdu_to_tagged_stream::make(gr::types::vector_type type, const std::string& tsb_tag_key) { return gnuradio::make_block_sptr(type, tsb_tag_key); } -pdu_to_tagged_stream_impl::pdu_to_tagged_stream_impl(pdu::vector_type type, +pdu_to_tagged_stream_impl::pdu_to_tagged_stream_impl(gr::types::vector_type type, const std::string& tsb_tag_key) : tagged_stream_block("pdu_to_tagged_stream", io_signature::make(0, 0, 0), @@ -34,13 +34,13 @@ pdu_to_tagged_stream_impl::pdu_to_tagged_stream_impl(pdu::vector_type type, d_itemsize(pdu::itemsize(type)), d_curr_len(0) { - message_port_register_in(pdu::pdu_port_id()); + message_port_register_in(msgport_names::pdus()); } int pdu_to_tagged_stream_impl::calculate_output_stream_length(const gr_vector_int&) { if (d_curr_len == 0) { - pmt::pmt_t msg(delete_head_nowait(pdu::pdu_port_id())); + pmt::pmt_t msg(delete_head_nowait(msgport_names::pdus())); if (msg.get() == NULL) { return 0; } @@ -94,5 +94,5 @@ int pdu_to_tagged_stream_impl::work(int noutput_items, return nout; } /* work() */ -} /* namespace blocks */ +} /* namespace pdu */ } /* namespace gr */ diff --git a/gr-blocks/lib/pdu_to_tagged_stream_impl.h b/gr-pdu/lib/pdu_to_tagged_stream_impl.h similarity index 78% rename from gr-blocks/lib/pdu_to_tagged_stream_impl.h rename to gr-pdu/lib/pdu_to_tagged_stream_impl.h index 0a389fb040d..3fdb71491cd 100644 --- a/gr-blocks/lib/pdu_to_tagged_stream_impl.h +++ b/gr-pdu/lib/pdu_to_tagged_stream_impl.h @@ -11,12 +11,12 @@ #ifndef INCLUDED_PDU_TO_TAGGED_STREAM_IMPL_H #define INCLUDED_PDU_TO_TAGGED_STREAM_IMPL_H -#include +#include namespace gr { -namespace blocks { +namespace pdu { -class BLOCKS_API pdu_to_tagged_stream_impl : public pdu_to_tagged_stream +class PDU_API pdu_to_tagged_stream_impl : public pdu_to_tagged_stream { const size_t d_itemsize; pmt::pmt_t d_curr_meta; @@ -24,7 +24,7 @@ class BLOCKS_API pdu_to_tagged_stream_impl : public pdu_to_tagged_stream size_t d_curr_len; public: - pdu_to_tagged_stream_impl(pdu::vector_type type, + pdu_to_tagged_stream_impl(gr::types::vector_type type, const std::string& lengthtagname = "packet_len"); int calculate_output_stream_length(const gr_vector_int& ninput_items) override; @@ -35,7 +35,7 @@ class BLOCKS_API pdu_to_tagged_stream_impl : public pdu_to_tagged_stream gr_vector_void_star& output_items) override; }; -} /* namespace blocks */ +} /* namespace pdu */ } /* namespace gr */ #endif /* INCLUDED_PDU_TO_TAGGED_STREAM_IMPL_H */ diff --git a/gr-blocks/lib/random_pdu_impl.cc b/gr-pdu/lib/random_pdu_impl.cc similarity index 91% rename from gr-blocks/lib/random_pdu_impl.cc rename to gr-pdu/lib/random_pdu_impl.cc index 2a8e1eb7f57..a31f82381ea 100644 --- a/gr-blocks/lib/random_pdu_impl.cc +++ b/gr-pdu/lib/random_pdu_impl.cc @@ -13,11 +13,11 @@ #endif #include "random_pdu_impl.h" -#include #include +#include namespace gr { -namespace blocks { +namespace pdu { random_pdu::sptr random_pdu::make(int min_items, int max_items, unsigned char byte_mask, int length_modulo) @@ -36,7 +36,7 @@ random_pdu_impl::random_pdu_impl(int min_items, d_mask(byte_mask), d_length_modulo(length_modulo) { - message_port_register_out(pdu::pdu_port_id()); + message_port_register_out(msgport_names::pdus()); message_port_register_in(pmt::mp("generate")); set_msg_handler(pmt::mp("generate"), [this](pmt::pmt_t msg) { this->generate_pdu(msg); }); @@ -67,8 +67,8 @@ void random_pdu_impl::output_random() pmt::pmt_t vecpmt(pmt::make_blob(&vec[0], len)); pmt::pmt_t pdu(pmt::cons(pmt::PMT_NIL, vecpmt)); - message_port_pub(pdu::pdu_port_id(), pdu); + message_port_pub(msgport_names::pdus(), pdu); } -} /* namespace blocks */ +} /* namespace pdu */ } /* namespace gr */ diff --git a/gr-blocks/lib/random_pdu_impl.h b/gr-pdu/lib/random_pdu_impl.h similarity index 79% rename from gr-blocks/lib/random_pdu_impl.h rename to gr-pdu/lib/random_pdu_impl.h index 7f0b87c90cc..2f2535fe470 100644 --- a/gr-blocks/lib/random_pdu_impl.h +++ b/gr-pdu/lib/random_pdu_impl.h @@ -8,16 +8,16 @@ * */ -#ifndef INCLUDED_BLOCKS_RANDOM_PDU_IMPL_H -#define INCLUDED_BLOCKS_RANDOM_PDU_IMPL_H +#ifndef INCLUDED_PDU_RANDOM_PDU_IMPL_H +#define INCLUDED_PDU_RANDOM_PDU_IMPL_H -#include +#include #include #include namespace gr { -namespace blocks { +namespace pdu { class random_pdu_impl : public random_pdu { @@ -40,7 +40,7 @@ class random_pdu_impl : public random_pdu void generate_pdu() { output_random(); } }; -} /* namespace blocks */ +} /* namespace pdu */ } /* namespace gr */ -#endif /* INCLUDED_BLOCKS_RANDOM_PDU_IMPL_H */ +#endif /* INCLUDED_PDU_RANDOM_PDU_IMPL_H */ diff --git a/gr-blocks/lib/tagged_stream_to_pdu_impl.cc b/gr-pdu/lib/tagged_stream_to_pdu_impl.cc similarity index 83% rename from gr-blocks/lib/tagged_stream_to_pdu_impl.cc rename to gr-pdu/lib/tagged_stream_to_pdu_impl.cc index 2ca5e8e68f9..66d3cb20e18 100644 --- a/gr-blocks/lib/tagged_stream_to_pdu_impl.cc +++ b/gr-pdu/lib/tagged_stream_to_pdu_impl.cc @@ -13,19 +13,19 @@ #endif #include "tagged_stream_to_pdu_impl.h" -#include #include +#include namespace gr { -namespace blocks { +namespace pdu { -tagged_stream_to_pdu::sptr tagged_stream_to_pdu::make(pdu::vector_type type, +tagged_stream_to_pdu::sptr tagged_stream_to_pdu::make(gr::types::vector_type type, const std::string& lengthtagname) { return gnuradio::make_block_sptr(type, lengthtagname); } -tagged_stream_to_pdu_impl::tagged_stream_to_pdu_impl(pdu::vector_type type, +tagged_stream_to_pdu_impl::tagged_stream_to_pdu_impl(gr::types::vector_type type, const std::string& lengthtagname) : tagged_stream_block("tagged_stream_to_pdu", io_signature::make(1, 1, pdu::itemsize(type)), @@ -35,7 +35,7 @@ tagged_stream_to_pdu_impl::tagged_stream_to_pdu_impl(pdu::vector_type type, d_pdu_meta(pmt::PMT_NIL), d_pdu_vector(pmt::PMT_NIL) { - message_port_register_out(pdu::pdu_port_id()); + message_port_register_out(msgport_names::pdus()); } int tagged_stream_to_pdu_impl::work(int noutput_items, @@ -57,10 +57,10 @@ int tagged_stream_to_pdu_impl::work(int noutput_items, // Send msg pmt::pmt_t msg = pmt::cons(d_pdu_meta, d_pdu_vector); - message_port_pub(pdu::pdu_port_id(), msg); + message_port_pub(msgport_names::pdus(), msg); return ninput_items[0]; } -} /* namespace blocks */ +} /* namespace pdu */ } /* namespace gr */ diff --git a/gr-blocks/lib/tagged_stream_to_pdu_impl.h b/gr-pdu/lib/tagged_stream_to_pdu_impl.h similarity index 64% rename from gr-blocks/lib/tagged_stream_to_pdu_impl.h rename to gr-pdu/lib/tagged_stream_to_pdu_impl.h index 954a7102002..5e685b89b15 100644 --- a/gr-blocks/lib/tagged_stream_to_pdu_impl.h +++ b/gr-pdu/lib/tagged_stream_to_pdu_impl.h @@ -11,20 +11,21 @@ #ifndef INCLUDED_TAGGED_STREAM_TO_PDU_IMPL_H #define INCLUDED_TAGGED_STREAM_TO_PDU_IMPL_H -#include +#include namespace gr { -namespace blocks { +namespace pdu { -class BLOCKS_API tagged_stream_to_pdu_impl : public tagged_stream_to_pdu +class PDU_API tagged_stream_to_pdu_impl : public tagged_stream_to_pdu { - const pdu::vector_type d_type; + const gr::types::vector_type d_type; pmt::pmt_t d_pdu_meta; pmt::pmt_t d_pdu_vector; std::vector d_tags; public: - tagged_stream_to_pdu_impl(pdu::vector_type type, const std::string& lengthtagname); + tagged_stream_to_pdu_impl(gr::types::vector_type type, + const std::string& lengthtagname); int work(int noutput_items, gr_vector_int& ninput_items, @@ -32,7 +33,7 @@ class BLOCKS_API tagged_stream_to_pdu_impl : public tagged_stream_to_pdu gr_vector_void_star& output_items) override; }; -} /* namespace blocks */ +} /* namespace pdu */ } /* namespace gr */ #endif diff --git a/gr-pdu/python/pdu/CMakeLists.txt b/gr-pdu/python/pdu/CMakeLists.txt new file mode 100644 index 00000000000..1a1bb25f8e9 --- /dev/null +++ b/gr-pdu/python/pdu/CMakeLists.txt @@ -0,0 +1,34 @@ +# Copyright 2021 Jacob Gilbert +# +# This file is part of GNU Radio +# +# SPDX-License-Identifier: GPL-3.0-or-later +# + +######################################################################## +include(GrPython) + +GR_PYTHON_INSTALL( + FILES + __init__.py + DESTINATION ${GR_PYTHON_DIR}/gnuradio/pdu +) + +######################################################################## +# Handle the unit tests +######################################################################## +if(ENABLE_TESTING) + set(GR_TEST_TARGET_DEPS "") + set(GR_TEST_LIBRARY_DIRS "") + set(GR_TEST_PYTHON_DIRS + ${CMAKE_BINARY_DIR}/gnuradio-runtime/python + ) + include(GrTest) + file(GLOB py_qa_test_files "qa_*.py") + foreach(py_qa_test_file ${py_qa_test_files}) + get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE) + GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} -B ${py_qa_test_file}) + endforeach(py_qa_test_file) +endif(ENABLE_TESTING) + +add_subdirectory(bindings) diff --git a/gr-pdu/python/pdu/__init__.py b/gr-pdu/python/pdu/__init__.py new file mode 100644 index 00000000000..01e94a056c5 --- /dev/null +++ b/gr-pdu/python/pdu/__init__.py @@ -0,0 +1,23 @@ +# Copyright 2021 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# SPDX-License-Identifier: GPL-3.0-or-later +# +# + +''' +Blocks and utilities for PDU based processing. +''' + +# The presence of this file turns this directory into a Python package +import os + +try: + from .pdu_python import * +except ImportError: + dirname, filename = os.path.split(os.path.abspath(__file__)) + __path__.append(os.path.join(dirname, "bindings")) + from .pdu_python import * + +# import any pure python here diff --git a/gr-pdu/python/pdu/bindings/CMakeLists.txt b/gr-pdu/python/pdu/bindings/CMakeLists.txt new file mode 100644 index 00000000000..79e33229e0f --- /dev/null +++ b/gr-pdu/python/pdu/bindings/CMakeLists.txt @@ -0,0 +1,22 @@ +include(GrPybind) + +######################################################################## +# Python Bindings +######################################################################## + +list(APPEND pdu_python_files + pdu_filter_python.cc + pdu_remove_python.cc + pdu_set_python.cc + pdu_split_python.cc + pdu_to_tagged_stream_python.cc + random_pdu_python.cc + tagged_stream_to_pdu_python.cc + python_bindings.cc) + +GR_PYBIND_MAKE_CHECK_HASH(pdu + ../../.. + gr::pdu + "${pdu_python_files}") + +install(TARGETS pdu_python DESTINATION ${GR_PYTHON_DIR}/gnuradio/pdu COMPONENT pythonapi) diff --git a/gr-pdu/python/pdu/bindings/docstrings/pdu_filter_pydoc_template.h b/gr-pdu/python/pdu/bindings/docstrings/pdu_filter_pydoc_template.h new file mode 100644 index 00000000000..349fa30c4fe --- /dev/null +++ b/gr-pdu/python/pdu/bindings/docstrings/pdu_filter_pydoc_template.h @@ -0,0 +1,36 @@ +/* + * Copyright 2021 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, pdu, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_pdu_pdu_filter = R"doc()doc"; + + +static const char* __doc_gr_pdu_pdu_filter_pdu_filter_0 = R"doc()doc"; + + +static const char* __doc_gr_pdu_pdu_filter_pdu_filter_1 = R"doc()doc"; + + +static const char* __doc_gr_pdu_pdu_filter_make = R"doc()doc"; + + +static const char* __doc_gr_pdu_pdu_filter_set_key = R"doc()doc"; + + +static const char* __doc_gr_pdu_pdu_filter_set_val = R"doc()doc"; + + +static const char* __doc_gr_pdu_pdu_filter_set_inversion = R"doc()doc"; diff --git a/gr-pdu/python/pdu/bindings/docstrings/pdu_remove_pydoc_template.h b/gr-pdu/python/pdu/bindings/docstrings/pdu_remove_pydoc_template.h new file mode 100644 index 00000000000..3360f01bd5f --- /dev/null +++ b/gr-pdu/python/pdu/bindings/docstrings/pdu_remove_pydoc_template.h @@ -0,0 +1,30 @@ +/* + * Copyright 2021 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, pdu, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_pdu_pdu_remove = R"doc()doc"; + + +static const char* __doc_gr_pdu_pdu_remove_pdu_remove_0 = R"doc()doc"; + + +static const char* __doc_gr_pdu_pdu_remove_pdu_remove_1 = R"doc()doc"; + + +static const char* __doc_gr_pdu_pdu_remove_make = R"doc()doc"; + + +static const char* __doc_gr_pdu_pdu_remove_set_key = R"doc()doc"; diff --git a/gr-pdu/python/pdu/bindings/docstrings/pdu_set_pydoc_template.h b/gr-pdu/python/pdu/bindings/docstrings/pdu_set_pydoc_template.h new file mode 100644 index 00000000000..69c0cf27e83 --- /dev/null +++ b/gr-pdu/python/pdu/bindings/docstrings/pdu_set_pydoc_template.h @@ -0,0 +1,33 @@ +/* + * Copyright 2021 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ +#include "pydoc_macros.h" +#define D(...) DOC(gr, pdu, __VA_ARGS__) +/* + This file contains placeholders for docstrings for the Python bindings. + Do not edit! These were automatically extracted during the binding process + and will be overwritten during the build process + */ + + +static const char* __doc_gr_pdu_pdu_set = R"doc()doc"; + + +static const char* __doc_gr_pdu_pdu_set_pdu_set_0 = R"doc()doc"; + + +static const char* __doc_gr_pdu_pdu_set_pdu_set_1 = R"doc()doc"; + + +static const char* __doc_gr_pdu_pdu_set_make = R"doc()doc"; + + +static const char* __doc_gr_pdu_pdu_set_set_key = R"doc()doc"; + + +static const char* __doc_gr_pdu_pdu_set_set_val = R"doc()doc"; diff --git a/gr-blocks/python/blocks/bindings/docstrings/socket_pdu_pydoc_template.h b/gr-pdu/python/pdu/bindings/docstrings/pdu_split_pydoc_template.h similarity index 53% rename from gr-blocks/python/blocks/bindings/docstrings/socket_pdu_pydoc_template.h rename to gr-pdu/python/pdu/bindings/docstrings/pdu_split_pydoc_template.h index 07aa3eb239a..d2baf62552b 100644 --- a/gr-blocks/python/blocks/bindings/docstrings/socket_pdu_pydoc_template.h +++ b/gr-pdu/python/pdu/bindings/docstrings/pdu_split_pydoc_template.h @@ -1,5 +1,5 @@ /* - * Copyright 2020 Free Software Foundation, Inc. + * Copyright 2021 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -7,7 +7,7 @@ * */ #include "pydoc_macros.h" -#define D(...) DOC(gr, blocks, __VA_ARGS__) +#define D(...) DOC(gr, pdu, __VA_ARGS__) /* This file contains placeholders for docstrings for the Python bindings. Do not edit! These were automatically extracted during the binding process @@ -15,10 +15,10 @@ */ -static const char* __doc_gr_blocks_socket_pdu = R"doc()doc"; +static const char* __doc_gr_pdu_pdu_split = R"doc()doc"; -static const char* __doc_gr_blocks_socket_pdu_socket_pdu = R"doc()doc"; +static const char* __doc_gr_pdu_pdu_split_pdu_split = R"doc()doc"; -static const char* __doc_gr_blocks_socket_pdu_make = R"doc()doc"; +static const char* __doc_gr_pdu_pdu_split_make = R"doc()doc"; diff --git a/gr-blocks/python/blocks/bindings/docstrings/pdu_to_tagged_stream_pydoc_template.h b/gr-pdu/python/pdu/bindings/docstrings/pdu_to_tagged_stream_pydoc_template.h similarity index 50% rename from gr-blocks/python/blocks/bindings/docstrings/pdu_to_tagged_stream_pydoc_template.h rename to gr-pdu/python/pdu/bindings/docstrings/pdu_to_tagged_stream_pydoc_template.h index 2ab003a60ba..77d97099006 100644 --- a/gr-blocks/python/blocks/bindings/docstrings/pdu_to_tagged_stream_pydoc_template.h +++ b/gr-pdu/python/pdu/bindings/docstrings/pdu_to_tagged_stream_pydoc_template.h @@ -1,5 +1,5 @@ /* - * Copyright 2020 Free Software Foundation, Inc. + * Copyright 2021 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -7,7 +7,7 @@ * */ #include "pydoc_macros.h" -#define D(...) DOC(gr, blocks, __VA_ARGS__) +#define D(...) DOC(gr, pdu, __VA_ARGS__) /* This file contains placeholders for docstrings for the Python bindings. Do not edit! These were automatically extracted during the binding process @@ -15,11 +15,10 @@ */ -static const char* __doc_gr_blocks_pdu_to_tagged_stream = R"doc()doc"; +static const char* __doc_gr_pdu_pdu_to_tagged_stream = R"doc()doc"; -static const char* __doc_gr_blocks_pdu_to_tagged_stream_pdu_to_tagged_stream = - R"doc()doc"; +static const char* __doc_gr_pdu_pdu_to_tagged_stream_pdu_to_tagged_stream = R"doc()doc"; -static const char* __doc_gr_blocks_pdu_to_tagged_stream_make = R"doc()doc"; +static const char* __doc_gr_pdu_pdu_to_tagged_stream_make = R"doc()doc"; diff --git a/gr-blocks/python/blocks/bindings/docstrings/random_pdu_pydoc_template.h b/gr-pdu/python/pdu/bindings/docstrings/random_pdu_pydoc_template.h similarity index 53% rename from gr-blocks/python/blocks/bindings/docstrings/random_pdu_pydoc_template.h rename to gr-pdu/python/pdu/bindings/docstrings/random_pdu_pydoc_template.h index b5a4e94ae23..848eac8df37 100644 --- a/gr-blocks/python/blocks/bindings/docstrings/random_pdu_pydoc_template.h +++ b/gr-pdu/python/pdu/bindings/docstrings/random_pdu_pydoc_template.h @@ -1,5 +1,5 @@ /* - * Copyright 2020 Free Software Foundation, Inc. + * Copyright 2021 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -7,7 +7,7 @@ * */ #include "pydoc_macros.h" -#define D(...) DOC(gr, blocks, __VA_ARGS__) +#define D(...) DOC(gr, pdu, __VA_ARGS__) /* This file contains placeholders for docstrings for the Python bindings. Do not edit! These were automatically extracted during the binding process @@ -15,10 +15,10 @@ */ -static const char* __doc_gr_blocks_random_pdu = R"doc()doc"; +static const char* __doc_gr_pdu_random_pdu = R"doc()doc"; -static const char* __doc_gr_blocks_random_pdu_random_pdu = R"doc()doc"; +static const char* __doc_gr_pdu_random_pdu_random_pdu = R"doc()doc"; -static const char* __doc_gr_blocks_random_pdu_make = R"doc()doc"; +static const char* __doc_gr_pdu_random_pdu_make = R"doc()doc"; diff --git a/gr-blocks/python/blocks/bindings/docstrings/tagged_stream_to_pdu_pydoc_template.h b/gr-pdu/python/pdu/bindings/docstrings/tagged_stream_to_pdu_pydoc_template.h similarity index 50% rename from gr-blocks/python/blocks/bindings/docstrings/tagged_stream_to_pdu_pydoc_template.h rename to gr-pdu/python/pdu/bindings/docstrings/tagged_stream_to_pdu_pydoc_template.h index 76d15951ba3..012f727ef9d 100644 --- a/gr-blocks/python/blocks/bindings/docstrings/tagged_stream_to_pdu_pydoc_template.h +++ b/gr-pdu/python/pdu/bindings/docstrings/tagged_stream_to_pdu_pydoc_template.h @@ -1,5 +1,5 @@ /* - * Copyright 2020 Free Software Foundation, Inc. + * Copyright 2021 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -7,7 +7,7 @@ * */ #include "pydoc_macros.h" -#define D(...) DOC(gr, blocks, __VA_ARGS__) +#define D(...) DOC(gr, pdu, __VA_ARGS__) /* This file contains placeholders for docstrings for the Python bindings. Do not edit! These were automatically extracted during the binding process @@ -15,11 +15,10 @@ */ -static const char* __doc_gr_blocks_tagged_stream_to_pdu = R"doc()doc"; +static const char* __doc_gr_pdu_tagged_stream_to_pdu = R"doc()doc"; -static const char* __doc_gr_blocks_tagged_stream_to_pdu_tagged_stream_to_pdu = - R"doc()doc"; +static const char* __doc_gr_pdu_tagged_stream_to_pdu_tagged_stream_to_pdu = R"doc()doc"; -static const char* __doc_gr_blocks_tagged_stream_to_pdu_make = R"doc()doc"; +static const char* __doc_gr_pdu_tagged_stream_to_pdu_make = R"doc()doc"; diff --git a/gr-blocks/python/blocks/bindings/pdu_filter_python.cc b/gr-pdu/python/pdu/bindings/pdu_filter_python.cc similarity index 88% rename from gr-blocks/python/blocks/bindings/pdu_filter_python.cc rename to gr-pdu/python/pdu/bindings/pdu_filter_python.cc index 7c805c016d5..51304a5bf55 100644 --- a/gr-blocks/python/blocks/bindings/pdu_filter_python.cc +++ b/gr-pdu/python/pdu/bindings/pdu_filter_python.cc @@ -1,5 +1,5 @@ /* - * Copyright 2020 Free Software Foundation, Inc. + * Copyright 2021 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -13,8 +13,8 @@ /* If manual edits are made, the following tags should be modified accordingly. */ /* BINDTOOL_GEN_AUTOMATIC(0) */ /* BINDTOOL_USE_PYGCCXML(0) */ -/* BINDTOOL_HEADER_FILE(pdu_filter.h) */ -/* BINDTOOL_HEADER_FILE_HASH(73336eabe264d9670a63e914e96742b1) */ +/* BINDTOOL_HEADER_FILE(pdu_filter.h) */ +/* BINDTOOL_HEADER_FILE_HASH(8ca41a1466a0f9939a533af682d055cb) */ /***********************************************************************************/ #include @@ -23,14 +23,14 @@ namespace py = pybind11; -#include +#include // pydoc.h is automatically generated in the build directory #include void bind_pdu_filter(py::module& m) { - using pdu_filter = ::gr::blocks::pdu_filter; + using pdu_filter = ::gr::pdu::pdu_filter; py::class_>( diff --git a/gr-blocks/python/blocks/bindings/pdu_remove_python.cc b/gr-pdu/python/pdu/bindings/pdu_remove_python.cc similarity index 85% rename from gr-blocks/python/blocks/bindings/pdu_remove_python.cc rename to gr-pdu/python/pdu/bindings/pdu_remove_python.cc index be6524e2160..47755e5cdf6 100644 --- a/gr-blocks/python/blocks/bindings/pdu_remove_python.cc +++ b/gr-pdu/python/pdu/bindings/pdu_remove_python.cc @@ -1,5 +1,5 @@ /* - * Copyright 2020 Free Software Foundation, Inc. + * Copyright 2021 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -13,8 +13,8 @@ /* If manual edits are made, the following tags should be modified accordingly. */ /* BINDTOOL_GEN_AUTOMATIC(0) */ /* BINDTOOL_USE_PYGCCXML(0) */ -/* BINDTOOL_HEADER_FILE(pdu_remove.h) */ -/* BINDTOOL_HEADER_FILE_HASH(62afe4d010e89d91f3276e3299231a4f) */ +/* BINDTOOL_HEADER_FILE(pdu_remove.h) */ +/* BINDTOOL_HEADER_FILE_HASH(2b26df98561ff8f787fc8b3f0ea3a82a) */ /***********************************************************************************/ #include @@ -23,14 +23,14 @@ namespace py = pybind11; -#include +#include // pydoc.h is automatically generated in the build directory #include void bind_pdu_remove(py::module& m) { - using pdu_remove = ::gr::blocks::pdu_remove; + using pdu_remove = ::gr::pdu::pdu_remove; py::class_>( diff --git a/gr-blocks/python/blocks/bindings/pdu_set_python.cc b/gr-pdu/python/pdu/bindings/pdu_set_python.cc similarity index 87% rename from gr-blocks/python/blocks/bindings/pdu_set_python.cc rename to gr-pdu/python/pdu/bindings/pdu_set_python.cc index 3fa4c1d12f4..834ae6a1630 100644 --- a/gr-blocks/python/blocks/bindings/pdu_set_python.cc +++ b/gr-pdu/python/pdu/bindings/pdu_set_python.cc @@ -1,5 +1,5 @@ /* - * Copyright 2020 Free Software Foundation, Inc. + * Copyright 2021 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -13,8 +13,8 @@ /* If manual edits are made, the following tags should be modified accordingly. */ /* BINDTOOL_GEN_AUTOMATIC(0) */ /* BINDTOOL_USE_PYGCCXML(0) */ -/* BINDTOOL_HEADER_FILE(pdu_set.h) */ -/* BINDTOOL_HEADER_FILE_HASH(4716b531c993ca09cb8cdad1100e317a) */ +/* BINDTOOL_HEADER_FILE(pdu_set.h) */ +/* BINDTOOL_HEADER_FILE_HASH(c7fba803e84070656e7898eb601df1f3) */ /***********************************************************************************/ #include @@ -23,14 +23,14 @@ namespace py = pybind11; -#include +#include // pydoc.h is automatically generated in the build directory #include void bind_pdu_set(py::module& m) { - using pdu_set = ::gr::blocks::pdu_set; + using pdu_set = ::gr::pdu::pdu_set; py::class_>( diff --git a/gr-pdu/python/pdu/bindings/pdu_split_python.cc b/gr-pdu/python/pdu/bindings/pdu_split_python.cc new file mode 100644 index 00000000000..ebf37aaaead --- /dev/null +++ b/gr-pdu/python/pdu/bindings/pdu_split_python.cc @@ -0,0 +1,45 @@ +/* + * Copyright 2021 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + */ + +/***********************************************************************************/ +/* This file is automatically generated using bindtool and can be manually edited */ +/* The following lines can be configured to regenerate this file during cmake */ +/* If manual edits are made, the following tags should be modified accordingly. */ +/* BINDTOOL_GEN_AUTOMATIC(0) */ +/* BINDTOOL_USE_PYGCCXML(0) */ +/* BINDTOOL_HEADER_FILE(pdu_split.h) */ +/* BINDTOOL_HEADER_FILE_HASH(badbfef0fff462fec05eb888d8d3b956) */ +/***********************************************************************************/ + +#include +#include +#include + +namespace py = pybind11; + +#include +// pydoc.h is automatically generated in the build directory +#include + +void bind_pdu_split(py::module& m) +{ + + using pdu_split = ::gr::pdu::pdu_split; + + + py::class_>( + m, "pdu_split", D(pdu_split)) + + .def(py::init(&pdu_split::make), + py::arg("pass_empty_data") = false, + D(pdu_split, make)) + + + ; +} diff --git a/gr-blocks/python/blocks/bindings/pdu_to_tagged_stream_python.cc b/gr-pdu/python/pdu/bindings/pdu_to_tagged_stream_python.cc similarity index 82% rename from gr-blocks/python/blocks/bindings/pdu_to_tagged_stream_python.cc rename to gr-pdu/python/pdu/bindings/pdu_to_tagged_stream_python.cc index 51ec743f263..5b857cad32b 100644 --- a/gr-blocks/python/blocks/bindings/pdu_to_tagged_stream_python.cc +++ b/gr-pdu/python/pdu/bindings/pdu_to_tagged_stream_python.cc @@ -1,5 +1,5 @@ /* - * Copyright 2020 Free Software Foundation, Inc. + * Copyright 2021 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -13,8 +13,8 @@ /* If manual edits are made, the following tags should be modified accordingly. */ /* BINDTOOL_GEN_AUTOMATIC(0) */ /* BINDTOOL_USE_PYGCCXML(0) */ -/* BINDTOOL_HEADER_FILE(pdu_to_tagged_stream.h) */ -/* BINDTOOL_HEADER_FILE_HASH(122377a925d85481a5dd9f86e75e909b) */ +/* BINDTOOL_HEADER_FILE(pdu_to_tagged_stream.h) */ +/* BINDTOOL_HEADER_FILE_HASH(5a0731bc34a2a12add1e9909e2b27b9f) */ /***********************************************************************************/ #include @@ -23,14 +23,14 @@ namespace py = pybind11; -#include +#include // pydoc.h is automatically generated in the build directory #include void bind_pdu_to_tagged_stream(py::module& m) { - using pdu_to_tagged_stream = ::gr::blocks::pdu_to_tagged_stream; + using pdu_to_tagged_stream = ::gr::pdu::pdu_to_tagged_stream; py::class_ + +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include + +namespace py = pybind11; + +void bind_pdu_filter(py::module&); +void bind_pdu_remove(py::module&); +void bind_pdu_set(py::module&); +void bind_pdu_split(py::module&); +void bind_pdu_to_tagged_stream(py::module&); +void bind_random_pdu(py::module&); +void bind_tagged_stream_to_pdu(py::module&); + +// We need this hack because import_array() returns NULL +// for newer Python versions. +// This function is also necessary because it ensures access to the C API +// and removes a warning. +void* init_numpy() +{ + import_array(); + return NULL; +} + +PYBIND11_MODULE(pdu_python, m) +{ + // Initialize the numpy C API + // (otherwise we will see segmentation faults) + init_numpy(); + + // Allow access to base block methods + py::module::import("gnuradio.gr"); + + bind_pdu_filter(m); + bind_pdu_remove(m); + bind_pdu_set(m); + bind_pdu_split(m); + bind_pdu_to_tagged_stream(m); + bind_random_pdu(m); + bind_tagged_stream_to_pdu(m); +} diff --git a/gr-blocks/python/blocks/bindings/random_pdu_python.cc b/gr-pdu/python/pdu/bindings/random_pdu_python.cc similarity index 86% rename from gr-blocks/python/blocks/bindings/random_pdu_python.cc rename to gr-pdu/python/pdu/bindings/random_pdu_python.cc index 430f466b1ff..20e238a7c43 100644 --- a/gr-blocks/python/blocks/bindings/random_pdu_python.cc +++ b/gr-pdu/python/pdu/bindings/random_pdu_python.cc @@ -1,5 +1,5 @@ /* - * Copyright 2020 Free Software Foundation, Inc. + * Copyright 2021 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -13,8 +13,8 @@ /* If manual edits are made, the following tags should be modified accordingly. */ /* BINDTOOL_GEN_AUTOMATIC(0) */ /* BINDTOOL_USE_PYGCCXML(0) */ -/* BINDTOOL_HEADER_FILE(random_pdu.h) */ -/* BINDTOOL_HEADER_FILE_HASH(31da08cfe8a287467bf91fd51612180f) */ +/* BINDTOOL_HEADER_FILE(random_pdu.h) */ +/* BINDTOOL_HEADER_FILE_HASH(0ec9de7a89f30dd5a050547975e7c3d4) */ /***********************************************************************************/ #include @@ -23,14 +23,14 @@ namespace py = pybind11; -#include +#include // pydoc.h is automatically generated in the build directory #include void bind_random_pdu(py::module& m) { - using random_pdu = ::gr::blocks::random_pdu; + using random_pdu = ::gr::pdu::random_pdu; py::class_>( diff --git a/gr-blocks/python/blocks/bindings/tagged_stream_to_pdu_python.cc b/gr-pdu/python/pdu/bindings/tagged_stream_to_pdu_python.cc similarity index 82% rename from gr-blocks/python/blocks/bindings/tagged_stream_to_pdu_python.cc rename to gr-pdu/python/pdu/bindings/tagged_stream_to_pdu_python.cc index 80146c36f7b..047f25197a0 100644 --- a/gr-blocks/python/blocks/bindings/tagged_stream_to_pdu_python.cc +++ b/gr-pdu/python/pdu/bindings/tagged_stream_to_pdu_python.cc @@ -1,5 +1,5 @@ /* - * Copyright 2020 Free Software Foundation, Inc. + * Copyright 2021 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -13,8 +13,8 @@ /* If manual edits are made, the following tags should be modified accordingly. */ /* BINDTOOL_GEN_AUTOMATIC(0) */ /* BINDTOOL_USE_PYGCCXML(0) */ -/* BINDTOOL_HEADER_FILE(tagged_stream_to_pdu.h) */ -/* BINDTOOL_HEADER_FILE_HASH(b521afb9e6e75ef2df0909cebf85166e) */ +/* BINDTOOL_HEADER_FILE(tagged_stream_to_pdu.h) */ +/* BINDTOOL_HEADER_FILE_HASH(c3df8858e8b5d77e0d10d762db5238ff) */ /***********************************************************************************/ #include @@ -23,14 +23,14 @@ namespace py = pybind11; -#include +#include // pydoc.h is automatically generated in the build directory #include void bind_tagged_stream_to_pdu(py::module& m) { - using tagged_stream_to_pdu = ::gr::blocks::tagged_stream_to_pdu; + using tagged_stream_to_pdu = ::gr::pdu::tagged_stream_to_pdu; py::class_ d_fft_points; std::vector d_real_data_time_domain_points; std::vector d_imag_data_time_domain_points; - uint64_t _numFFTDataPoints; - uint64_t _numTimeDomainDataPoints; gr::high_res_timer_type _dataTimestamp; bool _repeatDataFlag; bool _lastOfMultipleUpdateFlag; diff --git a/gr-qtgui/lib/freq_sink_c_impl.h b/gr-qtgui/lib/freq_sink_c_impl.h index 2ac5ba47d6e..09a318a426b 100644 --- a/gr-qtgui/lib/freq_sink_c_impl.h +++ b/gr-qtgui/lib/freq_sink_c_impl.h @@ -43,7 +43,6 @@ class QTGUI_API freq_sink_c_impl : public freq_sink_c // Perform fftshift operation; // this is usually desired when plotting - bool d_shift = true; std::unique_ptr d_fft; int d_index = 0; diff --git a/gr-qtgui/lib/freq_sink_f_impl.h b/gr-qtgui/lib/freq_sink_f_impl.h index 8119d0d2757..c1eaf5547a9 100644 --- a/gr-qtgui/lib/freq_sink_f_impl.h +++ b/gr-qtgui/lib/freq_sink_f_impl.h @@ -43,7 +43,6 @@ class QTGUI_API freq_sink_f_impl : public freq_sink_f // Perform fftshift operation; // this is usually desired when plotting - bool d_shift = true; std::unique_ptr d_fft; int d_index = 0; diff --git a/gr-qtgui/lib/sink_c_impl.h b/gr-qtgui/lib/sink_c_impl.h index a19bdcda999..53b81caec7a 100644 --- a/gr-qtgui/lib/sink_c_impl.h +++ b/gr-qtgui/lib/sink_c_impl.h @@ -42,7 +42,6 @@ class QTGUI_API sink_c_impl : public sink_c // Perform fftshift operation; // this is usually desired when plotting - bool d_shift = true; std::unique_ptr d_fft; int d_index = 0; diff --git a/gr-qtgui/lib/sink_f_impl.h b/gr-qtgui/lib/sink_f_impl.h index 726991f0d96..c1e9c431f0a 100644 --- a/gr-qtgui/lib/sink_f_impl.h +++ b/gr-qtgui/lib/sink_f_impl.h @@ -40,7 +40,6 @@ class QTGUI_API sink_f_impl : public sink_f // Perform fftshift operation; // this is usually desired when plotting - bool d_shift = true; std::unique_ptr d_fft; int d_index = 0; diff --git a/gr-qtgui/lib/time_sink_c_impl.cc b/gr-qtgui/lib/time_sink_c_impl.cc index 05c110b33a8..e557f2b4ee7 100644 --- a/gr-qtgui/lib/time_sink_c_impl.cc +++ b/gr-qtgui/lib/time_sink_c_impl.cc @@ -56,10 +56,6 @@ time_sink_c_impl::time_sink_c_impl(int size, if (nconnections > 12) throw std::runtime_error("time_sink_c only supports up to 12 inputs"); - // setup PDU handling input port - message_port_register_in(pmt::mp("in")); - set_msg_handler(pmt::mp("in"), [this](pmt::pmt_t msg) { this->handle_pdus(msg); }); - // +2 for the PDU message buffers for (unsigned int n = 0; n < d_nconnections + 2; n++) { d_buffers.emplace_back(d_buffer_size); @@ -70,6 +66,10 @@ time_sink_c_impl::time_sink_c_impl(int size, d_cbuffers.emplace_back(d_buffer_size); } + // setup PDU handling input port + message_port_register_in(pmt::mp("in")); + set_msg_handler(pmt::mp("in"), [this](pmt::pmt_t msg) { this->handle_pdus(msg); }); + // Set alignment properties for VOLK const int alignment_multiple = volk_get_alignment() / sizeof(gr_complex); set_alignment(std::max(1, alignment_multiple)); @@ -277,11 +277,14 @@ void time_sink_c_impl::set_nsamps(const int newsize) d_buffer_size = 2 * d_size; // Resize buffers and replace data - for (unsigned int n = 0; n < d_nconnections + 2; n++) { - d_buffers[n].clear(); - d_buffers[n].resize(d_buffer_size); - d_cbuffers[n].clear(); - d_cbuffers[n].resize(d_buffer_size); + for (auto& buf : d_buffers) { + buf.clear(); + buf.resize(d_buffer_size); + } + + for (auto& cbuf : d_cbuffers) { + cbuf.clear(); + cbuf.resize(d_buffer_size); } // If delay was set beyond the new boundary, pull it back. diff --git a/gr-qtgui/lib/waterfall_sink_c_impl.cc b/gr-qtgui/lib/waterfall_sink_c_impl.cc index 3ca73c343ab..039a22dfb17 100644 --- a/gr-qtgui/lib/waterfall_sink_c_impl.cc +++ b/gr-qtgui/lib/waterfall_sink_c_impl.cc @@ -61,17 +61,12 @@ waterfall_sink_c_impl::waterfall_sink_c_impl(int fftsize, d_port(pmt::mp("freq")), d_port_bw(pmt::mp("bw")), d_fft(std::make_unique(fftsize)), + d_residbufs(d_nconnections + 1), // One extra "connection" for the PDU memory. + d_magbufs(d_nconnections + 1), // One extra "connection" for the PDU memory. d_fbuf(fftsize), d_parent(parent) { - // save the last "connection" for the PDU memory - for (int i = 0; i < d_nconnections + 1; i++) { - d_residbufs.emplace_back(d_fftsize); - d_magbufs.emplace_back(d_fftsize); - } - - d_residbufs.emplace_back(d_fftsize); - d_pdu_magbuf = d_magbufs[d_magbufs.size() - 1].data(); + resize_bufs(d_fftsize); buildwindow(); @@ -303,6 +298,24 @@ void waterfall_sink_c_impl::buildwindow() } } +void waterfall_sink_c_impl::resize_bufs(int size) +{ + // Resize residbuf and replace data. + for (auto& buf : d_residbufs) { + buf.clear(); + buf.resize(size); + } + for (auto& mag : d_magbufs) { + mag.clear(); + mag.resize(size); + } + + // Expand PDU buffer to required size. + auto& last_magbuf = d_magbufs[d_magbufs.size() - 1]; + last_magbuf.resize(size * d_nrows); + d_pdu_magbuf = last_magbuf.data(); +} + void waterfall_sink_c_impl::fftresize() { gr::thread::scoped_lock lock(d_setlock); @@ -311,15 +324,7 @@ void waterfall_sink_c_impl::fftresize() d_fftavg = d_main_gui->getFFTAverage(); if (newfftsize != d_fftsize) { - - // Resize residbuf and replace data - for (int i = 0; i < d_nconnections + 1; i++) { - d_residbufs[i].clear(); - d_residbufs[i].resize(newfftsize); - d_magbufs[i].clear(); - d_magbufs[i].resize(newfftsize); - } - d_pdu_magbuf = d_magbufs[d_magbufs.size() - 1].data(); + resize_bufs(newfftsize); // Set new fft size and reset buffer index // (throws away any currently held data, but who cares?) diff --git a/gr-qtgui/lib/waterfall_sink_c_impl.h b/gr-qtgui/lib/waterfall_sink_c_impl.h index a4b03ff6895..c7e258a8095 100644 --- a/gr-qtgui/lib/waterfall_sink_c_impl.h +++ b/gr-qtgui/lib/waterfall_sink_c_impl.h @@ -45,7 +45,6 @@ class QTGUI_API waterfall_sink_c_impl : public waterfall_sink_c // Perform fftshift operation; // this is usually desired when plotting - bool d_shift = true; std::unique_ptr d_fft; int d_index = 0; @@ -70,6 +69,7 @@ class QTGUI_API waterfall_sink_c_impl : public waterfall_sink_c void windowreset(); void buildwindow(); void fftresize(); + void resize_bufs(int size); void check_clicked(); void fft(float* data_out, const gr_complex* data_in, int size); diff --git a/gr-qtgui/lib/waterfall_sink_f_impl.cc b/gr-qtgui/lib/waterfall_sink_f_impl.cc index d46e58cd568..565c68d1509 100644 --- a/gr-qtgui/lib/waterfall_sink_f_impl.cc +++ b/gr-qtgui/lib/waterfall_sink_f_impl.cc @@ -59,17 +59,12 @@ waterfall_sink_f_impl::waterfall_sink_f_impl(int fftsize, d_port(pmt::mp("freq")), d_port_bw(pmt::mp("bw")), d_fft(std::make_unique(d_fftsize)), + d_residbufs(d_nconnections + 1), // One extra "connection" for the PDU memory. + d_magbufs(d_nconnections + 1), // One extra "connection" for the PDU memory. d_fbuf(fftsize), d_parent(parent) { - // save the last "connection" for the PDU memory - for (int i = 0; i < d_nconnections + 1; i++) { - d_residbufs.emplace_back(d_fftsize); - d_magbufs.emplace_back(d_fftsize); - } - - d_pdu_magbuf = d_magbufs[d_magbufs.size() - 1].data(); - + resize_bufs(d_fftsize); buildwindow(); initialize(); @@ -308,6 +303,24 @@ void waterfall_sink_f_impl::buildwindow() } } +void waterfall_sink_f_impl::resize_bufs(int size) +{ + // Resize residbuf and replace data. + for (auto& buf : d_residbufs) { + buf.clear(); + buf.resize(size); + } + for (auto& mag : d_magbufs) { + mag.clear(); + mag.resize(size); + } + + // Expand PDU buffer to required size. + auto& last_magbuf = d_magbufs[d_magbufs.size() - 1]; + last_magbuf.resize(size * d_nrows); + d_pdu_magbuf = last_magbuf.data(); +} + void waterfall_sink_f_impl::fftresize() { gr::thread::scoped_lock lock(d_setlock); @@ -316,16 +329,7 @@ void waterfall_sink_f_impl::fftresize() d_fftavg = d_main_gui->getFFTAverage(); if (newfftsize != d_fftsize) { - - // Resize residbuf and replace data - for (int i = 0; i < d_nconnections + 1; i++) { - d_residbufs[i].clear(); - d_magbufs[i].clear(); - - d_residbufs[i].resize(newfftsize); - d_magbufs[i].resize(newfftsize); - } - d_pdu_magbuf = d_magbufs[d_magbufs.size() - 1].data(); + resize_bufs(newfftsize); // Set new fft size and reset buffer index // (throws away any currently held data, but who cares?) diff --git a/gr-qtgui/lib/waterfall_sink_f_impl.h b/gr-qtgui/lib/waterfall_sink_f_impl.h index cd70e20de67..099356c7983 100644 --- a/gr-qtgui/lib/waterfall_sink_f_impl.h +++ b/gr-qtgui/lib/waterfall_sink_f_impl.h @@ -45,7 +45,6 @@ class QTGUI_API waterfall_sink_f_impl : public waterfall_sink_f // Perform fftshift operation; // this is usually desired when plotting - bool d_shift = true; std::unique_ptr d_fft; int d_index = 0; @@ -70,6 +69,7 @@ class QTGUI_API waterfall_sink_f_impl : public waterfall_sink_f void windowreset(); void buildwindow(); void fftresize(); + void resize_bufs(int size); void check_clicked(); void fft(float* data_out, const float* data_in, int size); diff --git a/gr-uhd/apps/uhd_fft b/gr-uhd/apps/uhd_fft index a71d0b10064..12d1f8bd142 100755 --- a/gr-uhd/apps/uhd_fft +++ b/gr-uhd/apps/uhd_fft @@ -24,13 +24,23 @@ UHD FFT: Simple Spectrum Analyzer for UHD. # I prefer grouping the imports myself in this case, due to all the special cases # pylint: disable=wrong-import-order +# pylint: disable=wrong-import-position # pylint: disable=ungrouped-imports -import ctypes import sys +if __name__ == '__main__': + import ctypes + if sys.platform.startswith('linux'): + try: + X11 = ctypes.cdll.LoadLibrary('libX11.so') + X11.XInitThreads() + except: + print("Warning: failed to XInitThreads()") + import threading import time import math +import signal from PyQt5 import Qt import sip # Needs to be imported after PyQt5, could fail otherwise from gnuradio import eng_notation @@ -100,10 +110,10 @@ class uhd_fft(UHDApp, gr.top_block, Qt.QWidget): ################################################## # Variables ################################################## - self.chan0_lo_locked = chan0_lo_locked = uhd.sensor_value("", False, "", "") + self.chan0_lo_locked = uhd.sensor_value("", False, "", "") self.usrp_device_info = "[No USRP Device Info Found!]" self.uhd_version_info = uhd.get_version_string() - self.lo_locked_probe = chan0_lo_locked.to_bool() + self.lo_locked_probe = self.chan0_lo_locked.to_bool() self.fft_average = 1.0 if args.avg_alpha is not None: if args.avg_alpha < 0.0 or args.avg_alpha > 1.0: @@ -331,7 +341,8 @@ class uhd_fft(UHDApp, gr.top_block, Qt.QWidget): 1024, #size self.samp_rate, #samp_rate "", #name - len(self.channels) - 1 + len(self.channels) - 1, + None # parent ) self.qtgui_phase_plot.set_update_time(self.update_rate) self.qtgui_phase_plot.set_y_axis(-3.5, 3.5) @@ -441,11 +452,16 @@ class uhd_fft(UHDApp, gr.top_block, Qt.QWidget): self.connect(src_port1, (multiplier, 0), blocks.complex_to_arg(), dst_port) self.connect(src_port2, blocks.conjugate_cc(), (multiplier, 1)) + # This is a Qt name: + # pylint: disable=invalid-name def closeEvent(self, event): """ Execute when window closes """ self.settings = Qt.QSettings("GNU Radio", "uhd_fft") self.settings.setValue("geometry", self.saveGeometry()) + self.stop() + self.wait() event.accept() + # pylint: enable=invalid-name def set_antenna(self, antenna): """ Execute when antenna changes """ @@ -557,26 +573,21 @@ def main(): """ args = setup_argparser().parse_args() qapp = Qt.QApplication(sys.argv) - tb = uhd_fft(args) - tb.start() - tb.show() - def quitting(): - """ - Action ('Slot' in Qt lingo) to close the flow graph when the Qt window - is closed. - """ - print("\nStopping flowgraph...") - tb.stop() - tb.wait() - qapp.aboutToQuit.connect(quitting) + top_block = uhd_fft(args) + top_block.start() + top_block.show() + # Make sure SIGINT/SIGTERM handling is enabled + # pylint: disable=unused-argument + def sig_handler(sig=None, frame=None): + top_block.stop() + top_block.wait() + Qt.QApplication.quit() + signal.signal(signal.SIGINT, sig_handler) + signal.signal(signal.SIGTERM, sig_handler) + timer = Qt.QTimer() + timer.start(500) + timer.timeout.connect(lambda: None) qapp.exec_() - tb = None #to clean up Qt widgets if __name__ == '__main__': - if sys.platform.startswith('linux'): - try: - X11 = ctypes.cdll.LoadLibrary('libX11.so') - X11.XInitThreads() - except: - print("Warning: failed to XInitThreads()") main() diff --git a/gr-uhd/apps/uhd_siggen_gui b/gr-uhd/apps/uhd_siggen_gui index 5b0b48a57a0..cea90f2f425 100755 --- a/gr-uhd/apps/uhd_siggen_gui +++ b/gr-uhd/apps/uhd_siggen_gui @@ -20,8 +20,21 @@ Signal Generator App # Generated: Sun Jun 28 17:21:28 2015 ################################################## +# I prefer grouping the imports myself in this case, due to all the special cases +# pylint: disable=wrong-import-order +# pylint: disable=wrong-import-position +# pylint: disable=ungrouped-imports import sys +if __name__ == '__main__': + import ctypes + if sys.platform.startswith('linux'): + try: + X11 = ctypes.cdll.LoadLibrary('libX11.so') + X11.XInitThreads() + except: + print("Warning: failed to XInitThreads()") import threading +import signal import time import math from PyQt5 import Qt @@ -32,7 +45,6 @@ from gnuradio import eng_notation from gnuradio import qtgui from gnuradio import uhd from gnuradio import fft -from gnuradio.filter import firdes from gnuradio.qtgui import Range, RangeWidget try: import uhd_siggen_base as uhd_siggen @@ -227,10 +239,12 @@ class uhd_siggen_gui(Qt.QWidget): self.samp_rate = self._sg[uhd_siggen.SAMP_RATE_KEY] self._samp_rate_tool_bar = Qt.QToolBar(self) self._samp_rate_tool_bar.addWidget(Qt.QLabel("Sampling Rate: ")) - self._samp_rate_line_edit = Qt.QLineEdit(eng_notation.num_to_str(self._sg[uhd_siggen.SAMP_RATE_KEY])) + self._samp_rate_line_edit = Qt.QLineEdit( + eng_notation.num_to_str(self._sg[uhd_siggen.SAMP_RATE_KEY])) self._samp_rate_tool_bar.addWidget(self._samp_rate_line_edit) self._samp_rate_line_edit.returnPressed.connect( - lambda: self.set_samp_rate(eng_notation.str_to_num(str(self._samp_rate_line_edit.text()))) + lambda: self.set_samp_rate(eng_notation.str_to_num( + str(self._samp_rate_line_edit.text()))) ) self.top_grid_layout.addWidget(self._samp_rate_tool_bar, 7, 0, 1, 2) _sync_phases_push_button = Qt.QPushButton("Sync LOs") @@ -250,7 +264,8 @@ class uhd_siggen_gui(Qt.QWidget): Qt.Q_ARG("int", self._ant_options.index(i)) ) self._ant_callback(self.usrp.get_antenna(self._sg.channels[0])) - self._ant_combo_box.currentIndexChanged.connect(lambda i: self.set_ant(self._ant_options[i])) + self._ant_combo_box.currentIndexChanged.connect( + lambda i: self.set_ant(self._ant_options[i])) self.top_grid_layout.addWidget(self._ant_tool_bar, 7, 4, 1, 1) # Labels + Lock Sensors self._lo_locked_probe_0_tool_bar = Qt.QToolBar(self) @@ -277,14 +292,16 @@ class uhd_siggen_gui(Qt.QWidget): self._label_rf_freq_tool_bar = Qt.QToolBar(self) self._label_rf_freq_formatter = lambda x: x self._label_rf_freq_tool_bar.addWidget(Qt.QLabel("LO freq: ")) - self._label_rf_freq_label = Qt.QLabel(str(self._label_rf_freq_formatter(self.label_rf_freq))) + self._label_rf_freq_label = \ + Qt.QLabel(str(self._label_rf_freq_formatter(self.label_rf_freq))) self._label_rf_freq_tool_bar.addWidget(self._label_rf_freq_label) self.top_grid_layout.addWidget(self._label_rf_freq_tool_bar, 8, 1, 1, 1) self.label_dsp_freq = self._sg.tr.actual_dsp_freq self._label_dsp_freq_tool_bar = Qt.QToolBar(self) self._label_dsp_freq_formatter = lambda x: x self._label_dsp_freq_tool_bar.addWidget(Qt.QLabel("DSP Freq: ")) - self._label_dsp_freq_label = Qt.QLabel(str(self._label_dsp_freq_formatter(self.label_dsp_freq))) + self._label_dsp_freq_label = \ + Qt.QLabel(str(self._label_dsp_freq_formatter(self.label_dsp_freq))) self._label_dsp_freq_tool_bar.addWidget(self._label_dsp_freq_label) self.top_grid_layout.addWidget(self._label_dsp_freq_tool_bar, 8, 2, 1, 1) ################################################## @@ -327,6 +344,8 @@ class uhd_siggen_gui(Qt.QWidget): """ Qt closeEvent() """ self.settings = Qt.QSettings("GNU Radio", "uhd_siggen_gui") self.settings.setValue("geometry", self.saveGeometry()) + self._sg.stop() + self._sg.wait() event.accept() def stop(self): @@ -484,24 +503,16 @@ def main(): qapp = Qt.QApplication(sys.argv) siggen_gui = uhd_siggen_gui(args) siggen_gui.show() - def quitting(): - print("\nStopping flowgraph...") + # pylint: disable=unused-argument + def sig_handler(sig=None, frame=None): siggen_gui.stop() - qapp.aboutToQuit.connect(quitting) + Qt.QApplication.quit() + signal.signal(signal.SIGINT, sig_handler) + signal.signal(signal.SIGTERM, sig_handler) + timer = Qt.QTimer() + timer.start(500) + timer.timeout.connect(lambda: None) qapp.exec_() - siggen_gui = None #to clean up Qt widgets - -def x11_init_threads(): - " If on X11, init threads " - if sys.platform.startswith('linux'): - try: - # pylint: disable=import-outside-toplevel - import ctypes - x11 = ctypes.cdll.LoadLibrary('libX11.so') - x11.XInitThreads() - except: - print("Warning: failed to XInitThreads()") if __name__ == '__main__': - x11_init_threads() main() diff --git a/gr-uhd/lib/usrp_sink_impl.cc b/gr-uhd/lib/usrp_sink_impl.cc index 951d926469f..50f676d4541 100644 --- a/gr-uhd/lib/usrp_sink_impl.cc +++ b/gr-uhd/lib/usrp_sink_impl.cc @@ -16,6 +16,9 @@ #include #include #include +#include + +using namespace std::chrono_literals; namespace gr { namespace uhd { @@ -752,10 +755,11 @@ void usrp_sink_impl::async_event_loop() auto time_msg = boost::format("In the last %d ms, %d cmd time errors occurred."); while (_async_event_loop_running) { - while (!_dev->get_device()->recv_async_msg(metadata, 0.1)) { - if (!_async_event_loop_running) { - return; - } + // The Tx Streamer does not exist until start() was called. After that, + // we poll it with a 100ms timeout for async messages. + if (!_tx_stream || !_tx_stream->recv_async_msg(metadata, 0.1)) { + std::this_thread::sleep_for(100ms); + continue; } pmt::pmt_t event_list = pmt::PMT_NIL; diff --git a/gr-utils/modtool/cli/add.py b/gr-utils/modtool/cli/add.py index 6a22189a687..40198ebd43f 100644 --- a/gr-utils/modtool/cli/add.py +++ b/gr-utils/modtool/cli/add.py @@ -27,7 +27,7 @@ help="File containing the license header for every source code file.") @click.option('--copyright', help="Name of the copyright holder (you or your company) MUST be a quoted string.") -@click.option('--argument-list', default="", +@click.option('--argument-list', default=None, help="The argument list for the constructor and make functions.") @click.option('--add-python-qa', is_flag=True, default=None, help="If given, Python QA code is automatically added if possible.") @@ -119,7 +119,7 @@ def get_copyrightholder(self): def get_arglist(self): """ Get the argument list of the block to be added """ - if self.info['arglist'] is not None: + if self.info['arglist'] is None: self.info['arglist'] = click.prompt(click.style( 'Enter valid argument list, including default arguments: \n', fg='cyan'), diff --git a/gr-utils/modtool/templates/gr-newmod/CMakeLists.txt b/gr-utils/modtool/templates/gr-newmod/CMakeLists.txt index 2e1daf17313..843eea36f54 100644 --- a/gr-utils/modtool/templates/gr-newmod/CMakeLists.txt +++ b/gr-utils/modtool/templates/gr-newmod/CMakeLists.txt @@ -124,6 +124,9 @@ execute_process( COMMAND "${PYTHON_EXECUTABLE}" -c "try:\n import numpy\n import os\n inc_path = numpy.get_include()\n if os.path.exists(os.path.join(inc_path, 'numpy', 'arrayobject.h')):\n print(inc_path, end='')\nexcept:\n pass" OUTPUT_VARIABLE PYTHON_NUMPY_INCLUDE_DIR) +# format path in CMake-style for consistency with other path variables +# (a consistent style helps conda builds by using the same path separators) +file(TO_CMAKE_PATH "${PYTHON_NUMPY_INCLUDE_DIR}" PYTHON_NUMPY_INCLUDE_DIR) ######################################################################## # Setup doxygen option diff --git a/gr-zeromq/lib/pull_msg_source_impl.cc b/gr-zeromq/lib/pull_msg_source_impl.cc index 1bf4e7532e6..d2ce6c163eb 100644 --- a/gr-zeromq/lib/pull_msg_source_impl.cc +++ b/gr-zeromq/lib/pull_msg_source_impl.cc @@ -61,8 +61,7 @@ pull_msg_source_impl::~pull_msg_source_impl() {} bool pull_msg_source_impl::start() { d_finished = false; - d_thread = std::make_unique( - boost::bind(&pull_msg_source_impl::readloop, this)); + d_thread = std::make_unique([this] { readloop(); }); return true; } diff --git a/gr-zeromq/lib/rep_msg_sink_impl.cc b/gr-zeromq/lib/rep_msg_sink_impl.cc index ecb88deb01f..f6167b6fdbe 100644 --- a/gr-zeromq/lib/rep_msg_sink_impl.cc +++ b/gr-zeromq/lib/rep_msg_sink_impl.cc @@ -58,8 +58,7 @@ rep_msg_sink_impl::~rep_msg_sink_impl() {} bool rep_msg_sink_impl::start() { d_finished = false; - d_thread = - std::make_unique(boost::bind(&rep_msg_sink_impl::readloop, this)); + d_thread = std::make_unique([this] { readloop(); }); return true; } diff --git a/gr-zeromq/lib/req_msg_source_impl.cc b/gr-zeromq/lib/req_msg_source_impl.cc index 15950489cf9..d9862b66355 100644 --- a/gr-zeromq/lib/req_msg_source_impl.cc +++ b/gr-zeromq/lib/req_msg_source_impl.cc @@ -15,7 +15,6 @@ #include "req_msg_source_impl.h" #include "tag_headers.h" #include -#include #include #include #include @@ -62,8 +61,7 @@ req_msg_source_impl::~req_msg_source_impl() {} bool req_msg_source_impl::start() { d_finished = false; - d_thread = std::make_unique( - boost::bind(&req_msg_source_impl::readloop, this)); + d_thread = std::make_unique([this] { readloop(); }); return true; } diff --git a/gr-zeromq/lib/sub_msg_source_impl.cc b/gr-zeromq/lib/sub_msg_source_impl.cc index edef82a21f4..4ab51fd5fec 100644 --- a/gr-zeromq/lib/sub_msg_source_impl.cc +++ b/gr-zeromq/lib/sub_msg_source_impl.cc @@ -15,7 +15,6 @@ #include "sub_msg_source_impl.h" #include "tag_headers.h" #include -#include #include #include #include @@ -60,8 +59,7 @@ sub_msg_source_impl::~sub_msg_source_impl() {} bool sub_msg_source_impl::start() { d_finished = false; - d_thread = std::make_unique( - boost::bind(&sub_msg_source_impl::readloop, this)); + d_thread = std::make_unique([this] { readloop(); }); return true; } diff --git a/grc/gui/Actions.py b/grc/gui/Actions.py index cf0e781c9c4..63af15520a1 100644 --- a/grc/gui/Actions.py +++ b/grc/gui/Actions.py @@ -455,6 +455,20 @@ def connect(action, handler=None): preference_name='hide_variables', default=False, ) +TOGGLE_SHOW_PARAMETER_EXPRESSION = actions.register( + "win.show_param_expression", + label='Show parameter expressions in block', + tooltip='Display the expression that defines a parameter inside the block', + preference_name='show_param_expression', + default=False, +) +TOGGLE_SHOW_PARAMETER_EVALUATION = actions.register( + "win.show_param_expression_value", + label='Show parameter value in block', + tooltip='Display the evaluated value of a parameter expressions inside the block', + preference_name='show_param_expression_value', + default=True, +) TOGGLE_SHOW_BLOCK_IDS = actions.register( "win.show_block_ids", label='Show All Block IDs', diff --git a/grc/gui/Application.py b/grc/gui/Application.py index f838b384067..6b3fb804e58 100644 --- a/grc/gui/Application.py +++ b/grc/gui/Application.py @@ -192,6 +192,8 @@ def flow_graph_update(fg=flow_graph): Actions.TOGGLE_FLOW_GRAPH_VAR_EDITOR, Actions.TOGGLE_FLOW_GRAPH_VAR_EDITOR_SIDEBAR, Actions.TOGGLE_HIDE_VARIABLES, + Actions.TOGGLE_SHOW_PARAMETER_EXPRESSION, + Actions.TOGGLE_SHOW_PARAMETER_EVALUATION, Actions.TOGGLE_SHOW_BLOCK_IDS, ): action.set_enabled(True) @@ -490,6 +492,14 @@ def flow_graph_update(fg=flow_graph): action.save_to_preferences() for page in main.get_pages(): flow_graph_update(page.flow_graph) + elif action == Actions.TOGGLE_SHOW_PARAMETER_EXPRESSION: + action.set_active(not action.get_active()) + action.save_to_preferences() + flow_graph_update() + elif action == Actions.TOGGLE_SHOW_PARAMETER_EVALUATION: + action.set_active(not action.get_active()) + action.save_to_preferences() + flow_graph_update() elif action == Actions.TOGGLE_HIDE_VARIABLES: action.set_active(not action.get_active()) active = action.get_active() diff --git a/grc/gui/Bars.py b/grc/gui/Bars.py index 5ef58779410..8ecb0bb245c 100644 --- a/grc/gui/Bars.py +++ b/grc/gui/Bars.py @@ -70,7 +70,8 @@ ('_View', [ [Actions.TOGGLE_BLOCKS_WINDOW], [Actions.TOGGLE_CONSOLE_WINDOW, Actions.TOGGLE_SCROLL_LOCK, Actions.SAVE_CONSOLE, Actions.CLEAR_CONSOLE], - [Actions.TOGGLE_HIDE_VARIABLES, Actions.TOGGLE_FLOW_GRAPH_VAR_EDITOR, Actions.TOGGLE_FLOW_GRAPH_VAR_EDITOR_SIDEBAR], + [Actions.TOGGLE_HIDE_VARIABLES, Actions.TOGGLE_FLOW_GRAPH_VAR_EDITOR, Actions.TOGGLE_FLOW_GRAPH_VAR_EDITOR_SIDEBAR, + Actions.TOGGLE_SHOW_PARAMETER_EXPRESSION, Actions.TOGGLE_SHOW_PARAMETER_EVALUATION], [Actions.TOGGLE_HIDE_DISABLED_BLOCKS, Actions.TOGGLE_AUTO_HIDE_PORT_LABELS, Actions.TOGGLE_SNAP_TO_GRID, Actions.TOGGLE_SHOW_BLOCK_COMMENTS, Actions.TOGGLE_SHOW_BLOCK_IDS,], [Actions.TOGGLE_SHOW_CODE_PREVIEW_TAB], [Actions.ERRORS_WINDOW_DISPLAY, Actions.FIND_BLOCKS], diff --git a/grc/gui/canvas/param.py b/grc/gui/canvas/param.py index 3480d796189..6b33ef223ca 100644 --- a/grc/gui/canvas/param.py +++ b/grc/gui/canvas/param.py @@ -8,7 +8,7 @@ import numbers from .drawable import Drawable -from .. import ParamWidgets, Utils, Constants +from .. import ParamWidgets, Utils, Constants, Actions from ...core.params import Param as CoreParam @@ -86,6 +86,22 @@ def format_tooltip_text(self): tooltip_lines.extend(' * ' + msg for msg in errors) return '\n'.join(tooltip_lines) + + + ################################################## + # Truncate helper method + ################################################## + def truncate(self, string, style=0): + max_len = max(27 - len(self.name), 3) + if len(string) > max_len: + if style < 0: # Front truncate + string = '...' + string[3-max_len:] + elif style == 0: # Center truncate + string = string[:max_len//2 - 3] + '...' + string[-max_len//2:] + elif style > 0: # Rear truncate + string = string[:max_len-3] + '...' + return string + def pretty_print(self): """ Get the repr (nice string format) for this param. @@ -93,26 +109,13 @@ def pretty_print(self): Returns: the string representation """ - ################################################## - # Truncate helper method - ################################################## - def _truncate(string, style=0): - max_len = max(27 - len(self.name), 3) - if len(string) > max_len: - if style < 0: # Front truncate - string = '...' + string[3-max_len:] - elif style == 0: # Center truncate - string = string[:max_len//2 - 3] + '...' + string[-max_len//2:] - elif style > 0: # Rear truncate - string = string[:max_len-3] + '...' - return string ################################################## # Simple conditions ################################################## value = self.get_value() if not self.is_valid(): - return _truncate(value) + return self.truncate(value) if value in self.options: return self.options[value] # its name @@ -147,7 +150,7 @@ def _truncate(string, style=0): dt_str = dt_str.encode('utf-8', 'backslashreplace').decode('utf-8') # Done - return _truncate(dt_str, truncate) + return self.truncate(dt_str, truncate) def format_block_surface_markup(self): """ @@ -156,6 +159,29 @@ def format_block_surface_markup(self): Returns: a pango markup string """ + + # TODO: is this the correct way to do this? + is_evaluated = self.value != str(self.get_evaluated()) + show_value = Actions.TOGGLE_SHOW_PARAMETER_EVALUATION.get_active() + show_expr = Actions.TOGGLE_SHOW_PARAMETER_EXPRESSION.get_active() + + display_value = "" + + # Include the value defined by the user (after evaluation) + if not is_evaluated or show_value or not show_expr: + display_value += Utils.encode( + self.pretty_print().replace('\n', ' ')) + + # Include the expression that was evaluated to get the value + if is_evaluated and show_expr: + expr_string = "" + \ + Utils.encode(self.truncate(self.value)) + "" + + if display_value: # We are already displaying the value + display_value = expr_string + "=" + display_value + else: + display_value = expr_string + return '{label}: {value}'.format( - foreground='foreground="red"' if not self.is_valid() else '', font=Constants.PARAM_FONT, - label=Utils.encode(self.name), value=Utils.encode(self.pretty_print().replace('\n', ' '))) + foreground='foreground="red"' if not self.is_valid() else '', font=Constants.PARAM_FONT, + label=Utils.encode(self.name), value=display_value)