diff options
92 files changed, 786 insertions, 5314 deletions
diff --git a/config/Makefile.am b/config/Makefile.am index eb1056eb6..527aefa7e 100644 --- a/config/Makefile.am +++ b/config/Makefile.am @@ -68,7 +68,6 @@ m4macros = \ grc_gr_trellis.m4 \ grc_gr_usrp.m4 \ grc_gr_video_sdl.m4 \ - grc_gr_vrt.m4 \ grc_gr_wxgui.m4 \ grc_mblock.m4 \ grc_gruel.m4 \ diff --git a/config/gr_set_md_cpu.m4 b/config/gr_set_md_cpu.m4 index d8714c4a7..7ebf88a66 100644 --- a/config/gr_set_md_cpu.m4 +++ b/config/gr_set_md_cpu.m4 @@ -50,8 +50,32 @@ AC_DEFUN([GR_SET_MD_CPU],[ AC_ARG_WITH(md-cpu, AC_HELP_STRING([--with-md-cpu=ARCH],[set machine dependent speedups (auto)]), [cf_with_md_cpu="$withval"], - [cf_with_md_cpu="$host_cpu"]) - + [ + dnl see if the user has specified --host or --build, via 'cross_compiling' + if test "$cross_compiling" != no; then + dnl when cross-compiling, because the user specified it either via + dnl --target or --build, just keep the user's specs & hope for the best. + cf_with_md_cpu="$host_cpu" + else + dnl when the user didn't specify --target or --build, on Darwin 10 + dnl (OSX 10.6.0 and .1) and GNU libtoool 2.2.6, 'configure' doesn't + dnl figure out the CPU type correctly, so do it by hand here using + dnl the sizeof (void*): if 4 then use i386, and otherwise use x86_64. + case "$host_os" in + *darwin*10*) + AC_CHECK_SIZEOF(void*) + if test "$ac_cv_sizeof_voidp" = 4; then + cf_with_md_cpu="i386" + else + cf_with_md_cpu="x86_64" + fi + ;; + *) + cf_with_md_cpu="$host_cpu" + ;; + esac + fi + ]) case "$cf_with_md_cpu" in x86 | i[[3-7]]86) MD_CPU=x86 MD_SUBCPU=x86 ;; x86_64) MD_CPU=x86 MD_SUBCPU=x86_64 ;; diff --git a/config/grc_gr_vrt.m4 b/config/grc_gr_vrt.m4 deleted file mode 100644 index ff2d06347..000000000 --- a/config/grc_gr_vrt.m4 +++ /dev/null @@ -1,38 +0,0 @@ -dnl Copyright 2008,2009 Free Software Foundation, Inc. -dnl -dnl This file is part of GNU Radio -dnl -dnl GNU Radio is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 3, or (at your option) -dnl any later version. -dnl -dnl GNU Radio is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with GNU Radio; see the file COPYING. If not, write to -dnl the Free Software Foundation, Inc., 51 Franklin Street, -dnl Boston, MA 02110-1301, USA. - -AC_DEFUN([GRC_GR_VRT],[ - GRC_ENABLE(gr-vrt) - - dnl Don't do gr-usrp if gnuradio-core or vrt skipped - GRC_CHECK_DEPENDENCY(gr-vrt, vrt) - GRC_CHECK_DEPENDENCY(gr-vrt, gnuradio-core) - - AC_CONFIG_FILES([ \ - gr-vrt/Makefile \ - gr-vrt/gnuradio-vrt.pc \ - gr-vrt/src/Makefile \ - gr-vrt/src/run_tests \ - ]) - - GRC_BUILD_CONDITIONAL(gr-vrt,[ - dnl run_tests is created from run_tests.in. Make it executable. - AC_CONFIG_COMMANDS([run_tests_vrt], [chmod +x gr-vrt/src/run_tests]) - ]) -]) diff --git a/config/usrp_libusb.m4 b/config/usrp_libusb.m4 index 428a57992..251f7df10 100755 --- a/config/usrp_libusb.m4 +++ b/config/usrp_libusb.m4 @@ -30,6 +30,7 @@ AC_DEFUN([USRP_LIBUSB], [ libusbok=no have_libusb1=no + LIBUSB_PKG_CONFIG_NAME='' if test x$1 = xyes; then PKG_CHECK_MODULES(USB, libusb-1.0, [ libusbok=yes @@ -37,6 +38,7 @@ AC_DEFUN([USRP_LIBUSB], [ usb_header='libusb-1.0/libusb.h' usb_lib_func='libusb_bulk_transfer' usb_lib_name='usb-1.0' + LIBUSB_PKG_CONFIG_NAME='libusb-1.0' ]) else dnl not using libusb1 (for now); see if legacy version is found. @@ -45,17 +47,24 @@ AC_DEFUN([USRP_LIBUSB], [ dnl user's shell environment dnl see if the pkgconfig module 'libusb' is available - PKG_CHECK_MODULES(USB, libusb, [libusbok=yes], [libusbok=no]) + PKG_CHECK_MODULES(USB, libusb, [ + libusbok=yes + LIBUSB_PKG_CONFIG_NAME='libusb' + ], [libusbok=no]) dnl PKG_CHECK_MODULES does not work correctly when embedded if test $libusbok = no; then dnl if not, see if the pkgconfig module 'libusb-legacy' is available - PKG_CHECK_MODULES(USB, [libusb-legacy], [libusbok=yes], [libusbok=no]) + PKG_CHECK_MODULES(USB, [libusb-legacy], [ + libusbok=yes + LIBUSB_PKG_CONFIG_NAME='libusb-legacy' + ], [libusbok=no]) fi dnl set variables for further testing usb_header='usb.h' usb_lib_func='usb_bulk_write' usb_lib_name='usb' fi + AC_SUBST(LIBUSB_PKG_CONFIG_NAME) if test x$1 != xyes || test $have_libusb1 = yes; then dnl Either (1) libusb1 was specified and found; or dnl (2) libusb1 was not specified. Restart checking. diff --git a/debian/.gitignore b/debian/.gitignore deleted file mode 100644 index fbcff46ca..000000000 --- a/debian/.gitignore +++ /dev/null @@ -1,119 +0,0 @@ -*.log -*.debhelper -*.substvars -files -tmp -gnuradio-companion.install -gnuradio-examples.install -gnuradio-gpio.install -gnuradio-pager.install -gnuradio-radar-mono.install -gnuradio-radio-astronomy.install -gnuradio-sounder.install -gnuradio-utils.install -libgnuradio-audio-alsa-dev.install -libgnuradio-audio-alsa0.install -libgnuradio-audio-jack-dev.install -libgnuradio-audio-jack0.install -libgnuradio-audio-oss-dev.install -libgnuradio-audio-oss0.install -libgnuradio-audio-portaudio-dev.install -libgnuradio-audio-portaudio0.install -libgnuradio-core-dev.install -libgnuradio-cvsd-vocoder-dev.install -libgnuradio-cvsd-vocoder0.install -libgnuradio-gsm-fr-vocoder-dev.install -libgnuradio-gsm-fr-vocoder0.install -libgnuradio-pager-dev.install -libgnuradio-pager0.install -libgnuradio-qtgui-dev.install -libgnuradio-qtgui0.install -libgnuradio-trellis-dev.install -libgnuradio-trellis0.install -libgnuradio-usrp-dev.install -libgnuradio-usrp0.install -libgnuradio-usrp2-0.install -libgnuradio-usrp2-dev.install -libgnuradio-video-sdl-dev.install -libgnuradio-video-sdl0.install -libusrp-dev.install -libusrp2-dev.install -python-gnuradio-audio-alsa.install -python-gnuradio-audio-jack.install -python-gnuradio-audio-oss.install -python-gnuradio-audio-portaudio.install -python-gnuradio-core.install -python-gnuradio-cvsd-vocoder.install -python-gnuradio-gsm-fr-vocoder.install -python-gnuradio-qtgui.install -python-gnuradio-trellis.install -python-gnuradio-usrp.install -python-gnuradio-usrp2.install -python-gnuradio-video-sdl.install -python-gnuradio-wxgui.install -python-usrp.install -/gnuradio/ -/gnuradio-apps/ -/gnuradio-companion/ -/gnuradio-doc/ -/gnuradio-examples/ -/gnuradio-gpio/ -/gnuradio-pager/ -/gnuradio-radar-mono/ -/gnuradio-radio-astronomy/ -/gnuradio-sounder/ -/gnuradio-utils/ -/libgnuradio/ -/libgnuradio-dev/ -/libgnuradio-audio-alsa-dev/ -/libgnuradio-audio-alsa0/ -/libgnuradio-audio-jack-dev/ -/libgnuradio-audio-jack0/ -/libgnuradio-audio-oss-dev/ -/libgnuradio-audio-oss0/ -/libgnuradio-audio-portaudio0/ -/libgnuradio-audio-portaudio-dev/ -/libgnuradio-core-dev/ -/libgnuradio-core0/ -/libgnuradio-cvsd-vocoder-dev/ -/libgnuradio-cvsd-vocoder0/ -/libgnuradio-gsm-fr-vocoder-dev/ -/libgnuradio-gsm-fr-vocoder0/ -/libgnuradio-pager-dev/ -/libgnuradio-pager0/ -/libgnuradio-qtgui-dev/ -/libgnuradio-qtgui0/ -/libgnuradio-trellis-dev/ -/libgnuradio-trellis0/ -/libgnuradio-usrp-dev/ -/libgnuradio-usrp0/ -/libgnuradio-usrp2-0/ -/libgnuradio-usrp2-dev/ -/libgnuradio-video-sdl-dev/ -/libgnuradio-video-sdl0/ -/libgromnithread-dev/ -/libgromnithread0 -/libgruel-dev/ -/libgruel0/ -/libmblock-dev/ -/libmblock0/ -/libusrp-dev/ -/libusrp0/ -/libusrp2-0/ -/libusrp2-dev/ -/python-gnuradio/ -/python-gnuradio-audio-alsa/ -/python-gnuradio-audio-jack/ -/python-gnuradio-audio-oss/ -/python-gnuradio-audio-portaudio/ -/python-gnuradio-core/ -/python-gnuradio-cvsd-vocoder/ -/python-gnuradio-gsm-fr-vocoder/ -/python-gnuradio-qtgui/ -/python-gnuradio-trellis/ -/python-gnuradio-usrp/ -/python-gnuradio-usrp2/ -/python-gnuradio-video-sdl/ -/python-gnuradio-wxgui/ -/python-usrp/ -/usrp-doc/ diff --git a/debian/bin/extract-install-filenames b/debian/bin/extract-install-filenames deleted file mode 100755 index 8ffce9db1..000000000 --- a/debian/bin/extract-install-filenames +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/env python - -""" -Example usage: - - $ extract_install_filenames gnuradio-core/src/lib/swig/Makefile grgrpython_PYTHON - -Produces: - - usr/local/lib64/python2.4/site-packages/gnuradio/gr/gnuradio_swig_python.py - usr/local/lib64/python2.4/site-packages/gnuradio/gr/gnuradio_swig_py_runtime.py - usr/local/lib64/python2.4/site-packages/gnuradio/gr/gnuradio_swig_py_general.py - usr/local/lib64/python2.4/site-packages/gnuradio/gr/gnuradio_swig_py_gengen.py - usr/local/lib64/python2.4/site-packages/gnuradio/gr/gnuradio_swig_py_filter.py - usr/local/lib64/python2.4/site-packages/gnuradio/gr/gnuradio_swig_py_io.py - -""" - -from optparse import OptionParser -import re -import sys -import tempfile -import os - -def make_makefile_tail(dirname, full_var_name): - - s = ''' -extract_install_filenames: - @echo $(%s) - @echo $(%s) - -''' % (dirname, full_var_name) - return s - - -def main(): - parser = OptionParser(usage="usage: %prog [options] Makefile AM-variable-name") - (options, args) = parser.parse_args() - if len(args) != 2: - parser.print_help() - raise SystemExit - - makefile_name = args[0] - makefile = open(makefile_name, 'r') - full_var_name = args[1] - - L = re.split('_', full_var_name) - prefix = '_'.join(L[:-1]) - suffix = L[-1] - - #print "prefix= ", prefix - #print "suffix= ", suffix - - if suffix.upper() != suffix: - raise SystemExit, "AM-variable-name is malformed. Expected something like grgrpython_PYTHON" - - if prefix[:5] == "dist_": - dirname = prefix[5:] + "dir" - else: - dirname = prefix + "dir" - #print "dirname =", dirname - - tail = make_makefile_tail(dirname, full_var_name) - - tmp_makefile = tempfile.NamedTemporaryFile() - #print "tmp_makefile =", tmp_makefile - tmp_name = tmp_makefile.name - #print "tmp_name =", tmp_name - s = makefile.read() - tmp_makefile.write(s) - tmp_makefile.write(tail) - tmp_makefile.flush() - - (head, tail) = os.path.split(makefile_name) - if head: - # cd to directory that contained the original Makefile - cmd = 'cd %s; make -s -f %s extract_install_filenames' % (head, tmp_name) - else: - cmd = 'make -s -f %s extract_install_filenames' % (tmp_name,) - - #print "cmd =", cmd - make = os.popen(cmd, 'r') - target_dirname = make.readline().rstrip() - target_files = make.readline().rstrip() - if target_dirname.startswith('/'): - target_dirname = target_dirname[1:] - - #print "target_dirname =", target_dirname - #print "target_files =", target_files - - for f in target_files.split(): - sys.stdout.write(os.path.join(target_dirname, f.split('/')[-1]) + '\n') - -if __name__ == '__main__': - main() - - - diff --git a/debian/bin/gen-install-files.sh b/debian/bin/gen-install-files.sh deleted file mode 100755 index 45296bff6..000000000 --- a/debian/bin/gen-install-files.sh +++ /dev/null @@ -1,510 +0,0 @@ -#!/bin/sh - -EXTRACT=debian/bin/extract-install-filenames - -# libusrp-dev -NAME=debian/libusrp-dev.install -rm -f $NAME -touch $NAME -$EXTRACT usrp/host/include/usrp/Makefile usrpinclude_HEADERS >>$NAME -$EXTRACT usrp/firmware/include/Makefile usrpinclude_HEADERS >>$NAME -echo usr/lib/libusrp.so >>$NAME -echo usr/lib/pkgconfig/usrp.pc >>$NAME - -# libusrp2-dev -NAME=debian/libusrp2-dev.install -rm -f $NAME -touch $NAME -$EXTRACT usrp2/host/include/usrp2/Makefile usrp2include_HEADERS >>$NAME -echo usr/lib/libusrp2.so >>$NAME -echo usr/lib/pkgconfig/usrp2.pc >>$NAME - -# libgnuradio-core-dev -NAME=debian/libgnuradio-core-dev.install -rm -f $NAME -touch $NAME -$EXTRACT gnuradio-core/src/lib/filter/Makefile grinclude_HEADERS >>$NAME -$EXTRACT gnuradio-core/src/lib/filter/Makefile swiginclude_HEADERS >>$NAME -$EXTRACT gnuradio-core/src/lib/general/Makefile grinclude_HEADERS >>$NAME -$EXTRACT gnuradio-core/src/lib/general/Makefile swiginclude_HEADERS >>$NAME -$EXTRACT gnuradio-core/src/lib/gengen/Makefile grinclude_HEADERS >>$NAME -$EXTRACT gnuradio-core/src/lib/gengen/Makefile swiginclude_HEADERS >>$NAME -$EXTRACT gnuradio-core/src/lib/io/Makefile grinclude_HEADERS >>$NAME -$EXTRACT gnuradio-core/src/lib/io/Makefile swiginclude_HEADERS >>$NAME -$EXTRACT gnuradio-core/src/lib/reed-solomon/Makefile grinclude_HEADERS >>$NAME -$EXTRACT gnuradio-core/src/lib/reed-solomon/Makefile swiginclude_HEADERS >>$NAME -$EXTRACT gnuradio-core/src/lib/runtime/Makefile grinclude_HEADERS >>$NAME -$EXTRACT gnuradio-core/src/lib/runtime/Makefile swiginclude_HEADERS >>$NAME -$EXTRACT gnuradio-core/src/lib/hier/Makefile grinclude_HEADERS >>$NAME -$EXTRACT gnuradio-core/src/lib/hier/Makefile swiginclude_HEADERS >>$NAME -$EXTRACT gnuradio-core/src/lib/swig/Makefile grinclude_HEADERS >>$NAME -$EXTRACT gnuradio-core/src/lib/swig/Makefile swiginclude_HEADERS >>$NAME -echo usr/lib/libgnuradio-core.so >>$NAME -echo usr/lib/pkgconfig/gnuradio-core.pc >>$NAME - -# libgnuradio-audio-alsa0 -NAME=debian/libgnuradio-audio-alsa0.install -rm -f $NAME -touch $NAME -$EXTRACT gr-audio-alsa/src/Makefile lib_LTLIBRARIES >>$NAME -$EXTRACT gr-audio-alsa/src/Makefile lib_LTLIBRARIES | \ - sed -e 's/\.la$/.so.*/' >>$NAME -echo etc/gnuradio/conf.d/gr-audio-alsa.conf >>$NAME - -# libgnuradio-audio-alsa-dev -NAME=debian/libgnuradio-audio-alsa-dev.install -rm -f $NAME -touch $NAME -$EXTRACT gr-audio-alsa/src/Makefile grinclude_HEADERS >>$NAME -$EXTRACT gr-audio-alsa/Makefile dist_pkgconfig_DATA >>$NAME -echo usr/lib/libgnuradio-audio-alsa.so >>$NAME - -# libgnuradio-audio-jack0 -NAME=debian/libgnuradio-audio-jack0.install -rm -f $NAME -touch $NAME -$EXTRACT gr-audio-jack/src/Makefile lib_LTLIBRARIES >>$NAME -$EXTRACT gr-audio-jack/src/Makefile lib_LTLIBRARIES | \ - sed -e 's/\.la$/.so.*/' >>$NAME -echo etc/gnuradio/conf.d/gr-audio-jack.conf >>$NAME - -# libgnuradio-audio-jack-dev -NAME=debian/libgnuradio-audio-jack-dev.install -rm -f $NAME -touch $NAME -$EXTRACT gr-audio-jack/src/Makefile grinclude_HEADERS >>$NAME -$EXTRACT gr-audio-jack/Makefile dist_pkgconfig_DATA >>$NAME -echo usr/lib/libgnuradio-audio-jack.so >>$NAME - -# libgnuradio-audio-oss0 -NAME=debian/libgnuradio-audio-oss0.install -rm -f $NAME -touch $NAME -$EXTRACT gr-audio-oss/src/Makefile lib_LTLIBRARIES >>$NAME -$EXTRACT gr-audio-oss/src/Makefile lib_LTLIBRARIES | \ - sed -e 's/\.la$/.so.*/' >>$NAME -echo etc/gnuradio/conf.d/gr-audio-oss.conf >>$NAME - -# libgnuradio-audio-oss-dev -NAME=debian/libgnuradio-audio-oss-dev.install -rm -f $NAME -touch $NAME -$EXTRACT gr-audio-oss/src/Makefile grinclude_HEADERS >>$NAME -$EXTRACT gr-audio-oss/Makefile dist_pkgconfig_DATA >>$NAME -echo usr/lib/libgnuradio-audio-oss.so >>$NAME - -# libgnuradio-audio-portaudio0 -NAME=debian/libgnuradio-audio-portaudio0.install -rm -f $NAME -touch $NAME -$EXTRACT gr-audio-portaudio/src/Makefile lib_LTLIBRARIES >>$NAME -$EXTRACT gr-audio-portaudio/src/Makefile lib_LTLIBRARIES | \ - sed -e 's/\.la$/.so.*/' >>$NAME -echo etc/gnuradio/conf.d/gr-audio-portaudio.conf >>$NAME - -# libgnuradio-audio-portaudio-dev -NAME=debian/libgnuradio-audio-portaudio-dev.install -rm -f $NAME -touch $NAME -$EXTRACT gr-audio-portaudio/src/Makefile grinclude_HEADERS >>$NAME -$EXTRACT gr-audio-portaudio/Makefile dist_pkgconfig_DATA >>$NAME -echo usr/lib/libgnuradio-audio-portaudio.so >>$NAME - -# libgnuradio-cvsd-vocoder0 -NAME=debian/libgnuradio-cvsd-vocoder0.install -rm -f $NAME -touch $NAME -$EXTRACT gr-cvsd-vocoder/src/lib/Makefile lib_LTLIBRARIES >>$NAME -$EXTRACT gr-cvsd-vocoder/src/lib/Makefile lib_LTLIBRARIES | \ - sed -e 's/\.la$/.so.*/' >>$NAME - -# libgnuradio-cvsd-vocoder-dev -NAME=debian/libgnuradio-cvsd-vocoder-dev.install -rm -f $NAME -touch $NAME -$EXTRACT gr-cvsd-vocoder/src/lib/Makefile grinclude_HEADERS >>$NAME -$EXTRACT gr-cvsd-vocoder/Makefile dist_pkgconfig_DATA >>$NAME -echo usr/lib/libgnuradio-cvsd-vocoder.so >>$NAME - -# libgnuradio-gsm-fr-vocoder0 -NAME=debian/libgnuradio-gsm-fr-vocoder0.install -rm -f $NAME -touch $NAME -$EXTRACT gr-gsm-fr-vocoder/src/lib/Makefile lib_LTLIBRARIES >>$NAME -$EXTRACT gr-gsm-fr-vocoder/src/lib/Makefile lib_LTLIBRARIES | \ - sed -e 's/\.la$/.so.*/' >>$NAME - -# libgnuradio-gsm-fr-vocoder-dev -NAME=debian/libgnuradio-gsm-fr-vocoder-dev.install -rm -f $NAME -touch $NAME -$EXTRACT gr-gsm-fr-vocoder/src/lib/Makefile grinclude_HEADERS >>$NAME -$EXTRACT gr-gsm-fr-vocoder/Makefile dist_pkgconfig_DATA >>$NAME -echo usr/lib/libgnuradio-gsm-fr-vocoder.so >>$NAME - -# libgnuradio-pager0 -NAME=debian/libgnuradio-pager0.install -rm -f $NAME -touch $NAME -$EXTRACT gr-pager/src/Makefile lib_LTLIBRARIES >>$NAME -$EXTRACT gr-pager/src/Makefile lib_LTLIBRARIES | \ - sed -e 's/\.la$/.so.*/' >>$NAME - -# libgnuradio-pager-dev -NAME=debian/libgnuradio-pager-dev.install -rm -f $NAME -touch $NAME -$EXTRACT gr-pager/src/Makefile grinclude_HEADERS >>$NAME -$EXTRACT gr-pager/Makefile dist_pkgconfig_DATA >>$NAME -echo usr/lib/libgnuradio-pager.so >>$NAME - -# libgnuradio-qtgui0 -NAME=debian/libgnuradio-qtgui0.install -rm -f $NAME -touch $NAME -$EXTRACT gr-qtgui/src/lib/Makefile lib_LTLIBRARIES >>$NAME -$EXTRACT gr-qtgui/src/lib/Makefile lib_LTLIBRARIES | \ - sed -e 's/\.la$/.so.*/' >>$NAME - -# libgnuradio-qtgui-dev -NAME=debian/libgnuradio-qtgui-dev.install -rm -f $NAME -touch $NAME -$EXTRACT gr-qtgui/src/lib/Makefile grinclude_HEADERS >>$NAME -echo usr/lib/libgnuradio-qtgui.so >>$NAME - -# libgnuradio-trellis0 -NAME=debian/libgnuradio-trellis0.install -rm -f $NAME -touch $NAME -$EXTRACT gr-trellis/src/lib/Makefile lib_LTLIBRARIES >>$NAME -$EXTRACT gr-trellis/src/lib/Makefile lib_LTLIBRARIES | \ - sed -e 's/\.la$/.so.*/' >>$NAME - -# libgnuradio-trellis-dev -NAME=debian/libgnuradio-trellis-dev.install -rm -f $NAME -touch $NAME -$EXTRACT gr-trellis/src/lib/Makefile grinclude_HEADERS >>$NAME -$EXTRACT gr-trellis/Makefile dist_pkgconfig_DATA >>$NAME -echo usr/lib/libgnuradio-trellis.so >>$NAME - -# libgnuradio-usrp0 -NAME=debian/libgnuradio-usrp0.install -rm -f $NAME -touch $NAME -$EXTRACT gr-usrp/src/Makefile lib_LTLIBRARIES >>$NAME -$EXTRACT gr-usrp/src/Makefile lib_LTLIBRARIES | \ - sed -e 's/\.la$/.so.*/' >>$NAME -echo usr/lib/pkgconfig/gnuradio-usrp.pc >> $NAME - -# libgnuradio-usrp-dev -NAME=debian/libgnuradio-usrp-dev.install -rm -f $NAME -touch $NAME -$EXTRACT gr-usrp/src/Makefile grinclude_HEADERS >>$NAME -echo usr/lib/libgnuradio-usrp.so >>$NAME - -# libgnuradio-usrp2-0 -NAME=debian/libgnuradio-usrp2-0.install -rm -f $NAME -touch $NAME -$EXTRACT gr-usrp2/src/Makefile lib_LTLIBRARIES >>$NAME -$EXTRACT gr-usrp2/src/Makefile lib_LTLIBRARIES | \ - sed -e 's/\.la$/.so.*/' >>$NAME -echo usr/lib/pkgconfig/gnuradio-usrp2.pc >> $NAME - -# libgnuradio-usrp2-dev -NAME=debian/libgnuradio-usrp2-dev.install -rm -f $NAME -touch $NAME -$EXTRACT gr-usrp2/src/Makefile grinclude_HEADERS >>$NAME -echo usr/lib/libgnuradio-usrp2.so >>$NAME - -# libgnuradio-video-sdl0 -NAME=debian/libgnuradio-video-sdl0.install -rm -f $NAME -touch $NAME -$EXTRACT gr-video-sdl/src/Makefile lib_LTLIBRARIES >>$NAME -$EXTRACT gr-video-sdl/src/Makefile lib_LTLIBRARIES | \ - sed -e 's/\.la$/.so.*/' >>$NAME - -# libgnuradio-video-sdl-dev -NAME=debian/libgnuradio-video-sdl-dev.install -rm -f $NAME -touch $NAME -$EXTRACT gr-video-sdl/src/Makefile grinclude_HEADERS >>$NAME -$EXTRACT gr-video-sdl/Makefile dist_pkgconfig_DATA >>$NAME -echo usr/lib/libgnuradio-video-sdl.so >>$NAME - -# python-usrp -NAME=debian/python-usrp.install -rm -f $NAME -touch $NAME -$EXTRACT usrp/host/swig/Makefile usrp_prims_pylib_LTLIBRARIES >>$NAME -$EXTRACT usrp/host/swig/Makefile usrp_prims_pylib_LTLIBRARIES | \ - sed -e 's/\.la$/.so/' >>$NAME -$EXTRACT usrp/host/swig/Makefile usrp_prims_python_PYTHON >>$NAME -$EXTRACT usrp/host/lib/Makefile usrppython_PYTHON >>$NAME - -# python-gnuradio-core -NAME=debian/python-gnuradio-core.install -rm -f $NAME -touch $NAME -$EXTRACT gnuradio-core/src/python/gnuradio/Makefile grpython_PYTHON >>$NAME -$EXTRACT gnuradio-core/src/python/gnuradio/gr/Makefile grgrpython_PYTHON >>$NAME -$EXTRACT gnuradio-core/src/python/gnuradio/blks2/Makefile grblks2python_PYTHON >>$NAME -$EXTRACT gnuradio-core/src/python/gnuradio/blks2impl/Makefile grblkspython_PYTHON >>$NAME -$EXTRACT gnuradio-core/src/python/gnuradio/gru/Makefile grblkspython_PYTHON >>$NAME -$EXTRACT gnuradio-core/src/python/gnuradio/gruimpl/Makefile grupython_PYTHON >>$NAME -$EXTRACT gnuradio-core/src/python/gnuradio/vocoder/Makefile grvocoderpython_PYTHON >>$NAME -$EXTRACT gnuradio-core/src/lib/swig/Makefile gnuradio_swig_py_filter_pylib_LTLIBRARIES >>$NAME -$EXTRACT gnuradio-core/src/lib/swig/Makefile gnuradio_swig_py_general_pylib_LTLIBRARIES >>$NAME -$EXTRACT gnuradio-core/src/lib/swig/Makefile gnuradio_swig_py_gengen_pylib_LTLIBRARIES >>$NAME -$EXTRACT gnuradio-core/src/lib/swig/Makefile gnuradio_swig_py_hier_pylib_LTLIBRARIES >>$NAME -$EXTRACT gnuradio-core/src/lib/swig/Makefile gnuradio_swig_py_io_pylib_LTLIBRARIES >>$NAME -$EXTRACT gnuradio-core/src/lib/swig/Makefile gnuradio_swig_py_runtime_pylib_LTLIBRARIES >>$NAME -$EXTRACT gnuradio-core/src/lib/swig/Makefile gnuradio_swig_py_filter_pylib_LTLIBRARIES | \ - sed -e 's/\.la$/.so/' >>$NAME -$EXTRACT gnuradio-core/src/lib/swig/Makefile gnuradio_swig_py_general_pylib_LTLIBRARIES | \ - sed -e 's/\.la$/.so/' >>$NAME -$EXTRACT gnuradio-core/src/lib/swig/Makefile gnuradio_swig_py_gengen_pylib_LTLIBRARIES | \ - sed -e 's/\.la$/.so/' >>$NAME -$EXTRACT gnuradio-core/src/lib/swig/Makefile gnuradio_swig_py_hier_pylib_LTLIBRARIES | \ - sed -e 's/\.la$/.so/' >>$NAME -$EXTRACT gnuradio-core/src/lib/swig/Makefile gnuradio_swig_py_io_pylib_LTLIBRARIES | \ - sed -e 's/\.la$/.so/' >>$NAME -$EXTRACT gnuradio-core/src/lib/swig/Makefile gnuradio_swig_py_runtime_pylib_LTLIBRARIES | \ - sed -e 's/\.la$/.so/' >>$NAME -$EXTRACT gnuradio-core/src/lib/swig/Makefile ourpython_PYTHON >>$NAME -$EXTRACT gnuradio-core/src/lib/swig/Makefile gnuradio_swig_py_filter_python_PYTHON >>$NAME -$EXTRACT gnuradio-core/src/lib/swig/Makefile gnuradio_swig_py_general_python_PYTHON >>$NAME -$EXTRACT gnuradio-core/src/lib/swig/Makefile gnuradio_swig_py_gengen_python_PYTHON >>$NAME -$EXTRACT gnuradio-core/src/lib/swig/Makefile gnuradio_swig_py_hier_python_PYTHON >>$NAME -$EXTRACT gnuradio-core/src/lib/swig/Makefile gnuradio_swig_py_io_python_PYTHON >>$NAME -$EXTRACT gnuradio-core/src/lib/swig/Makefile gnuradio_swig_py_runtime_python_PYTHON >>$NAME - -# python-gnuradio-wxgui -NAME=debian/python-gnuradio-wxgui.install -rm -f $NAME -touch $NAME -echo etc/gnuradio/conf.d/gr-wxgui.conf >>$NAME -$EXTRACT gr-wxgui/src/python/Makefile ourpython_PYTHON >>$NAME -$EXTRACT gr-wxgui/src/python/Makefile formspython_PYTHON >>$NAME -$EXTRACT gr-wxgui/src/python/plotter/Makefile ourpython_PYTHON >>$NAME -$EXTRACT gr-wxgui/Makefile pkgconfig_DATA >>$NAME - -# python-gnuradio-usrp -NAME=debian/python-gnuradio-usrp.install -rm -f $NAME -touch $NAME -$EXTRACT gr-usrp/src/Makefile usrp_swig_python_PYTHON >>$NAME -$EXTRACT gr-usrp/src/Makefile usrp_swig_pylib_LTLIBRARIES >>$NAME -$EXTRACT gr-usrp/src/Makefile usrp_swig_pylib_LTLIBRARIES | \ - sed -e 's/\.la$/.so/' >>$NAME - -# python-gnuradio-usrp2 -NAME=debian/python-gnuradio-usrp2.install -rm -f $NAME -touch $NAME -$EXTRACT gr-usrp2/src/Makefile usrp2_python_PYTHON >>$NAME -$EXTRACT gr-usrp2/src/Makefile usrp2_pylib_LTLIBRARIES >>$NAME -$EXTRACT gr-usrp2/src/Makefile usrp2_pylib_LTLIBRARIES | \ - sed -e 's/\.la$/.so/' >>$NAME - -# python-gnuradio-audio-alsa -NAME=debian/python-gnuradio-audio-alsa.install -rm -f $NAME -touch $NAME -$EXTRACT gr-audio-alsa/src/Makefile audio_alsa_python_PYTHON >>$NAME -$EXTRACT gr-audio-alsa/src/Makefile audio_alsa_pylib_LTLIBRARIES >>$NAME -$EXTRACT gr-audio-alsa/src/Makefile audio_alsa_pylib_LTLIBRARIES | \ - sed -e 's/\.la$/.so*/' >>$NAME - -# python-gnuradio-audio-jack -NAME=debian/python-gnuradio-audio-jack.install -rm -f $NAME -touch $NAME -$EXTRACT gr-audio-jack/src/Makefile audio_jack_python_PYTHON >>$NAME -$EXTRACT gr-audio-jack/src/Makefile audio_jack_pylib_LTLIBRARIES >>$NAME -$EXTRACT gr-audio-jack/src/Makefile audio_jack_pylib_LTLIBRARIES | \ - sed -e 's/\.la$/.so/' >>$NAME - -# python-gnuradio-audio-oss -NAME=debian/python-gnuradio-audio-oss.install -rm -f $NAME -touch $NAME -$EXTRACT gr-audio-oss/src/Makefile audio_oss_python_PYTHON >>$NAME -$EXTRACT gr-audio-oss/src/Makefile audio_oss_pylib_LTLIBRARIES >>$NAME -$EXTRACT gr-audio-oss/src/Makefile audio_oss_pylib_LTLIBRARIES | \ - sed -e 's/\.la$/.so/' >>$NAME - -# python-gnuradio-audio-portaudio -NAME=debian/python-gnuradio-audio-portaudio.install -rm -f $NAME -touch $NAME -$EXTRACT gr-audio-portaudio/src/Makefile audio_portaudio_python_PYTHON >>$NAME -$EXTRACT gr-audio-portaudio/src/Makefile audio_portaudio_pylib_LTLIBRARIES >>$NAME -$EXTRACT gr-audio-portaudio/src/Makefile audio_portaudio_pylib_LTLIBRARIES | \ - sed -e 's/\.la$/.so/' >>$NAME - -# python-gnuradio-cvsd-vocoder -NAME=debian/python-gnuradio-cvsd-vocoder.install -rm -f $NAME -touch $NAME -$EXTRACT gr-cvsd-vocoder/src/python/Makefile grblkspython_PYTHON >>$NAME -$EXTRACT gr-cvsd-vocoder/src/lib/Makefile cvsd_vocoder_python_PYTHON >>$NAME -$EXTRACT gr-cvsd-vocoder/src/lib/Makefile cvsd_vocoder_pylib_LTLIBRARIES >>$NAME -$EXTRACT gr-cvsd-vocoder/src/lib/Makefile cvsd_vocoder_pylib_LTLIBRARIES | \ - sed -e 's/\.la$/.so/' >>$NAME - -# python-gnuradio-gsm-fr-vocoder -NAME=debian/python-gnuradio-gsm-fr-vocoder.install -rm -f $NAME -touch $NAME -$EXTRACT gr-gsm-fr-vocoder/src/lib/Makefile gsm_full_rate_python_PYTHON >>$NAME -$EXTRACT gr-gsm-fr-vocoder/src/lib/Makefile gsm_full_rate_pylib_LTLIBRARIES >>$NAME -$EXTRACT gr-gsm-fr-vocoder/src/lib/Makefile gsm_full_rate_pylib_LTLIBRARIES | \ - sed -e 's/\.la$/.so/' >>$NAME - -# python-gnuradio-qtgui -NAME=debian/python-gnuradio-qtgui.install -rm -f $NAME -touch $NAME -$EXTRACT gr-qtgui/src/python/Makefile qtguipython_PYTHON >>$NAME -$EXTRACT gr-qtgui/src/lib/Makefile qtgui_python_PYTHON >>$NAME -$EXTRACT gr-qtgui/src/lib/Makefile qtgui_pylib_LTLIBRARIES >>$NAME -$EXTRACT gr-qtgui/src/lib/Makefile qtgui_pylib_LTLIBRARIES | \ - sed -e 's/\.la$/.so*/' >>$NAME - -# python-gnuradio-trellis -NAME=debian/python-gnuradio-trellis.install -rm -f $NAME -touch $NAME -$EXTRACT gr-trellis/src/lib/Makefile trellis_python_PYTHON >>$NAME -$EXTRACT gr-trellis/src/lib/Makefile trellis_pylib_LTLIBRARIES >>$NAME -$EXTRACT gr-trellis/src/lib/Makefile trellis_pylib_LTLIBRARIES | \ - sed -e 's/\.la$/.so/' >>$NAME -$EXTRACT gr-trellis/src/examples/Makefile dist_ourdata_DATA >>$NAME -$EXTRACT gr-trellis/src/examples/Makefile dist_ourdata_SCRIPTS >>$NAME -$EXTRACT gr-trellis/src/examples/fsm_files/Makefile dist_ourdata_DATA >>$NAME - -# python-gnuradio-video-sdl -NAME=debian/python-gnuradio-video-sdl.install -rm -f $NAME -touch $NAME -$EXTRACT gr-video-sdl/src/Makefile video_sdl_python_PYTHON >>$NAME -$EXTRACT gr-video-sdl/src/Makefile video_sdl_pylib_LTLIBRARIES >>$NAME -$EXTRACT gr-video-sdl/src/Makefile video_sdl_pylib_LTLIBRARIES | \ - sed -e 's/\.la$/.so/' >>$NAME - -# gnuradio-utils -NAME=debian/gnuradio-utils.install -rm -f $NAME -touch $NAME -$EXTRACT gr-utils/src/python/Makefile ourpython_PYTHON >>$NAME -$EXTRACT gr-utils/src/python/Makefile bin_SCRIPTS >>$NAME - -# gnuradio-examples -NAME=debian/gnuradio-examples.install -rm -f $NAME -touch $NAME -$EXTRACT gnuradio-examples/python/apps/hf_explorer/Makefile dist_ourdata_DATA >>$NAME -$EXTRACT gnuradio-examples/python/apps/hf_explorer/Makefile dist_ourdata_SCRIPTS >>$NAME -$EXTRACT gnuradio-examples/python/apps/hf_radio/Makefile dist_ourdata_DATA >>$NAME -$EXTRACT gnuradio-examples/python/apps/hf_radio/Makefile dist_ourdata_SCRIPTS >>$NAME -$EXTRACT gnuradio-examples/python/audio/Makefile dist_ourdata_SCRIPTS >>$NAME -$EXTRACT gnuradio-examples/python/digital/Makefile dist_ourdata_DATA >>$NAME -$EXTRACT gnuradio-examples/python/digital/Makefile dist_ourdata_SCRIPTS >>$NAME -$EXTRACT gnuradio-examples/python/digital-bert/Makefile dist_ourdata_DATA >>$NAME -$EXTRACT gnuradio-examples/python/digital-bert/Makefile dist_ourdata_SCRIPTS >>$NAME -$EXTRACT gnuradio-examples/python/digital_voice/Makefile dist_ourdata_SCRIPTS >>$NAME -$EXTRACT gnuradio-examples/python/mp-sched/Makefile dist_ourdata_DATA >>$NAME -$EXTRACT gnuradio-examples/python/mp-sched/Makefile dist_ourdata_SCRIPTS >>$NAME -$EXTRACT gnuradio-examples/python/multi-antenna/Makefile dist_ourdata_SCRIPTS >>$NAME -$EXTRACT gnuradio-examples/python/multi_usrp/Makefile dist_ourdata_DATA >>$NAME -$EXTRACT gnuradio-examples/python/multi_usrp/Makefile dist_ourdata_SCRIPTS >>$NAME -$EXTRACT gnuradio-examples/python/network/Makefile dist_ourdata_SCRIPTS >>$NAME -$EXTRACT gnuradio-examples/python/ofdm/Makefile dist_ourdata_DATA >>$NAME -$EXTRACT gnuradio-examples/python/ofdm/Makefile dist_ourdata_SCRIPTS >>$NAME -$EXTRACT gnuradio-examples/python/pfb/Makefile dist_ourdata_SCRIPTS >>$NAME -$EXTRACT gnuradio-examples/python/pfb/Makefile dist_ourdata_PYTHON >>$NAME -$EXTRACT gnuradio-examples/python/pfb/Makefile dist_ourdata_DATA >>$NAME -$EXTRACT gnuradio-examples/python/usrp/Makefile dist_ourdata_SCRIPTS >>$NAME -$EXTRACT gnuradio-examples/python/usrp2/Makefile dist_ourdata_SCRIPTS >>$NAME -$EXTRACT gnuradio-examples/python/usrp2/Makefile dist_ourdata_DATA >>$NAME -$EXTRACT gnuradio-examples/grc/Makefile dist_audiodata_DATA >>$NAME -$EXTRACT gnuradio-examples/grc/Makefile dist_demoddata_DATA >>$NAME -$EXTRACT gnuradio-examples/grc/Makefile dist_simpledata_DATA >>$NAME -$EXTRACT gnuradio-examples/grc/Makefile dist_trellisdata_DATA >>$NAME -$EXTRACT gnuradio-examples/grc/Makefile dist_usrpdata_DATA >>$NAME -$EXTRACT gnuradio-examples/grc/Makefile dist_xmlrpcdata_DATA >>$NAME - -# gnuradio-pager -NAME=debian/gnuradio-pager.install -rm -f $NAME -touch $NAME -$EXTRACT gr-pager/src/Makefile dist_bin_SCRIPTS >>$NAME -$EXTRACT gr-pager/src/Makefile pager_swig_python_PYTHON >>$NAME -$EXTRACT gr-pager/src/Makefile pager_swig_pylib_LTLIBRARIES >>$NAME -$EXTRACT gr-pager/src/Makefile pager_swig_pylib_LTLIBRARIES | - sed -e 's/\.la$/.so/' >>$NAME - -# gnuradio-sounder -NAME=debian/gnuradio-sounder.install -rm -f $NAME -touch $NAME -$EXTRACT gr-sounder/src/python/Makefile sounder_python_PYTHON >>$NAME -$EXTRACT gr-sounder/src/python/Makefile dist_bin_SCRIPTS >>$NAME -echo usr/share/usrp/rev2/usrp_sounder.rbf >>$NAME -echo usr/share/usrp/rev4/usrp_sounder.rbf >>$NAME - -# gnuradio-gpio -NAME=debian/gnuradio-gpio.install -rm -f $NAME -touch $NAME -$EXTRACT gr-gpio/src/python/Makefile dist_bin_SCRIPTS >>$NAME -$EXTRACT gr-gpio/src/python/Makefile ourpython_PYTHON >>$NAME -echo usr/share/usrp/rev2/std_2rxhb_2tx_dig.rbf >> $NAME -echo usr/share/usrp/rev4/std_2rxint_2tx_dig.rbf >> $NAME - -# gnuradio-radar-mono -NAME=debian/gnuradio-radar-mono.install -rm -f $NAME -touch $NAME -$EXTRACT gr-radar-mono/src/python/Makefile radar_mono_python_PYTHON >>$NAME -$EXTRACT gr-radar-mono/src/python/Makefile dist_bin_SCRIPTS >>$NAME -echo usr/share/usrp/rev2/usrp_radar_mono.rbf >>$NAME -echo usr/share/usrp/rev4/usrp_radar_mono.rbf >>$NAME - -# gnuradio-radio-astronomy -NAME=debian/gnuradio-radio-astronomy.install -rm -f $NAME -touch $NAME -$EXTRACT gr-radio-astronomy/src/python/Makefile ourpython_PYTHON >>$NAME -$EXTRACT gr-radio-astronomy/src/python/Makefile wxguipython_PYTHON >>$NAME -$EXTRACT gr-radio-astronomy/src/python/Makefile dist_bin_SCRIPTS >>$NAME -$EXTRACT gr-radio-astronomy/src/lib/Makefile ra_python_PYTHON >>$NAME -$EXTRACT gr-radio-astronomy/src/lib/Makefile ra_pylib_LTLIBRARIES >>$NAME -$EXTRACT gr-radio-astronomy/src/lib/Makefile ra_pylib_LTLIBRARIES | - sed -e 's/\.la$/.so/' >>$NAME - -# gnuradio-companion -NAME=debian/gnuradio-companion.install -rm -f $NAME -touch $NAME -$EXTRACT grc/Makefile ourpython_PYTHON >>$NAME -$EXTRACT grc/Makefile dist_etc_DATA >>$NAME -$EXTRACT grc/base/Makefile ourpython_PYTHON >>$NAME -$EXTRACT grc/base/Makefile dist_ourdata_DATA >>$NAME -$EXTRACT grc/blocks/Makefile dist_ourdata_DATA >>$NAME -$EXTRACT grc/freedesktop/Makefile dist_ourdata_DATA >>$NAME -$EXTRACT grc/freedesktop/Makefile dist_bin_SCRIPTS >>$NAME -$EXTRACT grc/grc_gnuradio/Makefile root_python_PYTHON >>$NAME -$EXTRACT grc/grc_gnuradio/Makefile blks2_python_PYTHON >>$NAME -$EXTRACT grc/grc_gnuradio/Makefile usrp_python_PYTHON >>$NAME -$EXTRACT grc/grc_gnuradio/Makefile wxgui_python_PYTHON >>$NAME -$EXTRACT grc/gui/Makefile ourpython_PYTHON >>$NAME -$EXTRACT grc/python/Makefile ourpython_PYTHON >>$NAME -$EXTRACT grc/python/Makefile dist_ourdata_DATA >>$NAME -$EXTRACT grc/scripts/Makefile dist_bin_SCRIPTS >>$NAME diff --git a/debian/bin/install-build-deps.sh b/debian/bin/install-build-deps.sh deleted file mode 100755 index 256717eb3..000000000 --- a/debian/bin/install-build-deps.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -ISSUE=`cut -f 1 -d ' ' /etc/issue` - -if test "$ISSUE" = "Ubuntu"; then - FFTW3DEV=fftw3-dev -else - FFTW3DEV=libfftw3-dev -fi - -# FIXME: these are missing gr-comedi and gr-qtgui dependencies -sudo apt-get install build-essential automake libtool pkg-config \ - python-dev swig $FFTW3DEV libcppunit-dev libboost1.35-dev \ - libgsl0-dev guile-1.8 libasound2-dev python-wxgtk2.8 python-numpy \ - doxygen xmlto sdcc-nf libusb-dev libjack-dev portaudio19-dev \ - libsdl1.2-dev python-opengl python-matplotlib python-tk \ - python-cheetah python-gtk2 python-lxml diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index e7b8998be..000000000 --- a/debian/changelog +++ /dev/null @@ -1,99 +0,0 @@ -gnuradio (3.3git-1) unstable; urgency=low - - * upstream unstable version from git repository - - -- Johnathan Corgan <jcorgan@corganenterprises.com> Thu, 24 Sep 2009 23:00:00 -0600 - -gnuradio (3.2.2-1) unstable; urgency=low - - * new upstream version, includes gcc4.3 support, closes: #474801, #524387 - * 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 <bdale@gag.com> Tue, 15 Sep 2009 23:37:57 -0600 - -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 <bdale@gag.com> 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 <bdale@gag.com> 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 <bdale@gag.com> 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 <bdale@gag.com> Mon, 4 Dec 2006 15:35:53 -0700 - -gnuradio (3.0.2-1) unstable; urgency=high - - * new upstream version, fixes FTBFS issues - - -- Bdale Garbee <bdale@gag.com> 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 <bdale@gag.com> 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 <bdale@gag.com> 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 <bdale@gag.com> Sun, 8 Oct 2006 13:28:21 -0600 - diff --git a/debian/compat b/debian/compat deleted file mode 100644 index 7ed6ff82d..000000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/debian/control b/debian/control deleted file mode 100644 index 0760ddaec..000000000 --- a/debian/control +++ /dev/null @@ -1,693 +0,0 @@ -################################################################################ -# Single source deb for entire distribution # -################################################################################ - -Source: gnuradio -Section: comm -Priority: optional -Maintainer: Bdale Garbee <bdale@gag.com> -Build-Conflicts: automake1.8, automake1.9 -Build-Depends: automake, debhelper (>= 5), doxygen, ghostscript, guile-1.8, libasound2-dev, libaudio-dev, libblas-dev, libboost-date-time1.37-dev | libboost-date-time-dev, libboost-program-options-dev | libboost-program-options1.37-dev, libboost-thread-dev | libboost-thread1.37-dev, libcppunit-dev, libfftw3-dev, libfontconfig1-dev, libfreetype6-dev, libglib2.0-dev, libgsl0-dev, libjack-dev, libpng12-dev, libqt4-dev, libqt4-opengl-dev, libqwt5-qt4-dev, libqwtplot3d-qt4-dev, libsdl1.2-dev, libtool, libusb-dev, libwxgtk2.8-dev, libxext-dev, libxrender-dev, libxt-dev, pkg-config, portaudio19-dev, python-central, python-cheetah, python-dev, python-gtk2, python-lxml, python-numpy, python-qt4, python-qt4-dev, python-wxgtk2.8, sdcc, swig, texlive-latex-base, xdg-utils, xmlto -Standards-Version: 3.8.3 -XS-Python-Version: >=2.5 - -################################################################################ -# C++ auxiliary libraries # -################################################################################ - -Package: libgruel0 -Section: libs -Architecture: any -Depends: ${shlibs:Depends} -Replaces: libpmt0 -Conflicts: libpmt0 -Description: GNU Radio Utility Etcetera Library - This package implements a variety of low-level utility - routines for GNU Radio. - -Package: libgruel-dev -Section: libdevel -Architecture: any -Depends: libgruel0 (= ${binary:Version}), libboost-date-time1.37-dev | libboost-date-time-dev -Replaces: libpmt-dev -Conflicts: libpmt-dev -Description: GNU Radio Utility Etcetera Library - This package implements a variety of low-level utility - routines for GNU Radio. - . - This package contains header files needed by developers. - -Package: libgromnithread0 -Section: libs -Architecture: any -Replaces: libgnuradio-omnithread0c2a -Conflicts: libgnuradio-omnithread0c2a -Depends: ${shlibs:Depends} -Description: GNU Radio Omnithreads Abstraction Library - This package is a fork of the omniORB-4.0.1 threading library - for use with GNU Radio. - -Package: libgromnithread-dev -Section: libdevel -Architecture: any -Replaces: libgnuradio-omnithread0-dev -Conflicts: libgnuradio-omnithread0-dev -Depends: libgromnithread0 (= ${binary:Version}) -Description: GNU Radio Omnithreads Abstraction Library - This package is a fork of the omniORB-4.0.1 threading library - for use with GNU Radio. - . - This package contains header files needed by developers. - -################################################################################ -# C++ M-Block library packages # -################################################################################ - -Package: libmblock0 -Section: libs -Architecture: any -Replaces: libmblock0c2a -Conflicts: libmblock0c2a -Depends: libpmt0 (= ${binary:Version}), libgromnithread0 (= ${binary:Version}), ${shlibs:Depends} -Description: GNU Radio Message Block Library - This package provides the GNU Radio message block library. - -Package: libmblock-dev -Section: libdevel -Architecture: any -Replaces: libmblock0-dev -Conflicts: libmblock0-dev -Depends: libmblock0 (= ${binary:Version}), libgromnithread-dev (= ${binary:Version}), libgruel-dev (= ${binary:Version}) -Description: GNU Radio Message Block Library - This package provides the GNU Radio message block library. - . - This package contains header files needed by developers. - -################################################################################ -# C++ USRP/USRP2 library packages # -################################################################################ - -Package: libusrp0 -Section: comm -Architecture: any -Depends: ${shlibs:Depends} -Replaces: libusrp0c2a, usrp-firmware -Conflicts: usrp-firmware -Suggests: usrp-doc -Description: Client side library for the USRP(1) hardware - The Universal Software Radio Peripheral (USRP) is an USB-connected, - low-cost and open board. It features four high-speed analog-to-digital - and digital-to-analog converters, an FPGA and a microcontroller. It's - ideal for capturing or transmitting various signals, usually in - combination with GNU Radio. The design schemas are available under a - free license. - . - This package contains the client-side library, providing an easy interface - for communicating with the USRP. - -Package: libusrp-dev -Section: libdevel -Architecture: any -Replaces: libusrp0-dev -Depends: libusrp0 (= ${binary:Version}), libusb-dev, libboost-thread1.37-dev | libboost-thread-dev -Description: Client side library for the USRP(1) hardware - The Universal Software Radio Peripheral (USRP) is an USB-connected, - low-cost and open board. It features four high-speed analog-to-digital - and digital-to-analog converters, an FPGA and a microcontroller. It's - ideal for capturing or transmitting various signals, usually in - combination with GNU Radio. The design schemas are available under a - free license. - . - This package contains the client-side library, providing an easy interface - for communicating with the USRP. - . - This package contains header files needed by developers. - -Package: libusrp2-0 -Section: comm -Architecture: any -Depends: libgruel0 (= ${binary:Version}), libgromnithread0 (= ${binary:Version}), ${shlibs:Depends} -Description: Client side library for the USRP2 hardware - The Universal Software Radio Peripheral 2 (USRP2) is a GbE-connected, - low-cost and open board. It features two high-speed analog-to-digital - and digital-to-analog converters, an FPGA and a microcontroller. It's - ideal for capturing or transmitting various signals, usually in - combination with GNU Radio. The design schemas are available under a - free license. - . - This package contains the client-side C++ library, providing the low- - level (non-GNU Radio) hardware interface. - -Package: libusrp2-dev -Section: libdevel -Architecture: any -Depends: libusrp2-0 (= ${binary:Version}), libboost-thread1.37-dev | libboost-thread-dev, libgromnithread-dev (= ${binary:Version}), libgruel-dev (= ${binary:Version}) -Description: Client side library for the USRP2 hardware - The Universal Software Radio Peripheral 2 (USRP2) is a GbE-connected, - low-cost and open board. It features two high-speed analog-to-digital - and digital-to-analog converters, an FPGA and a microcontroller. It's - ideal for capturing or transmitting various signals, usually in - combination with GNU Radio. The design schemas are available under a - free license. - . - This package contains the client-side C++ library, providing the low- - level (non-GNU Radio) hardware interface. - . - This package contains header files needed by developers. - -################################################################################ -# C++ GNU Radio block library packages # -################################################################################ - -Package: libgnuradio-core0 -Section: libs -Architecture: any -Depends: libgruel0 (= ${binary:Version}), ${shlibs:Depends} -Conflicts: libgnuradio-core0c2, libgnuradio-core0c2a -Replaces: libgnuradio-core0c2, libgnuradio-core0c2a -Suggests: gnuradio-doc -Description: The GNU Sofware Radio Core Library - This package contains the core GNU Radio libraries. - -Package: libgnuradio-core-dev -Section: libdevel -Architecture: any -Replaces: libgnuradio-core0-dev -Conflicts: libgnuradio-core0-dev -Depends: libgnuradio-core0 (= ${binary:Version}), libgruel-dev (= ${binary:Version}), libboost-thread1.37-dev | libboost-thread-dev, libboost-date-time1.37-dev | libboost-date-time-dev, libboost-program-options1.37-dev | libboost-program-options-dev, libgsl0-dev, libatlas-base-dev, libfftw3-dev, swig -Description: The GNU Software Radio Core Library - This package contains the core GNU Radio libraries. - . - This package contains header files needed by developers. - -Package: libgnuradio-audio-alsa0 -Section: libs -Architecture: any -Depends: libgnuradio-core0 (= ${binary:Version}), ${shlibs:Depends} -Description: GNU Radio C++ block for ALSA sound system - This package contains the ALSA sound system driver for GNU Radio. - -Package: libgnuradio-audio-alsa-dev -Section: libdevel -Architecture: any -Depends: libgnuradio-audio-alsa0 (= ${binary:Version}), libgnuradio-core-dev (= ${binary:Version}), libasound2-dev -Description: GNU Radio C++ block for ALSA sound system - This package contains the ALSA sound system driver for GNU Radio. - . - This package contains header files needed by developers. - -Package: libgnuradio-audio-jack0 -Section: libs -Architecture: any -Depends: libgnuradio-core0 (= ${binary:Version}), ${shlibs:Depends} -Description: GNU Radio C++ block for JACK sound system - This package contains the JACK sound system driver for GNU Radio. - -Package: libgnuradio-audio-jack-dev -Section: libdevel -Architecture: any -Depends: libgnuradio-audio-jack0 (= ${binary:Version}), libgnuradio-core-dev (= ${binary:Version}), libjack-dev -Description: GNU Radio C++ block for JACK sound system - This package contains the JACK sound system driver for GNU Radio. - . - This package contains header files needed by developers. - -Package: libgnuradio-audio-oss0 -Section: libs -Architecture: any -Depends: libgnuradio-core0 (= ${binary:Version}), ${shlibs:Depends} -Description: GNU Radio C++ block for OSS sound system - This package contains the OSS sound system driver for GNU Radio. - -Package: libgnuradio-audio-oss-dev -Section: libdevel -Architecture: any -Depends: libgnuradio-audio-oss0 (= ${binary:Version}), libgnuradio-core-dev (= ${binary:Version}) -Description: GNU Radio C++ block for OSS sound system - This package contains the OSS sound system driver for GNU Radio. - . - This package contains header files needed by developers. - -Package: libgnuradio-audio-portaudio0 -Section: libs -Architecture: any -Depends: libgnuradio-core0 (= ${binary:Version}), ${shlibs:Depends} -Description: GNU Radio C++ block for PORTAUDIO sound system - This package contains the PORTAUDIO sound system driver for GNU Radio. - -Package: libgnuradio-audio-portaudio-dev -Section: libdevel -Architecture: any -Depends: libgnuradio-audio-portaudio0 (= ${binary:Version}), libgnuradio-core-dev (= ${binary:Version}), portaudio19-dev -Description: GNU Radio C++ block for PORTAUDIO sound system - This package contains the PORTAUDIO sound system driver for GNU Radio. - . - This package contains header files needed by developers. - -Package: libgnuradio-cvsd-vocoder0 -Section: libs -Architecture: any -Depends: libgnuradio-core0 (= ${binary:Version}), ${shlibs:Depends} -Description: GNU Radio C++ block implementing the CVSD vocoder - This package provides an implementation of a CVSD vocoder for - GNU Radio. - -Package: libgnuradio-cvsd-vocoder-dev -Section: libdevel -Architecture: any -Depends: libgnuradio-cvsd-vocoder0 (= ${binary:Version}), libgnuradio-core-dev (= ${binary:Version}) -Description: GNU Radio C++ block implement the CVSD vocoder - This package provides an implementation of a CVSD vocoder for - GNU Radio. - . - This package contains header files needed by developers. - -Package: libgnuradio-gsm-fr-vocoder0 -Section: libs -Architecture: any -Depends: libgnuradio-core0 (= ${binary:Version}), ${shlibs:Depends} -Description: GNU Radio C++ block implementing the GSM full rate vocoder - This package provides an implementation of a GSM-FR vocoder for - GNU Radio. - -Package: libgnuradio-gsm-fr-vocoder-dev -Section: libdevel -Architecture: any -Depends: libgnuradio-gsm-fr-vocoder0 (= ${binary:Version}), libgnuradio-core-dev (= ${binary:Version}) -Description: GNU Radio C++ block implementing the GSM full rate vocoder - This package provides an implementation of a GSM-FR vocoder for - GNU Radio. - . - This package contains header files needed by developers. - -Package: libgnuradio-pager0 -Section: libs -Architecture: any -Depends: libgnuradio-core0 (= ${binary:Version}), ${shlibs:Depends} -Description: GNU Radio C++ block implementing the FLEX one-way pager protocol - This package provides an implementation of the FLEX one-way pager protocol - for GNU Radio. - -Package: libgnuradio-pager-dev -Section: libdevel -Architecture: any -Depends: libgnuradio-pager0 (= ${binary:Version}), libgnuradio-core-dev (= ${binary:Version}) -Description: GNU Radio C++ block implementing the FLEX one-way pager protocol - This package provides an implementation of the FLEX one-way pager protocol - for GNU Radio. - . - This package contains header files needed by developers. - -Package: libgnuradio-qtgui0 -Section: libs -Architecture: any -Depends: libgnuradio-core0 (= ${binary:Version}), ${shlibs:Depends} -Description: GNU Radio C++ blocks fro QT-based GUI applications - This package contains the C++ library for using GNU Radio inside - QT-based GUI applications. - -Package: libgnuradio-qtgui-dev -Section: libdevel -Architecture: any -Depends: libgnuradio-qtgui0 (= ${binary:Version}), libgnuradio-core-dev (= ${binary:Version}), libqt4-dev, libqwtplot3d-qt4-dev -Description: GNU Radio C++ blocks fro QT-based GUI applications - This package contains the C++ library for using GNU Radio inside - QT-based GUI applications. - . - This package contains header files needed by developers. - -Package: libgnuradio-trellis0 -Section: libs -Architecture: any -Depends: libgnuradio-core0 (= ${binary:Version}), ${shlibs:Depends} -Description: GNU Radio C++ block implementing trellis-coded modulation - This package provides an implementation of tellis-coded modulation - for GNU Radio. - -Package: libgnuradio-trellis-dev -Section: libdevel -Architecture: any -Depends: libgnuradio-trellis0 (= ${binary:Version}), libgnuradio-core-dev (= ${binary:Version}) -Description: GNU Radio C++ block implementing trellis-coded modulation - This package provides an implementation of trellis-coded modulation - for GNU Radio. - . - This package contains header files needed by developers. - -Package: libgnuradio-video-sdl0 -Section: libs -Architecture: any -Depends: libgnuradio-core0 (= ${binary:Version}), ${shlibs:Depends} -Description: GNU Radio C++ block implementing video-sdl-coded modulation - This package provides an interface to the SDL rendering library - for GNU Radio. - -Package: libgnuradio-video-sdl-dev -Section: libdevel -Architecture: any -Depends: libgnuradio-video-sdl0 (= ${binary:Version}), libgnuradio-core-dev (= ${binary:Version}) -Description: GNU Radio C++ block implementing video-sdl-coded modulation - This package provides an interface to the SDL rendering library - for GNU Radio. - . - This package contains header files needed by developers. - -Package: libgnuradio-usrp0 -Section: libs -Architecture: any -Depends: libgnuradio-core0 (= ${binary:Version}), libusrp0 (= ${binary:Version}), ${shlibs:Depends} -Description: GNU Radio C++ blocks for USRP(1) hardware - This package contains the C++ API blocks for the Universal Software Radio - Peripheral. - -Package: libgnuradio-usrp-dev -Section: libdevel -Architecture: any -Depends: libgnuradio-usrp0 (= ${binary:Version}), libgnuradio-core-dev (= ${binary:Version}), libusrp-dev (= ${binary:Version}) -Description: GNU Radio C++ blocks for USRP(1) hardware - This package contains the C++ API blocks for the Universal Software Radio - Peripheral. - . - This package contains header files needed by developers. - -Package: libgnuradio-usrp2-0 -Section: libs -Architecture: any -Depends: libgnuradio-core0 (= ${binary:Version}), libusrp2-0 (= ${binary:Version}), ${shlibs:Depends} -Description: GNU Radio C++ blocks for USRP2 hardware - This package contains the C++ API blocks for the Universal Software Radio - Peripheral 2. - -Package: libgnuradio-usrp2-dev -Section: libdevel -Architecture: any -Depends: libgnuradio-usrp2-0 (= ${binary:Version}), libgnuradio-core-dev (= ${binary:Version}), libusrp2-dev (= ${binary:Version}) -Description: GNU Radio C++ blocks for USRP2 hardware - This package contains the C++ API blocks for the Universal Software Radio - Peripheral 2. - . - This package contains header files needed by developers. - -################################################################################ -# Python libraries for USRP # -################################################################################ - -Package: python-usrp -Architecture: any -Depends: ${python:Depends}, libusrp0 (= ${binary:Version}), ${shlibs:Depends} -Provides: ${python:Provides} -Section: python -XB-Python-Version: ${python:Versions} -Description: Python bindings for the USRP library - This package provides auxiliary routines in Python for manipulating the USRP - hardware. - -################################################################################ -# Python libraries for GNU Radio components # -################################################################################ - -Package: python-gnuradio-core -Architecture: any -Depends: ${python:Depends}, ${shlibs:Depends}, python-numpy -Conflicts: python-gnuradio (< 3.2) -Provides: ${python:Provides} -Section: python -XB-Python-Version: ${python:Versions} -Description: Python bindings for GNU Radio core library - This package provides the modules that enable one to use gnuradio - from Python scripts. - -Package: python-gnuradio-wxgui -Architecture: any -Depends: ${python:Depends}, python-gnuradio-core (= ${binary:Version}), python-wxgtk2.8, python-opengl, python-numpy -Conflicts: python-wxgtk2.6 -Provides: ${python:Provides} -Section: python -XB-Python-Version: ${python:Versions} -Description: GNU Radio Graphical Interface Routines based on wxPython - This package provides high level GUI construction classes based - upon the wxPython bindings for wxWidgets. - -Package: python-gnuradio-usrp -Architecture: any -Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-core, python-usrp -Provides: ${python:Provides} -Section: python -XB-Python-Version: ${python:Versions} -Description: Python bindings for GNU Radio USRP driver - This package provides the Python interface to the GNU Radio USRP - driver and daughterboard drivers. - -Package: python-gnuradio-usrp2 -Architecture: any -Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-core -Provides: ${python:Provides} -Section: python -XB-Python-Version: ${python:Versions} -Description: Python bindings for GNU Radio USRP driver - This package provides the Python interface to the GNU Radio USRP - driver and daughterboard drivers. - -Package: python-gnuradio-audio-alsa -Architecture: any -Depends: ${python:Depends}, ${shlibs:Depends}, libgnuradio-audio-alsa0 (= ${binary:Version}), python-gnuradio-core -Section: python -Provides: ${python:Provides}, python-gnuradio-audio -XB-Python-Version: ${python:Versions} -Description: Python bindings for GNU Radio ALSA audio driver - This package provides the Python wrappers around the GNU Radio ALSA - audio driver. - -Package: python-gnuradio-audio-portaudio -Architecture: any -Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-core -Provides: ${python:Provides}, python-gnuradio-audio -Section: python -XB-Python-Version: ${python:Versions} -Description: GNU Radio Python PortAudio Driver - This package provides the Python interface to the GNU Radio driver - for the PortAudio audio system. - -Package: python-gnuradio-audio-jack -Architecture: any -Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-core -Section: python -Provides: ${python:Provides}, python-gnuradio-audio -XB-Python-Version: ${python:Versions} -Description: GNU Radio Python JACK Audio Driver - This package provides the Python interface to the GNU Radio driver - for the JACK audio system. - -Package: python-gnuradio-audio-oss -Architecture: any -Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-core -Section: python -Provides: ${python:Provides}, python-gnuradio-audio -XB-Python-Version: ${python:Versions} -Description: GNU Radio Python OSS Audio Driver - This package provides the Python interface to the GNU Radio driver - for the OSS audio system. - -Package: python-gnuradio-cvsd-vocoder -Architecture: any -Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-core -Provides: ${python:Provides} -Section: python -XB-Python-Version: ${python:Versions} -Description: GNU Radio CVSD Vocoder - This package provides an implementation of a CVSD vocoder for - GNU Radio. - -Package: python-gnuradio-gsm-fr-vocoder -Architecture: any -Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-core -Provides: ${python:Provides} -Section: python -XB-Python-Version: ${python:Versions} -Description: GNU Radio GSM Full-Rate Vocoder - This package provides an implementation of a full-rate GSM vocoder - for GNU Radio. - -Package: python-gnuradio-qtgui -Architecture: any -Depends: ${python:Depends}, ${shlibs:Depends}, libgnuradio-qtgui0 (= ${binary:Version}), python-gnuradio-core -Section: python -Provides: ${python:Provides} -XB-Python-Version: ${python:Versions} -Description: Python bindings for GNU Radio ALSA audio driver - This package provides the Python wrappers around the GNU Radio QT - GUI C++ blocks. - -Package: python-gnuradio-trellis -Architecture: any -Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-core -Provides: ${python:Provides} -Section: python -XB-Python-Version: ${python:Versions} -Description: GNU Radio Trellis-Coded Modulation library - This package provides an implementation of trellis-coded modulation - for GNU Radio. - -Package: python-gnuradio-video-sdl -Architecture: any -Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-core -Provides: ${python:Provides} -Section: python -XB-Python-Version: ${python:Versions} -Description: GNU Radio SDL Interface Library - This package provides an interface to the SDL rendering library - for GNU Radio. - -################################################################################ -# GNU Radio Utilities, Examples, and Applications # -################################################################################ - -Package: gnuradio-utils -Architecture: any -Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-usrp, python-gnuradio-usrp2, python-gnuradio-wxgui, python-matplotlib, python-tk, python-scipy -Provides: ${python:Provides} -Section: comm -XB-Python-Version: ${python:Versions} -Description: GNU Radio Utilities - This package provides commonly used utilities for GNU Radio - -Package: gnuradio-pager -Architecture: any -Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-usrp -Provides: ${python:Provides} -Section: comm -XB-Python-Version: ${python:Versions} -Description: GNU Radio FLEX Pager Decoder - This package provides a decoder for the FLEX paging protocol for GNU Radio - -Package: gnuradio-sounder -Architecture: any -Replaces: gnuradio-sounder-firmware -Conflicts: gnuradio-sounder-firmware -Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-usrp -Provides: ${python:Provides} -Section: comm -XB-Python-Version: ${python:Versions} -Description: GNU Radio Channel Sounder Application - This package provides an RF channel sounder application for GNU Radio - -Package: gnuradio-gpio -Architecture: any -Replaces: gnuradio-gpio-firmware -Conflicts: gnuradio-gpio-firmware -Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-usrp -Provides: ${python:Provides} -Section: comm -XB-Python-Version: ${python:Versions} -Description: GNU Radio Streaming Digital Application - This package provides streaming digital GPIO capabilities for GNU Radio - -Package: gnuradio-radar-mono -Architecture: any -Replaces: gnuradio-radar-mono-firmware -Conflicts: gnuradio-radar-mono-firmware -Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-usrp -Provides: ${python:Provides} -Section: comm -XB-Python-Version: ${python:Versions} -Description: GNU Radio Monostatic Radar Application - This package provides a monostatic radar application for GNU Radio - -Package: gnuradio-radio-astronomy -Architecture: any -Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-usrp, python-gnuradio-wxgui -Provides: ${python:Provides} -Section: comm -XB-Python-Version: ${python:Versions} -Description: GNU Radio Radio Astronomy Applications - This package provides radio astronomy applications for GNU Radio - -Package: gnuradio-companion -Architecture: any -Depends: ${python:Depends}, gnuradio, gnuradio-doc, usrp-doc, python-lxml, python-cheetah, python-gtk2 -Provides: ${python:Provides} -Section: comm -XB-Python-Version: ${python:Versions} -Description: The GNU Radio Companion - GRC is a graphical flowgraph editor for the GNU Software Radio - -Package: gnuradio-examples -Architecture: any -Depends: ${python:Depends}, python-gnuradio-core, gnuradio-companion -Provides: ${python:Provides} -Recommends: python-gnuradio-wxgui, python-gnuradio -Section: comm -XB-Python-Version: ${python:Versions} -Description: GNU Radio Example Programs - This package provides examples of GNU Radio usage using Python. - -################################################################################ -# Documentation packages # -################################################################################ - -Package: gnuradio-doc -Section: doc -Architecture: all -Description: Software Defined Radio - This package contains the documentation for the GNU Radio software - defined radio system. - -Package: usrp-doc -Section: doc -Architecture: all -Description: Software Defined Radio - This package contains the documentation for the Universal Software Radio - Peripheral (USRP) hardware and interface library. - -################################################################################ -# Meta-packages # -################################################################################ - -Package: libgnuradio -Section: libs -Architecture: all -Depends: libgnuradio-core0 -Recommends: libgnuradio-audio-alsa0, libgnuradio-cvsd-vocoder0, libgnuradio-gsm-fr-vocoder0, libgnuradio-pager0, libgnuradio-qtqui0, libgnuradio-trellis0, libgnuradio-usrp0, libgnuradio-usrp20, libgnuradio-video-sdl0 -Description: GNU Radio C++ API libraries - This is a virtual package that depends, recommends, or suggests all of the - binary packages that make up the GNU Radio C++ API. For development headers, - install libgnuradio-dev. - -Package: libgnuradio-dev -Section: libdevel -Architecture: all -Depends: libgnuradio0 (= ${binary:Version}), libgnuradio-core-dev -Recommends: libgnuradio-audio-alsa-dev, libgnuradio-cvsd-vocoder-dev, libgnuradio-gsm-fr-vocoder-dev, libgnuradio-pager-dev, libgnuradio-qtgui-dev, libgnuradio-trellis-dev, libgnuradio-usrp-dev, libgnuradio-usrp2-dev, libgnuradio-video-sdl-dev -Suggests: gnuradio-doc, usrp-doc -Replaces: gnuradio-dev -Description: Development headers for GNU Radio C++ development - This is a virtual package that depends or recommends the development header - packages for the GNU Radio C++ API. It is only needed if you intend - to develop custom GNU Radio signal processing blocks in C++. - -Package: python-gnuradio -Section: python -Architecture: all -Depends: python-gnuradio-core -Recommends: python-gnuradio-wxgui, python-gnuradio-audio-alsa | python-gnuradio-audio, python-gnuradio-cvsd-vocoder, python-gnuradio-gsm-fr-vocoder, python-gnuradio-qtgui, python-gnuradio-trellis, python-gnuradio-video-sdl, python-gnuradio-usrp, python-gnuradio-usrp2 -Provides: ${python:Provides} -XB-Python-Version: ${python:Versions} -Description: Python Libraries for GNU Radio Components - This is a virtual package that depends or recommends all of the packages that - make up the GNU Radio Python API. - -Package: gnuradio-apps -Section: comm -Architecture: all -Depends: gnuradio-gpio, gnuradio-pager, gnuradio-sounder, gnuradio-radio-astronomy, gnuradio-radar-mono -Description: The GNU Software Radio Toolkit - applications - This is a virtual package that depends on top-level GNU Radio application - packages. - -Package: gnuradio -Section: comm -Architecture: all -Recommends: libgnuradio, libgnuradio-dev, gnuradio-doc, python-gnuradio, gnuradio-utils, gnuradio-examples, gnuradio-apps -Description: The GNU Software Radio Toolkit - This is a virtual package that installs the entire GNU Radio and USRP software - set. diff --git a/debian/copyright b/debian/copyright deleted file mode 100644 index 05b60abae..000000000 --- a/debian/copyright +++ /dev/null @@ -1,171 +0,0 @@ -GNU Radio was re-packaged by Bdale Garbee <bdale@gag.com> 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 <eb@comsec.com> - Matt Ettus <matt@ettus.com> - Johnathan Corgan <jcorgan@corganenterprises.com> - -See the AUTHORS file for a more complete list of contributors. -The current upstream maintainer is Johnathan Corgan. - -Copyright: - -GNU Radio is copyrighted by the Free Software Foundation and is licensed -under the GNU General Public License (GPL), version 3 or later, a copy of -which is available on a Debian system at: - - /usr/share/common-licenses/GPL - -The GNU Radio source distribution also incorporates a few components that -carry other copyrights and license assertions, as follows: - -gcell/ibm/sync/ppu_source/* -gcell/ibm/sync/spu_source/* - (C)Copyright 2001,2007, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - All Rights Reserved. - - 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 name of IBM Corporation nor the names of its - 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 - DISCLAIMED. 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 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. - - The gcell subsystem is not included in Debian binary package builds. - -gnuradio-core/src/lib/g72x/* - 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. - -gnuradio-core/src/lib/general/malloc16.c - Copyright 2001 Phil Karn, KA9Q - May be used under the terms of the GNU Public License (GPL) - -gnuradio-core/src/lib/reed-solomon/* - Copyright 2002, Phil Karn, KA9Q - May be used under the terms of the GNU Public License (GPL) - -*.{qpf,qsf} - Copyright (C) 1991-2004 Altera Corporation - Any megafunction design, and related netlist (encrypted or decrypted), - support information, device programming or simulation file, and any - other associated documentation or information provided by Altera or - a partner under Altera's Megafunction Partnership Program may be used - only to program PLD devices (but not masked PLD devices) from Altera. - Any other use of such megafunction design, netlist, support - information, device programming or simulation file, or any other - related documentation or information is prohibited for any other - purpose, including, but not limited to modification, reverse - engineering, de-compiling, or use with any other silicon devices, - unless such use is explicitly licensed under a separate agreement with - Altera or a megafunction partner. Title to the intellectual property, - including patents, copyrights, trademarks, trade secrets, or maskworks, - embodied in any such megafunction design, netlist, support information, - device programming or simulation file, or any other related - documentation or information provided by Altera or a megafunction - partner, remains with Altera, the megafunction partner, or their - respective licensors. No other licenses, including any licenses needed - under any third party's intellectual property, are provided herein. - - Thesea are configuration files generated by Altera proprietary tools - used in the creation of an open hardware design often used with GNU - Radio, and for which GNU Radio includes device drivers. These files - are not used in the Debian package build process. - -gr-gsm-fr-vocoders/src/lib/gsm/* - Copyright 1992, 1993, 1994 by Jutta Degener and Carsten Bormann, - Technische Universitaet Berlin - - Permission to use, copy, modify, and distribute this software - for any purpose with or without fee is hereby granted, - 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. - -gruel/src/include/gruel/thread_group.h - Copyright (C) 2001-2003 William E. Kempf - Copyright (C) 2007 Anthony Williams - Copyright 2008 Free Software Foundation, Inc. - - 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. - -gnuradio-core/src/lib/general/gr_remez.cc - Copyright (c) 1995,1998 Jake Janovetz (janovetz@uiuc.edu) - Copyright (c) 2004 Free Software Foundation, Inc. - - The original was distributed under LGPL version 2 or later, this - derivative work is now covered by the overall license assertion - for GNU Radio. - -gr-gpio/src/fpga/include/common_config*.vh - Copyright (C) 2006,2007 Matt Ettus - Copyright (C) 2008 Corgan Enterprises LLC - - The original was distributed under GPL version 2 or later, this - derivative work is now covered by the overall license assertion - for GNU Radio. - -gr-wxgui/src/python/plot.py - (C) 2002, 2007 Gordon Williams - - The original was licensed "Use as you wish", this derivative work - is now covered by the overall license assertion for GNU Radio. - -gr-wxgui/src/python/plotter/gltext.py - Copyright (C) 2007 Christian Brugger, Stefan Hacker - - The original was distributed under GPL version 2 or later, this - derivative work is now covered by the overall license assertion - for GNU Radio. - -Various files in the omnithread library carry these copyrights: - Copyright (C) 2006 Free Software Foundation, Inc. - Copyright (C) 1994,1995,1996,1997 Olivetti & Oracle Research Laboratory - Copyright Wavetek Wandel & Goltermann, Plymouth. - Copyright (C) 1994,1995,1996, 1997 Immisch, becker & Partner - Copyright (C) 1998 Steven Brennes - Copyright (C) 1995-1999 AT&T Laboratories Cambridge - - The original omnithread library was distributed under LGPL version 2 - or later, this derivative work is now covered by the overall license - assertion for GNU Radio. - diff --git a/debian/custom/grc.conf b/debian/custom/grc.conf deleted file mode 100644 index eb503ec95..000000000 --- a/debian/custom/grc.conf +++ /dev/null @@ -1,9 +0,0 @@ -# This file contains system wide configuration data for GNU Radio. -# You may override any setting on a per-user basis by editing -# ~/.gnuradio/config.conf - -[grc] -pythonw = python -doc_dir = /usr/share/doc/gnuradio-doc -global_blocks_path = /usr/share/gnuradio/grc/blocks -local_blocks_path = /usr/local/share/gnuradio/grc/blocks diff --git a/debian/custom/libusrp0.udev b/debian/custom/libusrp0.udev deleted file mode 100644 index e45dc294a..000000000 --- a/debian/custom/libusrp0.udev +++ /dev/null @@ -1 +0,0 @@ -ACTION=="add", BUS=="usb", SYSFS{idVendor}=="fffe", SYSFS{idProduct}=="0002", GROUP:="usrp", MODE:="0660" diff --git a/debian/custom/libusrp2-0.limits b/debian/custom/libusrp2-0.limits deleted file mode 100644 index f259b2992..000000000 --- a/debian/custom/libusrp2-0.limits +++ /dev/null @@ -1 +0,0 @@ -@usrp - rtprio 50 diff --git a/debian/gnuradio-doc.install b/debian/gnuradio-doc.install deleted file mode 100644 index f7d331cb7..000000000 --- a/debian/gnuradio-doc.install +++ /dev/null @@ -1,3 +0,0 @@ -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/debian/libgnuradio-core-dev.dirs b/debian/libgnuradio-core-dev.dirs deleted file mode 100644 index 5c5a15f97..000000000 --- a/debian/libgnuradio-core-dev.dirs +++ /dev/null @@ -1,3 +0,0 @@ -usr/lib/pkgconfig -usr/include/gnuradio -usr/include/gnuradio/swig diff --git a/debian/libgnuradio-core0.dirs b/debian/libgnuradio-core0.dirs deleted file mode 100644 index 3462501c0..000000000 --- a/debian/libgnuradio-core0.dirs +++ /dev/null @@ -1 +0,0 @@ -etc/gnuradio/conf.d diff --git a/debian/libgnuradio-core0.install b/debian/libgnuradio-core0.install deleted file mode 100644 index 9feb625d8..000000000 --- a/debian/libgnuradio-core0.install +++ /dev/null @@ -1,4 +0,0 @@ -etc/gnuradio/conf.d/gnuradio-core.conf -usr/lib/libgnuradio-core.la -usr/lib/libgnuradio-core.so.* -usr/bin/gnuradio-config-info diff --git a/debian/libgromnithread-dev.dirs b/debian/libgromnithread-dev.dirs deleted file mode 100644 index 79e3d4273..000000000 --- a/debian/libgromnithread-dev.dirs +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/pkgconfig -usr/include/gnuradio diff --git a/debian/libgromnithread-dev.install b/debian/libgromnithread-dev.install deleted file mode 100644 index 3ebc34158..000000000 --- a/debian/libgromnithread-dev.install +++ /dev/null @@ -1,5 +0,0 @@ -usr/include/gnuradio/omni_time.h -usr/include/gnuradio/omnithread.h -usr/include/gnuradio/ot_posix.h -usr/lib/pkgconfig/gnuradio-omnithread.pc -usr/lib/libgromnithread.so diff --git a/debian/libgromnithread0.install b/debian/libgromnithread0.install deleted file mode 100644 index 8910fb392..000000000 --- a/debian/libgromnithread0.install +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/libgromnithread.la -usr/lib/libgromnithread.so.* diff --git a/debian/libgruel-dev.dirs b/debian/libgruel-dev.dirs deleted file mode 100644 index bd76adacc..000000000 --- a/debian/libgruel-dev.dirs +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/pkgconfig -usr/include/gruel diff --git a/debian/libgruel-dev.install b/debian/libgruel-dev.install deleted file mode 100644 index c5cb6b681..000000000 --- a/debian/libgruel-dev.install +++ /dev/null @@ -1,3 +0,0 @@ -usr/include/gruel/* -usr/lib/libgruel.so -usr/lib/pkgconfig/gruel.pc diff --git a/debian/libgruel0.install b/debian/libgruel0.install deleted file mode 100644 index 54d2b998c..000000000 --- a/debian/libgruel0.install +++ /dev/null @@ -1,4 +0,0 @@ -usr/lib/libgruel.la -usr/lib/libgruel.so.* - - diff --git a/debian/libmblock-dev.install b/debian/libmblock-dev.install deleted file mode 100644 index 6f81d8eb3..000000000 --- a/debian/libmblock-dev.install +++ /dev/null @@ -1,3 +0,0 @@ -usr/include/mblock/* -usr/lib/libmblock.so -usr/lib/pkgconfig/mblock.pc diff --git a/debian/libmblock0.install b/debian/libmblock0.install deleted file mode 100644 index cc789522d..000000000 --- a/debian/libmblock0.install +++ /dev/null @@ -1,3 +0,0 @@ -usr/lib/libmblock.la -usr/lib/libmblock.so.* - diff --git a/debian/libusrp0.dirs b/debian/libusrp0.dirs deleted file mode 100644 index cb9eb4204..000000000 --- a/debian/libusrp0.dirs +++ /dev/null @@ -1,3 +0,0 @@ -etc/udev/rules.d -/usr/share/usrp/rev2 -/usr/share/usrp/rev4 diff --git a/debian/libusrp0.install b/debian/libusrp0.install deleted file mode 100644 index 1cabb1ff4..000000000 --- a/debian/libusrp0.install +++ /dev/null @@ -1,11 +0,0 @@ -usr/lib/libusrp.la -usr/lib/libusrp.so.* -etc/udev/rules.d/40-usrp.rules -usr/share/usrp/rev2/multi_2rxhb_2tx.rbf -usr/share/usrp/rev2/std.ihx -usr/share/usrp/rev2/std_2rxhb_2tx.rbf -usr/share/usrp/rev2/std_4rx_0tx.rbf -usr/share/usrp/rev4/multi_2rxhb_2tx.rbf -usr/share/usrp/rev4/std.ihx -usr/share/usrp/rev4/std_2rxhb_2tx.rbf -usr/share/usrp/rev4/std_4rx_0tx.rbf diff --git a/debian/libusrp0.postinst b/debian/libusrp0.postinst deleted file mode 100644 index 562b9232e..000000000 --- a/debian/libusrp0.postinst +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh - -set -e - -if [ "$1" != "configure" ]; then - exit 0 -fi - -# Create usrp group for udev access -if ! getent group usrp >/dev/null; then - addgroup --system usrp -fi - -#DEBHELPER# - -exit 0 diff --git a/debian/libusrp2-0.dirs b/debian/libusrp2-0.dirs deleted file mode 100644 index 6c09e0d5c..000000000 --- a/debian/libusrp2-0.dirs +++ /dev/null @@ -1,2 +0,0 @@ -etc/security/limits.d - diff --git a/debian/libusrp2-0.install b/debian/libusrp2-0.install deleted file mode 100644 index 1c5963ab7..000000000 --- a/debian/libusrp2-0.install +++ /dev/null @@ -1,5 +0,0 @@ -usr/lib/libusrp2.la -usr/lib/libusrp2.so.* -usr/bin/usrp2_socket_opener -usr/bin/find_usrps -etc/security/limits.d/libusrp2-0.limits diff --git a/debian/libusrp2-0.postinst b/debian/libusrp2-0.postinst deleted file mode 100644 index 8da31a3cd..000000000 --- a/debian/libusrp2-0.postinst +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/sh - -set -e - -if [ "$1" != "configure" ]; then - exit 0 -fi - -# Create usrp group for access -if ! getent group usrp >/dev/null; then - addgroup --system usrp -fi - -# Create setuid root for group usrp on socket opener -chown root:usrp /usr/bin/usrp2_socket_opener -chmod 04750 /usr/bin/usrp2_socket_opener - -#DEBHELPER# - -exit 0 diff --git a/debian/pycompat b/debian/pycompat deleted file mode 100644 index 0cfbf0888..000000000 --- a/debian/pycompat +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/debian/pyversions b/debian/pyversions deleted file mode 100644 index c20c8ac5c..000000000 --- a/debian/pyversions +++ /dev/null @@ -1 +0,0 @@ -2.6
\ No newline at end of file diff --git a/debian/rules b/debian/rules deleted file mode 100755 index f0dcd538d..000000000 --- a/debian/rules +++ /dev/null @@ -1,131 +0,0 @@ -#!/usr/bin/make -f - -# Uncomment this to turn on verbose mode. -export DH_VERBOSE=1 - -# This has to be exported to make some magic below work. -export DH_OPTIONS - -export DH_PYCENTRAL=nomove - -DEB_BUILD_GNU_TYPE = $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) - -clean: - dh_testdir - dh_testroot - rm -f build-stamp configure-stamp extract-stamp install-stamp - - if [ -f Makefile ]; \ - then\ - if [ -d .svn ]; \ - then \ - $(MAKE) maintainer-clean; \ - else \ - $(MAKE) distclean; \ - fi; \ - fi - - dh_clean - -update: - dh_testdir - -test -r /usr/share/misc/config.sub && \ - cp -f /usr/share/misc/config.sub config.sub - -test -r /usr/share/misc/config.guess && \ - cp -f /usr/share/misc/config.guess config.guess - -configure: configure-stamp -configure-stamp: - dh_testdir - [ -f ./configure ] || ./bootstrap - ./configure \ - --build=$(DEB_BUILD_GNU_TYPE) \ - --prefix=/usr \ - --mandir=\$${prefix}/share/man \ - --infodir=\$${prefix}/share/info \ - --enable-shared \ - --sysconfdir=/etc \ - --enable-all-components \ - --disable-gr-audio-osx \ - --disable-gr-audio-windows \ - --disable-gcell --disable-gr-gcell \ - --disable-gr-comedi --disable-usrp2-firmware - touch configure-stamp - -build: build-stamp -build-stamp: configure-stamp - - $(MAKE) - $(MAKE) check - touch $@ - -extract: extract-stamp -extract-stamp: build-stamp debian/bin/gen-install-files.sh - dh_testdir - chmod +x debian/bin/gen-install-files.sh debian/bin/extract-install-filenames - debian/bin/gen-install-files.sh - touch $@ - -install: install-stamp -install-stamp: extract-stamp debian/control - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp - : # make python scripts starting with '#!' executable - for i in `find debian -mindepth 2 -type f ! -perm 755`; do \ - if head -1 $$i | grep -q '^#!'; then \ - chmod 755 $$i; \ - echo "made executable: $$i"; \ - fi; \ - done - - : # Deposit rule to allow group 'usrp' access to USRP hardware - install -m 0644 -D debian/custom/libusrp0.udev \ - debian/tmp/etc/udev/rules.d/40-usrp.rules - - : # Deposit rule to allow group 'usrp' access to USRP2 hardware - install -m 0644 -D debian/custom/libusrp2-0.limits \ - debian/tmp/etc/security/limits.d/libusrp2-0.limits - - : # Install custom grc.conf - install -m 0644 -D debian/custom/grc.conf \ - debian/tmp/etc/gnuradio/conf.d/grc.conf - - dh_install --sourcedir=debian/tmp - touch $@ - - - -# Must not depend on anything. This is to be called by -# binary-arch/binary-indep -# in another 'make' thread. -binary-common: - dh_testdir - dh_testroot - dh_installchangelogs ChangeLog - dh_installdocs - dh_pycentral - dh_link - dh_strip - dh_compress - dh_fixperms - dh_makeshlibs - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -# Build architecture independant packages using the common target. -binary-indep: build install - $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common - -# Build architecture dependant packages using the common target. -binary-arch: build install - $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common - -binary: binary-arch binary-indep -.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/debian/usrp-doc.install b/debian/usrp-doc.install deleted file mode 100644 index b9bdb7788..000000000 --- a/debian/usrp-doc.install +++ /dev/null @@ -1,2 +0,0 @@ -usr/share/doc/usrp*/html usr/share/doc/usrp-doc -usr/share/doc/usrp*/README /usr/share/doc/usrp-doc diff --git a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc index 8971d3d39..d00ba6739 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc +++ b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc @@ -64,6 +64,8 @@ gr_pfb_arb_resampler_ccf::gr_pfb_arb_resampler_ccf (float rate, // Store the last filter between calls to work d_last_filter = 0; + + d_start_index = 0; d_filters = std::vector<gr_fir_ccf*>(d_int_rate); @@ -148,7 +150,7 @@ gr_pfb_arb_resampler_ccf::general_work (int noutput_items, return 0; // history requirements may have changed. } - int i = 0, j, count = 0; + int i = 0, j, count = d_start_index; gr_complex o0, o1; // Restore the last filter position @@ -184,14 +186,17 @@ gr_pfb_arb_resampler_ccf::general_work (int noutput_items, d_acc = fmodf(d_acc, 1.0); } if(i < noutput_items) { // keep state for next entry - count++; // we have fully consumed another input + float ss = (int)(j / d_int_rate); // number of items to skip ahead by + count += ss; // we have fully consumed another input j = j % d_int_rate; // roll filter around } } - // Store the current filter position + // Store the current filter position and start of next sample d_last_filter = j; + d_start_index = std::max(0, count - ninput_items[0]); - consume_each(count); + // consume all we've processed but no more than we can + consume_each(std::min(count, ninput_items[0])); return i; } diff --git a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.h b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.h index d4c886ec3..bc5b91a5e 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.h +++ b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.h @@ -118,6 +118,7 @@ class gr_pfb_arb_resampler_ccf : public gr_block float d_flt_rate; // residual rate for the linear interpolation float d_acc; unsigned int d_last_filter; + int d_start_index; unsigned int d_taps_per_filter; bool d_updated; diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/stream_to_vector_decimator.py b/gnuradio-core/src/python/gnuradio/blks2impl/stream_to_vector_decimator.py index 39c8b5050..8f75729c9 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/stream_to_vector_decimator.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/stream_to_vector_decimator.py @@ -72,8 +72,7 @@ class stream_to_vector_decimator(gr.hier_block2): self.one_in_n.set_n(self._decim) def _update_decimator(self): - self._decim = max(1, int(round(self._sample_rate/self._vec_len/self._vec_rate))) - self.one_in_n.set_n(self._decim) + self.set_decimation(self._sample_rate/self._vec_len/self._vec_rate) def decimation(self): """ diff --git a/gr-audio-osx/src/audio_osx.h b/gr-audio-osx/src/audio_osx.h index c92fbcb0d..79e79e36c 100644 --- a/gr-audio-osx/src/audio_osx.h +++ b/gr-audio-osx/src/audio_osx.h @@ -23,22 +23,33 @@ #ifndef INCLUDED_AUDIO_OSX_H #define INCLUDED_AUDIO_OSX_H -#define CheckErrorAndThrow(err,what,throw_str) \ -if (err) { \ - OSStatus error = static_cast<OSStatus>(err); \ - fprintf (stderr, "%s\n Error# %ld ('%4s')\n %s:%d\n", \ - what, error, (char*)(&err), __FILE__, __LINE__); \ - fflush (stdout); \ - throw std::runtime_error (throw_str); \ -} +#include <iostream> +#include <string.h> -#define CheckError(err,what) \ -if (err) { \ - OSStatus error = static_cast<OSStatus>(err); \ - fprintf (stderr, "%s\n Error# %ld ('%4s')\n %s:%d\n", \ - what, error, (char*)(&err), __FILE__, __LINE__); \ - fflush (stdout); \ -} +#define CheckErrorAndThrow(err,what,throw_str) \ + if (err) { \ + OSStatus error = static_cast<OSStatus>(err); \ + char err_str[4]; \ + strncpy (err_str, (char*)(&err), 4); \ + std::cerr << what << std::endl; \ + std::cerr << " Error# " << error << " ('" << err_str \ + << "')" << std::endl; \ + std::cerr << " " << __FILE__ << ":" << __LINE__ << std::endl; \ + fflush (stderr); \ + throw std::runtime_error (throw_str); \ + } + +#define CheckError(err,what) \ + if (err) { \ + OSStatus error = static_cast<OSStatus>(err); \ + char err_str[4]; \ + strncpy (err_str, (char*)(&err), 4); \ + std::cerr << what << std::endl; \ + std::cerr << " Error# " << error << " ('" << err_str \ + << "')" << std::endl; \ + std::cerr << " " << __FILE__ << ":" << __LINE__ << std::endl; \ + fflush (stderr); \ + } #ifdef WORDS_BIGENDIAN #define GR_PCM_ENDIANNESS kLinearPCMFormatFlagIsBigEndian @@ -46,4 +57,15 @@ if (err) { \ #define GR_PCM_ENDIANNESS 0 #endif +// Check the version of MacOSX being used +#ifdef __APPLE_CC__ +#include <AvailabilityMacros.h> +#ifndef MAC_OS_X_VERSION_10_6 +#define MAC_OS_X_VERSION_10_6 1060 +#endif +#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6 +#define GR_USE_OLD_AUDIO_UNIT +#endif +#endif + #endif /* INCLUDED_AUDIO_OSX_H */ diff --git a/gr-audio-osx/src/audio_osx_sink.cc b/gr-audio-osx/src/audio_osx_sink.cc index fef21babd..e91716c0a 100644 --- a/gr-audio-osx/src/audio_osx_sink.cc +++ b/gr-audio-osx/src/audio_osx_sink.cc @@ -47,19 +47,19 @@ audio_osx_sink::audio_osx_sink (int sample_rate, d_OutputAU (0) { if (sample_rate <= 0) { - fprintf (stderr, "Invalid Sample Rate: %d\n", sample_rate); + std::cerr << "Invalid Sample Rate: " << sample_rate << std::endl; throw std::invalid_argument ("audio_osx_sink::audio_osx_sink"); } else d_sample_rate = (Float64) sample_rate; if (channel_config <= 0 & channel_config != -1) { - fprintf (stderr, "Invalid Channel Config: %d\n", channel_config); + std::cerr << "Invalid Channel Config: " << channel_config << std::endl; throw std::invalid_argument ("audio_osx_sink::audio_osx_sink"); } else if (channel_config == -1) { // no user input; try "device name" instead int l_n_channels = (int) strtol (device_name.data(), (char **)NULL, 10); if (l_n_channels == 0 & errno) { - fprintf (stderr, "Error Converting Device Name: %d\n", errno); + std::cerr << "Error Converting Device Name: " << errno << std::endl; throw std::invalid_argument ("audio_osx_sink::audio_osx_sink"); } if (l_n_channels <= 0) @@ -79,7 +79,7 @@ audio_osx_sink::audio_osx_sink (int sample_rate, if (max_sample_count == -1) max_sample_count = sample_rate; else if (max_sample_count <= 0) { - fprintf (stderr, "Invalid Max Sample Count: %d\n", max_sample_count); + std::cerr << "Invalid Max Sample Count: " << max_sample_count << std::endl; throw std::invalid_argument ("audio_osx_sink::audio_osx_sink"); } @@ -98,21 +98,39 @@ audio_osx_sink::audio_osx_sink (int sample_rate, OSStatus err = noErr; // Open the default output unit +#ifndef GR_USE_OLD_AUDIO_UNIT + AudioComponentDescription desc; +#else ComponentDescription desc; +#endif + desc.componentType = kAudioUnitType_Output; desc.componentSubType = kAudioUnitSubType_DefaultOutput; desc.componentManufacturer = kAudioUnitManufacturer_Apple; desc.componentFlags = 0; desc.componentFlagsMask = 0; +#ifndef GR_USE_OLD_AUDIO_UNIT + AudioComponent comp = AudioComponentFindNext(NULL, &desc); + if (comp == NULL) { + std::cerr << "AudioComponentFindNext Error" << std::endl; + throw std::runtime_error ("audio_osx_sink::audio_osx_sink"); + } +#else Component comp = FindNextComponent (NULL, &desc); if (comp == NULL) { - fprintf (stderr, "FindNextComponent Error\n"); + std::cerr << "FindNextComponent Error" << std::endl; throw std::runtime_error ("audio_osx_sink::audio_osx_sink"); } +#endif +#ifndef GR_USE_OLD_AUDIO_UNIT + err = AudioComponentInstanceNew (comp, &d_OutputAU); + CheckErrorAndThrow (err, "AudioComponentInstanceNew", "audio_osx_sink::audio_osx_sink"); +#else err = OpenAComponent (comp, &d_OutputAU); CheckErrorAndThrow (err, "OpenAComponent", "audio_osx_sink::audio_osx_sink"); +#endif // Set up a callback function to generate output to the output unit @@ -167,11 +185,10 @@ audio_osx_sink::audio_osx_sink (int sample_rate, "audio_osx_sink::audio_osx_sink"); #if _OSX_AU_DEBUG_ - fprintf (stderr, "audio_osx_sink Parameters:\n"); - fprintf (stderr, " Sample Rate is %g\n", d_sample_rate); - fprintf (stderr, " Number of Channels is %ld\n", d_n_channels); - fprintf (stderr, " Max # samples to store per channel is %ld", - d_max_sample_count); + std::cerr << "audio_osx_sink Parameters:" << std::endl; + std::cerr << " Sample Rate is " << d_sample_rate << std::endl; + std::cerr << " Number of Channels is " << d_n_channels << std::endl; + std::cerr << " Max # samples to store per channel is " << d_max_sample_count << std::endl; #endif } @@ -220,7 +237,11 @@ audio_osx_sink::~audio_osx_sink () // stop and close the AudioUnit stop (); AudioUnitUninitialize (d_OutputAU); +#ifndef GR_USE_OLD_AUDIO_UNIT + AudioComponentInstanceDispose (d_OutputAU); +#else CloseComponent (d_OutputAU); +#endif // empty and delete the queues for (UInt32 n = 0; n < d_n_channels; n++) { @@ -275,8 +296,8 @@ audio_osx_sink::work (int noutput_items, #endif #if _OSX_AU_DEBUG_ - fprintf (stderr, "work1: qSC = %ld, lMC = %ld, dmSC = %ld, nOI = %d\n", - d_queueSampleCount, l_max_count, d_max_sample_count, noutput_items); + std::cerr << "work1: qSC = " << d_queueSampleCount << ", lMC = "<< l_max_count + << ", dmSC = " << d_max_sample_count << ", nOI = " << noutput_items << std::endl; #endif if (d_queueSampleCount > l_max_count) { @@ -318,7 +339,7 @@ audio_osx_sink::work (int noutput_items, if (res == -1) { // data coming in too fast // drop oldest buffer - fputs ("oX", stderr); + fputs ("aO", stderr); fflush (stderr); // set the local number of samples available to the max d_queueSampleCount = d_buffers[0]->buffer_length_items (); @@ -328,8 +349,8 @@ audio_osx_sink::work (int noutput_items, } #if _OSX_AU_DEBUG_ - fprintf (stderr, "work2: #OI = %4d, #Cnt = %4ld, mSC = %ld\n", - noutput_items, d_queueSampleCount, d_max_sample_count); + std::cerr << "work2: #OI = " << noutput_items << ", #Cnt = " + << d_queueSampleCount << ", mSC = " << d_max_sample_count << std::endl; #endif // release control to allow for other processing parts to run @@ -352,8 +373,8 @@ OSStatus audio_osx_sink::AUOutputCallback This->d_internal->lock (); #if _OSX_AU_DEBUG_ - fprintf (stderr, "cb_in: SC = %4ld, in#F = %4ld\n", - This->d_queueSampleCount, inNumberFrames); + std::cerr << "cb_in: SC = " << This->d_queueSampleCount + << ", in#F = " << inNumberFrames << std::endl; #endif if (This->d_queueSampleCount < inNumberFrames) { @@ -364,7 +385,7 @@ OSStatus audio_osx_sink::AUOutputCallback int l_counter = This->d_n_channels; while (--l_counter >= 0) { - UInt32 t_n_output_items = inNumberFrames; + size_t t_n_output_items = inNumberFrames; float* outBuffer = (float*) ioData->mBuffers[l_counter].mData; This->d_buffers[l_counter]->dequeue (outBuffer, &t_n_output_items); if (t_n_output_items != inNumberFrames) { @@ -378,7 +399,7 @@ OSStatus audio_osx_sink::AUOutputCallback } #if _OSX_AU_DEBUG_ - fprintf (stderr, "cb_out: SC = %4ld\n", This->d_queueSampleCount); + std::cerr << "cb_out: SC = " << This->d_queueSampleCount << std::endl; #endif // signal that data is available diff --git a/gr-audio-osx/src/audio_osx_source.cc b/gr-audio-osx/src/audio_osx_source.cc index e82e8ad21..61838745b 100644 --- a/gr-audio-osx/src/audio_osx_source.cc +++ b/gr-audio-osx/src/audio_osx_source.cc @@ -37,18 +37,20 @@ void PrintStreamDesc (AudioStreamBasicDescription *inDesc) { if (inDesc == NULL) { - fprintf (stderr, "PrintStreamDesc: Can't print a NULL desc!\n"); + std::cerr << "PrintStreamDesc: Can't print a NULL desc!" << std::endl; return; } - fprintf (stderr, " Sample Rate : %g\n", inDesc->mSampleRate); - fprintf (stderr, " Format ID : %4s\n", (char*)&inDesc->mFormatID); - fprintf (stderr, " Format Flags : %lX\n", inDesc->mFormatFlags); - fprintf (stderr, " Bytes per Packet : %ld\n", inDesc->mBytesPerPacket); - fprintf (stderr, " Frames per Packet : %ld\n", inDesc->mFramesPerPacket); - fprintf (stderr, " Bytes per Frame : %ld\n", inDesc->mBytesPerFrame); - fprintf (stderr, " Channels per Frame : %ld\n", inDesc->mChannelsPerFrame); - fprintf (stderr, " Bits per Channel : %ld\n", inDesc->mBitsPerChannel); + std::cerr << " Sample Rate : " << inDesc->mSampleRate << std::endl; + char format_id[4]; + strncpy (format_id, (char*)(&inDesc->mFormatID), 4); + std::cerr << " Format ID : " << format_id << std::endl; + std::cerr << " Format Flags : " << inDesc->mFormatFlags << std::endl; + std::cerr << " Bytes per Packet : " << inDesc->mBytesPerPacket << std::endl; + std::cerr << " Frames per Packet : " << inDesc->mFramesPerPacket << std::endl; + std::cerr << " Bytes per Frame : " << inDesc->mBytesPerFrame << std::endl; + std::cerr << " Channels per Frame : " << inDesc->mChannelsPerFrame << std::endl; + std::cerr << " Bits per Channel : " << inDesc->mBitsPerChannel << std::endl; } // FIXME these should query some kind of user preference @@ -79,19 +81,19 @@ audio_osx_source::audio_osx_source (int sample_rate, d_AudioConverter (0) { if (sample_rate <= 0) { - fprintf (stderr, "Invalid Sample Rate: %d\n", sample_rate); + std::cerr << "Invalid Sample Rate: " << sample_rate << std::endl; throw std::invalid_argument ("audio_osx_source::audio_osx_source"); } else d_outputSampleRate = (Float64) sample_rate; if (channel_config <= 0 & channel_config != -1) { - fprintf (stderr, "Invalid Channel Config: %d\n", channel_config); + std::cerr << "Invalid Channel Config: " << channel_config << std::endl; throw std::invalid_argument ("audio_osx_source::audio_osx_source"); } else if (channel_config == -1) { // no user input; try "device name" instead int l_n_channels = (int) strtol (device_name.data(), (char **)NULL, 10); if (l_n_channels == 0 & errno) { - fprintf (stderr, "Error Converting Device Name: %d\n", errno); + std::cerr << "Error Converting Device Name: " << errno << std::endl; throw std::invalid_argument ("audio_osx_source::audio_osx_source"); } if (l_n_channels <= 0) @@ -107,14 +109,14 @@ audio_osx_source::audio_osx_source (int sample_rate, if (max_sample_count == -1) max_sample_count = sample_rate; else if (max_sample_count <= 0) { - fprintf (stderr, "Invalid Max Sample Count: %d\n", max_sample_count); + std::cerr << "Invalid Max Sample Count: " << max_sample_count << std::endl; throw std::invalid_argument ("audio_osx_source::audio_osx_source"); } d_max_sample_count = max_sample_count; #if _OSX_AU_DEBUG_ - fprintf (stderr, "source(): max # samples = %ld\n", d_max_sample_count); + std::cerr << "source(): max # samples = " << d_max_sample_count << std::endl; #endif OSStatus err = noErr; @@ -122,7 +124,12 @@ audio_osx_source::audio_osx_source (int sample_rate, // create the default AudioUnit for input // Open the default input unit +#ifndef GR_USE_OLD_AUDIO_UNIT + AudioComponentDescription InputDesc; +#else ComponentDescription InputDesc; +#endif + InputDesc.componentType = kAudioUnitType_Output; InputDesc.componentSubType = kAudioUnitSubType_HALOutput; @@ -130,15 +137,31 @@ audio_osx_source::audio_osx_source (int sample_rate, InputDesc.componentFlags = 0; InputDesc.componentFlagsMask = 0; +#ifndef GR_USE_OLD_AUDIO_UNIT + AudioComponent comp = AudioComponentFindNext (NULL, &InputDesc); +#else Component comp = FindNextComponent (NULL, &InputDesc); +#endif + if (comp == NULL) { - fprintf (stderr, "FindNextComponent Error\n"); +#ifndef GR_USE_OLD_AUDIO_UNIT + std::cerr << "AudioComponentFindNext Error" << std::endl; +#else + std::cerr << "FindNextComponent Error" << std::endl; +#endif throw std::runtime_error ("audio_osx_source::audio_osx_source"); } +#ifndef GR_USE_OLD_AUDIO_UNIT + err = AudioComponentInstanceNew (comp, &d_InputAU); + CheckErrorAndThrow (err, "AudioComponentInstanceNew", + "audio_osx_source::audio_osx_source"); +#else err = OpenAComponent (comp, &d_InputAU); CheckErrorAndThrow (err, "OpenAComponent", "audio_osx_source::audio_osx_source"); +#endif + UInt32 enableIO; @@ -208,7 +231,7 @@ audio_osx_source::audio_osx_source (int sample_rate, CheckErrorAndThrow (err, "AudioUnitGetProperty HasIO", "audio_osx_source::audio_osx_source"); if (hasInput == 0) { - fprintf (stderr, "Selected Audio Device does not support Input.\n"); + std::cerr << "Selected Audio Device does not support Input." << std::endl; throw std::runtime_error ("audio_osx_source::audio_osx_source"); } @@ -248,7 +271,7 @@ audio_osx_source::audio_osx_source (int sample_rate, "audio_osx_source::audio_osx_source"); #if _OSX_AU_DEBUG_ - fprintf (stderr, "\n---- Device Stream Format ----\n" ); + std::cerr << std::endl << "---- Device Stream Format ----" << std::endl; PrintStreamDesc (&asbd_device); #endif @@ -264,7 +287,7 @@ audio_osx_source::audio_osx_source (int sample_rate, "audio_osx_source::audio_osx_source"); #if _OSX_AU_DEBUG_ - fprintf (stderr, "\n---- Client Stream Format ----\n"); + std::cerr << std::endl << "---- Client Stream Format ----" << std::endl; PrintStreamDesc (&asbd_client); #endif @@ -436,22 +459,17 @@ audio_osx_source::audio_osx_source (int sample_rate, "audio_osx_source::audio_osx_source"); #if _OSX_AU_DEBUG_ - fprintf (stderr, "audio_osx_source Parameters:\n"); - fprintf (stderr, " Device Sample Rate is %g\n", d_deviceSampleRate); - fprintf (stderr, " User Sample Rate is %g\n", d_outputSampleRate); - fprintf (stderr, " Max Sample Count is %ld\n", d_max_sample_count); - fprintf (stderr, " # Device Channels is %ld\n", d_n_deviceChannels); - fprintf (stderr, " # Max Channels is %ld\n", d_n_max_channels); - fprintf (stderr, " Device Buffer Size is Frames = %ld\n", - d_deviceBufferSizeFrames); - fprintf (stderr, " Lead Size is Frames = %ld\n", - d_leadSizeFrames); - fprintf (stderr, " Trail Size is Frames = %ld\n", - d_trailSizeFrames); - fprintf (stderr, " Input Buffer Size is Frames = %ld\n", - d_inputBufferSizeFrames); - fprintf (stderr, " Output Buffer Size is Frames = %ld\n", - d_outputBufferSizeFrames); + std::cerr << "audio_osx_source Parameters:" << std::endl; + std::cerr << " Device Sample Rate is " << d_deviceSampleRate << std::endl; + std::cerr << " User Sample Rate is " << d_outputSampleRate << std::endl; + std::cerr << " Max Sample Count is " << d_max_sample_count << std::endl; + std::cerr << " # Device Channels is " << d_n_deviceChannels << std::endl; + std::cerr << " # Max Channels is " << d_n_max_channels << std::endl; + std::cerr << " Device Buffer Size is Frames = " << d_deviceBufferSizeFrames << std::endl; + std::cerr << " Lead Size is Frames = " << d_leadSizeFrames << std::endl; + std::cerr << " Trail Size is Frames = " << d_trailSizeFrames << std::endl; + std::cerr << " Input Buffer Size is Frames = " << d_inputBufferSizeFrames << std::endl; + std::cerr << " Output Buffer Size is Frames = " << d_outputBufferSizeFrames << std::endl; #endif } @@ -564,8 +582,13 @@ audio_osx_source::~audio_osx_source () err = AudioUnitUninitialize (d_InputAU); CheckError (err, "~audio_osx_source: AudioUnitUninitialize"); +#ifndef GR_USE_OLD_AUDIO_UNIT + err = AudioComponentInstanceDispose (d_InputAU); + CheckError (err, "~audio_osx_source: AudioComponentInstanceDispose"); +#else err = CloseComponent (d_InputAU); CheckError (err, "~audio_osx_source: CloseComponent"); +#endif // empty and delete the queues for (UInt32 n = 0; n < d_n_max_channels; n++) { @@ -598,18 +621,18 @@ audio_osx_source::check_topology (int ninputs, int noutputs) { // check # inputs to make sure it's valid if (ninputs != 0) { - fprintf (stderr, "audio_osx_source::check_topology(): " - "number of input streams provided (%d) should be 0.\n", - ninputs); + std::cerr << "audio_osx_source::check_topology(): number of input " + << "streams provided (" << ninputs + << ") should be 0." << std::endl; throw std::runtime_error ("audio_osx_source::check_topology()"); } // check # outputs to make sure it's valid if ((noutputs < 1) | (noutputs > (int) d_n_max_channels)) { - fprintf (stderr, "audio_osx_source::check_topology(): " - "number of output streams provided (%d) should be in " - "[1,%ld] for the selected audio device.\n", - noutputs, d_n_max_channels); + std::cerr << "audio_osx_source::check_topology(): number of output " + << "streams provided (" << noutputs << ") should be in [1," + << d_n_max_channels << "] for the selected audio device." + << std::endl; throw std::runtime_error ("audio_osx_source::check_topology()"); } @@ -617,8 +640,8 @@ audio_osx_source::check_topology (int ninputs, int noutputs) d_n_user_channels = noutputs; #if _OSX_AU_DEBUG_ - fprintf (stderr, "chk_topo: Actual # user output channels = %d\n", - noutputs); + std::cerr << "chk_topo: Actual # user output channels = " + << noutputs << std::endl; #endif return (true); @@ -634,8 +657,9 @@ audio_osx_source::work d_internal->lock (); #if _OSX_AU_DEBUG_ - fprintf (stderr, "work1: SC = %4ld, #OI = %4d, #Chan = %ld\n", - d_queueSampleCount, noutput_items, output_items.size()); + std::cerr << "work1: SC = " << d_queueSampleCount + << ", #OI = " << noutput_items + << ", #Chan = " << output_items.size() << std::endl; #endif // set the actual # of output items to the 'desired' amount then @@ -675,14 +699,14 @@ audio_osx_source::work // verify that the number copied out is as expected. while (--l_counter >= 0) { - UInt32 t_n_output_items = actual_noutput_items; + size_t t_n_output_items = actual_noutput_items; d_buffers[l_counter]->dequeue ((float*) output_items[l_counter], &t_n_output_items); if (t_n_output_items != actual_noutput_items) { - fprintf (stderr, "audio_osx_source::work(): " - "number of available items changing " - "unexpectedly; expecting %ld, got %ld.\n", - actual_noutput_items, t_n_output_items); + std::cerr << "audio_osx_source::work(): ERROR: number of " + << "available items changing unexpectedly; expecting " + << actual_noutput_items << ", got " + << t_n_output_items << "." << std::endl; throw std::runtime_error ("audio_osx_source::work()"); } } @@ -693,8 +717,8 @@ audio_osx_source::work d_queueSampleCount -= actual_noutput_items; #if _OSX_AU_DEBUG_ - fprintf (stderr, "work2: SC = %4ld, act#OI = %4ld\n", - d_queueSampleCount, actual_noutput_items); + std::cerr << "work2: SC = " << d_queueSampleCount + << ", act#OI = " << actual_noutput_items << std::endl; #endif // release control to allow for other processing parts to run @@ -702,7 +726,7 @@ audio_osx_source::work d_internal->unlock (); #if _OSX_AU_DEBUG_ - fprintf (stderr, "work3: Returning.\n"); + std::cerr << "work3: Returning." << std::endl; #endif return (actual_noutput_items); @@ -728,8 +752,9 @@ audio_osx_source::ConverterCallback This->d_n_ActualInputFrames = (*ioNumberDataPackets); #if _OSX_AU_DEBUG_ - fprintf (stderr, "cc1: io#DP = %ld, TIBSB = %ld, #C = %d\n", - *ioNumberDataPackets, totalInputBufferSizeBytes, counter); + std::cerr << "cc1: io#DP = " << (*ioNumberDataPackets) + << ", TIBSB = " << totalInputBufferSizeBytes + << ", #C = " << counter << std::endl; #endif while (--counter >= 0) { @@ -740,7 +765,7 @@ audio_osx_source::ConverterCallback } #if _OSX_AU_DEBUG_ - fprintf (stderr, "cc2: Returning.\n"); + std::cerr << "cc2: Returning." << std::endl; #endif return (noErr); @@ -760,8 +785,9 @@ audio_osx_source::AUInputCallback (void* inRefCon, This->d_internal->lock (); #if _OSX_AU_DEBUG_ - fprintf (stderr, "cb0: in#F = %4ld, inBN = %ld, SC = %4ld\n", - inNumberFrames, inBusNumber, This->d_queueSampleCount); + std::cerr << "cb0: in#F = " << inNumberFrames + << ", inBN = " << inBusNumber + << ", SC = " << This->d_queueSampleCount << std::endl; #endif // Get the new audio data from the input device @@ -821,8 +847,8 @@ audio_osx_source::AUInputCallback (void* inRefCon, #endif #if _OSX_AU_DEBUG_ - fprintf (stderr, "cb1: avail: #IF = %ld, #OF = %ld\n", - AvailableInputFrames, AvailableOutputFrames); + std::cerr << "cb1: avail: #IF = " << AvailableInputFrames + << ", #OF = " << AvailableOutputFrames << std::endl; #endif ActualOutputFrames = AvailableOutputFrames; @@ -841,11 +867,11 @@ audio_osx_source::AUInputCallback (void* inRefCon, // on output, ActualOutputFrames is the actual number of output frames #if _OSX_AU_DEBUG_ - fprintf (stderr, "cb2: actual: #IF = %ld, #OF = %ld\n", - This->d_n_ActualInputFrames, AvailableOutputFrames); + std::cerr << "cb2: actual: #IF = " << This->d_n_ActualInputFrames + << ", #OF = " << AvailableOutputFrames << std::endl; if (This->d_n_ActualInputFrames != AvailableInputFrames) - fprintf (stderr, "cb2.1: avail#IF = %ld, actual#IF = %ld\n", - AvailableInputFrames, This->d_n_ActualInputFrames); + std::cerr << "cb2.1: avail#IF = " << AvailableInputFrames + << ", actual#IF = " << This->d_n_ActualInputFrames << std::endl; #endif } @@ -858,7 +884,7 @@ audio_osx_source::AUInputCallback (void* inRefCon, float* inBuffer = (float*) This->d_OutputBuffer->mBuffers[l_counter].mData; #if _OSX_AU_DEBUG_ - fprintf (stderr, "cb3: enqueuing audio data.\n"); + std::cerr << "cb3: enqueuing audio data." << std::endl; #endif int l_res = This->d_buffers[l_counter]->enqueue (inBuffer, ActualOutputFrames); @@ -879,23 +905,23 @@ audio_osx_source::AUInputCallback (void* inRefCon, } #if _OSX_AU_DEBUG_ - fprintf (stderr, "cb4: #OI = %4ld, #Cnt = %4ld, mSC = %ld, \n", - ActualOutputFrames, This->d_queueSampleCount, - This->d_max_sample_count); + std::cerr << "cb4: #OI = " << ActualOutputFrames + << ", #Cnt = " << This->d_queueSampleCount + << ", mSC = " << This->d_max_sample_count << std::endl; #endif // signal that data is available, if appropraite This->d_cond_data->signal (); #if _OSX_AU_DEBUG_ - fprintf (stderr, "cb5: releasing internal mutex.\n"); + std::cerr << "cb5: releasing internal mutex." << std::endl; #endif // release control to allow for other processing parts to run This->d_internal->unlock (); #if _OSX_AU_DEBUG_ - fprintf (stderr, "cb6: returning.\n"); + std::cerr << "cb6: returning." << std::endl; #endif return (err); @@ -930,7 +956,7 @@ audio_osx_source::HardwareListener OSStatus err = noErr; audio_osx_source* This = static_cast<audio_osx_source*>(inClientData); - fprintf (stderr, "a_o_s::HardwareListener\n"); + std::cerr << "a_o_s::HardwareListener" << std::endl; // set the new default hardware input device for use by our AU @@ -957,7 +983,7 @@ audio_osx_source::UnitListener audio_osx_source* This = static_cast<audio_osx_source*>(inRefCon); AudioStreamBasicDescription asbd; - fprintf (stderr, "a_o_s::UnitListener\n"); + std::cerr << "a_o_s::UnitListener" << std::endl; // get the converter's input ASBD (for printing) @@ -970,8 +996,8 @@ audio_osx_source::UnitListener "CurrentInputStreamDescription", "audio_osx_source::UnitListener"); - fprintf (stderr, "UnitListener: Input Source changed.\n" - "Old Source Output Info:\n"); + std::cerr << "UnitListener: Input Source changed." << std::endl + << "Old Source Output Info:" << std::endl; PrintStreamDesc (&asbd); // get the new input unit's output ASBD @@ -984,7 +1010,7 @@ audio_osx_source::UnitListener CheckErrorAndThrow (err, "AudioUnitGetProperty StreamFormat", "audio_osx_source::UnitListener"); - fprintf (stderr, "New Source Output Info:\n"); + std::cerr << "New Source Output Info:" << std::endl; PrintStreamDesc (&asbd); // set the converter's input ASBD to this diff --git a/gr-audio-osx/src/circular_buffer.h b/gr-audio-osx/src/circular_buffer.h index fa451d607..6d491fb6f 100644 --- a/gr-audio-osx/src/circular_buffer.h +++ b/gr-audio-osx/src/circular_buffer.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006 Free Software Foundation, Inc. + * Copyright 2006,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio. * @@ -24,9 +24,12 @@ #define _CIRCULAR_BUFFER_H_ #include "mld_threads.h" +#include <iostream> #include <stdexcept> +#ifndef DO_DEBUG #define DO_DEBUG 0 +#endif #if DO_DEBUG #define DEBUG(X) do{X} while(0); @@ -41,8 +44,8 @@ private: T* d_buffer; // the following are in Items (type T) - UInt32 d_bufLen_I, d_readNdx_I, d_writeNdx_I; - UInt32 d_n_avail_write_I, d_n_avail_read_I; + size_t d_bufLen_I, d_readNdx_I, d_writeNdx_I; + size_t d_n_avail_write_I, d_n_avail_read_I; // stuff to control access to class internals mld_mutex_ptr d_internal; @@ -67,7 +70,7 @@ private: }; public: - circular_buffer (UInt32 bufLen_I, + circular_buffer (size_t bufLen_I, bool doWriteBlock = true, bool doFullRead = false) { if (bufLen_I == 0) throw std::runtime_error ("circular_buffer(): " @@ -79,10 +82,10 @@ public: d_internal = NULL; d_readBlock = d_writeBlock = NULL; reset (); - DEBUG (fprintf (stderr, "c_b(): buf len (items) = %ld, " - "doWriteBlock = %s, doFullRead = %s\n", d_bufLen_I, - (d_doWriteBlock ? "true" : "false"), - (d_doFullRead ? "true" : "false"))); + DEBUG (std::cerr << "c_b(): buf len (items) = " << d_bufLen_ + << ", doWriteBlock = " << (d_doWriteBlock ? "true" : "false") + << ", doFullRead = " << (d_doFullRead ? "true" : "false") + << std::endl); }; ~circular_buffer () { @@ -90,21 +93,21 @@ public: delete [] d_buffer; }; - inline UInt32 n_avail_write_items () { + inline size_t n_avail_write_items () { d_internal->lock (); - UInt32 retVal = d_n_avail_write_I; + size_t retVal = d_n_avail_write_I; d_internal->unlock (); return (retVal); }; - inline UInt32 n_avail_read_items () { + inline size_t n_avail_read_items () { d_internal->lock (); - UInt32 retVal = d_n_avail_read_I; + size_t retVal = d_n_avail_read_I; d_internal->unlock (); return (retVal); }; - inline UInt32 buffer_length_items () {return (d_bufLen_I);}; + inline size_t buffer_length_items () {return (d_bufLen_I);}; inline bool do_write_block () {return (d_doWriteBlock);}; inline bool do_full_read () {return (d_doFullRead);}; @@ -147,14 +150,15 @@ public: * buffer length is larger than the instantiated buffer length */ - int enqueue (T* buf, UInt32 bufLen_I) { - DEBUG (fprintf (stderr, "enqueue: buf = %X, bufLen = %ld, #av_wr = %ld, " - "#av_rd = %ld.\n", (unsigned int)buf, bufLen_I, - d_n_avail_write_I, d_n_avail_read_I)); + int enqueue (T* buf, size_t bufLen_I) { + DEBUG (std::cerr << "enqueue: buf = " << (void*) buf + << ", bufLen = " << bufLen_I + << ", #av_wr = " << d_n_avail_write_I + << ", #av_rd = " << d_n_avail_read_I << std::endl); if (bufLen_I > d_bufLen_I) { - fprintf (stderr, "cannot add buffer longer (%ld" - ") than instantiated length (%ld" - ").\n", bufLen_I, d_bufLen_I); + std::cerr << "ERROR: cannot add buffer longer (" + << bufLen_I << ") than instantiated length (" + << d_bufLen_I << ")." << std::endl; throw std::runtime_error ("circular_buffer::enqueue()"); } @@ -173,25 +177,25 @@ public: if (bufLen_I > d_n_avail_write_I) { if (d_doWriteBlock) { while (bufLen_I > d_n_avail_write_I) { - DEBUG (fprintf (stderr, "enqueue: #len > #a, waiting.\n")); + DEBUG (std::cerr << "enqueue: #len > #a, waiting." << std::endl); // wait will automatically unlock() the internal mutex d_writeBlock->wait (); // and lock() it here. if (d_doAbort) { d_internal->unlock (); - DEBUG (fprintf (stderr, "enqueue: #len > #a, aborting.\n")); + DEBUG (std::cerr << "enqueue: #len > #a, aborting." << std::endl); return (2); } - DEBUG (fprintf (stderr, "enqueue: #len > #a, done waiting.\n")); + DEBUG (std::cerr << "enqueue: #len > #a, done waiting." << std::endl); } } else { d_n_avail_read_I = d_bufLen_I - bufLen_I; d_n_avail_write_I = bufLen_I; - DEBUG (fprintf (stderr, "circular_buffer::enqueue: overflow\n")); + DEBUG (std::cerr << "circular_buffer::enqueue: overflow" << std::endl); retval = -1; } } - UInt32 n_now_I = d_bufLen_I - d_writeNdx_I, n_start_I = 0; + size_t n_now_I = d_bufLen_I - d_writeNdx_I, n_start_I = 0; if (n_now_I > bufLen_I) n_now_I = bufLen_I; else if (n_now_I < bufLen_I) @@ -230,23 +234,24 @@ public: * buffer length is larger than the instantiated buffer length */ - int dequeue (T* buf, UInt32* bufLen_I) { - DEBUG (fprintf (stderr, "dequeue: buf = %X, *bufLen = %ld, #av_wr = %ld, " - "#av_rd = %ld.\n", (unsigned int)buf, *bufLen_I, - d_n_avail_write_I, d_n_avail_read_I)); + int dequeue (T* buf, size_t* bufLen_I) { + DEBUG (std::cerr << "dequeue: buf = " << ((void*) buf) + << ", *bufLen = " << (*bufLen_I) + << ", #av_wr = " << d_n_avail_write_I + << ", #av_rd = " << d_n_avail_read_I << std::endl); if (!bufLen_I) throw std::runtime_error ("circular_buffer::dequeue(): " "input bufLen pointer is NULL.\n"); if (!buf) throw std::runtime_error ("circular_buffer::dequeue(): " "input buffer pointer is NULL.\n"); - UInt32 l_bufLen_I = *bufLen_I; + size_t l_bufLen_I = *bufLen_I; if (l_bufLen_I == 0) return (0); if (l_bufLen_I > d_bufLen_I) { - fprintf (stderr, "cannot remove buffer longer (%ld" - ") than instantiated length (%ld" - ").\n", l_bufLen_I, d_bufLen_I); + std::cerr << "ERROR: cannot remove buffer longer (" + << l_bufLen_I << ") than instantiated length (" + << d_bufLen_I << ")." << std::endl; throw std::runtime_error ("circular_buffer::dequeue()"); } @@ -257,34 +262,34 @@ public: } if (d_doFullRead) { while (d_n_avail_read_I < l_bufLen_I) { - DEBUG (fprintf (stderr, "dequeue: #a < #len, waiting.\n")); + DEBUG (std::cerr << "dequeue: #a < #len, waiting." << std::endl); // wait will automatically unlock() the internal mutex d_readBlock->wait (); // and lock() it here. if (d_doAbort) { d_internal->unlock (); - DEBUG (fprintf (stderr, "dequeue: #a < #len, aborting.\n")); + DEBUG (std::cerr << "dequeue: #a < #len, aborting." << std::endl); return (2); } - DEBUG (fprintf (stderr, "dequeue: #a < #len, done waiting.\n")); + DEBUG (std::cerr << "dequeue: #a < #len, done waiting." << std::endl); } } else { while (d_n_avail_read_I == 0) { - DEBUG (fprintf (stderr, "dequeue: #a == 0, waiting.\n")); + DEBUG (std::cerr << "dequeue: #a == 0, waiting." << std::endl); // wait will automatically unlock() the internal mutex d_readBlock->wait (); // and lock() it here. if (d_doAbort) { d_internal->unlock (); - DEBUG (fprintf (stderr, "dequeue: #a == 0, aborting.\n")); + DEBUG (std::cerr << "dequeue: #a == 0, aborting." << std::endl); return (2); } - DEBUG (fprintf (stderr, "dequeue: #a == 0, done waiting.\n")); + DEBUG (std::cerr << "dequeue: #a == 0, done waiting." << std::endl); } } if (l_bufLen_I > d_n_avail_read_I) l_bufLen_I = d_n_avail_read_I; - UInt32 n_now_I = d_bufLen_I - d_readNdx_I, n_start_I = 0; + size_t n_now_I = d_bufLen_I - d_readNdx_I, n_start_I = 0; if (n_now_I > l_bufLen_I) n_now_I = l_bufLen_I; else if (n_now_I < l_bufLen_I) diff --git a/gr-qtgui/src/lib/Makefile.am b/gr-qtgui/src/lib/Makefile.am index 6c90c31f0..814bee136 100644 --- a/gr-qtgui/src/lib/Makefile.am +++ b/gr-qtgui/src/lib/Makefile.am @@ -112,7 +112,8 @@ include $(top_srcdir)/Makefile.swig # add some of the variables generated inside the Makefile.swig.gen BUILT_SOURCES += \ $(swig_built_sources) - -# Do not distribute the output of SWIG -no_dist_files = $(swig_built_sources) endif + +# Do not distribute built sources, they may contain generated paths +# which are invalid on other systems +no_dist_files = $(BUILT_SOURCES) diff --git a/gr-vrt/.gitignore b/gr-vrt/.gitignore deleted file mode 100644 index 5cf95da46..000000000 --- a/gr-vrt/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -Makefile -Makefile.in -gnuradio-vrt.pc diff --git a/gr-vrt/Makefile.am b/gr-vrt/Makefile.am deleted file mode 100644 index 96019be97..000000000 --- a/gr-vrt/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright 2001,2006,2008,2009 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = src - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = gnuradio-vrt.pc diff --git a/gr-vrt/gnuradio-vrt.pc.in b/gr-vrt/gnuradio-vrt.pc.in deleted file mode 100644 index b5f416051..000000000 --- a/gr-vrt/gnuradio-vrt.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@/gnuradio - -Name: gnuradio-vrt -Description: GNU Software Radio support for Virtual Radio Transport (VRT aka VITA-49) -Requires: gnuradio-core vrt -Version: @VERSION@ -Libs: -L${libdir} -lgnuradio-vrt -Cflags: -I${includedir} diff --git a/gr-vrt/src/.gitignore b/gr-vrt/src/.gitignore deleted file mode 100644 index 9ae817ed4..000000000 --- a/gr-vrt/src/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -Makefile -Makefile.in -.deps -.libs -run_tests -vrt.py -vrt.pyc -vrt.cc diff --git a/gr-vrt/src/Makefile.am b/gr-vrt/src/Makefile.am deleted file mode 100644 index 671c10274..000000000 --- a/gr-vrt/src/Makefile.am +++ /dev/null @@ -1,122 +0,0 @@ -# -# Copyright 2004,2005,2006,2008,2009 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -# ---------------------------------------------------------------------- -# Local Python files, not installed -# -# qa_vrt.py -# ---------------------------------------------------------------------- - -noinst_PYTHON = qa_vrt.py - -# ---------------------------------------------------------------------- -# Miscellaneous build operations -# ---------------------------------------------------------------------- - -EXTRA_DIST = run_tests.in -TESTS = run_tests -DISTCLEANFILES = run_tests - -# ---------------------------------------------------------------------- -# C++ block API interface librar(ies) -# -# libgnuradio_vrt.so -# ---------------------------------------------------------------------- -AM_CPPFLAGS = \ - $(STD_DEFINES_AND_INCLUDES) \ - $(GRUEL_INCLUDES) \ - $(PYTHON_CPPFLAGS) \ - $(VRT_INCLUDES) \ - $(WITH_INCLUDES) - -lib_LTLIBRARIES = libgnuradio-vrt.la - -libgnuradio_vrt_la_SOURCES = \ - missing_pkt_checker.cc \ - vrt_source_base.cc \ - vrt_source_32fc.cc \ - vrt_quadradio_source_32fc.cc - - -#libgnuradio_vrt_la_SOURCES = \ -# rx_16sc_handler.cc \ -# rx_32fc_handler.cc \ -# vrt_base.cc \ -# vrt_source_base.cc \ -# vrt_source_16sc.cc \ -# vrt_source_32fc.cc - -# vrt_sink_base.cc \ -# vrt_sink_16sc.cc \ -# vrt_sink_32fc.cc - -libgnuradio_vrt_la_LIBADD = \ - $(VRT_LA) \ - $(GNURADIO_CORE_LA) - -grinclude_HEADERS = \ - vrt_source_base.h \ - vrt_source_32fc.h \ - vrt_quadradio_source_32fc.h - -# vrt_source_16sc.h \ -# vrt_sink_base.h \ -# vrt_sink_16sc.h \ -# vrt_sink_32fc.h - -noinst_HEADERS = \ - missing_pkt_checker.h - - -# ---------------------------------------------------------------------- -# Python SWIG wrapper around C++ library -# -# vrt.py -# _vrt.so -# ---------------------------------------------------------------------- - -TOP_SWIG_IFILES = \ - vrt.i - -# Install so that they end up available as: -# import gnuradio.vrt -# This ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio -vrt_pythondir_category = \ - gnuradio - -# additional arguments to the SWIG command -vrt_swig_args = \ - $(VRT_INCLUDES) - -# additional libraries for linking with the SWIG-generated library -vrt_la_swig_libadd = \ - libgnuradio-vrt.la - -include $(top_srcdir)/Makefile.swig - -# add some of the variables generated inside the Makefile.swig.gen -BUILT_SOURCES = $(swig_built_sources) - -# Do not distribute the output of SWIG -no_dist_files = $(swig_built_sources) diff --git a/gr-vrt/src/Makefile.swig.gen b/gr-vrt/src/Makefile.swig.gen deleted file mode 100644 index b0a4a22fa..000000000 --- a/gr-vrt/src/Makefile.swig.gen +++ /dev/null @@ -1,259 +0,0 @@ -# -*- Makefile -*- -# -# Copyright 2009 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -# Makefile.swig.gen for vrt.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/vrt -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/vrt -## -## The following can be overloaded to change the install location, but -## this has to be done in the including Makefile.am -before- -## Makefile.swig is included. - -vrt_pythondir_category ?= gnuradio/vrt -vrt_pylibdir_category ?= $(vrt_pythondir_category) -vrt_pythondir = $(pythondir)/$(vrt_pythondir_category) -vrt_pylibdir = $(pyexecdir)/$(vrt_pylibdir_category) - -## SWIG headers are always installed into the same directory. - -vrt_swigincludedir = $(swigincludedir) - -## This is a template file for a "generated" Makefile addition (in -## this case, "Makefile.swig.gen"). By including the top-level -## Makefile.swig, this file will be used to generate the SWIG -## dependencies. Assign the variable TOP_SWIG_FILES to be the list of -## SWIG .i files to generated wrappings for; there can be more than 1 -## so long as the names are unique (no sorting is done on the -## TOP_SWIG_FILES list). This file explicitly assumes that a SWIG .i -## file will generate .cc, .py, and possibly .h files -- meaning that -## all of these files will have the same base name (that provided for -## the SWIG .i file). -## -## This code is setup to ensure parallel MAKE ("-j" or "-jN") does the -## right thing. For more info, see < -## http://sources.redhat.com/automake/automake.html#Multiple-Outputs > - -## Stamps used to ensure parallel make does the right thing. These -## are removed by "make clean", but otherwise unused except during the -## parallel built. These will not be included in a tarball, because -## the SWIG-generated files will be removed from the distribution. - -STAMPS += $(DEPDIR)/vrt-generate-* - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Add the .py and .cc files to the list of SWIG built sources. The -## .h file is sometimes built, but not always ... so that one has to -## be added manually by the including Makefile.am . - -swig_built_sources += vrt.py vrt.cc - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -vrt_swiginclude_HEADERS = \ - vrt.i \ - $(vrt_swiginclude_headers) - -vrt_pylib_LTLIBRARIES = \ - _vrt.la - -_vrt_la_SOURCES = \ - vrt.cc \ - $(vrt_la_swig_sources) - -_vrt_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(vrt_la_swig_libadd) - -_vrt_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(vrt_la_swig_ldflags) - -_vrt_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - $(vrt_la_swig_cxxflags) - -vrt_python_PYTHON = \ - vrt.py \ - $(vrt_python) - -## Entry rule for running SWIG - -vrt.h vrt.py vrt.cc: vrt.i -## This rule will get called only when MAKE decides that one of the -## targets needs to be created or re-created, because: -## -## * The .i file is newer than any or all of the generated files; -## -## * Any or all of the .cc, .h, or .py files does not exist and is -## needed (in the case this file is not needed, the rule for it is -## ignored); or -## -## * Some SWIG-based dependecy of the .cc file isn't met and hence the -## .cc file needs be be regenerated. Explanation: Because MAKE -## knows how to handle dependencies for .cc files (regardless of -## their name or extension), then the .cc file is used as a target -## instead of the .i file -- but with the dependencies of the .i -## file. It is this last reason why the line: -## -## if test -f $@; then :; else -## -## cannot be used in this case: If a .i file dependecy is not met, -## then the .cc file needs to be rebuilt. But if the stamp is newer -## than the .cc file, and the .cc file exists, then in the original -## version (with the 'test' above) the internal MAKE call will not -## be issued and hence the .cc file will not be rebuilt. -## -## Once execution gets to here, it should always proceed no matter the -## state of a stamp (as discussed in link above). The -## $(DEPDIR)/vrt-generate stuff is used to allow for parallel -## builds to "do the right thing". The stamp has no relationship with -## either the target files or dependency file; it is used solely for -## the protection of multiple builds during a given call to MAKE. -## -## Catch signals SIGHUP (1), SIGINT (2), SIGPIPE (13), and SIGTERM -## (15). At a caught signal, the quoted command will be issued before -## exiting. In this case, remove any stamp, whether temporary of not. -## The trap is valid until the process exits; the process includes all -## commands appended via "\"s. -## - trap 'rm -rf $(DEPDIR)/vrt-generate-*' 1 2 13 15; \ -## -## Create a temporary directory, which acts as a lock. The first -## process to create the directory will succeed and issue the MAKE -## command to do the actual work, while all subsequent processes will -## fail -- leading them to wait for the first process to finish. -## - if mkdir $(DEPDIR)/vrt-generate-lock 2>/dev/null; then \ -## -## This code is being executed by the first process to succeed in -## creating the directory lock. -## -## Remove the stamp associated with this filename. -## - rm -f $(DEPDIR)/vrt-generate-stamp; \ -## -## Tell MAKE to run the rule for creating this stamp. -## - $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/vrt-generate-stamp WHAT=$<; \ -## -## Now that the .cc, .h, and .py files have been (re)created from the -## .i file, future checking of this rule during the same MAKE -## execution will come back that the rule doesn't need to be executed -## because none of the conditions mentioned at the start of this rule -## will be positive. Remove the the directory lock, which frees up -## any waiting process(es) to continue. -## - rmdir $(DEPDIR)/vrt-generate-lock; \ - else \ -## -## This code is being executed by any follower processes while the -## directory lock is in place. -## -## Wait until the first process is done, testing once per second. -## - while test -d $(DEPDIR)/vrt-generate-lock; do \ - sleep 1; \ - done; \ -## -## Succeed if and only if the first process succeeded; exit this -## process returning the status of the generated stamp. -## - test -f $(DEPDIR)/vrt-generate-stamp; \ - exit $$?; \ - fi; - -$(DEPDIR)/vrt-generate-stamp: -## This rule will be called only by the first process issuing the -## above rule to succeed in creating the lock directory, after -## removing the actual stamp file in order to guarantee that MAKE will -## execute this rule. -## -## Call SWIG to generate the various output files; special -## post-processing on 'mingw32' host OS for the dependency file. -## - if $(SWIG) $(STD_SWIG_PYTHON_ARGS) $(vrt_swig_args) \ - -MD -MF $(DEPDIR)/vrt.Std \ - -module vrt -o vrt.cc $(WHAT); then \ - if test $(host_os) = mingw32; then \ - $(RM) $(DEPDIR)/vrt.Sd; \ - $(SED) 's,\\\\,/,g' < $(DEPDIR)/vrt.Std \ - > $(DEPDIR)/vrt.Sd; \ - $(RM) $(DEPDIR)/vrt.Std; \ - $(MV) $(DEPDIR)/vrt.Sd $(DEPDIR)/vrt.Std; \ - fi; \ - else \ - $(RM) $(DEPDIR)/vrt.S*; exit 1; \ - fi; -## -## Mess with the SWIG output .Std dependency file, to create a -## dependecy file valid for the input .i file: Basically, simulate the -## dependency file created for libraries by GNU's libtool for C++, -## where all of the dependencies for the target are first listed, then -## each individual dependency is listed as a target with no further -## dependencies. -## -## (1) remove the current dependency file -## - $(RM) $(DEPDIR)/vrt.d -## -## (2) Copy the whole SWIG file: -## - cp $(DEPDIR)/vrt.Std $(DEPDIR)/vrt.d -## -## (3) all a carriage return to the end of the dependency file. -## - echo "" >> $(DEPDIR)/vrt.d -## -## (4) from the SWIG file, remove the first line (the target); remove -## trailing " \" and " " from each line. Append ":" to each line, -## followed by 2 carriage returns, then append this to the end of -## the dependency file. -## - $(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/vrt.Std | \ - awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/vrt.d -## -## (5) remove the SWIG-generated file -## - $(RM) $(DEPDIR)/vrt.Std -## -## Create the stamp for this filename generation, to signal success in -## executing this rule; allows other threads waiting on this process -## to continue. -## - touch $(DEPDIR)/vrt-generate-stamp - -# KLUDGE: Force runtime include of a SWIG dependency file. This is -# not guaranteed to be portable, but will probably work. If it works, -# we have accurate dependencies for our swig stuff, which is good. - -@am__include@ @am__quote@./$(DEPDIR)/vrt.d@am__quote@ - diff --git a/gr-vrt/src/missing_pkt_checker.cc b/gr-vrt/src/missing_pkt_checker.cc deleted file mode 100644 index 09b70fe2c..000000000 --- a/gr-vrt/src/missing_pkt_checker.cc +++ /dev/null @@ -1,47 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2009 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <missing_pkt_checker.h> - -int -missing_pkt_checker::check(const vrt::expanded_header *hdr) -{ - // FIXME assumes we're inspecting only a single stream - - int nmissing = 0; - int actual = hdr->pkt_cnt(); - int expected = (d_last_pkt_cnt + 1) & 0xf; - if (actual != expected && !d_resync){ - d_nwrong_pkt_cnt++; - if (actual > expected) - nmissing = actual - expected; - else - nmissing = actual + 16 - expected; - d_nmissing_pkt_est += nmissing; - } - d_last_pkt_cnt = actual; - d_npackets++; - d_resync = false; - return nmissing; -} diff --git a/gr-vrt/src/missing_pkt_checker.h b/gr-vrt/src/missing_pkt_checker.h deleted file mode 100644 index ab171ffa3..000000000 --- a/gr-vrt/src/missing_pkt_checker.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2009 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -#ifndef INCLUDED_MISSING_PKT_CHECKER_H -#define INCLUDED_MISSING_PKT_CHECKER_H - -#include <vrt/expanded_header.h> -#include <stdint.h> - -/*! - * \brief Check for missing packets - */ -class missing_pkt_checker -{ - // FIXME assumes we're inspecting only a single stream - - bool d_resync; - uint64_t d_npackets; //< total number of packets - int d_last_pkt_cnt; //< the last pkt_cnt we saw - uint64_t d_nwrong_pkt_cnt; //< number of incorrect pkt_cnt - uint64_t d_nmissing_pkt_est; //< estimate of total number of missing pkts - -public: - missing_pkt_checker() - : d_resync(true), d_npackets(0), d_last_pkt_cnt(0xf), d_nwrong_pkt_cnt(0), - d_nmissing_pkt_est(0) {} - - /*! - * \brief check header pkt_cnt and return 0 if OK, else estimate of number of missing packets. - */ - int check(const vrt::expanded_header *hdr); - - void resync() { d_resync = true; } - uint64_t npackets() const { return d_npackets; } - uint64_t nwrong_pkt_cnt() const { return d_nwrong_pkt_cnt; } - uint64_t nmissing_pkt_est() const { return d_nmissing_pkt_est; } -}; - - -#endif /* INCLUDED_MISSING_PKT_CHECKER_H */ diff --git a/gr-vrt/src/qa_vrt.py b/gr-vrt/src/qa_vrt.py deleted file mode 100755 index 9df1edd92..000000000 --- a/gr-vrt/src/qa_vrt.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2005,2008,2009 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -from gnuradio import gr, gr_unittest -import vrt - -class qa_vrt(gr_unittest.TestCase): - - def setUp(self): - self.tb = gr.top_block() - - def tearDown(self): - self.tb = None - - def test_000_nop (self): - """Just see if we can import the module... - They may not have a VRT connected, etc. Don't try to run anything""" - pass - -if __name__ == '__main__': - gr_unittest.main () diff --git a/gr-vrt/src/run_tests.in b/gr-vrt/src/run_tests.in deleted file mode 100644 index 5c56c4674..000000000 --- a/gr-vrt/src/run_tests.in +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -# 1st parameter is absolute path to component source directory -# 2nd parameter is absolute path to component build directory -# 3rd parameter is path to Python QA directory - -# For OS/X -DYLD_LIBRARY_PATH=@abs_top_builddir@/vrt/host/lib/legacy:@abs_top_builddir@/vrt/host/lib/legacy/.libs:$DYLD_LIBRARY_PATH -export DYLD_LIBRARY_PATH - -# For Win32 -PATH=@abs_top_builddir@/vrt/host/lib/legacy:@abs_top_builddir@/vrt/host/lib/legacy/.libs:$PATH - -@top_builddir@/run_tests.sh \ - @abs_top_srcdir@/gr-vrt \ - @abs_top_builddir@/gr-vrt \ - @srcdir@ diff --git a/gr-vrt/src/vrt.i b/gr-vrt/src/vrt.i deleted file mode 100644 index 9016dc33e..000000000 --- a/gr-vrt/src/vrt.i +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2008,2009 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -%include "gnuradio.i" // the common stuff -%import <stdint.i> - -%{ -#include "vrt_quadradio_source_32fc.h" -#include <vrt/quadradio.h> -//#include "vrt_quadradio_source_16sc.h" -//#include "vrt_sink_32fc.h" -//#include "vrt_sink_16sc.h" -%} - -%template(uint32_t_vector) std::vector<uint32_t>; - -// ---------------------------------------------------------------- - -class vrt_source_base : public gr_sync_block -{ -protected: - vrt_source_base() throw (std::runtime_error); - -public: - ~vrt_source_base(); - -}; - -class vrt_source_32fc : public vrt_source_base -{ -protected: - vrt_source_32fc() throw (std::runtime_error); - -public: - ~vrt_source_32fc(); - void reset(); -}; - -// ---------------------------------------------------------------- - -GR_SWIG_BLOCK_MAGIC(vrt,quadradio_source_32fc) - -%include "vrt_quadradio_source_32fc.h" - -%include <vrt/quadradio.h> diff --git a/gr-vrt/src/vrt_quadradio_source_32fc.cc b/gr-vrt/src/vrt_quadradio_source_32fc.cc deleted file mode 100644 index 0aac86991..000000000 --- a/gr-vrt/src/vrt_quadradio_source_32fc.cc +++ /dev/null @@ -1,222 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2009 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <vrt_quadradio_source_32fc.h> -#include <vrt/quadradio.h> -#include <vrt/rx_packet_handler.h> -#include <cstdio> - -vrt_quadradio_source_32fc_sptr -vrt_make_quadradio_source_32fc(const std::string &ip, - size_t rx_bufsize, - size_t samples_per_pkt) -{ - return gnuradio::get_initial_sptr(new vrt_quadradio_source_32fc(ip, - rx_bufsize, - samples_per_pkt)); -} - -vrt_quadradio_source_32fc::vrt_quadradio_source_32fc(const std::string &ip, - size_t rx_bufsize, - size_t samples_per_pkt) - : vrt_source_32fc("quadradio_source_32fc"), - d_samples_per_pkt(samples_per_pkt == 0 ? 800 : samples_per_pkt), - d_qr(vrt::quadradio::sptr(new vrt::quadradio(ip, rx_bufsize))) -{ -} - -vrt_quadradio_source_32fc::~vrt_quadradio_source_32fc() -{ - d_qr->stop_streaming(); -} - -vrt::rx::sptr -vrt_quadradio_source_32fc::vrt_rx() const -{ - return d_qr->vrt_rx(); -} - -bool -vrt_quadradio_source_32fc::start() -{ - // throw away any stale packets before starting - vrt::rx_packet_handler nop; - vrt_rx()->rx_packets(&nop, true); - d_checker.resync(); - - return d_qr->start_streaming(d_samples_per_pkt); -} - -bool -vrt_quadradio_source_32fc::stop() -{ - return d_qr->stop_streaming(); -} - -bool -vrt_quadradio_source_32fc::set_dboard_pins(int which_dboard, int v) -{ - return d_qr->set_dboard_pins(which_dboard, v); -} - -bool -vrt_quadradio_source_32fc::set_center_freq(double target_freq) -{ - return d_qr->set_center_freq(target_freq); -} - -bool -vrt_quadradio_source_32fc::set_band_select(int band) -{ - return d_qr->set_band_select(static_cast<vrt_band_sel_t>(band)); -} - -int -vrt_quadradio_source_32fc::get_band_select(void) -{ - return static_cast<int>(d_qr->get_band_select()); -} - -//void -//vrt_quadradio_source_32fc::set_10dB_atten(bool on) -//{ -// return d_qr->set_10dB_atten(on); -//} - -bool -vrt_quadradio_source_32fc::select_rx_antenna(const std::string &ant) -{ - return d_qr->select_rx_antenna(ant); -} - -bool -vrt_quadradio_source_32fc::set_attenuation0(int attenuation) -{ - return d_qr->set_attenuation0(attenuation); -} - -bool -vrt_quadradio_source_32fc::set_attenuation1(int attenuation) -{ - return d_qr->set_attenuation1(attenuation); -} - -void -vrt_quadradio_source_32fc::set_adc_gain(bool on){ - d_qr->set_adc_gain(on); -} - -void -vrt_quadradio_source_32fc::set_dc_offset_comp(bool on){ - d_qr->set_dc_offset_comp(on); -} - -void -vrt_quadradio_source_32fc::set_digital_gain(float gain){ - d_qr->set_digital_gain(gain); -} - -void -vrt_quadradio_source_32fc::set_test_signal(int type){ - d_qr->set_test_signal(static_cast<vrt_test_sig_t>(type)); -} - -bool -vrt_quadradio_source_32fc::set_setting_reg(int regno, int value) -{ - return d_qr->set_setting_reg(regno, value); -} - -bool -vrt_quadradio_source_32fc::set_hsadc_conf(int which_dboard, int regno, int value) -{ - return d_qr->set_hsadc_conf(which_dboard, regno, value); -} - -bool -vrt_quadradio_source_32fc::set_lsdac(int which_dboard, int which_dac, int value) -{ - return d_qr->set_lsdac(which_dboard, which_dac, value); -} - -bool -vrt_quadradio_source_32fc::set_mem32(int addr, int value) -{ - return d_qr->set_mem32(addr, value); -} - -bool -vrt_quadradio_source_32fc::set_lo_freq(double freq) -{ - return d_qr->set_lo_freq(freq); -} - -bool -vrt_quadradio_source_32fc::set_cal_freq(double freq) -{ - return d_qr->set_cal_freq(freq); -} - -/*--------------------------------------------------------------------*/ -#define IQ_IMBAL_NUM_TAPS 30 -#define IQ_IMBAL_REG_NO 162 - -//helper function to set the iq imbalance register with a tap -static int get_iq_imbal_reg(bool real, bool init, float tap){ - int val = int(round(tap)); - val &= 0x1ffffff; //lower 25 bits for tap - val |= (real?0:1) << 30; //30th bit for filter type - val |= (init?1:0) << 31; //31st bit for initialization - printf("Reg %d Val %x\n", IQ_IMBAL_REG_NO, val); - return val; -} - -void -vrt_quadradio_source_32fc::set_iq_imbal_taps(const std::vector<gr_complex> taps){ - int i = 0; - /* set the real part of the taps */ - get_iq_imbal_reg(true, true, 0); - for (i = 0; i < IQ_IMBAL_NUM_TAPS; i++){ - set_setting_reg(IQ_IMBAL_REG_NO, get_iq_imbal_reg(true, false, taps[IQ_IMBAL_NUM_TAPS-i-1].real())); - } - get_iq_imbal_reg(false, true, 0); - /* set the imaginary part of the taps */ - for (i = 0; i < IQ_IMBAL_NUM_TAPS; i++){ - set_setting_reg(IQ_IMBAL_REG_NO, get_iq_imbal_reg(false, false, taps[IQ_IMBAL_NUM_TAPS-i-1].imag())); - } -} - -bool -vrt_quadradio_source_32fc::set_beamforming(std::vector<gr_complex> gains){ - int32_t gains_ints[8]; - for (int i = 0; i < 4; i++){ - gains_ints[2*i] = int32_t(gains[i].real()); - gains_ints[2*i+1] = int32_t(gains[i].imag()); - } - return d_qr->set_beamforming(gains_ints); -} - -bool -vrt_quadradio_source_32fc::set_cal_enb(bool enb){ - return d_qr->set_cal_enb(enb); -} diff --git a/gr-vrt/src/vrt_quadradio_source_32fc.h b/gr-vrt/src/vrt_quadradio_source_32fc.h deleted file mode 100644 index 6193efa10..000000000 --- a/gr-vrt/src/vrt_quadradio_source_32fc.h +++ /dev/null @@ -1,117 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2009 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -#ifndef INCLUDED_VRT_QUADRADIO_SOURCE_32FC_H -#define INCLUDED_VRT_QUADRADIO_SOURCE_32FC_H - -#include <vrt_source_32fc.h> - -namespace vrt { - class quadradio; -}; - -class vrt_quadradio_source_32fc; -typedef boost::shared_ptr<vrt_quadradio_source_32fc> vrt_quadradio_source_32fc_sptr; - -vrt_quadradio_source_32fc_sptr -vrt_make_quadradio_source_32fc(const std::string &ip, - size_t rx_bufsize = 0, - size_t samples_per_pkt = 0); - -class vrt_quadradio_source_32fc : public vrt_source_32fc -{ - size_t d_samples_per_pkt; - boost::shared_ptr<vrt::quadradio> d_qr; - - vrt_quadradio_source_32fc(const std::string &ip, size_t rx_bufsize, - size_t samples_per_pkt); - - friend vrt_quadradio_source_32fc_sptr - vrt_make_quadradio_source_32fc(const std::string &ip, size_t rx_bufsize, - size_t samples_per_pkt); - -public: - virtual ~vrt_quadradio_source_32fc(); - virtual vrt::rx::sptr vrt_rx() const; - - /*! - * \brief Called by scheduler when starting flowgraph - */ - virtual bool start(); - - /*! - * \brief Called by scheduler when stopping flowgraph - */ - virtual bool stop(); - - /*! - * \brief Set the LO frequency (actually just sets the band select for now). - */ - bool set_center_freq(double target_freq); - - /*! - * \brief Set the band select dboard bits. - */ - bool set_band_select(int band); - int get_band_select(void); - - /*! - * \brief Turn the 10 dB attenuation on/off. - */ - //void set_10dB_atten(bool on); - - /*! - * \brief Set the antenna type to the main rf or calibrator. - * \param ant "rf" or "cal" - */ - bool select_rx_antenna(const std::string &ant); - - /*! - * \brief Set the attenuation. - * \param attenuation 0 to 31 in dB - */ - bool set_attenuation0(int attenuation); - bool set_attenuation1(int attenuation); - - void set_iq_imbal_taps(const std::vector<gr_complex> taps); - - void set_adc_gain(bool on); - void set_dc_offset_comp(bool on); - void set_digital_gain(float gain); - void set_test_signal(int type); - - bool set_setting_reg(int regno, int value); - - /*! - * \brief write \p v to daugherboard control setting register - */ - bool set_dboard_pins(int which_dboard, int v); - bool set_hsadc_conf(int which_dboard, int regno, int value); - bool set_lsdac(int which_dboard, int which_dac, int value); - bool set_mem32(int addr, int value); - bool set_lo_freq(double freq); - bool set_cal_freq(double freq); - bool set_beamforming(std::vector<gr_complex> gains); - bool set_cal_enb(bool enb); -}; - - - -#endif /* INCLUDED_VRT_QUADRADIO_SOURCE_32FC_H */ diff --git a/gr-vrt/src/vrt_sink_16sc.cc b/gr-vrt/src/vrt_sink_16sc.cc deleted file mode 100644 index 09abe29ee..000000000 --- a/gr-vrt/src/vrt_sink_16sc.cc +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2008 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <vrt_sink_16sc.h> -#include <vrt/metadata.h> -#include <gr_io_signature.h> -#include <iostream> - -vrt_sink_16sc_sptr -vrt_make_sink_16sc(const std::string &ifc, const std::string &mac_addr) - throw (std::runtime_error) -{ - return gnuradio::get_initial_sptr(new vrt_sink_16sc(ifc, mac_addr)); -} - -vrt_sink_16sc::vrt_sink_16sc(const std::string &ifc, const std::string &mac_addr) - throw (std::runtime_error) - : vrt_sink_base("vrt_sink_16sc", - gr_make_io_signature(1, 1, sizeof(std::complex<int16_t>)), - ifc, mac_addr) -{ - // NOP -} - -vrt_sink_16sc::~vrt_sink_16sc() -{ - // NOP -} - -int -vrt_sink_16sc::work(int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - std::complex<int16_t> *in = (std::complex<int16_t> *)input_items[0]; - - vrt::tx_metadata metadata; - metadata.timestamp = -1; - metadata.send_now = 1; - metadata.start_of_burst = 1; - - bool ok = d_u2->tx_16sc(0, // FIXME: someday, streams will have channel numbers - in, noutput_items, &metadata); - if (!ok){ - std::cerr << "vrt_sink_16sc: tx_16sc failed" << std::endl; - return -1; // say we're done - } - - return noutput_items; -} diff --git a/gr-vrt/src/vrt_sink_16sc.h b/gr-vrt/src/vrt_sink_16sc.h deleted file mode 100644 index ba6e673be..000000000 --- a/gr-vrt/src/vrt_sink_16sc.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2008 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef INCLUDED_USRP2_SINK_16SC_H -#define INCLUDED_USRP2_SINK_16SC_H - -#include <vrt_sink_base.h> - -class vrt_sink_16sc; -typedef boost::shared_ptr<vrt_sink_16sc> vrt_sink_16sc_sptr; - -vrt_sink_16sc_sptr -vrt_make_sink_16sc(const std::string &ifc="eth0", - const std::string &mac="") - throw (std::runtime_error); - -class vrt_sink_16sc : public vrt_sink_base -{ -private: - friend vrt_sink_16sc_sptr - vrt_make_sink_16sc(const std::string &ifc, - const std::string &mac) - throw (std::runtime_error); - -protected: - vrt_sink_16sc(const std::string &ifc, const std::string &mac) - throw (std::runtime_error); - -public: - ~vrt_sink_16sc(); - - int work(int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif /* INCLUDED_USRP2_SINK_16SC_H */ diff --git a/gr-vrt/src/vrt_sink_32fc.cc b/gr-vrt/src/vrt_sink_32fc.cc deleted file mode 100644 index a9987a361..000000000 --- a/gr-vrt/src/vrt_sink_32fc.cc +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2008 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <vrt_sink_32fc.h> -#include <vrt/metadata.h> -#include <gr_io_signature.h> -#include <iostream> - -vrt_sink_32fc_sptr -vrt_make_sink_32fc(const std::string &ifc, const std::string &mac_addr) - throw (std::runtime_error) -{ - return gnuradio::get_initial_sptr(new vrt_sink_32fc(ifc, mac_addr)); -} - -vrt_sink_32fc::vrt_sink_32fc(const std::string &ifc, const std::string &mac_addr) - throw (std::runtime_error) - : vrt_sink_base("vrt_sink_32fc", - gr_make_io_signature(1, 1, sizeof(gr_complex)), - ifc, mac_addr) -{ - // NOP -} - -vrt_sink_32fc::~vrt_sink_32fc() -{ - // NOP -} - -int -vrt_sink_32fc::work(int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - gr_complex *in = (gr_complex *)input_items[0]; - - vrt::tx_metadata metadata; - metadata.timestamp = -1; - metadata.send_now = 1; - metadata.start_of_burst = 1; - - bool ok = d_u2->tx_32fc(0, // FIXME: someday, streams will have channel numbers - in, noutput_items, &metadata); - if (!ok){ - std::cerr << "vrt_sink_32fc: tx_32fc failed" << std::endl; - return -1; // say we're done - } - - return noutput_items; -} diff --git a/gr-vrt/src/vrt_sink_32fc.h b/gr-vrt/src/vrt_sink_32fc.h deleted file mode 100644 index 55a6512f0..000000000 --- a/gr-vrt/src/vrt_sink_32fc.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2008 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef INCLUDED_USRP2_SINK_32FC_H -#define INCLUDED_USRP2_SINK_32FC_H - -#include <vrt_sink_base.h> - -class vrt_sink_32fc; -typedef boost::shared_ptr<vrt_sink_32fc> vrt_sink_32fc_sptr; - -vrt_sink_32fc_sptr -vrt_make_sink_32fc(const std::string &ifc="eth0", - const std::string &mac="") - throw (std::runtime_error); - -class vrt_sink_32fc : public vrt_sink_base -{ -private: - friend vrt_sink_32fc_sptr - vrt_make_sink_32fc(const std::string &ifc, - const std::string &mac) - throw (std::runtime_error); - -protected: - vrt_sink_32fc(const std::string &ifc, const std::string &mac) - throw (std::runtime_error); - -public: - ~vrt_sink_32fc(); - - int work(int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif /* INCLUDED_USRP2_SINK_32FC_H */ diff --git a/gr-vrt/src/vrt_sink_base.cc b/gr-vrt/src/vrt_sink_base.cc deleted file mode 100644 index a75024dcc..000000000 --- a/gr-vrt/src/vrt_sink_base.cc +++ /dev/null @@ -1,151 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2008 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <vrt_sink_base.h> -#include <gr_io_signature.h> -#include <iostream> - -vrt_sink_base::vrt_sink_base(const char *name, - gr_io_signature_sptr input_signature, - const std::string &ifc, - const std::string &mac) - throw (std::runtime_error) - : vrt_base(name, - input_signature, - gr_make_io_signature(0, 0, 0), - ifc, mac) -{ - // NOP -} - -vrt_sink_base::~vrt_sink_base () -{ - // NOP -} - -bool -vrt_sink_base::set_gain(double gain) -{ - return d_u2->set_tx_gain(gain); -} - -bool -vrt_sink_base::set_lo_offset(double frequency) -{ - return d_u2->set_tx_lo_offset(frequency); -} - -bool -vrt_sink_base::set_center_freq(double frequency, vrt::tune_result *tr) -{ - return d_u2->set_tx_center_freq(frequency, tr); -} - -bool -vrt_sink_base::set_interp(int interp_factor) -{ - return d_u2->set_tx_interp(interp_factor); -} - -void -vrt_sink_base::default_scale_iq(int interp_factor, int *scale_i, int *scale_q) -{ - return d_u2->default_tx_scale_iq(interp_factor, scale_i, scale_q); -} - -bool -vrt_sink_base::set_scale_iq(int scale_i, int scale_q) -{ - return d_u2->set_tx_scale_iq(scale_i, scale_q); -} - -int -vrt_sink_base::interp() -{ - return d_u2->tx_interp(); -} - -bool -vrt_sink_base::dac_rate(long *rate) -{ - return d_u2->dac_rate(rate); -} - -double -vrt_sink_base::gain_min() -{ - return d_u2->tx_gain_min(); -} - -double -vrt_sink_base::gain_max() -{ - return d_u2->tx_gain_max(); -} - -double -vrt_sink_base::gain_db_per_step() -{ - return d_u2->tx_gain_db_per_step(); -} - -double -vrt_sink_base::freq_min() -{ - return d_u2->tx_freq_min(); -} - -double -vrt_sink_base::freq_max() -{ - return d_u2->tx_freq_max(); -} - -bool -vrt_sink_base::daughterboard_id(int *dbid) -{ - return d_u2->tx_daughterboard_id(dbid); -} - -bool vrt_sink_base::set_gpio_ddr(uint16_t value, uint16_t mask) -{ - return d_u2->set_gpio_ddr(vrt::GPIO_TX_BANK, value, mask); -} - -bool vrt_sink_base::set_gpio_sels(std::string sels) -{ - return d_u2->set_gpio_sels(vrt::GPIO_TX_BANK, sels); -} - -bool vrt_sink_base::write_gpio(uint16_t value, uint16_t mask) -{ - return d_u2->write_gpio(vrt::GPIO_TX_BANK, value, mask); -} - -bool vrt_sink_base::read_gpio(uint16_t *value) -{ - return d_u2->read_gpio(vrt::GPIO_TX_BANK, value); -} diff --git a/gr-vrt/src/vrt_sink_base.h b/gr-vrt/src/vrt_sink_base.h deleted file mode 100644 index 5f0532d8e..000000000 --- a/gr-vrt/src/vrt_sink_base.h +++ /dev/null @@ -1,139 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2008 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef INCLUDED_USRP2_SINK_BASE_H -#define INCLUDED_USRP2_SINK_BASE_H - -#include <vrt_base.h> - -/*! - * Base class for all USRP2 transmit blocks - */ -class vrt_sink_base : public vrt_base -{ -protected: - vrt_sink_base(const char *name, - gr_io_signature_sptr input_signature, - const std::string &ifc, - const std::string &mac) - throw (std::runtime_error); - -public: - ~vrt_sink_base(); - - /*! - * \brief Set transmitter gain - */ - bool set_gain(double gain); - - /*! - * \brief Set transmitter LO offset frequency - */ - bool set_lo_offset(double frequency); - - /*! - * \brief Set transmitter center frequency - */ - bool set_center_freq(double frequency, vrt::tune_result *tr); - - /*! - * \brief Set transmit interpolation rate - */ - bool set_interp(int interp_factor); - - /*! - * \brief Calculate default scale_iq for given interpolation factor - */ - void default_scale_iq(int interpolation_factor, int *scale_i, int *scale_q); - - /*! - * \brief Set transmit IQ scale factors - */ - bool set_scale_iq(int scale_i, int scale_q); - - /*! - * \brief Get transmit interpolation rate - */ - int interp(); - - /*! - * \brief Get DAC sample rate in Hz - */ - bool dac_rate(long *rate); - - /*! - * \brief Returns minimum Tx gain - */ - double gain_min(); - - /*! - * \brief Returns maximum Tx gain - */ - double gain_max(); - - /*! - * \brief Returns Tx gain db_per_step - */ - double gain_db_per_step(); - - /*! - * \brief Returns minimum Tx center frequency - */ - double freq_min(); - - /*! - * \brief Returns maximum Tx center frequency - */ - double freq_max(); - - /*! - * \brief Get Tx daughterboard ID - * - * \param[out] dbid returns the daughterboard id. - * - * daughterboard id >= 0 if successful, -1 if no daugherboard installed, - * -2 if invalid EEPROM on daughterboard. - */ - bool daughterboard_id(int *dbid); - - /*! - * \brief Set daughterboard GPIO data direction register. - */ - bool set_gpio_ddr(uint16_t value, uint16_t mask); - - /*! - * \brief Set daughterboard GPIO output selection register. - */ - bool set_gpio_sels(std::string sels); - - /*! - * \brief Set daughterboard GPIO pin values. - */ - bool write_gpio(uint16_t value, uint16_t mask); - - /*! - * \brief Read daughterboard GPIO pin values - */ - bool read_gpio(uint16_t *value); -}; - -#endif /* INCLUDED_USRP2_SINK_BASE_H */ diff --git a/gr-vrt/src/vrt_source_16sc.cc b/gr-vrt/src/vrt_source_16sc.cc deleted file mode 100644 index f0ea35bb3..000000000 --- a/gr-vrt/src/vrt_source_16sc.cc +++ /dev/null @@ -1,69 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2008 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <vrt_source_16sc.h> -#include <rx_16sc_handler.h> -#include <gr_io_signature.h> -#include <iostream> - -vrt_source_16sc_sptr -vrt_make_source_16sc(const std::string &ifc, const std::string &mac_addr) - throw (std::runtime_error) -{ - return gnuradio::get_initial_sptr(new vrt_source_16sc(ifc, mac_addr)); -} - -vrt_source_16sc::vrt_source_16sc(const std::string &ifc, const std::string &mac_addr) - throw (std::runtime_error) - : vrt_source_base("vrt_source_16sc", - gr_make_io_signature(1, 1, sizeof(std::complex<int16_t>)), - ifc, mac_addr) -{ - set_output_multiple(USRP2_MIN_RX_SAMPLES); -} - -vrt_source_16sc::~vrt_source_16sc() -{ - // NOP -} - -int -vrt_source_16sc::work(int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - std::complex<int16_t> *out = (std::complex<int16_t> *)output_items[0]; - - rx_16sc_handler::sptr handler = rx_16sc_handler::make(noutput_items, USRP2_MIN_RX_SAMPLES, out); - - bool ok = d_u2->rx_samples(0, handler.get()); // FIXME: channel number instead of 0 - if (!ok){ - std::cerr << "vrt::rx_samples() failed" << std::endl; - return -1; // say we're done - } - - return handler->nsamples(); -} diff --git a/gr-vrt/src/vrt_source_16sc.h b/gr-vrt/src/vrt_source_16sc.h deleted file mode 100644 index 34175b3ca..000000000 --- a/gr-vrt/src/vrt_source_16sc.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2008 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef INCLUDED_USRP2_SOURCE_16SC_H -#define INCLUDED_USRP2_SOURCE_16SC_H - -#include <vrt_source_base.h> - -class vrt_source_16sc; -typedef boost::shared_ptr<vrt_source_16sc> vrt_source_16sc_sptr; - -vrt_source_16sc_sptr -vrt_make_source_16sc(const std::string &ifc="eth0", - const std::string &mac="") - throw (std::runtime_error); - -class vrt_source_16sc : public vrt_source_base -{ -private: - friend vrt_source_16sc_sptr - vrt_make_source_16sc(const std::string &ifc, - const std::string &mac) throw (std::runtime_error); - -protected: - vrt_source_16sc(const std::string &ifc, const std::string &mac) throw (std::runtime_error); - -public: - ~vrt_source_16sc(); - - int work(int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif /* INCLUDED_USRP2_SOURCE_16SC_H */ diff --git a/gr-vrt/src/vrt_source_32fc.cc b/gr-vrt/src/vrt_source_32fc.cc deleted file mode 100644 index beb5ef26d..000000000 --- a/gr-vrt/src/vrt_source_32fc.cc +++ /dev/null @@ -1,144 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2008,2009 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <vrt_source_32fc.h> -#include <vrt/expanded_header.h> -#include <vrt/copiers.h> -#include <gr_io_signature.h> -#include <missing_pkt_checker.h> -#include <iostream> - -#define VERBOSE 1 // define to 0 or 1 - - -class rx_32fc_handler : public vrt::rx_packet_handler -{ - int d_noutput_items; - std::complex<float> *d_out; - int *d_oo; // output index - std::vector< std::complex<float> > &d_remainder; - missing_pkt_checker &d_checker; - - -public: - - rx_32fc_handler(int noutput_items, std::complex<float> *out, - int *oo, std::vector< std::complex<float> > &remainder, - missing_pkt_checker &checker) - : d_noutput_items(noutput_items), d_out(out), - d_oo(oo), d_remainder(remainder), d_checker(checker) {} - - ~rx_32fc_handler(); - - bool operator()(const uint32_t *payload, - size_t n32_bit_words, - const vrt::expanded_header *hdr); -}; - -rx_32fc_handler::~rx_32fc_handler() -{ -} - -bool -rx_32fc_handler::operator()(const uint32_t *payload, - size_t n32_bit_words, - const vrt::expanded_header *hdr) -{ - int nmissing = d_checker.check(hdr); - if (VERBOSE && nmissing != 0){ - std::cerr << "S" << nmissing; - } - - // copy as many as will fit into the output buffer. - - size_t n = std::min(n32_bit_words, (size_t)(d_noutput_items - *d_oo)); - vrt::copy_net_16sc_to_host_32fc(n, payload, &d_out[*d_oo]); - *d_oo += n; - - // if there are any left over, copy them into remainder and tell - // our caller we're had enough for now. - - size_t r = n32_bit_words - n; - if (r > 0){ - assert(d_remainder.size() == 0); - d_remainder.resize(r); - vrt::copy_net_16sc_to_host_32fc(r, &payload[n], &d_remainder[0]); - return false; // Stop calling us. - } - - return true; // Keep calling us, we've got more room -} - - -// ------------------------------------------------------------------------ - -vrt_source_32fc::vrt_source_32fc(const char *name) - - : vrt_source_base(name, - gr_make_io_signature(1, 1, sizeof(gr_complex))) -{ -} - -vrt_source_32fc::~vrt_source_32fc() -{ - if (VERBOSE){ - std::cerr << "\nvrt_source_32fc: npackets = " << d_checker.npackets() - << " nwrong_pkt_cnt = " << d_checker.nwrong_pkt_cnt() - << " nmissing_pkt_est = " << d_checker.nmissing_pkt_est() - << std::endl; - } -} - -int -vrt_source_32fc::work(int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - gr_complex *out = (gr_complex *)output_items[0]; - int oo = 0; - - // Handle any samples left over from the last call. - int t = std::min(noutput_items, (int)d_remainder.size()); - if (t != 0){ - for (int i = 0; i < t; i++) - out[i] = d_remainder[i]; - d_remainder.erase(d_remainder.begin(), d_remainder.begin()+t); - oo = t; - } - if (noutput_items - oo == 0) - return oo; - - // While we've got room, and there are packets, handle them - rx_32fc_handler h(noutput_items, out, &oo, d_remainder, d_checker); - bool ok = vrt_rx()->rx_packets(&h); - - if (!ok){ - std::cerr << "vrt_source_32fc: vrt::rx_packets() failed" << std::endl; - return -1; // say we're done - } - - return oo; -} diff --git a/gr-vrt/src/vrt_source_32fc.h b/gr-vrt/src/vrt_source_32fc.h deleted file mode 100644 index 7ca3e5fe2..000000000 --- a/gr-vrt/src/vrt_source_32fc.h +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2008,2009 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef INCLUDED_VRT_SOURCE_32FC_H -#define INCLUDED_VRT_SOURCE_32FC_H - -#include <vrt_source_base.h> -#include <missing_pkt_checker.h> - -class vrt_source_32fc : public vrt_source_base -{ -protected: - vrt_source_32fc(const char *name); - - std::vector< std::complex<float> > d_remainder; - missing_pkt_checker d_checker; - -public: - ~vrt_source_32fc(); - - int work(int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - void reset() { d_remainder.clear(); } - -}; - -#endif /* INCLUDED_VRT_SOURCE_32FC_H */ diff --git a/gr-vrt/src/vrt_source_base.cc b/gr-vrt/src/vrt_source_base.cc deleted file mode 100644 index 40e871653..000000000 --- a/gr-vrt/src/vrt_source_base.cc +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2008,2009 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <vrt_source_base.h> -#include <gr_io_signature.h> -#include <iostream> - -vrt_source_base::vrt_source_base(const char *name, - gr_io_signature_sptr output_signature) - : gr_sync_block(name, - gr_make_io_signature(0, 0, 0), - output_signature) -{ -} - -vrt_source_base::~vrt_source_base() -{ -} diff --git a/gr-vrt/src/vrt_source_base.h b/gr-vrt/src/vrt_source_base.h deleted file mode 100644 index e67778860..000000000 --- a/gr-vrt/src/vrt_source_base.h +++ /dev/null @@ -1,45 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2008,2009 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef INCLUDED_VRT_SOURCE_BASE_H -#define INCLUDED_VRT_SOURCE_BASE_H - -#include <gr_sync_block.h> -#include <vrt/rx.h> -#include <gr_io_signature.h> - -/*! - * Base class for all VRT source blocks - */ -class vrt_source_base : public gr_sync_block -{ -protected: - vrt_source_base(const char *name, - gr_io_signature_sptr output_signature); - -public: - ~vrt_source_base(); - - virtual vrt::rx::sptr vrt_rx() const = 0; -}; - -#endif /* INCLUDED_VRT_SOURCE_BASE_H */ diff --git a/gr-wxgui/src/python/forms/forms.py b/gr-wxgui/src/python/forms/forms.py index 8dc58367d..19b30ffb0 100644 --- a/gr-wxgui/src/python/forms/forms.py +++ b/gr-wxgui/src/python/forms/forms.py @@ -194,15 +194,19 @@ class static_text(_form_base): @param label title label for this widget (optional) @param width the width of the form in px @param bold true to bold-ify the text (default=False) + @param units a suffix to add after the text @param converter forms.str_converter(), int_converter(), float_converter()... """ - def __init__(self, label='', width=-1, bold=False, converter=converters.str_converter(), **kwargs): + def __init__(self, label='', width=-1, bold=False, units='', converter=converters.str_converter(), **kwargs): + self._units = units _form_base.__init__(self, converter=converter, **kwargs) self._static_text = wx.StaticText(self._parent, size=wx.Size(width, -1)) if bold: make_bold(self._static_text) self._add_widget(self._static_text, label) - def _update(self, label): self._static_text.SetLabel(label); self._parent.Layout() + def _update(self, label): + if self._units: label += ' ' + self._units + self._static_text.SetLabel(label); self._parent.Layout() ######################################################################## # Text Box Form diff --git a/gr-wxgui/src/python/scope_window.py b/gr-wxgui/src/python/scope_window.py index 9346a73d8..08a025e1e 100644 --- a/gr-wxgui/src/python/scope_window.py +++ b/gr-wxgui/src/python/scope_window.py @@ -376,6 +376,7 @@ class scope_window(wx.Panel, pubsub.pubsub): sample_rate_key, t_scale, v_scale, + v_offset, xy_mode, ac_couple_key, trigger_level_key, @@ -415,8 +416,8 @@ class scope_window(wx.Panel, pubsub.pubsub): self[X_PER_DIV_KEY] = v_scale self[Y_PER_DIV_KEY] = v_scale self[T_OFF_KEY] = 0 - self[X_OFF_KEY] = 0 - self[Y_OFF_KEY] = 0 + self[X_OFF_KEY] = v_offset + self[Y_OFF_KEY] = v_offset self[T_DIVS_KEY] = 8 self[X_DIVS_KEY] = 8 self[Y_DIVS_KEY] = 8 diff --git a/gr-wxgui/src/python/scopesink_gl.py b/gr-wxgui/src/python/scopesink_gl.py index 2882488e3..358361de6 100644 --- a/gr-wxgui/src/python/scopesink_gl.py +++ b/gr-wxgui/src/python/scopesink_gl.py @@ -71,6 +71,7 @@ class _scope_sink_base(gr.hier_block2, common.wxgui_hb): size=scope_window.DEFAULT_WIN_SIZE, v_scale=0, t_scale=0, + v_offset=0, xy_mode=False, ac_couple=False, num_inputs=1, @@ -119,6 +120,7 @@ class _scope_sink_base(gr.hier_block2, common.wxgui_hb): sample_rate_key=SAMPLE_RATE_KEY, t_scale=t_scale, v_scale=v_scale, + v_offset=v_offset, xy_mode=xy_mode, ac_couple_key=AC_COUPLE_KEY, trigger_level_key=TRIGGER_LEVEL_KEY, diff --git a/grc/blocks/wxgui_scopesink2.xml b/grc/blocks/wxgui_scopesink2.xml index 07d29ce8f..eba45f489 100644 --- a/grc/blocks/wxgui_scopesink2.xml +++ b/grc/blocks/wxgui_scopesink2.xml @@ -15,6 +15,7 @@ scopesink2.$(type.fcn)( title=$title, sample_rate=$samp_rate, v_scale=$v_scale, + v_offset=$v_offset, t_scale=$t_scale, ac_couple=$ac_couple, xy_mode=$xy_mode, @@ -62,19 +63,28 @@ $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos())))) <key>v_scale</key> <value>0</value> <type>real</type> + <hide>#if $v_scale() then 'none' else 'part'#</hide> + </param> + <param> + <name>V Offset</name> + <key>v_offset</key> + <value>0</value> + <type>real</type> + <hide>#if $v_offset() then 'none' else 'part'#</hide> </param> <param> <name>T Scale</name> <key>t_scale</key> <value>0</value> <type>real</type> + <hide>#if $t_scale() then 'none' else 'part'#</hide> </param> <param> <name>AC Couple</name> <key>ac_couple</key> <value>False</value> - <type>enum</type> - <hide>#if $ac_couple() == 'True' then 'none' else 'part'#</hide> + <type>bool</type> + <hide>#if $ac_couple() then 'none' else 'part'#</hide> <option> <name>Off</name> <key>False</key> diff --git a/gruel/src/include/gruel/inet.h.in b/gruel/src/include/gruel/inet.h.in index a98d83e9c..7ac01eb56 100644 --- a/gruel/src/include/gruel/inet.h.in +++ b/gruel/src/include/gruel/inet.h.in @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2008 Free Software Foundation, Inc. + * Copyright 2008, 2009 Free Software Foundation, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,6 +19,35 @@ #ifndef INCLUDED_INET_H #define INCLUDED_INET_H +#include <stdint.h> + +#if 1 /* missing htonll or ntohll */ +#if @GR_ARCH_BIGENDIAN@ /* GR_ARCH_BIGENDIAN */ +// Nothing to do... +static inline uint64_t htonll(uint64_t x){ return x;} +static inline uint64_t ntohll(uint64_t x){ return x;} +#else +#if @GR_HAVE_BYTESWAP@ /* GR_HAVE_BYTESWAP */ +#include <byteswap.h> +#else + +static inline uint64_t +bswap_64(uint64_t x) +{ + return ((x & 0x00000000000000ffull) << 56) | ((x & 0x000000000000ff00ull) << 40) | + ((x & 0x0000000000ff0000ull) << 24) | ((x & 0x00000000ff000000ull) << 8) | + ((x & 0x000000ff00000000ull) >> 8) | ((x & 0x0000ff0000000000ull) >> 24) | + ((x & 0x00ff000000000000ull) >> 40) | ((x & 0xff00000000000000ull) >> 56); +} + +#endif /* GR_HAVE_BYTESWAP */ + +static inline uint64_t htonll(uint64_t x){ return bswap_64(x);} +static inline uint64_t ntohll(uint64_t x){ return bswap_64(x);} + +#endif /* GR_ARCH_BIGENDIAN */ +#endif /* missing htonll or ntohll */ + #if @GR_HAVE_ARPA_INET@ /* GR_HAVE_ARPA_INET */ #include <arpa/inet.h> #elif @GR_HAVE_NETINET_IN@ /* GR_HAVE_NETINET_IN */ @@ -61,8 +90,10 @@ static inline uint16_t ntohs(uint16_t x){ return bswap_16(x); } static inline uint8_t ntohx(uint8_t x){ return x; } static inline uint16_t ntohx(uint16_t x){ return ntohs(x); } static inline uint32_t ntohx(uint32_t x){ return ntohl(x); } +static inline uint64_t ntohx(uint64_t x){ return ntohll(x);} static inline uint8_t htonx(uint8_t x){ return x; } static inline uint16_t htonx(uint16_t x){ return htons(x); } static inline uint32_t htonx(uint32_t x){ return htonl(x); } +static inline uint64_t htonx(uint64_t x){ return htonll(x);} #endif /* INCLUDED_INET_H */ diff --git a/usrp/host/lib/circular_buffer.h b/usrp/host/lib/circular_buffer.h index 8898e4194..6d491fb6f 100644 --- a/usrp/host/lib/circular_buffer.h +++ b/usrp/host/lib/circular_buffer.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006 Free Software Foundation, Inc. + * Copyright 2006,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio. * @@ -24,6 +24,7 @@ #define _CIRCULAR_BUFFER_H_ #include "mld_threads.h" +#include <iostream> #include <stdexcept> #ifndef DO_DEBUG @@ -43,8 +44,8 @@ private: T* d_buffer; // the following are in Items (type T) - UInt32 d_bufLen_I, d_readNdx_I, d_writeNdx_I; - UInt32 d_n_avail_write_I, d_n_avail_read_I; + size_t d_bufLen_I, d_readNdx_I, d_writeNdx_I; + size_t d_n_avail_write_I, d_n_avail_read_I; // stuff to control access to class internals mld_mutex_ptr d_internal; @@ -69,7 +70,7 @@ private: }; public: - circular_buffer (UInt32 bufLen_I, + circular_buffer (size_t bufLen_I, bool doWriteBlock = true, bool doFullRead = false) { if (bufLen_I == 0) throw std::runtime_error ("circular_buffer(): " @@ -81,10 +82,10 @@ public: d_internal = NULL; d_readBlock = d_writeBlock = NULL; reset (); - DEBUG (fprintf (stderr, "c_b(): buf len (items) = %ld, " - "doWriteBlock = %s, doFullRead = %s\n", d_bufLen_I, - (d_doWriteBlock ? "true" : "false"), - (d_doFullRead ? "true" : "false"));); + DEBUG (std::cerr << "c_b(): buf len (items) = " << d_bufLen_ + << ", doWriteBlock = " << (d_doWriteBlock ? "true" : "false") + << ", doFullRead = " << (d_doFullRead ? "true" : "false") + << std::endl); }; ~circular_buffer () { @@ -92,21 +93,21 @@ public: delete [] d_buffer; }; - inline UInt32 n_avail_write_items () { + inline size_t n_avail_write_items () { d_internal->lock (); - UInt32 retVal = d_n_avail_write_I; + size_t retVal = d_n_avail_write_I; d_internal->unlock (); return (retVal); }; - inline UInt32 n_avail_read_items () { + inline size_t n_avail_read_items () { d_internal->lock (); - UInt32 retVal = d_n_avail_read_I; + size_t retVal = d_n_avail_read_I; d_internal->unlock (); return (retVal); }; - inline UInt32 buffer_length_items () {return (d_bufLen_I);}; + inline size_t buffer_length_items () {return (d_bufLen_I);}; inline bool do_write_block () {return (d_doWriteBlock);}; inline bool do_full_read () {return (d_doFullRead);}; @@ -149,14 +150,15 @@ public: * buffer length is larger than the instantiated buffer length */ - int enqueue (T* buf, UInt32 bufLen_I) { - DEBUG (fprintf (stderr, "enqueue: buf = %X, bufLen = %ld, #av_wr = %ld, " - "#av_rd = %ld.\n", (unsigned int)buf, bufLen_I, - d_n_avail_write_I, d_n_avail_read_I);); + int enqueue (T* buf, size_t bufLen_I) { + DEBUG (std::cerr << "enqueue: buf = " << (void*) buf + << ", bufLen = " << bufLen_I + << ", #av_wr = " << d_n_avail_write_I + << ", #av_rd = " << d_n_avail_read_I << std::endl); if (bufLen_I > d_bufLen_I) { - fprintf (stderr, "cannot add buffer longer (%ld" - ") than instantiated length (%ld" - ").\n", bufLen_I, d_bufLen_I); + std::cerr << "ERROR: cannot add buffer longer (" + << bufLen_I << ") than instantiated length (" + << d_bufLen_I << ")." << std::endl; throw std::runtime_error ("circular_buffer::enqueue()"); } @@ -175,25 +177,25 @@ public: if (bufLen_I > d_n_avail_write_I) { if (d_doWriteBlock) { while (bufLen_I > d_n_avail_write_I) { - DEBUG (fprintf (stderr, "enqueue: #len > #a, waiting.\n");); + DEBUG (std::cerr << "enqueue: #len > #a, waiting." << std::endl); // wait will automatically unlock() the internal mutex d_writeBlock->wait (); // and lock() it here. if (d_doAbort) { d_internal->unlock (); - DEBUG (fprintf (stderr, "enqueue: #len > #a, aborting.\n");); + DEBUG (std::cerr << "enqueue: #len > #a, aborting." << std::endl); return (2); } - DEBUG (fprintf (stderr, "enqueue: #len > #a, done waiting.\n");); + DEBUG (std::cerr << "enqueue: #len > #a, done waiting." << std::endl); } } else { d_n_avail_read_I = d_bufLen_I - bufLen_I; d_n_avail_write_I = bufLen_I; - DEBUG (fprintf (stderr, "circular_buffer::enqueue: overflow\n");); + DEBUG (std::cerr << "circular_buffer::enqueue: overflow" << std::endl); retval = -1; } } - UInt32 n_now_I = d_bufLen_I - d_writeNdx_I, n_start_I = 0; + size_t n_now_I = d_bufLen_I - d_writeNdx_I, n_start_I = 0; if (n_now_I > bufLen_I) n_now_I = bufLen_I; else if (n_now_I < bufLen_I) @@ -232,23 +234,24 @@ public: * buffer length is larger than the instantiated buffer length */ - int dequeue (T* buf, UInt32* bufLen_I) { - DEBUG (fprintf (stderr, "dequeue: buf = %X, *bufLen = %ld, #av_wr = %ld, " - "#av_rd = %ld.\n", (unsigned int)buf, *bufLen_I, - d_n_avail_write_I, d_n_avail_read_I);); + int dequeue (T* buf, size_t* bufLen_I) { + DEBUG (std::cerr << "dequeue: buf = " << ((void*) buf) + << ", *bufLen = " << (*bufLen_I) + << ", #av_wr = " << d_n_avail_write_I + << ", #av_rd = " << d_n_avail_read_I << std::endl); if (!bufLen_I) throw std::runtime_error ("circular_buffer::dequeue(): " "input bufLen pointer is NULL.\n"); if (!buf) throw std::runtime_error ("circular_buffer::dequeue(): " "input buffer pointer is NULL.\n"); - UInt32 l_bufLen_I = *bufLen_I; + size_t l_bufLen_I = *bufLen_I; if (l_bufLen_I == 0) return (0); if (l_bufLen_I > d_bufLen_I) { - fprintf (stderr, "cannot remove buffer longer (%ld" - ") than instantiated length (%ld" - ").\n", l_bufLen_I, d_bufLen_I); + std::cerr << "ERROR: cannot remove buffer longer (" + << l_bufLen_I << ") than instantiated length (" + << d_bufLen_I << ")." << std::endl; throw std::runtime_error ("circular_buffer::dequeue()"); } @@ -259,34 +262,34 @@ public: } if (d_doFullRead) { while (d_n_avail_read_I < l_bufLen_I) { - DEBUG (fprintf (stderr, "dequeue: #a < #len, waiting.\n");); + DEBUG (std::cerr << "dequeue: #a < #len, waiting." << std::endl); // wait will automatically unlock() the internal mutex d_readBlock->wait (); // and lock() it here. if (d_doAbort) { d_internal->unlock (); - DEBUG (fprintf (stderr, "dequeue: #a < #len, aborting.\n");); + DEBUG (std::cerr << "dequeue: #a < #len, aborting." << std::endl); return (2); } - DEBUG (fprintf (stderr, "dequeue: #a < #len, done waiting.\n");); + DEBUG (std::cerr << "dequeue: #a < #len, done waiting." << std::endl); } } else { while (d_n_avail_read_I == 0) { - DEBUG (fprintf (stderr, "dequeue: #a == 0, waiting.\n");); + DEBUG (std::cerr << "dequeue: #a == 0, waiting." << std::endl); // wait will automatically unlock() the internal mutex d_readBlock->wait (); // and lock() it here. if (d_doAbort) { d_internal->unlock (); - DEBUG (fprintf (stderr, "dequeue: #a == 0, aborting.\n");); + DEBUG (std::cerr << "dequeue: #a == 0, aborting." << std::endl); return (2); } - DEBUG (fprintf (stderr, "dequeue: #a == 0, done waiting.\n");); + DEBUG (std::cerr << "dequeue: #a == 0, done waiting." << std::endl); } } if (l_bufLen_I > d_n_avail_read_I) l_bufLen_I = d_n_avail_read_I; - UInt32 n_now_I = d_bufLen_I - d_readNdx_I, n_start_I = 0; + size_t n_now_I = d_bufLen_I - d_readNdx_I, n_start_I = 0; if (n_now_I > l_bufLen_I) n_now_I = l_bufLen_I; else if (n_now_I < l_bufLen_I) diff --git a/usrp/host/lib/circular_linked_list.h b/usrp/host/lib/circular_linked_list.h index e495d609b..97fe2c1a8 100644 --- a/usrp/host/lib/circular_linked_list.h +++ b/usrp/host/lib/circular_linked_list.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006 Free Software Foundation, Inc. + * Copyright 2006,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio. * @@ -109,12 +109,12 @@ template <class T> class circular_linked_list { private: s_node_ptr d_current, d_iterate, d_available, d_inUse; - UInt32 d_n_nodes, d_n_used; + size_t d_n_nodes, d_n_used; mld_mutex_ptr d_internal; mld_condition_ptr d_ioBlock; public: - circular_linked_list (UInt32 n_nodes) { + circular_linked_list (size_t n_nodes) { if (n_nodes == 0) throw std::runtime_error ("circular_linked_list(): n_nodes == 0"); @@ -136,7 +136,7 @@ public: l_prev->next (l_next); l_prev->prev (l_next); if (n_nodes > 2) { - UInt32 n = n_nodes - 2; + size_t n = n_nodes - 2; while (n-- > 0) { d_current = new s_node<T> (l_prev, l_next); d_current->set_available (); @@ -171,17 +171,17 @@ public: d_internal->lock (); // find an available node s_node_ptr l_node = d_available; - DEBUG (fprintf (stderr, "w ");); + DEBUG (std::cerr << "w "); while (! l_node) { - DEBUG (fprintf (stderr, "x\n");); + DEBUG (std::cerr << "x" << std::endl); // the ioBlock condition will automatically unlock() d_internal d_ioBlock->wait (); // and lock() is here - DEBUG (fprintf (stderr, "y\n");); + DEBUG (std::cerr << "y" << std::endl); l_node = d_available; } - DEBUG (fprintf (stderr, "::f_n_a_n: #u = %ld, node = %p\n", - num_used(), l_node);); + DEBUG (std::cerr << "::f_n_a_n: #u = " << num_used() + << ", node = " << l_node << std::endl); // remove this one from the current available list if (num_available () == 1) { // last one, just set available to NULL @@ -203,8 +203,8 @@ public: void make_node_available (s_node_ptr l_node) { if (!l_node) return; d_internal->lock (); - DEBUG (fprintf (stderr, "::m_n_a: #u = %ld, node = %p\n", - num_used(), l_node);); + DEBUG (std::cerr << "::m_n_a: #u = " << num_used() + << ", node = " << l_node << std::endl); // remove this node from the inUse list if (num_used () == 1) { // last one, just set inUse to NULL @@ -219,10 +219,10 @@ public: l_node->insert_before (d_available); d_n_used--; - DEBUG (fprintf (stderr, "s%ld ", d_n_used);); + DEBUG (std::cerr << "s" << d_n_used); // signal the condition when new data arrives d_ioBlock->signal (); - DEBUG (fprintf (stderr, "t ");); + DEBUG (std::cerr << "t "); // unlock the mutex for thread safety d_internal->unlock (); @@ -251,10 +251,10 @@ public: __INLINE__ T object () { return (d_current->d_object); }; __INLINE__ void object (T l_object) { d_current->d_object = l_object; }; - __INLINE__ UInt32 num_nodes () { return (d_n_nodes); }; - __INLINE__ UInt32 num_used () { return (d_n_used); }; - __INLINE__ void num_used (UInt32 l_n_used) { d_n_used = l_n_used; }; - __INLINE__ UInt32 num_available () { return (d_n_nodes - d_n_used); }; + __INLINE__ size_t num_nodes () { return (d_n_nodes); }; + __INLINE__ size_t num_used () { return (d_n_used); }; + __INLINE__ void num_used (size_t l_n_used) { d_n_used = l_n_used; }; + __INLINE__ size_t num_available () { return (d_n_nodes - d_n_used); }; __INLINE__ void num_used_inc (void) { if (d_n_used < d_n_nodes) ++d_n_used; }; diff --git a/usrp/host/lib/darwin_libusb.h b/usrp/host/lib/darwin_libusb.h index 063a2e9c6..8446f044e 100644 --- a/usrp/host/lib/darwin_libusb.h +++ b/usrp/host/lib/darwin_libusb.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006 Free Software Foundation, Inc. + * Copyright 2006,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio. * @@ -42,28 +42,41 @@ #include <IOKit/IOKitLib.h> extern "C" { -static char * + +static const char* darwin_error_strings[] = { + "no error", + "device not opened for exclusive access", + "no connection to an IOService", + "no asyc port has been opened for interface", + "another process has device opened for exclusive access", + "pipe is stalled", + "could not establish a connection to Darin kernel", + "invalid argument", + "unknown error" +}; + +static const char * darwin_error_str (int result) { switch (result) { case kIOReturnSuccess: - return "no error"; + return (darwin_error_strings[0]); case kIOReturnNotOpen: - return "device not opened for exclusive access"; + return (darwin_error_strings[1]); case kIOReturnNoDevice: - return "no connection to an IOService"; + return (darwin_error_strings[2]); case kIOUSBNoAsyncPortErr: - return "no asyc port has been opened for interface"; + return (darwin_error_strings[3]); case kIOReturnExclusiveAccess: - return "another process has device opened for exclusive access"; + return (darwin_error_strings[4]); case kIOUSBPipeStalled: - return "pipe is stalled"; + return (darwin_error_strings[5]); case kIOReturnError: - return "could not establish a connection to Darin kernel"; + return (darwin_error_strings[6]); case kIOReturnBadArgument: - return "invalid argument"; + return (darwin_error_strings[7]); default: - return "unknown error"; + return (darwin_error_strings[8]); } } @@ -103,40 +116,49 @@ extern char usb_error_str[1024]; extern int usb_error_errno; extern usb_error_type_t usb_error_type; -#define USB_ERROR(r, x) \ - do { \ - usb_error_type = USB_ERROR_TYPE_ERRNO; \ - usb_error_errno = x; \ - return r; \ - } while (0) - -#define USB_ERROR_STR(r, x, format, args...) \ - do { \ - usb_error_type = USB_ERROR_TYPE_STRING; \ - snprintf(usb_error_str, sizeof(usb_error_str) - 1, format, ## args); \ - if (usb_debug) \ - fprintf(stderr, "USB error: %s\n", usb_error_str); \ - return r; \ - } while (0) - -#define USB_ERROR_STR_ORIG(x, format, args...) \ - do { \ - usb_error_type = USB_ERROR_TYPE_STRING; \ - snprintf(usb_error_str, sizeof(usb_error_str) - 1, format, ## args); \ - if (usb_debug) \ - fprintf(stderr, "USB error: %s\n", usb_error_str); \ - return x; \ - } while (0) - -#define USB_ERROR_STR_NO_RET(x, format, args...) \ - do { \ - usb_error_type = USB_ERROR_TYPE_STRING; \ - snprintf(usb_error_str, sizeof(usb_error_str) - 1, format, ## args); \ - if (usb_debug) \ - fprintf(stderr, "USB error: %s\n", usb_error_str); \ - } while (0) - -/* simple function that figures out what pipeRef is associated with an endpoint */ +#define USB_ERROR(r, x) \ + do { \ + usb_error_type = USB_ERROR_TYPE_ERRNO; \ + usb_error_errno = x; \ + return (r); \ + } while (0) + +#define USB_ERROR_STR(r, x, format, args...) \ + do { \ + usb_error_type = USB_ERROR_TYPE_STRING; \ + snprintf (usb_error_str, sizeof (usb_error_str) - 1, \ + format, ## args); \ + if (usb_debug) { \ + std::cerr << "USB error: " << usb_error_str << std::cerr; \ + } \ + return (r); \ + } while (0) + +#define USB_ERROR_STR_ORIG(x, format, args...) \ + do { \ + usb_error_type = USB_ERROR_TYPE_STRING; \ + snprintf (usb_error_str, sizeof (usb_error_str) - 1, \ + format, ## args); \ + if (usb_debug) { \ + std::cerr << "USB error: " << usb_error_str << std::endl; \ + } \ + return (x); \ + } while (0) + +#define USB_ERROR_STR_NO_RET(x, format, args...) \ + do { \ + usb_error_type = USB_ERROR_TYPE_STRING; \ + snprintf (usb_error_str, sizeof (usb_error_str) - 1, \ + format, ## args); \ + if (usb_debug) { \ + std::cerr << "USB error: " << usb_error_str << std::endl; \ + } \ + } while (0) + +/* + * simple function that figures out what pipeRef + * is associated with an endpoint + */ static int ep_to_pipeRef (darwin_dev_handle *device, int ep) { io_return_t ret; @@ -145,45 +167,60 @@ static int ep_to_pipeRef (darwin_dev_handle *device, int ep) UInt16 dont_care2; int i; - if (usb_debug > 3) - fprintf(stderr, "Converting ep address to pipeRef.\n"); + if (usb_debug > 3) { + std::cerr << "Converting ep address to pipeRef." << std::endl; + } /* retrieve the total number of endpoints on this interface */ ret = (*(device->interface))->GetNumEndpoints(device->interface, &numep); if ( ret ) { - if ( usb_debug > 3 ) - fprintf ( stderr, "ep_to_pipeRef: interface is %p\n", device->interface ); - USB_ERROR_STR_ORIG ( -ret, "ep_to_pipeRef: can't get number of endpoints for interface" ); + if ( usb_debug > 3 ) { + std::cerr << "ep_to_pipeRef: interface is " + << device->interface << std::endl; + } + USB_ERROR_STR_ORIG ( -ret, "ep_to_pipeRef: can't get number of " + "endpoints for interface" ); } /* iterate through the pipeRefs until we find the correct one */ for (i = 1 ; i <= numep ; i++) { - ret = (*(device->interface))->GetPipeProperties(device->interface, i, &direction, &number, - &dont_care1, &dont_care2, &dont_care3); + ret = (*(device->interface))->GetPipeProperties + (device->interface, i, &direction, &number, + &dont_care1, &dont_care2, &dont_care3); if (ret != kIOReturnSuccess) { - fprintf (stderr, "ep_to_pipeRef: an error occurred getting pipe information on pipe %d\n", - i ); - USB_ERROR_STR_ORIG (-darwin_to_errno(ret), "ep_to_pipeRef(GetPipeProperties): %s", darwin_error_str(ret)); - } + std::cerr << "ep_to_pipeRef: an error occurred getting " + << "pipe information on pipe " << i << std::endl; - if (usb_debug > 3) - fprintf (stderr, "ep_to_pipeRef: Pipe %i: DIR: %i number: %i\n", i, direction, number); + USB_ERROR_STR_ORIG (-darwin_to_errno(ret), + "ep_to_pipeRef(GetPipeProperties): %s", + darwin_error_str(ret)); + } - /* calculate the endpoint of the pipe and check it versus the requested endpoint */ - if ( ((direction << 7 & USB_ENDPOINT_DIR_MASK) | (number & USB_ENDPOINT_ADDRESS_MASK)) == ep ) { - if (usb_debug > 3) - fprintf(stderr, "ep_to_pipeRef: pipeRef for ep address 0x%02x found: 0x%02x\n", ep, i); + if (usb_debug > 3) { + std::cerr << "ep_to_pipeRef: Pipe " << i << ": DIR: " + << direction << " number: " << number << std::endl; + } - return i; + /* calculate the endpoint of the pipe and check it versus + the requested endpoint */ + if ( ((direction << 7 & USB_ENDPOINT_DIR_MASK) | + (number & USB_ENDPOINT_ADDRESS_MASK)) == ep ) { + if (usb_debug > 3) { + std::cerr << "ep_to_pipeRef: pipeRef for ep address " + << ep << " found: " << i << std::endl; + } + return (i); } } - if (usb_debug > 3) - fprintf(stderr, "ep_to_pipeRef: No pipeRef found with endpoint address 0x%02x.\n", ep); - + if (usb_debug > 3) { + std::cerr << "ep_to_pipeRef: No pipeRef found with endpoint address " + << ep << std::endl; + } + /* none of the found pipes match the requested endpoint */ - return -1; + return (-1); } } diff --git a/usrp/host/lib/fusb_darwin.cc b/usrp/host/lib/fusb_darwin.cc index 737387b87..95c4878aa 100644 --- a/usrp/host/lib/fusb_darwin.cc +++ b/usrp/host/lib/fusb_darwin.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006 Free Software Foundation, Inc. + * Copyright 2006,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio. * @@ -33,6 +33,7 @@ #include "fusb.h" #include "fusb_darwin.h" #include "darwin_libusb.h" +#include <iostream> static const int USB_TIMEOUT = 100; // in milliseconds static const UInt8 NUM_QUEUE_ITEMS = 20; @@ -153,9 +154,10 @@ fusb_ephandle_darwin::start () USB_ERROR_STR (false, -ENOENT, "fusb_ephandle_darwin::start: " "device not initialized"); - if (usb_debug) - fprintf (stderr, "fusb_ephandle_darwin::start: " - "dev = %p, device = %p\n", dev, device); + if (usb_debug) { + std::cerr << "fusb_ephandle_darwin::start: dev = " << + (void*) dev << ", device = " << (void*) device << std::endl; + } d_interfaceRef = device->interface; if (! d_interfaceRef) @@ -165,10 +167,10 @@ fusb_ephandle_darwin::start () // get read or write pipe info (depends on "d_input_p") - if (usb_debug > 3) - fprintf (stderr, "fusb_ephandle_darwin::start " - "d_endpoint = %d, d_input_p = %s\n", - d_endpoint, d_input_p ? "TRUE" : "FALSE"); + if (usb_debug > 3) { + std::cerr << "fusb_ephandle_darwin::start d_endpoint = " << d_endpoint + << ", d_input_p = " << (d_input_p ? "TRUE" : "FALSE") << std::endl; + } int l_endpoint = (d_input_p ? USB_ENDPOINT_IN : USB_ENDPOINT_OUT); int pipeRef = ep_to_pipeRef (device, d_endpoint | l_endpoint); @@ -184,12 +186,14 @@ fusb_ephandle_darwin::start () &d_transferType, &maxPacketSize, &interval); - if (usb_debug == 3) - fprintf (stderr, "fusb_ephandle_darwin::start: %s: ep = 0x%02x, " - "pipeRef = %d, d_i = %p, d_iR = %p, if_dir = %d, if_# = %d, " - "if_int = %d, if_maxPS = %d\n", d_input_p ? "read" : "write", - d_endpoint, d_pipeRef, d_interface, d_interfaceRef, direction, - number, interval, maxPacketSize); + if (usb_debug == 3) { + std::cerr << "fusb_ephandle_darwin::start: " << (d_input_p ? "read" : "write") + << ": ep = " << d_endpoint << ", pipeRef = " << d_pipeRef << "interface = " + << d_interface << ", interfaceRef = " << d_interfaceRef + << ", if_direction = " << direction << ", if_# = " << number + << ", if_interval = " << interval << ", if_maxPacketSize = " + << maxPacketSize << std::endl; + } // set global start boolean d_started = true; @@ -205,9 +209,10 @@ fusb_ephandle_darwin::start () // going; this will unlock the mutex before waiting for a signal () d_runBlock->wait (); - if (usb_debug) - fprintf (stderr, "fusb_ephandle_darwin::start: %s started.\n", - d_input_p ? "read" : "write"); + if (usb_debug) { + std::cerr << "fusb_ephandle_darwin::start: " << (d_input_p ? "read" : "write") + << " started." << std::endl; + } return (true); } @@ -229,10 +234,10 @@ fusb_ephandle_darwin::run_thread (void* arg) bool l_input_p = This->d_input_p; - if (usb_debug) - fprintf (stderr, "fusb_ephandle_darwin::run_thread: " - "starting for %s.\n", - l_input_p ? "read" : "write"); + if (usb_debug) { + std::cerr << "fusb_ephandle_darwin::run_thread: starting for " + << (l_input_p ? "read" : "write") << "." << std::endl; + } usb_interface_t** l_interfaceRef = This->d_interfaceRef; usb_interface_t* l_interface = This->d_interface; @@ -286,9 +291,10 @@ fusb_ephandle_darwin::run_thread (void* arg) CFRunLoopRemoveSource (CFRunLoopGetCurrent (), l_cfSource, kCFRunLoopDefaultMode); - if (usb_debug) - fprintf (stderr, "fusb_ephandle_darwin::run_thread: finished for %s.\n", - l_input_p ? "read" : "write"); + if (usb_debug) { + std::cerr << "fusb_ephandle_darwin::run_thread: finished for " + << (l_input_p ? "read" : "write") << "." << std::endl; + } // release the run thread running mutex l_runThreadRunning->unlock (); @@ -297,8 +303,9 @@ fusb_ephandle_darwin::run_thread (void* arg) void fusb_ephandle_darwin::read_thread (void* arg) { - if (usb_debug) - fprintf (stderr, "fusb_ephandle_darwin::read_thread: starting.\n"); + if (usb_debug) { + std::cerr << "fusb_ephandle_darwin::read_thread: starting." << std::endl; + } fusb_ephandle_darwin* This = static_cast<fusb_ephandle_darwin*>(arg); @@ -331,8 +338,9 @@ fusb_ephandle_darwin::read_thread (void* arg) l_node = l_queue->iterate_next (); } - if (usb_debug) - fprintf (stderr, "fusb_ephandle_darwin::read_thread: finished.\n"); + if (usb_debug) { + std::cerr << "fusb_ephandle_darwin::read_thread: finished." << std::endl; + } // release the read running mutex, to let the parent thread knows // that this thread is finished @@ -343,10 +351,11 @@ void fusb_ephandle_darwin::read_issue (s_both_ptr l_both) { if ((! l_both) || (! d_started)) { - if (usb_debug > 4) - fprintf (stderr, "fusb_ephandle_darwin::read_issue: Doing nothing; " - "l_both is %X; started is %s\n", (unsigned int) l_both, - d_started ? "TRUE" : "FALSE"); + if (usb_debug > 4) { + std::cerr << "fusb_ephandle_darwin::read_issue: Doing nothing; " + << "l_both is " << (void*) l_both << "; started is " + << (d_started ? "TRUE" : "FALSE") << std::endl; + } return; } @@ -356,7 +365,7 @@ fusb_ephandle_darwin::read_issue (s_both_ptr l_both) void* v_buffer = (void*) l_buf->buffer (); // read up to d_bufLenBytes - UInt32 bufLen = d_bufLenBytes; + size_t bufLen = d_bufLenBytes; l_buf->n_used (bufLen); // setup system call result @@ -378,9 +387,10 @@ fusb_ephandle_darwin::read_issue (s_both_ptr l_both) "(ReadPipeAsync%s): %s", d_transferType == kUSBInterrupt ? "" : "TO", darwin_error_str (result)); - else if (usb_debug > 4) - fprintf (stderr, "fusb_ephandle_darwin::read_issue: " - "Queued %X (%ld Bytes)\n", (unsigned int) l_both, bufLen); + else if (usb_debug > 4) { + std::cerr << "fusb_ephandle_darwin::read_issue: Queued " << (void*) l_both + << " (" << bufLen << " Bytes)" << std::endl; + } } void @@ -388,26 +398,27 @@ fusb_ephandle_darwin::read_completed (void* refCon, io_return_t result, void* io_size) { - UInt32 l_size = (UInt32) io_size; + size_t l_size = (size_t) io_size; s_both_ptr l_both = static_cast<s_both_ptr>(refCon); fusb_ephandle_darwin* This = static_cast<fusb_ephandle_darwin*>(l_both->This ()); s_node_ptr l_node = l_both->node (); circular_buffer<char>* l_buffer = This->d_buffer; s_buffer_ptr l_buf = l_node->object (); - UInt32 l_i_size = l_buf->n_used (); - - if (This->d_started && (l_i_size != l_size)) - fprintf (stderr, "fusb_ephandle_darwin::read_completed: " - "Expected %ld bytes; read %ld.\n", - l_i_size, l_size); - else if (usb_debug > 4) - fprintf (stderr, "fusb_ephandle_darwin::read_completed: " - "Read %X (%ld bytes)\n", - (unsigned int) l_both, l_size); - -// add this read to the transfer buffer + size_t l_i_size = l_buf->n_used (); + + if (This->d_started && (l_i_size != l_size)) { + std::cerr << "fusb_ephandle_darwin::read_completed: Expected " << l_i_size + << " bytes; read " << l_size << "." << std::endl; + } else if (usb_debug > 4) { + std::cerr << "fusb_ephandle_darwin::read_completed: Read " << (void*) l_both + << " (" << l_size << " bytes)" << std::endl; + } + +// add this read to the transfer buffer, and check for overflow +// -> data is being enqueued faster than it can be dequeued if (l_buffer->enqueue (l_buf->buffer (), l_size) == -1) { - fputs ("iU", stderr); +// print out that there's an overflow + fputs ("uO", stderr); fflush (stderr); } @@ -421,11 +432,13 @@ fusb_ephandle_darwin::read_completed (void* refCon, int fusb_ephandle_darwin::read (void* buffer, int nbytes) { - UInt32 l_nbytes = (UInt32) nbytes; + size_t l_nbytes = (size_t) nbytes; d_buffer->dequeue ((char*) buffer, &l_nbytes); - if (usb_debug > 4) - fprintf (stderr, "fusb_ephandle_darwin::read: request for %d bytes, %ld bytes retrieved.\n", nbytes, l_nbytes); + if (usb_debug > 4) { + std::cerr << "fusb_ephandle_darwin::read: request for " << nbytes + << " bytes, " << l_nbytes << " bytes retrieved." << std::endl; + } return ((int) l_nbytes); } @@ -433,18 +446,18 @@ fusb_ephandle_darwin::read (void* buffer, int nbytes) int fusb_ephandle_darwin::write (const void* buffer, int nbytes) { - UInt32 l_nbytes = (UInt32) nbytes; + size_t l_nbytes = (size_t) nbytes; if (! d_started) { - if (usb_debug) - fprintf (stderr, "fusb_ephandle_darwin::write: Not yet started.\n"); - + if (usb_debug) { + std::cerr << "fusb_ephandle_darwin::write: Not yet started." << std::endl; + } return (0); } while (l_nbytes != 0) { // find out how much data to copy; limited to "d_bufLenBytes" per node - UInt32 t_nbytes = (l_nbytes > d_bufLenBytes) ? d_bufLenBytes : l_nbytes; + size_t t_nbytes = (l_nbytes > d_bufLenBytes) ? d_bufLenBytes : l_nbytes; // get next available node to write into; // blocks internally if none available @@ -476,8 +489,8 @@ fusb_ephandle_darwin::write (const void* buffer, int nbytes) d_transferType == kUSBInterrupt ? "" : "TO", darwin_error_str (result)); else if (usb_debug > 4) { - fprintf (stderr, "fusb_ephandle_darwin::write_thread: " - "Queued %X (%ld Bytes)\n", (unsigned int) l_both, t_nbytes); + std::cerr << "fusb_ephandle_darwin::write_thread: Queued " << (void*) l_both + << " (" << t_nbytes << " Bytes)" << std::endl; } l_nbytes -= t_nbytes; } @@ -492,19 +505,19 @@ fusb_ephandle_darwin::write_completed (void* refCon, { s_both_ptr l_both = static_cast<s_both_ptr>(refCon); fusb_ephandle_darwin* This = static_cast<fusb_ephandle_darwin*>(l_both->This ()); - UInt32 l_size = (UInt32) io_size; + size_t l_size = (size_t) io_size; s_node_ptr l_node = l_both->node (); s_queue_ptr l_queue = This->d_queue; s_buffer_ptr l_buf = l_node->object (); - UInt32 l_i_size = l_buf->n_used (); - - if (This->d_started && (l_i_size != l_size)) - fprintf (stderr, "fusb_ephandle_darwin::write_completed: " - "Expected %ld bytes written; wrote %ld.\n", - l_i_size, l_size); - else if (usb_debug > 4) - fprintf (stderr, "fusb_ephandle_darwin::write_completed: " - "Wrote %X (%ld Bytes)\n", (unsigned int) l_both, l_size); + size_t l_i_size = l_buf->n_used (); + + if (This->d_started && (l_i_size != l_size)) { + std::cerr << "fusb_ephandle_darwin::write_completed: Expected " << l_i_size + << " bytes written; wrote " << l_size << "." << std::endl; + } else if (usb_debug > 4) { + std::cerr << "fusb_ephandle_darwin::write_completed: Wrote " << (void*) l_both + << " (" << l_size << " Bytes)" << std::endl; + } // set buffer's # data to 0 l_buf->n_used (0); @@ -515,8 +528,9 @@ fusb_ephandle_darwin::write_completed (void* refCon, void fusb_ephandle_darwin::abort () { - if (usb_debug) - fprintf (stderr, "fusb_ephandle_darwin::abort: starting.\n"); + if (usb_debug) { + std::cerr << "fusb_ephandle_darwin::abort: starting." << std::endl; + } io_return_t result = d_interface->AbortPipe (d_interfaceRef, d_pipeRef); @@ -524,8 +538,9 @@ fusb_ephandle_darwin::abort () USB_ERROR_STR_NO_RET (- darwin_to_errno (result), "fusb_ephandle_darwin::abort " "(AbortPipe): %s", darwin_error_str (result)); - if (usb_debug) - fprintf (stderr, "fusb_ephandle_darwin::abort: finished.\n"); + if (usb_debug) { + std::cerr << "fusb_ephandle_darwin::abort: finished." << std::endl; + } } bool @@ -534,9 +549,10 @@ fusb_ephandle_darwin::stop () if (! d_started) return (true); - if (usb_debug) - fprintf (stderr, "fusb_ephandle_darwin::stop: stopping %s.\n", - d_input_p ? "read" : "write"); + if (usb_debug) { + std::cerr << "fusb_ephandle_darwin::stop: stopping " + << (d_input_p ? "read" : "write") << "." << std::endl; + } d_started = false; @@ -556,9 +572,10 @@ fusb_ephandle_darwin::stop () d_runThreadRunning->lock (); d_runThreadRunning->unlock (); - if (usb_debug) - fprintf (stderr, "fusb_ephandle_darwin::stop: %s stopped.\n", - d_input_p ? "read" : "write"); + if (usb_debug) { + std::cerr << "fusb_ephandle_darwin::stop: " << (d_input_p ? "read" : "write") + << " stopped." << std::endl; + } return (true); } diff --git a/usrp/host/lib/fusb_darwin.h b/usrp/host/lib/fusb_darwin.h index bb717b58c..735e5f16d 100644 --- a/usrp/host/lib/fusb_darwin.h +++ b/usrp/host/lib/fusb_darwin.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006 Free Software Foundation, Inc. + * Copyright 2006,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio. * @@ -75,10 +75,10 @@ class s_buffer { private: char* d_buffer; - UInt32 d_n_used, d_n_alloc; + size_t d_n_used, d_n_alloc; public: - inline s_buffer (UInt32 n_alloc = 0) { + inline s_buffer (size_t n_alloc = 0) { d_n_used = 0; d_n_alloc = n_alloc; if (n_alloc) { @@ -92,17 +92,17 @@ public: delete [] d_buffer; } }; - inline UInt32 n_used () { return (d_n_used); }; - inline void n_used (UInt32 bufLen) { + inline size_t n_used () { return (d_n_used); }; + inline void n_used (size_t bufLen) { d_n_used = (bufLen > d_n_alloc) ? d_n_alloc : bufLen; }; - inline UInt32 n_alloc () { return (d_n_alloc); }; - void buffer (char* l_buffer, UInt32 bufLen) { + inline size_t n_alloc () { return (d_n_alloc); }; + void buffer (char* l_buffer, size_t bufLen) { if (bufLen > d_n_alloc) { - fprintf (stderr, "s_buffer::set: Copying only allocated bytes.\n"); + std::cerr << "s_buffer::set: Copying only allocated bytes." << std::endl; bufLen = d_n_alloc; } if (!l_buffer) { - fprintf (stderr, "s_buffer::set: NULL buffer.\n"); + std::cerr << "s_buffer::set: NULL buffer." << std::endl; return; } bcopy (l_buffer, d_buffer, bufLen); @@ -173,7 +173,7 @@ public: usb_interface_t* d_interface; s_queue_ptr d_queue; circular_buffer<char>* d_buffer; - UInt32 d_bufLenBytes; + size_t d_bufLenBytes; mld_mutex_ptr d_readRunning; mld_condition_ptr d_runBlock, d_readBlock; diff --git a/usrp/host/lib/usrp_prims_libusb0.cc b/usrp/host/lib/usrp_prims_libusb0.cc index 0d685d84f..7053786d8 100644 --- a/usrp/host/lib/usrp_prims_libusb0.cc +++ b/usrp/host/lib/usrp_prims_libusb0.cc @@ -69,6 +69,7 @@ _get_usb_string_descriptor (struct usb_dev_handle *udh, int index, fprintf (stderr, "usrp: usb_get_string_descriptor failed: %s\n", usb_strerror()); } + return ret; } diff --git a/usrp/usrp.pc.in b/usrp/usrp.pc.in index 297775fb1..2a15a05fd 100644 --- a/usrp/usrp.pc.in +++ b/usrp/usrp.pc.in @@ -5,7 +5,7 @@ includedir=@includedir@ Name: usrp Description: USRP Client Side C++ interface -Requires: libusb @usrp_darwin_omnithread_pc_requires@ +Requires: @LIBUSB_PKG_CONFIG_NAME@ @usrp_darwin_omnithread_pc_requires@ Version: @VERSION@ Libs: -L${libdir} -lusrp Cflags: -I${includedir} diff --git a/vrt/apps/.gitignore b/vrt/apps/.gitignore index a8e9f886f..dab7a7fd6 100644 --- a/vrt/apps/.gitignore +++ b/vrt/apps/.gitignore @@ -2,4 +2,4 @@ Makefile Makefile.in .deps .libs -simple_rx_samples + diff --git a/vrt/apps/Makefile.am b/vrt/apps/Makefile.am index 631d9020b..45772055b 100644 --- a/vrt/apps/Makefile.am +++ b/vrt/apps/Makefile.am @@ -16,21 +16,3 @@ # include $(top_srcdir)/Makefile.common - -AM_CPPFLAGS = \ - $(VRT_INCLUDES) \ - $(STD_DEFINES_AND_INCLUDES) \ - $(CPPUNIT_INCLUDES) - -LDADD = \ - $(VRT_LA) \ - $(GRUEL_LA) - - -bin_PROGRAMS = - -noinst_PROGRAMS = \ - simple_rx_samples - -simple_rx_samples_SOURCES = simple_rx_samples.cc - diff --git a/vrt/apps/simple_rx_samples.cc b/vrt/apps/simple_rx_samples.cc deleted file mode 100644 index 6b09afda5..000000000 --- a/vrt/apps/simple_rx_samples.cc +++ /dev/null @@ -1,394 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2009 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include <vrt/quadradio.h> -#include <vrt/rx.h> -#include <vrt/copiers.h> - -#include <errno.h> -#include <iostream> -#include <boost/scoped_ptr.hpp> -#include <boost/shared_ptr.hpp> -#include <stdexcept> -#include <signal.h> -#include <unistd.h> -#include <stdint.h> -#include <stdio.h> -#include <string.h> -#include <gruel/realtime.h> -#include <complex> - -#define MIN_IP_LOCAL_PORT 32768 -#define MAX_IP_LOCAL_PORT 61000 - -static volatile bool signaled = false; - -static void -sig_handler(int sig) -{ - signaled = true; -} - -static void -install_sig_handler(int signum, - void (*new_handler)(int)) -{ - struct sigaction new_action; - memset (&new_action, 0, sizeof (new_action)); - - new_action.sa_handler = new_handler; - sigemptyset (&new_action.sa_mask); - new_action.sa_flags = 0; - - if (sigaction (signum, &new_action, 0) < 0){ - perror ("sigaction (install new)"); - throw std::runtime_error ("sigaction"); - } -} - -// ------------------------------------------------------------------------ - -class rx_nop_handler : public vrt::rx_packet_handler -{ -private: - uint64_t d_max_samples; - uint64_t d_max_quantum; - uint64_t d_nsamples; - uint64_t d_npackets; - int d_last_pkt_cnt; - uint64_t d_nwrong_pkt_cnt; - -protected: - bool d_err; - -public: - - // Shared pointer to an instance of this class - typedef boost::shared_ptr<rx_nop_handler> sptr; - - /*! - * Constructor - * - * \param max_samples Maximum number of samples to copy. Use zero for no maximum. - * \param max_quantum Maximum number of samples required to accept in one call. - * Use 0 to indicate no maximum. - */ - rx_nop_handler(uint64_t max_samples, uint64_t max_quantum=0) - : d_max_samples(max_samples), d_max_quantum(max_quantum), - d_nsamples(0), d_npackets(0), - d_last_pkt_cnt(0xf), d_nwrong_pkt_cnt(0), - d_err(false){} - - - ~rx_nop_handler(); - - bool operator()(const uint32_t *payload, - size_t n32_bit_words, - const vrt::expanded_header *hdr); - - /*! - * \brief Returns number of packets this copier was called with - */ - uint64_t npackets() const { return d_npackets; } - - /*! - * \brief Returns actual number of samples copied - */ - uint64_t nsamples() const { return d_nsamples; } - - /*! - * \brief Returns maximum number of samples that will be copied - */ - uint64_t max_samples() const { return d_max_samples; } - - /*! - * Returns true if an error has occurred. Derived classes must set d_err to true - * when an error occurs in the () operator - */ - bool has_errored_p() const { return d_err; } - - /*! - * \brief Returns true if this instance has reached the maximum number of samples - */ - bool has_finished_p() const - { return d_max_samples == 0 ? false : d_nsamples >= d_max_samples-d_max_quantum; } - - uint64_t nwrong_pkt_cnt() const { return d_nwrong_pkt_cnt; } - - -}; - - -rx_nop_handler::~rx_nop_handler() -{ -} - -bool -rx_nop_handler::operator()(const uint32_t *payload, - size_t n32_bit_words, - const vrt::expanded_header *hdr) -{ - if (d_npackets != 0 && hdr->pkt_cnt() != ((d_last_pkt_cnt + 1) & 0xf)){ - d_nwrong_pkt_cnt++; - fprintf(stderr, "bad cnt (pkt %lld)\n", d_npackets); - } - d_last_pkt_cnt = hdr->pkt_cnt(); - - d_nsamples += n32_bit_words; - d_npackets++; - - return !has_finished_p(); -} - -// ------------------------------------------------------------------------ - -class file_writer_16sc : public rx_nop_handler -{ - FILE *d_fp; - std::string d_filename; - -public: - - file_writer_16sc(const std::string &filename, uint64_t max_samples) - : rx_nop_handler(max_samples), d_filename(filename) - { - d_fp = fopen(filename.c_str(), "wb"); - if (d_fp == 0){ - perror(filename.c_str()); - throw std::invalid_argument(filename); - } - } - - ~file_writer_16sc(); - - bool - operator()(const uint32_t *items, size_t nitems, const vrt::expanded_header *hdr) - { - bool ok = rx_nop_handler::operator()(items, nitems, hdr); - - size_t host_nitems = nitems; - std::complex<int16_t> host_items[host_nitems]; - - vrt::copy_net_16sc_to_host_16sc(nitems, items, host_items); - - size_t n = 0; - while (n < host_nitems){ - size_t r = fwrite(&host_items[n], sizeof(host_items[0]), host_nitems - n, d_fp); - n += r; - if (r == 0){ // out of space? - d_err = true; - perror(d_filename.c_str()); - ok = false; - break; - } - } - - return ok; - } -}; - -file_writer_16sc::~file_writer_16sc() -{ - fclose(d_fp); -} - -// ------------------------------------------------------------------------ - -class file_writer_32fc : public rx_nop_handler -{ - FILE *d_fp; - std::string d_filename; - -public: - - file_writer_32fc(const std::string &filename, uint64_t max_samples) - : rx_nop_handler(max_samples), d_filename(filename) - { - d_fp = fopen(filename.c_str(), "wb"); - if (d_fp == 0){ - perror(filename.c_str()); - throw std::invalid_argument(filename); - } - } - - ~file_writer_32fc(); - - bool - operator()(const uint32_t *items, size_t nitems, const vrt::expanded_header *hdr) - { - bool ok = rx_nop_handler::operator()(items, nitems, hdr); - - size_t host_nitems = nitems; - std::complex<float> host_items[host_nitems]; - - vrt::copy_net_16sc_to_host_32fc(nitems, items, host_items); - - size_t n = 0; - while (n < host_nitems){ - size_t r = fwrite(&host_items[n], sizeof(host_items[0]), host_nitems - n, d_fp); - n += r; - if (r == 0){ // out of space? - d_err = true; - perror(d_filename.c_str()); - ok = false; - break; - } - } - - return ok; - } -}; - -file_writer_32fc::~file_writer_32fc() -{ - fclose(d_fp); -} - -// ------------------------------------------------------------------------ - -static void -usage(const char *progname) -{ - const char *p = strrchr(progname, '/'); // drop leading directory path - if (p) - p++; - - if (strncmp(p, "lt-", 3) == 0) // drop lt- libtool prefix - p += 3; - - fprintf(stderr, "Usage: %s [options]\n\n", p); - fprintf(stderr, "Options:\n"); - fprintf(stderr, " -h show this message and exit\n"); -//fprintf(stderr, " -e ETH_INTERFACE specify ethernet interface [default=eth0]\n"); -//fprintf(stderr, " -m MAC_ADDR mac address of USRP2 HH:HH [default=first one found]\n"); -//fprintf(stderr, " -f FREQUENCY specify receive center frequency in Hz [default=0.0]\n"); -//fprintf(stderr, " -d DECIM specify receive decimation rate [default=5]\n"); -//fprintf(stderr, " -g GAIN specify receive daughterboard gain [default=0]\n"); - fprintf(stderr, " -N NSAMPLES specify number of samples to receive [default=infinite]\n"); - fprintf(stderr, " -o OUTPUT_FILENAME specify file to receive samples [default=none]\n"); - fprintf(stderr, " -s write complex<short> [default=complex<float>]\n"); - fprintf(stderr, " -S samples_per_pkt specify # of samples per pkt [default=maximum]\n"); -//fprintf(stderr, " -v verbose output\n"); -} - - -int -main(int argc, char **argv) -{ - const char *quad_radio_ip = "192.168.123.123"; - size_t rx_bufsize = 62.5e6; // sizeof memory mapped network buffer - int samples_per_pkt = 0; // use default - uint64_t nsamples = 0; - char *output_filename = 0; - bool output_shorts = false; - int t; - - int ch; - - while ((ch = getopt(argc, argv, "hN:o:sS:")) != EOF){ - switch (ch){ - case 'N': - nsamples = (uint64_t) strtod(optarg, 0); - break; - - case 'o': - output_filename = optarg; - break; - - case 's': - output_shorts = true; - break; - - case 'S': - errno = 0; - t = strtol(optarg, 0, 0); - if (errno != 0){ - usage(argv[0]); - exit(1); - } - samples_per_pkt = t; - break; - - case 'h': - default: - usage(argv[0]); - exit(1); - } - } - - - install_sig_handler(SIGINT, sig_handler); - - gruel::rt_status_t rt = gruel::enable_realtime_scheduling(); - if (rt != gruel::RT_OK) - std::cerr << "Failed to enable realtime scheduling" << std::endl; - - - vrt::quadradio::sptr qr; - try { - qr = vrt::quadradio::sptr(new vrt::quadradio(quad_radio_ip, rx_bufsize)); - } - catch (...){ - std::cerr << "Failed to create vrt::quadradio\n"; - return 1; - } - - - rx_nop_handler::sptr handler; - if (output_filename){ - if (output_shorts) - handler = rx_nop_handler::sptr(new file_writer_16sc(output_filename, nsamples)); - else - handler = rx_nop_handler::sptr(new file_writer_32fc(output_filename, nsamples)); - } - else - handler = rx_nop_handler::sptr(new rx_nop_handler(nsamples)); - - - printf("samples_per_pkt = %d\n", samples_per_pkt); - - if (!qr->start_streaming(samples_per_pkt)){ - fprintf(stderr, "failed to send_rx_command\n"); - return 1; - } - - // start receiving packets - - while(1 - && !signaled - && !handler->has_errored_p() - && !handler->has_finished_p()){ - bool ok = qr->vrt_rx()->rx_packets(handler.get()); - if (!ok){ - fprintf(stderr, "vrt->rx_packets failed\n"); - break; - } - } - - qr->stop_streaming(); - - printf("%llu packets received, %llu bad pkt_cnt field values, %llu samples\n", - handler->npackets(), handler->nwrong_pkt_cnt(), handler->nsamples()); - - //sleep(1); - - return 0; -} diff --git a/vrt/include/vrt/Makefile.am b/vrt/include/vrt/Makefile.am index b710547d9..183eaf9ce 100644 --- a/vrt/include/vrt/Makefile.am +++ b/vrt/include/vrt/Makefile.am @@ -25,6 +25,6 @@ vrtinclude_HEADERS = \ bits.h \ copiers.h \ expanded_header.h \ - quadradio.h \ rx.h \ - rx_packet_handler.h + rx_packet_handler.h \ + types.h diff --git a/vrt/include/vrt/bits.h b/vrt/include/vrt/bits.h index bb4227db4..54eeec7b4 100644 --- a/vrt/include/vrt/bits.h +++ b/vrt/include/vrt/bits.h @@ -1,24 +1,20 @@ /* -*- c++ -*- */ /* * Copyright 2009 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify + * + * This program 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, + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * 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. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. */ - #ifndef INCLUDED_VRT_BITS_H #define INCLUDED_VRT_BITS_H @@ -53,7 +49,9 @@ #define VRTH_TSF_REAL_TIME_PS (0x2 << 20) #define VRTH_TSF_FREE_RUNNING (0x3 << 20) +#define VRTH_PKT_CNT_SHIFT 16 #define VRTH_PKT_CNT_MASK (0xf << 16) + #define VRTH_PKT_SIZE_MASK 0xffff @@ -69,4 +67,26 @@ vrth_pkt_size(uint32_t h) return h & VRTH_PKT_SIZE_MASK; } +/* + * Trailer bits + */ +#define TR_E (1 << 8) + +#define TR_ENABLE(x) ((x) << 20) +#define TR_STATE(x) ((x) << 8) + +// Use these with TR_ENABLE and TR_STATE +#define TR_CAL_TIME (1 << 11) +#define TR_VALID_DATA (1 << 10) +#define TR_REF_LOCK (1 << 9) +#define TR_AGC (1 << 8) +#define TR_DETECTED_SIG (1 << 7) +#define TR_SPECTRAL_INVERSION (1 << 6) +#define TR_OVER_RANGE (1 << 5) +#define TR_SAMPLE_LOSS (1 << 4) +#define TR_USER_3 (1 << 3) +#define TR_USER_2 (1 << 2) +#define TR_USER_1 (1 << 1) +#define TR_USER_0 (1 << 0) + #endif /* INCLUDED_VRT_BITS_H */ diff --git a/vrt/include/vrt/quadradio.h b/vrt/include/vrt/quadradio.h deleted file mode 100644 index d30ee14f1..000000000 --- a/vrt/include/vrt/quadradio.h +++ /dev/null @@ -1,143 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2009 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -#ifndef INCLUDED_VRT_QUADRADIO_H -#define INCLUDED_VRT_QUADRADIO_H - -#include <vrt/rx.h> - -#include <arpa/inet.h> -#include <netinet/in.h> -#include <sys/types.h> -#include <sys/socket.h> - -typedef enum{ - VRT_TEST_SIG_NORMAL=0, - VRT_TEST_SIG_ZEROS=1, - VRT_TEST_SIG_ONES=2, - VRT_TEST_SIG_TOGGLE=3, - VRT_TEST_SIG_RAMP=4, - VRT_TEST_SIG_CUSTOM=5, - - } vrt_test_sig_t; - -typedef enum{ - VRT_BAND_SEL_A='A', - VRT_BAND_SEL_B='B', - VRT_BAND_SEL_C='C', - VRT_BAND_SEL_D='D', - - } vrt_band_sel_t; - -namespace vrt { - - /* - * We're not committing to this interface. It's just here so we can make progress... - * - * This implements the ad-hoc control for bringup and has-a vrt::rx - */ - class quadradio - { - int d_ctrl_fd; // socket for control - struct in_addr d_ctrl_port_inaddr; // our ip addr - int d_data_fd; // socket for data (owned by d_rx) - int d_data_port; // our data port number - vrt::rx::sptr d_rx; // has-a rx - - vrt_band_sel_t d_band_select; // band select setting - int d_rx_antenna; // antenna type rf/cal - int d_attenuation0; // attenuation setting - int d_attenuation1; // attenuation setting - bool d_10dB_atten; // 10dB attenuation on/of - - static bool - open_sockets(const char *quad_radio_ip, int quad_radio_ctrl_port, - int *ctrl_fd_ptr, struct in_addr *ctrl_port_inaddr, - int *data_fd_ptr, int *data_port_ptr); - - // dsprxno selects the Rx DSP pipe (0 or 1) to configure - static bool - send_rx_command(int ctrl_fd, int rxdspno, bool start, - struct in_addr addr, int data_port, int samples_per_pkt); - - // dsprxno selects the Rx DSP pipe (0 or 1) to stop - static bool - send_stop_rx_command(int ctrl_fd, int rxdspno); - - static int control_port() { return 790; } - int data_socket_fd() const { return d_data_fd; } - - bool open(const char *ip); - - void update_dboard_pins(void); - - public: - typedef boost::shared_ptr<quadradio> sptr; - - quadradio(const std::string &ip, size_t rx_bufsize = 0); - ~quadradio(); - - vrt::rx::sptr vrt_rx() const { return d_rx; } - - // FIXME add rxdspno as the first parameter - bool start_streaming(int samples_per_pkt = 0); - - // FIXME add rxdspno as the first parameter - bool stop_streaming(); - - /* convenience methods that ultimately write the dboard pins */ - bool set_center_freq(double target_freq); - bool set_band_select(vrt_band_sel_t band); - vrt_band_sel_t get_band_select(void){return d_band_select;} - //void set_10dB_atten(bool on); - bool set_attenuation0(int attenuation); - bool select_rx_antenna(const std::string &ant); - bool set_attenuation1(int attenuation); - - /* convenience methods that ultimately call set_hsadc_conf */ - void set_adc_gain(bool on); - void set_dc_offset_comp(bool on); - void set_digital_gain(float gain); - void set_test_signal(vrt_test_sig_t type); - - /* primitives */ - bool set_setting_reg(int regno, int value); - bool set_mem32(int addr, int value); // poke a 32-bit value - bool set_lo_freq(double freq); - bool set_cal_freq(double freq); - bool set_beamforming(int32_t gains[8]); - bool set_cal_enb(bool enb); - /* - * The first parameter for these is a bitmask which indicates which - * daughterboard or daughterboards to apply the operation to. - * 0x1 -> dboard 0 - * 0x2 -> dboard 1 - * 0x3 -> dboard 0 and 1... - */ - bool set_dboard_pins(int dboard_bitmask, int v); - bool set_hsadc_conf(int dboard_bitmask, int regno, int value); - bool set_lsdac(int dboard_bitmask, int which_dac, int value); - - }; - -}; - - -#endif /* INCLUDED_QUADRADIO_H */ diff --git a/vrt/include/vrt/types.h b/vrt/include/vrt/types.h new file mode 100644 index 000000000..edfa4ec37 --- /dev/null +++ b/vrt/include/vrt/types.h @@ -0,0 +1,138 @@ +/* -*- c++ -*- */ +/* + * Copyright 2009 Free Software Foundation, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#ifndef INCLUDED_VRT_TYPES_H +#define INCLUDED_VRT_TYPES_H + +#include <stdint.h> + +/* macros for dealing with fixed point numbers */ +#define _FXPT_C(_type, _x, _rp) ((_type)((_x)*(1ll << _rp))) +#define _FXPT_TO_INT(_x, _one) (((_x) + ((_one)/2))/(_one)) +#define _FXPT_TO_DOUBLE(_x, _one) ((double)(_x) * (1.0/(_one))) + +/*********************************************************************** + * The VRT Altitude Type (meters) + **********************************************************************/ +typedef int32_t vrt_altitude_t; +#define VRT_ALTITUDE_RP 5 +#define VRT_ALTITUDE_C(_x) _FXPT_C(vrt_altitude_t, _x, VRT_ALTITUDE_RP) + +static inline vrt_altitude_t +double_to_vrt_altitude(double num){ + return VRT_ALTITUDE_C(num); +} + +static inline int32_t +vrt_altitude_round_to_int(vrt_altitude_t fx){ + return _FXPT_TO_INT(fx, VRT_ALTITUDE_C(1)); +} + +static inline double +vrt_altitude_to_double(vrt_altitude_t fx){ + return _FXPT_TO_DOUBLE(fx, VRT_ALTITUDE_C(1)); +} + +/*********************************************************************** + * The VRT Geolocation Angle Type (degrees) + **********************************************************************/ +typedef int32_t vrt_geo_angle_t; +#define VRT_GEO_ANGLE_RP 22 +#define VRT_GEO_ANGLE_C(_x) _FXPT_C(vrt_geo_angle_t, _x, VRT_GEO_ANGLE_RP) + +static inline vrt_geo_angle_t +double_to_vrt_geo_angle(double num){ + return VRT_GEO_ANGLE_C(num); +} + +static inline int16_t +vrt_geo_angle_round_to_int(vrt_geo_angle_t fx){ + return _FXPT_TO_INT(fx, VRT_GEO_ANGLE_C(1)); +} + +static inline double +vrt_geo_angle_to_double(vrt_geo_angle_t fx){ + return _FXPT_TO_DOUBLE(fx, VRT_GEO_ANGLE_C(1)); +} + +/*********************************************************************** + * The VRT Frequency Type (Hz) + **********************************************************************/ +typedef int64_t vrt_freq_t; +#define VRT_FREQ_RP 20 +#define VRT_FREQ_C(_x) _FXPT_C(vrt_freq_t, _x, VRT_FREQ_RP) + +static inline vrt_freq_t +double_to_vrt_freq(double num){ + return VRT_FREQ_C(num); +} + +static inline int64_t +vrt_freq_round_to_int(vrt_freq_t fx){ + return _FXPT_TO_INT(fx, VRT_FREQ_C(1)); +} + +static inline double +vrt_freq_to_double(vrt_freq_t fx){ + return _FXPT_TO_DOUBLE(fx, VRT_FREQ_C(1)); +} + +/*********************************************************************** + * The VRT Gain Type (dB) + **********************************************************************/ +typedef int16_t vrt_gain_t; +#define VRT_GAIN_RP 7 +#define VRT_GAIN_C(_x) _FXPT_C(vrt_gain_t, _x, VRT_GAIN_RP) + +static inline vrt_gain_t +double_to_vrt_gain(double num){ + return VRT_GAIN_C(num); +} + +static inline int16_t +vrt_gain_round_to_int(vrt_gain_t fx){ + return _FXPT_TO_INT(fx, VRT_GAIN_C(1)); +} + +static inline double +vrt_gain_to_double(vrt_gain_t fx){ + return _FXPT_TO_DOUBLE(fx, VRT_GAIN_C(1)); +} + +/*********************************************************************** + * The VRT Temperature Type (Celcius) + **********************************************************************/ +typedef int16_t vrt_temp_t; +#define VRT_TEMP_RP 6 +#define VRT_TEMP_C(_x) _FXPT_C(vrt_temp_t, _x, VRT_TEMP_RP) + +static inline vrt_temp_t +double_to_vrt_temp(double num){ + return VRT_TEMP_C(num); +} + +static inline int16_t +vrt_temp_round_to_int(vrt_temp_t fx){ + return _FXPT_TO_INT(fx, VRT_TEMP_C(1)); +} + +static inline double +vrt_temp_to_double(vrt_temp_t fx){ + return _FXPT_TO_DOUBLE(fx, VRT_TEMP_C(1)); +} + +#endif /* INCLUDED_VRT_TYPES_H */ diff --git a/vrt/lib/Makefile.am b/vrt/lib/Makefile.am index 9832c0cd5..3a758eeac 100644 --- a/vrt/lib/Makefile.am +++ b/vrt/lib/Makefile.am @@ -20,7 +20,8 @@ include $(top_srcdir)/Makefile.common AM_CPPFLAGS = \ $(VRT_INCLUDES) \ $(BOOST_CPPFLAGS) \ - $(CPPUNIT_INCLUDES) + $(CPPUNIT_INCLUDES) \ + $(GRUEL_INCLUDES) bin_PROGRAMS = @@ -31,7 +32,6 @@ libvrt_la_SOURCES = \ copiers.cc \ data_handler.cc \ expanded_header.cc \ - quadradio.cc \ rx.cc \ rx_packet_handler.cc \ socket_rx_buffer.cc diff --git a/vrt/lib/expanded_header.cc b/vrt/lib/expanded_header.cc index d5c4ea888..0eb2042d8 100644 --- a/vrt/lib/expanded_header.cc +++ b/vrt/lib/expanded_header.cc @@ -23,7 +23,7 @@ #include <config.h> #endif #include <vrt/expanded_header.h> -#include <arpa/inet.h> // needs autoconf'ing +#include <gruel/inet.h> //#include <stdio.h> namespace vrt { @@ -112,6 +112,12 @@ namespace vrt { #include "expanded_header_switch_body.h" } + /* is this a if context packet? */ + if (h->if_context_p()){ + *payload = p; + *n32_bit_words_payload = n32_bit_words_packet; + } + return true; } diff --git a/vrt/lib/quadradio.cc b/vrt/lib/quadradio.cc deleted file mode 100644 index a8bc3e525..000000000 --- a/vrt/lib/quadradio.cc +++ /dev/null @@ -1,428 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2009 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <vrt/quadradio.h> -#include <errno.h> -#include <string.h> -#include <stdio.h> -#include <stdexcept> -#include <math.h> - -#define MIN_IP_LOCAL_PORT 32768 -#define MAX_IP_LOCAL_PORT 61000 - -#define ALL_DBOARDS 0xf - -static bool -send_and_check(int fd, void *buf, size_t len) -{ - int r = send(fd, buf, len, 0); - if (r < 0){ - perror("send"); - return false; - } - if ((size_t) r != len){ - fprintf(stderr, "send: short return value. expected %zd, got %d\n", len, r); - return false; - } - return true; -} - - -vrt::quadradio::quadradio(const std::string &ip, size_t rx_bufsize) - : d_ctrl_fd(0), d_data_fd(0), d_data_port(0), - d_band_select(VRT_BAND_SEL_A), d_rx_antenna(0), d_attenuation0(0), d_attenuation1(0)//d_10dB_atten(true) -{ - if (!open(ip.c_str())) - throw std::runtime_error("vrt::quadradio: failed to open " + ip + "\n"); - - d_rx = vrt::rx::make(data_socket_fd(), rx_bufsize); - set_test_signal(VRT_TEST_SIG_NORMAL); -} - -vrt::quadradio::~quadradio() -{ - ::close(d_ctrl_fd); -} - -bool -vrt::quadradio::open(const char *ip) -{ - return open_sockets(ip, control_port(), - &d_ctrl_fd, &d_ctrl_port_inaddr, - &d_data_fd, &d_data_port); -} - -bool -vrt::quadradio::start_streaming(int samples_per_pkt) -{ - int rxdspno = 0; // FIXME make it the first param - - return send_rx_command(d_ctrl_fd, rxdspno, true, d_ctrl_port_inaddr, - d_data_port, samples_per_pkt); -} - -bool -vrt::quadradio::stop_streaming() -{ - int rxdspno = 0; // FIXME make it the first param - - return send_stop_rx_command(d_ctrl_fd, rxdspno); -} - -bool -vrt::quadradio::set_center_freq(double target_freq){ - if (target_freq < 700e6) return false; - if (target_freq <= 1.0e9) return set_band_select(VRT_BAND_SEL_A); - if (target_freq <= 1.5e9) return set_band_select(VRT_BAND_SEL_B); - if (target_freq <= 2.2e9) return set_band_select(VRT_BAND_SEL_C); - if (target_freq <= 3.0e9) return set_band_select(VRT_BAND_SEL_D); - return false; -} - -bool -vrt::quadradio::set_band_select(vrt_band_sel_t band){ - d_band_select = band; - update_dboard_pins(); - return true; -} - -//void -//vrt::quadradio::set_10dB_atten(bool on){ -// d_10dB_atten = on; -// update_dboard_pins(); -//} - -bool -vrt::quadradio::select_rx_antenna(const std::string &ant){ - if (ant == "rf") d_rx_antenna = 0; - else if (ant == "cal") d_rx_antenna = 1; - else return true; - update_dboard_pins(); - return true; -} - -bool -vrt::quadradio::set_attenuation0(int attenuation){ - if (attenuation < 0 || attenuation > 31) return false; - d_attenuation0 = attenuation; - update_dboard_pins(); - return true; -} - -bool -vrt::quadradio::set_attenuation1(int attenuation){ - if (attenuation < 0 || attenuation > 31) return false; - d_attenuation1 = attenuation; - update_dboard_pins(); - return true; -} - -//bit reversal, length in bits -static int reverse_bits(int input, int len){ - int reversed = 0; - for (int i = 0; i < len; i++){ - reversed += (input & (1<<i))?(1 << (len-i-1)):0; - } - return reversed; -} - -void -vrt::quadradio::update_dboard_pins(void){ - //convert the band ID to bits - int band_select; - switch (d_band_select){ - case VRT_BAND_SEL_A: band_select = 3; break; - case VRT_BAND_SEL_B: band_select = 2; break; - case VRT_BAND_SEL_C: band_select = 1; break; - case VRT_BAND_SEL_D: band_select = 0; break; - default: band_select = 0; - } - //calculate the control bits - int db_ctrl = \ - ((reverse_bits(d_attenuation0, 5) & 0x1f) << 10) | \ - ((reverse_bits(~d_attenuation1, 5) & 0x1f) << 03) | \ - ((band_select & 0x03) << 01) | \ - ((d_rx_antenna & 0x01) << 00); - set_dboard_pins(ALL_DBOARDS, db_ctrl); // FIXME sets them all -} - -void -vrt::quadradio::set_adc_gain(bool on){ - set_hsadc_conf(ALL_DBOARDS, 0x14, on ? 0x90 : 0x80); -} - -void -vrt::quadradio::set_dc_offset_comp(bool on){ - if (on) { - set_hsadc_conf(ALL_DBOARDS, 0x1B, 0x80); - set_hsadc_conf(ALL_DBOARDS, 0x1A, 0x00); //bits 6:4 set time constant - } - else set_hsadc_conf(ALL_DBOARDS, 0x1B, 0x00); -} - -void -vrt::quadradio::set_digital_gain(float gain){ - int gain_q1 = static_cast<int>(round(gain*2.0)); - set_hsadc_conf(ALL_DBOARDS, 0x17, gain_q1); -} - -void -vrt::quadradio::set_test_signal(vrt_test_sig_t type){ - set_hsadc_conf(ALL_DBOARDS, 0x16, type); -} - -bool -vrt::quadradio::open_sockets(const char *quad_radio_ip, int quad_radio_ctrl_port, - int *ctrl_fd_ptr, struct in_addr *ctrl_port_inaddr, - int *data_fd_ptr, int *data_port_ptr) -{ - int ctrl_fd; // socket for control - int data_fd; // socket fd for data - int data_port; // our port number - - // - // create a udp socket and connect it to the quad radio control port - // - - ctrl_fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (ctrl_fd == -1){ - perror("socket: ctrl_fd"); - return false; - } - - struct sockaddr_in si_other; - memset(&si_other, 0, sizeof(si_other)); - si_other.sin_family = AF_INET; - si_other.sin_port = htons(quad_radio_ctrl_port); - if (inet_pton(AF_INET, quad_radio_ip, &si_other.sin_addr) <= 0){ - perror("inet_pton"); - return false; - } - - if (connect(ctrl_fd, (struct sockaddr *) &si_other, sizeof(si_other)) != 0){ - perror("connect"); - return false; - } - - // get our ip address associated with the interface connected to the control port - - struct sockaddr_in si_me; - memset(&si_me, 0, sizeof(si_me)); - socklen_t sockname_len = sizeof(si_me); - if (getsockname(ctrl_fd, (struct sockaddr *) &si_me, &sockname_len) != 0){ - perror("getsockname"); - } - - *ctrl_port_inaddr = si_me.sin_addr; - - if (1){ - char buf[128]; - const char *s = inet_ntop(si_me.sin_family, &si_me.sin_addr, buf, sizeof(buf)); - if (s == 0){ - perror("inet_ntop"); - return false; - } - // printf("our ip addr associated with ctrl port: %s\n", s); - } - - // - // create a udp socket to use to receive data - // - - data_fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (data_fd == -1){ - perror("socket: data_fd"); - return false; - } - - // bind it to a local port on the interface that connects to the ctrl port. - // FIXME this assumes that interface connected to the control port and the - // interface connected to the data port are the same. If we're using - // both ethernet ports on the quad radio, this may not be the case. - - data_port = -1; - for (int port = MIN_IP_LOCAL_PORT; port <= MAX_IP_LOCAL_PORT; port++){ - struct sockaddr_in si_me; - memset(&si_me, 0, sizeof(si_me)); - si_me.sin_family = AF_INET; - si_me.sin_port = htons(port); - si_me.sin_addr.s_addr = htonl(INADDR_ANY); - - if (bind(data_fd, (struct sockaddr *) &si_me, sizeof(si_me)) == 0){ // found one! - data_port = port; - break; - } - } - - if (data_port == -1){ - fprintf(stderr, "failed to bind to a local port\n"); - return false; - } - - // printf("our data port = %d\n", data_port); - - *ctrl_fd_ptr = ctrl_fd; - *data_fd_ptr = data_fd; - *data_port_ptr = data_port; - - return true; -} - -// ------------------------------------------------------------------------ - -bool -vrt::quadradio::send_rx_command(int ctrl_fd, int rxdspno, bool start, - struct in_addr addr, int data_port, - int samples_per_pkt) -{ - uint32_t cmd[7]; - cmd[0] = htonl(0); // verb: set - cmd[1] = htonl(0); // id: rx_streaming - cmd[2] = htonl(start ? 1: 0); // start or stop? - cmd[3] = addr.s_addr; // ip address to send data to (already network endian) - cmd[4] = htonl(data_port); // port to send data to - cmd[5] = htonl(samples_per_pkt); - cmd[6] = htonl(rxdspno); // the DSP pipeline to configure - - return send_and_check(ctrl_fd, cmd, sizeof(cmd)); -} - -bool -vrt::quadradio::send_stop_rx_command(int ctrl_fd, int rxdspno) -{ - struct in_addr in_addr; - in_addr.s_addr = 0; - return send_rx_command(ctrl_fd, rxdspno, false, in_addr, 0, 0); -} - -bool -vrt::quadradio::set_dboard_pins(int dboard_bitmask, int v) -{ - uint32_t cmd[4]; - cmd[0] = htonl(0); // verb: set - cmd[1] = htonl(1); // id: dboard_pins - cmd[2] = htonl(dboard_bitmask); - cmd[3] = htonl(v); // value - - return send_and_check(d_ctrl_fd, cmd, sizeof(cmd)); -} - -bool -vrt::quadradio::set_setting_reg(int regno, int value) -{ - uint32_t cmd[4]; - cmd[0] = htonl(0); // verb: set - cmd[1] = htonl(2); // id: SR - cmd[2] = htonl(regno); - cmd[3] = htonl(value); - - return send_and_check(d_ctrl_fd, cmd, sizeof(cmd)); -} - -bool -vrt::quadradio::set_hsadc_conf(int dboard_bitmask, int regno, int value) -{ - uint32_t cmd[5]; - cmd[0] = htonl(0); // verb: set - cmd[1] = htonl(3); // id: HSADC_CONF - cmd[2] = htonl(dboard_bitmask); - cmd[3] = htonl(regno); - cmd[4] = htonl(value); - - return send_and_check(d_ctrl_fd, cmd, sizeof(cmd)); -} - -bool -vrt::quadradio::set_lsdac(int dboard_bitmask, int which_dac, int value) -{ - uint32_t cmd[5]; - cmd[0] = htonl(0); // verb: set - cmd[1] = htonl(4); // id: LSDAC - cmd[2] = htonl(dboard_bitmask); - cmd[3] = htonl(which_dac); - cmd[4] = htonl(value); - - return send_and_check(d_ctrl_fd, cmd, sizeof(cmd)); -} - -bool -vrt::quadradio::set_mem32(int addr, int value) -{ - uint32_t cmd[4]; - cmd[0] = htonl(0); // verb: set - cmd[1] = htonl(5); // id: MEM32 - cmd[2] = htonl(addr); - cmd[3] = htonl(value); - - return send_and_check(d_ctrl_fd, cmd, sizeof(cmd)); -} - -bool -vrt::quadradio::set_lo_freq(double freq) -{ - uint64_t lo_freq = uint64_t(freq * (uint64_t(1)<<20)); //q20 format - uint32_t cmd[4]; - cmd[0] = htonl(0); // verb: set - cmd[1] = htonl(6); // id: lo freq - cmd[2] = htonl((lo_freq >> 32) & 0xffffffff); - cmd[3] = htonl((lo_freq >> 0) & 0xffffffff); - - return send_and_check(d_ctrl_fd, cmd, sizeof(cmd)); -} - -bool -vrt::quadradio::set_cal_freq(double freq) -{ - uint64_t cal_freq = uint64_t(freq * (uint64_t(1)<<20)); //q20 format - uint32_t cmd[4]; - cmd[0] = htonl(0); // verb: set - cmd[1] = htonl(7); // id: cal freq - cmd[2] = htonl((cal_freq >> 32) & 0xffffffff); - cmd[3] = htonl((cal_freq >> 0) & 0xffffffff); - - return send_and_check(d_ctrl_fd, cmd, sizeof(cmd)); -} - -bool -vrt::quadradio::set_beamforming(int32_t gains[8]){ - uint32_t cmd[2+8]; - cmd[0] = htonl(0); // verb: set - cmd[1] = htonl(8); // id: beamformin - for (int i = 0; i < 8; i++){ - //printf("%d\n", gains[i]); - cmd[i+2] = htonl(gains[i]); - } - return send_and_check(d_ctrl_fd, cmd, sizeof(cmd)); -} - -bool -vrt::quadradio::set_cal_enb(bool enb) -{ - uint32_t cmd[3]; - cmd[0] = htonl(0); // verb: set - cmd[1] = htonl(9); // id: cal enb - cmd[2] = htonl(enb); - - return send_and_check(d_ctrl_fd, cmd, sizeof(cmd)); -} |