diff options
3002 files changed, 20633 insertions, 77265 deletions
diff --git a/.gitignore b/.gitignore index 233e153a5..6300279f2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,51 +1,3 @@ -/build -# -# NOTE! Don't add files that are generated in specific -# subdirectories here. Add them in the ".gitignore" file -# in that subdirectory instead. -# -# NOTE! Please use 'git ls-files -i --exclude-standard' -# command after changing this file, to see if there are -# any tracked files which get ignored after the change. -# -.* -*.o -*.a -*.ko -*.so -*.la -*.lo -*.py[oc] -*.gz -*.exe -*.patch *~ -\#*# -.deps -.libs -guile.log -TAGS -*-stamp -!.gitattributes -!.gitignore -make.log -/configure -/Makefile.in -/config.log -/config.h -/ltmain.sh -/Makefile -/config.status -/stamp-h1 -/config.h.in -/autom4te.cache -/libtool -/missing -/aclocal.m4 -/install-sh -/depcomp -/py-compile -/compile -/build -/run_tests.sh -/setup_guile_test_env +*.pyc +*.pyo diff --git a/CMakeLists.txt b/CMakeLists.txt index 949d06893..0f43b8f7a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2010-2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, @@ -38,6 +38,11 @@ set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "") list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) +# Set the version information here +set(VERSION_INFO_MAJOR_VERSION 3) +set(VERSION_INFO_API_COMPAT 6) +set(VERSION_INFO_MINOR_VERSION 0) +set(VERSION_INFO_MAINT_VERSION git) include(GrVersion) #setup version info # Append -O2 optimization flag for Debug builds @@ -237,9 +242,8 @@ add_subdirectory(gr-utils) add_subdirectory(gr-video-sdl) add_subdirectory(gr-vocoder) add_subdirectory(gr-fcd) +add_subdirectory(gr-wavelet) add_subdirectory(gr-wxgui) -add_subdirectory(gnuradio-examples/grc) -add_subdirectory(gnuradio-examples/python) #finalize cpack after subdirs processed include(GrPackage) diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index 170a7f7d1..000000000 --- a/ChangeLog +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright 2001,2002,2003,2004,2005,2006 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. -# - -For the blow by blow changes for each file, please consult: - -http://gnuradio.org/redmine/projects/gnuradio/repository diff --git a/Guile-TODO b/Guile-TODO deleted file mode 100644 index 9fc7d9c25..000000000 --- a/Guile-TODO +++ /dev/null @@ -1,80 +0,0 @@ -In no particular order: - -11) Write test cases for gr-* components. - - For the one's that have a h/w dependency, just confirm that we can - load the module. See gr_audio_alsa/src/audio_alsa.test for an - example. - - For the others, write a test in the style of the ones in - gnuradio-core. - - -80) Confirm make dist and make distcheck work -81) Anything else that would keep us from merging into next. -82) Get some other developers to try it out. - -90) Merge to next -100) Handle any fallout we missed. - -------------------------------------------------------------------------------- -Low priority: - -6) Fix printed representation of blocks in gr_block.i - -9) Any other FIXME style warnings. - (Last one is in usrp2.i) - -12) Swig guile modules names: s/_/-/g - -16) Test this stuff with Guile 1.9 to confirm that it works and to see - how much faster it is. Load time currently is currently kind of doggy. - - -------------------------------------------------------------------------------- -These are done: - - -1) [DONE] Ensure that libraries containing swig generated code are regenerated - when any relevant .i file is touched. - -2) [DONE] SIGINT handling in gr_top_block::wait - -3) [DONE] Ensure that all 4 combinations of - --{enable,disable}-python --{enable,disable}-guile - work correctly. - - When both are disabled swig should NOT be run. - When --enable-guile --disable-python, python swig stuff should not be generated. - When --disable-guile --enable-python, guile swig stuff should not be generated. - -4) [DONE] Fix GR_SWIG_BLOCK_MAGIC so that in the guile case we don't map all - the constructors into the same name. E.g. audio_alsa_sink -> sink. - (Causes problem when multiple gr-* modules are used.) - -5) [DONE]Ensure that all gr-* components are generating guile code when - enabled, and that (1) and (3) are handled in all gr-* components. - -5b) [DONE] Don't forget gr-howto-write-a-block. (It's got its own - configure.ac and is built separately from the rest.) - -7) [DONE] Fix gr-usrp so that it works. Probably related to - warning received when generating python bindings. - Making the swig/python warning go away will probably resolve the - guile problem. - -8) [DONE] Fix gr_message_{sink,source} so that they work under guile. - (Not sure if I disabled one or both of these...) - -10) [DONE] Finish gnuradio-core test cases - -13) [DONE] Change guile libnames to libguile-gnuradio-<module-name> - -14) [DONE] Add support to setup_guile_test_env.in for - "withlibs", OS/X (DYLD_LIBRARY_PATH), windows (PATH) - -15) [DONE] Rewrite gr-run-waveform as C/C++ code that embeds guile. - See if we can't statically link libguile into this. - Will need to figure out which packages provide libguile.a. - -17) [DONE] Get std::vector< std::complex<float> > working diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 54703e439..000000000 --- a/INSTALL +++ /dev/null @@ -1,236 +0,0 @@ -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2007 Free Software -Foundation, Inc. - - This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. - -Basic Installation -================== - -See also the OS specific Build Guide at: - http://gnuradio.org/trac/wiki/BuildGuide - -Please read the README too ;) - - - These are generic installation instructions. - - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is -disabled by default to prevent problems with accidental use of stale -cache files.) - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' -for details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. - -Installation Names -================== - - By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=PATH' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - - There may be some features `configure' cannot figure out -automatically, but needs to determine by the type of machine the package -will run on. Usually, assuming the package is built to be run on the -_same_ architectures, `configure' can figure that out, but if it prints -a message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the `--target=TYPE' option to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - - Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -will cause the specified gcc to be used as the C compiler (unless it is -overridden in the site shell script). - -`configure' Invocation -====================== - - `configure' recognizes the following options to control how it -operates. - -`--help' -`-h' - Print a summary of the options to `configure', and exit. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 417f659c9..000000000 --- a/Makefile.am +++ /dev/null @@ -1,55 +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. -# - -ACLOCAL_AMFLAGS = -I config - -include $(top_srcdir)/Makefile.common - -EXTRA_DIST += \ - bootstrap \ - configure \ - config.h.in \ - run_tests.sh.in \ - Makefile.swig \ - Makefile.swig.gen.t \ - Makefile.par.gen \ - Makefile.gen.gen \ - version.sh - -SUBDIRS = @build_dirs@ -DIST_SUBDIRS = @build_dirs@ @skipped_dirs@ @with_dirs@ -DISTCLEANFILES = gnuradio*.tar.gz - -# we need to check both python and guile support for distcheck -DISTCHECK_CONFIGURE_FLAGS = --enable-python --enable-guile - -if PYTHON - -export pythondir - -install-data-hook: - @if ! python -c "import gnuradio" > /dev/null 2>&1; then\ - printf "\n*** Post-Install Message ***\ - \nWarning: python could not find the gnuradio module.\ - \nMake sure that $${pythondir} is in your PYTHONPATH\n\n";\ - fi - -endif diff --git a/Makefile.common b/Makefile.common deleted file mode 100644 index 39cd5106f..000000000 --- a/Makefile.common +++ /dev/null @@ -1,124 +0,0 @@ -# -*- Makefile -*- -# -# Copyright 2004,2006,2007,2008,2009,2010 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. -# - -# Every Makefile starts with common vars so we can -# consistently use += -BUILT_SOURCES = -MOSTLYCLEANFILES = $(BUILT_SOURCES) $(STAMPS) *.pyc *.pyo *~ *.tmp *.loT -CLEANFILES = guile.log -DISTCLEANFILES = -EXTRA_DIST = -STAMPS = - - -# Make rebuilds less verbose with stuff we can safely ignore -# about GNU make only extensions. -AUTOMAKE += -Wno-portability -Wnone - -AM_CFLAGS = @autoconf_default_CFLAGS@ @lf_CFLAGS@ -AM_CXXFLAGS = @autoconf_default_CXXFLAGS@ @lf_CXXFLAGS@ - -# Sets ABI version in SONAME and appends -LIBVER to filename -LTVERSIONFLAGS = -version-info 0:0:0 -release $(LIBVER) - -# includes -grincludedir = $(includedir)/gnuradio -gruelincludedir = $(includedir)/gruel - -# swig includes -swigincludedir = $(grincludedir)/swig -gruelswigincludedir = $(gruelincludedir)/swig - -# Guile scheme code ends up under here: -guiledir = $(prefix)/share/guile/site - -# Install the gnuradio stuff in the appropriate subdirectory -# This usually ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio - -grpythondir = $(pythondir)/gnuradio -grpyexecdir = $(pyexecdir)/gnuradio - -# This used to be set in configure.ac but is now defined here for all -# Makefiles when this fragment is included. -STD_DEFINES_AND_INCLUDES = $(DEFINES) $(GNURADIO_INCLUDES) \ - $(GRUEL_INCLUDES) $(VOLK_INCLUDES) $(BOOST_CPPFLAGS) - -# when including for compilation from pre-installed libraries and such, -# need to make sure those are put last on the compile command -WITH_INCLUDES = @with_INCLUDES@ -WITH_SWIG_INCLUDES = @with_SWIG_INCLUDES@ - -# Where to find gnuradio include files in the current build tree -# top_srcdir for original stuff, top_builddir for generated files -GNURADIO_INCLUDES = @gnuradio_core_INCLUDES@ - -# How to link in GNU Radio core library from inside the tree -GNURADIO_CORE_LA = @gnuradio_core_LA@ - -# How to link in the GRUEL library from inside the tree -GRUEL_INCLUDES = @gruel_INCLUDES@ -GRUEL_LA = @gruel_LA@ - -# How to link in the VOLK library from inside the tree -VOLK_INCLUDES = @volk_INCLUDES@ -VOLK_LA = @volk_LA@ - -# GR-DIGITAL includes and libraries -GR_DIGITAL_INCLUDES = @gr_digital_INCLUDES@ -GR_DIGITAL_LA = @gr_digital_LA@ - -# GR-QTGUI includes and libraries -GR_QTGUI_INCLUDES = @gr_qtgui_INCLUDES@ -GR_QTGUI_LA = @gr_qtgui_LA@ - -# Fix for BSD make not defining $(RM). We define it now in configure.ac -# using AM_PATH_PROG, but now here have to add a -f to be like GNU make -RM=$(RM_PROG) -f - -RUN_GUILE = GUILE_LOAD_PATH="@abs_top_srcdir@/gruel/src/scheme" @GUILE@ -e main -s - -# Base directory for example applications -exampledir = $(datadir)/gnuradio/examples - -# Base directory for documentation (docdir undefined in autoconf < 1.60) -docdir ?= $(datadir)/doc/$(PACKAGE) -gr_docdir = $(docdir)-$(DOCVER) - -# System configuration files -gr_prefsdir = $(GR_PREFSDIR) - -# Data directory for grc block wrappers -grc_blocksdir = $(pkgdatadir)/grc/blocks - -# Other common defines; use "+=" to add to these -STAMPS = -MOSTLYCLEANFILES = $(BUILT_SOURCES) $(STAMPS) *.pyc *.pyo *~ *.tmp *.loT \ - .unittests/* .unittests/python/* - -# Don't distribute the files defined in the variable 'no_dist_files' - -dist-hook: - @for file in $(no_dist_files); do \ - echo $(RM) $(distdir)/$$file; \ - $(RM) $(distdir)/$$file; \ - done diff --git a/Makefile.gen.gen b/Makefile.gen.gen deleted file mode 100644 index a6df8b8f3..000000000 --- a/Makefile.gen.gen +++ /dev/null @@ -1,70 +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. -# - -## ---------------------------------------------------------------- -## Special rule for regenerating the local Makefile.gen -## -## Define the variable 'makefile_gen_gen_command' to be the command -## that creates $(srcdir)/Makefile.gen . The rule below will check to -## make sure that it can create the generated file, and if not exits -## with an error -1. -## - -STAMPS += $(DEPDIR)/Makefile.gen-generate-generate-* - -generate-makefile $(srcdir)/Makefile.gen: -## parallel make protection; can't hurt - @trap 'rm -rf $(DEPDIR)/Makefile.gen-generate-*' 1 2 13 15; \ - if mkdir $(DEPDIR)/Makefile.gen-generate-lock 2>/dev/null; then \ -## This code is being executed by the first process. - rm -f $(DEPDIR)/Makefile.gen-generate-stamp; \ - rm -f $(DEPDIR)/Makefile.gen-generate-tmp; \ - touch $(DEPDIR)/Makefile.gen-generate-tmp; \ -## recreate $(srcdir)/Makefile.gen only if ... - do_recreate=0; \ - if test -f $(srcdir)/Makefile.gen; then \ -## the file exists and can be removed; or ... - if $(RM) $(srcdir)/Makefile.gen 2>/dev/null; then \ - do_recreate=1; \ - fi; \ - else \ -## the file doesn't exist, but can be created (e.g., by touching it). - if touch $(srcdir)/Makefile.gen 2>/dev/null; then \ - do_recreate=1; \ - fi; \ - fi; \ - if test "$$do_recreate" == "1"; then \ - echo "Regenerating $(srcdir)/Makefile.gen"; \ - $(makefile_gen_gen_command); \ - else \ - echo "Cannot recreate $(srcdir)/Makefile.gen because the directory or file is write-protected."; \ - exit -1; \ - fi; \ - mv -f $(DEPDIR)/Makefile.gen-generate-tmp $(DEPDIR)/Makefile.gen-generate-stamp; \ - rmdir $(DEPDIR)/Makefile.gen-generate-lock; \ - else \ -## This code is being executed by the follower processes. -## Wait until the first process is done. - while test -d $(DEPDIR)/Makefile.gen-generate-lock; do sleep 1; done; \ -## Succeed if and only if the first process succeeded. - test -f $(DEPDIR)/Makefile.gen-generate-stamp; exit $$?; \ - fi; diff --git a/Makefile.par.gen b/Makefile.par.gen deleted file mode 100644 index 22eb1a08f..000000000 --- a/Makefile.par.gen +++ /dev/null @@ -1,77 +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. -# - -STAMPS ?= -EXTRA_DIST ?= -MOSTLYCLEANFILES ?= - -## ---------------------------------------------------------------- -## Special rules for generating sources. Include this file when there -## are multiple targets ('gen_sources') being created using a single -## command. In this case, parallel build protection is required, and -## is provided by this file using a reasonably generic ruleset. For -## more info, see: -## -## http://sources.redhat.com/automake/automake.html#Multiple-Outputs -## -## If a single source is being created, then normal rules can be used; -## using this parallel protection will not hurt, but it also won't help. -## -## Define the variable 'par_gen_command' to be the command that -## creates the sources 'gen_sources' from the dependency files -## 'gen_sources_deps'. -## - -## These STAMPS will be removed upon "make clean", but are otherwise -## not used. - -STAMPS += $(DEPDIR)/stamp-sources-generate* - -## The following STAMP will be included in the archive, to show that -## this these rules have been followed. - -EXTRA_DIST += stamp-sources-generate -MOSTLYCLEANFILES += stamp-sources-generate - -stamp-sources-generate: $(gen_sources_deps) - @rm -f $(DEPDIR)/stamp-sources-generate-tmp - @touch $(DEPDIR)/stamp-sources-generate-tmp - $(par_gen_command) - @mv -f $(DEPDIR)/stamp-sources-generate-tmp $@ - -$(gen_sources): stamp-sources-generate -## Recover from the removal of $@ - @if test -f $@; then :; else \ - trap 'rm -rf $(DEPDIR)/stamp-sources-generate-*' 1 2 13 15; \ - if mkdir $(DEPDIR)/stamp-sources-generate-lock 2>/dev/null; then \ -## This code is being executed by the first process. - rm -f stamp-sources-generate; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-sources-generate; \ - rmdir $(DEPDIR)/stamp-sources-generate-lock; \ - else \ -## This code is being executed by the follower processes. -## Wait until the first process is done. - while test -d $(DEPDIR)/stamp-sources-generate-lock; do sleep 1; done; \ -## Succeed iff the first process succeeded. - test -f stamp-sources-generate; exit $$?; \ - fi; \ - fi; diff --git a/Makefile.swig b/Makefile.swig deleted file mode 100644 index 87e918c35..000000000 --- a/Makefile.swig +++ /dev/null @@ -1,209 +0,0 @@ -# -*- Makefile -*- -# -# Copyright 2009,2010 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -## This makefile should be included using -## include $(top_srcdir)/Makefile.swig -## in Makefile.am's which require SWIG wrapping / compilation. -## For just installing .i files, this Makefile is not required. - - -## include the built Makefile.swig.gen, always the one from the srcdir -include $(srcdir)/Makefile.swig.gen - - -## swig flags -## -w511 turns off keyword argument warning -## "-outdir $(builddir)" writes all generated output files to -## the local builddir (which should always be '.') -## In some older autotools, $(builddir) is not defined, so -## just use '.' instead. - -SWIG_PYTHON_FLAGS = \ - -fvirtual \ - -python \ - -modern \ - -keyword \ - -w511 \ - -outdir . - -STD_SWIG_PYTHON_ARGS = \ - $(SWIG_PYTHON_FLAGS) \ - $(STD_DEFINES_AND_INCLUDES) \ - $(WITH_SWIG_INCLUDES) \ - $(WITH_INCLUDES) - -# NOTE: -Linkage passive and -Linkage module don't define SWIG_init() -SWIG_GUILE_FLAGS = \ - -guile \ - -scm \ - -scmstub \ - -package gnuradio \ - -Linkage module \ - -proxy \ - -goopsprefix gr: \ - -emit-slot-accessors \ - -emit-setters \ - -outdir . - -## standard swig flags used by most components - -STD_SWIG_GUILE_ARGS = \ - $(SWIG_GUILE_FLAGS) \ - $(STD_DEFINES_AND_INCLUDES) \ - $(WITH_SWIG_INCLUDES) \ - $(WITH_INCLUDES) - -## standard SWIG LD flags for library creation - -STD_SWIG_LA_LD_FLAGS = \ - $(PYTHON_LDFLAGS) \ - -module \ - -avoid-version \ - $(NO_UNDEFINED) - -## standard SWIG library additions for library creation - -STD_SWIG_LA_LIB_ADD = -lstdc++ - -## standard SWIG CXXFLAGS -## This allows for code to be compiled with "-O1" instead of "-g -O2" -## for some systems, avoiding some optimization issues. - -STD_SWIG_CXX_FLAGS = @swig_CXXFLAGS@ - -# We drive the dependencies off of swig_built_sources. This variable -# ends up containing only the generated .py and/or .scm files, not the .h -# or .cc files. This allows us to use the pattern rules defined -# below to generate all the pieces without the parallel make -# problems that occur when both the .py's and .cc's are in swig_built_sources. - -swig_built_sources = - -# swig_all_built_sources contains swig_built_sources plus the .cc and .h files. -# It contains the files to remove from the distribution and the files to -# remove for make clean. - -swig_all_built_sources = - -if PYTHON -# Create a list of .py files based on the top level .i files. -PYTHON_GEN = $(foreach IFILE,$(TOP_SWIG_IFILES), $(subst .i,.py,$(IFILE))) -swig_built_sources += $(PYTHON_GEN) -swig_all_built_sources += $(PYTHON_GEN) - -# Now add .h, .cc to _all_ -swig_all_built_sources += $(foreach IFILE,$(TOP_SWIG_IFILES), $(patsubst %.i,python/%.h,$(IFILE))) -swig_all_built_sources += $(foreach IFILE,$(TOP_SWIG_IFILES), $(patsubst %.i,python/%.cc,$(IFILE))) -endif - -if GUILE -# Create a list of .scm files based on the top level .i files. -GUILE_GEN = $(foreach IFILE,$(TOP_SWIG_IFILES), $(patsubst %.i,gnuradio/%.scm,$(IFILE))) -swig_built_sources += $(GUILE_GEN) -swig_all_built_sources += $(GUILE_GEN) - -# Now add -primitive.scm, .cc to _all_ -swig_all_built_sources += $(foreach IFILE,$(TOP_SWIG_IFILES), $(patsubst %.i,gnuradio/%-primitive.scm,$(IFILE))) -swig_all_built_sources += $(foreach IFILE,$(TOP_SWIG_IFILES), $(patsubst %.i,guile/%.cc,$(IFILE))) -endif - -# N.B. Only $(swig_built_sources), not $(swig_all_built_sources) -BUILT_SOURCES += $(swig_built_sources) - -# Don't distribute any of the swig generated files -no_dist_files = $(swig_all_built_sources) - -CLEANFILES += $(swig_all_built_sources) -CLEANFILES += python/*.lo python/*.o python/*.d -CLEANFILES += guile/*.lo guile/*.o guile/*.d - - -## SWIG suffixes for automake to know about -SUFFIXES = .i .scm .py - -# Compile a .i to what guile needs. We use -o to set the output file name, -# or even with -outdir guile in SWIG_GUILE_ARGS, swig keeps putting a -# gnuradio_core_*_wrap.cxx in the source directory. -gnuradio/%.scm : %.i - @echo "Compile .i to .scm" - @test -d "guile" || $(mkinstalldirs) "guile" - @test -d "gnuradio" || $(mkinstalldirs) "gnuradio" - $(SWIG) $(STD_SWIG_GUILE_ARGS) $($*_swig_args) \ - -MD -MF guile/$*.Std \ - -module $* -o guile/$*.cc $< - $(SED) -e 's|guile/\(.*\)\.cc:|gnuradio/\1.scm:|' guile/$*.Std > guile/$*.d - $(SED) -i -e 's/<--dummy-[0-9]\+-->/<top>/g' gnuradio/$*.scm - $(SED) -i -e 's/^(export /(export-safely /' gnuradio/$*.scm - $(RM) guile/$*.Std - -# Compile a .i file to what python needs -.i.py: - @echo "Compile .i to .py" - @test -d "python" || $(mkinstalldirs) "python" - $(SWIG) $(STD_SWIG_PYTHON_ARGS) $($*_swig_args) \ - -MD -MF python/$*.Std \ - -module $* -o python/$*.cc -oh python/$*.h $< - $(SED) -e 's|python/\(.*\)\.cc:|\1.py:|' python/$*.Std > python/$*.d - $(RM) python/$*.Std - -## ------------------------------------------------------------------------ -## Rule that (re)generates Makefile.swig.gen using TOP_SWIG_IFILES and -## Makefile.swig.gen.t -## - -## Create $(srcdir)/Makefile.swig.gen, containing all of the rules -## for running SWIG to generate or re-generate outputs. SWIG file -## names are to be defined in TOP_SWIG_IFILES, and must include the -## full path to the file and full filename including extension. This -## Makefile addition will be made only if either it does not exist or -## if the top-level template has been modified. - -generate-makefile-swig $(srcdir)/Makefile.swig.gen: $(top_srcdir)/Makefile.swig.gen.t -## recreate $(srcdir)/Makefile.swig.gen only if ... - @do_recreate=0; \ - if test -f $(srcdir)/Makefile.swig.gen; then \ -## the file exists and can be removed; or ... - if $(RM) $(srcdir)/Makefile.swig.gen 2>/dev/null; then \ - if touch $(srcdir)/Makefile.swig.gen 2>/dev/null; then \ - do_recreate=1; \ - fi; \ - fi; \ - else \ -## the file doesn't exist, but can be created (e.g., by touching it). - if touch $(srcdir)/Makefile.swig.gen 2>/dev/null; then \ - do_recreate=1; \ - fi; \ - fi; \ - if test "$$do_recreate" == "1"; then \ - echo "Regenerating $(srcdir)/Makefile.swig.gen"; \ - for TFILE in $(TOP_SWIG_IFILES); do \ -## retrieve just the filename, without path or extension - TNAME=`python -c "import os.path as op; (dN, fN) = op.split ('$$TFILE'); (fbN, fE) = op.splitext (fN); print fbN;"`; \ -## Replace the @-named strings in the template Makefile for SWIG. - $(SED) -e 's|@NAME@|'$$TNAME'|g;' < $(top_srcdir)/Makefile.swig.gen.t >> $(srcdir)/Makefile.swig.gen; \ - echo "" >> $(srcdir)/Makefile.swig.gen; \ - done; \ - else \ - echo "Cannot recreate $(srcdir)/Makefile.swig.gen because the directory or file is write-protected."; \ - exit -1; \ - fi; - diff --git a/Makefile.swig.gen.t b/Makefile.swig.gen.t deleted file mode 100644 index 0410413ed..000000000 --- a/Makefile.swig.gen.t +++ /dev/null @@ -1,144 +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 @NAME@.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/@NAME@ -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/@NAME@ -## -## 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. - -@NAME@_pythondir_category ?= gnuradio/@NAME@ -@NAME@_pylibdir_category ?= $(@NAME@_pythondir_category) -@NAME@_pythondir = $(pythondir)/$(@NAME@_pythondir_category) -@NAME@_pylibdir = $(pyexecdir)/$(@NAME@_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -@NAME@_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/@NAME@ -# FIXME: determince whether these should be installed with gnuradio. -@NAME@_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -@NAME@_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 > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -@NAME@_swiginclude_HEADERS = \ - @NAME@.i \ - $(@NAME@_swiginclude_headers) - -if PYTHON -@NAME@_pylib_LTLIBRARIES = \ - _@NAME@.la - -_@NAME@_la_SOURCES = \ - python/@NAME@.cc \ - $(@NAME@_la_swig_sources) - -@NAME@_python_PYTHON = \ - @NAME@.py \ - $(@NAME@_python) - -_@NAME@_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(@NAME@_la_swig_libadd) - -_@NAME@_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(@NAME@_la_swig_ldflags) - -_@NAME@_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(@NAME@_la_swig_cxxflags) - -python/@NAME@.cc: @NAME@.py -@NAME@.py: @NAME@.i - -# Include the python dependencies for this file --include python/@NAME@.d - -endif # end of if python - -if GUILE - -@NAME@_scmlib_LTLIBRARIES = \ - libguile-gnuradio-@NAME@.la -libguile_gnuradio_@NAME@_la_SOURCES = \ - guile/@NAME@.cc \ - $(@NAME@_la_swig_sources) -nobase_@NAME@_scm_DATA = \ - gnuradio/@NAME@.scm \ - gnuradio/@NAME@-primitive.scm -libguile_gnuradio_@NAME@_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(@NAME@_la_swig_libadd) -libguile_gnuradio_@NAME@_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(@NAME@_la_swig_ldflags) -libguile_gnuradio_@NAME@_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(@NAME@_la_swig_cxxflags) - -guile/@NAME@.cc: gnuradio/@NAME@.scm -gnuradio/@NAME@.scm: @NAME@.i -gnuradio/@NAME@-primitive.scm: gnuradio/@NAME@.scm - -# Include the guile dependencies for this file --include guile/@NAME@.d - -endif # end of GUILE - @@ -1,21 +0,0 @@ -# -# 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. -# - -See http://gnuradio.org for the latest information about this software. @@ -1,29 +1,29 @@ # -# Copyright 2001,2002,2003,2004,2005,2006,2007,2009 Free Software Foundation, Inc. -# +# Copyright 2001-2007,2009,2012 Free Software Foundation, Inc. +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# Welcome to GNU Radio! Please see http://gnuradio.org for the wiki, bug tracking, -and source code viewer. +and source code viewer. If you've got questions about GNU Radio, please subscribe to the discuss-gnuradio mailing list and post your questions there. @@ -53,14 +53,13 @@ How to Build GNU Radio: for additional software. On Linux, this means what "distribution" means. - With the exception of SDCC, the following GNU/Linux - distributions are known to come with all required dependencies - pre-packaged: Ubuntu 8.10, SuSE 10.0 (the pay version, not the - free download), Fedora Core 9. Other distribution may work too. - We know these three are easy. The required packages may be - contained on your installation CD/DVD, or may be loaded over the - net. The specifics vary depending on your GNU/Linux - distribution. + The following GNU/Linux distributions are known to come with all + required dependencies pre-packaged: Ubuntu >8.10, SuSE 10.0 (the + pay version, not the free download), Fedora Core >9. Other + distribution may work too. We know these three are easy. The + required packages may be contained on your installation CD/DVD, + or may be loaded over the net. The specifics vary depending on + your GNU/Linux distribution. On systems using pkgsrc (e.g. NetBSD and Dragonfly), build meta-packages/gnuradio, which will build a previous release and @@ -78,12 +77,21 @@ How to Build GNU Radio: $ cmake [OPTIONS] $(srcdir) $ make $ make test - $ sudo make instal - + $ sudo make install That's it! +Options: +Useful options include setting the install prefix and the build type: + + -DCMAKE_INSTALL_PREFIX=<directory to install to> + -DCMAKE_BUILD_TYPE="<type>" + +Currently, GNU Radio has a "Debug" type that builds with '-g -O2' +useful for debugging the software and a "Release" type that builds +with '-O3', which is the default. + ------------------------------------------------------------------------------- @@ -128,20 +136,7 @@ Note that the examples below are written with "make". They probably should say "gmake", as GNU make is installed as gmake when it is not the native make. -(1) The "autotools" - - autoconf 2.57 or later - automake 1.7.4 or later - libtool 1.5 or later - -If your system has automake-1.4, there's a good chance it also has -automake-1.7 or later. Check your install disk and/or (on GNU/Linux) -try: - - $ man update-alternatives - -for info on how some distributions support multiple versions. - +(1) cmake 2.6 or later http://www.cmake.org/cmake/resources/software.html (2) pkgconfig 0.15.0 or later http://www.freedesktop.org/Software/pkgconfig @@ -198,44 +193,44 @@ Unit testing framework for C++. As of repository version 4045, gnuradio requires version 1.3.31 or newer. -(9) SDCC: Small Device C Compiler. http://sdcc.sourceforge.net/ - ---> Not required as of v3.5 - - -(10) Guile 1.6 or 1.8 - -Scheme interpreter. http://www.gnu.org/software/guile/guile.html - - -(11) GNU Scientific Library (gsl) 1.10 or later +(9) GNU Scientific Library (gsl) 1.10 or later The GNU Radio core library uses some routines from here. Optional, but nice to have: -(12) wxPython. Python binding for the wxWidgets GUI framework. Use +(10) wxPython. Python binding for the wxWidgets GUI framework. Use version 2.8 or later. Again, almost all systems have this available. As a last resort, build it from source (not recommended!) http://www.wxpython.org -(13) xmlto version ? or later. http://cyberelk.net/tim/xmlto/index.html +(11) xmlto version ? or later. http://cyberelk.net/tim/xmlto/index.html Wrapper for XML conversion tools to ease e.g. making html from docbook. -(14) Python Cheetah extensions 2.0.0 or later -(15) Python lxml wrappers 2.0.0 or later -(16) Python gtk wrappers 2.10.0 or later +(12) Python Cheetah extensions 2.0.0 or later +(13) Python lxml wrappers 2.0.0 or later +(14) Python gtk wrappers 2.10.0 or later The GNU Radio Companion application requires these additional Python libraries to be installed. +The gr-qtgui requires these packages: + +(15) Qt 4.4 or later +(16) Qwt 5.2 or later +(17) PyQt 4.4 or later +(18) PyQwt 5.2 or later + +It is also useful to have Python's Scipy and Matplot lib packages to +run some of the example. + ---------------------------------------------------------------- -If you've got doxygen installed, the build process creates +If you have doxygen installed, the build process creates documentation for the class hierarchy etc. Point your browser at gnuradio/gnuradio-core/doc/html/index.html diff --git a/README-win32-mingw-short.txt b/README-win32-mingw-short.txt index 9001e9f15..0e82a705d 100644 --- a/README-win32-mingw-short.txt +++ b/README-win32-mingw-short.txt @@ -2,7 +2,7 @@ Building and using gnuradio on windows (win32) using mingw Required tools and libraries -MingW and Msys +MingW and Msys Download the latest stable version from the mingw site oand follow their installation instructions) Python for windows version 2.4 (or higher) diff --git a/README.building-boost b/README.building-boost index 511adb58b..a281e8bd7 100644 --- a/README.building-boost +++ b/README.building-boost @@ -1,35 +1,48 @@ -Until boost 1.35 (or later) ships with the distributions, you'll need -to download and build it yourself. It's not hard, and it can -peacefully coexist with earlier versions of boost. +Most distributions have the required version of Boost (1.35) ready for +installation using their standard package installation tools (apt-get, +yum, etc.). + +If running a distribution that requires boost 1.35 (or later) be built +from scratch, these instructions explain how to do so, and in a way +that allows it to peacefully coexist with earlier versions of boost. Download the latest version of boost from boost.sourceforge.net. -(boost_1_36_0.tar.bz2 was the latest when this was written) +(boost_1_49_0.tar.bz2 was the latest when this was written). Different +Boost versions often have different installations. If these +instructions don't work, check the website www.boost.org for more +help. unpack it somewhere cd into the resulting directory -$ cd boost_1_36_0 +$ cd boost_1_49_0 -# Pick a prefix to install it into. I used /opt/boost_1_36_0 +# Pick a prefix to install it into. I used /opt/boost_1_49_0 -$ BOOST_PREFIX=/opt/boost_1_36_0 +$ BOOST_PREFIX=/opt/boost_1_49_0 -$ ./configure --prefix=$BOOST_PREFIX --with-libraries=thread,date_time,program_options -$ make -$ make install +$ ./bootstrap.sh +$ sudo ./b2 --prefix=$BOOST_PREFIX --with-thread --with-date_time --with-program_options --with-filesystem --with-system --layout=versioned threading=multi variant=release install # Done! That was easy! ----------------------------------------------------------------- +Note that you don't have to specify each library, which will then +build all Boost libraries and projects. By specifying only those +required will just save compilation time. + -Now, tell gnuradio where to find it: +---------------------------------------------------------------------- -$ export LD_LIBRARY_PATH=$BOOST_PREFIX/lib -$ cd <path-to-top-of-gnuradio-tree> -$ ./bootstrap -$ ./configure --with-boost=$BOOST_PREFIX # plus whatever config args you usually use +Installing GNU Radio with new Boost libraries. -$ make && make check +Tell cmake to look for the Boost libraries and header files in the new location with the folloing command: + +$ cd <build directory> +$ cmake -DBOOST_ROOT=$BOOST_PREFIX -DBoost_INCLUDE_DIR=$BOOST_PREFIX/include/boost-1_49/ -DBoost_LIBRARY_DIRS=$BOOST_PREFIX/lib <path to gnuradio source tree> +$ make +$ make test $ sudo make install +See README for more installation details. + diff --git a/README.hacking b/README.hacking index de6358abf..58b269887 100644 --- a/README.hacking +++ b/README.hacking @@ -1,24 +1,24 @@ # -*- Outline -*- # # Copyright 2004,2007,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. -# +# Random notes on coding conventions, some explanations about why things aren't done differently, etc, etc, @@ -103,7 +103,7 @@ The big win is when you're staring at a block of code it's obvious which of the things being assigned to persist outside of the block. This also keeps you from having to be creative with parameter names for methods and constructors. You just use the same name as the -instance variable, without the d_. +instance variable, without the d_. class gr_wonderfulness { std::string d_name; @@ -147,7 +147,7 @@ See http://www.boost.org/libs/smart_ptr/smart_ptr.htm * Unit tests Build unit tests for everything non-trivial and run them after every -change. Check out Extreme Programming: +change. Check out Extreme Programming: http://c2.com/cgi/wiki?ExtremeProgrammingRoadmap Unit tests should also be written for all examples. This should kill @@ -177,7 +177,7 @@ We use the standard unittest package for unit testing of Python code. * Subversion line ending styles -All text files in the tree should have the subversion property +All text files in the tree should have the subversion property 'svn:eol-style' set to 'native', with the following exceptions: config/*.m4 @@ -192,7 +192,7 @@ enable-auto-props=yes [auto-props] *.c = svn:eol-style=native -*.cc = svn:eol-style=native +*.cc = svn:eol-style=native *.i = svn:eol-style=native *.h = svn:eol-style=native *.am = svn:eol-style=native @@ -303,7 +303,7 @@ To specify a rate use: add_option("-r", "--sample-rate", type="eng_float", default=<your-default-here>, help="specify sample-rate [default=%default]") - + If your application has a verbose option, use: @@ -311,7 +311,7 @@ If your application has a verbose option, use: help="verbose output") -If your application allows the user to specify the "fast USB" options, use: +If your application allows the user to specify the "fast USB" options, use: add_option("", "--fusb-block-size", type="intx", default=0, help="specify fast usb block size [default=%default]") diff --git a/bootstrap b/bootstrap deleted file mode 100755 index b40afb20c..000000000 --- a/bootstrap +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -# Copyright 2001,2005,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. - - -rm -fr config.cache autom4te*.cache - -aclocal -I config -autoconf -autoheader -libtoolize --automake -automake --add-missing -Wno-portability -Wno-override -Wnone -#automake --add-missing -Wno-portability - -# Run bootstrap in any subprojects -(cd volk ; ./bootstrap) diff --git a/cmake/Modules/FindJack.cmake b/cmake/Modules/FindJack.cmake index a39fd6347..4bdfe0a7e 100644 --- a/cmake/Modules/FindJack.cmake +++ b/cmake/Modules/FindJack.cmake @@ -39,7 +39,7 @@ else (JACK_LIBRARIES AND JACK_INCLUDE_DIRS) /opt/local/include /sw/include ) - + find_library(JACK_LIBRARY NAMES jack diff --git a/cmake/Modules/FindOSS.cmake b/cmake/Modules/FindOSS.cmake index 105b3ec9c..4c886de5f 100644 --- a/cmake/Modules/FindOSS.cmake +++ b/cmake/Modules/FindOSS.cmake @@ -43,4 +43,4 @@ MARK_AS_ADVANCED ( LINUX_OSS_INCLUDE_DIR SYS_OSS_INCLUDE_DIR MACHINE_OSS_INCLUDE_DIR -) +) diff --git a/cmake/Modules/FindPortaudio.cmake b/cmake/Modules/FindPortaudio.cmake index 158e20ee5..4b7175438 100644 --- a/cmake/Modules/FindPortaudio.cmake +++ b/cmake/Modules/FindPortaudio.cmake @@ -48,7 +48,7 @@ else (PORTAUDIO_LIBRARIES AND PORTAUDIO_INCLUDE_DIRS) /opt/local/include /sw/include ) - + find_library(PORTAUDIO_LIBRARY NAMES portaudio @@ -58,7 +58,7 @@ else (PORTAUDIO_LIBRARIES AND PORTAUDIO_INCLUDE_DIRS) /opt/local/lib /sw/lib ) - + find_path(PORTAUDIO_LIBRARY_DIR NAMES portaudio @@ -68,26 +68,26 @@ else (PORTAUDIO_LIBRARIES AND PORTAUDIO_INCLUDE_DIRS) /opt/local/lib /sw/lib ) - + set(PORTAUDIO_INCLUDE_DIRS ${PORTAUDIO_INCLUDE_DIR} ) set(PORTAUDIO_LIBRARIES ${PORTAUDIO_LIBRARY} ) - + set(PORTAUDIO_LIBRARY_DIRS ${PORTAUDIO_LIBRARY_DIR} ) - + set(PORTAUDIO_VERSION 18 ) - + if (PORTAUDIO_INCLUDE_DIRS AND PORTAUDIO_LIBRARIES) set(PORTAUDIO_FOUND TRUE) endif (PORTAUDIO_INCLUDE_DIRS AND PORTAUDIO_LIBRARIES) - + if (PORTAUDIO_FOUND) if (NOT Portaudio_FIND_QUIETLY) message(STATUS "Found Portaudio: ${PORTAUDIO_LIBRARIES}") diff --git a/cmake/Modules/FindQwt.cmake b/cmake/Modules/FindQwt.cmake index cbda16aa0..f2cf3440d 100644 --- a/cmake/Modules/FindQwt.cmake +++ b/cmake/Modules/FindQwt.cmake @@ -23,7 +23,7 @@ find_library (QWT_LIBRARIES /sw/lib ) -# handle the QUIETLY and REQUIRED arguments and set QWT_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set QWT_FOUND to TRUE if # all listed variables are TRUE include ( FindPackageHandleStandardArgs ) find_package_handle_standard_args( Qwt DEFAULT_MSG QWT_LIBRARIES QWT_INCLUDE_DIRS ) diff --git a/cmake/Modules/GrBoost.cmake b/cmake/Modules/GrBoost.cmake index 36890014d..7c0d42134 100644 --- a/cmake/Modules/GrBoost.cmake +++ b/cmake/Modules/GrBoost.cmake @@ -1,17 +1,17 @@ # Copyright 2010-2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/cmake/Modules/GrComponent.cmake b/cmake/Modules/GrComponent.cmake index 708f035ae..f802cdcb4 100644 --- a/cmake/Modules/GrComponent.cmake +++ b/cmake/Modules/GrComponent.cmake @@ -1,17 +1,17 @@ # Copyright 2010-2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/cmake/Modules/GrMiscUtils.cmake b/cmake/Modules/GrMiscUtils.cmake index 7b0c00272..189e97c7e 100644 --- a/cmake/Modules/GrMiscUtils.cmake +++ b/cmake/Modules/GrMiscUtils.cmake @@ -1,17 +1,17 @@ # Copyright 2010-2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/cmake/Modules/GrPackage.cmake b/cmake/Modules/GrPackage.cmake index 2d2dfa531..d1b0b3320 100644 --- a/cmake/Modules/GrPackage.cmake +++ b/cmake/Modules/GrPackage.cmake @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/cmake/Modules/GrPlatform.cmake b/cmake/Modules/GrPlatform.cmake index dde65cee5..5b7e886f8 100644 --- a/cmake/Modules/GrPlatform.cmake +++ b/cmake/Modules/GrPlatform.cmake @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/cmake/Modules/GrSwig.cmake b/cmake/Modules/GrSwig.cmake index 4bcd67eb9..b8e719353 100644 --- a/cmake/Modules/GrSwig.cmake +++ b/cmake/Modules/GrSwig.cmake @@ -1,17 +1,17 @@ # Copyright 2010-2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, @@ -67,7 +67,7 @@ function(GR_SWIG_MAKE_DOCS output_file) #call doxygen on the Doxyfile + input headers add_custom_command( OUTPUT ${OUTPUT_DIRECTORY}/xml/index.xml - ${OUTPUT_DIRECTORY}/xml/combine.xslt + ${OUTPUT_DIRECTORY}/xml/combine.xslt DEPENDS ${input_files} ${GR_SWIG_DOCS_SOURCE_DEPS} ${tag_deps} COMMAND ${DOXYGEN_EXECUTABLE} ${OUTPUT_DIRECTORY}/Doxyfile COMMENT "Generating doxygen xml for ${name} docs" @@ -75,7 +75,7 @@ function(GR_SWIG_MAKE_DOCS output_file) #call the swig_doc script on the xml files add_custom_command( - OUTPUT ${output_file} + OUTPUT ${output_file} DEPENDS ${input_files} ${stamp-file} ${OUTPUT_DIRECTORY}/xml/index.xml COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${CMAKE_SOURCE_DIR}/docs/doxygen/swig_doc.py diff --git a/cmake/Modules/GrTest.cmake b/cmake/Modules/GrTest.cmake index bbb525dcc..4723cca58 100644 --- a/cmake/Modules/GrTest.cmake +++ b/cmake/Modules/GrTest.cmake @@ -1,17 +1,17 @@ # Copyright 2010-2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/cmake/Modules/GrVersion.cmake b/cmake/Modules/GrVersion.cmake index 7aa13f556..9199a702b 100644 --- a/cmake/Modules/GrVersion.cmake +++ b/cmake/Modules/GrVersion.cmake @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, @@ -22,17 +22,6 @@ if(DEFINED __INCLUDED_GR_VERSION_CMAKE) endif() set(__INCLUDED_GR_VERSION_CMAKE TRUE) -######################################################################## -# Extract variables from version.sh -######################################################################## -include(GrPython) -message(STATUS "Extracting version information from version.sh...") -execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "print open('${CMAKE_SOURCE_DIR}/version.sh').read().replace('=', ';').replace('\\n', ';')" - OUTPUT_VARIABLE VERSION_INFO OUTPUT_STRIP_TRAILING_WHITESPACE -) -include(CMakeParseArgumentsCopy) -CMAKE_PARSE_ARGUMENTS(VERSION_INFO "" "MAJOR_VERSION;API_COMPAT;MINOR_VERSION;MAINT_VERSION" "" ${VERSION_INFO}) - #eventually, replace version.sh and fill in the variables below set(MAJOR_VERSION ${VERSION_INFO_MAJOR_VERSION}) set(API_COMPAT ${VERSION_INFO_API_COMPAT}) diff --git a/cmake/msvc/inttypes.h b/cmake/msvc/inttypes.h index 1c2baa82e..0a1b60fc1 100644 --- a/cmake/msvc/inttypes.h +++ b/cmake/msvc/inttypes.h @@ -1,32 +1,32 @@ // ISO C9x compliant inttypes.h for Microsoft Visual Studio -// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 -// +// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 +// // Copyright (c) 2006 Alexander Chemeris -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: -// +// // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. -// +// // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. -// +// // 3. The name of the author may be used to endorse or promote products // derived from this software without specific prior written permission. -// +// // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// 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. -// +// /////////////////////////////////////////////////////////////////////////////// #ifndef _MSC_VER // [ diff --git a/cmake/msvc/stdint.h b/cmake/msvc/stdint.h index ab6d37e11..108bc8982 100644 --- a/cmake/msvc/stdint.h +++ b/cmake/msvc/stdint.h @@ -1,32 +1,32 @@ // ISO C9x compliant stdint.h for Microsoft Visual Studio -// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 -// +// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 +// // Copyright (c) 2006-2008 Alexander Chemeris -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: -// +// // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. -// +// // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. -// +// // 3. The name of the author may be used to endorse or promote products // derived from this software without specific prior written permission. -// +// // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// 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. -// +// /////////////////////////////////////////////////////////////////////////////// #ifndef _MSC_VER // [ diff --git a/cmake/msvc/sys/time.h b/cmake/msvc/sys/time.h index 998b5d7bb..8800ed5cb 100644 --- a/cmake/msvc/sys/time.h +++ b/cmake/msvc/sys/time.h @@ -26,32 +26,32 @@ long tv_nsec; /* Additional nanoseconds since */ }; -struct timezone +struct timezone { int tz_minuteswest; /* minutes W of Greenwich */ int tz_dsttime; /* type of dst correction */ }; - + static inline int gettimeofday(struct timeval *tv, struct timezone *tz) { FILETIME ft; unsigned __int64 tmpres = 0; static int tzflag; - + if (NULL != tv) { GetSystemTimeAsFileTime(&ft); - + tmpres |= ft.dwHighDateTime; tmpres <<= 32; tmpres |= ft.dwLowDateTime; - + /*converting file time to unix epoch*/ - tmpres -= DELTA_EPOCH_IN_MICROSECS; + tmpres -= DELTA_EPOCH_IN_MICROSECS; tv->tv_sec = (long)(tmpres / 1000000UL); tv->tv_usec = (long)(tmpres % 1000000UL); } - + if (NULL != tz) { if (!tzflag) @@ -62,7 +62,7 @@ static inline int gettimeofday(struct timeval *tv, struct timezone *tz) tz->tz_minuteswest = _timezone / 60; tz->tz_dsttime = _daylight; } - + return 0; } diff --git a/config.guess b/config.guess deleted file mode 100644 index d622a44e5..000000000 --- a/config.guess +++ /dev/null @@ -1,1530 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. - -timestamp='2012-02-10' - -# This file 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 2 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/>. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to <config-patches@gnu.org> and include a ChangeLog -# entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to <config-patches@gnu.org>." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include <stdio.h> /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include <sys/systemcfg.h> - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include <stdlib.h> - #include <unistd.h> - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include <unistd.h> - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` - case ${UNAME_PROCESSOR} in - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:MSYS*:*) - echo ${UNAME_MACHINE}-pc-msys - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - aarch64_be:Linux:*:*) - UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf - fi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` - echo ${UNAME_MACHINE}-pc-isc$UNAME_REL - elif /bin/uname -X 2>/dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says <Richard.M.Bartel@ccMail.Census.GOV> - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes <hewes@openmarket.com>. - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NEO-?:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; - x86_64:VMkernel:*:*) - echo ${UNAME_MACHINE}-unknown-esx - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c <<EOF -#ifdef _SEQUENT_ -# include <sys/types.h> -# include <sys/utsname.h> -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include <sys/param.h> - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include <sys/param.h> -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 <<EOF -$0: unable to guess system type - -This script, last modified $timestamp, has failed to recognize -the operating system you are using. It is advised that you -download the most up to date version of the config scripts from - - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD -and - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -If the version you run ($0) is already up to date, please -send the following data and any information you think might be -pertinent to <config-patches@gnu.org> in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/config.sub b/config.sub deleted file mode 100644 index c894da455..000000000 --- a/config.sub +++ /dev/null @@ -1,1773 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. - -timestamp='2012-02-10' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file 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 2 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/>. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to <config-patches@gnu.org>. Submit a context -# diff and a properly formatted GNU ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to <config-patches@gnu.org>." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | be32 | be64 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | epiphany \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 \ - | ns16k | ns32k \ - | open8 \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pyramid \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | we32k \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - strongarm | thumb | xscale) - basic_machine=arm-unknown - ;; - xgate) - basic_machine=$basic_machine-unknown - os=-none - ;; - xscaleeb) - basic_machine=armeb-unknown - ;; - - xscaleel) - basic_machine=armel-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pyramid-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze) - basic_machine=microblaze-xilinx - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i386-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc | ppcbe) basic_machine=powerpc-unknown - ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - strongarm-* | thumb-*) - basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tile*) - basic_machine=$basic_machine-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - xscale-* | xscalee[bl]-*) - basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -nacl*) - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - tic54x-*) - os=-coff - ;; - tic55x-*) - os=-coff - ;; - tic6x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/config/.gitignore b/config/.gitignore deleted file mode 100644 index 16f775e32..000000000 --- a/config/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -/*.cache -/*.la -/*.lo -/*.pc -/.deps -/.la -/.libs -/.lo -/Makefile -/Makefile.in -/libtool.m4 -/lt~obsolete.m4 -/ltsugar.m4 -/ltversion.m4 -/ltoptions.m4 diff --git a/config/Makefile.am b/config/Makefile.am deleted file mode 100644 index 3adee6d30..000000000 --- a/config/Makefile.am +++ /dev/null @@ -1,92 +0,0 @@ -# -# Copyright 2001,2006,2008,2009,2010 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 - -# Install m4 macros in this directory -m4datadir = $(datadir)/aclocal - -# List your m4 macros here -m4macros = \ - acx_cblas.m4 \ - acx_pthread.m4 \ - ax_boost_base.m4 \ - ax_boost_date_time.m4 \ - ax_boost_filesystem.m4 \ - ax_boost_iostreams.m4 \ - ax_boost_program_options.m4 \ - ax_boost_python.m4 \ - ax_boost_regex.m4 \ - ax_boost_serialization.m4 \ - ax_boost_signals.m4 \ - ax_boost_system.m4 \ - ax_boost_test_exec_monitor.m4 \ - ax_boost_thread.m4 \ - ax_boost_unit_test_framework.m4 \ - ax_boost_wserialization.m4 \ - bnv_have_qt.m4 \ - cppunit.m4 \ - grc_build.m4 \ - grc_docs.m4 \ - grc_gnuradio_core.m4 \ - grc_gnuradio_examples.m4 \ - grc_grc.m4 \ - grc_gr_atsc.m4 \ - grc_gr_audio.m4 \ - grc_gr_comedi.m4 \ - grc_gr_fcd.m4 \ - grc_gr_noaa.m4 \ - grc_gr_trellis.m4 \ - grc_gr_video_sdl.m4 \ - grc_gr_vocoder.m4 \ - grc_gr_wxgui.m4 \ - grc_gruel.m4 \ - gr_check_createfilemapping.m4 \ - gr_check_mc4020.m4 \ - gr_check_shm_open.m4 \ - gr_doxygen.m4 \ - gr_fortran.m4 \ - gr_git.m4 \ - gr_gprof.m4 \ - gr_lib64.m4 \ - gr_libgnuradio_core_extra_ldflags.m4 \ - gr_no_undefined.m4 \ - gr_pwin32.m4 \ - gr_python.m4 \ - gr_require_mc4020.m4 \ - gr_scripting.m4 \ - gr_set_md_cpu.m4 \ - gr_subversion.m4 \ - gr_swig.m4 \ - gr_sysv_shm.m4 \ - gr_version.m4 \ - gr_vmcircbuf.m4 \ - lf_cc.m4 \ - lf_cxx.m4 \ - lf_warnings.m4 \ - lf_x11.m4 \ - macosx_audiounit.m4 \ - mkstemp.m4 \ - onceonly.m4 \ - pkg.m4 \ - sdl.m4 - -EXTRA_DIST += $(m4macros) diff --git a/config/acx_cblas.m4 b/config/acx_cblas.m4 deleted file mode 100644 index 38d859828..000000000 --- a/config/acx_cblas.m4 +++ /dev/null @@ -1,227 +0,0 @@ -# =========================================================================== -# http://autoconf-archive.cryp.to/acx_blas.html -# =========================================================================== -# -# SYNOPSIS -# -# ACX_CBLAS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -# -# DESCRIPTION -# -# This macro looks for a library that implements the CBLAS linear-algebra -# interface (see http://www.netlib.org/blas/). On success, it sets the -# CBLAS_LIBS output variable to hold the requisite library linkages. -# -# To link with BLAS, you should link with: -# -# $CBLAS_LIBS $LIBS -# -# Many libraries are searched for, from ATLAS to CXML to ESSL. The user -# may also use --with-blas=<lib> in order to use some specific CBLAS -# library <lib>. In order to link successfully, however, be aware that you -# will probably need to use the same Fortran compiler (which can be set -# via the F77 env. var.) as was used to compile the BLAS library. -# -# ACTION-IF-FOUND is a list of shell commands to run if a CBLAS library is -# found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it is -# not found. If ACTION-IF-FOUND is not specified, the default action will -# define HAVE_CBLAS. -# -# This macro requires autoconf 2.50 or later. -# -# LAST MODIFICATION -# -# 2008-04-12 -# -# COPYLEFT -# -# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu> -# Copyright (c) 2008 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/>. -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Macro Archive. When you make and -# distribute a modified version of the Autoconf Macro, you may extend this -# special exception to the GPL to apply to your modified version as well. - -AC_DEFUN([ACX_CBLAS], [ -AC_PREREQ(2.50) -dnl AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS]) -AC_REQUIRE([AC_CANONICAL_HOST]) -acx_cblas_ok=no - -AC_ARG_WITH(cblas, - [AC_HELP_STRING([--with-cblas=<lib>], [use CBLAS library <lib>])]) -case $with_cblas in - yes | "") ;; - no) acx_cblas_ok=disable ;; - -* | */* | *.a | *.so | *.so.* | *.o) CBLAS_LIBS="$with_cblas" ;; - *) CBLAS_LIBS="-l$with_cblas" ;; -esac - - -acx_cblas_save_LIBS="$LIBS" -LIBS="$LIBS $FLIBS" - -# First, check CBLAS_LIBS environment variable -if test $acx_cblas_ok = no; then -if test "x$CBLAS_LIBS" != x; then - save_LIBS="$LIBS"; LIBS="$CBLAS_LIBS $LIBS" - AC_MSG_CHECKING([for cblas_sgemm in $CBLAS_LIBS]) - AC_TRY_LINK_FUNC(cblas_sgemm, [acx_cblas_ok=yes], [CBLAS_LIBS=""]) - AC_MSG_RESULT($acx_cblas_ok) - LIBS="$save_LIBS" -fi -fi - -# CBLAS linked to by default? (happens on some supercomputers) -if test $acx_cblas_ok = no; then - save_LIBS="$LIBS"; LIBS="$LIBS" - AC_CHECK_FUNC(cblas_sgemm, [acx_cblas_ok=yes]) - LIBS="$save_LIBS" -fi - -# CBLAS in ATLAS library? (http://math-atlas.sourceforge.net/) -if test $acx_cblas_ok = no; then - AC_CHECK_LIB(atlas, ATL_xerbla, - [AC_CHECK_LIB(cblas, cblas_dgemm, - [acx_cblas_ok=yes - CBLAS_LIBS="-lcblas -latlas"], - [], [-latlas])], - [], [-latlas]) -fi - -# CBLAS in ATLAS library in /usr/lib64/atlas (if not cross-compiling) -if test $acx_cblas_ok = no && test "$cross_compiling" = no; then - unset ac_cv_lib_atlas_ATL_xerbla - unset ac_cv_lib_cblas_cblas_dgemm - AC_CHECK_LIB(atlas, ATL_xerbla, - [AC_CHECK_LIB(cblas, cblas_dgemm, - [acx_cblas_ok=yes - CBLAS_LIBS="-L/usr/lib64/atlas -lcblas -latlas"], - [], [-L/usr/lib64/atlas -latlas])], - [], [-L/usr/lib64/atlas -latlas]) -fi - -# CBLAS in ATLAS library in /usr/lib/atlas (if not cross-compiling) -if test $acx_cblas_ok = no && test "$cross_compiling" = no; then - unset ac_cv_lib_atlas_ATL_xerbla - unset ac_cv_lib_cblas_cblas_dgemm - AC_CHECK_LIB(atlas, ATL_xerbla, - [AC_CHECK_LIB(cblas, cblas_dgemm, - [acx_cblas_ok=yes - CBLAS_LIBS="-L/usr/lib/atlas -lcblas -latlas"], - [], [-L/usr/lib/atlas -latlas])], - [], [-L/usr/lib/atlas -latlas]) -fi - - -# CBLAS in PhiPACK libraries? (requires generic BLAS lib, too) -if test $acx_cblas_ok = no; then - AC_CHECK_LIB(cblas, cblas_sgemm, - [AC_CHECK_LIB(dgemm, cblas_dgemm, - [AC_CHECK_LIB(sgemm, cblas_sgemm, - [acx_cblas_ok=yes; CBLAS_LIBS="-lsgemm -ldgemm -lblas"], - [], [-lblas])], - [], [-lblas])]) -fi - -# BLAS in Intel MKL library? -if test $acx_cblas_ok = no; then - AC_CHECK_LIB(mkl, cblas_sgemm, [acx_cblas_ok=yes;CBLAS_LIBS="-lmkl"]) -fi - -# CBLAS in Apple vecLib library? -if test $acx_cblas_ok = no; then - save_LIBS="$LIBS"; LIBS="-framework vecLib $LIBS" - AC_CHECK_FUNC(cblas_sgemm, [acx_cblas_ok=yes;CBLAS_LIBS="-framework vecLib"]) - LIBS="$save_LIBS" -fi - -# CBLAS in Alpha CXML library? -if test $acx_cblas_ok = no; then - AC_CHECK_LIB(cxml, cblas_sgemm, [acx_cblas_ok=yes;CBLAS_LIBS="-lcxml"]) -fi - -# CBLAS in Alpha DXML library? (now called CXML, see above) -if test $acx_cblas_ok = no; then - AC_CHECK_LIB(dxml, cblas_sgemm, [acx_cblas_ok=yes;CBLAS_LIBS="-ldxml"]) -fi - -# CBLAS in Sun Performance library? -if test $acx_cblas_ok = no; then - if test "x$GCC" != xyes; then # only works with Sun CC - AC_CHECK_LIB(sunmath, acosp, - [AC_CHECK_LIB(sunperf, cblas_sgemm, - [CBLAS_LIBS="-xlic_lib=sunperf -lsunmath" - acx_cblas_ok=yes],[],[-lsunmath])]) - fi -fi - -# CBLAS in SCSL library? (SGI/Cray Scientific Library) -if test $acx_cblas_ok = no; then - AC_CHECK_LIB(scs, cblas_sgemm, [acx_cblas_ok=yes; CBLAS_LIBS="-lscs"]) -fi - -# CBLAS in SGIMATH library? -if test $acx_cblas_ok = no; then - AC_CHECK_LIB(complib.sgimath, cblas_sgemm, - [acx_cblas_ok=yes; CBLAS_LIBS="-lcomplib.sgimath"]) -fi - -# CBLAS in IBM ESSL library? (requires generic CBLAS lib, too) -if test $acx_cblas_ok = no; then - AC_CHECK_LIB(cblas, cblas_sgemm, - [AC_CHECK_LIB(essl, cblas_sgemm, - [acx_cblas_ok=yes; CBLAS_LIBS="-lessl -lblas"], - [], [-lblas $FLIBS])]) -fi - -# Generic CBLAS library? -if test $acx_cblas_ok = no; then - AC_CHECK_LIB(cblas, cblas_sgemm, [acx_cblas_ok=yes; CBLAS_LIBS="-lcblas"]) -fi - -# Generic BLAS library? -if test $acx_cblas_ok = no; then - AC_CHECK_LIB(blas, cblas_sgemm, [acx_cblas_ok=yes; CBLAS_LIBS="-lblas"]) -fi - -# GSL generic CBLAS library? -if test $acx_cblas_ok = no; then - AC_CHECK_LIB(gslcblas, cblas_sgemm, [acx_cblas_ok=yes; CBLAS_LIBS="-lgslcblas"]) -fi - -AC_SUBST(CBLAS_LIBS) - -LIBS="$acx_cblas_save_LIBS" - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$acx_cblas_ok" = xyes; then - ifelse([$1],,AC_DEFINE(HAVE_CBLAS,1,[Define if you have a CBLAS library.]),[$1]) - : -else - acx_cblas_ok=no - $2 -fi -])dnl ACX_CBLAS diff --git a/config/acx_pthread.m4 b/config/acx_pthread.m4 deleted file mode 100644 index eb09f5acc..000000000 --- a/config/acx_pthread.m4 +++ /dev/null @@ -1,275 +0,0 @@ -# =========================================================================== -# http://autoconf-archive.cryp.to/acx_pthread.html -# =========================================================================== -# -# SYNOPSIS -# -# ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -# -# DESCRIPTION -# -# This macro figures out how to build C programs using POSIX threads. It -# sets the PTHREAD_LIBS output variable to the threads library and linker -# flags, and the PTHREAD_CFLAGS output variable to any special C compiler -# flags that are needed. (The user can also force certain compiler -# flags/libs to be tested by setting these environment variables.) -# -# Also sets PTHREAD_CC to any special C compiler that is needed for -# multi-threaded programs (defaults to the value of CC otherwise). (This -# is necessary on AIX to use the special cc_r compiler alias.) -# -# NOTE: You are assumed to not only compile your program with these flags, -# but also link it with them as well. e.g. you should link with -# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS -# -# If you are only building threads programs, you may wish to use these -# variables in your default LIBS, CFLAGS, and CC: -# -# LIBS="$PTHREAD_LIBS $LIBS" -# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -# CC="$PTHREAD_CC" -# -# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant -# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name -# (e.g. PTHREAD_CREATE_UNDETACHED on AIX). -# -# ACTION-IF-FOUND is a list of shell commands to run if a threads library -# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it -# is not found. If ACTION-IF-FOUND is not specified, the default action -# will define HAVE_PTHREAD. -# -# Please let the authors know if this macro fails on any platform, or if -# you have any other suggestions or comments. This macro was based on work -# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help -# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by -# Alejandro Forero Cuervo to the autoconf macro repository. We are also -# grateful for the helpful feedback of numerous users. -# -# LAST MODIFICATION -# -# 2008-04-12 -# -# COPYLEFT -# -# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu> -# -# 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/>. -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Macro Archive. When you make and -# distribute a modified version of the Autoconf Macro, you may extend this -# special exception to the GPL to apply to your modified version as well. - -AC_DEFUN([ACX_PTHREAD], [ -AC_REQUIRE([AC_CANONICAL_HOST]) -AC_LANG_SAVE -AC_LANG_C -acx_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) - AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) - AC_MSG_RESULT($acx_pthread_ok) - if test x"$acx_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. - -acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# ... -mt is also the pthreads flag for HP/aCC -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) - -case "${host_cpu}-${host_os}" in - *solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - - acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" - ;; -esac - -if test x"$acx_pthread_ok" = xno; then -for flag in $acx_pthread_flags; do - - case $flag in - none) - AC_MSG_CHECKING([whether pthreads work without any flags]) - ;; - - -*) - AC_MSG_CHECKING([whether pthreads work with $flag]) - PTHREAD_CFLAGS="$flag" - ;; - - pthread-config) - AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no) - if test x"$acx_pthread_config" = xno; then continue; fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - AC_MSG_CHECKING([for the pthreads library -l$flag]) - PTHREAD_LIBS="-l$flag" - ;; - esac - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - AC_TRY_LINK([#include <pthread.h>], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [acx_pthread_ok=yes]) - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - AC_MSG_RESULT($acx_pthread_ok) - if test "x$acx_pthread_ok" = xyes; then - break; - fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - -# Various other checks: -if test "x$acx_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - AC_MSG_CHECKING([for joinable pthread attribute]) - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;], - [attr_name=$attr; break]) - done - AC_MSG_RESULT($attr_name) - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, - [Define to necessary symbol if this constant - uses a non-standard name on your system.]) - fi - - AC_MSG_CHECKING([if more special flags are required for pthreads]) - flag=no - case "${host_cpu}-${host_os}" in - *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; - *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; - esac - AC_MSG_RESULT(${flag}) - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - # More AIX lossage: must compile with xlc_r or cc_r - if test x"$GCC" != xyes; then - AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC}) - else - PTHREAD_CC=$CC - fi -else - PTHREAD_CC="$CC" -fi - -AC_SUBST(PTHREAD_LIBS) -AC_SUBST(PTHREAD_CFLAGS) -AC_SUBST(PTHREAD_CC) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$acx_pthread_ok" = xyes; then - ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) - : -else - acx_pthread_ok=no - $2 -fi -AC_LANG_RESTORE -])dnl ACX_PTHREAD diff --git a/config/ax_boost_base.m4 b/config/ax_boost_base.m4 deleted file mode 100644 index f2a7f6e83..000000000 --- a/config/ax_boost_base.m4 +++ /dev/null @@ -1,334 +0,0 @@ -# =========================================================================== -# http://autoconf-archive.cryp.to/ax_boost_base.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_BOOST_BASE([MINIMUM-VERSION]) -# -# DESCRIPTION -# -# Test for the Boost C++ libraries of a particular version (or newer) -# -# If no path to the installed boost library is given the macro searchs -# under /usr, /usr/local, /opt and /opt/local and evaluates the -# $BOOST_ROOT environment variable. Further documentation is available at -# <http://randspringer.de/boost/index.html>. -# -# This macro calls: -# -# AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS) -# -# And sets: -# -# HAVE_BOOST -# -# LAST MODIFICATION -# -# 2008-04-12 -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_BASE], -[ -AC_REQUIRE([GR_LIB64]) -AC_ARG_WITH([boost], - AS_HELP_STRING([--with-boost@<:@=DIR@:>@], - [use boost (default is yes) - it is possible to specify the root directory for boost (optional)]), - [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ac_boost_path="" - else - want_boost="yes" - ac_boost_path="$withval" - fi - ], - [want_boost="yes"]) - - -AC_ARG_WITH([boost-libdir], - AS_HELP_STRING([--with-boost-libdir=LIB_DIR], - [Force given directory for boost libraries. Note that this - will overwrite library path detection, so use this parameter - only if default library detection fails and you know exactly - where your boost libraries are located.]), - [ - if test -d $withval - then - ac_boost_lib_path="$withval" - else - AC_MSG_ERROR(--with-boost-libdir expected directory name) - fi - ], - [ac_boost_lib_path=""] -) - -if test "x$want_boost" = "xyes"; then - boost_lib_version_req=ifelse([$1], ,1.20.0,$1) - boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'` - boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'` - boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'` - boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` - if test "x$boost_lib_version_req_sub_minor" = "x" ; then - boost_lib_version_req_sub_minor="0" - fi - WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor` - AC_MSG_CHECKING(for boost >= $boost_lib_version_req) - succeeded=no - - dnl first we check the system location for boost libraries - dnl this location ist chosen if boost libraries are installed with the --layout=system option - dnl or if you install boost with RPM - if test "$ac_boost_path" != ""; then - dnl Look first where we think they ought to be, accounting for a possible "64" suffix on lib. - dnl If that directory doesn't exist, fall back to the default behavior - if test -d "$ac_boost_path/lib${gr_libdir_suffix}"; then - BOOST_LDFLAGS="-L$ac_boost_path/lib${gr_libdir_suffix}" - else - BOOST_LDFLAGS="-L$ac_boost_path/lib" - fi - BOOST_CPPFLAGS="-I$ac_boost_path/include" - else - for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do - if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then - dnl Look first where we think they ought to be, accounting for a possible "64" suffix on lib. - dnl If that directory doesn't exist, fall back to the default behavior - if test -d "$ac_boost_path_tmp/lib${gr_libdir_suffix}"; then - BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib${gr_libdir_suffix}" - else - BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib" - fi - BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include" - break; - fi - done - fi - - dnl overwrite ld flags if we have required special directory with - dnl --with-boost-libdir parameter - if test "$ac_boost_lib_path" != ""; then - BOOST_LDFLAGS="-L$ac_boost_lib_path" - fi - - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - @%:@include <boost/version.hpp> - ]], [[ - #if BOOST_VERSION >= $WANT_BOOST_VERSION - // Everything is okay - #else - # error Boost version is too old - #endif - ]])],[AC_MSG_RESULT(yes) - succeeded=yes - found_system=yes - ], - []) - AC_LANG_POP([C++]) - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - - - dnl if we found no boost with system layout we search for boost libraries - dnl built and installed without the --layout=system option - if test "$succeeded" != "yes"; then - _version=0 - - if test "$ac_boost_path" != ""; then - path_list="$ac_boost_path" - else - path_list="/usr /usr/local /opt /opt/local" - fi - for ac_boost_path in $path_list ; do - if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then - for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's,/include/boost-,,; s,_,.,'` - V_CHECK=`expr $_version_tmp \> $_version` - if test "$V_CHECK" = "1" ; then - _version=$_version_tmp - best_path=$ac_boost_path - fi - done - fi - done - - VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` - BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" - - if test "$ac_boost_lib_path" = ""; then - dnl Look first where we think they ought to be, accounting for a possible "64" suffix on lib. - dnl If that directory doesn't exist, fall back to the default behavior - if test -d "$best_path/lib${gr_libdir_suffix}"; then - BOOST_LDFLAGS="-L$best_path/lib${gr_libdir_suffix}" - else - BOOST_LDFLAGS="-L$best_path/lib" - fi - fi - - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - @%:@include <boost/version.hpp> - ]], [[ - #if BOOST_VERSION >= $WANT_BOOST_VERSION - // Everything is okay - #else - # error Boost version is too old - #endif - ]])],[AC_MSG_RESULT(yes) - succeeded=yes - found_system=yes - ], - []) - AC_LANG_POP([C++]) - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - fi - - if test "$succeeded" != "yes" ; then - AC_MSG_RESULT([no]) - if test "$_version" = "0" ; then - AC_MSG_ERROR([[we could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). -If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>.]]) - else - AC_MSG_ERROR([your boost libraries seem to old (version $_version).]) - fi - else - AC_SUBST(BOOST_CPPFLAGS) - AC_SUBST(BOOST_LDFLAGS) - AC_DEFINE(HAVE_BOOST,1,[Define if the Boost headers are available]) - fi -fi -]) - -dnl -dnl Macros used by the boost items that need libraries. -dnl - -dnl $1 is unit name. E.g., boost_thread -AC_DEFUN([_AX_BOOST_CHECK_LIB],[ - _AX_BOOST_CHECK_LIB_($1,HAVE_[]m4_toupper($1),m4_toupper($1)_LIB) -]) - -dnl $1 is unit name. E.g., boost_thread -dnl $2 is AC_DEFINE name. E.g., HAVE_BOOST_THREAD -dnl $3 is lib var name. E.g., BOOST_THREAD_LIB -AC_DEFUN([_AX_BOOST_CHECK_LIB_],[ - AC_LANG_PUSH([C++]) - AC_DEFINE($2,1,[Define if the $1 library is available]) - BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` - - dnl See if we can find a usable library - link_ok="no" - if test "$ax_boost_user_lib" != ""; then - dnl use what the user supplied - for ax_lib in $ax_boost_user_lib $1-${ax_boost_user_lib}; do - AC_CHECK_LIB($ax_lib, exit, - [$3="-l$ax_lib"; AC_SUBST($3) link_ok="yes"; break]) - done - else - dnl Look in BOOSTLIBDIR for possible candidates - head=$BOOSTLIBDIR/lib[]$1 - for f in ${head}*.so* ${head}*.a* ${head}*.dll* ${head}*.dylib; do - dnl echo 1: $f - case $f in - *\**) continue;; - esac - f=`echo $f | sed -e 's,.*/,,' -e 's,^lib,,'` - dnl echo 2: $f - f=`echo $f | sed -e 's,\($1.*\)\.so.*$,\1,' -e 's,\($1.*\)\.a.*$,\1,' -e 's,\($1.*\)\.dll.*$,\1,' -e 's,\($1.*\)\.dylib.*$,\1,'` - dnl echo 3: $f - - ax_lib=$f - AC_CHECK_LIB($ax_lib, exit, - [$3="-l$ax_lib"; AC_SUBST($3) link_ok="yes"; break]) - done - fi - - if test "$link_ok" != "yes"; then - AC_MSG_ERROR([Could not link against lib[$1]!]) - fi - AC_LANG_POP([C++]) -]) - - -dnl $1 is unit name. E.g., boost_thread -AC_DEFUN([_AX_BOOST_WITH],[ - _AX_BOOST_WITH_([$1], [m4_bpatsubst($1,_,-)]) -]) - -dnl $1 is unit name. E.g., boost_thread -dnl $2 is hyphenated unit name. E.g., boost-thread -AC_DEFUN([_AX_BOOST_WITH_],[ - AC_ARG_WITH([$2], - AC_HELP_STRING([--with-$2@<:@=special-lib@:>@], - [Use the m4_substr($1,6) library from boost. It is possible to specify a certain - library to the linker. E.g., --with-$2=$1-gcc41-mt-1_35]), - [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ax_boost_user_lib="" - else - want_boost="yes" - ax_boost_user_lib="$withval" - fi - ], - [want_boost="yes"]) -]) - -dnl $1 is unit name. E.g., boost_thread -dnl $2 is AC_LANG_PROGRAM argument 1 -dnl $3 is AC_LANG_PROGRAM argument 2 -dnl $4 is cv variable name. E.g., ax_cv_boost_thread -AC_DEFUN([_AX_BOOST_CHECK_],[ - _AX_BOOST_WITH([$1]) - if test "$want_boost" = "yes"; then - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_PROG_CXX]) - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - AC_CACHE_CHECK([whether the boost::m4_substr([$1],6) includes are available], [$4], - [AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$2],[$3])], [[$4]=yes], [[$4]=no]) - AC_LANG_POP([C++]) - ]) - if test "$[$4]" = "yes"; then - _AX_BOOST_CHECK_LIB([$1]) - fi - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - fi -]) - -dnl $1 is unit name. E.g., boost_thread -dnl $2 is AC_LANG_PROGRAM argument 1 -dnl $3 is AC_LANG_PROGRAM argument 2 -AC_DEFUN([_AX_BOOST_CHECK],[ - _AX_BOOST_CHECK_([$1], [$2], [$3], [ax_cv_$1]) -]) diff --git a/config/ax_boost_date_time.m4 b/config/ax_boost_date_time.m4 deleted file mode 100644 index 7b3f0fe3d..000000000 --- a/config/ax_boost_date_time.m4 +++ /dev/null @@ -1,34 +0,0 @@ -# -# SYNOPSIS -# -# AX_BOOST_DATE_TIME -# -# DESCRIPTION -# -# Test for date_time library from the Boost C++ libraries. -# -# This macro calls: -# -# AC_SUBST(BOOST_DATE_TIME_LIB) -# -# And sets: -# -# HAVE_BOOST_DATE_TIME -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Michael Tindal -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_DATE_TIME], -[ - AC_REQUIRE([AX_BOOST_BASE]) - _AX_BOOST_CHECK([boost_date_time], - [@%:@include <boost/date_time/gregorian/gregorian_types.hpp>], - [using namespace boost::gregorian; date d(2002,Jan,10); return 0;]) -]) diff --git a/config/ax_boost_filesystem.m4 b/config/ax_boost_filesystem.m4 deleted file mode 100644 index bcb3fa44f..000000000 --- a/config/ax_boost_filesystem.m4 +++ /dev/null @@ -1,45 +0,0 @@ -# -# SYNOPSIS -# -# AX_BOOST_FILESYSTEM -# -# DESCRIPTION -# -# Test for Filesystem library from the Boost C++ libraries. The macro -# requires a preceding call to AX_BOOST_BASE. -# -# This macro calls: -# -# AC_SUBST(BOOST_FILESYSTEM_LIB) -# -# And sets: -# -# HAVE_BOOST_FILESYSTEM -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Michael Tindal -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_FILESYSTEM], -[ - AC_REQUIRE([AX_BOOST_BASE]) - - dnl depends on boost_system - AC_REQUIRE([AX_BOOST_SYSTEM]) - axbf_LDFLAGS_SAVED=$LDFLAGS - LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LIB" - - _AX_BOOST_CHECK([boost_filesystem], - [@%:@include <boost/filesystem/path.hpp>], - [using namespace boost::filesystem; - path my_path( "foo/bar/data.txt" ); - return 0;]) - - LDFLAGS=$axbf_LDFLAGS_SAVED -]) diff --git a/config/ax_boost_iostreams.m4 b/config/ax_boost_iostreams.m4 deleted file mode 100644 index 181b1e752..000000000 --- a/config/ax_boost_iostreams.m4 +++ /dev/null @@ -1,39 +0,0 @@ -# -# SYNOPSIS -# -# AX_BOOST_IOSTREAMS -# -# DESCRIPTION -# -# Test for IOStreams library from the Boost C++ libraries. The macro -# requires a preceding call to AX_BOOST_BASE. -# -# This macro calls: -# -# AC_SUBST(BOOST_IOSTREAMS_LIB) -# -# And sets: -# -# HAVE_BOOST_IOSTREAMS -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_IOSTREAMS], -[ - AC_REQUIRE([AX_BOOST_BASE]) - _AX_BOOST_CHECK([boost_iostreams], - [@%:@include <boost/iostreams/filtering_stream.hpp> - @%:@include <boost/range/iterator_range.hpp>], - [std::string input = "Hello World!"; - namespace io = boost::iostreams; - io::filtering_istream in(boost::make_iterator_range(input)); - return 0;]) - -]) diff --git a/config/ax_boost_program_options.m4 b/config/ax_boost_program_options.m4 deleted file mode 100644 index 3829373be..000000000 --- a/config/ax_boost_program_options.m4 +++ /dev/null @@ -1,35 +0,0 @@ -# -# SYNOPSIS -# -# AX_BOOST_PROGRAM_OPTIONS -# -# DESCRIPTION -# -# Test for program options library from the Boost C++ libraries. The macro -# requires a preceding call to AX_BOOST_BASE. -# -# This macro calls: -# -# AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) -# -# And sets: -# -# HAVE_BOOST_PROGRAM_OPTIONS -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS], -[ - AC_REQUIRE([AX_BOOST_BASE]) - _AX_BOOST_CHECK([boost_program_options], - [@%:@include <boost/program_options.hpp>], - [boost::program_options::options_description generic("Generic options"); - return 0;]) -]) diff --git a/config/ax_boost_python.m4 b/config/ax_boost_python.m4 deleted file mode 100644 index 59c86ad0e..000000000 --- a/config/ax_boost_python.m4 +++ /dev/null @@ -1,92 +0,0 @@ -# =========================================================================== -# http://autoconf-archive.cryp.to/ax_boost_python.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_BOOST_PYTHON -# -# DESCRIPTION -# -# This macro checks to see if the Boost.Python library is installed. It -# also attempts to guess the currect library name using several attempts. -# It tries to build the library name using a user supplied name or suffix -# and then just the raw library. -# -# If the library is found, HAVE_BOOST_PYTHON is defined and -# BOOST_PYTHON_LIB is set to the name of the library. -# -# This macro calls AC_SUBST(BOOST_PYTHON_LIB). -# -# In order to ensure that the Python headers are specified on the include -# path, this macro requires AX_PYTHON to be called. -# -# LAST MODIFICATION -# -# 2008-04-12 -# -# COPYLEFT -# -# Copyright (c) 2008 Michael Tindal -# -# 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 2 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/>. -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Macro Archive. When you make and -# distribute a modified version of the Autoconf Macro, you may extend this -# special exception to the GPL to apply to your modified version as well. - -AC_DEFUN([AX_BOOST_PYTHON], -[AC_REQUIRE([AX_PYTHON])dnl -AC_CACHE_CHECK(whether the Boost::Python library is available, -ac_cv_boost_python, -[AC_LANG_SAVE - AC_LANG_CPLUSPLUS - CPPFLAGS_SAVE=$CPPFLAGS - if test x$PYTHON_INCLUDE_DIR != x; then - CPPFLAGS=-I$PYTHON_INCLUDE_DIR $CPPFLAGS - fi - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include <boost/python/module.hpp> - using namespace boost::python; - BOOST_PYTHON_MODULE(test) { throw "Boost::Python test."; }]], - [[return 0;]])], - [ac_cv_boost_python=yes, ac_cv_boost_python=no) - AC_LANG_RESTORE - CPPFLAGS=$CPPFLAGS_SAVE] -]) -if test "$ac_cv_boost_python" = "yes"; then - AC_LANG_PUSH([C++]) - AC_DEFINE(HAVE_BOOST_PYTHON,,[define if the Boost::Python library is available]) - ax_python_lib=boost_python - AC_ARG_WITH([boost-python],AS_HELP_STRING([--with-boost-python],[specify the boost python library or suffix to use]), - [if test "x$with_boost_python" != "xno"; then - ax_python_lib=$with_boost_python - ax_boost_python_lib=boost_python-$with_boost_python - fi]) - for ax_lib in $ax_python_lib $ax_boost_python_lib boost_python; do - AC_CHECK_LIB($ax_lib, exit, [BOOST_PYTHON_LIB=$ax_lib break]) - done - AC_SUBST(BOOST_PYTHON_LIB) - AC_LANG_POP([C++]) -fi -])dnl diff --git a/config/ax_boost_regex.m4 b/config/ax_boost_regex.m4 deleted file mode 100644 index 32b531369..000000000 --- a/config/ax_boost_regex.m4 +++ /dev/null @@ -1,35 +0,0 @@ -# -# SYNOPSIS -# -# AX_BOOST_REGEX -# -# DESCRIPTION -# -# Test for Regex library from the Boost C++ libraries. The macro requires -# a preceding call to AX_BOOST_BASE. -# -# This macro calls: -# -# AC_SUBST(BOOST_REGEX_LIB) -# -# And sets: -# -# HAVE_BOOST_REGEX -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Michael Tindal -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_REGEX], -[ - AC_REQUIRE([AX_BOOST_BASE]) - _AX_BOOST_CHECK([boost_regex], - [@%:@include <boost/regex.hpp>], - [boost::regex r(); return 0;]) -]) diff --git a/config/ax_boost_serialization.m4 b/config/ax_boost_serialization.m4 deleted file mode 100644 index 78c950078..000000000 --- a/config/ax_boost_serialization.m4 +++ /dev/null @@ -1,38 +0,0 @@ -# -# SYNOPSIS -# -# AX_BOOST_SERIALIZATION -# -# DESCRIPTION -# -# Test for Serialization library from the Boost C++ libraries. The macro -# requires a preceding call to AX_BOOST_BASE. -# -# This macro calls: -# -# AC_SUBST(BOOST_SERIALIZATION_LIB) -# -# And sets: -# -# HAVE_BOOST_SERIALIZATION -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_SERIALIZATION], -[ - AC_REQUIRE([AX_BOOST_BASE]) - _AX_BOOST_CHECK([boost_serialization], - [@%:@include <fstream> - @%:@include <boost/archive/text_oarchive.hpp> - @%:@include <boost/archive/text_iarchive.hpp>], - [std::ofstream ofs("filename"); - boost::archive::text_oarchive oa(ofs); - return 0;]) -]) diff --git a/config/ax_boost_signals.m4 b/config/ax_boost_signals.m4 deleted file mode 100644 index 3c4971748..000000000 --- a/config/ax_boost_signals.m4 +++ /dev/null @@ -1,35 +0,0 @@ -# -# SYNOPSIS -# -# AX_BOOST_SIGNALS -# -# DESCRIPTION -# -# Test for Signals library from the Boost C++ libraries. The macro -# requires a preceding call to AX_BOOST_BASE. -# -# This macro calls: -# -# AC_SUBST(BOOST_SIGNALS_LIB) -# -# And sets: -# -# HAVE_BOOST_SIGNALS -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Michael Tindal -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_SIGNALS], -[ - AC_REQUIRE([AX_BOOST_BASE]) - _AX_BOOST_CHECK([boost_signals], - [@%:@include <boost/signal.hpp>], - [boost::signal<void ()> sig; return 0;]) -]) diff --git a/config/ax_boost_system.m4 b/config/ax_boost_system.m4 deleted file mode 100644 index cb73f2577..000000000 --- a/config/ax_boost_system.m4 +++ /dev/null @@ -1,40 +0,0 @@ -# =========================================================================== -# started with this: http://autoconf-archive.cryp.to/ax_boost_system.html, -# virtually nothing left -# =========================================================================== -# -# SYNOPSIS -# -# AX_BOOST_SYSTEM -# -# DESCRIPTION -# -# Test for System library from the Boost C++ libraries. The macro requires -# a preceding call to AX_BOOST_BASE. -# -# This macro calls: -# -# AC_SUBST(BOOST_SYSTEM_LIB) -# -# And sets: -# -# HAVE_BOOST_SYSTEM -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Michael Tindal -# Copyright (c) 2008 Daniel Casimiro <dan.casimiro@gmail.com> -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_SYSTEM], -[ - AC_REQUIRE([AX_BOOST_BASE]) - _AX_BOOST_CHECK([boost_system], - [@%:@include <boost/system/error_code.hpp>], - [boost::system::system_category]) -]) diff --git a/config/ax_boost_test_exec_monitor.m4 b/config/ax_boost_test_exec_monitor.m4 deleted file mode 100644 index 2c30c0b4a..000000000 --- a/config/ax_boost_test_exec_monitor.m4 +++ /dev/null @@ -1,35 +0,0 @@ -# -# SYNOPSIS -# -# AX_BOOST_TEST_EXEC_MONITOR -# -# DESCRIPTION -# -# Test for Test_Exec_Monitor library from the Boost C++ libraries. The -# macro requires a preceding call to AX_BOOST_BASE. -# -# This macro calls: -# -# AC_SUBST(BOOST_TEST_EXEC_MONITOR_LIB) -# -# And sets: -# -# HAVE_BOOST_TEST_EXEC_MONITOR -# -# COPYLEFT -# -# Copyright (c) 2008 Dodji Seketeli <dodji@seketeli.org> -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_TEST_EXEC_MONITOR], -[ - AC_REQUIRE([AX_BOOST_BASE]) - _AX_BOOST_CHECK([boost_test_exec_monitor], - [@%:@include <boost/test/test_tools.hpp>], - [int i=1 ; BOOST_REQUIRE(i==1); ; return 0;]) -]) diff --git a/config/ax_boost_thread.m4 b/config/ax_boost_thread.m4 deleted file mode 100644 index 8e42510ea..000000000 --- a/config/ax_boost_thread.m4 +++ /dev/null @@ -1,72 +0,0 @@ -# -# SYNOPSIS -# -# AX_BOOST_THREAD -# -# DESCRIPTION -# -# Test for Thread library from the Boost C++ libraries. -# -# This macro calls: -# -# AC_SUBST(BOOST_THREAD_LIB) -# AC_SUBST(BOOST_CXXFLAGS) -# -# And sets: -# -# HAVE_BOOST_THREAD -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Michael Tindal -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - - -AC_DEFUN([AX_BOOST_THREAD], -[ - AC_REQUIRE([AX_BOOST_BASE]) - AC_REQUIRE([ACX_PTHREAD]) - _AX_BOOST_WITH([boost_thread]) - - if test "$want_boost" = "yes"; then - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_PROG_CXX]) - AC_REQUIRE([AC_CANONICAL_HOST]) - - CPPFLAGS_SAVED="$CPPFLAGS" - LDFLAGS_SAVED="$LDFLAGS" - CXXFLAGS_SAVED="$CXXFLAGS" - - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS $PTHREAD_LIBS" - CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" - - AC_CACHE_CHECK([whether the boost::thread includes are available], - [ax_cv_boost_thread], - [AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/thread/thread.hpp>]], - [[boost::thread_group thrds; - return 0;]])], - [ax_cv_boost_thread=yes], [ax_cv_boost_thread=no]) - AC_LANG_POP([C++]) - ]) - - if test "$ax_cv_boost_thread" = "yes"; then - BOOST_CXXFLAGS="$PTHREAD_CFLAGS" - AC_SUBST([BOOST_CXXFLAGS]) - _AX_BOOST_CHECK_LIB([boost_thread]) - if test "$link_ok" = "yes" && test -n "$PTHREAD_LIBS"; then - BOOST_THREAD_LIB="$BOOST_THREAD_LIB $PTHREAD_LIBS" - fi - fi - - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - CXXFLAGS="$CXXFLAGS_SAVED" - fi -]) diff --git a/config/ax_boost_unit_test_framework.m4 b/config/ax_boost_unit_test_framework.m4 deleted file mode 100644 index 73affccfd..000000000 --- a/config/ax_boost_unit_test_framework.m4 +++ /dev/null @@ -1,36 +0,0 @@ -# -# SYNOPSIS -# -# AX_BOOST_UNIT_TEST_FRAMEWORK -# -# DESCRIPTION -# -# Test for Unit_Test_Framework library from the Boost C++ libraries. The -# macro requires a preceding call to AX_BOOST_BASE. -# -# This macro calls: -# -# AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB) -# -# And sets: -# -# HAVE_BOOST_UNIT_TEST_FRAMEWORK -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_UNIT_TEST_FRAMEWORK], -[ - AC_REQUIRE([AX_BOOST_BASE]) - _AX_BOOST_CHECK([boost_unit_test_framework], - [@%:@include <boost/test/unit_test.hpp>], - [using boost::unit_test::test_suite; - test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" ); - return 0;]) -]) diff --git a/config/ax_boost_wserialization.m4 b/config/ax_boost_wserialization.m4 deleted file mode 100644 index f384988cb..000000000 --- a/config/ax_boost_wserialization.m4 +++ /dev/null @@ -1,46 +0,0 @@ -# -# SYNOPSIS -# -# AX_BOOST_WSERIALIZATION -# -# DESCRIPTION -# -# Test for WSerialization library from the Boost C++ libraries. The macro -# requires a preceding call to AX_BOOST_BASE. -# -# This macro calls: -# -# AC_SUBST(BOOST_WSERIALIZATION_LIB) -# -# And sets: -# -# HAVE_BOOST_WSERIALIZATION -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_WSERIALIZATION], -[ - AC_REQUIRE([AX_BOOST_BASE]) - - dnl depends on BOOST_SERIALIZATION - AC_REQUIRE([AX_BOOST_SERIALIZATION]) - axbws_LDFLAGS_SAVED=$LDFLAGS - LDFLAGS="$LDFLAGS $BOOST_SERIALIZATION_LIB" - - _AX_BOOST_CHECK([boost_wserialization], - [@%:@include <fstream> - @%:@include <boost/archive/text_oarchive.hpp> - @%:@include <boost/archive/text_iarchive.hpp>], - [std::ofstream ofs("filename"); - boost::archive::text_oarchive oa(ofs); - return 0;]) - - LDFLAGS=$axbf_LDFLAGS_SAVED -]) diff --git a/config/bnv_have_qt.m4 b/config/bnv_have_qt.m4 deleted file mode 100644 index 1469bfbfd..000000000 --- a/config/bnv_have_qt.m4 +++ /dev/null @@ -1,404 +0,0 @@ -dnl Available from the GNU Autoconf Macro Archive at: -dnl http://www.gnu.org/software/ac-archive/htmldoc/bnv_have_qt.html -dnl -AC_DEFUN([BNV_HAVE_QT], -[ - dnl THANKS! This code includes bug fixes by: - dnl Tim McClarren. - - AC_REQUIRE([AC_PROG_CXX]) - AC_REQUIRE([AC_PATH_X]) - AC_REQUIRE([AC_PATH_XTRA]) - - AC_MSG_CHECKING(for Qt) - - AC_ARG_WITH([Qt-dir], - [ --with-Qt-dir=DIR DIR is equal to \$QTDIR if you have followed the - installation instructions of Trolltech. Header - files are in DIR/include, binary utilities are - in DIR/bin and the library is in DIR/lib]) - AC_ARG_WITH([Qt-include-dir], - [ --with-Qt-include-dir=DIR - Qt header files are in DIR]) - AC_ARG_WITH([Qt-bin-dir], - [ --with-Qt-bin-dir=DIR Qt utilities such as moc and uic are in DIR]) - AC_ARG_WITH([Qt-lib-dir], - [ --with-Qt-lib-dir=DIR The Qt library is in DIR]) - AC_ARG_WITH([Qt-lib], - [ --with-Qt-lib=LIB Use -lLIB to link with the Qt library]) - if test x"$with_Qt_dir" = x"no" || - test x"$with_Qt_include-dir" = x"no" || - test x"$with_Qt_bin_dir" = x"no" || - test x"$with_Qt_lib_dir" = x"no" || - test x"$with_Qt_lib" = x"no"; then - # user disabled Qt. Leave cache alone. - have_qt="User disabled Qt." - else - # "yes" is a bogus option - if test x"$with_Qt_dir" = xyes; then - with_Qt_dir= - fi - if test x"$with_Qt_include_dir" = xyes; then - with_Qt_include_dir= - fi - if test x"$with_Qt_bin_dir" = xyes; then - with_Qt_bin_dir= - fi - if test x"$with_Qt_lib_dir" = xyes; then - with_Qt_lib_dir= - fi - if test x"$with_Qt_lib" = xyes; then - with_Qt_lib= - fi - # No Qt unless we discover otherwise - have_qt=no - # Check whether we are requested to link with a specific version - if test x"$with_Qt_lib" != x; then - bnv_qt_lib="$with_Qt_lib" - fi - # Check whether we were supplied with an answer already - if test x"$with_Qt_dir" != x; then - have_qt=yes - bnv_qt_dir="$with_Qt_dir" - bnv_qt_include_dir="$with_Qt_dir/include" - bnv_qt_bin_dir="$with_Qt_dir/bin" - bnv_qt_lib_dir="$with_Qt_dir/lib" - # Only search for the lib if the user did not define one already - if test x"$bnv_qt_lib" = x; then - bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p | - sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`" - fi - bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" - else - # Use cached value or do search, starting with suggestions from - # the command line - AC_CACHE_VAL(bnv_cv_have_qt, - [ - # We are not given a solution and there is no cached value. - bnv_qt_dir=NO - bnv_qt_include_dir=NO - bnv_qt_lib_dir=NO - if test x"$bnv_qt_lib" = x; then - bnv_qt_lib=NO - fi - BNV_PATH_QT_DIRECT - if test "$bnv_qt_dir" = NO || - test "$bnv_qt_include_dir" = NO || - test "$bnv_qt_lib_dir" = NO || - test "$bnv_qt_lib" = NO; then - # Problem with finding complete Qt. Cache the known absence of Qt. - bnv_cv_have_qt="have_qt=no" - else - # Record where we found Qt for the cache. - bnv_cv_have_qt="have_qt=yes \ - bnv_qt_dir=$bnv_qt_dir \ - bnv_qt_include_dir=$bnv_qt_include_dir \ - bnv_qt_bin_dir=$bnv_qt_bin_dir \ - bnv_qt_LIBS=\"$bnv_qt_LIBS\"" - fi - ])dnl - eval "$bnv_cv_have_qt" - fi # all $bnv_qt_* are set - fi # $have_qt reflects the system status - if test x"$have_qt" = xyes; then - QT_CXXFLAGS="-I$bnv_qt_include_dir" - QT_DIR="$bnv_qt_dir" - QT_LIBS="$bnv_qt_LIBS" - # If bnv_qt_dir is defined, utilities are expected to be in the - # bin subdirectory - if test x"$bnv_qt_dir" != x; then - if test -x "$bnv_qt_dir/bin/uic"; then - QT_UIC="$bnv_qt_dir/bin/uic" - else - # Old versions of Qt don't have uic - QT_UIC= - fi - QT_MOC="$bnv_qt_dir/bin/moc" - else - # Or maybe we are told where to look for the utilities - if test x"$bnv_qt_bin_dir" != x; then - if test -x "$bnv_qt_bin_dir/uic"; then - QT_UIC="$bnv_qt_bin_dir/uic" - else - # Old versions of Qt don't have uic - QT_UIC= - fi - QT_MOC="$bnv_qt_bin_dir/moc" - else - # Last possibility is that they are in $PATH - QT_UIC="`which uic`" - QT_MOC="`which moc`" - fi - fi - # All variables are defined, report the result - AC_MSG_RESULT([$have_qt: - QT_CXXFLAGS=$QT_CXXFLAGS - QT_DIR=$QT_DIR - QT_LIBS=$QT_LIBS - QT_UIC=$QT_UIC - QT_MOC=$QT_MOC]) - else - # Qt was not found - QT_CXXFLAGS= - QT_DIR= - QT_LIBS= - QT_UIC= - QT_MOC= - AC_MSG_RESULT($have_qt) - fi - AC_SUBST(QT_CXXFLAGS) - AC_SUBST(QT_DIR) - AC_SUBST(QT_LIBS) - AC_SUBST(QT_UIC) - AC_SUBST(QT_MOC) - - #### Being paranoid: - if test x"$have_qt" = xyes; then - AC_MSG_CHECKING(correct functioning of Qt installation) - AC_CACHE_VAL(bnv_cv_qt_test_result, - [ - cat > bnv_qt_test.h << EOF -#include <qobject.h> -class Test : public QObject -{ -Q_OBJECT -public: - Test() {} - ~Test() {} -public slots: - void receive() {} -signals: - void send(); -}; -EOF - - cat > bnv_qt_main.$ac_ext << EOF -#include "bnv_qt_test.h" -#include <qapplication.h> -int main( int argc, char **argv ) -{ - QApplication app( argc, argv ); - Test t; - QObject::connect( &t, SIGNAL(send()), &t, SLOT(receive()) ); -} -EOF - - bnv_cv_qt_test_result="failure" - bnv_try_1="$QT_MOC bnv_qt_test.h -o moc_bnv_qt_test.$ac_ext >/dev/null 2>bnv_qt_test_1.out" - AC_TRY_EVAL(bnv_try_1) - bnv_err_1=`grep -v '^ *+' bnv_qt_test_1.out | grep -v "^bnv_qt_test.h\$"` - if test x"$bnv_err_1" != x; then - echo "$bnv_err_1" >&AC_FD_CC - echo "configure: could not run $QT_MOC on:" >&AC_FD_CC - cat bnv_qt_test.h >&AC_FD_CC - else - bnv_try_2="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o moc_bnv_qt_test.o moc_bnv_qt_test.$ac_ext >/dev/null 2>bnv_qt_test_2.out" - AC_TRY_EVAL(bnv_try_2) - bnv_err_2=`grep -v '^ *+' bnv_qt_test_2.out | grep -v "^bnv_qt_test.{$ac_ext}\$"` - if test x"$bnv_err_2" != x; then - echo "$bnv_err_2" >&AC_FD_CC - echo "configure: could not compile:" >&AC_FD_CC - cat bnv_qt_test.$ac_ext >&AC_FD_CC - else - bnv_try_3="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o bnv_qt_main.o bnv_qt_main.$ac_ext >/dev/null 2>bnv_qt_test_3.out" - AC_TRY_EVAL(bnv_try_3) - bnv_err_3=`grep -v '^ *+' bnv_qt_test_3.out | grep -v "^bnv_qt_main.{$ac_ext}\$"` - if test x"$bnv_err_3" != x; then - echo "$bnv_err_3" >&AC_FD_CC - echo "configure: could not compile:" >&AC_FD_CC - cat bnv_qt_main.$ac_ext >&AC_FD_CC - else - bnv_try_4="$CXX $QT_LIBS $LIBS -o bnv_qt_main bnv_qt_main.o moc_bnv_qt_test.o >/dev/null 2>bnv_qt_test_4.out" - AC_TRY_EVAL(bnv_try_4) - bnv_err_4=`grep -v '^ *+' bnv_qt_test_4.out` - if test x"$bnv_err_4" != x; then - echo "$bnv_err_4" >&AC_FD_CC - else - bnv_cv_qt_test_result="success" - fi - fi - fi - fi - ])dnl AC_CACHE_VAL bnv_cv_qt_test_result - AC_MSG_RESULT([$bnv_cv_qt_test_result]); - if test x"$bnv_cv_qt_test_result" = "xfailure"; then - # working Qt was not found - QT_CXXFLAGS= - QT_DIR= - QT_LIBS= - QT_UIC= - QT_MOC= - have_qt=no - AC_MSG_WARN([Failed to find matching components of a complete - Qt installation. Try using more options, - see ./configure --help.]) - fi - - rm -f bnv_qt_test.h moc_bnv_qt_test.$ac_ext moc_bnv_qt_test.o \ - bnv_qt_main.$ac_ext bnv_qt_main.o bnv_qt_main \ - bnv_qt_test_1.out bnv_qt_test_2.out bnv_qt_test_3.out bnv_qt_test_4.out - fi -]) - -dnl Internal subroutine of BNV_HAVE_QT -dnl Set bnv_qt_dir bnv_qt_include_dir bnv_qt_bin_dir bnv_qt_lib_dir bnv_qt_lib -dnl Copyright 2001 Bastiaan N. Veelo <Bastiaan.N.Veelo@immtek.ntnu.no> -AC_DEFUN([BNV_PATH_QT_DIRECT], -[ - ## Binary utilities ## - if test x"$with_Qt_bin_dir" != x; then - bnv_qt_bin_dir=$with_Qt_bin_dir - fi - ## Look for header files ## - if test x"$with_Qt_include_dir" != x; then - bnv_qt_include_dir="$with_Qt_include_dir" - else - # The following header file is expected to define QT_VERSION. - qt_direct_test_header=qglobal.h - # Look for the header file in a standard set of common directories. - bnv_include_path_list=" - /usr/include - `ls -dr /usr/include/qt* 2>/dev/null` - `ls -dr /usr/lib/qt*/include 2>/dev/null` - `ls -dr /usr/local/qt*/include 2>/dev/null` - `ls -dr /opt/qt*/include 2>/dev/null` - " - for bnv_dir in $bnv_include_path_list; do - if test -r "$bnv_dir/$qt_direct_test_header"; then - bnv_dirs="$bnv_dirs $bnv_dir" - fi - done - # Now look for the newest in this list - bnv_prev_ver=0 - for bnv_dir in $bnv_dirs; do - bnv_this_ver=`egrep -w '#define QT_VERSION' $bnv_dir/$qt_direct_test_header | sed s/'#define QT_VERSION'//` - if expr $bnv_this_ver '>' $bnv_prev_ver > /dev/null; then - bnv_qt_include_dir=$bnv_dir - bnv_prev_ver=$bnv_this_ver - fi - done - fi dnl Found header files. - - # Are these headers located in a traditional Trolltech installation? - # That would be $bnv_qt_include_dir stripped from its last element: - bnv_possible_qt_dir=`dirname $bnv_qt_include_dir` - if test -x $bnv_possible_qt_dir/bin/moc && - ls $bnv_possible_qt_dir/lib/libqt* > /dev/null; then - # Then the rest is a piece of cake - bnv_qt_dir=$bnv_possible_qt_dir - bnv_qt_bin_dir="$bnv_qt_dir/bin" - bnv_qt_lib_dir="$bnv_qt_dir/lib" - # Only look for lib if the user did not supply it already - if test x"$bnv_qt_lib" = xNO; then - bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p | - sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`" - fi - bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" - else - # There is no valid definition for $QTDIR as Trolltech likes to see it - bnv_qt_dir= - ## Look for Qt library ## - if test x"$with_Qt_lib_dir" != x; then - bnv_qt_lib_dir="$with_Qt_lib_dir" - # Only look for lib if the user did not supply it already - if test x"$bnv_qt_lib" = xNO; then - bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p | - sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`" - fi - bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" - else - # Normally, when there is no traditional Trolltech installation, - # the library is installed in a place where the linker finds it - # automatically. - # If the user did not define the library name, try with qt - if test x"$bnv_qt_lib" = xNO; then - bnv_qt_lib=qt - fi - qt_direct_test_header=qapplication.h - qt_direct_test_main=" - int argc; - char ** argv; - QApplication app(argc,argv); - " - # See if we find the library without any special options. - # Don't add top $LIBS permanently yet - bnv_save_LIBS="$LIBS" - LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" - bnv_qt_LIBS="$LIBS" - bnv_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="-I$bnv_qt_include_dir" - AC_TRY_LINK([#include <$qt_direct_test_header>], - $qt_direct_test_main, - [ - # Success. - # We can link with no special library directory. - bnv_qt_lib_dir= - ], [ - # That did not work. Try the multi-threaded version - echo "Non-critical error, please neglect the above." >&AC_FD_CC - bnv_qt_lib=qt-mt - LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" - AC_TRY_LINK([#include <$qt_direct_test_header>], - $qt_direct_test_main, - [ - # Success. - # We can link with no special library directory. - bnv_qt_lib_dir= - ], [ - # That did not work. Try the OpenGL version - echo "Non-critical error, please neglect the above." >&AC_FD_CC - bnv_qt_lib=qt-gl - LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" - AC_TRY_LINK([#include <$qt_direct_test_header>], - $qt_direct_test_main, - [ - # Succes. - # We can link with no special library directory. - bnv_qt_lib_dir= - ], [ - # That did not work. Maybe a library version I don't know about? - echo "Non-critical error, please neglect the above." >&AC_FD_CC - # Look for some Qt lib in a standard set of common directories. - bnv_dir_list=" - `echo $bnv_qt_includes | sed ss/includess` - /lib - /usr/lib - /usr/local/lib - /opt/lib - `ls -dr /usr/lib/qt* 2>/dev/null` - `ls -dr /usr/local/qt* 2>/dev/null` - `ls -dr /opt/qt* 2>/dev/null` - " - for bnv_dir in $bnv_dir_list; do - if ls $bnv_dir/libqt*; then - # Gamble that it's the first one... - bnv_qt_lib="`ls $bnv_dir/libqt* | sed -n 1p | - sed s@$bnv_dir/lib@@ | sed s/[.].*//`" - bnv_qt_lib_dir="$bnv_dir" - break - fi - done - # Try with that one - LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" - AC_TRY_LINK([#include <$qt_direct_test_header>], - $qt_direct_test_main, - [ - # Succes. - # We can link with no special library directory. - bnv_qt_lib_dir= - ], [ - # Leave bnv_qt_lib_dir defined - ]) - ]) - ]) - ]) - if test x"$bnv_qt_lib_dir" != x; then - bnv_qt_LIBS="-l$bnv_qt_lib_dir $LIBS" - else - bnv_qt_LIBS="$LIBS" - fi - LIBS="$bnv_save_LIBS" - CXXFLAGS="$bnv_save_CXXFLAGS" - fi dnl $with_Qt_lib_dir was not given - fi dnl Done setting up for non-traditional Trolltech installation -]) diff --git a/config/cppunit.m4 b/config/cppunit.m4 deleted file mode 100644 index 0991d51ec..000000000 --- a/config/cppunit.m4 +++ /dev/null @@ -1,80 +0,0 @@ -dnl -dnl AM_PATH_CPPUNIT(MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -dnl -AC_DEFUN([AM_PATH_CPPUNIT], -[ - -AC_ARG_WITH(cppunit-prefix,[ --with-cppunit-prefix=PFX Prefix where CppUnit is installed (optional)], - cppunit_config_prefix="$withval", cppunit_config_prefix="") -AC_ARG_WITH(cppunit-exec-prefix,[ --with-cppunit-exec-prefix=PFX Exec prefix where CppUnit is installed (optional)], - cppunit_config_exec_prefix="$withval", cppunit_config_exec_prefix="") - - if test x$cppunit_config_exec_prefix != x ; then - cppunit_config_args="$cppunit_config_args --exec-prefix=$cppunit_config_exec_prefix" - if test x${CPPUNIT_CONFIG+set} != xset ; then - CPPUNIT_CONFIG=$cppunit_config_exec_prefix/bin/cppunit-config - fi - fi - if test x$cppunit_config_prefix != x ; then - cppunit_config_args="$cppunit_config_args --prefix=$cppunit_config_prefix" - if test x${CPPUNIT_CONFIG+set} != xset ; then - CPPUNIT_CONFIG=$cppunit_config_prefix/bin/cppunit-config - fi - fi - - AC_PATH_PROG(CPPUNIT_CONFIG, cppunit-config, no) - cppunit_version_min=$1 - - AC_MSG_CHECKING(for Cppunit - version >= $cppunit_version_min) - no_cppunit="" - if test "$CPPUNIT_CONFIG" = "no" ; then - no_cppunit=yes - else - CPPUNIT_CFLAGS=`$CPPUNIT_CONFIG --cflags` - CPPUNIT_LIBS=`$CPPUNIT_CONFIG --libs` - cppunit_version=`$CPPUNIT_CONFIG --version` - - cppunit_major_version=`echo $cppunit_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - cppunit_minor_version=`echo $cppunit_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - cppunit_micro_version=`echo $cppunit_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - - cppunit_major_min=`echo $cppunit_version_min | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - cppunit_minor_min=`echo $cppunit_version_min | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - cppunit_micro_min=`echo $cppunit_version_min | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - - cppunit_version_proper=`expr \ - $cppunit_major_version \> $cppunit_major_min \| \ - $cppunit_major_version \= $cppunit_major_min \& \ - $cppunit_minor_version \> $cppunit_minor_min \| \ - $cppunit_major_version \= $cppunit_major_min \& \ - $cppunit_minor_version \= $cppunit_minor_min \& \ - $cppunit_micro_version \>= $cppunit_micro_min ` - - if test "$cppunit_version_proper" = "1" ; then - AC_MSG_RESULT([$cppunit_major_version.$cppunit_minor_version.$cppunit_micro_version]) - else - AC_MSG_RESULT(no) - no_cppunit=yes - fi - fi - - if test "x$no_cppunit" = x ; then - ifelse([$2], , :, [$2]) - else - CPPUNIT_CFLAGS="" - CPPUNIT_LIBS="" - ifelse([$3], , :, [$3]) - fi - - AC_SUBST(CPPUNIT_CFLAGS) - AC_SUBST(CPPUNIT_LIBS) -]) - - - diff --git a/config/gr_check_createfilemapping.m4 b/config/gr_check_createfilemapping.m4 deleted file mode 100644 index a7e290dd3..000000000 --- a/config/gr_check_createfilemapping.m4 +++ /dev/null @@ -1,53 +0,0 @@ -dnl -dnl Copyright 2005 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. - -dnl AC_DEFUN([GR_CHECK_CREATEFILEMAPPING], -dnl [ -dnl AC_CHECK_FUNCS([CreateFileMapping]) -dnl ]) - -AC_DEFUN([GR_CHECK_CREATEFILEMAPPING],[ - AC_MSG_CHECKING([for CreateFileMapping function]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ -#include <windows.h> -int main (int argc, char **argv) -{ - HANDLE handle; - int size; - char seg_name[[1024]]; - handle = CreateFileMapping( - INVALID_HANDLE_VALUE, // use paging file - NULL, // default security - PAGE_READWRITE, // read/write access - 0, // max. object size - size, // buffer size - seg_name); // name of mapping object - return 0; -} -])],[HAVE_CREATEFILEMAPPING=yes - AC_DEFINE([HAVE_CREATEFILEMAPPING],[1], - [Define if you have the CreateFilemapping function(win32).])], - [HAVE_CREATEFILEMAPPING=no]) - - AC_MSG_RESULT([$HAVE_CREATEFILEMAPPING]) - AM_CONDITIONAL([HAVE_CREATEFILEMAPPING], [test x$HAVE_CREATEFILEMAPPING = xyes]) -]) - - diff --git a/config/gr_check_mc4020.m4 b/config/gr_check_mc4020.m4 deleted file mode 100644 index 28987c26b..000000000 --- a/config/gr_check_mc4020.m4 +++ /dev/null @@ -1,37 +0,0 @@ -dnl -dnl Copyright 2003 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. -dnl - -AC_DEFUN([GR_CHECK_MC4020],[ - AC_MSG_CHECKING([for mc4020 A/D driver include file]) - AC_COMPILE_IFELSE([ -#include <mc4020.h> -int main (int argc, char **argv) -{ - return 0; -} -],[HAVE_MC4020=yes - AC_DEFINE(HAVE_MC4020,[1],[Define if you have a Measurement Computing PCI-DAS4020/12 A/D])], - [HAVE_MC4020=no]) - - AC_MSG_RESULT($HAVE_MC4020) - AM_CONDITIONAL(HAVE_MC4020, test x$HAVE_MC4020 = xyes) -]) - diff --git a/config/gr_check_memalign.m4 b/config/gr_check_memalign.m4 deleted file mode 100644 index 109516aa3..000000000 --- a/config/gr_check_memalign.m4 +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 2008 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, 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, Boston, MA -# 02110-1301, USA. - -AC_DEFUN([GR_CHECK_MEMALIGN], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) - - # Check for allocing memory alignment functions - # If 'posix_memalign' is available, use it solely. - AC_CHECK_FUNCS([posix_memalign],,[ - # Otherwise, check for valloc and the - # (a-priori known) alignment of 'malloc' - AC_CHECK_FUNCS([valloc]) - aligned_malloc=0 - # 'malloc' is 16-byte aligned on (at least) Darwin 8 and 9 - case "$host_os" in - darwin8*) aligned_malloc=16 ;; - darwin9*) aligned_malloc=16 ;; - *) ;; - esac - if test $aligned_malloc = 0; then - AC_MSG_RESULT([malloc has unknown alignment.]) - else - AC_MSG_RESULT([malloc is $aligned_malloc-byte aligned.]) - fi - AC_DEFINE_UNQUOTED([ALIGNED_MALLOC],[$aligned_malloc],[Define as the alignment of malloc if known; otherwise 0.]) - ]) -]) diff --git a/config/gr_check_shm_open.m4 b/config/gr_check_shm_open.m4 deleted file mode 100644 index 83d260b9b..000000000 --- a/config/gr_check_shm_open.m4 +++ /dev/null @@ -1,29 +0,0 @@ -dnl -dnl Copyright 2003 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([GR_CHECK_SHM_OPEN], -[ - SHM_OPEN_LIBS="" - save_LIBS="$LIBS" - AC_SEARCH_LIBS([shm_open], [rt], [SHM_OPEN_LIBS="$LIBS"]) - AC_CHECK_FUNCS([shm_open]) - LIBS="$save_LIBS" - AC_SUBST(SHM_OPEN_LIBS) -]) diff --git a/config/gr_check_usrp.m4 b/config/gr_check_usrp.m4 deleted file mode 100644 index 12a5d1c05..000000000 --- a/config/gr_check_usrp.m4 +++ /dev/null @@ -1,32 +0,0 @@ -dnl -dnl Copyright 2003 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. -dnl - -dnl Check for Universal Software Radio Peripheral - -AC_DEFUN([GR_CHECK_USRP],[ - PKG_CHECK_MODULES(USRP, usrp >= 0.2, - [HAVE_USRP=yes - AC_DEFINE(HAVE_USRP,[1],[Define if you have a USRP])], - [HAVE_USRP=no]) - - AM_CONDITIONAL(HAVE_USRP, test x$HAVE_USRP = xyes) -]) - diff --git a/config/gr_doxygen.m4 b/config/gr_doxygen.m4 deleted file mode 100644 index ca9344313..000000000 --- a/config/gr_doxygen.m4 +++ /dev/null @@ -1,60 +0,0 @@ -dnl -dnl Copyright 2003,2005 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. -dnl - -AC_DEFUN([GR_CHECK_DOXYGEN],[ - AC_ARG_ENABLE(doxygen, - AC_HELP_STRING([--enable-doxygen], - [enable documentation generation with doxygen (auto)])) - AC_ARG_ENABLE(dot, AC_HELP_STRING([--enable-dot],[use 'dot' to generate graphs in doxygen (auto)])) - - if test "x$enable_doxygen" = xno; then - enable_doc=no - else - AC_PATH_PROG(DOXYGEN, doxygen, , $PATH) - if test x$DOXYGEN = x; then - if test "x$enable_doxygen" = xyes; then - AC_MSG_ERROR([could not find doxygen]) - fi - enable_doc=no - generate_docs= - else - enable_doc=yes - generate_docs=docs - AC_PATH_PROG(DOT, dot, , $PATH) - fi - fi - - AM_CONDITIONAL(DOC, test x$enable_doc = xyes) - - if test x$DOT = x; then - if test "x$enable_dot" = xyes; then - AC_MSG_ERROR([could not find dot]) - fi - enable_dot=no - else - enable_dot=yes - fi - AC_SUBST(enable_dot) - AC_SUBST(enable_xml_docs, YES) - AC_SUBST(enable_html_docs, YES) - AC_SUBST(enable_latex_docs, NO) - AC_SUBST(generate_docs) -]) diff --git a/config/gr_fortran.m4 b/config/gr_fortran.m4 deleted file mode 100644 index 031052043..000000000 --- a/config/gr_fortran.m4 +++ /dev/null @@ -1,33 +0,0 @@ -dnl Copyright 2001,2002,2003,2004,2005,2006 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([GR_FORTRAN],[ - dnl if you want to generate a different table of interpolator taps, you need fortran. - dnl we default to off, since almost no one wants to do this. - AC_ARG_ENABLE(fortran, AC_HELP_STRING([--enable-fortran],[enable fortran (no)]), - [], [enable_fortran=no]) - AM_CONDITIONAL(ENABLE_FORTRAN, test "x$enable_fortran" = xyes) - - if test "x$enable_fortran" = xyes - then - AC_PROG_F77 - AC_F77_LIBRARY_LDFLAGS - fi - AC_PROG_CC dnl bux fix to restore $ac_ext -]) diff --git a/config/gr_git.m4 b/config/gr_git.m4 deleted file mode 100644 index c4f1ea0c0..000000000 --- a/config/gr_git.m4 +++ /dev/null @@ -1,63 +0,0 @@ -dnl Copyright 2009,2010 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([GR_GIT],[ - dnl Identify git binary - AC_PATH_PROG([GIT],[git]) - - dnl If it exists, get either 'git describe' or fallback to current commit - if test x$GIT != x ; then - AC_MSG_CHECKING([existence of git version control directory]) - if test -d $srcdir/.git ; then - AC_MSG_RESULT([ok]) - AC_MSG_CHECKING([git description of current commit]) - if (cd $srcdir && $GIT describe >/dev/null 2>&1); then - GIT_DESCRIBE=`cd $srcdir && $GIT describe --abbrev=8 --long` - # Release candidate tags create an extra -rcX field - case $GIT_DESCRIBE in - *-*-*-*) - GIT_TAG=`echo $GIT_DESCRIBE | cut -f -2 -d '-'` - GIT_SEQNO=`echo $GIT_DESCRIBE | cut -f 3 -d '-'` - GIT_COMMIT=`echo $GIT_DESCRIBE | cut -f 4 -d '-' | cut -f 2- -d 'g'` - ;; - *-*-*) - GIT_TAG=`echo $GIT_DESCRIBE | cut -f 1 -d '-'` - GIT_SEQNO=`echo $GIT_DESCRIBE | cut -f 2 -d '-'` - GIT_COMMIT=`echo $GIT_DESCRIBE | cut -f 3 -d '-' | cut -f 2- -d 'g'` - ;; - esac - - AC_MSG_RESULT([$GIT_DESCRIBE]) - else - AC_MSG_RESULT([no tag in history, using current commit]) - GIT_TAG='' - GIT_SEQNO='' - GIT_COMMIT=`cd $srcdir && $GIT describe --always --abbrev=8` - fi - else - AC_MSG_RESULT([not found]) - fi - - AC_SUBST([GIT_DESCRIBE]) - AC_SUBST([GIT_TAG]) - AC_SUBST([GIT_SEQNO]) - AC_SUBST([GIT_COMMIT]) - fi -]) diff --git a/config/gr_gprof.m4 b/config/gr_gprof.m4 deleted file mode 100644 index 20bacf363..000000000 --- a/config/gr_gprof.m4 +++ /dev/null @@ -1,72 +0,0 @@ -dnl -dnl Copyright 2002 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. -dnl - -dnl FIXME probably need to add linker flag too... - -AC_DEFUN([GR_SET_GPROF],[ - dnl Check for --with-gprof - AC_MSG_CHECKING([whether user wants gprof]) - AC_ARG_WITH(gprof, - [ --with-gprof Turn on gprof profiling], - [], [ with_gprof=no ]) - AC_MSG_RESULT($with_gprof) - - dnl gprof profiling flags for the two main compilers - cc_profiling_flags="-pg" - cxx_profiling_flags="-pg" - ld_profiling_flags="-pg" - if test $with_gprof = yes - then - if test -n "${CC}" - then - LF_CHECK_CC_FLAG($cc_profiling_flags) - fi - if test -n "${CXX}" - then - LF_CHECK_CXX_FLAG($cxx_profiling_flags) - fi - fi -]) - -AC_DEFUN([GR_SET_PROF],[ - dnl Check for --with-prof - AC_MSG_CHECKING([whether user wants prof]) - AC_ARG_WITH(prof, - [ --with-prof Turn on prof profiling], - [], [ with_prof=no ]) - AC_MSG_RESULT($with_prof) - - dnl prof profiling flags for the two main compilers - cc_profiling_flags="-p" - cxx_profiling_flags="-p" - ld_profiling_flags="-p" - if test $with_prof = yes - then - if test -n "${CC}" - then - LF_CHECK_CC_FLAG($cc_profiling_flags) - fi - if test -n "${CXX}" - then - LF_CHECK_CXX_FLAG($cxx_profiling_flags) - fi - fi -]) diff --git a/config/gr_guile.m4 b/config/gr_guile.m4 deleted file mode 100644 index b5879e081..000000000 --- a/config/gr_guile.m4 +++ /dev/null @@ -1,76 +0,0 @@ -dnl -dnl Copyright 2003,2004,2005 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. -dnl - -# GUILE_DEVEL() -# -# Checks for Guile and tries to get the include path to 'Guile.h'. -# It sets the $(GUILE_CPPFLAGS), $(GUILE_LDFLAGS) and $(guiledir) output variables, -# -AC_DEFUN([GUILE_DEVEL],[ - dnl see if GUILE is installed - AC_PATH_PROG(GUILE, guile) - dnl get the config program - AC_PATH_PROG(GUILE_CONFIG, guile-config) - if test x${GUILE_CONFIG} != x; then - GUILE_CFLAGS="`${GUILE_CONFIG} compile`" - GUILE_LIBS="`${GUILE_CONFIG} link`" - GUILE_PKLIBDIR="`${GUILE_CONFIG} info pkglibdir`" - GUILE_PKDATADIR="`${GUILE_CONFIG} info pkgdatadir`/site" - else - dnl Only break on an error if we are using guile. - dnl This should be taken care of in gr_scripting.m4 and I don't know why it's not. - if test x${enable_guile} = xyes; then - AC_MSG_ERROR([You need to install the guile development files (e.g., libguile-dev, guile-devel, etc.)!]) - fi - GUILE_CFLAGS="" - GUILE_PKLIBDIR="" - GUILE_LIBS="Wl,-Bsymbolic-functions -lguile -lgmp -lcrypt" - fi - AC_SUBST(GUILE_CFLAGS) - AC_SUBST(GUILE_PKLIBDIR) - AC_SUBST(GUILE_PKDATADIR) - AC_SUBST(GUILE_LIBS) - - dnl see if we've got lt_dladvise_global (libtool-2.*) - AC_SEARCH_LIBS([lt_dladvise_global],[ltdl], - [AC_DEFINE([HAVE_LT_DLADVISE_GLOBAL], [1], - [Define if lt_dladvise_global exists.])], - [],[]) -]) - -# GUILE_CHECK_MODULE -# -# Determines if a particular Guile module can be imported -# -# $1 - module name -# $2 - module description -# $3 - action if found -# $4 - action if not found -# $5 - test command - -AC_DEFUN([GUILE_CHECK_MODULE],[ - AC_MSG_CHECKING([for $2]) - dnl ######################################## - dnl # import and test checking - dnl ######################################## - dnl if test x${enable_guile} = xyes; then - dnl fi -]) diff --git a/config/gr_lib64.m4 b/config/gr_lib64.m4 deleted file mode 100644 index 92f1bd917..000000000 --- a/config/gr_lib64.m4 +++ /dev/null @@ -1,85 +0,0 @@ -dnl -dnl Copyright 2005,2008 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. -dnl - -dnl GR_LIB64() -dnl -dnl Checks to see if we're on a x86_64 or powerpc64 machine, and if so, determine -dnl if libdir should end in "64" or not. -dnl -dnl Sets gr_libdir_suffix to "" or "64" and calls AC_SUBST(gr_libdir_suffix) -dnl May append "64" to libdir. -dnl -dnl The current heuristic is: -dnl if the host_cpu isn't x86_64 or powerpc64, then "" -dnl if the host_os isn't linux, then "" -dnl if we're cross-compiling, ask the linker, by way of the selected compiler -dnl if we're x86_64 and there's a /lib64 and it's not a symlink, then "64", else "" -dnl else ask the compiler -dnl -AC_DEFUN([GR_LIB64],[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AC_PROG_CXX]) - - AC_MSG_CHECKING([gr_libdir_suffix]) - gr_libdir_suffix="" - AC_SUBST([gr_libdir_suffix]) - - case "$host_os" in - linux*) is_linux=yes ;; - *) is_linux=no ;; - esac - - if test "$is_linux" = no || test "$host_cpu" != "x86_64" && test "$host_cpu" != "powerpc64"; then - gr_libdir_suffix="" - elif test "$cross_compiling" = yes; then - _GR_LIB64_ASK_COMPILER - elif test "$host_cpu" = "x86_64"; then - if test -d /lib64 && test ! -L /lib64; then - gr_libdir_suffix=64 - fi - else - _GR_LIB64_ASK_COMPILER - fi - AC_MSG_RESULT([$gr_libdir_suffix]) - - - AC_MSG_CHECKING([whether to append 64 to libdir]) - t=${libdir##*/lib} - if test "$t" != 64 && test "$gr_libdir_suffix" = "64"; then - libdir=${libdir}64 - AC_MSG_RESULT([yes. Setting libdir to $libdir]) - else - AC_MSG_RESULT([no]) - fi -]) - -dnl If we're using g++, extract the first SEARCH_DIR("...") entry from the linker script -dnl and see if it contains a suffix after the final .../lib part of the path. -dnl (This works because the linker script varies depending on whether we're generating -dnl 32-bit or 64-bit executables) -dnl -AC_DEFUN([_GR_LIB64_ASK_COMPILER],[ - if test "$ac_cv_cxx_compiler_gnu" = "yes"; - then - gr_libdir_suffix=`$CXX -Wl,--verbose 2>/dev/null | sed -n -e '/SEARCH_DIR/{s/;.*$//; s,^.*/,,; s/".*$//; s/^lib//; p}'` - fi -]) - diff --git a/config/gr_libgnuradio_core_extra_ldflags.m4 b/config/gr_libgnuradio_core_extra_ldflags.m4 deleted file mode 100644 index 43f872c04..000000000 --- a/config/gr_libgnuradio_core_extra_ldflags.m4 +++ /dev/null @@ -1,40 +0,0 @@ -# Check for (MinGW)win32 extra ld options. -*- Autoconf -*- - -# Copyright 2003,2004,2005 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. - -dnl -AC_DEFUN([GR_LIBGNURADIO_CORE_EXTRA_LDFLAGS], [ -AC_REQUIRE([AC_PROG_LD]) -# on Mingw32 extra LDFLAGS are required to ease global variable linking -LIBGNURADIO_CORE_EXTRA_LDFLAGS="" - -AC_MSG_CHECKING([whether $LD accepts --enable-runtime-pseudo-reloc]) -if ${LD} --enable-runtime-pseudo-reloc --version >/dev/null 2>&1 -then - # libtool requires the quotes - LIBGNURADIO_CORE_EXTRA_LDFLAGS="\"-Wl,--enable-runtime-pseudo-reloc\"" - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -AC_SUBST(LIBGNURADIO_CORE_EXTRA_LDFLAGS) - -]) diff --git a/config/gr_no_undefined.m4 b/config/gr_no_undefined.m4 deleted file mode 100644 index c8d745d5f..000000000 --- a/config/gr_no_undefined.m4 +++ /dev/null @@ -1,44 +0,0 @@ -dnl -dnl Copyright 2005 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. -dnl - -# GR_NO_UNDEFINED() -# -# Detemine whether we need to use the -no-undefined linker flag -# when building shared libraries. -# Sets NO_UNDEFINED to "" or "-no-undefined" -# -# As far as I can tell, we need -no-undefined only when building -# windows DLLs. This occurs when using MinGW and Cygwin. -# -# For now, we stub this out. - -AC_DEFUN([GR_NO_UNDEFINED],[ - AC_REQUIRE([AC_CANONICAL_HOST]) - no_undefined="" - case "${host_os}" in - *mingw* | *cygwin*) - - # on MinGW/Cygwin extra LDFLAGS are required - no_undefined="-no-undefined" - ;; - esac - AC_SUBST(NO_UNDEFINED,[$no_undefined]) -]) diff --git a/config/gr_pwin32.m4 b/config/gr_pwin32.m4 deleted file mode 100644 index 6b27b439f..000000000 --- a/config/gr_pwin32.m4 +++ /dev/null @@ -1,138 +0,0 @@ -# Check for (mingw)win32 POSIX replacements. -*- Autoconf -*- - -# Copyright 2003,2004,2005,2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. - - -AC_DEFUN([GR_PWIN32], -[ -AC_REQUIRE([AC_HEADER_TIME]) -AC_CHECK_HEADERS([sys/types.h fcntl.h io.h]) -AC_CHECK_HEADERS([windows.h]) -AC_CHECK_HEADERS([winioctl.h winbase.h], [], [], [ - #if HAVE_WINDOWS_H - #include <windows.h> - #endif -]) - -AC_CHECK_FUNCS([getopt usleep gettimeofday nanosleep rand srand random srandom sleep sigaction]) -AC_CHECK_TYPES([struct timezone, struct timespec, ssize_t],[],[],[ - #if HAVE_SYS_TYPES_H - # include <sys/types.h> - #endif - #if TIME_WITH_SYS_TIME - # include <sys/time.h> - # include <time.h> - #else - # if HAVE_SYS_TIME_H - # include <sys/time.h> - # else - # include <time.h> - # endif - #endif -]) - -dnl Checks for replacements -AC_REPLACE_FUNCS([getopt usleep gettimeofday]) - - -AC_MSG_CHECKING(for Sleep) -AC_TRY_LINK([ #include <windows.h> - #include <winbase.h> - ], [ Sleep(0); ], - [AC_DEFINE(HAVE_SSLEEP,1,[Define to 1 if you have win32 Sleep]) - AC_MSG_RESULT(yes)], - AC_MSG_RESULT(no) - ) - -AH_BOTTOM( -[ -/* Define missing prototypes, implemented in replacement lib */ -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef HAVE_GETOPT -int getopt (int argc, char * const argv[], const char * optstring); -extern char * optarg; -extern int optind, opterr, optopt; -#endif - -#ifndef HAVE_USLEEP -int usleep(unsigned long usec); /* SUSv2 */ -#endif - -#ifndef HAVE_NANOSLEEP -#ifndef HAVE_STRUCT_TIMESPEC -#if HAVE_SYS_TYPES_H -# include <sys/types.h> /* need time_t */ -#endif -struct timespec { - time_t tv_sec; - long tv_nsec; -}; -#endif -#if HAVE_UNISTD_H -#include <unistd.h> -#endif -static inline int nanosleep(const struct timespec *req, struct timespec *rem) { return usleep(req->tv_sec*1000000+req->tv_nsec/1000); } -#endif - -#if defined(HAVE_SSLEEP) && !defined(HAVE_SLEEP) -#ifdef HAVE_WINBASE_H -#include <windows.h> -#include <winbase.h> -#endif -/* TODO: what about SleepEx? */ -static inline unsigned int sleep (unsigned int nb_sec) { Sleep(nb_sec*1000); return 0; } -#endif - -#ifndef HAVE_GETTIMEOFDAY -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> -#endif -#ifndef HAVE_STRUCT_TIMEZONE -struct timezone { - int tz_minuteswest; - int tz_dsttime; -}; -#endif -int gettimeofday(struct timeval *tv, struct timezone *tz); -#endif - -#if !defined(HAVE_RANDOM) && defined(HAVE_RAND) -#include <stdlib.h> -static inline long int random (void) { return rand(); } -#endif - -#if !defined(HAVE_SRANDOM) && defined(HAVE_SRAND) -static inline void srandom (unsigned int seed) { srand(seed); } -#endif - -#ifndef HAVE_SSIZE_T -typedef size_t ssize_t; -#endif - -#ifdef __cplusplus -} -#endif -]) - - -]) diff --git a/config/gr_python.m4 b/config/gr_python.m4 deleted file mode 100644 index d89f4c504..000000000 --- a/config/gr_python.m4 +++ /dev/null @@ -1,190 +0,0 @@ -dnl -dnl Copyright 2003,2004,2005 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. -dnl - -# PYTHON_DEVEL() -# -# Checks for Python and tries to get the include path to 'Python.h'. -# It sets the $(PYTHON_CPPFLAGS), $(PYTHON_LDFLAGS) and $(pythondir) output variables, -# -AC_DEFUN([PYTHON_DEVEL],[ - AC_REQUIRE([AM_PATH_PYTHON]) - AC_REQUIRE([AC_CANONICAL_HOST]) - - AC_ARG_WITH(pythondir, - AC_HELP_STRING([--with-pythondir=DIR], - [python installation directory (cross-compiling) [[default=$prefix/lib/python2.5/site-packages]]]), - [with_pythondir=${withval}],[with_pythondir=${prefix}/lib/python2.5/site-packages]) - - # if we're cross-compiling, asking the host python about any of - # this is completely useless... - - if test x$cross_compiling != xno - then - pythondir=$with_pythondir - pyexecdir=$with_pythondir - AC_SUBST(PYTHON_CPPFLAGS) - AC_SUBST(PYTHON_LDFLAGS) - else - - # For Fedora Core 5 and 6, see ticket:39 in Trac - if test -f '/etc/redhat-release'; then - if (echo $pyexecdir | grep -q lib64); then - pythondir="$pyexecdir" - fi - else - # Let Python tell us where the install directory is; - # i.e., don't trust AM_PATH_PYTHON - python_cmd=' -import distutils.sysconfig -import os -path = distutils.sysconfig.get_python_lib() -pypath = distutils.sysconfig.get_config_var("exec_prefix") -path = path.split(pypath)[[1]] -if os.sep == "\\": - path = path.replace("\\", "/") -print path -' - pyexecdir=$prefix`$PYTHON -c "$python_cmd"` - pythondir=$pyexecdir - - fi - - # Check for Python include path - AC_MSG_CHECKING([for Python include path]) - if test -z "$PYTHON" ; then - AC_MSG_ERROR([cannot find Python path]) - fi - - # ask distutils which include path we should use - python_cmd=' -import distutils.sysconfig -import os -path = distutils.sysconfig.get_python_inc(plat_specific=False) -if os.sep == "\\": - path = path.replace("\\", "/") -print path -' - python_path=`$PYTHON -c "$python_cmd"` - AC_MSG_RESULT([$python_path]) - if test -z "$python_path" ; then - AC_MSG_ERROR([cannot find Python include path]) - fi - - AC_SUBST(PYTHON_CPPFLAGS,[-I$python_path]) - - # Check for Python headers usability - python_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" - AC_CHECK_HEADERS([Python.h], [], - [AC_MSG_ERROR([cannot find usable Python headers])]) - CPPFLAGS="$python_save_CPPFLAGS" - - # Only set this on mingw and cygwin hosts, (only implemented - # for mingw host, for crosscompiling you need to trick this) - - PYTHON_LDFLAGS="" - case $host_os in - *mingw* | *cygwin* ) - AC_MSG_CHECKING([for Python LDFLAGS]) - - python_cmd=' -import distutils.sysconfig -import os -path = distutils.sysconfig.get_config_var("LIBPL") -if path == None: - path = distutils.sysconfig.PREFIX + "/libs" -if os.sep == "\\": - path = path.replace("\\", "/") -print path -' - python_stdlib_path=`$PYTHON -c "$python_cmd"` - - python_version_nodot=`echo $PYTHON_VERSION | sed "s,\.,,"` - libpython_name="python$PYTHON_VERSION" - - # Standard install of python for win32 has libpython24.a - # instead of libpython2.4.a so we check for the library - # without the dot in the version number. - - python_stdlib_filename=`find $python_stdlib_path -type f -name libpython$python_version_nodot.* -print | sed "1q"` - if test -n "$python_stdlib_filename" ; then - libpython_name="python$python_version_nodot" - fi - - PYTHON_LDFLAGS="-L$python_stdlib_path -l$libpython_name" - AC_MSG_RESULT($PYTHON_LDFLAGS) - # Replace all backslashes in PYTHON Paths with forward slashes - pythondir=`echo $pythondir |sed 's,\\\\,/,g'` - pkgpythondir=`echo $pkgpythondir |sed 's,\\\\,/,g'` - pyexecdir=`echo $pyexecdir |sed 's,\\\\,/,g'` - pkgpyexecdir=`echo $pkgpyexecdir |sed 's,\\\\,/,g'` - ;; - esac - - case $host_os in - *mingw* ) - # Python 2.5 requires ".pyd" instead of ".dll" for extensions - PYTHON_LDFLAGS="-shrext .pyd ${PYTHON_LDFLAGS}" - esac - - AC_SUBST(PYTHON_LDFLAGS) - fi -]) - -# PYTHON_CHECK_MODULE -# -# Determines if a particular Python module can be imported -# -# $1 - module name -# $2 - module description -# $3 - action if found -# $4 - action if not found -# $5 - test command - -AC_DEFUN([PYTHON_CHECK_MODULE],[ - AC_MSG_CHECKING([for $2]) - dnl ######################################## - dnl # import and test checking - dnl ######################################## - if test "$5"; then - python_cmd=' -try: - import $1 - assert $5 -except ImportError, AssertionError: exit(1) -except: pass' - dnl ######################################## - dnl # import checking only - dnl ######################################## - else - python_cmd=' -try: import $1 -except ImportError: exit(1) -except: pass' - fi - if ! $PYTHON -c "$python_cmd" 2> /dev/null; then - AC_MSG_RESULT([no]) - $4 - else - AC_MSG_RESULT([yes]) - $3 - fi -]) diff --git a/config/gr_qwt.m4 b/config/gr_qwt.m4 deleted file mode 100644 index 035e94091..000000000 --- a/config/gr_qwt.m4 +++ /dev/null @@ -1,152 +0,0 @@ -dnl -dnl Copyright 2007,2008 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. -dnl - -dnl Configure paths for library qwt. -dnl -dnl GR_QWT([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -dnl -dnl Test for library qwt, set QWT_CFLAGS and QWT_LIBS if found. Assumes -dnl QT_CFLAGS and QT_LIBS have already been correctly set. -dnl - -AC_DEFUN([GR_QWT], -[ - dnl QWT Library Version - QWT_LIBRARY1=-lqwt-qt4 - QWT_LIBRARY2=-lqwt - - dnl Save the environment - AC_LANG_PUSH(C++) - qwt_save_CPPFLAGS="$CPPFLAGS" - qwt_save_LIBS="$LIBS" - libqwt_ok=yes - - dnl QWT Info - dnl Allow user to specify where QWT files are - AC_ARG_WITH([qwt-libdir], - [ --with-qwt-libdir=path Prefix where QWT library is installed (optional)], - [qwt_libdir="$withval"], [qwt_libdir=""]) - - AC_ARG_WITH([qwt-incdir], - [ --with-qwt-incdir=path Prefix where QWT include files are (optional)], - [qwt_incdir="$withval"], [qwt_incdir=""]) - AC_ARG_WITH([qwt-lib], - [ --with-qwt-lib=library QWT library name (optional)], - [qwt_lib="$withval"], [qwt_lib=""]) - - dnl Check for presence of header files - dnl if not user-specified, try the first include dir (Ubuntu), then - dnl try the second include dir (Fedora) - CPPFLAGS="$CPPFLAGS $QTCORE_CFLAGS" - - dnl if not set by user - if test "$qwt_incdir" = "" ; then - dnl check qwt-qt4/qwt.h (as in Ubuntu) - AC_CHECK_HEADER( - [qwt-qt4/qwt_math.h], - [qwt_qt4_qwt_h=yes], - [qwt_qt4_qwt_h=no] - ) - dnl If it was found, set the flags and move on - if test "$qwt_qt4_qwt_h" = "yes" ; then - QWT_CFLAGS="$QWT_CFLAGS -I/usr/include/qwt-qt4" - else - dnl check qwt/qwt.h (as in Fedora) - AC_CHECK_HEADER( - [qwt/qwt_math.h], - [qwt_qwt_h=yes], - [qwt_qwt_h=no] - ) - dnl if it was found, set the flags and move on - if test "$qwt_qwt_h" = "yes" ; then - QWT_CFLAGS="$QWT_CFLAGS -I/usr/include/qwt" - else - dnl otherwise, qwt.h wasn't found, so set the flag to no - libqwt_ok=no - fi - fi - else - dnl Using the user-specified include directory - QWT_CFLAGS="$QWT_CFLAGS -I$qwt_incdir" - AC_CHECK_HEADER( - [$qwt_incdir/qwt.h], - [], - [libqwt_ok=no]) - fi - - dnl Don't bother going on if we can't find the headers - if test "$libqwt_ok" = "yes" ; then - - dnl Check for QWT library (qwt or qwt-qt4) - - dnl User-defined QWT library path - if test "$qwt_libdir" != "" ; then - QWT_LIBS="-L$qwt_libdir $QWT_LIBS" - fi - - dnl temporarily set these so the AC_CHECK_LIB works - CPPFLAGS="$CPPFLAGS $QWT_CFLAGS" - LIBS="$qwt_save_LIBS $QT_LIBS $QWT_LIBS -lqwt" - - dnl If the user specified a qwt library name, use it here - if test "$qwt_lib" != "" ; then - AC_CHECK_LIB([$qwt_lib], [main], [libqwt_ok=yes], [libqwt_ok=no]) - - else - dnl Check for 'main' in libqwt (Fedora) - AC_CHECK_LIB([qwt], [main], [libqwt_ok=yes], [libqwt_ok=no]) - - dnl If library found properly, set the flag and move on - if test "$libqwt_ok" = "yes" ; then - QWT_LIBS="$QWT_LIBS -lqwt" - else - dnl Otherwise, check for 'main' in libqwt-qt4 (Ubuntu) - LIBS="$qwt_save_LIBS $QT_LIBS $QWT_LIBS -lqwt-qt4" - AC_CHECK_LIB([qwt-qt4], [main], [libqwt_ok=yes], [libqwt_ok=no]) - if test "$libqwt_ok" = "yes" ; then - QWT_LIBS="$QWT_LIBS -lqwt-qt4" - else - AC_MSG_RESULT([Could not link to libqwt.so]) - fi - fi - fi - else - AC_MSG_RESULT([Could not find qwt headers]) - fi - - dnl Restore saved variables - LIBS="$qwt_save_LIBS" - CPPFLAGS="$qwt_save_CPPFLAGS" - AC_LANG_POP - - dnl Execute user actions - if test "x$libqwt_ok" = "xyes" ; then - ifelse([$1], , :, [$1]) - else - QWT_CFLAGS="" - QWT_LIBDIRS="" - ifelse([$2], , :, [$2]) - fi - - dnl Export our variables - AC_SUBST(QWT_CFLAGS) - AC_SUBST(QWT_LIBS) -]) diff --git a/config/gr_require_mc4020.m4 b/config/gr_require_mc4020.m4 deleted file mode 100644 index 90774fd33..000000000 --- a/config/gr_require_mc4020.m4 +++ /dev/null @@ -1,33 +0,0 @@ -dnl -dnl Copyright 2003,2004 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. -dnl - -AC_DEFUN([GR_REQUIRE_MC4020],[ - AC_MSG_CHECKING([for mc4020 A/D driver include file]) - AC_COMPILE_IFELSE([ -#include <mc4020.h> -int main (int argc, char **argv) -{ - return 0; -} -],[AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([mc4020.h not found.])]) -]) diff --git a/config/gr_scripting.m4 b/config/gr_scripting.m4 deleted file mode 100644 index 866b7e017..000000000 --- a/config/gr_scripting.m4 +++ /dev/null @@ -1,38 +0,0 @@ -dnl -dnl Copyright 2003 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. -dnl - -AC_DEFUN([GR_SCRIPTING],[ - AC_REQUIRE([AC_PROG_LN_S]) - AC_REQUIRE([AC_PROG_CXX]) - AC_REQUIRE([AC_PROG_LIBTOOL]) - - SWIG_PROG(1.3.31) - SWIG_ENABLE_CXX - dnl We need python at build time, as it's used as for utilities. If python - dnl isn't enabled, then we don't want the SWIG support for python. - AC_REQUIRE([AM_PATH_PYTHON]) - if test x${enable_python} = xyes; then - SWIG_PYTHON - fi - if test x${enable_guile} = xyes; then - SWIG_GUILE - fi -]) diff --git a/config/gr_set_md_cpu.m4 b/config/gr_set_md_cpu.m4 deleted file mode 100644 index cb5fb5aac..000000000 --- a/config/gr_set_md_cpu.m4 +++ /dev/null @@ -1,115 +0,0 @@ -dnl -dnl Copyright 2003,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. -dnl - -AC_DEFUN([_TRY_ADD_ALTIVEC], -[ - LF_CHECK_CC_FLAG([-mabi=altivec -maltivec]) - LF_CHECK_CXX_FLAG([-mabi=altivec -maltivec]) -]) - -AC_DEFUN([_FIND_ARM_ISA], -[ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[#ifndef __ARM_ARCH_5__ - #error "Not armv5" - #endif - ]])], - [is_armv5=yes], - [is_armv5=no]) - - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[#ifndef __ARM_ARCH_7A__ - #error "Not armv7-a" - #endif - ]])], - [is_armv7_a=yes], - [is_armv7_a=no]) - -]) - -AC_DEFUN([GR_SET_MD_CPU],[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_ARG_WITH(md-cpu, - AC_HELP_STRING([--with-md-cpu=ARCH],[set machine dependent speedups (auto)]), - [cf_with_md_cpu="$withval"], - [ - 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 ;; - powerpc*) MD_CPU=powerpc ;; - arm*) - _FIND_ARM_ISA - if test $is_armv5 = yes; then MD_CPU=armv5; - elif test $is_armv7_a = yes; then MD_CPU=armv7_a; - else MD_CPU=generic; fi - ;; - *) MD_CPU=generic ;; - esac - - AC_ARG_ENABLE(altivec, - AC_HELP_STRING([--enable-altivec],[enable altivec on PowerPC (yes)]), - [ if test $MD_CPU = powerpc; then - case "$enableval" in - (no) MD_CPU=generic ;; - (yes) _TRY_ADD_ALTIVEC ;; - (*) AC_MSG_ERROR([Invalid argument ($enableval) to --enable-altivec]) ;; - esac - fi], - [ if test $MD_CPU = powerpc; then _TRY_ADD_ALTIVEC fi]) - - - AC_MSG_CHECKING([for machine dependent speedups]) - AC_MSG_RESULT($MD_CPU) - AC_SUBST(MD_CPU) - AC_SUBST(MD_SUBCPU) - - AM_CONDITIONAL(MD_CPU_x86, test "$MD_CPU" = "x86") - AM_CONDITIONAL(MD_SUBCPU_x86_64, test "$MD_SUBCPU" = "x86_64") - AM_CONDITIONAL(MD_CPU_powerpc, test "$MD_CPU" = "powerpc") - AM_CONDITIONAL(MD_CPU_armv5, test "$MD_CPU" = "armv5") - AM_CONDITIONAL(MD_CPU_armv7_a, test "$MD_CPU" = "armv7_a") - AM_CONDITIONAL(MD_CPU_generic, test "$MD_CPU" = "generic") -]) diff --git a/config/gr_subversion.m4 b/config/gr_subversion.m4 deleted file mode 100644 index 849d7a9f6..000000000 --- a/config/gr_subversion.m4 +++ /dev/null @@ -1,36 +0,0 @@ -dnl -dnl Copyright 2007 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. -dnl - -# GR_SUBVERSION() -# -# Test for presence of subversion, and create variables for -# current repository version and last changed date. - -AC_DEFUN([GR_SUBVERSION],[ - AC_PATH_PROG([SVN],[svn]) - if test "$SVN" != "" -a -d .svn ; then - SVNVERSION=`$SVN info . | grep '^Revision' | cut -f 2- -d ' '` - SVNDATE=`$SVN info . | grep 'Last Changed Date' | cut -f 4-6 -d ' '` - fi - - AC_SUBST(SVNVERSION) - AC_SUBST(SVNDATE) -]) diff --git a/config/gr_swig.m4 b/config/gr_swig.m4 deleted file mode 100644 index dcc2e72dc..000000000 --- a/config/gr_swig.m4 +++ /dev/null @@ -1,109 +0,0 @@ -dnl -dnl Copyright 2003 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. -dnl - -# SWIG_PROG([required-version]) -# -# Checks for the SWIG program. If found you can (and should) call SWIG via $(SWIG). -# You can use the optional first argument to check if the version of the available SWIG -# is greater or equal to the value of the argument. It should have the format: -# N[.N[.N]] (N is a number between 0 and 999. Only the first N is mandatory.) -AC_DEFUN([SWIG_PROG],[ - AC_REQUIRE([AC_PROG_MAKE_SET]) - AC_CHECK_PROG(SWIG,swig,[`which swig`]) - if test -z "$SWIG" ; then - AC_MSG_ERROR([Cannot find 'swig' program. SWIG version >= $1 required]) - SWIG=false - elif test -n "$1" ; then - AC_MSG_CHECKING([for SWIG version]) - swig_version=`$SWIG -version 2>&1 | \ - awk '/^SWIG Version [[0-9]+\.[0-9]+\.[0-9]]+.*$/ { split($[3],a,"[[^.0-9]]"); print a[[1]] }'` - AC_MSG_RESULT([$swig_version]) - if test -n "$swig_version" ; then - swig_version=`echo $swig_version | \ - awk '{ split($[1],a,"\."); print [a[1]*1000000+a[2]*1000+a[3]] }' 2>/dev/null` - swig_required_version=`echo $1 | \ - awk '{ split($[1],a,"\."); print [a[1]*1000000+a[2]*1000+a[3]] }' 2>/dev/null` - if test $swig_required_version -gt $swig_version ; then - AC_MSG_ERROR([SWIG version >= $1 required]) - fi - else - AC_MSG_ERROR([cannot determine SWIG version]) - fi - fi -]) - -# SWIG_ENABLE_CXX() -# -# Enable swig C++ support. This effects all invocations of $(SWIG). -AC_DEFUN([SWIG_ENABLE_CXX],[ - AC_REQUIRE([SWIG_PROG]) - AC_REQUIRE([AC_PROG_CXX]) - if test "$SWIG" != "false" ; then - SWIG="$SWIG -c++" - fi -]) - -# SWIG_PYTHON([use-shadow-classes]) -# -# Checks for Python and provides the $(SWIG_PYTHON_CPPFLAGS), -# $(SWIG_PYTHON_LIB) and $(SWIG_PYTHON_OPT) output variables. -# $(SWIG_PYTHON_OPT) contains all necessary swig options to generate -# code for Python. If you need multi module support use -# $(SWIG_PYTHON_LIB) (provided by the SWIG_MULTI_MODULE_SUPPORT() -# macro) to link against the appropriate library. It contains the -# SWIG Python runtime library that is needed by the type check system -# for example. - -AC_DEFUN([SWIG_PYTHON],[ - AC_REQUIRE([SWIG_PROG]) - AC_REQUIRE([PYTHON_DEVEL]) - if test "$SWIG" != "false" ; then - AC_SUBST(SWIG_PYTHON_LIB,[-lswigpy]) -dnl test ! "x$1" = "xno" && swig_shadow=" -shadow" || swig_shadow="" -dnl AC_SUBST(SWIG_PYTHON_OPT,[-python$swig_shadow]) - AC_SUBST(SWIG_PYTHON_OPT,[-python]) - fi - AC_SUBST(SWIG_PYTHON_CPPFLAGS,[$PYTHON_CPPFLAGS]) -]) - -AC_DEFUN([SWIG_TCL],[ - AC_REQUIRE([SWIG_PROG]) - AC_REQUIRE([TCL_DEVEL]) - if test "$SWIG" != "false" ; then - AC_SUBST(SWIG_TCL_LIB,[-ltcl]) -dnl test ! "x$1" = "xno" && swig_shadow=" -shadow" || swig_shadow="" -dnl AC_SUBST(SWIG_PYTHON_OPT,[-python$swig_shadow]) - AC_SUBST(SWIG_TCL_OPT,[-tcl]) - fi - AC_SUBST(SWIG_TCL_CPPFLAGS,[$TCL_CPPFLAGS]) -]) - -AC_DEFUN([SWIG_GUILE],[ - AC_REQUIRE([SWIG_PROG]) - AC_REQUIRE([GUILE_DEVEL]) - if test "$SWIG" != "false" ; then - AC_SUBST(SWIG_GUILE_LIB,[-lguile]) -dnl test ! "x$1" = "xno" && swig_shadow=" -shadow" || swig_shadow="" -dnl AC_SUBST(SWIG_PYTHON_OPT,[-python$swig_shadow]) - AC_SUBST(SWIG_GUILE_OPT,[-guile]) - fi - AC_SUBST(SWIG_GUILE_CPPFLAGS,[$GUILE_CPPFLAGS]) -]) diff --git a/config/gr_sysv_shm.m4 b/config/gr_sysv_shm.m4 deleted file mode 100644 index db5c8351e..000000000 --- a/config/gr_sysv_shm.m4 +++ /dev/null @@ -1,36 +0,0 @@ -# Check for IPC System V shm support. -*- Autoconf -*- - -# Copyright 2003 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, 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, Boston, MA -# 02110-1301, USA. - -AC_DEFUN([GR_SYSV_SHM], -[ - AC_LANG_SAVE - AC_LANG_C - - AC_CHECK_HEADERS([sys/ipc.h sys/shm.h]) - - save_LIBS="$LIBS" - AC_SEARCH_LIBS(shmat, [cygipc ipc], - [ IPC_LIBS="$LIBS" ], - [ AC_MSG_WARN([SystemV IPC support not found. ]) ] - ) - LIBS="$save_LIBS" - - AC_LANG_RESTORE - AC_SUBST(IPC_LIBS) -]) diff --git a/config/gr_tcl.m4 b/config/gr_tcl.m4 deleted file mode 100644 index 106bc6515..000000000 --- a/config/gr_tcl.m4 +++ /dev/null @@ -1,69 +0,0 @@ -dnl -dnl Copyright 2003,2004,2005 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. -dnl - -# TCL_DEVEL() -# -# Checks for Tcl and tries to get the include path to 'Tcl.h'. -# It sets the $(TCL_CPPFLAGS), $(TCL_LDFLAGS) and $(tcldir) output variables, -# -AC_DEFUN([TCL_DEVEL],[ - dnl see if tclsh is installed - if test x${enable_tcl} = xyes; then - AC_PATH_PROG(TCLSH,tclsh) - - AC_REQUIRE([AC_CANONICAL_HOST]) - - AC_ARG_WITH(tcldir, - AC_HELP_STRING([--with-tcldir=DIR], - [tcl installation directory (cross-compiling) [[default=$prefix/lib/tcl2.5/site-packages]]]), - [with_tcldir=${withval}],[with_tcldir=${prefix}/lib/tcl2.5/site-packages]) - - # if we're cross-compiling, asking the host tcl about any of - # this is completely useless... - - dnl if test x$cross_compiling != xno; then - dnl tcldir=$with_tcldir - dnl pyexecdir=$with_tcldir - dnl AC_SUBST(TCL_CPPFLAGS) - dnl AC_SUBST(TCL_LDFLAGS) - dnl else - dnl fi - fi -]) - -# TCL_CHECK_MODULE -# -# Determines if a particular Tcl module can be imported -# -# $1 - module name -# $2 - module description -# $3 - action if found -# $4 - action if not found -# $5 - test command - -AC_DEFUN([TCL_CHECK_MODULE],[ - AC_MSG_CHECKING([for $2]) - dnl ######################################## - dnl # import and test checking - dnl ######################################## - dnl if test x${enable_tcl} = xyes; then - dnl fi -]) diff --git a/config/gr_version.m4 b/config/gr_version.m4 deleted file mode 100644 index a7a202238..000000000 --- a/config/gr_version.m4 +++ /dev/null @@ -1,73 +0,0 @@ -dnl Copyright 2009,2010 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([GR_VERSION],[ - dnl Computed version based on version.sh - dnl Does not force recompile on rev change - dnl - dnl Source the variables describing the release version - dnl - dnl MAJOR_VERSION Major release generation (2.x, 3.x, etc.) - dnl API_COMPAT API compatibility version (3.2.x, 3.3.x, etc.) - dnl MINOR_VERSION Minor release version (3.3.0, 3.3.1, etc.) - dnl MAINT_VERSION Pure bugfix additions to make maintenance release - dnl - dnl The last two fields can have 'git' instead of a number to indicate - dnl that this branch is between versions. - . $srcdir/version.sh - - dnl Get git version if available - GR_GIT - - dnl Test if we should use git version - if test "$MINOR_VERSION" == "git"; then - dnl RELEASE: 3.3git-xxx-gxxxxxxxx - dnl DOCVER: 3.3git - dnl LIBVER: 3.3git - RELEASE=$GIT_DESCRIBE - DOCVER=$MAJOR_VERSION.$API_COMPAT$MINOR_VERSION - LIBVER=$MAJOR_VERSION.$API_COMPAT$MINOR_VERSION - else - if test "$MAINT_VERSION" == "git" ; then - dnl RELEASE: 3.3.1git-xxx-gxxxxxxxx - dnl DOCVER: 3.3.1git - dnl LIBVER: 3.3.1git - RELEASE=$GIT_DESCRIBE - DOCVER=$MAJOR_VERSION.$API_COMPAT.$MINOR_VERSION$MAINT_VERSION - LIBVER=$MAJOR_VERSION.$API_COMPAT.$MINOR_VERSION$MAINT_VERSION - else - dnl This is a numbered release. - dnl RELEASE: 3.3.1{.x} - dnl DOCVER: 3.3.1{.x} - dnl LIBVER: 3.3.1{.x} - RELEASE=$MAJOR_VERSION.$API_COMPAT.$MINOR_VERSION - if test "$MAINT_VERSION" != "0"; then - RELEASE=$RELEASE.$MAINT_VERSION - fi - - DOCVER=$RELEASE - LIBVER=$RELEASE - fi - fi - - AC_MSG_NOTICE([GNU Radio Release $RELEASE]) - AC_SUBST(RELEASE) - AC_SUBST(DOCVER) - AC_SUBST(LIBVER) -]) diff --git a/config/gr_vmcircbuf.m4 b/config/gr_vmcircbuf.m4 deleted file mode 100644 index cf9e394e7..000000000 --- a/config/gr_vmcircbuf.m4 +++ /dev/null @@ -1,37 +0,0 @@ -dnl -dnl Copyright 2011 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. -dnl - -AC_DEFUN([GR_VMCIRCBUF],[ - dnl Control availability of vmcircbuf methods. - dnl For now, only allows disabling of shm methods, which cause uncatchable - dnl segmentation faults on Cygwin with gcc 4.x (x <= 5) - - AC_MSG_CHECKING([whether to try shm vmcircbuf methods]) - AC_ARG_WITH(shm-vmcircbuf, - [AS_HELP_STRING([--without-shm-vmcircbuf], - [do not attempt to use shm vmcircbuf methods])], - [], [ with_shm_vmcircbuf=yes ]) - AC_MSG_RESULT($with_shm_vmcircbuf) - - AS_IF([test "x$with_shm_vmcircbuf" != xno], - [AC_DEFINE([TRY_SHM_VMCIRCBUF], [1], - [Define if ok to try shm vmcircbuf methods]) ]) -]) diff --git a/config/grc_build.m4 b/config/grc_build.m4 deleted file mode 100644 index 121c4feb6..000000000 --- a/config/grc_build.m4 +++ /dev/null @@ -1,288 +0,0 @@ -dnl Copyright 2006,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. - -dnl Create --enable-foo argument for named component, create variables as needed -dnl $1 is component name -AC_DEFUN([GRC_ENABLE], [ - _GRC_ENABLE($1,m4_bpatsubst($1,-,_)) -]) -dnl $2 is the '_'d component name -dnl on exit variable enable_$2 will be set to [yes|no]; -dnl passed will be [yes|no] (same as enable_$2) - -AC_DEFUN([_GRC_ENABLE],[ - passed=yes - AC_ARG_ENABLE([$1], - AC_HELP_STRING([--enable-$1], - [Stop if $1 fails configuration]), - [],[ - [enable_]$2=$enable_all_components - if test x$enable_all_components = xno; then - passed=no - fi - ]) -]) -dnl Component specific configuration -dnl The order of the GR_ macros determines the order of compilation -dnl For -any- checks on $enable_all_components -dnl use the following guildlines: -dnl yes : --enable-all-components was specified, so error out if any -dnl components do not pass configuration checks. -dnl no : --disable-all-components was specified, so try to build the -dnl --enable'd components, and error out if any do not pass -dnl configuration checks. -dnl "" : this option was not specified on the command line; try to -dnl build all components that are not --with'd, but don't -dnl error out if any component does not pass configuration checks. -dnl -dnl For each --enable-foo component, if that flag is not specified on -dnl the command line, the related variable $enable_foo will be set to -dnl $enable_all_components . - -dnl Create --with-foo argument for named compoment, create variables as needed -dnl $1 is component name -dnl $2 is what to do on success -dnl $3 is the PKG_CONFIG name; if not given, then $1 -AC_DEFUN([GRC_WITH], [ - if test [x]$3 = x; then - pc_comp_name="$1" - else - pc_comp_name="$3" - fi - _GRC_WITH($1,[$2],${pc_comp_name},m4_bpatsubst($1,-,_)) -]) -dnl $3 is the pkg-config component name -dnl $4 is the '_'d component name -dnl on exit variable passed will be [yes|no|with]: -dnl yes: if --enable-$1 and/or --enable-all-components was specified, -dnl but --with was not; -dnl with: if --with-$1 was specified, and passed checks; -dnl no: all other conditions -AC_DEFUN([_GRC_WITH],[ - AC_ARG_WITH([$1], - AC_HELP_STRING([--with-$1@<:@=PATH@:>@], - [Use package $1 if installed in PATH (if specified) or PKG_CONFIG_PATH (if PATH not specified); stop if $1 not found]), - [if test "x$withval" != "xyes"; then - [with_]$4[_val]=$withval - [with_]$4=yes - fi], - []) - if test x$[with_]$4 = xyes; then - if test x$[enable_]$4 = xyes; then - AC_MSG_ERROR([Component $1: Cannot use both --enable and --with]) - else - _GRC_WITH_PKG_CONFIG_CHECK($1,$3,$4) - ifelse([$2], , :, [$2]) - fi - fi -]) - -dnl Use 'pkgconfig' to check for a package -dnl $1 is the --with component name -dnl $2 is the pkg-config component name, if provided; otherwise use $1 for this -dnl on success, resulting INCLUDES, INCLUDEDIR, LA, and LIBDIRPATH variables -dnl will be set; on failure, will exit with an error. -AC_DEFUN([GRC_WITH_PKG_CONFIG_CHECK], [ - if test [x]$2 = x; then - pc_comp_name="$1" - else - pc_comp_name="$2" - fi - _GRC_WITH_PKG_CONFIG_CHECK($1,${pc_comp_name},m4_bpatsubst($1,-,_)) -]) -dnl $2 is the pkg-config component name -dnl $3 is the '_'d component name -AC_DEFUN([_GRC_WITH_PKG_CONFIG_CHECK],[ - dnl save PKG_CONFIG_PATH, restore at the end - s_PKG_CONFIG_PATH=$PKG_CONFIG_PATH - - dnl create the PKG_CONFIG_PATH, via this component arg, if provided; - dnl else use the environment PKG_CONFIG_PATH - l_PKG_CONFIG_PATH=$[with_]$3[_val] - if test "x$l_PKG_CONFIG_PATH" != "x"; then - export PKG_CONFIG_PATH=$l_PKG_CONFIG_PATH - - dnl verify that the file exists; if not, no point in continuing - if ! test -r ${l_PKG_CONFIG_PATH}/$2[.pc]; then - AC_MSG_ERROR([Component $1: PKGCONFIG cannot find info for $2, with provided PKG_CONFIG_PATH = @<:@ $l_PKG_CONFIG_PATH @:>@ .]) - fi - fi - - dnl do the check; error out if not found - PKG_CHECK_EXISTS($2, [passed=with; check1=yes], [ - check1=no - dnl pkg-config returned an error; this might be that the .pc - dnl file was not valid, or the Requires: were not met. - dnl If the arg was provided and the input PKG_CONFIG_PATH , then try - dnl again appending the whole PKG_CONFIG_PATH. - if test "x$l_PKG_CONFIG_PATH" != "x"; then - if test "x$s_PKG_CONFIG_PATH" != "x"; then - export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${s_PKG_CONFIG_PATH} - PKG_CHECK_EXISTS($2, passed=with, passed=no) - fi - fi - if test $passed != with; then - AC_MSG_ERROR([Component $1: PKGCONFIG cannot find info for $2, with PKG_CONFIG_PATH = @<:@ $PKG_CONFIG_PATH @:>@ .]) - fi - dnl pkg-config Requires are now met; save the new PKG_CONFIG_PATH - s_PKG_CONFIG_PATH=$PKG_CONFIG_PATH - ]) - - dnl if PKG_CHECK_EXISTS returned, then this component's .pc file was - dnl found in the provided 'arg' PKG_CONFIG_PATH; - dnl retrieve various parameters - $3[_INCLUDES]=`$PKG_CONFIG --cflags-only-I $2` - $3[_LA]=`$PKG_CONFIG --libs $2` - $3[_INCLUDEDIR]=`$PKG_CONFIG --variable=includedir $2` - - if test x$check1 = xyes; then - dnl prepend the args PKG_CONFIG_PATH to the saved one, if the - dnl saved version was not empty - if test "x$s_PKG_CONFIG_PATH" != "x"; then - export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${s_PKG_CONFIG_PATH} - fi - fi -]) - -dnl Check the $prefix versus the --with libdirpath for this component -dnl $1 is the prefix -dnl $2 is the --with component name -dnl $3 is the --with component library path -AC_DEFUN([GRC_PREFIX_LDFLAGS],[ - $2[_LIBDIRPATH]=$3 - dnl create LDFLAGS for this --with, if different from the provided $prefix - if test [x]$1[/lib] != [x]$3; then - $2[_LDFLAG]=[-L]$3 - else - $2[_LDFLAG]= - fi -]) - -dnl Check to make sure this dependency is fulfilled for this component -dnl $1 is the component's name -dnl $2 is the component dependency name -dnl On input and exit, $passed will be: -dnl with : if --with passed muster -dnl yes : if --enable passed muster -dnl no : otherwise -dnl If trying --with, will error-out if any dependency was not --with'd -AC_DEFUN([GRC_CHECK_DEPENDENCY],[ -dnl f0=[enable_]m4_bpatsubst($1,-,_) -dnl f1=[$enable_]m4_bpatsubst($1,-,_) -dnl echo -dnl echo "$1 : Checking Dependency $2" -dnl echo "$1 : enable_all_components is '$enable_all_components'" -dnl echo "$1 : $f0 is '$f1'" -dnl echo "$1 : passed is '$passed'" -dnl echo - if test $passed != no; then - if test $passed = yes; then - dnl make sure this dependency was not skipped - if test [x$]m4_bpatsubst($2,-,_)[_skipped] = xyes; then - AC_MSG_RESULT([Component $1 requires $2, which is not being built or specified via pre-installed files.]) - passed=no - fi - else - dnl make sure this dependency was --with'd only; not --enable'd - if test [x$]m4_bpatsubst($2,-,_)[_with] = xno; then - AC_MSG_ERROR([Component $1 requires $2 to be included as --with-$2@<:@=arg@:>@]) - fi - fi - fi -]) - -dnl Check to make sure GUILE is available -dnl $1 is the component name -AC_DEFUN([GRC_CHECK_GUILE],[ - if test x"$GUILE" = x; then - AC_MSG_RESULT([Component $1 requires guile, which was not found.]) - passed=no - fi -]) - -dnl Add the specified "with" list; clear the provided variable -dnl $1 is the component name -dnl $2 is the path list name suffix -dnl $3 is the separator (for paths, ":"; for includes " ") -AC_DEFUN([GRC_ADD_TO_LIST],[ - if test "x${$1[_]$2}" != "x"; then - if test "x$[with_]$2" = "x"; then - [with_]$2="${$1[_]$2}" - else - [with_]$2="${$1[_]$2}"$3"$[with_]$2" - fi - $1[_]$2= - fi -]) - -dnl Conditionally build named component. -dnl $1 is component name -dnl $2 is executed if configuration passes and build is desired -AC_DEFUN([GRC_BUILD_CONDITIONAL],[ - _GRC_BUILD_CONDITIONAL($1, $2, m4_bpatsubst($1,-,_)) -]) -dnl $3=m4_bpatsubst($1,-,_) -dnl Use $passed=no to indicate configuration failure; -dnl Use $passed=with to indicate the use of pre-installed libraries and headers; -dnl Any other value of $passed, including blank, assumes success; -dnl Defines $3_with=[yes|no] depending on if $passed=with or not (respectively) -dnl Defines $3_skipped=[yes|no] depending on if $passed=no or not (respectively) -AC_DEFUN([_GRC_BUILD_CONDITIONAL],[ - $3[_with]=no - if test $passed = no; then - if test x$[enable_]$3 = xyes; then - AC_MSG_ERROR([Component $1 has errors; stopping.]) - else - AC_MSG_RESULT([Not building component $1.]) - fi - else - if test $passed = with; then - with_dirs="$with_dirs $1" - GRC_ADD_TO_LIST($3, INCLUDES, " ") - GRC_ADD_TO_LIST($3, SWIG_INCLUDES, " ") - GRC_ADD_TO_LIST($3, PYDIRPATH, ":") - GRC_ADD_TO_LIST($3, SWIGDIRPATH, ":") - GRC_ADD_TO_LIST($3, LIBDIRPATH, ":") - GRC_ADD_TO_LIST($3, GUILE_LOAD_PATH, ":") - AC_MSG_RESULT([Component $1 will be included from a pre-installed library and includes.]) - $3[_with]=yes - else - $3[_LDFLAG]= - if test x$[enable_]$3 != xno; then - ifelse([$2], , :, [$2]) - build_dirs="$build_dirs $1" - AC_MSG_RESULT([Component $1 passed configuration checks; building.]) - else - passed=no - AC_MSG_RESULT([Component $1 passed configuration checks; but not building.]) - fi - fi - fi - if test $passed = no; then - skipped_dirs="$skipped_dirs $1" - $3[_skipped]=yes - else - $3[_skipped]=no - fi - AC_SUBST($3[_INCLUDES]) - AC_SUBST($3[_LA]) - AC_SUBST($3[_INCLUDEDIR]) - AC_SUBST($3[_LIBDIRPATH]) - AC_SUBST($3[_LDFLAG]) -]) diff --git a/config/grc_docs.m4 b/config/grc_docs.m4 deleted file mode 100644 index 8ac0e9a42..000000000 --- a/config/grc_docs.m4 +++ /dev/null @@ -1,32 +0,0 @@ -dnl Copyright 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_DOCS],[ - GRC_ENABLE(docs) - - AC_CONFIG_FILES([ \ - docs/Makefile \ - docs/doxygen/Doxyfile \ - docs/doxygen/Makefile \ - docs/doxygen/other/Makefile \ - ]) - - GRC_BUILD_CONDITIONAL(docs) - -]) diff --git a/config/grc_gnuradio_core.m4 b/config/grc_gnuradio_core.m4 deleted file mode 100644 index 229efbd01..000000000 --- a/config/grc_gnuradio_core.m4 +++ /dev/null @@ -1,121 +0,0 @@ -dnl Copyright 2001,2002,2003,2004,2005,2006,2007,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_GNURADIO_CORE],[ - GRC_ENABLE(gnuradio-core) - - GRC_WITH(gnuradio-core, [ - dnl gnuradio-core has some extra defines if --with specified - gnuradio_core_SWIGDIRPATH="$gnuradio_core_INCLUDEDIR/swig" - gnuradio_core_I="$gnuradio_core_SWIGDIRPATH/gnuradio.i" - gnuradio_core_SWIG_INCLUDES="-I$gnuradio_core_SWIGDIRPATH" - gnuradio_core_PYDIRPATH=$pythondir - gnuradio_core_GUILE_LOAD_PATH="`pkg-config --variable=guile_load_path gnuradio-core`" - gnuradio_core_LIBDIRPATH="`pkg-config --variable=libdir gnuradio-core`" - ]) - - dnl Don't do gnuradio-core if gruel skipped - GRC_CHECK_DEPENDENCY(gnuradio-core, gruel) - - dnl If execution gets to here, $passed will be: - dnl with : if the --with code didn't error out - dnl yes : if the --enable code passed muster and all dependencies are met - dnl no : otherwise - if test $passed = yes; then - dnl look for fast CBLAS for GSL, but don't complain if not found - ACX_CBLAS([],[]) - dnl check for GSL - PKG_CHECK_MODULES(GSL, gsl >= 1.10, - [], dnl FIXME remove -lgslcblas from GSL_LIBS if we found a better CBLAS_LIBS above - [passed=no;AC_MSG_RESULT([gnuradio-core requires package gsl >= 1.10, not found.])]) - fi - - if test $passed != with; then - dnl how and where to find INCLUDES and LA and such - gnuradio_core_INCLUDES="\ --I\${abs_top_srcdir}/gnuradio-core/src/lib/runtime \ --I\${abs_top_srcdir}/gnuradio-core/src/lib/general \ --I\${abs_top_builddir}/gnuradio-core/src/lib/general \ --I\${abs_top_srcdir}/gnuradio-core/src/lib/gengen \ --I\${abs_top_builddir}/gnuradio-core/src/lib/gengen \ --I\${abs_top_srcdir}/gnuradio-core/src/lib/filter \ --I\${abs_top_builddir}/gnuradio-core/src/lib/filter \ --I\${abs_top_srcdir}/gnuradio-core/src/lib/missing \ --I\${abs_top_srcdir}/gnuradio-core/src/lib/reed-solomon \ --I\${abs_top_srcdir}/gnuradio-core/src/lib/viterbi \ --I\${abs_top_srcdir}/gnuradio-core/src/lib/io \ --I\${abs_top_srcdir}/gnuradio-core/src/lib/g72x \ --I\${abs_top_srcdir}/gnuradio-core/src/lib/swig \ --I\${abs_top_srcdir}/gnuradio-core/src/lib/hier \ --I\${abs_top_builddir}/gnuradio-core/src/lib/swig" - gnuradio_core_LA="\${abs_top_builddir}/gnuradio-core/src/lib/libgnuradio-core.la" - dnl gnuradio_core_I="\${abs_top_srcdir}/gnuradio-core/src/lib/swig/gnuradio.i" - gnuradio_core_LIBDIRPATH="\${abs_top_builddir}/gnuradio-core/src/lib:\${abs_top_builddir}/gnuradio-core/src/lib/.libs" - gnuradio_core_SWIGDIRPATH="\${abs_top_builddir}/gnuradio-core/src/lib/swig:\${abs_top_builddir}/gnuradio-core/src/lib/swig/.libs:\${abs_top_srcdir}/gnuradio-core/src/lib/swig" - gnuradio_core_PYDIRPATH="\${abs_top_srcdir}/gnuradio-core/src/python" - fi - - dnl other externally-required gnuradio-core variables - AC_SUBST(gnuradio_core_I) - AC_SUBST(gnuradio_core_SWIGDIRPATH) - AC_SUBST(gnuradio_core_PYDIRPATH) - - AC_CONFIG_FILES([ \ - gnuradio-core/Makefile - gnuradio-core/gnuradio-core.pc \ - gnuradio-core/src/Makefile \ - gnuradio-core/src/gen_interpolator_taps/Makefile \ - gnuradio-core/src/guile/Makefile \ - gnuradio-core/src/guile/run_guile_tests \ - gnuradio-core/src/guile/gr-run-waveform-script \ - gnuradio-core/src/lib/Makefile \ - gnuradio-core/src/lib/filter/Makefile \ - gnuradio-core/src/lib/general/Makefile \ - gnuradio-core/src/lib/general/gr_constants.cc \ - gnuradio-core/src/lib/gengen/Makefile \ - gnuradio-core/src/lib/io/Makefile \ - gnuradio-core/src/lib/missing/Makefile \ - gnuradio-core/src/lib/reed-solomon/Makefile \ - gnuradio-core/src/lib/viterbi/Makefile \ - gnuradio-core/src/lib/runtime/Makefile \ - gnuradio-core/src/lib/hier/Makefile \ - gnuradio-core/src/lib/swig/Makefile \ - gnuradio-core/src/python/Makefile \ - gnuradio-core/src/python/bin/Makefile \ - gnuradio-core/src/python/gnuradio/Makefile \ - gnuradio-core/src/python/gnuradio/blks2/Makefile \ - gnuradio-core/src/python/gnuradio/blks2impl/Makefile \ - gnuradio-core/src/python/gnuradio/gr/Makefile \ - gnuradio-core/src/python/gnuradio/gr/run_tests \ - gnuradio-core/src/python/gnuradio/gru/Makefile \ - gnuradio-core/src/python/gnuradio/gruimpl/Makefile \ - gnuradio-core/src/tests/Makefile \ - gnuradio-core/src/utils/Makefile \ - ]) - - GRC_BUILD_CONDITIONAL(gnuradio-core, [ - dnl run_tests is created from run_tests.in. Make it executable. - AC_CONFIG_COMMANDS([run_tests_core], - [ - chmod +x gnuradio-core/src/python/gnuradio/gr/run_tests - chmod +x gnuradio-core/src/guile/run_guile_tests - ]) \ - ]) - -]) diff --git a/config/grc_gnuradio_examples.m4 b/config/grc_gnuradio_examples.m4 deleted file mode 100644 index e60442170..000000000 --- a/config/grc_gnuradio_examples.m4 +++ /dev/null @@ -1,39 +0,0 @@ -dnl Copyright 2001,2002,2003,2004,2005,2006,2008,2009,2011 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_GNURADIO_EXAMPLES],[ - GRC_ENABLE(gnuradio-examples) - - dnl Do not do gnuradio-examples if gnuradio-core or gr-audio skipped - GRC_CHECK_DEPENDENCY(gnuradio-examples, gnuradio-core) - GRC_CHECK_DEPENDENCY(gnuradio-examples, gr-audio) - - AC_CONFIG_FILES([ \ - gnuradio-examples/Makefile \ - gnuradio-examples/python/Makefile \ - gnuradio-examples/grc/Makefile \ - gnuradio-examples/python/mp-sched/Makefile \ - gnuradio-examples/python/network/Makefile \ - gnuradio-examples/python/pfb/Makefile \ - gnuradio-examples/python/tags/Makefile \ - gnuradio-examples/waveforms/Makefile \ - ]) - - GRC_BUILD_CONDITIONAL(gnuradio-examples) -]) diff --git a/config/grc_gr_atsc.m4 b/config/grc_gr_atsc.m4 deleted file mode 100644 index 6dfb40132..000000000 --- a/config/grc_gr_atsc.m4 +++ /dev/null @@ -1,40 +0,0 @@ -dnl Copyright 2001,2002,2003,2004,2005,2006,2008 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_ATSC],[ - GRC_ENABLE(gr-atsc) - - dnl Don't do gr-atsc if gnuradio-core skipped - GRC_CHECK_DEPENDENCY(gr-atsc, gnuradio-core) - - AC_CONFIG_FILES([\ - gr-atsc/Makefile \ - gr-atsc/gnuradio-atsc.pc \ - gr-atsc/doc/Makefile \ - gr-atsc/src/Makefile \ - gr-atsc/src/lib/Makefile \ - gr-atsc/src/python/Makefile \ - gr-atsc/src/python/run_tests \ - ]) - - GRC_BUILD_CONDITIONAL(gr-atsc,[ - dnl run_tests is created from run_tests.in. Make it executable. - AC_CONFIG_COMMANDS([run_tests_atsc], [chmod +x gr-atsc/src/python/run_tests]) - ]) -]) diff --git a/config/grc_gr_audio.m4 b/config/grc_gr_audio.m4 deleted file mode 100644 index 0e881671a..000000000 --- a/config/grc_gr_audio.m4 +++ /dev/null @@ -1,116 +0,0 @@ -dnl Copyright 2011 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_AUDIO],[ - GRC_ENABLE(gr-audio) - - GRC_CHECK_DEPENDENCY(gr-audio, gnuradio-core) - - #################################################################### - ## ALSA Support - #################################################################### - PKG_CHECK_MODULES(ALSA, alsa >= 0.9,[GR_AUDIO_ALSA_SUPPORT=true], - [GR_AUDIO_ALSA_SUPPORT=false;AC_MSG_RESULT([gr-audio alsa support requires package alsa, not found.])]) - AM_CONDITIONAL(GR_AUDIO_ALSA_SUPPORT, $GR_AUDIO_ALSA_SUPPORT) - - #################################################################### - ## OSS Support - #################################################################### - dnl Make sure the correct library and/or headers are available. - case $host_os in - netbsd*) - AC_HAVE_LIBRARY(ossaudio,[GR_AUDIO_OSS_SUPPORT=true], - [GR_AUDIO_OSS_SUPPORT=false;AC_MSG_RESULT([gr-audio oss support requires library ossaudio, not found.])]) - if test $GR_AUDIO_OSS_SUPPORT != false; then - OSS_LIBS=-lossaudio - AC_SUBST(OSS_LIBS) - AC_MSG_RESULT([Using OSS library $OSS_LIBS]) - fi - ;; - darwin*) - dnl OSX / Darwin can't use OSS - GR_AUDIO_OSS_SUPPORT=false - ;; - *) - AC_CHECK_HEADER(sys/soundcard.h,[GR_AUDIO_OSS_SUPPORT=true], - [GR_AUDIO_OSS_SUPPORT=false;AC_MSG_RESULT([gr-audio oss support requires sys/soundcard.h, not found.])]) - esac - AM_CONDITIONAL(GR_AUDIO_OSS_SUPPORT, $GR_AUDIO_OSS_SUPPORT) - - #################################################################### - ## Jack Support - #################################################################### - PKG_CHECK_MODULES(JACK, jack >= 0.8, [GR_AUDIO_JACK_SUPPORT=true], - [GR_AUDIO_JACK_SUPPORT=false;AC_MSG_RESULT([gr-audio jack support requires package jack, not found.])]) - AM_CONDITIONAL(GR_AUDIO_JACK_SUPPORT, $GR_AUDIO_JACK_SUPPORT) - - #################################################################### - ## OSX Support - #################################################################### - case "$host_os" in - darwin*) - MACOSX_AUDIOUNIT([GR_AUDIO_OSX_SUPPORT=true], - [GR_AUDIO_OSX_SUPPORT=false;AC_MSG_RESULT([gr-audio osx support requires AudioUnit, not found.])]) - ;; - *) - AC_MSG_RESULT([gr-audio osx support will build on Mac OS X and Darwin only.]) - GR_AUDIO_OSX_SUPPORT=false - ;; - esac - AM_CONDITIONAL(GR_AUDIO_OSX_SUPPORT, $GR_AUDIO_OSX_SUPPORT) - - #################################################################### - ## PortAudio Support - #################################################################### - PKG_CHECK_MODULES(PORTAUDIO, portaudio-2.0 >= 19,[GR_AUDIO_PORTAUDIO_SUPPORT=true], - [GR_AUDIO_PORTAUDIO_SUPPORT=false;AC_MSG_RESULT([gr-audio portaudio support requires package portaudio, not found.])]) - AM_CONDITIONAL(GR_AUDIO_PORTAUDIO_SUPPORT, $GR_AUDIO_PORTAUDIO_SUPPORT) - - #################################################################### - ## Windows Support - #################################################################### - case "$host_os" in - cygwin*|win*|mingw*) - AC_HAVE_LIBRARY(winmm, [GR_AUDIO_WINDOWS_SUPPORT=true], - [GR_AUDIO_WINDOWS_SUPPORT=false;AC_MSG_RESULT([gr-audio windows support requires library winmm, not found.])]) - ;; - *) - AC_MSG_RESULT([gr-audio windows support will build on a Windows Unix environment only.]) - GR_AUDIO_WINDOWS_SUPPORT=false - ;; - esac - WINAUDIO_LIBS=-lwinmm - AC_SUBST(WINAUDIO_LIBS) - AM_CONDITIONAL(GR_AUDIO_WINDOWS_SUPPORT, $GR_AUDIO_WINDOWS_SUPPORT) - - AC_CONFIG_FILES([ \ - gr-audio/Makefile \ - gr-audio/examples/Makefile \ - gr-audio/examples/c++/Makefile \ - gr-audio/examples/python/Makefile \ - gr-audio/grc/Makefile \ - gr-audio/include/Makefile \ - gr-audio/lib/Makefile \ - gr-audio/swig/Makefile \ - gr-audio/doc/Makefile \ - gr-audio/gnuradio-audio.pc \ - ]) - - GRC_BUILD_CONDITIONAL(gr-audio) -]) diff --git a/config/grc_gr_comedi.m4 b/config/grc_gr_comedi.m4 deleted file mode 100644 index 7e54b0f5a..000000000 --- a/config/grc_gr_comedi.m4 +++ /dev/null @@ -1,47 +0,0 @@ -dnl Copyright 2001,2002,2003,2004,2005,2006,2008 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_COMEDI],[ - GRC_ENABLE(gr-comedi) - - dnl Don't do gr-comedi if gnuradio-core skipped - GRC_CHECK_DEPENDENCY(gr-comedi, gnuradio-core) - - dnl If execution gets to here, $passed will be: - dnl with : if the --with code didn't error out - dnl yes : if the --enable code passed muster and all dependencies are met - dnl no : otherwise - if test $passed = yes; then - dnl Don't do gr-comedi if the 'comedi' library is unavailable. - PKG_CHECK_MODULES(COMEDI, comedilib >= 0.8,[], - [passed=no;AC_MSG_RESULT([gr-comedi requires comedilib, not found.])]) - fi - - AC_CONFIG_FILES([ \ - gr-comedi/Makefile \ - gr-comedi/gnuradio-comedi.pc \ - gr-comedi/src/Makefile \ - gr-comedi/src/run_tests \ - ]) - - GRC_BUILD_CONDITIONAL(gr-comedi,[ - dnl run_tests is created from run_tests.in. Make it executable. - AC_CONFIG_COMMANDS([run_tests_comedi], [chmod +x gr-comedi/src/run_tests]) - ]) -]) diff --git a/config/grc_gr_digital.m4 b/config/grc_gr_digital.m4 deleted file mode 100644 index 9beb59d4b..000000000 --- a/config/grc_gr_digital.m4 +++ /dev/null @@ -1,63 +0,0 @@ -dnl Copyright 2011 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_DIGITAL],[ - GRC_ENABLE(gr-digital) - - dnl Don't do gr-digital if gnuradio-core skipped - GRC_CHECK_DEPENDENCY(gr-digital, gnuradio-core) - - if test $passed != with; then - dnl how and where to find INCLUDES and LA and such - gr_digital_INCLUDES="\ --I\${abs_top_srcdir}/gr-digital/include \ --I\${abs_top_srcdir}/gr-digital/swig" - gr_digital_LA="\${abs_top_builddir}/gr-digital/lib/libgnuradio-digital.la" - gr_digital_LIBDIRPATH="\${abs_top_builddir}/gr-digital/lib:\${abs_top_builddir}/gr-digital/lib/.libs" - gr_digital_SWIGDIRPATH="\${abs_top_builddir}/gr-digtial/lib/swig:\${abs_top_builddir}/gr-digital/swig/.libs:\${abs_top_srcdir}/gr-digital/swig" - gr_digital_PYDIRPATH="\${abs_top_srcdir}/gr-digital/python" - fi - - AC_SUBST(gr_digital_I) - AC_SUBST(gr_digital_SWIGDIRPATH) - AC_SUBST(gr_digital_PYDIRPATH) - - AC_CONFIG_FILES([\ - gr-digital/Makefile \ - gr-digital/gnuradio-digital.pc \ - gr-digital/apps/Makefile \ - gr-digital/grc/Makefile \ - gr-digital/include/Makefile \ - gr-digital/lib/Makefile \ - gr-digital/python/Makefile \ - gr-digital/python/run_tests \ - gr-digital/python/utils/Makefile \ - gr-digital/swig/Makefile \ - gr-digital/swig/run_guile_tests \ - gr-digital/examples/Makefile \ - gr-digital/doc/Makefile \ - ]) - - GRC_BUILD_CONDITIONAL(gr-digital,[ - dnl run_tests is created from run_tests.in. Make it executable. - AC_CONFIG_COMMANDS([run_tests_digital], - [chmod +x gr-digital/python/run_tests - chmod +x gr-digital/swig/run_guile_tests]) - ]) -]) diff --git a/config/grc_gr_fcd.m4 b/config/grc_gr_fcd.m4 deleted file mode 100644 index 61727168f..000000000 --- a/config/grc_gr_fcd.m4 +++ /dev/null @@ -1,76 +0,0 @@ -dnl Copyright 2012 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_FCD],[ - GRC_ENABLE(gr-fcd) - - dnl Dont do gr-fcd if gnuradio-core or gr-audio skipped - GRC_CHECK_DEPENDENCY(gr-fcd, gnuradio-core) - GRC_CHECK_DEPENDENCY(gr-fcd, gr-audio) - - FCD_MACOSX="no" - FCD_WINDOWS="no" - - if test $passed = yes; then - PKG_CHECK_MODULES(USB, libusb-1.0 >= 1.0, [], [passed=no; AC_MSG_RESULT([gr-fcd requires libusb-1.0 >= 1.0])] ) - AC_SUBST(USB_CPPFLAGS) - AC_SUBST(USB_LIBS) - - FCD_CPPFLAGS="${FCD_CPPFLAGS} -I\${abs_top_srcdir}/gr-fcd/include/fcd" - AC_SUBST(FCD_CPPFLAGS) - - case "$target" in - *-*-darwin*) - FCD_MACOSX=yes - ;; - *-*-win*) - FCD_WINDOWS=yes - ;; - esac - fi - - AM_CONDITIONAL([FCD_MACOSX], [test $FCD_MACOSX = yes]) - AM_CONDITIONAL([FCD_WINDOWS], [test $FCD_WINDOWS = yes]) - - # Use this to tell the Makefile whether to define - # GR_HAVE_FCD for swig. - AM_CONDITIONAL([GR_DEFINE_HAVE_FCD],[test $passed = yes]) - - AC_CONFIG_FILES([ \ - gr-fcd/Makefile \ - gr-fcd/gnuradio-fcd.pc \ - gr-fcd/include/Makefile \ - gr-fcd/include/fcd/Makefile \ - gr-fcd/lib/Makefile \ - gr-fcd/lib/hid/Makefile \ - gr-fcd/lib/fcd/Makefile \ - gr-fcd/swig/Makefile \ - gr-fcd/swig/run_guile_tests \ - gr-fcd/python/Makefile \ - gr-fcd/python/run_tests \ - gr-fcd/grc/Makefile \ - gr-fcd/examples/Makefile \ - gr-fcd/doc/Makefile \ - ]) - - GRC_BUILD_CONDITIONAL(gr-fcd,[ - dnl run_tests is created from run_tests.in. Make it executable. - AC_CONFIG_COMMANDS([run_tests_fcd], [chmod +x gr-fcd/python/run_tests gr-fcd/swig/run_guile_tests]) - ]) -]) diff --git a/config/grc_gr_noaa.m4 b/config/grc_gr_noaa.m4 deleted file mode 100644 index f750a4645..000000000 --- a/config/grc_gr_noaa.m4 +++ /dev/null @@ -1,46 +0,0 @@ -dnl Copyright 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_NOAA],[ - GRC_ENABLE(gr-noaa) - - dnl Don't do gr-noaa if gnuradio-core skipped - GRC_CHECK_DEPENDENCY(gr-noaa, gnuradio-core) - GRC_CHECK_DEPENDENCY(gr-noaa, gr-wxgui) - GRC_CHECK_DEPENDENCY(gr-noaa, grc) - - AC_CONFIG_FILES([\ - gr-noaa/Makefile \ - gr-noaa/apps/Makefile \ - gr-noaa/grc/Makefile \ - gr-noaa/lib/Makefile \ - gr-noaa/oct/Makefile \ - gr-noaa/python/Makefile \ - gr-noaa/swig/Makefile \ - gr-noaa/gnuradio-noaa.pc \ - gr-noaa/swig/run_guile_tests \ - ]) - - GRC_BUILD_CONDITIONAL(gr-noaa,[ - dnl run_tests is created from run_tests.in. Make it executable. - AC_CONFIG_COMMANDS([run_tests_noaa], - [chmod +x gr-noaa/swig/run_guile_tests]) - - ]) -]) diff --git a/config/grc_gr_pager.m4 b/config/grc_gr_pager.m4 deleted file mode 100644 index 5330fce3a..000000000 --- a/config/grc_gr_pager.m4 +++ /dev/null @@ -1,44 +0,0 @@ -dnl Copyright 2006,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_PAGER],[ - GRC_ENABLE(gr-pager) - - dnl Don't do gr-pager if gnuradio-core skipped - GRC_CHECK_DEPENDENCY(gr-pager, gnuradio-core) - - AC_CONFIG_FILES([\ - gr-pager/Makefile \ - gr-pager/gnuradio-pager.pc \ - gr-pager/apps/Makefile \ - gr-pager/grc/Makefile \ - gr-pager/lib/Makefile \ - gr-pager/python/Makefile \ - gr-pager/python/run_tests \ - gr-pager/swig/Makefile \ - gr-pager/swig/run_guile_tests \ - ]) - - GRC_BUILD_CONDITIONAL(gr-pager,[ - dnl run_tests is created from run_tests.in. Make it executable. - AC_CONFIG_COMMANDS([run_tests_pager], - [chmod +x gr-pager/python/run_tests - chmod +x gr-pager/swig/run_guile_tests]) - ]) -]) diff --git a/config/grc_gr_qtgui.m4 b/config/grc_gr_qtgui.m4 deleted file mode 100644 index d9e0fcbe9..000000000 --- a/config/grc_gr_qtgui.m4 +++ /dev/null @@ -1,107 +0,0 @@ -dnl Copyright 2001,2002,2003,2004,2005,2006,2008,2011 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_QTGUI],[ - GRC_ENABLE(gr-qtgui) - - dnl Don't do gr-qtgui if gnuradio-core skipped - GRC_CHECK_DEPENDENCY(gr-qtgui, gnuradio-core) - - dnl If execution gets to here, $passed will be: - dnl with : if the --with code didn't error out - dnl yes : if the --enable code passed muster and all dependencies are met - dnl no : otherwise - - PYTHON_CHECK_MODULE([PyQt4.QtCore], [PyQt4 for Qt4], \ - [], [passed=no], \ - [PyQt4.QtCore.PYQT_VERSION >= 260000]) - - PYTHON_CHECK_MODULE([PyQt4.Qwt5], [PyQwt5 for Qt4], \ - [], [passed=no], \ - [PyQt4.Qwt5.QWT_VERSION >= 327000]) - -# Check for: -# QtOpenGL -# QtGui -# QtCore -# qwt -# qt4 - -# qt4-core, qt4-gui, qwt5-qt4, qwt5-qt4-dev, qt4-dev-tools - - if test $passed = yes; then - dnl Check for package qt or qt-mt, set QT_CFLAGS and QT_LIBS - PKG_CHECK_MODULES(QTCORE, QtCore >= 4.4, [], - [passed=no; AC_MSG_RESULT([gr-qtgui requires libQtCore >= 4.4.])]) - PKG_CHECK_MODULES(QTGUI, QtGui >= 4.4, [], - [passed=no; AC_MSG_RESULT([gr-qtgui requires libQtGui >= 4..])]) - - dnl Fetch QWT variables - GR_QWT([], [passed=no]) - - dnl Export the include dirs and libraries (note: QTOPENGL_LIBS includes links - dnl to QtCore and QtGui libraries) - QT_INCLUDES="$QWT_CFLAGS $QTCORE_CFLAGS $QTGUI_CFLAGS" - QT_LIBS="$QWT_LIBS" - - dnl Build an includes variable specifically for running qmake by extracting - dnl all includes from the QWT, without the -I; - dnl qmake appends the -I when processing the project file INCLUDEPATH - for i in $QWT_CFLAGS; do - QMAKE_INCLUDES="$QMAKE_INCLUDES ${i##-I}" - done - - QT_MOC_EXEC=`pkg-config --variable=moc_location QtCore` - QT_UIC_EXEC=`pkg-config --variable=uic_location QtCore` - - gr_qtgui_INCLUDES="\ --I\${abs_top_srcdir}/gr-qtgui/include \ --I\${abs_top_srcdir}/gr-qtgui/swig" - gr_qtgui_LA="\${abs_top_builddir}/gr-qtgui/lib/libgnuradio-qtgui.la" - gr_qtgui_LIBDIRPATH="\${abs_top_builddir}/gr-qtgui/lib:\${abs_top_builddir}/gr-qtgui/lib/.libs" - gr_qtgui_SWIGDIRPATH="\${abs_top_builddir}/gr-digtial/lib/swig:\${abs_top_builddir}/gr-qtgui/swig/.libs:\${abs_top_srcdir}/gr-qtgui/swig" - gr_qtgui_PYDIRPATH="\${abs_top_srcdir}/gr-qtgui/python" - - AC_SUBST(QMAKE_INCLUDES) - AC_SUBST(QT_INCLUDES) - AC_SUBST(QT_LIBS) - AC_SUBST(QT_MOC_EXEC) - AC_SUBST(QT_UIC_EXEC) - fi - - AC_CONFIG_FILES([ \ - gr-qtgui/Makefile \ - gr-qtgui/gnuradio-qtgui.pc \ - gr-qtgui/apps/Makefile \ - gr-qtgui/examples/Makefile \ - gr-qtgui/grc/Makefile \ - gr-qtgui/include/Makefile \ - gr-qtgui/lib/Makefile \ - gr-qtgui/python/Makefile \ - gr-qtgui/python/run_tests \ - gr-qtgui/swig/Makefile \ - gr-qtgui/doc/Makefile \ - ]) - - GRC_BUILD_CONDITIONAL(gr-qtgui,[ - dnl run_tests is created from run_tests.in. Make it executable. - AC_CONFIG_COMMANDS([run_tests_qtgui], - [chmod +x gr-qtgui/python/run_tests]) - ]) -]) diff --git a/config/grc_gr_shd.m4 b/config/grc_gr_shd.m4 deleted file mode 100644 index d09505fbf..000000000 --- a/config/grc_gr_shd.m4 +++ /dev/null @@ -1,59 +0,0 @@ -dnl Copyright 2011 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_SHD],[ - GRC_ENABLE(gr-shd) - - dnl Dont do gr-shd if gnuradio-core skipped - GRC_CHECK_DEPENDENCY(gr-shd, gnuradio-core) - - if test $passed = yes; then - dnl Don't do gr-shd if the 'shd' package is not installed - PKG_CHECK_MODULES( - [SHD], [shd >= 3.1.0 shd < 3.2.0], [], - [passed=no; AC_MSG_RESULT([gr-shd requires libshd 3.1.x])] - ) - SHD_CPPFLAGS="${SHD_CPPFLAGS} -I\${abs_top_srcdir}/gr-shd/include" - AC_SUBST(SHD_CPPFLAGS) - AC_SUBST(SHD_LIBS) - - # Use this to tell the Makefile whether to define - # GR_HAVE_SHD for swig. - fi - - AM_CONDITIONAL([GR_DEFINE_HAVE_SHD],[test $passed = yes]) - - AC_CONFIG_FILES([ \ - gr-shd/gnuradio-shd.pc \ - gr-shd/Makefile \ - gr-shd/grc/Makefile \ - gr-shd/include/Makefile \ - gr-shd/lib/Makefile \ - gr-shd/swig/Makefile \ - gr-shd/swig/run_tests \ - gr-shd/swig/run_guile_tests \ - gr-shd/apps/Makefile \ - ]) - - GRC_BUILD_CONDITIONAL(gr-shd,[ - dnl run_tests is created from run_tests.in. Make it executable. - AC_CONFIG_COMMANDS([run_tests_shd], - [chmod +x gr-shd/swig/run_tests gr-shd/swig/run_guile_tests]) - ]) -]) diff --git a/config/grc_gr_trellis.m4 b/config/grc_gr_trellis.m4 deleted file mode 100644 index 57c75bf51..000000000 --- a/config/grc_gr_trellis.m4 +++ /dev/null @@ -1,47 +0,0 @@ -dnl Copyright 2001,2002,2003,2004,2005,2006,2008,2010 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_TRELLIS],[ - GRC_ENABLE(gr-trellis) - - dnl Don't do gr-trellis if gnuradio-core skipped - GRC_CHECK_DEPENDENCY(gr-trellis, gnuradio-core) - GRC_CHECK_DEPENDENCY(gr-trellis, gr-digital) - - AC_CONFIG_FILES([\ - gr-trellis/Makefile \ - gr-trellis/gnuradio-trellis.pc \ - gr-trellis/doc/Makefile \ - gr-trellis/grc/Makefile \ - gr-trellis/src/Makefile \ - gr-trellis/src/lib/Makefile \ - gr-trellis/src/lib/run_guile_tests \ - gr-trellis/src/python/Makefile \ - gr-trellis/src/python/run_tests \ - gr-trellis/src/examples/Makefile \ - gr-trellis/src/examples/fsm_files/Makefile - ]) - - GRC_BUILD_CONDITIONAL(gr-trellis,[ - dnl run_tests is created from run_tests.in. Make it executable. - AC_CONFIG_COMMANDS([run_tests_gr_trellis], - [chmod +x gr-trellis/src/python/run_tests; - chmod +x gr-trellis/src/lib/run_guile_tests]) - ]) -]) diff --git a/config/grc_gr_uhd.m4 b/config/grc_gr_uhd.m4 deleted file mode 100644 index 11956b91a..000000000 --- a/config/grc_gr_uhd.m4 +++ /dev/null @@ -1,63 +0,0 @@ -dnl Copyright 2010-2011 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_UHD],[ - GRC_ENABLE(gr-uhd) - - dnl Dont do gr-uhd if gnuradio-core skipped - GRC_CHECK_DEPENDENCY(gr-uhd, gnuradio-core) - - if test $passed = yes; then - dnl Don't do gr-uhd if the 'uhd' package is not installed - PKG_CHECK_MODULES( - [UHD], [uhd >= 3.0.0 uhd < 4.0.0], [], - [passed=no; AC_MSG_RESULT([gr-uhd requires libuhd 3.x.x])] - ) - UHD_CPPFLAGS="${UHD_CPPFLAGS} -I\${abs_top_srcdir}/gr-uhd/include" - AC_SUBST(UHD_CPPFLAGS) - AC_SUBST(UHD_LIBS) - - # Use this to tell the Makefile whether to define - # GR_HAVE_UHD for swig. - fi - - AM_CONDITIONAL([GR_DEFINE_HAVE_UHD],[test $passed = yes]) - - AC_CONFIG_FILES([ \ - gr-uhd/gnuradio-uhd.pc \ - gr-uhd/Makefile \ - gr-uhd/grc/Makefile \ - gr-uhd/include/Makefile \ - gr-uhd/lib/Makefile \ - gr-uhd/swig/Makefile \ - gr-uhd/swig/run_tests \ - gr-uhd/swig/run_guile_tests \ - gr-uhd/apps/Makefile \ - gr-uhd/apps/hf_explorer/Makefile \ - gr-uhd/apps/hf_radio/Makefile \ - gr-uhd/examples/Makefile \ - gr-uhd/doc/Makefile \ - ]) - - GRC_BUILD_CONDITIONAL(gr-uhd,[ - dnl run_tests is created from run_tests.in. Make it executable. - AC_CONFIG_COMMANDS([run_tests_uhd], - [chmod +x gr-uhd/swig/run_tests gr-uhd/swig/run_guile_tests]) - ]) -]) diff --git a/config/grc_gr_usrp.m4 b/config/grc_gr_usrp.m4 deleted file mode 100644 index c3d2667ca..000000000 --- a/config/grc_gr_usrp.m4 +++ /dev/null @@ -1,43 +0,0 @@ -dnl Copyright 2001,2002,2003,2004,2005,2006,2008,2011 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_USRP],[ - GRC_ENABLE(gr-usrp) - - dnl Don't do gr-usrp if usrp or gnuradio-core skipped - GRC_CHECK_DEPENDENCY(gr-usrp, usrp) - GRC_CHECK_DEPENDENCY(gr-usrp, gnuradio-core) - - AC_CONFIG_FILES([ \ - gr-usrp/Makefile \ - gr-usrp/grc/Makefile \ - gr-usrp/gnuradio-usrp.pc \ - gr-usrp/src/Makefile \ - gr-usrp/src/run_tests \ - gr-usrp/src/run_guile_tests \ - gr-usrp/apps/Makefile \ - ]) - - GRC_BUILD_CONDITIONAL(gr-usrp,[ - dnl run_tests is created from run_tests.in. Make it executable. - AC_CONFIG_COMMANDS([run_tests_usrp], - [chmod +x gr-usrp/src/run_tests - chmod +x gr-usrp/src/run_guile_tests]) - ]) -]) diff --git a/config/grc_gr_usrp2.m4 b/config/grc_gr_usrp2.m4 deleted file mode 100644 index 4ee29861b..000000000 --- a/config/grc_gr_usrp2.m4 +++ /dev/null @@ -1,42 +0,0 @@ -dnl Copyright 2008,2011 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_USRP2],[ - GRC_ENABLE(gr-usrp2) - - dnl Don't do gr-usrp if gnuradio-core or usrp2 skipped - GRC_CHECK_DEPENDENCY(gr-usrp2, usrp2) - GRC_CHECK_DEPENDENCY(gr-usrp2, gnuradio-core) - - AC_CONFIG_FILES([ \ - gr-usrp2/Makefile \ - gr-usrp2/apps/Makefile \ - gr-usrp2/grc/Makefile \ - gr-usrp2/gnuradio-usrp2.pc \ - gr-usrp2/src/Makefile \ - gr-usrp2/src/run_tests \ - gr-usrp2/src/run_guile_tests \ - ]) - - GRC_BUILD_CONDITIONAL(gr-usrp2,[ - dnl run_tests is created from run_tests.in. Make it executable. - AC_CONFIG_COMMANDS([run_tests_usrp2], - [chmod +x gr-usrp2/src/run_tests gr-usrp2/src/run_guile_tests]) - ]) -]) diff --git a/config/grc_gr_utils.m4 b/config/grc_gr_utils.m4 deleted file mode 100644 index cb71ad18b..000000000 --- a/config/grc_gr_utils.m4 +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2007,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. - -AC_DEFUN([GRC_GR_UTILS],[ - GRC_ENABLE(gr-utils) - - dnl Don't do gr-utils if gnuradio-core or gr-wxgui skipped - GRC_CHECK_DEPENDENCY(gr-utils, gnuradio-core) - GRC_CHECK_DEPENDENCY(gr-utils, gr-wxgui) - - AC_CONFIG_FILES([ \ - gr-utils/Makefile \ - gr-utils/src/Makefile \ - gr-utils/src/lib/Makefile \ - gr-utils/src/python/Makefile \ - ]) - - GRC_BUILD_CONDITIONAL(gr-utils) -]) diff --git a/config/grc_gr_video_sdl.m4 b/config/grc_gr_video_sdl.m4 deleted file mode 100644 index c890bc31c..000000000 --- a/config/grc_gr_video_sdl.m4 +++ /dev/null @@ -1,49 +0,0 @@ -dnl Copyright 2001,2002,2003,2004,2005,2006,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_VIDEO_SDL],[ - GRC_ENABLE([gr-video-sdl]) - - dnl Don't do gr-video-sdl if gnuradio-core skipped - GRC_CHECK_DEPENDENCY(gr-video-sdl, gnuradio-core) - - dnl If execution gets to here, $passed will be: - dnl with : if the --with code didn't error out - dnl yes : if the --enable code passed muster and all dependencies are met - dnl no : otherwise - if test $passed = yes; then - dnl Don't do gr-video-sdl if the SDL library is unavailable. - PKG_CHECK_MODULES(SDL, sdl >= 1.2.0, [], - [SDL_VERSION=1.2.0 - AM_PATH_SDL($SDL_VERSION, [], [ - passed=no;AC_MSG_RESULT([gr-video-sdl requires library sdl, not found or failed test.])])]) - fi - - AC_CONFIG_FILES([ \ - gr-video-sdl/Makefile \ - gr-video-sdl/gnuradio-video-sdl.pc \ - gr-video-sdl/src/Makefile \ - gr-video-sdl/src/run_tests \ - ]) - - GRC_BUILD_CONDITIONAL(gr-video-sdl,[ - dnl run_tests is created from run_tests.in. Make it executable. - AC_CONFIG_COMMANDS([run_tests_sdl], [chmod +x gr-video-sdl/src/run_tests]) - ]) -]) diff --git a/config/grc_gr_vocoder.m4 b/config/grc_gr_vocoder.m4 deleted file mode 100644 index df75656fe..000000000 --- a/config/grc_gr_vocoder.m4 +++ /dev/null @@ -1,49 +0,0 @@ -dnl Copyright 2011 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_VOCODER],[ - GRC_ENABLE(gr-vocoder) - - dnl Don't do gr-vocoder if gnuradio-core skipped - GRC_CHECK_DEPENDENCY(gr-fr-vocoder, gnuradio-core) - - AC_CONFIG_FILES([\ - gr-vocoder/Makefile \ - gr-vocoder/gnuradio-vocoder.pc \ - gr-vocoder/apps/Makefile \ - gr-vocoder/doc/Makefile \ - gr-vocoder/examples/Makefile \ - gr-vocoder/grc/Makefile \ - gr-vocoder/include/Makefile \ - gr-vocoder/lib/Makefile \ - gr-vocoder/lib/codec2/Makefile \ - gr-vocoder/lib/g7xx/Makefile \ - gr-vocoder/lib/gsm/Makefile \ - gr-vocoder/python/Makefile \ - gr-vocoder/python/run_tests \ - gr-vocoder/swig/Makefile \ - gr-vocoder/swig/run_guile_tests \ - ]) - - GRC_BUILD_CONDITIONAL(gr-vocoder,[ - dnl run_tests is created from run_tests.in. Make it executable. - AC_CONFIG_COMMANDS([run_tests_vocoder], [chmod +x gr-vocoder/python/run_tests]) - AC_CONFIG_COMMANDS([run_tests_vocoder_guile], [chmod +x gr-vocoder/swig/run_guile_tests]) - ]) -]) diff --git a/config/grc_gr_wxgui.m4 b/config/grc_gr_wxgui.m4 deleted file mode 100644 index 17925fcc5..000000000 --- a/config/grc_gr_wxgui.m4 +++ /dev/null @@ -1,46 +0,0 @@ -dnl Copyright 2001,2002,2003,2004,2005,2006,2008 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_WXGUI],[ - GRC_ENABLE(gr-wxgui) - GRC_WITH(gr-wxgui) - - dnl Don't do gr-wxgui if gnuradio-core skipped - GRC_CHECK_DEPENDENCY(gr-wxgui, gnuradio-core) - - dnl If execution gets to here, $passed will be: - dnl with : if the --with code didn't error out - dnl yes : if the --enable code passed muster and all dependencies are met - dnl no : otherwise - if test $passed = yes; then - PYTHON_CHECK_MODULE([wx],[Python wxWidgets wrappers >= 2.8],[],[passed=no],[wx.version().split()[[0]] >= "2.8"]) - PYTHON_CHECK_MODULE([numpy],[Numeric Python extensions],[],[passed=no]) - fi - - AC_CONFIG_FILES([ \ - gr-wxgui/Makefile \ - gr-wxgui/gr-wxgui.pc \ - gr-wxgui/grc/Makefile \ - gr-wxgui/src/Makefile \ - gr-wxgui/src/python/Makefile \ - gr-wxgui/src/python/plotter/Makefile \ - ]) - - GRC_BUILD_CONDITIONAL(gr-wxgui) -]) diff --git a/config/grc_grc.m4 b/config/grc_grc.m4 deleted file mode 100644 index 0474c4e89..000000000 --- a/config/grc_grc.m4 +++ /dev/null @@ -1,49 +0,0 @@ -dnl Copyright 2008, 2009, 2011 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_GRC],[ - GRC_ENABLE(grc) - - AC_CHECK_PROG(XDG_UTILS, xdg-mime, true, false) - AM_CONDITIONAL(XDG_UTILS, $XDG_UTILS) - - dnl ######################################## - dnl # test python modules and versions - dnl ######################################## - if test $passed = yes; then - PYTHON_CHECK_MODULE([sys],[Python >= 2.5],[],[passed=no],[sys.version.split()[[0]] >= "2.5"]) - PYTHON_CHECK_MODULE([Cheetah],[Python Cheetah templates >= 2.0.0],[],[passed=no],[Cheetah.Version >= "2.0.0"]) - PYTHON_CHECK_MODULE([lxml.etree],[Python lxml wrappers >= 1.3.6],[],[passed=no],[lxml.etree.LXML_VERSION >= (1, 3, 6, 0)]) - PYTHON_CHECK_MODULE([gtk],[Python gtk wrappers >= 2.10.0],[],[passed=no],[gtk.pygtk_version >= (2, 10, 0)]) - PYTHON_CHECK_MODULE([numpy],[NumPy],[],[passed=no],[True]) - fi - - AC_CONFIG_FILES([ \ - grc/Makefile \ - grc/base/Makefile \ - grc/blocks/Makefile \ - grc/freedesktop/Makefile \ - grc/grc_gnuradio/Makefile \ - grc/gui/Makefile \ - grc/python/Makefile \ - grc/scripts/Makefile \ - ]) - - GRC_BUILD_CONDITIONAL(grc) -]) diff --git a/config/grc_gruel.m4 b/config/grc_gruel.m4 deleted file mode 100644 index f1002b8c7..000000000 --- a/config/grc_gruel.m4 +++ /dev/null @@ -1,67 +0,0 @@ -dnl Copyright 2001,2002,2003,2004,2005,2006,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_GRUEL],[ - GRC_ENABLE(gruel) - GRC_WITH(gruel) - - dnl If execution gets to here, $passed will be: - dnl with : if the --with code didn't error out - dnl yes : if the --enable code passed muster and all dependencies are met - dnl no : otherwise - if test $passed != with; then - dnl how and where to find INCLUDES and LA and such - gruel_INCLUDES="\ --I\${abs_top_srcdir}/gruel/src/include \ --I\${abs_top_srcdir}/gruel/src/swig \ --I\${abs_top_builddir}/gruel/src/include" - gruel_LA="\${abs_top_builddir}/gruel/src/lib/libgruel.la" - gruel_LIBDIRPATH="\${abs_top_builddir}/gruel/src/lib:\${abs_top_builddir}/gruel/src/lib/.libs" - fi - - AC_CONFIG_FILES([\ - gruel/Makefile \ - gruel/gruel.pc \ - gruel/src/Makefile \ - gruel/src/include/Makefile \ - gruel/src/include/gruel/Makefile \ - gruel/src/include/gruel/inet.h \ - gruel/src/lib/Makefile \ - gruel/src/swig/Makefile \ - gruel/src/python/Makefile \ - gruel/src/python/run_tests \ - gruel/src/lib/pmt/Makefile \ - gruel/src/lib/msg/Makefile \ - gruel/src/scheme/Makefile \ - gruel/src/scheme/gnuradio/Makefile \ - ]) - - - dnl Allow creating autoconf independent header files for bytesex routines - AC_CHECK_HEADER(arpa/inet.h, [GR_HAVE_ARPA_INET=1],[GR_HAVE_ARPA_INET=0]) - AC_CHECK_HEADER(netinet/in.h, [GR_HAVE_NETINET_IN=1],[GR_HAVE_NETINET_IN=0]) - AC_CHECK_HEADER(byteswap.h, [GR_HAVE_BYTESWAP=1],[GR_HAVE_BYTESWAP=0]) - AC_SUBST(GR_HAVE_ARPA_INET) - AC_SUBST(GR_HAVE_NETINET_IN) - AC_SUBST(GR_HAVE_BYTESWAP) - - GRC_BUILD_CONDITIONAL(gruel,[ - AC_CONFIG_COMMANDS([run_tests_gruel],[chmod +x gruel/src/python/run_tests]) - ]) -]) diff --git a/config/grc_usrp.m4 b/config/grc_usrp.m4 deleted file mode 100644 index 999b9c5c3..000000000 --- a/config/grc_usrp.m4 +++ /dev/null @@ -1,90 +0,0 @@ -dnl Copyright 2001,2002,2003,2004,2005,2006,2007,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_USRP],[ - GRC_ENABLE(usrp) - - GRC_WITH(usrp) - - dnl Don't do usrp if gruel is skipped - GRC_CHECK_DEPENDENCY(usrp, gruel) - - dnl Make sure the fast usb technique is set, OS dependent. - dnl This is always performed, since it puts out CLI flags. - USRP_SET_FUSB_TECHNIQUE(${enable_usrp}) - - dnl If execution gets to here, $passed will be: - dnl with : if the --with code didn't error out - dnl yes : if the --enable code passed muster and all dependencies are met - dnl no : otherwise - if test $passed = yes; then - dnl gnulib. - dnl FIXME: this needs to fail gracefully and continue, not implemented yet - UTILS_FUNC_MKSTEMP - - dnl These checks don't fail - AC_C_BIGENDIAN - AC_CHECK_HEADERS([byteswap.h linux/compiler.h]) - AC_CHECK_FUNCS([getrusage sched_setscheduler pthread_setschedparam]) - AC_CHECK_FUNCS([sigaction snprintf]) - - dnl Make sure libusb version is installed; required for legacy USB - USRP_LIBUSB([$req_libusb1],[],[passed=no;AC_MSG_RESULT([Unable to find dependency libusb.])]) - - dnl Make sure SDCC >= 2.4.0 is available. - USRP_SDCC([2.4.0],[],[passed=no;AC_MSG_RESULT([Unable to find firmware compiler SDCC.])]) - fi - if test $passed != with; then - dnl how and where to find INCLUDES and LA - usrp_INCLUDES=" \ - -I\${abs_top_srcdir}/usrp/host/include \ - -I\${abs_top_builddir}/usrp/host/include \ - -I\${abs_top_srcdir}/usrp/firmware/include" - usrp_LA="\${abs_top_builddir}/usrp/host/lib/libusrp.la" - fi - - AC_CONFIG_FILES([ \ - usrp/Makefile \ - usrp/usrp.pc \ - usrp/usrp.iss \ - usrp/doc/Doxyfile \ - usrp/doc/Makefile \ - usrp/doc/other/Makefile \ - usrp/host/Makefile \ - usrp/host/include/Makefile \ - usrp/host/include/usrp/Makefile \ - usrp/host/misc/Makefile \ - usrp/host/lib/Makefile \ - usrp/host/lib/std_paths.h \ - usrp/host/swig/Makefile \ - usrp/host/apps/Makefile \ - usrp/firmware/Makefile \ - usrp/firmware/include/Makefile \ - usrp/firmware/lib/Makefile \ - usrp/firmware/src/Makefile \ - usrp/firmware/src/common/Makefile \ - usrp/firmware/src/usrp2/Makefile \ - usrp/fpga/Makefile \ - usrp/fpga/rbf/Makefile \ - usrp/fpga/rbf/rev2/Makefile \ - usrp/fpga/rbf/rev4/Makefile \ - ]) - - GRC_BUILD_CONDITIONAL(usrp) -]) diff --git a/config/grc_usrp2.m4 b/config/grc_usrp2.m4 deleted file mode 100644 index 701b100ad..000000000 --- a/config/grc_usrp2.m4 +++ /dev/null @@ -1,81 +0,0 @@ -dnl Copyright 2008,2010 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_USRP2],[ - GRC_ENABLE(usrp2) - - dnl firmware uses a subsidiary configure.ac - AC_CONFIG_SUBDIRS([usrp2/firmware]) - - dnl Don't do usrp if gruel is skipped - GRC_CHECK_DEPENDENCY(usrp2, gruel) - - dnl USRP2 host code only works on Linux at the moment - AC_MSG_CHECKING([whether host_os is linux*]) - case "$host_os" in - linux*) - AC_MSG_RESULT([yes]) - ;; - *) - AC_MSG_RESULT([no]) - AC_MSG_NOTICE([USRP2 currently requires Linux host OS, not found]) - passed="no" - ;; - esac - - dnl If execution gets to here, $passed will be: - dnl with : if the --with code didn't error out - dnl yes : if the --enable code passed muster and all dependencies are met - dnl no : otherwise - if test $passed = yes; then - dnl Needed for usrp2_socket_opener - AC_CHECK_HEADERS(arpa/inet.h byteswap.h linux/if_packet.h sys/socket.h sys/un.h) - AC_CHECK_MEMBERS([struct msghdr.msg_control, - struct msghdr.msg_accrights, - struct cmsgcred.cmcred_uid, - struct ucred.uid], - [],[], - [#define __USE_GNU 1 - #include <sys/types.h> - #include <sys/socket.h> - #include <sys/un.h>]) - fi - if test $passed != with; then - dnl how and where to find INCLUDES and LA - USRP2_INCLUDES="-I\${abs_top_srcdir}/usrp2/host/include \ - -I\${abs_top_srcdir}/usrp2/firmware/include" - USRP2_LA="\${abs_top_builddir}/usrp2/host/lib/libusrp2.la" - fi - - dnl Include the usrp2 INCLUDES and LA - AC_SUBST(USRP2_INCLUDES) - AC_SUBST(USRP2_LA) - - AC_CONFIG_FILES([ \ - usrp2/Makefile - usrp2/host/Makefile \ - usrp2/host/usrp2.pc \ - usrp2/host/include/Makefile - usrp2/host/include/usrp2/Makefile - usrp2/host/lib/Makefile - usrp2/host/apps/Makefile - ]) - - GRC_BUILD_CONDITIONAL(usrp2) -]) diff --git a/config/grc_volk.m4 b/config/grc_volk.m4 deleted file mode 100644 index cc6d75649..000000000 --- a/config/grc_volk.m4 +++ /dev/null @@ -1,42 +0,0 @@ -dnl Copyright 2010 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_VOLK],[ - GRC_ENABLE(volk) - GRC_WITH(volk) - - dnl If execution gets to here, test if $passed is: - dnl with : if the --with code didn't error out, use these values - dnl Test if $enable_volk is: - dnl yes : if the --enable code passed muster and all dependencies are met - dnl no : otherwise, then do not set variables - if test $passed != with && test x$enable_volk != xno; then - dnl how and where to find INCLUDES and LA - volk_INCLUDES="-I\${abs_top_srcdir}/volk/gen/include -I\${abs_top_srcdir}/volk/include" - volk_LA="\${abs_top_builddir}/volk/lib/libvolk.la" - fi - - dnl volk uses a subsidiary configure.ac - dnl only run if building Volk - if test $passed == yes && test x$enable_volk != xno; then - AC_CONFIG_SUBDIRS([volk]) - fi - - GRC_BUILD_CONDITIONAL(volk, []) -]) diff --git a/config/lf_cc.m4 b/config/lf_cc.m4 deleted file mode 100644 index b75e1a4c5..000000000 --- a/config/lf_cc.m4 +++ /dev/null @@ -1,41 +0,0 @@ -dnl Autoconf support for C++ -dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> -dnl -dnl This program 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 of the License, or -dnl (at your option) any later version. -dnl -dnl This program 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 this program; if not, write to the Free Software -dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA. -dnl -dnl As a special exception to the GNU General Public License, if you -dnl distribute this file as part of a program that contains a configuration -dnl script generated by Autoconf, you may include it under the same -dnl distribution terms that you use for the rest of that program. - -# ------------------------------------------------------------------------- -# Use this macro to configure your C compiler -# When called the macro does the following things: -# 1. It finds an appropriate C compiler. -# If you passed the flag --with-cc=foo then it uses that -# particular compiler -# 2. Check whether the compiler works. -# 3. Checks whether the compiler accepts the -g -# ------------------------------------------------------------------------- - -AC_DEFUN([LF_CONFIGURE_CC],[ - dnl Sing the song - AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([AC_PROG_CPP])dnl - AC_REQUIRE([AC_AIX])dnl - AC_REQUIRE([AC_ISC_POSIX])dnl - AC_REQUIRE([AC_HEADER_STDC])dnl -]) - diff --git a/config/lf_cxx.m4 b/config/lf_cxx.m4 deleted file mode 100644 index 7cce5f8a4..000000000 --- a/config/lf_cxx.m4 +++ /dev/null @@ -1,50 +0,0 @@ -dnl Autoconf support for C++ -dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> -dnl -dnl This program 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 of the License, or -dnl (at your option) any later version. -dnl -dnl This program 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 this program; if not, write to the Free Software -dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA. -dnl -dnl As a special exception to the GNU General Public License, if you -dnl distribute this file as part of a program that contains a configuration -dnl script generated by Autoconf, you may include it under the same -dnl distribution terms that you use for the rest of that program. - -# ----------------------------------------------------------------- -# This macro should be called to configure your C++ compiler. -# When called, the macro does the following things: -# 1. It finds an appropriate C++ compiler -# If you passed the flag --with-cxx=foo, then it uses that -# particular compiler -# 2. Checks whether the compiler accepts the -g -# ------------------------------------------------------------------ - -AC_DEFUN([LF_CONFIGURE_CXX],[ - AC_REQUIRE([AC_PROG_CXX])dnl - AC_REQUIRE([AC_PROG_CXXCPP])dnl - LF_CXX_PORTABILITY -]) - -# ----------------------------------------------------------------------- -# This macro tests the C++ compiler for various portability problem. -# ----------------------------------------------------------------------- - - -AC_DEFUN([LF_CXX_PORTABILITY],[ - - dnl - dnl Check for common C++ portability problems - dnl - -]) - diff --git a/config/lf_warnings.m4 b/config/lf_warnings.m4 deleted file mode 100644 index 508450fa9..000000000 --- a/config/lf_warnings.m4 +++ /dev/null @@ -1,121 +0,0 @@ -dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> -dnl Copyright (C) 2009 Free Software Foundation, Inc. -dnl -dnl This program 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 of the License, or -dnl (at your option) any later version. -dnl -dnl This program 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 this program; if not, write to the Free Software -dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA. -dnl -dnl As a special exception to the GNU General Public License, if you -dnl distribute this file as part of a program that contains a configuration -dnl script generated by Autoconf, you may include it under the same -dnl distribution terms that you use for the rest of that program. - -# -------------------------------------------------------------------------- -# Check whether the C++ compiler accepts a certain flag -# If it does it adds the flag to lf_CXXFLAGS -# If it does not then it returns an error to lf_ok -# Usage: -# LF_CHECK_CXX_FLAG(-flag1 -flag2 -flag3 ...) -# ------------------------------------------------------------------------- - -AC_DEFUN([LF_CHECK_CXX_FLAG],[ - echo 'void f(){}' > conftest.cc - for i in $1 - do - AC_MSG_CHECKING([whether $CXX accepts $i]) - if test -z "`${CXX} $i -c conftest.cc 2>&1`" - then - lf_CXXFLAGS="${lf_CXXFLAGS} $i" - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi - done - rm -f conftest.cc conftest.o - AC_SUBST(lf_CXXFLAGS) -]) - -# -------------------------------------------------------------------------- -# Check whether the C compiler accepts a certain flag -# If it does it adds the flag to lf_CFLAGS -# If it does not then it returns an error to lf_ok -# Usage: -# LF_CHECK_CC_FLAG(-flag1 -flag2 -flag3 ...) -# ------------------------------------------------------------------------- - -AC_DEFUN([LF_CHECK_CC_FLAG],[ - echo 'void f(){}' > conftest.c - for i in $1 - do - AC_MSG_CHECKING([whether $CC accepts $i]) - if test -z "`${CC} $i -c conftest.c 2>&1`" - then - lf_CFLAGS="${lf_CFLAGS} $i" - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi - done - rm -f conftest.c conftest.o - AC_SUBST(lf_CFLAGS) -]) - -# -------------------------------------------------------------------------- -# Check whether the Fortran compiler accepts a certain flag -# If it does it adds the flag to lf_FFLAGS -# If it does not then it returns an error to lf_ok -# Usage: -# LF_CHECK_F77_FLAG(-flag1 -flag2 -flag3 ...) -# ------------------------------------------------------------------------- - -AC_DEFUN([LF_CHECK_F77_FLAG],[ - cat << EOF > conftest.f -c....:++++++++++++++++++++++++ - PROGRAM MAIN - PRINT*,'Hello World!' - END -EOF - for i in $1 - do - AC_MSG_CHECKING([whether $F77 accepts $i]) - if test -z "`${F77} $i -c conftest.f 2>&1`" - then - lf_FFLAGS="${lf_FFLAGS} $i" - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi - done - rm -f conftest.f conftest.o - AC_SUBST(lf_FFLAGS) -]) - -# ---------------------------------------------------------------------- -# Enable compiler warnings. -# Call this command AFTER you have configured ALL your compilers. -# ---------------------------------------------------------------------- - -AC_DEFUN([LF_SET_WARNINGS],[ - dnl Warnings for the two main compilers - dnl add -Wextra when you're got time to fix a bunch of them ;-) - cc_warning_flags="-Wall -Werror-implicit-function-declaration -Wno-uninitialized" - cxx_warning_flags="-Wall -Woverloaded-virtual -Wno-uninitialized" - if test -n "${CC}" - then - LF_CHECK_CC_FLAG($cc_warning_flags) - fi - if test -n "${CXX}" - then - LF_CHECK_CXX_FLAG($cxx_warning_flags) - fi -]) diff --git a/config/lf_x11.m4 b/config/lf_x11.m4 deleted file mode 100644 index 460cd605f..000000000 --- a/config/lf_x11.m4 +++ /dev/null @@ -1,39 +0,0 @@ -dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> -dnl -dnl This program 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 of the License, or -dnl (at your option) any later version. -dnl -dnl This program 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 this program; if not, write to the Free Software -dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA. -dnl -dnl As a special exception to the GNU General Public License, if you -dnl distribute this file as part of a program that contains a configuration -dnl script generated by Autoconf, you may include it under the same -dnl distribution terms that you use for the rest of that program. - - -#----------------------------------------------------------------------- -# This macro searches for Xlib and when it finds it it adds the -# appropriate flags to CXXFLAGS and export the link sequence to -# the variable XLIB. -# In your configure.in file add: -# LF_PATH_XLIB -# In your Makefile.am add -# program_LDADD = .... $(XLIB) -#------------------------------------------------------------------------ - -AC_DEFUN([LF_PATH_XLIB],[ - AC_PATH_XTRA - CXXFLAGS="$CXXFLAGS $X_CFLAGS" - XLIB="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" - AC_SUBST(XLIB) -]) - diff --git a/config/macosx_audiounit.m4 b/config/macosx_audiounit.m4 deleted file mode 100644 index ee179d761..000000000 --- a/config/macosx_audiounit.m4 +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 2006 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, 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, Boston, MA -# 02110-1301, USA. - -AC_DEFUN([MACOSX_AUDIOUNIT], -[ - audiounitok=yes - case "$host_os" in - darwin*);; - *) - audiounitok=no - AC_MSG_RESULT([gr-audio-osx requires darwin or MacOS X.]) - esac - - AC_CHECK_HEADERS([AudioUnit/AudioUnit.h],[], - [audiounitok=no;AC_MSG_RESULT([gr-audio-osx requires AudioUnit/AudioUnit.h, which is available on MacOS X.])]) - - AC_CHECK_HEADERS([AudioToolbox/AudioToolbox.h],[], - [audiounitok=no;AC_MSG_RESULT([gr-audio-osx requires AudioToolbox/AudioToolbox.h, which is available on MacOS X.])]) - - if test $audiounitok = yes; then - ifelse([$1], , :, [$1]) - else - ifelse([$2], , :, [$2]) - fi -]) diff --git a/config/mkstemp.m4 b/config/mkstemp.m4 deleted file mode 100644 index 2d1fbee9b..000000000 --- a/config/mkstemp.m4 +++ /dev/null @@ -1,78 +0,0 @@ -#serial 4 - -# On some hosts (e.g., HP-UX 10.20, SunOS 4.1.4, Solaris 2.5.1), mkstemp has a -# silly limit that it can create no more than 26 files from a given template. -# Other systems lack mkstemp altogether. -# On OSF1/Tru64 V4.0F, the system-provided mkstemp function can create -# only 32 files per process. -# On systems like the above, arrange to use the replacement function. -AC_DEFUN([UTILS_FUNC_MKSTEMP], -[dnl - AC_REPLACE_FUNCS(mkstemp) - if test $ac_cv_func_mkstemp = no; then - utils_cv_func_mkstemp_limitations=yes - else - AC_CACHE_CHECK([for mkstemp limitations], - utils_cv_func_mkstemp_limitations, - [ - AC_TRY_RUN([ -# include <stdlib.h> - int main () - { - int i; - for (i = 0; i < 70; i++) - { - char template[] = "conftestXXXXXX"; - int fd = mkstemp (template); - if (fd == -1) - exit (1); - close (fd); - } - exit (0); - } - ], - utils_cv_func_mkstemp_limitations=no, - utils_cv_func_mkstemp_limitations=yes, - utils_cv_func_mkstemp_limitations=yes - ) - ] - ) - fi - - if test $utils_cv_func_mkstemp_limitations = yes; then - AC_LIBOBJ(mkstemp) - AC_LIBOBJ(tempname) - AC_DEFINE(mkstemp, rpl_mkstemp, - [Define to rpl_mkstemp if the replacement function should be used.]) - gl_PREREQ_MKSTEMP - jm_PREREQ_TEMPNAME - fi -]) - -# Prerequisites of lib/mkstemp.c. -AC_DEFUN([gl_PREREQ_MKSTEMP], -[ - AH_BOTTOM( - [ - #ifndef HAVE_MKSTEMP - #ifdef __cplusplus - extern "C" { - #endif - int rpl_mkstemp (char *templ); - #ifdef __cplusplus - } - #endif - #endif - ]) -]) - -# Prerequisites of lib/tempname.c. -AC_DEFUN([jm_PREREQ_TEMPNAME], -[ - AC_REQUIRE([AC_HEADER_STAT]) - AC_CHECK_HEADERS_ONCE(fcntl.h sys/time.h unistd.h) - AC_CHECK_HEADERS(stdint.h) - AC_CHECK_FUNCS(__secure_getenv gettimeofday lstat) - AC_CHECK_DECLS_ONCE(getenv) - # AC_REQUIRE([jm_AC_TYPE_UINTMAX_T]) -]) diff --git a/config/onceonly.m4 b/config/onceonly.m4 deleted file mode 100644 index f6fec37cb..000000000 --- a/config/onceonly.m4 +++ /dev/null @@ -1,63 +0,0 @@ -# onceonly.m4 serial 3 -dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. -dnl This file is free software, distributed under the terms of the GNU -dnl General Public License. As a special exception to the GNU General -dnl Public License, this file may be distributed as part of a program -dnl that contains a configuration script generated by Autoconf, under -dnl the same distribution terms as the rest of that program. - -dnl This file defines some "once only" variants of standard autoconf macros. -dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS -dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS -dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS -dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC -dnl The advantage is that the check for each of the headers/functions/decls -dnl will be put only once into the 'configure' file. It keeps the size of -dnl the 'configure' file down, and avoids redundant output when 'configure' -dnl is run. -dnl The drawback is that the checks cannot be conditionalized. If you write -dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi -dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to -dnl empty, and the check will be inserted before the body of the AC_DEFUNed -dnl function. - -dnl Autoconf version 2.57 or newer is recommended. -AC_PREREQ(2.54) - -# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of -# AC_CHECK_HEADERS(HEADER1 HEADER2 ...). -AC_DEFUN([AC_CHECK_HEADERS_ONCE], [ - : - AC_FOREACH([gl_HEADER_NAME], [$1], [ - AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(defn([gl_HEADER_NAME]), - [-./], [___])), [ - AC_CHECK_HEADERS(gl_HEADER_NAME) - ]) - AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME, - [-./], [___]))) - ]) -]) - -# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of -# AC_CHECK_FUNCS(FUNC1 FUNC2 ...). -AC_DEFUN([AC_CHECK_FUNCS_ONCE], [ - : - AC_FOREACH([gl_FUNC_NAME], [$1], [ - AC_DEFUN([gl_CHECK_FUNC_]defn([gl_FUNC_NAME]), [ - AC_CHECK_FUNCS(defn([gl_FUNC_NAME])) - ]) - AC_REQUIRE([gl_CHECK_FUNC_]defn([gl_FUNC_NAME])) - ]) -]) - -# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of -# AC_CHECK_DECLS(DECL1, DECL2, ...). -AC_DEFUN([AC_CHECK_DECLS_ONCE], [ - : - AC_FOREACH([gl_DECL_NAME], [$1], [ - AC_DEFUN([gl_CHECK_DECL_]defn([gl_DECL_NAME]), [ - AC_CHECK_DECLS(defn([gl_DECL_NAME])) - ]) - AC_REQUIRE([gl_CHECK_DECL_]defn([gl_DECL_NAME])) - ]) -]) diff --git a/config/pkg.m4 b/config/pkg.m4 deleted file mode 100644 index 2d4d96109..000000000 --- a/config/pkg.m4 +++ /dev/null @@ -1,201 +0,0 @@ -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# -# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. -# Copyright © 2008 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 2 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- -AC_DEFUN([PKG_PROG_PKG_CONFIG], -[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_default([$1], [0.18]) - AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi - -fi[]dnl -])# PKG_PROG_PKG_CONFIG - -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# -# Similar to PKG_CHECK_MODULES, make sure that the first instance of -# this or PKG_CHECK_MODULES is called, or make sure to call -# PKG_CHECK_EXISTS manually -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_EXISTS], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -if test -n "$PKG_CONFIG" && \ - AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_ifval([$2], [$2], [:]) -m4_ifvaln([$3], [else - $3])dnl -fi]) - - -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- -m4_define([_PKG_CONFIG], -[if test -n "$PKG_CONFIG"; then - if test -n "$$1"; then - pkg_cv_[]$1="$$1" - else - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - fi -else - pkg_failed=untried -fi[]dnl -])# _PKG_CONFIG - -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- -AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi[]dnl -])# _PKG_SHORT_ERRORS_SUPPORTED - - -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) -# -# E.g., -# PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) -# defines: -# -# GSTUFF_LIBS -# GSTUFF_CFLAGS -# GSTUFF_INCLUDEDIR -# GSTUFF_CPPFLAGS # the -I, -D and -U's out of CFLAGS -# -# see pkg-config man page also defines GSTUFF_PKG_ERRORS on error -# -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -# -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_MODULES],[ -AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl - -AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl -AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl -AC_ARG_VAR([$1][_INCLUDEDIR], [includedir for $1, overriding pkg-config])dnl - -pkg_failed=no -AC_MSG_CHECKING([for $1]) - -_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) - -if test x$cross_compiling = xyes -then - dnl _PKG_CONFIG([$1][_LIBS], [libs-only-l --static], [$2]) - _PKG_CONFIG([$1][_LIBS], [libs --static], [$2]) - dnl prune out any -L/lib or -L/usr/lib since they're pointing to the wrong filesystem root - _pkg_tmp= - for flag in [$]pkg_cv_[$1][_LIBS]; do - case $flag in - (-L/lib* | -L/usr/lib* ) ;; # ignore - (*) _pkg_tmp="$_pkg_tmp $flag" ;; - esac - done - pkg_cv_[$1][_LIBS]="$_pkg_tmp" -else - _PKG_CONFIG([$1][_LIBS], [libs --static], [$2]) -fi - -_PKG_CONFIG([$1][_INCLUDEDIR], [variable=includedir], [$2]) - - -m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS -and $1[]_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details.]) - -if test $pkg_failed = yes; then - _PKG_SHORT_ERRORS_SUPPORTED - if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` - else - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` - fi - # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - - ifelse([$4], , [AC_MSG_ERROR(dnl -[Package requirements ($2) were not met: - -$$1_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -_PKG_TEXT -])], - [AC_MSG_RESULT([no]) - $4]) -elif test $pkg_failed = untried; then - ifelse([$4], , [AC_MSG_FAILURE(dnl -[The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -_PKG_TEXT - -To get pkg-config, see <http://pkg-config.freedesktop.org/>.])], - [$4]) -else - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS - $1[]_INCLUDEDIR=$pkg_cv_[]$1[]_INCLUDEDIR - - $1[]_CPPFLAGS="" - for flag in $$1[]_CFLAGS; do - case $flag in - -I* | -D* | -U*) $1[]_CPPFLAGS="$$1[]_CPPFLAGS $flag" ;; - esac - done - pkg_cv_[]$1[]_CPPFLAGS=$$1[]_CPPFLAGS - AC_SUBST($1[]_CPPFLAGS) - - AC_MSG_RESULT([yes]) - ifelse([$3], , :, [$3]) -fi[]dnl -])# PKG_CHECK_MODULES diff --git a/config/sdl.m4 b/config/sdl.m4 deleted file mode 100644 index 20ad7df35..000000000 --- a/config/sdl.m4 +++ /dev/null @@ -1,176 +0,0 @@ -# Configure paths for SDL -# Sam Lantinga 9/21/99 -# stolen from Manish Singh -# stolen back from Frank Belew -# stolen from Manish Singh -# Shamelessly stolen from Owen Taylor - -dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS -dnl -AC_DEFUN([AM_PATH_SDL], -[dnl -dnl Get the cflags and libraries from the sdl-config script -dnl -AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], - sdl_prefix="$withval", sdl_prefix="") -AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)], - sdl_exec_prefix="$withval", sdl_exec_prefix="") -AC_ARG_ENABLE(sdltest, AC_HELP_STRING([--disable-sdltest], - [Do not try to compile and run a test SDL program]), - [], enable_sdltest=yes) - - if test x$sdl_exec_prefix != x ; then - sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix" - if test x${SDL_CONFIG+set} != xset ; then - SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config - fi - fi - if test x$sdl_prefix != x ; then - sdl_args="$sdl_args --prefix=$sdl_prefix" - if test x${SDL_CONFIG+set} != xset ; then - SDL_CONFIG=$sdl_prefix/bin/sdl-config - fi - fi - - AC_REQUIRE([AC_CANONICAL_TARGET]) - TMP_PATH="$prefix/bin:$prefix/usr/bin:$PATH" - AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$TMP_PATH]) - min_sdl_version=ifelse([$1], ,0.11.0,$1) - AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) - no_sdl="" - if test "$SDL_CONFIG" = "no" ; then - no_sdl=yes - else - SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags` - SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs` - - sdl_major_version=`$SDL_CONFIG $sdl_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_sdltest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $SDL_CFLAGS" - LIBS="$LIBS $SDL_LIBS" -dnl -dnl Now check if the installed SDL is sufficiently new. (Also sanity -dnl checks the results of sdl-config to some extent -dnl - rm -f conf.sdltest - AC_TRY_RUN([ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include "SDL.h" - -char* -my_strdup (char *str) -{ - char *new_str; - - if (str) - { - new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); - strcpy (new_str, str); - } - else - new_str = NULL; - - return new_str; -} - -int main (int argc, char *argv[]) -{ - int major, minor, micro; - char *tmp_version; - - /* This hangs on some systems (?) - system ("touch conf.sdltest"); - */ - { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = my_strdup("$min_sdl_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_sdl_version"); - exit(1); - } - - if (($sdl_major_version > major) || - (($sdl_major_version == major) && ($sdl_minor_version > minor)) || - (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); - printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); - printf("*** best to upgrade to the required version.\n"); - printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); - printf("*** to point to the correct copy of sdl-config, and remove the file\n"); - printf("*** config.cache before re-running configure\n"); - return 1; - } -} - -],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_sdl" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$SDL_CONFIG" = "no" ; then - echo "*** The sdl-config script installed by SDL could not be found" - echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the SDL_CONFIG environment variable to the" - echo "*** full path to sdl-config." - else - if test -f conf.sdltest ; then - : - else - echo "*** Could not run SDL test program, checking why..." - CFLAGS="$CFLAGS $SDL_CFLAGS" - LIBS="$LIBS $SDL_LIBS" - AC_TRY_LINK([ -#include <stdio.h> -#include "SDL.h" - -int main(int argc, char *argv[]) -{ return 0; } -#undef main -#define main K_and_R_C_main -], [ return 0; ], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding SDL or finding the wrong" - echo "*** version of SDL. If it is not finding SDL, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means SDL was incorrectly installed" - echo "*** or that you have moved SDL since it was installed. In the latter case, you" - echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - SDL_CFLAGS="" - SDL_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(SDL_CFLAGS) - AC_SUBST(SDL_LIBS) - rm -f conf.sdltest -]) diff --git a/config/usrp_fusb_tech.m4 b/config/usrp_fusb_tech.m4 deleted file mode 100644 index b99cf2432..000000000 --- a/config/usrp_fusb_tech.m4 +++ /dev/null @@ -1,87 +0,0 @@ -dnl -dnl Copyright 2003,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. -dnl - -# $1 is $enable_usrp: -# yes : do these tests -# no : do not do these tests -# "" : do these tests - -AC_DEFUN([USRP_SET_FUSB_TECHNIQUE],[ - req_libusb1=no - USE_LIBUSB1=0 - AC_ARG_WITH([fusb-tech], - AC_HELP_STRING([--with-fusb-tech=OS], - [Set fast USB technique (default=auto)]), - [cf_with_fusb_tech="$withval"], - [cf_with_fusb_tech="$host_os"]) - if test [x]$1 != xno; then - case "$cf_with_fusb_tech" in - libusb1*) - FUSB_TECH=libusb1 - req_libusb1=yes - USE_LIBUSB1=1 - ;; - linux*) - AC_CHECK_HEADER([linux/usbdevice_fs.h], - [x_have_usbdevice_fs_h=yes], - [x_have_usbdevice_fs_h=no]) - if test x${x_have_usbdevice_fs_h} = xyes; then - FUSB_TECH=linux - else - FUSB_TECH=generic - fi - ;; - darwin*) - FUSB_TECH=darwin - ;; - cygwin*|win*|mingw*) - FUSB_TECH=win32 - ;; - *bsd*) - AC_MSG_CHECKING([for RA/WB]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <dev/usb/usb.h>]], - [[struct usb_bulk_ra_wb_opt o; - ioctl(0, USB_SET_BULK_RA, &o);]])], - [FUSB_TECH=ra_wb], - [FUSB_TECH=generic]) - ;; - *) - FUSB_TECH=generic - ;; - esac - - AC_MSG_CHECKING([for fast usb technique to use]) - AC_MSG_RESULT($FUSB_TECH) - AC_SUBST(FUSB_TECH) - fi - - AM_CONDITIONAL(FUSB_TECH_darwin, test x$FUSB_TECH = xdarwin) - AM_CONDITIONAL(FUSB_TECH_win32, test x$FUSB_TECH = xwin32) - AM_CONDITIONAL(FUSB_TECH_generic, test x$FUSB_TECH = xgeneric) - AM_CONDITIONAL(FUSB_TECH_linux, test x$FUSB_TECH = xlinux) - AM_CONDITIONAL(FUSB_TECH_libusb1, test x$FUSB_TECH = xlibusb1) - AM_CONDITIONAL(FUSB_TECH_ra_wb, test x$FUSB_TECH = xra_wb) - - AC_SUBST(USE_LIBUSB1) - AC_CONFIG_FILES([\ - usrp/host/include/usrp/libusb_types.h \ - ]) -]) diff --git a/config/usrp_libusb.m4 b/config/usrp_libusb.m4 deleted file mode 100644 index cc3410f41..000000000 --- a/config/usrp_libusb.m4 +++ /dev/null @@ -1,273 +0,0 @@ -dnl Copyright 2003,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. - -# $1 is $req_libusb1: -# yes : check libusb-1.0 -# no : check libusb-0.12 -# "" : check libusb-0.12 - - -AC_DEFUN([USRP_LIBUSB], [ - dnl do not use LDFLAGS, except on Windows - saved_LDFLAGS=${LDFLAGS} - case "$host_os" in - cygwin* | mingw*) - ;; - *) - LDFLAGS= - ;; - esac - - dnl this variable is set in usrp/usrp.pc.in as a requirement - dnl for libusrp; it is OK to be empty. - LIBUSB_PKG_CONFIG_NAME= - - dnl for Windows (cygin, mingw), do not use PKGCONFIG since LIBUSB - dnl does not install a .pc file. For all other OSs, use - dnl PKGCONFIG to check for various package names first. - libusb_list='' - case "$host_os" in - cygwin* | mingw*) - libusb_list='libusb' - ;; - *) - dnl create the list of libusb PKGCONFIG modules to test - if test x$1 = xyes; then - dnl libusb-1.0 was requested; just test for it - libusb_list="libusb-1.0" - else - dnl test for legacy libusb only - libusb_list="libusb libusb-legacy" - fi - ;; - esac - - dnl loop over various possible 'libusb' names, and - dnl choose the first one that meets both the user's selection - dnl (via configure flags) as well as what is installed - for libusb_name in ${libusb_list}; do - dnl clear internal variables - libusbok=no - have_libusb1=no - usb_header='' - usb_lib_func='' - usb_lib_name='' - - case "$host_os" in - cygwin* | mingw*) - USB_INCLUDEDIR= - USB_INCLUDES= - USB_LIBS=-lusb - usb_header='usb.h' - usb_lib_func='usb_bulk_write' - libusbok=yes - ;; - *) - dnl start checks - AC_MSG_NOTICE([Checking for LIBUSB version '${libusb_name}']) - if test ${libusb_name} = "libusb-1.0"; then - dnl see if the pkgconfig module is available - PKG_CHECK_MODULES(USB, ${libusb_name}, [ - libusbok=yes - have_libusb1=yes - usb_header='libusb-1.0/libusb.h' - usb_lib_func='libusb_bulk_transfer' - ], [libusbok=no]) - else - dnl see if the pkgconfig module is available - PKG_CHECK_MODULES(USB, ${libusb_name}, [ - libusbok=yes - usb_header='usb.h' - usb_lib_func='usb_bulk_write' - ], [libusbok=no]) - fi - ;; - esac - if test $libusbok = yes; then - dnl PKGCONFIG found a version of LIBUSB, or the info was - dnl provided by the user, or the OS is Windows. - - dnl Check it to make sure it meets enough criteria: - dnl Verify that $usb_header is a valid header. If so, then - dnl verify that $usb_lib_func can be found in the library - dnl $usb_lib_name. if so, verify that the symbol 'usb_debug' is - dnl found in the library if not using Windows. - - dnl Check for the header. Similar to AC_CHECK_HEADERS, - dnl but doesn't append to known \#defines. - dnl If PKGCONFIG found variable USB_INCLUDEDIR, and it is - dnl not empty, use it for checking for $usb_header. - dnl Otherwise, maybe the user's shell environment is already - dnl configured to find this header. - AC_LANG_PUSH(C) - save_CPPFLAGS="$CPPFLAGS" - if test x$USB_INCLUDEDIR != x; then - USB_INCLUDES="-I$USB_INCLUDEDIR" - CPPFLAGS="$USB_INCLUDES" - fi - AC_MSG_CHECKING([$libusb_name for header $usb_header]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include "$usb_header" - ]], [])], - [libusbok=yes],[libusbok=no]) - AC_MSG_RESULT([$libusbok]) - CPPFLAGS="$save_CPPFLAGS" - AC_LANG_POP(C) - - if test $libusbok = yes; then - dnl found the header; now make sure the library is OK - dnl On Darwin, need to include the IOKit library. - - AC_LANG_PUSH(C) - save_LIBS="$LIBS" - case "$host_os" in - darwin*) - USB_LIBS="$USB_LIBS -lIOKit" - ;; - *) ;; - esac - LIBS="$USB_LIBS" - - dnl find the library link name - usb_lib_name=`echo $USB_LIBS | sed -e "s@.*-l\(usb[[^ ]]*\).*@\1@"` - - dnl Check for the function in the library. Similar to - dnl AC_CHECK_LIB, but doesn't append to known \#defines. - AC_MSG_CHECKING([$libusb_name for function $usb_lib_func in library $usb_lib_name]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ - #ifdef __cplusplus - extern "C" - #endif - char $usb_lib_func (); - ]], [[return $usb_lib_func ();]])], - [libusbok=yes],[libusbok=no]) - AC_MSG_RESULT([$libusbok]) - LIBS="$save_LIBS" - AC_LANG_POP(C) - - if test $libusbok = yes; then - if test ${libusb_name} != "libusb-1.0"; then - dnl PKGCONFIG found a legacy version of libusb; make sure the - dnl variable _usb_debug is available in the found library. - dnl Do not test on Windows, since that symbol is not defined. - case "$host_os" in - cygwin* | mingw*) - ;; - *) - AC_LANG_PUSH(C) - save_CPPFLAGS="$CPPFLAGS" - if test x$USB_INCLUDEDIR != x; then - CPPFLAGS="$USB_INCLUDES" - fi - save_LIBS="$LIBS" - LIBS="$USB_LIBS" - AC_MSG_CHECKING([$libusb_name for symbol usb_debug in library $usb_lib_name]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ - extern int usb_debug;]], - [[usb_debug = 0;]])], - [libusbok=yes],[libusbok=no]) - AC_MSG_RESULT([$libusbok]) - LIBS="$save_LIBS" - CPPFLAGS="$save_CPPFLAGS" - AC_LANG_POP(C) - ;; - esac - fi - fi - fi - fi - dnl if everything checks out OK, finish up - if test $libusbok = yes; then - case "$host_os" in - cygwin* | mingw*) - ;; - *) - LIBUSB_PKG_CONFIG_NAME="${libusb_name}" - ;; - esac - break - else - dnl something wasn't found in this LIBUSB version. - dnl HACK: clear cache variables for header and library - unset USB_INCLUDEDIR - unset USB_INCLUDES - unset USB_LIBS - unset $as_ac_Header - unset $as_ac_Lib - fi - done - - if test $libusbok = yes; then - dnl final error checking, mostly to create #define's - AC_LANG_PUSH(C) - save_CPPFLAGS="$CPPFLAGS" - if test x$USB_INCLUDEDIR != x; then - CPPFLAGS="$USB_INCLUDES" - fi - dnl Check for the header. - AC_CHECK_HEADERS([$usb_header], [], [libusbok=no]) - CPPFLAGS="$save_CPPFLAGS" - AC_LANG_POP(C) - - if test $libusbok = no; then - AC_MSG_RESULT([USRP requires libusb header '$usb_header' which was not found or was not usable. See http://www.libusb.org]) - else - dnl check for the library (again) - AC_LANG_PUSH(C) - save_CPPFLAGS="$CPPFLAGS" - if test x$USB_INCLUDEDIR != x; then - CPPFLAGS="$USB_INCLUDES" - fi - save_LIBS="$LIBS" - LIBS="$USB_LIBS" - AC_CHECK_LIB([$usb_lib_name], [$usb_lib_func], [], [ - libusbok=no - AC_MSG_RESULT([USRP requires library '$usb_lib_name' with function '$usb_lib_func', which was either not found or was not usable. See http://www.libusb.org])]) -# case "$host_os" in -# cygwin* | mingw*) -# USB_LIBS="$LIBS" -# ;; -# *) ;; -# esac - LIBS="$save_LIBS" - CPPFLAGS="$save_CPPFLAGS" - AC_LANG_POP(C) - fi - fi - - if test $libusbok = yes; then - dnl success - AC_MSG_NOTICE([Using LIBUSB version '${libusb_name}']) - ifelse([$2], , :, [$2]) - else - dnl not found; clear substitution variables - LIBUSB_PKG_CONFIG_NAME= - USB_INCLUDES= - USB_LIBS= - ifelse([$3], , :, [$3]) - fi - - dnl create substitution variables - AC_SUBST(USB_INCLUDES) - AC_SUBST(USB_LIBS) - AC_SUBST(LIBUSB_PKG_CONFIG_NAME) - - dnl restore LDFLAGS - LDFLAGS=${saved_LDFLAGS} -]) diff --git a/config/usrp_sdcc.m4 b/config/usrp_sdcc.m4 deleted file mode 100644 index 3aae0bfa6..000000000 --- a/config/usrp_sdcc.m4 +++ /dev/null @@ -1,75 +0,0 @@ -# Check for sdcc support. -*- Autoconf -*- - -# Copyright 2004 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, 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, Boston, MA -# 02110-1301, USA. - -AC_DEFUN([USRP_SDCC], -[ - sdccok=yes - AC_CHECK_PROG(XCC, sdcc, sdcc -mmcs51 --no-xinit-opt,no) - AC_CHECK_PROG(XAS, asx8051, asx8051 -plosgff,no) - - if test "$XCC" = "no" -o "$XAS" = "no" ; then - AC_MSG_RESULT([USRP requires sdcc version 2. sdcc not found. See http://sdcc.sf.net]) - sdccok=no - else - sdcc_version_min=$1 - - sdcc_version=`sdcc --version 2>&1 | \ - sed 's/\(SDCC.* \)\([[0-9]]*\.[[0-9]]*\.[[0-9]]*\)\( .*$\)/\2/'` - - AC_MSG_CHECKING([sdcc_version "$sdcc_version"]) - - sdcc_major_version=`echo $sdcc_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - sdcc_minor_version=`echo $sdcc_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - sdcc_micro_version=`echo $sdcc_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - - sdcc_major_min=`echo $sdcc_version_min | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - sdcc_minor_min=`echo $sdcc_version_min | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - sdcc_micro_min=`echo $sdcc_version_min | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - - sdcc_version_proper=`expr \ - "$sdcc_major_version" \> "$sdcc_major_min" \| \ - "$sdcc_major_version" \= "$sdcc_major_min" \& \ - "$sdcc_minor_version" \> "$sdcc_minor_min" \| \ - "$sdcc_major_version" \= "$sdcc_major_min" \& \ - "$sdcc_minor_version" \= "$sdcc_minor_min" \& \ - "$sdcc_micro_version" \>= "$sdcc_micro_min" ` - - if test "$sdcc_version_proper" = "1" ; then - AC_MSG_RESULT([$sdcc_major_version.$sdcc_minor_version.$sdcc_micro_version]) - else - sdccok=no - AC_MSG_RESULT([USRP requires sdcc >= $sdcc_version_min. sdcc not found. See http://sdcc.sf.net]) - fi - - AC_SUBST(XCC) - AC_SUBST(XAS) - fi - - if test $sdccok = yes; then - ifelse([$2], , :, [$2]) - else - ifelse([$3], , :, [$3]) - fi -]) diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 758a3adb3..000000000 --- a/configure.ac +++ /dev/null @@ -1,446 +0,0 @@ -dnl Copyright 2001-2011 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_INIT -AC_PREREQ(2.57) - -dnl Set the prefix to the default when --prefix is not specified. -dnl This is critical for variable substitutions in the configure. -if test "${prefix}" = "NONE"; then - prefix=${ac_default_prefix} -fi - -AM_CONFIG_HEADER(config.h) -AC_CONFIG_SRCDIR([gnuradio-core/src/lib/runtime/gr_vmcircbuf.cc]) - -AC_CANONICAL_BUILD -AC_CANONICAL_HOST -AC_CANONICAL_TARGET - -GR_VERSION -dnl ustar required to have pathnames > 99 chars -_AM_SET_OPTION([tar-ustar]) -AM_INIT_AUTOMAKE(gnuradio,$RELEASE) - -DEFINES="" -AC_SUBST(DEFINES) - -dnl Remember if the user explicity set CFLAGS -if test -n "${CFLAGS}"; then - user_set_cflags=yes -fi -dnl Remember if the user explicity set CXXFLAGS -if test -n "${CXXFLAGS}"; then - user_set_cxxflags=yes -fi - - -LF_CONFIGURE_CC -LF_CONFIGURE_CXX -GR_LIB64 dnl check for lib64 suffix after choosing compilers - -dnl The three macros above are known to override CFLAGS if the user -dnl didn't specify them. Though I'm sure somebody thought this was -dnl a good idea, it makes it hard to use other than -g -O2 when compiling -dnl selected files. Thus we "undo" the damage here... -dnl -dnl If the user specified CFLAGS, we use them. -dnl See Makefile.common for the rest of the magic. -if test "$user_set_cflags" != yes; then - autoconf_default_CFLAGS="$CFLAGS" - CFLAGS="" -fi -AC_SUBST([autoconf_default_CFLAGS]) - - -dnl The three macros above are known to override CXXFLAGS if the user -dnl didn't specify them. Though I'm sure somebody thought this was -dnl a good idea, it makes it hard to use other than -g -O2 when compiling -dnl selected files. Thus we "undo" the damage here... -dnl -dnl If the user specified CXXFLAGS, we use them. Otherwise when compiling -dnl the output of swig use use -O1 if we're using g++. -dnl See Makefile.common for the rest of the magic. -if test "$user_set_cxxflags" != yes; then - autoconf_default_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="" - if test "$GXX" = yes; then - case "$host_cpu" in - powerpc*) - dnl "-O1" is broken on the PPC for some reason - dnl (at least as of g++ 4.1.1) - swig_CXXFLAGS="-g1 -O2 -Wno-strict-aliasing -Wno-parentheses" - ;; - *) - swig_CXXFLAGS="-g -O1 -Wno-strict-aliasing -Wno-parentheses" - ;; - esac - fi -fi -AC_SUBST(autoconf_default_CXXFLAGS) -AC_SUBST(swig_CXXFLAGS) - -dnl add ${prefix}/lib${gr_libdir_suffix}/pkgconfig to the head of the PKG_CONFIG_PATH -if test x${PKG_CONFIG_PATH} = x; then - PKG_CONFIG_PATH=${prefix}/lib${gr_libdir_suffix}/pkgconfig -else - PKG_CONFIG_PATH=${prefix}/lib${gr_libdir_suffix}/pkgconfig:${PKG_CONFIG_PATH} -fi -export PKG_CONFIG_PATH - -LF_SET_WARNINGS -GR_SET_GPROF -GR_SET_PROF -AM_PROG_AS -AC_PROG_LN_S -AC_PROG_MAKE_SET -AC_PROG_INSTALL - -# AC_PROG_MKDIR_P -# is a backport of autoconf-2.60's AC_PROG_MKDIR_P. -# Remove this macro when we can assume autoconf >= 2.60. -m4_ifdef([AC_PROG_MKDIR_P], [], [ - AC_DEFUN([AC_PROG_MKDIR_P], - [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake - MKDIR_P='$(mkdir_p)' - AC_SUBST([MKDIR_P])]) -]) -AC_PROG_MKDIR_P - -AC_PATH_PROG([RM_PROG], [rm]) - -AC_LIBTOOL_WIN32_DLL -dnl AC_DISABLE_SHARED dnl don't build shared libraries -AC_ENABLE_SHARED dnl do build shared libraries -AC_DISABLE_STATIC dnl don't build static libraries -m4_ifdef([LT_INIT],[LT_INIT],[AC_PROG_LIBTOOL]) -dnl GR_FORTRAN - -GR_NO_UNDEFINED dnl do we need the -no-undefined linker flag -GR_SCRIPTING - -# Allow user to choose whether to generate SWIG/Python -# Default is enabled -AC_ARG_ENABLE([python], - [AS_HELP_STRING([--enable-python], - [generate SWIG/Python components (default is yes)])], - [case "${enableval}" in - yes) enable_python=yes ;; - no) enable_python=no ;; - *) AC_MSG_ERROR([bad value ${enableval} for --enable-python]) ;; - esac], - [enable_python=yes] -) - -# Allow user to choose whether to generate SWIG/Guile -# Default is disabled -AC_ARG_ENABLE([guile], - [AS_HELP_STRING([--enable-guile], - [generate SWIG/Guile components (default is no)])], - [case "${enableval}" in - yes) enable_guile=yes ;; - no) enable_guile=no ;; - *) AC_MSG_ERROR([bad value ${enableval} for --enable-guile]) ;; - esac], - [enable_guile=no] -) - -AM_CONDITIONAL([PYTHON], [test x$enable_python = xyes]) -AM_CONDITIONAL([GUILE], [test x$enable_guile = xyes]) - -AC_CHECK_PROG([XMLTO],[xmlto],[yes],[]) -AM_CONDITIONAL([HAS_XMLTO], [test x$XMLTO = xyes]) - -dnl Checks for libraries. -AC_CHECK_LIB(socket,socket) - -dnl Set the c++ compiler that we use for the build system when cross compiling -if test x$CXX_FOR_BUILD = x -then - if test x$cross_compiling = xno; then - CXX_FOR_BUILD=${CXX} - else - CXX_FOR_BUILD=g++ - fi -fi -AC_SUBST(CXX_FOR_BUILD) - -dnl Check for SysV shm (mandatory) -dnl FIXME this is no longer mandatory. Check the macro. -GR_SYSV_SHM - -dnl Checks for header files. -AC_HEADER_STDC -AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(fcntl.h limits.h strings.h time.h sys/ioctl.h sys/time.h unistd.h) -AC_CHECK_HEADERS(linux/ppdev.h dev/ppbus/ppi.h sys/mman.h sys/select.h sys/types.h) -AC_CHECK_HEADERS(sys/resource.h stdint.h sched.h signal.h sys/syscall.h malloc.h) -AC_CHECK_HEADERS(windows.h) -AC_CHECK_HEADERS(vec_types.h) -AC_CHECK_HEADERS(netdb.h netinet/in.h arpa/inet.h sys/types.h sys/socket.h) - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_C_INLINE -AC_TYPE_SIZE_T -AC_HEADER_TIME -AC_C_BIGENDIAN([GR_ARCH_BIGENDIAN=1],[GR_ARCH_BIGENDIAN=0]) -AC_SUBST(GR_ARCH_BIGENDIAN) -AC_STRUCT_TM - -dnl Checks for library functions. -AC_FUNC_ALLOCA -GR_CHECK_MEMALIGN -AC_FUNC_SETVBUF_REVERSED -AC_FUNC_VPRINTF -AC_CHECK_FUNCS([mmap select socket strcspn strerror strspn getpagesize sysconf]) -AC_CHECK_FUNCS([snprintf gettimeofday nanosleep sched_setscheduler]) -AC_CHECK_FUNCS([modf sqrt sigaction sigprocmask pthread_sigmask]) -AC_CHECK_FUNCS([sched_setaffinity]) - -AC_CHECK_LIB(m, sincos, [AC_DEFINE([HAVE_SINCOS],[1],[Define to 1 if your system has `sincos'.])]) -AC_CHECK_LIB(m, sincosf,[AC_DEFINE([HAVE_SINCOSF],[1],[Define to 1 if your system has `sincosf'.])]) -AC_CHECK_LIB(m, sinf, [AC_DEFINE([HAVE_SINF],[1],[Define to 1 if your system has `sinf'.])]) -AC_CHECK_LIB(m, cosf, [AC_DEFINE([HAVE_COSF],[1],[Define to 1 if your system has `cosf'.])]) -AC_CHECK_LIB(m, exp10, [AC_DEFINE([HAVE_EXP10],[1],[Define to 1 if your system has 'exp10'.])]) -AC_CHECK_LIB(m, log2, [AC_DEFINE([HAVE_LOG2],[1],[Define to 1 if your system has 'log2'.])]) -#AC_FUNC_MKTIME - -AH_BOTTOM([ -#ifndef HAVE_EXP10 -#include <math.h> -inline static double exp10(double x) -{ - return pow(10.0, x); -} -#endif - -#ifdef HAVE_WINDOWS_H -#define NOMINMAX -#endif -]) - -GR_VMCIRCBUF -GR_CHECK_SHM_OPEN -GR_LIBGNURADIO_CORE_EXTRA_LDFLAGS -GR_CHECK_CREATEFILEMAPPING - -dnl Check for Mingw support -GR_PWIN32 - -dnl Do we have "dot", part of the graphviz package from AT&T? -dnl Doxgen will use it to draw pretty diagrams ;-) -AC_CHECK_PROG(HAVE_DOT, [dot],[YES],[NO]) - -PKG_CHECK_MODULES(FFTW3F, fftw3f >= 3.0) -AC_SUBST(FFTW3F_LIBS) - -dnl conditional build stuff -GR_CHECK_DOXYGEN -GR_SET_MD_CPU - -dnl Define where to look for cppunit includes and libs -dnl sets CPPUNIT_CFLAGS and CPPUNIT_LIBS -dnl Try using pkg-config first, then fall back to cppunit-config. -PKG_CHECK_EXISTS(cppunit, - [PKG_CHECK_MODULES(CPPUNIT, cppunit >= 1.9.14)], - [AM_PATH_CPPUNIT([1.9.14],[], - [AC_MSG_ERROR([GNU Radio requires cppunit. Stop])])]) - -CPPUNIT_INCLUDES=$CPPUNIT_CFLAGS -AC_SUBST(CPPUNIT_INCLUDES) - -dnl see if GUILE is installed -dnl AC_PATH_PROG(GUILE,guile) - -dnl -dnl We require the boost headers, thread lib and date_time lib. -dnl AX_BOOST_BASE finds the headers and the lib dir (-L<foo>) -dnl -dnl calls AC_SUBST(BOOST_CPPFLAGS), AC_SUBST(BOOST_LDFLAGS) and defines HAVE_BOOST -dnl -dnl Current Boost version requirement is >=1.35 for all platforms except Darwin, -dnl which requires >=1.37 for code in usrp host library. -case "$host_os" in - darwin*) - AX_BOOST_BASE([1.37]) - ;; - *) - AX_BOOST_BASE([1.35]) - ;; -esac - -dnl calls AC_SUBST(BOOST_THREAD_LIB), AC_SUBST(BOOST_CXXFLAGS) and defines HAVE_BOOST_THREAD -AX_BOOST_THREAD -CXXFLAGS="$CXXFLAGS $BOOST_CXXFLAGS" dnl often picks up a -pthread or something similar -CFLAGS="$CFLAGS $BOOST_CXXFLAGS" dnl often picks up a -pthread or something similar - -dnl -dnl all the rest of these call AC_SUBST(BOOST_<foo>_LIB) and define HAVE_BOOST_<foo> -dnl -AX_BOOST_DATE_TIME -AX_BOOST_FILESYSTEM -dnl AX_BOOST_IOSTREAMS -AX_BOOST_PROGRAM_OPTIONS -dnl AX_BOOST_REGEX -dnl AX_BOOST_SERIALIZATION -dnl AX_BOOST_SIGNALS -AX_BOOST_SYSTEM -dnl AX_BOOST_TEST_EXEC_MONITOR -dnl AX_BOOST_UNIT_TEST_FRAMEWORK -dnl AX_BOOST_WSERIALIZATION - -BUILD_DATE=`date -u +"%a, %d %b %Y %R:%S"` -AC_SUBST(BUILD_DATE) - -dnl SYSCONFDIR substitution -if test "${sysconfdir}" == "\${prefix}/etc" ; then - if test "${prefix}" == "NONE" ; then - SYSCONFDIR=["$ac_default_prefix/etc"] - else - SYSCONFDIR=["${prefix}/etc"] - fi -else - SYSCONFDIR=[${sysconfdir}] -fi -AC_SUBST(SYSCONFDIR) - -dnl System configuration files -GR_PREFSDIR=[$SYSCONFDIR/${PACKAGE}/conf.d] -AC_SUBST(GR_PREFSDIR) - -dnl Component specific configuration -dnl The order of the GR_ macros determines the order of compilation -dnl For -any- checks on $enable_all_components -dnl use the following guidelines: -dnl yes : --enable-all-components was specified, so error out if any -dnl components do not pass configuration checks. -dnl no : --disable-all-components was specified, so try to build the -dnl --enable'd components, and error out if any do not pass -dnl configuration checks. -dnl "" : this option was not specified on the command line; try to -dnl build all components that are not --with'd, but don't -dnl error out if any component does not pass configuration checks. -dnl -dnl For each --enable-foo component, if that flag is not specified on -dnl the command line, the related variable $enable_foo will be set to -dnl $enable_all_components . - -AC_ARG_ENABLE( - [all-components], - [ --enable-all-components Build all configurable components (default), or stop on failed dependencies] -) - -build_dirs="config" -GRC_GRUEL dnl must come first -GRC_VOLK -GRC_GNURADIO_CORE -GRC_GR_DIGITAL -GRC_GR_AUDIO -GRC_GR_VOCODER -GRC_GR_ATSC -GRC_GR_COMEDI -GRC_GR_NOAA -GRC_GR_PAGER -GRC_GR_TRELLIS -GRC_GR_VIDEO_SDL -GRC_GR_WXGUI -GRC_GR_QTGUI -GRC_GR_UTILS dnl this must come after GRC_GR_WXGUI -GRC_GNURADIO_EXAMPLES dnl must come after all GRC_GR_* -GRC_GRC -GRC_GR_UHD -GRC_GR_SHD -GRC_GR_FCD -GRC_DOCS dnl must be last - -# Each component is now either to be built, was skipped, will be -# included from pre-installed libraries and includes, or failed -# dependencies. -AC_SUBST([build_dirs], [$build_dirs]) -AC_SUBST([skipped_dirs], [$skipped_dirs]) -AC_SUBST([with_dirs], [$with_dirs]) - -# fix for older autotools that don't define these by default -AC_SUBST(abs_top_srcdir) -AC_SUBST(abs_top_builddir) -AC_SUBST(MKDIR_P) - -# 'with' variables - the pre-installed libraries, includes, and paths -# - must always come last in the lists, so they require special -# treatment. -AC_SUBST(with_INCLUDES) -AC_SUBST(with_SWIG_INCLUDES) -AC_SUBST(with_PYDIRPATH) -AC_SUBST(with_SWIGDIRPATH) -AC_SUBST(with_LIBDIRPATH) -AC_SUBST(with_GUILE_LOAD_PATH) - -# Local files tweaked by AC -AC_CONFIG_FILES([\ - Makefile \ - run_tests.sh \ - setup_guile_test_env \ - config/Makefile -]) - -dnl run_tests.sh is created from run_tests.sh.in . Make it executable. -AC_CONFIG_COMMANDS([run_tests_build], [chmod +x run_tests.sh]) - -AC_OUTPUT - -echo -echo "*********************************************************************" -echo The following GNU Radio components have been successfully configured: -echo -for dir in $build_dirs -do - echo $dir -done -echo -echo You my now run the 'make' command to build these components. -echo -if test "$skipped_dirs" != ""; then - echo "*********************************************************************" - echo The following components were skipped either because you asked not - echo to build them or they didn\'t pass configuration checks: - echo - for dir in $skipped_dirs - do - echo $dir - done - echo - echo These components will not be built. - echo -fi -if test "$with_dirs" != ""; then - echo "*********************************************************************" - echo The following components will be included from pre-installed - echo libraries and includes: - echo - for dir in $with_dirs - do - echo $dir - done - echo - echo These components will not be built. - echo -fi - -echo Configured GNU Radio release $RELEASE for build. diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index 9ee645401..000000000 --- a/docs/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile.in -/Makefile diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 45f9b0102..f67fdd7a8 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/docs/ChangeLog b/docs/ChangeLog index 6f024c4a3..9f0eb2118 100644 --- a/docs/ChangeLog +++ b/docs/ChangeLog @@ -4,21 +4,21 @@ # # Copyright 2004 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# diff --git a/docs/Makefile.am b/docs/Makefile.am deleted file mode 100644 index 31461cdc8..000000000 --- a/docs/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -# -# 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 $(top_srcdir)/Makefile.common - -SUBDIRS = doxygen diff --git a/docs/doxygen/.gitignore b/docs/doxygen/.gitignore deleted file mode 100644 index f44627c9d..000000000 --- a/docs/doxygen/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -/Makefile -/Makefile.in -/html -/latex -/xml -/man -/Doxyfile -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo diff --git a/docs/doxygen/CMakeLists.txt b/docs/doxygen/CMakeLists.txt index 532b09d7f..f328bd7a2 100644 --- a/docs/doxygen/CMakeLists.txt +++ b/docs/doxygen/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/docs/doxygen/Doxyfile.in b/docs/doxygen/Doxyfile.in index c8f1406a4..f3485316c 100644 --- a/docs/doxygen/Doxyfile.in +++ b/docs/doxygen/Doxyfile.in @@ -14,204 +14,204 @@ # Project related configuration options #--------------------------------------------------------------------------- -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See # http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = "GNU Radio @VERSION@ C++ API" -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = +PROJECT_NUMBER = -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = +OUTPUT_DIRECTORY = -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, -# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, -# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, +# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, +# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, # Spanish, Swedish, and Ukrainian. OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" -ABBREVIATE_BRIEF = +ABBREVIATE_BRIEF = -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = YES -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the # path to strip. -STRIP_FROM_PATH = +STRIP_FROM_PATH = -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. -STRIP_FROM_INC_PATH = +STRIP_FROM_INC_PATH = -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = NO -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = YES -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO -# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. -ALIASES = +ALIASES = -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for # Fortran. OPTIMIZE_FOR_FORTRAN = NO -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for # VHDL. OPTIMIZE_OUTPUT_VHDL = NO -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = YES @@ -221,58 +221,58 @@ BUILTIN_STL_SUPPORT = YES CPP_CLI_SUPPORT = NO -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen to replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the # methods anyway, you should set this option to NO. IDL_PROPERTY_SUPPORT = YES -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. TYPEDEF_HIDES_STRUCT = NO -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to # determine which symbols to keep in memory and which to flush to disk. # When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penality. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will rougly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols SYMBOL_CACHE_SIZE = 4 @@ -281,305 +281,305 @@ SYMBOL_CACHE_SIZE = 4 # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file +# If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default # anonymous namespace are hidden. EXTRACT_ANON_NSPACES = NO -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. SORT_GROUP_NAMES = NO -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the +# Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = NO -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = NO -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = NO -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= NO -# The ENABLED_SECTIONS tag can be used to enable conditional +# The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. -ENABLED_SECTIONS = +ENABLED_SECTIONS = -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO # Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the +# This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES. SHOW_FILES = YES -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the # Namespaces page. This will remove the Namespaces entry from the Quick Index # and from the Folder Tree View (if specified). The default is YES. SHOW_NAMESPACES = YES -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command <command> <input-file>, where <command> is the value of -# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file -# provided by doxygen. Whatever the program writes to standard output +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command <command> <input-file>, where <command> is the value of +# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file +# provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. -FILE_VERSION_FILTER = +FILE_VERSION_FILTER = -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by -# doxygen. The layout file controls the global structure of the generated output files -# in an output format independent way. The create the layout file that represents -# doxygen's defaults, run doxygen with the -l option. You can optionally specify a -# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name # of the layout file. -LAYOUT_FILE = +LAYOUT_FILE = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- -# The QUIET tag can be used to turn on/off the messages that are generated +# The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = YES -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text " -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written # to stderr. -WARN_LOGFILE = +WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = @top_srcdir@ @top_builddir@ -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 FILE_PATTERNS = *.h \ *.dox -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = @abs_top_builddir@/docs/doxygen/html \ @@ -642,16 +642,16 @@ EXCLUDE = @abs_top_builddir@/docs/doxygen/html \ @abs_top_srcdir@/gr-qtgui/lib \ @abs_top_srcdir@/gr-howto-write-a-block-cmake -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = */.deps/* \ @@ -665,10 +665,10 @@ EXCLUDE_PATTERNS = */.deps/* \ */qa_*.h \ */qa_*.py -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = ad9862 \ @@ -692,53 +692,53 @@ EXCLUDE_SYMBOLS = ad9862 \ *wxapt_rx_block* \ *example_signal* -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = @abs_top_srcdir@ -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left # blank all files are included. -EXAMPLE_PATTERNS = +EXAMPLE_PATTERNS = -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = @abs_top_srcdir@/docs/doxygen/images/ -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command <filter> <input-file>, where <filter> -# is the value of the INPUT_FILTER tag, and <input-file> is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command <filter> <input-file>, where <filter> +# is the value of the INPUT_FILTER tag, and <input-file> is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. -INPUT_FILTER = +INPUT_FILTER = -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. FILTER_PATTERNS = *.py=@top_srcdir@/gnuradio-core/doc/other/doxypy.py -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO @@ -747,32 +747,32 @@ FILTER_SOURCE_FILES = NO # configuration options related to source browsing #--------------------------------------------------------------------------- -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO -# Setting the INLINE_SOURCES tag to YES will include the body +# Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = NO -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES @@ -784,16 +784,16 @@ REFERENCES_RELATION = YES REFERENCES_LINK_SOURCE = YES -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES @@ -802,130 +802,130 @@ VERBATIM_HEADERS = YES # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = YES -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. -IGNORE_PREFIX = +IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = @enable_html_docs@ -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a # standard header. -HTML_HEADER = +HTML_HEADER = -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a # standard footer. -HTML_FOOTER = +HTML_FOOTER = -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! -HTML_STYLESHEET = +HTML_STYLESHEET = -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). HTML_DYNAMIC_SECTIONS = NO -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. GENERATE_DOCSET = NO -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) # can be grouped. DOCSET_FEEDNAME = "Doxygen generated docs" -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. DOCSET_BUNDLE_ID = org.doxygen.Project -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be # written to the html output directory. -CHM_FILE = +CHM_FILE = -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. -HHC_LOCATION = +HHC_LOCATION = -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO @@ -934,58 +934,58 @@ GENERATE_CHI = NO # is used to encode HtmlHelp index (hhk), content (hhc) and project file # content. -CHM_INDEX_ENCODING = +CHM_INDEX_ENCODING = -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO -# The TOC_EXPAND flag can be set to YES to add extra items for group members +# The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = YES -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER -# are set, an additional index file will be generated that can be used as input for -# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated # HTML documentation. GENERATE_QHP = NO -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. # The path specified is relative to the HTML output folder. -QCH_FILE = +QCH_FILE = -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see # <a href="http://doc.trolltech.com/qthelpproject.html#namespace">Qt Help Project / Namespace</a>. QHP_NAMESPACE = org.doxygen.Project -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see # <a href="http://doc.trolltech.com/qthelpproject.html#virtual-folders">Qt Help Project / Virtual Folders</a>. QHP_VIRTUAL_FOLDER = doc -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated # .qhp file . -QHG_LOCATION = +QHG_LOCATION = -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = YES -# This tag can be used to set the number of enum values (range [1..20]) +# This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 @@ -993,11 +993,11 @@ ENUM_VALUES_PER_LINE = 4 # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. # If the tag value is set to FRAME, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. Other possible values +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. Other possible values # for this tag are: HIERARCHIES, which will generate the Groups, Directories, # and Class Hierarchy pages using a tree view instead of an ordered list; # ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which @@ -1007,16 +1007,16 @@ ENUM_VALUES_PER_LINE = 4 GENERATE_TREEVIEW = YES -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 180 -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory # to force them to be regenerated. FORMULA_FONTSIZE = 10 @@ -1025,74 +1025,74 @@ FORMULA_FONTSIZE = 10 # configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = @enable_latex_docs@ -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = letter -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. -EXTRA_PACKAGES = +EXTRA_PACKAGES = -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! -LATEX_HEADER = +LATEX_HEADER = -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = YES -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO @@ -1101,68 +1101,68 @@ LATEX_HIDE_INDICES = NO # configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. -RTF_STYLESHEET_FILE = +RTF_STYLESHEET_FILE = -# Set optional variables used in the generation of an rtf document. +# Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. -RTF_EXTENSIONS_FILE = +RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man -# The MAN_EXTENSION tag determines the extension that is added to +# The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO @@ -1171,33 +1171,33 @@ MAN_LINKS = NO # configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = @enable_xml_docs@ -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_SCHEMA = +XML_SCHEMA = -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_DTD = +XML_DTD = -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = NO @@ -1206,10 +1206,10 @@ XML_PROGRAMLISTING = NO # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO @@ -1218,343 +1218,343 @@ GENERATE_AUTOGEN_DEF = NO # configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. -PERLMOD_MAKEVAR_PREFIX = +PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = @abs_top_builddir@/gruel/src/lib/pmt/ -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. -INCLUDE_FILE_PATTERNS = +INCLUDE_FILE_PATTERNS = -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator # instead of the = operator. -PREDEFINED = +PREDEFINED = -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- -# Configuration::additions related to external references +# Configuration::additions related to external references #--------------------------------------------------------------------------- -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen +# If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. -TAGFILES = +TAGFILES = -# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. -GENERATE_TAGFILE = +GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES -# The PERL_PATH should be the absolute path and name of the perl script +# The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- -# Configuration options related to the dot tool +# Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. -MSCGEN_PATH = +MSCGEN_PATH = -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = @HAVE_DOT@ -# By default doxygen will write a font called FreeSans.ttf to the output -# directory and reference it in all dot files that doxygen generates. This -# font does not include all possible unicode characters however, so when you need -# these (or just want a differently looking font) you can specify the font name -# using DOT_FONTNAME. You need need to make sure dot is able to find the font, -# which can be done by putting it in a standard location or by setting the -# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory # containing the font. DOT_FONTNAME = FreeSans -# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. # The default size is 10pt. DOT_FONTSIZE = 10 -# By default doxygen will tell dot to use the output directory to look for the -# FreeSans.ttf font (which doxygen will put there itself). If you specify a -# different font using DOT_FONTNAME you can set the path where dot +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot # can find it using this tag. -DOT_FONTPATH = +DOT_FONTPATH = -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = NO -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO -# If set to YES, the inheritance and collaboration graphs will show the +# If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES -# If the CALL_GRAPH and HAVE_DOT options are set to YES then -# doxygen will generate a call dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable call graphs +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = NO -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -# doxygen will generate a caller dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable caller +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png -# The tag DOT_PATH can be used to specify the path where the dot tool can be +# The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. -DOT_PATH = +DOT_PATH = -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the # \dotfile command). -DOTFILE_DIRS = +DOTFILE_DIRS = -# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the -# number of direct children of the root node in a graph is already larger than -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, because dot on Windows does not -# seem to support this out of the box. Warning: Depending on the platform used, -# enabling this option may lead to badly anti-aliased labels on the edges of +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of # a graph (i.e. they become hard to read). DOT_TRANSPARENT = NO -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = YES -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- -# Configuration::additions related to the search engine +# Configuration::additions related to the search engine #--------------------------------------------------------------------------- -# The SEARCHENGINE tag specifies whether or not a search engine should be +# The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO diff --git a/docs/doxygen/Makefile.am b/docs/doxygen/Makefile.am deleted file mode 100644 index 65fe864f2..000000000 --- a/docs/doxygen/Makefile.am +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright 2001,2005,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 = other - -dist_gr_doc_DATA = \ - $(top_srcdir)/README \ - $(top_srcdir)/README.hacking \ - README.doxyxml - -EXTRA_DIST = doxyxml swig_doc.py - -all-local: prep @generate_docs@ -doc: docs # alias - -docs: prep html/index.html -html/index.html: - @DOXYGEN@ - -EXTRA_DIST = images/gnuradio-logo.png - -prep: - $(MKDIR_P) html - $(MKDIR_P) xml - -install-data-local: - $(MKDIR_P) $(DESTDIR)$(gr_docdir) - cp -r html $(DESTDIR)$(gr_docdir) - cp -r xml $(DESTDIR)$(gr_docdir) - -uninstall-local: - $(RM) -fr $(DESTDIR)$(gr_docdir)/html - $(RM) -fr $(DESTDIR)$(gr_docdir)/xml - -clean-local: - $(RM) -fr latex html man xml diff --git a/docs/doxygen/doxyxml/.gitignore b/docs/doxygen/doxyxml/.gitignore deleted file mode 100644 index 0a864cc38..000000000 --- a/docs/doxygen/doxyxml/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in - diff --git a/docs/doxygen/doxyxml/Makefile.am b/docs/doxygen/doxyxml/Makefile.am deleted file mode 100644 index 141f46e5a..000000000 --- a/docs/doxygen/doxyxml/Makefile.am +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright 2007,2009,2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -EXTRA_DIST = \ - example/aadvark.cc \ - example/aadvark.h \ - example/Doxyfile \ - example/xml/aadvark_8cc.xml \ - example/xml/aadvark_8h.xml \ - example/xml/classAadvark.xml \ - example/xml/combine.xslt \ - example/xml/compound.xsd \ - example/xml/index.xml \ - example/xml/index.xsd - -if PYTHON -utilspythondir = $(grpythondir)/doxyxml - -TESTS = \ - run_tests - -nobase_utilspython_PYTHON = \ - __init__.py \ - base.py \ - doxyindex.py \ - text.py \ - generated/__init__.py \ - generated/index.py \ - generated/indexsuper.py \ - generated/compound.py \ - generated/compoundsuper.py -endif
\ No newline at end of file diff --git a/docs/doxygen/doxyxml/__init__.py b/docs/doxygen/doxyxml/__init__.py index c9786c3f8..5cd0b3c6c 100644 --- a/docs/doxygen/doxyxml/__init__.py +++ b/docs/doxygen/doxyxml/__init__.py @@ -1,23 +1,23 @@ # # Copyright 2010 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. -# +# """ Python interface to contents of doxygen xml documentation. @@ -27,7 +27,7 @@ doxygen-generated xml used in this example. >>> # Parse the doxygen docs. >>> import os ->>> this_dir = os.path.dirname(globals()['__file__']) +>>> this_dir = os.path.dirname(globals()['__file__']) >>> xml_path = this_dir + "/example/xml/" >>> di = DoxyIndex(xml_path) @@ -68,7 +68,7 @@ from doxyindex import DoxyIndex, DoxyFunction, DoxyParam, DoxyClass, DoxyFile, D def _test(): import os - this_dir = os.path.dirname(globals()['__file__']) + this_dir = os.path.dirname(globals()['__file__']) xml_path = this_dir + "/example/xml/" di = DoxyIndex(xml_path) # Get the Aadvark class diff --git a/docs/doxygen/doxyxml/base.py b/docs/doxygen/doxyxml/base.py index 097e3f15b..e8f026ab9 100644 --- a/docs/doxygen/doxyxml/base.py +++ b/docs/doxygen/doxyxml/base.py @@ -1,23 +1,23 @@ # # Copyright 2010 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. -# +# """ A base class is created. @@ -144,7 +144,7 @@ class Base(object): self._in_category[cat] = [mem for mem in self._members if cat.includes(mem)] return self._in_category[cat] - + def get_member(self, name, cat=None): self.confirm_no_error() # Check if it's in a namespace or class. @@ -173,7 +173,7 @@ class Base(object): def members(self): self.confirm_no_error() return self._members - + def process_memberdefs(self): mdtss = [] for sec in self._retrieved_data.compounddef.sectiondef: @@ -188,7 +188,7 @@ class Base(object): if pair not in uniques: uniques.add(pair) self._members.append(converted) - + def retrieve_data(self): filename = os.path.join(self._xml_path, self.refid + '.xml') try: @@ -197,7 +197,7 @@ class Base(object): print('Error in xml in file %s' % filename) self._error = True self._retrieved_data = None - + def check_parsed(self): if not self._parsed: self._parse() diff --git a/docs/doxygen/doxyxml/doxyindex.py b/docs/doxygen/doxyxml/doxyindex.py index 42aa4ca58..0132ab86f 100644 --- a/docs/doxygen/doxyxml/doxyindex.py +++ b/docs/doxygen/doxyxml/doxyindex.py @@ -1,23 +1,23 @@ # # Copyright 2010 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. -# +# """ Classes providing more user-friendly interfaces to the doxygen xml docs than the generated classes provide. @@ -40,7 +40,7 @@ class DoxyIndex(Base): if self._parsed: return super(DoxyIndex, self)._parse() - self._root = index.parse(os.path.join(self._xml_path, 'index.xml')) + self._root = index.parse(os.path.join(self._xml_path, 'index.xml')) for mem in self._root.compound: converted = self.convert_mem(mem) # For files we want the contents to be accessible directly @@ -78,14 +78,14 @@ class DoxyCompMem(Base): bd = description(getattr(parse_data, 'briefdescription', None)) dd = description(getattr(parse_data, 'detaileddescription', None)) self._data['brief_description'] = bd - self._data['detailed_description'] = dd + self._data['detailed_description'] = dd class DoxyCompound(DoxyCompMem): pass class DoxyMember(DoxyCompMem): pass - + class DoxyFunction(DoxyMember): @@ -111,7 +111,7 @@ Base.mem_classes.append(DoxyFunction) class DoxyParam(DoxyMember): - + __module__ = "gnuradio.utils.doxyxml" def _parse(self): @@ -126,11 +126,11 @@ class DoxyParam(DoxyMember): declname = property(lambda self: self.data()['declname']) class DoxyClass(DoxyCompound): - + __module__ = "gnuradio.utils.doxyxml" kind = 'class' - + def _parse(self): if self._parsed: return @@ -147,14 +147,14 @@ class DoxyClass(DoxyCompound): detailed_description = property(lambda self: self.data()['detailed_description']) Base.mem_classes.append(DoxyClass) - + class DoxyFile(DoxyCompound): - + __module__ = "gnuradio.utils.doxyxml" kind = 'file' - + def _parse(self): if self._parsed: return @@ -164,7 +164,7 @@ class DoxyFile(DoxyCompound): if self._error: return self.process_memberdefs() - + brief_description = property(lambda self: self.data()['brief_description']) detailed_description = property(lambda self: self.data()['detailed_description']) @@ -172,16 +172,16 @@ Base.mem_classes.append(DoxyFile) class DoxyNamespace(DoxyCompound): - + __module__ = "gnuradio.utils.doxyxml" kind = 'namespace' - + Base.mem_classes.append(DoxyNamespace) class DoxyGroup(DoxyCompound): - + __module__ = "gnuradio.utils.doxyxml" kind = 'group' @@ -209,7 +209,7 @@ class DoxyGroup(DoxyCompound): self.process_memberdefs() title = property(lambda self: self.data()['title']) - + Base.mem_classes.append(DoxyGroup) @@ -224,7 +224,7 @@ Base.mem_classes.append(DoxyFriend) class DoxyOther(Base): - + __module__ = "gnuradio.utils.doxyxml" kinds = set(['variable', 'struct', 'union', 'define', 'typedef', 'enum', 'dir', 'page']) @@ -232,6 +232,6 @@ class DoxyOther(Base): @classmethod def can_parse(cls, obj): return obj.kind in cls.kinds - + Base.mem_classes.append(DoxyOther) diff --git a/docs/doxygen/doxyxml/example/aadvark.cc b/docs/doxygen/doxyxml/example/aadvark.cc index 5744c428a..f91c1ba56 100644 --- a/docs/doxygen/doxyxml/example/aadvark.cc +++ b/docs/doxygen/doxyxml/example/aadvark.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, diff --git a/docs/doxygen/doxyxml/example/aadvark.h b/docs/doxygen/doxyxml/example/aadvark.h index 7b8f29c98..d3c17445e 100644 --- a/docs/doxygen/doxyxml/example/aadvark.h +++ b/docs/doxygen/doxyxml/example/aadvark.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, diff --git a/docs/doxygen/doxyxml/example/xml/combine.xslt b/docs/doxygen/doxyxml/example/xml/combine.xslt index abdd9ac75..6de203a2b 100644 --- a/docs/doxygen/doxyxml/example/xml/combine.xslt +++ b/docs/doxygen/doxyxml/example/xml/combine.xslt @@ -1,4 +1,4 @@ -<!-- XSLT script to combine the generated output into a single file. +<!-- XSLT script to combine the generated output into a single file. If you have xsltproc you could use: xsltproc combine.xslt index.xml >all.xml --> diff --git a/docs/doxygen/doxyxml/example/xml/compound.xsd b/docs/doxygen/doxyxml/example/xml/compound.xsd index 369e2300f..5bb567052 100644 --- a/docs/doxygen/doxyxml/example/xml/compound.xsd +++ b/docs/doxygen/doxyxml/example/xml/compound.xsd @@ -173,7 +173,7 @@ <xsd:complexType name="descriptionType" mixed="true"> <xsd:sequence> - <xsd:element name="title" type="xsd:string" minOccurs="0"/> + <xsd:element name="title" type="xsd:string" minOccurs="0"/> <xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="sect1" type="docSect1Type" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="internal" type="docInternalType" minOccurs="0" /> @@ -283,7 +283,7 @@ <xsd:complexType name="docSect1Type" mixed="true"> <xsd:sequence> - <xsd:element name="title" type="xsd:string" /> + <xsd:element name="title" type="xsd:string" /> <xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="sect2" type="docSect2Type" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="internal" type="docInternalS1Type" minOccurs="0" /> @@ -293,7 +293,7 @@ <xsd:complexType name="docSect2Type" mixed="true"> <xsd:sequence> - <xsd:element name="title" type="xsd:string" /> + <xsd:element name="title" type="xsd:string" /> <xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="sect3" type="docSect3Type" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="internal" type="docInternalS2Type" minOccurs="0" /> @@ -303,7 +303,7 @@ <xsd:complexType name="docSect3Type" mixed="true"> <xsd:sequence> - <xsd:element name="title" type="xsd:string" /> + <xsd:element name="title" type="xsd:string" /> <xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="sect4" type="docSect4Type" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="internal" type="docInternalS3Type" minOccurs="0" /> @@ -313,7 +313,7 @@ <xsd:complexType name="docSect4Type" mixed="true"> <xsd:sequence> - <xsd:element name="title" type="xsd:string" /> + <xsd:element name="title" type="xsd:string" /> <xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="internal" type="docInternalS4Type" minOccurs="0" /> </xsd:sequence> @@ -353,7 +353,7 @@ <xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> - + <xsd:group name="docTitleCmdGroup"> <xsd:choice> <xsd:element name="ulink" type="docURLLink" /> @@ -532,20 +532,20 @@ <xsd:complexType name="docImageType" mixed="true"> <xsd:group ref="docTitleCmdGroup" minOccurs="0" maxOccurs="unbounded" /> - <xsd:attribute name="type" type="DoxImageKind" /> - <xsd:attribute name="name" type="xsd:string" /> - <xsd:attribute name="width" type="xsd:string" /> - <xsd:attribute name="height" type="xsd:string" /> + <xsd:attribute name="type" type="DoxImageKind" /> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="width" type="xsd:string" /> + <xsd:attribute name="height" type="xsd:string" /> </xsd:complexType> <xsd:complexType name="docDotFileType" mixed="true"> <xsd:group ref="docTitleCmdGroup" minOccurs="0" maxOccurs="unbounded" /> - <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> </xsd:complexType> <xsd:complexType name="docTocItemType" mixed="true"> <xsd:group ref="docTitleCmdGroup" minOccurs="0" maxOccurs="unbounded" /> - <xsd:attribute name="id" type="xsd:string" /> + <xsd:attribute name="id" type="xsd:string" /> </xsd:complexType> <xsd:complexType name="docTocListType"> @@ -558,14 +558,14 @@ <xsd:sequence> <xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> - <xsd:attribute name="langid" type="xsd:string" /> + <xsd:attribute name="langid" type="xsd:string" /> </xsd:complexType> <xsd:complexType name="docParamListType"> <xsd:sequence> <xsd:element name="parameteritem" type="docParamListItem" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> - <xsd:attribute name="kind" type="DoxParamListKind" /> + <xsd:attribute name="kind" type="DoxParamListKind" /> </xsd:complexType> <xsd:complexType name="docParamListItem"> @@ -593,7 +593,7 @@ <xsd:element name="xreftitle" type="xsd:string" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="xrefdescription" type="descriptionType" /> </xsd:sequence> - <xsd:attribute name="id" type="xsd:string" /> + <xsd:attribute name="id" type="xsd:string" /> </xsd:complexType> <xsd:complexType name="docCopyType"> @@ -602,11 +602,11 @@ <xsd:element name="sect1" type="docSect1Type" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="internal" type="docInternalType" minOccurs="0" /> </xsd:sequence> - <xsd:attribute name="link" type="xsd:string" /> + <xsd:attribute name="link" type="xsd:string" /> </xsd:complexType> <xsd:complexType name="docCharType"> - <xsd:attribute name="char" type="DoxCharRange"/> + <xsd:attribute name="char" type="DoxCharRange"/> </xsd:complexType> <xsd:complexType name="docEmptyType"/> diff --git a/docs/doxygen/doxyxml/example/xml/index.xsd b/docs/doxygen/doxyxml/example/xml/index.xsd index d7ab2a906..bfe960c0f 100644 --- a/docs/doxygen/doxyxml/example/xml/index.xsd +++ b/docs/doxygen/doxyxml/example/xml/index.xsd @@ -25,7 +25,7 @@ <xsd:attribute name="refid" type="xsd:string" use="required"/> <xsd:attribute name="kind" type="MemberKind" use="required"/> </xsd:complexType> - + <xsd:simpleType name="CompoundKind"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="class"/> diff --git a/docs/doxygen/doxyxml/run_tests.in b/docs/doxygen/doxyxml/run_tests.in deleted file mode 100644 index db9cc62bc..000000000 --- a/docs/doxygen/doxyxml/run_tests.in +++ /dev/null @@ -1,16 +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 - -# Note: calling master run_tests.sh in gnuradio core is not strictly -# correct, as it will result in a partially bogus PYTHONPATH, but it -# does make the correct paths in the second half so all is well. - -@PYTHON@ @srcdir@/__init__.py - -# @top_builddir@/run_tests.sh \ -# @abs_top_srcdir@/gnuradio-core \ -# @abs_top_builddir@/gnuradio-core \ -# @srcdir@ diff --git a/docs/doxygen/doxyxml/text.py b/docs/doxygen/doxyxml/text.py index ddf2c36e2..629edd180 100644 --- a/docs/doxygen/doxyxml/text.py +++ b/docs/doxygen/doxyxml/text.py @@ -1,23 +1,23 @@ # # Copyright 2010 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. -# +# """ Utilities for extracting text from generated classes. """ diff --git a/docs/doxygen/other/.gitignore b/docs/doxygen/other/.gitignore deleted file mode 100644 index a02b6ff73..000000000 --- a/docs/doxygen/other/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo diff --git a/docs/doxygen/other/Makefile.am b/docs/doxygen/other/Makefile.am deleted file mode 100644 index 82ee0f945..000000000 --- a/docs/doxygen/other/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright 2001,2004,2010 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 - -EXTRA_DIST += \ - doxypy.py \ - group_defs.dox \ - shared_ptr_docstub.h \ - tv-channel-frequencies \ - vector_docstub.h diff --git a/docs/doxygen/other/build_guide.dox b/docs/doxygen/other/build_guide.dox index 207f553a1..780976d62 100644 --- a/docs/doxygen/other/build_guide.dox +++ b/docs/doxygen/other/build_guide.dox @@ -21,7 +21,7 @@ about building gr-comedi. \subsection dep_global Global Dependencies \li git http://code.google.com/p/msysgit -\li cmake http://www.cmake.org/cmake/resources/software.html +\li cmake (>= 2.6) http://www.cmake.org/cmake/resources/software.html \li boost (>= 1.35) http://www.boostpro.com/download \li cppunit (>= 1.9.14) http://gaiacrtn.free.fr/cppunit/index.html \li fftw3f (>= 3.0) http://www.fftw.org/install/windows.html @@ -61,7 +61,7 @@ about building gr-comedi. \li uhd (>= 3.0.0) http://code.ettus.com/redmine/ettus/projects/uhd/wiki \subsection dep_shd shd: The Symplex Hardware Driver Interface -\li shd (>= 3.0.0) +\li shd (>= 3.0.0) \subsection dep_gr_video_sdl gr-video-sdl: PAL and NTSC display \li SDL (>= 1.2.0) http://www.libsdl.org/download-1.2.php @@ -89,6 +89,8 @@ The \$(builddir) is the directory in which the code is built. This <b>cannot</b> be the same path as where the source code resides. Often, \$(builddir) is \$(srcdir)/build. +\subsection Cmake Options + Options can be used to specify where to find various library or include file dependencies that are not automatically being found (-DCMAKE_PREFIX_PATH) or set the prefix @@ -101,6 +103,37 @@ cmake is not case sensitive about these options. Similarly, "true", "on", or "yes" will turn this component on. All components are enabled by default. +An example is -DENABLE_PYTHON=False turns off building any Python or +Swigging components. The result will be the GNU Radio libraries and +C++ programs/applications/examples. No Python or GRC files will be +built or installed. + +The -DENABLE_DEFAULT=False can be used to disable all +components. Individual components can then be selectively turned back +on. For example, just buidling the Volk and Gruel libraries can be +done with this: + +\code +cmake -DENABLE_DEFAULT=Off -DENABLE_VOLK=True -DENABLE_GRUEL=True <srcdir> +\endcode + + +The build type allows you to specify the build as a debug or release +version. Each type sets different flags for different purposes. To set +the build type, use: + +\code +-DCMAKE_BUILD_TYPE="Release"|"Debug" +\endcode + +If not specified, the "Release" mode is the defaulted to. + +"Release" mode sets the '-O3' optimization flag. + +"Debug" mode sets '-g -O2' flags to export debug symbols and reduce +the optimization to make the libraries easier to debug and step +through. + \subsection build_gr_cmake_e100 Building for the E100 diff --git a/docs/doxygen/other/doxypy.py b/docs/doxygen/other/doxypy.py index 82fdb6bea..15d3e0824 100755 --- a/docs/doxygen/other/doxypy.py +++ b/docs/doxygen/other/doxypy.py @@ -21,7 +21,7 @@ __website__ = "http://code.foosel.org/doxypy" __author__ = ( "Philippe 'demod' Neumann (doxypy at demod dot org)", - "Gina 'foosel' Haeussge (gina at foosel dot net)" + "Gina 'foosel' Haeussge (gina at foosel dot net)" ) __licenseName__ = "GPL v2" @@ -46,32 +46,32 @@ from optparse import OptionParser, OptionGroup class FSM(object): """Implements a finite state machine. - + Transitions are given as 4-tuples, consisting of an origin state, a target state, a condition for the transition (given as a reference to a function which gets called with a given piece of input) and a pointer to a function - to be called upon the execution of the given transition. + to be called upon the execution of the given transition. """ - + """ @var transitions holds the transitions @var current_state holds the current state @var current_input holds the current input @var current_transition hold the currently active transition """ - + def __init__(self, start_state=None, transitions=[]): self.transitions = transitions self.current_state = start_state self.current_input = None self.current_transition = None - + def setStartState(self, state): self.current_state = state def addTransition(self, from_state, to_state, condition, callback): self.transitions.append([from_state, to_state, condition, callback]) - + def makeTransition(self, input): """ Makes a transition based on the given input. @@ -93,16 +93,16 @@ class FSM(object): class Doxypy(object): def __init__(self): string_prefixes = "[uU]?[rR]?" - + self.start_single_comment_re = re.compile("^\s*%s(''')" % string_prefixes) self.end_single_comment_re = re.compile("(''')\s*$") - + self.start_double_comment_re = re.compile("^\s*%s(\"\"\")" % string_prefixes) self.end_double_comment_re = re.compile("(\"\"\")\s*$") - + self.single_comment_re = re.compile("^\s*%s(''').*(''')\s*$" % string_prefixes) self.double_comment_re = re.compile("^\s*%s(\"\"\").*(\"\"\")\s*$" % string_prefixes) - + self.defclass_re = re.compile("^(\s*)(def .+:|class .+:)") self.empty_re = re.compile("^\s*$") self.hashline_re = re.compile("^\s*#.*$") @@ -110,16 +110,16 @@ class Doxypy(object): self.multiline_defclass_start_re = re.compile("^(\s*)(def|class)(\s.*)?$") self.multiline_defclass_end_re = re.compile(":\s*$") - + ## Transition list format # ["FROM", "TO", condition, action] transitions = [ ### FILEHEAD - + # single line comments ["FILEHEAD", "FILEHEAD", self.single_comment_re.search, self.appendCommentLine], ["FILEHEAD", "FILEHEAD", self.double_comment_re.search, self.appendCommentLine], - + # multiline comments ["FILEHEAD", "FILEHEAD_COMMENT_SINGLE", self.start_single_comment_re.search, self.appendCommentLine], ["FILEHEAD_COMMENT_SINGLE", "FILEHEAD", self.end_single_comment_re.search, self.appendCommentLine], @@ -127,21 +127,21 @@ class Doxypy(object): ["FILEHEAD", "FILEHEAD_COMMENT_DOUBLE", self.start_double_comment_re.search, self.appendCommentLine], ["FILEHEAD_COMMENT_DOUBLE", "FILEHEAD", self.end_double_comment_re.search, self.appendCommentLine], ["FILEHEAD_COMMENT_DOUBLE", "FILEHEAD_COMMENT_DOUBLE", self.catchall, self.appendCommentLine], - + # other lines ["FILEHEAD", "FILEHEAD", self.empty_re.search, self.appendFileheadLine], ["FILEHEAD", "FILEHEAD", self.hashline_re.search, self.appendFileheadLine], ["FILEHEAD", "FILEHEAD", self.importline_re.search, self.appendFileheadLine], ["FILEHEAD", "DEFCLASS", self.defclass_re.search, self.resetCommentSearch], - ["FILEHEAD", "DEFCLASS_MULTI", self.multiline_defclass_start_re.search, self.resetCommentSearch], + ["FILEHEAD", "DEFCLASS_MULTI", self.multiline_defclass_start_re.search, self.resetCommentSearch], ["FILEHEAD", "DEFCLASS_BODY", self.catchall, self.appendFileheadLine], ### DEFCLASS - + # single line comments ["DEFCLASS", "DEFCLASS_BODY", self.single_comment_re.search, self.appendCommentLine], ["DEFCLASS", "DEFCLASS_BODY", self.double_comment_re.search, self.appendCommentLine], - + # multiline comments ["DEFCLASS", "COMMENT_SINGLE", self.start_single_comment_re.search, self.appendCommentLine], ["COMMENT_SINGLE", "DEFCLASS_BODY", self.end_single_comment_re.search, self.appendCommentLine], @@ -155,9 +155,9 @@ class Doxypy(object): ["DEFCLASS", "DEFCLASS", self.defclass_re.search, self.resetCommentSearch], ["DEFCLASS", "DEFCLASS_MULTI", self.multiline_defclass_start_re.search, self.resetCommentSearch], ["DEFCLASS", "DEFCLASS_BODY", self.catchall, self.stopCommentSearch], - + ### DEFCLASS_BODY - + ["DEFCLASS_BODY", "DEFCLASS", self.defclass_re.search, self.startCommentSearch], ["DEFCLASS_BODY", "DEFCLASS_MULTI", self.multiline_defclass_start_re.search, self.startCommentSearch], ["DEFCLASS_BODY", "DEFCLASS_BODY", self.catchall, self.appendNormalLine], @@ -166,10 +166,10 @@ class Doxypy(object): ["DEFCLASS_MULTI", "DEFCLASS", self.multiline_defclass_end_re.search, self.appendDefclassLine], ["DEFCLASS_MULTI", "DEFCLASS_MULTI", self.catchall, self.appendDefclassLine], ] - + self.fsm = FSM("FILEHEAD", transitions) self.outstream = sys.stdout - + self.output = [] self.comment = [] self.filehead = [] @@ -178,22 +178,22 @@ class Doxypy(object): def __closeComment(self): """Appends any open comment block and triggering block to the output.""" - + if options.autobrief: if len(self.comment) == 1 \ or (len(self.comment) > 2 and self.comment[1].strip() == ''): self.comment[0] = self.__docstringSummaryToBrief(self.comment[0]) - + if self.comment: block = self.makeCommentBlock() self.output.extend(block) - + if self.defclass: self.output.extend(self.defclass) def __docstringSummaryToBrief(self, line): """Adds \\brief to the docstrings summary line. - + A \\brief is prepended, provided no other doxygen command is at the start of the line. """ @@ -202,7 +202,7 @@ class Doxypy(object): return "\\brief " + line else: return line - + def __flushBuffer(self): """Flushes the current outputbuffer to the outstream.""" if self.output: @@ -212,8 +212,8 @@ class Doxypy(object): print >>self.outstream, "\n".join(self.output) self.outstream.flush() except IOError: - # Fix for FS#33. Catches "broken pipe" when doxygen closes - # stdout prematurely upon usage of INPUT_FILTER, INLINE_SOURCES + # Fix for FS#33. Catches "broken pipe" when doxygen closes + # stdout prematurely upon usage of INPUT_FILTER, INLINE_SOURCES # and FILTER_SOURCE_FILES. pass self.output = [] @@ -221,20 +221,20 @@ class Doxypy(object): def catchall(self, input): """The catchall-condition, always returns true.""" return True - + def resetCommentSearch(self, match): """Restarts a new comment search for a different triggering line. - + Closes the current commentblock and starts a new comment search. """ if options.debug: - print >>sys.stderr, "# CALLBACK: resetCommentSearch" + print >>sys.stderr, "# CALLBACK: resetCommentSearch" self.__closeComment() self.startCommentSearch(match) - + def startCommentSearch(self, match): """Starts a new comment search. - + Saves the triggering line, resets the current comment and saves the current indentation. """ @@ -243,41 +243,41 @@ class Doxypy(object): self.defclass = [self.fsm.current_input] self.comment = [] self.indent = match.group(1) - + def stopCommentSearch(self, match): """Stops a comment search. - + Closes the current commentblock, resets the triggering line and appends the current line to the output. """ if options.debug: - print >>sys.stderr, "# CALLBACK: stopCommentSearch" + print >>sys.stderr, "# CALLBACK: stopCommentSearch" self.__closeComment() - + self.defclass = [] self.output.append(self.fsm.current_input) - + def appendFileheadLine(self, match): """Appends a line in the FILEHEAD state. - + Closes the open comment block, resets it and appends the current line. - """ + """ if options.debug: - print >>sys.stderr, "# CALLBACK: appendFileheadLine" + print >>sys.stderr, "# CALLBACK: appendFileheadLine" self.__closeComment() self.comment = [] self.output.append(self.fsm.current_input) def appendCommentLine(self, match): """Appends a comment line. - + The comment delimiter is removed from multiline start and ends as well as singleline comments. """ if options.debug: - print >>sys.stderr, "# CALLBACK: appendCommentLine" + print >>sys.stderr, "# CALLBACK: appendCommentLine" (from_state, to_state, condition, callback) = self.fsm.current_transition - + # single line comment if (from_state == "DEFCLASS" and to_state == "DEFCLASS_BODY") \ or (from_state == "FILEHEAD" and to_state == "FILEHEAD"): @@ -308,19 +308,19 @@ class Doxypy(object): else: # just append the comment line self.comment.append(self.fsm.current_input) - + def appendNormalLine(self, match): """Appends a line to the output.""" if options.debug: - print >>sys.stderr, "# CALLBACK: appendNormalLine" + print >>sys.stderr, "# CALLBACK: appendNormalLine" self.output.append(self.fsm.current_input) - + def appendDefclassLine(self, match): """Appends a line to the triggering block.""" if options.debug: - print >>sys.stderr, "# CALLBACK: appendDefclassLine" + print >>sys.stderr, "# CALLBACK: appendDefclassLine" self.defclass.append(self.fsm.current_input) - + def makeCommentBlock(self): """Indents the current comment block with respect to the current indentation level. @@ -329,59 +329,59 @@ class Doxypy(object): """ doxyStart = "##" commentLines = self.comment - + commentLines = map(lambda x: "%s# %s" % (self.indent, x), commentLines) l = [self.indent + doxyStart] l.extend(commentLines) - + return l - + def parse(self, input): """Parses a python file given as input string and returns the doxygen- compatible representation. - + @param input the python code to parse @returns the modified python code - """ + """ lines = input.split("\n") - + for line in lines: self.fsm.makeTransition(line) - + if self.fsm.current_state == "DEFCLASS": self.__closeComment() - + return "\n".join(self.output) - + def parseFile(self, filename): """Parses a python file given as input string and returns the doxygen- compatible representation. - + @param input the python code to parse @returns the modified python code - """ + """ f = open(filename, 'r') - + for line in f: self.parseLine(line.rstrip('\r\n')) if self.fsm.current_state == "DEFCLASS": self.__closeComment() self.__flushBuffer() f.close() - + def parseLine(self, line): - """Parse one line of python and flush the resulting output to the + """Parse one line of python and flush the resulting output to the outstream. - + @param line the python code line to parse """ self.fsm.makeTransition(line) self.__flushBuffer() - + def optParse(): """Parses commandline options.""" parser = OptionParser(prog=__applicationName__, version="%prog " + __version__) - + parser.set_usage("%prog [options] filename") parser.add_option("--autobrief", action="store_true", dest="autobrief", @@ -391,19 +391,19 @@ def optParse(): action="store_true", dest="debug", help="enable debug output on stderr" ) - + ## parse options global options (options, filename) = parser.parse_args() - + if not filename: print >>sys.stderr, "No filename given." sys.exit(-1) - + return filename[0] def main(): - """Starts the parser on the file given by the filename as the first + """Starts the parser on the file given by the filename as the first argument on the commandline. """ filename = optParse() diff --git a/docs/doxygen/other/group_defs.dox b/docs/doxygen/other/group_defs.dox index 285fbd1a5..213486b7a 100644 --- a/docs/doxygen/other/group_defs.dox +++ b/docs/doxygen/other/group_defs.dox @@ -1,7 +1,7 @@ /*! * \defgroup block GNU Radio C++ Signal Processing Blocks * \brief All C++ blocks that can be used in GR graphs are listed here or in - * the subcategories below. + * the subcategories below. * * Sorry, at this time the Python hierarchical blocks are not included * in this index. @@ -34,7 +34,7 @@ /*! \defgroup pfb_blk Polyphase Filterbank */ /*! \defgroup snr_blk SNR estimators */ -/*! +/*! * \defgroup base_blk Base classes for GR Blocks * \brief All C++ blocks are derived from these base classes */ @@ -58,7 +58,7 @@ */ /*! - * \defgroup pager Pager + * \defgroup pager Pager * Pager Applications */ diff --git a/docs/doxygen/other/pfb_intro.dox b/docs/doxygen/other/pfb_intro.dox index 4224aec35..01d08b0fa 100644 --- a/docs/doxygen/other/pfb_intro.dox +++ b/docs/doxygen/other/pfb_intro.dox @@ -91,6 +91,6 @@ channels. NOTE: you need the Scipy and Matplotlib Python modules installed to run this example. -\include gnuradio-examples/python/pfb/channelize.py +\include gnuradio-core/src/examples/pfb/channelize.py */ diff --git a/docs/doxygen/other/tv-channel-frequencies b/docs/doxygen/other/tv-channel-frequencies index e2780eca9..8613124f7 100644 --- a/docs/doxygen/other/tv-channel-frequencies +++ b/docs/doxygen/other/tv-channel-frequencies @@ -1,13 +1,13 @@ # These are the center frequencies in MHz for North American broadcast # TV channels. Each channel is 6 MHz wide, hence the bottom edge of the # channel is 3 MHz below the value in this table. -# +# # For NTSC (Analog) TV, the picture carrier is 1.25 MHz up from the # bottom edge. NTSC has the FM audio at bottom + 5.75 and the spike is easily # visible. -# +# # For ATSC, the pilot tone is 0.31 MHz up from the bottom. -# +# # 2 57.00 3 63.00 diff --git a/docs/doxygen/other/vector_docstub.h b/docs/doxygen/other/vector_docstub.h index 139ce651d..062e08d30 100644 --- a/docs/doxygen/other/vector_docstub.h +++ b/docs/doxygen/other/vector_docstub.h @@ -12,5 +12,5 @@ namespace std public: T *p; }; - + } // namespace std diff --git a/docs/doxygen/other/volk_guide.dox b/docs/doxygen/other/volk_guide.dox index d898f3864..24882ed1a 100644 --- a/docs/doxygen/other/volk_guide.dox +++ b/docs/doxygen/other/volk_guide.dox @@ -24,7 +24,7 @@ multiplication of a vector of floating point numbers (each item in the vector is multiplied by the same value). This kernel has the following proto-kernels that are defined for 'generic,' 'avx,' 'sse,' and 'orc.' -\code +\code void volk_32f_s32f_multiply_32f_a_generic void volk_32f_s32f_multiply_32f_a_sse void volk_32f_s32f_multiply_32f_a_avx diff --git a/docs/doxygen/swig_doc.py b/docs/doxygen/swig_doc.py index cac784cfe..bd35b8efd 100644 --- a/docs/doxygen/swig_doc.py +++ b/docs/doxygen/swig_doc.py @@ -1,23 +1,23 @@ # # Copyright 2010,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# """ Creates the swig_doc.i SWIG interface file. Execute using: python swig_doc.py xml_path outputfilename @@ -82,13 +82,13 @@ def combine_descriptions(obj): if dd: description.append(dd) return utoascii('\n\n'.join(description)).strip() - + entry_templ = '%feature("docstring") {name} "{docstring}"' def make_entry(obj, name=None, templ="{description}", description=None): """ Create a docstring entry for a swig interface file. - + obj - a doxyxml object from which documentation will be extracted. name - the name of the C object (defaults to obj.name()) templ - an optional template for the docstring containing only one @@ -182,11 +182,11 @@ def make_block_entry(di, block): def make_swig_interface_file(di, swigdocfilename, custom_output=None): - + output = [""" /* * This file was automatically generated using swig_doc.py. - * + * * Any changes to it will be lost next time it is regenerated. */ """] @@ -306,4 +306,4 @@ if __name__ == "__main__": raise else: break - + diff --git a/docs/exploring-gnuradio/.gitignore b/docs/exploring-gnuradio/.gitignore deleted file mode 100644 index b6e6030ca..000000000 --- a/docs/exploring-gnuradio/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/exploring-gnuradio.html diff --git a/docs/exploring-gnuradio/Makefile b/docs/exploring-gnuradio/Makefile index b36ce1f6d..cd5da8523 100644 --- a/docs/exploring-gnuradio/Makefile +++ b/docs/exploring-gnuradio/Makefile @@ -1,23 +1,23 @@ # # Copyright 2004 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# TARGETS = exploring-gnuradio.html diff --git a/docs/exploring-gnuradio/dial_tone.py b/docs/exploring-gnuradio/dial_tone.py index 9cc05baa3..cabfa0864 100755 --- a/docs/exploring-gnuradio/dial_tone.py +++ b/docs/exploring-gnuradio/dial_tone.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007 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 from gnuradio import audio diff --git a/docs/exploring-gnuradio/exploring-gnuradio.xml b/docs/exploring-gnuradio/exploring-gnuradio.xml index 9d471f663..286ca8609 100644 --- a/docs/exploring-gnuradio/exploring-gnuradio.xml +++ b/docs/exploring-gnuradio/exploring-gnuradio.xml @@ -148,7 +148,7 @@ end may be eliminated altogether. One GNU Radio experimenter has listened to AM and shortwave broadcasts by connecting a 100-foot piece of wire directly to his 20M sample/sec ADC.</para> -</sect1> +</sect1> <sect1 id="software"><title>On to the Software</title> @@ -186,7 +186,7 @@ floats. One sine wave is at 350 Hz, and the other is at <para>audio.sink is a sink that writes its input to the sound card. It takes one or more streams of floats in the range -1 to +1 as its -input. We connect the three blocks together using the +input. We connect the three blocks together using the <methodname>connect</methodname> method of the flow graph.</para> <para><methodname>connect</methodname> takes two parameters, the diff --git a/docs/exploring-gnuradio/fm_demod.py b/docs/exploring-gnuradio/fm_demod.py index e58407f73..0071fd751 100755 --- a/docs/exploring-gnuradio/fm_demod.py +++ b/docs/exploring-gnuradio/fm_demod.py @@ -21,10 +21,10 @@ def build_graph (freq1, freq2): audio_rate = quad_rate / audio_decimation fg = gr.flow_graph () - + # use high speed ADC as input source src = high_speed_adc (fg, input_rate) - + # compute FIR filter taps for channel selection channel_coeffs = \ gr.firdes.low_pass (1.0, # gain @@ -39,9 +39,9 @@ def build_graph (freq1, freq2): channel_coeffs, freq1, # 1st station freq input_rate) - + (head1, tail1) = build_pipeline (fg, quad_rate, audio_decimation) - + # sound card as final sink audio_sink = audio.sink (int (audio_rate)) @@ -67,7 +67,7 @@ def build_graph (freq1, freq2): fg.connect (src, chan_filter2) fg.connect (chan_filter2, head2) fg.connect (tail2, (audio_sink, 1)) - + return fg def build_pipeline (fg, quad_rate, audio_decimation): @@ -99,7 +99,7 @@ def build_pipeline (fg, quad_rate, audio_decimation): fg.connect (fm_demod, audio_filter) return ((fm_demod, 0), (audio_filter, 0)) - + def main (args): nargs = len (args) @@ -136,10 +136,10 @@ def main (args): target_freq = (freq1 + freq2) / 2 actual_freq = rf_front_end.set_RF_freq (target_freq) #actual_freq = target_freq - + fg = build_graph (IF_freq + freq1 - actual_freq, IF_freq + freq2 - actual_freq) - + fg.start () # fork thread(s) and return raw_input ('Press Enter to quit: ') fg.stop () diff --git a/docs/exploring-gnuradio/fm_demod_example.xml b/docs/exploring-gnuradio/fm_demod_example.xml index 3036f88ba..b417da0a8 100644 --- a/docs/exploring-gnuradio/fm_demod_example.xml +++ b/docs/exploring-gnuradio/fm_demod_example.xml @@ -24,10 +24,10 @@ def build_graph (freq1, freq2): audio_rate = quad_rate / audio_decimation fg = gr.flow_graph () - + # use high speed ADC as input source src = high_speed_adc (fg, input_rate) - + # compute FIR filter taps for channel selection channel_coeffs = \ gr.firdes.low_pass (1.0, # gain @@ -42,9 +42,9 @@ def build_graph (freq1, freq2): channel_coeffs, freq1, # 1st station freq input_rate) - + (head1, tail1) = build_pipeline (fg, quad_rate, audio_decimation) - + # sound card as final sink audio_sink = audio.sink (int (audio_rate)) @@ -84,7 +84,7 @@ def build_pipeline (fg, quad_rate, audio_decimation): fg.connect (fm_demod, audio_filter) return ((fm_demod, 0), (audio_filter, 0)) - + def main (args): nargs = len (args) @@ -106,13 +106,13 @@ def main (args): # determine the front end's "Intermediate Frequency" IF_freq = rf_front_end.get_output_freq () # 5.75e6 - # Tell the front end to tune to freq1. + # Tell the front end to tune to freq1. # I.e., freq1 is translated down to the IF frequency rf_front_end.set_RF_freq (freq1) # build the flow graph fg = build_graph (IF_freq, None) - + fg.start () # fork thread(s) and return raw_input ('Press Enter to quit: ') fg.stop () diff --git a/docs/howto-write-a-block/.gitignore b/docs/howto-write-a-block/.gitignore deleted file mode 100644 index f65ab6cf7..000000000 --- a/docs/howto-write-a-block/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -/Makefile -/Makefile.in -/.deps -/.libs -/*.la -/*.lo -/autom4te.cache -/*.cache -/howto-write-a-block.html -/gr_block.h.xml -/howto_1.i.xml -/howto_square_ff.cc.xml -/howto_square_ff.h.xml -/qa_howto_1.py.xml -/src_lib_Makefile_1.am.xml -/src_lib_Makefile_2.am.xml -/howto_square2_ff.cc.xml -/howto_square2_ff.h.xml diff --git a/docs/howto-write-a-block/Makefile.am b/docs/howto-write-a-block/Makefile.am deleted file mode 100644 index 5f58a21e9..000000000 --- a/docs/howto-write-a-block/Makefile.am +++ /dev/null @@ -1,81 +0,0 @@ -# -# Copyright 2004,2005,2007 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. -# - -TARGETS = howto-write-a-block.html - -# To avoid build problems for folks who don't have xmlto installed, we -# don't build the docs by default. - -# html: $(TARGETS) -all: $(TARGETS) - - -EXTRA_DIST = \ - README \ - howto-write-a-block.xml \ - howto_1.i \ - make_numbered_listing.py \ - qa_howto_1.py \ - src_lib_Makefile_1.am \ - src_lib_Makefile_2.am - - -BUILT_XML_FILES = \ - gr_block.h.xml \ - howto_1.i.xml \ - howto_square_ff.cc.xml \ - howto_square_ff.h.xml \ - howto_square2_ff.cc.xml \ - howto_square2_ff.h.xml \ - qa_howto_1.py.xml \ - src_lib_Makefile_1.am.xml \ - src_lib_Makefile_2.am.xml - - -howto-write-a-block.html : howto-write-a-block.xml $(BUILT_XML_FILES) - - -gr_block.h.xml: $(GNURADIO_CORE_INCLUDEDIR)/gr_block.h make_numbered_listing.py - $(PYTHON) ./make_numbered_listing.py $(GNURADIO_CORE_INCLUDEDIR)/gr_block.h - -howto_square_ff.cc.xml: $(top_srcdir)/src/lib/howto_square_ff.cc make_numbered_listing.py - $(PYTHON) ./make_numbered_listing.py $(top_srcdir)/src/lib/howto_square_ff.cc - -howto_square_ff.h.xml: $(top_srcdir)/src/lib/howto_square_ff.h make_numbered_listing.py - $(PYTHON) ./make_numbered_listing.py $(top_srcdir)/src/lib/howto_square_ff.h - -howto_square2_ff.cc.xml: $(top_srcdir)/src/lib/howto_square2_ff.cc make_numbered_listing.py - $(PYTHON) ./make_numbered_listing.py $(top_srcdir)/src/lib/howto_square2_ff.cc - -howto_square2_ff.h.xml: $(top_srcdir)/src/lib/howto_square2_ff.h make_numbered_listing.py - $(PYTHON) ./make_numbered_listing.py $(top_srcdir)/src/lib/howto_square2_ff.h - - -# ---------------------------------------------------------------- - -clean: - -${RM} -f $(TARGETS) $(BUILT_XML_FILES) - -%.html : %.xml - xmlto html-nochunks $< - -%.xml : % make_numbered_listing.py - $(PYTHON) ./make_numbered_listing.py $< diff --git a/docs/howto-write-a-block/README b/docs/howto-write-a-block/README deleted file mode 100644 index ff3b75e57..000000000 --- a/docs/howto-write-a-block/README +++ /dev/null @@ -1 +0,0 @@ -The contents of this directory are obsolete. diff --git a/docs/howto-write-a-block/howto-write-a-block.xml b/docs/howto-write-a-block/howto-write-a-block.xml deleted file mode 100644 index f8027b456..000000000 --- a/docs/howto-write-a-block/howto-write-a-block.xml +++ /dev/null @@ -1,959 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" - "docbookx.dtd" [ - <!ENTITY gnuradio "<application>GNU Radio</application>"> - <!ENTITY SWIG "<application>SWIG</application>"> - <!ENTITY gr_block "<classname>gr_block</classname>"> - <!ENTITY square "<classname>howto_square_ff</classname>"> - - <!ENTITY were "we're"> - <!ENTITY well "we'll"> - <!ENTITY thats "that's"> - <!ENTITY its "it's"> - <!ENTITY lets "let's"> - <!ENTITY youre "you're"> - - <!ENTITY gr_block_listing SYSTEM "gr_block.h.xml"> - <!ENTITY qa_howto_1_listing SYSTEM "qa_howto_1.py.xml"> - <!ENTITY howto_square_ff_h_listing SYSTEM "howto_square_ff.h.xml"> - <!ENTITY howto_square_ff_cc_listing SYSTEM "howto_square_ff.cc.xml"> - <!ENTITY howto_square2_ff_h_listing SYSTEM "howto_square2_ff.h.xml"> - <!ENTITY howto_square2_ff_cc_listing SYSTEM "howto_square2_ff.cc.xml"> - <!ENTITY howto_1_i_listing SYSTEM "howto_1.i.xml"> - <!ENTITY src_lib_Makefile_1_am_listing SYSTEM "src_lib_Makefile_1.am.xml"> - <!ENTITY src_lib_Makefile_2_am_listing SYSTEM "src_lib_Makefile_2.am.xml"> - -]> - -<article> - -<articleinfo> -<title>How to Write a Signal Processing Block</title> -<author> - <firstname>Eric</firstname> - <surname>Blossom</surname> - <affiliation> - <address> - <email>eb@comsec.com</email> - </address> - </affiliation> -</author> - -<revhistory> - <revision> - <revnumber>0.1</revnumber> - <date>2005-01-20</date> - </revision> - <revision> - <revnumber>0.2</revnumber> - <date>2005-02-02</date> - <revremark>Updated for SWIG 1.3.24</revremark> - </revision> - <revision> - <revnumber>0.3</revnumber> - <date>2006-07-21</date> - <revremark>Clarification of 1:1 fixed rate vs item size</revremark> - </revision> -</revhistory> - -<copyright> - <year>2004</year> - <year>2005</year> - <holder>Free Software Foundation, Inc.</holder> -</copyright> - -<abstract><para>This article explains how to write signal -processing blocks for <application>GNU Radio</application>. -</para></abstract> - -</articleinfo> - -<sect1 id="prereqs"><title>Prerequisites</title> -<para>This article assumes that the reader has basic familiarity with -GNU Radio and has read and understood -<ulink url="http://www.gnu.org/software/gnuradio/doc/exploring-gnuradio.html"> -<citetitle>Exploring GNU Radio</citetitle></ulink>. -</para> - -<para>There is a tarball of files that accompany this article. It -includes the examples, DocBook source for the article and all the -Makefiles etc it takes to make it work. Grab it at <ulink -url="ftp://ftp.gnu.org/gnu/gnuradio"> -ftp://ftp.gnu.org/gnu/gnuradio</ulink> or one of the mirrors. The -file you want is -<filename>gr-howto-write-a-block-X.Y.tar.gz</filename>. Pick the one -with the highest version number. -See <ulink url="http://comsec.com/wiki?CvsAccess"> -http://comsec.com/wiki?CvsAccess</ulink> for CVS Access. -</para> - - -</sect1> - -<sect1 id="intro"><title>Introduction</title> -<para>&gnuradio; provides a framework for building software radios. -Waveforms -- signal processing applications -- are built using a -combination of Python code for high level organization, policy, GUI and -other non performance-critical functions, while performance critical -signal processing blocks are written in C++.</para> - -<para>From the Python point of view, &gnuradio; provides a data flow -abstraction. The fundamental concepts are signal processing -blocks and the connections between them. This abstraction is -implemented by the Python <classname>gr.flow_graph</classname> class. -Each block has a set of input ports and output ports. Each port has -an associated data type. The most common port types are -<classname>float</classname> and <classname>gr_complex</classname> -(equivalent to std::complex<float>), though other types are used, -including those representing structures, arrays or other types of -packetized data.</para> - -<para>From the high level point-of-view, infinite streams of data flow -through the ports. At the C++ level, streams are dealt with in -convenient sized pieces, represented as contiguous arrays of the -underlying type.</para> - -</sect1> - -<sect1 id="overview"><title>The View from 30,000 Feet</title> - -<para>This article will walk through the construction of several -simple signal processing blocks, and explain the techniques and idioms -used. Later sections cover debugging signal processing blocks in the -mixed Python/C++ environment and performance measurement and -optimization.</para> - -<para>The example blocks will be built in the style of all &gnuradio; -extensions. That is, they are built outside of the gnuradio-core build -tree, and are constructed as shared libraries that may be dynamically -loaded into Python using the "import" mechanism. &SWIG;, the -Simplified Wrapper and Interface Generator, is used to generate the -glue that allows our code to be used from Python.</para> - -</sect1> - - -<sect1 id="gr_block"><title></title> - -<para>The C++ class &gr_block; is the base of all signal processing -blocks in &gnuradio;. Writing a new signal processing block involves -creating 3 files: The .h and .cc files that define the new class and -the .i file that tells &SWIG; how to generate the glue that binds the -class into Python. The new class must derive from &gr_block; or -one of it's subclasses.</para> - -<para>Our first examples will derive directly from &gr_block;. Later -we will look at some other subclasses that simplify the process for -common cases.</para> - -</sect1><!-- end gr_block sect1 --> - - - -<!-- ================================================================ --> - -<sect1 id="autotools"><title>Autotools, Makefiles, and Directory Layout</title> - -<para>Before we dive into the code, &lets; talk a bit about the -overall build environment and the directory structure that &well; -be using.</para> - -<para>To reduce the amount of Makefile hacking that we have to do, and -to facilitate portability across a variety of systems, we use the GNU -<application>autoconf</application>, -<application>automake</application>, and -<application>libtool</application> tools. These are collectively -referred to as the autotools, and once you get over the initial -shock, they will become your friends. (The good news is that we -provide boilerplate that can be used pretty much as-is.)</para> - -<variablelist> - -<varlistentry><term>automake</term> - -<listitem><para>automake and configure work together to generate GNU -compliant Makefiles from a much higher level description contained in -the corresponding Makefile.am file. <filename>Makefile.am</filename> -specifies the libraries and programs to build and the source files -that compose each. Automake reads <filename>Makefile.am</filename> -and produces <filename>Makefile.in</filename>. Configure reads -<filename>Makefile.in</filename> and produces -<filename>Makefile</filename>. The resulting Makefile contains a -zillion rules that do the right right thing to build, check and -install your code. It is not uncommon for the the resulting -<filename>Makefile</filename> to be 5 or 6 times larger than -<filename>Makefile.am</filename>.</para> - -</listitem> -</varlistentry> - -<varlistentry><term>autoconf</term> -<listitem><para>autoconf reads <filename>configure.ac</filename> -and produces the <filename>configure</filename> shell -script. <filename>configure</filename> automatically tests for -features of the underlying system and sets a bunch of variables and -defines that can be used in the Makefiles and your C++ code to -conditionalize the build. If features are required but not found, -configure will output an error message and stop.</para> -</listitem> -</varlistentry> - -<varlistentry><term>libtool</term> -<listitem><para>libtool works behind the scenes and provides the magic -to construct shared libraries on a wide variety of systems.</para> -</listitem> -</varlistentry> - -</variablelist> - -<para><xref linkend="dir-layout"/> shows the directory layout and -common files &well; be using. After renaming the -<replaceable>topdir</replaceable> directory, use it in your projects -too. We'll talk about particular files as they come up later.</para> - - -<table id="dir-layout"><title>Directory Layout</title> -<tgroup cols="2"> - -<thead><row> -<entry>File/Dir Name</entry> -<entry>Comment</entry> -</row> -</thead> - -<tbody> - -<row> -<entry><replaceable>topdir</replaceable>/Makefile.am</entry> -<entry>Top level Makefile.am</entry> -</row> -<row> -<entry><replaceable>topdir</replaceable>/Makefile.common</entry> -<entry>Common fragment included in sub-Makefiles</entry> -</row> -<row> -<entry><replaceable>topdir</replaceable>/bootstrap</entry> -<entry>Runs autoconf, automake, libtool first time through</entry> -</row> -<row> -<entry><replaceable>topdir</replaceable>/config</entry> -<entry>Directory of m4 macros used by configure.ac</entry> -</row> -<row> -<entry><replaceable>topdir</replaceable>/configure.ac</entry> -<entry>Input to autoconf</entry> -</row> -<row> -<entry><replaceable>topdir</replaceable>/src</entry> -</row> -<row> -<entry><replaceable>topdir</replaceable>/src/lib</entry> -<entry>C++ code goes here</entry> -</row> -<row> -<entry><replaceable>topdir</replaceable>/src/lib/Makefile.am</entry> -</row> -<row> -<entry><replaceable>topdir</replaceable>/src/python</entry> -<entry>Python code goes here</entry> -</row> -<row> -<entry><replaceable>topdir</replaceable>/src/python/Makefile.am</entry> -</row> -<row> -<entry><replaceable>topdir</replaceable>/src/python/run_tests</entry> -<entry>Script to run tests in the build tree</entry> -</row> - -</tbody> -</tgroup> -</table> - -</sect1> - -<!-- ================================================================ --> - -<sect1 id="naming"><title>Naming Conventions</title> - -<para>&gnuradio; uses a set of naming conventions to assist in -comprehending the code base and gluing C++ and Python together. -Please follow them.</para> - -<sect2 id="camel-case"><title><emphasis>Death to CamelCaseNames!</emphasis></title> - -<para>We've returned to a kinder, gentler era. We're now using the -"STL style" naming convention with a couple of modifications -since we're not using namespaces.</para> - -<para>With the exception of macros and other constant values, all -identifiers shall be lower case with <literal>words_separated_like_this</literal>.</para> - -<para>Macros and constant values (e.g., enumerated values, -<literal>static const int FOO = 23</literal>) shall be in <literal>UPPER_CASE</literal>.</para> - -</sect2> - -<sect2 id="global_names"><title>Global Names</title> - -<para>All globally visible names (types, functions, variables, consts, etc) -shall begin with a "package prefix", followed by an underscore. The bulk of -the code in GNU Radio belongs to the "gr" package, hence -names look like <literal>gr_open_file (...)</literal>.</para> - -<para>Large coherent bodies of code may use other package prefixes, but -let's try to keep them to a well thought out list. See the list -below.</para> - -</sect2> - -<sect2 id="package_prefixes"><title>Package Prefixes</title> - -<para>These are the current package prefixes: - -<variablelist> - -<varlistentry><term>gr_</term> -<listitem><para>Almost everything.</para></listitem> -</varlistentry> - -<varlistentry><term>gri_</term> -<listitem><para> -Implementation primitives. Sometimes we -have both a gr_<replaceable>foo</replaceable> and a gri_<replaceable>foo</replaceable>. In that case, -gr_<replaceable>foo</replaceable> would be derived from gr_block and gri_<replaceable>foo</replaceable> -would be the low level guts of the function.</para></listitem> -</varlistentry> - -<varlistentry><term>atsc_</term> -<listitem><para>Code related to the Advanced Television Standards Committee HDTV implementation -</para></listitem> -</varlistentry> - -<varlistentry><term>usrp_</term> -<listitem><para>Universal Software Radio Peripheral.</para></listitem> -</varlistentry> - -<varlistentry><term>qa_</term> -<listitem><para>Quality Assurance (Test code.)</para></listitem> -</varlistentry> - -</variablelist> - -</para> -</sect2> - -<sect2 id="class-data-members"><title>Class Data Members (instance variables)</title> - -<para>All class data members shall begin with d_<replaceable>foo</replaceable>.</para> - -<para>The big win is when you're staring at a block of code it's obvious -which of the things being assigned to persist outside of the block. -This also keeps you from having to be creative with parameter names -for methods and constructors. You just use the same name as the -instance variable, without the d_. </para> - -<literallayout> -class gr_wonderfulness { - std::string d_name; - double d_wonderfulness_factor; - -public: - gr_wonderfulness (std::string name, double wonderfulness_factor) - : d_name (name), d_wonderfulness_factor (wonderfulness_factor) - { - ... - } - ... -}; -</literallayout> - -</sect2> - -<sect2 id="static-data-members"><title>Class Static Data Members (class variables)</title> - -<para> -All class static data members shall begin with s_<replaceable>foo</replaceable>. -</para> - -</sect2> - -<sect2 id="file-names"><title>File Names</title> - -<para>Each significant class shall be contained in its own file. The -declaration of class <classname>gr_foo</classname> shall be in -<filename>gr_foo.h</filename> and the definition in -<filename>gr_foo.cc</filename>.</para> -</sect2> - - -<sect2><title>Suffixes</title> - -<para>By convention, we encode the input and output types of signal -processing blocks in their name using suffixes. The suffix is -typically one or two characters long. Source and sinks have single -character suffixes. Regular blocks that have both inputs and outputs -have two character suffixes. The first character indicates the type -of the input streams, the second indicates the type of the output -streams. FIR filter blocks have a three character suffix, indicating -the type of the inputs, outputs and taps, respectively.</para> - -<para>These are the suffix characters and their interpretations: -<itemizedlist> -<listitem><para>f - single precision floating point</para></listitem> -<listitem><para>c - complex<float></para></listitem> -<listitem><para>s - short (16-bit integer)</para></listitem> -<listitem><para>i - integer (32-bit integer)</para></listitem> -</itemizedlist> -</para> - -<para>In addition, for those cases where the block deals with streams -of vectors, we use the character 'v' as the first character of the -suffix. An example of this usage is -<classname>gr_fft_vcc</classname>. The FFT block takes a vector of -complex numbers on its input and produces a vector of complex -numbers on its output.</para> - -</sect2> - -</sect1> - - - - -<sect1 id="square"><title>First Block: □</title> - -<para>For our first example &well; create a block that computes -the square of its single float input. This block will accept a single -float input stream and produce a single float output stream.</para> - -<para>Following the naming conventions, &well; use -<literal>howto</literal> as our package prefix, and the block will -be called <classname>howto_square_ff</classname>.</para> - -<para>We are going to arrange that this block, as well as the others -that we write in this article, end up in the -<literal>gnuradio.howto</literal> Python module. This will allow us -to access it from Python like this: -<programlisting> -from gnuradio import howto -sqr = howto.square_ff () -</programlisting> -</para> - - -<sect2 id="test_driven"><title>Test Driven Programming</title> - -<para>We could just start banging out the C++ code, but being highly -evolved modern programmers, &were; going to write the test code first. -After all, we do have a good spec for the behavior: take a single -stream of floats as the input and produce a single stream of floats as -the output. The output should be the square of the input.</para> - -<para>How hard could this be? Turns out that this is easy! Check out -<xref linkend="qa_howto_1.py"/>.</para> - -<example id="qa_howto_1.py"> -<title><filename>qa_howto.py</filename> (first version)</title> -&qa_howto_1_listing; -</example> - -<para> -<classname>gr_unittest</classname> is an extension to the standard -python module <classname>unittest</classname>. -<classname>gr_unittest</classname> adds support for checking -approximate equality of tuples of float and complex numbers. -Unittest uses Python's reflection mechanism to find all methods that start with -<methodname>test_</methodname> and runs them. Unittest wraps each call -to <methodname>test_*</methodname> with matching calls to -<methodname>setUp</methodname> and <methodname>tearDown</methodname>. -See the python <ulink url="http://docs.python.org/lib/module-unittest.html"> -unittest</ulink> documentation for details. -</para> - -<para>When we run the test, -gr_unittest.main is going to invoke -<methodname>setUp</methodname>, -<methodname>test_001_square_ff</methodname>, and -<methodname>tearDown</methodname>.</para> -<para> -<methodname>test_001_square_ff</methodname> builds a small graph that -contains three nodes. gr.vector_source_f(src_data) will source the -elements of src_data and then say that &its; finished. howto.square_ff is the block -&were; testing. gr.vector_sink_f gathers the output of -howto.square_ff.</para> - -<para>The <methodname>run</methodname> method runs the graph until all -the blocks indicate they are finished. Finally, we check that the -result of executing square_ff on src_data matches what we expect. -</para> - -</sect2> - -<sect2 id="build_vs_install"><title>Build Tree vs. Install Tree</title> - -<para>The build tree is everything from <replaceable>topdir</replaceable> -(the one containing configure.ac) down. The path to the install tree is -<filename> -<replaceable>prefix</replaceable>/lib/python<replaceable>version</replaceable>/site-packages</filename>, -where <replaceable>prefix</replaceable> is the <literal>--prefix</literal> -argument to configure (default <filename>/usr/local</filename>) and -<replaceable>version</replaceable> is the installed version of -python. A typical value is -<filename>/usr/local/lib/python2.3/site-packages</filename>.</para> - - -<para>We normally set our PYTHONPATH environment variable to point at -the install tree, and do this in <filename>~/.bash_profile</filename> -or <filename>~/.profile</filename>. -This allows our python apps to access all the standard python -libraries, plus our locally installed stuff like GNU Radio.</para> - -<para>We write our applications such that they access the code and -libraries in the install tree. On the other hand, we want our test -code to run on the build tree, where we can detect problems before -installation.</para> - -</sect2> - -<sect2 id="make_check"><title>make check</title> - - -<para>We use <command>make check</command> to run our tests. -Make check invokes the <command>run_tests</command> shell script which -sets up the PYTHONPATH environment variable so that -our tests use the build tree versions of our code and libraries. -It then runs all files -which have names of the form <filename>qa_*.py</filename> and reports -the overall success or failure.</para> - -<para>There is quite a bit of behind-the-scenes action required to use -the non-installed versions of our code (look at -<filename>runtest</filename> for a cheap thrill.)</para> - -<para>Finally, running <command>make check</command> in the python -directory produces this result: -<literallayout> - [eb@bufo python]$ make check - make check-TESTS - make[1]: Entering directory `/home/eb/gr-build/gr-howto-write-a-block/src/python' - Traceback (most recent call last): - File "./qa_howto.py", line 24, in ? - import howto - ImportError: No module named howto - Traceback (most recent call last): - File "./qa_howto_1.py", line 24, in ? - import howto - ImportError: No module named howto - FAIL: run_tests - =================== - 1 of 1 tests failed - =================== - make[1]: *** [check-TESTS] Error 1 - make[1]: Leaving directory `/home/eb/gr-build/gr-howto-write-a-block/src/python' - make: *** [check-am] Error 2 - [eb@bufo python]$ -</literallayout> -Excellent! Our test failed, just as we expected. The ImportError -indicates that it can't find the module named -<classname>howto</classname>. No surprise, since we haven't written it yet. -</para> - -</sect2> - -<sect2><title>The C++ code</title> -<para>Now that we've got a test case written that successfully fails, -let's write the C++ code. As we mentioned earlier, all signal -processing blocks are derived from <classname>gr_block</classname> or -one of its subclasses. Let's take a look at -<xref linkend="gr_block.h"/>.</para> - -<example id="gr_block.h"> -<title><filename>gr_block.h</filename></title> -&gr_block_listing; -</example> - -<para>A quick scan of <filename>gr_block.h</filename> reveals that -since <methodname>general_work</methodname> is pure virtual, we -definitely need to override that. -<methodname>general_work</methodname> is the method that does the -actual signal processing. For our squaring example we'll -need to override <methodname>general_work</methodname> and provide a -constructor and destructor and a bit of stuff to take advantage of -the <ulink url="http://www.boost.org">boost</ulink> -<ulink url="http://www.boost.org/libs/smart_ptr/smart_ptr.htm"> -<classname>shared_ptr</classname>s.</ulink> - -</para> - - -<para><xref linkend="howto_square_ff.h"/> -and <xref linkend="howto_square_ff.cc"/> are the header and c++ -source.</para> - -<example id="howto_square_ff.h"> -<title><filename>howto_square_ff.h</filename></title> -&howto_square_ff_h_listing; -</example> - -<example id="howto_square_ff.cc"> -<title><filename>howto_square_ff.cc</filename></title> -&howto_square_ff_cc_listing; -</example> - -<para>Now we need a Makefile.am to get all this to build. -<xref linkend="src_lib_Makefile_1"/> -is enough to build a shared library from our source file. We'll be -adding additional rules to use &SWIG; in just a bit. If you haven't -already, this is a good time to browse all the Makefile.am's in -the build tree and get an idea for how it all hangs together.</para> - -<example id="src_lib_Makefile_1"> -<title><filename>src/lib/Makefile.am</filename> (no &SWIG;)</title> -&src_lib_Makefile_1_am_listing; -</example> - -</sect2> - - -<!-- ============================== - -<sect2 id="io_sig"><title><classname>gr_io_signature</classname></title> -<para></para> -</sect2> - -<sect2 id="forecast"><title><methodname>forecast</methodname></title> -<para></para> -</sect2> - -<sect2 id="output_multiple"> -<title><methodname>set_output_multiple</methodname></title> -<para></para> -</sect2> - - ============================== --> - - -<sect2 id="swig"><title>The &SWIG; .i file</title> - -<para>Now that we've got something that will compile, we need to write -the &SWIG; .i file. This is a pared-down version of the .h file, plus -a bit of magic that has python work with the boost shared_ptr's. -To reduce code bloat, we only declare methods that &well; want to -access from Python.</para> - -<para>We're going to call the .i file -<filename>howto.i</filename>, and use it to hold the &SWIG; -declarations for all classes from <literal>howto</literal> that will -be accessible from python. It's quite small: -&howto_1_i_listing; -</para> - -</sect2> - -<sect2><title>Putting it all together</title> -<para> -Now we need to modify <filename>src/lib/Makefile.am</filename> -to run &SWIG; and to add the glue it generates to the shared library.</para> - -<example id="src_lib_Makefile_2"> -<title><filename>src/lib/Makefile.am</filename> (with &SWIG;)</title> -&src_lib_Makefile_2_am_listing; -</example> - -<para><command>make</command> now builds everything successfully. We get a -few warnings, but &thats; OK.</para> - -<para>Changing directories back to the python directory we try -<command>make check</command> again: -<literallayout> - [eb@bufo python]$ make check - make check-TESTS - make[1]: Entering directory `/home/eb/gr-build/gr-howto-write-a-block/src/python' - . - ---------------------------------------------------------------------- - Ran 1 test in 0.004s - - OK - PASS: run_tests - ================== - All 1 tests passed - ================== - make[1]: Leaving directory `/home/eb/gr-build/gr-howto-write-a-block/src/python' - [eb@bufo python]$ -</literallayout> -<emphasis>Victory! Our new block works!</emphasis> -</para> - -</sect2> - -</sect1><!-- end First Block: square --> - -<sect1 id="additional_methods"><title>Additional gr_block methods</title> - -<para>In our <classname>howto_square_ff</classname> example above, we only -had to override the <methodname>general_work</methodname> method to -accomplish our goal. <classname>gr_block</classname> provides a few other -methods that are sometimes useful.</para> - -<sect2 id="forecast"><title>forecast</title> - -<para>Looking at <methodname>general_work</methodname> you may -have wondered how the system knows how much data it needs to -ensure is valid in each of the input arrays. The -<methodname>forecast</methodname> method provides this -information.</para> - -<para>The default implementation of <methodname>forecast</methodname> -says there is a 1:1 relationship between noutput_items and the -requirements for each input stream. The size of the items is defined by -<classname>gr_io_signature</classname>s in the constructor of -<classname>gr_block</classname>. The sizes of the input and output items -can of course differ; this still qualifies as a 1:1 relationship. -<programlisting> - // default implementation: 1:1 - - void - gr_block::forecast (int noutput_items, - gr_vector_int &ninput_items_required) - { - unsigned ninputs = ninput_items_required.size (); - for (unsigned i = 0; i < ninputs; i++) - ninput_items_required[i] = noutput_items; - } -</programlisting> -</para> - -<para>Although the 1:1 implementation worked for howto_square_ff, it -wouldn't be appropriate for interpolators, decimators, or blocks -with a more complicated relationship between noutput_items and the -input requirements. That said, by deriving your classes from -<classname>gr_sync_block</classname>, -<classname>gr_sync_interpolator</classname> or -<classname>gr_sync_decimator</classname> instead of -<classname>gr_block</classname>, you can often avoid -implementing <methodname>forecast</methodname>.</para> - -</sect2> - -<sect2 id="set_output_multiple"><title>set_output_multiple</title> - -<para>When implementing your <methodname>general_work</methodname> -routine, &its; occasionally convenient to have the run time system -ensure that you are only asked to produce a number of output items -that is a multiple of some particular value. This might occur if your -algorithm naturally applies to a fixed sized block of data. -Call <methodname>set_output_multiple</methodname> in your constructor -to specify this requirement. The default output multiple is 1.</para> - -</sect2> - -</sect1> - - -<sect1 id="common_patterns"> -<title>Subclasses for common patterns</title> - -<para><classname>gr_block</classname> allows tremendous flexibility -with regard to the consumption of input streams and the production of -output streams. Adroit use of <methodname>forecast</methodname> and -<methodname>consume</methodname> allows variable rate blocks to be -built. It is possible to construct blocks that consume data at -different rates on each input, and produce output at a rate that -is a function of the contents of the input data.</para> - -<para>On the other hand, it is very common for signal processing -blocks to have a fixed relationship between the input rate and the -output rate. Many are 1:1, while others have 1:N or N:1 -relationships.</para> - -<para>Another common requirement is the need to examine more than one -input sample to produce a single output sample. This is orthogonal to -the relationship between input and output rate. For example, a -non-decimating, non-interpolating FIR filter needs to examine N input -samples for each output sample it produces, where N is the number of -taps in the filter. However, it only consumes a single input sample -to produce a single output. We call this concept "history", but you -could also think of it as "look-ahead".</para> - -<sect2 id="gr_sync_block"><title><classname>gr_sync_block</classname></title> - -<para> -<ulink url="http://www.gnu.org/software/gnuradio/doc/classgr__sync__block.html"> -<classname>gr_sync_block</classname></ulink> -is derived from -<ulink url="http://www.gnu.org/software/gnuradio/doc/classgr__block.html"> -<classname>gr_block</classname></ulink> -and implements a 1:1 block with -optional history. Given that we know the input to output rate, -certain simplifications are possible. From the implementor's -point-of-view, the primary change is that we define a -<methodname>work</methodname> method instead of -<methodname>general_work</methodname>. <methodname>work</methodname> -has a slightly different calling sequence; -It omits the unnecessary ninput_items parameter, and arranges for -<methodname>consume_each</methodname> to be called on our -behalf.</para> -<programlisting> - /*! - * \brief Just like gr_block::general_work, only this arranges to - * call consume_each for you. - * - * The user must override work to define the signal processing code - */ - virtual int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) = 0; -</programlisting> - -<para>This gives us fewer things to worry about, and less code to -write. If the block requires history greater than 1, call -<methodname>set_history</methodname> in the constructor, or any time -the requirement changes.</para> - -<para><classname>gr_sync_block</classname> provides a -version of <methodname>forecast</methodname> that handles the -history requirement.</para> - -</sect2> - -<sect2 id="gr_sync_decimator"><title><classname>gr_sync_decimator</classname></title> - -<para> -<ulink url="http://www.gnu.org/software/gnuradio/doc/classgr__sync__decimator.html"> -<classname>gr_sync_decimator</classname></ulink> -is derived from -<ulink url="http://www.gnu.org/software/gnuradio/doc/classgr__sync__block.html"> -<classname>gr_sync_block</classname></ulink> -and implements a N:1 block with optional history. -</para> - -</sect2> - -<sect2 id="gr_sync_interpolator"><title><classname>gr_sync_interpolator</classname></title> - -<para> -<ulink url="http://www.gnu.org/software/gnuradio/doc/classgr__sync__interpolator.html"> -<classname>gr_sync_interpolator</classname></ulink> -is derived from -<ulink url="http://www.gnu.org/software/gnuradio/doc/classgr__sync__block.html"> -<classname>gr_sync_block</classname></ulink> -and implements a 1:N block with optional history. -</para> - -</sect2> - - -</sect1> - -<sect1 id="square2"> -<title>Second Block: <classname>howto_square2_ff</classname></title> - -<para>Given that we now know about -<classname>gr_sync_block</classname>, the way -<classname>howto_square_ff</classname> should really be implemented is -by subclassing <classname>gr_sync_block</classname>.</para> - -<para>Here are the revised sources: <xref -linkend="howto_square2_ff.h"/>, -<xref linkend="howto_square2_ff.cc"/>. -The accompanying files contain the additional test code. -</para> - -<example id="howto_square2_ff.h"> -<title><filename>howto_square2_ff.h</filename></title> -&howto_square2_ff_h_listing; -</example> - -<example id="howto_square2_ff.cc"> -<title><filename>howto_square2_ff.cc</filename></title> -&howto_square2_ff_cc_listing; -</example> - -</sect1> - -<sect1 id="where_to"><title>Where to from Here?</title> - -<para>At this point, we've got a basic overview of how the system -goes together. For more insight, I suggest that you look at the code -of the system. The doxygen generated <ulink -url="http://www.gnu.org/software/gnuradio/doc/hierarchy.html"> class -hierarchy</ulink> is a useful way to find things that might interest -you.</para> - -</sect1> - - -<sect1 id="tips"><title>Miscellaneous Tips</title> - -<sect2 id="sources_and_sinks"><title>Sources and Sinks</title> - -<para>Sources and sinks are derived from -<classname>gr_sync_block</classname>. The only thing different about -them is that sources have no inputs and sinks have no outputs. This -is reflected in the <classname>gr_io_signature</classname>s that are -passed to the <classname>gr_sync_block</classname> constructor. -Take a look at <filename>gr_file_source.{h,cc}</filename> and -<filename>gr_file_sink.{h,cc}</filename> for some very straight-forward examples. -</para> - -</sect2> - -<sect2 id="debugging"> -<title>Debugging with <application>gdb</application></title> - -<para>If your block isn't working, and you can't sort it -out through python test cases or a few printfs in the code, you may want to -use <application>gdb</application> to debug it. The trick of course -is that all of &gnuradio;, including your new block, is dynamically -loaded into python for execution.</para> - -<para>Try this: In your python test code, after the relevant imports, -print out the process id and wait for a keystroke. In another -window run gdb and tell it to attach to the python process with the -given process id. At this point you can set breakpoints or whatever -in your code. Go back to the python window and hit Enter so -it'll continue.</para> - -<programlisting> - #!/usr/bin/env python - from gnuradio import gr - from gnuradio import my_buggy_module - - # insert this in your test code... - import os - print 'Blocked waiting for GDB attach (pid = %d)' % (os.getpid(),) - raw_input ('Press Enter to continue: ') - # remainder of your test code follows... -</programlisting> - -<para>Another SNAFU you might run into is that gdb 6.2 isn't -able to set breakpoints in the constructors or destructors generated -by g++ 3.4. In this case, insert a call to the nop function -gri_debugger_hook in the constructor and recompile. Load the code as -before and set a break point on gri_debugger_hook.</para> - -</sect2> - -<sect2 id="oprofile"> -<title>Performance Measurement with <application>oprofile</application></title> -<para>Oprofile is your friend. -See <ulink url="http://oprofile.sourceforge.net">http://oprofile.sourceforge.net</ulink>. -</para> -</sect2> - -</sect1><!-- end tips --> - -<sect1 id="futures"><title>Coming Attractions</title> -<para></para> - -<sect2 id="types"><title>Improved Type System</title> -<para></para> -</sect2> - -<sect2 id="hierarchy"><title>Hierarchical Blocks</title> -<para></para> -</sect2> - -</sect1><!-- end Coming Attractions --> - -</article> diff --git a/docs/howto-write-a-block/howto_1.i b/docs/howto-write-a-block/howto_1.i deleted file mode 100644 index 640d0897b..000000000 --- a/docs/howto-write-a-block/howto_1.i +++ /dev/null @@ -1,29 +0,0 @@ -/* -*- c++ -*- */ - -%include "exception.i" -%import "gnuradio.i" // the common stuff - -%{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix -#include "howto_square_ff.h" -#include <stdexcept> -%} - -// ---------------------------------------------------------------- - -/* - * First arg is the package prefix. - * Second arg is the name of the class minus the prefix. - * - * This does some behind-the-scenes magic so we can - * access howto_square_ff from python as howto.square_ff - */ -GR_SWIG_BLOCK_MAGIC(howto,square_ff); - -howto_square_ff_sptr howto_make_square_ff (); - -class howto_square_ff : public gr_block -{ -private: - howto_square_ff (); -}; diff --git a/docs/howto-write-a-block/make_numbered_listing.py b/docs/howto-write-a-block/make_numbered_listing.py deleted file mode 100755 index 889c2d78d..000000000 --- a/docs/howto-write-a-block/make_numbered_listing.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python - -import sys -import os, os.path -from optparse import OptionParser - -def quote_line (line): - line = line.replace ('&', '&') - line = line.replace ('<', '<') - line = line.replace ('>', '>') - line = line.replace ("'", ''') - line = line.replace ('"', '"') - return line - -def generate_listing (input_filename, title=None): - inf = open (input_filename, "r") - output_filename = os.path.basename (input_filename) + '.xml' - outf = open (output_filename, "w") - outf.write ('<?xml version="1.0" encoding="ISO-8859-1"?>\n') - # outf.write ('<example id="%s">\n' % (input_filename,)) - # if not title: - # title = input_filename - # outf.write ('<title>') - # outf.write (title) - # outf.write ('</title>\n') - outf.write ('<programlisting>\n'); - - lineno = 0 - for line in inf: - line = line.expandtabs (8) - line = quote_line (line) - lineno = lineno + 1 - outf.write ('%3d %s' % (lineno, line)) - - outf.write ('</programlisting>\n') - # outf.write ('</example>\n') - - -def main (): - for file in sys.argv[1:]: - generate_listing (file) - -if __name__ == '__main__': - main () - diff --git a/docs/howto-write-a-block/qa_howto_1.py b/docs/howto-write-a-block/qa_howto_1.py deleted file mode 100755 index 3173110f8..000000000 --- a/docs/howto-write-a-block/qa_howto_1.py +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python - -from gnuradio import gr, gr_unittest -import howto - -class qa_howto (gr_unittest.TestCase): - - def setUp (self): - self.tb = gr.top_block () - - def tearDown (self): - self.tb = None - - def test_001_square_ff (self): - src_data = (-3, 4, -5.5, 2, 3) - expected_result = (9, 16, 30.25, 4, 9) - src = gr.vector_source_f (src_data) - sqr = howto.square_ff () - dst = gr.vector_sink_f () - self.tb.connect (src, sqr) - self.tb.connect (sqr, dst) - self.tb.run () - result_data = dst.data () - self.assertFloatTuplesAlmostEqual (expected_result, result_data, 6) - -if __name__ == '__main__': - gr_unittest.main () diff --git a/docs/howto-write-a-block/src_lib_Makefile_1.am b/docs/howto-write-a-block/src_lib_Makefile_1.am deleted file mode 100644 index e97d70d1c..000000000 --- a/docs/howto-write-a-block/src_lib_Makefile_1.am +++ /dev/null @@ -1,25 +0,0 @@ -include $(top_srcdir)/Makefile.common - -# Install this stuff so that it ends up as the gnuradio.howto module -# This usually ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio - -ourpythondir = $(grpythondir) -ourlibdir = $(grpyexecdir) - -INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES) - -ourlib_LTLIBRARIES = _howto.la - -# These are the source files that go into the shared library -_howto_la_SOURCES = \ - howto_square_ff.cc - -# magic flags -_howto_la_LDFLAGS = -module -avoid-version - -# These headers get installed in ${prefix}/include/gnuradio -grinclude_HEADERS = \ - howto_square_ff.h - -MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc diff --git a/docs/howto-write-a-block/src_lib_Makefile_2.am b/docs/howto-write-a-block/src_lib_Makefile_2.am deleted file mode 100644 index dca236e20..000000000 --- a/docs/howto-write-a-block/src_lib_Makefile_2.am +++ /dev/null @@ -1,86 +0,0 @@ -# -# Copyright 2004,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. -# - -include $(top_srcdir)/Makefile.common - -# Install this stuff so that it ends up as the gnuradio.howto module -# This usually ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio - -ourpythondir = $(grpythondir) -ourlibdir = $(grpyexecdir) - -INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES) - -SWIGCPPPYTHONARGS = -noruntime -c++ -python $(PYTHON_CPPFLAGS) \ - -I$(swigincludedir) -I$(grincludedir) $(WITH_SWIG_INCLUDES) - -ALL_IFILES = \ - $(LOCAL_IFILES) \ - $(NON_LOCAL_IFILES) - -NON_LOCAL_IFILES = \ - $(GNURADIO_CORE_INCLUDEDIR)/swig/gnuradio.i - - -LOCAL_IFILES = \ - howto.i - -# These files are built by SWIG. The first is the C++ glue. -# The second is the python wrapper that loads the _howto shared library -# and knows how to call our extensions. - -BUILT_SOURCES = \ - howto.cc \ - howto.py - -# This gets howto.py installed in the right place -ourpython_PYTHON = \ - howto.py - -ourlib_LTLIBRARIES = _howto.la - -# These are the source files that go into the shared library -_howto_la_SOURCES = \ - howto.cc \ - howto_square_ff.cc - -# magic flags -_howto_la_LDFLAGS = -module -avoid-version - -# link the library against some comon swig runtime code and the -# c++ standard library -_howto_la_LIBADD = \ - -lgrswigrunpy \ - -lstdc++ - -howto.cc howto.py: howto.i $(ALL_IFILES) - $(SWIG) $(SWIGCPPPYTHONARGS) -module howto -o howto.cc $< - -# These headers get installed in ${prefix}/include/gnuradio -grinclude_HEADERS = \ - howto_square_ff.h - -# These swig headers get installed in ${prefix}/include/gnuradio/swig -swiginclude_HEADERS = \ - $(LOCAL_IFILES) - -MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc diff --git a/dtools/README b/dtools/README index 938ef6dd5..280b19bbd 100644 --- a/dtools/README +++ b/dtools/README @@ -1,23 +1,23 @@ # # Copyright 2006 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# This is a collection of tools that are useful for building tarball distributions of GNU Radio. They're probably not of general interest. diff --git a/dtools/bin/check-config-files b/dtools/bin/check-config-files deleted file mode 100755 index 7111c951d..000000000 --- a/dtools/bin/check-config-files +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env python -# usage: takes list of directories on command line - -import sys -import os -import os.path -from itertools import ifilter, ifilterfalse, imap, izip -import md5 -from pprint import pprint -from sets import Set - -class info(object): - def __init__(self, dir, name, md5sum): - self.dir = dir - self.name = name - self.md5sum = md5sum - def __repr__(self): - return '<%r, %r, %r>' % (self.dir, self.name, self.md5sum) - - -def md5sum_file(filename): - f = open(filename, 'r') - m = md5.new(f.read()) - return m.hexdigest() - -def process_dir(dir): - files = list(ifilterfalse(lambda s: s.endswith('~'), - _filter(os.listdir(dir), ('CVS','Makefile', 'Makefile.in', '.svn')))) - return [info(dir, f, md5sum_file(os.path.join(dir, f))) for f in files] - - -# Return a copy with items that occur in skip removed. -# -def _filter(flist, skip): - return list(ifilterfalse(skip.__contains__, flist)) - -def main(): - dirs = sys.argv[1:] - r = [] - for d in dirs: - r += process_dir(d) - - names = Set([x.name for x in r]) - #pprint(names) - - # check for missing files across the union of names - for d in dirs: - names_in_dir = Set([x.name for x in r if x.dir == d]) - diff = names.difference(names_in_dir) - if len(diff) != 0: - print "%s is missing %r" % (d, diff) - - # check for different versions of files - name_list = [n for n in names] - name_list.sort() - - for name in name_list: - vers = {} - pairs = [(x.dir, x.md5sum) for x in r if x.name == name] - for (dir, sum) in pairs: - if vers.has_key(sum): - vers[sum].append(dir) - else: - vers[sum] = [ dir ] - if len(vers) != 1: # multiple versions - print "Multiple versions of %s:" % (name,) - pprint(vers) - - # pprint(r) - -if __name__ == '__main__': - main() diff --git a/dtools/bin/check-imports b/dtools/bin/check-imports index 75ca547d6..fe4bf2302 100755 --- a/dtools/bin/check-imports +++ b/dtools/bin/check-imports @@ -1,4 +1,4 @@ #!/bin/bash -find . -name '*.py' | xargs grep -h -E '^(from|import)' | sort -u +find . -name '*.py' | xargs grep -h -E '^(from|import)' | sort -u diff --git a/dtools/bin/get-config-files b/dtools/bin/get-config-files deleted file mode 100755 index 343bca26b..000000000 --- a/dtools/bin/get-config-files +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -# fetch latest config.guess and config.sub - -wget -O config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -wget -O config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' diff --git a/dtools/bin/install-tbb b/dtools/bin/install-tbb index 95ffbedd7..8ff216da4 100755 --- a/dtools/bin/install-tbb +++ b/dtools/bin/install-tbb @@ -20,7 +20,7 @@ includedir=${prefix}/include Name: tbb Description: Intel Threading Building Blocks -Requires: +Requires: Version: 2.0 Libs: -L${libdir} -ltbb -ltbbmalloc Cflags: -I${includedir} @@ -35,7 +35,7 @@ includedir=${prefix}/include Name: tbb Description: Intel Threading Building Blocks -Requires: +Requires: Version: 2.0 Libs: -L${libdir} -ltbb_debug -ltbbmalloc_debug Cflags: -I${includedir} @@ -51,7 +51,7 @@ def main(): raise SystemExit, 1 prefix = options.prefix - + # are we installing 64-bit libs? is_64bit = False @@ -66,7 +66,7 @@ def main(): lib = 'lib64' else: lib = 'lib' - + os.system('install -d ' + os.path.join(prefix, 'include/tbb')) os.system('install -d ' + os.path.join(prefix, 'include/tbb/machine')) os.system('install -d ' + os.path.join(prefix, lib)) @@ -79,10 +79,10 @@ def main(): f = open(os.path.join(prefix, lib, 'pkgconfig', pkgconfig_filename), 'w') f.write(pkgconfig_file_contents % (prefix,)) f.close() - + f = open(os.path.join(prefix, lib, 'pkgconfig', debug_pkgconfig_filename), 'w') f.write(debug_pkgconfig_file_contents % (prefix,)) f.close() - + if __name__ == "__main__": main() diff --git a/dtools/bin/remove-whitespace b/dtools/bin/remove-whitespace new file mode 100755 index 000000000..9f011be3b --- /dev/null +++ b/dtools/bin/remove-whitespace @@ -0,0 +1,3 @@ +#!/bin/bash + +sed -i -e 's/\s\+$//g' $(find . -type f | grep -v '.git' | grep -v 'png' | grep -v 'eps')
\ No newline at end of file diff --git a/dtools/bin/update_fsf_address b/dtools/bin/update_fsf_address index ec67ef076..608ba0a8e 100755 --- a/dtools/bin/update_fsf_address +++ b/dtools/bin/update_fsf_address @@ -1,19 +1,19 @@ #!/usr/bin/env python # # Copyright 2006 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. @@ -108,7 +108,7 @@ def handle_file_or_dir(file_or_dir): def main(): global dry_run - + usage = '%prog: [options] [file_or_dir...]' parser = OptionParser (usage=usage) parser.add_option('-l', '--list-modified-files', action='store_true', default=False, @@ -120,7 +120,7 @@ def main(): dry_run = options.dry_run if options.dry_run: options.list_modified_files = True - + for file_or_dir in args: handle_file_or_dir(file_or_dir) @@ -128,7 +128,7 @@ def main(): for f in modified_files: sys.stdout.write(f + '\n') - + if __name__ == '__main__': main() - + diff --git a/dtools/microblaze/mb-gcc-4.1.1-gr-1.patch b/dtools/microblaze/mb-gcc-4.1.1-gr-1.patch deleted file mode 100644 index fe7d18d9f..000000000 --- a/dtools/microblaze/mb-gcc-4.1.1-gr-1.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- orig/Xilinx_EDK_GNU_10.1i/mb/srcs/newlib-1.14.0_libgloss.patch 2008-01-29 15:42:56.000000000 -0800 -+++ new/Xilinx_EDK_GNU_10.1i/mb/srcs/newlib-1.14.0_libgloss.patch 2008-10-05 08:47:12.000000000 -0700 -@@ -232,7 +232,7 @@ - +all: ${CRT} ${OBJS}
-
- install: ${CRT}
-- @for crt in ${CRT}; do\
-+ @for crt in ${CRT}; do \
- diff -urNp --exclude '*.swp' newlib-orig/libgloss/microblaze/open.c newlib/libgloss/microblaze/open.c
- --- newlib-orig/libgloss/microblaze/open.c 1969-12-31 16:00:00.000000000 -0800
- +++ newlib/libgloss/microblaze/open.c 2007-05-07 19:07:04.000000000 -0700
-diff -urN orig/Xilinx_EDK_GNU_10.1i/mb/srcs/newlib-1.14.0_libgloss_more_funcs.patch new/Xilinx_EDK_GNU_10.1i/mb/srcs/newlib-1.14.0_libgloss_more_funcs.patch ---- orig/Xilinx_EDK_GNU_10.1i/mb/srcs/newlib-1.14.0_libgloss_more_funcs.patch 2008-01-29 15:42:56.000000000 -0800 -+++ new/Xilinx_EDK_GNU_10.1i/mb/srcs/newlib-1.14.0_libgloss_more_funcs.patch 2008-10-05 08:47:12.000000000 -0700 -@@ -1007,7 +1007,7 @@ - @@ -71,7 +71,7 @@ all: ${CRT} ${LIB} - - install: ${CRT} ${LIB} -- @for crt in ${CRT}; do\ -+ @for crt in ${CRT}; do \ - - $(INSTALL_PROGRAM) $${crt} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$${crt}; \ - + $(INSTALL_PROGRAM) $${crt} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$${crt}; \ - done -diff -urN orig/Xilinx_EDK_GNU_10.1i/mb/srcs/newlib-1.14.0_libmb.patch new/Xilinx_EDK_GNU_10.1i/mb/srcs/newlib-1.14.0_libmb.patch ---- orig/Xilinx_EDK_GNU_10.1i/mb/srcs/newlib-1.14.0_libmb.patch 2008-01-29 15:42:56.000000000 -0800 -+++ new/Xilinx_EDK_GNU_10.1i/mb/srcs/newlib-1.14.0_libmb.patch 2008-10-05 08:47:12.000000000 -0700 -@@ -25,7 +25,7 @@ -
- -install: ${CRT}
- +install: ${CRT} ${LIB}
-- @for crt in ${CRT}; do\
-+ @for crt in ${CRT}; do \
- $(INSTALL_PROGRAM) $${crt} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$${crt}; \
- done
- + $(INSTALL_PROGRAM) ${LIB} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}
-diff -urN orig/Xilinx_EDK_GNU_10.1i/mb/srcs/newlib-1.14_crt.patch new/Xilinx_EDK_GNU_10.1i/mb/srcs/newlib-1.14_crt.patch ---- orig/Xilinx_EDK_GNU_10.1i/mb/srcs/newlib-1.14_crt.patch 2008-01-29 15:42:56.000000000 -0800 -+++ new/Xilinx_EDK_GNU_10.1i/mb/srcs/newlib-1.14_crt.patch 2008-10-05 08:47:12.000000000 -0700 -@@ -619,7 +619,7 @@ - +all: ${CRT} - + - +install: ${CRT} --+ @for crt in ${CRT}; do\ -++ @for crt in ${CRT}; do \ - + $(INSTALL_PROGRAM) $${crt} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$${crt}; \ - + done - + diff --git a/dtools/release-checklist b/dtools/release-checklist deleted file mode 100644 index 9e2e37706..000000000 --- a/dtools/release-checklist +++ /dev/null @@ -1,11 +0,0 @@ -Caveats: - -* gr-howto-write-a-block must be checked out into it's own top-level - working copy for build, otherwise automake will grab the depcomp, - install-sh, etc. files from the parent directory, and not put them - in the distribution tarball. - -* Ubuntu's automake (at least) will copy config.guess and config.sub from - Ubuntu's system directory, even if there is already one in the directory. - You need to 'svn revert config.guess config.sub' after running bootstrap - and before running configure.
\ No newline at end of file diff --git a/gnuradio-core/.gitignore b/gnuradio-core/.gitignore deleted file mode 100644 index 53edad32f..000000000 --- a/gnuradio-core/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -/*.cache -/*.la -/*.lo -/*.pc -/.deps -/.la -/.libs -/.lo -/Makefile -/Makefile.in -/aclocal.m4 -/autom4te.cache -/config.cache -/config.h -/config.h.in -/config.log -/config.status -/configure -/depcomp -/install-sh -/libtool -/ltmain.sh -/make.log -/missing -/missing -/mkinstalldirs -/py-compile -/stamp-h -/stamp-h.in -/stamp-h1 -/stamp-h1.in -/stamp-h2.in diff --git a/gnuradio-core/CMakeLists.txt b/gnuradio-core/CMakeLists.txt index 101f4c3a3..022710844 100644 --- a/gnuradio-core/CMakeLists.txt +++ b/gnuradio-core/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2010-2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, @@ -22,8 +22,6 @@ ######################################################################## include(GrBoost) -find_package(GSL) - find_package(FFTW3f) include(GrPython) #used for code generation @@ -41,7 +39,6 @@ GR_REGISTER_COMPONENT("gnuradio-core" ENABLE_GR_CORE ENABLE_GRUEL ENABLE_VOLK Boost_FOUND - GSL_FOUND FFTW3F_FOUND PYTHONINTERP_FOUND ) @@ -126,6 +123,7 @@ endif(ENABLE_TESTING) if(ENABLE_PYTHON) add_subdirectory(src/lib/swig) add_subdirectory(src/python/gnuradio) + add_subdirectory(src/examples) endif(ENABLE_PYTHON) ######################################################################## diff --git a/gnuradio-core/Makefile.am b/gnuradio-core/Makefile.am deleted file mode 100644 index 0a4e7e151..000000000 --- a/gnuradio-core/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright 2001,2006,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 - -EXTRA_DIST += \ - gnuradio-core.pc.in - -SUBDIRS = src - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = gnuradio-core.pc - -etcdir = $(gr_prefsdir) -dist_etc_DATA = gnuradio-core.conf diff --git a/gnuradio-core/gnuradio-core.pc.in b/gnuradio-core/gnuradio-core.pc.in index 40c26a129..2de9a32e7 100644 --- a/gnuradio-core/gnuradio-core.pc.in +++ b/gnuradio-core/gnuradio-core.pc.in @@ -2,11 +2,10 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@/gnuradio -guile_load_path=@prefix@/share/guile/site Name: gnuradio-core Description: GNU Software Radio toolkit -Requires: gruel fftw3f gsl +Requires: gruel fftw3f Version: @LIBVER@ Libs.private: @BOOST_LDFLAGS@ @BOOST_THREAD_LIB@ @BOOST_DATE_TIME_LIB@ Libs: -L${libdir} -lgnuradio-core diff --git a/gnuradio-core/src/.gitignore b/gnuradio-core/src/.gitignore deleted file mode 100644 index a02b6ff73..000000000 --- a/gnuradio-core/src/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo diff --git a/gnuradio-core/src/Makefile.am b/gnuradio-core/src/Makefile.am deleted file mode 100644 index 1717d373a..000000000 --- a/gnuradio-core/src/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright 2001,2004,2009,2010 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 = gen_interpolator_taps lib tests python guile - -DIST_SUBDIRS = gen_interpolator_taps lib tests python guile utils diff --git a/gnuradio-examples/python/CMakeLists.txt b/gnuradio-core/src/examples/CMakeLists.txt index 39b1fe806..c2b847c91 100644 --- a/gnuradio-examples/python/CMakeLists.txt +++ b/gnuradio-core/src/examples/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, @@ -20,4 +20,5 @@ add_subdirectory(mp-sched) add_subdirectory(network) add_subdirectory(pfb) -add_subdirectory(tags)
\ No newline at end of file +add_subdirectory(tags) +add_subdirectory(volk_benchmark)
\ No newline at end of file diff --git a/gnuradio-examples/python/mp-sched/CMakeLists.txt b/gnuradio-core/src/examples/mp-sched/CMakeLists.txt index ca090659d..dc47d17f9 100644 --- a/gnuradio-examples/python/mp-sched/CMakeLists.txt +++ b/gnuradio-core/src/examples/mp-sched/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, @@ -25,11 +25,11 @@ GR_PYTHON_INSTALL(PROGRAMS synthetic.py wfm_rcv_pll_to_wav.py DESTINATION ${GR_PKG_DATA_DIR}/examples/mp-sched - COMPONENT "gnuradio_examples" + COMPONENT "core_python" ) install( FILES README DESTINATION ${GR_PKG_DATA_DIR}/examples/mp-sched - COMPONENT "gnuadio-examples" + COMPONENT "core_python" ) diff --git a/gnuradio-examples/python/mp-sched/README b/gnuradio-core/src/examples/mp-sched/README index ae575437a..ae575437a 100644 --- a/gnuradio-examples/python/mp-sched/README +++ b/gnuradio-core/src/examples/mp-sched/README diff --git a/gnuradio-examples/python/mp-sched/perf-data/core-duo.dat b/gnuradio-core/src/examples/mp-sched/perf-data/core-duo.dat index 064d1e128..064d1e128 100644 --- a/gnuradio-examples/python/mp-sched/perf-data/core-duo.dat +++ b/gnuradio-core/src/examples/mp-sched/perf-data/core-duo.dat diff --git a/gnuradio-examples/python/mp-sched/perf-data/core2-duo.dat b/gnuradio-core/src/examples/mp-sched/perf-data/core2-duo.dat index d67dee8e5..d67dee8e5 100644 --- a/gnuradio-examples/python/mp-sched/perf-data/core2-duo.dat +++ b/gnuradio-core/src/examples/mp-sched/perf-data/core2-duo.dat diff --git a/gnuradio-examples/python/mp-sched/perf-data/dual-quad-core-2.33-clovertown.dat b/gnuradio-core/src/examples/mp-sched/perf-data/dual-quad-core-2.33-clovertown.dat index fa182c69a..fa182c69a 100644 --- a/gnuradio-examples/python/mp-sched/perf-data/dual-quad-core-2.33-clovertown.dat +++ b/gnuradio-core/src/examples/mp-sched/perf-data/dual-quad-core-2.33-clovertown.dat diff --git a/gnuradio-examples/python/mp-sched/perf-data/dual-quad-core-3.00-penryn.dat b/gnuradio-core/src/examples/mp-sched/perf-data/dual-quad-core-3.00-penryn.dat index 57d49ed33..57d49ed33 100644 --- a/gnuradio-examples/python/mp-sched/perf-data/dual-quad-core-3.00-penryn.dat +++ b/gnuradio-core/src/examples/mp-sched/perf-data/dual-quad-core-3.00-penryn.dat diff --git a/gnuradio-examples/python/mp-sched/perf-data/js21-altivec.dat b/gnuradio-core/src/examples/mp-sched/perf-data/js21-altivec.dat index d0b8148f0..d0b8148f0 100644 --- a/gnuradio-examples/python/mp-sched/perf-data/js21-altivec.dat +++ b/gnuradio-core/src/examples/mp-sched/perf-data/js21-altivec.dat diff --git a/gnuradio-examples/python/mp-sched/perf-data/js21.dat b/gnuradio-core/src/examples/mp-sched/perf-data/js21.dat index a23bcebe7..a23bcebe7 100644 --- a/gnuradio-examples/python/mp-sched/perf-data/js21.dat +++ b/gnuradio-core/src/examples/mp-sched/perf-data/js21.dat diff --git a/gnuradio-examples/python/mp-sched/perf-data/ps3-altivec.dat b/gnuradio-core/src/examples/mp-sched/perf-data/ps3-altivec.dat index dd01b31bd..dd01b31bd 100644 --- a/gnuradio-examples/python/mp-sched/perf-data/ps3-altivec.dat +++ b/gnuradio-core/src/examples/mp-sched/perf-data/ps3-altivec.dat diff --git a/gnuradio-examples/python/mp-sched/perf-data/ps3.dat b/gnuradio-core/src/examples/mp-sched/perf-data/ps3.dat index c9bac37cc..c9bac37cc 100644 --- a/gnuradio-examples/python/mp-sched/perf-data/ps3.dat +++ b/gnuradio-core/src/examples/mp-sched/perf-data/ps3.dat diff --git a/gnuradio-examples/python/mp-sched/perf-data/qs21-altivec.dat b/gnuradio-core/src/examples/mp-sched/perf-data/qs21-altivec.dat index 8364be363..8364be363 100644 --- a/gnuradio-examples/python/mp-sched/perf-data/qs21-altivec.dat +++ b/gnuradio-core/src/examples/mp-sched/perf-data/qs21-altivec.dat diff --git a/gnuradio-examples/python/mp-sched/perf-data/qs21.dat b/gnuradio-core/src/examples/mp-sched/perf-data/qs21.dat index cc628740a..cc628740a 100644 --- a/gnuradio-examples/python/mp-sched/perf-data/qs21.dat +++ b/gnuradio-core/src/examples/mp-sched/perf-data/qs21.dat diff --git a/gnuradio-examples/python/mp-sched/plot_flops.py b/gnuradio-core/src/examples/mp-sched/plot_flops.py index b3f819397..d9d810ae2 100755 --- a/gnuradio-examples/python/mp-sched/plot_flops.py +++ b/gnuradio-core/src/examples/mp-sched/plot_flops.py @@ -1,19 +1,19 @@ #!/usr/bin/env python # # 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 this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -38,7 +38,7 @@ def parse_file(input_filename, output): s = line.strip() if s.startswith('>>>'): # ignore ">>> using SSE cruft" continue - + if s.startswith('#D'): # machine description desc = s[2:].strip() continue @@ -78,7 +78,7 @@ def handle_file(input_filename): data_file.flush() os.system("gnuplot " + cmd_file_name + " -") - + #sys.stdout.write(open(cmd_file_name,'r').read()) #sys.stdout.write(open(data_file_name,'r').read()) diff --git a/gnuradio-examples/python/mp-sched/run_synthetic.py b/gnuradio-core/src/examples/mp-sched/run_synthetic.py index 565e6c5c7..4896bca46 100755 --- a/gnuradio-examples/python/mp-sched/run_synthetic.py +++ b/gnuradio-core/src/examples/mp-sched/run_synthetic.py @@ -1,19 +1,19 @@ #!/usr/bin/env python # # 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 this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -58,8 +58,8 @@ def write_shell_script(f, data_filename, description, ncores, gflops, max_pipes_ f.write(") 2>&1 | grep --line-buffered -v '^>>>' | tee %s\n" % (data_filename,)) f.flush() - - + + def main(): description = """%prog gathers multiprocessor scaling data using the ./synthetic.py benchmark. @@ -88,14 +88,14 @@ plot_flops.py will make pretty graphs from the output data generated by %prog. output_filename = args[0] shell = os.popen("/bin/sh", "w") - + write_shell_script(shell, output_filename, options.description, options.ncores, options.gflops, options.max_pipes_and_stages) - + if __name__ == '__main__': main() diff --git a/gnuradio-examples/python/mp-sched/synthetic.py b/gnuradio-core/src/examples/mp-sched/synthetic.py index e1fcb20bd..5ce1b5eb8 100755 --- a/gnuradio-examples/python/mp-sched/synthetic.py +++ b/gnuradio-core/src/examples/mp-sched/synthetic.py @@ -1,19 +1,19 @@ #!/usr/bin/env python # # 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 this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -42,7 +42,7 @@ class pipeline(gr.hier_block2): upstream = op self.connect(upstream, gr.null_sink(gr.sizeof_float)) - + class top(gr.top_block): def __init__(self): @@ -112,7 +112,7 @@ if __name__ == "__main__": time_it(tb) except KeyboardInterrupt: raise SystemExit, 128 - - - + + + diff --git a/gnuradio-examples/python/mp-sched/wfm_rcv_pll_to_wav.py b/gnuradio-core/src/examples/mp-sched/wfm_rcv_pll_to_wav.py index 3971d8b73..81613922b 100755 --- a/gnuradio-examples/python/mp-sched/wfm_rcv_pll_to_wav.py +++ b/gnuradio-core/src/examples/mp-sched/wfm_rcv_pll_to_wav.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005,2006,2007 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, gru, eng_notation, optfir from gnuradio import audio @@ -41,14 +41,14 @@ class wfm_rx_block (gr.top_block): if len(args) != 2: parser.print_help() sys.exit(1) - + input_filename = args[0] output_filename = args[1] self.vol = 0 - + # build graph - + self.src = gr.file_source(gr.sizeof_gr_complex, input_filename, False) adc_rate = 64e6 # 64 MS/s @@ -84,7 +84,7 @@ class wfm_rx_block (gr.top_block): sink = audio.sink (int (audio_rate), options.audio_output, False) # ok_to_block - + # now wire it all together self.connect (self.src, chan_filt, self.guts) self.connect ((self.guts, 0), self.volume_control_l, (sink, 0)) @@ -117,7 +117,7 @@ class wfm_rx_block (gr.top_block): def volume_range(self): return (-20.0, 0.0, 0.5) - + if __name__ == '__main__': tb = wfm_rx_block() diff --git a/gnuradio-examples/python/network/CMakeLists.txt b/gnuradio-core/src/examples/network/CMakeLists.txt index e70403ba0..902933e29 100644 --- a/gnuradio-examples/python/network/CMakeLists.txt +++ b/gnuradio-core/src/examples/network/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, @@ -25,6 +25,6 @@ GR_PYTHON_INSTALL(PROGRAMS vector_sink.py vector_source.py DESTINATION ${GR_PKG_DATA_DIR}/examples/network - COMPONENT "gnuradio_examples" + COMPONENT "core_python" ) diff --git a/gnuradio-examples/python/network/audio_sink.py b/gnuradio-core/src/examples/network/audio_sink.py index eb18a75aa..72a678816 100755 --- a/gnuradio-examples/python/network/audio_sink.py +++ b/gnuradio-core/src/examples/network/audio_sink.py @@ -1,28 +1,35 @@ #!/usr/bin/env python # # Copyright 2006,2007,2010 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, audio +from gnuradio import gr from gnuradio.eng_option import eng_option from optparse import OptionParser +import sys + +try: + from gnuradio import audio +except ImportError: + sys.stderr.write("Failed to import gnuradio.audio. Make sure gr-audio component is installed.\n") + sys.exit(1) class audio_sink(gr.top_block): def __init__(self, host, port, pkt_size, sample_rate, eof, wait): @@ -31,7 +38,7 @@ class audio_sink(gr.top_block): eof=eof, wait=wait) dst = audio.sink(sample_rate) self.connect(src, dst) - + if __name__ == '__main__': parser = OptionParser(option_class=eng_option) parser.add_option("", "--host", type="string", default="0.0.0.0", @@ -55,11 +62,11 @@ if __name__ == '__main__': top_block = audio_sink(options.host, options.port, options.packet_size, options.sample_rate, not options.no_eof, not options.no_wait) - - try: + + try: # Run forever top_block.run() except KeyboardInterrupt: # Ctrl-C exits pass - + diff --git a/gnuradio-examples/python/network/audio_source.py b/gnuradio-core/src/examples/network/audio_source.py index 5818ccbd8..0baf7d2e9 100755 --- a/gnuradio-examples/python/network/audio_source.py +++ b/gnuradio-core/src/examples/network/audio_source.py @@ -1,28 +1,35 @@ #!/usr/bin/env python # # Copyright 2006,2007,2010 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, audio +from gnuradio import gr from gnuradio.eng_option import eng_option from optparse import OptionParser +import sys + +try: + from gnuradio import audio +except ImportError: + sys.stderr.write("Failed to import gnuradio.audio. Make sure gr-audio component is installed.\n") + sys.exit(1) class audio_source(gr.top_block): def __init__(self, host, port, pkt_size, sample_rate, eof): @@ -52,11 +59,11 @@ if __name__ == '__main__': top_block = audio_source(options.host, options.port, options.packet_size, options.sample_rate, not options.no_eof) - - try: + + try: # Run forever top_block.run() except KeyboardInterrupt: # Ctrl-C exits pass - + diff --git a/gnuradio-examples/python/network/dial_tone_sink.py b/gnuradio-core/src/examples/network/dial_tone_sink.py index 1b9009552..83ad376c0 100755 --- a/gnuradio-examples/python/network/dial_tone_sink.py +++ b/gnuradio-core/src/examples/network/dial_tone_sink.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2006,2007,2010 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, audio from gnuradio.eng_option import eng_option @@ -31,7 +31,7 @@ class dial_tone_sink(gr.top_block): eof=eof, wait=wait) sink = audio.sink(sample_rate) self.connect(udp, sink) - + if __name__ == '__main__': parser = OptionParser(option_class=eng_option) parser.add_option("", "--host", type="string", default="0.0.0.0", @@ -55,11 +55,11 @@ if __name__ == '__main__': top_block = dial_tone_sink(options.host, options.port, options.packet_size, options.sample_rate, not options.no_eof, not options.no_wait) - - try: + + try: # Run forever top_block.run() except KeyboardInterrupt: # Ctrl-C exits pass - + diff --git a/gnuradio-examples/python/network/dial_tone_source.py b/gnuradio-core/src/examples/network/dial_tone_source.py index 766ecf16d..232a06de8 100755 --- a/gnuradio-examples/python/network/dial_tone_source.py +++ b/gnuradio-core/src/examples/network/dial_tone_source.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2006,2007,2010 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 from gnuradio.eng_option import eng_option @@ -61,8 +61,8 @@ if __name__ == '__main__': top_block = dial_tone_source(options.host, options.port, options.packet_size, options.sample_rate, not options.no_eof) - - try: + + try: # Run forever top_block.run() except KeyboardInterrupt: diff --git a/gnuradio-examples/python/network/vector_sink.py b/gnuradio-core/src/examples/network/vector_sink.py index 5d73858a3..e84a27d9f 100755 --- a/gnuradio-examples/python/network/vector_sink.py +++ b/gnuradio-core/src/examples/network/vector_sink.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2006,2010 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 from gnuradio.eng_option import eng_option @@ -49,16 +49,16 @@ if __name__ == "__main__": if len(args) != 0: parser.print_help() raise SystemExit, 1 - + # Create an instance of a hierarchical block top_block = vector_sink(options.host, options.port, options.packet_size, not options.no_eof, not options.no_wait) - - try: + + try: # Run forever top_block.run() except KeyboardInterrupt: # Ctrl-C exits pass - + diff --git a/gnuradio-examples/python/network/vector_source.py b/gnuradio-core/src/examples/network/vector_source.py index 0e7d67844..d322dda3b 100755 --- a/gnuradio-examples/python/network/vector_source.py +++ b/gnuradio-core/src/examples/network/vector_source.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2006,2010 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 from gnuradio.eng_option import eng_option @@ -50,11 +50,11 @@ if __name__ == '__main__': # Create an instance of a hierarchical block top_block = vector_source(options.host, options.port, options.packet_size, not options.no_eof) - - try: + + try: # Run forever top_block.run() except KeyboardInterrupt: # Ctrl-C exits pass - + diff --git a/gnuradio-examples/python/pfb/CMakeLists.txt b/gnuradio-core/src/examples/pfb/CMakeLists.txt index 55dbb16ac..6bb25568c 100644 --- a/gnuradio-examples/python/pfb/CMakeLists.txt +++ b/gnuradio-core/src/examples/pfb/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, @@ -29,7 +29,8 @@ GR_PYTHON_INSTALL(PROGRAMS resampler.py synth_filter.py synth_to_chan.py + reconstruction.py DESTINATION ${GR_PKG_DATA_DIR}/examples/pfb - COMPONENT "gnuradio_examples" + COMPONENT "core_python" ) diff --git a/gnuradio-examples/python/pfb/channelize.py b/gnuradio-core/src/examples/pfb/channelize.py index 999e5d20e..442f263f4 100755 --- a/gnuradio-examples/python/pfb/channelize.py +++ b/gnuradio-core/src/examples/pfb/channelize.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # 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. -# +# from gnuradio import gr, blks2 import sys, time @@ -46,7 +46,7 @@ class pfb_top_block(gr.top_block): self._M = 9 # Number of channels to channelize # Create a set of taps for the PFB channelizer - self._taps = gr.firdes.low_pass_2(1, self._fs, 475.50, 50, + self._taps = gr.firdes.low_pass_2(1, self._fs, 475.50, 50, attenuation_dB=100, window=gr.firdes.WIN_BLACKMAN_hARRIS) # Calculate the number of taps per channel for our own information @@ -54,9 +54,9 @@ class pfb_top_block(gr.top_block): print "Number of taps: ", len(self._taps) print "Number of channels: ", self._M print "Taps per channel: ", tpc - + # Create a set of signals at different frequencies - # freqs lists the frequencies of the signals that get stored + # freqs lists the frequencies of the signals that get stored # in the list "signals", which then get summed together self.signals = list() self.add = gr.add_cc() @@ -68,7 +68,7 @@ class pfb_top_block(gr.top_block): self.head = gr.head(gr.sizeof_gr_complex, self._N) # Construct the channelizer filter - self.pfb = blks2.pfb_channelizer_ccf(self._M, self._taps) + self.pfb = blks2.pfb_channelizer_ccf(self._M, self._taps, 1) # Construct a vector sink for the input signal to the channelizer self.snk_i = gr.vector_sink_c() @@ -77,16 +77,19 @@ class pfb_top_block(gr.top_block): self.connect(self.add, self.head, self.pfb) self.connect(self.add, self.snk_i) + # Use this to play with the channel mapping + #self.pfb.set_channel_map([5,6,7,8,0,1,2,3,4]) + # Create a vector sink for each of M output channels of the filter and connect it self.snks = list() for i in xrange(self._M): self.snks.append(gr.vector_sink_c()) self.connect((self.pfb, i), self.snks[i]) - + def main(): tstart = time.time() - + tb = pfb_top_block() tb.run() @@ -97,7 +100,7 @@ def main(): fig_in = pylab.figure(1, figsize=(16,9), facecolor="w") fig1 = pylab.figure(2, figsize=(16,9), facecolor="w") fig2 = pylab.figure(3, figsize=(16,9), facecolor="w") - + Ns = 1000 Ne = 10000 @@ -115,8 +118,8 @@ def main(): X_in = 10.0*scipy.log10(abs(X)) f_in = scipy.arange(-fs/2.0, fs/2.0, fs/float(X_in.size)) pin_f = spin_f.plot(f_in, X_in, "b") - spin_f.set_xlim([min(f_in), max(f_in)+1]) - spin_f.set_ylim([-200.0, 50.0]) + spin_f.set_xlim([min(f_in), max(f_in)+1]) + spin_f.set_ylim([-200.0, 50.0]) spin_f.set_title("Input Signal", weight="bold") spin_f.set_xlabel("Frequency (Hz)") @@ -125,7 +128,7 @@ def main(): Ts = 1.0/fs Tmax = len(d)*Ts - + t_in = scipy.arange(0, Tmax, Ts) x_in = scipy.array(d) spin_t = fig_in.add_subplot(2, 1, 2) @@ -158,8 +161,8 @@ def main(): X_o = 10.0*scipy.log10(abs(X)) f_o = scipy.arange(-fs_o/2.0, fs_o/2.0, fs_o/float(X_o.size)) p2_f = sp1_f.plot(f_o, X_o, "b") - sp1_f.set_xlim([min(f_o), max(f_o)+1]) - sp1_f.set_ylim([-200.0, 50.0]) + sp1_f.set_xlim([min(f_o), max(f_o)+1]) + sp1_f.set_ylim([-200.0, 50.0]) sp1_f.set_title(("Channel %d" % i), weight="bold") sp1_f.set_xlabel("Frequency (Hz)") @@ -170,8 +173,8 @@ def main(): sp2_o = fig2.add_subplot(Nrows, Ncols, 1+i) p2_o = sp2_o.plot(t_o, x_o.real, "b") p2_o = sp2_o.plot(t_o, x_o.imag, "r") - sp2_o.set_xlim([min(t_o), max(t_o)+1]) - sp2_o.set_ylim([-2, 2]) + sp2_o.set_xlim([min(t_o), max(t_o)+1]) + sp2_o.set_ylim([-2, 2]) sp2_o.set_title(("Channel %d" % i), weight="bold") sp2_o.set_xlabel("Time (s)") @@ -185,4 +188,4 @@ if __name__ == "__main__": main() except KeyboardInterrupt: pass - + diff --git a/gnuradio-examples/python/pfb/chirp_channelize.py b/gnuradio-core/src/examples/pfb/chirp_channelize.py index 951255d3b..1c485ea9d 100755 --- a/gnuradio-examples/python/pfb/chirp_channelize.py +++ b/gnuradio-core/src/examples/pfb/chirp_channelize.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # 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. -# +# from gnuradio import gr, blks2 import sys, time @@ -46,7 +46,7 @@ class pfb_top_block(gr.top_block): self._M = 9 # Number of channels to channelize # Create a set of taps for the PFB channelizer - self._taps = gr.firdes.low_pass_2(1, self._fs, 500, 20, + self._taps = gr.firdes.low_pass_2(1, self._fs, 500, 20, attenuation_dB=10, window=gr.firdes.WIN_BLACKMAN_hARRIS) # Calculate the number of taps per channel for our own information @@ -62,7 +62,7 @@ class pfb_top_block(gr.top_block): amp = 100 data = scipy.arange(0, amp, amp/float(self._N)) self.vco_input = gr.vector_source_f(data, False) - + # Build a VCO controlled by either the sinusoid or single chirp tone # Then convert this to a complex signal self.vco = gr.vco_f(self._fs, 225, 1) @@ -86,11 +86,11 @@ class pfb_top_block(gr.top_block): for i in xrange(self._M): self.snks.append(gr.vector_sink_c()) self.connect((self.pfb, i), self.snks[i]) - + def main(): tstart = time.time() - + tb = pfb_top_block() tb.run() @@ -102,7 +102,7 @@ def main(): fig1 = pylab.figure(2, figsize=(16,9), facecolor="w") fig2 = pylab.figure(3, figsize=(16,9), facecolor="w") fig3 = pylab.figure(4, figsize=(16,9), facecolor="w") - + Ns = 650 Ne = 20000 @@ -120,8 +120,8 @@ def main(): X_in = 10.0*scipy.log10(abs(fftpack.fftshift(X))) f_in = scipy.arange(-fs/2.0, fs/2.0, fs/float(X_in.size)) pin_f = spin_f.plot(f_in, X_in, "b") - spin_f.set_xlim([min(f_in), max(f_in)+1]) - spin_f.set_ylim([-200.0, 50.0]) + spin_f.set_xlim([min(f_in), max(f_in)+1]) + spin_f.set_ylim([-200.0, 50.0]) spin_f.set_title("Input Signal", weight="bold") spin_f.set_xlabel("Frequency (Hz)") @@ -130,7 +130,7 @@ def main(): Ts = 1.0/fs Tmax = len(d)*Ts - + t_in = scipy.arange(0, Tmax, Ts) x_in = scipy.array(d) spin_t = fig_in.add_subplot(2, 1, 2) @@ -163,8 +163,8 @@ def main(): X_o = 10.0*scipy.log10(abs(X)) f_o = freq p2_f = sp1_f.plot(f_o, X_o, "b") - sp1_f.set_xlim([min(f_o), max(f_o)+1]) - sp1_f.set_ylim([-200.0, 50.0]) + sp1_f.set_xlim([min(f_o), max(f_o)+1]) + sp1_f.set_ylim([-200.0, 50.0]) sp1_f.set_title(("Channel %d" % i), weight="bold") sp1_f.set_xlabel("Frequency (Hz)") @@ -175,8 +175,8 @@ def main(): sp2_o = fig2.add_subplot(Nrows, Ncols, 1+i) p2_o = sp2_o.plot(t_o, x_o.real, "b") p2_o = sp2_o.plot(t_o, x_o.imag, "r") - sp2_o.set_xlim([min(t_o), max(t_o)+1]) - sp2_o.set_ylim([-2, 2]) + sp2_o.set_xlim([min(t_o), max(t_o)+1]) + sp2_o.set_ylim([-2, 2]) sp2_o.set_title(("Channel %d" % i), weight="bold") sp2_o.set_xlabel("Time (s)") @@ -185,12 +185,12 @@ def main(): sp3 = fig3.add_subplot(1,1,1) p3 = sp3.plot(t_o, x_o.real) - sp3.set_xlim([min(t_o), max(t_o)+1]) - sp3.set_ylim([-2, 2]) + sp3.set_xlim([min(t_o), max(t_o)+1]) + sp3.set_ylim([-2, 2]) sp3.set_title("All Channels") sp3.set_xlabel("Time (s)") - sp3.set_ylabel("Amplitude") + sp3.set_ylabel("Amplitude") pylab.show() @@ -200,4 +200,4 @@ if __name__ == "__main__": main() except KeyboardInterrupt: pass - + diff --git a/gnuradio-examples/python/pfb/decimate.py b/gnuradio-core/src/examples/pfb/decimate.py index 643a2c241..5322d746d 100755 --- a/gnuradio-examples/python/pfb/decimate.py +++ b/gnuradio-core/src/examples/pfb/decimate.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # 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. -# +# from gnuradio import gr, blks2 import sys, time @@ -44,7 +44,7 @@ class pfb_top_block(gr.top_block): self._N = 10000000 # number of samples to use self._fs = 10000 # initial sampling rate self._decim = 20 # Decimation rate - + # Generate the prototype filter taps for the decimators with a 200 Hz bandwidth self._taps = gr.firdes.low_pass_2(1, self._fs, 200, 150, attenuation_dB=120, window=gr.firdes.WIN_BLACKMAN_hARRIS) @@ -54,7 +54,7 @@ class pfb_top_block(gr.top_block): print "Number of taps: ", len(self._taps) print "Number of filters: ", self._decim print "Taps per channel: ", tpc - + # Build the input signal source # We create a list of freqs, and a sine wave is generated and added to the source # for each one of these frequencies. @@ -66,7 +66,7 @@ class pfb_top_block(gr.top_block): self.connect(self.signals[i], (self.add,i)) self.head = gr.head(gr.sizeof_gr_complex, self._N) - + # Construct a PFB decimator filter self.pfb = blks2.pfb_decimator_ccf(self._decim, self._taps, 0) @@ -82,12 +82,12 @@ class pfb_top_block(gr.top_block): # Create the sink for the decimated siganl self.snk = gr.vector_sink_c() self.connect(self.pfb, self.snk) - + def main(): tb = pfb_top_block() - tstart = time.time() + tstart = time.time() tb.run() tend = time.time() print "Run time: %f" % (tend - tstart) @@ -95,7 +95,7 @@ def main(): if 1: fig1 = pylab.figure(1, figsize=(16,9)) fig2 = pylab.figure(2, figsize=(16,9)) - + Ns = 10000 Ne = 10000 @@ -114,13 +114,13 @@ def main(): X_in = 10.0*scipy.log10(abs(fftpack.fftshift(X))) f_in = scipy.arange(-fs/2.0, fs/2.0, fs/float(X_in.size)) p1_f = sp1_f.plot(f_in, X_in, "b") - sp1_f.set_xlim([min(f_in), max(f_in)+1]) - sp1_f.set_ylim([-200.0, 50.0]) + sp1_f.set_xlim([min(f_in), max(f_in)+1]) + sp1_f.set_ylim([-200.0, 50.0]) sp1_f.set_title("Input Signal", weight="bold") sp1_f.set_xlabel("Frequency (Hz)") sp1_f.set_ylabel("Power (dBW)") - + Ts = 1.0/fs Tmax = len(d)*Ts @@ -134,7 +134,7 @@ def main(): sp1_t.set_xlabel("Time (s)") sp1_t.set_ylabel("Amplitude") - + # Plot the output of the decimator fs_o = tb._fs / tb._decim @@ -146,13 +146,13 @@ def main(): X_o = 10.0*scipy.log10(abs(fftpack.fftshift(X))) f_o = scipy.arange(-fs_o/2.0, fs_o/2.0, fs_o/float(X_o.size)) p2_f = sp2_f.plot(f_o, X_o, "b") - sp2_f.set_xlim([min(f_o), max(f_o)+1]) - sp2_f.set_ylim([-200.0, 50.0]) + sp2_f.set_xlim([min(f_o), max(f_o)+1]) + sp2_f.set_ylim([-200.0, 50.0]) sp2_f.set_title("PFB Decimated Signal", weight="bold") sp2_f.set_xlabel("Frequency (Hz)") sp2_f.set_ylabel("Power (dBW)") - + Ts_o = 1.0/fs_o Tmax_o = len(d)*Ts_o @@ -175,4 +175,4 @@ if __name__ == "__main__": main() except KeyboardInterrupt: pass - + diff --git a/gnuradio-examples/python/pfb/fmtest.py b/gnuradio-core/src/examples/pfb/fmtest.py index 635ee4e9e..b9dd9b382 100755 --- a/gnuradio-examples/python/pfb/fmtest.py +++ b/gnuradio-core/src/examples/pfb/fmtest.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # 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. -# +# from gnuradio import gr, blks2 import sys, math, time @@ -45,7 +45,7 @@ class fmtx(gr.hier_block2): gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature fmtx = blks2.nbfm_tx (audio_rate, if_rate, max_dev=5e3, tau=75e-6) - + # Local oscillator lo = gr.sig_source_c (if_rate, # sample rate gr.GR_SIN_WAVE, # waveform type @@ -53,7 +53,7 @@ class fmtx(gr.hier_block2): 1.0, # amplitude 0) # DC Offset mixer = gr.multiply_cc () - + self.connect (self, fmtx, (mixer, 0)) self.connect (lo, (mixer, 1)) self.connect (mixer, self) @@ -93,7 +93,7 @@ class fmtest(gr.top_block): bw = chspacing/2.0 t_bw = chspacing/10.0 self._chan_rate = self._if_rate / self._M - self._taps = gr.firdes.low_pass_2(1, self._if_rate, bw, t_bw, + self._taps = gr.firdes.low_pass_2(1, self._if_rate, bw, t_bw, attenuation_dB=100, window=gr.firdes.WIN_BLACKMAN_hARRIS) tpc = math.ceil(float(len(self._taps)) / float(self._M)) @@ -101,11 +101,11 @@ class fmtest(gr.top_block): print "Number of taps: ", len(self._taps) print "Number of channels: ", self._M print "Taps per channel: ", tpc - + self.pfb = blks2.pfb_channelizer_ccf(self._M, self._taps) - + self.connect(self.channel, self.pfb) - + # Create a file sink for each of M output channels of the filter and connect it self.fmdet = list() self.squelch = list() @@ -153,8 +153,8 @@ def main(): X_in = 10.0*scipy.log10(abs(fftpack.fftshift(X))) f_in = scipy.arange(-fs/2.0, fs/2.0, fs/float(X_in.size)) p1_f = sp1_f.plot(f_in, X_in, "b") - sp1_f.set_xlim([min(f_in), max(f_in)+1]) - sp1_f.set_ylim([-120.0, 20.0]) + sp1_f.set_xlim([min(f_in), max(f_in)+1]) + sp1_f.set_ylim([-120.0, 20.0]) sp1_f.set_title("Input Signal", weight="bold") sp1_f.set_xlabel("Frequency (Hz)") @@ -162,7 +162,7 @@ def main(): Ts = 1.0/fs Tmax = len(d)*Ts - + t_in = scipy.arange(0, Tmax, Ts) x_in = scipy.array(d) sp1_t = fig1.add_subplot(2, 1, 2) @@ -194,8 +194,8 @@ def main(): #f_o = scipy.arange(-fs_o/2.0, fs_o/2.0, fs_o/float(X_o.size)) f_o = scipy.arange(0, fs_o/2.0, fs_o/2.0/float(X_o.size)) p2_f = sp2_f.plot(f_o, X_o, "b") - sp2_f.set_xlim([min(f_o), max(f_o)+0.1]) - sp2_f.set_ylim([-120.0, 20.0]) + sp2_f.set_xlim([min(f_o), max(f_o)+0.1]) + sp2_f.set_ylim([-120.0, 20.0]) sp2_f.grid(True) sp2_f.set_title(("Channel %d" % i), weight="bold") @@ -211,8 +211,8 @@ def main(): sp2_t = fig3.add_subplot(Nrows, Ncols, 1+i) p2_t = sp2_t.plot(t_o, x_t.real, "b") p2_t = sp2_t.plot(t_o, x_t.imag, "r") - sp2_t.set_xlim([min(t_o), max(t_o)+1]) - sp2_t.set_ylim([-1, 1]) + sp2_t.set_xlim([min(t_o), max(t_o)+1]) + sp2_t.set_ylim([-1, 1]) sp2_t.set_xlabel("Time (s)") sp2_t.set_ylabel("Amplitude") diff --git a/gnuradio-examples/python/pfb/interpolate.py b/gnuradio-core/src/examples/pfb/interpolate.py index 370cf26a7..98068f220 100755 --- a/gnuradio-examples/python/pfb/interpolate.py +++ b/gnuradio-core/src/examples/pfb/interpolate.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # 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. -# +# from gnuradio import gr, blks2 import sys, time @@ -46,13 +46,13 @@ class pfb_top_block(gr.top_block): self._interp = 5 # Interpolation rate for PFB interpolator self._ainterp = 5.5 # Resampling rate for the PFB arbitrary resampler - # Frequencies of the signals we construct + # Frequencies of the signals we construct freq1 = 100 freq2 = 200 # Create a set of taps for the PFB interpolator # This is based on the post-interpolation sample rate - self._taps = gr.firdes.low_pass_2(self._interp, self._interp*self._fs, freq2+50, 50, + self._taps = gr.firdes.low_pass_2(self._interp, self._interp*self._fs, freq2+50, 50, attenuation_dB=120, window=gr.firdes.WIN_BLACKMAN_hARRIS) # Create a set of taps for the PFB arbitrary resampler @@ -61,7 +61,7 @@ class pfb_top_block(gr.top_block): # The taps in this filter are based on a sampling rate of the filter size since it acts # internally as an interpolator. flt_size = 32 - self._taps2 = gr.firdes.low_pass_2(flt_size, flt_size*self._fs, freq2+50, 150, + self._taps2 = gr.firdes.low_pass_2(flt_size, flt_size*self._fs, freq2+50, 150, attenuation_dB=120, window=gr.firdes.WIN_BLACKMAN_hARRIS) # Calculate the number of taps per channel for our own information @@ -74,7 +74,7 @@ class pfb_top_block(gr.top_block): self.signal1 = gr.sig_source_c(self._fs, gr.GR_SIN_WAVE, freq1, 0.5) self.signal2 = gr.sig_source_c(self._fs, gr.GR_SIN_WAVE, freq2, 0.5) self.signal = gr.add_cc() - + self.head = gr.head(gr.sizeof_gr_complex, self._N) # Construct the PFB interpolator filter @@ -86,7 +86,7 @@ class pfb_top_block(gr.top_block): #self.pfb_ar.pfb.print_taps() #self.pfb.pfb.print_taps() - + # Connect the blocks self.connect(self.signal1, self.head, (self.signal,0)) self.connect(self.signal2, (self.signal,1)) @@ -99,7 +99,7 @@ class pfb_top_block(gr.top_block): self.snk2 = gr.vector_sink_c() self.connect(self.pfb, self.snk1) self.connect(self.pfb_ar, self.snk2) - + def main(): tb = pfb_top_block() @@ -114,7 +114,7 @@ def main(): fig1 = pylab.figure(1, figsize=(12,10), facecolor="w") fig2 = pylab.figure(2, figsize=(12,10), facecolor="w") fig3 = pylab.figure(3, figsize=(12,10), facecolor="w") - + Ns = 10000 Ne = 10000 @@ -133,8 +133,8 @@ def main(): X_in = 10.0*scipy.log10(abs(fftpack.fftshift(X))) f_in = scipy.arange(-fs/2.0, fs/2.0, fs/float(X_in.size)) p1_f = sp1_f.plot(f_in, X_in, "b") - sp1_f.set_xlim([min(f_in), max(f_in)+1]) - sp1_f.set_ylim([-200.0, 50.0]) + sp1_f.set_xlim([min(f_in), max(f_in)+1]) + sp1_f.set_ylim([-200.0, 50.0]) sp1_f.set_title("Input Signal", weight="bold") @@ -143,7 +143,7 @@ def main(): Ts = 1.0/fs Tmax = len(d)*Ts - + t_in = scipy.arange(0, Tmax, Ts) x_in = scipy.array(d) sp1_t = fig1.add_subplot(2, 1, 2) @@ -167,8 +167,8 @@ def main(): X_o = 10.0*scipy.log10(abs(fftpack.fftshift(X))) f_o = scipy.arange(-fs_int/2.0, fs_int/2.0, fs_int/float(X_o.size)) p2_f = sp2_f.plot(f_o, X_o, "b") - sp2_f.set_xlim([min(f_o), max(f_o)+1]) - sp2_f.set_ylim([-200.0, 50.0]) + sp2_f.set_xlim([min(f_o), max(f_o)+1]) + sp2_f.set_ylim([-200.0, 50.0]) sp2_f.set_title("Output Signal from PFB Interpolator", weight="bold") sp2_f.set_xlabel("Frequency (Hz)") @@ -200,8 +200,8 @@ def main(): X_o = 10.0*scipy.log10(abs(fftpack.fftshift(X))) f_o = scipy.arange(-fs_aint/2.0, fs_aint/2.0, fs_aint/float(X_o.size)) p3_f = sp3_f.plot(f_o, X_o, "b") - sp3_f.set_xlim([min(f_o), max(f_o)+1]) - sp3_f.set_ylim([-200.0, 50.0]) + sp3_f.set_xlim([min(f_o), max(f_o)+1]) + sp3_f.set_ylim([-200.0, 50.0]) sp3_f.set_title("Output Signal from PFB Arbitrary Resampler", weight="bold") sp3_f.set_xlabel("Frequency (Hz)") @@ -217,7 +217,7 @@ def main(): p3_f = sp3_f.plot(t_o, x_o1.real, "m-o") #p3_f = sp3_f.plot(t_o, x_o2.imag, "r-o") sp3_f.set_ylim([-2.5, 2.5]) - + sp3_f.set_title("Output Signal from PFB Arbitrary Resampler", weight="bold") sp3_f.set_xlabel("Time (s)") sp3_f.set_ylabel("Amplitude") @@ -230,4 +230,4 @@ if __name__ == "__main__": main() except KeyboardInterrupt: pass - + diff --git a/gnuradio-core/src/examples/pfb/reconstruction.py b/gnuradio-core/src/examples/pfb/reconstruction.py new file mode 100755 index 000000000..59910e4d6 --- /dev/null +++ b/gnuradio-core/src/examples/pfb/reconstruction.py @@ -0,0 +1,131 @@ +#!/usr/bin/env python + +import scipy, math, pylab +from scipy import fftpack +from gnuradio import gr, digital, blks2 + +fftlen = 8192 + +def main(): + N = 10000 + fs = 2000.0 + Ts = 1.0/fs + t = scipy.arange(0, N*Ts, Ts) + + # When playing with the number of channels, be careful about the filter + # specs and the channel map of the synthesizer set below. + nchans = 10 + + # Build the filter(s) + bw = 1000 + tb = 400 + proto_taps = gr.firdes.low_pass_2(1, nchans*fs, bw, tb, 80, + gr.firdes.WIN_BLACKMAN_hARRIS) + print "Filter length: ", len(proto_taps) + + + # Create a modulated signal + npwr = 0.01 + data = scipy.random.randint(0, 256, N) + rrc_taps = gr.firdes.root_raised_cosine(1, 2, 1, 0.35, 41) + + src = gr.vector_source_b(data.astype(scipy.uint8).tolist(), False) + mod = digital.bpsk_mod(samples_per_symbol=2) + chan = gr.channel_model(npwr) + rrc = gr.fft_filter_ccc(1, rrc_taps) + + # Split it up into pieces + channelizer = blks2.pfb_channelizer_ccf(nchans, proto_taps, 2) + + # Put the pieces back together again + syn_taps = [nchans*t for t in proto_taps] + synthesizer = gr.pfb_synthesizer_ccf(nchans, syn_taps, True) + src_snk = gr.vector_sink_c() + snk = gr.vector_sink_c() + + # Remap the location of the channels + # Can be done in synth or channelizer (watch out for rotattions in + # the channelizer) + synthesizer.set_channel_map([ 0, 1, 2, 3, 4, + 15, 16, 17, 18, 19]) + + tb = gr.top_block() + tb.connect(src, mod, chan, rrc, channelizer) + tb.connect(rrc, src_snk) + + vsnk = [] + for i in xrange(nchans): + tb.connect((channelizer,i), (synthesizer, i)) + + vsnk.append(gr.vector_sink_c()) + tb.connect((channelizer,i), vsnk[i]) + + tb.connect(synthesizer, snk) + tb.run() + + sin = scipy.array(src_snk.data()[1000:]) + sout = scipy.array(snk.data()[1000:]) + + + # Plot original signal + fs_in = nchans*fs + f1 = pylab.figure(1, figsize=(16,12), facecolor='w') + s11 = f1.add_subplot(2,2,1) + s11.psd(sin, NFFT=fftlen, Fs=fs_in) + s11.set_title("PSD of Original Signal") + s11.set_ylim([-200, -20]) + + s12 = f1.add_subplot(2,2,2) + s12.plot(sin.real[1000:1500], "o-b") + s12.plot(sin.imag[1000:1500], "o-r") + s12.set_title("Original Signal in Time") + + start = 1 + skip = 4 + s13 = f1.add_subplot(2,2,3) + s13.plot(sin.real[start::skip], sin.imag[start::skip], "o") + s13.set_title("Constellation") + s13.set_xlim([-2, 2]) + s13.set_ylim([-2, 2]) + + # Plot channels + nrows = int(scipy.sqrt(nchans)) + ncols = int(scipy.ceil(float(nchans)/float(nrows))) + + f2 = pylab.figure(2, figsize=(16,12), facecolor='w') + for n in xrange(nchans): + s = f2.add_subplot(nrows, ncols, n+1) + s.psd(vsnk[n].data(), NFFT=fftlen, Fs=fs_in) + s.set_title("Channel {0}".format(n)) + s.set_ylim([-200, -20]) + + # Plot reconstructed signal + fs_out = 2*nchans*fs + f3 = pylab.figure(3, figsize=(16,12), facecolor='w') + s31 = f3.add_subplot(2,2,1) + s31.psd(sout, NFFT=fftlen, Fs=fs_out) + s31.set_title("PSD of Reconstructed Signal") + s31.set_ylim([-200, -20]) + + s32 = f3.add_subplot(2,2,2) + s32.plot(sout.real[1000:1500], "o-b") + s32.plot(sout.imag[1000:1500], "o-r") + s32.set_title("Reconstructed Signal in Time") + + start = 2 + skip = 4 + s33 = f3.add_subplot(2,2,3) + s33.plot(sout.real[start::skip], sout.imag[start::skip], "o") + s33.set_title("Constellation") + s33.set_xlim([-2, 2]) + s33.set_ylim([-2, 2]) + + pylab.show() + + +if __name__ == "__main__": + try: + main() + except KeyboardInterrupt: + pass + diff --git a/gnuradio-examples/python/pfb/resampler.py b/gnuradio-core/src/examples/pfb/resampler.py index 7b296ca71..555938d28 100755 --- a/gnuradio-examples/python/pfb/resampler.py +++ b/gnuradio-core/src/examples/pfb/resampler.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # 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. -# +# from gnuradio import gr, blks2 import sys @@ -38,7 +38,7 @@ except ImportError: class mytb(gr.top_block): def __init__(self, fs_in, fs_out, fc, N=10000): gr.top_block.__init__(self) - + rerate = float(fs_out) / float(fs_in) print "Resampling from %f to %f by %f " %(fs_in, fs_out, rerate) @@ -56,7 +56,7 @@ class mytb(gr.top_block): # A resampler that just needs a resampling rate. # Filter is created for us and designed to cover # entire bandwidth of the input signal. - # An optional atten=XX rate can be used here to + # An optional atten=XX rate can be used here to # specify the out-of-band rejection (default=80). self.resamp_1 = blks2.pfb_arb_resampler_ccf(rerate) diff --git a/gnuradio-examples/python/pfb/resampler_demo.grc b/gnuradio-core/src/examples/pfb/resampler_demo.grc index 468636a5c..468636a5c 100644 --- a/gnuradio-examples/python/pfb/resampler_demo.grc +++ b/gnuradio-core/src/examples/pfb/resampler_demo.grc diff --git a/gnuradio-examples/python/pfb/synth_filter.py b/gnuradio-core/src/examples/pfb/synth_filter.py index 074d9cb2c..c0f7376ec 100755 --- a/gnuradio-examples/python/pfb/synth_filter.py +++ b/gnuradio-core/src/examples/pfb/synth_filter.py @@ -1,27 +1,27 @@ #!/usr/bin/env python # # Copyright 2010 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, blks2 -import sys +import sys try: import scipy @@ -48,9 +48,9 @@ def main(): sigs.append(s) taps = gr.firdes.low_pass_2(len(freqs), fs, fs/float(nchans)/2, 100, 100) - print "Num. Taps = %d (taps per filter = %d)" % (len(taps), + print "Num. Taps = %d (taps per filter = %d)" % (len(taps), len(taps)/nchans) - filtbank = gr.pfb_synthesis_filterbank_ccf(nchans, taps) + filtbank = gr.pfb_synthesizer_ccf(nchans, taps) head = gr.head(gr.sizeof_gr_complex, N) snk = gr.vector_sink_c() @@ -60,14 +60,14 @@ def main(): for i,si in enumerate(sigs): tb.connect(si, (filtbank, i)) - + tb.run() if 1: f1 = pylab.figure(1) s1 = f1.add_subplot(1,1,1) s1.plot(snk.data()[1000:]) - + fftlen = 2048 f2 = pylab.figure(2) s2 = f2.add_subplot(1,1,1) diff --git a/gnuradio-examples/python/pfb/synth_to_chan.py b/gnuradio-core/src/examples/pfb/synth_to_chan.py index 7e454d903..18b2e7b53 100755 --- a/gnuradio-examples/python/pfb/synth_to_chan.py +++ b/gnuradio-core/src/examples/pfb/synth_to_chan.py @@ -1,27 +1,27 @@ #!/usr/bin/env python # # Copyright 2010 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, blks2 -import sys +import sys try: import scipy @@ -51,12 +51,12 @@ def main(): fmtx.append(fm) syntaps = gr.firdes.low_pass_2(len(freqs), fs, fs/float(nchans)/2, 100, 100) - print "Synthesis Num. Taps = %d (taps per filter = %d)" % (len(syntaps), + print "Synthesis Num. Taps = %d (taps per filter = %d)" % (len(syntaps), len(syntaps)/nchans) chtaps = gr.firdes.low_pass_2(len(freqs), fs, fs/float(nchans)/2, 100, 100) - print "Channelizer Num. Taps = %d (taps per filter = %d)" % (len(chtaps), + print "Channelizer Num. Taps = %d (taps per filter = %d)" % (len(chtaps), len(chtaps)/nchans) - filtbank = gr.pfb_synthesis_filterbank_ccf(nchans, syntaps) + filtbank = gr.pfb_synthesizer_ccf(nchans, syntaps) channelizer = blks2.pfb_channelizer_ccf(nchans, chtaps) noise_level = 0.01 @@ -79,7 +79,7 @@ def main(): for i in xrange(nchans): snk.append(gr.vector_sink_c()) tb.connect((channelizer, i), snk[i]) - + tb.run() if 1: @@ -90,7 +90,7 @@ def main(): s1 = f1.add_subplot(1,1,1) s1.plot(data[10000:10200] ) s1.set_title(("Output Signal from Channel %d" % channel)) - + fftlen = 2048 winfunc = scipy.blackman #winfunc = scipy.hamming diff --git a/gnuradio-examples/python/tags/CMakeLists.txt b/gnuradio-core/src/examples/tags/CMakeLists.txt index d2cd7b793..2d9dc2083 100644 --- a/gnuradio-examples/python/tags/CMakeLists.txt +++ b/gnuradio-core/src/examples/tags/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, @@ -23,6 +23,6 @@ GR_PYTHON_INSTALL(PROGRAMS test_file_tags.py uhd_burst_detector.py DESTINATION ${GR_PKG_DATA_DIR}/examples/tags - COMPONENT "gnuradio_examples" + COMPONENT "core_python" ) diff --git a/gnuradio-examples/python/tags/test_file_tags.py b/gnuradio-core/src/examples/tags/test_file_tags.py index 446986cd7..135626d2c 100755 --- a/gnuradio-examples/python/tags/test_file_tags.py +++ b/gnuradio-core/src/examples/tags/test_file_tags.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr import sys @@ -52,4 +52,4 @@ def main(): if __name__ == "__main__": main() - + diff --git a/gnuradio-examples/python/tags/uhd_burst_detector.py b/gnuradio-core/src/examples/tags/uhd_burst_detector.py index 7411ab06e..512fc715d 100755 --- a/gnuradio-examples/python/tags/uhd_burst_detector.py +++ b/gnuradio-core/src/examples/tags/uhd_burst_detector.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import eng_notation from gnuradio import gr @@ -39,11 +39,11 @@ class uhd_burst_detector(gr.top_block): self.gain = options.gain self.threshold = options.threshold self.trigger = options.trigger - + self.uhd_src = uhd.single_usrp_source( device_addr=self.uhd_addr, stream_args=uhd.stream_args('fc32')) - + self.uhd_src.set_samp_rate(self.samp_rate) self.uhd_src.set_center_freq(self.freq, 0) self.uhd_src.set_gain(self.gain, 0) @@ -70,7 +70,7 @@ class uhd_burst_detector(gr.top_block): # Use file sink burst tagger to capture bursts self.fsnk = gr.tagged_file_sink(gr.sizeof_gr_complex, self.samp_rate) - + ################################################## # Connections @@ -87,11 +87,11 @@ class uhd_burst_detector(gr.top_block): self.connect(self.uhd_src, self.det) self.connect(self.det, self.c2m, self.avg, self.scale, self.f2s) self.connect(self.f2s, (self.tagger, 1)) - + def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.uhd_src_0.set_samp_rate(self.samp_rate) - + if __name__ == '__main__': parser = OptionParser(option_class=eng_option, usage="%prog: [options]") parser.add_option("-a", "--address", type="string", default="addr=192.168.10.2", @@ -109,7 +109,7 @@ if __name__ == '__main__': parser.add_option("-T", "--trigger", action="store_true", default=False, help="Use internal trigger instead of detector [default=%default]") (options, args) = parser.parse_args() - + uhd_addr = options.address tb = uhd_burst_detector(uhd_addr, options) diff --git a/gr-fcd/python/Makefile.am b/gnuradio-core/src/examples/volk_benchmark/CMakeLists.txt index a99bc1933..255d9bf5c 100644 --- a/gr-fcd/python/Makefile.am +++ b/gnuradio-core/src/examples/volk_benchmark/CMakeLists.txt @@ -1,34 +1,35 @@ -# # Copyright 2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -fcddir = $(grpythondir)/fcd - -TESTS = run_tests -noinst_PYTHON = \ - qa_fcd.py +include(GrPython) -fcd_PYTHON = \ - __init__.py +GR_PYTHON_INSTALL(PROGRAMS + volk_math.py + volk_plot.py + volk_test_funcs.py + volk_types.py + DESTINATION ${GR_PKG_DATA_DIR}/examples/volk_benchmark + COMPONENT "core_python" +) -EXTRA_DIST += run_tests.in +install( + FILES README + DESTINATION ${GR_PKG_DATA_DIR}/examples/volk_benchmark + COMPONENT "core_python" +) diff --git a/gnuradio-examples/python/volk_benchmark/README b/gnuradio-core/src/examples/volk_benchmark/README index 516fc15bd..c58b40d11 100644 --- a/gnuradio-examples/python/volk_benchmark/README +++ b/gnuradio-core/src/examples/volk_benchmark/README @@ -221,7 +221,7 @@ variables to point to the v3.5.1 installation: And when we run the test, we use the same command line, but the GNU Radio libraries and Python files used come from v3.5.1. We also change the label to indicate the different version to store. - + ./volk_math.py -D volk_results_math.db --all -L v3_5_1 We now have a database populated with three tables for the three diff --git a/gnuradio-examples/python/volk_benchmark/volk_math.py b/gnuradio-core/src/examples/volk_benchmark/volk_math.py index 8bf9ed6f3..1d8bf04cc 100755 --- a/gnuradio-examples/python/volk_benchmark/volk_math.py +++ b/gnuradio-core/src/examples/volk_benchmark/volk_math.py @@ -125,7 +125,7 @@ def main(): if(args.list): print "Available Tests to Run:" print "\n".join(["\t{0}: {1}".format(i,f.__name__) for i,f in enumerate(avail_tests)]) - sys.exit(0) + sys.exit(0) N = int(args.nitems) iters = args.iterations @@ -143,7 +143,7 @@ def main(): res = run_tests(avail_tests[test], N, iters) if res is not None: replace_results(conn, label, N, iters, res) - + if __name__ == "__main__": try: main() diff --git a/gnuradio-examples/python/volk_benchmark/volk_plot.py b/gnuradio-core/src/examples/volk_benchmark/volk_plot.py index 823dfbf64..48f992205 100755 --- a/gnuradio-examples/python/volk_benchmark/volk_plot.py +++ b/gnuradio-core/src/examples/volk_benchmark/volk_plot.py @@ -29,7 +29,7 @@ def main(): default=None, metavar="table", help='Show percent difference to the given type [default: %(default)s]') args = parser.parse_args() - + # Set up global plotting properties matplotlib.rcParams['figure.subplot.bottom'] = 0.2 matplotlib.rcParams['figure.subplot.top'] = 0.95 @@ -37,7 +37,7 @@ def main(): matplotlib.rcParams['ytick.labelsize'] = 16 matplotlib.rcParams['xtick.labelsize'] = 16 matplotlib.rcParams['legend.fontsize'] = 18 - + # Get list of tables to compare conn = create_connection(args.database) tables = list_tables(conn) @@ -64,7 +64,7 @@ def main(): except ValueError: tmp_regs[-1].append(r['kernel']) - # Get only those names that are common in all tables + # Get only those names that are common in all tables name_reg = tmp_regs[0] for t in tmp_regs[1:]: name_reg = list(set(name_reg) & set(t)) @@ -97,7 +97,7 @@ def main(): norm_data.append(table_data[t][name]['min']) elif(args.plot == 'mean'): norm_data.append(table_data[t][name]['avg']) - + # Plot the results x0 = xrange(len(name_reg)) diff --git a/gnuradio-examples/python/volk_benchmark/volk_test_funcs.py b/gnuradio-core/src/examples/volk_benchmark/volk_test_funcs.py index 4f4e4afd3..0ce25fcc6 100644 --- a/gnuradio-examples/python/volk_benchmark/volk_test_funcs.py +++ b/gnuradio-core/src/examples/volk_benchmark/volk_test_funcs.py @@ -56,7 +56,7 @@ def insert_results(conn, tablename, nitems, iters, res): ''' cols = "kernel, nitems, iters, avg, var, max, min" cmd = "INSERT INTO {0} ({1}) VALUES ('{2}', {3}, {4}, {5}, {6}, {7}, {8})".format( - tablename, cols, res["kernel"], nitems, iters, + tablename, cols, res["kernel"], nitems, iters, res["avg"], res["var"], res["max"], res["min"]) execute(conn, cmd) @@ -71,7 +71,7 @@ def list_tables(conn): c.close() return t - + def get_results(conn, tablename): ''' Gets all results in tablename. @@ -95,7 +95,7 @@ def get_results(conn, tablename): res.append(r) return res - + class helper(gr.top_block): ''' diff --git a/gnuradio-examples/python/volk_benchmark/volk_types.py b/gnuradio-core/src/examples/volk_benchmark/volk_types.py index 3bc5a22ae..5dac23c53 100755 --- a/gnuradio-examples/python/volk_benchmark/volk_types.py +++ b/gnuradio-core/src/examples/volk_benchmark/volk_types.py @@ -156,7 +156,7 @@ def main(): if(args.list): print "Available Tests to Run:" print "\n".join(["\t{0}: {1}".format(i,f.__name__) for i,f in enumerate(avail_tests)]) - sys.exit(0) + sys.exit(0) N = int(args.nitems) iters = args.iterations @@ -174,7 +174,7 @@ def main(): res = run_tests(avail_tests[test], N, iters) if res is not None: replace_results(conn, label, N, iters, res) - + if __name__ == "__main__": try: main() diff --git a/gnuradio-core/src/gen_interpolator_taps/.gitignore b/gnuradio-core/src/gen_interpolator_taps/.gitignore deleted file mode 100644 index 363c633e1..000000000 --- a/gnuradio-core/src/gen_interpolator_taps/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -/Makefile -/Makefile.in -/.deps -/.libs -/*.la -/*.lo -/gen_interpolator_taps diff --git a/gnuradio-core/src/gen_interpolator_taps/Makefile.am b/gnuradio-core/src/gen_interpolator_taps/Makefile.am.obsolete index 1b54af5e7..cd0edaf5c 100644 --- a/gnuradio-core/src/gen_interpolator_taps/Makefile.am +++ b/gnuradio-core/src/gen_interpolator_taps/Makefile.am.obsolete @@ -1,23 +1,23 @@ # # Copyright 2002 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 @@ -32,7 +32,7 @@ EXTRA_DIST += \ # if ENABLE_FORTRAN # noinst_PROGRAMS = gen_interpolator_taps # noinst_HEADERS = simpson.h -# +# # gen_interpolator_taps_SOURCES = gen_interpolator_taps.c objective_fct.c simpson.c praxis.f # gen_interpolator_taps_LDADD = $(FLIBS) -lm # diff --git a/gnuradio-core/src/gen_interpolator_taps/README b/gnuradio-core/src/gen_interpolator_taps/README index 0bc547d3f..8fe3e2ba3 100644 --- a/gnuradio-core/src/gen_interpolator_taps/README +++ b/gnuradio-core/src/gen_interpolator_taps/README @@ -1,28 +1,28 @@ # # Copyright 2002 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# This file contains the source for gen_interpolator_taps, a program which generates optimal interpolator taps for a fractional -interpolator. +interpolator. The ideal interpolator requires an infinite tap FIR filter to realize. We design a separate 8 tap filter for each value of mu, diff --git a/gnuradio-core/src/gen_interpolator_taps/gen_interpolator_taps.c b/gnuradio-core/src/gen_interpolator_taps/gen_interpolator_taps.c index d588868b2..2f359102c 100644 --- a/gnuradio-core/src/gen_interpolator_taps/gen_interpolator_taps.c +++ b/gnuradio-core/src/gen_interpolator_taps/gen_interpolator_taps.c @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -38,7 +38,7 @@ extern double global_B; extern double prax2_ (double (fct)(double x[], int *ntaps), double initv[], int *ntaps, double result[]); -static void +static void usage (char *name) { fprintf (stderr, "usage: %s [-v] [-n <nsteps>] [-t <ntaps>] [-B <bw>]\n", name); @@ -49,7 +49,7 @@ static void printline (double x[], int ntaps, int imu, int nsteps) { int i; - + printf (" { "); for (i = 0; i < ntaps; i++){ printf ("%12.5e", x[i]); @@ -60,7 +60,7 @@ printline (double x[], int ntaps, int imu, int nsteps) } } -int +int main (int argc, char **argv) { double xx[MAX_NSTEPS+1][MAX_NTAPS]; @@ -87,11 +87,11 @@ main (int argc, char **argv) case 'B': global_B = strtod (optarg, 0); break; - + case 'v': verbose = 1; break; - + default: usage (argv[0]); break; @@ -107,7 +107,7 @@ main (int argc, char **argv) fprintf (stderr, "%s: nsteps must be < %d\n", argv[0], MAX_NSTEPS); exit (1); } - + if ((ntaps & 1) != 0){ fprintf (stderr, "%s: ntaps must be even\n", argv[0]); exit (1); @@ -122,9 +122,9 @@ main (int argc, char **argv) fprintf (stderr, "%s: bandwidth must be in the range (0, 0.5)\n", argv[0]); exit (1); } - + step_size = 1.0/nsteps; - + // the optimizer chokes on the two easy cases (0/N and N/N). We do them by hand... for (i = 0; i < ntaps; i++) @@ -172,14 +172,14 @@ main (int argc, char **argv) printf ("static const int NTAPS = %4d;\n", ntaps); printf ("static const int NSTEPS = %4d;\n", nsteps); printf ("static const double BANDWIDTH = %g;\n\n", global_B); - + printf ("static const float taps[NSTEPS+1][NTAPS] = {\n"); printf (" // -4 -3 -2 -1 0 1 2 3 mu\n"); for (i = 0; i <= nsteps; i++) printline (xx[i], ntaps, i, nsteps); - + printf ("};\n\n"); return 0; diff --git a/gnuradio-core/src/gen_interpolator_taps/objective_fct.c b/gnuradio-core/src/gen_interpolator_taps/objective_fct.c index cb15be74e..129486d63 100644 --- a/gnuradio-core/src/gen_interpolator_taps/objective_fct.c +++ b/gnuradio-core/src/gen_interpolator_taps/objective_fct.c @@ -1,19 +1,19 @@ /* -*- c -*- */ /* * Copyright 2002 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, @@ -48,7 +48,7 @@ double global_B = B; * and Fechtel, Wiley, 1998. */ -static double +static double integrand (double omega) { double real_ideal; @@ -103,7 +103,7 @@ objective (double x[], int *ndim) return c_fcn (x, *ndim); } -static double +static double si (double x) { if (fabs (x) < 1e-9) diff --git a/gnuradio-core/src/gen_interpolator_taps/praxis.txt b/gnuradio-core/src/gen_interpolator_taps/praxis.txt index 5c4b81556..9d0606566 100644 --- a/gnuradio-core/src/gen_interpolator_taps/praxis.txt +++ b/gnuradio-core/src/gen_interpolator_taps/praxis.txt @@ -18,8 +18,8 @@ and FORTRAN by Brent, and have been used fairly widely. Brent also gave a multi-dimensional minimization algorithm, PRAXIS, but only shows an implementation in ALGOL W. This routine has not been widely used, at least in the U.S. -The PRAXIS package has been translated into FORTRAN -by Rosalee Taylor, Sue Pinski, and me, and +The PRAXIS package has been translated into FORTRAN +by Rosalee Taylor, Sue Pinski, and me, and I am making it available via anonymous ftp for use as freeware (please do not remove our names). @@ -30,7 +30,7 @@ freeware (please do not remove our names). get praxis.f quit - + Brent's method and its performance Newton's method for minimization can find the minimum of a @@ -51,7 +51,7 @@ and is available as file va04a.f in the same directory as praxis.f. VA04A is not extremely robust, and can give underflow, overflow, or division by zero. va04a.f has several documented patches in it where I tried to get around various abnormal terminations. -I do not recommend VA04A very strongly. +I do not recommend VA04A very strongly. Brent's PRAXIS added orthogonalization and several other features to Powell's method. Brent also dealt carefully with roundoff. @@ -75,13 +75,13 @@ The methods of Powell, Brent, et al. require that the function for which a local minimum is sought must be smooth; that is, the function and all of its first partial derivatives must be continuous. - + Brent compared his method to the methods of Powell, of Stewart, and of Davies, Swann, and Campey. Indirectly, he compared it also to the Davidon-Fletcher-Powell quasi-Newton method. He found that his method was about as efficient as the best of these in most cases, and that it was more robust than others -in some cases. (Pages 139-155 in Brent's book give fair +in some cases. (Pages 139-155 in Brent's book give fair comparisons to other methods. The results in Table 7.1 on page 138 are correct, but do not include progress all the way to convergence, and are therefore not too useful.) @@ -89,7 +89,7 @@ to convergence, and are therefore not too useful.) On least squares problems, all of these general minimization methods are likely to be inefficient compared to least squares methods such as the Gauss-Newton or Marquardt methods. - + In addition to the scale dependence that Fletcher deplored, PRAXIS also had the disadvantage that it required N, the number of parameters, to be greater than or equal to two. @@ -134,18 +134,18 @@ except possibly Cray computers, in which REAL is reasonably precise. The value of "machine epsilon" is computed in subroutine PRASET using bisection, and is called EPSMCH. Brent computes EPSMCH**4 and 1/EPSMCH**4 in PRAXIS, -and uses these quantities later. +and uses these quantities later. Because EPSMCH in DOUBLE PRECISION is less than 1E-16, these fourth powers of EPSMCH and 1/EPSMCH will underflow and overflow on such machines as VAXs and PCs, which have a range of only about 1E38, grossly insufficient for scientific computation. For such machines, Brent recommends -increasing the value of EPSMCH. +increasing the value of EPSMCH. EPSMCH=1E-9 or possibly even 1E-8 might be necessary. A better solution would be to eliminate the explicit use of these fourth powers, accomplishing the same result implicitly. -A "bug bounty" of $10 U.S. will be paid by me for the first +A "bug bounty" of $10 U.S. will be paid by me for the first notification of any error in PRAXIS. The same bounty also applies to any substantive poor design choice (having no redeeming advantages whatever) in the FORTRAN @@ -154,7 +154,7 @@ suggested improvements in that will be considered carefully.) praxis.f includes test software to run any of the test problems that Brent ran, and is set to run at least one case of each problem. -I have run these on an IBM 3090, essentially the same +I have run these on an IBM 3090, essentially the same architecture that Brent used, and obtained essentially the same results that Brent shows on pages 140-155. The Hilbert problem with N=12, for which Brent shows no termination results and for which diff --git a/gnuradio-core/src/gen_interpolator_taps/simpson.c b/gnuradio-core/src/gen_interpolator_taps/simpson.c index fc6dd6c27..31aaae4ae 100644 --- a/gnuradio-core/src/gen_interpolator_taps/simpson.c +++ b/gnuradio-core/src/gen_interpolator_taps/simpson.c @@ -18,7 +18,7 @@ * NOR THREAD SAFE! */ -double +double trapzd (double (*func)(double), double a, double b, int n) diff --git a/gnuradio-core/src/guile/.gitignore b/gnuradio-core/src/guile/.gitignore deleted file mode 100644 index ea2593923..000000000 --- a/gnuradio-core/src/guile/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/Makefile -/Makefile.in -/run_guile_tests -/guile.log -/gr-run-waveform-script diff --git a/gnuradio-core/src/guile/Makefile.am b/gnuradio-core/src/guile/Makefile.am deleted file mode 100644 index 122f05d97..000000000 --- a/gnuradio-core/src/guile/Makefile.am +++ /dev/null @@ -1,80 +0,0 @@ -# -# Copyright 2010 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, see <http://www.gnu.org/licenses/>. -# - -include $(top_srcdir)/Makefile.common - -if GUILE - -TESTS = run_guile_tests - -EXTRA_DIST += \ - run_guile_tests.in \ - $(nobase_guile_DATA) \ - $(GUILE_TESTS) - -bin_SCRIPTS = \ - gr-run-waveform-script - -# These are the hand-coded guile files for gnuradio-core. -# -# Swig/common.scm is glue that's required for the goops wrappers. -# gnuradio/export-safely.scm works around some problems in the goops generated wrappers. -# gnuradio/core.scm glues the 5 pieces of gnuradio_core_* into a single module. -# gnuradio/runtime-shim implements "guile friendly" versions of connect & disconnect. - -nobase_guile_DATA = \ - Swig/common.scm \ - gnuradio/core.scm \ - gnuradio/export-safely.scm \ - gnuradio/run-waveform.scm \ - gnuradio/runtime-shim.scm \ - gnuradio/waveform.scm \ - gnuradio/test-suite/guile-test \ - gnuradio/test-suite/lib.scm - -GUILE_TESTS = \ - tests/00_runtime_basics.test \ - tests/00_runtime_ctors.test \ - tests/filter_ctors.test \ - tests/general_ctors.test \ - tests/gengen_ctors.test \ - tests/hier_ctors.test \ - tests/io_ctors.test - -CLEANFILES = guile.log - - -scmlibdir = $(libdir) -scmdir = $(guiledir) - -scmlib_LTLIBRARIES = libguile-gnuradio-dynl-global.la - -libguile_gnuradio_dynl_global_la_SOURCES = dynl-global.c -libguile_gnuradio_dynl_global_la_CPPFLAGS = $(GUILE_CFLAGS) -libguile_gnuradio_dynl_global_la_LIBADD = $(GUILE_LIBS) - -# Create a symlink from gr-run-waveform-script to gr-run-waveform -install-exec-local: - -$(RM) $(DESTDIR)$(bindir)/gr-run-waveform - (cd $(DESTDIR)$(bindir) && $(LN_S) gr-run-waveform-script gr-run-waveform) - -uninstall-local: - -$(RM) $(DESTDIR)$(bindir)/gr-run-waveform - -endif diff --git a/gnuradio-core/src/guile/Swig/common.scm b/gnuradio-core/src/guile/Swig/common.scm deleted file mode 100644 index a51d3a71d..000000000 --- a/gnuradio-core/src/guile/Swig/common.scm +++ /dev/null @@ -1,76 +0,0 @@ -;;;************************************************************************ -;;;*common.scm -;;;* -;;;* This file contains generic SWIG GOOPS classes for generated -;;;* GOOPS file support -;;;* -;;;* Copyright (C) 2003 John Lenz (jelenz@wisc.edu) -;;;* Copyright (C) 2004 Matthias Koeppe (mkoeppe@mail.math.uni-magdeburg.de) -;;;* -;;;* This file may be freely redistributed without license or fee provided -;;;* this copyright message remains intact. -;;;************************************************************************ - -(define-module (Swig swigrun)) - -(define-module (Swig common) - #:use-module (oop goops) - #:use-module (Swig swigrun)) - -(define-class <swig-metaclass> (<class>) - (new-function #:init-value #f)) - -(define-method (initialize (class <swig-metaclass>) initargs) - (slot-set! class 'new-function (get-keyword #:new-function initargs #f)) - (next-method)) - -(define-class <swig> () - (swig-smob #:init-value #f) - #:metaclass <swig-metaclass> -) - -(define-method (initialize (obj <swig>) initargs) - (next-method) - (slot-set! obj 'swig-smob - (let ((arg (get-keyword #:init-smob initargs #f))) - (if arg - arg - (let ((ret (apply (slot-ref (class-of obj) 'new-function) (get-keyword #:args initargs '())))) - ;; if the class is registered with runtime environment, - ;; new-Function will return a <swig> goops class. In that case, extract the smob - ;; from that goops class and set it as the current smob. - (if (slot-exists? ret 'swig-smob) - (slot-ref ret 'swig-smob) - ret)))))) - -(define (display-address o file) - (display (number->string (object-address o) 16) file)) - -(define (display-pointer-address o file) - ;; Don't fail if the function SWIG-PointerAddress is not present. - (let ((address (false-if-exception (SWIG-PointerAddress o)))) - (if address - (begin - (display " @ " file) - (display (number->string address 16) file))))) - -(define-method (write (o <swig>) file) - ;; We display _two_ addresses to show the object's identity: - ;; * first the address of the GOOPS proxy object, - ;; * second the pointer address. - ;; The reason is that proxy objects are created and discarded on the - ;; fly, so different proxy objects for the same C object will appear. - (let ((class (class-of o))) - (if (slot-bound? class 'name) - (begin - (display "#<" file) - (display (class-name class) file) - (display #\space file) - (display-address o file) - (display-pointer-address o file) - (display ">" file)) - (next-method)))) - -(export <swig-metaclass> <swig>) - -;;; common.scm ends here diff --git a/gnuradio-core/src/guile/dynl-global.c b/gnuradio-core/src/guile/dynl-global.c deleted file mode 100644 index 3bf2741b1..000000000 --- a/gnuradio-core/src/guile/dynl-global.c +++ /dev/null @@ -1,123 +0,0 @@ -/* -*- c -*- */ -/* - * Copyright 2010 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, see <http://www.gnu.org/licenses/>. - */ - -/* - * This file is an attempt to work around a problem that appears on - * certain Ubuntu (and perhaps other) systems. On those systems - * (10.04 is known to have the problem, while 10.10 and later work OK - * without this kludge), we end up with a situation where exceptions - * are not caught by the swig code, even though the swig generated - * code "looks right" and "is right". Details of the issue can be - * found in swig bug 1863647, - * http://sourceforge.net/tracker/index.php?func=detail&aid=1863647&group_id=1645&atid=101645 - * - * We work around the problem by loading swig generated guile modules - * using the equivalent of the dlopen's RTLD_GLOBAL flag. This is - * only possible on systems using libtool-2.*. Those systems contain - * the lt_dlavise_global function. - */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <ltdl.h> -#include <libguile.h> - -extern scm_t_bits scm_tc16_dynamic_obj; - -#ifdef HAVE_LT_DLADVISE_GLOBAL -/* - * Load shared module using the equivalent of the RTLD_GLOBAL flag - */ -static lt_dlhandle -dlopenext_global (const char *filename) -{ - lt_dlhandle handle = 0; - lt_dladvise advise; - - if (!lt_dladvise_init (&advise) - && !lt_dladvise_ext (&advise) - && !lt_dladvise_global(&advise)) - handle = lt_dlopenadvise (filename, advise); - - lt_dladvise_destroy (&advise); - return handle; -} - -#else - -/* - * We don't have lt_dladvise_global. Fall back to lt_dlopenext. - */ -static lt_dlhandle -dlopenext_global (const char *filename) -{ - return lt_dlopenext (filename); -} -#endif - - -static void * -sysdep_dynl_link_global (const char *fname, const char *subr) -{ - lt_dlhandle handle; - handle = dlopenext_global (fname); - if (NULL == handle) - { - SCM fn; - SCM msg; - - fn = scm_from_locale_string (fname); - msg = scm_from_locale_string (lt_dlerror ()); - scm_misc_error (subr, "file: ~S, message: ~S", scm_list_2 (fn, msg)); - } - return (void *) handle; -} - -SCM_DEFINE (scm_dynamic_link_global, "dynamic-link-global", 1, 0, 0, - (SCM filename), - "Find the shared object (shared library) denoted by\n" - "@var{filename} and link it into the running Guile\n" - "application. The returned\n" - "scheme object is a ``handle'' for the library which can\n" - "be passed to @code{dynamic-func}, @code{dynamic-call} etc.\n\n" - "Searching for object files is system dependent. Normally,\n" - "if @var{filename} does have an explicit directory it will\n" - "be searched for in locations\n" - "such as @file{/usr/lib} and @file{/usr/local/lib}.") -#define FUNC_NAME s_scm_dynamic_link_global -{ - void *handle; - char *file; - - scm_dynwind_begin (0); - file = scm_to_locale_string (filename); - scm_dynwind_free (file); - handle = sysdep_dynl_link_global (file, FUNC_NAME); - scm_dynwind_end (); - SCM_RETURN_NEWSMOB2 (scm_tc16_dynamic_obj, SCM_UNPACK (filename), handle); -} -#undef FUNC_NAME - -void -scm_init_gnuradio_dynl_global_module(void) -{ - scm_c_define_gsubr (s_scm_dynamic_link_global, 1, 0, 0, (SCM (*)()) scm_dynamic_link_global); -} diff --git a/gnuradio-core/src/guile/gnuradio/core.scm b/gnuradio-core/src/guile/gnuradio/core.scm deleted file mode 100644 index 9c69cea42..000000000 --- a/gnuradio-core/src/guile/gnuradio/core.scm +++ /dev/null @@ -1,32 +0,0 @@ -;;; Glue the separate pieces of gnuradio-core into a single module - -(define-module (gnuradio core) - #:use-module (oop goops) - #:use-module (gnuradio gnuradio_core_runtime) - #:use-module (gnuradio runtime-shim) - #:use-module (gnuradio gnuradio_core_filter) - #:use-module (gnuradio gnuradio_core_io) - #:use-module (gnuradio gnuradio_core_general) - #:use-module (gnuradio gnuradio_core_gengen) - #:use-module (gnuradio gnuradio_core_hier) - #:duplicates (merge-generics replace check)) - -(re-export-all '(gnuradio gnuradio_core_runtime)) -(re-export-all '(gnuradio runtime-shim)) -(re-export-all '(gnuradio gnuradio_core_filter)) -(re-export-all '(gnuradio gnuradio_core_io)) -(re-export-all '(gnuradio gnuradio_core_general)) -(re-export-all '(gnuradio gnuradio_core_gengen)) -(re-export-all '(gnuradio gnuradio_core_hier)) - -;; Work around problem with gr:message-source -(define-generic gr:message-source) -(define-method (gr:message-source itemsize (msgq <gr-msg-queue-sptr>)) - (gr:message-source-msgq-ctor itemsize msgq)) -(define-method (gr:message-source itemsize (limit <integer>)) - (gr:message-source-limit-ctor itemsize limit)) -(export gr:message-source) - -;;; Return #t if x is not #f -(define-public (true? x) - (and x #t)) diff --git a/gnuradio-core/src/guile/gnuradio/export-safely.scm b/gnuradio-core/src/guile/gnuradio/export-safely.scm deleted file mode 100644 index 664292d2b..000000000 --- a/gnuradio-core/src/guile/gnuradio/export-safely.scm +++ /dev/null @@ -1,90 +0,0 @@ -;;; -;;; Copyright 2010 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, see <http://www.gnu.org/licenses/>. -;;; - -;;; This module implements a macro, export-safely, that avoids -;;; exporting symbols that are actually generic-functions imported -;;; (explicity or implicitly) from elsewhere. -;;; -;;; This hackery is required so that the swig generated goops wrappers -;;; don't stomp on each other. For background on what this is about -;;; see this thread: -;;; -;;; http://lists.gnu.org/archive/html/guile-user/2006-05/msg00007.html -;;; -;;; Don't expect to understand what's going on here without looking at -;;; the guts of the module system (implemented in ice-9/boot-9.scm) and -;;; having a pretty good understanding of goops and generic-functions. - - -(define-module (gnuradio export-safely) - #:use-module (oop goops) - #:use-module (srfi srfi-1) - #:export-syntax (export-safely)) - -(define-public (generics-in-module module) - (let ((lst '())) - (module-for-each (lambda (sym var) - (if (variable-bound? var) - (let ((v (variable-ref var))) - (cond ((is-a? v <generic>) - (set! lst (cons v lst))))))) - module) - lst)) - -(define-public (generic-function-names-in-module module) - (map generic-function-name (generics-in-module module))) - -(define-public (generic-function-names-in-imported-modules module) - (concatenate (map generic-function-names-in-module (module-uses module)))) - -(define-public (export-syms-if-not-imported-gf list-of-syms) - (let ((gf-names (generic-function-names-in-imported-modules (current-module)))) - (let ((to-export (filter (lambda (sym) - (not (memq sym gf-names))) - (delete-duplicates list-of-syms)))) - (module-export! (current-module) to-export)))) - -(defmacro export-safely names - `(export-syms-if-not-imported-gf ',names)) - - -(define-public (names-in-module module) - (let ((lst '())) - (module-for-each (lambda (sym var) - (if (variable-bound? var) - (set! lst (cons sym lst)))) - module) - lst)) - -(define-public (names-in-imported-modules module) - (delete-duplicates (concatenate (map names-in-module (module-uses module))))) - -(define-public (re-export-all src-module-name) - (let ((current (current-module)) - (src-module (resolve-interface src-module-name))) - - (define (ok-to-re-export? name) - (let ((var (module-variable current name))) - (cond ((not var) #f) ; Undefined var - ((eq? var (module-local-variable current name)) #f) ; local var - (else #t)))) ; OK - - (module-re-export! current - (filter ok-to-re-export? - (names-in-module src-module))))) diff --git a/gnuradio-core/src/guile/gnuradio/run-waveform.scm b/gnuradio-core/src/guile/gnuradio/run-waveform.scm deleted file mode 100644 index 01930521c..000000000 --- a/gnuradio-core/src/guile/gnuradio/run-waveform.scm +++ /dev/null @@ -1,55 +0,0 @@ -;;; -;;; Copyright 2010 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, see <http://www.gnu.org/licenses/>. -;;; - -;;; Load and run a waveform defined with define-waveform - - -;; I don't seem to be able to make this work... -;; I think it's some kind of interaction with the syntax-case -;; macro, define-waveform, and the module system. -;; -;;(define-module (gnuradio run-waveform) -;; #:use-module (oop goops) -;; #:use-module (gnuradio core) -;; #:use-module (gnuradio waveform) -;; #:duplicates (merge-generics replace check)) - -(use-modules (oop goops) - (gnuradio core) - (gnuradio waveform)) - - -(define (load-into-module filename module) - (let ((f (open-file filename "r"))) - (let loop ((form (read f))) - (cond ((eof-object? form) #t) - (else (eval form module) - (loop (read f))))))) - - -(define-public (run-waveform waveform-filename . args) - (debug-enable 'backtrace 'debug) - (load waveform-filename) - ;;(load-into-module waveform-filename (current-module)) - (let ((f (waveform-last-registered))) - (if (not f) - (error "No define-waveform found in file \n" filename)) - (gr:run (f args)) - ;; Attempt to get block destructors called now. - (gc))) diff --git a/gnuradio-core/src/guile/gnuradio/runtime-shim.scm b/gnuradio-core/src/guile/gnuradio/runtime-shim.scm deleted file mode 100644 index bba702670..000000000 --- a/gnuradio-core/src/guile/gnuradio/runtime-shim.scm +++ /dev/null @@ -1,129 +0,0 @@ -;;; -;;; Copyright 2010 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, see <http://www.gnu.org/licenses/>. -;;; - -(define-module (gnuradio runtime-shim) - #:use-module (oop goops) - #:use-module (ice-9 threads) - #:use-module (gnuradio gnuradio_core_runtime) - #:duplicates (merge-generics replace check)) - -(define-class <gr-endpoint> (<object>) - (block #:accessor block #:init-keyword #:block) - (port #:init-value 0 #:accessor port #:init-keyword #:port)) - -(define (gr:ep block port) - (make <gr-endpoint> - #:block (coerce-to-basic-block block) #:port port)) - -(define (coerce-to-endpoint ep) - (cond ((is-a? ep <gr-endpoint>) ep) - ((false-if-exception (gr:to-basic-block ep)) - => (lambda (x) (gr:ep x 0))) - ((and (pair? ep) (= 2 (length ep)) - (false-if-exception (gr:to-basic-block (car ep)))) - => (lambda (x) (gr:ep x (cadr ep)))) - (else (error "Cannot coerce to an endpoint: " ep)))) - -(define (coerce-to-basic-block block) - (cond ((is-a? block <gr-basic-block-sptr>) block) - ((false-if-exception (gr:to-basic-block block)) => (lambda (x) x)) - (else (error "Cannot coerce to a gr_basic_block: " block)))) - -(define (coerce-to-top-block block) - (cond ((is-a? block <gr-top-block-sptr>) block) - ((false-if-exception (gr:to-top-block block)) => (lambda (x) x)) - (else (error "Cannot coerce to a gr_top_block: " block)))) - -(define (coerce-to-hier-block2 block) - (cond ((is-a? block <gr-hier-block2-sptr>) block) - ((false-if-exception (gr:to-hier-block2 block)) => (lambda (x) x)) - (else (error "Cannot coerce to a gr_hier_block2: " block)))) - - -;;; Connect one or more block endpoints. An endpoint is either a <gr-endpoint>, -;;; a 2-list (block port), or a block instance. In the latter case, the port number -;;; is assumed to be zero. -;;; -;;; If multiple arguments are provided, connect will attempt to wire them in series, -;;; interpreting the endpoints as inputs or outputs as appropriate. -(define-method (gr:connect hb . points) - (dis/connect "connect" gr:primitive-connect hb points)) - -;;; Disconnect one or more block endpoints... -(define-method (gr:disconnect hb . points) - (dis/connect "disconnect" gr:primitive-disconnect hb points)) - -(define (dis/connect name gf hb points) - (let ((hb (coerce-to-hier-block2 hb)) - (points (list->vector (map coerce-to-endpoint points)))) - - (define (op2 p0 p1) - (gf hb (block p0) (port p0) (block p1) (port p1))) - - (let ((len (vector-length points))) - (case len - ((0) (error (string-append name " requires at least 1 endpoint; None provided."))) - ((1) (gf hb (vector-ref points 0))) - (else - (let loop ((n 1)) - (cond ((< n len) - (op2 (vector-ref points (1- n)) (vector-ref points n)) - (loop (1+ n)))))))))) - - - - -(define-method (gr:run (self <gr-top-block-sptr>)) - (gr:start self) - (gr:wait self)) - - -(define-method (gr:wait (tb <gr-top-block-sptr>)) - - (define (sigint-handler sig) - ;;(display "\nSIGINT!\n" (current-error-port)) - ;; tell flow graph to stop - (gr:stop tb)) - - (let ((old-handler #f)) - (dynamic-wind - - ;; Called at entry - (lambda () - ;; Install SIGINT handler - (set! old-handler (sigaction SIGINT sigint-handler))) - - ;; Protected thunk - (lambda () - (let ((waiter (begin-thread (gr:top-block-wait-unlocked tb)))) - (join-thread waiter) - ;;(display "\nAfter join-thread\n" (current-error-port)) - )) - - ;; Called at exit - (lambda () - ;; Restore SIGINT handler - (if (not (car old-handler)) - ;; restore original C handler - (sigaction SIGINT #f) - ;; restore Scheme handler, SIG_IGN or SIG_DFL - (sigaction SIGINT (car old-handler) (cdr old-handler))))))) - - -(export-safely <gr-endpoint> gr:ep gr:connect gr:disconnect gr:run gr:wait) diff --git a/gnuradio-core/src/guile/gnuradio/test-suite/guile-test b/gnuradio-core/src/guile/gnuradio/test-suite/guile-test deleted file mode 100644 index 6dc1a9658..000000000 --- a/gnuradio-core/src/guile/gnuradio/test-suite/guile-test +++ /dev/null @@ -1,241 +0,0 @@ -#!/usr/bin/guile \ --e main -s -!# - -;;;; guile-test --- run the Guile test suite -;;;; Jim Blandy <jimb@red-bean.com> --- May 1999 -;;;; -;;;; Copyright (C) 1999, 2001, 2006 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 2, 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 software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA - - -;;;; Usage: [guile -e main -s] guile-test [OPTIONS] [TEST ...] -;;;; -;;;; Run tests from the Guile test suite. Report failures and -;;;; unexpected passes to the standard output, along with a summary of -;;;; all the results. Record each reported test outcome in the log -;;;; file, `guile.log'. The exit status is #f if any of the tests -;;;; fail or pass unexpectedly. -;;;; -;;;; Normally, guile-test scans the test directory, and executes all -;;;; files whose names end in `.test'. (It assumes they contain -;;;; Scheme code.) However, you can have it execute specific tests by -;;;; listing their filenames on the command line. -;;;; -;;;; The option `--test-suite' can be given to specify the test -;;;; directory. If no such option is given, the test directory is -;;;; taken from the environment variable TEST_SUITE_DIR (if defined), -;;;; otherwise a default directory that is hardcoded in this file is -;;;; used (see "Installation" below). -;;;; -;;;; If present, the `--log-file LOG' option tells `guile-test' to put -;;;; the log output in a file named LOG. -;;;; -;;;; If present, the `--debug' option will enable a debugging mode. -;;;; -;;;; If present, the `--flag-unresolved' option will cause guile-test -;;;; to exit with failure status if any tests are UNRESOLVED. -;;;; -;;;; -;;;; Installation: -;;;; -;;;; If you change the #! line at the top of this script to point at -;;;; the Guile interpreter you want to test, you can call this script -;;;; as an executable instead of having to pass it as a parameter to -;;;; guile via "guile -e main -s guile-test". Further, you can edit -;;;; the definition of default-test-suite to point to the parent -;;;; directory of the `tests' tree, which makes it unnecessary to set -;;;; the environment variable `TEST_SUITE_DIR'. -;;;; -;;;; -;;;; Shortcomings: -;;;; -;;;; At the moment, due to a simple-minded implementation, test files -;;;; must live in the test directory, and you must specify their names -;;;; relative to the top of the test directory. If you want to send -;;;; me a patch that fixes this, but still leaves sane test names in -;;;; the log file, that would be great. At the moment, all the tests -;;;; I care about are in the test directory, though. -;;;; -;;;; It would be nice if you could specify the Guile interpreter you -;;;; want to test on the command line. As it stands, if you want to -;;;; change which Guile interpreter you're testing, you need to edit -;;;; the #! line at the top of this file, which is stupid. - -(define (main . args) - (let ((module (resolve-module '(gnuradio test-suite guile-test)))) - (apply (module-ref module 'main) args))) - -(define-module (gnuradio test-suite guile-test) - :use-module (gnuradio test-suite lib) - :use-module (ice-9 getopt-long) - :use-module (ice-9 and-let-star) - :use-module (ice-9 rdelim) - :export (main data-file-name test-file-name)) - - -;;; User configurable settings: -(define default-test-suite - (string-append (getenv "HOME") "/bogus-path/test-suite")) - - -;;; Variables that will receive their actual values later. -(define test-suite default-test-suite) - -(define tmp-dir #f) - - -;;; General utilities, that probably should be in a library somewhere. - -;;; Enable debugging -(define (enable-debug-mode) - (write-line %load-path) - (set! %load-verbosely #t) - (debug-enable 'backtrace 'debug)) - -;;; Traverse the directory tree at ROOT, applying F to the name of -;;; each file in the tree, including ROOT itself. For a subdirectory -;;; SUB, if (F SUB) is true, we recurse into SUB. Do not follow -;;; symlinks. -(define (for-each-file f root) - - ;; A "hard directory" is a path that denotes a directory and is not a - ;; symlink. - (define (file-is-hard-directory? filename) - (eq? (stat:type (lstat filename)) 'directory)) - - (let visit ((root root)) - (let ((should-recur (f root))) - (if (and should-recur (file-is-hard-directory? root)) - (let ((dir (opendir root))) - (let loop () - (let ((entry (readdir dir))) - (cond - ((eof-object? entry) #f) - ((or (string=? entry ".") - (string=? entry "..") - (string=? entry "CVS") - (string=? entry "RCS")) - (loop)) - (else - (visit (string-append root "/" entry)) - (loop)))))))))) - - -;;; The test driver. - - -;;; Localizing test files and temporary data files. - -(define (data-file-name filename) - (in-vicinity tmp-dir filename)) - -(define (test-file-name test) - (in-vicinity test-suite test)) - -;;; Return a list of all the test files in the test tree. -(define (enumerate-tests test-dir) - (let ((root-len (+ 1 (string-length test-dir))) - (tests '())) - (for-each-file (lambda (file) - (if (has-suffix? file ".test") - (let ((short-name - (substring file root-len))) - (set! tests (cons short-name tests)))) - #t) - test-dir) - - ;; for-each-file presents the files in whatever order it finds - ;; them in the directory. We sort them here, so they'll always - ;; appear in the same order. This makes it easier to compare test - ;; log files mechanically. - (sort tests string<?))) - -(define (main args) - (let ((options (getopt-long args - `((test-suite - (single-char #\t) - (value #t)) - (flag-unresolved - (single-char #\u)) - (log-file - (single-char #\l) - (value #t)) - (debug - (single-char #\d)))))) - (define (opt tag default) - (let ((pair (assq tag options))) - (if pair (cdr pair) default))) - - (if (opt 'debug #f) - (enable-debug-mode)) - - (set! test-suite - (or (opt 'test-suite #f) - (getenv "TEST_SUITE_DIR") - default-test-suite)) - - ;; directory where temporary files are created. - ;; when run from "make check", this must be under the build-dir, - ;; not the src-dir. - (set! tmp-dir (getcwd)) - - (let* ((tests - (let ((foo (opt '() '()))) - (if (null? foo) - (enumerate-tests test-suite) - foo))) - (log-file - (opt 'log-file "guile.log"))) - - ;; Open the log file. - (let ((log-port (open-output-file log-file))) - - ;; Register some reporters. - (let ((global-pass #t) - (counter (make-count-reporter))) - (register-reporter (car counter)) - (register-reporter (make-log-reporter log-port)) - (register-reporter user-reporter) - (register-reporter (lambda results - (case (car results) - ((unresolved) - (and (opt 'flag-unresolved #f) - (set! global-pass #f))) - ((fail upass error) - (set! global-pass #f))))) - - ;; Run the tests. - (for-each (lambda (test) - (display (string-append "Running " test "\n")) - (with-test-prefix test - (load (test-file-name test)))) - tests) - - ;; Display the final counts, both to the user and in the log - ;; file. - (let ((counts ((cadr counter)))) - (print-counts counts) - (print-counts counts log-port)) - - (close-port log-port) - (quit global-pass)))))) - - -;;; Local Variables: -;;; mode: scheme -;;; End: diff --git a/gnuradio-core/src/guile/gnuradio/test-suite/lib.scm b/gnuradio-core/src/guile/gnuradio/test-suite/lib.scm deleted file mode 100644 index abdc89632..000000000 --- a/gnuradio-core/src/guile/gnuradio/test-suite/lib.scm +++ /dev/null @@ -1,627 +0,0 @@ -;;;; test-suite/lib.scm --- generic support for testing -;;;; Copyright (C) 1999, 2000, 2001, 2004, 2006, 2007 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 2, 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 software; see the file COPYING. If not, write to -;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;;; Boston, MA 02110-1301 USA - -(define-module (gnuradio test-suite lib) - :use-module (ice-9 stack-catch) - :use-module (ice-9 regex) - :use-module (ice-9 syncase) - :use-module (ice-9 format) - :export ( - - ;; Exceptions which are commonly being tested for. - exception:bad-variable - exception:missing-expression - exception:out-of-range exception:unbound-var - exception:used-before-defined - exception:wrong-num-args exception:wrong-type-arg - exception:numerical-overflow - exception:struct-set!-denied - exception:system-error - exception:miscellaneous-error - exception:string-contains-nul - - ;; Reporting passes and failures. - run-test - pass-if expect-fail - pass-if-exception expect-fail-exception - pass-if-throw expect-fail-throw - - ;; Naming groups of tests in a regular fashion. - with-test-prefix with-test-prefix* current-test-prefix - format-test-name - - ;; Using the debugging evaluator. - with-debugging-evaluator with-debugging-evaluator* - - ;; Reporting results in various ways. - register-reporter unregister-reporter reporter-registered? - make-count-reporter print-counts - make-log-reporter - full-reporter - user-reporter - - ;; srfi-64 compatibility macros - test-equal - test-eqv - test-eq -)) - - -;;;; If you're using Emacs's Scheme mode: -;;;; (put 'with-test-prefix 'scheme-indent-function 1) - - -;;;; CORE FUNCTIONS -;;;; -;;;; The function (run-test name expected-result thunk) is the heart of the -;;;; testing environment. The first parameter NAME is a unique name for the -;;;; test to be executed (for an explanation of this parameter see below under -;;;; TEST NAMES). The second parameter EXPECTED-RESULT is a boolean value -;;;; that indicates whether the corresponding test is expected to pass. If -;;;; EXPECTED-RESULT is #t the test is expected to pass, if EXPECTED-RESULT is -;;;; #f the test is expected to fail. Finally, THUNK is the function that -;;;; actually performs the test. For example: -;;;; -;;;; (run-test "integer addition" #t (lambda () (= 2 (+ 1 1)))) -;;;; -;;;; To report success, THUNK should either return #t or throw 'pass. To -;;;; report failure, THUNK should either return #f or throw 'fail. If THUNK -;;;; returns a non boolean value or throws 'unresolved, this indicates that -;;;; the test did not perform as expected. For example the property that was -;;;; to be tested could not be tested because something else went wrong. -;;;; THUNK may also throw 'untested to indicate that the test was deliberately -;;;; not performed, for example because the test case is not complete yet. -;;;; Finally, if THUNK throws 'unsupported, this indicates that this test -;;;; requires some feature that is not available in the configured testing -;;;; environment. All other exceptions thrown by THUNK are considered as -;;;; errors. -;;;; -;;;; -;;;; Convenience macros for tests expected to pass or fail -;;;; -;;;; * (pass-if name body) is a short form for -;;;; (run-test name #t (lambda () body)) -;;;; * (expect-fail name body) is a short form for -;;;; (run-test name #f (lambda () body)) -;;;; -;;;; For example: -;;;; -;;;; (pass-if "integer addition" (= 2 (+ 1 1))) -;;;; -;;;; -;;;; Convenience macros to test for exceptions -;;;; -;;;; The following macros take exception parameters which are pairs -;;;; (type . message), where type is a symbol that denotes an exception type -;;;; like 'wrong-type-arg or 'out-of-range, and message is a string holding a -;;;; regular expression that describes the error message for the exception -;;;; like "Argument .* out of range". -;;;; -;;;; * (pass-if-exception name exception body) will pass if the execution of -;;;; body causes the given exception to be thrown. If no exception is -;;;; thrown, the test fails. If some other exception is thrown, is is an -;;;; error. -;;;; * (expect-fail-exception name exception body) will pass unexpectedly if -;;;; the execution of body causes the given exception to be thrown. If no -;;;; exception is thrown, the test fails expectedly. If some other -;;;; exception is thrown, it is an error. - - -;;;; TEST NAMES -;;;; -;;;; Every test in the test suite has a unique name, to help -;;;; developers find tests that are failing (or unexpectedly passing), -;;;; and to help gather statistics. -;;;; -;;;; A test name is a list of printable objects. For example: -;;;; ("ports.scm" "file" "read and write back list of strings") -;;;; ("ports.scm" "pipe" "read") -;;;; -;;;; Test names may contain arbitrary objects, but they always have -;;;; the following properties: -;;;; - Test names can be compared with EQUAL?. -;;;; - Test names can be reliably stored and retrieved with the standard WRITE -;;;; and READ procedures; doing so preserves their identity. -;;;; -;;;; For example: -;;;; -;;;; (pass-if "simple addition" (= 4 (+ 2 2))) -;;;; -;;;; In that case, the test name is the list ("simple addition"). -;;;; -;;;; In the case of simple tests the expression that is tested would often -;;;; suffice as a test name by itself. Therefore, the convenience macros -;;;; pass-if and expect-fail provide a shorthand notation that allows to omit -;;;; a test name in such cases. -;;;; -;;;; * (pass-if expression) is a short form for -;;;; (run-test 'expression #t (lambda () expression)) -;;;; * (expect-fail expression) is a short form for -;;;; (run-test 'expression #f (lambda () expression)) -;;;; -;;;; For example: -;;;; -;;;; (pass-if (= 2 (+ 1 1))) -;;;; -;;;; The WITH-TEST-PREFIX syntax and WITH-TEST-PREFIX* procedure establish -;;;; a prefix for the names of all tests whose results are reported -;;;; within their dynamic scope. For example: -;;;; -;;;; (begin -;;;; (with-test-prefix "basic arithmetic" -;;;; (pass-if "addition" (= (+ 2 2) 4)) -;;;; (pass-if "subtraction" (= (- 4 2) 2))) -;;;; (pass-if "multiplication" (= (* 2 2) 4))) -;;;; -;;;; In that example, the three test names are: -;;;; ("basic arithmetic" "addition"), -;;;; ("basic arithmetic" "subtraction"), and -;;;; ("multiplication"). -;;;; -;;;; WITH-TEST-PREFIX can be nested. Each WITH-TEST-PREFIX postpends -;;;; a new element to the current prefix: -;;;; -;;;; (with-test-prefix "arithmetic" -;;;; (with-test-prefix "addition" -;;;; (pass-if "integer" (= (+ 2 2) 4)) -;;;; (pass-if "complex" (= (+ 2+3i 4+5i) 6+8i))) -;;;; (with-test-prefix "subtraction" -;;;; (pass-if "integer" (= (- 2 2) 0)) -;;;; (pass-if "complex" (= (- 2+3i 1+2i) 1+1i)))) -;;;; -;;;; The four test names here are: -;;;; ("arithmetic" "addition" "integer") -;;;; ("arithmetic" "addition" "complex") -;;;; ("arithmetic" "subtraction" "integer") -;;;; ("arithmetic" "subtraction" "complex") -;;;; -;;;; To print a name for a human reader, we DISPLAY its elements, -;;;; separated by ": ". So, the last set of test names would be -;;;; reported as: -;;;; -;;;; arithmetic: addition: integer -;;;; arithmetic: addition: complex -;;;; arithmetic: subtraction: integer -;;;; arithmetic: subtraction: complex -;;;; -;;;; The Guile benchmarks use with-test-prefix to include the name of -;;;; the source file containing the test in the test name, to help -;;;; developers to find failing tests, and to provide each file with its -;;;; own namespace. - - -;;;; REPORTERS -;;;; -;;;; A reporter is a function which we apply to each test outcome. -;;;; Reporters can log results, print interesting results to the -;;;; standard output, collect statistics, etc. -;;;; -;;;; A reporter function takes two mandatory arguments, RESULT and TEST, and -;;;; possibly additional arguments depending on RESULT; its return value -;;;; is ignored. RESULT has one of the following forms: -;;;; -;;;; pass - The test named TEST passed. -;;;; Additional arguments are ignored. -;;;; upass - The test named TEST passed unexpectedly. -;;;; Additional arguments are ignored. -;;;; fail - The test named TEST failed. -;;;; Additional arguments are ignored. -;;;; xfail - The test named TEST failed, as expected. -;;;; Additional arguments are ignored. -;;;; unresolved - The test named TEST did not perform as expected, for -;;;; example the property that was to be tested could not be -;;;; tested because something else went wrong. -;;;; Additional arguments are ignored. -;;;; untested - The test named TEST was not actually performed, for -;;;; example because the test case is not complete yet. -;;;; Additional arguments are ignored. -;;;; unsupported - The test named TEST requires some feature that is not -;;;; available in the configured testing environment. -;;;; Additional arguments are ignored. -;;;; error - An error occurred while the test named TEST was -;;;; performed. Since this result means that the system caught -;;;; an exception it could not handle, the exception arguments -;;;; are passed as additional arguments. -;;;; -;;;; This library provides some standard reporters for logging results -;;;; to a file, reporting interesting results to the user, and -;;;; collecting totals. -;;;; -;;;; You can use the REGISTER-REPORTER function and friends to add -;;;; whatever reporting functions you like. If you don't register any -;;;; reporters, the library uses FULL-REPORTER, which simply writes -;;;; all results to the standard output. - - -;;;; MISCELLANEOUS -;;;; - -;;; Define some exceptions which are commonly being tested for. -(define exception:bad-variable - (cons 'syntax-error "Bad variable")) -(define exception:missing-expression - (cons 'misc-error "^missing or extra expression")) -(define exception:out-of-range - (cons 'out-of-range "^.*out of range")) -(define exception:unbound-var - (cons 'unbound-variable "^Unbound variable")) -(define exception:used-before-defined - (cons 'unbound-variable "^Variable used before given a value")) -(define exception:wrong-num-args - (cons 'wrong-number-of-args "^Wrong number of arguments")) -(define exception:wrong-type-arg - (cons 'wrong-type-arg "^Wrong type")) -(define exception:numerical-overflow - (cons 'numerical-overflow "^Numerical overflow")) -(define exception:struct-set!-denied - (cons 'misc-error "^set! denied for field")) -(define exception:system-error - (cons 'system-error ".*")) -(define exception:miscellaneous-error - (cons 'misc-error "^.*")) - -;; as per throw in scm_to_locale_stringn() -(define exception:string-contains-nul - (cons 'misc-error "^string contains #\\\\nul character")) - - -;;; Display all parameters to the default output port, followed by a newline. -(define (display-line . objs) - (for-each display objs) - (newline)) - -;;; Display all parameters to the given output port, followed by a newline. -(define (display-line-port port . objs) - (for-each (lambda (obj) (display obj port)) objs) - (newline port)) - - -;;;; CORE FUNCTIONS -;;;; - -;;; The central testing routine. -;;; The idea is taken from Greg, the GNUstep regression test environment. -(define run-test #f) -(let ((test-running #f)) - (define (local-run-test name expect-pass thunk) - (if test-running - (error "Nested calls to run-test are not permitted.") - (let ((test-name (full-name name))) - (set! test-running #t) - (catch #t - (lambda () - (let ((result (thunk))) - (if (eq? result #t) (throw 'pass)) - (if (eq? result #f) (throw 'fail)) - (throw 'unresolved))) - (lambda (key . args) - (case key - ((pass) - (report (if expect-pass 'pass 'upass) test-name)) - ((fail) - (report (if expect-pass 'fail 'xfail) test-name)) - ((unresolved untested unsupported) - (report key test-name)) - ((quit) - (report 'unresolved test-name) - (quit)) - (else - (report 'error test-name (cons key args)))))) - (set! test-running #f)))) - (set! run-test local-run-test)) - -;;; A short form for tests that are expected to pass, taken from Greg. -(defmacro pass-if (name . rest) - (if (and (null? rest) (pair? name)) - ;; presume this is a simple test, i.e. (pass-if (even? 2)) - ;; where the body should also be the name. - `(run-test ',name #t (lambda () ,name)) - `(run-test ,name #t (lambda () ,@rest)))) - -;;; A short form for tests that are expected to fail, taken from Greg. -(defmacro expect-fail (name . rest) - (if (and (null? rest) (pair? name)) - ;; presume this is a simple test, i.e. (expect-fail (even? 2)) - ;; where the body should also be the name. - `(run-test ',name #f (lambda () ,name)) - `(run-test ,name #f (lambda () ,@rest)))) - -;;; A helper function to implement the macros that test for exceptions. -;;; -;;; This doesn't work for all exceptions, just those that were -;;; raised by scm-error or error. This doesn't include those -;;; raised by throw in the general case, or SWIG in particular. -;;; -;;; See also run-raise-exception, pass-if-throw and expect-fail-throw -;;; for alternatives that work with all exceptions. -(define (run-test-exception name exception expect-pass thunk) - (run-test name expect-pass - (lambda () - (stack-catch (car exception) - (lambda () (thunk) #f) - (lambda (key proc message . rest) - (cond - ;; handle explicit key - ((string-match (cdr exception) message) - #t) - ;; handle `(error ...)' which uses `misc-error' for key and doesn't - ;; yet format the message and args (we have to do it here). - ((and (eq? 'misc-error (car exception)) - (list? rest) - (string-match (cdr exception) - (apply simple-format #f message (car rest)))) - #t) - ;; handle syntax errors which use `syntax-error' for key and don't - ;; yet format the message and args (we have to do it here). - ((and (eq? 'syntax-error (car exception)) - (list? rest) - (string-match (cdr exception) - (apply simple-format #f message (car rest)))) - #t) - ;; unhandled; throw again - (else - (apply throw key proc message rest)))))))) - -;;; A short form for tests that expect a certain exception to be thrown. -(defmacro pass-if-exception (name exception body . rest) - `(,run-test-exception ,name ,exception #t (lambda () ,body ,@rest))) - -;;; A short form for tests expected to fail to throw a certain exception. -(defmacro expect-fail-exception (name exception body . rest) - `(,run-test-exception ,name ,exception #f (lambda () ,body ,@rest))) - - -;;; Helper for macros below -(define (run-test-throw name exception-key expect-pass thunk) - (run-test name expect-pass - (lambda () - (stack-catch exception-key - (lambda () (thunk) #f) - (lambda (key . rest) #t))))) - -;;; A short form for tests that expect a certain exception to be thrown, -;;; where the exception is specified only by the exception-key symbol. -(defmacro pass-if-throw (name exception-key body . rest) - `(,run-test-throw ,name ,exception-key #t (lambda () ,body ,@rest))) - -;;; A short form for tests that expect a certain exception to be thrown, -;;; where the exception is specified only by the exception-key symbol. -(defmacro expect-fail-throw (name exception-key body . rest) - `(,run-test-throw ,name ,exception-key #f (lambda () ,body ,@rest))) - -;;;; TEST NAMES -;;;; - -;;;; Turn a test name into a nice human-readable string. -(define (format-test-name name) - (call-with-output-string - (lambda (port) - (let loop ((name name) - (separator "")) - (if (pair? name) - (begin - (display separator port) - (display (car name) port) - (loop (cdr name) ": "))))))) - -;;;; For a given test-name, deliver the full name including all prefixes. -(define (full-name name) - (append (current-test-prefix) (list name))) - -;;; A fluid containing the current test prefix, as a list. -(define prefix-fluid (make-fluid)) -(fluid-set! prefix-fluid '()) -(define (current-test-prefix) - (fluid-ref prefix-fluid)) - -;;; Postpend PREFIX to the current name prefix while evaluting THUNK. -;;; The name prefix is only changed within the dynamic scope of the -;;; call to with-test-prefix*. Return the value returned by THUNK. -(define (with-test-prefix* prefix thunk) - (with-fluids ((prefix-fluid - (append (fluid-ref prefix-fluid) (list prefix)))) - (thunk))) - -;;; (with-test-prefix PREFIX BODY ...) -;;; Postpend PREFIX to the current name prefix while evaluating BODY ... -;;; The name prefix is only changed within the dynamic scope of the -;;; with-test-prefix expression. Return the value returned by the last -;;; BODY expression. -(defmacro with-test-prefix (prefix . body) - `(with-test-prefix* ,prefix (lambda () ,@body))) - -;;; Call THUNK using the debugging evaluator. -(define (with-debugging-evaluator* thunk) - (let ((dopts #f)) - (dynamic-wind - (lambda () - (set! dopts (debug-options)) - (debug-enable 'debug)) - thunk - (lambda () - (debug-options dopts))))) - -;;; Evaluate BODY... using the debugging evaluator. -(define-macro (with-debugging-evaluator . body) - `(with-debugging-evaluator* (lambda () ,@body))) - - - -;;;; REPORTERS -;;;; - -;;; The global list of reporters. -(define reporters '()) - -;;; The default reporter, to be used only if no others exist. -(define default-reporter #f) - -;;; Add the procedure REPORTER to the current set of reporter functions. -;;; Signal an error if that reporter procedure object is already registered. -(define (register-reporter reporter) - (if (memq reporter reporters) - (error "register-reporter: reporter already registered: " reporter)) - (set! reporters (cons reporter reporters))) - -;;; Remove the procedure REPORTER from the current set of reporter -;;; functions. Signal an error if REPORTER is not currently registered. -(define (unregister-reporter reporter) - (if (memq reporter reporters) - (set! reporters (delq! reporter reporters)) - (error "unregister-reporter: reporter not registered: " reporter))) - -;;; Return true iff REPORTER is in the current set of reporter functions. -(define (reporter-registered? reporter) - (if (memq reporter reporters) #t #f)) - -;;; Send RESULT to all currently registered reporter functions. -(define (report . args) - (if (pair? reporters) - (for-each (lambda (reporter) (apply reporter args)) - reporters) - (apply default-reporter args))) - - -;;;; Some useful standard reporters: -;;;; Count reporters count the occurrence of each test result type. -;;;; Log reporters write all test results to a given log file. -;;;; Full reporters write all test results to the standard output. -;;;; User reporters write interesting test results to the standard output. - -;;; The complete list of possible test results. -(define result-tags - '((pass "PASS" "passes: ") - (fail "FAIL" "failures: ") - (upass "UPASS" "unexpected passes: ") - (xfail "XFAIL" "expected failures: ") - (unresolved "UNRESOLVED" "unresolved test cases: ") - (untested "UNTESTED" "untested test cases: ") - (unsupported "UNSUPPORTED" "unsupported test cases: ") - (error "ERROR" "errors: "))) - -;;; The list of important test results. -(define important-result-tags - '(fail upass unresolved error)) - -;;; Display a single test result in formatted form to the given port -(define (print-result port result name . args) - (let* ((tag (assq result result-tags)) - (label (if tag (cadr tag) #f))) - (if label - (begin - (display label port) - (display ": " port) - (display (format-test-name name) port) - (if (pair? args) - (begin - (display " - arguments: " port) - (write args port))) - (newline port)) - (error "(test-suite lib) FULL-REPORTER: unrecognized result: " - result)))) - -;;; Return a list of the form (COUNTER RESULTS), where: -;;; - COUNTER is a reporter procedure, and -;;; - RESULTS is a procedure taking no arguments which returns the -;;; results seen so far by COUNTER. The return value is an alist -;;; mapping outcome symbols (`pass', `fail', etc.) onto counts. -(define (make-count-reporter) - (let ((counts (map (lambda (tag) (cons (car tag) 0)) result-tags))) - (list - (lambda (result name . args) - (let ((pair (assq result counts))) - (if pair - (set-cdr! pair (+ 1 (cdr pair))) - (error "count-reporter: unexpected test result: " - (cons result (cons name args)))))) - (lambda () - (append counts '()))))) - -;;; Print a count reporter's results nicely. Pass this function the value -;;; returned by a count reporter's RESULTS procedure. -(define (print-counts results . port?) - (let ((port (if (pair? port?) - (car port?) - (current-output-port)))) - (newline port) - (display-line-port port "Totals for this test run:") - (for-each - (lambda (tag) - (let ((result (assq (car tag) results))) - (if result - (display-line-port port (caddr tag) (cdr result)) - (display-line-port port - "Test suite bug: " - "no total available for `" (car tag) "'")))) - result-tags) - (newline port))) - -;;; Return a reporter procedure which prints all results to the file -;;; FILE, in human-readable form. FILE may be a filename, or a port. -(define (make-log-reporter file) - (let ((port (if (output-port? file) file - (open-output-file file)))) - (lambda args - (apply print-result port args) - (force-output port)))) - -;;; A reporter that reports all results to the user. -(define (full-reporter . args) - (apply print-result (current-output-port) args)) - -;;; A reporter procedure which shows interesting results (failures, -;;; unexpected passes etc.) to the user. -(define (user-reporter result name . args) - (if (memq result important-result-tags) - (apply full-reporter result name args))) - -(set! default-reporter full-reporter) - - -;;; Macros for a bit of compatibility with srfi-64 -;;; (test-equal [name] expected test-expr) -(define-syntax test-equal - (syntax-rules () - ((_ expected test-expr) - (pass-if (verbose-equal? expected test-expr))) - ((_ name expected test-exprt) - (pass-if name (verbose-equal? expected test-expr))))) - -;;; (test-eqv [name] expected test-expr) -(define-syntax test-eqv - (syntax-rules () - ((_ expected test-expr) - (pass-if (eqv? expected test-expr))) - ((_ name expected test-exprt) - (pass-if name (eqv? expected test-expr))))) - -;;; (test-eq [name] expected test-expr) -(define-syntax test-eq - (syntax-rules () - ((_ expected test-expr) - (pass-if (eq? expected test-expr))) - ((_ name expected test-exprt) - (pass-if name (eq? expected test-expr))))) - - -(define-public (verbose-equal? expected actual) - (cond ((equal? expected actual) #t) - (else - (format #t "Expected:\n~y\n" expected) - (format #t "Actual:\n~y\n" actual) - #f))) diff --git a/gnuradio-core/src/guile/gnuradio/waveform.scm b/gnuradio-core/src/guile/gnuradio/waveform.scm deleted file mode 100644 index 0031be931..000000000 --- a/gnuradio-core/src/guile/gnuradio/waveform.scm +++ /dev/null @@ -1,54 +0,0 @@ -;;; -;;; Copyright 2010 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, see <http://www.gnu.org/licenses/>. -;;; - -(define-module (gnuradio waveform) - #:use-module (ice-9 syncase) - #:export-syntax (define-waveform)) - - -(define *registry* '()) ; alist -(define *last-registered* #f) - - -(define-syntax define-waveform - (syntax-rules (vars blocks connections) - ((_ (name cmd-line-args) - (vars (v-name v-val) ...) - (blocks (b-name b-val) ...) - (connections (endpoint1 endpoint2 ...) ...)) - (waveform-register 'name - (lambda (cmd-line-args) - (let* ((v-name v-val) ... - (b-name b-val) ... - (tb (gr:top-block-swig "waveform-top-block"))) - (gr:connect tb endpoint1 endpoint2 ...) ... - tb)))))) - - -(define-public (waveform-register name thunk) - (set! *registry* (assoc-set! *registry* name thunk)) - (set! *last-registered* thunk) - #t) - -(define-public (waveform-lookup name) - (let ((r (assoc name *registry*))) - (and r (cdr r)))) - -(define-public (waveform-last-registered) - *last-registered*) diff --git a/gnuradio-core/src/guile/gr-run-waveform-script.in b/gnuradio-core/src/guile/gr-run-waveform-script.in deleted file mode 100644 index 651b387e9..000000000 --- a/gnuradio-core/src/guile/gr-run-waveform-script.in +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -# usage: prepend <path-varname> <dir> -prepend() { - if [ $# -ne 2 ] - then - echo "$0: prepend needs 2 args" 1>&2 - exit 1 - fi - local path="$1" dir="$2" contents="" - eval "contents=\$$path" - if [ "$dir" != "" ] - then - if [ "$contents" = "" ] - then - eval "$path=\"$dir\"" - else - eval "$path=\"$dir:$contents\"" - fi - fi - #echo end-of-prepend: $path=${!path} -} - -prefix="@prefix@" -exec_prefix="@exec_prefix@" - -prepend GUILE_LOAD_PATH "${prefix}/share/guile/site" -prepend LTDL_LIBRARY_PATH "@libdir@" -prepend DYLD_LIBRARY_PATH "@libdir@" - -export GUILE_LOAD_PATH LTDL_LIBRARY_PATH DYLD_LIBRARY_PATH - -export GUILE_WARN_DEPRECATED="no" - -exec @GUILE@ -e main -s $0 "$@" -!# - -;;; Load and run a waveform defined with define-waveform -;;; -;;; usage: gr-run-waveform filename.wfd [args...] - -(load-from-path "gnuradio/run-waveform") - -(define (main args) - (if (not (>= (length args) 2)) - (let ((port (current-error-port))) - (display "usage: " port) - (display (car args) port) - (display " filename.wfd [args...]\n" port) - (exit 1))) - (apply run-waveform (cdr args))) diff --git a/gnuradio-core/src/guile/run_guile_tests.in b/gnuradio-core/src/guile/run_guile_tests.in deleted file mode 100644 index 61968065e..000000000 --- a/gnuradio-core/src/guile/run_guile_tests.in +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -. @top_builddir@/setup_guile_test_env - -# Since we're in gnuradio-core, we don't need to add anything, -# but we do need to call add_local_paths to set everything up - -# 1st argument is absolute path to hand coded guile source directory -# 2nd argument is absolute path to component C++ shared library build directory -# 3nd argument is absolute path to component SWIG build directory - -add_local_paths \ - "" \ - "" \ - "" - -@GUILE@ -e main -c '(use-modules (gnuradio test-suite guile-test))' -t @srcdir@/tests diff --git a/gnuradio-core/src/guile/tests/00_runtime_basics.test b/gnuradio-core/src/guile/tests/00_runtime_basics.test deleted file mode 100644 index 4a5d967a1..000000000 --- a/gnuradio-core/src/guile/tests/00_runtime_basics.test +++ /dev/null @@ -1,159 +0,0 @@ -;;; -*- Scheme -*- -;;; -;;; Copyright 2010 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, see <http://www.gnu.org/licenses/>. -;;; - -;;; If you're using Emacs's Scheme mode: -;;; (put 'with-test-prefix 'scheme-indent-function 1) - -;;; See the comments in gnuradio/test-suite/lib.scm for info on writing tests. -;;; See also the very end of the file, where the test-equal, test-eqv -;;; and test-eq macros are defined. - -(use-modules (gnuradio test-suite lib)) -(use-modules (gnuradio core)) -(use-modules (oop goops)) - -(define (vector-map f v) - (list->vector (map f (vector->list v)))) - -(pass-if "Guile was built with threads" (not (not (memq 'threads *features*)))) - -(with-test-prefix "connect-1" - (let* ((src-data #(-5 -4 -3 -2 -1 0 1 2 3 4 5)) - (expected-result (vector-map (lambda (x) (* x 2)) src-data)) - (tb (gr:top-block-swig "QA top block")) - (src (gr:vector-source-i src-data #f)) - (op (gr:multiply-const-ii 2)) - (dst (gr:vector-sink-i))) - - ;; using gr:ep to create endpoints - (gr:connect tb (gr:ep src 0) (gr:ep op 0)) - (gr:connect tb (gr:ep op 0) (gr:ep dst 0)) - - (gr:run tb) - ;;(pass-if (equal? expected-result (gr:data dst))) - (test-equal expected-result (gr:data dst)) - )) - -(with-test-prefix "connect-2" - (let* ((src-data #(-5 -4 -3 -2 -1 0 1 2 3 4 5)) - (expected-result (vector-map (lambda (x) (* x 2)) src-data)) - (tb (gr:top-block-swig "QA top block")) - (src (gr:vector-source-i src-data #f)) - (op (gr:multiply-const-ii 2)) - (dst (gr:vector-sink-i))) - - ;; using just blocks - (gr:connect tb src op) - (gr:connect tb op dst) - - (gr:run tb) - (test-equal expected-result (gr:data dst)))) - - -(with-test-prefix "connect-3" - (let* ((src-data #(-5 -4 -3 -2 -1 0 1 2 3 4 5)) - (expected-result (vector-map (lambda (x) (* x 2)) src-data)) - (tb (gr:top-block-swig "QA top block")) - (src (gr:vector-source-i src-data #f)) - (op (gr:multiply-const-ii 2)) - (dst (gr:vector-sink-i))) - - ;; using lists to represent endpoints - (gr:connect tb `(,src 0) `(,op 0)) - (gr:connect tb `(,op 0) `(,dst 0)) - - (gr:run tb) - (test-equal expected-result (gr:data dst)))) - - -(with-test-prefix "connect-4" - (let* ((src-data #(-5 -4 -3 -2 -1 0 1 2 3 4 5)) - (expected-result (vector-map (lambda (x) (* x 2)) src-data)) - (tb (gr:top-block-swig "QA top block")) - (src (gr:vector-source-i src-data #f)) - (op (gr:multiply-const-ii 2)) - (dst (gr:vector-sink-i))) - - ;; using multiple endpoints - (gr:connect tb src op dst) - - (gr:run tb) - (test-equal expected-result (gr:data dst)))) - -(with-test-prefix "connect-5" - (let* ((src-data #(-5 -4 -3 -2 -1 0 1 2 3 4 5)) - (expected-result (vector-map (lambda (x) (* x 2)) src-data)) - (tb (gr:top-block-swig "QA top block")) - (src (gr:vector-source-i src-data #f)) - (op (gr:multiply-const-ii 2)) - (dst (gr:vector-sink-i))) - - (pass-if-throw "bad port exception" 'swig-exception - (gr:connect tb src op (gr:ep dst 1))) - )) - -(with-test-prefix "gr_top_block::start throw" - (let* ((src-data #(-5 -4 -3 -2 -1 0 1 2 3 4 5)) - (expected-result (vector-map (lambda (x) (* x 2)) src-data)) - (tb (gr:top-block-swig "QA top block")) - (src (gr:vector-source-i src-data #f)) - (op (gr:multiply-const-ii 2)) - (dst (gr:vector-sink-i))) - - ;; We deliberately don't connect op's output - (gr:connect tb src op) - - ;; Which will lead to an exception here... - (pass-if-throw "throws std::runtime_error" 'swig-exception - (gr:run tb)) - )) - -(with-test-prefix "io-signature-1" - (let ((ios1 (gr:io-signature 1 2 8)) - (ios2 (gr:io-signature2 1 2 16 32)) - (ios3 (gr:io-signature3 1 -1 14 32 48)) - (iosv (gr:io-signaturev 1 4 '(1 2 3)))) - - (test-equal 1 (gr:min-streams ios1)) - (test-equal 2 (gr:max-streams ios1)) - (test-equal 8 (gr:sizeof-stream-item ios1 0)) - (test-equal 8 (gr:sizeof-stream-item ios1 1)) - - (test-equal 1 (gr:min-streams ios2)) - (test-equal 2 (gr:max-streams ios2)) - (test-equal 16 (gr:sizeof-stream-item ios2 0)) - (test-equal 32 (gr:sizeof-stream-item ios2 1)) - - (test-equal 1 (gr:min-streams ios3)) - (test-equal -1 (gr:max-streams ios3)) - (test-equal 14 (gr:sizeof-stream-item ios3 0)) - (test-equal 32 (gr:sizeof-stream-item ios3 1)) - (test-equal 48 (gr:sizeof-stream-item ios3 2)) - (test-equal '#(14 32 48) (gr:sizeof-stream-items ios3)) - - (test-equal 1 (gr:min-streams iosv)) - (test-equal 4 (gr:max-streams iosv)) - (test-equal 1 (gr:sizeof-stream-item iosv 0)) - (test-equal 2 (gr:sizeof-stream-item iosv 1)) - (test-equal 3 (gr:sizeof-stream-item iosv 2)) - (test-equal 3 (gr:sizeof-stream-item iosv 3)) - (test-equal '#(1 2 3) (gr:sizeof-stream-items iosv)) - )) - diff --git a/gnuradio-core/src/guile/tests/00_runtime_ctors.test b/gnuradio-core/src/guile/tests/00_runtime_ctors.test deleted file mode 100644 index 966d8c909..000000000 --- a/gnuradio-core/src/guile/tests/00_runtime_ctors.test +++ /dev/null @@ -1,54 +0,0 @@ -;;; -*- Scheme -*- -;;; -;;; Copyright 2010 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, see <http://www.gnu.org/licenses/>. -;;; - -;;; If you're using Emacs's Scheme mode: -;;; (put 'with-test-prefix 'scheme-indent-function 1) - -;;; See the comments in gnuradio/test-suite/lib.scm for info on writing tests. -;;; See also the very end of the file where the test-equal, test-eqv -;;; and test-eq macros are defined. - -(use-modules (gnuradio test-suite lib)) -(use-modules (gnuradio core)) -(use-modules (oop goops)) - -;;; Add test code for all constructors in these files -;;; -;;; ./runtime/gr_hier_block2.h - -;;; ./runtime/gr_msg_queue.h - -(define (equal-message? a b) - (equal? (gr:to-string a) (gr:to-string b))) - -(with-test-prefix "gr:message/gr:msg-queue" - (let ((msg1 (gr:message-from-string "Hello")) - (msg2 (gr:message-from-string "World!")) - (q (gr:msg-queue))) - (pass-if (equal? "Hello" (gr:to-string msg1))) - (pass-if (equal? "World!" (gr:to-string msg2))) - (pass-if (gr:empty-p q)) - (gr:insert-tail q msg1) - (pass-if (not (gr:empty-p q))) - (gr:insert-tail q msg2) - (let ((r1 (gr:delete-head q)) - (r2 (gr:delete-head q))) - (pass-if (equal-message? r1 msg1)) - (pass-if (equal-message? r2 msg2))))) diff --git a/gnuradio-core/src/guile/tests/filter_ctors.test b/gnuradio-core/src/guile/tests/filter_ctors.test deleted file mode 100644 index fe1d9421d..000000000 --- a/gnuradio-core/src/guile/tests/filter_ctors.test +++ /dev/null @@ -1,245 +0,0 @@ -;;; -*- Scheme -*- -;;; -;;; Copyright 2010 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, see <http://www.gnu.org/licenses/>. -;;; - -;;; If you're using Emacs's Scheme mode: -;;; (put 'with-test-prefix 'scheme-indent-function 1) - -;;; See the comments in gnuradio/test-suite/lib.scm for info on writing tests. -;;; See also the very end of the file, where the test-equal, test-eqv -;;; and test-eq macros are defined. - -(use-modules (gnuradio test-suite lib)) -(use-modules (gnuradio core)) -(use-modules (oop goops)) - -;;; Add test code for all constructors in these files -;;; - -;;; ./filter/gr_adaptive_fir_ccf.h WONTFIX: not wrapped -;; gr_adaptive_fir_ccf(char *name, int decimation, const std::vector<float> &taps); -;; (pass-if (true? (gr:adaptive-fir-ccf "foo" 0 #(1.0 2.0 3.0 4.0)))) - -;;; ./filter/gr_fft_filter_ccc.h -(pass-if (true? (gr:fft-filter-ccc 0 #(1+3i 23+5i)))) - -;;; ./filter/gr_fft_filter_fff.h -(pass-if (true? (gr:fft-filter-fff 0 #(1.0 2.0)))) - -;;; ./filter/gr_filter_delay_fc.h -(pass-if (true? (gr:filter-delay-fc #(1.0 2.0)))) - -;;; ./filter/gr_fir_ccc_generic. FIXME: Unbound variable: ~S" (gr:fir-ccc-generic) #f)) -;; (pass-if (true? (gr:fir-ccc-generic))) -;; (pass-if (true? (gr:fir-ccc-generic #(1+3i 23+5i)))) - -;;; ./filter/gr_fir_ccc_simd.h FIXME: not found -;; (pass-if (true? (gr:fir-ccc-simd))) -;; (pass-if (true? (gr:fir-ccc-simd #(1+3i 23+5i)))) - -;;; ./filter/gr_fir_ccc_x86.h FIXME: not found -;; (pass-if (true? (gr:fir-ccc-x86))) -;; (pass-if (true? (gr:fir-ccc-x86 #(1+3i 23+5i)))) - -;;; ./filter/gr_fir_ccf_generic.h FIXME: not found -;; (pass-if (true? (gr:fir-ccf-generic))) -;; (pass-if (true? (gr:fir-ccf-generic #(1+3i 23+5i)))) - -;;; ./filter/gr_fir_ccf_simd.h FIXME: not found -;; (pass-if (true? (gr:fir-ccf-simd 0 0 0 0))) - -;;; ./filter/gr_fir_ccf_x86.h FIXME: not found -;; (pass-if (true? (gr:fir-ccf-x86))) -;; (pass-if (true? (gr:fir-ccf-x86 #(1.0 2.0)))) - -;;; ./filter/gr_fir_fcc_generic.h FIXME: not found -;; (pass-if (true? (gr:fir-fcc-generic))) -;; (pass-if (true? (gr:fir-fcc-generic #(1+3i 23+5i)))) - -;;; ./filter/gr_fir_fcc_simd.h FIXME: not found -;; (pass-if (true? (gr:fir-fcc-simd 0 0 0 0))) - -;;; ./filter/gr_fir_fcc_x86.h FIXME: not found -;; (pass-if (true? (gr:fir-fcc-x86))) -;; (pass-if (true? (gr:fir-fcc-x86 #(1+3i 23+5i)))) - -;;; ./filter/gr_fir_fff_altivec.h FIXME: not found -;; (pass-if (true? (gr:fir-fff-altivec))) -;; (pass-if (true? (gr:fir-fff-altivec #(1.0 2.0)))) - -;;; ./filter/gr_fir_fff_armv7_a.h FIXME: not found -;; (pass-if (true? (gr:fir-fff-armv7-a))) -;; (pass-if (true? (gr:fir-fff-armv7-a #(1.0 2.0)))) - -;;; ./filter/gr_fir_fff_generic.h FIXME: not found -;; (pass-if (true? (gr:fir-fff-generic))) -;; (pass-if (true? (gr:fir-fff-generic #(1.0 2.0)))) - -;;; ./filter/gr_fir_fff_simd.h FIXME: not found -;; (pass-if (true? (gr:fir-fff-simd 0 0 0))) - -;;; ./filter/gr_fir_fff_x86.h FIXME: not found -;; (pass-if (true? (gr:fir-fff-x86))) -;; (pass-if (true? (gr:fir-fff-x86 #(1.0 2.0)))) - -;;; ./filter/gr_fir_filter_ccc.h FIXME: not found -;; (pass-if (true? (gr:fir-filter-ccc 1 #(1+3i 23+5i)))) - -;;; ./filter/gr_fir_filter_ccf.h -(pass-if (true? (gr:fir-filter-ccf 1 #(1.0 2.0)))) - -;;; ./filter/gr_fir_filter_fcc.h -(pass-if (true? (gr:fir-filter-fcc 1 #(1+3i 23+5i)))) - -;;; ./filter/gr_fir_filter_fff.h -(pass-if (true? (gr:fir-filter-fff 1 #(1.0 2.0)))) - -;;; ./filter/gr_fir_filter_fsf.h -(pass-if (true? (gr:fir-filter-fsf 1 #(1.0 2.0)))) - -;;; ./filter/gr_fir_filter_scc.h -(pass-if (true? (gr:fir-filter-scc 1 #(1+3i 23+5i)))) - -;;; ./filter/gr_fir_fsf_generic.h FIXME: "Unbound variable: ~S" (gr:fir-fsf-generic) #f)) -;; (pass-if (true? (gr:fir-fsf-generic))) -;; (pass-if (true? (gr:fir-fsf-generic #(1.0 2.0)))) - -;;; ./filter/gr_fir_fsf_simd.h FIXME: not found -;; (pass-if (true? (gr:fir-fsf-simd 0 0 0))) - -;;; ./filter/gr_fir_fsf_x86.h FIXME: "Unbound variable: ~S" (gr:fir-fsf-x86) #f)) -;; (pass-if (true? (gr:fir-fsf-x86))) -;; (pass-if (true? (gr:fir-fsf-x86 #(1.0 2.0)))) - -;;; ./filter/gr_fir_scc_generic.h FIXME: file not found -;; (pass-if (true? (gr:fir-scc-generic))) -;; (pass-if (true? (gr:fir-scc-generic #(1+3i 23+5i)))) - -;;; ./filter/gr_fir_scc_simd.h FIXME: Unbound variable: ~S" (gr:fir-scc-simd) #f)) -;; (pass-if (true? (gr:fir-scc-simd))) -;; (pass-if (true? (gr:fir-scc-simd #(1+3i 23+5i)))) - -;;; ./filter/gr_fir_scc_x86.h FIXME: "Unbound variable: ~S" (gr:fir-scc-x86) #f)) -;; (pass-if (true? (gr:fir-scc-x86))) -;; (pass-if (true? (gr:fir-scc-x86 #(1+3i 23+5i)))) - -;;; ./filter/gr_fir_sysconfig_armv7_a.h FIXME: virtual methods -;; (pass-if (true? (gr:fir-sysconfig-armv7-a ))) - -;;; ./filter/gr_fir_sysconfig_generic.h FIXME: virtual methods -;; (pass-if (true? (gr:fir-sysconfig-generic ))) - -;;; ./filter/gr_fir_sysconfig_powerpc.h FIXME: virtual methods -;; (pass-if (true? (gr:fir-sysconfig-powerpc ))) - -;;; ./filter/gr_fir_sysconfig_x86.h FIXME: virtual methods -;; (pass-if (true? (gr:fir-sysconfig-x86 #(1+3i 23+5i)))) - -;;; ./filter/gr_fractional_interpolator_cc.h -(pass-if (true? (gr:fractional-interpolator-cc 1.0 1.0))) - -;;; ./filter/gr_fractional_interpolator_ff.h -(pass-if (true? (gr:fractional-interpolator-ff 1.0 1.0))) - -;;; ./filter/gr_freq_xlating_fir_filter_ccc.h -(pass-if (true? (gr:freq-xlating-fir-filter-ccc 1 #(1+3i 23+5i) 1.0 1.0))) - -;;; ./filter/gr_freq_xlating_fir_filter_ccf.h -(pass-if (true? (gr:freq-xlating-fir-filter-ccf 1 #(1.0 2.0) 1.0 1.0))) - -;;; ./filter/gr_freq_xlating_fir_filter_fcc.h -(pass-if (true? (gr:freq-xlating-fir-filter-fcc 1 #(1.0 2.0) 1.0 1.0))) - -;;; ./filter/gr_freq_xlating_fir_filter_fcf.h -(pass-if (true? (gr:freq-xlating-fir-filter-fcf 1 #(1.0 2.0) 1.0 1.0))) - -;;; ./filter/gr_freq_xlating_fir_filter_scc.h -(pass-if (true? (gr:freq-xlating-fir-filter-scc 1 #(1.0 2.0) 1.0 1.0))) - -;;; ./filter/gr_freq_xlating_fir_filter_scf.h -(pass-if (true? (gr:freq-xlating-fir-filter-scf 1 #(1.0 2.0) 1.0 1.0))) - -;;; ./filter/gr_goertzel_fc.h -(pass-if (true? (gr:goertzel-fc 1 1 1))) - -;;; ./filter/gr_hilbert_fc.h -(pass-if (true? (gr:hilbert-fc 1))) - -;;; ./filter/gr_iir_filter_ffd.h -(pass-if (true? (gr:iir-filter-ffd #(1.0 2.0) #(1.0 2.0)))) - -;;; ./filter/gr_interp_fir_filter_ccc.h FIXME: not found -;; (pass-if (true? (gr:interp-fir-filter-ccc #(1+3i 23+5i)))) - -;;; ./filter/gr_interp_fir_filter_ccf.h FIXME: not found -;; (pass-if (true? (gr:interp-fir-filter-ccf ))) - -;;; ./filter/gr_interp_fir_filter_fcc.h FIXME: not found -;; (pass-if (true? (gr:interp-fir-filter-fcc ))) - -;;; ./filter/gr_interp_fir_filter_fff.h FIXME: not found -;; (pass-if (true? (gr:interp-fir-filter-fff ))) - -;;; ./filter/gr_interp_fir_filter_fsf.h FIXME: not found -;; (pass-if (true? (gr:interp-fir-filter-fsf ))) - -;;; ./filter/gr_interp_fir_filter_scc.h FIXME: not found -;; (pass-if (true? (gr:interp-fir-filter-scc ))) - -;;; ./filter/gr_pfb_arb_resampler_ccf.h -(pass-if (true? (gr:pfb-arb-resampler-ccf 1.0 #(1.0 2.0) 32))) - -;;; ./filter/gr_pfb_channelizer_ccf.h -(pass-if (true? (gr:pfb-channelizer-ccf 1 #(1.0 2.0) 1))) - -;;; ./filter/gr_pfb_clock_sync_ccf.h -(pass-if (true? (gr:pfb-clock-sync-ccf 1.0 1.0 #(1.0 2.0) 32 0 1.5))) - -;;; ./filter/gr_pfb_clock_sync_fff.h -(pass-if (true? (gr:pfb-clock-sync-fff 1.0 1.0 #(1.0 2.0) 32 0 1.5))) - -;;; ./filter/gr_pfb_decimator_ccf.h -(pass-if (true? (gr:pfb-decimator-ccf 1 #(1.0 2.0) 0))) - -;;; ./filter/gr_pfb_interpolator_ccf.h -(pass-if (true? (gr:pfb-interpolator-ccf 1 #(1.0 2.0)))) - -;;; ./filter/gr_rational_resampler_base_ccc.h FIXME: not found -;; (pass-if (true? (gr:rational-resampler-base-ccc 1 1 #(1+3i 23+5i)))) - -;;; ./filter/gr_rational_resampler_base_ccf.h FIXME: not found -;; (pass-if (true? (gr:rational-resampler-base-ccf ))) - -;;; ./filter/gr_rational_resampler_base_fcc.h FIXME: not found -;; (pass-if (true? (gr:rational-resampler-base-fcc ))) - -;;; ./filter/gr_rational_resampler_base_fff.h FIXME: not found -;; (pass-if (true? (gr:rational-resampler-base-fff ))) - -;;; ./filter/gr_rational_resampler_base_fsf.h FIXME: not found -;; (pass-if (true? (gr:rational-resampler-base-fsf ))) - -;;; ./filter/gr_rational_resampler_base_scc.h FIXME: not found -;; (pass-if (true? (gr:rational-resampler-base-scc ))) - -;;; ./filter/gr_single_pole_iir_filter_cc.h -(pass-if (true? (gr:single-pole-iir-filter-cc 1.0 1))) - -;;; ./filter/gr_single_pole_iir_filter_ff.h -(pass-if (true? (gr:single-pole-iir-filter-ff 1.0 1))) diff --git a/gnuradio-core/src/guile/tests/general_ctors.test b/gnuradio-core/src/guile/tests/general_ctors.test deleted file mode 100644 index ca4d60460..000000000 --- a/gnuradio-core/src/guile/tests/general_ctors.test +++ /dev/null @@ -1,348 +0,0 @@ -;;; -*- Scheme -*- -;;; -;;; Copyright 2010 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, see <http://www.gnu.org/licenses/>. -;;; - -;;; If you're using Emacs's Scheme mode: -;;; (put 'with-test-prefix 'scheme-indent-function 1) - -;;; See the comments in gnuradio/test-suite/lib.scm for info on writing tests. -;;; See also the very end of the file, where the test-equal, test-eqv -;;; and test-eq macros are defined. - -(use-modules (gnuradio test-suite lib)) -(use-modules (gnuradio core)) -(use-modules (oop goops)) -(use-modules (ice-9 format)) - - -;;; Test complex<float> scalars -(pass-if (equal? 5.0+5.0i (gr:complex-scalar-test0))) -(pass-if (equal? 1.5+0.5i (gr:complex-scalar-test1 1+1i))) - -;;; Test complex<float> vectors -(pass-if (verbose-equal? #(0+0i 1+1i 2+2i 3+3i 4+4i) - (gr:complex-vec-test0))) - -(pass-if (verbose-equal? #(1.5+0.5i 2.5+1.5i 3.5+2.5i) - (gr:complex-vec-test1 #(1+1i 2+2i 3+3i)))) - - -;;; Add test code for all constructors in these files - -;;; ./general/gr_additive_scrambler_bb.h -(pass-if (true? (gr:additive-scrambler-bb 0 0 0 0))) - -;; Here's one that will throw if its arg is 0 -(pass-if (true? (gr:unpack-k-bits-bb 10))) -(pass-if-throw "confirm throw gr:unpack-k-bits-bb" #t (true? (gr:unpack-k-bits-bb 0))) - -;;; ./general/gr_agc2_cc.h -(pass-if (true? (gr:agc2-cc 1e-1 1e-2 1.0 1.0 0.0))) - -;;; ./general/gr_agc2_ff.h -(pass-if (true? (gr:agc2-ff 0 0 0 0 0))) - -;;; ./general/gr_agc_cc.h -(pass-if (true? (gr:agc-cc 0 0 0 0))) - -;;; ./general/gr_agc_ff.h -(pass-if (true? (gr:agc-ff 0 0 0 0))) - -;;; ./general/gr_align_on_samplenumbers_ss.h -(pass-if (true? (gr:align-on-samplenumbers-ss 2 128))) -(pass-if-throw "confirm throw gr:align-on-samplenumbers-ss" #t (true? (gr:align-on-samplenumbers-ss 0 0))) - -;;; ./general/gr_bin_statistics_f.h WONTFIX: requires gr_feval_dd & swig directors -;;;(pass-if (true? (gr:bin-statistics-f 1 (gr:msg-queue) 0 0 0))) - -;;; ./general/gr_bytes_to_syms.h -(pass-if (true? (gr:bytes-to-syms))) - -;;; ./general/gr_char_to_float.h -(pass-if (true? (gr:char-to-float))) - -;;; ./general/gr_check_counting_s.h -(pass-if (true? (gr:check-counting-s #f))) - -;;; ./general/gr_check_lfsr_32k_s.h -(pass-if (true? (gr:check-lfsr-32k-s))) - -;;; ./general/gr_complex_to_interleaved_short.h -(pass-if (true? (gr:complex-to-interleaved-short))) - -;;; ./general/gr_complex_to_xxx.h -(pass-if (true? (gr:complex-to-float 1))) -(pass-if (true? (gr:complex-to-real 1))) -(pass-if (true? (gr:complex-to-imag 1))) -(pass-if (true? (gr:complex-to-mag 1))) -(pass-if (true? (gr:complex-to-mag-squared 1))) -(pass-if (true? (gr:complex-to-arg 1))) - -;;; ./general/gr_conjugate_cc.h -(pass-if (true? (gr:conjugate-cc))) - -;;; ./general/gr_copy.h -(pass-if (true? (gr:copy 1))) - -;;; ./general/gr_cpfsk_bc.h -(pass-if (true? (gr:cpfsk-bc 1 1 1))) - -;;; ./general/gr_ctcss_squelch_ff.h -(pass-if (true? (gr:ctcss-squelch-ff 0 0 0 0 0 #t))) - -;;; ./general/gr_decode_ccsds_27_fb.h -(pass-if (true? (gr:decode-ccsds-27-fb))) - -;;; ./general/gr_deinterleave.h -(pass-if (true? (gr:deinterleave 1))) - -;;; ./general/gr_delay.h -(pass-if (true? (gr:delay 1 1))) - -;;; ./general/gr_descrambler_bb.h -(pass-if (true? (gr:descrambler-bb 0 0 0))) - -;;; ./general/gr_diff_decoder_bb.h -(pass-if (true? (gr:diff-decoder-bb 0))) - -;;; ./general/gr_diff_encoder_bb.h -(pass-if (true? (gr:diff-encoder-bb 0))) - -;;; ./general/gr_diff_phasor_cc.h -(pass-if (true? (gr:diff-phasor-cc))) - -;;; ./general/gr_dpll_bb.h -(pass-if (true? (gr:dpll-bb 0 0))) - -;;; ./general/gr_encode_ccsds_27_bb.h -(pass-if (true? (gr:encode-ccsds-27-bb))) - -;;; ./general/gr_fake_channel_coder_pp.h -(pass-if (true? (gr:fake-channel-encoder-pp 1 1))) -(pass-if-throw "confirm throw" #t (true? (gr:fake-channel-encoder-pp -1 1))) - -;;; ./general/gr_feedforward_agc_cc.h -(pass-if (true? (gr:feedforward-agc-cc 1 1))) - -;;; ./general/gr_fft_vcc.h -(pass-if (true? (gr:fft-vcc 1 #f #(1.0 2.0) #t))) - -;;; ./general/gr_fft_vfc.h -(pass-if (true? (gr:fft-vfc 4 #t #(1.0 2.0 3.0 4.0)))) -(pass-if-throw "confirm throw gr:fft-vfc" #t (true? (gr:fft-vfc 4 #f #(1.0 2.0 3.0 4.0)))) - -;; ;;; ./general/gr_float_to_char.h -(pass-if (true? (gr:float-to-char))) - -;; ;;; ./general/gr_float_to_complex.h -(pass-if (true? (gr:float-to-complex 1))) - -;;; ./general/gr_float_to_short.h -(pass-if (true? (gr:float-to-short))) - -;;; ./general/gr_float_to_uchar.h -(pass-if (true? (gr:float-to-uchar))) - -;;; ./general/gr_fmdet_cf.h -(pass-if (true? (gr:fmdet-cf 0 0 0 0))) - -;;; ./general/gr_framer_sink_1.h -(pass-if (true? (gr:framer-sink-1 (gr:msg-queue)))) - -;;; ./general/gr_frequency_modulator_fc.h -(pass-if (true? (gr:frequency-modulator-fc 0))) - -;;; ./general/gr_glfsr_source_b.h -(pass-if (true? (gr:glfsr-source-b 1 #t 0 1))) -(pass-if-throw "confirm throw" #t (true? (gr:glfsr_source_b 33 #t 0 0))) - -;;; ./general/gr_glfsr_source_f.h -(pass-if (true? (gr:glfsr-source-f 1 #t 1 1))) -(pass-if-throw "confirm throw" #t (true? (gr:glfsr_source_f 33 #t 0 0))) - -;;; ./general/gr_head.h -(pass-if (true? (gr:head 1 1))) - -;;; ./general/gr_interleave.h -(pass-if (true? (gr:interleave 1))) - -;;; ./general/gr_interleaved_short_to_complex.h -(pass-if (true? (gr:interleaved-short-to-complex))) - -;;; ./general/gr_keep_one_in_n.h -(pass-if (true? (gr:keep-one-in-n 1 1))) - -;;; ./general/gr_kludge_copy.h -(pass-if (true? (gr:kludge-copy 1))) - -;;; ./general/gr_lfsr_32k_source_s.h -(pass-if (true? (gr:lfsr-32k-source-s))) - -;;; ./general/gr_map_bb.h -(pass-if (true? (gr:map-bb #(1 2)))) - -;;; ./general/gr_nlog10_ff.h -(pass-if (true? (gr:nlog10-ff 1 1 1))) - -;;; ./general/gr_nop.h -(pass-if (true? (gr:nop 1))) - -;;; ./general/gr_null_sink.h -(pass-if (true? (gr:null-sink 1))) - -;;; ./general/gr_null_source.h -(pass-if (true? (gr:null-source 1))) - -;;; ./general/gr_pa_2x2_phase_combiner.h -(pass-if (true? (gr:pa-2x2-phase-combiner))) - -;;; ./general/gr_packet_sink.h -(pass-if (true? (gr:packet-sink #(1 2) (gr:msg-queue) -1))) - -;;; ./general/gr_peak_detector2_fb.h -(pass-if (true? (gr:peak-detector2-fb 0 0 0))) - -;;; ./general/gr_phase_modulator_fc.h -(pass-if (true? (gr:phase-modulator-fc 0))) - -;;; ./general/gr_pll_carriertracking_cc.h -(pass-if (true? (gr:pll-carriertracking-cc 0 0 0))) - -;;; ./general/gr_pll_freqdet_cf.h -(pass-if (true? (gr:pll-freqdet-cf 0 0 0))) - -;;; ./general/gr_pll_refout_cc.h -(pass-if (true? (gr:pll-refout-cc 0 0 0))) - -;;; ./general/gr_pn_correlator_cc.h -(pass-if (true? (gr:pn-correlator-cc 1 1 1))) - -;;; ./general/gr_probe_avg_mag_sqrd_c.h -(pass-if (true? (gr:probe-avg-mag-sqrd-c 0 0))) - -;;; ./general/gr_probe_avg_mag_sqrd_cf.h -(pass-if (true? (gr:probe-avg-mag-sqrd-cf 0 0))) - -;;; ./general/gr_probe_avg_mag_sqrd_f.h -(pass-if (true? (gr:probe-avg-mag-sqrd-f 0 0))) - -;;; ./general/gr_probe_density_b.h -(pass-if (true? (gr:probe-density-b 0))) - -;;; ./general/gr_probe_mpsk_snr_c.h -(pass-if (true? (gr:probe-mpsk-snr-c 0))) - -;;; ./general/gr_probe_signal_f.h -(pass-if (true? (gr:probe-signal-f))) - -;;; ./general/gr_pwr_squelch_cc.h -(pass-if (true? (gr:pwr-squelch-cc 0 0 0 #f))) - -;;; ./general/gr_pwr_squelch_ff.h -(pass-if (true? (gr:pwr-squelch-ff 0.0 0.0 0 #f))) - -;;; ./general/gr_quadrature_demod_cf.h -(pass-if (true? (gr:quadrature-demod-cf 0))) - -;;; ./general/gr_rail_ff.h -(pass-if (true? (gr:rail-ff 0 0))) - -;;; ./general/gr_regenerate_bb.h -(pass-if (true? (gr:regenerate-bb 0 0))) - -;;; ./general/gr_repeat.h -(pass-if (true? (gr:repeat 1 1))) - -;;; ./general/gr_rms_cf.h -(pass-if (true? (gr:rms-cf 0))) - -;;; ./general/gr_rms_ff.h -(pass-if (true? (gr:rms-ff 0))) - -;;; ./general/gr_scrambler_bb.h -(pass-if (true? (gr:scrambler-bb 0 0 0))) - -;;; ./general/gr_short_to_float.h -(pass-if (true? (gr:short-to-float))) - -;;; ./general/gr_simple_correlator.h -(pass-if (true? (gr:simple-correlator 0))) - -;;; ./general/gr_simple_framer.h -(pass-if (true? (gr:simple-framer 0))) - -;;; ./general/gr_simple_squelch_cc.h -(pass-if (true? (gr:simple-squelch-cc 0 0))) - -;;; ./general/gr_skiphead.h -(pass-if (true? (gr:skiphead 1 1))) - -;;; ./general/gr_squash_ff.h -(pass-if (true? (gr:squash-ff #(1.0 2.0 3.0 4.0 5.0) #(1.0 2.0 3.0 4.0 5.0)))) - -;;; ./general/gr_squelch_base_cc.h WONTFIX: not wrapped -;;; (pass-if (true? (gr:squelch-base-cc "foo" 0 #f))) - -;;; ./general/gr_squelch_base_ff.h WONTFIX: not wrapped -;; (pass-if (true? (gr:squelch-base-ff "foo" 0 #f))) - -;;; ./general/gr_stream_mux.h -(pass-if (true? (gr:stream-mux 1 #(1 2)))) - -;;; ./general/gr_stream_to_streams.h -(pass-if (true? (gr:stream-to-streams 1 1))) - -;;; ./general/gr_stream_to_vector.h -(pass-if (true? (gr:stream-to-vector 1 1))) - -;;; ./general/gr_streams_to_stream.h -(pass-if (true? (gr:streams-to-stream 1 1))) - -;;; ./general/gr_streams_to_vector.h -(pass-if (true? (gr:streams-to-vector 1 1))) - -;;; ./general/gr_stretch_ff.h -(pass-if (true? (gr:stretch-ff 1 1))) - -;;; ./general/gr_test.h -(pass-if (true? (gr:test "foo" 1 1 1 1 1 1 1 1))) - -;;; ./general/gr_threshold_ff.h -(pass-if (true? (gr:threshold-ff 0 0))) - -;;; ./general/gr_throttle.h -(pass-if (true? (gr:throttle 1 1))) - -;;; ./general/gr_uchar_to_float.h -(pass-if (true? (gr:uchar-to-float))) - -;;; ./general/gr_vco_f.h -(pass-if (true? (gr:vco-f 0 0 0))) - -;;; ./general/gr_vector_to_stream.h -(pass-if (true? (gr:vector-to-stream 1 1))) - -;;; ./general/gr_vector_to_streams.h -(pass-if (true? (gr:vector-to-streams 1 1))) - -;;; ./general/gr_wavelet_ff.h -(pass-if (true? (gr:wavelet-ff 1024 20 #t))) - -;;; ./general/gr_wvps_ff.h -(pass-if (true? (gr:wvps-ff 2))) diff --git a/gnuradio-core/src/guile/tests/gengen_ctors.test b/gnuradio-core/src/guile/tests/gengen_ctors.test deleted file mode 100644 index 6bac05394..000000000 --- a/gnuradio-core/src/guile/tests/gengen_ctors.test +++ /dev/null @@ -1,336 +0,0 @@ -;;; -*- Scheme -*- -;;; -;;; Copyright 2010 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, see <http://www.gnu.org/licenses/>. -;;; - -;;; If you're using Emacs's Scheme mode: -;;; (put 'with-test-prefix 'scheme-indent-function 1) - -;;; See the comments in gnuradio/test-suite/lib.scm for info on writing tests. -;;; See also the very end of the file, where the test-equal, test-eqv -;;; and test-eq macros are defined. - -(use-modules (gnuradio test-suite lib)) -(use-modules (gnuradio core)) -(use-modules (oop goops)) - -;;; Add test code for all constructors in these files -;;; - -;;; ./gengen/gr_add_cc.h -(pass-if (true? (gr:add-cc 1))) - -;;; ./gengen/gr_add_const_cc.h -(pass-if (true? (gr:add-const-cc 0))) - -;;; ./gengen/gr_add_const_ff.h -(pass-if (true? (gr:add-const-ff 0))) - -;;; ./gengen/gr_add_const_ii.h -(pass-if (true? (gr:add-const-ii 0))) - -;;; ./gengen/gr_add_const_sf.h -(pass-if (true? (gr:add-const-sf 0))) - -;;; ./gengen/gr_add_const_ss.h -(pass-if (true? (gr:add-const-ss 0))) - -;;; ./gengen/gr_add_const_vcc.h -(pass-if (true? (gr:add-const-vcc #(1+3i 23+5i)))) - -;;; ./gengen/gr_add_const_vff.h -(pass-if (true? (gr:add-const-vff #(1.0 2.0)))) - -;;; ./gengen/gr_add_const_vii.h -(pass-if (true? (gr:add-const-vii #(1 2)))) - -;;; ./gengen/gr_add_const_vss.h -(pass-if (true? (gr:add-const-vss #(1 2)))) - -;;; ./gengen/gr_add_ff.h -(pass-if (true? (gr:add-ff 1))) - -;;; ./gengen/gr_add_ii.h -(pass-if (true? (gr:add-ii 1))) - -;;; ./gengen/gr_add_ss.h -(pass-if (true? (gr:add-ss 1))) - -;;; ./gengen/gr_and_bb.h -(pass-if (true? (gr:and-bb))) - -;;; ./gengen/gr_and_const_bb.h -(pass-if (true? (gr:and-const-bb 0))) - -;;; ./gengen/gr_and_const_ii.h -(pass-if (true? (gr:and-const-ii 0))) - -;;; ./gengen/gr_and_const_ss.h -(pass-if (true? (gr:and-const-ss 0))) - -;;; ./gengen/gr_and_ii.h -(pass-if (true? (gr:and-ii))) - -;;; ./gengen/gr_and_ss.h -(pass-if (true? (gr:and-ss))) - -;;; ./gengen/gr_argmax_fs.h -(pass-if (true? (gr:argmax-fs 1))) - -;;; ./gengen/gr_argmax_is.h -(pass-if (true? (gr:argmax-is 1))) - -;;; ./gengen/gr_argmax_ss.h -(pass-if (true? (gr:argmax-ss 1))) - -;;; ./gengen/gr_chunks_to_symbols_bc.h -(pass-if (true? (gr:chunks-to-symbols-bc #(1+3i 23+5i) 1))) - -;;; ./gengen/gr_chunks_to_symbols_bf.h -(pass-if (true? (gr:chunks-to-symbols-bf #(1.0 2.0) 1))) - -;;; ./gengen/gr_chunks_to_symbols_ic.h -(pass-if (true? (gr:chunks-to-symbols-ic #(1+3i 23+5i) 1))) - -;;; ./gengen/gr_chunks_to_symbols_if.h -(pass-if (true? (gr:chunks-to-symbols-if #(1.0 2.0) 1))) - -;;; ./gengen/gr_chunks_to_symbols_sc.h -(pass-if (true? (gr:chunks-to-symbols-sc #(1.0 2.0) 1))) - -;;; ./gengen/gr_chunks_to_symbols_sf.h -(pass-if (true? (gr:chunks-to-symbols-sf #(1.0 2.0) 1))) - -;;; ./gengen/gr_divide_cc.h -(pass-if (true? (gr:divide-cc 1))) - -;;; ./gengen/gr_divide_ff.h -(pass-if (true? (gr:divide-ff 1))) - -;;; ./gengen/gr_divide_ii.h -(pass-if (true? (gr:divide-ii 1))) - -;;; ./gengen/gr_divide_ss.h -(pass-if (true? (gr:divide-ss 1))) - -;;; ./gengen/gr_integrate_cc.h -(pass-if (true? (gr:integrate-cc 0))) - -;;; ./gengen/gr_integrate_ff.h -(pass-if (true? (gr:integrate-ff 0))) - -;;; ./gengen/gr_integrate_ii.h -(pass-if (true? (gr:integrate-ii 0))) - -;;; ./gengen/gr_integrate_ss.h -(pass-if (true? (gr:integrate-ss 0))) - -;;; ./gengen/gr_max_ff.h -(pass-if (true? (gr:max-ff 1))) - -;;; ./gengen/gr_max_ii.h -(pass-if (true? (gr:max-ii 1))) - -;;; ./gengen/gr_max_ss.h -(pass-if (true? (gr:max-ss 1))) - -;;; ./gengen/gr_moving_average_cc.h -(pass-if (true? (gr:moving-average-cc 1 1+3i 4096))) - -;;; ./gengen/gr_moving_average_ff.h -(pass-if (true? (gr:moving-average-ff 1 0 4096))) - -;;; ./gengen/gr_moving_average_ii.h -(pass-if (true? (gr:moving-average-ii 1 0 4096))) - -;;; ./gengen/gr_moving_average_ss.h -(pass-if (true? (gr:moving-average-ss 1 0 4096))) - -;;; ./gengen/gr_multiply_const_ff.h -(pass-if (true? (gr:multiply-const-ff 1))) - -;;; ./gengen/gr_multiply_const_ii.h -(pass-if (true? (gr:multiply-const-ii 1))) - -;;; ./gengen/gr_multiply_const_ss.h -(pass-if (true? (gr:multiply-const-ss 1))) - -;;; ./gengen/gr_multiply_const_vcc.h -(pass-if (true? (gr:multiply-const-vcc #(1+3i 23+5i)))) - -;;; ./gengen/gr_multiply_const_vff.h -(pass-if (true? (gr:multiply-const-vff #(1.0 2.0)))) - -;;; ./gengen/gr_multiply_const_vii.h -(pass-if (true? (gr:multiply-const-vii #(1 2)))) - -;;; ./gengen/gr_multiply_const_vss.h -(pass-if (true? (gr:multiply-const-vss #(1 2)))) - -;;; ./gengen/gr_multiply_ff.h -(pass-if (true? (gr:multiply-ff 1))) - -;;; ./gengen/gr_multiply_ii.h -(pass-if (true? (gr:multiply-ii 1))) - -;;; ./gengen/gr_multiply_ss.h -(pass-if (true? (gr:multiply-ss 1))) - -;;; ./gengen/gr_mute_cc.h FIXME: not found -(pass-if (true? (gr:mute-cc #f))) - -;;; ./gengen/gr_mute_ff.h FIXME: not found -(pass-if (true? (gr:mute-ff #f))) - -;;; ./gengen/gr_mute_ii.h FIXME: not found -(pass-if (true? (gr:mute-ii #f))) - -;;; ./gengen/gr_mute_ss.h FIXME: not found -(pass-if (true? (gr:mute-ss #f))) - -;;; ./gengen/gr_noise_source_c.h -(pass-if (true? (gr:noise-source-c 1 0 3021))) - -;;; ./gengen/gr_noise_source_f.h -(pass-if (true? (gr:noise-source-f 1 0 3021))) - -;;; ./gengen/gr_noise_source_i.h -(pass-if (true? (gr:noise-source-i 1 0 3021))) - -;;; ./gengen/gr_noise_source_s.h -(pass-if (true? (gr:noise-source-s 1 0 3021))) - -;;; ./gengen/gr_not_bb.h -(pass-if (true? (gr:not-bb))) - -;;; ./gengen/gr_not_ii.h -(pass-if (true? (gr:not-ii))) - -;;; ./gengen/gr_not_ss.h -(pass-if (true? (gr:not-ss))) - -;;; ./gengen/gr_or_bb.h -(pass-if (true? (gr:or-bb))) - -;;; ./gengen/gr_or_ii.h -(pass-if (true? (gr:or-ii))) - -;;; ./gengen/gr_or_ss.h -(pass-if (true? (gr:or-ss))) - -;;; ./gengen/gr_packed_to_unpacked_bb.h -(pass-if (true? (gr:packed-to-unpacked-bb 1 1))) - -;;; ./gengen/gr_packed_to_unpacked_ii.h -(pass-if (true? (gr:packed-to-unpacked-ii 1 1))) - -;;; ./gengen/gr_packed_to_unpacked_ss.h -(pass-if (true? (gr:packed-to-unpacked-ss 1 1))) - -;;; ./gengen/gr_peak_detector_fb.h -(pass-if (true? (gr:peak-detector-fb 0.25 0.40 10 0.001))) - -;;; ./gengen/gr_peak_detector_ib.h -(pass-if (true? (gr:peak-detector-ib 0.25 0.40 10 0.001))) - -;;; ./gengen/gr_peak_detector_sb.h -(pass-if (true? (gr:peak-detector-sb 0.25 0.40 10 0.001))) - -;;; ./gengen/gr_sample_and_hold_bb.h -(pass-if (true? (gr:sample-and-hold-bb))) - -;;; ./gengen/gr_sample_and_hold_ff.h -(pass-if (true? (gr:sample-and-hold-ff))) - -;;; ./gengen/gr_sample_and_hold_ii.h -(pass-if (true? (gr:sample-and-hold-ii))) - -;;; ./gengen/gr_sample_and_hold_ss.h -(pass-if (true? (gr:sample-and-hold-ss))) - -;;; ./gengen/gr_sig_source_c.h -(pass-if (true? (gr:sig-source-c 0 0 0 0 0))) - -;;; ./gengen/gr_sig_source_f.h -(pass-if (true? (gr:sig-source-f 0 0 0 0 0))) - -;;; ./gengen/gr_sig_source_i.h -(pass-if (true? (gr:sig-source-i 0 0 0 0 0))) - -;;; ./gengen/gr_sig_source_s.h -(pass-if (true? (gr:sig-source-s 0 0 0 0 0))) - -;;; ./gengen/gr_sub_cc.h -(pass-if (true? (gr:sub-cc 1))) - -;;; ./gengen/gr_sub_ff.h -(pass-if (true? (gr:sub-ff 1))) - -;;; ./gengen/gr_sub_ii.h -(pass-if (true? (gr:sub-ii 1))) - -;;; ./gengen/gr_sub_ss.h -(pass-if (true? (gr:sub-ss 1))) - -;;; ./gengen/gr_unpacked_to_packed_bb.h -(pass-if (true? (gr:unpacked-to-packed-bb 1 1))) - -;;; ./gengen/gr_unpacked_to_packed_ii.h -(pass-if (true? (gr:unpacked-to-packed-ii 1 1))) - -;;; ./gengen/gr_unpacked_to_packed_ss.h -(pass-if (true? (gr:unpacked-to-packed-ss 1 1))) - -;;; ./gengen/gr_vector_sink_b.h -(pass-if (true? (gr:vector-sink-b 1))) - -;;; ./gengen/gr_vector_sink_c.h -(pass-if (true? (gr:vector-sink-c 1))) - -;;; ./gengen/gr_vector_sink_f.h -(pass-if (true? (gr:vector-sink-f 1))) - -;;; ./gengen/gr_vector_sink_i.h -(pass-if (true? (gr:vector-sink-i 1))) - -;;; ./gengen/gr_vector_sink_s.h -(pass-if (true? (gr:vector-sink-s 1))) - -;;; ./gengen/gr_vector_source_b.h -;; (pass-if (true? (gr:vector-source-b #(1 2) #f 1))) - -;; ;;; ./gengen/gr_vector_source_c.h -;; (pass-if (true? (gr:vector-source-c #(1+3i 23+5i) #f 1))) - -;; ;;; ./gengen/gr_vector_source_f.h -;; (pass-if (true? (gr:vector-source-f #(1.0 2.0) #f 1))) - -;;; ./gengen/gr_vector_source_i.h -;; (pass-if (true? (gr:vector-source-i #(1 2) #f 1))) - -;;; ./gengen/gr_vector_source_s.h FIXME: not found -;; (pass-if (true? (gr:vector-source-s #(1 2) #f 1))) - -;;; ./gengen/gr_xor_bb.h -(pass-if (true? (gr:xor-bb))) - -;;; ./gengen/gr_xor_ii.h -(pass-if (true? (gr:xor-ii))) - -;;; ./gengen/gr_xor_ss.h -(pass-if (true? (gr:xor-ss))) diff --git a/gnuradio-core/src/guile/tests/hier_ctors.test b/gnuradio-core/src/guile/tests/hier_ctors.test deleted file mode 100644 index b79ee0f15..000000000 --- a/gnuradio-core/src/guile/tests/hier_ctors.test +++ /dev/null @@ -1,40 +0,0 @@ -;;; -*- Scheme -*- -;;; -;;; Copyright 2010 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, see <http://www.gnu.org/licenses/>. -;;; - -;;; If you're using Emacs's Scheme mode: -;;; (put 'with-test-prefix 'scheme-indent-function 1) - -;;; See the comments in gnuradio/test-suite/lib.scm for info on writing tests. -;;; See also the very end of the file, where the test-equal, test-eqv -;;; and test-eq macros are defined. - -(use-modules (gnuradio test-suite lib)) -(use-modules (gnuradio core)) -(use-modules (oop goops)) - -;;; Add test code for all constructors in these files -;;; - -;;; ./hier/gr_channel_model.h FIXME: Unbound variable: ~S" (gr:channel_model) #f)) -;; gr_make_channel_model(double noise_voltage=0.0, double frequency_offset=0.0, -;; double epsilon=1.0, -;; const std::vector<gr_complex> &taps=std::vector<gr_complex>(1, 1), -;; double noise_seed=3021); -;; (pass-if (true? (gr:channel_model 0.0 0.0 1.0 #(1 1) 3021))) diff --git a/gnuradio-core/src/guile/tests/io_ctors.test b/gnuradio-core/src/guile/tests/io_ctors.test deleted file mode 100644 index 5f40d321c..000000000 --- a/gnuradio-core/src/guile/tests/io_ctors.test +++ /dev/null @@ -1,82 +0,0 @@ -;;; -*- Scheme -*- -;;; -;;; Copyright 2010 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, see <http://www.gnu.org/licenses/>. -;;; - -;;; If you're using Emacs's Scheme mode: -;;; (put 'with-test-prefix 'scheme-indent-function 1) - -;;; See the comments in gnuradio/test-suite/lib.scm for info on writing tests. -;;; See also the very end of the file, where the test-equal, test-eqv -;;; and test-eq macros are defined. - -(use-modules (gnuradio test-suite lib)) -(use-modules (gnuradio core)) -(use-modules (oop goops)) - - -(define (rm-foo) - (false-if-exception (delete-file "foo"))) - -;;; Add test code for all constructors in these files -;;; - -;;; ./io/gr_file_descriptor_sink.h -(pass-if (true? (gr:file-descriptor-sink 1 (dup 1)))) - -;;; ./io/gr_file_descriptor_source.h -(pass-if (true? (gr:file-descriptor-source 1 (dup 0) #f))) - -;;; ./io/gr_file_sink.h -(pass-if (true? (gr:file-sink 1 "foo"))) - -;;; ./io/gr_file_source.h -(pass-if (true? (gr:file-source 1 "foo" #f))) -(rm-foo) - -;;; ./io/gr_histo_sink_f.h -;; gr_make_histo_sink_f (gr_msg_queue_sptr msgq); -(pass-if (true? (gr:histo-sink-f (gr:msg-queue)))) - -;;; ./io/gr_message_sink.h -(pass-if (true? (gr:message-sink 1 (gr:msg-queue) #f))) - -;;; ./io/gr_message_source.h -(pass-if (true? (gr:message-source 1 1))) -(pass-if (true? (gr:message-source 1 (gr:msg-queue)))) - -;;; ./io/gr_oscope_sink_f.h -(pass-if (true? (gr:oscope-sink-f 1000 (gr:msg-queue)))) - -;;; ./io/gr_udp_sink.h -;;(pass-if (true? (gr:udp-sink 4 "localhost" 80 1472 #f))) -;;(pass-if-throw "confirm throw gr:udp-sink" #t -;; (true? (gr:udp-sink 4 "localhostx" 80 1472 #f))) - -;;; ./io/gr_udp_source.h -;;(pass-if (true? (gr:udp-source 4 "localhost" 0 1472 #f #t))) -;;(pass-if-throw "confirm throw gr:udp-source" #t -;; (true? (gr:udp-source 4 "localhostx" 0 1472 #f #t))) - -;;; ./io/gr_wavfile_sink.h -(pass-if (true? (gr:wavfile-sink "foo" 2 48000 16))) - -;;; ./io/gr_wavfile_source.h WONTFIX: buggy source won't accept file -;;; created immediately above. -;;(pass-if (true? (gr:wavfile-source "foo" #f))) -(rm-foo) diff --git a/gnuradio-core/src/lib/.gitignore b/gnuradio-core/src/lib/.gitignore deleted file mode 100644 index 0d5077da5..000000000 --- a/gnuradio-core/src/lib/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -/Makefile -/Makefile.in -/.deps -/.libs -/*.la -/*.lo -/gnuradio-config-info diff --git a/gnuradio-core/src/lib/CMakeLists.txt b/gnuradio-core/src/lib/CMakeLists.txt index 86f88242c..9c980157d 100644 --- a/gnuradio-core/src/lib/CMakeLists.txt +++ b/gnuradio-core/src/lib/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2010-2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, @@ -47,10 +47,6 @@ include_directories(${VOLK_INCLUDE_DIRS}) include_directories(${Boost_INCLUDE_DIRS}) link_directories(${Boost_LIBRARY_DIRS}) -add_definitions(${GSL_DEFINITIONS}) -include_directories(${GSL_INCLUDE_DIRS}) -link_directories(${GSL_LIBRARY_DIRS}) - include_directories(${FFTW3F_INCLUDE_DIRS}) link_directories(${FFTW3F_LIBRARY_DIRS}) @@ -60,7 +56,6 @@ link_directories(${FFTW3F_LIBRARY_DIRS}) list(APPEND gnuradio_core_libs gruel ${Boost_LIBRARIES} - ${GSL_LIBRARIES} ${FFTW3F_LIBRARIES} ) @@ -80,7 +75,6 @@ list(APPEND gnuradio_core_libs volk) add_library(gnuradio-core SHARED ${gnuradio_core_sources}) target_link_libraries(gnuradio-core ${gnuradio_core_libs}) GR_LIBRARY_FOO(gnuradio-core RUNTIME_COMPONENT "core_runtime" DEVEL_COMPONENT "core_devel") -#avoid fftw and gsl link in dependent libraries: set_target_properties(gnuradio-core PROPERTIES LINK_INTERFACE_LIBRARIES "gruel") ######################################################################## diff --git a/gnuradio-core/src/lib/ConfigChecks.cmake b/gnuradio-core/src/lib/ConfigChecks.cmake index 30a1011e4..26b778a7a 100644 --- a/gnuradio-core/src/lib/ConfigChecks.cmake +++ b/gnuradio-core/src/lib/ConfigChecks.cmake @@ -1,17 +1,17 @@ # Copyright 2010-2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/Makefile.am b/gnuradio-core/src/lib/Makefile.am deleted file mode 100644 index 21e721073..000000000 --- a/gnuradio-core/src/lib/Makefile.am +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright 2001,2004,2009,2010 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 - -## Process this file with automake to produce Makefile.in - -# We've got to build . before swig -SUBDIRS = missing runtime filter viterbi general gengen reed-solomon io hier . swig - -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES) $(WITH_INCLUDES) - -# generate libgnuradio-core.la from the convenience libraries in subdirs - -lib_LTLIBRARIES = libgnuradio-core.la -noinst_LTLIBRARIES = libgnuradio-core-qa.la - -libgnuradio_core_la_SOURCES = bug_work_around_6.cc -libgnuradio_core_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) - -libgnuradio_core_qa_la_SOURCES = bug_work_around_6.cc -libgnuradio_core_qa_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0 \ - $(LIBGNURADIO_CORE_EXTRA_LDFLAGS) - - -libgnuradio_core_la_LIBADD = \ - filter/libfilter.la \ - viterbi/libviterbi.la \ - general/libgeneral.la \ - gengen/libgengen.la \ - io/libio.la \ - missing/libmissing.la \ - reed-solomon/librs.la \ - runtime/libruntime.la \ - hier/libhier.la \ - $(GRUEL_LA) \ - $(VOLK_LA) \ - $(FFTW3F_LIBS) \ - $(GSL_LIBS) \ - $(CBLAS_LIBS) \ - $(BOOST_FILESYSTEM_LIB) - -libgnuradio_core_qa_la_LIBADD = \ - filter/libfilter-qa.la \ - general/libgeneral-qa.la \ - runtime/libruntime-qa.la \ - libgnuradio-core.la \ - $(CPPUNIT_LIBS) - -bin_PROGRAMS = gnuradio-config-info -gnuradio_config_info_SOURCES = gnuradio-config-info.cc -gnuradio_config_info_LDADD = libgnuradio-core.la \ - $(BOOST_LDFLAGS) \ - $(BOOST_PROGRAM_OPTIONS_LIB) \ - $(BOOST_FILESYSTEM_LIB) diff --git a/gnuradio-core/src/lib/filter/.gitignore b/gnuradio-core/src/lib/filter/.gitignore deleted file mode 100644 index faaf02cb8..000000000 --- a/gnuradio-core/src/lib/filter/.gitignore +++ /dev/null @@ -1,226 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/generate-stamp -/# -/--- -/generate -/files: -/don't -/go -/in -/CVS -/--- -/GrFIRfilterCCC.cc -/GrFIRfilterCCC.h -/GrFIRfilterCCF.cc -/GrFIRfilterCCF.h -/GrFIRfilterFCC.cc -/GrFIRfilterFCC.h -/GrFIRfilterFFF.cc -/GrFIRfilterFFF.h -/GrFIRfilterFSF.cc -/GrFIRfilterFSF.h -/GrFIRfilterSCC.cc -/GrFIRfilterSCC.h -/GrFIRfilterSIS.cc -/GrFIRfilterSIS.h -/GrFreqXlatingFIRfilterCCC.cc -/GrFreqXlatingFIRfilterCCC.h -/GrFreqXlatingFIRfilterCCF.cc -/GrFreqXlatingFIRfilterCCF.h -/GrFreqXlatingFIRfilterFCC.cc -/GrFreqXlatingFIRfilterFCC.h -/GrFreqXlatingFIRfilterFCF.cc -/GrFreqXlatingFIRfilterFCF.h -/GrFreqXlatingFIRfilterSCC.cc -/GrFreqXlatingFIRfilterSCC.h -/GrFreqXlatingFIRfilterSCF.cc -/GrFreqXlatingFIRfilterSCF.h -/gr_fir_CCC.cc -/gr_fir_CCC.h -/gr_fir_CCC_generic.cc -/gr_fir_CCC_generic.h -/gr_fir_CCF.cc -/gr_fir_CCF.h -/gr_fir_CCF_generic.cc -/gr_fir_CCF_generic.h -/gr_fir_FCC.cc -/gr_fir_FCC.h -/gr_fir_FCC_generic.cc -/gr_fir_FCC_generic.h -/gr_fir_FFF.cc -/gr_fir_FFF.h -/gr_fir_FFF_generic.cc -/gr_fir_FFF_generic.h -/gr_fir_FSF.cc -/gr_fir_FSF.h -/gr_fir_FSF_generic.cc -/gr_fir_FSF_generic.h -/gr_fir_SCC.cc -/gr_fir_SCC.h -/gr_fir_SCC_generic.cc -/gr_fir_SCC_generic.h -/gr_fir_SIS.cc -/gr_fir_SIS.h -/gr_fir_SIS_generic.cc -/gr_fir_SIS_generic.h -/gr_fir_sysconfig.cc -/gr_fir_sysconfig.h -/gr_fir_sysconfig_generic.cc -/gr_fir_sysconfig_generic.h -/gr_fir_util.cc -/gr_fir_util.h -/GrFIRfilterCCC.i -/GrFIRfilterCCF.i -/GrFIRfilterFCC.i -/GrFIRfilterFFF.i -/GrFIRfilterFSF.i -/GrFIRfilterSCC.i -/GrFIRfilterSIS.i -/GrFreqXlatingFIRfilterCCC.i -/GrFreqXlatingFIRfilterCCF.i -/GrFreqXlatingFIRfilterFCC.i -/GrFreqXlatingFIRfilterFCF.i -/GrFreqXlatingFIRfilterSCC.i -/GrFreqXlatingFIRfilterSCF.i -/# -/--- -/end -/generated -/files -/--- -/filter_generated.i -/gr_fir_ccc.cc -/gr_fir_ccc.h -/gr_fir_ccc_generic.cc -/gr_fir_ccc_generic.h -/gr_fir_ccf.cc -/gr_fir_ccf.h -/gr_fir_ccf_generic.cc -/gr_fir_ccf_generic.h -/gr_fir_fcc.cc -/gr_fir_fcc.h -/gr_fir_fcc_generic.cc -/gr_fir_fcc_generic.h -/gr_fir_fff.cc -/gr_fir_fff.h -/gr_fir_fff_generic.cc -/gr_fir_fff_generic.h -/gr_fir_fsf.cc -/gr_fir_fsf.h -/gr_fir_fsf_generic.cc -/gr_fir_fsf_generic.h -/gr_fir_scc.cc -/gr_fir_scc.h -/gr_fir_scc_generic.cc -/gr_fir_scc_generic.h -/gr_fir_filter_ccc.cc -/gr_fir_filter_ccc.h -/gr_fir_filter_ccc.i -/gr_fir_filter_ccf.cc -/gr_fir_filter_ccf.h -/gr_fir_filter_ccf.i -/gr_fir_filter_fcc.cc -/gr_fir_filter_fcc.h -/gr_fir_filter_fcc.i -/gr_fir_filter_fff.cc -/gr_fir_filter_fff.h -/gr_fir_filter_fff.i -/gr_fir_filter_fsf.cc -/gr_fir_filter_fsf.h -/gr_fir_filter_fsf.i -/gr_fir_filter_scc.cc -/gr_fir_filter_scc.h -/gr_fir_filter_scc.i -/gr_freq_xlating_fir_filter_ccc.cc -/gr_freq_xlating_fir_filter_ccc.h -/gr_freq_xlating_fir_filter_ccc.i -/gr_freq_xlating_fir_filter_ccf.cc -/gr_freq_xlating_fir_filter_ccf.h -/gr_freq_xlating_fir_filter_ccf.i -/gr_freq_xlating_fir_filter_fcc.cc -/gr_freq_xlating_fir_filter_fcc.h -/gr_freq_xlating_fir_filter_fcc.i -/gr_freq_xlating_fir_filter_fcf.cc -/gr_freq_xlating_fir_filter_fcf.h -/gr_freq_xlating_fir_filter_fcf.i -/gr_freq_xlating_fir_filter_scc.cc -/gr_freq_xlating_fir_filter_scc.h -/gr_freq_xlating_fir_filter_scc.i -/gr_freq_xlating_fir_filter_scf.cc -/gr_freq_xlating_fir_filter_scf.h -/gr_freq_xlating_fir_filter_scf.i -/gr_interp_fir_filter_ccc.cc -/gr_interp_fir_filter_ccc.h -/gr_interp_fir_filter_ccc.i -/gr_interp_fir_filter_ccf.cc -/gr_interp_fir_filter_ccf.h -/gr_interp_fir_filter_ccf.i -/gr_interp_fir_filter_fcc.cc -/gr_interp_fir_filter_fcc.h -/gr_interp_fir_filter_fcc.i -/gr_interp_fir_filter_fff.cc -/gr_interp_fir_filter_fff.h -/gr_interp_fir_filter_fff.i -/gr_interp_fir_filter_fsf.cc -/gr_interp_fir_filter_fsf.h -/gr_interp_fir_filter_fsf.i -/gr_interp_fir_filter_scc.cc -/gr_interp_fir_filter_scc.h -/gr_interp_fir_filter_scc.i -/gr_rational_resampler_ccc.cc -/gr_rational_resampler_ccc.h -/gr_rational_resampler_ccc.i -/gr_rational_resampler_ccf.cc -/gr_rational_resampler_ccf.h -/gr_rational_resampler_ccf.i -/gr_rational_resampler_fcc.cc -/gr_rational_resampler_fcc.h -/gr_rational_resampler_fcc.i -/gr_rational_resampler_fff.cc -/gr_rational_resampler_fff.h -/gr_rational_resampler_fff.i -/gr_rational_resampler_fsf.cc -/gr_rational_resampler_fsf.h -/gr_rational_resampler_fsf.i -/gr_rational_resampler_scc.cc -/gr_rational_resampler_scc.h -/gr_rational_resampler_scc.i -/gr_rational_resampler_base_ccc.cc -/gr_rational_resampler_base_ccc.h -/gr_rational_resampler_base_ccc.i -/gr_rational_resampler_base_ccf.cc -/gr_rational_resampler_base_ccf.h -/gr_rational_resampler_base_ccf.i -/gr_rational_resampler_base_fcc.cc -/gr_rational_resampler_base_fcc.h -/gr_rational_resampler_base_fcc.i -/gr_rational_resampler_base_fff.cc -/gr_rational_resampler_base_fff.h -/gr_rational_resampler_base_fff.i -/gr_rational_resampler_base_fsf.cc -/gr_rational_resampler_base_fsf.h -/gr_rational_resampler_base_fsf.i -/gr_rational_resampler_base_scc.cc -/gr_rational_resampler_base_scc.h -/gr_rational_resampler_base_scc.i -/gri_fir_filter_with_buffer_ccc.cc -/gri_fir_filter_with_buffer_ccc.h -/gri_fir_filter_with_buffer_ccf.cc -/gri_fir_filter_with_buffer_ccf.h -/gri_fir_filter_with_buffer_fcc.cc -/gri_fir_filter_with_buffer_fcc.h -/gri_fir_filter_with_buffer_fff.cc -/gri_fir_filter_with_buffer_fff.h -/gri_fir_filter_with_buffer_fsf.cc -/gri_fir_filter_with_buffer_fsf.h -/gri_fir_filter_with_buffer_scc.cc -/gri_fir_filter_with_buffer_scc.h -/stamp-* diff --git a/gnuradio-core/src/lib/filter/3dnow_float_dotprod_really_simple.S b/gnuradio-core/src/lib/filter/3dnow_float_dotprod_really_simple.S index 6050425ac..0cd686736 100644 --- a/gnuradio-core/src/lib/filter/3dnow_float_dotprod_really_simple.S +++ b/gnuradio-core/src/lib/filter/3dnow_float_dotprod_really_simple.S @@ -1,30 +1,30 @@ # # Copyright 2002 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. -# +# # input and taps are guarenteed to be 16 byte aligned. # n_4_float_blocks is != 0 -# # -# float +# +# float # sse_float_dotprod (const float *input, # const float *taps, unsigned n_4_float_blocks) # { @@ -32,23 +32,23 @@ # float sum1 = 0; # float sum2 = 0; # float sum3 = 0; -# +# # do { -# +# # sum0 += input[0] * taps[0]; # sum1 += input[1] * taps[1]; # sum2 += input[2] * taps[2]; # sum3 += input[3] * taps[3]; -# +# # input += 4; # taps += 4; -# +# # } while (--n_4_float_blocks != 0); -# -# +# +# # return sum0 + sum1 + sum2 + sum3; # } -# +# .file "3dnow_float_dotprod_really_simple.s" @@ -64,7 +64,7 @@ sse_float_dotprod: movl 12(%ebp), %eax movl 16(%ebp), %ecx - + # The plan is to get it computing the correct answer, and # then to unroll and schedule the inner loop. @@ -80,7 +80,7 @@ sse_float_dotprod: addl $8, %eax decl %ecx jne .Loop1 - + # at this point mm4 contains partial sums pfacc %mm4, %mm4 diff --git a/gnuradio-core/src/lib/filter/3dnow_float_dotprod_simple.S b/gnuradio-core/src/lib/filter/3dnow_float_dotprod_simple.S index 1097728cb..5af3fc5c9 100644 --- a/gnuradio-core/src/lib/filter/3dnow_float_dotprod_simple.S +++ b/gnuradio-core/src/lib/filter/3dnow_float_dotprod_simple.S @@ -1,30 +1,30 @@ # # Copyright 2002 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. -# +# # input and taps are guarenteed to be 16 byte aligned. # n_4_float_blocks is != 0 -# # -# float +# +# float # sse_float_dotprod (const float *input, # const float *taps, unsigned n_4_float_blocks) # { @@ -32,23 +32,23 @@ # float sum1 = 0; # float sum2 = 0; # float sum3 = 0; -# +# # do { -# +# # sum0 += input[0] * taps[0]; # sum1 += input[1] * taps[1]; # sum2 += input[2] * taps[2]; # sum3 += input[3] * taps[3]; -# +# # input += 4; # taps += 4; -# +# # } while (--n_4_float_blocks != 0); -# -# +# +# # return sum0 + sum1 + sum2 + sum3; # } -# +# .file "3dnow_float_dotprod_simple.s" @@ -64,21 +64,21 @@ sse_float_dotprod: movl 12(%ebp), %eax movl 16(%ebp), %ecx - + # The plan is to get it computing the correct answer, and # then to unroll and schedule the inner loop. pxor %mm4, %mm4 # mm4 = 0 0 - pxor %mm5, %mm5 # mm5 = 0 0 + pxor %mm5, %mm5 # mm5 = 0 0 .p2align 4 .Loop1: movq 0(%eax), %mm0 movq 8(%eax), %mm1 - + pfmul 0(%edx), %mm0 pfadd %mm0, %mm4 - + pfmul 8(%edx), %mm1 pfadd %mm1, %mm5 @@ -86,7 +86,7 @@ sse_float_dotprod: addl $16, %eax decl %ecx jne .Loop1 - + # at this point mm4 and mm5 contain partial sums pfadd %mm5, %mm4 diff --git a/gnuradio-core/src/lib/filter/CMakeLists.txt b/gnuradio-core/src/lib/filter/CMakeLists.txt index d26e55fb8..02a72191c 100644 --- a/gnuradio-core/src/lib/filter/CMakeLists.txt +++ b/gnuradio-core/src/lib/filter/CMakeLists.txt @@ -333,7 +333,7 @@ set(gr_core_filter_triple_threats gr_single_pole_iir_filter_ff gr_single_pole_iir_filter_cc gr_pfb_channelizer_ccf - gr_pfb_synthesis_filterbank_ccf + gr_pfb_synthesizer_ccf gr_pfb_decimator_ccf gr_pfb_interpolator_ccf gr_pfb_arb_resampler_ccf diff --git a/gnuradio-core/src/lib/filter/Makefile.am b/gnuradio-core/src/lib/filter/Makefile.am deleted file mode 100644 index c314431bf..000000000 --- a/gnuradio-core/src/lib/filter/Makefile.am +++ /dev/null @@ -1,402 +0,0 @@ -# -# Copyright 2001,2002,2004-2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -# -# This directory contains mostly filter routines, plus a few -# other performance critical items -# - -# $(WITH_INCLUDES) must _always_ be last -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES) \ - $(FFTW3F_CPPFLAGS) $(WITH_INCLUDES) - -noinst_LTLIBRARIES = libfilter.la libfilter-qa.la - -# ---------------------------------------------------------------- -# these scripts generate FIR code -# - -code_generator = \ - generate_all.py \ - generate_gr_fir_XXX.py \ - generate_gr_fir_filter_XXX.py \ - generate_gr_interp_fir_filter_XXX.py \ - generate_gr_rational_resampler_base_XXX.py \ - generate_gr_fir_sysconfig.py \ - generate_gr_fir_sysconfig_generic.py \ - generate_gr_fir_util.py \ - generate_gr_freq_xlating_fir_filter_XXX.py \ - generate_gri_fir_filter_with_buffer_XXX.py \ - generate_utils.py \ - gr_fir_XXX.cc.t \ - gr_fir_XXX.h.t \ - gr_fir_XXX_generic.cc.t \ - gr_fir_XXX_generic.h.t \ - gr_fir_filter_XXX.cc.t \ - gr_fir_filter_XXX.h.t \ - gr_fir_filter_XXX.i.t \ - gr_interp_fir_filter_XXX.cc.t \ - gr_interp_fir_filter_XXX.h.t \ - gr_interp_fir_filter_XXX.i.t \ - gr_rational_resampler_base_XXX.cc.t \ - gr_rational_resampler_base_XXX.h.t \ - gr_rational_resampler_base_XXX.i.t \ - gr_freq_xlating_fir_filter_XXX.cc.t \ - gr_freq_xlating_fir_filter_XXX.h.t \ - gr_freq_xlating_fir_filter_XXX.i.t \ - gri_fir_filter_with_buffer_XXX.cc.t \ - gri_fir_filter_with_buffer_XXX.h.t - - -# Source built by Python into $(builddir) -BUILT_SOURCES += \ - $(GENERATED_H) \ - $(GENERATED_I) \ - $(GENERATED_CC) \ - filter_generated.i - -# ---------------------------------------------------------------- -# MD_CPU and MD_SUBCPU are set at configure time by way of -# gnuradio/config/gr_set_md_cpu.m4. -# It indicates which set of machine dependent code we should be building. -# We currently implement "generic" and "x86" - -# -# <foo>_CODE entry for each set of machine specific speedups -# - -generic_CODE = \ - sysconfig_generic.cc - -generic_qa_CODE = \ - qa_dotprod_generic.cc - -x86_CODE = \ - sysconfig_x86.cc \ - gr_fir_sysconfig_x86.cc \ - gr_cpu_x86.cc \ - gr_fir_ccc_simd.cc \ - gr_fir_ccc_x86.cc \ - gr_fir_fff_simd.cc \ - gr_fir_fff_x86.cc \ - gr_fir_fsf_simd.cc \ - gr_fir_fsf_x86.cc \ - gr_fir_scc_simd.cc \ - gr_fir_scc_x86.cc \ - gr_fir_fcc_simd.cc \ - gr_fir_fcc_x86.cc \ - gr_fir_ccf_simd.cc \ - gr_fir_ccf_x86.cc \ - sse_debug.c - -x86_SUBCODE = \ - float_dotprod_sse.S \ - float_dotprod_3dnow.S \ - complex_dotprod_3dnowext.S \ - complex_dotprod_3dnow.S \ - complex_dotprod_sse.S \ - ccomplex_dotprod_3dnowext.S \ - ccomplex_dotprod_3dnow.S \ - ccomplex_dotprod_sse.S \ - fcomplex_dotprod_3dnow.S \ - fcomplex_dotprod_sse.S \ - short_dotprod_mmx.S - -x86_64_SUBCODE = \ - float_dotprod_sse64.S \ - float_dotprod_3dnow64.S \ - complex_dotprod_3dnowext64.S \ - complex_dotprod_3dnow64.S \ - complex_dotprod_sse64.S \ - ccomplex_dotprod_3dnowext64.S \ - ccomplex_dotprod_3dnow64.S \ - ccomplex_dotprod_sse64.S \ - fcomplex_dotprod_3dnow64.S \ - fcomplex_dotprod_sse64.S \ - short_dotprod_mmx64.S - -x86_qa_CODE = \ - qa_dotprod_x86.cc \ - qa_float_dotprod_x86.cc \ - qa_complex_dotprod_x86.cc \ - qa_ccomplex_dotprod_x86.cc - -powerpc_CODE = \ - sysconfig_powerpc.cc \ - gr_fir_sysconfig_powerpc.cc \ - gr_cpu_powerpc.cc \ - gr_fir_fff_altivec.cc \ - gr_altivec.c \ - dotprod_fff_altivec.c - -powerpc_qa_CODE = \ - qa_dotprod_powerpc.cc - -armv7_a_CODE = \ - sysconfig_armv7_a.cc \ - gr_fir_sysconfig_armv7_a.cc \ - gr_cpu_armv7_a.cc \ - gr_fir_fff_armv7_a.cc \ - dotprod_fff_armv7_a.c \ - gr_fir_ccf_armv7_a.cc \ - dotprod_ccf_armv7_a.c - -armv7_a_qa_CODE = \ - qa_dotprod_armv7_a.cc - -# -# include each <foo>_CODE entry here... -# -EXTRA_libfilter_la_SOURCES = \ - $(generic_CODE) \ - $(generic_qa_CODE) \ - $(x86_CODE) \ - $(x86_SUBCODE) \ - $(x86_64_SUBCODE) \ - $(x86_qa_CODE) \ - $(powerpc_CODE) \ - $(powerpc_qa_CODE) \ - $(armv7_a_CODE) \ - $(armv7_a_qa_CODE) - - -EXTRA_DIST += \ - 3dnow_float_dotprod_really_simple.S \ - 3dnow_float_dotprod_simple.S \ - $(code_generator) - -# work around automake deficiency -libfilter_la_common_SOURCES = \ - $(GENERATED_CC) \ - gr_adaptive_fir_ccc.cc \ - gr_adaptive_fir_ccf.cc \ - gri_fft_filter_fff_generic.cc \ - gri_fft_filter_ccc_generic.cc \ - gr_fft_filter_ccc.cc \ - gr_fft_filter_fff.cc \ - gr_goertzel_fc.cc \ - gr_filter_delay_fc.cc \ - gr_fractional_interpolator_ff.cc \ - gr_fractional_interpolator_cc.cc \ - gr_hilbert_fc.cc \ - gr_iir_filter_ffd.cc \ - gr_sincos.c \ - gr_single_pole_iir_filter_ff.cc \ - gr_single_pole_iir_filter_cc.cc \ - gri_goertzel.cc \ - gri_mmse_fir_interpolator.cc \ - gri_mmse_fir_interpolator_cc.cc \ - complex_dotprod_generic.cc \ - ccomplex_dotprod_generic.cc \ - float_dotprod_generic.c \ - short_dotprod_generic.c \ - gr_pfb_channelizer_ccf.cc \ - gr_pfb_synthesis_filterbank_ccf.cc\ - gr_pfb_decimator_ccf.cc \ - gr_pfb_interpolator_ccf.cc \ - gr_pfb_arb_resampler_ccf.cc \ - gr_pfb_arb_resampler_fff.cc \ - gr_pfb_clock_sync_ccf.cc \ - gr_pfb_clock_sync_fff.cc \ - gr_dc_blocker_cc.cc \ - gr_dc_blocker_ff.cc - -libfilter_qa_la_common_SOURCES = \ - qa_filter.cc \ - qa_gr_fir_ccf.cc \ - qa_gr_fir_fcc.cc \ - qa_gr_fir_fff.cc \ - qa_gr_fir_ccc.cc \ - qa_gr_fir_scc.cc \ - qa_gr_rotator.cc \ - qa_gri_mmse_fir_interpolator.cc \ - qa_gri_mmse_fir_interpolator_cc.cc \ - qa_gri_fir_filter_with_buffer_ccf.cc \ - qa_gri_fir_filter_with_buffer_ccc.cc \ - qa_gri_fir_filter_with_buffer_fcc.cc \ - qa_gri_fir_filter_with_buffer_fff.cc \ - qa_gri_fir_filter_with_buffer_fsf.cc \ - qa_gri_fir_filter_with_buffer_scc.cc - -if MD_CPU_generic -libfilter_la_SOURCES = $(libfilter_la_common_SOURCES) $(generic_CODE) -libfilter_qa_la_SOURCES = $(libfilter_qa_la_common_SOURCES) $(generic_qa_CODE) -endif - -if MD_CPU_x86 -if MD_SUBCPU_x86_64 -libfilter_la_SOURCES = $(libfilter_la_common_SOURCES) $(x86_64_SUBCODE) $(x86_CODE) -else -libfilter_la_SOURCES = $(libfilter_la_common_SOURCES) $(x86_SUBCODE) $(x86_CODE) -endif - -libfilter_qa_la_SOURCES = $(libfilter_qa_la_common_SOURCES) $(x86_qa_CODE) -endif - -if MD_CPU_powerpc -libfilter_la_SOURCES = $(libfilter_la_common_SOURCES) $(powerpc_CODE) -libfilter_qa_la_SOURCES = $(libfilter_qa_la_common_SOURCES) $(powerpc_qa_CODE) -endif - -if MD_CPU_armv7_a -libfilter_la_SOURCES = $(libfilter_la_common_SOURCES) $(armv7_a_CODE) -libfilter_qa_la_SOURCES = $(libfilter_qa_la_common_SOURCES) $(armv7_a_qa_CODE) -endif - - -grinclude_HEADERS = \ - $(GENERATED_H) \ - complex_dotprod_generic.h \ - complex_dotprod_x86.h \ - fcomplex_dotprod_x86.h \ - ccomplex_dotprod_generic.h \ - ccomplex_dotprod_x86.h \ - float_dotprod_generic.h \ - float_dotprod_x86.h \ - gr_adaptive_fir_ccc.h \ - gr_adaptive_fir_ccf.h \ - gr_altivec.h \ - gr_cpu.h \ - gri_fft_filter_fff_generic.h \ - gri_fft_filter_ccc_generic.h \ - gr_fft_filter_ccc.h \ - gr_fft_filter_fff.h \ - gr_filter_delay_fc.h \ - gr_fir_sysconfig_x86.h \ - gr_fir_sysconfig_powerpc.h \ - gr_fractional_interpolator_ff.h \ - gr_fractional_interpolator_cc.h \ - gr_goertzel_fc.h \ - gr_hilbert_fc.h \ - gr_iir_filter_ffd.h \ - gr_rotator.h \ - gr_sincos.h \ - gr_single_pole_iir.h \ - gr_single_pole_iir_filter_ff.h \ - gr_single_pole_iir_filter_cc.h \ - gr_vec_types.h \ - gri_goertzel.h \ - gri_iir.h \ - gri_mmse_fir_interpolator.h \ - gri_mmse_fir_interpolator_cc.h \ - qa_filter.h \ - short_dotprod_generic.h \ - short_dotprod_x86.h \ - sse_debug.h \ - gr_pfb_channelizer_ccf.h \ - gr_pfb_synthesis_filterbank_ccf.h\ - gr_pfb_decimator_ccf.h \ - gr_pfb_interpolator_ccf.h \ - gr_pfb_arb_resampler_ccf.h \ - gr_pfb_arb_resampler_fff.h \ - gr_pfb_clock_sync_ccf.h \ - gr_pfb_clock_sync_fff.h \ - gr_dc_blocker_cc.h \ - gr_dc_blocker_ff.h - -noinst_HEADERS = \ - assembly.h \ - gcc_x86_cpuid.h \ - dotprod_fff_altivec.h \ - dotprod_fff_armv7_a.h \ - dotprod_ccf_armv7_a.h \ - gr_fir_scc_simd.h \ - gr_fir_scc_x86.h \ - gr_fir_fcc_simd.h \ - gr_fir_fcc_x86.h \ - gr_fir_ccf_simd.h \ - gr_fir_ccf_x86.h \ - gr_fir_ccc_simd.h \ - gr_fir_ccc_x86.h \ - gr_fir_fff_altivec.h \ - gr_fir_fff_armv7_a.h \ - gr_fir_ccf_armv7_a.h \ - gr_fir_fff_simd.h \ - gr_fir_fff_x86.h \ - gr_fir_fsf_simd.h \ - gr_fir_fsf_x86.h \ - interpolator_taps.h \ - qa_complex_dotprod_x86.h \ - qa_ccomplex_dotprod_x86.h \ - qa_dotprod.h \ - qa_float_dotprod_x86.h \ - qa_gr_fir_ccf.h \ - qa_gr_fir_fcc.h \ - qa_gr_fir_fff.h \ - qa_gr_fir_ccc.h \ - qa_gr_fir_scc.h \ - qa_gr_rotator.h \ - qa_gri_mmse_fir_interpolator.h \ - qa_gri_mmse_fir_interpolator_cc.h \ - qa_gri_fir_filter_with_buffer_ccf.h \ - qa_gri_fir_filter_with_buffer_ccc.h \ - qa_gri_fir_filter_with_buffer_fcc.h \ - qa_gri_fir_filter_with_buffer_fff.h \ - qa_gri_fir_filter_with_buffer_fsf.h \ - qa_gri_fir_filter_with_buffer_scc.h - - -swiginclude_HEADERS = \ - filter.i \ - filter_generated.i \ - gr_adaptive_fir_ccc.i \ - gr_adaptive_fir_ccf.i \ - gr_fft_filter_ccc.i \ - gr_fft_filter_fff.i \ - gr_filter_delay_fc.i \ - gr_fractional_interpolator_ff.i \ - gr_fractional_interpolator_cc.i \ - gr_goertzel_fc.i \ - gr_hilbert_fc.i \ - gr_iir_filter_ffd.i \ - gr_single_pole_iir_filter_ff.i \ - gr_single_pole_iir_filter_cc.i \ - gr_pfb_channelizer_ccf.i \ - gr_pfb_synthesis_filterbank_ccf.i\ - gr_pfb_decimator_ccf.i \ - gr_pfb_interpolator_ccf.i \ - gr_pfb_arb_resampler_ccf.i \ - gr_pfb_arb_resampler_fff.i \ - gr_pfb_clock_sync_ccf.i \ - gr_pfb_clock_sync_fff.i \ - gr_dc_blocker_cc.i \ - gr_dc_blocker_ff.i \ - $(GENERATED_I) - - -# Do creation and inclusion of other Makefiles last - -# include the srcdir's Makefile.gen; doing this creates an implicit -# dependency between $(srcdir)/Makefile.in and $(srcdir)/Makefile.gen. -include $(srcdir)/Makefile.gen - -# common way for generating local Makefile.gen -makefile_gen_gen_command = PYTHONPATH=$(top_srcdir)/gnuradio-core/src/python srcdir=$(srcdir) do_makefile=1 do_sources=0 $(PYTHON) $(srcdir)/generate_all.py -include $(top_srcdir)/Makefile.gen.gen - -# common way for generating sources from templates when using -# BUILT_SOURCES, using parallel build protection. -gen_sources = $(BUILT_SOURCES) -gen_sources_deps = $(core_generator) -par_gen_command = PYTHONPATH=$(top_srcdir)/gnuradio-core/src/python srcdir=$(srcdir) $(PYTHON) $(srcdir)/generate_all.py -include $(top_srcdir)/Makefile.par.gen diff --git a/gnuradio-core/src/lib/filter/README b/gnuradio-core/src/lib/filter/README index a68e32a4e..90c1584fc 100644 --- a/gnuradio-core/src/lib/filter/README +++ b/gnuradio-core/src/lib/filter/README @@ -1,23 +1,23 @@ # # Copyright 2004 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# This directory holds filtering code, some of which is machine generated. Which variations are generated is controlled by two diff --git a/gnuradio-core/src/lib/filter/assembly.h b/gnuradio-core/src/lib/filter/assembly.h index 8a99aa07c..32477dfd7 100644 --- a/gnuradio-core/src/lib/filter/assembly.h +++ b/gnuradio-core/src/lib/filter/assembly.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/ccomplex_dotprod_3dnow.S b/gnuradio-core/src/lib/filter/ccomplex_dotprod_3dnow.S index 26f5830f9..8844e5108 100644 --- a/gnuradio-core/src/lib/filter/ccomplex_dotprod_3dnow.S +++ b/gnuradio-core/src/lib/filter/ccomplex_dotprod_3dnow.S @@ -1,28 +1,28 @@ # # Copyright 2002 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. -# +# # input and taps are guarenteed to be 16 byte aligned. # n_2_ccomplex_blocks is != 0 -# +# # # ccomplex_dotprod_generic (const float *input, # const float *taps, unsigned n_2_ccomplex_blocks, float *result) @@ -31,24 +31,24 @@ # float sum1 = 0; # float sum2 = 0; # float sum3 = 0; -# +# # do { -# +# # sum0 += input[0] * taps[0] - input[1] * taps[1]; # sum1 += input[0] * taps[1] + input[1] * taps[0]; # sum2 += input[2] * taps[2] - input[3] * taps[3]; # sum3 += input[2] * taps[3] + input[3] * taps[2]; -# +# # input += 4; # taps += 4; -# +# # } while (--n_2_ccomplex_blocks != 0); -# -# +# +# # result[0] = sum0 + sum2; # result[1] = sum1 + sum3; # } -# +# # TODO: prefetch and better scheduling @@ -68,12 +68,12 @@ GLOB_SYMB(ccomplex_dotprod_3dnow): movl 16(%ebp), %ecx # n_2_ccomplex_blocks # zero accumulators - - pxor %mm6, %mm6 # mm6 = 0 0 + + pxor %mm6, %mm6 # mm6 = 0 0 movq 0(%eax), %mm0 - pxor %mm7, %mm7 # mm7 = 0 0 + pxor %mm7, %mm7 # mm7 = 0 0 movq 0(%edx), %mm2 @@ -89,9 +89,9 @@ GLOB_SYMB(ccomplex_dotprod_3dnow): # 4 taps / loop # something like ?? cycles / loop # - + .p2align 4 -.Loop1: +.Loop1: # complex prod: C += A * B, w/ temp Z, mmPN=$80000000 # @@ -170,11 +170,11 @@ GLOB_SYMB(ccomplex_dotprod_3dnow): # We've handled the bulk of multiplies up to here. # Let's see if original n_2_ccomplex_blocks was odd. # If so, we've got 2 more taps to do. - + movl 16(%ebp), %ecx # n_2_ccomplex_blocks andl $1, %ecx je .Leven - + # The count was odd, do 2 more taps. # Note that we've already got mm0/mm2 & mm1/mm3 preloaded # from the main loop. diff --git a/gnuradio-core/src/lib/filter/ccomplex_dotprod_3dnow64.S b/gnuradio-core/src/lib/filter/ccomplex_dotprod_3dnow64.S index feaf1cb03..d92fe17a3 100644 --- a/gnuradio-core/src/lib/filter/ccomplex_dotprod_3dnow64.S +++ b/gnuradio-core/src/lib/filter/ccomplex_dotprod_3dnow64.S @@ -1,28 +1,28 @@ # # Copyright 2002,2005 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. -# +# # input and taps are guarenteed to be 16 byte aligned. # n_2_ccomplex_blocks is != 0 -# +# # # ccomplex_dotprod_generic (const float *input, # const float *taps, unsigned n_2_ccomplex_blocks, float *result) @@ -31,24 +31,24 @@ # float sum1 = 0; # float sum2 = 0; # float sum3 = 0; -# +# # do { -# +# # sum0 += input[0] * taps[0] - input[1] * taps[1]; # sum1 += input[0] * taps[1] + input[1] * taps[0]; # sum2 += input[2] * taps[2] - input[3] * taps[3]; # sum3 += input[2] * taps[3] + input[3] * taps[2]; -# +# # input += 4; # taps += 4; -# +# # } while (--n_2_ccomplex_blocks != 0); -# -# +# +# # result[0] = sum0 + sum2; # result[1] = sum1 + sum3; # } -# +# # TODO: prefetch and better scheduling @@ -68,12 +68,12 @@ GLOB_SYMB(ccomplex_dotprod_3dnow): mov %rdx, %rax # zero accumulators - - pxor %mm6, %mm6 # mm6 = 0 0 + + pxor %mm6, %mm6 # mm6 = 0 0 movq 0(%rdi), %mm0 - pxor %mm7, %mm7 # mm7 = 0 0 + pxor %mm7, %mm7 # mm7 = 0 0 movq 0(%rsi), %mm2 @@ -89,9 +89,9 @@ GLOB_SYMB(ccomplex_dotprod_3dnow): # 4 taps / loop # something like ?? cycles / loop # - + .p2align 4 -.Loop1: +.Loop1: # complex prod: C += A * B, w/ temp Z, mmPN=$80000000 # @@ -170,10 +170,10 @@ GLOB_SYMB(ccomplex_dotprod_3dnow): # We've handled the bulk of multiplies up to here. # Let's see if original n_2_ccomplex_blocks was odd. # If so, we've got 2 more taps to do. - + and $1, %rdx je .Leven - + # The count was odd, do 2 more taps. # Note that we've already got mm0/mm2 & mm1/mm3 preloaded # from the main loop. diff --git a/gnuradio-core/src/lib/filter/ccomplex_dotprod_3dnowext.S b/gnuradio-core/src/lib/filter/ccomplex_dotprod_3dnowext.S index 1a09cc3e9..c4a02d7fb 100644 --- a/gnuradio-core/src/lib/filter/ccomplex_dotprod_3dnowext.S +++ b/gnuradio-core/src/lib/filter/ccomplex_dotprod_3dnowext.S @@ -1,28 +1,28 @@ # # Copyright 2002 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. -# +# # input and taps are guarenteed to be 16 byte aligned. # n_2_ccomplex_blocks is != 0 -# +# # # ccomplex_dotprod_generic (const float *input, # const float *taps, unsigned n_2_ccomplex_blocks, float *result) @@ -31,24 +31,24 @@ # float sum1 = 0; # float sum2 = 0; # float sum3 = 0; -# +# # do { -# +# # sum0 += input[0] * taps[0] - input[1] * taps[1]; # sum1 += input[0] * taps[1] + input[1] * taps[0]; # sum2 += input[2] * taps[2] - input[3] * taps[3]; # sum3 += input[2] * taps[3] + input[3] * taps[2]; -# +# # input += 4; # taps += 4; -# +# # } while (--n_2_ccomplex_blocks != 0); -# -# +# +# # result[0] = sum0 + sum2; # result[1] = sum1 + sum3; # } -# +# # TODO: prefetch and better scheduling @@ -68,8 +68,8 @@ GLOB_SYMB(ccomplex_dotprod_3dnowext): movl 16(%ebp), %ecx # n_2_ccomplex_blocks # zero accumulators - - pxor %mm6, %mm6 # mm6 = 0 0 + + pxor %mm6, %mm6 # mm6 = 0 0 pxor %mm7, %mm7 # mm7 = 0 0 movq 0(%eax), %mm0 @@ -79,7 +79,7 @@ GLOB_SYMB(ccomplex_dotprod_3dnowext): movq 8(%eax), %mm1 movq 8(%edx), %mm3 - + jmp .L1_test @@ -87,9 +87,9 @@ GLOB_SYMB(ccomplex_dotprod_3dnowext): # 4 taps / loop # something like ?? cycles / loop # - + .p2align 4 -.Loop1: +.Loop1: # complex prod: C += A * B, w/ temp Z # @@ -149,15 +149,15 @@ GLOB_SYMB(ccomplex_dotprod_3dnowext): # We've handled the bulk of multiplies up to here. # Let's see if original n_2_ccomplex_blocks was odd. # If so, we've got 2 more taps to do. - + movl 16(%ebp), %ecx # n_2_ccomplex_blocks andl $1, %ecx je .Leven - + # The count was odd, do 2 more taps. # Note that we've already got mm0/mm2 & mm1/mm3 preloaded # from the main loop. - + # A=mm0, B=mm2, Z=mm4 # A'=mm1, B'=mm3, Z'=mm5 @@ -175,7 +175,7 @@ GLOB_SYMB(ccomplex_dotprod_3dnowext): .Leven: # at this point mm6 and mm7 contain partial sums - + pfadd %mm7, %mm6 movl 20(%ebp), %eax # result diff --git a/gnuradio-core/src/lib/filter/ccomplex_dotprod_3dnowext64.S b/gnuradio-core/src/lib/filter/ccomplex_dotprod_3dnowext64.S index 75f5af280..c4f9e1970 100644 --- a/gnuradio-core/src/lib/filter/ccomplex_dotprod_3dnowext64.S +++ b/gnuradio-core/src/lib/filter/ccomplex_dotprod_3dnowext64.S @@ -1,28 +1,28 @@ # # Copyright 2002,2005 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. -# +# # input and taps are guarenteed to be 16 byte aligned. # n_2_ccomplex_blocks is != 0 -# +# # # ccomplex_dotprod_generic (const float *input, # const float *taps, unsigned n_2_ccomplex_blocks, float *result) @@ -31,24 +31,24 @@ # float sum1 = 0; # float sum2 = 0; # float sum3 = 0; -# +# # do { -# +# # sum0 += input[0] * taps[0] - input[1] * taps[1]; # sum1 += input[0] * taps[1] + input[1] * taps[0]; # sum2 += input[2] * taps[2] - input[3] * taps[3]; # sum3 += input[2] * taps[3] + input[3] * taps[2]; -# +# # input += 4; # taps += 4; -# +# # } while (--n_2_ccomplex_blocks != 0); -# -# +# +# # result[0] = sum0 + sum2; # result[1] = sum1 + sum3; # } -# +# # TODO: prefetch and better scheduling @@ -68,8 +68,8 @@ GLOB_SYMB(ccomplex_dotprod_3dnowext): # zero accumulators - - pxor %mm6, %mm6 # mm6 = 0 0 + + pxor %mm6, %mm6 # mm6 = 0 0 pxor %mm7, %mm7 # mm7 = 0 0 movq 0(%rdi), %mm0 @@ -79,7 +79,7 @@ GLOB_SYMB(ccomplex_dotprod_3dnowext): movq 8(%rdi), %mm1 movq 8(%rsi), %mm3 - + jmp .L1_test @@ -87,9 +87,9 @@ GLOB_SYMB(ccomplex_dotprod_3dnowext): # 4 taps / loop # something like ?? cycles / loop # - + .p2align 4 -.Loop1: +.Loop1: # complex prod: C += A * B, w/ temp Z # @@ -149,14 +149,14 @@ GLOB_SYMB(ccomplex_dotprod_3dnowext): # We've handled the bulk of multiplies up to here. # Let's see if original n_2_ccomplex_blocks was odd. # If so, we've got 2 more taps to do. - + and $1, %rdx je .Leven - + # The count was odd, do 2 more taps. # Note that we've already got mm0/mm2 & mm1/mm3 preloaded # from the main loop. - + # A=mm0, B=mm2, Z=mm4 # A'=mm1, B'=mm3, Z'=mm5 @@ -174,7 +174,7 @@ GLOB_SYMB(ccomplex_dotprod_3dnowext): .Leven: # at this point mm6 and mm7 contain partial sums - + pfadd %mm7, %mm6 movq %mm6, (%rcx) # result diff --git a/gnuradio-core/src/lib/filter/ccomplex_dotprod_generic.cc b/gnuradio-core/src/lib/filter/ccomplex_dotprod_generic.cc index 0dc0c38b7..a6f392211 100644 --- a/gnuradio-core/src/lib/filter/ccomplex_dotprod_generic.cc +++ b/gnuradio-core/src/lib/filter/ccomplex_dotprod_generic.cc @@ -1,19 +1,19 @@ /* -*- c -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/ccomplex_dotprod_generic.h b/gnuradio-core/src/lib/filter/ccomplex_dotprod_generic.h index c03743776..c7d761c07 100644 --- a/gnuradio-core/src/lib/filter/ccomplex_dotprod_generic.h +++ b/gnuradio-core/src/lib/filter/ccomplex_dotprod_generic.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/ccomplex_dotprod_sse.S b/gnuradio-core/src/lib/filter/ccomplex_dotprod_sse.S index a06ce4d36..b50a3690d 100644 --- a/gnuradio-core/src/lib/filter/ccomplex_dotprod_sse.S +++ b/gnuradio-core/src/lib/filter/ccomplex_dotprod_sse.S @@ -1,28 +1,28 @@ # # Copyright 2002 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. -# +# # input and taps are guarenteed to be 16 byte aligned. # n_2_ccomplex_blocks is != 0 -# +# # # ccomplex_dotprod_generic (const float *input, # const float *taps, unsigned n_2_ccomplex_blocks, float *result) @@ -31,20 +31,20 @@ # float sum1 = 0; # float sum2 = 0; # float sum3 = 0; -# +# # do { # # sum0 += input[0] * taps[0] - input[1] * taps[1]; # sum1 += input[0] * taps[1] + input[1] * taps[0]; # sum2 += input[2] * taps[2] - input[3] * taps[3]; # sum3 += input[2] * taps[3] + input[3] * taps[2]; -# +# # input += 4; -# taps += 4; -# +# taps += 4; +# # } while (--n_2_ccomplex_blocks != 0); -# -# +# +# # result[0] = sum0 + sum2; # result[1] = sum1 + sum3; # } @@ -68,7 +68,7 @@ GLOB_SYMB(ccomplex_dotprod_sse): movl 16(%ebp), %ecx # n_2_ccomplex_blocks xorps %xmm6, %xmm6 # zero accumulators - + movaps 0(%eax), %xmm0 xorps %xmm7, %xmm7 # zero accumulators @@ -83,9 +83,9 @@ GLOB_SYMB(ccomplex_dotprod_sse): # 4 taps / loop # something like ?? cycles / loop # - + .p2align 4 -.Loop1: +.Loop1: # complex prod: C += A * B, w/ temp Z & Y (or B), xmmPN=$0x8000000080000000 # @@ -146,11 +146,11 @@ GLOB_SYMB(ccomplex_dotprod_sse): # We've handled the bulk of multiplies up to here. # Let's sse if original n_2_ccomplex_blocks was odd. # If so, we've got 2 more taps to do. - + movl 16(%ebp), %ecx # n_2_ccomplex_blocks andl $1, %ecx je .Leven - + # The count was odd, do 2 more taps. # Note that we've already got mm0/mm2 preloaded # from the main loop. diff --git a/gnuradio-core/src/lib/filter/ccomplex_dotprod_sse64.S b/gnuradio-core/src/lib/filter/ccomplex_dotprod_sse64.S index 6da4f2eb4..ef89ae638 100644 --- a/gnuradio-core/src/lib/filter/ccomplex_dotprod_sse64.S +++ b/gnuradio-core/src/lib/filter/ccomplex_dotprod_sse64.S @@ -1,28 +1,28 @@ # # Copyright 2002,2005 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. -# +# # input and taps are guarenteed to be 16 byte aligned. # n_2_ccomplex_blocks is != 0 -# +# # # ccomplex_dotprod_generic (const float *input, # const float *taps, unsigned n_2_ccomplex_blocks, float *result) @@ -31,20 +31,20 @@ # float sum1 = 0; # float sum2 = 0; # float sum3 = 0; -# +# # do { # # sum0 += input[0] * taps[0] - input[1] * taps[1]; # sum1 += input[0] * taps[1] + input[1] * taps[0]; # sum2 += input[2] * taps[2] - input[3] * taps[3]; # sum3 += input[2] * taps[3] + input[3] * taps[2]; -# +# # input += 4; -# taps += 4; -# +# taps += 4; +# # } while (--n_2_ccomplex_blocks != 0); -# -# +# +# # result[0] = sum0 + sum2; # result[1] = sum1 + sum3; # } @@ -68,7 +68,7 @@ GLOB_SYMB(ccomplex_dotprod_sse): mov %rdx, %rax xorps %xmm6, %xmm6 # zero accumulators - + movaps 0(%rdi), %xmm0 xorps %xmm7, %xmm7 # zero accumulators @@ -83,9 +83,9 @@ GLOB_SYMB(ccomplex_dotprod_sse): # 4 taps / loop # something like ?? cycles / loop # - + .p2align 4 -.Loop1: +.Loop1: # complex prod: C += A * B, w/ temp Z & Y (or B), xmmPN=$0x8000000080000000 # @@ -146,10 +146,10 @@ GLOB_SYMB(ccomplex_dotprod_sse): # We've handled the bulk of multiplies up to here. # Let's sse if original n_2_ccomplex_blocks was odd. # If so, we've got 2 more taps to do. - + and $1, %rdx je .Leven - + # The count was odd, do 2 more taps. # Note that we've already got mm0/mm2 preloaded # from the main loop. diff --git a/gnuradio-core/src/lib/filter/ccomplex_dotprod_x86.h b/gnuradio-core/src/lib/filter/ccomplex_dotprod_x86.h index 5aed21800..ebb63c258 100644 --- a/gnuradio-core/src/lib/filter/ccomplex_dotprod_x86.h +++ b/gnuradio-core/src/lib/filter/ccomplex_dotprod_x86.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/complex_dotprod_3dnow.S b/gnuradio-core/src/lib/filter/complex_dotprod_3dnow.S index 6e46bf7b8..df7761c40 100644 --- a/gnuradio-core/src/lib/filter/complex_dotprod_3dnow.S +++ b/gnuradio-core/src/lib/filter/complex_dotprod_3dnow.S @@ -1,28 +1,28 @@ # # Copyright 2002 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. -# +# # input and taps are guarenteed to be 16 byte aligned. # n_2_complex_blocks is != 0 -# +# # # complex_dotprod_generic (const short *input, # const float *taps, unsigned n_2_complex_blocks, float *result) @@ -31,24 +31,24 @@ # float sum1 = 0; # float sum2 = 0; # float sum3 = 0; -# +# # do { -# +# # sum0 += input[0] * taps[0]; # sum1 += input[0] * taps[1]; # sum2 += input[1] * taps[2]; # sum3 += input[1] * taps[3]; -# +# # input += 2; # taps += 4; -# +# # } while (--n_2_complex_blocks != 0); -# -# +# +# # result[0] = sum0 + sum2; # result[1] = sum1 + sum3; # } -# +# #include "assembly.h" @@ -66,10 +66,10 @@ GLOB_SYMB(complex_dotprod_3dnow): movl 16(%ebp), %ecx # zero accumulators - + pxor %mm4, %mm4 # mm4 = 0 0 - pxor %mm5, %mm5 # mm5 = 0 0 - pxor %mm6, %mm6 # mm6 = 0 0 + pxor %mm5, %mm5 # mm5 = 0 0 + pxor %mm6, %mm6 # mm6 = 0 0 pxor %mm7, %mm7 # mm7 = 0 0 @@ -98,9 +98,9 @@ GLOB_SYMB(complex_dotprod_3dnow): # 4 taps / loop # something like ?? cycles / loop # - + .p2align 4 -.Loop1: +.Loop1: pfmul 0(%edx), %mm0 pfadd %mm2, %mm6 @@ -151,17 +151,17 @@ GLOB_SYMB(complex_dotprod_3dnow): # Now accumulate the final two additions and see if original # n_2_complex_blocks was odd. If so, we've got 2 more # taps to do. - + movl 16(%ebp), %ecx pfadd %mm2, %mm6 andl $1, %ecx pfadd %mm3, %mm7 je .Leven - + # The count was odd, do 2 more taps. # Note that we've already got mm0 and mm1 preloaded # from the main loop. - + pfmul 0(%edx), %mm0 pfadd %mm0, %mm4 pfmul 8(%edx), %mm1 @@ -169,7 +169,7 @@ GLOB_SYMB(complex_dotprod_3dnow): .Leven: # at this point mm4, mm5, mm6 and mm7 contain partial sums - + pfadd %mm7, %mm6 pfadd %mm5, %mm4 diff --git a/gnuradio-core/src/lib/filter/complex_dotprod_3dnow64.S b/gnuradio-core/src/lib/filter/complex_dotprod_3dnow64.S index fe9784550..ac5a7d1be 100644 --- a/gnuradio-core/src/lib/filter/complex_dotprod_3dnow64.S +++ b/gnuradio-core/src/lib/filter/complex_dotprod_3dnow64.S @@ -1,28 +1,28 @@ # # Copyright 2002,2005 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. -# +# # input and taps are guarenteed to be 16 byte aligned. # n_2_complex_blocks is != 0 -# +# # # complex_dotprod_generic (const short *input, # const float *taps, unsigned n_2_complex_blocks, float *result) @@ -31,24 +31,24 @@ # float sum1 = 0; # float sum2 = 0; # float sum3 = 0; -# +# # do { -# +# # sum0 += input[0] * taps[0]; # sum1 += input[0] * taps[1]; # sum2 += input[1] * taps[2]; # sum3 += input[1] * taps[3]; -# +# # input += 2; # taps += 4; -# +# # } while (--n_2_complex_blocks != 0); -# -# +# +# # result[0] = sum0 + sum2; # result[1] = sum1 + sum3; # } -# +# #include "assembly.h" @@ -66,10 +66,10 @@ GLOB_SYMB(complex_dotprod_3dnow): mov %rdx, %rax # zero accumulators - + pxor %mm4, %mm4 # mm4 = 0 0 - pxor %mm5, %mm5 # mm5 = 0 0 - pxor %mm6, %mm6 # mm6 = 0 0 + pxor %mm5, %mm5 # mm5 = 0 0 + pxor %mm6, %mm6 # mm6 = 0 0 pxor %mm7, %mm7 # mm7 = 0 0 @@ -98,9 +98,9 @@ GLOB_SYMB(complex_dotprod_3dnow): # 4 taps / loop # something like ?? cycles / loop # - + .p2align 4 -.Loop1: +.Loop1: pfmul 0(%rsi), %mm0 pfadd %mm2, %mm6 @@ -151,16 +151,16 @@ GLOB_SYMB(complex_dotprod_3dnow): # Now accumulate the final two additions and see if original # n_2_complex_blocks was odd. If so, we've got 2 more # taps to do. - + pfadd %mm2, %mm6 and $1, %rdx pfadd %mm3, %mm7 je .Leven - + # The count was odd, do 2 more taps. # Note that we've already got mm0 and mm1 preloaded # from the main loop. - + pfmul 0(%rsi), %mm0 pfadd %mm0, %mm4 pfmul 8(%rsi), %mm1 @@ -168,7 +168,7 @@ GLOB_SYMB(complex_dotprod_3dnow): .Leven: # at this point mm4, mm5, mm6 and mm7 contain partial sums - + pfadd %mm7, %mm6 pfadd %mm5, %mm4 pfadd %mm6, %mm4 diff --git a/gnuradio-core/src/lib/filter/complex_dotprod_3dnowext.S b/gnuradio-core/src/lib/filter/complex_dotprod_3dnowext.S index 122fd2b59..1d4be32c3 100644 --- a/gnuradio-core/src/lib/filter/complex_dotprod_3dnowext.S +++ b/gnuradio-core/src/lib/filter/complex_dotprod_3dnowext.S @@ -1,28 +1,28 @@ # # Copyright 2002 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. -# +# # input and taps are guarenteed to be 16 byte aligned. # n_2_complex_blocks is != 0 -# +# # # complex_dotprod_generic (const short *input, # const float *taps, unsigned n_2_complex_blocks, float *result) @@ -31,24 +31,24 @@ # float sum1 = 0; # float sum2 = 0; # float sum3 = 0; -# +# # do { -# +# # sum0 += input[0] * taps[0]; # sum1 += input[0] * taps[1]; # sum2 += input[1] * taps[2]; # sum3 += input[1] * taps[3]; -# +# # input += 2; # taps += 4; -# +# # } while (--n_2_complex_blocks != 0); -# -# +# +# # result[0] = sum0 + sum2; # result[1] = sum1 + sum3; # } -# +# #include "assembly.h" @@ -66,10 +66,10 @@ GLOB_SYMB(complex_dotprod_3dnowext): movl 16(%ebp), %ecx # zero accumulators - + pxor %mm4, %mm4 # mm4 = 0 0 - pxor %mm5, %mm5 # mm5 = 0 0 - pxor %mm6, %mm6 # mm6 = 0 0 + pxor %mm5, %mm5 # mm5 = 0 0 + pxor %mm6, %mm6 # mm6 = 0 0 pxor %mm7, %mm7 # mm7 = 0 0 @@ -91,9 +91,9 @@ GLOB_SYMB(complex_dotprod_3dnowext): # 4 taps / loop # something like ?? cycles / loop # - + .p2align 4 -.Loop1: +.Loop1: pfmul 0(%edx), %mm0 pfadd %mm2, %mm6 @@ -131,17 +131,17 @@ GLOB_SYMB(complex_dotprod_3dnowext): # Now accumulate the final two additions and see if original # n_2_complex_blocks was odd. If so, we've got 2 more # taps to do. - + movl 16(%ebp), %ecx pfadd %mm2, %mm6 andl $1, %ecx pfadd %mm3, %mm7 je .Leven - + # The count was odd, do 2 more taps. # Note that we've already got mm0 and mm1 preloaded # from the main loop. - + pfmul 0(%edx), %mm0 pfadd %mm0, %mm4 pfmul 8(%edx), %mm1 @@ -149,7 +149,7 @@ GLOB_SYMB(complex_dotprod_3dnowext): .Leven: # at this point mm4, mm5, mm6 and mm7 contain partial sums - + pfadd %mm7, %mm6 pfadd %mm5, %mm4 diff --git a/gnuradio-core/src/lib/filter/complex_dotprod_3dnowext64.S b/gnuradio-core/src/lib/filter/complex_dotprod_3dnowext64.S index 94905497b..018fefe28 100644 --- a/gnuradio-core/src/lib/filter/complex_dotprod_3dnowext64.S +++ b/gnuradio-core/src/lib/filter/complex_dotprod_3dnowext64.S @@ -1,28 +1,28 @@ # # Copyright 2002,2005 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. -# +# # input and taps are guarenteed to be 16 byte aligned. # n_2_complex_blocks is != 0 -# +# # # complex_dotprod_generic (const short *input, # const float *taps, unsigned n_2_complex_blocks, float *result) @@ -31,24 +31,24 @@ # float sum1 = 0; # float sum2 = 0; # float sum3 = 0; -# +# # do { -# +# # sum0 += input[0] * taps[0]; # sum1 += input[0] * taps[1]; # sum2 += input[1] * taps[2]; # sum3 += input[1] * taps[3]; -# +# # input += 2; # taps += 4; -# +# # } while (--n_2_complex_blocks != 0); -# -# +# +# # result[0] = sum0 + sum2; # result[1] = sum1 + sum3; # } -# +# #include "assembly.h" @@ -66,10 +66,10 @@ GLOB_SYMB(complex_dotprod_3dnowext): mov %rdx, %rax # zero accumulators - + pxor %mm4, %mm4 # mm4 = 0 0 - pxor %mm5, %mm5 # mm5 = 0 0 - pxor %mm6, %mm6 # mm6 = 0 0 + pxor %mm5, %mm5 # mm5 = 0 0 + pxor %mm6, %mm6 # mm6 = 0 0 pxor %mm7, %mm7 # mm7 = 0 0 @@ -91,9 +91,9 @@ GLOB_SYMB(complex_dotprod_3dnowext): # 4 taps / loop # something like ?? cycles / loop # - + .p2align 4 -.Loop1: +.Loop1: pfmul 0(%rsi), %mm0 pfadd %mm2, %mm6 @@ -131,16 +131,16 @@ GLOB_SYMB(complex_dotprod_3dnowext): # Now accumulate the final two additions and see if original # n_2_complex_blocks was odd. If so, we've got 2 more # taps to do. - + pfadd %mm2, %mm6 and $1, %rdx pfadd %mm3, %mm7 je .Leven - + # The count was odd, do 2 more taps. # Note that we've already got mm0 and mm1 preloaded # from the main loop. - + pfmul 0(%rsi), %mm0 pfadd %mm0, %mm4 pfmul 8(%rsi), %mm1 @@ -148,7 +148,7 @@ GLOB_SYMB(complex_dotprod_3dnowext): .Leven: # at this point mm4, mm5, mm6 and mm7 contain partial sums - + pfadd %mm7, %mm6 pfadd %mm5, %mm4 diff --git a/gnuradio-core/src/lib/filter/complex_dotprod_generic.cc b/gnuradio-core/src/lib/filter/complex_dotprod_generic.cc index 8cbc4aa70..229cbe978 100644 --- a/gnuradio-core/src/lib/filter/complex_dotprod_generic.cc +++ b/gnuradio-core/src/lib/filter/complex_dotprod_generic.cc @@ -1,19 +1,19 @@ /* -*- c -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/complex_dotprod_generic.h b/gnuradio-core/src/lib/filter/complex_dotprod_generic.h index aed82179e..152f6e459 100644 --- a/gnuradio-core/src/lib/filter/complex_dotprod_generic.h +++ b/gnuradio-core/src/lib/filter/complex_dotprod_generic.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/complex_dotprod_sse.S b/gnuradio-core/src/lib/filter/complex_dotprod_sse.S index ff5ef5d0c..fff1057dd 100644 --- a/gnuradio-core/src/lib/filter/complex_dotprod_sse.S +++ b/gnuradio-core/src/lib/filter/complex_dotprod_sse.S @@ -1,28 +1,28 @@ # # Copyright 2002 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. -# +# # input and taps are guarenteed to be 16 byte aligned. # n_2_complex_blocks is != 0 -# +# # # complex_dotprod_generic (const short *input, # const float *taps, unsigned n_2_complex_blocks, float *result) @@ -31,20 +31,20 @@ # float sum1 = 0; # float sum2 = 0; # float sum3 = 0; -# +# # do { -# +# # sum0 += input[0] * taps[0]; # sum1 += input[0] * taps[1]; # sum2 += input[1] * taps[2]; # sum3 += input[1] * taps[3]; -# +# # input += 2; # taps += 4; -# +# # } while (--n_2_complex_blocks != 0); -# -# +# +# # result[0] = sum0 + sum2; # result[1] = sum1 + sum3; # } @@ -68,7 +68,7 @@ GLOB_SYMB(complex_dotprod_sse): movl 12(%ebp), %edx # taps movl 16(%ebp), %ecx - + # xmm0 xmm1 xmm2 xmm3 are used to hold taps and the result of mults # xmm4 xmm5 xmm6 xmm7 are used to hold the accumulated results @@ -81,7 +81,7 @@ GLOB_SYMB(complex_dotprod_sse): jmp .L1_test .p2align 4 -.Loop1: +.Loop1: pxor %mm0, %mm0 punpcklwd 0(%eax), %mm0 @@ -93,16 +93,16 @@ GLOB_SYMB(complex_dotprod_sse): addl $0x10, %edx addl $4, %eax addps %xmm0, %xmm4 -.L1_test: +.L1_test: decl %ecx jge .Loop1 - + # set up for primary loop which is unrolled 4 times - + movl 16(%ebp), %ecx movaps %xmm5, %xmm6 # zero remaining accumulators - movaps %xmm5, %xmm7 + movaps %xmm5, %xmm7 shrl $2, %ecx # n_2_complex_blocks / 4 je .Lcleanup # if zero, take short path @@ -184,10 +184,10 @@ GLOB_SYMB(complex_dotprod_sse): addps %xmm6, %xmm7 addps %xmm7, %xmm4 - + # At this point, xmm4 contains 2x2 partial sums. We need - # to compute a "horizontal complex add" across xmm4. - + # to compute a "horizontal complex add" across xmm4. + .Lcleanup: # xmm4 = r1 i2 r3 i4 movl 20(%ebp), %eax # @result movhlps %xmm4, %xmm0 # xmm0 = ?? ?? r1 r2 diff --git a/gnuradio-core/src/lib/filter/complex_dotprod_sse64.S b/gnuradio-core/src/lib/filter/complex_dotprod_sse64.S index 2e9456547..77f0c3178 100644 --- a/gnuradio-core/src/lib/filter/complex_dotprod_sse64.S +++ b/gnuradio-core/src/lib/filter/complex_dotprod_sse64.S @@ -1,28 +1,28 @@ # # Copyright 2002,2005 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. -# +# # input and taps are guarenteed to be 16 byte aligned. # n_2_complex_blocks is != 0 -# +# # # complex_dotprod_generic (const short *input, # const float *taps, unsigned n_2_complex_blocks, float *result) @@ -31,20 +31,20 @@ # float sum1 = 0; # float sum2 = 0; # float sum3 = 0; -# +# # do { -# +# # sum0 += input[0] * taps[0]; # sum1 += input[0] * taps[1]; # sum2 += input[1] * taps[2]; # sum3 += input[1] * taps[3]; -# +# # input += 2; # taps += 4; -# +# # } while (--n_2_complex_blocks != 0); -# -# +# +# # result[0] = sum0 + sum2; # result[1] = sum1 + sum3; # } @@ -67,7 +67,7 @@ GLOB_SYMB(complex_dotprod_sse): mov %rdx, %rax - + # xmm0 xmm1 xmm2 xmm3 are used to hold taps and the result of mults # xmm4 xmm5 xmm6 xmm7 are used to hold the accumulated results @@ -80,7 +80,7 @@ GLOB_SYMB(complex_dotprod_sse): jmp .L1_test .p2align 4 -.Loop1: +.Loop1: pxor %mm0, %mm0 punpcklwd 0(%rdi), %mm0 @@ -92,16 +92,16 @@ GLOB_SYMB(complex_dotprod_sse): add $0x10, %rsi add $4, %rdi addps %xmm0, %xmm4 -.L1_test: +.L1_test: dec %rax jge .Loop1 - + # set up for primary loop which is unrolled 4 times - + movaps %xmm5, %xmm6 # zero remaining accumulators shr $2, %rdx # n_2_complex_blocks / 4 - movaps %xmm5, %xmm7 + movaps %xmm5, %xmm7 je .Lcleanup # if zero, take short path @@ -182,10 +182,10 @@ GLOB_SYMB(complex_dotprod_sse): addps %xmm6, %xmm7 addps %xmm7, %xmm4 - + # At this point, xmm4 contains 2x2 partial sums. We need - # to compute a "horizontal complex add" across xmm4. - + # to compute a "horizontal complex add" across xmm4. + .Lcleanup: # xmm4 = r1 i2 r3 i4 movhlps %xmm4, %xmm0 # xmm0 = ?? ?? r1 r2 addps %xmm4, %xmm0 # xmm0 = ?? ?? r1+r3 i2+i4 diff --git a/gnuradio-core/src/lib/filter/complex_dotprod_x86.h b/gnuradio-core/src/lib/filter/complex_dotprod_x86.h index e2489edcf..aad9fb5e9 100644 --- a/gnuradio-core/src/lib/filter/complex_dotprod_x86.h +++ b/gnuradio-core/src/lib/filter/complex_dotprod_x86.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/dotprod_ccf_armv7_a.c b/gnuradio-core/src/lib/filter/dotprod_ccf_armv7_a.c index 90bd2ee10..e7c6b266e 100644 --- a/gnuradio-core/src/lib/filter/dotprod_ccf_armv7_a.c +++ b/gnuradio-core/src/lib/filter/dotprod_ccf_armv7_a.c @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/gnuradio-core/src/lib/filter/dotprod_ccf_armv7_a.h b/gnuradio-core/src/lib/filter/dotprod_ccf_armv7_a.h index 7ee728ac4..e42d6d10b 100644 --- a/gnuradio-core/src/lib/filter/dotprod_ccf_armv7_a.h +++ b/gnuradio-core/src/lib/filter/dotprod_ccf_armv7_a.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/gnuradio-core/src/lib/filter/dotprod_fff_altivec.c b/gnuradio-core/src/lib/filter/dotprod_fff_altivec.c index bebf7e401..53d6df714 100644 --- a/gnuradio-core/src/lib/filter/dotprod_fff_altivec.c +++ b/gnuradio-core/src/lib/filter/dotprod_fff_altivec.c @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -129,7 +129,7 @@ dotprod_fff_altivec(const float *_a, const float *_b, size_t n) switch (nleft){ case 0: break; - + case 4: acc0 = vec_madd(a0, b0, acc0); break; @@ -151,7 +151,7 @@ dotprod_fff_altivec(const float *_a, const float *_b, size_t n) acc2 = vec_madd(a2, b2, acc2); break; } - + acc0 = acc0 + acc1; acc2 = acc2 + acc3; acc0 = acc0 + acc2; diff --git a/gnuradio-core/src/lib/filter/dotprod_fff_altivec.h b/gnuradio-core/src/lib/filter/dotprod_fff_altivec.h index af9210382..a52370d56 100644 --- a/gnuradio-core/src/lib/filter/dotprod_fff_altivec.h +++ b/gnuradio-core/src/lib/filter/dotprod_fff_altivec.h @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -39,7 +39,7 @@ extern "C" { * * </pre> */ -float +float dotprod_fff_altivec(const float *a, const float *b, size_t n); #ifdef __cplusplus diff --git a/gnuradio-core/src/lib/filter/dotprod_fff_armv7_a.c b/gnuradio-core/src/lib/filter/dotprod_fff_armv7_a.c index c3275c331..68c448b35 100644 --- a/gnuradio-core/src/lib/filter/dotprod_fff_armv7_a.c +++ b/gnuradio-core/src/lib/filter/dotprod_fff_armv7_a.c @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/gnuradio-core/src/lib/filter/dotprod_fff_armv7_a.h b/gnuradio-core/src/lib/filter/dotprod_fff_armv7_a.h index 667ee5fb6..6cea45cea 100644 --- a/gnuradio-core/src/lib/filter/dotprod_fff_armv7_a.h +++ b/gnuradio-core/src/lib/filter/dotprod_fff_armv7_a.h @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -39,7 +39,7 @@ extern "C" { * * </pre> */ -float +float dotprod_fff_armv7_a(const float *a, const float *b, size_t n); #ifdef __cplusplus diff --git a/gnuradio-core/src/lib/filter/fcomplex_dotprod_3dnow.S b/gnuradio-core/src/lib/filter/fcomplex_dotprod_3dnow.S index 8c49909c5..a4e69461e 100644 --- a/gnuradio-core/src/lib/filter/fcomplex_dotprod_3dnow.S +++ b/gnuradio-core/src/lib/filter/fcomplex_dotprod_3dnow.S @@ -1,27 +1,27 @@ # # Copyright 2002 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. -# +# # input and taps are guarenteed to be 16 byte aligned. # n_2_complex_blocks is != 0 -# +# # # fcomplex_dotprod_generic (const float *input, # const float *taps, unsigned n_2_complex_blocks, float *result) @@ -30,24 +30,24 @@ # float sum1 = 0; # float sum2 = 0; # float sum3 = 0; -# +# # do { -# +# # sum0 += input[0] * taps[0]; # sum1 += input[0] * taps[1]; # sum2 += input[1] * taps[2]; # sum3 += input[1] * taps[3]; -# +# # input += 2; # taps += 4; -# +# # } while (--n_2_complex_blocks != 0); -# -# +# +# # result[0] = sum0 + sum2; # result[1] = sum1 + sum3; # } -# +# #include "assembly.h" @@ -66,10 +66,10 @@ GLOB_SYMB(fcomplex_dotprod_3dnow): movl 16(%ebp), %ecx # zero accumulators - + pxor %mm4, %mm4 # mm4 = 0 0 - pxor %mm5, %mm5 # mm5 = 0 0 - pxor %mm6, %mm6 # mm6 = 0 0 + pxor %mm5, %mm5 # mm5 = 0 0 + pxor %mm6, %mm6 # mm6 = 0 0 pxor %mm7, %mm7 # mm7 = 0 0 shrl $1, %ecx # ecx = n_2_complex_blocks / 2 @@ -90,9 +90,9 @@ GLOB_SYMB(fcomplex_dotprod_3dnow): # 4 taps / loop # something like ?? cycles / loop # - + .p2align 4 -.Loop1: +.Loop1: pfmul 0(%edx), %mm0 pfadd %mm2, %mm6 @@ -135,17 +135,17 @@ GLOB_SYMB(fcomplex_dotprod_3dnow): # Now accumulate the final two additions and see if original # n_2_complex_blocks was odd. If so, we've got 2 more # taps to do. - + movl 16(%ebp), %ecx pfadd %mm2, %mm6 andl $1, %ecx pfadd %mm3, %mm7 je .Leven - + # The count was odd, do 2 more taps. # Note that we've already got mm0 and mm1 preloaded # from the main loop. - + pfmul 0(%edx), %mm0 pfadd %mm0, %mm4 pfmul 8(%edx), %mm1 @@ -154,7 +154,7 @@ GLOB_SYMB(fcomplex_dotprod_3dnow): .Leven: # at this point mm4, mm5, mm6 and mm7 contain partial sums - + pfadd %mm7, %mm6 pfadd %mm5, %mm4 diff --git a/gnuradio-core/src/lib/filter/fcomplex_dotprod_3dnow64.S b/gnuradio-core/src/lib/filter/fcomplex_dotprod_3dnow64.S index 2924d91a1..9bbf56301 100644 --- a/gnuradio-core/src/lib/filter/fcomplex_dotprod_3dnow64.S +++ b/gnuradio-core/src/lib/filter/fcomplex_dotprod_3dnow64.S @@ -1,27 +1,27 @@ # # Copyright 2002,2005 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. -# +# # input and taps are guarenteed to be 16 byte aligned. # n_2_complex_blocks is != 0 -# +# # # fcomplex_dotprod_generic (const float *input, # const float *taps, unsigned n_2_complex_blocks, float *result) @@ -30,24 +30,24 @@ # float sum1 = 0; # float sum2 = 0; # float sum3 = 0; -# +# # do { -# +# # sum0 += input[0] * taps[0]; # sum1 += input[0] * taps[1]; # sum2 += input[1] * taps[2]; # sum3 += input[1] * taps[3]; -# +# # input += 2; # taps += 4; -# +# # } while (--n_2_complex_blocks != 0); -# -# +# +# # result[0] = sum0 + sum2; # result[1] = sum1 + sum3; # } -# +# #include "assembly.h" @@ -65,10 +65,10 @@ GLOB_SYMB(fcomplex_dotprod_3dnow): mov %rdx, %rax # zero accumulators - + pxor %mm4, %mm4 # mm4 = 0 0 - pxor %mm5, %mm5 # mm5 = 0 0 - pxor %mm6, %mm6 # mm6 = 0 0 + pxor %mm5, %mm5 # mm5 = 0 0 + pxor %mm6, %mm6 # mm6 = 0 0 pxor %mm7, %mm7 # mm7 = 0 0 shr $1, %rax # rax = n_2_complex_blocks / 2 @@ -89,9 +89,9 @@ GLOB_SYMB(fcomplex_dotprod_3dnow): # 4 taps / loop # something like ?? cycles / loop # - + .p2align 4 -.Loop1: +.Loop1: pfmul 0(%rsi), %mm0 pfadd %mm2, %mm6 @@ -134,16 +134,16 @@ GLOB_SYMB(fcomplex_dotprod_3dnow): # Now accumulate the final two additions and see if original # n_2_complex_blocks was odd. If so, we've got 2 more # taps to do. - + pfadd %mm2, %mm6 and $1, %rdx pfadd %mm3, %mm7 je .Leven - + # The count was odd, do 2 more taps. # Note that we've already got mm0 and mm1 preloaded # from the main loop. - + pfmul 0(%rsi), %mm0 pfadd %mm0, %mm4 pfmul 8(%rsi), %mm1 @@ -152,7 +152,7 @@ GLOB_SYMB(fcomplex_dotprod_3dnow): .Leven: # at this point mm4, mm5, mm6 and mm7 contain partial sums - + pfadd %mm7, %mm6 pfadd %mm5, %mm4 pfadd %mm6, %mm4 diff --git a/gnuradio-core/src/lib/filter/fcomplex_dotprod_sse.S b/gnuradio-core/src/lib/filter/fcomplex_dotprod_sse.S index e390c275c..e516f0a61 100644 --- a/gnuradio-core/src/lib/filter/fcomplex_dotprod_sse.S +++ b/gnuradio-core/src/lib/filter/fcomplex_dotprod_sse.S @@ -1,28 +1,28 @@ # # Copyright 2002 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. -# +# # input and taps are guarenteed to be 16 byte aligned. # n_2_complex_blocks is != 0 -# +# # # fcomplex_dotprod_generic (const float *input, # const float *taps, unsigned n_2_complex_blocks, float *result) @@ -31,20 +31,20 @@ # float sum1 = 0; # float sum2 = 0; # float sum3 = 0; -# +# # do { -# +# # sum0 += input[0] * taps[0]; # sum1 += input[0] * taps[1]; # sum2 += input[1] * taps[2]; # sum3 += input[1] * taps[3]; -# +# # input += 2; # taps += 4; -# +# # } while (--n_2_complex_blocks != 0); -# -# +# +# # result[0] = sum0 + sum2; # result[1] = sum1 + sum3; # } @@ -68,7 +68,7 @@ GLOB_SYMB(fcomplex_dotprod_sse): movl 12(%ebp), %edx # taps movl 16(%ebp), %ecx - + # xmm0 xmm1 xmm2 xmm3 are used to hold taps and the result of mults # xmm4 xmm5 xmm6 xmm7 are used to hold the accumulated results @@ -81,7 +81,7 @@ GLOB_SYMB(fcomplex_dotprod_sse): jmp .L1_test .p2align 4 -.Loop1: +.Loop1: movlps 0(%eax), %xmm0 shufps $0x50, %xmm0, %xmm0 # b01010000 @@ -90,16 +90,16 @@ GLOB_SYMB(fcomplex_dotprod_sse): addl $0x10, %edx addl $8, %eax addps %xmm0, %xmm4 -.L1_test: +.L1_test: decl %ecx jge .Loop1 - + # set up for primary loop which is unrolled 4 times - + movl 16(%ebp), %ecx movaps %xmm5, %xmm6 # zero remaining accumulators - movaps %xmm5, %xmm7 + movaps %xmm5, %xmm7 shrl $2, %ecx # n_2_complex_blocks / 4 je .Lcleanup # if zero, take short path @@ -141,7 +141,7 @@ GLOB_SYMB(fcomplex_dotprod_sse): addps %xmm1, %xmm5 mulps 0x20(%edx), %xmm2 - + movlps 0x28(%eax), %xmm1 shufps $0x50, %xmm0, %xmm0 @@ -167,10 +167,10 @@ GLOB_SYMB(fcomplex_dotprod_sse): addps %xmm6, %xmm7 addps %xmm7, %xmm4 - + # At this point, xmm4 contains 2x2 partial sums. We need - # to compute a "horizontal complex add" across xmm4. - + # to compute a "horizontal complex add" across xmm4. + .Lcleanup: # xmm4 = r1 i2 r3 i4 movl 20(%ebp), %eax # @result movhlps %xmm4, %xmm0 # xmm0 = ?? ?? r1 r2 diff --git a/gnuradio-core/src/lib/filter/fcomplex_dotprod_sse64.S b/gnuradio-core/src/lib/filter/fcomplex_dotprod_sse64.S index 9d985a19e..605d87130 100644 --- a/gnuradio-core/src/lib/filter/fcomplex_dotprod_sse64.S +++ b/gnuradio-core/src/lib/filter/fcomplex_dotprod_sse64.S @@ -1,28 +1,28 @@ # # Copyright 2002,2005 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. -# +# # input and taps are guarenteed to be 16 byte aligned. # n_2_complex_blocks is != 0 -# +# # # fcomplex_dotprod_generic (const float *input, # const float *taps, unsigned n_2_complex_blocks, float *result) @@ -31,20 +31,20 @@ # float sum1 = 0; # float sum2 = 0; # float sum3 = 0; -# +# # do { -# +# # sum0 += input[0] * taps[0]; # sum1 += input[0] * taps[1]; # sum2 += input[1] * taps[2]; # sum3 += input[1] * taps[3]; -# +# # input += 2; # taps += 4; -# +# # } while (--n_2_complex_blocks != 0); -# -# +# +# # result[0] = sum0 + sum2; # result[1] = sum1 + sum3; # } @@ -66,7 +66,7 @@ GLOB_SYMB(fcomplex_dotprod_sse): # intput: rdi, taps: rsi, n_2_ccomplex_blocks: rdx, result: rcx mov %rdx, %rax - + # xmm0 xmm1 xmm2 xmm3 are used to hold taps and the result of mults # xmm4 xmm5 xmm6 xmm7 are used to hold the accumulated results @@ -79,7 +79,7 @@ GLOB_SYMB(fcomplex_dotprod_sse): jmp .L1_test .p2align 4 -.Loop1: +.Loop1: movlps 0(%rdi), %xmm0 shufps $0x50, %xmm0, %xmm0 # b01010000 @@ -88,15 +88,15 @@ GLOB_SYMB(fcomplex_dotprod_sse): add $0x10, %rsi add $8, %rdi addps %xmm0, %xmm4 -.L1_test: +.L1_test: dec %rax jge .Loop1 - + # set up for primary loop which is unrolled 4 times - + movaps %xmm5, %xmm6 # zero remaining accumulators - movaps %xmm5, %xmm7 + movaps %xmm5, %xmm7 shr $2, %rdx # n_2_complex_blocks / 4 je .Lcleanup # if zero, take short path @@ -138,7 +138,7 @@ GLOB_SYMB(fcomplex_dotprod_sse): addps %xmm1, %xmm5 mulps 0x20(%rsi), %xmm2 - + movlps 0x28(%rdi), %xmm1 shufps $0x50, %xmm0, %xmm0 @@ -164,10 +164,10 @@ GLOB_SYMB(fcomplex_dotprod_sse): addps %xmm6, %xmm7 addps %xmm7, %xmm4 - + # At this point, xmm4 contains 2x2 partial sums. We need - # to compute a "horizontal complex add" across xmm4. - + # to compute a "horizontal complex add" across xmm4. + .Lcleanup: # xmm4 = r1 i2 r3 i4 movhlps %xmm4, %xmm0 # xmm0 = ?? ?? r1 r2 addps %xmm4, %xmm0 # xmm0 = ?? ?? r1+r3 i2+i4 diff --git a/gnuradio-core/src/lib/filter/fcomplex_dotprod_x86.h b/gnuradio-core/src/lib/filter/fcomplex_dotprod_x86.h index 39e986f81..b7eddf936 100644 --- a/gnuradio-core/src/lib/filter/fcomplex_dotprod_x86.h +++ b/gnuradio-core/src/lib/filter/fcomplex_dotprod_x86.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/filter.i b/gnuradio-core/src/lib/filter/filter.i index 8c3bb9eb6..12580aa10 100644 --- a/gnuradio-core/src/lib/filter/filter.i +++ b/gnuradio-core/src/lib/filter/filter.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2005,2006,2007,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, @@ -32,7 +32,7 @@ #include <gr_fractional_interpolator_cc.h> #include <gr_goertzel_fc.h> #include <gr_pfb_channelizer_ccf.h> -#include <gr_pfb_synthesis_filterbank_ccf.h> +#include <gr_pfb_synthesizer_ccf.h> #include <gr_pfb_decimator_ccf.h> #include <gr_pfb_interpolator_ccf.h> #include <gr_pfb_arb_resampler_ccf.h> @@ -54,7 +54,7 @@ %include "gr_fractional_interpolator_cc.i" %include "gr_goertzel_fc.i" %include "gr_pfb_channelizer_ccf.i" -%include "gr_pfb_synthesis_filterbank_ccf.i" +%include "gr_pfb_synthesizer_ccf.i" %include "gr_pfb_decimator_ccf.i" %include "gr_pfb_interpolator_ccf.i" %include "gr_pfb_arb_resampler_ccf.i" diff --git a/gnuradio-core/src/lib/filter/float_dotprod_3dnow.S b/gnuradio-core/src/lib/filter/float_dotprod_3dnow.S index 9e2479cb6..914b652af 100644 --- a/gnuradio-core/src/lib/filter/float_dotprod_3dnow.S +++ b/gnuradio-core/src/lib/filter/float_dotprod_3dnow.S @@ -1,30 +1,30 @@ # # Copyright 2002 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. -# +# # input and taps are guarenteed to be 16 byte aligned. # n_4_float_blocks is != 0 -# # -# float +# +# float # float_dotprod_generic (const float *input, # const float *taps, unsigned n_4_float_blocks) # { @@ -32,23 +32,23 @@ # float sum1 = 0; # float sum2 = 0; # float sum3 = 0; -# +# # do { -# +# # sum0 += input[0] * taps[0]; # sum1 += input[1] * taps[1]; # sum2 += input[2] * taps[2]; # sum3 += input[3] * taps[3]; -# +# # input += 4; # taps += 4; -# +# # } while (--n_4_float_blocks != 0); -# -# +# +# # return sum0 + sum1 + sum2 + sum3; # } -# +# #include "assembly.h" @@ -67,10 +67,10 @@ GLOB_SYMB(float_dotprod_3dnow): movl 16(%ebp), %ecx # zero accumulators - + pxor %mm4, %mm4 # mm4 = 0 0 - pxor %mm5, %mm5 # mm5 = 0 0 - pxor %mm6, %mm6 # mm6 = 0 0 + pxor %mm5, %mm5 # mm5 = 0 0 + pxor %mm6, %mm6 # mm6 = 0 0 pxor %mm7, %mm7 # mm7 = 0 0 shrl $1, %ecx # ecx = n_4_float_blocks / 2 @@ -84,13 +84,13 @@ GLOB_SYMB(float_dotprod_3dnow): # 8 taps / loop # something like 6 cycles / loop # - + .p2align 4 -.Loop1: +.Loop1: pfmul 0(%edx), %mm0 pfadd %mm2, %mm6 movq 16(%eax), %mm2 - + pfmul 8(%edx), %mm1 pfadd %mm3, %mm7 movq 24(%eax), %mm3 @@ -113,30 +113,30 @@ GLOB_SYMB(float_dotprod_3dnow): # Now accumulate the final two additions and see if original # n_4_float_blocks was odd. If so, we've got 4 more # taps to do. - + movl 16(%ebp), %ecx pfadd %mm2, %mm6 andl $1, %ecx pfadd %mm3, %mm7 je .Leven - + # The count was odd, do 4 more taps. # Note that we've already got mm0 and mm1 preloaded # from the main loop. - + pfmul 0(%edx), %mm0 pfadd %mm0, %mm4 pfmul 8(%edx), %mm1 pfadd %mm1, %mm5 -.Leven: +.Leven: # at this point mm4, mm5, mm6 and mm7 contain partial sums - + pfadd %mm7, %mm6 pfadd %mm5, %mm4 pfadd %mm6, %mm4 pfacc %mm4, %mm4 - + movd %mm4, 16(%ebp) femms flds 16(%ebp) diff --git a/gnuradio-core/src/lib/filter/float_dotprod_3dnow64.S b/gnuradio-core/src/lib/filter/float_dotprod_3dnow64.S index 8558f564f..6670553a3 100644 --- a/gnuradio-core/src/lib/filter/float_dotprod_3dnow64.S +++ b/gnuradio-core/src/lib/filter/float_dotprod_3dnow64.S @@ -1,30 +1,30 @@ # # Copyright 2002,2005 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. -# +# # input and taps are guarenteed to be 16 byte aligned. # n_4_float_blocks is != 0 -# # -# float +# +# float # float_dotprod_generic (const float *input, # const float *taps, unsigned n_4_float_blocks) # { @@ -32,23 +32,23 @@ # float sum1 = 0; # float sum2 = 0; # float sum3 = 0; -# +# # do { -# +# # sum0 += input[0] * taps[0]; # sum1 += input[1] * taps[1]; # sum2 += input[2] * taps[2]; # sum3 += input[3] * taps[3]; -# +# # input += 4; # taps += 4; -# +# # } while (--n_4_float_blocks != 0); -# -# +# +# # return sum0 + sum1 + sum2 + sum3; # } -# +# #include "assembly.h" @@ -66,10 +66,10 @@ GLOB_SYMB(float_dotprod_3dnow): mov %rdx, %rax # zero accumulators - + pxor %mm4, %mm4 # mm4 = 0 0 - pxor %mm5, %mm5 # mm5 = 0 0 - pxor %mm6, %mm6 # mm6 = 0 0 + pxor %mm5, %mm5 # mm5 = 0 0 + pxor %mm6, %mm6 # mm6 = 0 0 pxor %mm7, %mm7 # mm7 = 0 0 shr $1, %rax # rax = n_4_float_blocks / 2 @@ -83,13 +83,13 @@ GLOB_SYMB(float_dotprod_3dnow): # 8 taps / loop # something like 6 cycles / loop # - + .p2align 4 -.Loop1: +.Loop1: pfmul 0(%rdi), %mm0 pfadd %mm2, %mm6 movq 16(%rsi), %mm2 - + pfmul 8(%rdi), %mm1 pfadd %mm3, %mm7 movq 24(%rsi), %mm3 @@ -112,29 +112,29 @@ GLOB_SYMB(float_dotprod_3dnow): # Now accumulate the final two additions and see if original # n_4_float_blocks was odd. If so, we've got 4 more # taps to do. - + pfadd %mm2, %mm6 and $1, %rdx pfadd %mm3, %mm7 je .Leven - + # The count was odd, do 4 more taps. # Note that we've already got mm0 and mm1 preloaded # from the main loop. - + pfmul 0(%rdi), %mm0 pfadd %mm0, %mm4 pfmul 8(%rdi), %mm1 pfadd %mm1, %mm5 -.Leven: +.Leven: # at this point mm4, mm5, mm6 and mm7 contain partial sums - + pfadd %mm7, %mm6 pfadd %mm5, %mm4 pfadd %mm6, %mm4 pfacc %mm4, %mm4 - + movd %mm4, -8(%rsp) movss -8(%rsp), %xmm0 femms diff --git a/gnuradio-core/src/lib/filter/float_dotprod_generic.c b/gnuradio-core/src/lib/filter/float_dotprod_generic.c index 7379185fa..fb9139036 100644 --- a/gnuradio-core/src/lib/filter/float_dotprod_generic.c +++ b/gnuradio-core/src/lib/filter/float_dotprod_generic.c @@ -1,19 +1,19 @@ /* -*- c -*- */ /* * Copyright 2002 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, @@ -23,7 +23,7 @@ #include "float_dotprod_generic.h" -float +float float_dotprod_generic (const float *input, const float *taps, unsigned n_4_float_blocks) { diff --git a/gnuradio-core/src/lib/filter/float_dotprod_generic.h b/gnuradio-core/src/lib/filter/float_dotprod_generic.h index 1c93055ab..dee967642 100644 --- a/gnuradio-core/src/lib/filter/float_dotprod_generic.h +++ b/gnuradio-core/src/lib/filter/float_dotprod_generic.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -27,7 +27,7 @@ extern "C" { #endif -float +float float_dotprod_generic (const float *input, const float *taps, unsigned n_4_float_blocks); diff --git a/gnuradio-core/src/lib/filter/float_dotprod_sse.S b/gnuradio-core/src/lib/filter/float_dotprod_sse.S index 31b0f3832..beddc75b0 100644 --- a/gnuradio-core/src/lib/filter/float_dotprod_sse.S +++ b/gnuradio-core/src/lib/filter/float_dotprod_sse.S @@ -1,30 +1,30 @@ # # Copyright 2002 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. -# +# # input and taps are guarenteed to be 16 byte aligned. # n_4_float_blocks is != 0 -# # -# float +# +# float # float_dotprod_generic (const float *input, # const float *taps, unsigned n_4_float_blocks) # { @@ -32,23 +32,23 @@ # float sum1 = 0; # float sum2 = 0; # float sum3 = 0; -# +# # do { -# +# # sum0 += input[0] * taps[0]; # sum1 += input[1] * taps[1]; # sum2 += input[2] * taps[2]; # sum3 += input[3] * taps[3]; -# +# # input += 4; # taps += 4; -# +# # } while (--n_4_float_blocks != 0); -# -# +# +# # return sum0 + sum1 + sum2 + sum3; # } -# +# #include "assembly.h" @@ -66,7 +66,7 @@ GLOB_SYMB(float_dotprod_sse): movl 12(%ebp), %eax movl 16(%ebp), %ecx - + # xmm0 xmm1 xmm2 xmm3 are used to hold taps and the result of mults # xmm4 xmm5 xmm6 xmm7 are used to hold the accumulated results @@ -79,22 +79,22 @@ GLOB_SYMB(float_dotprod_sse): jmp .L1_test .p2align 4 -.Loop1: +.Loop1: movaps (%eax), %xmm0 mulps (%edx), %xmm0 addl $0x10, %edx addl $0x10, %eax addps %xmm0, %xmm4 -.L1_test: +.L1_test: decl %ecx jge .Loop1 - + # set up for primary loop which is unrolled 4 times - + movl 16(%ebp), %ecx movaps %xmm5, %xmm6 # zero remaining accumulators - movaps %xmm5, %xmm7 + movaps %xmm5, %xmm7 shrl $2, %ecx # n_4_float_blocks / 4 je .Lcleanup # if zero, take short path @@ -102,7 +102,7 @@ GLOB_SYMB(float_dotprod_sse): # finish setup and loop priming movaps 0x00(%eax), %xmm0 - movaps %xmm5, %xmm2 + movaps %xmm5, %xmm2 movaps 0x10(%eax), %xmm1 movaps %xmm5, %xmm3 @@ -145,11 +145,11 @@ GLOB_SYMB(float_dotprod_sse): addps %xmm6, %xmm7 addps %xmm7, %xmm4 - + # At this point, xmm4 contains 4 partial sums. We need - # to compute a "horizontal add" across xmm4. + # to compute a "horizontal add" across xmm4. # This is a fairly nasty operation... - + .Lcleanup: # xmm4 = d1 d2 d3 d4 xorps %xmm0, %xmm0 # xmm0 = 0 0 0 0 (may be unnecessary) movhlps %xmm4, %xmm0 # xmm0 = 0 0 d1 d2 diff --git a/gnuradio-core/src/lib/filter/float_dotprod_sse64.S b/gnuradio-core/src/lib/filter/float_dotprod_sse64.S index 4c5ad95cd..3d425b26b 100644 --- a/gnuradio-core/src/lib/filter/float_dotprod_sse64.S +++ b/gnuradio-core/src/lib/filter/float_dotprod_sse64.S @@ -1,30 +1,30 @@ # # Copyright 2002,2005 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. -# +# # input and taps are guarenteed to be 16 byte aligned. # n_4_float_blocks is != 0 -# # -# float +# +# float # float_dotprod_generic (const float *input, # const float *taps, unsigned n_4_float_blocks) # { @@ -32,23 +32,23 @@ # float sum1 = 0; # float sum2 = 0; # float sum3 = 0; -# +# # do { -# +# # sum0 += input[0] * taps[0]; # sum1 += input[1] * taps[1]; # sum2 += input[2] * taps[2]; # sum3 += input[3] * taps[3]; -# +# # input += 4; # taps += 4; -# +# # } while (--n_4_float_blocks != 0); -# -# +# +# # return sum0 + sum1 + sum2 + sum3; # } -# +# #include "assembly.h" @@ -77,21 +77,21 @@ GLOB_SYMB(float_dotprod_sse): jmp .L1_test .p2align 4 -.Loop1: +.Loop1: movaps (%rsi), %xmm0 mulps (%rdi), %xmm0 add $0x10, %rdi add $0x10, %rsi addps %xmm0, %xmm4 -.L1_test: +.L1_test: dec %rax jge .Loop1 - + # set up for primary loop which is unrolled 4 times - + movaps %xmm5, %xmm6 # zero remaining accumulators - movaps %xmm5, %xmm7 + movaps %xmm5, %xmm7 shr $2, %rdx # n_4_float_blocks / 4 je .Lcleanup # if zero, take short path @@ -99,7 +99,7 @@ GLOB_SYMB(float_dotprod_sse): # finish setup and loop priming movaps 0x00(%rsi), %xmm0 - movaps %xmm5, %xmm2 + movaps %xmm5, %xmm2 movaps 0x10(%rsi), %xmm1 movaps %xmm5, %xmm3 @@ -142,11 +142,11 @@ GLOB_SYMB(float_dotprod_sse): addps %xmm6, %xmm7 addps %xmm7, %xmm4 - + # At this point, xmm4 contains 4 partial sums. We need - # to compute a "horizontal add" across xmm4. + # to compute a "horizontal add" across xmm4. # This is a fairly nasty operation... - + .Lcleanup: # xmm4 = d1 d2 d3 d4 xorps %xmm0, %xmm0 # xmm0 = 0 0 0 0 (may be unnecessary) movhlps %xmm4, %xmm0 # xmm0 = 0 0 d1 d2 diff --git a/gnuradio-core/src/lib/filter/float_dotprod_x86.h b/gnuradio-core/src/lib/filter/float_dotprod_x86.h index 623048117..fd1a2cc93 100644 --- a/gnuradio-core/src/lib/filter/float_dotprod_x86.h +++ b/gnuradio-core/src/lib/filter/float_dotprod_x86.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -27,11 +27,11 @@ extern "C" { #endif -float +float float_dotprod_3dnow (const float *input, const float *taps, unsigned n_4_float_blocks); -float +float float_dotprod_sse (const float *input, const float *taps, unsigned n_4_float_blocks); diff --git a/gnuradio-core/src/lib/filter/gcc_x86_cpuid.h b/gnuradio-core/src/lib/filter/gcc_x86_cpuid.h index 2d0916fb3..98eeb33a3 100644 --- a/gnuradio-core/src/lib/filter/gcc_x86_cpuid.h +++ b/gnuradio-core/src/lib/filter/gcc_x86_cpuid.h @@ -5,16 +5,16 @@ * 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. - * + * * This file 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. - * + * * Under Section 7 of GPL version 3, you are granted additional * permissions described in the GCC Runtime Library Exception, version * 3.1, as published by the Free Software Foundation. - * + * * You should have received a copy of the GNU General Public License and * a copy of the GCC Runtime Library Exception along with this program; * see the files COPYING3 and COPYING.RUNTIME respectively. If not, see diff --git a/gnuradio-core/src/lib/filter/generate_all.py b/gnuradio-core/src/lib/filter/generate_all.py index ceed2b851..1da9f7209 100755 --- a/gnuradio-core/src/lib/filter/generate_all.py +++ b/gnuradio-core/src/lib/filter/generate_all.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2003 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 build_utils import output_glue diff --git a/gnuradio-core/src/lib/filter/generate_gr_fir_XXX.py b/gnuradio-core/src/lib/filter/generate_gr_fir_XXX.py index 6b770a803..cf37fbb24 100755 --- a/gnuradio-core/src/lib/filter/generate_gr_fir_XXX.py +++ b/gnuradio-core/src/lib/filter/generate_gr_fir_XXX.py @@ -2,24 +2,24 @@ # -*- python -*- # # Copyright 2003 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. -# +# import re from generate_utils import * @@ -63,7 +63,7 @@ def init_dict (root, code3): d['N_UNROLL'] = '4' d['VRCOMPLEX_INCLUDE'] = '' return d - + def generate (): for r in roots: diff --git a/gnuradio-core/src/lib/filter/generate_gr_fir_filter_XXX.py b/gnuradio-core/src/lib/filter/generate_gr_fir_filter_XXX.py index b8994b7b6..50cc586e5 100755 --- a/gnuradio-core/src/lib/filter/generate_gr_fir_filter_XXX.py +++ b/gnuradio-core/src/lib/filter/generate_gr_fir_filter_XXX.py @@ -2,24 +2,24 @@ # -*- python -*- # # Copyright 2003,2004 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# import re from generate_utils import * @@ -46,4 +46,4 @@ def generate (): if __name__ == '__main__': generate () - + diff --git a/gnuradio-core/src/lib/filter/generate_gr_fir_sysconfig.py b/gnuradio-core/src/lib/filter/generate_gr_fir_sysconfig.py index b39672193..50d819fd1 100755 --- a/gnuradio-core/src/lib/filter/generate_gr_fir_sysconfig.py +++ b/gnuradio-core/src/lib/filter/generate_gr_fir_sysconfig.py @@ -2,24 +2,24 @@ # -*- python -*- # # Copyright 2003,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 generate_utils import * @@ -66,7 +66,7 @@ public: virtual ~gr_fir_sysconfig (); ''') - + for sig in fir_signatures: out.write ((' virtual gr_fir_%s *create_gr_fir_%s (const std::vector<%s> &taps) = 0;\n' % (sig, sig, tap_type (sig)))) @@ -83,7 +83,7 @@ public: /* * This returns the single instance of the appropriate derived class. - * This function must be defined only once in the system, and should be defined + * This function must be defined only once in the system, and should be defined * in the platform specific code. */ @@ -93,7 +93,7 @@ gr_fir_sysconfig *gr_fir_sysconfig_singleton (); #endif /* INCLUDED_GR_FIR_SYSCONFIG_H */ ''') out.close () - + # ---------------------------------------------------------------- @@ -121,7 +121,7 @@ gr_fir_sysconfig::~gr_fir_sysconfig () } ''') out.close () - + # ---------------------------------------------------------------- diff --git a/gnuradio-core/src/lib/filter/generate_gr_fir_sysconfig_generic.py b/gnuradio-core/src/lib/filter/generate_gr_fir_sysconfig_generic.py index 03caadaf9..dcbadd30f 100755 --- a/gnuradio-core/src/lib/filter/generate_gr_fir_sysconfig_generic.py +++ b/gnuradio-core/src/lib/filter/generate_gr_fir_sysconfig_generic.py @@ -2,24 +2,24 @@ # -*- python -*- # # Copyright 2003,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 generate_utils import * @@ -53,7 +53,7 @@ def make_gr_fir_sysconfig_generic_h (): class gr_fir_sysconfig_generic : public gr_fir_sysconfig { public: ''') - + for sig in fir_signatures: out.write ((' virtual gr_fir_%s *create_gr_fir_%s (const std::vector<%s> &taps);\n' % (sig, sig, tap_type (sig)))) @@ -72,7 +72,7 @@ public: #endif /* _GR_FIR_SYSCONFIG_GENERIC_H_ */ ''') out.close () - + # ---------------------------------------------------------------- @@ -84,7 +84,7 @@ make_gr_fir_%s (const std::vector<%s> &taps) return new gr_fir_%s_generic (taps); } ''' % (sig, sig, tap_type (sig), sig)) - + def make_creator (sig, out): out.write (''' @@ -94,7 +94,7 @@ gr_fir_sysconfig_generic::create_gr_fir_%s (const std::vector<%s> &taps) return make_gr_fir_%s (taps); } ''' % (sig, sig, tap_type (sig), sig)) - + def make_info (sig, out): out.write (''' @@ -107,7 +107,7 @@ gr_fir_sysconfig_generic::get_gr_fir_%s_info (std::vector<gr_fir_%s_info> *info) } ''' % (sig, sig, sig)) - + # ---------------------------------------------------------------- def make_gr_fir_sysconfig_generic_cc (): @@ -131,7 +131,7 @@ def make_gr_fir_sysconfig_generic_cc (): #include <gr_fir_sysconfig_generic.h> ''') - + for sig in fir_signatures: out.write ('#include <gr_fir_%s_generic.h>\n' % (sig)) diff --git a/gnuradio-core/src/lib/filter/generate_gr_fir_util.py b/gnuradio-core/src/lib/filter/generate_gr_fir_util.py index 06001695e..79fa51c27 100755 --- a/gnuradio-core/src/lib/filter/generate_gr_fir_util.py +++ b/gnuradio-core/src/lib/filter/generate_gr_fir_util.py @@ -1,24 +1,24 @@ #!/bin/env python # # Copyright 2003,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 generate_utils import * @@ -34,11 +34,11 @@ struct GR_CORE_API gr_fir_%s_info { def make_create (out, sig): out.write (''' static gr_fir_%s *create_gr_fir_%s (const std::vector<%s> &taps); ''' % (sig, sig, tap_type (sig))) - + def make_info (out, sig): out.write (''' static void get_gr_fir_%s_info (std::vector<gr_fir_%s_info> *info); ''' % (sig, sig)) - + # ---------------------------------------------------------------- @@ -70,7 +70,7 @@ def make_gr_fir_util_h (): * * The trailing suffix has the form _IOT where I codes the input type, * O codes the output type, and T codes the tap type. - * I,O,T are elements of the set 's' (short), 'f' (float), 'c' (gr_complex), + * I,O,T are elements of the set 's' (short), 'f' (float), 'c' (gr_complex), * 'i' (short) */ @@ -78,7 +78,7 @@ def make_gr_fir_util_h (): #include <gr_types.h> ''') - + for sig in fir_signatures: out.write ('class gr_fir_%s;\n' % sig); @@ -93,7 +93,7 @@ struct GR_CORE_API gr_fir_util { // create a fast version of gr_fir_XXX. ''') - + for sig in fir_signatures: make_create (out, sig) @@ -142,7 +142,7 @@ gr_fir_util::get_gr_fir_%s_info (std::vector<gr_fir_%s_info> *info) } ''' % (sig, sig, sig)) - + def make_gr_fir_util_cc (): out = open_and_log_name ('gr_fir_util.cc', 'w') if not out: @@ -172,12 +172,12 @@ def make_gr_fir_util_cc (): // --- info gatherers --- ''') - + for sig in fir_signatures: make_info_cc (out, sig) - out.close () - + out.close () + # ---------------------------------------------------------------- @@ -187,4 +187,4 @@ def generate (): if __name__ == '__main__': generate () - + diff --git a/gnuradio-core/src/lib/filter/generate_gr_freq_xlating_fir_filter_XXX.py b/gnuradio-core/src/lib/filter/generate_gr_freq_xlating_fir_filter_XXX.py index 56936bea5..41c0b2b70 100755 --- a/gnuradio-core/src/lib/filter/generate_gr_freq_xlating_fir_filter_XXX.py +++ b/gnuradio-core/src/lib/filter/generate_gr_freq_xlating_fir_filter_XXX.py @@ -2,24 +2,24 @@ # -*- python -*- # # Copyright 2003,2004 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# import re from generate_utils import * diff --git a/gnuradio-core/src/lib/filter/generate_gr_interp_fir_filter_XXX.py b/gnuradio-core/src/lib/filter/generate_gr_interp_fir_filter_XXX.py index f4ec2edfd..1dcfdaded 100644 --- a/gnuradio-core/src/lib/filter/generate_gr_interp_fir_filter_XXX.py +++ b/gnuradio-core/src/lib/filter/generate_gr_interp_fir_filter_XXX.py @@ -2,24 +2,24 @@ # -*- python -*- # # Copyright 2003,2004 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# import re from generate_utils import * @@ -45,4 +45,4 @@ def generate (): if __name__ == '__main__': generate () - + diff --git a/gnuradio-core/src/lib/filter/generate_gr_rational_resampler_base_XXX.py b/gnuradio-core/src/lib/filter/generate_gr_rational_resampler_base_XXX.py index a5eee9742..1dafec3fb 100644 --- a/gnuradio-core/src/lib/filter/generate_gr_rational_resampler_base_XXX.py +++ b/gnuradio-core/src/lib/filter/generate_gr_rational_resampler_base_XXX.py @@ -2,24 +2,24 @@ # -*- python -*- # # Copyright 2003,2004 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# import re from generate_utils import * @@ -45,4 +45,4 @@ def generate (): if __name__ == '__main__': generate () - + diff --git a/gnuradio-core/src/lib/filter/generate_gri_fir_filter_with_buffer_XXX.py b/gnuradio-core/src/lib/filter/generate_gri_fir_filter_with_buffer_XXX.py index f586b0c27..6442fb3dc 100755 --- a/gnuradio-core/src/lib/filter/generate_gri_fir_filter_with_buffer_XXX.py +++ b/gnuradio-core/src/lib/filter/generate_gri_fir_filter_with_buffer_XXX.py @@ -2,24 +2,24 @@ # -*- python -*- # # Copyright 2010 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. -# +# import re from generate_utils import * @@ -52,7 +52,7 @@ def init_dict (root, code3): acc_code = code3_to_acc_code (code3) d['ACC_TYPE'] = char_to_type[acc_code] return d - + def generate (): for r in roots: diff --git a/gnuradio-core/src/lib/filter/generate_utils.py b/gnuradio-core/src/lib/filter/generate_utils.py index 489aba235..212ea95f9 100644 --- a/gnuradio-core/src/lib/filter/generate_utils.py +++ b/gnuradio-core/src/lib/filter/generate_utils.py @@ -1,23 +1,23 @@ # # Copyright 2003,2005 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. -# +# ## ----------------------------------------------------------------------- ## signatures defines which variations to generate (input, output, taps) diff --git a/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccc.cc b/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccc.cc index 3fed74641..da407caa0 100644 --- a/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccc.cc +++ b/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -70,11 +70,11 @@ gr_adaptive_fir_ccc::work(int noutput_items, d_updated = false; return 0; // history requirements may have changed. } - + int j = 0, k, l = d_taps.size(); for (int i = 0; i < noutput_items; i++) { out[i] = filter(&in[j]); - + // Adjust taps d_error = error(out[i]); for (k = 0; k < l; k++) { diff --git a/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccc.h b/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccc.h index aa5422a07..d144c3eb4 100644 --- a/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccc.h +++ b/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -41,7 +41,7 @@ protected: std::vector<gr_complex> d_taps; // Override to calculate error signal per output - virtual gr_complex error(const gr_complex &out) = 0; + virtual gr_complex error(const gr_complex &out) = 0; // Override to calculate new weight from old, corresponding input virtual void update_tap(gr_complex &tap, const gr_complex &in) = 0; diff --git a/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccc.i b/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccc.i index 7e9a3fac3..a3c875a3d 100644 --- a/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccc.i +++ b/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccf.cc b/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccf.cc index 578506020..045d9faf9 100644 --- a/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccf.cc +++ b/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccf.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006 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, @@ -65,7 +65,7 @@ int gr_adaptive_fir_ccf::work(int noutput_items, for (k = 0; k < l; k++) sum += d_taps[l-k-1]*in[j+k]; out[i] = sum; - + // Adjust taps d_error = error(sum); for (k = 0; k < l; k++) { @@ -73,7 +73,7 @@ int gr_adaptive_fir_ccf::work(int noutput_items, update_tap(d_taps[l-k-1], in[j+k]); } //printf("\n"); - + j += decimation(); } diff --git a/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccf.h b/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccf.h index 87854201c..7ec78099f 100644 --- a/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccf.h +++ b/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccf.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -41,7 +41,7 @@ protected: std::vector<float> d_taps; // Override to calculate error signal per output - virtual float error(const gr_complex &out) = 0; + virtual float error(const gr_complex &out) = 0; // Override to calculate new weight from old, corresponding input virtual void update_tap(float &tap, const gr_complex &in) = 0; diff --git a/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccf.i b/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccf.i index c73c78045..346defd4d 100644 --- a/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccf.i +++ b/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccf.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/filter/gr_altivec.c b/gnuradio-core/src/lib/filter/gr_altivec.c index 416132748..22a67291d 100644 --- a/gnuradio-core/src/lib/filter/gr_altivec.c +++ b/gnuradio-core/src/lib/filter/gr_altivec.c @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -28,7 +28,7 @@ gr_print_vector_float(FILE *fp, vec_float4 v) u.v = v; fprintf(fp, "{ %f, %f, %f, %f }", u.f[0], u.f[1], u.f[2], u.f[3]); } - + void gr_pvf(FILE *fp, const char *label, vec_float4 v) { diff --git a/gnuradio-core/src/lib/filter/gr_altivec.h b/gnuradio-core/src/lib/filter/gr_altivec.h index eb941ce42..ed11490f5 100644 --- a/gnuradio-core/src/lib/filter/gr_altivec.h +++ b/gnuradio-core/src/lib/filter/gr_altivec.h @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/gnuradio-core/src/lib/filter/gr_cpu.h b/gnuradio-core/src/lib/filter/gr_cpu.h index 149404082..35824ac1e 100644 --- a/gnuradio-core/src/lib/filter/gr_cpu.h +++ b/gnuradio-core/src/lib/filter/gr_cpu.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,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, diff --git a/gnuradio-core/src/lib/filter/gr_cpu_armv7_a.cc b/gnuradio-core/src/lib/filter/gr_cpu_armv7_a.cc index e06d2697a..245049206 100644 --- a/gnuradio-core/src/lib/filter/gr_cpu_armv7_a.cc +++ b/gnuradio-core/src/lib/filter/gr_cpu_armv7_a.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,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, diff --git a/gnuradio-core/src/lib/filter/gr_cpu_powerpc.cc b/gnuradio-core/src/lib/filter/gr_cpu_powerpc.cc index d253e4439..d613f0ae4 100644 --- a/gnuradio-core/src/lib/filter/gr_cpu_powerpc.cc +++ b/gnuradio-core/src/lib/filter/gr_cpu_powerpc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,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, diff --git a/gnuradio-core/src/lib/filter/gr_cpu_x86.cc b/gnuradio-core/src/lib/filter/gr_cpu_x86.cc index da970e133..3acd694d5 100644 --- a/gnuradio-core/src/lib/filter/gr_cpu_x86.cc +++ b/gnuradio-core/src/lib/filter/gr_cpu_x86.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,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, diff --git a/gnuradio-core/src/lib/filter/gr_dc_blocker_cc.cc b/gnuradio-core/src/lib/filter/gr_dc_blocker_cc.cc index e7d5ced25..0438a193f 100644 --- a/gnuradio-core/src/lib/filter/gr_dc_blocker_cc.cc +++ b/gnuradio-core/src/lib/filter/gr_dc_blocker_cc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -45,11 +45,11 @@ moving_averager_c::filter(gr_complex x) d_delay_line.push_back(x); d_out = d_delay_line[0]; d_delay_line.pop_front(); - + gr_complex y = x - d_out_d1 + d_out_d2; d_out_d2 = y; - - return (y / (float)(d_length)); + + return (y / (float)(d_length)); } diff --git a/gnuradio-core/src/lib/filter/gr_dc_blocker_cc.h b/gnuradio-core/src/lib/filter/gr_dc_blocker_cc.h index cb449f3ec..e4d89a775 100644 --- a/gnuradio-core/src/lib/filter/gr_dc_blocker_cc.h +++ b/gnuradio-core/src/lib/filter/gr_dc_blocker_cc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -52,7 +52,7 @@ GR_CORE_API gr_dc_blocker_cc_sptr gr_make_dc_blocker_cc (int D=32, bool long_for * \brief a computationally efficient controllable DC blocker * * \ingroup filter_blk - * + * * This block implements a computationally efficient DC blocker that produces * a tighter notch filter around DC for a smaller group delay than an * equivalent FIR filter or using a single pole IIR filter (though the IIR @@ -102,7 +102,7 @@ public: int get_group_delay(); //int set_length(int D); - + int work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); diff --git a/gnuradio-core/src/lib/filter/gr_dc_blocker_cc.i b/gnuradio-core/src/lib/filter/gr_dc_blocker_cc.i index b88fecbde..83d05044b 100644 --- a/gnuradio-core/src/lib/filter/gr_dc_blocker_cc.i +++ b/gnuradio-core/src/lib/filter/gr_dc_blocker_cc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/filter/gr_dc_blocker_ff.cc b/gnuradio-core/src/lib/filter/gr_dc_blocker_ff.cc index d684bc7e8..04ee64879 100644 --- a/gnuradio-core/src/lib/filter/gr_dc_blocker_ff.cc +++ b/gnuradio-core/src/lib/filter/gr_dc_blocker_ff.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -45,11 +45,11 @@ moving_averager_f::filter(float x) d_delay_line.push_back(x); d_out = d_delay_line[0]; d_delay_line.pop_front(); - + float y = x - d_out_d1 + d_out_d2; d_out_d2 = y; - - return (y / (float)(d_length)); + + return (y / (float)(d_length)); } diff --git a/gnuradio-core/src/lib/filter/gr_dc_blocker_ff.h b/gnuradio-core/src/lib/filter/gr_dc_blocker_ff.h index a7e8f1c27..d69f24835 100644 --- a/gnuradio-core/src/lib/filter/gr_dc_blocker_ff.h +++ b/gnuradio-core/src/lib/filter/gr_dc_blocker_ff.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -53,7 +53,7 @@ GR_CORE_API gr_dc_blocker_ff_sptr gr_make_dc_blocker_ff (int D=32, bool long_for * \brief a computationally efficient controllable DC blocker * * \ingroup filter_blk - * + * * This block implements a computationally efficient DC blocker that produces * a tighter notch filter around DC for a smaller group delay than an * equivalent FIR filter or using a single pole IIR filter (though the IIR @@ -103,7 +103,7 @@ public: int get_group_delay(); //int set_length(int D); - + int work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); diff --git a/gnuradio-core/src/lib/filter/gr_dc_blocker_ff.i b/gnuradio-core/src/lib/filter/gr_dc_blocker_ff.i index 032145c9e..065eb441d 100644 --- a/gnuradio-core/src/lib/filter/gr_dc_blocker_ff.i +++ b/gnuradio-core/src/lib/filter/gr_dc_blocker_ff.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.cc b/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.cc index 5968e487e..08e231a44 100644 --- a/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.cc +++ b/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 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, diff --git a/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.h b/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.h index d037597e8..4b478b65f 100644 --- a/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.h +++ b/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -48,9 +48,9 @@ class GR_CORE_API gr_fft_filter_ccc : public gr_sync_decimator int d_nsamples; bool d_updated; #if 1 // don't enable the sse version until handling it is worked out - gri_fft_filter_ccc_generic *d_filter; + gri_fft_filter_ccc_generic *d_filter; #else - gri_fft_filter_ccc_sse *d_filter; + gri_fft_filter_ccc_sse *d_filter; #endif std::vector<gr_complex> d_new_taps; diff --git a/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.i b/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.i index acdc347a6..76837b582 100644 --- a/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.i +++ b/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2005 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, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,fft_filter_ccc) -gr_fft_filter_ccc_sptr +gr_fft_filter_ccc_sptr gr_make_fft_filter_ccc (int decimation, const std::vector<gr_complex> &taps, int nthreads=1 diff --git a/gnuradio-core/src/lib/filter/gr_fft_filter_fff.cc b/gnuradio-core/src/lib/filter/gr_fft_filter_fff.cc index e4a669150..a09feb7f1 100644 --- a/gnuradio-core/src/lib/filter/gr_fft_filter_fff.cc +++ b/gnuradio-core/src/lib/filter/gr_fft_filter_fff.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 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, @@ -52,7 +52,7 @@ gr_fft_filter_fff::gr_fft_filter_fff (int decimation, d_updated(false) { set_history(1); - + #if 1 // don't enable the sse version until handling it is worked out d_filter = new gri_fft_filter_fff_generic(decimation, taps, nthreads); #else @@ -114,7 +114,7 @@ gr_fft_filter_fff::work (int noutput_items, } assert(noutput_items % d_nsamples == 0); - + d_filter->filter(noutput_items, in, out); //assert((out - (float *) output_items[0]) == noutput_items); diff --git a/gnuradio-core/src/lib/filter/gr_fft_filter_fff.h b/gnuradio-core/src/lib/filter/gr_fft_filter_fff.h index 2eeb8c646..309a55135 100644 --- a/gnuradio-core/src/lib/filter/gr_fft_filter_fff.h +++ b/gnuradio-core/src/lib/filter/gr_fft_filter_fff.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/filter/gr_fft_filter_fff.i b/gnuradio-core/src/lib/filter/gr_fft_filter_fff.i index c8118e09e..86c554893 100644 --- a/gnuradio-core/src/lib/filter/gr_fft_filter_fff.i +++ b/gnuradio-core/src/lib/filter/gr_fft_filter_fff.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2005 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, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,fft_filter_fff) -gr_fft_filter_fff_sptr +gr_fft_filter_fff_sptr gr_make_fft_filter_fff (int decimation, const std::vector<float> &taps, int nthreads=1 diff --git a/gnuradio-core/src/lib/filter/gr_filter_delay_fc.cc b/gnuradio-core/src/lib/filter/gr_filter_delay_fc.cc index 7974da934..af8a8e9e7 100644 --- a/gnuradio-core/src/lib/filter/gr_filter_delay_fc.cc +++ b/gnuradio-core/src/lib/filter/gr_filter_delay_fc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -29,8 +29,8 @@ #include <gr_fir_util.h> // public constructor -gr_filter_delay_fc_sptr -gr_make_filter_delay_fc (const std::vector<float> &taps) +gr_filter_delay_fc_sptr +gr_make_filter_delay_fc (const std::vector<float> &taps) { return gnuradio::get_initial_sptr(new gr_filter_delay_fc (taps)); } @@ -62,7 +62,7 @@ gr_filter_delay_fc::work (int noutput_items, switch (input_items.size ()){ case 1: for (int i = 0; i < noutput_items; i++) - out[i] = gr_complex (in0[i + d_delay], + out[i] = gr_complex (in0[i + d_delay], d_fir->filter (&in0[i])); break; diff --git a/gnuradio-core/src/lib/filter/gr_filter_delay_fc.h b/gnuradio-core/src/lib/filter/gr_filter_delay_fc.h index e09e4f0df..fee11243a 100644 --- a/gnuradio-core/src/lib/filter/gr_filter_delay_fc.h +++ b/gnuradio-core/src/lib/filter/gr_filter_delay_fc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -45,7 +45,7 @@ class gr_fir_fff; * a delayed version of this input and the imaginary output is the * filtered output. If two floats are connected to the input, then * the real output is the delayed version of the first input, and - * the imaginary output is the filtered output. The delay in the + * the imaginary output is the filtered output. The delay in the * real path accounts for the group delay introduced by the filter * in the imaginary path. The filter taps needs to be calculated * before initializing this block. diff --git a/gnuradio-core/src/lib/filter/gr_fir_XXX.cc.t b/gnuradio-core/src/lib/filter/gr_fir_XXX.cc.t index 1ee27c728..2396f0fe6 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_XXX.cc.t +++ b/gnuradio-core/src/lib/filter/gr_fir_XXX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/gr_fir_XXX.h.t b/gnuradio-core/src/lib/filter/gr_fir_XXX.h.t index f6019ea40..197bb3cd2 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_XXX.h.t +++ b/gnuradio-core/src/lib/filter/gr_fir_XXX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2003 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, @@ -37,7 +37,7 @@ /*! * \brief Abstract class for FIR with @I_TYPE@ input, @O_TYPE@ output and @TAP_TYPE@ taps * \ingroup filter_primitive - * + * * This is the abstract class for a Finite Impulse Response filter. * * The trailing suffix has the form _IOT where I codes the input type, @@ -91,7 +91,7 @@ public: * \brief compute an array of N output values, decimating the input * * \p input must have (decimate * (n - 1) + ntaps()) valid entries. - * input[0] .. input[decimate * (n - 1) + ntaps() - 1] are referenced to + * input[0] .. input[decimate * (n - 1) + ntaps() - 1] are referenced to * compute the output values. */ virtual void filterNdec (@O_TYPE@ output[], const @I_TYPE@ input[], diff --git a/gnuradio-core/src/lib/filter/gr_fir_XXX_generic.cc.t b/gnuradio-core/src/lib/filter/gr_fir_XXX_generic.cc.t index 5a672eecd..11b4fd50f 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_XXX_generic.cc.t +++ b/gnuradio-core/src/lib/filter/gr_fir_XXX_generic.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -54,7 +54,7 @@ return (@O_TYPE@) (acc0 + acc1 + acc2 + acc3); } -#else +#else @O_TYPE@ @FIR_TYPE@_generic::filter (const @I_TYPE@ input[]) @@ -80,7 +80,7 @@ #endif // N_UNROLL -void +void @FIR_TYPE@_generic::filterN (@O_TYPE@ output[], const @I_TYPE@ input[], unsigned long n) @@ -89,7 +89,7 @@ void output[i] = filter (&input[i]); } -void +void @FIR_TYPE@_generic::filterNdec (@O_TYPE@ output[], const @I_TYPE@ input[], unsigned long n, diff --git a/gnuradio-core/src/lib/filter/gr_fir_XXX_generic.h.t b/gnuradio-core/src/lib/filter/gr_fir_XXX_generic.h.t index b3594b7ad..f7382d739 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_XXX_generic.h.t +++ b/gnuradio-core/src/lib/filter/gr_fir_XXX_generic.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -38,7 +38,7 @@ class GR_CORE_API @FIR_TYPE@_generic : public @FIR_TYPE@ { public: // CREATORS - + @FIR_TYPE@_generic () {} @FIR_TYPE@_generic (const std::vector<@TAP_TYPE@> &taps) : @FIR_TYPE@ (taps) {} @@ -67,7 +67,7 @@ public: * \brief compute an array of N output values, decimating the input * * \p input must have (decimate * (n - 1) + ntaps()) valid entries. - * input[0] .. input[decimate * (n - 1) + ntaps() - 1] are referenced to + * input[0] .. input[decimate * (n - 1) + ntaps() - 1] are referenced to * compute the output values. */ virtual void filterNdec (@O_TYPE@ output[], const @I_TYPE@ input[], diff --git a/gnuradio-core/src/lib/filter/gr_fir_ccc_simd.cc b/gnuradio-core/src/lib/filter/gr_fir_ccc_simd.cc index 44fdeacdf..d88b696c9 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_ccc_simd.cc +++ b/gnuradio-core/src/lib/filter/gr_fir_ccc_simd.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2007 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, @@ -39,7 +39,7 @@ gr_fir_ccc_simd::gr_fir_ccc_simd () // cerr << "@@@ gr_fir_ccc_simd\n"; d_ccomplex_dotprod = 0; - + d_aligned_taps[0] = 0; d_aligned_taps[1] = 0; d_aligned_taps[2] = 0; @@ -52,7 +52,7 @@ gr_fir_ccc_simd::gr_fir_ccc_simd (const std::vector<gr_complex> &new_taps) // cerr << "@@@ gr_fir_ccc_simd\n"; d_ccomplex_dotprod = 0; - + d_aligned_taps[0] = 0; d_aligned_taps[1] = 0; d_aligned_taps[2] = 0; @@ -78,14 +78,14 @@ gr_fir_ccc_simd::set_taps (const std::vector<gr_complex> &inew_taps) // Make 4 copies of the coefficients, one for each data alignment // Note use of special 16-byte-aligned version of calloc() - + for (unsigned i = 0; i < 4; i++){ free16Align (d_aligned_taps[i]); // free old value // this works because the bit representation of a IEEE floating point // +zero is all zeros. If you're using a different representation, // you'll need to explictly set the result to the appropriate 0.0 value. - + d_aligned_taps[i] = (float *) calloc16Align (1 + (len + i - 1) / 2, 2 * 4 * sizeof (float)); if (d_aligned_taps[i] == 0){ @@ -100,7 +100,7 @@ gr_fir_ccc_simd::set_taps (const std::vector<gr_complex> &inew_taps) } } -gr_complex +gr_complex gr_fir_ccc_simd::filter (const gr_complex input[]) { if (ntaps () == 0) @@ -111,11 +111,11 @@ gr_fir_ccc_simd::filter (const gr_complex input[]) // Round input data address down to 16 byte boundary // NB: depending on the alignment of input[], memory - // before input[] will be accessed. The contents don't matter since + // before input[] will be accessed. The contents don't matter since // they'll be multiplied by zero coefficients. I can't conceive of any // situation where this could cause a segfault since memory protection // in the x86 machines is done on much larger boundaries. - + const gr_complex *ar = (gr_complex *)((unsigned long) input & ~15); // Choose one of 4 sets of pre-shifted coefficients. al is both the diff --git a/gnuradio-core/src/lib/filter/gr_fir_ccc_simd.h b/gnuradio-core/src/lib/filter/gr_fir_ccc_simd.h index af61ce274..ed7249c91 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_ccc_simd.h +++ b/gnuradio-core/src/lib/filter/gr_fir_ccc_simd.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/gr_fir_ccc_x86.cc b/gnuradio-core/src/lib/filter/gr_fir_ccc_x86.cc index ba490f10a..28bc008e8 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_ccc_x86.cc +++ b/gnuradio-core/src/lib/filter/gr_fir_ccc_x86.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -29,9 +29,9 @@ /* * --- 3DNow! version --- */ - + gr_fir_ccc_3dnow::gr_fir_ccc_3dnow () - : gr_fir_ccc_simd () + : gr_fir_ccc_simd () { d_ccomplex_dotprod = ccomplex_dotprod_3dnow; } @@ -46,9 +46,9 @@ gr_fir_ccc_3dnow::gr_fir_ccc_3dnow (const std::vector<gr_complex> &new_taps) /* * --- 3DNow!Ext version --- */ - + gr_fir_ccc_3dnowext::gr_fir_ccc_3dnowext () - : gr_fir_ccc_simd () + : gr_fir_ccc_simd () { d_ccomplex_dotprod = ccomplex_dotprod_3dnowext; } @@ -63,7 +63,7 @@ gr_fir_ccc_3dnowext::gr_fir_ccc_3dnowext (const std::vector<gr_complex> &new_tap /* * --- SSE version --- */ - + gr_fir_ccc_sse::gr_fir_ccc_sse () : gr_fir_ccc_simd () { diff --git a/gnuradio-core/src/lib/filter/gr_fir_ccc_x86.h b/gnuradio-core/src/lib/filter/gr_fir_ccc_x86.h index 262cc80e3..0a9d2c83c 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_ccc_x86.h +++ b/gnuradio-core/src/lib/filter/gr_fir_ccc_x86.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/gr_fir_ccf_armv7_a.cc b/gnuradio-core/src/lib/filter/gr_fir_ccf_armv7_a.cc index ac42b57b7..d849c3dd5 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_ccf_armv7_a.cc +++ b/gnuradio-core/src/lib/filter/gr_fir_ccf_armv7_a.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/gnuradio-core/src/lib/filter/gr_fir_ccf_armv7_a.h b/gnuradio-core/src/lib/filter/gr_fir_ccf_armv7_a.h index 719ff4010..e4844bae1 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_ccf_armv7_a.h +++ b/gnuradio-core/src/lib/filter/gr_fir_ccf_armv7_a.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/gnuradio-core/src/lib/filter/gr_fir_ccf_simd.cc b/gnuradio-core/src/lib/filter/gr_fir_ccf_simd.cc index c20cd4e62..872415e8e 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_ccf_simd.cc +++ b/gnuradio-core/src/lib/filter/gr_fir_ccf_simd.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2007 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, @@ -39,7 +39,7 @@ gr_fir_ccf_simd::gr_fir_ccf_simd () // cerr << "@@@ gr_fir_ccf_simd\n"; d_fcomplex_dotprod = 0; - + d_aligned_taps[0] = 0; d_aligned_taps[1] = 0; d_aligned_taps[2] = 0; @@ -52,7 +52,7 @@ gr_fir_ccf_simd::gr_fir_ccf_simd (const std::vector<float> &new_taps) // cerr << "@@@ gr_fir_ccf_simd\n"; d_fcomplex_dotprod = 0; - + d_aligned_taps[0] = 0; d_aligned_taps[1] = 0; d_aligned_taps[2] = 0; @@ -78,14 +78,14 @@ gr_fir_ccf_simd::set_taps (const std::vector<float> &inew_taps) // Make 4 copies of the coefficients, one for each data alignment // Note use of special 16-byte-aligned version of calloc() - + for (unsigned i = 0; i < 4; i++){ free16Align (d_aligned_taps[i]); // free old value // this works because the bit representation of a IEEE floating point // +zero is all zeros. If you're using a different representation, // you'll need to explictly set the result to the appropriate 0.0 value. - + d_aligned_taps[i] = (float *) calloc16Align (1 + (len + i - 1) / 4, 4 * sizeof (float)); if (d_aligned_taps[i] == 0){ @@ -97,8 +97,8 @@ gr_fir_ccf_simd::set_taps (const std::vector<float> &inew_taps) d_aligned_taps[i][j+i] = new_taps[j]; } } - -gr_complex + +gr_complex gr_fir_ccf_simd::filter (const gr_complex input[]) { if (ntaps () == 0) @@ -109,11 +109,11 @@ gr_fir_ccf_simd::filter (const gr_complex input[]) // Round input data address down to 16 byte boundary // NB: depending on the alignment of input[], memory - // before input[] will be accessed. The contents don't matter since + // before input[] will be accessed. The contents don't matter since // they'll be multiplied by zero coefficients. I can't conceive of any // situation where this could cause a segfault since memory protection // in the x86 machines is done on much larger boundaries. - + const gr_complex *ar = (gr_complex *)((unsigned long) input & ~15); // Choose one of 4 sets of pre-shifted coefficients. al is both the diff --git a/gnuradio-core/src/lib/filter/gr_fir_ccf_simd.h b/gnuradio-core/src/lib/filter/gr_fir_ccf_simd.h index 31d70288e..3c3e7e4f5 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_ccf_simd.h +++ b/gnuradio-core/src/lib/filter/gr_fir_ccf_simd.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/gr_fir_ccf_x86.cc b/gnuradio-core/src/lib/filter/gr_fir_ccf_x86.cc index 53976d532..f26d4ecc2 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_ccf_x86.cc +++ b/gnuradio-core/src/lib/filter/gr_fir_ccf_x86.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -29,9 +29,9 @@ /* * --- 3DNow! version --- */ - + gr_fir_ccf_3dnow::gr_fir_ccf_3dnow () - : gr_fir_ccf_simd () + : gr_fir_ccf_simd () { d_fcomplex_dotprod = fcomplex_dotprod_3dnow; } @@ -46,7 +46,7 @@ gr_fir_ccf_3dnow::gr_fir_ccf_3dnow (const std::vector<float> &new_taps) /* * --- SSE version --- */ - + gr_fir_ccf_sse::gr_fir_ccf_sse () : gr_fir_ccf_simd () { diff --git a/gnuradio-core/src/lib/filter/gr_fir_ccf_x86.h b/gnuradio-core/src/lib/filter/gr_fir_ccf_x86.h index 38d82060c..6b260c3db 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_ccf_x86.h +++ b/gnuradio-core/src/lib/filter/gr_fir_ccf_x86.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/gr_fir_fcc_simd.cc b/gnuradio-core/src/lib/filter/gr_fir_fcc_simd.cc index 3441a50e6..5b75a43fd 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_fcc_simd.cc +++ b/gnuradio-core/src/lib/filter/gr_fir_fcc_simd.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -38,7 +38,7 @@ gr_fir_fcc_simd::gr_fir_fcc_simd () // cerr << "@@@ gr_fir_fcc_simd\n"; d_fcomplex_dotprod = 0; - + d_aligned_taps[0] = 0; d_aligned_taps[1] = 0; d_aligned_taps[2] = 0; @@ -51,7 +51,7 @@ gr_fir_fcc_simd::gr_fir_fcc_simd (const std::vector<gr_complex> &new_taps) // cerr << "@@@ gr_fir_fcc_simd\n"; d_fcomplex_dotprod = 0; - + d_aligned_taps[0] = 0; d_aligned_taps[1] = 0; d_aligned_taps[2] = 0; @@ -77,14 +77,14 @@ gr_fir_fcc_simd::set_taps (const std::vector<gr_complex> &inew_taps) // Make 4 copies of the coefficients, one for each data alignment // Note use of special 16-byte-aligned version of calloc() - + for (unsigned i = 0; i < 4; i++){ free16Align (d_aligned_taps[i]); // free old value // this works because the bit representation of a IEEE floating point // +zero is all zeros. If you're using a different representation, // you'll need to explictly set the result to the appropriate 0.0 value. - + d_aligned_taps[i] = (float *) calloc16Align (1 + (len + i - 1) / 2, 2 * 4 * sizeof (float)); if (d_aligned_taps[i] == 0){ @@ -99,7 +99,7 @@ gr_fir_fcc_simd::set_taps (const std::vector<gr_complex> &inew_taps) } } -gr_complex +gr_complex gr_fir_fcc_simd::filter (const float input[]) { if (ntaps () == 0) @@ -108,11 +108,11 @@ gr_fir_fcc_simd::filter (const float input[]) // Round input data address down to 16 byte boundary // NB: depending on the alignment of input[], memory - // before input[] will be accessed. The contents don't matter since + // before input[] will be accessed. The contents don't matter since // they'll be multiplied by zero coefficients. I can't conceive of any // situation where this could cause a segfault since memory protection // in the x86 machines is done on much larger boundaries. - + const float *ar = (float *)((unsigned long) input & ~15); // Choose one of 4 sets of pre-shifted coefficients. al is both the diff --git a/gnuradio-core/src/lib/filter/gr_fir_fcc_simd.h b/gnuradio-core/src/lib/filter/gr_fir_fcc_simd.h index 7be3776e3..b7463070b 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_fcc_simd.h +++ b/gnuradio-core/src/lib/filter/gr_fir_fcc_simd.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/gr_fir_fcc_x86.cc b/gnuradio-core/src/lib/filter/gr_fir_fcc_x86.cc index 8179f56cd..d9904133c 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_fcc_x86.cc +++ b/gnuradio-core/src/lib/filter/gr_fir_fcc_x86.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -29,9 +29,9 @@ /* * --- 3DNow! version --- */ - + gr_fir_fcc_3dnow::gr_fir_fcc_3dnow () - : gr_fir_fcc_simd () + : gr_fir_fcc_simd () { d_fcomplex_dotprod = fcomplex_dotprod_3dnow; } @@ -46,7 +46,7 @@ gr_fir_fcc_3dnow::gr_fir_fcc_3dnow (const std::vector<gr_complex> &new_taps) /* * --- SSE version --- */ - + gr_fir_fcc_sse::gr_fir_fcc_sse () : gr_fir_fcc_simd () { diff --git a/gnuradio-core/src/lib/filter/gr_fir_fcc_x86.h b/gnuradio-core/src/lib/filter/gr_fir_fcc_x86.h index 98ace66de..3fc6c4855 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_fcc_x86.h +++ b/gnuradio-core/src/lib/filter/gr_fir_fcc_x86.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/gr_fir_fff_altivec.cc b/gnuradio-core/src/lib/filter/gr_fir_fff_altivec.cc index 996e80cd2..b81283ce5 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_fff_altivec.cc +++ b/gnuradio-core/src/lib/filter/gr_fir_fff_altivec.cc @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -74,11 +74,11 @@ gr_fir_fff_altivec::set_taps(const std::vector<float> &inew_taps) } -float +float gr_fir_fff_altivec::filter (const float input[]) { if (d_naligned_taps == 0) return 0.0; - + return dotprod_fff_altivec(input, d_aligned_taps, d_naligned_taps); } diff --git a/gnuradio-core/src/lib/filter/gr_fir_fff_altivec.h b/gnuradio-core/src/lib/filter/gr_fir_fff_altivec.h index 29bb3a899..a3d4a2aae 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_fff_altivec.h +++ b/gnuradio-core/src/lib/filter/gr_fir_fff_altivec.h @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/gnuradio-core/src/lib/filter/gr_fir_fff_armv7_a.cc b/gnuradio-core/src/lib/filter/gr_fir_fff_armv7_a.cc index 5a62b1049..b43725420 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_fff_armv7_a.cc +++ b/gnuradio-core/src/lib/filter/gr_fir_fff_armv7_a.cc @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -76,11 +76,11 @@ gr_fir_fff_armv7_a::set_taps(const std::vector<float> &inew_taps) } -float +float gr_fir_fff_armv7_a::filter (const float input[]) { if (d_naligned_taps == 0) return 0.0; - + return dotprod_fff_armv7_a(input, d_aligned_taps, d_naligned_taps); } diff --git a/gnuradio-core/src/lib/filter/gr_fir_fff_armv7_a.h b/gnuradio-core/src/lib/filter/gr_fir_fff_armv7_a.h index 5c80c930f..78863d286 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_fff_armv7_a.h +++ b/gnuradio-core/src/lib/filter/gr_fir_fff_armv7_a.h @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/gnuradio-core/src/lib/filter/gr_fir_fff_simd.cc b/gnuradio-core/src/lib/filter/gr_fir_fff_simd.cc index adccc7b52..d6c28ed45 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_fff_simd.cc +++ b/gnuradio-core/src/lib/filter/gr_fir_fff_simd.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -37,7 +37,7 @@ gr_fir_fff_simd::gr_fir_fff_simd () // cerr << "@@@ gr_fir_fff_simd\n"; d_float_dotprod = 0; - + d_aligned_taps[0] = 0; d_aligned_taps[1] = 0; d_aligned_taps[2] = 0; @@ -50,7 +50,7 @@ gr_fir_fff_simd::gr_fir_fff_simd (const std::vector<float> &new_taps) // cerr << "@@@ gr_fir_fff_simd\n"; d_float_dotprod = 0; - + d_aligned_taps[0] = 0; d_aligned_taps[1] = 0; d_aligned_taps[2] = 0; @@ -76,14 +76,14 @@ gr_fir_fff_simd::set_taps (const std::vector<float> &inew_taps) // Make 4 copies of the coefficients, one for each data alignment // Note use of special 16-byte-aligned version of calloc() - + for (unsigned i = 0; i < 4; i++){ free16Align (d_aligned_taps[i]); // free old value // this works because the bit representation of a IEEE floating point // +zero is all zeros. If you're using a different representation, // you'll need to explictly set the result to the appropriate 0.0 value. - + d_aligned_taps[i] = (float *) calloc16Align (1 + (len + i - 1) / 4, 4 * sizeof (float)); if (d_aligned_taps[i] == 0){ @@ -96,7 +96,7 @@ gr_fir_fff_simd::set_taps (const std::vector<float> &inew_taps) } } -float +float gr_fir_fff_simd::filter (const float input[]) { if (ntaps () == 0) @@ -105,11 +105,11 @@ gr_fir_fff_simd::filter (const float input[]) // Round input data address down to 16 byte boundary // NB: depending on the alignment of input[], memory - // before input[] will be accessed. The contents don't matter since + // before input[] will be accessed. The contents don't matter since // they'll be multiplied by zero coefficients. I can't conceive of any // situation where this could cause a segfault since memory protection // in the x86 machines is done on much larger boundaries. - + const float *ar = (float *)((unsigned long) input & ~15); // Choose one of 4 sets of pre-shifted coefficients. al is both the @@ -125,7 +125,7 @@ gr_fir_fff_simd::filter (const float input[]) // cerr << "ar: " << ar << " d_aligned_taps[ar]: " << d_aligned_taps[al] // << " (ntaps() + al - 1)/4 + 1: " << (ntaps() + al -1) / 4 + 1 << endl; - + float r = d_float_dotprod (ar, d_aligned_taps[al], (ntaps() + al - 1) / 4 + 1); // cerr << "result = " << r << endl; diff --git a/gnuradio-core/src/lib/filter/gr_fir_fff_simd.h b/gnuradio-core/src/lib/filter/gr_fir_fff_simd.h index 781e4e7b9..9d6106266 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_fff_simd.h +++ b/gnuradio-core/src/lib/filter/gr_fir_fff_simd.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/gr_fir_fff_x86.cc b/gnuradio-core/src/lib/filter/gr_fir_fff_x86.cc index 9d8575f0b..40ac266be 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_fff_x86.cc +++ b/gnuradio-core/src/lib/filter/gr_fir_fff_x86.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -29,9 +29,9 @@ /* * --- 3DNow! version --- */ - + gr_fir_fff_3dnow::gr_fir_fff_3dnow () - : gr_fir_fff_simd () + : gr_fir_fff_simd () { d_float_dotprod = float_dotprod_3dnow; } @@ -46,7 +46,7 @@ gr_fir_fff_3dnow::gr_fir_fff_3dnow (const std::vector<float> &new_taps) /* * --- SSE version --- */ - + gr_fir_fff_sse::gr_fir_fff_sse () : gr_fir_fff_simd () { diff --git a/gnuradio-core/src/lib/filter/gr_fir_fff_x86.h b/gnuradio-core/src/lib/filter/gr_fir_fff_x86.h index 4e2f33181..8d451f0c9 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_fff_x86.h +++ b/gnuradio-core/src/lib/filter/gr_fir_fff_x86.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.cc.t b/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.cc.t index f7458e743..39bc75630 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.cc.t +++ b/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.h.t b/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.h.t index f638e7bb5..b32e04bd3 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.h.t +++ b/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.i.t b/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.i.t index fb4ff95af..d9dc86180 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.i.t +++ b/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/filter/gr_fir_fsf_simd.cc b/gnuradio-core/src/lib/filter/gr_fir_fsf_simd.cc index f6c53f4a2..a49503e6a 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_fsf_simd.cc +++ b/gnuradio-core/src/lib/filter/gr_fir_fsf_simd.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -37,7 +37,7 @@ gr_fir_fsf_simd::gr_fir_fsf_simd () // cerr << "@@@ gr_fir_fsf_simd\n"; d_float_dotprod = 0; - + d_aligned_taps[0] = 0; d_aligned_taps[1] = 0; d_aligned_taps[2] = 0; @@ -50,7 +50,7 @@ gr_fir_fsf_simd::gr_fir_fsf_simd (const std::vector<float> &new_taps) // cerr << "@@@ gr_fir_fsf_simd\n"; d_float_dotprod = 0; - + d_aligned_taps[0] = 0; d_aligned_taps[1] = 0; d_aligned_taps[2] = 0; @@ -75,14 +75,14 @@ gr_fir_fsf_simd::set_taps (const std::vector<float> &inew_taps) // Make 4 copies of the coefficients, one for each data alignment // Note use of special 16-byte-aligned version of calloc() - + for (unsigned i = 0; i < 4; i++){ free16Align (d_aligned_taps[i]); // free old value // this works because the bit representation of a IEEE floating point // +zero is all zeros. If you're using a different representation, // you'll need to explictly set the result to the appropriate 0.0 value. - + d_aligned_taps[i] = (float *) calloc16Align (1 + (len + i - 1) / 4, 4 * sizeof (float)); if (d_aligned_taps[i] == 0){ @@ -95,7 +95,7 @@ gr_fir_fsf_simd::set_taps (const std::vector<float> &inew_taps) } } -short +short gr_fir_fsf_simd::filter (const float input[]) { if (ntaps () == 0) @@ -104,11 +104,11 @@ gr_fir_fsf_simd::filter (const float input[]) // Round input data address down to 16 byte boundary // NB: depending on the alignment of input[], memory - // before input[] will be accessed. The contents don't matter since + // before input[] will be accessed. The contents don't matter since // they'll be multiplied by zero coefficients. I can't conceive of any // situation where this could cause a segfault since memory protection // in the x86 machines is done on much larger boundaries. - + const float *ar = (float *)((unsigned long) input & ~15); // Choose one of 4 sets of pre-shifted coefficients. al is both the @@ -124,7 +124,7 @@ gr_fir_fsf_simd::filter (const float input[]) // cerr << "ar: " << ar << " d_aligned_taps[ar]: " << d_aligned_taps[al] // << " (ntaps() + al - 1)/4 + 1: " << (ntaps() + al -1) / 4 + 1 << endl; - + float r = d_float_dotprod (ar, d_aligned_taps[al], (ntaps() + al - 1) / 4 + 1); // cerr << "result = " << r << endl; diff --git a/gnuradio-core/src/lib/filter/gr_fir_fsf_simd.h b/gnuradio-core/src/lib/filter/gr_fir_fsf_simd.h index 6fcb6bd35..d63e9dd17 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_fsf_simd.h +++ b/gnuradio-core/src/lib/filter/gr_fir_fsf_simd.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/gr_fir_fsf_x86.cc b/gnuradio-core/src/lib/filter/gr_fir_fsf_x86.cc index 291bf3136..40ba17d3a 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_fsf_x86.cc +++ b/gnuradio-core/src/lib/filter/gr_fir_fsf_x86.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -29,9 +29,9 @@ /* * --- 3DNow! version --- */ - + gr_fir_fsf_3dnow::gr_fir_fsf_3dnow () - : gr_fir_fsf_simd () + : gr_fir_fsf_simd () { d_float_dotprod = float_dotprod_3dnow; } @@ -46,7 +46,7 @@ gr_fir_fsf_3dnow::gr_fir_fsf_3dnow (const std::vector<float> &new_taps) /* * --- SSE version --- */ - + gr_fir_fsf_sse::gr_fir_fsf_sse () : gr_fir_fsf_simd () { diff --git a/gnuradio-core/src/lib/filter/gr_fir_fsf_x86.h b/gnuradio-core/src/lib/filter/gr_fir_fsf_x86.h index 0e11059b3..df664d5e2 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_fsf_x86.h +++ b/gnuradio-core/src/lib/filter/gr_fir_fsf_x86.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/gr_fir_scc_simd.cc b/gnuradio-core/src/lib/filter/gr_fir_scc_simd.cc index 1a5569306..0b2dd7e61 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_scc_simd.cc +++ b/gnuradio-core/src/lib/filter/gr_fir_scc_simd.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -38,7 +38,7 @@ gr_fir_scc_simd::gr_fir_scc_simd () // cerr << "@@@ gr_fir_scc_simd\n"; d_complex_dotprod = 0; - + d_aligned_taps[0] = 0; d_aligned_taps[1] = 0; d_aligned_taps[2] = 0; @@ -51,7 +51,7 @@ gr_fir_scc_simd::gr_fir_scc_simd (const std::vector<gr_complex> &new_taps) // cerr << "@@@ gr_fir_scc_simd\n"; d_complex_dotprod = 0; - + d_aligned_taps[0] = 0; d_aligned_taps[1] = 0; d_aligned_taps[2] = 0; @@ -78,14 +78,14 @@ gr_fir_scc_simd::set_taps (const std::vector<gr_complex> &inew_taps) // Make 4 copies of the coefficients, one for each data alignment // Note use of special 16-byte-aligned version of calloc() - + for (unsigned i = 0; i < 4; i++){ free16Align (d_aligned_taps[i]); // free old value // this works because the bit representation of a IEEE floating point // +zero is all zeros. If you're using a different representation, // you'll need to explictly set the result to the appropriate 0.0 value. - + d_aligned_taps[i] = (float *) calloc16Align (1 + (len + i - 1) / 2, 2 * 4 * sizeof (float)); if (d_aligned_taps[i] == 0){ @@ -100,7 +100,7 @@ gr_fir_scc_simd::set_taps (const std::vector<gr_complex> &inew_taps) } } -gr_complex +gr_complex gr_fir_scc_simd::filter (const short input[]) { if (ntaps () == 0) @@ -109,11 +109,11 @@ gr_fir_scc_simd::filter (const short input[]) // Round input data address down to 8 byte boundary // NB: depending on the alignment of input[], memory - // before input[] will be accessed. The contents don't matter since + // before input[] will be accessed. The contents don't matter since // they'll be multiplied by zero coefficients. I can't conceive of any // situation where this could cause a segfault since memory protection // in the x86 machines is done on much larger boundaries. - + const short *ar = (short *)((unsigned long) input & ~7); // Choose one of 4 sets of pre-shifted coefficients. al is both the diff --git a/gnuradio-core/src/lib/filter/gr_fir_scc_simd.h b/gnuradio-core/src/lib/filter/gr_fir_scc_simd.h index 9dced1578..72c15f93b 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_scc_simd.h +++ b/gnuradio-core/src/lib/filter/gr_fir_scc_simd.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/gr_fir_scc_x86.cc b/gnuradio-core/src/lib/filter/gr_fir_scc_x86.cc index 0800ae43c..ab0668c63 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_scc_x86.cc +++ b/gnuradio-core/src/lib/filter/gr_fir_scc_x86.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -29,9 +29,9 @@ /* * --- 3DNow! version --- */ - + gr_fir_scc_3dnow::gr_fir_scc_3dnow () - : gr_fir_scc_simd () + : gr_fir_scc_simd () { d_complex_dotprod = complex_dotprod_3dnow; } @@ -46,9 +46,9 @@ gr_fir_scc_3dnow::gr_fir_scc_3dnow (const std::vector<gr_complex> &new_taps) /* * --- 3DNow! Ext version --- */ - + gr_fir_scc_3dnowext::gr_fir_scc_3dnowext () - : gr_fir_scc_simd () + : gr_fir_scc_simd () { d_complex_dotprod = complex_dotprod_3dnowext; } @@ -63,7 +63,7 @@ gr_fir_scc_3dnowext::gr_fir_scc_3dnowext (const std::vector<gr_complex> &new_tap /* * --- SSE version --- */ - + gr_fir_scc_sse::gr_fir_scc_sse () : gr_fir_scc_simd () { diff --git a/gnuradio-core/src/lib/filter/gr_fir_scc_x86.h b/gnuradio-core/src/lib/filter/gr_fir_scc_x86.h index 484bdc5a0..85a63251b 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_scc_x86.h +++ b/gnuradio-core/src/lib/filter/gr_fir_scc_x86.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/gr_fir_sysconfig_armv7_a.cc b/gnuradio-core/src/lib/filter/gr_fir_sysconfig_armv7_a.cc index 71e622d37..70adbc092 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_sysconfig_armv7_a.cc +++ b/gnuradio-core/src/lib/filter/gr_fir_sysconfig_armv7_a.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2008,2009,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -97,7 +97,7 @@ make_gr_fir_scc_altivec(const std::vector<gr_complex> &taps) * Return instances of the fastest arm versions of these classes. * * check CPUID, if has armv7-a, return armv7-a version, - * else return generic version. This will break + * else return generic version. This will break * when someone makes an armv7-a without a NEON * coprocessor. * ---------------------------------------------------------------- @@ -159,7 +159,7 @@ gr_fir_sysconfig_armv7_a::create_gr_fir_ccc (const std::vector<gr_complex> &taps return make_gr_fir_ccc_altivec (taps); } #endif - + if (0 && first){ cerr << ">>> gr_fir_ccc: handing off to parent class\n"; first = false; @@ -179,7 +179,7 @@ gr_fir_sysconfig_armv7_a::create_gr_fir_fff (const std::vector<float> &taps) } return make_gr_fir_fff_armv7_a (taps); } - + if (0 && first){ cerr << ">>> gr_fir_fff: handing off to parent class\n"; first = false; @@ -201,7 +201,7 @@ gr_fir_sysconfig_armv7_a::create_gr_fir_fsf (const std::vector<float> &taps) return make_gr_fir_fsf_altivec (taps); } #endif - + if (0 && first){ cerr << ">>> gr_fir_fsf: handing off to parent class\n"; first = false; @@ -238,7 +238,7 @@ gr_fir_sysconfig_armv7_a::create_gr_fir_scc (const std::vector<gr_complex> &taps * ---------------------------------------------------------------- */ -void +void gr_fir_sysconfig_armv7_a::get_gr_fir_ccf_info (std::vector<gr_fir_ccf_info> *info) { // invoke parent.. @@ -253,7 +253,7 @@ gr_fir_sysconfig_armv7_a::get_gr_fir_ccf_info (std::vector<gr_fir_ccf_info> *inf } } -void +void gr_fir_sysconfig_armv7_a::get_gr_fir_fcc_info (std::vector<gr_fir_fcc_info> *info) { // invoke parent.. @@ -270,7 +270,7 @@ gr_fir_sysconfig_armv7_a::get_gr_fir_fcc_info (std::vector<gr_fir_fcc_info> *inf #endif } -void +void gr_fir_sysconfig_armv7_a::get_gr_fir_ccc_info (std::vector<gr_fir_ccc_info> *info) { // invoke parent.. @@ -287,7 +287,7 @@ gr_fir_sysconfig_armv7_a::get_gr_fir_ccc_info (std::vector<gr_fir_ccc_info> *inf #endif } -void +void gr_fir_sysconfig_armv7_a::get_gr_fir_fff_info (std::vector<gr_fir_fff_info> *info) { // invoke parent.. @@ -302,7 +302,7 @@ gr_fir_sysconfig_armv7_a::get_gr_fir_fff_info (std::vector<gr_fir_fff_info> *inf } } -void +void gr_fir_sysconfig_armv7_a::get_gr_fir_fsf_info (std::vector<gr_fir_fsf_info> *info) { // invoke parent.. @@ -319,7 +319,7 @@ gr_fir_sysconfig_armv7_a::get_gr_fir_fsf_info (std::vector<gr_fir_fsf_info> *inf #endif } -void +void gr_fir_sysconfig_armv7_a::get_gr_fir_scc_info (std::vector<gr_fir_scc_info> *info) { // invoke parent.. diff --git a/gnuradio-core/src/lib/filter/gr_fir_sysconfig_armv7_a.h b/gnuradio-core/src/lib/filter/gr_fir_sysconfig_armv7_a.h index 69ee46019..7295475f6 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_sysconfig_armv7_a.h +++ b/gnuradio-core/src/lib/filter/gr_fir_sysconfig_armv7_a.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,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, diff --git a/gnuradio-core/src/lib/filter/gr_fir_sysconfig_powerpc.cc b/gnuradio-core/src/lib/filter/gr_fir_sysconfig_powerpc.cc index 34d3f8135..f706bd5bf 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_sysconfig_powerpc.cc +++ b/gnuradio-core/src/lib/filter/gr_fir_sysconfig_powerpc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,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, @@ -160,7 +160,7 @@ gr_fir_sysconfig_powerpc::create_gr_fir_ccc (const std::vector<gr_complex> &taps return make_gr_fir_ccc_altivec (taps); } #endif - + if (0 && first){ cerr << ">>> gr_fir_ccc: handing off to parent class\n"; first = false; @@ -180,7 +180,7 @@ gr_fir_sysconfig_powerpc::create_gr_fir_fff (const std::vector<float> &taps) } return make_gr_fir_fff_altivec (taps); } - + if (0 && first){ cerr << ">>> gr_fir_fff: handing off to parent class\n"; first = false; @@ -202,7 +202,7 @@ gr_fir_sysconfig_powerpc::create_gr_fir_fsf (const std::vector<float> &taps) return make_gr_fir_fsf_altivec (taps); } #endif - + if (0 && first){ cerr << ">>> gr_fir_fsf: handing off to parent class\n"; first = false; @@ -239,13 +239,13 @@ gr_fir_sysconfig_powerpc::create_gr_fir_scc (const std::vector<gr_complex> &taps * ---------------------------------------------------------------- */ -void +void gr_fir_sysconfig_powerpc::get_gr_fir_ccf_info (std::vector<gr_fir_ccf_info> *info) { // invoke parent.. gr_fir_sysconfig_generic::get_gr_fir_ccf_info (info); -#if 0 +#if 0 // add our stuff... gr_fir_ccf_info t; if (gr_cpu::has_altivec ()){ @@ -256,7 +256,7 @@ gr_fir_sysconfig_powerpc::get_gr_fir_ccf_info (std::vector<gr_fir_ccf_info> *inf #endif } -void +void gr_fir_sysconfig_powerpc::get_gr_fir_fcc_info (std::vector<gr_fir_fcc_info> *info) { // invoke parent.. @@ -273,7 +273,7 @@ gr_fir_sysconfig_powerpc::get_gr_fir_fcc_info (std::vector<gr_fir_fcc_info> *inf #endif } -void +void gr_fir_sysconfig_powerpc::get_gr_fir_ccc_info (std::vector<gr_fir_ccc_info> *info) { // invoke parent.. @@ -290,7 +290,7 @@ gr_fir_sysconfig_powerpc::get_gr_fir_ccc_info (std::vector<gr_fir_ccc_info> *inf #endif } -void +void gr_fir_sysconfig_powerpc::get_gr_fir_fff_info (std::vector<gr_fir_fff_info> *info) { // invoke parent.. @@ -305,7 +305,7 @@ gr_fir_sysconfig_powerpc::get_gr_fir_fff_info (std::vector<gr_fir_fff_info> *inf } } -void +void gr_fir_sysconfig_powerpc::get_gr_fir_fsf_info (std::vector<gr_fir_fsf_info> *info) { // invoke parent.. @@ -322,7 +322,7 @@ gr_fir_sysconfig_powerpc::get_gr_fir_fsf_info (std::vector<gr_fir_fsf_info> *inf #endif } -void +void gr_fir_sysconfig_powerpc::get_gr_fir_scc_info (std::vector<gr_fir_scc_info> *info) { // invoke parent.. diff --git a/gnuradio-core/src/lib/filter/gr_fir_sysconfig_powerpc.h b/gnuradio-core/src/lib/filter/gr_fir_sysconfig_powerpc.h index d6be7653f..09a7a0ba0 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_sysconfig_powerpc.h +++ b/gnuradio-core/src/lib/filter/gr_fir_sysconfig_powerpc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,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, diff --git a/gnuradio-core/src/lib/filter/gr_fir_sysconfig_x86.cc b/gnuradio-core/src/lib/filter/gr_fir_sysconfig_x86.cc index 35fd08661..97b810699 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_sysconfig_x86.cc +++ b/gnuradio-core/src/lib/filter/gr_fir_sysconfig_x86.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -256,7 +256,7 @@ gr_fir_sysconfig_x86::create_gr_fir_ccc (const std::vector<gr_complex> &taps) } return make_gr_fir_ccc_sse (taps); } - + if (first){ cerr << ">>> gr_fir_ccc: handing off to parent class\n"; first = false; @@ -284,7 +284,7 @@ gr_fir_sysconfig_x86::create_gr_fir_fff (const std::vector<float> &taps) } return make_gr_fir_fff_sse (taps); } - + if (first){ cerr << ">>> gr_fir_fff: handing off to parent class\n"; first = false; @@ -312,7 +312,7 @@ gr_fir_sysconfig_x86::create_gr_fir_fsf (const std::vector<float> &taps) } return make_gr_fir_fsf_sse (taps); } - + if (first){ cerr << ">>> gr_fir_fsf: handing off to parent class\n"; first = false; @@ -331,12 +331,12 @@ gr_fir_sysconfig_x86::create_gr_fir_sss (const std::vector<short> &taps) cerr << ">>> gr_fir_sss: using SSE2\n"; return make_gr_fir_sss_sse2 (taps); } - + if (gr_cpu::has_mmx ()){ cerr << ">>> gr_fir_sss: using MMX\n"; return make_gr_fir_sss_mmx (taps); } - + cerr << ">>> gr_fir_sss: handing off to parent class\n"; return gr_fir_sysconfig_generic::create_gr_fir_sss (taps); } @@ -384,7 +384,7 @@ gr_fir_sysconfig_x86::create_gr_fir_scc (const std::vector<gr_complex> &taps) * ---------------------------------------------------------------- */ -void +void gr_fir_sysconfig_x86::get_gr_fir_ccf_info (std::vector<gr_fir_ccf_info> *info) { gr_fir_ccf_info t; @@ -406,7 +406,7 @@ gr_fir_sysconfig_x86::get_gr_fir_ccf_info (std::vector<gr_fir_ccf_info> *info) } } -void +void gr_fir_sysconfig_x86::get_gr_fir_fcc_info (std::vector<gr_fir_fcc_info> *info) { gr_fir_fcc_info t; @@ -428,11 +428,11 @@ gr_fir_sysconfig_x86::get_gr_fir_fcc_info (std::vector<gr_fir_fcc_info> *info) } } -void +void gr_fir_sysconfig_x86::get_gr_fir_ccc_info (std::vector<gr_fir_ccc_info> *info) { gr_fir_ccc_info t; - + // invoke parent.. gr_fir_sysconfig_generic::get_gr_fir_ccc_info (info); @@ -456,11 +456,11 @@ gr_fir_sysconfig_x86::get_gr_fir_ccc_info (std::vector<gr_fir_ccc_info> *info) } } -void +void gr_fir_sysconfig_x86::get_gr_fir_fff_info (std::vector<gr_fir_fff_info> *info) { gr_fir_fff_info t; - + // invoke parent.. gr_fir_sysconfig_generic::get_gr_fir_fff_info (info); @@ -478,11 +478,11 @@ gr_fir_sysconfig_x86::get_gr_fir_fff_info (std::vector<gr_fir_fff_info> *info) } } -void +void gr_fir_sysconfig_x86::get_gr_fir_fsf_info (std::vector<gr_fir_fsf_info> *info) { gr_fir_fsf_info t; - + // invoke parent.. gr_fir_sysconfig_generic::get_gr_fir_fsf_info (info); @@ -500,7 +500,7 @@ gr_fir_sysconfig_x86::get_gr_fir_fsf_info (std::vector<gr_fir_fsf_info> *info) } } -void +void gr_fir_sysconfig_x86::get_gr_fir_scc_info (std::vector<gr_fir_scc_info> *info) { gr_fir_scc_info t; @@ -529,11 +529,11 @@ gr_fir_sysconfig_x86::get_gr_fir_scc_info (std::vector<gr_fir_scc_info> *info) } #if 0 -void +void gr_fir_sysconfig_x86::get_gr_fir_sss_info (std::vector<gr_fir_sss_info> *info) { gr_fir_sss_info t; - + // invoke parent.. gr_fir_sysconfig_generic::get_gr_fir_sss_info (info); diff --git a/gnuradio-core/src/lib/filter/gr_fir_sysconfig_x86.h b/gnuradio-core/src/lib/filter/gr_fir_sysconfig_x86.h index 49899d895..ebb399c8b 100644 --- a/gnuradio-core/src/lib/filter/gr_fir_sysconfig_x86.h +++ b/gnuradio-core/src/lib/filter/gr_fir_sysconfig_x86.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/gr_fractional_interpolator_cc.i b/gnuradio-core/src/lib/filter/gr_fractional_interpolator_cc.i index 2803aae13..d7341176a 100644 --- a/gnuradio-core/src/lib/filter/gr_fractional_interpolator_cc.i +++ b/gnuradio-core/src/lib/filter/gr_fractional_interpolator_cc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, diff --git a/gnuradio-core/src/lib/filter/gr_fractional_interpolator_ff.i b/gnuradio-core/src/lib/filter/gr_fractional_interpolator_ff.i index 9ae3e2ad4..4ec7c85cf 100644 --- a/gnuradio-core/src/lib/filter/gr_fractional_interpolator_ff.i +++ b/gnuradio-core/src/lib/filter/gr_fractional_interpolator_ff.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, diff --git a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_XXX.cc.t b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_XXX.cc.t index 656b3402a..3d65f872e 100644 --- a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_XXX.cc.t +++ b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_XXX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003,2010 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, @@ -22,7 +22,7 @@ /* * WARNING: This file is automatically generated by - * generate_gr_freq_xlating_fir_filter_XXX.py + * generate_gr_freq_xlating_fir_filter_XXX.py * Any changes made to this file will be overwritten. */ @@ -35,7 +35,7 @@ #include <gr_fir_util.h> #include <gr_io_signature.h> -@SPTR_NAME@ +@SPTR_NAME@ gr_make_@BASE_NAME@ (int decimation, const std::vector<@TAP_TYPE@> &taps, double center_freq, double sampling_freq) { @@ -118,6 +118,6 @@ int out[i] = d_r.rotate (d_composite_fir->filter (&in[j])); j += decimation (); } - + return noutput_items; } diff --git a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_XXX.h.t b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_XXX.h.t index bb05c138b..97d20e04f 100644 --- a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_XXX.h.t +++ b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_XXX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -38,10 +38,10 @@ typedef boost::shared_ptr<@NAME@> @SPTR_NAME@; /*! * Construct a FIR filter with the given taps and a composite frequency - * translation that shifts center_freq down to zero Hz. The frequency + * translation that shifts center_freq down to zero Hz. The frequency * translation logically comes before the filtering operation. */ -GR_CORE_API @SPTR_NAME@ +GR_CORE_API @SPTR_NAME@ gr_make_@BASE_NAME@ (int decimation, const std::vector<@TAP_TYPE@> &taps, double center_freq, double sampling_freq); @@ -74,7 +74,7 @@ class GR_CORE_API @NAME@ : public gr_sync_decimator gr_vector_void_star &output_items); private: - friend GR_CORE_API @SPTR_NAME@ + friend GR_CORE_API @SPTR_NAME@ gr_make_@BASE_NAME@ (int decimation, const std::vector<@TAP_TYPE@> &taps, double center_freq, double sampling_freq); @@ -90,7 +90,7 @@ class GR_CORE_API @NAME@ : public gr_sync_decimator /*! * Construct a FIR filter with the given taps and a composite frequency - * translation that shifts center_freq down to zero Hz. The frequency + * translation that shifts center_freq down to zero Hz. The frequency * translation logically comes before the filtering operation. */ @NAME@ (int decimation, diff --git a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_XXX.i.t b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_XXX.i.t index bfdca3b72..ac6c8c9e1 100644 --- a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_XXX.i.t +++ b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_XXX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -28,7 +28,7 @@ GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@) -@SPTR_NAME@ +@SPTR_NAME@ gr_make_@BASE_NAME@ (int decimation, const std::vector<@TAP_TYPE@> &taps, double center_freq, double sampling_freq); diff --git a/gnuradio-core/src/lib/filter/gr_goertzel_fc.cc b/gnuradio-core/src/lib/filter/gr_goertzel_fc.cc index 938a522f4..07bed8157 100644 --- a/gnuradio-core/src/lib/filter/gr_goertzel_fc.cc +++ b/gnuradio-core/src/lib/filter/gr_goertzel_fc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -28,8 +28,8 @@ #include <gr_io_signature.h> // public constructor -gr_goertzel_fc_sptr -gr_make_goertzel_fc(int rate, int len, float freq) +gr_goertzel_fc_sptr +gr_make_goertzel_fc(int rate, int len, float freq) { return gnuradio::get_initial_sptr(new gr_goertzel_fc(rate, len, freq)); } diff --git a/gnuradio-core/src/lib/filter/gr_goertzel_fc.h b/gnuradio-core/src/lib/filter/gr_goertzel_fc.h index 6b5d8527c..5fb6e0ee0 100644 --- a/gnuradio-core/src/lib/filter/gr_goertzel_fc.h +++ b/gnuradio-core/src/lib/filter/gr_goertzel_fc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/filter/gr_hilbert_fc.cc b/gnuradio-core/src/lib/filter/gr_hilbert_fc.cc index 7445f051e..385e24ad2 100644 --- a/gnuradio-core/src/lib/filter/gr_hilbert_fc.cc +++ b/gnuradio-core/src/lib/filter/gr_hilbert_fc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -30,7 +30,7 @@ #include <gr_fir_util.h> // public constructor -gr_hilbert_fc_sptr +gr_hilbert_fc_sptr gr_make_hilbert_fc (unsigned int ntaps) { return gnuradio::get_initial_sptr(new gr_hilbert_fc (ntaps)); diff --git a/gnuradio-core/src/lib/filter/gr_hilbert_fc.h b/gnuradio-core/src/lib/filter/gr_hilbert_fc.h index ba73324ee..2bb5ff9e3 100644 --- a/gnuradio-core/src/lib/filter/gr_hilbert_fc.h +++ b/gnuradio-core/src/lib/filter/gr_hilbert_fc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/filter/gr_hilbert_fc.i b/gnuradio-core/src/lib/filter/gr_hilbert_fc.i index 92da87031..91d4e23eb 100644 --- a/gnuradio-core/src/lib/filter/gr_hilbert_fc.i +++ b/gnuradio-core/src/lib/filter/gr_hilbert_fc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/filter/gr_iir_filter_ffd.cc b/gnuradio-core/src/lib/filter/gr_iir_filter_ffd.cc index a41a4f7db..4da2aa310 100644 --- a/gnuradio-core/src/lib/filter/gr_iir_filter_ffd.cc +++ b/gnuradio-core/src/lib/filter/gr_iir_filter_ffd.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -29,7 +29,7 @@ #include <stdio.h> -gr_iir_filter_ffd_sptr +gr_iir_filter_ffd_sptr gr_make_iir_filter_ffd (const std::vector<double> &fftaps, const std::vector<double> &fbtaps) throw (std::invalid_argument) { @@ -57,7 +57,7 @@ void gr_iir_filter_ffd::set_taps (const std::vector<double> &fftaps, const std::vector<double> &fbtaps) throw (std::invalid_argument) { - + d_new_fftaps = fftaps; d_new_fbtaps = fbtaps; d_updated = true; diff --git a/gnuradio-core/src/lib/filter/gr_iir_filter_ffd.h b/gnuradio-core/src/lib/filter/gr_iir_filter_ffd.h index 84be57768..ab7065e92 100644 --- a/gnuradio-core/src/lib/filter/gr_iir_filter_ffd.h +++ b/gnuradio-core/src/lib/filter/gr_iir_filter_ffd.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -30,7 +30,7 @@ class gr_iir_filter_ffd; typedef boost::shared_ptr<gr_iir_filter_ffd> gr_iir_filter_ffd_sptr; -GR_CORE_API gr_iir_filter_ffd_sptr +GR_CORE_API gr_iir_filter_ffd_sptr gr_make_iir_filter_ffd (const std::vector<double> &fftaps, const std::vector<double> &fbtaps) throw (std::invalid_argument); @@ -41,7 +41,7 @@ gr_make_iir_filter_ffd (const std::vector<double> &fftaps, * This filter uses the Direct Form I implementation, where * \p fftaps contains the feed-forward taps, and \p fbtaps the feedback ones. * - * + * * The input and output satisfy a difference equation of the form \htmlonly \f{ @@ -70,7 +70,7 @@ gr_make_iir_filter_ffd (const std::vector<double> &fftaps, class GR_CORE_API gr_iir_filter_ffd : public gr_sync_block { private: - friend GR_CORE_API gr_iir_filter_ffd_sptr + friend GR_CORE_API gr_iir_filter_ffd_sptr gr_make_iir_filter_ffd (const std::vector<double> &fftaps, const std::vector<double> &fbtaps) throw (std::invalid_argument); diff --git a/gnuradio-core/src/lib/filter/gr_iir_filter_ffd.i b/gnuradio-core/src/lib/filter/gr_iir_filter_ffd.i index b2af1bbf2..0a35ad89e 100644 --- a/gnuradio-core/src/lib/filter/gr_iir_filter_ffd.i +++ b/gnuradio-core/src/lib/filter/gr_iir_filter_ffd.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,iir_filter_ffd); -gr_iir_filter_ffd_sptr +gr_iir_filter_ffd_sptr gr_make_iir_filter_ffd (const std::vector<double> &fftaps, const std::vector<double> &fbtaps) throw (std::invalid_argument); diff --git a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_XXX.cc.t b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_XXX.cc.t index b90450c65..55297d1eb 100644 --- a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_XXX.cc.t +++ b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_XXX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -53,7 +53,7 @@ throw std::out_of_range ("interpolation must be > 0"); std::vector<@TAP_TYPE@> dummy_taps; - + for (unsigned i = 0; i < interpolation; i++) d_firs[i] = gr_fir_util::create_@FIR_TYPE@ (dummy_taps); @@ -97,14 +97,14 @@ void std::vector< std::vector <@TAP_TYPE@> > xtaps (nfilters); for (int n = 0; n < nfilters; n++) - xtaps[n].resize (nt); + xtaps[n].resize (nt); for (int i = 0; i < (int) taps.size(); i++) xtaps[i % nfilters][i / nfilters] = taps[i]; for (int n = 0; n < nfilters; n++) d_firs[n]->set_taps (xtaps[n]); - + set_history (nt); d_updated = false; @@ -135,7 +135,7 @@ int int nfilters = interpolation (); int ni = noutput_items / interpolation (); - + for (int i = 0; i < ni; i++){ for (int nf = 0; nf < nfilters; nf++) out[nf] = d_firs[nf]->filter (&in[i]); diff --git a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_XXX.h.t b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_XXX.h.t index 4a3590fc7..83904dce2 100644 --- a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_XXX.h.t +++ b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_XXX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_XXX.i.t b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_XXX.i.t index c03b6e7ad..274753001 100644 --- a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_XXX.i.t +++ b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_XXX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, 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 834450436..06e98447e 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 @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2009,2010 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, @@ -30,7 +30,7 @@ #include <gr_io_signature.h> #include <cstdio> -gr_pfb_arb_resampler_ccf_sptr gr_make_pfb_arb_resampler_ccf (float rate, +gr_pfb_arb_resampler_ccf_sptr gr_make_pfb_arb_resampler_ccf (float rate, const std::vector<float> &taps, unsigned int filter_size) { @@ -39,7 +39,7 @@ gr_pfb_arb_resampler_ccf_sptr gr_make_pfb_arb_resampler_ccf (float rate, } -gr_pfb_arb_resampler_ccf::gr_pfb_arb_resampler_ccf (float rate, +gr_pfb_arb_resampler_ccf::gr_pfb_arb_resampler_ccf (float rate, const std::vector<float> &taps, unsigned int filter_size) : gr_block ("pfb_arb_resampler_ccf", @@ -64,7 +64,7 @@ gr_pfb_arb_resampler_ccf::gr_pfb_arb_resampler_ccf (float rate, d_last_filter = 0; d_start_index = 0; - + d_filters = std::vector<gr_fir_ccf*>(d_int_rate); d_diff_filters = std::vector<gr_fir_ccf*>(d_int_rate); @@ -99,7 +99,7 @@ gr_pfb_arb_resampler_ccf::create_taps (const std::vector<float> &newtaps, // Create d_numchan vectors to store each channel's taps ourtaps.resize(d_int_rate); - + // Make a vector of the taps plus fill it out with 0's to fill // each polyphase filter with exactly d_taps_per_filter std::vector<float> tmp_taps; @@ -107,7 +107,7 @@ gr_pfb_arb_resampler_ccf::create_taps (const std::vector<float> &newtaps, while((float)(tmp_taps.size()) < d_int_rate*d_taps_per_filter) { tmp_taps.push_back(0.0); } - + // Partition the filter for(unsigned int i = 0; i < d_int_rate; i++) { // Each channel uses all d_taps_per_filter with 0's if not enough taps to fill out @@ -115,7 +115,7 @@ gr_pfb_arb_resampler_ccf::create_taps (const std::vector<float> &newtaps, for(unsigned int j = 0; j < d_taps_per_filter; j++) { ourtaps[d_int_rate - 1 - i][j] = tmp_taps[i + j*d_int_rate]; } - + // Build a filter for each channel and add it's taps to it ourfilter[i]->set_taps(ourtaps[d_int_rate-1-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 749db937e..d92898a23 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 @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2009,2010 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, @@ -38,12 +38,12 @@ class gr_fir_ccf; /*! * \class gr_pfb_arb_resampler_ccf * - * \brief Polyphase filterbank arbitrary resampler with + * \brief Polyphase filterbank arbitrary resampler with * gr_complex input, gr_complex output and float taps * * \ingroup filter_blk * \ingroup pfb_blk - * + * * This block takes in a signal stream and performs arbitrary * resampling. The resampling rate can be any real * number <EM>r</EM>. The resampling is done by constructing @@ -87,13 +87,13 @@ class gr_fir_ccf; * first input is the gain of the filter, which we specify here as the * interpolation rate (<EM>32</EM>). * - * <B><EM>self._taps = gr.firdes.low_pass_2(32, 32*fs, BW, TB, + * <B><EM>self._taps = gr.firdes.low_pass_2(32, 32*fs, BW, TB, * attenuation_dB=ATT, window=gr.firdes.WIN_BLACKMAN_hARRIS)</EM></B> * - * The theory behind this block can be found in Chapter 7.5 of + * The theory behind this block can be found in Chapter 7.5 of * the following book. * - * <B><EM>f. harris, "Multirate Signal Processing for Communication + * <B><EM>f. harris, "Multirate Signal Processing for Communication * Systems", Upper Saddle River, NJ: Prentice Hall, Inc. 2004.</EM></B> */ @@ -135,7 +135,7 @@ class GR_CORE_API gr_pfb_arb_resampler_ccf : public gr_block related to quantization noise introduced during the resampling. Defaults to 32 filters. */ - gr_pfb_arb_resampler_ccf (float rate, + gr_pfb_arb_resampler_ccf (float rate, const std::vector<float> &taps, unsigned int filter_size); @@ -144,7 +144,7 @@ class GR_CORE_API gr_pfb_arb_resampler_ccf : public gr_block /*! * Resets the filterbank's filter taps with the new prototype filter - * \param newtaps (vector of floats) The prototype filter to populate the filterbank. + * \param newtaps (vector of floats) The prototype filter to populate the filterbank. * The taps should be generated at the interpolated sampling rate. * \param ourtaps (vector of floats) Reference to our internal member of holding the taps. * \param ourfilter (vector of filters) Reference to our internal filter to set the taps for. @@ -153,7 +153,7 @@ class GR_CORE_API gr_pfb_arb_resampler_ccf : public gr_block std::vector< std::vector<float> > &ourtaps, std::vector<gr_fir_ccf*> &ourfilter); - + public: ~gr_pfb_arb_resampler_ccf (); @@ -163,7 +163,7 @@ public: * Print all of the filterbank taps to screen. */ void print_taps(); - void set_rate (float rate) { + void set_rate (float rate) { d_dec_rate = (unsigned int)floor(d_int_rate/rate); d_flt_rate = (d_int_rate/rate) - d_dec_rate; set_relative_rate(rate); diff --git a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.i b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.i index 77f28acdf..da58947e9 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.i +++ b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.i @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_fff.cc b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_fff.cc index 9035e67f4..9a9b86992 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_fff.cc +++ b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_fff.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2009-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -30,7 +30,7 @@ #include <gr_io_signature.h> #include <cstdio> -gr_pfb_arb_resampler_fff_sptr gr_make_pfb_arb_resampler_fff (float rate, +gr_pfb_arb_resampler_fff_sptr gr_make_pfb_arb_resampler_fff (float rate, const std::vector<float> &taps, unsigned int filter_size) { @@ -39,7 +39,7 @@ gr_pfb_arb_resampler_fff_sptr gr_make_pfb_arb_resampler_fff (float rate, } -gr_pfb_arb_resampler_fff::gr_pfb_arb_resampler_fff (float rate, +gr_pfb_arb_resampler_fff::gr_pfb_arb_resampler_fff (float rate, const std::vector<float> &taps, unsigned int filter_size) : gr_block ("pfb_arb_resampler_fff", @@ -64,7 +64,7 @@ gr_pfb_arb_resampler_fff::gr_pfb_arb_resampler_fff (float rate, d_last_filter = 0; d_start_index = 0; - + d_filters = std::vector<gr_fir_fff*>(d_int_rate); d_diff_filters = std::vector<gr_fir_fff*>(d_int_rate); @@ -99,7 +99,7 @@ gr_pfb_arb_resampler_fff::create_taps (const std::vector<float> &newtaps, // Create d_numchan vectors to store each channel's taps ourtaps.resize(d_int_rate); - + // Make a vector of the taps plus fill it out with 0's to fill // each polyphase filter with exactly d_taps_per_filter std::vector<float> tmp_taps; @@ -107,7 +107,7 @@ gr_pfb_arb_resampler_fff::create_taps (const std::vector<float> &newtaps, while((float)(tmp_taps.size()) < d_int_rate*d_taps_per_filter) { tmp_taps.push_back(0.0); } - + // Partition the filter for(unsigned int i = 0; i < d_int_rate; i++) { // Each channel uses all d_taps_per_filter with 0's if not enough taps to fill out @@ -115,7 +115,7 @@ gr_pfb_arb_resampler_fff::create_taps (const std::vector<float> &newtaps, for(unsigned int j = 0; j < d_taps_per_filter; j++) { ourtaps[d_int_rate - 1 - i][j] = tmp_taps[i + j*d_int_rate]; } - + // Build a filter for each channel and add it's taps to it ourfilter[i]->set_taps(ourtaps[d_int_rate-1-i]); } diff --git a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_fff.h b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_fff.h index 7fef06143..d2e375210 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_fff.h +++ b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_fff.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2009-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -38,12 +38,12 @@ class gr_fir_fff; /*! * \class gr_pfb_arb_resampler_fff * - * \brief Polyphase filterbank arbitrary resampler with + * \brief Polyphase filterbank arbitrary resampler with * float input, float output and float taps * * \ingroup filter_blk * \ingroup pfb_blk - * + * * This block takes in a signal stream and performs arbitrary * resampling. The resampling rate can be any real * number <EM>r</EM>. The resampling is done by constructing @@ -87,13 +87,13 @@ class gr_fir_fff; * first input is the gain of the filter, which we specify here as the * interpolation rate (<EM>32</EM>). * - * <B><EM>self._taps = gr.firdes.low_pass_2(32, 32*fs, BW, TB, + * <B><EM>self._taps = gr.firdes.low_pass_2(32, 32*fs, BW, TB, * attenuation_dB=ATT, window=gr.firdes.WIN_BLACKMAN_hARRIS)</EM></B> * - * The theory behind this block can be found in Chapter 7.5 of + * The theory behind this block can be found in Chapter 7.5 of * the following book. * - * <B><EM>f. harris, "Multirate Signal Processing for Communication + * <B><EM>f. harris, "Multirate Signal Processing for Communication * Systems", Upper Saddle River, NJ: Prentice Hall, Inc. 2004.</EM></B> */ @@ -135,7 +135,7 @@ class GR_CORE_API gr_pfb_arb_resampler_fff : public gr_block related to quantization noise introduced during the resampling. Defaults to 32 filters. */ - gr_pfb_arb_resampler_fff (float rate, + gr_pfb_arb_resampler_fff (float rate, const std::vector<float> &taps, unsigned int filter_size); @@ -144,7 +144,7 @@ class GR_CORE_API gr_pfb_arb_resampler_fff : public gr_block /*! * Resets the filterbank's filter taps with the new prototype filter - * \param newtaps (vector of floats) The prototype filter to populate the filterbank. + * \param newtaps (vector of floats) The prototype filter to populate the filterbank. * The taps should be generated at the interpolated sampling rate. * \param ourtaps (vector of floats) Reference to our internal member of holding the taps. * \param ourfilter (vector of filters) Reference to our internal filter to set the taps for. @@ -153,7 +153,7 @@ class GR_CORE_API gr_pfb_arb_resampler_fff : public gr_block std::vector< std::vector<float> > &ourtaps, std::vector<gr_fir_fff*> &ourfilter); - + public: ~gr_pfb_arb_resampler_fff (); @@ -163,7 +163,7 @@ public: * Print all of the filterbank taps to screen. */ void print_taps(); - void set_rate (float rate) { + void set_rate (float rate) { d_dec_rate = (unsigned int)floor(d_int_rate/rate); d_flt_rate = (d_int_rate/rate) - d_dec_rate; set_relative_rate(rate); diff --git a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_fff.i b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_fff.i index 8c1db22c3..ad0905361 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_fff.i +++ b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_fff.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2009,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/filter/gr_pfb_channelizer_ccf.cc b/gnuradio-core/src/lib/filter/gr_pfb_channelizer_ccf.cc index db16a634b..cb7c93962 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_channelizer_ccf.cc +++ b/gnuradio-core/src/lib/filter/gr_pfb_channelizer_ccf.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2009,2010 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, @@ -32,7 +32,7 @@ #include <cstdio> #include <cstring> -gr_pfb_channelizer_ccf_sptr gr_make_pfb_channelizer_ccf (unsigned int numchans, +gr_pfb_channelizer_ccf_sptr gr_make_pfb_channelizer_ccf (unsigned int numchans, const std::vector<float> &taps, float oversample_rate) { @@ -41,32 +41,34 @@ gr_pfb_channelizer_ccf_sptr gr_make_pfb_channelizer_ccf (unsigned int numchans, } -gr_pfb_channelizer_ccf::gr_pfb_channelizer_ccf (unsigned int numchans, +gr_pfb_channelizer_ccf::gr_pfb_channelizer_ccf (unsigned int numchans, const std::vector<float> &taps, float oversample_rate) : gr_block ("pfb_channelizer_ccf", gr_make_io_signature (numchans, numchans, sizeof(gr_complex)), - gr_make_io_signature (1, 1, numchans*sizeof(gr_complex))), + gr_make_io_signature (1, numchans, sizeof(gr_complex))), d_updated (false), d_numchans(numchans), d_oversample_rate(oversample_rate) { // The over sampling rate must be rationally related to the number of channels - // in that it must be N/i for i in [1,N], which gives an outputsample rate + // in that it must be N/i for i in [1,N], which gives an outputsample rate // of [fs/N, fs] where fs is the input sample rate. // This tests the specified input sample rate to see if it conforms to this // requirement within a few significant figures. double intp = 0; double fltp = modf(numchans / oversample_rate, &intp); if(fltp != 0.0) - throw std::invalid_argument("gr_pfb_channelizer: oversample rate must be N/i for i in [1, N]"); + throw std::invalid_argument("gr_pfb_channelizer: oversample rate must be N/i for i in [1, N]"); set_relative_rate(1.0/intp); d_filters = std::vector<gr_fir_ccf*>(d_numchans); + d_channel_map.resize(d_numchans); // Create an FIR filter for each channel and zero out the taps std::vector<float> vtaps(0, d_numchans); for(unsigned int i = 0; i < d_numchans; i++) { d_filters[i] = gr_fir_util::create_gr_fir_ccf(vtaps); + d_channel_map[i] = i; } // Now, actually set the filters' taps @@ -94,8 +96,8 @@ gr_pfb_channelizer_ccf::gr_pfb_channelizer_ccf (unsigned int numchans, gr_pfb_channelizer_ccf::~gr_pfb_channelizer_ccf () { - delete [] d_idxlut; - + delete [] d_idxlut; + for(unsigned int i = 0; i < d_numchans; i++) { delete d_filters[i]; } @@ -104,6 +106,7 @@ gr_pfb_channelizer_ccf::~gr_pfb_channelizer_ccf () void gr_pfb_channelizer_ccf::set_taps (const std::vector<float> &taps) { + gruel::scoped_lock guard(d_mutex); unsigned int i,j; unsigned int ntaps = taps.size(); @@ -119,7 +122,7 @@ gr_pfb_channelizer_ccf::set_taps (const std::vector<float> &taps) while((float)(tmp_taps.size()) < d_numchans*d_taps_per_filter) { tmp_taps.push_back(0.0); } - + // Partition the filter for(i = 0; i < d_numchans; i++) { // Each channel uses all d_taps_per_filter with 0's if not enough taps to fill out @@ -127,7 +130,7 @@ gr_pfb_channelizer_ccf::set_taps (const std::vector<float> &taps) for(j = 0; j < d_taps_per_filter; j++) { d_taps[i][j] = tmp_taps[i + j*d_numchans]; // add taps to channels in reverse order } - + // Build a filter for each channel and add it's taps to it d_filters[i]->set_taps(d_taps[i]); } @@ -151,6 +154,33 @@ gr_pfb_channelizer_ccf::print_taps() } } +std::vector< std::vector<float> > +gr_pfb_channelizer_ccf::taps() const +{ + return d_taps; +} + +void +gr_pfb_channelizer_ccf::set_channel_map(const std::vector<int> &map) +{ + gruel::scoped_lock guard(d_mutex); + + if(map.size() > 0) { + unsigned int max = (unsigned int)*std::max_element(map.begin(), map.end()); + unsigned int min = (unsigned int)*std::min_element(map.begin(), map.end()); + if((max >= d_numchans) || (min < 0)) { + throw std::invalid_argument("gr_pfb_channelizer_ccf::set_channel_map: map range out of bounds.\n"); + } + d_channel_map = map; + } +} + +std::vector<int> +gr_pfb_channelizer_ccf::channel_map() const +{ + return d_channel_map; +} + int gr_pfb_channelizer_ccf::general_work (int noutput_items, @@ -158,6 +188,8 @@ gr_pfb_channelizer_ccf::general_work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) { + gruel::scoped_lock guard(d_mutex); + gr_complex *in = (gr_complex *) input_items[0]; gr_complex *out = (gr_complex *) output_items[0]; @@ -166,7 +198,9 @@ gr_pfb_channelizer_ccf::general_work (int noutput_items, return 0; // history requirements may have changed. } - int n=1, i=-1, j=0, last; + size_t noutputs = output_items.size(); + + int n=1, i=-1, j=0, oo=0, last; int toconsume = (int)rintf(noutput_items/d_oversample_rate); while(n <= toconsume) { j = 0; @@ -191,8 +225,13 @@ gr_pfb_channelizer_ccf::general_work (int noutput_items, // despin through FFT d_fft->execute(); - memcpy(out, d_fft->get_outbuf(), d_numchans*sizeof(gr_complex)); - out += d_numchans; + + // Send to output channels + for(unsigned int nn = 0; nn < noutputs; nn++) { + out = (gr_complex*)output_items[nn]; + out[oo] = d_fft->get_outbuf()[d_channel_map[nn]]; + } + oo++; } consume_each(toconsume); diff --git a/gnuradio-core/src/lib/filter/gr_pfb_channelizer_ccf.h b/gnuradio-core/src/lib/filter/gr_pfb_channelizer_ccf.h index 8fd5c4f78..79ad322f9 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_channelizer_ccf.h +++ b/gnuradio-core/src/lib/filter/gr_pfb_channelizer_ccf.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2009,2010 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, @@ -26,10 +26,11 @@ #include <gr_core_api.h> #include <gr_block.h> +#include <gruel/thread.h> class gr_pfb_channelizer_ccf; typedef boost::shared_ptr<gr_pfb_channelizer_ccf> gr_pfb_channelizer_ccf_sptr; -GR_CORE_API gr_pfb_channelizer_ccf_sptr gr_make_pfb_channelizer_ccf (unsigned int numchans, +GR_CORE_API gr_pfb_channelizer_ccf_sptr gr_make_pfb_channelizer_ccf (unsigned int numchans, const std::vector<float> &taps, float oversample_rate=1); @@ -40,7 +41,7 @@ class gri_fft_complex; /*! * \class gr_pfb_channelizer_ccf * - * \brief Polyphase filterbank channelizer with + * \brief Polyphase filterbank channelizer with * gr_complex input, gr_complex output and float taps * * \ingroup filter_blk @@ -81,33 +82,33 @@ class gri_fft_complex; * The filter's taps should be based on the input sampling rate. * * For example, using the GNU Radio's firdes utility to building - * filters, we build a low-pass filter with a sampling rate of + * filters, we build a low-pass filter with a sampling rate of * <EM>fs</EM>, a 3-dB bandwidth of <EM>BW</EM> and a transition * bandwidth of <EM>TB</EM>. We can also specify the out-of-band * attenuation to use, <EM>ATT</EM>, and the filter window * function (a Blackman-harris window in this case). The first input * is the gain of the filter, which we specify here as unity. * - * <B><EM>self._taps = gr.firdes.low_pass_2(1, fs, BW, TB, + * <B><EM>self._taps = gr.firdes.low_pass_2(1, fs, BW, TB, * attenuation_dB=ATT, window=gr.firdes.WIN_BLACKMAN_hARRIS)</EM></B> * - * The filter output can also be overs ampled. The over sampling rate - * is the ratio of the the actual output sampling rate to the normal - * output sampling rate. It must be rationally related to the number + * The filter output can also be overs ampled. The over sampling rate + * is the ratio of the the actual output sampling rate to the normal + * output sampling rate. It must be rationally related to the number * of channels as N/i for i in [1,N], which gives an outputsample rate * of [fs/N, fs] where fs is the input sample rate and N is the number * of channels. * - * For example, for 6 channels with fs = 6000 Hz, the normal rate is - * 6000/6 = 1000 Hz. Allowable oversampling rates are 6/6, 6/5, 6/4, + * For example, for 6 channels with fs = 6000 Hz, the normal rate is + * 6000/6 = 1000 Hz. Allowable oversampling rates are 6/6, 6/5, 6/4, * 6/3, 6/2, and 6/1 where the output sample rate of a 6/1 oversample * ratio is 6000 Hz, or 6 times the normal 1000 Hz. A rate of 6/5 = 1.2, * so the output rate would be 1200 Hz. * - * The theory behind this block can be found in Chapter 6 of + * The theory behind this block can be found in Chapter 6 of * the following book. * - * <B><EM>f. harris, "Multirate Signal Processing for Communication + * <B><EM>f. harris, "Multirate Signal Processing for Communication * Systems," Upper Saddle River, NJ: Prentice Hall, Inc. 2004.</EM></B> * */ @@ -122,10 +123,10 @@ class GR_CORE_API gr_pfb_channelizer_ccf : public gr_block * \param oversample_rate (float) The over sampling rate is the ratio of the the actual * output sampling rate to the normal output sampling rate. * It must be rationally related to the number of channels - * as N/i for i in [1,N], which gives an outputsample rate + * as N/i for i in [1,N], which gives an outputsample rate * of [fs/N, fs] where fs is the input sample rate and N is * the number of channels. - * + * * For example, for 6 channels with fs = 6000 Hz, the normal * rate is 6000/6 = 1000 Hz. Allowable oversampling rates * are 6/6, 6/5, 6/4, 6/3, 6/2, and 6/1 where the output @@ -146,6 +147,8 @@ class GR_CORE_API gr_pfb_channelizer_ccf : public gr_block int *d_idxlut; int d_rate_ratio; int d_output_multiple; + std::vector<int> d_channel_map; + gruel::mutex d_mutex; // mutex to protect set/work access /*! * Build the polyphase filterbank decimator. @@ -153,13 +156,13 @@ class GR_CORE_API gr_pfb_channelizer_ccf : public gr_block * \param taps (vector/list of floats) The prototype filter to populate the filterbank. * \param oversample_rate (float) The output over sampling rate. */ - gr_pfb_channelizer_ccf (unsigned int numchans, + gr_pfb_channelizer_ccf (unsigned int numchans, const std::vector<float> &taps, float oversample_rate); public: ~gr_pfb_channelizer_ccf (); - + /*! * Resets the filterbank's filter taps with the new prototype filter * \param taps (vector/list of floats) The prototype filter to populate the filterbank. @@ -170,7 +173,50 @@ public: * Print all of the filterbank taps to screen. */ void print_taps(); - + + /*! + * Return a vector<vector<>> of the filterbank taps + */ + std::vector<std::vector<float> > taps() const; + + /*! + * Set the channel map. Channels are numbers as: + * + * N/2+1 | ... | N-1 | 0 | 1 | 2 | ... | N/2 + * <------------------- 0 --------------------> + * freq + * + * So output stream 0 comes from channel 0, etc. Setting a new + * channel map allows the user to specify which channel in frequency + * he/she wants to got to which output stream. + * + * The map should have the same number of elements as the number of + * output connections from the block. The minimum value of the map + * is 0 (for the 0th channel) and the maximum number is N-1 where N + * is the number of channels. + * + * We specify M as the number of output connections made where M <= + * N, so only M out of N channels are driven to an output + * stream. The number of items in the channel map should be at least + * M long. If there are more channels specified, any value in the + * map over M-1 will be ignored. If the size of the map is less than + * M the behavior is unknown (we don't wish to check every entry + * into the work function). + * + * This means that if the channelizer is splitting the signal up + * into N channels but only M channels are specified in the map + * (where M <= N), then M output streams must be connected and the + * map and the channel numbers used must be less than N-1. Output + * channel number can be reused, too. By default, the map is + * [0...M-1] with M = N. + */ + void set_channel_map(const std::vector<int> &map); + + /*! + * Gets the current channel map. + */ + std::vector<int> channel_map() const; + int general_work (int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, diff --git a/gnuradio-core/src/lib/filter/gr_pfb_channelizer_ccf.i b/gnuradio-core/src/lib/filter/gr_pfb_channelizer_ccf.i index 63e3e0fe6..1f2b49452 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_channelizer_ccf.i +++ b/gnuradio-core/src/lib/filter/gr_pfb_channelizer_ccf.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2009,2010 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, @@ -37,4 +37,9 @@ class gr_pfb_channelizer_ccf : public gr_block ~gr_pfb_channelizer_ccf (); void set_taps (const std::vector<float> &taps); + void print_taps(); + std::vector<std::vector<float> > taps() const; + + void set_channel_map(const std::vector<int> &map); + std::vector<int> channel_map() const; }; diff --git a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc index 9297b6587..efe417918 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc +++ b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2009-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -67,10 +67,10 @@ gr_pfb_clock_sync_ccf::gr_pfb_clock_sync_ccf (double sps, float loop_bw, // Set the damping factor for a critically damped system d_damping = sqrtf(2.0f)/2.0f; - + // Set the bandwidth, which will then call update_gains() set_loop_bandwidth(loop_bw); - + // Store the last filter between calls to work // The accumulator keeps track of overflow to increment the stride correctly. // set it here to the fractional difference based on the initial phaes @@ -119,23 +119,23 @@ gr_pfb_clock_sync_ccf::check_topology(int ninputs, int noutputs) void -gr_pfb_clock_sync_ccf::set_loop_bandwidth(float bw) +gr_pfb_clock_sync_ccf::set_loop_bandwidth(float bw) { if(bw < 0) { throw std::out_of_range ("gr_pfb_clock_sync_cc: invalid bandwidth. Must be >= 0."); } - + d_loop_bw = bw; update_gains(); } void -gr_pfb_clock_sync_ccf::set_damping_factor(float df) +gr_pfb_clock_sync_ccf::set_damping_factor(float df) { if(df < 0 || df > 1.0) { throw std::out_of_range ("gr_pfb_clock_sync_cc: invalid damping factor. Must be in [0,1]."); } - + d_damping = df; update_gains(); } @@ -217,7 +217,7 @@ gr_pfb_clock_sync_ccf::set_taps (const std::vector<float> &newtaps, // Create d_numchan vectors to store each channel's taps ourtaps.resize(d_nfilters); - + // Make a vector of the taps plus fill it out with 0's to fill // each polyphase filter with exactly d_taps_per_filter std::vector<float> tmp_taps; @@ -225,7 +225,7 @@ gr_pfb_clock_sync_ccf::set_taps (const std::vector<float> &newtaps, while((float)(tmp_taps.size()) < d_nfilters*d_taps_per_filter) { tmp_taps.push_back(0.0); } - + // Partition the filter for(i = 0; i < d_nfilters; i++) { // Each channel uses all d_taps_per_filter with 0's if not enough taps to fill out @@ -235,7 +235,7 @@ gr_pfb_clock_sync_ccf::set_taps (const std::vector<float> &newtaps, //ourtaps[d_nfilters - 1 - i][j] = tmp_taps[i + j*d_nfilters]; ourtaps[i][j] = tmp_taps[i + j*d_nfilters]; } - + // Build a filter for each channel and add it's taps to it //ourfilter[i]->set_taps(ourtaps[d_nfilters-1-i]); ourfilter[i]->set_taps(ourtaps[i]); @@ -293,7 +293,7 @@ gr_pfb_clock_sync_ccf::get_taps_as_string() str << d_taps[i][j] << "],"; } str << " ]" << std::endl; - + return str.str(); } @@ -318,13 +318,13 @@ gr_pfb_clock_sync_ccf::get_diff_taps_as_string() return str.str(); } -std::vector< std::vector<float> > +std::vector< std::vector<float> > gr_pfb_clock_sync_ccf::get_taps() { return d_taps; } -std::vector< std::vector<float> > +std::vector< std::vector<float> > gr_pfb_clock_sync_ccf::get_diff_taps() { return d_dtaps; @@ -366,7 +366,7 @@ gr_pfb_clock_sync_ccf::general_work (int noutput_items, outrate = (float*)output_items[2]; outk = (float*)output_items[3]; } - + if (d_updated) { d_updated = false; return 0; // history requirements may have changed. @@ -382,7 +382,7 @@ gr_pfb_clock_sync_ccf::general_work (int noutput_items, while((i < noutput_items) && (count < nrequired)) { while(d_out_idx < d_osps) { d_filtnum = (int)floor(d_k); - + // Keep the current filter number in [0, d_nfilters] // If we've run beyond the last filter, wrap around and go to next sample // If we've go below 0, wrap around and go to previous sample @@ -396,11 +396,11 @@ gr_pfb_clock_sync_ccf::general_work (int noutput_items, d_filtnum += d_nfilters; count -= 1; } - + out[i+d_out_idx] = d_filters[d_filtnum]->filter(&in[count+d_out_idx]); d_k = d_k + d_rate_i + d_rate_f; // update phase d_out_idx++; - + if(output_items.size() == 4) { err[i] = d_error; outrate[i] = d_rate_f; @@ -423,12 +423,12 @@ gr_pfb_clock_sync_ccf::general_work (int noutput_items, error_r = out[i].real() * diff.real(); error_i = out[i].imag() * diff.imag(); d_error = (error_i + error_r) / 2.0; // average error from I&Q channel - + // Run the control loop to update the current phase (k) and // tracking rate estimates based on the error value d_rate_f = d_rate_f + d_beta*d_error; - d_k = d_k + d_alpha*d_error; - + d_k = d_k + d_alpha*d_error; + // Keep our rate within a good range d_rate_f = gr_branchless_clip(d_rate_f, d_max_dev); diff --git a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.h b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.h index 1e1bbca10..8715b4b10 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.h +++ b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2009,2010 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, @@ -45,7 +45,7 @@ class gr_fir_ccf; * * \ingroup filter_blk * \ingroup pfb_blk - * + * * This block performs timing synchronization for PAM signals by * minimizing the derivative of the filtered signal, which in turn * maximizes the SNR and minimizes ISI. @@ -160,7 +160,7 @@ class GR_CORE_API gr_pfb_clock_sync_ccf : public gr_block * \param loop_bw (float) The bandwidth of the control loop; set's alpha and beta. * \param taps (vector<int>) The filter taps. * \param filter_size (uint) The number of filters in the filterbank (default = 32). - * \param init_phase (float) The initial phase to look at, or which filter to start + * \param init_phase (float) The initial phase to look at, or which filter to start * with (default = 0). * \param max_rate_deviation (float) Distance from 0 d_rate can get (default = 1.5). * \param osps (int) The number of output samples per symbol (default=1). @@ -198,7 +198,7 @@ class GR_CORE_API gr_pfb_clock_sync_ccf : public gr_block int d_osps; float d_error; int d_out_idx; - + /*! * Build the polyphase filterbank timing synchronizer. */ @@ -208,7 +208,7 @@ class GR_CORE_API gr_pfb_clock_sync_ccf : public gr_block float init_phase, float max_rate_deviation, int osps); - + void create_diff_taps(const std::vector<float> &newtaps, std::vector<float> &difftaps); @@ -223,7 +223,7 @@ public: * set functions. */ void update_gains(); - + /*! * Resets the filterbank's filter taps with the new prototype filter */ @@ -265,12 +265,12 @@ public: /******************************************************************* SET FUNCTIONS *******************************************************************/ - + /*! * \brief Set the loop bandwidth * - * Set the loop filter's bandwidth to \p bw. This should be between + * Set the loop filter's bandwidth to \p bw. This should be between * 2*pi/200 and 2*pi/100 (in rads/samp). It must also be a positive * number. * @@ -326,12 +326,12 @@ public: /*! * Set the maximum deviation from 0 d_rate can have - */ + */ void set_max_rate_deviation(float m) { d_max_dev = m; } - + /******************************************************************* GET FUNCTIONS *******************************************************************/ diff --git a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.i b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.i index 92ad1661a..85915196f 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.i +++ b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.i @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_fff.cc b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_fff.cc index 5d7f7a0d0..886f98913 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_fff.cc +++ b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_fff.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2009,2010 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, @@ -115,7 +115,7 @@ gr_pfb_clock_sync_fff::set_taps (const std::vector<float> &newtaps, // Create d_numchan vectors to store each channel's taps ourtaps.resize(d_nfilters); - + // Make a vector of the taps plus fill it out with 0's to fill // each polyphase filter with exactly d_taps_per_filter std::vector<float> tmp_taps; @@ -123,7 +123,7 @@ gr_pfb_clock_sync_fff::set_taps (const std::vector<float> &newtaps, while((float)(tmp_taps.size()) < d_nfilters*d_taps_per_filter) { tmp_taps.push_back(0.0); } - + // Partition the filter for(i = 0; i < d_nfilters; i++) { // Each channel uses all d_taps_per_filter with 0's if not enough taps to fill out @@ -131,7 +131,7 @@ gr_pfb_clock_sync_fff::set_taps (const std::vector<float> &newtaps, for(j = 0; j < d_taps_per_filter; j++) { ourtaps[d_nfilters - 1 - i][j] = tmp_taps[i + j*d_nfilters]; } - + // Build a filter for each channel and add it's taps to it ourfilter[i]->set_taps(ourtaps[d_nfilters-1-i]); } @@ -232,7 +232,7 @@ gr_pfb_clock_sync_fff::general_work (int noutput_items, outrate = (float*)output_items[2]; outk = (float*)output_items[3]; } - + if (d_updated) { d_updated = false; return 0; // history requirements may have changed. @@ -269,7 +269,7 @@ gr_pfb_clock_sync_fff::general_work (int noutput_items, // Run the control loop to update the current phase (k) and tracking rate d_k = d_k + d_alpha*error + d_rate_i + d_rate_f; d_rate_f = d_rate_f + d_beta*error; - + // Keep our rate within a good range d_rate_f = gr_branchless_clip(d_rate_f, d_max_dev); diff --git a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_fff.h b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_fff.h index 43d382713..4909d556b 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_fff.h +++ b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_fff.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2009,2010 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, @@ -44,7 +44,7 @@ class gr_fir_fff; * * \ingroup filter_blk * \ingroup pfb_blk - * + * * This block performs timing synchronization for PAM signals by * minimizing the derivative of the filtered signal, which in turn * maximizes the SNR and minimizes ISI. @@ -160,7 +160,7 @@ class GR_CORE_API gr_pfb_clock_sync_fff : public gr_block * \param gain (float) The alpha gain of the control loop; beta = (gain^2)/4 by default. * \param taps (vector<int>) The filter taps. * \param filter_size (uint) The number of filters in the filterbank (default = 32). - * \param init_phase (float) The initial phase to look at, or which filter to start + * \param init_phase (float) The initial phase to look at, or which filter to start * with (default = 0). * \param max_rate_deviation (float) Distance from 0 d_rate can get (default = 1.5). * @@ -197,13 +197,13 @@ class GR_CORE_API gr_pfb_clock_sync_fff : public gr_block unsigned int filter_size, float init_phase, float max_rate_deviation); - + void create_diff_taps(const std::vector<float> &newtaps, std::vector<float> &difftaps); public: ~gr_pfb_clock_sync_fff (); - + /*! * Resets the filterbank's filter taps with the new prototype filter */ @@ -233,7 +233,7 @@ public: /*! * Set the gain value alpha for the control loop - */ + */ void set_alpha(float alpha) { d_alpha = alpha; @@ -241,7 +241,7 @@ public: /*! * Set the gain value beta for the control loop - */ + */ void set_beta(float beta) { d_beta = beta; @@ -249,7 +249,7 @@ public: /*! * Set the maximum deviation from 0 d_rate can have - */ + */ void set_max_rate_deviation(float m) { d_max_dev = m; diff --git a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_fff.i b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_fff.i index d6bb7873c..754af1a87 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_fff.i +++ b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_fff.i @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/filter/gr_pfb_decimator_ccf.cc b/gnuradio-core/src/lib/filter/gr_pfb_decimator_ccf.cc index 28c6a611a..c973daf82 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_decimator_ccf.cc +++ b/gnuradio-core/src/lib/filter/gr_pfb_decimator_ccf.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2009,2010 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, @@ -32,7 +32,7 @@ #include <gr_expj.h> #include <cstdio> -gr_pfb_decimator_ccf_sptr gr_make_pfb_decimator_ccf (unsigned int decim, +gr_pfb_decimator_ccf_sptr gr_make_pfb_decimator_ccf (unsigned int decim, const std::vector<float> &taps, unsigned int channel) { @@ -40,7 +40,7 @@ gr_pfb_decimator_ccf_sptr gr_make_pfb_decimator_ccf (unsigned int decim, } -gr_pfb_decimator_ccf::gr_pfb_decimator_ccf (unsigned int decim, +gr_pfb_decimator_ccf::gr_pfb_decimator_ccf (unsigned int decim, const std::vector<float> &taps, unsigned int channel) : gr_sync_block ("pfb_decimator_ccf", @@ -92,7 +92,7 @@ gr_pfb_decimator_ccf::set_taps (const std::vector<float> &taps) while((float)(tmp_taps.size()) < d_rate*d_taps_per_filter) { tmp_taps.push_back(0.0); } - + // Partition the filter for(i = 0; i < d_rate; i++) { // Each channel uses all d_taps_per_filter with 0's if not enough taps to fill out @@ -100,7 +100,7 @@ gr_pfb_decimator_ccf::set_taps (const std::vector<float> &taps) for(j = 0; j < d_taps_per_filter; j++) { d_taps[i][j] = tmp_taps[i + j*d_rate]; // add taps to channels in reverse order } - + // Build a filter for each channel and add it's taps to it d_filters[i]->set_taps(d_taps[i]); } @@ -150,7 +150,7 @@ gr_pfb_decimator_ccf::work (int noutput_items, // Filter current input stream from bottom filter to top // The rotate them by expj(j*k*2pi/M) where M is the number of filters // (the decimation rate) and k is the channel number to extract - + // This is the real math that goes on; we abuse the FFT to do this quickly // for decimation rates > N where N is a small number (~5): // out[i] += d_filters[j]->filter(&in[i])*gr_expj(j*d_chan*2*M_PI/d_rate); @@ -168,8 +168,8 @@ gr_pfb_decimator_ccf::work (int noutput_items, // Select only the desired channel out out[i] = d_fft->get_outbuf()[d_chan]; #endif - + } - + return noutput_items; } diff --git a/gnuradio-core/src/lib/filter/gr_pfb_decimator_ccf.h b/gnuradio-core/src/lib/filter/gr_pfb_decimator_ccf.h index 0ae054685..a2b347ae2 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_decimator_ccf.h +++ b/gnuradio-core/src/lib/filter/gr_pfb_decimator_ccf.h @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -29,7 +29,7 @@ class gr_pfb_decimator_ccf; typedef boost::shared_ptr<gr_pfb_decimator_ccf> gr_pfb_decimator_ccf_sptr; -GR_CORE_API gr_pfb_decimator_ccf_sptr gr_make_pfb_decimator_ccf (unsigned int decim, +GR_CORE_API gr_pfb_decimator_ccf_sptr gr_make_pfb_decimator_ccf (unsigned int decim, const std::vector<float> &taps, unsigned int channel=0); @@ -38,45 +38,45 @@ class gri_fft_complex; /*! * \class gr_pfb_decimator_ccf - * \brief Polyphase filterbank bandpass decimator with gr_complex + * \brief Polyphase filterbank bandpass decimator with gr_complex * input, gr_complex output and float taps * * \ingroup filter_blk * \ingroup pfb_blk - * + * * This block takes in a signal stream and performs interger down- * sampling (decimation) with a polyphase filterbank. The first input * is the integer specifying how much to decimate by. The second - * input is a vector (Python list) of floating-point taps of the + * input is a vector (Python list) of floating-point taps of the * prototype filter. The third input specifies the channel to extract. - * By default, the zeroth channel is used, which is the baseband + * By default, the zeroth channel is used, which is the baseband * channel (first Nyquist zone). * * The <EM>channel</EM> parameter specifies which channel to use since * this class is capable of bandpass decimation. Given a complex input * stream at a sampling rate of <EM>fs</EM> and a decimation rate of - * <EM>decim</EM>, the input frequency domain is split into + * <EM>decim</EM>, the input frequency domain is split into * <EM>decim</EM> channels that represent the Nyquist zones. Using the * polyphase filterbank, we can select any one of these channels to * decimate. * * The output signal will be the basebanded and decimated signal from * that channel. This concept is very similar to the PFB channelizer - * (see #gr_pfb_channelizer_ccf) where only a single channel is + * (see #gr_pfb_channelizer_ccf) where only a single channel is * extracted at a time. * * The filter's taps should be based on the sampling rate before * decimation. * * For example, using the GNU Radio's firdes utility to building - * filters, we build a low-pass filter with a sampling rate of + * filters, we build a low-pass filter with a sampling rate of * <EM>fs</EM>, a 3-dB bandwidth of <EM>BW</EM> and a transition * bandwidth of <EM>TB</EM>. We can also specify the out-of-band * attenuation to use, <EM>ATT</EM>, and the filter window * function (a Blackman-harris window in this case). The first input * is the gain of the filter, which we specify here as unity. * - * <B><EM>self._taps = gr.firdes.low_pass_2(1, fs, BW, TB, + * <B><EM>self._taps = gr.firdes.low_pass_2(1, fs, BW, TB, * attenuation_dB=ATT, window=gr.firdes.WIN_BLACKMAN_hARRIS)</EM></B> * * The PFB decimator code takes the taps generated above and builds a @@ -84,13 +84,13 @@ class gri_fft_complex; * and each filter contains ceil(taps.size()/decim) number of taps. * Each tap from the filter prototype is sequentially inserted into * the next filter. When all of the input taps are used, the remaining - * filters in the filterbank are filled out with 0's to make sure each + * filters in the filterbank are filled out with 0's to make sure each * filter has the same number of taps. * - * The theory behind this block can be found in Chapter 6 of + * The theory behind this block can be found in Chapter 6 of * the following book. * - * <B><EM>f. harris, "Multirate Signal Processing for Communication + * <B><EM>f. harris, "Multirate Signal Processing for Communication * Systems," Upper Saddle River, NJ: Prentice Hall, Inc. 2004.</EM></B> */ @@ -122,13 +122,13 @@ class GR_CORE_API gr_pfb_decimator_ccf : public gr_sync_block * \param taps (vector/list of floats) The prototype filter to populate the filterbank. * \param channel (unsigned integer) Selects the channel to return [default=0]. */ - gr_pfb_decimator_ccf (unsigned int decim, + gr_pfb_decimator_ccf (unsigned int decim, const std::vector<float> &taps, unsigned int channel); public: ~gr_pfb_decimator_ccf (); - + /*! * Resets the filterbank's filter taps with the new prototype filter * \param taps (vector/list of floats) The prototype filter to populate the filterbank. @@ -139,7 +139,7 @@ public: * Print all of the filterbank taps to screen. */ void print_taps(); - + //void set_channel (unsigned int channel); int work (int noutput_items, diff --git a/gnuradio-core/src/lib/filter/gr_pfb_decimator_ccf.i b/gnuradio-core/src/lib/filter/gr_pfb_decimator_ccf.i index c4215fce1..e40d00fa9 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_decimator_ccf.i +++ b/gnuradio-core/src/lib/filter/gr_pfb_decimator_ccf.i @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/filter/gr_pfb_interpolator_ccf.cc b/gnuradio-core/src/lib/filter/gr_pfb_interpolator_ccf.cc index e20bc38bb..9c8e734ea 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_interpolator_ccf.cc +++ b/gnuradio-core/src/lib/filter/gr_pfb_interpolator_ccf.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2009,2010 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, @@ -30,14 +30,14 @@ #include <gr_io_signature.h> #include <cstdio> -gr_pfb_interpolator_ccf_sptr gr_make_pfb_interpolator_ccf (unsigned int interp, +gr_pfb_interpolator_ccf_sptr gr_make_pfb_interpolator_ccf (unsigned int interp, const std::vector<float> &taps) { return gnuradio::get_initial_sptr(new gr_pfb_interpolator_ccf (interp, taps)); } -gr_pfb_interpolator_ccf::gr_pfb_interpolator_ccf (unsigned int interp, +gr_pfb_interpolator_ccf::gr_pfb_interpolator_ccf (unsigned int interp, const std::vector<float> &taps) : gr_sync_interpolator ("pfb_interpolator_ccf", gr_make_io_signature (1, 1, sizeof(gr_complex)), @@ -84,7 +84,7 @@ gr_pfb_interpolator_ccf::set_taps (const std::vector<float> &taps) while((float)(tmp_taps.size()) < d_rate*d_taps_per_filter) { tmp_taps.push_back(0.0); } - + // Partition the filter for(i = 0; i < d_rate; i++) { // Each channel uses all d_taps_per_filter with 0's if not enough taps to fill out @@ -92,7 +92,7 @@ gr_pfb_interpolator_ccf::set_taps (const std::vector<float> &taps) for(j = 0; j < d_taps_per_filter; j++) { d_taps[i][j] = tmp_taps[i + j*d_rate]; // add taps to channels in reverse order } - + // Build a filter for each channel and add it's taps to it d_filters[i]->set_taps(d_taps[i]); } @@ -138,6 +138,6 @@ gr_pfb_interpolator_ccf::work (int noutput_items, } count++; } - + return i; } diff --git a/gnuradio-core/src/lib/filter/gr_pfb_interpolator_ccf.h b/gnuradio-core/src/lib/filter/gr_pfb_interpolator_ccf.h index 6885881e9..aeae86e40 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_interpolator_ccf.h +++ b/gnuradio-core/src/lib/filter/gr_pfb_interpolator_ccf.h @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -29,7 +29,7 @@ class gr_pfb_interpolator_ccf; typedef boost::shared_ptr<gr_pfb_interpolator_ccf> gr_pfb_interpolator_ccf_sptr; -GR_CORE_API gr_pfb_interpolator_ccf_sptr gr_make_pfb_interpolator_ccf (unsigned int interp, +GR_CORE_API gr_pfb_interpolator_ccf_sptr gr_make_pfb_interpolator_ccf (unsigned int interp, const std::vector<float> &taps); class gr_fir_ccf; @@ -41,7 +41,7 @@ class gr_fir_ccf; * * \ingroup filter_blk * \ingroup pfb_blk - * + * * This block takes in a signal stream and performs interger up- * sampling (interpolation) with a polyphase filterbank. The first * input is the integer specifying how much to interpolate by. The @@ -62,7 +62,7 @@ class gr_fir_ccf; * output levels are the same as the input (this creates an overall * increase in power). * - * <B><EM>self._taps = gr.firdes.low_pass_2(interp, interp*fs, BW, TB, + * <B><EM>self._taps = gr.firdes.low_pass_2(interp, interp*fs, BW, TB, * attenuation_dB=ATT, window=gr.firdes.WIN_BLACKMAN_hARRIS)</EM></B> * * The PFB interpolator code takes the taps generated above and builds @@ -105,12 +105,12 @@ class GR_CORE_API gr_pfb_interpolator_ccf : public gr_sync_interpolator * \param taps (vector/list of floats) The prototype filter to populate the filterbank. The taps * should be generated at the interpolated sampling rate. */ - gr_pfb_interpolator_ccf (unsigned int interp, + gr_pfb_interpolator_ccf (unsigned int interp, const std::vector<float> &taps); - + public: ~gr_pfb_interpolator_ccf (); - + /*! * Resets the filterbank's filter taps with the new prototype filter * \param taps (vector/list of floats) The prototype filter to populate the filterbank. The taps @@ -122,7 +122,7 @@ public: * Print all of the filterbank taps to screen. */ void print_taps(); - + int work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); diff --git a/gnuradio-core/src/lib/filter/gr_pfb_interpolator_ccf.i b/gnuradio-core/src/lib/filter/gr_pfb_interpolator_ccf.i index cf4302d45..427f1b913 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_interpolator_ccf.i +++ b/gnuradio-core/src/lib/filter/gr_pfb_interpolator_ccf.i @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/filter/gr_pfb_synthesis_filterbank_ccf.cc b/gnuradio-core/src/lib/filter/gr_pfb_synthesis_filterbank_ccf.cc deleted file mode 100644 index 9fad1bd0d..000000000 --- a/gnuradio-core/src/lib/filter/gr_pfb_synthesis_filterbank_ccf.cc +++ /dev/null @@ -1,169 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2010 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 <gr_pfb_synthesis_filterbank_ccf.h> -#include <gri_fft.h> -#include <gr_io_signature.h> -#include <cstdio> -#include <cstring> - -gr_pfb_synthesis_filterbank_ccf_sptr gr_make_pfb_synthesis_filterbank_ccf - (unsigned int numchans, const std::vector<float> &taps) -{ - return gr_pfb_synthesis_filterbank_ccf_sptr - (new gr_pfb_synthesis_filterbank_ccf (numchans, taps)); -} - - -gr_pfb_synthesis_filterbank_ccf::gr_pfb_synthesis_filterbank_ccf - (unsigned int numchans, const std::vector<float> &taps) - : gr_sync_interpolator ("pfb_synthesis_filterbank_ccf", - gr_make_io_signature (1, numchans, sizeof(gr_complex)), - gr_make_io_signature (1, 1, sizeof(gr_complex)), - numchans), - d_updated (false), d_numchans(numchans) -{ - d_filters = std::vector<gri_fir_filter_with_buffer_ccf*>(d_numchans); - - // Create an FIR filter for each channel and zero out the taps - std::vector<float> vtaps(0, d_numchans); - for(unsigned int i = 0; i < d_numchans; i++) { - d_filters[i] = new gri_fir_filter_with_buffer_ccf(vtaps); - } - - // Now, actually set the filters' taps - set_taps(taps); - - // Create the IFFT to handle the input channel rotations - d_fft = new gri_fft_complex (d_numchans, true); -} - -gr_pfb_synthesis_filterbank_ccf::~gr_pfb_synthesis_filterbank_ccf () -{ - for(unsigned int i = 0; i < d_numchans; i++) { - delete d_filters[i]; - } -} - -void -gr_pfb_synthesis_filterbank_ccf::set_taps (const std::vector<float> &taps) -{ - unsigned int i,j; - - unsigned int ntaps = taps.size(); - d_taps_per_filter = (unsigned int)ceil((double)ntaps/(double)d_numchans); - - // Create d_numchan vectors to store each channel's taps - d_taps.resize(d_numchans); - - // Make a vector of the taps plus fill it out with 0's to fill - // each polyphase filter with exactly d_taps_per_filter - std::vector<float> tmp_taps; - tmp_taps = taps; - while((float)(tmp_taps.size()) < d_numchans*d_taps_per_filter) { - tmp_taps.push_back(0.0); - } - - // Partition the filter - for(i = 0; i < d_numchans; i++) { - // Each channel uses all d_taps_per_filter with 0's if not enough taps to fill out - d_taps[i] = std::vector<float>(d_taps_per_filter, 0); - for(j = 0; j < d_taps_per_filter; j++) { - d_taps[i][j] = tmp_taps[i + j*d_numchans]; // add taps to channels in reverse order - } - - // Build a filter for each channel and add it's taps to it - d_filters[i]->set_taps(d_taps[i]); - } - - // Set the history to ensure enough input items for each filter - set_history (d_taps_per_filter+1); - - d_updated = true; -} - -void -gr_pfb_synthesis_filterbank_ccf::print_taps() -{ - unsigned int i, j; - for(i = 0; i < d_numchans; i++) { - printf("filter[%d]: [", i); - for(j = 0; j < d_taps_per_filter; j++) { - printf(" %.4e", d_taps[i][j]); - } - printf("]\n\n"); - } -} - - -int -gr_pfb_synthesis_filterbank_ccf::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]; - gr_complex *out = (gr_complex *) output_items[0]; - int numsigs = input_items.size(); - int ndiff = d_numchans - numsigs; - unsigned int nhalf = (unsigned int)ceil((float)numsigs/2.0f); - - if (d_updated) { - d_updated = false; - return 0; // history requirements may have changed. - } - - unsigned int n, i; - for(n = 0; n < noutput_items/d_numchans; n++) { - // fill up the populated channels based on the - // number of real input streams - for(i = 0; i < nhalf; i++) { - in = (gr_complex*)input_items[i]; - d_fft->get_inbuf()[i] = (in+i)[n]; - } - - // Make the ndiff channels around N/2 0 - for(; i < nhalf+ndiff; i++) { - d_fft->get_inbuf()[i] = gr_complex(0,0); - } - - // Finish off channels with data - for(; i < d_numchans; i++) { - in = (gr_complex*)input_items[i-ndiff]; - d_fft->get_inbuf()[i] = (in+i)[n]; - } - - // spin through IFFT - d_fft->execute(); - - for(i = 0; i < d_numchans; i++) { - out[d_numchans-i-1] = d_filters[d_numchans-i-1]->filter(d_fft->get_outbuf()[i]); - } - - out += d_numchans; - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/filter/gr_pfb_synthesis_filterbank_ccf.h b/gnuradio-core/src/lib/filter/gr_pfb_synthesis_filterbank_ccf.h deleted file mode 100644 index 1f772b1dd..000000000 --- a/gnuradio-core/src/lib/filter/gr_pfb_synthesis_filterbank_ccf.h +++ /dev/null @@ -1,100 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2010 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_GR_PFB_SYNTHESIS_FILTERBANK_CCF_H -#define INCLUDED_GR_PFB_SYNTHESIS_FILTERBANK_CCF_H - -#include <gr_core_api.h> -#include <gr_sync_interpolator.h> -#include <gri_fir_filter_with_buffer_ccf.h> - -class gr_pfb_synthesis_filterbank_ccf; -typedef boost::shared_ptr<gr_pfb_synthesis_filterbank_ccf> gr_pfb_synthesis_filterbank_ccf_sptr; -GR_CORE_API gr_pfb_synthesis_filterbank_ccf_sptr gr_make_pfb_synthesis_filterbank_ccf - (unsigned int numchans, const std::vector<float> &taps); - -class gri_fft_complex; - - -/*! - * \class gr_pfb_synthesis_filterbank_ccf - * - * \brief Polyphase synthesis filterbank with - * gr_complex input, gr_complex output and float taps - * - * \ingroup filter_blk - * \ingroup pfb_blk - */ - -class GR_CORE_API gr_pfb_synthesis_filterbank_ccf : public gr_sync_interpolator -{ - private: - /*! - * Build the polyphase synthesis filterbank. - * \param numchans (unsigned integer) Specifies the number of - channels <EM>M</EM> - * \param taps (vector/list of floats) The prototype filter to - populate the filterbank. - */ - friend GR_CORE_API gr_pfb_synthesis_filterbank_ccf_sptr gr_make_pfb_synthesis_filterbank_ccf - (unsigned int numchans, const std::vector<float> &taps); - - bool d_updated; - unsigned int d_numchans; - unsigned int d_taps_per_filter; - gri_fft_complex *d_fft; - std::vector< gri_fir_filter_with_buffer_ccf*> d_filters; - std::vector< std::vector<float> > d_taps; - - - /*! - * Build the polyphase synthesis filterbank. - * \param numchans (unsigned integer) Specifies the number of - channels <EM>M</EM> - * \param taps (vector/list of floats) The prototype filter - to populate the filterbank. - */ - gr_pfb_synthesis_filterbank_ccf (unsigned int numchans, - const std::vector<float> &taps); - -public: - ~gr_pfb_synthesis_filterbank_ccf (); - - /*! - * Resets the filterbank's filter taps with the new prototype filter - * \param taps (vector/list of floats) The prototype filter to - populate the filterbank. - */ - void set_taps (const std::vector<float> &taps); - - /*! - * Print all of the filterbank taps to screen. - */ - void print_taps(); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/filter/gr_pfb_synthesizer_ccf.cc b/gnuradio-core/src/lib/filter/gr_pfb_synthesizer_ccf.cc new file mode 100644 index 000000000..9910a1851 --- /dev/null +++ b/gnuradio-core/src/lib/filter/gr_pfb_synthesizer_ccf.cc @@ -0,0 +1,286 @@ +/* -*- c++ -*- */ +/* + * Copyright 2010,2012 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <gr_pfb_synthesizer_ccf.h> +#include <gri_fft.h> +#include <gr_io_signature.h> +#include <cstdio> +#include <cstring> + +gr_pfb_synthesizer_ccf_sptr gr_make_pfb_synthesizer_ccf + (unsigned int numchans, const std::vector<float> &taps, bool twox) +{ + return gr_pfb_synthesizer_ccf_sptr + (new gr_pfb_synthesizer_ccf (numchans, taps, twox)); +} + + +gr_pfb_synthesizer_ccf::gr_pfb_synthesizer_ccf + (unsigned int numchans, const std::vector<float> &taps, bool twox) + : gr_sync_interpolator ("pfb_synthesizer_ccf", + gr_make_io_signature (1, numchans, sizeof(gr_complex)), + gr_make_io_signature (1, 1, sizeof(gr_complex)), + numchans), + d_updated (false), d_numchans(numchans), d_state(0) +{ + // set up 2x multiplier; if twox==True, set to 2, otherwise to 1 + d_twox = (twox ? 2 : 1); + if(d_numchans % d_twox != 0) { + throw std::invalid_argument("gr_pfb_synthesizer_ccf: number of channels must be even for 2x oversampling.\n"); + } + + d_filters = std::vector<gri_fir_filter_with_buffer_ccf*>(d_twox*d_numchans); + d_channel_map.resize(d_twox*d_numchans); + + // Create an FIR filter for each channel and zero out the taps + std::vector<float> vtaps(0, d_twox*d_numchans); + for(unsigned int i = 0; i < d_twox*d_numchans; i++) { + d_filters[i] = new gri_fir_filter_with_buffer_ccf(vtaps); + d_channel_map[i] = i; + } + + // Now, actually set the filters' taps + set_taps(taps); + + // Create the IFFT to handle the input channel rotations + d_fft = new gri_fft_complex (d_twox*d_numchans, false); + memset(d_fft->get_inbuf(), 0, d_twox*d_numchans*sizeof(gr_complex)); + + set_output_multiple(d_numchans); +} + +gr_pfb_synthesizer_ccf::~gr_pfb_synthesizer_ccf () +{ + for(unsigned int i = 0; i < d_twox*d_numchans; i++) { + delete d_filters[i]; + } +} + +void +gr_pfb_synthesizer_ccf::set_taps(const std::vector<float> &taps) +{ + gruel::scoped_lock guard(d_mutex); + if(d_twox == 1) + set_taps1(taps); + else + set_taps2(taps); +} + +void +gr_pfb_synthesizer_ccf::set_taps1(const std::vector<float> &taps) +{ + unsigned int i,j; + + unsigned int ntaps = taps.size(); + d_taps_per_filter = (unsigned int)ceil((double)ntaps/(double)d_numchans); + + // Create d_numchan vectors to store each channel's taps + d_taps.resize(d_numchans); + + // Make a vector of the taps plus fill it out with 0's to fill + // each polyphase filter with exactly d_taps_per_filter + std::vector<float> tmp_taps; + tmp_taps = taps; + while((float)(tmp_taps.size()) < d_numchans*d_taps_per_filter) { + tmp_taps.push_back(0.0); + } + + // Partition the filter + for(i = 0; i < d_numchans; i++) { + // Each channel uses all d_taps_per_filter with 0's if not enough taps to fill out + d_taps[i] = std::vector<float>(d_taps_per_filter, 0); + for(j = 0; j < d_taps_per_filter; j++) { + d_taps[i][j] = tmp_taps[i + j*d_numchans]; // add taps to channels in reverse order + } + + // Build a filter for each channel and add it's taps to it + d_filters[i]->set_taps(d_taps[i]); + } + + // Set the history to ensure enough input items for each filter + set_history (d_taps_per_filter+1); + + d_updated = true; +} + +void +gr_pfb_synthesizer_ccf::set_taps2 (const std::vector<float> &taps) +{ + unsigned int i,j; + int state = 0; + + unsigned int ntaps = taps.size(); + d_taps_per_filter = (unsigned int)ceil((double)ntaps/(double)d_numchans); + + // Create d_numchan vectors to store each channel's taps + d_taps.resize(d_twox*d_numchans); + + // Make a vector of the taps plus fill it out with 0's to fill + // each polyphase filter with exactly d_taps_per_filter + std::vector<float> tmp_taps; + tmp_taps = taps; + while((float)(tmp_taps.size()) < d_numchans*d_taps_per_filter) { + tmp_taps.push_back(0.0); + } + + // Partition the filter + for(i = 0; i < d_numchans; i++) { + // Each channel uses all d_taps_per_filter with 0's if not enough taps to fill out + d_taps[i] = std::vector<float>(d_taps_per_filter, 0); + d_taps[d_numchans+i] = std::vector<float>(d_taps_per_filter, 0); + state = 0; + for(j = 0; j < d_taps_per_filter; j++) { + // add taps to channels in reverse order + // Zero out every other tap + if(state == 0) { + d_taps[i][j] = tmp_taps[i + j*d_numchans]; + d_taps[d_numchans + i][j] = 0; + state = 1; + } + else { + d_taps[i][j] = 0; + d_taps[d_numchans + i][j] = tmp_taps[i + j*d_numchans]; + state = 0; + } + } + + // Build a filter for each channel and add it's taps to it + d_filters[i]->set_taps(d_taps[i]); + d_filters[d_numchans + i]->set_taps(d_taps[d_numchans + i]); + } + + // Set the history to ensure enough input items for each filter + set_history (d_taps_per_filter+1); + + d_updated = true; +} + +void +gr_pfb_synthesizer_ccf::print_taps() +{ + unsigned int i, j; + for(i = 0; i < d_twox*d_numchans; i++) { + printf("filter[%d]: [", i); + for(j = 0; j < d_taps_per_filter; j++) { + printf(" %.4e", d_taps[i][j]); + } + printf("]\n\n"); + } +} + + +std::vector< std::vector<float> > +gr_pfb_synthesizer_ccf::taps() const +{ + return d_taps; +} + +void +gr_pfb_synthesizer_ccf::set_channel_map(const std::vector<int> &map) +{ + gruel::scoped_lock guard(d_mutex); + + if(map.size() > 0) { + unsigned int max = (unsigned int)*std::max_element(map.begin(), map.end()); + unsigned int min = (unsigned int)*std::min_element(map.begin(), map.end()); + if((max >= d_twox*d_numchans) || (min < 0)) { + throw std::invalid_argument("gr_pfb_synthesizer_ccf::set_channel_map: map range out of bounds.\n"); + } + d_channel_map = map; + + // Zero out fft buffer so that unused channels are always 0 + memset(d_fft->get_inbuf(), 0,d_twox*d_numchans*sizeof(gr_complex)); + } +} + +std::vector<int> +gr_pfb_synthesizer_ccf::channel_map() const +{ + return d_channel_map; +} + +int +gr_pfb_synthesizer_ccf::work (int noutput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items) +{ + gruel::scoped_lock guard(d_mutex); + + gr_complex *in = (gr_complex*) input_items[0]; + gr_complex *out = (gr_complex *) output_items[0]; + + if (d_updated) { + d_updated = false; + return 0; // history requirements may have changed. + } + + unsigned int n, i; + size_t ninputs = input_items.size(); + + // Algoritm for critically sampled channels + if(d_twox == 1) { + for(n = 0; n < noutput_items/d_numchans; n++) { + for(i = 0; i < ninputs; i++) { + in = (gr_complex*)input_items[i]; + d_fft->get_inbuf()[d_channel_map[i]] = in[n]; + } + + // spin through IFFT + d_fft->execute(); + + for(i = 0; i < d_numchans; i++) { + out[i] = d_filters[i]->filter(d_fft->get_outbuf()[i]); + } + out += d_numchans; + } + } + + // Algorithm for oversampling by 2x + else { + for(n = 0; n < noutput_items/d_numchans; n++) { + for(i = 0; i < ninputs; i++) { + in = (gr_complex*)input_items[i]; + d_fft->get_inbuf()[d_channel_map[i]] = in[n]; + } + + // spin through IFFT + d_fft->execute(); + + // Output is sum of two filters, but the input buffer to the filters must be circularly + // shifted by numchans every time through, done by using d_state to determine which IFFT + // buffer position to pull from. + for(i = 0; i < d_numchans; i++) { + out[i] = d_filters[i]->filter(d_fft->get_outbuf()[d_state*d_numchans+i]); + out[i] += d_filters[d_numchans+i]->filter(d_fft->get_outbuf()[(d_state^1)*d_numchans+i]); + } + d_state ^= 1; + + out += d_numchans; + } + } + + return noutput_items; +} diff --git a/gnuradio-core/src/lib/filter/gr_pfb_synthesizer_ccf.h b/gnuradio-core/src/lib/filter/gr_pfb_synthesizer_ccf.h new file mode 100644 index 000000000..9e4f85497 --- /dev/null +++ b/gnuradio-core/src/lib/filter/gr_pfb_synthesizer_ccf.h @@ -0,0 +1,147 @@ +/* -*- c++ -*- */ +/* + * Copyright 2010,2012 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + + +#ifndef INCLUDED_GR_PFB_SYNTHESIZER_CCF_H +#define INCLUDED_GR_PFB_SYNTHESIZER_CCF_H + +#include <gr_core_api.h> +#include <gr_sync_interpolator.h> +#include <gri_fir_filter_with_buffer_ccf.h> +#include <gruel/thread.h> + +class gr_pfb_synthesizer_ccf; +typedef boost::shared_ptr<gr_pfb_synthesizer_ccf> gr_pfb_synthesizer_ccf_sptr; +GR_CORE_API gr_pfb_synthesizer_ccf_sptr gr_make_pfb_synthesizer_ccf + (unsigned int numchans, const std::vector<float> &taps, bool twox=false); + +class gri_fft_complex; + + +/*! + * \class gr_pfb_synthesizer_ccf + * + * \brief Polyphase synthesis filterbank with + * gr_complex input, gr_complex output and float taps + * + * \ingroup filter_blk + * \ingroup pfb_blk + */ + +class GR_CORE_API gr_pfb_synthesizer_ccf : public gr_sync_interpolator +{ + private: + /*! + * Build the polyphase synthesis filterbank. + * \param numchans (unsigned integer) Specifies the number of + channels <EM>M</EM> + * \param taps (vector/list of floats) The prototype filter to + populate the filterbank. + * \param twox (bool) use 2x oversampling or not (default is no) + */ + friend GR_CORE_API gr_pfb_synthesizer_ccf_sptr gr_make_pfb_synthesizer_ccf + (unsigned int numchans, const std::vector<float> &taps, bool twox); + + bool d_updated; + unsigned int d_numchans; + unsigned int d_taps_per_filter; + gri_fft_complex *d_fft; + std::vector< gri_fir_filter_with_buffer_ccf*> d_filters; + std::vector< std::vector<float> > d_taps; + int d_state; + std::vector<int> d_channel_map; + unsigned int d_twox; + gruel::mutex d_mutex; // mutex to protect set/work access + + /*! + * \brief Tap setting algorithm for critically sampled channels + */ + void set_taps1(const std::vector<float> &taps); + + /*! + * \brief Tap setting algorithm for 2x over-sampled channels + */ + void set_taps2(const std::vector<float> &taps); + + /*! + * Build the polyphase synthesis filterbank. + * \param numchans (unsigned integer) Specifies the number of + channels <EM>M</EM> + * \param taps (vector/list of floats) The prototype filter + to populate the filterbank. + * \param twox (bool) use 2x oversampling or not (default is no) + */ + gr_pfb_synthesizer_ccf (unsigned int numchans, + const std::vector<float> &taps, + bool twox); + +public: + ~gr_pfb_synthesizer_ccf (); + + /*! + * Resets the filterbank's filter taps with the new prototype filter + * \param taps (vector/list of floats) The prototype filter to + populate the filterbank. + */ + void set_taps (const std::vector<float> &taps); + + /*! + * Print all of the filterbank taps to screen. + */ + void print_taps(); + + /*! + * Return a vector<vector<>> of the filterbank taps + */ + std::vector<std::vector<float> > taps() const; + + /*! + * Set the channel map. Channels are numbers as: + * N/2+1 | ... | N-1 | 0 | 1 | 2 | ... | N/2 + * <------------------- 0 --------------------> + * freq + * + * So input stream 0 goes to channel 0, etc. Setting a new channel + * map allows the user to specify where in frequency he/she wants + * the input stream to go. This is especially useful to avoid + * putting signals into the channels on the edge of the spectrum + * which can either wrap around (in the case of odd number of + * channels) and be affected by filter rolloff in the transmitter. + * + * The map must be at least the number of streams being sent to the + * block. Less and the algorithm will not have enough data to + * properly setup the buffers. Any more channels specified will be + * ignored. + */ + void set_channel_map(const std::vector<int> &map); + + /*! + * Gets the current channel map. + */ + std::vector<int> channel_map() const; + + int work (int noutput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); +}; + +#endif diff --git a/gnuradio-core/src/lib/filter/gr_pfb_synthesis_filterbank_ccf.i b/gnuradio-core/src/lib/filter/gr_pfb_synthesizer_ccf.i index 02a9f0255..c186ae355 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_synthesis_filterbank_ccf.i +++ b/gnuradio-core/src/lib/filter/gr_pfb_synthesizer_ccf.i @@ -1,38 +1,44 @@ /* -*- c++ -*- */ /* - * Copyright 2010 Free Software Foundation, Inc. - * + * Copyright 2010,2012 Free Software Foundation, Inc. + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ -GR_SWIG_BLOCK_MAGIC(gr,pfb_synthesis_filterbank_ccf); +GR_SWIG_BLOCK_MAGIC(gr,pfb_synthesizer_ccf); -gr_pfb_synthesis_filterbank_ccf_sptr gr_make_pfb_synthesis_filterbank_ccf - (unsigned int numchans, const std::vector<float> &taps); +gr_pfb_synthesizer_ccf_sptr gr_make_pfb_synthesizer_ccf + (unsigned int numchans, const std::vector<float> &taps, bool twox=false); -class gr_pfb_synthesis_filterbank_ccf : public gr_sync_interpolator +class gr_pfb_synthesizer_ccf : public gr_sync_interpolator { private: - gr_pfb_synthesis_filterbank_ccf (unsigned int numchans, - const std::vector<float> &taps); + gr_pfb_synthesizer_ccf (unsigned int numchans, + const std::vector<float> &taps, + bool twox=false); public: - ~gr_pfb_synthesis_filterbank_ccf (); + ~gr_pfb_synthesizer_ccf (); void set_taps (const std::vector<float> &taps); + void print_taps(); + std::vector< std::vector<float> > taps() const; + + void set_channel_map(const std::vector<int> &map); + std::vector<int> channel_map() const; }; diff --git a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_XXX.cc.t b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_XXX.cc.t index 3e9a34cdc..445834dda 100644 --- a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_XXX.cc.t +++ b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_XXX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -37,9 +37,9 @@ #include <stdexcept> #include <iostream> -@SPTR_NAME@ +@SPTR_NAME@ gr_make_@BASE_NAME@ (unsigned interpolation, - unsigned decimation, + unsigned decimation, const std::vector<@TAP_TYPE@> &taps) { return gnuradio::get_initial_sptr (new @NAME@ (interpolation, decimation, taps)); @@ -64,7 +64,7 @@ gr_make_@BASE_NAME@ (unsigned interpolation, set_output_multiple (1); std::vector<@TAP_TYPE@> dummy_taps; - + for (unsigned i = 0; i < interpolation; i++) d_firs[i] = gr_fir_util::create_@FIR_TYPE@ (dummy_taps); @@ -108,14 +108,14 @@ void std::vector< std::vector <@TAP_TYPE@> > xtaps (nfilters); for (int n = 0; n < nfilters; n++) - xtaps[n].resize (nt); + xtaps[n].resize (nt); for (int i = 0; i < (int) taps.size(); i++) xtaps[i % nfilters][i / nfilters] = taps[i]; for (int n = 0; n < nfilters; n++) d_firs[n]->set_taps (xtaps[n]); - + set_history (nt); d_updated = false; diff --git a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_XXX.h.t b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_XXX.h.t index 8f50acc72..3eb85a979 100644 --- a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_XXX.h.t +++ b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_XXX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -55,7 +55,7 @@ class GR_CORE_API @NAME@ : public gr_block bool d_updated; std::vector<@FIR_TYPE@ *> d_firs; - friend GR_CORE_API @SPTR_NAME@ + friend GR_CORE_API @SPTR_NAME@ gr_make_@BASE_NAME@ (unsigned interpolation, unsigned decimation, const std::vector<@TAP_TYPE@> &taps); @@ -83,6 +83,6 @@ class GR_CORE_API @NAME@ : public gr_block gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); }; - + #endif diff --git a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_XXX.i.t b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_XXX.i.t index 1416933e2..1f789b0a3 100644 --- a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_XXX.i.t +++ b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_XXX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/filter/gr_rotator.h b/gnuradio-core/src/lib/filter/gr_rotator.h index 23c7a2830..e31be6ee6 100644 --- a/gnuradio-core/src/lib/filter/gr_rotator.h +++ b/gnuradio-core/src/lib/filter/gr_rotator.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003,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, diff --git a/gnuradio-core/src/lib/filter/gr_sincos.c b/gnuradio-core/src/lib/filter/gr_sincos.c index 57b26b22f..a8d01b0da 100644 --- a/gnuradio-core/src/lib/filter/gr_sincos.c +++ b/gnuradio-core/src/lib/filter/gr_sincos.c @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, diff --git a/gnuradio-core/src/lib/filter/gr_sincos.h b/gnuradio-core/src/lib/filter/gr_sincos.h index 3d5c99083..516f43437 100644 --- a/gnuradio-core/src/lib/filter/gr_sincos.h +++ b/gnuradio-core/src/lib/filter/gr_sincos.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -28,7 +28,7 @@ #ifdef __cplusplus extern "C" { #endif - + // compute sine and cosine at the same time GR_CORE_API void gr_sincos (double x, double *sin, double *cos); diff --git a/gnuradio-core/src/lib/filter/gr_single_pole_iir.h b/gnuradio-core/src/lib/filter/gr_single_pole_iir.h index fb52e29e9..d73ee857d 100644 --- a/gnuradio-core/src/lib/filter/gr_single_pole_iir.h +++ b/gnuradio-core/src/lib/filter/gr_single_pole_iir.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2006 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, @@ -28,7 +28,7 @@ /*! * \brief class template for single pole IIR filter */ -template<class o_type, class i_type, class tap_type> +template<class o_type, class i_type, class tap_type> class gr_single_pole_iir { public: /*! @@ -58,7 +58,7 @@ public: * \brief install \p alpha as the current taps. */ void set_taps (tap_type alpha) - { + { if (alpha < 0 || alpha > 1) throw std::out_of_range ("Alpha must be in [0, 1]\n"); @@ -73,7 +73,7 @@ public: } o_type prev_output () const { return d_prev_output; } - + protected: tap_type d_alpha; tap_type d_one_minus_alpha; @@ -84,7 +84,7 @@ protected: // // general case. We may want to specialize this // -template<class o_type, class i_type, class tap_type> +template<class o_type, class i_type, class tap_type> o_type gr_single_pole_iir<o_type, i_type, tap_type>::filter (const i_type input) { @@ -97,8 +97,8 @@ gr_single_pole_iir<o_type, i_type, tap_type>::filter (const i_type input) } -template<class o_type, class i_type, class tap_type> -void +template<class o_type, class i_type, class tap_type> +void gr_single_pole_iir<o_type, i_type, tap_type>::filterN (o_type output[], const i_type input[], unsigned long n) @@ -112,7 +112,7 @@ gr_single_pole_iir<o_type, i_type, tap_type>::filterN (o_type output[], // Specialized case for gr_complex output and double taps // We need to have a gr_complexd type for the calculations and prev_output variable (in stead of double) -template<class i_type> +template<class i_type> class gr_single_pole_iir<gr_complex, i_type, double> { public: /*! @@ -142,7 +142,7 @@ public: * \brief install \p alpha as the current taps. */ void set_taps (double alpha) - { + { if (alpha < 0 || alpha > 1) throw std::out_of_range ("Alpha must be in [0, 1]\n"); @@ -157,14 +157,14 @@ public: } gr_complexd prev_output () const { return d_prev_output; } - + protected: double d_alpha; double d_one_minus_alpha; gr_complexd d_prev_output; }; -template< class i_type> +template< class i_type> gr_complex gr_single_pole_iir<gr_complex, i_type, double>::filter (const i_type input) { @@ -178,8 +178,8 @@ gr_single_pole_iir<gr_complex, i_type, double>::filter (const i_type input) //Do we need to specialize this, although it is the same as the general case? -template<class i_type> -void +template<class i_type> +void gr_single_pole_iir<gr_complex, i_type, double>::filterN (gr_complex output[], const i_type input[], unsigned long n) diff --git a/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_cc.cc b/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_cc.cc index 8f8efb7e6..ae4f654dd 100644 --- a/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_cc.cc +++ b/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_cc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006,2010 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, @@ -29,7 +29,7 @@ #include <stdio.h> -gr_single_pole_iir_filter_cc_sptr +gr_single_pole_iir_filter_cc_sptr gr_make_single_pole_iir_filter_cc (double alpha, unsigned int vlen) { return gnuradio::get_initial_sptr(new gr_single_pole_iir_filter_cc(alpha, vlen)); diff --git a/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_cc.h b/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_cc.h index 78fa25393..13c595826 100644 --- a/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_cc.h +++ b/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_cc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2005,2006 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, @@ -32,7 +32,7 @@ class gr_single_pole_iir_filter_cc; typedef boost::shared_ptr<gr_single_pole_iir_filter_cc> gr_single_pole_iir_filter_cc_sptr; -GR_CORE_API gr_single_pole_iir_filter_cc_sptr +GR_CORE_API gr_single_pole_iir_filter_cc_sptr gr_make_single_pole_iir_filter_cc (double alpha, unsigned int vlen=1); /*! @@ -67,7 +67,7 @@ gr_make_single_pole_iir_filter_cc (double alpha, unsigned int vlen=1); class GR_CORE_API gr_single_pole_iir_filter_cc : public gr_sync_block { private: - friend GR_CORE_API gr_single_pole_iir_filter_cc_sptr + friend GR_CORE_API gr_single_pole_iir_filter_cc_sptr gr_make_single_pole_iir_filter_cc (double alpha, unsigned int vlen); unsigned int d_vlen; diff --git a/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_cc.i b/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_cc.i index 2a7c0efe5..2f1f285de 100644 --- a/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_cc.i +++ b/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_cc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006 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, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,single_pole_iir_filter_cc); -gr_single_pole_iir_filter_cc_sptr +gr_single_pole_iir_filter_cc_sptr gr_make_single_pole_iir_filter_cc (double alpha, unsigned int vlen=1); class gr_single_pole_iir_filter_cc : public gr_sync_block diff --git a/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_ff.cc b/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_ff.cc index 3282f1fc3..047b2ba25 100644 --- a/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_ff.cc +++ b/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_ff.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -29,7 +29,7 @@ #include <stdio.h> -gr_single_pole_iir_filter_ff_sptr +gr_single_pole_iir_filter_ff_sptr gr_make_single_pole_iir_filter_ff (double alpha, unsigned int vlen) { return gnuradio::get_initial_sptr(new gr_single_pole_iir_filter_ff(alpha, vlen)); diff --git a/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_ff.h b/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_ff.h index d2bae5c26..8dcdad2c9 100644 --- a/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_ff.h +++ b/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_ff.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2005 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, @@ -31,7 +31,7 @@ class gr_single_pole_iir_filter_ff; typedef boost::shared_ptr<gr_single_pole_iir_filter_ff> gr_single_pole_iir_filter_ff_sptr; -GR_CORE_API gr_single_pole_iir_filter_ff_sptr +GR_CORE_API gr_single_pole_iir_filter_ff_sptr gr_make_single_pole_iir_filter_ff (double alpha, unsigned int vlen=1); /*! @@ -66,7 +66,7 @@ H(z) = \ frac{alpha}{1 - (1-alpha) z^{-1}} class GR_CORE_API gr_single_pole_iir_filter_ff : public gr_sync_block { private: - friend GR_CORE_API gr_single_pole_iir_filter_ff_sptr + friend GR_CORE_API gr_single_pole_iir_filter_ff_sptr gr_make_single_pole_iir_filter_ff (double alpha, unsigned int vlen); unsigned int d_vlen; diff --git a/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_ff.i b/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_ff.i index 1acecac72..a835fabb2 100644 --- a/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_ff.i +++ b/gnuradio-core/src/lib/filter/gr_single_pole_iir_filter_ff.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,single_pole_iir_filter_ff); -gr_single_pole_iir_filter_ff_sptr +gr_single_pole_iir_filter_ff_sptr gr_make_single_pole_iir_filter_ff (double alpha, unsigned int vlen=1); class gr_single_pole_iir_filter_ff : public gr_sync_block diff --git a/gnuradio-core/src/lib/filter/gr_vec_types.h b/gnuradio-core/src/lib/filter/gr_vec_types.h index af05c7bba..2bcec44bf 100644 --- a/gnuradio-core/src/lib/filter/gr_vec_types.h +++ b/gnuradio-core/src/lib/filter/gr_vec_types.h @@ -3,7 +3,7 @@ This file 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 2 of the License, or (at your option) + Software Foundation; either version 2 of the License, or (at your option) any later version. This file is distributed in the hope that it will be useful, but WITHOUT @@ -16,13 +16,13 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* As a special exception, if you include this header file into source files - compiled by GCC, this header file does not by itself cause the resulting - executable to be covered by the GNU General Public License. This exception - does not however invalidate any other reasons why the executable file might be - covered by the GNU General Public License. */ +/* As a special exception, if you include this header file into source files + compiled by GCC, this header file does not by itself cause the resulting + executable to be covered by the GNU General Public License. This exception + does not however invalidate any other reasons why the executable file might be + covered by the GNU General Public License. */ -/* Single token vector data types for the PowerPC SIMD/Vector Multi-media +/* Single token vector data types for the PowerPC SIMD/Vector Multi-media eXtension */ #ifndef INCLUDED_GR_VEC_TYPES_H diff --git a/gnuradio-core/src/lib/filter/gri_fft_filter_ccc_generic.cc b/gnuradio-core/src/lib/filter/gri_fft_filter_ccc_generic.cc index 1a9273af0..e958c5061 100644 --- a/gnuradio-core/src/lib/filter/gri_fft_filter_ccc_generic.cc +++ b/gnuradio-core/src/lib/filter/gri_fft_filter_ccc_generic.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -33,7 +33,7 @@ #include <cstring> #include <fftw3.h> -gri_fft_filter_ccc_generic::gri_fft_filter_ccc_generic (int decimation, +gri_fft_filter_ccc_generic::gri_fft_filter_ccc_generic (int decimation, const std::vector<gr_complex> &taps, int nthreads) : d_fftsize(-1), d_decimation(decimation), d_fwdfft(0), d_invfft(0), d_nthreads(nthreads) @@ -49,7 +49,7 @@ gri_fft_filter_ccc_generic::~gri_fft_filter_ccc_generic () } #if 0 -static void +static void print_vector_complex(const std::string label, const std::vector<gr_complex> &x) { std::cout << label; @@ -77,7 +77,7 @@ gri_fft_filter_ccc_generic::set_taps (const std::vector<gr_complex> &taps) gr_complex *out = d_fwdfft->get_outbuf(); float scale = 1.0 / d_fftsize; - + // Compute forward xform of taps. // Copy taps into first ntaps slots, then pad with zeros for (i = 0; i < d_ntaps; i++) @@ -91,7 +91,7 @@ gri_fft_filter_ccc_generic::set_taps (const std::vector<gr_complex> &taps) // now copy output to d_xformed_taps for (i = 0; i < d_fftsize; i++) d_xformed_taps[i] = out[i]; - + return d_nsamples; } @@ -144,20 +144,20 @@ gri_fft_filter_ccc_generic::filter (int nitems, const gr_complex *input, gr_comp int ninput_items = nitems * d_decimation; for (int i = 0; i < ninput_items; i += d_nsamples){ - + memcpy(d_fwdfft->get_inbuf(), &input[i], d_nsamples * sizeof(gr_complex)); for (j = d_nsamples; j < d_fftsize; j++) d_fwdfft->get_inbuf()[j] = 0; d_fwdfft->execute(); // compute fwd xform - + gr_complex *a = d_fwdfft->get_outbuf(); gr_complex *b = d_xformed_taps; gr_complex *c = d_invfft->get_inbuf(); volk_32fc_x2_multiply_32fc_a(c, a, b, d_fftsize); - + d_invfft->execute(); // compute inv xform // add in the overlapping tail diff --git a/gnuradio-core/src/lib/filter/gri_fft_filter_ccc_generic.h b/gnuradio-core/src/lib/filter/gri_fft_filter_ccc_generic.h index 899b59e03..648c2b8c5 100644 --- a/gnuradio-core/src/lib/filter/gri_fft_filter_ccc_generic.h +++ b/gnuradio-core/src/lib/filter/gri_fft_filter_ccc_generic.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -49,7 +49,7 @@ class GR_CORE_API gri_fft_filter_ccc_generic void compute_sizes(int ntaps); int tailsize() const { return d_ntaps - 1; } - + public: /*! * \brief Construct an FFT filter for complex vectors with the given taps and decimation rate. @@ -81,7 +81,7 @@ class GR_CORE_API gri_fft_filter_ccc_generic * \brief Get number of threads being used. */ int nthreads() const; - + /*! * \brief Perform the filter operation * diff --git a/gnuradio-core/src/lib/filter/gri_fft_filter_ccc_sse.cc b/gnuradio-core/src/lib/filter/gri_fft_filter_ccc_sse.cc index b7d925ff3..bfc939869 100644 --- a/gnuradio-core/src/lib/filter/gri_fft_filter_ccc_sse.cc +++ b/gnuradio-core/src/lib/filter/gri_fft_filter_ccc_sse.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -48,7 +48,7 @@ gri_fft_filter_ccc_sse::~gri_fft_filter_ccc_sse () } #if 0 -static void +static void print_vector_complex(const std::string label, const std::vector<gr_complex> &x) { std::cout << label; @@ -76,7 +76,7 @@ gri_fft_filter_ccc_sse::set_taps (const std::vector<gr_complex> &taps) gr_complex *out = d_fwdfft->get_outbuf(); float scale = 1.0 / d_fftsize; - + // Compute forward xform of taps. // Copy taps into first ntaps slots, then pad with zeros for (i = 0; i < d_ntaps; i++) @@ -90,7 +90,7 @@ gri_fft_filter_ccc_sse::set_taps (const std::vector<gr_complex> &taps) // now copy output to d_xformed_taps for (i = 0; i < d_fftsize; i++) d_xformed_taps[i] = out[i]; - + return d_nsamples; } @@ -115,7 +115,7 @@ gri_fft_filter_ccc_sse::compute_sizes(int ntaps) delete d_invfft; d_fwdfft = new gri_fft_complex(d_fftsize, true); d_invfft = new gri_fft_complex(d_fftsize, false); - + fftwf_free(d_xformed_taps); d_xformed_taps = (gr_complex*)fftwf_malloc((d_fftsize)*sizeof(gr_complex)); } @@ -129,14 +129,14 @@ gri_fft_filter_ccc_sse::filter (int nitems, const gr_complex *input, gr_complex int ninput_items = nitems * d_decimation; for (int i = 0; i < ninput_items; i += d_nsamples){ - + memcpy(d_fwdfft->get_inbuf(), &input[i], d_nsamples * sizeof(gr_complex)); for (j = d_nsamples; j < d_fftsize; j++) d_fwdfft->get_inbuf()[j] = 0; d_fwdfft->execute(); // compute fwd xform - + float *a = (float*)(d_fwdfft->get_outbuf()); float *b = (float*)(&d_xformed_taps[0]); float *c = (float*)(d_invfft->get_inbuf()); @@ -146,7 +146,7 @@ gri_fft_filter_ccc_sse::filter (int nitems, const gr_complex *input, gr_complex for (j = 0; j < 2*d_fftsize; j+=4) { // filter in the freq domain x0 = _mm_load_ps(&a[j]); t0 = _mm_load_ps(&b[j]); - + t1 = _mm_shuffle_ps(t0, t0, _MM_SHUFFLE(3, 3, 1, 1)); t0 = _mm_shuffle_ps(t0, t0, _MM_SHUFFLE(2, 2, 0, 0)); t1 = _mm_mul_ps(t1, m); diff --git a/gnuradio-core/src/lib/filter/gri_fft_filter_ccc_sse.h b/gnuradio-core/src/lib/filter/gri_fft_filter_ccc_sse.h index 6c96152c0..64b8c0c15 100644 --- a/gnuradio-core/src/lib/filter/gri_fft_filter_ccc_sse.h +++ b/gnuradio-core/src/lib/filter/gri_fft_filter_ccc_sse.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -48,7 +48,7 @@ class GR_CORE_API gri_fft_filter_ccc_sse void compute_sizes(int ntaps); int tailsize() const { return d_ntaps - 1; } - + public: /*! * \brief Construct an FFT filter for complex vectors with the given taps and decimation rate. @@ -68,7 +68,7 @@ class GR_CORE_API gri_fft_filter_ccc_sse * \param taps The filter taps (complex) */ int set_taps (const std::vector<gr_complex> &taps); - + /*! * \brief Perform the filter operation * diff --git a/gnuradio-core/src/lib/filter/gri_fft_filter_fff_generic.cc b/gnuradio-core/src/lib/filter/gri_fft_filter_fff_generic.cc index 0989c9621..c6e923ee1 100644 --- a/gnuradio-core/src/lib/filter/gri_fft_filter_fff_generic.cc +++ b/gnuradio-core/src/lib/filter/gri_fft_filter_fff_generic.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -32,7 +32,7 @@ #include <cstdio> #include <cstring> -gri_fft_filter_fff_generic::gri_fft_filter_fff_generic (int decimation, +gri_fft_filter_fff_generic::gri_fft_filter_fff_generic (int decimation, const std::vector<float> &taps, int nthreads) : d_fftsize(-1), d_decimation(decimation), d_fwdfft(0), d_invfft(0), d_nthreads(nthreads) @@ -64,7 +64,7 @@ gri_fft_filter_fff_generic::set_taps (const std::vector<float> &taps) gr_complex *out = d_fwdfft->get_outbuf(); float scale = 1.0 / d_fftsize; - + // Compute forward xform of taps. // Copy taps into first ntaps slots, then pad with zeros for (i = 0; i < d_ntaps; i++) @@ -78,7 +78,7 @@ gri_fft_filter_fff_generic::set_taps (const std::vector<float> &taps) // now copy output to d_xformed_taps for (i = 0; i < d_fftsize/2+1; i++) d_xformed_taps[i] = out[i]; - + return d_nsamples; } @@ -131,7 +131,7 @@ gri_fft_filter_fff_generic::filter (int nitems, const float *input, float *outpu int ninput_items = nitems * d_decimation; for (int i = 0; i < ninput_items; i += d_nsamples){ - + memcpy(d_fwdfft->get_inbuf(), &input[i], d_nsamples * sizeof(float)); for (j = d_nsamples; j < d_fftsize; j++) @@ -144,7 +144,7 @@ gri_fft_filter_fff_generic::filter (int nitems, const float *input, float *outpu gr_complex *c = d_invfft->get_inbuf(); volk_32fc_x2_multiply_32fc_a(c, a, b, d_fftsize/2+1); - + d_invfft->execute(); // compute inv xform // add in the overlapping tail diff --git a/gnuradio-core/src/lib/filter/gri_fft_filter_fff_generic.h b/gnuradio-core/src/lib/filter/gri_fft_filter_fff_generic.h index 6ac30cef5..528bf5dd7 100644 --- a/gnuradio-core/src/lib/filter/gri_fft_filter_fff_generic.h +++ b/gnuradio-core/src/lib/filter/gri_fft_filter_fff_generic.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -47,7 +47,7 @@ class GR_CORE_API gri_fft_filter_fff_generic void compute_sizes(int ntaps); int tailsize() const { return d_ntaps - 1; } - + public: /*! * \brief Construct a FFT filter for float vectors with the given taps and decimation rate. @@ -69,7 +69,7 @@ class GR_CORE_API gri_fft_filter_fff_generic * \param taps The filter taps (float) */ int set_taps (const std::vector<float> &taps); - + /*! * \brief Set number of threads to use. */ @@ -79,7 +79,7 @@ class GR_CORE_API gri_fft_filter_fff_generic * \brief Get number of threads being used. */ int nthreads() const; - + /*! * \brief Perform the filter operation * diff --git a/gnuradio-core/src/lib/filter/gri_fft_filter_fff_sse.cc b/gnuradio-core/src/lib/filter/gri_fft_filter_fff_sse.cc index 2680e6594..84fcfa438 100644 --- a/gnuradio-core/src/lib/filter/gri_fft_filter_fff_sse.cc +++ b/gnuradio-core/src/lib/filter/gri_fft_filter_fff_sse.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -32,7 +32,7 @@ #include <xmmintrin.h> #include <fftw3.h> -gri_fft_filter_fff_sse::gri_fft_filter_fff_sse (int decimation, +gri_fft_filter_fff_sse::gri_fft_filter_fff_sse (int decimation, const std::vector<float> &taps) : d_fftsize(-1), d_decimation(decimation), d_fwdfft(0), d_invfft(0) { @@ -64,7 +64,7 @@ gri_fft_filter_fff_sse::set_taps (const std::vector<float> &taps) gr_complex *out = d_fwdfft->get_outbuf(); float scale = 1.0 / d_fftsize; - + // Compute forward xform of taps. // Copy taps into first ntaps slots, then pad with zeros for (i = 0; i < d_ntaps; i++) @@ -78,7 +78,7 @@ gri_fft_filter_fff_sse::set_taps (const std::vector<float> &taps) // now copy output to d_xformed_taps for (i = 0; i < d_fftsize/2+1; i++) d_xformed_taps[i] = out[i]; - + return d_nsamples; } @@ -118,7 +118,7 @@ gri_fft_filter_fff_sse::filter (int nitems, const float *input, float *output) int ninput_items = nitems * d_decimation; for (int i = 0; i < ninput_items; i += d_nsamples){ - + memcpy(d_fwdfft->get_inbuf(), &input[i], d_nsamples * sizeof(float)); for (j = d_nsamples; j < d_fftsize; j++) @@ -135,7 +135,7 @@ gri_fft_filter_fff_sse::filter (int nitems, const float *input, float *output) for (j = 0; j < d_fftsize; j+=4) { // filter in the freq domain x0 = _mm_load_ps(&a[j]); t0 = _mm_load_ps(&b[j]); - + t1 = _mm_shuffle_ps(t0, t0, _MM_SHUFFLE(3, 3, 1, 1)); t0 = _mm_shuffle_ps(t0, t0, _MM_SHUFFLE(2, 2, 0, 0)); t1 = _mm_mul_ps(t1, m); @@ -148,7 +148,7 @@ gri_fft_filter_fff_sse::filter (int nitems, const float *input, float *output) _mm_store_ps(&c[j], x2); } - + // Finish off the last one; do the complex multiply as floats j = d_fftsize/2; c[j] = (a[j] * b[j]) - (a[j+1] * b[j+1]); diff --git a/gnuradio-core/src/lib/filter/gri_fft_filter_fff_sse.h b/gnuradio-core/src/lib/filter/gri_fft_filter_fff_sse.h index bd87358e2..b6086562d 100644 --- a/gnuradio-core/src/lib/filter/gri_fft_filter_fff_sse.h +++ b/gnuradio-core/src/lib/filter/gri_fft_filter_fff_sse.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -47,7 +47,7 @@ class GR_CORE_API gri_fft_filter_fff_sse void compute_sizes(int ntaps); int tailsize() const { return d_ntaps - 1; } - + public: /*! * \brief Construct a FFT filter for float vectors with the given taps and decimation rate. @@ -67,7 +67,7 @@ class GR_CORE_API gri_fft_filter_fff_sse * \param taps The filter taps (float) */ int set_taps (const std::vector<float> &taps); - + /*! * \brief Perform the filter operation * diff --git a/gnuradio-core/src/lib/filter/gri_fir_filter_with_buffer_XXX.cc.t b/gnuradio-core/src/lib/filter/gri_fir_filter_with_buffer_XXX.cc.t index 154068840..0ae644cc6 100644 --- a/gnuradio-core/src/lib/filter/gri_fir_filter_with_buffer_XXX.cc.t +++ b/gnuradio-core/src/lib/filter/gri_fir_filter_with_buffer_XXX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -42,12 +42,12 @@ void @NAME@::set_taps (const std::vector<@TAP_TYPE@> &taps) { d_taps = gr_reverse(taps); - + if(d_buffer != NULL) { free(d_buffer); d_buffer = NULL; } - + // FIXME: memalign this to 16-byte boundaries for SIMD later size_t t = sizeof(@I_TYPE@) * 2 * d_taps.size(); d_buffer = (@I_TYPE@*)malloc(t); diff --git a/gnuradio-core/src/lib/filter/gri_fir_filter_with_buffer_XXX.h.t b/gnuradio-core/src/lib/filter/gri_fir_filter_with_buffer_XXX.h.t index f209a8849..efb314bed 100644 --- a/gnuradio-core/src/lib/filter/gri_fir_filter_with_buffer_XXX.h.t +++ b/gnuradio-core/src/lib/filter/gri_fir_filter_with_buffer_XXX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -37,10 +37,10 @@ #include <cstdio> /*! - * \brief FIR with internal buffer for @I_TYPE@ input, + * \brief FIR with internal buffer for @I_TYPE@ input, @O_TYPE@ output and @TAP_TYPE@ taps * \ingroup filter - * + * */ class GR_CORE_API @NAME@ { @@ -76,7 +76,7 @@ public: */ @O_TYPE@ filter (@I_TYPE@ input); - + /*! * \brief compute a single output value; designed for decimating filters. * @@ -102,7 +102,7 @@ public: * \brief compute an array of N output values, decimating the input * * \p input must have (decimate * (n - 1) + ntaps()) valid entries. - * input[0] .. input[decimate * (n - 1) + ntaps() - 1] are referenced to + * input[0] .. input[decimate * (n - 1) + ntaps() - 1] are referenced to * compute the output values. */ void filterNdec (@O_TYPE@ output[], const @I_TYPE@ input[], diff --git a/gnuradio-core/src/lib/filter/gri_goertzel.cc b/gnuradio-core/src/lib/filter/gri_goertzel.cc index 73b8366ab..2fbdd3b13 100644 --- a/gnuradio-core/src/lib/filter/gri_goertzel.cc +++ b/gnuradio-core/src/lib/filter/gri_goertzel.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/filter/gri_goertzel.h b/gnuradio-core/src/lib/filter/gri_goertzel.h index 6fb64b942..e28cb21a8 100644 --- a/gnuradio-core/src/lib/filter/gri_goertzel.h +++ b/gnuradio-core/src/lib/filter/gri_goertzel.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -44,7 +44,7 @@ public: void input(const float &in); gr_complex output(); bool ready() const { return d_processed == d_len; } - + private: float d_d1; float d_d2; diff --git a/gnuradio-core/src/lib/filter/gri_iir.h b/gnuradio-core/src/lib/filter/gri_iir.h index ddd8f9b81..86345f6c0 100644 --- a/gnuradio-core/src/lib/filter/gri_iir.h +++ b/gnuradio-core/src/lib/filter/gri_iir.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -30,7 +30,7 @@ /*! * \brief base class template for Infinite Impulse Response filter (IIR) */ -template<class i_type, class o_type, class tap_type> +template<class i_type, class o_type, class tap_type> class gri_iir { public: /*! @@ -87,15 +87,15 @@ public: /*! * \brief install new taps. */ - void set_taps (const std::vector<tap_type> &fftaps, + void set_taps (const std::vector<tap_type> &fftaps, const std::vector<tap_type> &fbtaps) throw (std::invalid_argument) - { + { d_latest_n = 0; d_latest_m = 0; - d_fftaps = fftaps; - d_fbtaps = fbtaps; + d_fftaps = fftaps; + d_fbtaps = fbtaps; int n = fftaps.size (); int m = fbtaps.size (); @@ -123,7 +123,7 @@ protected: // // general case. We may want to specialize this // -template<class i_type, class o_type, class tap_type> +template<class i_type, class o_type, class tap_type> o_type gri_iir<i_type, o_type, tap_type>::filter (const i_type input) { @@ -137,7 +137,7 @@ gri_iir<i_type, o_type, tap_type>::filter (const i_type input) int latest_n = d_latest_n; int latest_m = d_latest_m; - + acc = d_fftaps[0] * input; for (i = 1; i < n; i ++) acc += (d_fftaps[i] * d_prev_input[latest_n + i]); @@ -163,8 +163,8 @@ gri_iir<i_type, o_type, tap_type>::filter (const i_type input) } -template<class i_type, class o_type, class tap_type> -void +template<class i_type, class o_type, class tap_type> +void gri_iir<i_type, o_type, tap_type>::filter_n (o_type output[], const i_type input[], long n) diff --git a/gnuradio-core/src/lib/filter/gri_mmse_fir_interpolator.cc b/gnuradio-core/src/lib/filter/gri_mmse_fir_interpolator.cc index 76bffc378..52098bf1a 100644 --- a/gnuradio-core/src/lib/filter/gri_mmse_fir_interpolator.cc +++ b/gnuradio-core/src/lib/filter/gri_mmse_fir_interpolator.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -33,7 +33,7 @@ gri_mmse_fir_interpolator::gri_mmse_fir_interpolator () { filters.resize (NSTEPS + 1); - + for (int i = 0; i < NSTEPS + 1; i++){ std::vector<float> t (&taps[i][0], &taps[i][NTAPS]); filters[i] = gr_fir_util::create_gr_fir_fff (t); diff --git a/gnuradio-core/src/lib/filter/gri_mmse_fir_interpolator.h b/gnuradio-core/src/lib/filter/gri_mmse_fir_interpolator.h index 673802dbb..f479169bc 100644 --- a/gnuradio-core/src/lib/filter/gri_mmse_fir_interpolator.h +++ b/gnuradio-core/src/lib/filter/gri_mmse_fir_interpolator.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -36,7 +36,7 @@ class gr_fir_fff; * Where Ts is the time between samples. * * Although mu, the fractional delay, is specified as a float, it is actually - * quantized. 0.0 <= mu <= 1.0. That is, mu is quantized in the interpolate + * quantized. 0.0 <= mu <= 1.0. That is, mu is quantized in the interpolate * method to 32nd's of a sample. * * For more information, in the GNU Radio source code, see: diff --git a/gnuradio-core/src/lib/filter/gri_mmse_fir_interpolator_cc.cc b/gnuradio-core/src/lib/filter/gri_mmse_fir_interpolator_cc.cc index 998c0f6a5..174378c22 100644 --- a/gnuradio-core/src/lib/filter/gri_mmse_fir_interpolator_cc.cc +++ b/gnuradio-core/src/lib/filter/gri_mmse_fir_interpolator_cc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -33,7 +33,7 @@ gri_mmse_fir_interpolator_cc::gri_mmse_fir_interpolator_cc () { filters.resize (NSTEPS + 1); - + for (int i = 0; i < NSTEPS + 1; i++){ std::vector<float> t (&taps[i][0], &taps[i][NTAPS]); filters[i] = gr_fir_util::create_gr_fir_ccf (t); diff --git a/gnuradio-core/src/lib/filter/gri_mmse_fir_interpolator_cc.h b/gnuradio-core/src/lib/filter/gri_mmse_fir_interpolator_cc.h index 5b04600b3..bacd9ed92 100644 --- a/gnuradio-core/src/lib/filter/gri_mmse_fir_interpolator_cc.h +++ b/gnuradio-core/src/lib/filter/gri_mmse_fir_interpolator_cc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2007 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, @@ -37,7 +37,7 @@ class gr_fir_ccf; * Where Ts is the time between samples. * * Although mu, the fractional delay, is specified as a float, it is actually - * quantized. 0.0 <= mu <= 1.0. That is, mu is quantized in the interpolate + * quantized. 0.0 <= mu <= 1.0. That is, mu is quantized in the interpolate * method to 32nd's of a sample. * * For more information, in the GNU Radio source code, see: diff --git a/gnuradio-core/src/lib/filter/qa_ccomplex_dotprod_x86.cc b/gnuradio-core/src/lib/filter/qa_ccomplex_dotprod_x86.cc index b513a6361..0d7b878da 100644 --- a/gnuradio-core/src/lib/filter/qa_ccomplex_dotprod_x86.cc +++ b/gnuradio-core/src/lib/filter/qa_ccomplex_dotprod_x86.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -40,7 +40,7 @@ using std::cerr; /// Macro for primitive value comparisons #define assertcomplexEqual(expected0,expected1,actual,delta) \ CPPUNIT_ASSERT_DOUBLES_EQUAL (expected0, actual[0], delta); \ - CPPUNIT_ASSERT_DOUBLES_EQUAL (expected1, actual[1], delta); + CPPUNIT_ASSERT_DOUBLES_EQUAL (expected1, actual[1], delta); #define MAX_BLKS 10 @@ -93,10 +93,10 @@ ref_ccomplex_dotprod (const float *input, result[1] = sum0[1] + sum1[1]; } -void +void qa_ccomplex_dotprod_x86::setUp () { - taps = (float *) calloc16Align (MAX_BLKS, + taps = (float *) calloc16Align (MAX_BLKS, sizeof (float) * FLOATS_PER_BLK); input = (float *) calloc16Align (MAX_BLKS, @@ -116,15 +116,15 @@ qa_ccomplex_dotprod_x86::tearDown () } -void +void qa_ccomplex_dotprod_x86::zb () // "zero both" { zero_floats (taps, MAX_BLKS * FLOATS_PER_BLK); zero_floats (input, MAX_BLKS * FLOATS_PER_BLK); } -// -// t1 +// +// t1 // void @@ -148,7 +148,7 @@ qa_ccomplex_dotprod_x86::t1_base (ccomplex_dotprod_t ccomplex_dotprod) ccomplex_dotprod (input, taps, 1, result); //cerr << result[0] << " " << result[1] << "\n"; assertcomplexEqual (1.0, -1.0, result, ERR_DELTA); - + zb (); input[1] = 2.0; taps[0] = 1.0; taps[1] = -1.0; ccomplex_dotprod (input, taps, 1, result); @@ -158,7 +158,7 @@ qa_ccomplex_dotprod_x86::t1_base (ccomplex_dotprod_t ccomplex_dotprod) input[2] = 3.0; taps[2] = 1.0; taps[3] = -1.0; ccomplex_dotprod (input, taps, 1, result); assertcomplexEqual (3.0, -3.0, result, ERR_DELTA); - + zb (); input[3] = 4.0; taps[2] = 1.0; taps[3] = -1.0; ccomplex_dotprod (input, taps, 1, result); @@ -170,25 +170,25 @@ qa_ccomplex_dotprod_x86::t1_base (ccomplex_dotprod_t ccomplex_dotprod) input[0] = 1.0; taps[0] = 0.5; taps[1] = -0.5; ccomplex_dotprod (input, taps, 1, result); assertcomplexEqual (0.5, -0.5, result, ERR_DELTA); - + zb (); input[0] = 1.0; taps[0] = 2.0; taps[1] = -2.0; ccomplex_dotprod (input, taps, 1, result); assertcomplexEqual (2.0, -2.0, result, ERR_DELTA); - + zb (); input[0] = 1.0; taps[0] = 3.0; taps[1] = -3.0; ccomplex_dotprod (input, taps, 1, result); assertcomplexEqual (3.0, -3.0, result, ERR_DELTA); - + zb (); input[0] = 1.0; taps[0] = 4.0; taps[1] = -4.0; ccomplex_dotprod (input, taps, 1, result); assertcomplexEqual (4.0, -4.0, result, ERR_DELTA); } -// -// t2 +// +// t2 // void qa_ccomplex_dotprod_x86::t2_base (ccomplex_dotprod_t ccomplex_dotprod) @@ -199,7 +199,7 @@ qa_ccomplex_dotprod_x86::t2_base (ccomplex_dotprod_t ccomplex_dotprod) input[0] = 1.0; input[1] = 3.0; taps[0] = 5.0; taps[1] = -2.0; //1*5-3*-2 =11, 1*-2+3*5=13 - + ccomplex_dotprod (input, taps, 1, result); assertcomplexEqual (11.0, 13.0, result, ERR_DELTA); @@ -216,7 +216,7 @@ qa_ccomplex_dotprod_x86::t2_base (ccomplex_dotprod_t ccomplex_dotprod) ccomplex_dotprod (input, taps, 2, result); assertcomplexEqual (111.0, -831.0, result, ERR_DELTA); - + } // @@ -259,7 +259,7 @@ qa_ccomplex_dotprod_x86::t1_3dnowext () t1_base (ccomplex_dotprod_3dnowext); } -void +void qa_ccomplex_dotprod_x86::t2_3dnowext () { if (!gr_cpu::has_3dnowext ()){ @@ -269,7 +269,7 @@ qa_ccomplex_dotprod_x86::t2_3dnowext () t2_base (ccomplex_dotprod_3dnowext); } -void +void qa_ccomplex_dotprod_x86::t3_3dnowext () { if (!gr_cpu::has_3dnowext ()){ @@ -289,7 +289,7 @@ qa_ccomplex_dotprod_x86::t1_3dnow () t1_base (ccomplex_dotprod_3dnow); } -void +void qa_ccomplex_dotprod_x86::t2_3dnow () { if (!gr_cpu::has_3dnow ()){ @@ -299,7 +299,7 @@ qa_ccomplex_dotprod_x86::t2_3dnow () t2_base (ccomplex_dotprod_3dnow); } -void +void qa_ccomplex_dotprod_x86::t3_3dnow () { if (!gr_cpu::has_3dnow ()){ @@ -309,7 +309,7 @@ qa_ccomplex_dotprod_x86::t3_3dnow () t3_base (ccomplex_dotprod_3dnow); } -void +void qa_ccomplex_dotprod_x86::t1_sse () { if (!gr_cpu::has_sse ()){ @@ -319,7 +319,7 @@ qa_ccomplex_dotprod_x86::t1_sse () t1_base (ccomplex_dotprod_sse); } -void +void qa_ccomplex_dotprod_x86::t2_sse () { if (!gr_cpu::has_sse ()){ @@ -329,7 +329,7 @@ qa_ccomplex_dotprod_x86::t2_sse () t2_base (ccomplex_dotprod_sse); } -void +void qa_ccomplex_dotprod_x86::t3_sse () { if (!gr_cpu::has_sse ()){ diff --git a/gnuradio-core/src/lib/filter/qa_ccomplex_dotprod_x86.h b/gnuradio-core/src/lib/filter/qa_ccomplex_dotprod_x86.h index e9d577d83..d24561c72 100644 --- a/gnuradio-core/src/lib/filter/qa_ccomplex_dotprod_x86.h +++ b/gnuradio-core/src/lib/filter/qa_ccomplex_dotprod_x86.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/qa_complex_dotprod_x86.cc b/gnuradio-core/src/lib/filter/qa_complex_dotprod_x86.cc index 04879aa4f..a21b95f63 100644 --- a/gnuradio-core/src/lib/filter/qa_complex_dotprod_x86.cc +++ b/gnuradio-core/src/lib/filter/qa_complex_dotprod_x86.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -40,7 +40,7 @@ using std::cerr; /// Macro for primitive value comparisons #define assertcomplexEqual(expected0,expected1,actual,delta) \ CPPUNIT_ASSERT_DOUBLES_EQUAL (expected0, actual[0], delta); \ - CPPUNIT_ASSERT_DOUBLES_EQUAL (expected1, actual[1], delta); + CPPUNIT_ASSERT_DOUBLES_EQUAL (expected1, actual[1], delta); #define MAX_BLKS 10 @@ -108,10 +108,10 @@ ref_complex_dotprod (const short *input, result[1] = sum0[1] + sum1[1]; } -void +void qa_complex_dotprod_x86::setUp () { - taps = (float *) calloc16Align (MAX_BLKS, + taps = (float *) calloc16Align (MAX_BLKS, sizeof (float) * FLOATS_PER_BLK); input = (short *) calloc16Align (MAX_BLKS, @@ -131,15 +131,15 @@ qa_complex_dotprod_x86::tearDown () } -void +void qa_complex_dotprod_x86::zb () // "zero both" { zero_floats (taps, MAX_BLKS * FLOATS_PER_BLK); zero_shorts (input, MAX_BLKS * SHORTS_PER_BLK); } -// -// t1 +// +// t1 // void @@ -163,7 +163,7 @@ qa_complex_dotprod_x86::t1_base (complex_dotprod_t complex_dotprod) complex_dotprod (input, taps, 1, result); //cerr << result[0] << " " << result[1] << "\n"; assertcomplexEqual (1.0, -1.0, result, ERR_DELTA); - + zb (); input[1] = 2; taps[2] = 1.0; taps[3] = -1.0; complex_dotprod (input, taps, 1, result); @@ -173,7 +173,7 @@ qa_complex_dotprod_x86::t1_base (complex_dotprod_t complex_dotprod) input[2] = 3; taps[4] = 1.0; taps[5] = -1.0; complex_dotprod (input, taps, 2, result); assertcomplexEqual (3.0, -3.0, result, ERR_DELTA); - + zb (); input[3] = 4; taps[6] = 1.0; taps[7] = -1.0; complex_dotprod (input, taps, 2, result); @@ -185,25 +185,25 @@ qa_complex_dotprod_x86::t1_base (complex_dotprod_t complex_dotprod) input[0] = 1; taps[0] = 0.5; taps[1] = -0.5; complex_dotprod (input, taps, 1, result); assertcomplexEqual (0.5, -0.5, result, ERR_DELTA); - + zb (); input[0] = 1; taps[0] = 2.0; taps[1] = -2.0; complex_dotprod (input, taps, 1, result); assertcomplexEqual (2.0, -2.0, result, ERR_DELTA); - + zb (); input[0] = 1; taps[0] = 3.0; taps[1] = -3.0; complex_dotprod (input, taps, 1, result); assertcomplexEqual (3.0, -3.0, result, ERR_DELTA); - + zb (); input[0] = 1; taps[0] = 4.0; taps[1] = -4.0; complex_dotprod (input, taps, 1, result); assertcomplexEqual (4.0, -4.0, result, ERR_DELTA); } -// -// t2 +// +// t2 // void qa_complex_dotprod_x86::t2_base (complex_dotprod_t complex_dotprod) @@ -222,7 +222,7 @@ qa_complex_dotprod_x86::t2_base (complex_dotprod_t complex_dotprod) input[4] = 19; taps[8] = 23.0; taps[9] = -23.0; complex_dotprod (input, taps, 3, result); assertcomplexEqual (752.0, -752.0, result, ERR_DELTA); - + } // @@ -265,7 +265,7 @@ qa_complex_dotprod_x86::t1_3dnowext () t1_base (complex_dotprod_3dnowext); } -void +void qa_complex_dotprod_x86::t2_3dnowext () { if (!gr_cpu::has_3dnowext ()){ @@ -275,7 +275,7 @@ qa_complex_dotprod_x86::t2_3dnowext () t2_base (complex_dotprod_3dnowext); } -void +void qa_complex_dotprod_x86::t3_3dnowext () { if (!gr_cpu::has_3dnowext ()){ @@ -295,7 +295,7 @@ qa_complex_dotprod_x86::t1_3dnow () t1_base (complex_dotprod_3dnow); } -void +void qa_complex_dotprod_x86::t2_3dnow () { if (!gr_cpu::has_3dnow ()){ @@ -305,7 +305,7 @@ qa_complex_dotprod_x86::t2_3dnow () t2_base (complex_dotprod_3dnow); } -void +void qa_complex_dotprod_x86::t3_3dnow () { if (!gr_cpu::has_3dnow ()){ @@ -315,7 +315,7 @@ qa_complex_dotprod_x86::t3_3dnow () t3_base (complex_dotprod_3dnow); } -void +void qa_complex_dotprod_x86::t1_sse () { if (!gr_cpu::has_sse ()){ @@ -325,7 +325,7 @@ qa_complex_dotprod_x86::t1_sse () t1_base (complex_dotprod_sse); } -void +void qa_complex_dotprod_x86::t2_sse () { if (!gr_cpu::has_sse ()){ @@ -335,7 +335,7 @@ qa_complex_dotprod_x86::t2_sse () t2_base (complex_dotprod_sse); } -void +void qa_complex_dotprod_x86::t3_sse () { if (!gr_cpu::has_sse ()){ diff --git a/gnuradio-core/src/lib/filter/qa_complex_dotprod_x86.h b/gnuradio-core/src/lib/filter/qa_complex_dotprod_x86.h index 2f2d9e888..9f9b46039 100644 --- a/gnuradio-core/src/lib/filter/qa_complex_dotprod_x86.h +++ b/gnuradio-core/src/lib/filter/qa_complex_dotprod_x86.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/qa_dotprod.h b/gnuradio-core/src/lib/filter/qa_dotprod.h index 30fbc380f..bd5ba8f3a 100644 --- a/gnuradio-core/src/lib/filter/qa_dotprod.h +++ b/gnuradio-core/src/lib/filter/qa_dotprod.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003 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, diff --git a/gnuradio-core/src/lib/filter/qa_dotprod_armv7_a.cc b/gnuradio-core/src/lib/filter/qa_dotprod_armv7_a.cc index e2971c86b..1e1ded7ea 100644 --- a/gnuradio-core/src/lib/filter/qa_dotprod_armv7_a.cc +++ b/gnuradio-core/src/lib/filter/qa_dotprod_armv7_a.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003,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, diff --git a/gnuradio-core/src/lib/filter/qa_dotprod_generic.cc b/gnuradio-core/src/lib/filter/qa_dotprod_generic.cc index 1b02a79c8..2c49d1d28 100644 --- a/gnuradio-core/src/lib/filter/qa_dotprod_generic.cc +++ b/gnuradio-core/src/lib/filter/qa_dotprod_generic.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003 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, diff --git a/gnuradio-core/src/lib/filter/qa_dotprod_powerpc.cc b/gnuradio-core/src/lib/filter/qa_dotprod_powerpc.cc index 1b02a79c8..2c49d1d28 100644 --- a/gnuradio-core/src/lib/filter/qa_dotprod_powerpc.cc +++ b/gnuradio-core/src/lib/filter/qa_dotprod_powerpc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003 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, diff --git a/gnuradio-core/src/lib/filter/qa_dotprod_x86.cc b/gnuradio-core/src/lib/filter/qa_dotprod_x86.cc index 1971a3e2e..ec5625f10 100644 --- a/gnuradio-core/src/lib/filter/qa_dotprod_x86.cc +++ b/gnuradio-core/src/lib/filter/qa_dotprod_x86.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003 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, diff --git a/gnuradio-core/src/lib/filter/qa_filter.cc b/gnuradio-core/src/lib/filter/qa_filter.cc index 0d03cb0ee..629635084 100644 --- a/gnuradio-core/src/lib/filter/qa_filter.cc +++ b/gnuradio-core/src/lib/filter/qa_filter.cc @@ -1,18 +1,18 @@ /* * Copyright 2002,2007 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, diff --git a/gnuradio-core/src/lib/filter/qa_filter.h b/gnuradio-core/src/lib/filter/qa_filter.h index a10782068..740d05ce4 100644 --- a/gnuradio-core/src/lib/filter/qa_filter.h +++ b/gnuradio-core/src/lib/filter/qa_filter.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/qa_float_dotprod_x86.cc b/gnuradio-core/src/lib/filter/qa_float_dotprod_x86.cc index 54b57459b..f8752d071 100644 --- a/gnuradio-core/src/lib/filter/qa_float_dotprod_x86.cc +++ b/gnuradio-core/src/lib/filter/qa_float_dotprod_x86.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -58,7 +58,7 @@ zero_floats (float *buf, unsigned n) buf[i] = 0.0; } -float +float ref_float_dotprod (const float *input, const float *taps, unsigned n_4_float_blocks) { @@ -83,10 +83,10 @@ ref_float_dotprod (const float *input, return sum0 + sum1 + sum2 + sum3; } -void +void qa_float_dotprod_x86::setUp () { - taps = (float *) calloc16Align (MAX_BLKS, + taps = (float *) calloc16Align (MAX_BLKS, sizeof (float) * FLOATS_PER_BLK); input = (float *) calloc16Align (MAX_BLKS, @@ -106,21 +106,21 @@ qa_float_dotprod_x86::tearDown () } -void +void qa_float_dotprod_x86::zb () // "zero both" { zero_floats (taps, MAX_BLKS * FLOATS_PER_BLK); zero_floats (input, MAX_BLKS * FLOATS_PER_BLK); } -// -// t1 +// +// t1 // void qa_float_dotprod_x86::t1_base (float_dotprod_t float_dotprod) { - + // cerr << "Testing dump_xmm_regs\n"; // dump_xmm_regs (); @@ -134,40 +134,40 @@ qa_float_dotprod_x86::t1_base (float_dotprod_t float_dotprod) zb (); input[0] = 0.5; taps[0] = 1.0; CPPUNIT_ASSERT_DOUBLES_EQUAL (0.5, float_dotprod (input, taps, 1), ERR_DELTA); - + zb (); input[1] = 2.0; taps[1] = 1.0; CPPUNIT_ASSERT_DOUBLES_EQUAL (2.0, float_dotprod (input, taps, 1), ERR_DELTA); - + zb (); input[2] = 3.0; taps[2] = 1.0; CPPUNIT_ASSERT_DOUBLES_EQUAL (3.0, float_dotprod (input, taps, 1), ERR_DELTA); - + zb (); input[3] = 4.0; taps[3] = 1.0; CPPUNIT_ASSERT_DOUBLES_EQUAL (4.0, float_dotprod (input, taps, 1), ERR_DELTA); - + // vary each tap zb (); input[0] = 1.0; taps[0] = 0.5; CPPUNIT_ASSERT_DOUBLES_EQUAL (0.5, float_dotprod (input, taps, 1), ERR_DELTA); - + zb (); input[0] = 1.0; taps[0] = 2.0; CPPUNIT_ASSERT_DOUBLES_EQUAL (2.0, float_dotprod (input, taps, 1), ERR_DELTA); - + zb (); input[0] = 1.0; taps[0] = 3.0; CPPUNIT_ASSERT_DOUBLES_EQUAL (3.0, float_dotprod (input, taps, 1), ERR_DELTA); - + zb (); input[0] = 1.0; taps[0] = 4.0; CPPUNIT_ASSERT_DOUBLES_EQUAL (4.0, float_dotprod (input, taps, 1), ERR_DELTA); } -// -// t2 +// +// t2 // void qa_float_dotprod_x86::t2_base (float_dotprod_t float_dotprod) @@ -182,7 +182,7 @@ qa_float_dotprod_x86::t2_base (float_dotprod_t float_dotprod) input[4] = 19.0; taps[4] = 23.0; CPPUNIT_ASSERT_DOUBLES_EQUAL (752.0, float_dotprod (input, taps, 2), ERR_DELTA); - + } // @@ -219,7 +219,7 @@ qa_float_dotprod_x86::t1_3dnow () t1_base (float_dotprod_3dnow); } -void +void qa_float_dotprod_x86::t2_3dnow () { if (!gr_cpu::has_3dnow ()){ @@ -229,7 +229,7 @@ qa_float_dotprod_x86::t2_3dnow () t2_base (float_dotprod_3dnow); } -void +void qa_float_dotprod_x86::t3_3dnow () { if (!gr_cpu::has_3dnow ()){ @@ -239,7 +239,7 @@ qa_float_dotprod_x86::t3_3dnow () t3_base (float_dotprod_3dnow); } -void +void qa_float_dotprod_x86::t1_sse () { if (!gr_cpu::has_sse ()){ @@ -249,7 +249,7 @@ qa_float_dotprod_x86::t1_sse () t1_base (float_dotprod_sse); } -void +void qa_float_dotprod_x86::t2_sse () { if (!gr_cpu::has_sse ()){ @@ -259,7 +259,7 @@ qa_float_dotprod_x86::t2_sse () t2_base (float_dotprod_sse); } -void +void qa_float_dotprod_x86::t3_sse () { if (!gr_cpu::has_sse ()){ diff --git a/gnuradio-core/src/lib/filter/qa_float_dotprod_x86.h b/gnuradio-core/src/lib/filter/qa_float_dotprod_x86.h index 79ffc220f..38d6104fa 100644 --- a/gnuradio-core/src/lib/filter/qa_float_dotprod_x86.h +++ b/gnuradio-core/src/lib/filter/qa_float_dotprod_x86.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -57,7 +57,7 @@ class qa_float_dotprod_x86 : public CppUnit::TestCase { void t2_base (float_dotprod_t); void t3_base (float_dotprod_t); - + void zb (); float *taps; // 16-byte aligned diff --git a/gnuradio-core/src/lib/filter/qa_gr_fir_ccc.cc b/gnuradio-core/src/lib/filter/qa_gr_fir_ccc.cc index 52f3340a9..7474b76e2 100644 --- a/gnuradio-core/src/lib/filter/qa_gr_fir_ccc.cc +++ b/gnuradio-core/src/lib/filter/qa_gr_fir_ccc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -102,7 +102,7 @@ ref_dotprod (const i_type input[], const tap_type taps[], int ntaps) // static void -test_random_io (fir_maker_t maker) +test_random_io (fir_maker_t maker) { const int MAX_TAPS = 9; const int OUTPUT_LEN = 17; @@ -147,7 +147,7 @@ test_random_io (fir_maker_t maker) // our reference implementation is using 80 bit floating point // arithmetic, while the SSE version is using 32 bit float point // arithmetic. - + for (int o = 0; o < ol; o++){ CPPUNIT_ASSERT_COMPLEXES_EQUAL(expected_output[o], actual_output[o], @@ -164,7 +164,7 @@ static void for_each (void (*f)(fir_maker_t)) { std::vector<gr_fir_ccc_info> info; - gr_fir_util::get_gr_fir_ccc_info (&info); // get all known ccc implementations + gr_fir_util::get_gr_fir_ccc_info (&info); // get all known ccc implementations for (std::vector<gr_fir_ccc_info>::iterator p = info.begin (); p != info.end (); diff --git a/gnuradio-core/src/lib/filter/qa_gr_fir_ccc.h b/gnuradio-core/src/lib/filter/qa_gr_fir_ccc.h index 217f21461..0535e6652 100644 --- a/gnuradio-core/src/lib/filter/qa_gr_fir_ccc.h +++ b/gnuradio-core/src/lib/filter/qa_gr_fir_ccc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/qa_gr_fir_ccf.cc b/gnuradio-core/src/lib/filter/qa_gr_fir_ccf.cc index 6bb63f240..84cb924ae 100644 --- a/gnuradio-core/src/lib/filter/qa_gr_fir_ccf.cc +++ b/gnuradio-core/src/lib/filter/qa_gr_fir_ccf.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -101,7 +101,7 @@ ref_dotprod (const i_type input[], const tap_type taps[], int ntaps) // static void -test_random_io (fir_maker_t maker) +test_random_io (fir_maker_t maker) { const int MAX_TAPS = 9; const int OUTPUT_LEN = 17; @@ -146,7 +146,7 @@ test_random_io (fir_maker_t maker) // our reference implementation is using 80 bit floating point // arithmetic, while the SSE version is using 32 bit float point // arithmetic. - + for (int o = 0; o < ol; o++){ CPPUNIT_ASSERT_COMPLEXES_EQUAL(expected_output[o], actual_output[o], abs (expected_output[o]) * ERR_DELTA); @@ -163,7 +163,7 @@ static void for_each (void (*f)(fir_maker_t)) { std::vector<gr_fir_ccf_info> info; - gr_fir_util::get_gr_fir_ccf_info (&info); // get all known ccf implementations + gr_fir_util::get_gr_fir_ccf_info (&info); // get all known ccf implementations for (std::vector<gr_fir_ccf_info>::iterator p = info.begin (); p != info.end (); diff --git a/gnuradio-core/src/lib/filter/qa_gr_fir_ccf.h b/gnuradio-core/src/lib/filter/qa_gr_fir_ccf.h index e08bf1fcd..bda79cc2f 100644 --- a/gnuradio-core/src/lib/filter/qa_gr_fir_ccf.h +++ b/gnuradio-core/src/lib/filter/qa_gr_fir_ccf.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/qa_gr_fir_fcc.cc b/gnuradio-core/src/lib/filter/qa_gr_fir_fcc.cc index bb56d1788..4c77a5e5c 100644 --- a/gnuradio-core/src/lib/filter/qa_gr_fir_fcc.cc +++ b/gnuradio-core/src/lib/filter/qa_gr_fir_fcc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -102,7 +102,7 @@ ref_dotprod (const i_type input[], const tap_type taps[], int ntaps) // static void -test_random_io (fir_maker_t maker) +test_random_io (fir_maker_t maker) { const int MAX_TAPS = 9; const int OUTPUT_LEN = 17; @@ -145,7 +145,7 @@ test_random_io (fir_maker_t maker) // our reference implementation is using 80 bit floating point // arithmetic, while the SSE version is using 32 bit float point // arithmetic. - + for (int o = 0; o < ol; o++){ CPPUNIT_ASSERT_COMPLEXES_EQUAL(expected_output[o], actual_output[o], @@ -161,7 +161,7 @@ static void for_each (void (*f)(fir_maker_t)) { std::vector<gr_fir_fcc_info> info; - gr_fir_util::get_gr_fir_fcc_info (&info); // get all known fcc implementations + gr_fir_util::get_gr_fir_fcc_info (&info); // get all known fcc implementations for (std::vector<gr_fir_fcc_info>::iterator p = info.begin (); p != info.end (); diff --git a/gnuradio-core/src/lib/filter/qa_gr_fir_fcc.h b/gnuradio-core/src/lib/filter/qa_gr_fir_fcc.h index bb3aad54f..23706fd9c 100644 --- a/gnuradio-core/src/lib/filter/qa_gr_fir_fcc.h +++ b/gnuradio-core/src/lib/filter/qa_gr_fir_fcc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/qa_gr_fir_fff.cc b/gnuradio-core/src/lib/filter/qa_gr_fir_fff.cc index b921223ed..80ed67465 100644 --- a/gnuradio-core/src/lib/filter/qa_gr_fir_fff.cc +++ b/gnuradio-core/src/lib/filter/qa_gr_fir_fff.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -82,7 +82,7 @@ test_known_io (fir_maker_t maker) { vector<tap_type> t1a (&taps_1a[0], &taps_1a[NELEM (taps_1a)]); vector<tap_type> t1b (&taps_1b[0], &taps_1b[NELEM (taps_1b)]); - + gr_fir_fff *f1 = maker (t1a); // create filter CPPUNIT_ASSERT_EQUAL ((unsigned) 1, f1->ntaps ()); // check ntaps @@ -93,7 +93,7 @@ test_known_io (fir_maker_t maker) f1->set_taps (t1b); // set new taps CPPUNIT_ASSERT_EQUAL ((unsigned) 2, f1->ntaps ()); // check ntaps - + // check filter output n = NELEM (input_1) - f1->ntaps () + 1; for (int i = 0; i < n; i++) @@ -141,7 +141,7 @@ ref_dotprod (const i_type input[], const tap_type taps[], int ntaps) } static void -test_random_io (fir_maker_t maker) +test_random_io (fir_maker_t maker) { const int MAX_TAPS = 32; const int OUTPUT_LEN = 17; @@ -184,7 +184,7 @@ test_random_io (fir_maker_t maker) // our reference implementation is using 80 bit floating point // arithmetic, while the SSE version is using 32 bit float point // arithmetic. - + for (int o = 0; o < ol; o++){ CPPUNIT_ASSERT_DOUBLES_EQUAL (expected_output[o], actual_output[o], fabs (expected_output[o]) * 9e-3); @@ -200,7 +200,7 @@ static void for_each (void (*f)(fir_maker_t)) { std::vector<gr_fir_fff_info> info; - gr_fir_util::get_gr_fir_fff_info (&info); // get all known fff implementations + gr_fir_util::get_gr_fir_fff_info (&info); // get all known fff implementations for (std::vector<gr_fir_fff_info>::iterator p = info.begin (); p != info.end (); diff --git a/gnuradio-core/src/lib/filter/qa_gr_fir_fff.h b/gnuradio-core/src/lib/filter/qa_gr_fir_fff.h index 70f6bdbe2..c89672896 100644 --- a/gnuradio-core/src/lib/filter/qa_gr_fir_fff.h +++ b/gnuradio-core/src/lib/filter/qa_gr_fir_fff.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/qa_gr_fir_scc.cc b/gnuradio-core/src/lib/filter/qa_gr_fir_scc.cc index 1aea34fbb..3f4a7be2c 100644 --- a/gnuradio-core/src/lib/filter/qa_gr_fir_scc.cc +++ b/gnuradio-core/src/lib/filter/qa_gr_fir_scc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -100,7 +100,7 @@ ref_dotprod (const i_type input[], const tap_type taps[], int ntaps) // static void -test_random_io (fir_maker_t maker) +test_random_io (fir_maker_t maker) { const int MAX_TAPS = 9; const int OUTPUT_LEN = 17; @@ -143,7 +143,7 @@ test_random_io (fir_maker_t maker) // our reference implementation is using 80 bit floating point // arithmetic, while the SSE version is using 32 bit float point // arithmetic. - + for (int o = 0; o < ol; o++){ CPPUNIT_ASSERT_COMPLEXES_EQUAL(expected_output[o], actual_output[o], @@ -159,7 +159,7 @@ static void for_each (void (*f)(fir_maker_t)) { std::vector<gr_fir_scc_info> info; - gr_fir_util::get_gr_fir_scc_info (&info); // get all known scc implementations + gr_fir_util::get_gr_fir_scc_info (&info); // get all known scc implementations for (std::vector<gr_fir_scc_info>::iterator p = info.begin (); p != info.end (); diff --git a/gnuradio-core/src/lib/filter/qa_gr_fir_scc.h b/gnuradio-core/src/lib/filter/qa_gr_fir_scc.h index f371669ba..4b5ffdae3 100644 --- a/gnuradio-core/src/lib/filter/qa_gr_fir_scc.h +++ b/gnuradio-core/src/lib/filter/qa_gr_fir_scc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/qa_gr_rotator.cc b/gnuradio-core/src/lib/filter/qa_gr_rotator.cc index ef41127fd..b2885a12d 100644 --- a/gnuradio-core/src/lib/filter/qa_gr_rotator.cc +++ b/gnuradio-core/src/lib/filter/qa_gr_rotator.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -35,7 +35,7 @@ // error vector magnitude __GR_ATTR_UNUSED static float -error_vector_mag(gr_complex a, gr_complex b) +error_vector_mag(gr_complex a, gr_complex b) { return abs(a-b); } diff --git a/gnuradio-core/src/lib/filter/qa_gr_rotator.h b/gnuradio-core/src/lib/filter/qa_gr_rotator.h index 2cc6006aa..739b23f8c 100644 --- a/gnuradio-core/src/lib/filter/qa_gr_rotator.h +++ b/gnuradio-core/src/lib/filter/qa_gr_rotator.h @@ -1,19 +1,19 @@ /* -*- 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, diff --git a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccc.cc b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccc.cc index ca76c8eb8..cfdbc53eb 100644 --- a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccc.cc +++ b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -70,7 +70,7 @@ ref_dotprod (const i_type input[], const tap_type taps[], int ntaps) for (int i = 0; i < ntaps; i++) { sum += input[i] * taps[i]; } - + return sum; } @@ -149,7 +149,7 @@ qa_gri_fir_filter_with_buffer_ccc::test_decimate(unsigned int decimate) // our reference implementation is using 80 bit floating point // arithmetic, while the SSE version is using 32 bit float point // arithmetic. - + for (int o = 0; o < (int)(ol/decimate); o++){ CPPUNIT_ASSERT_COMPLEXES_EQUAL(expected_output[o], actual_output[o], sqrt((float)n)*0.25*MAX_DATA*MAX_DATA * ERR_DELTA); diff --git a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccc.h b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccc.h index f9f206f66..c1f2df10c 100644 --- a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccc.h +++ b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, diff --git a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccf.cc b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccf.cc index c25853b1e..9a5be0351 100644 --- a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccf.cc +++ b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccf.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -76,7 +76,7 @@ ref_dotprod (const i_type input[], const tap_type taps[], int ntaps) for (int i = 0; i < ntaps; i++) { sum += input[i] * taps[i]; } - + return sum; } @@ -155,7 +155,7 @@ qa_gri_fir_filter_with_buffer_ccf::test_decimate (unsigned int decimate) // our reference implementation is using 80 bit floating point // arithmetic, while the SSE version is using 32 bit float point // arithmetic. - + for (int o = 0; o < (int)(ol/decimate); o++){ CPPUNIT_ASSERT_COMPLEXES_EQUAL(expected_output[o], actual_output[o], abs (expected_output[o]) * ERR_DELTA); diff --git a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccf.h b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccf.h index 924b4bc2e..686bc8541 100644 --- a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccf.h +++ b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccf.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, diff --git a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fcc.cc b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fcc.cc index 19f270200..583697165 100644 --- a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fcc.cc +++ b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fcc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -76,7 +76,7 @@ ref_dotprod (const i_type input[], const tap_type taps[], int ntaps) for (int i = 0; i < ntaps; i++) { sum += input[i] * taps[i]; } - + return sum; } @@ -156,7 +156,7 @@ qa_gri_fir_filter_with_buffer_fcc::test_decimate(unsigned int decimate) // our reference implementation is using 80 bit floating point // arithmetic, while the SSE version is using 32 bit float point // arithmetic. - + for (int o = 0; o < (int)(ol/decimate); o++){ CPPUNIT_ASSERT_COMPLEXES_EQUAL(expected_output[o], actual_output[o], abs (expected_output[o]) * ERR_DELTA); diff --git a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fcc.h b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fcc.h index 6201800f9..64eed25d3 100644 --- a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fcc.h +++ b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fcc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, diff --git a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fff.cc b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fff.cc index 8401e484b..208ae01db 100644 --- a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fff.cc +++ b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fff.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -70,7 +70,7 @@ ref_dotprod (const i_type input[], const tap_type taps[], int ntaps) } void -qa_gri_fir_filter_with_buffer_fff::t1 () +qa_gri_fir_filter_with_buffer_fff::t1 () { test_decimate(1); } @@ -144,7 +144,7 @@ qa_gri_fir_filter_with_buffer_fff::test_decimate(unsigned int decimate) // our reference implementation is using 80 bit floating point // arithmetic, while the SSE version is using 32 bit float point // arithmetic. - + for (int o = 0; o < (int)(ol/decimate); o++){ CPPUNIT_ASSERT_DOUBLES_EQUAL(expected_output[o], actual_output[o], fabsf (expected_output[o]) * ERR_DELTA); diff --git a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fff.h b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fff.h index 54a9cdc53..d219ec72d 100644 --- a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fff.h +++ b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fff.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, diff --git a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fsf.cc b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fsf.cc index 091505380..e2b6fb04f 100644 --- a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fsf.cc +++ b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fsf.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -91,7 +91,7 @@ qa_gri_fir_filter_with_buffer_fsf::t3 () // and exercises all corner cases on input alignment and length. // void -qa_gri_fir_filter_with_buffer_fsf::test_decimate (unsigned int decimate) +qa_gri_fir_filter_with_buffer_fsf::test_decimate (unsigned int decimate) { const int MAX_TAPS = 9; const int OUTPUT_LEN = 17; diff --git a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fsf.h b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fsf.h index 9c901464e..70030a072 100644 --- a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fsf.h +++ b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fsf.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -35,7 +35,7 @@ class qa_gri_fir_filter_with_buffer_fsf : public CppUnit::TestCase { private: void test_decimate(unsigned int decimate); - + void t1 (); void t2 (); void t3 (); diff --git a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_scc.cc b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_scc.cc index 03cd71022..15f8b1f95 100644 --- a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_scc.cc +++ b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_scc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -76,7 +76,7 @@ ref_dotprod (const i_type input[], const tap_type taps[], int ntaps) for (int i = 0; i < ntaps; i++) { sum += (float)input[i] * taps[i]; } - + return sum; } diff --git a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_scc.h b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_scc.h index 970ca3749..f80056189 100644 --- a/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_scc.h +++ b/gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_scc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, diff --git a/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator.cc b/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator.cc index d158ff00d..7dca65b9a 100644 --- a/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator.cc +++ b/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator.h b/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator.h index 400cffb7e..3f4dec7c2 100644 --- a/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator.h +++ b/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator_cc.cc b/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator_cc.cc index d0ed04238..1f70d7f42 100644 --- a/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator_cc.cc +++ b/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator_cc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2007 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, diff --git a/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator_cc.h b/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator_cc.h index 496f39702..6be3d9743 100644 --- a/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator_cc.h +++ b/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator_cc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2007 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, diff --git a/gnuradio-core/src/lib/filter/short_dotprod_generic.c b/gnuradio-core/src/lib/filter/short_dotprod_generic.c index f15027f1e..49a9c0483 100644 --- a/gnuradio-core/src/lib/filter/short_dotprod_generic.c +++ b/gnuradio-core/src/lib/filter/short_dotprod_generic.c @@ -1,19 +1,19 @@ /* -*- c -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/short_dotprod_generic.h b/gnuradio-core/src/lib/filter/short_dotprod_generic.h index bff4d937c..e7d977a00 100644 --- a/gnuradio-core/src/lib/filter/short_dotprod_generic.h +++ b/gnuradio-core/src/lib/filter/short_dotprod_generic.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/short_dotprod_mmx.S b/gnuradio-core/src/lib/filter/short_dotprod_mmx.S index 1830a1a94..48f634a18 100644 --- a/gnuradio-core/src/lib/filter/short_dotprod_mmx.S +++ b/gnuradio-core/src/lib/filter/short_dotprod_mmx.S @@ -1,30 +1,30 @@ # # Copyright 2002 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. -# +# # SIMD MMX dot product # Equivalent to the following C code: # long dotprod(signed short *a,signed short *b,int cnt) # { -# long sum = 0; -# cnt *= 4; +# long sum = 0; +# cnt *= 4; # while(cnt--) # sum += *a++ + *b++; # return sum; @@ -32,7 +32,7 @@ # a and b should also be 64-bit aligned, or speed will suffer greatly # Copyright 1999, Phil Karn KA9Q # May be used under the terms of the GNU public license - + #include "assembly.h" @@ -53,16 +53,16 @@ GLOB_SYMB(short_dotprod_mmx): movl 12(%ebp),%edi # b movl 16(%ebp),%ecx # cnt pxor %mm0,%mm0 # clear running sum (in two 32-bit halves) - + # MMX dot product loop unrolled 4 times, crunching 16 terms per loop .p2align 4 .Loop1mmx: subl $4,%ecx jl .Loop1Done - + movq (%esi),%mm1 # mm1 = a[3],a[2],a[1],a[0] pmaddwd (%edi),%mm1 # mm1 = b[3]*a[3]+b[2]*a[2],b[1]*a[1]+b[0]*a[0] paddd %mm1,%mm0 - + movq 8(%esi),%mm1 pmaddwd 8(%edi),%mm1 paddd %mm1,%mm0 @@ -72,21 +72,21 @@ GLOB_SYMB(short_dotprod_mmx): paddd %mm1,%mm0 movq 24(%esi),%mm1 - addl $32,%esi + addl $32,%esi pmaddwd 24(%edi),%mm1 - addl $32,%edi + addl $32,%edi paddd %mm1,%mm0 jmp .Loop1mmx .Loop1Done: - - addl $4,%ecx - + + addl $4,%ecx + # MMX dot product loop, not unrolled, crunching 4 terms per loop # This could be redone as Duff's Device on the unrolled loop above .Loop2: subl $1,%ecx jl .Loop2Done - + movq (%esi),%mm1 addl $8,%esi pmaddwd (%edi),%mm1 @@ -94,13 +94,13 @@ GLOB_SYMB(short_dotprod_mmx): paddd %mm1,%mm0 jmp .Loop2 .Loop2Done: - + movd %mm0,%ebx # right-hand word to ebx punpckhdq %mm0,%mm0 # left-hand word to right side of %mm0 movd %mm0,%eax addl %ebx,%eax # running sum now in %eax emms # done with MMX - + popl %ebx popl %ecx popl %edi diff --git a/gnuradio-core/src/lib/filter/short_dotprod_mmx64.S b/gnuradio-core/src/lib/filter/short_dotprod_mmx64.S index 7d9b25cb2..c8c9da30a 100644 --- a/gnuradio-core/src/lib/filter/short_dotprod_mmx64.S +++ b/gnuradio-core/src/lib/filter/short_dotprod_mmx64.S @@ -1,30 +1,30 @@ # # Copyright 2002,2005 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. -# +# # SIMD MMX dot product # Equivalent to the following C code: # long dotprod(signed short *a,signed short *b,int cnt) # { -# long sum = 0; -# cnt *= 4; +# long sum = 0; +# cnt *= 4; # while(cnt--) # sum += *a++ + *b++; # return sum; @@ -32,7 +32,7 @@ # a and b should also be 64-bit aligned, or speed will suffer greatly # Copyright 1999, Phil Karn KA9Q # May be used under the terms of the GNU public license - + #include "assembly.h" @@ -47,16 +47,16 @@ GLOB_SYMB(short_dotprod_mmx): # a: rdi, b: rsi, cnt: rdx pxor %mm0,%mm0 # clear running sum (in two 32-bit halves) - + # MMX dot product loop unrolled 4 times, crunching 16 terms per loop .p2align 4 .Loop1mmx: sub $4,%rdx jl .Loop1Done - + movq (%rdi),%mm1 # mm1 = a[3],a[2],a[1],a[0] pmaddwd (%rsi),%mm1 # mm1 = b[3]*a[3]+b[2]*a[2],b[1]*a[1]+b[0]*a[0] paddd %mm1,%mm0 - + movq 8(%rdi),%mm1 pmaddwd 8(%rsi),%mm1 paddd %mm1,%mm0 @@ -66,21 +66,21 @@ GLOB_SYMB(short_dotprod_mmx): paddd %mm1,%mm0 movq 24(%rdi),%mm1 - add $32,%rdi + add $32,%rdi pmaddwd 24(%rsi),%mm1 - add $32,%rsi + add $32,%rsi paddd %mm1,%mm0 jmp .Loop1mmx .Loop1Done: - - add $4,%rdx - + + add $4,%rdx + # MMX dot product loop, not unrolled, crunching 4 terms per loop # This could be redone as Duff's Device on the unrolled loop above .Loop2: sub $1,%rdx jl .Loop2Done - + movq (%rdi),%mm1 add $8,%rdi pmaddwd (%rsi),%mm1 @@ -88,13 +88,13 @@ GLOB_SYMB(short_dotprod_mmx): paddd %mm1,%mm0 jmp .Loop2 .Loop2Done: - + movd %mm0,%edx # right-hand word to edx punpckhdq %mm0,%mm0 # left-hand word to right side of %mm0 movd %mm0,%eax addl %edx,%eax # running sum now in %eax emms # done with MMX - + retq FUNC_TAIL(short_dotprod_mmx) diff --git a/gnuradio-core/src/lib/filter/short_dotprod_x86.h b/gnuradio-core/src/lib/filter/short_dotprod_x86.h index 3a1719af4..13d5ae2a3 100644 --- a/gnuradio-core/src/lib/filter/short_dotprod_x86.h +++ b/gnuradio-core/src/lib/filter/short_dotprod_x86.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/sse_debug.c b/gnuradio-core/src/lib/filter/sse_debug.c index 9ec3d23e5..870cc0543 100644 --- a/gnuradio-core/src/lib/filter/sse_debug.c +++ b/gnuradio-core/src/lib/filter/sse_debug.c @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -51,7 +51,7 @@ get_xmm_regs (struct xmm_regs *x) "movups %%xmm7,0x70(%0); \n" : : "r" (x)); } -void +void dump_xmm_regs (void) { struct xmm_regs r; diff --git a/gnuradio-core/src/lib/filter/sse_debug.h b/gnuradio-core/src/lib/filter/sse_debug.h index f1df0feb1..b19b4e646 100644 --- a/gnuradio-core/src/lib/filter/sse_debug.h +++ b/gnuradio-core/src/lib/filter/sse_debug.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -31,7 +31,7 @@ extern "C" { unsigned long ul[4]; float f[4]; }; - + struct xmm_regs { union xmm_register xmm[8]; }; diff --git a/gnuradio-core/src/lib/filter/sysconfig_armv7_a.cc b/gnuradio-core/src/lib/filter/sysconfig_armv7_a.cc index b9c217442..2c415863b 100644 --- a/gnuradio-core/src/lib/filter/sysconfig_armv7_a.cc +++ b/gnuradio-core/src/lib/filter/sysconfig_armv7_a.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,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, diff --git a/gnuradio-core/src/lib/filter/sysconfig_generic.cc b/gnuradio-core/src/lib/filter/sysconfig_generic.cc index 17757eccd..88508f62b 100644 --- a/gnuradio-core/src/lib/filter/sysconfig_generic.cc +++ b/gnuradio-core/src/lib/filter/sysconfig_generic.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/filter/sysconfig_powerpc.cc b/gnuradio-core/src/lib/filter/sysconfig_powerpc.cc index e2b27815b..911beae2a 100644 --- a/gnuradio-core/src/lib/filter/sysconfig_powerpc.cc +++ b/gnuradio-core/src/lib/filter/sysconfig_powerpc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,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, diff --git a/gnuradio-core/src/lib/filter/sysconfig_x86.cc b/gnuradio-core/src/lib/filter/sysconfig_x86.cc index f329a30ae..582df0ab7 100644 --- a/gnuradio-core/src/lib/filter/sysconfig_x86.cc +++ b/gnuradio-core/src/lib/filter/sysconfig_x86.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/general/.gitignore b/gnuradio-core/src/lib/general/.gitignore deleted file mode 100644 index 795dc793c..000000000 --- a/gnuradio-core/src/lib/general/.gitignore +++ /dev/null @@ -1,308 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/generate-stamp -/gr_constants.cc -/GrFIRfilterCCC.cc -/GrFIRfilterCCC.h -/GrFIRfilterCCF.cc -/GrFIRfilterCCF.h -/GrFIRfilterFCC.cc -/GrFIRfilterFCC.h -/GrFIRfilterFFF.cc -/GrFIRfilterFFF.h -/GrFIRfilterFSF.cc -/GrFIRfilterFSF.h -/GrFIRfilterSCC.cc -/GrFIRfilterSCC.h -/GrFIRfilterSIS.cc -/GrFIRfilterSIS.h -/GrFreqXlatingFIRfilterCCC.cc -/GrFreqXlatingFIRfilterCCC.h -/GrFreqXlatingFIRfilterCCF.cc -/GrFreqXlatingFIRfilterCCF.h -/GrFreqXlatingFIRfilterFCC.cc -/GrFreqXlatingFIRfilterFCC.h -/GrFreqXlatingFIRfilterFCF.cc -/GrFreqXlatingFIRfilterFCF.h -/GrFreqXlatingFIRfilterSCC.cc -/GrFreqXlatingFIRfilterSCC.h -/GrFreqXlatingFIRfilterSCF.cc -/GrFreqXlatingFIRfilterSCF.h -/gr_fir_CCC.cc -/gr_fir_CCC.h -/gr_fir_CCC_generic.cc -/gr_fir_CCC_generic.h -/gr_fir_CCF.cc -/gr_fir_CCF.h -/gr_fir_CCF_generic.cc -/gr_fir_CCF_generic.h -/gr_fir_FCC.cc -/gr_fir_FCC.h -/gr_fir_FCC_generic.cc -/gr_fir_FCC_generic.h -/gr_fir_FFF.cc -/gr_fir_FFF.h -/gr_fir_FFF_generic.cc -/gr_fir_FFF_generic.h -/gr_fir_FSF.cc -/gr_fir_FSF.h -/gr_fir_FSF_generic.cc -/gr_fir_FSF_generic.h -/gr_fir_SCC.cc -/gr_fir_SCC.h -/gr_fir_SCC_generic.cc -/gr_fir_SCC_generic.h -/gr_fir_SIS.cc -/gr_fir_SIS.h -/gr_fir_SIS_generic.cc -/gr_fir_SIS_generic.h -/gr_fir_sysconfig.cc -/gr_fir_sysconfig.h -/gr_fir_sysconfig_generic.cc -/gr_fir_sysconfig_generic.h -/gr_fir_util.cc -/gr_fir_util.h -/GrFIRfilterCCC.i -/GrFIRfilterCCF.i -/GrFIRfilterFCC.i -/GrFIRfilterFFF.i -/GrFIRfilterFSF.i -/GrFIRfilterSCC.i -/GrFIRfilterSIS.i -/GrFreqXlatingFIRfilterCCC.i -/GrFreqXlatingFIRfilterCCF.i -/GrFreqXlatingFIRfilterFCC.i -/GrFreqXlatingFIRfilterFCF.i -/GrFreqXlatingFIRfilterSCC.i -/GrFreqXlatingFIRfilterSCF.i -/# --- generated files --- -/gr_add_cc.cc -/gr_add_cc.h -/gr_add_cc.i -/gr_add_const_c.cc -/gr_add_const_c.h -/gr_add_const_c.i -/gr_add_const_cc.cc -/gr_add_const_cc.h -/gr_add_const_cc.i -/gr_add_const_f.cc -/gr_add_const_f.h -/gr_add_const_f.i -/gr_add_const_ff.cc -/gr_add_const_ff.h -/gr_add_const_ff.i -/gr_add_const_i.cc -/gr_add_const_i.h -/gr_add_const_i.i -/gr_add_const_ii.cc -/gr_add_const_ii.h -/gr_add_const_ii.i -/gr_add_const_s.cc -/gr_add_const_s.h -/gr_add_const_s.i -/gr_add_const_sf.cc -/gr_add_const_sf.h -/gr_add_const_sf.i -/gr_add_const_ss.cc -/gr_add_const_ss.h -/gr_add_const_ss.i -/gr_add_const_vcc.cc -/gr_add_const_vcc.h -/gr_add_const_vcc.i -/gr_add_const_vff.cc -/gr_add_const_vff.h -/gr_add_const_vff.i -/gr_add_const_vii.cc -/gr_add_const_vii.h -/gr_add_const_vii.i -/gr_add_const_vss.cc -/gr_add_const_vss.h -/gr_add_const_vss.i -/gr_add_ii.cc -/gr_add_ii.h -/gr_add_ii.i -/gr_add_ss.cc -/gr_add_ss.h -/gr_add_ss.i -/gr_add_vcc.cc -/gr_add_vcc.h -/gr_add_vcc.i -/gr_add_vff.cc -/gr_add_vff.h -/gr_add_vff.i -/gr_add_vii.cc -/gr_add_vii.h -/gr_add_vii.i -/gr_add_vss.cc -/gr_add_vss.h -/gr_add_vss.i -/gr_divide_cc.cc -/gr_divide_cc.h -/gr_divide_cc.i -/gr_divide_ff.cc -/gr_divide_ff.h -/gr_divide_ff.i -/gr_divide_ii.cc -/gr_divide_ii.h -/gr_divide_ii.i -/gr_divide_ss.cc -/gr_divide_ss.h -/gr_divide_ss.i -/gr_multiply_const_ii.cc -/gr_multiply_const_ii.h -/gr_multiply_const_ii.i -/gr_multiply_const_ss.cc -/gr_multiply_const_ss.h -/gr_multiply_const_ss.i -/gr_multiply_ii.cc -/gr_multiply_ii.h -/gr_multiply_ii.i -/gr_multiply_ss.cc -/gr_multiply_ss.h -/gr_multiply_ss.i -/gr_multiply_vcc.cc -/gr_multiply_vcc.h -/gr_multiply_vcc.i -/gr_multiply_vff.cc -/gr_multiply_vff.h -/gr_multiply_vff.i -/gr_multiply_vii.cc -/gr_multiply_vii.h -/gr_multiply_vii.i -/gr_multiply_vss.cc -/gr_multiply_vss.h -/gr_multiply_vss.i -/gr_multiply_const_vcc.cc -/gr_multiply_const_vcc.h -/gr_multiply_const_vcc.i -/gr_multiply_const_vff.cc -/gr_multiply_const_vff.h -/gr_multiply_const_vff.i -/gr_multiply_const_vii.cc -/gr_multiply_const_vii.h -/gr_multiply_const_vii.i -/gr_multiply_const_vss.cc -/gr_multiply_const_vss.h -/gr_multiply_const_vss.i -/gr_noise_source_c.cc -/gr_noise_source_c.h -/gr_noise_source_c.i -/gr_noise_source_f.cc -/gr_noise_source_f.h -/gr_noise_source_f.i -/gr_noise_source_i.cc -/gr_noise_source_i.h -/gr_noise_source_i.i -/gr_noise_source_s.cc -/gr_noise_source_s.h -/gr_noise_source_s.i -/gr_sig_source_c.cc -/gr_sig_source_c.h -/gr_sig_source_c.i -/gr_sig_source_f.cc -/gr_sig_source_f.h -/gr_sig_source_f.i -/gr_sig_source_i.cc -/gr_sig_source_i.h -/gr_sig_source_i.i -/gr_sig_source_s.cc -/gr_sig_source_s.h -/gr_sig_source_s.i -/gr_sub_cc.cc -/gr_sub_cc.h -/gr_sub_cc.i -/gr_sub_ff.cc -/gr_sub_ff.h -/gr_sub_ff.i -/gr_sub_ii.cc -/gr_sub_ii.h -/gr_sub_ii.i -/gr_sub_ss.cc -/gr_sub_ss.h -/gr_sub_ss.i -/gr_vector_sink_b.cc -/gr_vector_sink_b.h -/gr_vector_sink_b.i -/gr_vector_sink_c.cc -/gr_vector_sink_c.h -/gr_vector_sink_c.i -/gr_vector_sink_f.cc -/gr_vector_sink_f.h -/gr_vector_sink_f.i -/gr_vector_sink_i.cc -/gr_vector_sink_i.h -/gr_vector_sink_i.i -/gr_vector_sink_s.cc -/gr_vector_sink_s.h -/gr_vector_sink_s.i -/gr_vector_source_b.cc -/gr_vector_source_b.h -/gr_vector_source_b.i -/gr_vector_source_c.cc -/gr_vector_source_c.h -/gr_vector_source_c.i -/gr_vector_source_f.cc -/gr_vector_source_f.h -/gr_vector_source_f.i -/gr_vector_source_i.cc -/gr_vector_source_i.h -/gr_vector_source_i.i -/gr_vector_source_s.cc -/gr_vector_source_s.h -/gr_vector_source_s.i -/gr_mute_cc.cc -/gr_mute_cc.h -/gr_mute_cc.i -/gr_mute_ff.cc -/gr_mute_ff.h -/gr_mute_ff.i -/gr_mute_ii.cc -/gr_mute_ii.h -/gr_mute_ii.i -/gr_mute_ss.cc -/gr_mute_ss.h -/gr_mute_ss.i -/gr_chunks_to_symbols_bc.cc -/gr_chunks_to_symbols_bc.h -/gr_chunks_to_symbols_bc.i -/gr_chunks_to_symbols_bf.cc -/gr_chunks_to_symbols_bf.h -/gr_chunks_to_symbols_bf.i -/gr_chunks_to_symbols_ic.cc -/gr_chunks_to_symbols_ic.h -/gr_chunks_to_symbols_ic.i -/gr_chunks_to_symbols_if.cc -/gr_chunks_to_symbols_if.h -/gr_chunks_to_symbols_if.i -/gr_chunks_to_symbols_sc.cc -/gr_chunks_to_symbols_sc.h -/gr_chunks_to_symbols_sc.i -/gr_chunks_to_symbols_sf.cc -/gr_chunks_to_symbols_sf.h -/gr_chunks_to_symbols_sf.i -/gr_packed_to_unpacked_bb.cc -/gr_packed_to_unpacked_bb.h -/gr_packed_to_unpacked_bb.i -/gr_packed_to_unpacked_ii.cc -/gr_packed_to_unpacked_ii.h -/gr_packed_to_unpacked_ii.i -/gr_packed_to_unpacked_ss.cc -/gr_packed_to_unpacked_ss.h -/gr_packed_to_unpacked_ss.i -/gr_unpacked_to_packed_bb.cc -/gr_unpacked_to_packed_bb.h -/gr_unpacked_to_packed_bb.i -/gr_unpacked_to_packed_ii.cc -/gr_unpacked_to_packed_ii.h -/gr_unpacked_to_packed_ii.i -/gr_unpacked_to_packed_ss.cc -/gr_unpacked_to_packed_ss.h -/gr_unpacked_to_packed_ss.i -/# --- end generated files --- diff --git a/gnuradio-core/src/lib/general/CMakeLists.txt b/gnuradio-core/src/lib/general/CMakeLists.txt index ee6e4c4e6..207d85c4c 100644 --- a/gnuradio-core/src/lib/general/CMakeLists.txt +++ b/gnuradio-core/src/lib/general/CMakeLists.txt @@ -267,7 +267,6 @@ set(gr_core_general_triple_threats gr_simple_framer gr_simple_squelch_cc gr_skiphead - gr_squash_ff gr_squelch_base_cc gr_squelch_base_ff gr_stream_mux @@ -285,11 +284,8 @@ set(gr_core_general_triple_threats gr_vector_to_stream gr_vector_to_streams gr_unpack_k_bits_bb - gr_wavelet_ff - gr_wvps_ff gr_descrambler_bb gr_scrambler_bb - gr_probe_mpsk_snr_c gr_probe_density_b gr_annotator_alltoall gr_annotator_1to1 diff --git a/gnuradio-core/src/lib/general/Makefile.am b/gnuradio-core/src/lib/general/Makefile.am deleted file mode 100644 index ba1f686ab..000000000 --- a/gnuradio-core/src/lib/general/Makefile.am +++ /dev/null @@ -1,491 +0,0 @@ -# -# Copyright 2001,2002,2004,2006-2012 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -# $(WITH_INCLUDES) must _always_ be last -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES) \ - $(FFTW3F_CPPFLAGS) $(GSL_CPPFLAGS) $(WITH_INCLUDES) - -noinst_LTLIBRARIES = libgeneral.la libgeneral-qa.la - -BUILT_SOURCES = - -# ---------------------------------------------------------------- - -EXTRA_DIST += \ - gen_sine_table.py \ - gr_constants.cc.in - -libgeneral_la_SOURCES = \ - complex_vec_test.cc \ - gr_add_ff.cc \ - gr_additive_scrambler_bb.cc \ - gr_agc_cc.cc \ - gr_agc_ff.cc \ - gr_agc2_cc.cc \ - gr_agc2_ff.cc \ - gr_align_on_samplenumbers_ss.cc \ - gr_bin_statistics_f.cc \ - gr_bytes_to_syms.cc \ - gr_char_to_float.cc \ - gr_char_to_short.cc \ - gr_check_counting_s.cc \ - gr_check_lfsr_32k_s.cc \ - gr_circular_file.cc \ - gr_complex_to_interleaved_short.cc \ - gr_complex_to_xxx.cc \ - gr_conjugate_cc.cc \ - gr_copy.cc \ - gr_count_bits.cc \ - gr_cpfsk_bc.cc \ - gr_cpm.cc \ - gr_ctcss_squelch_ff.cc \ - gr_decode_ccsds_27_fb.cc \ - gr_deinterleave.cc \ - gr_delay.cc \ - gr_diff_decoder_bb.cc \ - gr_diff_encoder_bb.cc \ - gr_diff_phasor_cc.cc \ - gr_dpll_bb.cc \ - gr_encode_ccsds_27_bb.cc \ - gr_fake_channel_coder_pp.cc \ - gr_fast_atan2f.cc \ - gr_feedforward_agc_cc.cc \ - gr_feval.cc \ - gr_fft_vcc.cc \ - gr_fft_vcc_fftw.cc \ - gr_fft_vfc.cc \ - gr_firdes.cc \ - gr_float_to_char.cc \ - gr_float_to_complex.cc \ - gr_float_to_int.cc \ - gr_float_to_short.cc \ - gr_float_to_uchar.cc \ - gr_fmdet_cf.cc \ - gr_frequency_modulator_fc.cc \ - gr_fxpt.cc \ - gr_framer_sink_1.cc \ - gr_glfsr_source_b.cc \ - gr_glfsr_source_f.cc \ - gr_head.cc \ - gr_interleave.cc \ - gr_interleaved_short_to_complex.cc \ - gr_iqcomp_cc.cc \ - gr_keep_one_in_n.cc \ - gr_kludge_copy.cc \ - gr_lfsr_32k_source_s.cc \ - gr_map_bb.cc \ - gr_misc.cc \ - gr_multiply_cc.cc \ - gr_multiply_ff.cc \ - gr_multiply_const_cc.cc \ - gr_multiply_const_ff.cc \ - gr_multiply_conjugate_cc.cc \ - gr_nlog10_ff.cc \ - gr_nop.cc \ - gr_null_sink.cc \ - gr_null_source.cc \ - gr_pa_2x2_phase_combiner.cc \ - gr_packet_sink.cc \ - gr_peak_detector2_fb.cc \ - gr_phase_modulator_fc.cc \ - gr_pll_carriertracking_cc.cc \ - gr_pll_freqdet_cf.cc \ - gr_pll_refout_cc.cc \ - gr_pn_correlator_cc.cc \ - gr_constants.cc \ - gr_prefs.cc \ - gr_probe_avg_mag_sqrd_c.cc \ - gr_probe_avg_mag_sqrd_cf.cc \ - gr_probe_avg_mag_sqrd_f.cc \ - gr_pwr_squelch_cc.cc \ - gr_pwr_squelch_ff.cc \ - gr_quadrature_demod_cf.cc \ - gr_rail_ff.cc \ - gr_random.cc \ - gr_regenerate_bb.cc \ - gr_remez.cc \ - gr_repeat.cc \ - gr_reverse.cc \ - gr_rms_cf.cc \ - gr_rms_ff.cc \ - gr_short_to_char.cc \ - gr_short_to_float.cc \ - gr_int_to_float.cc \ - gr_simple_correlator.cc \ - gr_simple_framer.cc \ - gr_simple_squelch_cc.cc \ - gr_skiphead.cc \ - gr_squash_ff.cc \ - gr_squelch_base_cc.cc \ - gr_squelch_base_ff.cc \ - gr_stream_mux.cc \ - gr_stream_to_streams.cc \ - gr_stream_to_vector.cc \ - gr_streams_to_stream.cc \ - gr_streams_to_vector.cc \ - gr_stretch_ff.cc \ - gr_test.cc \ - gr_threshold_ff.cc \ - gr_throttle.cc \ - gr_transcendental.cc \ - gr_uchar_to_float.cc \ - gr_vco_f.cc \ - gr_vector_to_stream.cc \ - gr_vector_to_streams.cc \ - gr_wavelet_ff.cc \ - gr_wvps_ff.cc \ - gri_add_const_ss_generic.cc \ - gri_char_to_float.cc \ - gri_control_loop.cc \ - gri_debugger_hook.cc \ - gri_fft.cc \ - gri_float_to_char.cc \ - gri_float_to_int.cc \ - gri_float_to_short.cc \ - gri_float_to_uchar.cc \ - gri_glfsr.cc \ - gri_interleaved_short_to_complex.cc \ - gri_int_to_float.cc \ - gri_short_to_float.cc \ - gri_uchar_to_float.cc \ - malloc16.c \ - gr_unpack_k_bits_bb.cc \ - gr_descrambler_bb.cc \ - gr_scrambler_bb.cc \ - gr_probe_mpsk_snr_c.cc \ - gr_probe_density_b.cc \ - gr_annotator_alltoall.cc \ - gr_annotator_1to1.cc \ - gr_burst_tagger.cc \ - gr_correlate_access_code_tag_bb.cc - -libgeneral_qa_la_SOURCES = \ - qa_general.cc \ - qa_gr_circular_file.cc \ - qa_gr_cpm.cc \ - qa_gr_firdes.cc \ - qa_gr_fxpt.cc \ - qa_gr_fxpt_nco.cc \ - qa_gr_fxpt_vco.cc \ - qa_gr_math.cc \ - qa_gri_lfsr.cc - -grinclude_HEADERS = \ - gr_core_api.h \ - complex_vec_test.h \ - gr_additive_scrambler_bb.h \ - gr_add_ff.h \ - gr_agc_cc.h \ - gr_agc_ff.h \ - gr_agc2_cc.h \ - gr_agc2_ff.h \ - gr_align_on_samplenumbers_ss.h \ - gr_bin_statistics_f.h \ - gr_bytes_to_syms.h \ - gr_char_to_float.h \ - gr_char_to_short.h \ - gr_check_counting_s.h \ - gr_check_lfsr_32k_s.h \ - gr_circular_file.h \ - gr_complex_to_interleaved_short.h \ - gr_complex_to_xxx.h \ - gr_conjugate_cc.h \ - gr_copy.h \ - gr_count_bits.h \ - gr_cpfsk_bc.h \ - gr_cpm.h \ - gr_ctcss_squelch_ff.h \ - gr_decode_ccsds_27_fb.h \ - gr_diff_decoder_bb.h \ - gr_diff_encoder_bb.h \ - gr_deinterleave.h \ - gr_delay.h \ - gr_diff_phasor_cc.h \ - gr_dpll_bb.h \ - gr_encode_ccsds_27_bb.h \ - gr_expj.h \ - gr_fake_channel_coder_pp.h \ - gr_feedforward_agc_cc.h \ - gr_feval.h \ - gr_fft_vcc.h \ - gr_fft_vcc_fftw.h \ - gr_fft_vfc.h \ - gr_firdes.h \ - gr_float_to_char.h \ - gr_float_to_complex.h \ - gr_float_to_int.h \ - gr_float_to_short.h \ - gr_float_to_uchar.h \ - gr_fmdet_cf.h \ - gr_framer_sink_1.h \ - gr_frequency_modulator_fc.h \ - gr_fxpt.h \ - gr_fxpt_nco.h \ - gr_fxpt_vco.h \ - gr_glfsr_source_b.h \ - gr_glfsr_source_f.h \ - gr_head.h \ - gr_interleave.h \ - gr_interleaved_short_to_complex.h \ - gr_iqcomp_cc.h \ - gr_keep_one_in_n.h \ - gr_kludge_copy.h \ - gr_lfsr_32k_source_s.h \ - gr_log2_const.h \ - gr_map_bb.h \ - gr_math.h \ - gr_misc.h \ - gr_multiply_cc.h \ - gr_multiply_ff.h \ - gr_multiply_const_cc.h \ - gr_multiply_const_ff.h \ - gr_multiply_conjugate_cc.h \ - gr_nco.h \ - gr_nlog10_ff.h \ - gr_nop.h \ - gr_null_sink.h \ - gr_null_source.h \ - gr_pa_2x2_phase_combiner.h \ - gr_packet_sink.h \ - gr_peak_detector2_fb.h \ - gr_phase_modulator_fc.h \ - gr_pll_carriertracking_cc.h \ - gr_pll_freqdet_cf.h \ - gr_pll_refout_cc.h \ - gr_pn_correlator_cc.h \ - gr_constants.h \ - gr_prefs.h \ - gr_probe_avg_mag_sqrd_c.h \ - gr_probe_avg_mag_sqrd_cf.h \ - gr_probe_avg_mag_sqrd_f.h \ - gr_pwr_squelch_cc.h \ - gr_pwr_squelch_ff.h \ - gr_quadrature_demod_cf.h \ - gr_rail_ff.h \ - gr_random.h \ - gr_regenerate_bb.h \ - gr_remez.h \ - gr_repeat.h \ - gr_reverse.h \ - gr_rms_cf.h \ - gr_rms_ff.h \ - gr_short_to_char.h \ - gr_short_to_float.h \ - gr_int_to_float.h \ - gr_simple_correlator.h \ - gr_simple_framer.h \ - gr_simple_framer_sync.h \ - gr_simple_squelch_cc.h \ - gr_squash_ff.h \ - gr_skiphead.h \ - gr_squelch_base_cc.h \ - gr_squelch_base_ff.h \ - gr_stream_mux.h \ - gr_stream_to_streams.h \ - gr_stream_to_vector.h \ - gr_streams_to_stream.h \ - gr_streams_to_vector.h \ - gr_stretch_ff.h \ - gr_test_types.h \ - gr_test.h \ - gr_threshold_ff.h \ - gr_throttle.h \ - gr_transcendental.h \ - gr_uchar_to_float.h \ - gr_vco.h \ - gr_vco_f.h \ - gr_vector_to_stream.h \ - gr_vector_to_streams.h \ - gr_wavelet_ff.h \ - gr_wvps_ff.h \ - gri_add_const_ss.h \ - gri_agc_cc.h \ - gri_agc_ff.h \ - gri_agc2_cc.h \ - gri_agc2_ff.h \ - gri_char_to_float.h \ - gri_control_loop.h \ - gri_debugger_hook.h \ - gri_fft.h \ - gri_float_to_char.h \ - gri_float_to_int.h \ - gri_float_to_short.h \ - gri_float_to_uchar.h \ - gri_lfsr.h \ - gri_glfsr.h \ - gri_interleaved_short_to_complex.h \ - gri_int_to_float.h \ - gri_lfsr_15_1_0.h \ - gri_lfsr_32k.h \ - gri_short_to_float.h \ - gri_uchar_to_float.h \ - malloc16.h \ - random.h \ - gr_unpack_k_bits_bb.h \ - gr_descrambler_bb.h \ - gr_scrambler_bb.h \ - gr_probe_mpsk_snr_c.h \ - gr_probe_density_b.h \ - gr_annotator_alltoall.h \ - gr_annotator_1to1.h \ - gr_burst_tagger.h \ - gr_correlate_access_code_tag_bb.h - -noinst_HEADERS = \ - qa_general.h \ - qa_gr_circular_file.h \ - qa_gr_cpm.h \ - qa_gr_firdes.h \ - qa_gr_fxpt.h \ - qa_gr_fxpt_nco.h \ - qa_gr_fxpt_vco.h \ - qa_gri_lfsr.h \ - sine_table.h \ - qa_gr_math.h - -swiginclude_HEADERS = \ - complex_vec_test.i \ - general.i \ - gr_additive_scrambler_bb.i \ - gr_add_ff.i \ - gr_agc_cc.i \ - gr_agc_ff.i \ - gr_agc2_cc.i \ - gr_agc2_ff.i \ - gr_align_on_samplenumbers_ss.i \ - gr_bin_statistics_f.i \ - gr_bytes_to_syms.i \ - gr_char_to_float.i \ - gr_char_to_short.i \ - gr_check_counting_s.i \ - gr_check_lfsr_32k_s.i \ - gr_complex_to_interleaved_short.i \ - gr_complex_to_xxx.i \ - gr_conjugate_cc.i \ - gr_copy.i \ - gr_cpfsk_bc.i \ - gr_cpm.i \ - gr_ctcss_squelch_ff.i \ - gr_decode_ccsds_27_fb.i \ - gr_diff_decoder_bb.i \ - gr_diff_encoder_bb.i \ - gr_diff_phasor_cc.i \ - gr_dpll_bb.i \ - gr_deinterleave.i \ - gr_delay.i \ - gr_encode_ccsds_27_bb.i \ - gr_fake_channel_coder_pp.i \ - gr_feedforward_agc_cc.i \ - gr_feval.i \ - gr_fft_vcc.i \ - gr_fft_vfc.i \ - gr_firdes.i \ - gr_float_to_char.i \ - gr_float_to_complex.i \ - gr_float_to_int.i \ - gr_float_to_short.i \ - gr_float_to_uchar.i \ - gr_fmdet_cf.i \ - gr_frequency_modulator_fc.i \ - gr_framer_sink_1.i \ - gr_glfsr_source_b.i \ - gr_glfsr_source_f.i \ - gr_head.i \ - gr_int_to_float.i \ - gr_interleave.i \ - gr_interleaved_short_to_complex.i \ - gr_iqcomp_cc.i \ - gr_keep_one_in_n.i \ - gr_kludge_copy.i \ - gr_lfsr_32k_source_s.i \ - gr_map_bb.i \ - gr_multiply_cc.i \ - gr_multiply_ff.i \ - gr_multiply_const_cc.i \ - gr_multiply_const_ff.i \ - gr_multiply_conjugate_cc.i \ - gr_nlog10_ff.i \ - gr_nop.i \ - gr_null_sink.i \ - gr_null_source.i \ - gr_pa_2x2_phase_combiner.i \ - gr_packet_sink.i \ - gr_peak_detector2_fb.i \ - gr_phase_modulator_fc.i \ - gr_pll_carriertracking_cc.i \ - gr_pll_freqdet_cf.i \ - gr_pll_refout_cc.i \ - gr_pn_correlator_cc.i \ - gr_constants.i \ - gr_prefs.i \ - gr_probe_avg_mag_sqrd_c.i \ - gr_probe_avg_mag_sqrd_cf.i \ - gr_probe_avg_mag_sqrd_f.i \ - gr_pwr_squelch_cc.i \ - gr_pwr_squelch_ff.i \ - gr_quadrature_demod_cf.i \ - gr_rail_ff.i \ - gr_regenerate_bb.i \ - gr_remez.i \ - gr_rms_cf.i \ - gr_rms_ff.i \ - gr_repeat.i \ - gr_short_to_char.i \ - gr_short_to_float.i \ - gr_simple_correlator.i \ - gr_simple_framer.i \ - gr_simple_squelch_cc.i \ - gr_skiphead.i \ - gr_squash_ff.i \ - gr_squelch_base_cc.i \ - gr_squelch_base_ff.i \ - gr_stream_mux.i \ - gr_stream_to_streams.i \ - gr_stream_to_vector.i \ - gr_streams_to_stream.i \ - gr_streams_to_vector.i \ - gr_stretch_ff.i \ - gr_test.i \ - gr_threshold_ff.i \ - gr_throttle.i \ - gr_transcendental.i \ - gr_uchar_to_float.i \ - gr_vco_f.i \ - gr_vector_to_stream.i \ - gr_vector_to_streams.i \ - gr_unpack_k_bits_bb.i \ - gr_wavelet_ff.i \ - gr_wvps_ff.i \ - gri_agc_cc.i \ - gri_agc_ff.i \ - gri_agc2_cc.i \ - gri_agc2_ff.i \ - gri_control_loop.i \ - gr_descrambler_bb.i \ - gr_scrambler_bb.i \ - gr_probe_mpsk_snr_c.i \ - gr_probe_density_b.i \ - gr_annotator_alltoall.i \ - gr_annotator_1to1.i \ - gr_burst_tagger.i \ - gr_correlate_access_code_tag_bb.i diff --git a/gnuradio-core/src/lib/general/README b/gnuradio-core/src/lib/general/README index 26d829f1b..5fa18d7f6 100644 --- a/gnuradio-core/src/lib/general/README +++ b/gnuradio-core/src/lib/general/README @@ -87,12 +87,12 @@ TO DO * Move all the machine specific code to a subdirectory, then have configure symlink to the right directory. This will allow us to build on any platform without choking. There is generic code for all routines, -only the machine dependent speedup will be lacking. +only the machine dependent speedup will be lacking. * Add an interface to gr_fir_util that will return a vector of all valid constructors with descriptive names for each i/o signature. This will allow the test code and benchmarking code to be blissfully ignorant of what platform they're running on. The actual building of the vectors should be done bottom up through the gr_fir_sysconfig -hierarchy. +hierarchy. diff --git a/gnuradio-core/src/lib/general/atsc_rrc1x.dat b/gnuradio-core/src/lib/general/atsc_rrc1x.dat index 3466412fb..3dc87bb0b 100644 --- a/gnuradio-core/src/lib/general/atsc_rrc1x.dat +++ b/gnuradio-core/src/lib/general/atsc_rrc1x.dat @@ -3,10 +3,10 @@ * FILTER TYPE:ROOT RAISED COSINE 12H * PASSBAND RIPPLE IN -dB -.0500 * STOPBAND RIPPLE IN -dB -50.0000 - * SYMBOL RATE .538112E+07 HERTZ - * ROLLOF FACTOR .115200 - * SAMPLING FREQUENCY .107622E+08 HERTZ - * SAMPLING FREQUENCY .107622E+08 HERTZ + * SYMBOL RATE .538112E+07 HERTZ + * ROLLOF FACTOR .115200 + * SAMPLING FREQUENCY .107622E+08 HERTZ + * SAMPLING FREQUENCY .107622E+08 HERTZ */ .1821269281208515e-02, -.9323525242507458e-02, diff --git a/gnuradio-core/src/lib/general/atsc_rrc2x.dat b/gnuradio-core/src/lib/general/atsc_rrc2x.dat index ca7812cbf..8eae94d77 100644 --- a/gnuradio-core/src/lib/general/atsc_rrc2x.dat +++ b/gnuradio-core/src/lib/general/atsc_rrc2x.dat @@ -3,8 +3,8 @@ * FILTER TYPE:ROOT RAISED COSINE 12H * PASSBAND RIPPLE IN -dB -.0500 * STOPBAND RIPPLE IN -dB -50.0000 - * SYMBOL RATE .538112E+07 HERTZ - * ROLLOF FACTOR .115200 + * SYMBOL RATE .538112E+07 HERTZ + * ROLLOF FACTOR .115200 * SAMPLING FREQUENCY .215245E+08 HERTZ */ .8186036720871925E-03, diff --git a/gnuradio-core/src/lib/general/complex_vec_test.cc b/gnuradio-core/src/lib/general/complex_vec_test.cc index df25c325e..99acc2f35 100644 --- a/gnuradio-core/src/lib/general/complex_vec_test.cc +++ b/gnuradio-core/src/lib/general/complex_vec_test.cc @@ -5,18 +5,18 @@ std::vector<std::complex<float> > complex_vec_test0() { std::vector<std::complex<float> > r(5); - + for (size_t i = 0; i < r.size(); i++) r[i] = std::complex<float>(i, i); return r; } -std::vector<std::complex<float> > +std::vector<std::complex<float> > complex_vec_test1(const std::vector<std::complex<float> > &input) { std::vector<std::complex<float> > r(input.size()); - + for (size_t i = 0; i < input.size(); i++) r[i] = std::complex<float>(input[i].real()+0.5, input[i].imag()-0.5); diff --git a/gnuradio-core/src/lib/general/gen_sine_table.py b/gnuradio-core/src/lib/general/gen_sine_table.py index fb433609c..d7d11eff1 100755 --- a/gnuradio-core/src/lib/general/gen_sine_table.py +++ b/gnuradio-core/src/lib/general/gen_sine_table.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# import math import sys @@ -72,6 +72,6 @@ def gen_sine_table (): sys.stdout.write (' { %22.15e, %22.15e },\n' % (2 * e[0], e[1])) # sys.stdout.write ('};\n') - + if __name__ == '__main__': gen_sine_table () diff --git a/gnuradio-core/src/lib/general/general.i b/gnuradio-core/src/lib/general/general.i index fcf60c927..cd8c279c9 100644 --- a/gnuradio-core/src/lib/general/general.i +++ b/gnuradio-core/src/lib/general/general.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2005,2006,2007,2008,2009,2010 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, @@ -125,13 +125,9 @@ #include <gr_decode_ccsds_27_fb.h> #include <gr_descrambler_bb.h> #include <gr_scrambler_bb.h> -#include <gr_probe_mpsk_snr_c.h> #include <gr_probe_density_b.h> #include <gr_rail_ff.h> -#include <gr_squash_ff.h> #include <gr_stretch_ff.h> -#include <gr_wavelet_ff.h> -#include <gr_wvps_ff.h> #include <gr_copy.h> #include <gr_additive_scrambler_bb.h> #include <complex_vec_test.h> @@ -246,13 +242,9 @@ %include "gr_decode_ccsds_27_fb.i" %include "gr_descrambler_bb.i" %include "gr_scrambler_bb.i" -%include "gr_probe_mpsk_snr_c.i" %include "gr_probe_density_b.i" %include "gr_rail_ff.i" -%include "gr_squash_ff.i" %include "gr_stretch_ff.i" -%include "gr_wavelet_ff.i" -%include "gr_wvps_ff.i" %include "gr_copy.i" %include "gr_additive_scrambler_bb.i" %include "complex_vec_test.i" diff --git a/gnuradio-core/src/lib/general/gr_add_ff.cc b/gnuradio-core/src/lib/general/gr_add_ff.cc index fc5455c98..2e45673d3 100644 --- a/gnuradio-core/src/lib/general/gr_add_ff.cc +++ b/gnuradio-core/src/lib/general/gr_add_ff.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -40,7 +40,7 @@ gr_add_ff::gr_add_ff (size_t vlen) gr_make_io_signature (1, 1, sizeof(float)*vlen)), d_vlen (vlen) { - const int alignment_multiple = + const int alignment_multiple = volk_get_alignment() / sizeof(float); set_alignment(alignment_multiple); } diff --git a/gnuradio-core/src/lib/general/gr_add_ff.h b/gnuradio-core/src/lib/general/gr_add_ff.h index 6421f8da2..ff5604c97 100644 --- a/gnuradio-core/src/lib/general/gr_add_ff.h +++ b/gnuradio-core/src/lib/general/gr_add_ff.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -43,7 +43,7 @@ class GR_CORE_API gr_add_ff : public gr_sync_block friend GR_CORE_API gr_add_ff_sptr gr_make_add_ff (size_t vlen); gr_add_ff (size_t vlen); - + size_t d_vlen; public: diff --git a/gnuradio-core/src/lib/general/gr_add_ff.i b/gnuradio-core/src/lib/general/gr_add_ff.i index 3c30640b1..75a87651f 100644 --- a/gnuradio-core/src/lib/general/gr_add_ff.i +++ b/gnuradio-core/src/lib/general/gr_add_ff.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_additive_scrambler_bb.cc b/gnuradio-core/src/lib/general/gr_additive_scrambler_bb.cc index f390df6d5..35cbb9572 100644 --- a/gnuradio-core/src/lib/general/gr_additive_scrambler_bb.cc +++ b/gnuradio-core/src/lib/general/gr_additive_scrambler_bb.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2010 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, @@ -60,6 +60,6 @@ gr_additive_scrambler_bb::work(int noutput_items, } } } - + return noutput_items; } diff --git a/gnuradio-core/src/lib/general/gr_additive_scrambler_bb.h b/gnuradio-core/src/lib/general/gr_additive_scrambler_bb.h index 4c7c8f87e..1c336306d 100644 --- a/gnuradio-core/src/lib/general/gr_additive_scrambler_bb.h +++ b/gnuradio-core/src/lib/general/gr_additive_scrambler_bb.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2010 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, @@ -33,9 +33,9 @@ GR_CORE_API gr_additive_scrambler_bb_sptr gr_make_additive_scrambler_bb(int mask /*! * Scramble an input stream using an LFSR. This block works on the LSB only - * of the input data stream, i.e., on an "unpacked binary" stream, and + * of the input data stream, i.e., on an "unpacked binary" stream, and * produces the same format on its output. - * + * * \param mask Polynomial mask for LFSR * \param seed Initial shift register contents * \param len Shift register length @@ -45,7 +45,7 @@ GR_CORE_API gr_additive_scrambler_bb_sptr gr_make_additive_scrambler_bb(int mask * the LFSR. Optionally, after 'count' bits have been processed, the shift * register is reset to the seed value. This allows processing fixed length * vectors of samples. - * + * * \ingroup coding_blk */ diff --git a/gnuradio-core/src/lib/general/gr_additive_scrambler_bb.i b/gnuradio-core/src/lib/general/gr_additive_scrambler_bb.i index 0ca9c1cd7..acf9e8c47 100644 --- a/gnuradio-core/src/lib/general/gr_additive_scrambler_bb.i +++ b/gnuradio-core/src/lib/general/gr_additive_scrambler_bb.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_agc2_cc.cc b/gnuradio-core/src/lib/general/gr_agc2_cc.cc index 687f6c857..5097babc9 100644 --- a/gnuradio-core/src/lib/general/gr_agc2_cc.cc +++ b/gnuradio-core/src/lib/general/gr_agc2_cc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, @@ -29,17 +29,17 @@ #include <gri_agc2_cc.h> gr_agc2_cc_sptr -gr_make_agc2_cc (float attack_rate, float decay_rate, float reference, +gr_make_agc2_cc (float attack_rate, float decay_rate, float reference, float gain, float max_gain) { return gnuradio::get_initial_sptr(new gr_agc2_cc (attack_rate, decay_rate, reference, gain, max_gain)); } -gr_agc2_cc::gr_agc2_cc (float attack_rate, float decay_rate, float reference, +gr_agc2_cc::gr_agc2_cc (float attack_rate, float decay_rate, float reference, float gain, float max_gain) : gr_sync_block ("gr_agc2_cc", gr_make_io_signature (1, 1, sizeof (gr_complex)), - gr_make_io_signature (1, 1, sizeof (gr_complex))), + gr_make_io_signature (1, 1, sizeof (gr_complex))), gri_agc2_cc (attack_rate, decay_rate, reference, gain, max_gain) { } diff --git a/gnuradio-core/src/lib/general/gr_agc2_cc.h b/gnuradio-core/src/lib/general/gr_agc2_cc.h index 6127c3aa7..54bae1aae 100644 --- a/gnuradio-core/src/lib/general/gr_agc2_cc.h +++ b/gnuradio-core/src/lib/general/gr_agc2_cc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -31,7 +31,7 @@ class gr_agc2_cc; typedef boost::shared_ptr<gr_agc2_cc> gr_agc2_cc_sptr; GR_CORE_API gr_agc2_cc_sptr -gr_make_agc2_cc (float attack_rate = 1e-1, float decay_rate = 1e-2, float reference = 1.0, +gr_make_agc2_cc (float attack_rate = 1e-1, float decay_rate = 1e-2, float reference = 1.0, float gain = 1.0, float max_gain = 0.0); /*! * \brief high performance Automatic Gain Control class @@ -42,11 +42,11 @@ gr_make_agc2_cc (float attack_rate = 1e-1, float decay_rate = 1e-2, float refere class GR_CORE_API gr_agc2_cc : public gr_sync_block, public gri_agc2_cc { - friend GR_CORE_API gr_agc2_cc_sptr gr_make_agc2_cc (float attack_rate, float decay_rate, float reference, + friend GR_CORE_API gr_agc2_cc_sptr gr_make_agc2_cc (float attack_rate, float decay_rate, float reference, float gain, float max_gain); - gr_agc2_cc (float attack_rate, float decay_rate, float reference, + gr_agc2_cc (float attack_rate, float decay_rate, float reference, float gain, float max_gain); - + public: virtual int work (int noutput_items, gr_vector_const_void_star &input_items, diff --git a/gnuradio-core/src/lib/general/gr_agc2_cc.i b/gnuradio-core/src/lib/general/gr_agc2_cc.i index da94a7dea..6d7b22101 100644 --- a/gnuradio-core/src/lib/general/gr_agc2_cc.i +++ b/gnuradio-core/src/lib/general/gr_agc2_cc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -25,11 +25,11 @@ GR_SWIG_BLOCK_MAGIC(gr,agc2_cc) %include <gri_agc2_cc.i> gr_agc2_cc_sptr -gr_make_agc2_cc (float attack_rate = 1e-1, float decay_rate = 1e-2, float reference = 1.0, +gr_make_agc2_cc (float attack_rate = 1e-1, float decay_rate = 1e-2, float reference = 1.0, float gain = 1.0, float max_gain = 0.0); class gr_agc2_cc : public gr_sync_block , public gri_agc2_cc { - gr_agc2_cc (float attack_rate, float decay_rate, float reference, + gr_agc2_cc (float attack_rate, float decay_rate, float reference, float gain, float max_gain); }; diff --git a/gnuradio-core/src/lib/general/gr_agc2_ff.cc b/gnuradio-core/src/lib/general/gr_agc2_ff.cc index 667e9d05d..792ee1c6b 100644 --- a/gnuradio-core/src/lib/general/gr_agc2_ff.cc +++ b/gnuradio-core/src/lib/general/gr_agc2_ff.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2006,2010 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, @@ -29,14 +29,14 @@ #include <gri_agc2_ff.h> gr_agc2_ff_sptr -gr_make_agc2_ff (float attack_rate, float decay_rate, float reference, +gr_make_agc2_ff (float attack_rate, float decay_rate, float reference, float gain, float max_gain) { - return gnuradio::get_initial_sptr(new gr_agc2_ff (attack_rate, decay_rate, reference, + return gnuradio::get_initial_sptr(new gr_agc2_ff (attack_rate, decay_rate, reference, gain, max_gain)); } -gr_agc2_ff::gr_agc2_ff (float attack_rate, float decay_rate, float reference, +gr_agc2_ff::gr_agc2_ff (float attack_rate, float decay_rate, float reference, float gain, float max_gain) : gr_sync_block ("gr_agc2_ff", gr_make_io_signature (1, 1, sizeof (float)), diff --git a/gnuradio-core/src/lib/general/gr_agc2_ff.h b/gnuradio-core/src/lib/general/gr_agc2_ff.h index 269d940d4..48529948c 100644 --- a/gnuradio-core/src/lib/general/gr_agc2_ff.h +++ b/gnuradio-core/src/lib/general/gr_agc2_ff.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2006 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, @@ -30,7 +30,7 @@ class gr_agc2_ff; typedef boost::shared_ptr<gr_agc2_ff> gr_agc2_ff_sptr; GR_CORE_API gr_agc2_ff_sptr -gr_make_agc2_ff (float attack_rate = 1e-1, float decay_rate = 1e-2, float reference = 1.0, +gr_make_agc2_ff (float attack_rate = 1e-1, float decay_rate = 1e-2, float reference = 1.0, float gain = 1.0, float max_gain = 0.0); /*! * \brief high performance Automatic Gain Control class diff --git a/gnuradio-core/src/lib/general/gr_agc2_ff.i b/gnuradio-core/src/lib/general/gr_agc2_ff.i index e8f9c6c99..646391aa7 100644 --- a/gnuradio-core/src/lib/general/gr_agc2_ff.i +++ b/gnuradio-core/src/lib/general/gr_agc2_ff.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2006 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, @@ -25,11 +25,11 @@ GR_SWIG_BLOCK_MAGIC(gr,agc2_ff) %include <gri_agc2_ff.i> gr_agc2_ff_sptr -gr_make_agc2_ff (float attack_rate = 1e-1, float decay_rate = 1e-2, float reference = 1.0, +gr_make_agc2_ff (float attack_rate = 1e-1, float decay_rate = 1e-2, float reference = 1.0, float gain = 1.0, float max_gain = 0.0); class gr_agc2_ff : public gr_sync_block , public gri_agc2_ff { - gr_agc2_ff (float attack_rate, float decay_rate, float reference, + gr_agc2_ff (float attack_rate, float decay_rate, float reference, float gain, float max_gain); }; diff --git a/gnuradio-core/src/lib/general/gr_agc_cc.cc b/gnuradio-core/src/lib/general/gr_agc_cc.cc index 92cec0088..e98f3a303 100644 --- a/gnuradio-core/src/lib/general/gr_agc_cc.cc +++ b/gnuradio-core/src/lib/general/gr_agc_cc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, @@ -29,17 +29,17 @@ #include <gri_agc_cc.h> gr_agc_cc_sptr -gr_make_agc_cc (float rate, float reference, +gr_make_agc_cc (float rate, float reference, float gain, float max_gain) { return gnuradio::get_initial_sptr(new gr_agc_cc (rate, reference, gain, max_gain)); } -gr_agc_cc::gr_agc_cc (float rate, float reference, +gr_agc_cc::gr_agc_cc (float rate, float reference, float gain, float max_gain) : gr_sync_block ("gr_agc_cc", gr_make_io_signature (1, 1, sizeof (gr_complex)), - gr_make_io_signature (1, 1, sizeof (gr_complex))), + gr_make_io_signature (1, 1, sizeof (gr_complex))), gri_agc_cc (rate, reference, gain, max_gain) { } diff --git a/gnuradio-core/src/lib/general/gr_agc_cc.h b/gnuradio-core/src/lib/general/gr_agc_cc.h index f348fff91..9f35350db 100644 --- a/gnuradio-core/src/lib/general/gr_agc_cc.h +++ b/gnuradio-core/src/lib/general/gr_agc_cc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -30,7 +30,7 @@ class gr_agc_cc; typedef boost::shared_ptr<gr_agc_cc> gr_agc_cc_sptr; GR_CORE_API gr_agc_cc_sptr -gr_make_agc_cc (float rate = 1e-4, float reference = 1.0, +gr_make_agc_cc (float rate = 1e-4, float reference = 1.0, float gain = 1.0, float max_gain = 0.0); /*! * \brief high performance Automatic Gain Control class @@ -41,9 +41,9 @@ gr_make_agc_cc (float rate = 1e-4, float reference = 1.0, class GR_CORE_API gr_agc_cc : public gr_sync_block, public gri_agc_cc { - friend GR_CORE_API gr_agc_cc_sptr gr_make_agc_cc (float rate, float reference, + friend GR_CORE_API gr_agc_cc_sptr gr_make_agc_cc (float rate, float reference, float gain, float max_gain); - gr_agc_cc (float rate, float reference, + gr_agc_cc (float rate, float reference, float gain, float max_gain); public: diff --git a/gnuradio-core/src/lib/general/gr_agc_cc.i b/gnuradio-core/src/lib/general/gr_agc_cc.i index 58962fa16..f942713b0 100644 --- a/gnuradio-core/src/lib/general/gr_agc_cc.i +++ b/gnuradio-core/src/lib/general/gr_agc_cc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -25,11 +25,11 @@ GR_SWIG_BLOCK_MAGIC(gr,agc_cc) %include <gri_agc_cc.i> gr_agc_cc_sptr -gr_make_agc_cc (float rate = 1e-4, float reference = 1.0, +gr_make_agc_cc (float rate = 1e-4, float reference = 1.0, float gain = 1.0, float max_gain = 0.0); class gr_agc_cc : public gr_sync_block , public gri_agc_cc { - gr_agc_cc (float rate, float reference, + gr_agc_cc (float rate, float reference, float gain, float max_gain); }; diff --git a/gnuradio-core/src/lib/general/gr_agc_ff.cc b/gnuradio-core/src/lib/general/gr_agc_ff.cc index 45c86d898..6050dc7f0 100644 --- a/gnuradio-core/src/lib/general/gr_agc_ff.cc +++ b/gnuradio-core/src/lib/general/gr_agc_ff.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2006,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_agc_ff.h b/gnuradio-core/src/lib/general/gr_agc_ff.h index 94db9eef5..dc618213b 100644 --- a/gnuradio-core/src/lib/general/gr_agc_ff.h +++ b/gnuradio-core/src/lib/general/gr_agc_ff.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2006 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, @@ -30,7 +30,7 @@ class gr_agc_ff; typedef boost::shared_ptr<gr_agc_ff> gr_agc_ff_sptr; GR_CORE_API gr_agc_ff_sptr -gr_make_agc_ff (float rate = 1e-4, float reference = 1.0, +gr_make_agc_ff (float rate = 1e-4, float reference = 1.0, float gain = 1.0, float max_gain = 0.0); /*! @@ -42,7 +42,7 @@ gr_make_agc_ff (float rate = 1e-4, float reference = 1.0, class GR_CORE_API gr_agc_ff : public gr_sync_block, public gri_agc_ff { - friend GR_CORE_API gr_agc_ff_sptr gr_make_agc_ff (float rate, float reference, + friend GR_CORE_API gr_agc_ff_sptr gr_make_agc_ff (float rate, float reference, float gain, float max_gain); gr_agc_ff (float rate, float reference, float gain, float max_gain); diff --git a/gnuradio-core/src/lib/general/gr_agc_ff.i b/gnuradio-core/src/lib/general/gr_agc_ff.i index ea456a131..03c571e1a 100644 --- a/gnuradio-core/src/lib/general/gr_agc_ff.i +++ b/gnuradio-core/src/lib/general/gr_agc_ff.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2006 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, @@ -25,7 +25,7 @@ GR_SWIG_BLOCK_MAGIC(gr,agc_ff) %include <gri_agc_ff.i> gr_agc_ff_sptr -gr_make_agc_ff (float rate = 1e-4, float reference = 1.0, +gr_make_agc_ff (float rate = 1e-4, float reference = 1.0, float gain = 1.0, float max_gain = 0.0); class gr_agc_ff : public gr_sync_block , public gri_agc_ff diff --git a/gnuradio-core/src/lib/general/gr_align_on_samplenumbers_ss.cc b/gnuradio-core/src/lib/general/gr_align_on_samplenumbers_ss.cc index e11793fdd..472853396 100644 --- a/gnuradio-core/src/lib/general/gr_align_on_samplenumbers_ss.cc +++ b/gnuradio-core/src/lib/general/gr_align_on_samplenumbers_ss.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 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, @@ -65,12 +65,12 @@ gr_align_on_samplenumbers_ss::gr_align_on_samplenumbers_ss (int nchan,int align_ { set_output_multiple (d_align_interval*d_nchan*2); } - + } gr_align_on_samplenumbers_ss::~gr_align_on_samplenumbers_ss() { - + } void gr_align_on_samplenumbers_ss::forecast (int noutput_items, gr_vector_int &ninput_items_required) @@ -126,7 +126,7 @@ gr_align_on_samplenumbers_ss::general_work (int noutput_items, { dcount=0; dprint=true; - } + } #endif const size_t item_size = output_signature()->sizeof_stream_item (0); const unsigned ninputs = input_items.size(); @@ -144,7 +144,7 @@ gr_align_on_samplenumbers_ss::general_work (int noutput_items, int min_ninput_items=noutput_items;//numeric_limits<int>::max(); int noutput_items_produced=0; for(unsigned int i=0;i<ninputs;i++) - { + { d_state[i].ninput_items=ninput_items[i]; d_state[i].ninput_items_used=0; min_ninput_items=std::min(ninput_items[i],min_ninput_items); @@ -160,7 +160,7 @@ gr_align_on_samplenumbers_ss::general_work (int noutput_items, common_end=common_end*(d_nchan*2); } if (common_end<=0) break; - + bool all_diffs_zero=true; //bool sync_found=false; int diff_comp_end_max=0; @@ -210,7 +210,7 @@ gr_align_on_samplenumbers_ss::general_work (int noutput_items, d_state[i].sync_end_found=false; } d_in_presync=true; - d_state[i].sync_found=true; + d_state[i].sync_found=true; } else { //d_in_presync=true; @@ -220,9 +220,9 @@ gr_align_on_samplenumbers_ss::general_work (int noutput_items, else printf("presync NEXT with %i\n",i); #endif - d_state[i].sync_found=true; - d_state[i].sync_end_found=false; - } + d_state[i].sync_found=true; + d_state[i].sync_end_found=false; + } } else { if(d_in_presync && d_state[i].sync_found) @@ -314,11 +314,11 @@ gr_align_on_samplenumbers_ss::general_work (int noutput_items, { dcount=0; dprint=true; - } + } #endif const size_t item_size = output_signature()->sizeof_stream_item (0); const unsigned ninputs = input_items.size(); - + int common_end=noutput_items; //int diff_min=INT_MAX; //int diff_max=INT_MIN; @@ -344,7 +344,7 @@ gr_align_on_samplenumbers_ss::general_work (int noutput_items, ePrintf("Error: counter not continuous.\n ucounter_begin[%i]=%i +1 != ucounter_begin2=%i\n",i,d_state[i].ucounter_begin,ucounter_begin2); } } - + //diff_comp[i]=ucounter[i]-ucounter[0]; //diff_min=std::min(diff[i],diff_min); //diff_max=std::max(diff[i],diff_max); @@ -390,7 +390,7 @@ gr_align_on_samplenumbers_ss::general_work (int noutput_items, tcPrintf("SYNC diff_end[%i]=%i ucounter_end[%i]=%i ucounter_begin[%i]=%i \n",i,d_state[i].diff_end,i,d_state[i].ucounter_end,i,d_state[i].ucounter_begin); tcPrintf("ucounter_end=%i < %i = ucounter_begin+(unsigned)(common_last/(d_nchan*2) \n",d_state[i].ucounter_end,d_state[i].ucounter_begin+(unsigned)(common_last/(d_nchan*2))); - printf("ucounter_end[%i]=%i ucounter_begin[%i]=%i\n",i,d_state[i].ucounter_end,i,d_state[i].ucounter_begin); + printf("ucounter_end[%i]=%i ucounter_begin[%i]=%i\n",i,d_state[i].ucounter_end,i,d_state[i].ucounter_begin); int expected_sync_position=common_last - d_state[i].ucounter_end*(d_nchan*2); if(0==uin[expected_sync_position] && 0==uin[expected_sync_position+1]) { @@ -404,7 +404,7 @@ gr_align_on_samplenumbers_ss::general_work (int noutput_items, } else { tcPrintf("NOsync diff_end[%i]=%i ucounter_end[%i]=%i ucounter_begin[%i]=%i \n",i,d_state[i].diff_end,i,d_state[i].ucounter_end,i,d_state[i].ucounter_begin); -#endif +#endif } } bool problem=false; @@ -416,7 +416,7 @@ gr_align_on_samplenumbers_ss::general_work (int noutput_items, ePrintf(" You might want to swap master and slave.\n"); ePrintf(" i=%i,d_state[i].diff_end+diff_comp_end_max=%i,d_state[i].diff_end=%i,diff_comp_end_max=%i,ucounter[i]=%i,ucounter[0]=%i\n", i,d_state[i].diff_end+diff_comp_end_max,d_state[i].diff_end,diff_comp_end_max,d_state[i].ucounter_end,d_state[0].ucounter_end); - //ePrintf(" toconsume=%i\n",toconsume); + //ePrintf(" toconsume=%i\n",toconsume); } if(sync_found || all_diffs_zero || problem) { @@ -437,7 +437,7 @@ gr_align_on_samplenumbers_ss::general_work (int noutput_items, } else { //int minconsume=0;//common_end/(2*d_nchan*2); - //min_consume=min_consume*d_nchan*2; + //min_consume=min_consume*d_nchan*2; for(unsigned int i=0;i<ninputs;i++) { int toconsume=std::min((d_state[i].diff_end+diff_comp_end_max)*d_nchan*2,ninput_items[i]); diff --git a/gnuradio-core/src/lib/general/gr_align_on_samplenumbers_ss.h b/gnuradio-core/src/lib/general/gr_align_on_samplenumbers_ss.h index 61f70ee96..1b71a3f4b 100644 --- a/gnuradio-core/src/lib/general/gr_align_on_samplenumbers_ss.h +++ b/gnuradio-core/src/lib/general/gr_align_on_samplenumbers_ss.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -40,7 +40,7 @@ * \ingroup block * Pay attention on how you connect this block. * It expects a minimum of 2 usrp_source_s with nchan number of channels and FPGA_MODE_COUNTING_32BIT enabled. - * This means that the first complex_short channel on every input is an interleaved 32 bit counter. + * This means that the first complex_short channel on every input is an interleaved 32 bit counter. * The samples are aligned by dropping samples untill the samplenumbers match. */ class gr_align_on_samplenumbers_ss; @@ -72,7 +72,7 @@ class GR_CORE_API gr_align_on_samplenumbers_ss : public gr_block int ninput_items_used; }; std::vector<align_state> d_state; - + friend GR_CORE_API gr_align_on_samplenumbers_ss_sptr gr_make_align_on_samplenumbers_ss (int nchan,int align_interval); gr_align_on_samplenumbers_ss (int nchan,int align_interval); diff --git a/gnuradio-core/src/lib/general/gr_align_on_samplenumbers_ss.i b/gnuradio-core/src/lib/general/gr_align_on_samplenumbers_ss.i index ea73dd46d..471f74301 100644 --- a/gnuradio-core/src/lib/general/gr_align_on_samplenumbers_ss.i +++ b/gnuradio-core/src/lib/general/gr_align_on_samplenumbers_ss.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gr_annotator_1to1.cc b/gnuradio-core/src/lib/general/gr_annotator_1to1.cc index d12bfbf04..963af9202 100644 --- a/gnuradio-core/src/lib/general/gr_annotator_1to1.cc +++ b/gnuradio-core/src/lib/general/gr_annotator_1to1.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, diff --git a/gnuradio-core/src/lib/general/gr_annotator_1to1.h b/gnuradio-core/src/lib/general/gr_annotator_1to1.h index a62720224..57e572014 100644 --- a/gnuradio-core/src/lib/general/gr_annotator_1to1.h +++ b/gnuradio-core/src/lib/general/gr_annotator_1to1.h @@ -30,7 +30,7 @@ class gr_annotator_1to1; typedef boost::shared_ptr<gr_annotator_1to1> gr_annotator_1to1_sptr; // public constructor -GR_CORE_API gr_annotator_1to1_sptr +GR_CORE_API gr_annotator_1to1_sptr gr_make_annotator_1to1 (int when, size_t sizeof_stream_item); /*! diff --git a/gnuradio-core/src/lib/general/gr_annotator_1to1.i b/gnuradio-core/src/lib/general/gr_annotator_1to1.i index 2c8149a3c..2637b8d27 100644 --- a/gnuradio-core/src/lib/general/gr_annotator_1to1.i +++ b/gnuradio-core/src/lib/general/gr_annotator_1to1.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_annotator_alltoall.cc b/gnuradio-core/src/lib/general/gr_annotator_alltoall.cc index dd31bff78..01bdd3064 100644 --- a/gnuradio-core/src/lib/general/gr_annotator_alltoall.cc +++ b/gnuradio-core/src/lib/general/gr_annotator_alltoall.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -103,7 +103,7 @@ gr_annotator_alltoall::work (int noutput_items, out[j] += in[j]; } } - abs_N++; + abs_N++; } return noutput_items; diff --git a/gnuradio-core/src/lib/general/gr_annotator_alltoall.h b/gnuradio-core/src/lib/general/gr_annotator_alltoall.h index fe8b736c2..deb5874a4 100644 --- a/gnuradio-core/src/lib/general/gr_annotator_alltoall.h +++ b/gnuradio-core/src/lib/general/gr_annotator_alltoall.h @@ -30,7 +30,7 @@ class gr_annotator_alltoall; typedef boost::shared_ptr<gr_annotator_alltoall> gr_annotator_alltoall_sptr; // public constructor -GR_CORE_API gr_annotator_alltoall_sptr +GR_CORE_API gr_annotator_alltoall_sptr gr_make_annotator_alltoall (int when, size_t sizeof_stream_item); /*! @@ -54,7 +54,7 @@ class GR_CORE_API gr_annotator_alltoall : public gr_sync_block int work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); - + std::vector<gr_tag_t> data() const { return d_stored_tags; diff --git a/gnuradio-core/src/lib/general/gr_annotator_alltoall.i b/gnuradio-core/src/lib/general/gr_annotator_alltoall.i index 49bd1e446..35190a3d1 100644 --- a/gnuradio-core/src/lib/general/gr_annotator_alltoall.i +++ b/gnuradio-core/src/lib/general/gr_annotator_alltoall.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_bin_statistics_f.cc b/gnuradio-core/src/lib/general/gr_bin_statistics_f.cc index 435a660cd..3938f2b48 100644 --- a/gnuradio-core/src/lib/general/gr_bin_statistics_f.cc +++ b/gnuradio-core/src/lib/general/gr_bin_statistics_f.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, @@ -118,7 +118,7 @@ gr_bin_statistics_f::work(int noutput_items, if (d_delay == 0) enter_dwell_delay(); break; - + case ST_DWELL_DELAY: t = std::min(noutput_items - n, int(d_delay)); for (int i = 0; i < t; i++){ diff --git a/gnuradio-core/src/lib/general/gr_bin_statistics_f.h b/gnuradio-core/src/lib/general/gr_bin_statistics_f.h index f7eea7d5f..dd1075909 100644 --- a/gnuradio-core/src/lib/general/gr_bin_statistics_f.h +++ b/gnuradio-core/src/lib/general/gr_bin_statistics_f.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -40,7 +40,7 @@ gr_make_bin_statistics_f(unsigned int vlen, // vector length gr_feval_dd *tune, // callback size_t tune_delay, // samples size_t dwell_delay); // samples - + /*! * \brief control scanning and record frequency domain statistics * \ingroup sink_blk @@ -94,7 +94,7 @@ public: int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); - + }; #endif diff --git a/gnuradio-core/src/lib/general/gr_bin_statistics_f.i b/gnuradio-core/src/lib/general/gr_bin_statistics_f.i index be98a464b..94a3db69a 100644 --- a/gnuradio-core/src/lib/general/gr_bin_statistics_f.i +++ b/gnuradio-core/src/lib/general/gr_bin_statistics_f.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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. diff --git a/gnuradio-core/src/lib/general/gr_burst_tagger.cc b/gnuradio-core/src/lib/general/gr_burst_tagger.cc index bd713d663..83e84bfa0 100644 --- a/gnuradio-core/src/lib/general/gr_burst_tagger.cc +++ b/gnuradio-core/src/lib/general/gr_burst_tagger.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -45,10 +45,10 @@ gr_burst_tagger::gr_burst_tagger(size_t itemsize) d_true_key = pmt::pmt_string_to_symbol("burst"); d_true_value = pmt::PMT_T; - + d_false_key = pmt::pmt_string_to_symbol("burst"); d_false_value = pmt::PMT_F; - + d_id = pmt::pmt_string_to_symbol(str.str()); } diff --git a/gnuradio-core/src/lib/general/gr_burst_tagger.h b/gnuradio-core/src/lib/general/gr_burst_tagger.h index 663a146f2..9a7898b04 100644 --- a/gnuradio-core/src/lib/general/gr_burst_tagger.h +++ b/gnuradio-core/src/lib/general/gr_burst_tagger.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -42,12 +42,12 @@ class GR_CORE_API gr_burst_tagger : public gr_sync_block bool d_state; pmt::pmt_t d_true_key; pmt::pmt_t d_true_value; - + pmt::pmt_t d_false_key; pmt::pmt_t d_false_value; - + pmt::pmt_t d_id; - + friend GR_CORE_API gr_burst_tagger_sptr gr_make_burst_tagger(size_t itemsize); gr_burst_tagger(size_t itemsize); diff --git a/gnuradio-core/src/lib/general/gr_burst_tagger.i b/gnuradio-core/src/lib/general/gr_burst_tagger.i index 868941fc6..a5511e48a 100644 --- a/gnuradio-core/src/lib/general/gr_burst_tagger.i +++ b/gnuradio-core/src/lib/general/gr_burst_tagger.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -28,7 +28,7 @@ class gr_burst_tagger : public gr_sync_block { private: gr_burst_tagger(size_t itemsize); - + public: void set_true_tag(const std::string &key, bool value); void set_false_tag(const std::string &key, bool value); diff --git a/gnuradio-core/src/lib/general/gr_bytes_to_syms.cc b/gnuradio-core/src/lib/general/gr_bytes_to_syms.cc index 460444379..7dafa29f9 100644 --- a/gnuradio-core/src/lib/general/gr_bytes_to_syms.cc +++ b/gnuradio-core/src/lib/general/gr_bytes_to_syms.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -30,7 +30,7 @@ static const int BITS_PER_BYTE = 8; -gr_bytes_to_syms_sptr +gr_bytes_to_syms_sptr gr_make_bytes_to_syms () { return gnuradio::get_initial_sptr(new gr_bytes_to_syms ()); @@ -71,4 +71,4 @@ gr_bytes_to_syms::work (int noutput_items, } - + diff --git a/gnuradio-core/src/lib/general/gr_bytes_to_syms.h b/gnuradio-core/src/lib/general/gr_bytes_to_syms.h index 33b98d4fd..23e5c6b91 100644 --- a/gnuradio-core/src/lib/general/gr_bytes_to_syms.h +++ b/gnuradio-core/src/lib/general/gr_bytes_to_syms.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_bytes_to_syms.i b/gnuradio-core/src/lib/general/gr_bytes_to_syms.i index 4226acd2a..185e7cd29 100644 --- a/gnuradio-core/src/lib/general/gr_bytes_to_syms.i +++ b/gnuradio-core/src/lib/general/gr_bytes_to_syms.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_char_to_float.cc b/gnuradio-core/src/lib/general/gr_char_to_float.cc index ffe8ee4a1..aec7ad852 100644 --- a/gnuradio-core/src/lib/general/gr_char_to_float.cc +++ b/gnuradio-core/src/lib/general/gr_char_to_float.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 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, @@ -38,14 +38,14 @@ gr_char_to_float::gr_char_to_float (size_t vlen, float scale) : gr_sync_block ("gr_char_to_float", gr_make_io_signature (1, 1, sizeof (char)*vlen), gr_make_io_signature (1, 1, sizeof (float)*vlen)), - d_vlen(vlen), d_scale(scale) + d_vlen(vlen), d_scale(scale) { const int alignment_multiple = volk_get_alignment() / sizeof(float); set_alignment(alignment_multiple); } -float +float gr_char_to_float::scale() const { return d_scale; diff --git a/gnuradio-core/src/lib/general/gr_char_to_float.h b/gnuradio-core/src/lib/general/gr_char_to_float.h index 1ab53a087..5170c618c 100644 --- a/gnuradio-core/src/lib/general/gr_char_to_float.h +++ b/gnuradio-core/src/lib/general/gr_char_to_float.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gr_char_to_float.i b/gnuradio-core/src/lib/general/gr_char_to_float.i index 65ad861f2..c0b3d75fe 100644 --- a/gnuradio-core/src/lib/general/gr_char_to_float.i +++ b/gnuradio-core/src/lib/general/gr_char_to_float.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gr_char_to_short.cc b/gnuradio-core/src/lib/general/gr_char_to_short.cc index 8b6cd0be1..c20d6cd88 100644 --- a/gnuradio-core/src/lib/general/gr_char_to_short.cc +++ b/gnuradio-core/src/lib/general/gr_char_to_short.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_char_to_short.h b/gnuradio-core/src/lib/general/gr_char_to_short.h index e93c15b12..7ac5e97b9 100644 --- a/gnuradio-core/src/lib/general/gr_char_to_short.h +++ b/gnuradio-core/src/lib/general/gr_char_to_short.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -47,7 +47,7 @@ class GR_CORE_API gr_char_to_short : public gr_sync_block gr_char_to_short (size_t vlen); size_t d_vlen; - + public: virtual int work (int noutput_items, gr_vector_const_void_star &input_items, diff --git a/gnuradio-core/src/lib/general/gr_char_to_short.i b/gnuradio-core/src/lib/general/gr_char_to_short.i index 48ddbf26b..a53a0990e 100644 --- a/gnuradio-core/src/lib/general/gr_char_to_short.i +++ b/gnuradio-core/src/lib/general/gr_char_to_short.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_check_counting_s.cc b/gnuradio-core/src/lib/general/gr_check_counting_s.cc index bce308814..c3288f481 100644 --- a/gnuradio-core/src/lib/general/gr_check_counting_s.cc +++ b/gnuradio-core/src/lib/general/gr_check_counting_s.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -64,7 +64,7 @@ gr_check_counting_s::check_16bit (int noutput_items, { for (int i = 0; i < noutput_items; i++){ unsigned short x = in[i]; - + switch (d_state){ case SEARCHING: @@ -115,7 +115,7 @@ gr_check_counting_s::check_32bit (int noutput_items, unsigned int x_high16bits = in[i]; unsigned int x_low16bits = in[i+1]; unsigned int x = x_high16bits<<16 | x_low16bits; - + switch (d_state){ case SEARCHING: @@ -176,7 +176,7 @@ gr_check_counting_s::enter_LOCKED () void gr_check_counting_s::log_error (unsigned short expected, unsigned short actual) { - fprintf (stdout, + fprintf (stdout, "gr_check_counting: expected %5d (0x%04x) got %5d (0x%04x) offset %8ld (0x%08lx)\n", expected, expected, actual, actual, d_total_shorts, d_total_shorts); } @@ -184,7 +184,7 @@ gr_check_counting_s::log_error (unsigned short expected, unsigned short actual) void gr_check_counting_s::log_error_32bit (unsigned int expected, unsigned int actual) { - fprintf (stdout, + fprintf (stdout, "gr_check_counting: expected %10d (0x%08x) got %10d (0x%08x) offset %8ld (0x%08lx)\n", expected, expected, actual, actual, d_total_shorts, d_total_shorts); } diff --git a/gnuradio-core/src/lib/general/gr_check_counting_s.h b/gnuradio-core/src/lib/general/gr_check_counting_s.h index cd4dcb24e..996fa3259 100644 --- a/gnuradio-core/src/lib/general/gr_check_counting_s.h +++ b/gnuradio-core/src/lib/general/gr_check_counting_s.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -50,20 +50,20 @@ class GR_CORE_API gr_check_counting_s : public gr_sync_block unsigned int d_history; // bitmask of decisions unsigned short d_current_count; unsigned int d_current_count_32bit; - + long d_total_errors; long d_total_shorts; bool d_do_32bit; gr_check_counting_s (bool do_32bit); - + void enter_SEARCHING (); void enter_LOCKED (); void right (){ d_history = (d_history << 1) | 0x1; } - + void wrong (){ d_history = (d_history << 1) | 0x0; d_total_errors++; @@ -74,7 +74,7 @@ class GR_CORE_API gr_check_counting_s : public gr_sync_block void log_error (unsigned short expected, unsigned short actual); void log_error_32bit (unsigned int expected, unsigned int actual); - + int check_32bit (int noutput_items, unsigned short * in); int check_16bit (int noutput_items, unsigned short * in); diff --git a/gnuradio-core/src/lib/general/gr_check_counting_s.i b/gnuradio-core/src/lib/general/gr_check_counting_s.i index 95ecf1c48..0275dad9d 100644 --- a/gnuradio-core/src/lib/general/gr_check_counting_s.i +++ b/gnuradio-core/src/lib/general/gr_check_counting_s.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_check_lfsr_32k_s.cc b/gnuradio-core/src/lib/general/gr_check_lfsr_32k_s.cc index 95c6c7da5..088b8c38a 100644 --- a/gnuradio-core/src/lib/general/gr_check_lfsr_32k_s.cc +++ b/gnuradio-core/src/lib/general/gr_check_lfsr_32k_s.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -43,7 +43,7 @@ gr_check_lfsr_32k_s::gr_check_lfsr_32k_s () d_runlength (0), d_index(0) { gri_lfsr_32k lfsr; - + for (int i = 0; i < BUFSIZE; i++) d_buffer[i] = lfsr.next_short (); @@ -60,21 +60,21 @@ gr_check_lfsr_32k_s::work (int noutput_items, for (int i = 0; i < noutput_items; i++){ unsigned short x = in[i]; unsigned short expected; - + switch (d_state){ case MATCH0: if (x == d_buffer[0]) enter_MATCH1 (); break; - + case MATCH1: if (x == d_buffer[1]) enter_MATCH2 (); else enter_MATCH0 (); break; - + case MATCH2: if (x == d_buffer[2]) enter_LOCKED (); @@ -163,7 +163,7 @@ void gr_check_lfsr_32k_s::log_error (unsigned short expected, unsigned short actual) { if (0) - fprintf (stdout, + fprintf (stdout, "gr_check_lfsr_32k: expected %5d (0x%04x) got %5d (0x%04x) offset %8ld (0x%08lx)\n", expected, expected, actual, actual, d_ntotal, d_ntotal); } diff --git a/gnuradio-core/src/lib/general/gr_check_lfsr_32k_s.h b/gnuradio-core/src/lib/general/gr_check_lfsr_32k_s.h index 939675db8..2f980b427 100644 --- a/gnuradio-core/src/lib/general/gr_check_lfsr_32k_s.h +++ b/gnuradio-core/src/lib/general/gr_check_lfsr_32k_s.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -53,7 +53,7 @@ class GR_CORE_API gr_check_lfsr_32k_s : public gr_sync_block state d_state; unsigned int d_history; // bitmask of decisions - + long d_ntotal; // total number of shorts long d_nright; // # of correct shorts long d_runlength; // # of correct shorts in a row @@ -64,7 +64,7 @@ class GR_CORE_API gr_check_lfsr_32k_s : public gr_sync_block gr_check_lfsr_32k_s (); - + void enter_SEARCHING (); void enter_MATCH0 (); void enter_MATCH1 (); @@ -76,7 +76,7 @@ class GR_CORE_API gr_check_lfsr_32k_s : public gr_sync_block d_nright++; d_runlength++; } - + void wrong (){ d_history = (d_history << 1) | 0x0; d_runlength = 0; diff --git a/gnuradio-core/src/lib/general/gr_check_lfsr_32k_s.i b/gnuradio-core/src/lib/general/gr_check_lfsr_32k_s.i index 84c02e22c..34d4a0b0c 100644 --- a/gnuradio-core/src/lib/general/gr_check_lfsr_32k_s.i +++ b/gnuradio-core/src/lib/general/gr_check_lfsr_32k_s.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_circular_file.cc b/gnuradio-core/src/lib/general/gr_circular_file.cc index 4d88b9d99..6f710c49b 100644 --- a/gnuradio-core/src/lib/general/gr_circular_file.cc +++ b/gnuradio-core/src/lib/general/gr_circular_file.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2010 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, @@ -157,15 +157,15 @@ gr_circular_file::write (void *vdata, int nbytes) unsigned char *data = (unsigned char *) vdata; int buffer_size = d_header[HD_BUFFER_SIZE]; int buffer_current = d_header[HD_BUFFER_CURRENT]; - + while (nbytes > 0){ int n = std::min (nbytes, buffer_size - buffer_current); memcpy (d_buffer + buffer_current, data, n); - + buffer_current += n; if (buffer_current >= buffer_size) buffer_current = 0; - + data += n; nbytes -= n; } @@ -181,7 +181,7 @@ gr_circular_file::read (void *vdata, int nbytes) int buffer_current = d_header[HD_BUFFER_CURRENT]; int buffer_size = d_header[HD_BUFFER_SIZE]; int total = 0; - + nbytes = std::min (nbytes, buffer_size - d_bytes_read); while (nbytes > 0){ diff --git a/gnuradio-core/src/lib/general/gr_circular_file.h b/gnuradio-core/src/lib/general/gr_circular_file.h index 3d3f33a8d..ca1f793f3 100644 --- a/gnuradio-core/src/lib/general/gr_circular_file.h +++ b/gnuradio-core/src/lib/general/gr_circular_file.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -33,7 +33,7 @@ * 0x0004: int32 size in bytes of header (constant 4096) * 0x0008: int32 size in bytes of circular buffer (not including header) * 0x000C: int32 file offset to beginning of circular buffer - * 0x0010: int32 byte offset from beginning of circular buffer to + * 0x0010: int32 byte offset from beginning of circular buffer to * current start of data * */ diff --git a/gnuradio-core/src/lib/general/gr_complex_to_interleaved_short.cc b/gnuradio-core/src/lib/general/gr_complex_to_interleaved_short.cc index d198da0b0..596c14996 100644 --- a/gnuradio-core/src/lib/general/gr_complex_to_interleaved_short.cc +++ b/gnuradio-core/src/lib/general/gr_complex_to_interleaved_short.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2005,2010 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, @@ -54,7 +54,7 @@ gr_complex_to_interleaved_short::work (int noutput_items, *out++ = (short) lrintf(in[i].real()); // FIXME saturate? *out++ = (short) lrintf(in[i].imag()); } - + return noutput_items; } diff --git a/gnuradio-core/src/lib/general/gr_complex_to_interleaved_short.h b/gnuradio-core/src/lib/general/gr_complex_to_interleaved_short.h index a3e2d38ad..66503413f 100644 --- a/gnuradio-core/src/lib/general/gr_complex_to_interleaved_short.h +++ b/gnuradio-core/src/lib/general/gr_complex_to_interleaved_short.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_complex_to_interleaved_short.i b/gnuradio-core/src/lib/general/gr_complex_to_interleaved_short.i index d579c1ecb..19c01b7c6 100644 --- a/gnuradio-core/src/lib/general/gr_complex_to_interleaved_short.i +++ b/gnuradio-core/src/lib/general/gr_complex_to_interleaved_short.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_complex_to_xxx.cc b/gnuradio-core/src/lib/general/gr_complex_to_xxx.cc index 108a92835..3b1fbf9ac 100644 --- a/gnuradio-core/src/lib/general/gr_complex_to_xxx.cc +++ b/gnuradio-core/src/lib/general/gr_complex_to_xxx.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2008,2010,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -126,7 +126,7 @@ gr_complex_to_real::work (int noutput_items, else { volk_32fc_deinterleave_real_32f_a(out, in, noi); } - + return noutput_items; } diff --git a/gnuradio-core/src/lib/general/gr_complex_to_xxx.h b/gnuradio-core/src/lib/general/gr_complex_to_xxx.h index 232071323..a2f06ea28 100644 --- a/gnuradio-core/src/lib/general/gr_complex_to_xxx.h +++ b/gnuradio-core/src/lib/general/gr_complex_to_xxx.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -140,7 +140,7 @@ class GR_CORE_API gr_complex_to_mag_squared : public gr_sync_block }; /*! - * \brief complex in, angle out (float) + * \brief complex in, angle out (float) * \ingroup converter_blk * \param vlen vector len (default 1) */ diff --git a/gnuradio-core/src/lib/general/gr_complex_to_xxx.i b/gnuradio-core/src/lib/general/gr_complex_to_xxx.i index 30f1cd20b..372b0e8b5 100644 --- a/gnuradio-core/src/lib/general/gr_complex_to_xxx.i +++ b/gnuradio-core/src/lib/general/gr_complex_to_xxx.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_conjugate_cc.cc b/gnuradio-core/src/lib/general/gr_conjugate_cc.cc index d2b20ffe6..aaa7f490c 100644 --- a/gnuradio-core/src/lib/general/gr_conjugate_cc.cc +++ b/gnuradio-core/src/lib/general/gr_conjugate_cc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -41,7 +41,7 @@ gr_conjugate_cc::gr_conjugate_cc () gr_make_io_signature (1, 1, sizeof (gr_complex)), gr_make_io_signature (1, 1, sizeof (gr_complex))) { - const int alignment_multiple = + const int alignment_multiple = volk_get_alignment() / sizeof(gr_complex); set_alignment(alignment_multiple); } diff --git a/gnuradio-core/src/lib/general/gr_conjugate_cc.h b/gnuradio-core/src/lib/general/gr_conjugate_cc.h index 16e76e153..e0a2af716 100644 --- a/gnuradio-core/src/lib/general/gr_conjugate_cc.h +++ b/gnuradio-core/src/lib/general/gr_conjugate_cc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_conjugate_cc.i b/gnuradio-core/src/lib/general/gr_conjugate_cc.i index bafb4ca9e..444ebb1b8 100644 --- a/gnuradio-core/src/lib/general/gr_conjugate_cc.i +++ b/gnuradio-core/src/lib/general/gr_conjugate_cc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_constants.cc.in b/gnuradio-core/src/lib/general/gr_constants.cc.in index 71a47eb51..b94f254d6 100644 --- a/gnuradio-core/src/lib/general/gr_constants.cc.in +++ b/gnuradio-core/src/lib/general/gr_constants.cc.in @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,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, diff --git a/gnuradio-core/src/lib/general/gr_constants.h b/gnuradio-core/src/lib/general/gr_constants.h index 3d21fe1d6..00ed9463d 100644 --- a/gnuradio-core/src/lib/general/gr_constants.h +++ b/gnuradio-core/src/lib/general/gr_constants.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,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, diff --git a/gnuradio-core/src/lib/general/gr_copy.cc b/gnuradio-core/src/lib/general/gr_copy.cc index c6564c231..0a6f721f9 100644 --- a/gnuradio-core/src/lib/general/gr_copy.cc +++ b/gnuradio-core/src/lib/general/gr_copy.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,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, diff --git a/gnuradio-core/src/lib/general/gr_copy.h b/gnuradio-core/src/lib/general/gr_copy.h index 7fb13bf68..b0769fa2b 100644 --- a/gnuradio-core/src/lib/general/gr_copy.h +++ b/gnuradio-core/src/lib/general/gr_copy.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,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, diff --git a/gnuradio-core/src/lib/general/gr_copy.i b/gnuradio-core/src/lib/general/gr_copy.i index e260d8e84..12ddce6aa 100644 --- a/gnuradio-core/src/lib/general/gr_copy.i +++ b/gnuradio-core/src/lib/general/gr_copy.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,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, diff --git a/gnuradio-core/src/lib/general/gr_correlate_access_code_tag_bb.cc b/gnuradio-core/src/lib/general/gr_correlate_access_code_tag_bb.cc index 841675ec8..73ded3c8b 100644 --- a/gnuradio-core/src/lib/general/gr_correlate_access_code_tag_bb.cc +++ b/gnuradio-core/src/lib/general/gr_correlate_access_code_tag_bb.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -99,7 +99,7 @@ gr_correlate_access_code_tag_bb::work (int noutput_items, for (int i = 0; i < noutput_items; i++){ out[i] = in[i]; - + // compute hamming distance between desired access code and current data unsigned long long wrong_bits = 0; unsigned int nwrong = d_threshold+1; @@ -126,4 +126,4 @@ gr_correlate_access_code_tag_bb::work (int noutput_items, return noutput_items; } - + diff --git a/gnuradio-core/src/lib/general/gr_correlate_access_code_tag_bb.h b/gnuradio-core/src/lib/general/gr_correlate_access_code_tag_bb.h index e543f5cfb..345d3004a 100644 --- a/gnuradio-core/src/lib/general/gr_correlate_access_code_tag_bb.h +++ b/gnuradio-core/src/lib/general/gr_correlate_access_code_tag_bb.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2006,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -35,7 +35,7 @@ typedef boost::shared_ptr<gr_correlate_access_code_tag_bb> gr_correlate_access_c * \param threshold maximum number of bits that may be wrong * \param tag_name key of the tag inserted into the tag stream */ -GR_CORE_API gr_correlate_access_code_tag_bb_sptr +GR_CORE_API gr_correlate_access_code_tag_bb_sptr gr_make_correlate_access_code_tag_bb (const std::string &access_code, int threshold, const std::string &tag_name); @@ -52,7 +52,7 @@ gr_make_correlate_access_code_tag_bb (const std::string &access_code, int thresh */ class GR_CORE_API gr_correlate_access_code_tag_bb : public gr_sync_block { - friend GR_CORE_API gr_correlate_access_code_tag_bb_sptr + friend GR_CORE_API gr_correlate_access_code_tag_bb_sptr gr_make_correlate_access_code_tag_bb (const std::string &access_code, int threshold, const std::string &tag_name); private: @@ -77,7 +77,7 @@ class GR_CORE_API gr_correlate_access_code_tag_bb : public gr_sync_block gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); - + /*! * \param access_code is represented with 1 byte per bit, e.g., "010101010111000100" */ diff --git a/gnuradio-core/src/lib/general/gr_correlate_access_code_tag_bb.i b/gnuradio-core/src/lib/general/gr_correlate_access_code_tag_bb.i index fb832194d..f7ca4bea7 100644 --- a/gnuradio-core/src/lib/general/gr_correlate_access_code_tag_bb.i +++ b/gnuradio-core/src/lib/general/gr_correlate_access_code_tag_bb.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -26,8 +26,8 @@ GR_SWIG_BLOCK_MAGIC(gr,correlate_access_code_tag_bb); * \param access_code is represented with 1 byte per bit, e.g., "010101010111000100" * \param threshold maximum number of bits that may be wrong */ -gr_correlate_access_code_tag_bb_sptr -gr_make_correlate_access_code_tag_bb (const std::string &access_code, int threshold, const std::string &tag_name) +gr_correlate_access_code_tag_bb_sptr +gr_make_correlate_access_code_tag_bb (const std::string &access_code, int threshold, const std::string &tag_name) throw(std::out_of_range); /*! @@ -45,7 +45,7 @@ gr_make_correlate_access_code_tag_bb (const std::string &access_code, int thresh */ class gr_correlate_access_code_tag_bb : public gr_sync_block { - friend gr_correlate_access_code_tag_bb_sptr + friend gr_correlate_access_code_tag_bb_sptr gr_make_correlate_access_code_tag_bb (const std::string &access_code, int threshold, const std::string &tag_name); protected: gr_correlate_access_code_tag_bb(const std::string &access_code, int threshold, const std::string &tag_name); diff --git a/gnuradio-core/src/lib/general/gr_count_bits.cc b/gnuradio-core/src/lib/general/gr_count_bits.cc index 0e8060c76..4776fe61a 100644 --- a/gnuradio-core/src/lib/general/gr_count_bits.cc +++ b/gnuradio-core/src/lib/general/gr_count_bits.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003 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, @@ -27,7 +27,7 @@ */ // return number of set bits in the low 8 bits of x -unsigned int +unsigned int gr_count_bits8 (unsigned int x) { int count = 0; @@ -40,7 +40,7 @@ gr_count_bits8 (unsigned int x) } // return number of set bits in the low 16 bits of x -unsigned int +unsigned int gr_count_bits16 (unsigned int x) { int count = 0; @@ -57,7 +57,7 @@ gr_count_bits16 (unsigned int x) #if 0 // slow and obvious // return number of set bits in the low 32 bits of x -unsigned int +unsigned int gr_count_bits32 (unsigned int x) { int count = 0; @@ -83,7 +83,7 @@ gr_count_bits32 (unsigned int x) } #endif - + // return number of set bits in the low 64 bits of x unsigned int diff --git a/gnuradio-core/src/lib/general/gr_count_bits.h b/gnuradio-core/src/lib/general/gr_count_bits.h index f0cec2a11..76d0173eb 100644 --- a/gnuradio-core/src/lib/general/gr_count_bits.h +++ b/gnuradio-core/src/lib/general/gr_count_bits.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003 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, diff --git a/gnuradio-core/src/lib/general/gr_cpfsk_bc.cc b/gnuradio-core/src/lib/general/gr_cpfsk_bc.cc index f0b04ef97..24f0edd5c 100644 --- a/gnuradio-core/src/lib/general/gr_cpfsk_bc.cc +++ b/gnuradio-core/src/lib/general/gr_cpfsk_bc.cc @@ -1,17 +1,17 @@ /* -*- c++ -*- */ /* * Copyright 2008,2010 Free Software Foundation, Inc. - * + * * 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, @@ -28,7 +28,7 @@ #define M_TWOPI (2*M_PI) -gr_cpfsk_bc_sptr +gr_cpfsk_bc_sptr gr_make_cpfsk_bc(float k, float ampl, int samples_per_sym) { return gnuradio::get_initial_sptr(new gr_cpfsk_bc(k, ampl, samples_per_sym)); @@ -50,7 +50,7 @@ gr_cpfsk_bc::~gr_cpfsk_bc() { } -int +int gr_cpfsk_bc::work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) @@ -64,12 +64,12 @@ gr_cpfsk_bc::work(int noutput_items, d_phase += d_freq; else d_phase -= d_freq; - + while (d_phase > M_TWOPI) d_phase -= M_TWOPI; while (d_phase < -M_TWOPI) d_phase += M_TWOPI; - + *out++ = gr_expj(d_phase)*d_ampl; } } diff --git a/gnuradio-core/src/lib/general/gr_cpfsk_bc.h b/gnuradio-core/src/lib/general/gr_cpfsk_bc.h index 4afba4fb4..6ad2774b3 100644 --- a/gnuradio-core/src/lib/general/gr_cpfsk_bc.h +++ b/gnuradio-core/src/lib/general/gr_cpfsk_bc.h @@ -1,17 +1,17 @@ /* -*- c++ -*- */ /* * Copyright 2008 Free Software Foundation, Inc. - * + * * 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, @@ -30,7 +30,7 @@ typedef boost::shared_ptr<gr_cpfsk_bc> gr_cpfsk_bc_sptr; GR_CORE_API gr_cpfsk_bc_sptr gr_make_cpfsk_bc(float k, float ampl, int samples_per_sym); /*! - * \brief Perform continuous phase 2-level frequency shift keying modulation + * \brief Perform continuous phase 2-level frequency shift keying modulation * on an input stream of unpacked bits. * \ingroup modulation_blk * diff --git a/gnuradio-core/src/lib/general/gr_cpfsk_bc.i b/gnuradio-core/src/lib/general/gr_cpfsk_bc.i index 918766a68..b86dfb81b 100644 --- a/gnuradio-core/src/lib/general/gr_cpfsk_bc.i +++ b/gnuradio-core/src/lib/general/gr_cpfsk_bc.i @@ -1,19 +1,19 @@ /* -*- 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, diff --git a/gnuradio-core/src/lib/general/gr_cpm.cc b/gnuradio-core/src/lib/general/gr_cpm.cc index 94a428c58..32ce6502d 100644 --- a/gnuradio-core/src/lib/general/gr_cpm.cc +++ b/gnuradio-core/src/lib/general/gr_cpm.cc @@ -1,17 +1,17 @@ /* -*- c++ -*- */ /* * Copyright 2010 Free Software Foundation, Inc. - * + * * 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, diff --git a/gnuradio-core/src/lib/general/gr_cpm.i b/gnuradio-core/src/lib/general/gr_cpm.i index f01aba34e..6c077687d 100644 --- a/gnuradio-core/src/lib/general/gr_cpm.i +++ b/gnuradio-core/src/lib/general/gr_cpm.i @@ -1,19 +1,19 @@ /* -*- C++ -*- */ /* * Copyright 2010 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, diff --git a/gnuradio-core/src/lib/general/gr_ctcss_squelch_ff.cc b/gnuradio-core/src/lib/general/gr_ctcss_squelch_ff.cc index 6c1e98d47..d31763a6b 100644 --- a/gnuradio-core/src/lib/general/gr_ctcss_squelch_ff.cc +++ b/gnuradio-core/src/lib/general/gr_ctcss_squelch_ff.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006,2010 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, @@ -27,9 +27,9 @@ #include <gr_ctcss_squelch_ff.h> static float ctcss_tones[] = { - 67.0, 71.9, 74.4, 77.0, 79.7, 82.5, 85.4, 88.5, 91.5, 94.8, + 67.0, 71.9, 74.4, 77.0, 79.7, 82.5, 85.4, 88.5, 91.5, 94.8, 97.4, 100.0, 103.5, 107.2, 110.9, 114.8, 118.8, 123.0, 127.3, 131.8, - 136.5, 141.3, 146.2, 151.4, 156.7, 162.2, 167.9, 173.8, 179.9, 186.2, + 136.5, 141.3, 146.2, 151.4, 156.7, 162.2, 167.9, 173.8, 179.9, 186.2, 192.8, 203.5, 210.7, 218.1, 225.7, 233.6, 241.8, 250.3 }; @@ -50,7 +50,7 @@ int gr_ctcss_squelch_ff::find_tone(float freq) return -1; } -gr_ctcss_squelch_ff::gr_ctcss_squelch_ff(int rate, float freq, float level, int len, int ramp, bool gate) : +gr_ctcss_squelch_ff::gr_ctcss_squelch_ff(int rate, float freq, float level, int len, int ramp, bool gate) : gr_squelch_base_ff("ctcss_squelch_ff", ramp, gate) { d_freq = freq; @@ -71,7 +71,7 @@ gr_ctcss_squelch_ff::gr_ctcss_squelch_ff(int rate, float freq, float level, int f_l = freq*0.98; else f_l = ctcss_tones[i-1]; - + if (i == -1 || i == max_tone_index) f_r = freq*1.02; else @@ -105,7 +105,7 @@ void gr_ctcss_squelch_ff::update_state(const float &in) d_out_l = abs(d_goertzel_l.output()); d_out_c = abs(d_goertzel_c.output()); d_out_r = abs(d_goertzel_r.output()); - + //printf("d_out_l=%f d_out_c=%f d_out_r=%f\n", d_out_l, d_out_c, d_out_r); d_mute = (d_out_c < d_level || d_out_c < d_out_l || d_out_c < d_out_r); } diff --git a/gnuradio-core/src/lib/general/gr_ctcss_squelch_ff.h b/gnuradio-core/src/lib/general/gr_ctcss_squelch_ff.h index 664c40846..ef3d13ba7 100644 --- a/gnuradio-core/src/lib/general/gr_ctcss_squelch_ff.h +++ b/gnuradio-core/src/lib/general/gr_ctcss_squelch_ff.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -30,7 +30,7 @@ class gr_ctcss_squelch_ff; typedef boost::shared_ptr<gr_ctcss_squelch_ff> gr_ctcss_squelch_ff_sptr; -GR_CORE_API gr_ctcss_squelch_ff_sptr +GR_CORE_API gr_ctcss_squelch_ff_sptr gr_make_ctcss_squelch_ff(int rate, float freq, float level=0.01, int len=0, int ramp=0, bool gate=false); /*! @@ -44,7 +44,7 @@ private: float d_level; int d_len; bool d_mute; - + gri_goertzel d_goertzel_l; gri_goertzel d_goertzel_c; gri_goertzel d_goertzel_r; @@ -57,7 +57,7 @@ private: protected: virtual void update_state(const float &in); virtual bool mute() const { return d_mute; } - + public: std::vector<float> squelch_range() const; float level() const { return d_level; } diff --git a/gnuradio-core/src/lib/general/gr_ctcss_squelch_ff.i b/gnuradio-core/src/lib/general/gr_ctcss_squelch_ff.i index a046710dc..b160c5dfd 100644 --- a/gnuradio-core/src/lib/general/gr_ctcss_squelch_ff.i +++ b/gnuradio-core/src/lib/general/gr_ctcss_squelch_ff.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -24,7 +24,7 @@ GR_SWIG_BLOCK_MAGIC(gr,ctcss_squelch_ff); %include gr_squelch_base_ff.i -gr_ctcss_squelch_ff_sptr +gr_ctcss_squelch_ff_sptr gr_make_ctcss_squelch_ff(int rate, float freq, float level=0.01, int len=0, int ramp=0, bool gate=false); class gr_ctcss_squelch_ff : public gr_squelch_base_ff diff --git a/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.cc b/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.cc index c5e1320a3..319aceeaa 100644 --- a/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.cc +++ b/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.cc @@ -1,17 +1,17 @@ /* -*- c++ -*- */ /* * Copyright 2008,2010 Free Software Foundation, Inc. - * + * * 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, @@ -25,7 +25,7 @@ #include <gr_decode_ccsds_27_fb.h> #include <gr_io_signature.h> -gr_decode_ccsds_27_fb_sptr +gr_decode_ccsds_27_fb_sptr gr_make_decode_ccsds_27_fb() { return gnuradio::get_initial_sptr(new gr_decode_ccsds_27_fb()); @@ -49,7 +49,7 @@ gr_decode_ccsds_27_fb::~gr_decode_ccsds_27_fb() { } -int +int gr_decode_ccsds_27_fb::work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) @@ -65,20 +65,20 @@ gr_decode_ccsds_27_fb::work(int noutput_items, else if (sample < 0.0) sample = 0.0; unsigned char sym = (unsigned char)(floor(sample)); - + d_viterbi_in[d_count % 4] = sym; if ((d_count % 4) == 3) { // Every fourth symbol, perform butterfly operation viterbi_butterfly2(d_viterbi_in, d_mettab, d_state0, d_state1); - + // Every sixteenth symbol, read out a byte if (d_count % 16 == 11) { - // long metric = + // long metric = viterbi_get_output(d_state0, out++); // printf("%li\n", *(out-1), metric); } } - + d_count++; } diff --git a/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.h b/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.h index 3db250101..df8e6f449 100644 --- a/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.h +++ b/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.h @@ -1,17 +1,17 @@ /* -*- c++ -*- */ /* * Copyright 2008 Free Software Foundation, Inc. - * + * * 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, @@ -35,12 +35,12 @@ GR_CORE_API gr_decode_ccsds_27_fb_sptr gr_make_decode_ccsds_27_fb(); /*! \brief A rate 1/2, k=7 convolutional decoder for the CCSDS standard * \ingroup ecc - * + * * This block performs soft-decision convolutional decoding using the Viterbi * algorithm. - * - * The input is a stream of (possibly noise corrupted) floating point values - * nominally spanning [-1.0, 1.0], representing the encoded channel symbols + * + * The input is a stream of (possibly noise corrupted) floating point values + * nominally spanning [-1.0, 1.0], representing the encoded channel symbols * 0 (-1.0) and 1 (1.0), with erased symbols at 0.0. * * The output is MSB first packed bytes of decoded values. @@ -66,7 +66,7 @@ private: unsigned char d_viterbi_in[16]; int d_count; - + public: ~gr_decode_ccsds_27_fb(); diff --git a/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.i b/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.i index f05a0141b..f2e13b593 100644 --- a/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.i +++ b/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.i @@ -1,19 +1,19 @@ /* -*- 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, diff --git a/gnuradio-core/src/lib/general/gr_deinterleave.cc b/gnuradio-core/src/lib/general/gr_deinterleave.cc index 843275366..e22db60c1 100644 --- a/gnuradio-core/src/lib/general/gr_deinterleave.cc +++ b/gnuradio-core/src/lib/general/gr_deinterleave.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_deinterleave.h b/gnuradio-core/src/lib/general/gr_deinterleave.h index 3dd913911..0eecc44d1 100644 --- a/gnuradio-core/src/lib/general/gr_deinterleave.h +++ b/gnuradio-core/src/lib/general/gr_deinterleave.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_deinterleave.i b/gnuradio-core/src/lib/general/gr_deinterleave.i index 2825f3a5e..a70ce6c52 100644 --- a/gnuradio-core/src/lib/general/gr_deinterleave.i +++ b/gnuradio-core/src/lib/general/gr_deinterleave.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_delay.cc b/gnuradio-core/src/lib/general/gr_delay.cc index aedd461f8..8f728948d 100644 --- a/gnuradio-core/src/lib/general/gr_delay.cc +++ b/gnuradio-core/src/lib/general/gr_delay.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2010,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -44,7 +44,7 @@ gr_delay::gr_delay (size_t itemsize, int delay) d_delta = 0; } -void +void gr_delay::forecast (int noutput_items, gr_vector_int &ninput_items_required) { // make sure all inputs have noutput_items available @@ -107,7 +107,7 @@ gr_delay::general_work (int noutput_items, delta -= n_adj; d_delta = -delta; } - + //produce but not consume (inserts zeros) else { // d_delta > 0 int n_from_input, n_padding; diff --git a/gnuradio-core/src/lib/general/gr_delay.h b/gnuradio-core/src/lib/general/gr_delay.h index 55f525c38..ed05c47f4 100644 --- a/gnuradio-core/src/lib/general/gr_delay.h +++ b/gnuradio-core/src/lib/general/gr_delay.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_delay.i b/gnuradio-core/src/lib/general/gr_delay.i index 2e62a222f..f3d49891d 100644 --- a/gnuradio-core/src/lib/general/gr_delay.i +++ b/gnuradio-core/src/lib/general/gr_delay.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, diff --git a/gnuradio-core/src/lib/general/gr_descrambler_bb.cc b/gnuradio-core/src/lib/general/gr_descrambler_bb.cc index b712e69ed..b5ae28fa9 100644 --- a/gnuradio-core/src/lib/general/gr_descrambler_bb.cc +++ b/gnuradio-core/src/lib/general/gr_descrambler_bb.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2010 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, @@ -51,6 +51,6 @@ gr_descrambler_bb::work(int noutput_items, for (int i = 0; i < noutput_items; i++) out[i] = d_lfsr.next_bit_descramble(in[i]); - + return noutput_items; } diff --git a/gnuradio-core/src/lib/general/gr_descrambler_bb.h b/gnuradio-core/src/lib/general/gr_descrambler_bb.h index d7a49b5f1..333593caa 100644 --- a/gnuradio-core/src/lib/general/gr_descrambler_bb.h +++ b/gnuradio-core/src/lib/general/gr_descrambler_bb.h @@ -1,19 +1,19 @@ /* -*- 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, @@ -35,7 +35,7 @@ GR_CORE_API gr_descrambler_bb_sptr gr_make_descrambler_bb(int mask, int seed, in * Descramble an input stream using an LFSR. This block works on the LSB only * of the input data stream, i.e., on an "unpacked binary" stream, and * produces the same format on its output. - * + * * \param mask Polynomial mask for LFSR * \param seed Initial shift register contents * \param len Shift register length diff --git a/gnuradio-core/src/lib/general/gr_descrambler_bb.i b/gnuradio-core/src/lib/general/gr_descrambler_bb.i index e93c50c1a..c6cd0a285 100644 --- a/gnuradio-core/src/lib/general/gr_descrambler_bb.i +++ b/gnuradio-core/src/lib/general/gr_descrambler_bb.i @@ -1,19 +1,19 @@ /* -*- 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, diff --git a/gnuradio-core/src/lib/general/gr_diff_decoder_bb.cc b/gnuradio-core/src/lib/general/gr_diff_decoder_bb.cc index 1b0bcfb96..74324a62e 100644 --- a/gnuradio-core/src/lib/general/gr_diff_decoder_bb.cc +++ b/gnuradio-core/src/lib/general/gr_diff_decoder_bb.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_diff_decoder_bb.h b/gnuradio-core/src/lib/general/gr_diff_decoder_bb.h index 0337c3dbd..c4ebbc476 100644 --- a/gnuradio-core/src/lib/general/gr_diff_decoder_bb.h +++ b/gnuradio-core/src/lib/general/gr_diff_decoder_bb.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_diff_decoder_bb.i b/gnuradio-core/src/lib/general/gr_diff_decoder_bb.i index 71b55e642..3dddb17c3 100644 --- a/gnuradio-core/src/lib/general/gr_diff_decoder_bb.i +++ b/gnuradio-core/src/lib/general/gr_diff_decoder_bb.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_diff_encoder_bb.cc b/gnuradio-core/src/lib/general/gr_diff_encoder_bb.cc index 7e67a718e..98492c746 100644 --- a/gnuradio-core/src/lib/general/gr_diff_encoder_bb.cc +++ b/gnuradio-core/src/lib/general/gr_diff_encoder_bb.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_diff_encoder_bb.h b/gnuradio-core/src/lib/general/gr_diff_encoder_bb.h index c99e226da..e98876b70 100644 --- a/gnuradio-core/src/lib/general/gr_diff_encoder_bb.h +++ b/gnuradio-core/src/lib/general/gr_diff_encoder_bb.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_diff_encoder_bb.i b/gnuradio-core/src/lib/general/gr_diff_encoder_bb.i index 7066e9e87..96dadaca5 100644 --- a/gnuradio-core/src/lib/general/gr_diff_encoder_bb.i +++ b/gnuradio-core/src/lib/general/gr_diff_encoder_bb.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_diff_phasor_cc.cc b/gnuradio-core/src/lib/general/gr_diff_phasor_cc.cc index fb6a3a910..89fa2041e 100644 --- a/gnuradio-core/src/lib/general/gr_diff_phasor_cc.cc +++ b/gnuradio-core/src/lib/general/gr_diff_phasor_cc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, @@ -36,7 +36,7 @@ gr_make_diff_phasor_cc () gr_diff_phasor_cc::gr_diff_phasor_cc () : gr_sync_block ("diff_phasor_cc", gr_make_io_signature (1, 1, sizeof (gr_complex)), - gr_make_io_signature (1, 1, sizeof (gr_complex))) + gr_make_io_signature (1, 1, sizeof (gr_complex))) { set_history(2); } @@ -56,6 +56,6 @@ gr_diff_phasor_cc::work (int noutput_items, for(int i = 0; i < noutput_items; i++){ out[i] = in[i] * conj(in[i-1]); } - + return noutput_items; } diff --git a/gnuradio-core/src/lib/general/gr_diff_phasor_cc.h b/gnuradio-core/src/lib/general/gr_diff_phasor_cc.h index 8af2699a7..21c4f616d 100644 --- a/gnuradio-core/src/lib/general/gr_diff_phasor_cc.h +++ b/gnuradio-core/src/lib/general/gr_diff_phasor_cc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_diff_phasor_cc.i b/gnuradio-core/src/lib/general/gr_diff_phasor_cc.i index 6736158c1..8aecd5cc7 100644 --- a/gnuradio-core/src/lib/general/gr_diff_phasor_cc.i +++ b/gnuradio-core/src/lib/general/gr_diff_phasor_cc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_dpll_bb.cc b/gnuradio-core/src/lib/general/gr_dpll_bb.cc index fcaad2174..1d5a0d4fd 100644 --- a/gnuradio-core/src/lib/general/gr_dpll_bb.cc +++ b/gnuradio-core/src/lib/general/gr_dpll_bb.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2009,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_dpll_bb.h b/gnuradio-core/src/lib/general/gr_dpll_bb.h index 8e748dddb..a7df974fb 100644 --- a/gnuradio-core/src/lib/general/gr_dpll_bb.h +++ b/gnuradio-core/src/lib/general/gr_dpll_bb.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, @@ -35,7 +35,7 @@ GR_CORE_API gr_dpll_bb_sptr gr_make_dpll_bb (float period, float gain); * \brief Detect the peak of a signal * \ingroup level_blk * - * If a peak is detected, this block outputs a 1, + * If a peak is detected, this block outputs a 1, * or it outputs 0's. */ class GR_CORE_API gr_dpll_bb : public gr_sync_block diff --git a/gnuradio-core/src/lib/general/gr_dpll_bb.i b/gnuradio-core/src/lib/general/gr_dpll_bb.i index 59ce7f03d..f31a87374 100644 --- a/gnuradio-core/src/lib/general/gr_dpll_bb.i +++ b/gnuradio-core/src/lib/general/gr_dpll_bb.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, diff --git a/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.cc b/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.cc index 092e91d8b..4a92d113a 100644 --- a/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.cc +++ b/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.cc @@ -1,17 +1,17 @@ /* -*- c++ -*- */ /* * Copyright 2004,2008,2010 Free Software Foundation, Inc. - * + * * 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, @@ -29,7 +29,7 @@ extern "C" { #include <../viterbi/viterbi.h> } -gr_encode_ccsds_27_bb_sptr +gr_encode_ccsds_27_bb_sptr gr_make_encode_ccsds_27_bb() { return gnuradio::get_initial_sptr(new gr_encode_ccsds_27_bb()); @@ -48,7 +48,7 @@ gr_encode_ccsds_27_bb::~gr_encode_ccsds_27_bb() { } -int +int gr_encode_ccsds_27_bb::work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) diff --git a/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.h b/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.h index e24ae9151..94e9c33f1 100644 --- a/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.h +++ b/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.h @@ -1,17 +1,17 @@ /* -*- c++ -*- */ /* * Copyright 2008 Free Software Foundation, Inc. - * + * * 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, @@ -31,10 +31,10 @@ GR_CORE_API gr_encode_ccsds_27_bb_sptr gr_make_encode_ccsds_27_bb(); /*! \brief A rate 1/2, k=7 convolutional encoder for the CCSDS standard * \ingroup ecc - * + * * This block performs convolutional encoding using the CCSDS standard * polynomial ("Voyager"). - * + * * The input is an MSB first packed stream of bits. * * The output is a stream of symbols 0 or 1 representing the encoded data. @@ -52,7 +52,7 @@ private: gr_encode_ccsds_27_bb(); unsigned char d_encstate; - + public: ~gr_encode_ccsds_27_bb(); diff --git a/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.i b/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.i index d4bda41cc..e74e9174a 100644 --- a/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.i +++ b/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.i @@ -1,19 +1,19 @@ /* -*- 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, diff --git a/gnuradio-core/src/lib/general/gr_expj.h b/gnuradio-core/src/lib/general/gr_expj.h index 6f1d56eb3..1d8633242 100644 --- a/gnuradio-core/src/lib/general/gr_expj.h +++ b/gnuradio-core/src/lib/general/gr_expj.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_fake_channel_coder_pp.cc b/gnuradio-core/src/lib/general/gr_fake_channel_coder_pp.cc index 24945cfd8..c1c3883c5 100644 --- a/gnuradio-core/src/lib/general/gr_fake_channel_coder_pp.cc +++ b/gnuradio-core/src/lib/general/gr_fake_channel_coder_pp.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 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, @@ -61,7 +61,7 @@ gr_fake_channel_encoder_pp::work (int noutput_items, const unsigned char *in = (const unsigned char *) input_items[0]; unsigned char *out = (unsigned char *) output_items[0]; int npad = d_output_vlen - d_input_vlen; - + for (int i = 0; i < noutput_items; i++){ memcpy(out, in, d_input_vlen); memset(out + d_input_vlen, PAD_VAL, npad); @@ -102,7 +102,7 @@ gr_fake_channel_decoder_pp::work (int noutput_items, { const unsigned char *in = (const unsigned char *) input_items[0]; unsigned char *out = (unsigned char *) output_items[0]; - + for (int i = 0; i < noutput_items; i++){ memcpy(out, in, d_output_vlen); in += d_input_vlen; diff --git a/gnuradio-core/src/lib/general/gr_fake_channel_coder_pp.h b/gnuradio-core/src/lib/general/gr_fake_channel_coder_pp.h index 2560c6105..45808752d 100644 --- a/gnuradio-core/src/lib/general/gr_fake_channel_coder_pp.h +++ b/gnuradio-core/src/lib/general/gr_fake_channel_coder_pp.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -42,12 +42,12 @@ class GR_CORE_API gr_fake_channel_encoder_pp : public gr_sync_block { int d_input_vlen; int d_output_vlen; - + gr_fake_channel_encoder_pp(int input_vlen, int output_vlen); friend GR_CORE_API gr_fake_channel_encoder_pp_sptr gr_make_fake_channel_encoder_pp(int input_vlen, int output_vlen); - + public: ~gr_fake_channel_encoder_pp(); @@ -74,12 +74,12 @@ class GR_CORE_API gr_fake_channel_decoder_pp : public gr_sync_block { int d_input_vlen; int d_output_vlen; - + gr_fake_channel_decoder_pp(int input_vlen, int output_vlen); friend GR_CORE_API gr_fake_channel_decoder_pp_sptr gr_make_fake_channel_decoder_pp(int input_vlen, int output_vlen); - + public: ~gr_fake_channel_decoder_pp(); diff --git a/gnuradio-core/src/lib/general/gr_fake_channel_coder_pp.i b/gnuradio-core/src/lib/general/gr_fake_channel_coder_pp.i index 364fb7581..123c84e47 100644 --- a/gnuradio-core/src/lib/general/gr_fake_channel_coder_pp.i +++ b/gnuradio-core/src/lib/general/gr_fake_channel_coder_pp.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,fake_channel_encoder_pp) -gr_fake_channel_encoder_pp_sptr +gr_fake_channel_encoder_pp_sptr gr_make_fake_channel_encoder_pp(int input_vlen, int output_vlen ) throw(std::invalid_argument); @@ -39,7 +39,7 @@ public: GR_SWIG_BLOCK_MAGIC(gr,fake_channel_decoder_pp) -gr_fake_channel_decoder_pp_sptr +gr_fake_channel_decoder_pp_sptr gr_make_fake_channel_decoder_pp(int input_vlen, int output_vlen ) throw(std::invalid_argument); diff --git a/gnuradio-core/src/lib/general/gr_fast_atan2f.cc b/gnuradio-core/src/lib/general/gr_fast_atan2f.cc index 6e14660f1..8b7bfea12 100644 --- a/gnuradio-core/src/lib/general/gr_fast_atan2f.cc +++ b/gnuradio-core/src/lib/general/gr_fast_atan2f.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -34,7 +34,7 @@ #define TAN_MAP_SIZE 256 /* arctangents from 0 to pi/4 radians */ -static REAL +static REAL fast_atan_table[257] = { 0.000000e+00, 3.921549e-03, 7.842976e-03, 1.176416e-02, 1.568499e-02, 1.960533e-02, 2.352507e-02, 2.744409e-02, diff --git a/gnuradio-core/src/lib/general/gr_feedforward_agc_cc.cc b/gnuradio-core/src/lib/general/gr_feedforward_agc_cc.cc index 9046fcaa7..147b64e9b 100644 --- a/gnuradio-core/src/lib/general/gr_feedforward_agc_cc.cc +++ b/gnuradio-core/src/lib/general/gr_feedforward_agc_cc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, @@ -42,7 +42,7 @@ gr_feedforward_agc_cc::gr_feedforward_agc_cc (int nsamples, float reference) { if (nsamples < 1) throw std::invalid_argument("gr_feedforward_agc_cc: nsamples must be >= 1"); - + set_history(nsamples); } @@ -78,7 +78,7 @@ gr_feedforward_agc_cc::work(int noutput_items, gr_complex *out = (gr_complex *) output_items[0]; int nsamples = d_nsamples; float gain; - + for (int i = 0; i < noutput_items; i++){ //float max_env = 1e-12; // avoid divide by zero float max_env = 1e-4; // avoid divide by zero, indirectly set max gain diff --git a/gnuradio-core/src/lib/general/gr_feedforward_agc_cc.h b/gnuradio-core/src/lib/general/gr_feedforward_agc_cc.h index a97dbd958..63e5e4c43 100644 --- a/gnuradio-core/src/lib/general/gr_feedforward_agc_cc.h +++ b/gnuradio-core/src/lib/general/gr_feedforward_agc_cc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -38,9 +38,9 @@ gr_make_feedforward_agc_cc(int nsamples, float reference = 1.0); */ class GR_CORE_API gr_feedforward_agc_cc : public gr_sync_block { - friend GR_CORE_API gr_feedforward_agc_cc_sptr + friend GR_CORE_API gr_feedforward_agc_cc_sptr gr_make_feedforward_agc_cc(int nsamples, float reference); - + int d_nsamples; float d_reference; diff --git a/gnuradio-core/src/lib/general/gr_feedforward_agc_cc.i b/gnuradio-core/src/lib/general/gr_feedforward_agc_cc.i index 10a4d4789..1fd5a2c26 100644 --- a/gnuradio-core/src/lib/general/gr_feedforward_agc_cc.i +++ b/gnuradio-core/src/lib/general/gr_feedforward_agc_cc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -28,7 +28,7 @@ gr_make_feedforward_agc_cc(int nsamples, float reference = 1.0); class gr_feedforward_agc_cc : public gr_sync_block { gr_feedforward_agc_cc(int nsamples, float reference); - + public: ~gr_feedforward_agc_cc(); }; diff --git a/gnuradio-core/src/lib/general/gr_feval.cc b/gnuradio-core/src/lib/general/gr_feval.cc index e679ef585..ca5714a79 100644 --- a/gnuradio-core/src/lib/general/gr_feval.cc +++ b/gnuradio-core/src/lib/general/gr_feval.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -28,7 +28,7 @@ gr_feval_dd::~gr_feval_dd(){} -double +double gr_feval_dd::eval(double x) { return 0; diff --git a/gnuradio-core/src/lib/general/gr_feval.h b/gnuradio-core/src/lib/general/gr_feval.h index a0e448ebf..1726a8a7f 100644 --- a/gnuradio-core/src/lib/general/gr_feval.h +++ b/gnuradio-core/src/lib/general/gr_feval.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -73,7 +73,7 @@ protected: * \brief override this to define the function */ virtual gr_complex eval(gr_complex x); - + public: gr_feval_cc() {} virtual ~gr_feval_cc(); diff --git a/gnuradio-core/src/lib/general/gr_feval.i b/gnuradio-core/src/lib/general/gr_feval.i index c5522805d..bc219a643 100644 --- a/gnuradio-core/src/lib/general/gr_feval.i +++ b/gnuradio-core/src/lib/general/gr_feval.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, @@ -115,7 +115,7 @@ class gr_feval_ll { protected: virtual long eval(long x); - + public: gr_feval_ll() {} virtual ~gr_feval_ll(); @@ -128,7 +128,7 @@ class gr_feval { protected: virtual void eval(); - + public: gr_feval() {} virtual ~gr_feval(); diff --git a/gnuradio-core/src/lib/general/gr_fft_vcc.cc b/gnuradio-core/src/lib/general/gr_fft_vcc.cc index f744acb93..addcddb64 100644 --- a/gnuradio-core/src/lib/general/gr_fft_vcc.cc +++ b/gnuradio-core/src/lib/general/gr_fft_vcc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2007,2008,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -55,14 +55,14 @@ gr_fft_vcc::~gr_fft_vcc () { } -bool +bool gr_fft_vcc::set_window(const std::vector<float> &window) { if(window.size()==0 || window.size()==d_fft_size) { d_window=window; return true; } - else + else return false; } diff --git a/gnuradio-core/src/lib/general/gr_fft_vcc.h b/gnuradio-core/src/lib/general/gr_fft_vcc.h index ceabeb681..db5690d41 100644 --- a/gnuradio-core/src/lib/general/gr_fft_vcc.h +++ b/gnuradio-core/src/lib/general/gr_fft_vcc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2007,2008,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_fft_vcc.i b/gnuradio-core/src/lib/general/gr_fft_vcc.i index 26d8b89a3..f9caae7d8 100644 --- a/gnuradio-core/src/lib/general/gr_fft_vcc.i +++ b/gnuradio-core/src/lib/general/gr_fft_vcc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2007,2008,2010,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr, fft_vcc) -gr_fft_vcc_sptr +gr_fft_vcc_sptr gr_make_fft_vcc (int fft_size, bool forward, const std::vector<float> &window, bool shift=false, int nthreads=1); diff --git a/gnuradio-core/src/lib/general/gr_fft_vcc_fftw.cc b/gnuradio-core/src/lib/general/gr_fft_vcc_fftw.cc index a99beb965..891173bcd 100644 --- a/gnuradio-core/src/lib/general/gr_fft_vcc_fftw.cc +++ b/gnuradio-core/src/lib/general/gr_fft_vcc_fftw.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2007,2008,2010 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, @@ -79,15 +79,15 @@ gr_fft_vcc_fftw::work (int noutput_items, int count = 0; while (count++ < noutput_items){ - + // copy input into optimally aligned buffer - + if (d_window.size()){ gr_complex *dst = d_fft->get_inbuf(); if(!d_forward && d_shift){ unsigned int offset = (!d_forward && d_shift)?(d_fft_size/2):0; int fft_m_offset = d_fft_size - offset; - for (int i = 0; i < offset; i++) // apply window + for (unsigned int i = 0; i < offset; i++) // apply window dst[i+fft_m_offset] = in[i] * d_window[i]; for (unsigned int i = offset; i < d_fft_size; i++) // apply window dst[i-offset] = in[i] * d_window[i]; @@ -107,10 +107,10 @@ gr_fft_vcc_fftw::work (int noutput_items, memcpy (d_fft->get_inbuf(), in, input_data_size); } } - + // compute the fft d_fft->execute (); - + // copy result to our output if(d_forward && d_shift) { // apply a fft shift on the data unsigned int len = (unsigned int)(ceil(d_fft_size/2.0)); @@ -120,11 +120,11 @@ gr_fft_vcc_fftw::work (int noutput_items, else { memcpy (out, d_fft->get_outbuf (), output_data_size); } - + in += d_fft_size; out += d_fft_size; } - + return noutput_items; } diff --git a/gnuradio-core/src/lib/general/gr_fft_vcc_fftw.h b/gnuradio-core/src/lib/general/gr_fft_vcc_fftw.h index 82b7512d7..967ceaefb 100644 --- a/gnuradio-core/src/lib/general/gr_fft_vcc_fftw.h +++ b/gnuradio-core/src/lib/general/gr_fft_vcc_fftw.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2007,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, diff --git a/gnuradio-core/src/lib/general/gr_fft_vfc.cc b/gnuradio-core/src/lib/general/gr_fft_vfc.cc index 5fbe732dc..2396055b9 100644 --- a/gnuradio-core/src/lib/general/gr_fft_vfc.cc +++ b/gnuradio-core/src/lib/general/gr_fft_vfc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -107,7 +107,7 @@ gr_fft_vfc::work (int noutput_items, else { gr_complex *dst = d_fft->get_inbuf(); for (unsigned int i = 0; i < d_fft_size; i++) // float to complex conversion - dst[i] = in[i]; + dst[i] = in[i]; } // compute the fft @@ -123,13 +123,13 @@ gr_fft_vfc::work (int noutput_items, return noutput_items; } -bool +bool gr_fft_vfc::set_window(const std::vector<float> &window) { if(window.size()==0 || window.size()==d_fft_size) { d_window=window; return true; } - else + else return false; } diff --git a/gnuradio-core/src/lib/general/gr_fft_vfc.h b/gnuradio-core/src/lib/general/gr_fft_vfc.h index 84ae08f08..35b95313d 100644 --- a/gnuradio-core/src/lib/general/gr_fft_vfc.h +++ b/gnuradio-core/src/lib/general/gr_fft_vfc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_fft_vfc.i b/gnuradio-core/src/lib/general/gr_fft_vfc.i index 4783ae1fe..d387ae155 100644 --- a/gnuradio-core/src/lib/general/gr_fft_vfc.i +++ b/gnuradio-core/src/lib/general/gr_fft_vfc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr, fft_vfc) -gr_fft_vfc_sptr +gr_fft_vfc_sptr gr_make_fft_vfc (int fft_size, bool forward, const std::vector<float> &window, int nthreads=1) @@ -34,7 +34,7 @@ class gr_fft_vfc : public gr_sync_block gr_fft_vfc (int fft_size, bool forward, const std::vector<float> &window, int nthreads=1); - + public: bool set_window(const std::vector<float> &window); void set_nthreads(int n); diff --git a/gnuradio-core/src/lib/general/gr_firdes.cc b/gnuradio-core/src/lib/general/gr_firdes.cc index 13110d57d..4c7237141 100644 --- a/gnuradio-core/src/lib/general/gr_firdes.cc +++ b/gnuradio-core/src/lib/general/gr_firdes.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2007,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, @@ -84,10 +84,10 @@ gr_firdes::low_pass_2(double gain, taps[n + M] = sin (n * fwT0) / (n * M_PI) * w[n + M]; } } - + // find the factor to normalize the gain, fmax. // For low-pass, gain @ zero freq = 1.0 - + double fmax = taps[0 + M]; for (int n = 1; n <= M; n++) fmax += 2 * taps[n + M]; @@ -131,10 +131,10 @@ gr_firdes::low_pass (double gain, taps[n + M] = sin (n * fwT0) / (n * M_PI) * w[n + M]; } } - + // find the factor to normalize the gain, fmax. // For low-pass, gain @ zero freq = 1.0 - + double fmax = taps[0 + M]; for (int n = 1; n <= M; n++) fmax += 2 * taps[n + M]; @@ -280,10 +280,10 @@ gr_firdes::band_pass_2 (double gain, taps[n + M] = (sin (n * fwT1) - sin (n * fwT0)) / (n * M_PI) * w[n + M]; } } - + // find the factor to normalize the gain, fmax. // For band-pass, gain @ center freq = 1.0 - + double fmax = taps[0 + M]; for (int n = 1; n <= M; n++) fmax += 2 * taps[n + M] * cos (n * (fwT0 + fwT1) * 0.5); @@ -329,10 +329,10 @@ gr_firdes::band_pass (double gain, taps[n + M] = (sin (n * fwT1) - sin (n * fwT0)) / (n * M_PI) * w[n + M]; } } - + // find the factor to normalize the gain, fmax. // For band-pass, gain @ center freq = 1.0 - + double fmax = taps[0 + M]; for (int n = 1; n <= M; n++) fmax += 2 * taps[n + M] * cos (n * (fwT0 + fwT1) * 0.5); @@ -385,7 +385,7 @@ gr_firdes::complex_band_pass_2 (double gain, *optr++ = gr_complex(*iptr * cos(phase),*iptr * sin(phase)); iptr++, phase += freq; } - + return taps; } @@ -425,7 +425,7 @@ gr_firdes::complex_band_pass (double gain, *optr++ = gr_complex(*iptr * cos(phase),*iptr * sin(phase)); iptr++, phase += freq; } - + return taps; } @@ -466,10 +466,10 @@ gr_firdes::band_reject_2 (double gain, taps[n + M] = (sin (n * fwT0) - sin (n * fwT1)) / (n * M_PI) * w[n + M]; } } - + // find the factor to normalize the gain, fmax. // For band-reject, gain @ zero freq = 1.0 - + double fmax = taps[0 + M]; for (int n = 1; n <= M; n++) fmax += 2 * taps[n + M]; @@ -514,10 +514,10 @@ gr_firdes::band_reject (double gain, taps[n + M] = (sin (n * fwT0) - sin (n * fwT1)) / (n * M_PI) * w[n + M]; } } - + // find the factor to normalize the gain, fmax. // For band-reject, gain @ zero freq = 1.0 - + double fmax = taps[0 + M]; for (int n = 1; n <= M; n++) fmax += 2 * taps[n + M]; @@ -536,7 +536,7 @@ gr_firdes::band_reject (double gain, vector<float> gr_firdes::hilbert (unsigned int ntaps, - win_type windowtype, + win_type windowtype, double beta) { if(!(ntaps & 1)) @@ -745,7 +745,7 @@ gr_firdes::window (win_type type, int ntaps, double beta) case WIN_BLACKMAN_hARRIS: for (int n = -ntaps/2; n < ntaps/2; n++) - taps[n+ntaps/2] = 0.35875 + 0.48829*cos((2*M_PI * n) / (float)M) + + taps[n+ntaps/2] = 0.35875 + 0.48829*cos((2*M_PI * n) / (float)M) + 0.14128*cos((4*M_PI * n) / (float)M) + 0.01168*cos((6*M_PI * n) / (float)M); break; @@ -790,7 +790,7 @@ gr_firdes::sanity_check_1f (double sampling_freq, if (fa <= 0.0 || fa > sampling_freq / 2) throw std::out_of_range ("gr_firdes check failed: 0 < fa <= sampling_freq / 2"); - + if (transition_width <= 0) throw std::out_of_range ("gr_dirdes check failed: transition_width > 0"); } @@ -806,13 +806,13 @@ gr_firdes::sanity_check_2f (double sampling_freq, if (fa <= 0.0 || fa > sampling_freq / 2) throw std::out_of_range ("gr_firdes check failed: 0 < fa <= sampling_freq / 2"); - + if (fb <= 0.0 || fb > sampling_freq / 2) throw std::out_of_range ("gr_firdes check failed: 0 < fb <= sampling_freq / 2"); - + if (fa > fb) throw std::out_of_range ("gr_firdes check failed: fa <= fb"); - + if (transition_width <= 0) throw std::out_of_range ("gr_firdes check failed: transition_width > 0"); } @@ -828,13 +828,13 @@ gr_firdes::sanity_check_2f_c (double sampling_freq, if (fa < -sampling_freq / 2 || fa > sampling_freq / 2) throw std::out_of_range ("gr_firdes check failed: 0 < fa <= sampling_freq / 2"); - + if (fb < -sampling_freq / 2 || fb > sampling_freq / 2) throw std::out_of_range ("gr_firdes check failed: 0 < fb <= sampling_freq / 2"); - + if (fa > fb) throw std::out_of_range ("gr_firdes check failed: fa <= fb"); - + if (transition_width <= 0) throw std::out_of_range ("gr_firdes check failed: transition_width > 0"); } diff --git a/gnuradio-core/src/lib/general/gr_firdes.h b/gnuradio-core/src/lib/general/gr_firdes.h index 83fa7e119..8d98ebe0a 100644 --- a/gnuradio-core/src/lib/general/gr_firdes.h +++ b/gnuradio-core/src/lib/general/gr_firdes.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,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, @@ -43,6 +43,7 @@ class GR_CORE_API gr_firdes { WIN_RECTANGULAR = 3, WIN_KAISER = 4, // max attenuation a function of beta, google it WIN_BLACKMAN_hARRIS = 5, + WIN_BLACKMAN_HARRIS = 5, // alias for capitalization consistency }; @@ -318,7 +319,7 @@ class GR_CORE_API gr_firdes { hilbert (unsigned int ntaps = 19, win_type windowtype = WIN_RECTANGULAR, double beta = 6.76); - + /*! * \brief design a Root Cosine FIR Filter (do we need a window?) * @@ -344,7 +345,7 @@ class GR_CORE_API gr_firdes { */ static std::vector<float> gaussian (double gain, - double spb, + double spb, double bt, // Bandwidth to bitrate ratio int ntaps); diff --git a/gnuradio-core/src/lib/general/gr_firdes.i b/gnuradio-core/src/lib/general/gr_firdes.i index 8d35f5761..0493db617 100644 --- a/gnuradio-core/src/lib/general/gr_firdes.i +++ b/gnuradio-core/src/lib/general/gr_firdes.i @@ -1,19 +1,19 @@ /* -*- C++ -*- */ /* * Copyright 2002,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, @@ -112,7 +112,7 @@ class gr_firdes { double transition_width, // Hz width of transition band win_type window = WIN_HAMMING, double beta = 6.76 // used only with Kaiser - ) throw(std::out_of_range); + ) throw(std::out_of_range); /*! * \brief use "window method" to design a high-pass FIR filter @@ -166,7 +166,7 @@ class gr_firdes { double transition_width, // Hz width of transition band win_type window = WIN_HAMMING, double beta = 6.76 // used only with Kaiser - ) throw(std::out_of_range); + ) throw(std::out_of_range); /*! @@ -222,7 +222,7 @@ class gr_firdes { double transition_width, // Hz width of transition band win_type window = WIN_HAMMING, // used only with Kaiser double beta = 6.76 - ) throw(std::out_of_range); + ) throw(std::out_of_range); /*! @@ -321,7 +321,7 @@ class gr_firdes { win_type windowtype = WIN_RECTANGULAR, double beta = 6.76 ) throw(std::out_of_range); - + /*! * \brief design a Root Cosine FIR Filter (do we need a window?) * @@ -348,13 +348,13 @@ class gr_firdes { */ static std::vector<float> gaussian (double gain, - double spb, + double spb, double bt, // Bandwidth to bitrate ratio int ntaps) throw(std::out_of_range); /*! * Return window given type, ntaps and optional beta. */ - static std::vector<float> gr_firdes::window (win_type type, int ntaps, double beta) + static std::vector<float> gr_firdes::window (win_type type, int ntaps, double beta) throw(std::runtime_error); }; diff --git a/gnuradio-core/src/lib/general/gr_float_to_char.cc b/gnuradio-core/src/lib/general/gr_float_to_char.cc index 14635ff71..3602ad745 100644 --- a/gnuradio-core/src/lib/general/gr_float_to_char.cc +++ b/gnuradio-core/src/lib/general/gr_float_to_char.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -45,7 +45,7 @@ gr_float_to_char::gr_float_to_char (size_t vlen, float scale) set_alignment(alignment_multiple); } -float +float gr_float_to_char::scale() const { return d_scale; @@ -71,7 +71,7 @@ gr_float_to_char::work (int noutput_items, else { volk_32f_s32f_convert_8i_a(out, in, d_scale, d_vlen*noutput_items); } - + return noutput_items; } diff --git a/gnuradio-core/src/lib/general/gr_float_to_char.h b/gnuradio-core/src/lib/general/gr_float_to_char.h index 00e83d465..2df50f18d 100644 --- a/gnuradio-core/src/lib/general/gr_float_to_char.h +++ b/gnuradio-core/src/lib/general/gr_float_to_char.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -43,7 +43,7 @@ gr_make_float_to_char (size_t vlen=1, float scale=1); class GR_CORE_API gr_float_to_char : public gr_sync_block { private: - friend GR_CORE_API gr_float_to_char_sptr gr_make_float_to_char + friend GR_CORE_API gr_float_to_char_sptr gr_make_float_to_char (size_t vlen, float scale); gr_float_to_char (size_t vlen, float scale); diff --git a/gnuradio-core/src/lib/general/gr_float_to_char.i b/gnuradio-core/src/lib/general/gr_float_to_char.i index a1c88750f..b40389ede 100644 --- a/gnuradio-core/src/lib/general/gr_float_to_char.i +++ b/gnuradio-core/src/lib/general/gr_float_to_char.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_float_to_complex.cc b/gnuradio-core/src/lib/general/gr_float_to_complex.cc index a392abd06..c68eac8c7 100644 --- a/gnuradio-core/src/lib/general/gr_float_to_complex.cc +++ b/gnuradio-core/src/lib/general/gr_float_to_complex.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004, 2009,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_float_to_complex.h b/gnuradio-core/src/lib/general/gr_float_to_complex.h index 596b595f3..628b4a954 100644 --- a/gnuradio-core/src/lib/general/gr_float_to_complex.h +++ b/gnuradio-core/src/lib/general/gr_float_to_complex.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004, 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, diff --git a/gnuradio-core/src/lib/general/gr_float_to_complex.i b/gnuradio-core/src/lib/general/gr_float_to_complex.i index 5ed48533e..ed5ad128b 100644 --- a/gnuradio-core/src/lib/general/gr_float_to_complex.i +++ b/gnuradio-core/src/lib/general/gr_float_to_complex.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004, 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, diff --git a/gnuradio-core/src/lib/general/gr_float_to_int.cc b/gnuradio-core/src/lib/general/gr_float_to_int.cc index b69591043..bd3cd6a3b 100644 --- a/gnuradio-core/src/lib/general/gr_float_to_int.cc +++ b/gnuradio-core/src/lib/general/gr_float_to_int.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -46,7 +46,7 @@ gr_float_to_int::gr_float_to_int (size_t vlen, float scale) set_alignment(alignment_multiple); } -float +float gr_float_to_int::scale() const { return d_scale; @@ -84,6 +84,6 @@ gr_float_to_int::work (int noutput_items, gri_float_to_int (in, out, d_scale, d_vlen*noutput_items); #endif - + return noutput_items; } diff --git a/gnuradio-core/src/lib/general/gr_float_to_int.h b/gnuradio-core/src/lib/general/gr_float_to_int.h index ef1987a76..c10ea739d 100644 --- a/gnuradio-core/src/lib/general/gr_float_to_int.h +++ b/gnuradio-core/src/lib/general/gr_float_to_int.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_float_to_int.i b/gnuradio-core/src/lib/general/gr_float_to_int.i index 6e71f54a9..e2a2c53ce 100644 --- a/gnuradio-core/src/lib/general/gr_float_to_int.i +++ b/gnuradio-core/src/lib/general/gr_float_to_int.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,float_to_int) -gr_float_to_int_sptr +gr_float_to_int_sptr gr_make_float_to_int (size_t vlen=1, float scale=1); class gr_float_to_int : public gr_sync_block diff --git a/gnuradio-core/src/lib/general/gr_float_to_short.cc b/gnuradio-core/src/lib/general/gr_float_to_short.cc index 188bfdae3..07995c99a 100644 --- a/gnuradio-core/src/lib/general/gr_float_to_short.cc +++ b/gnuradio-core/src/lib/general/gr_float_to_short.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -45,7 +45,7 @@ gr_float_to_short::gr_float_to_short (size_t vlen, float scale) set_alignment(alignment_multiple); } -float +float gr_float_to_short::scale() const { return d_scale; diff --git a/gnuradio-core/src/lib/general/gr_float_to_short.h b/gnuradio-core/src/lib/general/gr_float_to_short.h index beb95486f..9e43804f5 100644 --- a/gnuradio-core/src/lib/general/gr_float_to_short.h +++ b/gnuradio-core/src/lib/general/gr_float_to_short.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_float_to_short.i b/gnuradio-core/src/lib/general/gr_float_to_short.i index 072da5213..ea59a388e 100644 --- a/gnuradio-core/src/lib/general/gr_float_to_short.i +++ b/gnuradio-core/src/lib/general/gr_float_to_short.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_float_to_uchar.cc b/gnuradio-core/src/lib/general/gr_float_to_uchar.cc index 78369f8be..5aec73b71 100644 --- a/gnuradio-core/src/lib/general/gr_float_to_uchar.cc +++ b/gnuradio-core/src/lib/general/gr_float_to_uchar.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 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, @@ -50,7 +50,7 @@ gr_float_to_uchar::work (int noutput_items, unsigned char *out = (unsigned char *) output_items[0]; gri_float_to_uchar (in, out, noutput_items); - + return noutput_items; } diff --git a/gnuradio-core/src/lib/general/gr_float_to_uchar.h b/gnuradio-core/src/lib/general/gr_float_to_uchar.h index fca8eb07b..7fd947048 100644 --- a/gnuradio-core/src/lib/general/gr_float_to_uchar.h +++ b/gnuradio-core/src/lib/general/gr_float_to_uchar.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gr_float_to_uchar.i b/gnuradio-core/src/lib/general/gr_float_to_uchar.i index fd3e72bbb..b35979213 100644 --- a/gnuradio-core/src/lib/general/gr_float_to_uchar.i +++ b/gnuradio-core/src/lib/general/gr_float_to_uchar.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gr_fmdet_cf.cc b/gnuradio-core/src/lib/general/gr_fmdet_cf.cc index 3d828124e..f02036292 100644 --- a/gnuradio-core/src/lib/general/gr_fmdet_cf.cc +++ b/gnuradio-core/src/lib/general/gr_fmdet_cf.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2010 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, @@ -55,7 +55,7 @@ gr_fmdet_cf::gr_fmdet_cf (float samplerate, float freq_low, float freq_high, flo float delta; std::vector<float> taps(15); - + d_freqhi = freq_high; d_freqlo = freq_low; delta = (d_freqhi - d_freqlo); @@ -63,7 +63,7 @@ gr_fmdet_cf::gr_fmdet_cf (float samplerate, float freq_low, float freq_high, flo d_bias = 0.5*scl*(d_freqhi+d_freqlo)/delta; for (int i=0;i<15;i++) taps[i] = h[i]; // d_filter = gr_fir_util::create_gr_fir_ccf(taps); - + } int @@ -94,7 +94,7 @@ gr_fmdet_cf::work (int noutput_items, S2=S1; S1=S0; - + *optr++ = d_freq-d_bias; } d_S1=S1; diff --git a/gnuradio-core/src/lib/general/gr_fmdet_cf.h b/gnuradio-core/src/lib/general/gr_fmdet_cf.h index 7bf3baa3f..f85630f2f 100644 --- a/gnuradio-core/src/lib/general/gr_fmdet_cf.h +++ b/gnuradio-core/src/lib/general/gr_fmdet_cf.h @@ -1,19 +1,19 @@ /* -*- 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, @@ -36,12 +36,12 @@ class gr_fir_ccf; /*! * \brief Implements an IQ slope detector - * + * * * input: stream of complex; output: stream of floats * * This implements a limiting slope detector. The limiter is in the - * normalization by the magnitude of the sample + * normalization by the magnitude of the sample */ class GR_CORE_API gr_fmdet_cf : public gr_sync_block diff --git a/gnuradio-core/src/lib/general/gr_fmdet_cf.i b/gnuradio-core/src/lib/general/gr_fmdet_cf.i index e1da717ce..2db596b7a 100644 --- a/gnuradio-core/src/lib/general/gr_fmdet_cf.i +++ b/gnuradio-core/src/lib/general/gr_fmdet_cf.i @@ -1,19 +1,19 @@ /* -*- 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, diff --git a/gnuradio-core/src/lib/general/gr_framer_sink_1.cc b/gnuradio-core/src/lib/general/gr_framer_sink_1.cc index c90b26c35..64a0af6a0 100644 --- a/gnuradio-core/src/lib/general/gr_framer_sink_1.cc +++ b/gnuradio-core/src/lib/general/gr_framer_sink_1.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006,2010 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, @@ -40,7 +40,7 @@ gr_framer_sink_1::enter_search() d_state = STATE_SYNC_SEARCH; } - + inline void gr_framer_sink_1::enter_have_sync() { @@ -93,13 +93,13 @@ gr_framer_sink_1::work (int noutput_items, { const unsigned char *in = (const unsigned char *) input_items[0]; int count=0; - + if (VERBOSE) fprintf(stderr,">>> Entering state machine\n"); while (count < noutput_items){ switch(d_state) { - + case STATE_SYNC_SEARCH: // Look for flag indicating beginning of pkt if (VERBOSE) fprintf(stderr,"SYNC Search, noutput=%d\n", noutput_items); @@ -137,11 +137,11 @@ gr_framer_sink_1::work (int noutput_items, // NOTE: passing header field as arg1 is not scalable gr_message_sptr msg = gr_make_message(0, d_packet_whitener_offset, 0, 0); - + d_target_queue->insert_tail(msg); // send it msg.reset(); // free it up - enter_search(); + enter_search(); } } else @@ -150,7 +150,7 @@ gr_framer_sink_1::work (int noutput_items, } } break; - + case STATE_HAVE_HEADER: if (VERBOSE) fprintf(stderr,"Packet Build\n"); diff --git a/gnuradio-core/src/lib/general/gr_framer_sink_1.h b/gnuradio-core/src/lib/general/gr_framer_sink_1.h index 95ad6ced7..93e41745f 100644 --- a/gnuradio-core/src/lib/general/gr_framer_sink_1.h +++ b/gnuradio-core/src/lib/general/gr_framer_sink_1.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2006 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, @@ -30,7 +30,7 @@ class gr_framer_sink_1; typedef boost::shared_ptr<gr_framer_sink_1> gr_framer_sink_1_sptr; -GR_CORE_API gr_framer_sink_1_sptr +GR_CORE_API gr_framer_sink_1_sptr gr_make_framer_sink_1 (gr_msg_queue_sptr target_queue); /*! @@ -41,7 +41,7 @@ gr_make_framer_sink_1 (gr_msg_queue_sptr target_queue); * output: none. Pushes assembled packet into target queue * * The framer expects a fixed length header of 2 16-bit shorts - * containing the payload length, followed by the payload. If the + * containing the payload length, followed by the payload. If the * 2 16-bit shorts are not identical, this packet is ignored. Better * algs are welcome. * @@ -53,7 +53,7 @@ gr_make_framer_sink_1 (gr_msg_queue_sptr target_queue); */ class GR_CORE_API gr_framer_sink_1 : public gr_sync_block { - friend GR_CORE_API gr_framer_sink_1_sptr + friend GR_CORE_API gr_framer_sink_1_sptr gr_make_framer_sink_1 (gr_msg_queue_sptr target_queue); private: @@ -80,7 +80,7 @@ class GR_CORE_API gr_framer_sink_1 : public gr_sync_block void enter_search(); void enter_have_sync(); void enter_have_header(int payload_len, int whitener_offset); - + bool header_ok() { // confirm that two copies of header info are identical diff --git a/gnuradio-core/src/lib/general/gr_framer_sink_1.i b/gnuradio-core/src/lib/general/gr_framer_sink_1.i index 1363f3f5b..06281b138 100644 --- a/gnuradio-core/src/lib/general/gr_framer_sink_1.i +++ b/gnuradio-core/src/lib/general/gr_framer_sink_1.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006 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, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,framer_sink_1); -gr_framer_sink_1_sptr +gr_framer_sink_1_sptr gr_make_framer_sink_1(gr_msg_queue_sptr target_queue); class gr_framer_sink_1 : public gr_sync_block diff --git a/gnuradio-core/src/lib/general/gr_frequency_modulator_fc.cc b/gnuradio-core/src/lib/general/gr_frequency_modulator_fc.cc index 34f2f88bc..5c4daec58 100644 --- a/gnuradio-core/src/lib/general/gr_frequency_modulator_fc.cc +++ b/gnuradio-core/src/lib/general/gr_frequency_modulator_fc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_frequency_modulator_fc.h b/gnuradio-core/src/lib/general/gr_frequency_modulator_fc.h index e3aaafb1a..c680e9648 100644 --- a/gnuradio-core/src/lib/general/gr_frequency_modulator_fc.h +++ b/gnuradio-core/src/lib/general/gr_frequency_modulator_fc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -50,7 +50,7 @@ class GR_CORE_API gr_frequency_modulator_fc : public gr_sync_block public: void set_sensitivity(float sens) { d_sensitivity = sens; } float sensitivity() const { return d_sensitivity; } - + int work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); diff --git a/gnuradio-core/src/lib/general/gr_frequency_modulator_fc.i b/gnuradio-core/src/lib/general/gr_frequency_modulator_fc.i index 7dfb82f1f..9a740583b 100644 --- a/gnuradio-core/src/lib/general/gr_frequency_modulator_fc.i +++ b/gnuradio-core/src/lib/general/gr_frequency_modulator_fc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_fxpt.cc b/gnuradio-core/src/lib/general/gr_fxpt.cc index 67f44a471..2ea8520e6 100644 --- a/gnuradio-core/src/lib/general/gr_fxpt.cc +++ b/gnuradio-core/src/lib/general/gr_fxpt.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_fxpt.h b/gnuradio-core/src/lib/general/gr_fxpt.h index 431102569..9de6c0c18 100644 --- a/gnuradio-core/src/lib/general/gr_fxpt.h +++ b/gnuradio-core/src/lib/general/gr_fxpt.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_fxpt_nco.h b/gnuradio-core/src/lib/general/gr_fxpt_nco.h index 5597efb4f..9473e6ddb 100644 --- a/gnuradio-core/src/lib/general/gr_fxpt_nco.h +++ b/gnuradio-core/src/lib/general/gr_fxpt_nco.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -61,8 +61,8 @@ public: // increment current phase angle - void step () - { + void step () + { d_phase += d_phase_inc; } diff --git a/gnuradio-core/src/lib/general/gr_fxpt_vco.h b/gnuradio-core/src/lib/general/gr_fxpt_vco.h index a77a31311..09c649de7 100644 --- a/gnuradio-core/src/lib/general/gr_fxpt_vco.h +++ b/gnuradio-core/src/lib/general/gr_fxpt_vco.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2004,2005 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, diff --git a/gnuradio-core/src/lib/general/gr_glfsr_source_b.cc b/gnuradio-core/src/lib/general/gr_glfsr_source_b.cc index 134f7a21a..fcfeb80dc 100644 --- a/gnuradio-core/src/lib/general/gr_glfsr_source_b.cc +++ b/gnuradio-core/src/lib/general/gr_glfsr_source_b.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2010 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, @@ -30,7 +30,7 @@ #include <gr_io_signature.h> #include <stdexcept> -gr_glfsr_source_b_sptr +gr_glfsr_source_b_sptr gr_make_glfsr_source_b(int degree, bool repeat, int mask, int seed) { return gnuradio::get_initial_sptr(new gr_glfsr_source_b(degree, repeat, mask, seed)); diff --git a/gnuradio-core/src/lib/general/gr_glfsr_source_b.h b/gnuradio-core/src/lib/general/gr_glfsr_source_b.h index bd66912ed..7549a76b3 100644 --- a/gnuradio-core/src/lib/general/gr_glfsr_source_b.h +++ b/gnuradio-core/src/lib/general/gr_glfsr_source_b.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, @@ -42,13 +42,13 @@ class GR_CORE_API gr_glfsr_source_b : public gr_sync_block private: friend GR_CORE_API gr_glfsr_source_b_sptr gr_make_glfsr_source_b(int degree, bool repeat, int mask, int seed); - + gri_glfsr *d_glfsr; bool d_repeat; unsigned int d_index; unsigned int d_length; - + gr_glfsr_source_b(int degree, bool repeat, int mask, int seed); public: diff --git a/gnuradio-core/src/lib/general/gr_glfsr_source_b.i b/gnuradio-core/src/lib/general/gr_glfsr_source_b.i index fe0a987f4..ffdd52ddb 100644 --- a/gnuradio-core/src/lib/general/gr_glfsr_source_b.i +++ b/gnuradio-core/src/lib/general/gr_glfsr_source_b.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, @@ -22,11 +22,11 @@ GR_SWIG_BLOCK_MAGIC(gr,glfsr_source_b); -gr_glfsr_source_b_sptr +gr_glfsr_source_b_sptr gr_make_glfsr_source_b(int degree, bool repeat=true, int mask=0, int seed=1) throw (std::runtime_error); -class gr_glfsr_source_b : public gr_sync_block +class gr_glfsr_source_b : public gr_sync_block { protected: gr_glfsr_source_b(int degree, bool repeat, int mask, int seed); diff --git a/gnuradio-core/src/lib/general/gr_glfsr_source_f.cc b/gnuradio-core/src/lib/general/gr_glfsr_source_f.cc index 7ffcfbd2a..a9efc8a70 100644 --- a/gnuradio-core/src/lib/general/gr_glfsr_source_f.cc +++ b/gnuradio-core/src/lib/general/gr_glfsr_source_f.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2010 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, @@ -30,7 +30,7 @@ #include <gr_io_signature.h> #include <stdexcept> -gr_glfsr_source_f_sptr +gr_glfsr_source_f_sptr gr_make_glfsr_source_f(int degree, bool repeat, int mask, int seed) { return gnuradio::get_initial_sptr(new gr_glfsr_source_f(degree, repeat, mask, seed)); diff --git a/gnuradio-core/src/lib/general/gr_glfsr_source_f.h b/gnuradio-core/src/lib/general/gr_glfsr_source_f.h index 2dd09c5ac..3549e3e5d 100644 --- a/gnuradio-core/src/lib/general/gr_glfsr_source_f.h +++ b/gnuradio-core/src/lib/general/gr_glfsr_source_f.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, @@ -42,13 +42,13 @@ class GR_CORE_API gr_glfsr_source_f : public gr_sync_block private: friend GR_CORE_API gr_glfsr_source_f_sptr gr_make_glfsr_source_f(int degree, bool repeat, int mask, int seed); - + gri_glfsr *d_glfsr; bool d_repeat; unsigned int d_index; unsigned int d_length; - + gr_glfsr_source_f(int degree, bool repeat, int mask, int seed); public: diff --git a/gnuradio-core/src/lib/general/gr_glfsr_source_f.i b/gnuradio-core/src/lib/general/gr_glfsr_source_f.i index d165ab896..2f84387c2 100644 --- a/gnuradio-core/src/lib/general/gr_glfsr_source_f.i +++ b/gnuradio-core/src/lib/general/gr_glfsr_source_f.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, @@ -22,11 +22,11 @@ GR_SWIG_BLOCK_MAGIC(gr,glfsr_source_f); -gr_glfsr_source_f_sptr +gr_glfsr_source_f_sptr gr_make_glfsr_source_f(int degree, bool repeat=true, int mask=0, int seed=1) throw (std::runtime_error); -class gr_glfsr_source_f : public gr_sync_block +class gr_glfsr_source_f : public gr_sync_block { protected: gr_glfsr_source_f(int degree, bool repeat, int mask, int seed); diff --git a/gnuradio-core/src/lib/general/gr_head.cc b/gnuradio-core/src/lib/general/gr_head.cc index b52735c06..cb07c84dd 100644 --- a/gnuradio-core/src/lib/general/gr_head.cc +++ b/gnuradio-core/src/lib/general/gr_head.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,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, @@ -50,7 +50,7 @@ gr_head::work (int noutput_items, return -1; // Done! unsigned n = std::min (d_nitems - d_ncopied_items, (unsigned long long) noutput_items); - + if (n == 0) return 0; diff --git a/gnuradio-core/src/lib/general/gr_head.h b/gnuradio-core/src/lib/general/gr_head.h index f66d43308..17dd737f0 100644 --- a/gnuradio-core/src/lib/general/gr_head.h +++ b/gnuradio-core/src/lib/general/gr_head.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,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, diff --git a/gnuradio-core/src/lib/general/gr_head.i b/gnuradio-core/src/lib/general/gr_head.i index 3aece9601..73feaf181 100644 --- a/gnuradio-core/src/lib/general/gr_head.i +++ b/gnuradio-core/src/lib/general/gr_head.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,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, diff --git a/gnuradio-core/src/lib/general/gr_int_to_float.cc b/gnuradio-core/src/lib/general/gr_int_to_float.cc index 7ec15b1a8..a28485305 100644 --- a/gnuradio-core/src/lib/general/gr_int_to_float.cc +++ b/gnuradio-core/src/lib/general/gr_int_to_float.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -52,7 +52,7 @@ gr_int_to_float::work (int noutput_items, { const int32_t *in = (const int32_t *) input_items[0]; float *out = (float *) output_items[0]; - + if(is_unaligned()) { volk_32i_s32f_convert_32f_u(out, in, d_scale, d_vlen*noutput_items); } diff --git a/gnuradio-core/src/lib/general/gr_int_to_float.h b/gnuradio-core/src/lib/general/gr_int_to_float.h index 7c55e3b3c..6200c5be7 100644 --- a/gnuradio-core/src/lib/general/gr_int_to_float.h +++ b/gnuradio-core/src/lib/general/gr_int_to_float.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -48,7 +48,7 @@ class GR_CORE_API gr_int_to_float : public gr_sync_block gr_int_to_float (size_t vlen, float scale); size_t d_vlen; - float d_scale; + float d_scale; public: /*! diff --git a/gnuradio-core/src/lib/general/gr_int_to_float.i b/gnuradio-core/src/lib/general/gr_int_to_float.i index c1f25e37b..f3781ac8a 100644 --- a/gnuradio-core/src/lib/general/gr_int_to_float.i +++ b/gnuradio-core/src/lib/general/gr_int_to_float.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_interleave.cc b/gnuradio-core/src/lib/general/gr_interleave.cc index d210cd5ed..5d572871e 100644 --- a/gnuradio-core/src/lib/general/gr_interleave.cc +++ b/gnuradio-core/src/lib/general/gr_interleave.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_interleave.h b/gnuradio-core/src/lib/general/gr_interleave.h index ef7bce07a..3b0202d00 100644 --- a/gnuradio-core/src/lib/general/gr_interleave.h +++ b/gnuradio-core/src/lib/general/gr_interleave.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_interleave.i b/gnuradio-core/src/lib/general/gr_interleave.i index 84c0c7de1..09a57c886 100644 --- a/gnuradio-core/src/lib/general/gr_interleave.i +++ b/gnuradio-core/src/lib/general/gr_interleave.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_interleaved_short_to_complex.cc b/gnuradio-core/src/lib/general/gr_interleaved_short_to_complex.cc index 09aa91f47..e7d375a35 100644 --- a/gnuradio-core/src/lib/general/gr_interleaved_short_to_complex.cc +++ b/gnuradio-core/src/lib/general/gr_interleaved_short_to_complex.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -51,7 +51,7 @@ gr_interleaved_short_to_complex::work (int noutput_items, gr_complex *out = (gr_complex *) output_items[0]; gri_interleaved_short_to_complex (in, out, 2 * noutput_items); - + return noutput_items; } diff --git a/gnuradio-core/src/lib/general/gr_interleaved_short_to_complex.h b/gnuradio-core/src/lib/general/gr_interleaved_short_to_complex.h index 40f1636bd..159d107b3 100644 --- a/gnuradio-core/src/lib/general/gr_interleaved_short_to_complex.h +++ b/gnuradio-core/src/lib/general/gr_interleaved_short_to_complex.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_interleaved_short_to_complex.i b/gnuradio-core/src/lib/general/gr_interleaved_short_to_complex.i index 3c78d64e0..797710550 100644 --- a/gnuradio-core/src/lib/general/gr_interleaved_short_to_complex.i +++ b/gnuradio-core/src/lib/general/gr_interleaved_short_to_complex.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_iqcomp_cc.cc b/gnuradio-core/src/lib/general/gr_iqcomp_cc.cc index 16a68337f..599b25b72 100644 --- a/gnuradio-core/src/lib/general/gr_iqcomp_cc.cc +++ b/gnuradio-core/src/lib/general/gr_iqcomp_cc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_iqcomp_cc.h b/gnuradio-core/src/lib/general/gr_iqcomp_cc.h index c01e2a6ba..2f5a44ebf 100644 --- a/gnuradio-core/src/lib/general/gr_iqcomp_cc.h +++ b/gnuradio-core/src/lib/general/gr_iqcomp_cc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -33,7 +33,7 @@ typedef boost::shared_ptr<gr_iqcomp_cc> gr_iqcomp_cc_sptr; GR_CORE_API gr_iqcomp_cc_sptr gr_make_iqcomp_cc (float mu); /*! - * \brief + * \brief * \ingroup misc_blk */ class GR_CORE_API gr_iqcomp_cc : public gr_sync_block diff --git a/gnuradio-core/src/lib/general/gr_iqcomp_cc.i b/gnuradio-core/src/lib/general/gr_iqcomp_cc.i index 91710ad28..5cca59dd5 100644 --- a/gnuradio-core/src/lib/general/gr_iqcomp_cc.i +++ b/gnuradio-core/src/lib/general/gr_iqcomp_cc.i @@ -1,19 +1,19 @@ /* -*- 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, diff --git a/gnuradio-core/src/lib/general/gr_keep_one_in_n.cc b/gnuradio-core/src/lib/general/gr_keep_one_in_n.cc index 3f98a003b..fbba9e91c 100644 --- a/gnuradio-core/src/lib/general/gr_keep_one_in_n.cc +++ b/gnuradio-core/src/lib/general/gr_keep_one_in_n.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -45,7 +45,7 @@ gr_keep_one_in_n::gr_keep_one_in_n (size_t item_size, int n) // this to turn off automatic tag propagation, which will be handled // locally in general_work(). set_tag_propagation_policy(TPP_DONT); - + set_n(n); } @@ -72,7 +72,7 @@ gr_keep_one_in_n::general_work (int noutput_items, { const char *in = (const char *) input_items[0]; char *out = (char *) output_items[0]; - + size_t item_size = input_signature ()->sizeof_stream_item (0); int ni = 0; int no = 0; diff --git a/gnuradio-core/src/lib/general/gr_keep_one_in_n.h b/gnuradio-core/src/lib/general/gr_keep_one_in_n.h index c32ed2a26..f37475204 100644 --- a/gnuradio-core/src/lib/general/gr_keep_one_in_n.h +++ b/gnuradio-core/src/lib/general/gr_keep_one_in_n.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -29,7 +29,7 @@ class gr_keep_one_in_n; typedef boost::shared_ptr<gr_keep_one_in_n> gr_keep_one_in_n_sptr; -GR_CORE_API gr_keep_one_in_n_sptr +GR_CORE_API gr_keep_one_in_n_sptr gr_make_keep_one_in_n (size_t item_size, int n); diff --git a/gnuradio-core/src/lib/general/gr_keep_one_in_n.i b/gnuradio-core/src/lib/general/gr_keep_one_in_n.i index a12a81547..534098cde 100644 --- a/gnuradio-core/src/lib/general/gr_keep_one_in_n.i +++ b/gnuradio-core/src/lib/general/gr_keep_one_in_n.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,keep_one_in_n) -gr_keep_one_in_n_sptr +gr_keep_one_in_n_sptr gr_make_keep_one_in_n (size_t itemsize, int n); class gr_keep_one_in_n : public gr_block diff --git a/gnuradio-core/src/lib/general/gr_kludge_copy.cc b/gnuradio-core/src/lib/general/gr_kludge_copy.cc index 142c444ca..f6a8d8af6 100644 --- a/gnuradio-core/src/lib/general/gr_kludge_copy.cc +++ b/gnuradio-core/src/lib/general/gr_kludge_copy.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_kludge_copy.h b/gnuradio-core/src/lib/general/gr_kludge_copy.h index 5c1e461a8..0bcf14469 100644 --- a/gnuradio-core/src/lib/general/gr_kludge_copy.h +++ b/gnuradio-core/src/lib/general/gr_kludge_copy.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_kludge_copy.i b/gnuradio-core/src/lib/general/gr_kludge_copy.i index a798ea69e..7ff2b5736 100644 --- a/gnuradio-core/src/lib/general/gr_kludge_copy.i +++ b/gnuradio-core/src/lib/general/gr_kludge_copy.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_lfsr_32k_source_s.cc b/gnuradio-core/src/lib/general/gr_lfsr_32k_source_s.cc index e227f8b3e..c9a874248 100644 --- a/gnuradio-core/src/lib/general/gr_lfsr_32k_source_s.cc +++ b/gnuradio-core/src/lib/general/gr_lfsr_32k_source_s.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -29,7 +29,7 @@ #include <stdexcept> -gr_lfsr_32k_source_s_sptr +gr_lfsr_32k_source_s_sptr gr_make_lfsr_32k_source_s () { return gnuradio::get_initial_sptr(new gr_lfsr_32k_source_s ()); @@ -43,7 +43,7 @@ gr_lfsr_32k_source_s::gr_lfsr_32k_source_s () d_index (0) { gri_lfsr_32k lfsr; - + for (int i = 0; i < BUFSIZE; i++) d_buffer[i] = lfsr.next_short (); } @@ -56,7 +56,7 @@ gr_lfsr_32k_source_s::work (int noutput_items, short *out = (short *) output_items[0]; short *buf = d_buffer; int index = d_index; - + for (int i = 0; i < noutput_items; i++){ out[i] = buf[index]; // index = (index + 1) & (BUFSIZE - 1); diff --git a/gnuradio-core/src/lib/general/gr_lfsr_32k_source_s.h b/gnuradio-core/src/lib/general/gr_lfsr_32k_source_s.h index aa7ad7b1f..db107652a 100644 --- a/gnuradio-core/src/lib/general/gr_lfsr_32k_source_s.h +++ b/gnuradio-core/src/lib/general/gr_lfsr_32k_source_s.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -43,7 +43,7 @@ class GR_CORE_API gr_lfsr_32k_source_s : public gr_sync_block { friend GR_CORE_API gr_lfsr_32k_source_s_sptr gr_make_lfsr_32k_source_s (); - + static const int BUFSIZE = 2048 - 1; // ensure pattern isn't packet aligned int d_index; short d_buffer[BUFSIZE]; diff --git a/gnuradio-core/src/lib/general/gr_lfsr_32k_source_s.i b/gnuradio-core/src/lib/general/gr_lfsr_32k_source_s.i index 621a9b79c..c2dc1c61b 100644 --- a/gnuradio-core/src/lib/general/gr_lfsr_32k_source_s.i +++ b/gnuradio-core/src/lib/general/gr_lfsr_32k_source_s.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -24,7 +24,7 @@ GR_SWIG_BLOCK_MAGIC(gr,lfsr_32k_source_s); gr_lfsr_32k_source_s_sptr gr_make_lfsr_32k_source_s (); -class gr_lfsr_32k_source_s : public gr_sync_block +class gr_lfsr_32k_source_s : public gr_sync_block { private: gr_lfsr_32k_source_s (); diff --git a/gnuradio-core/src/lib/general/gr_log2_const.h b/gnuradio-core/src/lib/general/gr_log2_const.h index 8e4a0860b..40afcf8b8 100644 --- a/gnuradio-core/src/lib/general/gr_log2_const.h +++ b/gnuradio-core/src/lib/general/gr_log2_const.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_map_bb.cc b/gnuradio-core/src/lib/general/gr_map_bb.cc index 7762c7e35..7deb8971a 100644 --- a/gnuradio-core/src/lib/general/gr_map_bb.cc +++ b/gnuradio-core/src/lib/general/gr_map_bb.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2007,2010 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, @@ -56,6 +56,6 @@ gr_map_bb::work (int noutput_items, for (int i = 0; i < noutput_items; i++) out[i] = d_map[in[i]]; - + return noutput_items; } diff --git a/gnuradio-core/src/lib/general/gr_map_bb.h b/gnuradio-core/src/lib/general/gr_map_bb.h index 0820c6a16..0a2f5a45f 100644 --- a/gnuradio-core/src/lib/general/gr_map_bb.h +++ b/gnuradio-core/src/lib/general/gr_map_bb.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_map_bb.i b/gnuradio-core/src/lib/general/gr_map_bb.i index d6224d37c..9c8bff644 100644 --- a/gnuradio-core/src/lib/general/gr_map_bb.i +++ b/gnuradio-core/src/lib/general/gr_map_bb.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_math.h b/gnuradio-core/src/lib/general/gr_math.h index 9c61942cd..b9a802da8 100644 --- a/gnuradio-core/src/lib/general/gr_math.h +++ b/gnuradio-core/src/lib/general/gr_math.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003,2005,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, @@ -54,9 +54,9 @@ gr_is_power_of_2(long x) */ GR_CORE_API float gr_fast_atan2f(float y, float x); -static inline float gr_fast_atan2f(gr_complex z) -{ - return gr_fast_atan2f(z.imag(), z.real()); +static inline float gr_fast_atan2f(gr_complex z) +{ + return gr_fast_atan2f(z.imag(), z.real()); } /* This bounds x by +/- clip without a branch */ @@ -96,7 +96,7 @@ static inline unsigned int gr_quad_45deg_slicer(float r, float i) ret = 1; else if((r < 0) && (i < 0)) ret = 2; - else + else ret = 3; return ret; } diff --git a/gnuradio-core/src/lib/general/gr_misc.cc b/gnuradio-core/src/lib/general/gr_misc.cc index 0f352c959..1ed2a03d7 100644 --- a/gnuradio-core/src/lib/general/gr_misc.cc +++ b/gnuradio-core/src/lib/general/gr_misc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -25,7 +25,7 @@ #endif #include <gr_misc.h> -unsigned int +unsigned int gr_rounduppow2(unsigned int n) { int i; diff --git a/gnuradio-core/src/lib/general/gr_misc.h b/gnuradio-core/src/lib/general/gr_misc.h index 6e2bf78b7..0c790e90c 100644 --- a/gnuradio-core/src/lib/general/gr_misc.h +++ b/gnuradio-core/src/lib/general/gr_misc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -26,7 +26,7 @@ #include <gr_core_api.h> #include <gr_types.h> -GR_CORE_API unsigned int +GR_CORE_API unsigned int gr_rounduppow2(unsigned int n); // FIXME should be template diff --git a/gnuradio-core/src/lib/general/gr_multiply_cc.cc b/gnuradio-core/src/lib/general/gr_multiply_cc.cc index 0d20e6257..32c44a19e 100644 --- a/gnuradio-core/src/lib/general/gr_multiply_cc.cc +++ b/gnuradio-core/src/lib/general/gr_multiply_cc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_multiply_cc.h b/gnuradio-core/src/lib/general/gr_multiply_cc.h index f80ec8b25..d25935b4c 100644 --- a/gnuradio-core/src/lib/general/gr_multiply_cc.h +++ b/gnuradio-core/src/lib/general/gr_multiply_cc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -43,7 +43,7 @@ class GR_CORE_API gr_multiply_cc : public gr_sync_block friend GR_CORE_API gr_multiply_cc_sptr gr_make_multiply_cc (size_t vlen); gr_multiply_cc (size_t vlen); - + size_t d_vlen; public: diff --git a/gnuradio-core/src/lib/general/gr_multiply_cc.i b/gnuradio-core/src/lib/general/gr_multiply_cc.i index 61768c390..f0faa3594 100644 --- a/gnuradio-core/src/lib/general/gr_multiply_cc.i +++ b/gnuradio-core/src/lib/general/gr_multiply_cc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_multiply_conjugate_cc.cc b/gnuradio-core/src/lib/general/gr_multiply_conjugate_cc.cc index 103d87b8b..53ede2eed 100644 --- a/gnuradio-core/src/lib/general/gr_multiply_conjugate_cc.cc +++ b/gnuradio-core/src/lib/general/gr_multiply_conjugate_cc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_multiply_conjugate_cc.h b/gnuradio-core/src/lib/general/gr_multiply_conjugate_cc.h index eb032f31b..826e28771 100644 --- a/gnuradio-core/src/lib/general/gr_multiply_conjugate_cc.h +++ b/gnuradio-core/src/lib/general/gr_multiply_conjugate_cc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -44,7 +44,7 @@ class GR_CORE_API gr_multiply_conjugate_cc : public gr_sync_block friend GR_CORE_API gr_multiply_conjugate_cc_sptr gr_make_multiply_conjugate_cc (size_t vlen); gr_multiply_conjugate_cc (size_t vlen); - + size_t d_vlen; public: diff --git a/gnuradio-core/src/lib/general/gr_multiply_conjugate_cc.i b/gnuradio-core/src/lib/general/gr_multiply_conjugate_cc.i index 023410505..e7979dbcd 100644 --- a/gnuradio-core/src/lib/general/gr_multiply_conjugate_cc.i +++ b/gnuradio-core/src/lib/general/gr_multiply_conjugate_cc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_multiply_const_cc.cc b/gnuradio-core/src/lib/general/gr_multiply_const_cc.cc index 59521f54a..359ab6ba0 100644 --- a/gnuradio-core/src/lib/general/gr_multiply_const_cc.cc +++ b/gnuradio-core/src/lib/general/gr_multiply_const_cc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_multiply_const_cc.h b/gnuradio-core/src/lib/general/gr_multiply_const_cc.h index 1791d9160..97962abc7 100644 --- a/gnuradio-core/src/lib/general/gr_multiply_const_cc.h +++ b/gnuradio-core/src/lib/general/gr_multiply_const_cc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_multiply_const_cc.i b/gnuradio-core/src/lib/general/gr_multiply_const_cc.i index be8d32b31..c2f3cbed3 100644 --- a/gnuradio-core/src/lib/general/gr_multiply_const_cc.i +++ b/gnuradio-core/src/lib/general/gr_multiply_const_cc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_multiply_const_ff.cc b/gnuradio-core/src/lib/general/gr_multiply_const_ff.cc index 8354cb27b..263f06610 100644 --- a/gnuradio-core/src/lib/general/gr_multiply_const_ff.cc +++ b/gnuradio-core/src/lib/general/gr_multiply_const_ff.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_multiply_const_ff.h b/gnuradio-core/src/lib/general/gr_multiply_const_ff.h index ef42a92f4..fac73f88a 100644 --- a/gnuradio-core/src/lib/general/gr_multiply_const_ff.h +++ b/gnuradio-core/src/lib/general/gr_multiply_const_ff.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_multiply_const_ff.i b/gnuradio-core/src/lib/general/gr_multiply_const_ff.i index 0fd3b1225..343f67cd2 100644 --- a/gnuradio-core/src/lib/general/gr_multiply_const_ff.i +++ b/gnuradio-core/src/lib/general/gr_multiply_const_ff.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_multiply_ff.cc b/gnuradio-core/src/lib/general/gr_multiply_ff.cc index a7d34ce51..f764a71e8 100644 --- a/gnuradio-core/src/lib/general/gr_multiply_ff.cc +++ b/gnuradio-core/src/lib/general/gr_multiply_ff.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -40,7 +40,7 @@ gr_multiply_ff::gr_multiply_ff (size_t vlen) gr_make_io_signature (1, 1, sizeof (float)*vlen)), d_vlen(vlen) { - const int alignment_multiple = + const int alignment_multiple = volk_get_alignment() / sizeof(float); set_alignment(alignment_multiple); } diff --git a/gnuradio-core/src/lib/general/gr_multiply_ff.h b/gnuradio-core/src/lib/general/gr_multiply_ff.h index ae36cb1e0..ed628385c 100644 --- a/gnuradio-core/src/lib/general/gr_multiply_ff.h +++ b/gnuradio-core/src/lib/general/gr_multiply_ff.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -43,7 +43,7 @@ class GR_CORE_API gr_multiply_ff : public gr_sync_block friend GR_CORE_API gr_multiply_ff_sptr gr_make_multiply_ff (size_t vlen); gr_multiply_ff (size_t vlen); - + size_t d_vlen; public: diff --git a/gnuradio-core/src/lib/general/gr_multiply_ff.i b/gnuradio-core/src/lib/general/gr_multiply_ff.i index 0f06301f2..e5fdea348 100644 --- a/gnuradio-core/src/lib/general/gr_multiply_ff.i +++ b/gnuradio-core/src/lib/general/gr_multiply_ff.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_nco.h b/gnuradio-core/src/lib/general/gr_nco.h index 0e740a317..fb51106aa 100644 --- a/gnuradio-core/src/lib/general/gr_nco.h +++ b/gnuradio-core/src/lib/general/gr_nco.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -36,7 +36,7 @@ //FIXME Eventually generalize this to fixed point -template<class o_type, class i_type> +template<class o_type, class i_type> class gr_nco { public: gr_nco () : phase (0), phase_inc(0) {} @@ -66,11 +66,11 @@ public: // increment current phase angle - void step () - { - phase += phase_inc; + void step () + { + phase += phase_inc; if (fabs (phase) > M_PI){ - + while (phase > M_PI) phase -= 2*M_PI; @@ -83,7 +83,7 @@ public: { phase += phase_inc * n; if (fabs (phase) > M_PI){ - + while (phase > M_PI) phase -= 2*M_PI; @@ -117,14 +117,14 @@ protected: double phase_inc; }; -template<class o_type, class i_type> +template<class o_type, class i_type> void gr_nco<o_type,i_type>::sincos (float *sinx, float *cosx) const { gr_sincosf (phase, sinx, cosx); } -template<class o_type, class i_type> +template<class o_type, class i_type> void gr_nco<o_type,i_type>::sin (float *output, int noutput_items, double ampl) { @@ -134,7 +134,7 @@ gr_nco<o_type,i_type>::sin (float *output, int noutput_items, double ampl) } } -template<class o_type, class i_type> +template<class o_type, class i_type> void gr_nco<o_type,i_type>::cos (float *output, int noutput_items, double ampl) { @@ -144,7 +144,7 @@ gr_nco<o_type,i_type>::cos (float *output, int noutput_items, double ampl) } } -template<class o_type, class i_type> +template<class o_type, class i_type> void gr_nco<o_type,i_type>::sin (short *output, int noutput_items, double ampl) { @@ -154,7 +154,7 @@ gr_nco<o_type,i_type>::sin (short *output, int noutput_items, double ampl) } } -template<class o_type, class i_type> +template<class o_type, class i_type> void gr_nco<o_type,i_type>::cos (short *output, int noutput_items, double ampl) { @@ -164,7 +164,7 @@ gr_nco<o_type,i_type>::cos (short *output, int noutput_items, double ampl) } } -template<class o_type, class i_type> +template<class o_type, class i_type> void gr_nco<o_type,i_type>::sin (int *output, int noutput_items, double ampl) { @@ -174,7 +174,7 @@ gr_nco<o_type,i_type>::sin (int *output, int noutput_items, double ampl) } } -template<class o_type, class i_type> +template<class o_type, class i_type> void gr_nco<o_type,i_type>::cos (int *output, int noutput_items, double ampl) { @@ -184,7 +184,7 @@ gr_nco<o_type,i_type>::cos (int *output, int noutput_items, double ampl) } } -template<class o_type, class i_type> +template<class o_type, class i_type> void gr_nco<o_type,i_type>::sincos (gr_complex *output, int noutput_items, double ampl) { diff --git a/gnuradio-core/src/lib/general/gr_nlog10_ff.cc b/gnuradio-core/src/lib/general/gr_nlog10_ff.cc index 15d28d484..24cfe25fb 100644 --- a/gnuradio-core/src/lib/general/gr_nlog10_ff.cc +++ b/gnuradio-core/src/lib/general/gr_nlog10_ff.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_nlog10_ff.h b/gnuradio-core/src/lib/general/gr_nlog10_ff.h index cea56f87e..cfeba3fee 100644 --- a/gnuradio-core/src/lib/general/gr_nlog10_ff.h +++ b/gnuradio-core/src/lib/general/gr_nlog10_ff.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gr_nlog10_ff.i b/gnuradio-core/src/lib/general/gr_nlog10_ff.i index befe5886a..73da59793 100644 --- a/gnuradio-core/src/lib/general/gr_nlog10_ff.i +++ b/gnuradio-core/src/lib/general/gr_nlog10_ff.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gr_nop.cc b/gnuradio-core/src/lib/general/gr_nop.cc index bd5e4fd81..ca5983c39 100644 --- a/gnuradio-core/src/lib/general/gr_nop.cc +++ b/gnuradio-core/src/lib/general/gr_nop.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -60,6 +60,6 @@ gr_nop::general_work (int noutput_items, // eat any input that's available for (unsigned i = 0; i < ninput_items.size (); i++) consume (i, ninput_items[i]); - + return noutput_items; } diff --git a/gnuradio-core/src/lib/general/gr_nop.h b/gnuradio-core/src/lib/general/gr_nop.h index b8398befc..e0d59280f 100644 --- a/gnuradio-core/src/lib/general/gr_nop.h +++ b/gnuradio-core/src/lib/general/gr_nop.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_nop.i b/gnuradio-core/src/lib/general/gr_nop.i index 85354d421..977a15d18 100644 --- a/gnuradio-core/src/lib/general/gr_nop.i +++ b/gnuradio-core/src/lib/general/gr_nop.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_null_sink.cc b/gnuradio-core/src/lib/general/gr_null_sink.cc index 67ef57a46..183665502 100644 --- a/gnuradio-core/src/lib/general/gr_null_sink.cc +++ b/gnuradio-core/src/lib/general/gr_null_sink.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_null_sink.h b/gnuradio-core/src/lib/general/gr_null_sink.h index c6c4f36fb..737429329 100644 --- a/gnuradio-core/src/lib/general/gr_null_sink.h +++ b/gnuradio-core/src/lib/general/gr_null_sink.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_null_sink.i b/gnuradio-core/src/lib/general/gr_null_sink.i index e739ce118..80411f9b7 100644 --- a/gnuradio-core/src/lib/general/gr_null_sink.i +++ b/gnuradio-core/src/lib/general/gr_null_sink.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_null_source.cc b/gnuradio-core/src/lib/general/gr_null_source.cc index 85fd2db4b..1ad5c351d 100644 --- a/gnuradio-core/src/lib/general/gr_null_source.cc +++ b/gnuradio-core/src/lib/general/gr_null_source.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_null_source.h b/gnuradio-core/src/lib/general/gr_null_source.h index 33687fbaa..1c64e8bd9 100644 --- a/gnuradio-core/src/lib/general/gr_null_source.h +++ b/gnuradio-core/src/lib/general/gr_null_source.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -46,7 +46,7 @@ class GR_CORE_API gr_null_source : public gr_sync_block virtual int work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); - + }; #endif /* INCLUDED_GR_NULL_SOURCE_H */ diff --git a/gnuradio-core/src/lib/general/gr_null_source.i b/gnuradio-core/src/lib/general/gr_null_source.i index 133161d0a..120a59999 100644 --- a/gnuradio-core/src/lib/general/gr_null_source.i +++ b/gnuradio-core/src/lib/general/gr_null_source.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_ofdm_bpsk_demapper.cc b/gnuradio-core/src/lib/general/gr_ofdm_bpsk_demapper.cc index bcb469651..2b718e5ce 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_bpsk_demapper.cc +++ b/gnuradio-core/src/lib/general/gr_ofdm_bpsk_demapper.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, @@ -67,13 +67,13 @@ gr_ofdm_bpsk_demapper::general_work(int noutput_items, { const gr_complex *in = (const gr_complex *)input_items[0]; unsigned char *out = (unsigned char *) output_items[0]; - + unsigned int i=0, bytes_produced=0; while(i < d_occupied_carriers) { while((d_byte_offset < 8) && (i < d_occupied_carriers)) { - //fprintf(stderr, "%f+j%f\n", in[i].real(), in[i].imag()); + //fprintf(stderr, "%f+j%f\n", in[i].real(), in[i].imag()); d_partial_byte |= slicer(in[i++]) << (d_byte_offset++); } diff --git a/gnuradio-core/src/lib/general/gr_ofdm_bpsk_demapper.h b/gnuradio-core/src/lib/general/gr_ofdm_bpsk_demapper.h index 6d532d50f..d69d427ed 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_bpsk_demapper.h +++ b/gnuradio-core/src/lib/general/gr_ofdm_bpsk_demapper.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -31,7 +31,7 @@ class gr_ofdm_bpsk_demapper; typedef boost::shared_ptr<gr_ofdm_bpsk_demapper> gr_ofdm_bpsk_demapper_sptr; -GR_CORE_API gr_ofdm_bpsk_demapper_sptr +GR_CORE_API gr_ofdm_bpsk_demapper_sptr gr_make_ofdm_bpsk_demapper (unsigned int occupied_carriers); @@ -44,17 +44,17 @@ class GR_CORE_API gr_ofdm_bpsk_demapper : public gr_block { friend GR_CORE_API gr_ofdm_bpsk_demapper_sptr gr_make_ofdm_bpsk_demapper (unsigned int occupied_carriers); - + protected: gr_ofdm_bpsk_demapper (unsigned int occupied_carriers); - + private: unsigned char slicer(gr_complex x); unsigned int d_occupied_carriers; unsigned int d_byte_offset; unsigned char d_partial_byte; - + void forecast(int noutput_items, gr_vector_int &ninput_items_required); public: diff --git a/gnuradio-core/src/lib/general/gr_ofdm_bpsk_demapper.i b/gnuradio-core/src/lib/general/gr_ofdm_bpsk_demapper.i index 4ad5ed134..e58a4e40c 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_bpsk_demapper.i +++ b/gnuradio-core/src/lib/general/gr_ofdm_bpsk_demapper.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006 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, @@ -24,7 +24,7 @@ GR_SWIG_BLOCK_MAGIC(gr,ofdm_bpsk_demapper) -gr_ofdm_bpsk_demapper_sptr +gr_ofdm_bpsk_demapper_sptr gr_make_ofdm_bpsk_demapper (unsigned int occupied_carriers); class gr_ofdm_bpsk_demapper : public gr_sync_decimator diff --git a/gnuradio-core/src/lib/general/gr_ofdm_frame_sink2.cc b/gnuradio-core/src/lib/general/gr_ofdm_frame_sink2.cc index 40574b4e9..eb1232756 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_frame_sink2.cc +++ b/gnuradio-core/src/lib/general/gr_ofdm_frame_sink2.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2008,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -46,7 +46,7 @@ gr_ofdm_frame_sink2::enter_search() d_state = STATE_SYNC_SEARCH; } - + inline void gr_ofdm_frame_sink2::enter_have_sync() { @@ -81,7 +81,7 @@ gr_ofdm_frame_sink2::enter_have_header() d_packetlen_cnt = 0; if (VERBOSE) - fprintf(stderr, "@ enter_have_header (payload_len = %d) (offset = %d)\n", + fprintf(stderr, "@ enter_have_header (payload_len = %d) (offset = %d)\n", d_packetlen, d_packet_whitener_offset); } @@ -103,25 +103,25 @@ unsigned int gr_ofdm_frame_sink2::demapper(const gr_complex *in, d_nresid = 0; d_resid = 0; } - + //while((d_byte_offset < 8) && (i < d_occupied_carriers)) { while((d_byte_offset < 8) && (i < d_subcarrier_map.size())) { //gr_complex sigrot = in[i]*carrier*d_dfe[i]; gr_complex sigrot = in[d_subcarrier_map[i]]*carrier*d_dfe[i]; - + if(d_derotated_output != NULL){ d_derotated_output[i] = sigrot; } - + unsigned char bits = d_constell->decision_maker(&sigrot); gr_complex closest_sym = d_constell->points()[bits]; - + accum_error += sigrot * conj(closest_sym); // FIX THE FOLLOWING STATEMENT if (norm(sigrot)> 0.001) d_dfe[i] += d_eq_gain*(closest_sym/sigrot-d_dfe[i]); - + i++; if((8 - d_byte_offset) >= d_nbits) { @@ -135,7 +135,7 @@ unsigned int gr_ofdm_frame_sink2::demapper(const gr_complex *in, d_resid = bits >> (8-d_byte_offset); d_byte_offset += (d_nbits - d_nresid); } - //printf("demod symbol: %.4f + j%.4f bits: %x partial_byte: %x byte_offset: %d resid: %x nresid: %d\n", + //printf("demod symbol: %.4f + j%.4f bits: %x partial_byte: %x byte_offset: %d resid: %x nresid: %d\n", // in[i-1].real(), in[i-1].imag(), bits, d_partial_byte, d_byte_offset, d_resid, d_nresid); } @@ -154,10 +154,10 @@ unsigned int gr_ofdm_frame_sink2::demapper(const gr_complex *in, d_phase = d_phase + d_freq - d_phase_gain*angle; if (d_phase >= 2*M_PI) d_phase -= 2*M_PI; if (d_phase <0) d_phase += 2*M_PI; - + //if(VERBOSE) // std::cerr << angle << "\t" << d_freq << "\t" << d_phase << "\t" << std::endl; - + return bytes_produced; } @@ -180,7 +180,7 @@ gr_ofdm_frame_sink2::gr_ofdm_frame_sink2(gr_constellation_sptr constell, gr_make_io_signature2 (2, 2, sizeof(gr_complex)*occupied_carriers, sizeof(char)), gr_make_io_signature (1, 1, sizeof(gr_complex)*occupied_carriers)), d_constell(constell), - d_target_queue(target_queue), d_occupied_carriers(occupied_carriers), + d_target_queue(target_queue), d_occupied_carriers(occupied_carriers), d_byte_offset(0), d_partial_byte(0), d_resid(0), d_nresid(0),d_phase(0),d_freq(0),d_phase_gain(phase_gain),d_freq_gain(freq_gain), d_eq_gain(0.05) @@ -191,13 +191,13 @@ gr_ofdm_frame_sink2::gr_ofdm_frame_sink2(gr_constellation_sptr constell, std::string carriers = "FE7F"; // A bit hacky to fill out carriers to occupied_carriers length - int diff = (d_occupied_carriers - 4*carriers.length()); + int diff = (d_occupied_carriers - 4*carriers.length()); while(diff > 7) { carriers.insert(0, "f"); carriers.insert(carriers.length(), "f"); diff -= 8; } - + // if there's extras left to be processed // divide remaining to put on either side of current map // all of this is done to stick with the concept of a carrier map string that @@ -207,7 +207,7 @@ gr_ofdm_frame_sink2::gr_ofdm_frame_sink2(gr_constellation_sptr constell, int diff_right=0; // dictionary to convert from integers to ascii hex representation - char abc[16] = {'0', '1', '2', '3', '4', '5', '6', '7', + char abc[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; if(diff > 0) { char c[2] = {0,0}; @@ -215,7 +215,7 @@ gr_ofdm_frame_sink2::gr_ofdm_frame_sink2(gr_constellation_sptr constell, diff_left = (int)ceil((float)diff/2.0f); // number of carriers to put on the left side c[0] = abc[(1 << diff_left) - 1]; // convert to bits and move to ASCI integer carriers.insert(0, c); - + diff_right = diff - diff_left; // number of carriers to put on the right side c[0] = abc[0xF^((1 << diff_right) - 1)]; // convert to bits and move to ASCI integer carriers.insert(carriers.length(), c); @@ -235,7 +235,7 @@ gr_ofdm_frame_sink2::gr_ofdm_frame_sink2(gr_constellation_sptr constell, } } } - + // make sure we stay in the limit currently imposed by the occupied_carriers if(d_subcarrier_map.size() > d_occupied_carriers) { throw std::invalid_argument("gr_ofdm_mapper_bcv: subcarriers allocated exceeds size of occupied carriers"); @@ -271,26 +271,26 @@ gr_ofdm_frame_sink2::work (int noutput_items, d_derotated_output = (gr_complex *)output_items[0]; else d_derotated_output = NULL; - + if (VERBOSE) fprintf(stderr,">>> Entering state machine\n"); switch(d_state) { - + case STATE_SYNC_SEARCH: // Look for flag indicating beginning of pkt if (VERBOSE) fprintf(stderr,"SYNC Search, noutput=%d\n", noutput_items); - + if (sig[0]) { // Found it, set up for header decode enter_have_sync(); } break; case STATE_HAVE_SYNC: - // only demod after getting the preamble signal; otherwise, the + // only demod after getting the preamble signal; otherwise, the // equalizer taps will screw with the PLL performance bytes = demapper(&in[0], d_bytes_out); - + if (VERBOSE) { if(sig[0]) printf("ERROR -- Found SYNC in HAVE_SYNC\n"); @@ -302,31 +302,31 @@ gr_ofdm_frame_sink2::work (int noutput_items, while(j < bytes) { d_header = (d_header << 8) | (d_bytes_out[j] & 0xFF); j++; - + if (++d_headerbytelen_cnt == HEADERBYTELEN) { - + if (VERBOSE) fprintf(stderr, "got header: 0x%08x\n", d_header); - + // we have a full header, check to see if it has been received properly if (header_ok()){ enter_have_header(); - + if (VERBOSE) printf("\nPacket Length: %d\n", d_packetlen); - + while((j < bytes) && (d_packetlen_cnt < d_packetlen)) { d_packet[d_packetlen_cnt++] = d_bytes_out[j++]; } - + if(d_packetlen_cnt == d_packetlen) { gr_message_sptr msg = gr_make_message(0, d_packet_whitener_offset, 0, d_packetlen); memcpy(msg->msg(), d_packet, d_packetlen_cnt); d_target_queue->insert_tail(msg); // send it msg.reset(); // free it up - - enter_search(); + + enter_search(); } } else { @@ -335,7 +335,7 @@ gr_ofdm_frame_sink2::work (int noutput_items, } } break; - + case STATE_HAVE_HEADER: bytes = demapper(&in[0], d_bytes_out); @@ -344,30 +344,30 @@ gr_ofdm_frame_sink2::work (int noutput_items, printf("ERROR -- Found SYNC in HAVE_HEADER at %d, length of %d\n", d_packetlen_cnt, d_packetlen); fprintf(stderr,"Packet Build\n"); } - + j = 0; while(j < bytes) { d_packet[d_packetlen_cnt++] = d_bytes_out[j++]; - + if (d_packetlen_cnt == d_packetlen){ // packet is filled // build a message // NOTE: passing header field as arg1 is not scalable gr_message_sptr msg = gr_make_message(0, d_packet_whitener_offset, 0, d_packetlen_cnt); memcpy(msg->msg(), d_packet, d_packetlen_cnt); - + d_target_queue->insert_tail(msg); // send it msg.reset(); // free it up - + enter_search(); break; } } break; - + default: assert(0); - + } // switch return 1; diff --git a/gnuradio-core/src/lib/general/gr_ofdm_frame_sink2.h b/gnuradio-core/src/lib/general/gr_ofdm_frame_sink2.h index 9595303b1..a743e8c5a 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_frame_sink2.h +++ b/gnuradio-core/src/lib/general/gr_ofdm_frame_sink2.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -31,7 +31,7 @@ class gr_ofdm_frame_sink2; typedef boost::shared_ptr<gr_ofdm_frame_sink2> gr_ofdm_frame_sink2_sptr; -GR_CORE_API gr_ofdm_frame_sink2_sptr +GR_CORE_API gr_ofdm_frame_sink2_sptr gr_make_ofdm_frame_sink2 (gr_constellation_sptr constell, gr_msg_queue_sptr target_queue, unsigned int occupied_tones, float phase_gain=0.25, float freq_gain=0.25*0.25/4.0); @@ -48,8 +48,8 @@ gr_make_ofdm_frame_sink2 (gr_constellation_sptr constell, */ class GR_CORE_API gr_ofdm_frame_sink2 : public gr_sync_block { - friend GR_CORE_API gr_ofdm_frame_sink2_sptr - gr_make_ofdm_frame_sink2 (gr_constellation_sptr constell, + friend GR_CORE_API gr_ofdm_frame_sink2_sptr + gr_make_ofdm_frame_sink2 (gr_constellation_sptr constell, gr_msg_queue_sptr target_queue, unsigned int occupied_tones, float phase_gain, float freq_gain); @@ -64,7 +64,7 @@ class GR_CORE_API gr_ofdm_frame_sink2 : public gr_sync_block unsigned int d_header; // header bits int d_headerbytelen_cnt; // how many so far - unsigned char *d_bytes_out; // hold the current bytes produced by the demapper + unsigned char *d_bytes_out; // hold the current bytes produced by the demapper unsigned int d_occupied_carriers; unsigned int d_byte_offset; @@ -99,13 +99,13 @@ class GR_CORE_API gr_ofdm_frame_sink2 : public gr_sync_block void enter_search(); void enter_have_sync(); void enter_have_header(); - + bool header_ok() { // confirm that two copies of header info are identical return ((d_header >> 16) ^ (d_header & 0xffff)) == 0; } - + unsigned char slicer(const gr_complex x); unsigned int demapper(const gr_complex *in, unsigned char *out); diff --git a/gnuradio-core/src/lib/general/gr_ofdm_frame_sink2.i b/gnuradio-core/src/lib/general/gr_ofdm_frame_sink2.i index 8fa320089..8c04d1e16 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_frame_sink2.i +++ b/gnuradio-core/src/lib/general/gr_ofdm_frame_sink2.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,ofdm_frame_sink2); -gr_ofdm_frame_sink2_sptr +gr_ofdm_frame_sink2_sptr gr_make_ofdm_frame_sink2(gr_constellation_sptr constell, gr_msg_queue_sptr target_queue, unsigned int occupied_tones, float phase_gain=0.25, float freq_gain=0.25*0.25/4); diff --git a/gnuradio-core/src/lib/general/gr_pa_2x2_phase_combiner.cc b/gnuradio-core/src/lib/general/gr_pa_2x2_phase_combiner.cc index a79e34be4..318753672 100644 --- a/gnuradio-core/src/lib/general/gr_pa_2x2_phase_combiner.cc +++ b/gnuradio-core/src/lib/general/gr_pa_2x2_phase_combiner.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_pa_2x2_phase_combiner.h b/gnuradio-core/src/lib/general/gr_pa_2x2_phase_combiner.h index abb23e002..d430d154f 100644 --- a/gnuradio-core/src/lib/general/gr_pa_2x2_phase_combiner.h +++ b/gnuradio-core/src/lib/general/gr_pa_2x2_phase_combiner.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_pa_2x2_phase_combiner.i b/gnuradio-core/src/lib/general/gr_pa_2x2_phase_combiner.i index bcca5033f..2cd373a5e 100644 --- a/gnuradio-core/src/lib/general/gr_pa_2x2_phase_combiner.i +++ b/gnuradio-core/src/lib/general/gr_pa_2x2_phase_combiner.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_packet_sink.cc b/gnuradio-core/src/lib/general/gr_packet_sink.cc index d66d96839..19a8c5fc2 100644 --- a/gnuradio-core/src/lib/general/gr_packet_sink.cc +++ b/gnuradio-core/src/lib/general/gr_packet_sink.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -48,7 +48,7 @@ gr_packet_sink::enter_search() d_state = STATE_SYNC_SEARCH; d_shift_reg = 0; } - + inline void gr_packet_sink::enter_have_sync() { @@ -108,13 +108,13 @@ gr_packet_sink::work (int noutput_items, { float *inbuf = (float *) input_items[0]; int count=0; - + if (VERBOSE) fprintf(stderr,">>> Entering state machine\n"),fflush(stderr); while (count<noutput_items) { switch(d_state) { - + case STATE_SYNC_SEARCH: // Look for sync vector if (VERBOSE) fprintf(stderr,"SYNC Search, noutput=%d\n",noutput_items),fflush(stderr); @@ -164,7 +164,7 @@ gr_packet_sink::work (int noutput_items, } } break; - + case STATE_HAVE_HEADER: if (VERBOSE) fprintf(stderr,"Packet Build\n"),fflush(stderr); @@ -174,7 +174,7 @@ gr_packet_sink::work (int noutput_items, d_packet_byte = (d_packet_byte << 1) | 1; else d_packet_byte = d_packet_byte << 1; - + if (d_packet_byte_index++ == 7) { // byte is full so move to next byte d_packet[d_packetlen_cnt++] = d_packet_byte; d_packet_byte_index = 0; @@ -182,7 +182,7 @@ gr_packet_sink::work (int noutput_items, if (d_packetlen_cnt == d_packetlen){ // packet is filled // build a message - gr_message_sptr msg = gr_make_message(0, 0, 0, d_packetlen_cnt); + gr_message_sptr msg = gr_make_message(0, 0, 0, d_packetlen_cnt); memcpy(msg->msg(), d_packet, d_packetlen_cnt); d_target_queue->insert_tail(msg); // send it @@ -204,4 +204,4 @@ gr_packet_sink::work (int noutput_items, return noutput_items; } - + diff --git a/gnuradio-core/src/lib/general/gr_packet_sink.h b/gnuradio-core/src/lib/general/gr_packet_sink.h index 89a95f3e3..b4cb0b0f6 100644 --- a/gnuradio-core/src/lib/general/gr_packet_sink.h +++ b/gnuradio-core/src/lib/general/gr_packet_sink.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -30,7 +30,7 @@ class gr_packet_sink; typedef boost::shared_ptr<gr_packet_sink> gr_packet_sink_sptr; -GR_CORE_API gr_packet_sink_sptr +GR_CORE_API gr_packet_sink_sptr gr_make_packet_sink (const std::vector<unsigned char>& sync_vector, gr_msg_queue_sptr target_queue, int threshold = -1 // -1 -> use default @@ -41,7 +41,7 @@ gr_make_packet_sink (const std::vector<unsigned char>& sync_vector, */ class GR_CORE_API gr_packet_sink : public gr_sync_block { - friend GR_CORE_API gr_packet_sink_sptr + friend GR_CORE_API gr_packet_sink_sptr gr_make_packet_sink (const std::vector<unsigned char>& sync_vector, gr_msg_queue_sptr target_queue, int threshold); @@ -70,14 +70,14 @@ class GR_CORE_API gr_packet_sink : public gr_sync_block int d_packetlen_cnt; // how many so far protected: - gr_packet_sink(const std::vector<unsigned char>& sync_vector, + gr_packet_sink(const std::vector<unsigned char>& sync_vector, gr_msg_queue_sptr target_queue, int threshold); void enter_search(); void enter_have_sync(); void enter_have_header(int payload_len); - + int slice(float x) { return x > 0 ? 1 : 0; } bool header_ok() diff --git a/gnuradio-core/src/lib/general/gr_packet_sink.i b/gnuradio-core/src/lib/general/gr_packet_sink.i index 8ed4ba0c5..d1290f9d3 100644 --- a/gnuradio-core/src/lib/general/gr_packet_sink.i +++ b/gnuradio-core/src/lib/general/gr_packet_sink.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,packet_sink) -gr_packet_sink_sptr +gr_packet_sink_sptr gr_make_packet_sink (const std::vector<unsigned char>& sync_vector, gr_msg_queue_sptr target_queue, int threshold = -1 // -1 -> use default diff --git a/gnuradio-core/src/lib/general/gr_peak_detector2_fb.cc b/gnuradio-core/src/lib/general/gr_peak_detector2_fb.cc index 2b1c5da61..a4179a8c2 100644 --- a/gnuradio-core/src/lib/general/gr_peak_detector2_fb.cc +++ b/gnuradio-core/src/lib/general/gr_peak_detector2_fb.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2010 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, @@ -32,16 +32,16 @@ gr_peak_detector2_fb_sptr gr_make_peak_detector2_fb (float threshold_factor_rise, int look_ahead, float alpha) { - return gnuradio::get_initial_sptr(new gr_peak_detector2_fb (threshold_factor_rise, + return gnuradio::get_initial_sptr(new gr_peak_detector2_fb (threshold_factor_rise, look_ahead, alpha)); } -gr_peak_detector2_fb::gr_peak_detector2_fb (float threshold_factor_rise, +gr_peak_detector2_fb::gr_peak_detector2_fb (float threshold_factor_rise, int look_ahead, float alpha) : gr_sync_block ("peak_detector2_fb", gr_make_io_signature (1, 1, sizeof(float)), gr_make_io_signature2 (1, 2, sizeof(char), sizeof(float))), - d_threshold_factor_rise(threshold_factor_rise), + d_threshold_factor_rise(threshold_factor_rise), d_look_ahead(look_ahead), d_alpha(alpha), d_avg(0.0f), d_found(false) { } @@ -52,7 +52,7 @@ gr_peak_detector2_fb::work (int noutput_items, gr_vector_void_star &output_items) { float *iptr = (float *) input_items[0]; char *optr = (char *) output_items[0]; - + assert(noutput_items >= 2); memset(optr, 0, noutput_items*sizeof(char)); @@ -65,27 +65,27 @@ gr_peak_detector2_fb::work (int noutput_items, d_found = true; d_look_ahead_remaining = d_look_ahead; d_peak_val = -(float)INFINITY; - } + } else { d_avg = d_alpha*iptr[i] + (1.0f - d_alpha)*d_avg; } - } + } else { // Detected presence of peak if (iptr[i] > d_peak_val) { d_peak_val = iptr[i]; d_peak_ind = i; - } + } else if (d_look_ahead_remaining <= 0) { optr[d_peak_ind] = 1; d_found = false; d_avg = iptr[i]; } - + // Have not yet located peak, loop and keep searching. d_look_ahead_remaining--; } - + // Every iteration of the loop, write debugging signal out if // connected: if (output_items.size() == 2) { @@ -93,15 +93,15 @@ gr_peak_detector2_fb::work (int noutput_items, sigout[i] = d_avg; } } // loop - - if (!d_found) + + if (!d_found) return noutput_items; - + // else if detected presence, keep searching during the next call to work. int tmp = d_peak_ind; d_peak_ind = 1; - - return tmp - 1; + + return tmp - 1; } diff --git a/gnuradio-core/src/lib/general/gr_peak_detector2_fb.h b/gnuradio-core/src/lib/general/gr_peak_detector2_fb.h index 5bb97fc5d..665a6b882 100644 --- a/gnuradio-core/src/lib/general/gr_peak_detector2_fb.h +++ b/gnuradio-core/src/lib/general/gr_peak_detector2_fb.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, @@ -37,12 +37,12 @@ GR_CORE_API gr_peak_detector2_fb_sptr gr_make_peak_detector2_fb (float threshold * \brief Detect the peak of a signal * \ingroup level_blk * - * If a peak is detected, this block outputs a 1, + * If a peak is detected, this block outputs a 1, * or it outputs 0's. A separate debug output may be connected, to * view the internal EWMA described below. * * \param threshold_factor_rise The threshold factor determins when a peak - * is present. An EWMA average of the signal is calculated and when the + * is present. An EWMA average of the signal is calculated and when the * value of the signal goes over threshold_factor_rise*average, we * call the peak. * \param look_ahead The look-ahead value is used when the threshold is @@ -52,11 +52,11 @@ GR_CORE_API gr_peak_detector2_fb_sptr gr_make_peak_detector2_fb (float threshold class GR_CORE_API gr_peak_detector2_fb : public gr_sync_block { - friend GR_CORE_API gr_peak_detector2_fb_sptr + friend GR_CORE_API gr_peak_detector2_fb_sptr gr_make_peak_detector2_fb (float threshold_factor_rise, int look_ahead, float alpha); - + gr_peak_detector2_fb (float threshold_factor_rise, int look_ahead, float alpha); - + private: float d_threshold_factor_rise; int d_look_ahead; @@ -66,39 +66,39 @@ private: float d_alpha; float d_avg; bool d_found; - + public: - + /*! \brief Set the threshold factor value for the rise time * \param thr new threshold factor */ void set_threshold_factor_rise(float thr) { d_threshold_factor_rise = thr; } - + /*! \brief Set the look-ahead factor * \param look new look-ahead factor */ void set_look_ahead(int look) { d_look_ahead = look; } - + /*! \brief Set the running average alpha * \param alpha new alpha for running average */ void set_alpha(int alpha) { d_alpha = alpha; } - + /*! \brief Get the threshold factor value for the rise time * \return threshold factor */ float threshold_factor_rise() { return d_threshold_factor_rise; } - + /*! \brief Get the look-ahead factor value * \return look-ahead factor */ int look_ahead() { return d_look_ahead; } - + /*! \brief Get the alpha value of the running average * \return alpha */ float alpha() { return d_alpha; } - + int work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); diff --git a/gnuradio-core/src/lib/general/gr_peak_detector2_fb.i b/gnuradio-core/src/lib/general/gr_peak_detector2_fb.i index 4b01435c8..ec7227e69 100644 --- a/gnuradio-core/src/lib/general/gr_peak_detector2_fb.i +++ b/gnuradio-core/src/lib/general/gr_peak_detector2_fb.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,peak_detector2_fb) - + gr_peak_detector2_fb_sptr gr_make_peak_detector2_fb (float threshold_factor_rise = 7, int look_ahead = 1000, float alpha=0.001); @@ -31,13 +31,13 @@ class gr_peak_detector2_fb : public gr_sync_block { private: gr_peak_detector2_fb (float threshold_factor_rise, int look_ahead, float alpha); - + public: void set_threshold_factor_rise(float thr) { d_threshold_factor_rise = thr; } void set_look_ahead(int look) { d_look_ahead = look; } void set_alpha(int alpha) { d_avg_alpha = alpha; } - - float threshold_factor_rise() { return d_threshold_factor_rise; } + + float threshold_factor_rise() { return d_threshold_factor_rise; } int look_ahead() { return d_look_ahead; } float alpha() { return d_avg_alpha; } }; diff --git a/gnuradio-core/src/lib/general/gr_phase_modulator_fc.cc b/gnuradio-core/src/lib/general/gr_phase_modulator_fc.cc index c1a2e7da3..fb05c85a5 100644 --- a/gnuradio-core/src/lib/general/gr_phase_modulator_fc.cc +++ b/gnuradio-core/src/lib/general/gr_phase_modulator_fc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2006,2010 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, @@ -57,6 +57,6 @@ gr_phase_modulator_fc::work (int noutput_items, gr_sincosf (d_phase, &oq, &oi); out[i] = gr_complex (oi, oq); } - + return noutput_items; } diff --git a/gnuradio-core/src/lib/general/gr_phase_modulator_fc.h b/gnuradio-core/src/lib/general/gr_phase_modulator_fc.h index dd6e300a8..07f3b82d4 100644 --- a/gnuradio-core/src/lib/general/gr_phase_modulator_fc.h +++ b/gnuradio-core/src/lib/general/gr_phase_modulator_fc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2006 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, @@ -33,7 +33,7 @@ GR_CORE_API gr_phase_modulator_fc_sptr gr_make_phase_modulator_fc (double sensit /*! * \brief Phase modulator block - * \ingroup modulation_blk + * \ingroup modulation_blk * output=complex(cos(in*sensitivity),sin(in*sensitivity)) */ class GR_CORE_API gr_phase_modulator_fc : public gr_sync_block diff --git a/gnuradio-core/src/lib/general/gr_phase_modulator_fc.i b/gnuradio-core/src/lib/general/gr_phase_modulator_fc.i index 254b07ec9..c1816c647 100644 --- a/gnuradio-core/src/lib/general/gr_phase_modulator_fc.i +++ b/gnuradio-core/src/lib/general/gr_phase_modulator_fc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2006 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, @@ -26,6 +26,6 @@ gr_phase_modulator_fc_sptr gr_make_phase_modulator_fc (double sensitivity); class gr_phase_modulator_fc : public gr_sync_block { - private: + private: gr_phase_modulator_fc (double sensitivity); }; diff --git a/gnuradio-core/src/lib/general/gr_pll_carriertracking_cc.cc b/gnuradio-core/src/lib/general/gr_pll_carriertracking_cc.cc index e8ec1e235..b7b1291a3 100644 --- a/gnuradio-core/src/lib/general/gr_pll_carriertracking_cc.cc +++ b/gnuradio-core/src/lib/general/gr_pll_carriertracking_cc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -99,7 +99,7 @@ gr_pll_carriertracking_cc::work (int noutput_items, float error; float t_imag, t_real; - + for (int i = 0; i < noutput_items; i++){ gr_sincosf(d_phase, &t_imag, &t_real); optr[i] = iptr[i] * gr_complex(t_real, -t_imag); @@ -112,7 +112,7 @@ gr_pll_carriertracking_cc::work (int noutput_items, d_locksig = d_locksig * (1.0 - d_alpha) + \ d_alpha*(iptr[i].real() * t_real + iptr[i].imag() * t_imag); - + if ((d_squelch_enable) && !lock_detector()) optr[i] = 0; } diff --git a/gnuradio-core/src/lib/general/gr_pll_carriertracking_cc.h b/gnuradio-core/src/lib/general/gr_pll_carriertracking_cc.h index db74bb101..b3bc5ddd0 100644 --- a/gnuradio-core/src/lib/general/gr_pll_carriertracking_cc.h +++ b/gnuradio-core/src/lib/general/gr_pll_carriertracking_cc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -34,7 +34,7 @@ GR_CORE_API gr_pll_carriertracking_cc_sptr gr_make_pll_carriertracking_cc (float float max_freq, float min_freq); /*! - * \brief Implements a PLL which locks to the input frequency and outputs the + * \brief Implements a PLL which locks to the input frequency and outputs the * input signal mixed with that carrier. * \ingroup sync_blk * @@ -42,8 +42,8 @@ GR_CORE_API gr_pll_carriertracking_cc_sptr gr_make_pll_carriertracking_cc (float * * This PLL locks onto a [possibly noisy] reference carrier on * the input and outputs that signal, downconverted to DC - * - * All settings max_freq and min_freq are in terms of radians per sample, + * + * All settings max_freq and min_freq are in terms of radians per sample, * NOT HERTZ. The loop bandwidth determins the lock range and should be set * around pi/200 -- 2pi/100. * \sa gr_pll_freqdet_cf, gr_pll_carriertracking_cc diff --git a/gnuradio-core/src/lib/general/gr_pll_carriertracking_cc.i b/gnuradio-core/src/lib/general/gr_pll_carriertracking_cc.i index d309111b2..a20adf7e2 100644 --- a/gnuradio-core/src/lib/general/gr_pll_carriertracking_cc.i +++ b/gnuradio-core/src/lib/general/gr_pll_carriertracking_cc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -23,7 +23,7 @@ GR_SWIG_BLOCK_MAGIC(gr,pll_carriertracking_cc); gr_pll_carriertracking_cc_sptr -gr_make_pll_carriertracking_cc (float loop_bw, +gr_make_pll_carriertracking_cc (float loop_bw, float max_freq, float min_freq); diff --git a/gnuradio-core/src/lib/general/gr_pll_freqdet_cf.cc b/gnuradio-core/src/lib/general/gr_pll_freqdet_cf.cc index aa0d67855..f80f4ed07 100644 --- a/gnuradio-core/src/lib/general/gr_pll_freqdet_cf.cc +++ b/gnuradio-core/src/lib/general/gr_pll_freqdet_cf.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -43,7 +43,7 @@ gr_pll_freqdet_cf::gr_pll_freqdet_cf (float loop_bw, float max_freq, float min_f : gr_sync_block ("pll_freqdet_cf", gr_make_io_signature (1, 1, sizeof (gr_complex)), gr_make_io_signature (1, 1, sizeof (float))), - gri_control_loop(loop_bw, max_freq, min_freq) + gri_control_loop(loop_bw, max_freq, min_freq) { } @@ -76,12 +76,12 @@ gr_pll_freqdet_cf::work (int noutput_items, float error; int size = noutput_items; - + while (size-- > 0) { *optr++ = d_freq; error = phase_detector(*iptr++,d_phase); - + advance_loop(error); phase_wrap(); frequency_limit(); diff --git a/gnuradio-core/src/lib/general/gr_pll_freqdet_cf.h b/gnuradio-core/src/lib/general/gr_pll_freqdet_cf.h index 336f3fd31..3dfc8d709 100644 --- a/gnuradio-core/src/lib/general/gr_pll_freqdet_cf.h +++ b/gnuradio-core/src/lib/general/gr_pll_freqdet_cf.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -34,7 +34,7 @@ GR_CORE_API gr_pll_freqdet_cf_sptr gr_make_pll_freqdet_cf (float loop_bw, float max_freq, float min_freq); /*! - * \brief Implements a PLL which locks to the input frequency and outputs + * \brief Implements a PLL which locks to the input frequency and outputs * an estimate of that frequency. Useful for FM Demod. * \ingroup sync_blk * @@ -42,7 +42,7 @@ GR_CORE_API gr_pll_freqdet_cf_sptr gr_make_pll_freqdet_cf (float loop_bw, * * This PLL locks onto a [possibly noisy] reference carrier on * the input and outputs an estimate of that frequency in radians per sample. - * All settings max_freq and min_freq are in terms of radians per sample, + * All settings max_freq and min_freq are in terms of radians per sample, * NOT HERTZ. The loop bandwidth determins the lock range and should be set * around pi/200 -- 2pi/100. * \sa gr_pll_refout_cc, gr_pll_carriertracking_cc diff --git a/gnuradio-core/src/lib/general/gr_pll_freqdet_cf.i b/gnuradio-core/src/lib/general/gr_pll_freqdet_cf.i index f93e6e37e..87e515adb 100644 --- a/gnuradio-core/src/lib/general/gr_pll_freqdet_cf.i +++ b/gnuradio-core/src/lib/general/gr_pll_freqdet_cf.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,pll_freqdet_cf) - gr_pll_freqdet_cf_sptr gr_make_pll_freqdet_cf (float loop_bw, + gr_pll_freqdet_cf_sptr gr_make_pll_freqdet_cf (float loop_bw, float max_freq, float min_freq); diff --git a/gnuradio-core/src/lib/general/gr_pll_refout_cc.cc b/gnuradio-core/src/lib/general/gr_pll_refout_cc.cc index dfd5079da..9f95c3f64 100644 --- a/gnuradio-core/src/lib/general/gr_pll_refout_cc.cc +++ b/gnuradio-core/src/lib/general/gr_pll_refout_cc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -78,13 +78,13 @@ gr_pll_refout_cc::work (int noutput_items, float error; float t_imag, t_real; int size = noutput_items; - + while (size-- > 0) { gr_sincosf(d_phase,&t_imag,&t_real); *optr++ = gr_complex(t_real,t_imag); error = phase_detector(*iptr++,d_phase); - + advance_loop(error); phase_wrap(); frequency_limit(); diff --git a/gnuradio-core/src/lib/general/gr_pll_refout_cc.h b/gnuradio-core/src/lib/general/gr_pll_refout_cc.h index dcbeb1efa..ef5cd31e2 100644 --- a/gnuradio-core/src/lib/general/gr_pll_refout_cc.h +++ b/gnuradio-core/src/lib/general/gr_pll_refout_cc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -41,8 +41,8 @@ GR_CORE_API gr_pll_refout_cc_sptr gr_make_pll_refout_cc (float loop_bw, * This PLL locks onto a [possibly noisy] reference carrier on * the input and outputs a clean version which is phase and frequency * aligned to it. - * - * All settings max_freq and min_freq are in terms of radians per sample, + * + * All settings max_freq and min_freq are in terms of radians per sample, * NOT HERTZ. The loop bandwidth determins the lock range and should be set * around pi/200 -- 2pi/100. * \sa gr_pll_freqdet_cf, gr_pll_carriertracking_cc diff --git a/gnuradio-core/src/lib/general/gr_pll_refout_cc.i b/gnuradio-core/src/lib/general/gr_pll_refout_cc.i index 834ea1e36..630c0444f 100644 --- a/gnuradio-core/src/lib/general/gr_pll_refout_cc.i +++ b/gnuradio-core/src/lib/general/gr_pll_refout_cc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,pll_refout_cc) -gr_pll_refout_cc_sptr gr_make_pll_refout_cc (float loop_bw, +gr_pll_refout_cc_sptr gr_make_pll_refout_cc (float loop_bw, float max_freq, float min_freq); class gr_pll_refout_cc : public gr_sync_block, public gri_control_loop diff --git a/gnuradio-core/src/lib/general/gr_pn_correlator_cc.cc b/gnuradio-core/src/lib/general/gr_pn_correlator_cc.cc index 37e7b803c..818e48c34 100644 --- a/gnuradio-core/src/lib/general/gr_pn_correlator_cc.cc +++ b/gnuradio-core/src/lib/general/gr_pn_correlator_cc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_pn_correlator_cc.h b/gnuradio-core/src/lib/general/gr_pn_correlator_cc.h index 75e2d1c7b..69bd2c502 100644 --- a/gnuradio-core/src/lib/general/gr_pn_correlator_cc.h +++ b/gnuradio-core/src/lib/general/gr_pn_correlator_cc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, diff --git a/gnuradio-core/src/lib/general/gr_pn_correlator_cc.i b/gnuradio-core/src/lib/general/gr_pn_correlator_cc.i index a5115d360..e992f33a7 100644 --- a/gnuradio-core/src/lib/general/gr_pn_correlator_cc.i +++ b/gnuradio-core/src/lib/general/gr_pn_correlator_cc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,pn_correlator_cc) -gr_pn_correlator_cc_sptr +gr_pn_correlator_cc_sptr gr_make_pn_correlator_cc(int degree, int mask=0, int seed=1); class gr_pn_correlator_cc : public gr_sync_decimator diff --git a/gnuradio-core/src/lib/general/gr_prefs.cc b/gnuradio-core/src/lib/general/gr_prefs.cc index a27c5db46..20aead8e3 100644 --- a/gnuradio-core/src/lib/general/gr_prefs.cc +++ b/gnuradio-core/src/lib/general/gr_prefs.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_prefs.h b/gnuradio-core/src/lib/general/gr_prefs.h index 8ceb5b465..b1c354bd3 100644 --- a/gnuradio-core/src/lib/general/gr_prefs.h +++ b/gnuradio-core/src/lib/general/gr_prefs.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_prefs.i b/gnuradio-core/src/lib/general/gr_prefs.i index 737b66397..f44dcc944 100644 --- a/gnuradio-core/src/lib/general/gr_prefs.i +++ b/gnuradio-core/src/lib/general/gr_prefs.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_c.cc b/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_c.cc index c00eb5cdf..6430d2753 100644 --- a/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_c.cc +++ b/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_c.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_c.h b/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_c.h index e857686a8..2811677cf 100644 --- a/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_c.h +++ b/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_c.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2006 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, diff --git a/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_c.i b/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_c.i index aaba25079..bce244c12 100644 --- a/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_c.i +++ b/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_c.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_cf.cc b/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_cf.cc index 5350028a7..b5946283b 100644 --- a/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_cf.cc +++ b/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_cf.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2007,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_cf.h b/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_cf.h index a85afcf3b..bb5d1ebf9 100644 --- a/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_cf.h +++ b/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_cf.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2006 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, diff --git a/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_cf.i b/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_cf.i index 646b4b672..bf76d973b 100644 --- a/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_cf.i +++ b/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_cf.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_f.cc b/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_f.cc index d3b0e2d37..4ed40743f 100644 --- a/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_f.cc +++ b/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_f.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_f.h b/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_f.h index 4181ccf46..b2efcc64e 100644 --- a/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_f.h +++ b/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_f.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_f.i b/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_f.i index 5c6ac5390..1c63ae8e9 100644 --- a/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_f.i +++ b/gnuradio-core/src/lib/general/gr_probe_avg_mag_sqrd_f.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gr_probe_density_b.cc b/gnuradio-core/src/lib/general/gr_probe_density_b.cc index 70b03e881..31661780a 100644 --- a/gnuradio-core/src/lib/general/gr_probe_density_b.cc +++ b/gnuradio-core/src/lib/general/gr_probe_density_b.cc @@ -1,17 +1,17 @@ /* -*- c++ -*- */ /* * Copyright 2008,2010 Free Software Foundation, Inc. - * + * * 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, @@ -27,7 +27,7 @@ #include <stdexcept> #include <iostream> -gr_probe_density_b_sptr +gr_probe_density_b_sptr gr_make_probe_density_b(double alpha) { return gnuradio::get_initial_sptr(new gr_probe_density_b(alpha)); @@ -46,7 +46,7 @@ gr_probe_density_b::~gr_probe_density_b() { } -int +int gr_probe_density_b::work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) diff --git a/gnuradio-core/src/lib/general/gr_probe_density_b.h b/gnuradio-core/src/lib/general/gr_probe_density_b.h index 0af30c665..ab84a63a9 100644 --- a/gnuradio-core/src/lib/general/gr_probe_density_b.h +++ b/gnuradio-core/src/lib/general/gr_probe_density_b.h @@ -1,17 +1,17 @@ /* -*- c++ -*- */ /* * Copyright 2008 Free Software Foundation, Inc. - * + * * 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, @@ -54,7 +54,7 @@ private: public: ~gr_probe_density_b(); - + /*! * \brief Returns the current density value */ diff --git a/gnuradio-core/src/lib/general/gr_probe_density_b.i b/gnuradio-core/src/lib/general/gr_probe_density_b.i index 54ed07cf5..ca65708af 100644 --- a/gnuradio-core/src/lib/general/gr_probe_density_b.i +++ b/gnuradio-core/src/lib/general/gr_probe_density_b.i @@ -1,19 +1,19 @@ /* -*- 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, diff --git a/gnuradio-core/src/lib/general/gr_probe_mpsk_snr_c.cc b/gnuradio-core/src/lib/general/gr_probe_mpsk_snr_c.cc deleted file mode 100644 index fed9ad66e..000000000 --- a/gnuradio-core/src/lib/general/gr_probe_mpsk_snr_c.cc +++ /dev/null @@ -1,85 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2008,2010 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 <gr_probe_mpsk_snr_c.h> -#include <gr_io_signature.h> - -gr_probe_mpsk_snr_c_sptr -gr_make_probe_mpsk_snr_c(double alpha) -{ - return gnuradio::get_initial_sptr(new gr_probe_mpsk_snr_c(alpha)); -} - -gr_probe_mpsk_snr_c::gr_probe_mpsk_snr_c(double alpha) - : gr_sync_block ("probe_mpsk_snr_c", - gr_make_io_signature(1, 1, sizeof(gr_complex)), - gr_make_io_signature(0, 0, 0)), - d_signal_mean(0.0), - d_noise_variance(0.0) -{ - set_alpha(alpha); -} - -gr_probe_mpsk_snr_c::~gr_probe_mpsk_snr_c() -{ -} - -int -gr_probe_mpsk_snr_c::work(int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const gr_complex *in = (const gr_complex *) input_items[0]; - - for (int i = 0; i < noutput_items; i++){ - // Update of signal mean estimate - double mag = abs(in[i]); - d_signal_mean = d_alpha*abs(in[i]) + d_beta*d_signal_mean; - - // Update noise variance estimate - double noise = mag-d_signal_mean; - double var = noise*noise; - d_noise_variance = d_alpha*var + d_beta*d_noise_variance; - } - - return noutput_items; -} - -double -gr_probe_mpsk_snr_c::snr() const -{ - if (d_noise_variance == 0.0) - return 0.0; - else - return 10*log10(d_signal_mean*d_signal_mean/d_noise_variance); -} - -void -gr_probe_mpsk_snr_c::set_alpha(double alpha) -{ - d_alpha = alpha; - d_beta = 1.0-alpha; -} diff --git a/gnuradio-core/src/lib/general/gr_probe_mpsk_snr_c.h b/gnuradio-core/src/lib/general/gr_probe_mpsk_snr_c.h deleted file mode 100644 index 870e46701..000000000 --- a/gnuradio-core/src/lib/general/gr_probe_mpsk_snr_c.h +++ /dev/null @@ -1,83 +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_GR_PROBE_MPSK_SNR_C_H -#define INCLUDED_GR_PROBE_MPSK_SNR_C_H - -#include <gr_core_api.h> -#include <gr_sync_block.h> - -class gr_probe_mpsk_snr_c; -typedef boost::shared_ptr<gr_probe_mpsk_snr_c> gr_probe_mpsk_snr_c_sptr; - -GR_CORE_API gr_probe_mpsk_snr_c_sptr -gr_make_probe_mpsk_snr_c(double alpha = 0.0001); - -/*! - * Compute the estimate SNR of an MPSK signal using the Squared Signal - * to Noise Variance (SNV) technique. - * - * This technique assumes an AWGN channel. - * - * \param alpha Mean and variance smoothing filter constant - * \ingroup sink_blk - * - * Compute the running average of the signal mean and noise variance. - * The estimated signal mean, noise variance, and SNR are available - * via accessors. - * - * This SNR estimator is inaccurate below about 7dB SNR. - * - */ -class GR_CORE_API gr_probe_mpsk_snr_c : public gr_sync_block -{ - double d_alpha; - double d_beta; - double d_signal_mean; - double d_noise_variance; - - // Factory function returning shared pointer of this class - friend GR_CORE_API gr_probe_mpsk_snr_c_sptr - gr_make_probe_mpsk_snr_c(double alpha); - - // Private constructor - gr_probe_mpsk_snr_c(double alpha); - -public: - ~gr_probe_mpsk_snr_c(); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - // Return the estimated signal mean - double signal_mean() const { return d_signal_mean; } - - // Return the estimated noise variance - double noise_variance() const { return d_noise_variance; } - - // Return the estimated signal-to-noise ratio in decibels - double snr() const; - - void set_alpha(double alpha); -}; - -#endif /* INCLUDED_GR_PROBE_MPSK_SNR_C_H */ diff --git a/gnuradio-core/src/lib/general/gr_pwr_squelch_cc.cc b/gnuradio-core/src/lib/general/gr_pwr_squelch_cc.cc index d2fee1a57..90eab13eb 100644 --- a/gnuradio-core/src/lib/general/gr_pwr_squelch_cc.cc +++ b/gnuradio-core/src/lib/general/gr_pwr_squelch_cc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006,2010 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, @@ -32,7 +32,7 @@ gr_make_pwr_squelch_cc(double threshold, double alpha, int ramp, bool gate) return gnuradio::get_initial_sptr(new gr_pwr_squelch_cc(threshold, alpha, ramp, gate)); } -gr_pwr_squelch_cc::gr_pwr_squelch_cc(double threshold, double alpha, int ramp, bool gate) : +gr_pwr_squelch_cc::gr_pwr_squelch_cc(double threshold, double alpha, int ramp, bool gate) : gr_squelch_base_cc("pwr_squelch_cc", ramp, gate), d_iir(alpha) { diff --git a/gnuradio-core/src/lib/general/gr_pwr_squelch_cc.h b/gnuradio-core/src/lib/general/gr_pwr_squelch_cc.h index 2a008d92d..b2b4624f5 100644 --- a/gnuradio-core/src/lib/general/gr_pwr_squelch_cc.h +++ b/gnuradio-core/src/lib/general/gr_pwr_squelch_cc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -31,7 +31,7 @@ class gr_pwr_squelch_cc; typedef boost::shared_ptr<gr_pwr_squelch_cc> gr_pwr_squelch_cc_sptr; -GR_CORE_API gr_pwr_squelch_cc_sptr +GR_CORE_API gr_pwr_squelch_cc_sptr gr_make_pwr_squelch_cc(double db, double alpha = 0.0001, int ramp=0, bool gate=false); /*! @@ -51,7 +51,7 @@ private: protected: virtual void update_state(const gr_complex &in); virtual bool mute() const { return d_pwr < d_threshold; } - + public: std::vector<float> squelch_range() const; diff --git a/gnuradio-core/src/lib/general/gr_pwr_squelch_cc.i b/gnuradio-core/src/lib/general/gr_pwr_squelch_cc.i index d2e8718c8..c8cafd7aa 100644 --- a/gnuradio-core/src/lib/general/gr_pwr_squelch_cc.i +++ b/gnuradio-core/src/lib/general/gr_pwr_squelch_cc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,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, @@ -26,7 +26,7 @@ GR_SWIG_BLOCK_MAGIC(gr,pwr_squelch_cc); // the base class has a pure virual method. %import "gr_squelch_base_cc.i" -gr_pwr_squelch_cc_sptr +gr_pwr_squelch_cc_sptr gr_make_pwr_squelch_cc(double db, double alpha=0.0001, int ramp=0, bool gate=false); class gr_pwr_squelch_cc : public gr_squelch_base_cc diff --git a/gnuradio-core/src/lib/general/gr_pwr_squelch_ff.cc b/gnuradio-core/src/lib/general/gr_pwr_squelch_ff.cc index a689c407c..cfa867243 100644 --- a/gnuradio-core/src/lib/general/gr_pwr_squelch_ff.cc +++ b/gnuradio-core/src/lib/general/gr_pwr_squelch_ff.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006,2010 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, @@ -32,7 +32,7 @@ gr_make_pwr_squelch_ff(double threshold, double alpha, int ramp, bool gate) return gnuradio::get_initial_sptr(new gr_pwr_squelch_ff(threshold, alpha, ramp, gate)); } -gr_pwr_squelch_ff::gr_pwr_squelch_ff(double threshold, double alpha, int ramp, bool gate) : +gr_pwr_squelch_ff::gr_pwr_squelch_ff(double threshold, double alpha, int ramp, bool gate) : gr_squelch_base_ff("pwr_squelch_ff", ramp, gate), d_iir(alpha) { diff --git a/gnuradio-core/src/lib/general/gr_pwr_squelch_ff.h b/gnuradio-core/src/lib/general/gr_pwr_squelch_ff.h index 27a7306b3..d5148c409 100644 --- a/gnuradio-core/src/lib/general/gr_pwr_squelch_ff.h +++ b/gnuradio-core/src/lib/general/gr_pwr_squelch_ff.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -31,7 +31,7 @@ class gr_pwr_squelch_ff; typedef boost::shared_ptr<gr_pwr_squelch_ff> gr_pwr_squelch_ff_sptr; -GR_CORE_API gr_pwr_squelch_ff_sptr +GR_CORE_API gr_pwr_squelch_ff_sptr gr_make_pwr_squelch_ff(double db, double alpha = 0.0001, int ramp=0, bool gate=false); /*! @@ -51,7 +51,7 @@ private: protected: virtual void update_state(const float &in); virtual bool mute() const { return d_pwr < d_threshold; } - + public: std::vector<float> squelch_range() const; diff --git a/gnuradio-core/src/lib/general/gr_pwr_squelch_ff.i b/gnuradio-core/src/lib/general/gr_pwr_squelch_ff.i index 4cb16c4ca..2682f2758 100644 --- a/gnuradio-core/src/lib/general/gr_pwr_squelch_ff.i +++ b/gnuradio-core/src/lib/general/gr_pwr_squelch_ff.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,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, @@ -26,7 +26,7 @@ GR_SWIG_BLOCK_MAGIC(gr,pwr_squelch_ff); // the base class has a pure virual method. %import "gr_squelch_base_ff.i" -gr_pwr_squelch_ff_sptr +gr_pwr_squelch_ff_sptr gr_make_pwr_squelch_ff(double db, double alpha=0.0001, int ramp=0, bool gate=false); class gr_pwr_squelch_ff : public gr_squelch_base_ff diff --git a/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.cc b/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.cc index 8e59fbd71..fa0958276 100644 --- a/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.cc +++ b/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2005,2010 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, @@ -51,7 +51,7 @@ gr_quadrature_demod_cf::work (int noutput_items, gr_complex *in = (gr_complex *) input_items[0]; float *out = (float *) output_items[0]; in++; // ensure that in[-1] is valid - + for (int i = 0; i < noutput_items; i++){ gr_complex product = in[i] * conj (in[i-1]); // out[i] = d_gain * arg (product); diff --git a/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.h b/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.h index 755f2839a..9f5976c97 100644 --- a/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.h +++ b/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.i b/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.i index d9f338daa..4c9168e64 100644 --- a/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.i +++ b/gnuradio-core/src/lib/general/gr_quadrature_demod_cf.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_rail_ff.cc b/gnuradio-core/src/lib/general/gr_rail_ff.cc index 260897199..cd33c10d3 100644 --- a/gnuradio-core/src/lib/general/gr_rail_ff.cc +++ b/gnuradio-core/src/lib/general/gr_rail_ff.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -48,7 +48,7 @@ gr_rail_ff::work(int noutput_items, { const float *in = (const float *) input_items[0]; float *out = (float *) output_items[0]; - + for (int i = 0; i < noutput_items; i++) { if (in[i] < d_lo) out[i] = d_lo; diff --git a/gnuradio-core/src/lib/general/gr_rail_ff.h b/gnuradio-core/src/lib/general/gr_rail_ff.h index 225bdf36e..29db5b1fa 100644 --- a/gnuradio-core/src/lib/general/gr_rail_ff.h +++ b/gnuradio-core/src/lib/general/gr_rail_ff.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_rail_ff.i b/gnuradio-core/src/lib/general/gr_rail_ff.i index ae39b76de..bdc453516 100644 --- a/gnuradio-core/src/lib/general/gr_rail_ff.i +++ b/gnuradio-core/src/lib/general/gr_rail_ff.i @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/gnuradio-core/src/lib/general/gr_random.cc b/gnuradio-core/src/lib/general/gr_random.cc index 52140acc2..323839acc 100644 --- a/gnuradio-core/src/lib/general/gr_random.cc +++ b/gnuradio-core/src/lib/general/gr_random.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -22,7 +22,7 @@ /* * Copyright 1997 Massachusetts Institute of Technology - * + * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that @@ -32,7 +32,7 @@ * written prior permission. M.I.T. makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. - * + * */ #ifdef HAVE_CONFIG_H @@ -76,18 +76,18 @@ float gr_random::ran1() int j; long k; float temp; - + if (d_seed <= 0 || !d_iy) { - if (-d_seed < 1) + if (-d_seed < 1) d_seed=1; - else + else d_seed = -d_seed; for (j=NTAB+7;j>=0;j--) { k=d_seed/IQ; d_seed=IA*(d_seed-k*IQ)-IR*k; - if (d_seed < 0) + if (d_seed < 0) d_seed += IM; - if (j < NTAB) + if (j < NTAB) d_iv[j] = d_seed; } d_iy=d_iv[0]; @@ -150,16 +150,16 @@ float gr_random::laplacian() float gr_random::impulse(float factor = 5) { float z = -M_SQRT2 * log(ran1()); - if (fabsf(z) <= factor) + if (fabsf(z) <= factor) return 0.0; - else + else return z; } /* * Complex rayleigh is really gaussian I and gaussian Q * It can also be generated by real rayleigh magnitude and - * uniform random angle + * uniform random angle * Adapted from The KC7WW / OH2BNS Channel Simulator * FIXME Need to check how good this is at some point */ diff --git a/gnuradio-core/src/lib/general/gr_random.h b/gnuradio-core/src/lib/general/gr_random.h index 13dbbfb04..96a8f4418 100644 --- a/gnuradio-core/src/lib/general/gr_random.h +++ b/gnuradio-core/src/lib/general/gr_random.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -39,8 +39,8 @@ protected: int d_iset; float d_gset; - -public: + +public: gr_random (long seed=3021); void reseed (long seed); diff --git a/gnuradio-core/src/lib/general/gr_regenerate_bb.cc b/gnuradio-core/src/lib/general/gr_regenerate_bb.cc index 3bb8be105..c96cf247d 100644 --- a/gnuradio-core/src/lib/general/gr_regenerate_bb.cc +++ b/gnuradio-core/src/lib/general/gr_regenerate_bb.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2010 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, @@ -71,14 +71,14 @@ gr_regenerate_bb::work (int noutput_items, if(d_regen_count < d_max_regen) { d_countdown--; - + if(d_countdown == 0) { optr[i] = 1; d_countdown = d_period; d_regen_count++; } } - + if(iptr[i] == 1) { d_countdown = d_period; optr[i] = 1; diff --git a/gnuradio-core/src/lib/general/gr_regenerate_bb.h b/gnuradio-core/src/lib/general/gr_regenerate_bb.h index 67cfedac7..e820db69e 100644 --- a/gnuradio-core/src/lib/general/gr_regenerate_bb.h +++ b/gnuradio-core/src/lib/general/gr_regenerate_bb.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, @@ -35,7 +35,7 @@ GR_CORE_API gr_regenerate_bb_sptr gr_make_regenerate_bb (int period, unsigned in * \brief Detect the peak of a signal and repeat every period samples * \ingroup level_blk * - * If a peak is detected, this block outputs a 1 repeated every period samples + * If a peak is detected, this block outputs a 1 repeated every period samples * until reset by detection of another 1 on the input or stopped after max_regen * regenerations have occurred. * @@ -46,7 +46,7 @@ class GR_CORE_API gr_regenerate_bb : public gr_sync_block /*! * \brief Make a regenerate block * \param period The number of samples between regenerations - * \param max_regen The maximum number of regenerations to perform; if set to + * \param max_regen The maximum number of regenerations to perform; if set to * ULONG_MAX, it will regenerate continuously. */ friend GR_CORE_API gr_regenerate_bb_sptr gr_make_regenerate_bb (int period, unsigned int max_regen); diff --git a/gnuradio-core/src/lib/general/gr_regenerate_bb.i b/gnuradio-core/src/lib/general/gr_regenerate_bb.i index 7b29b92b7..064b0a278 100644 --- a/gnuradio-core/src/lib/general/gr_regenerate_bb.i +++ b/gnuradio-core/src/lib/general/gr_regenerate_bb.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, @@ -31,7 +31,7 @@ class gr_regenerate_bb : public gr_sync_block public: void set_max_regen(unsigned int regen); - + /*! \brief Reset the period of regenerations; this will reset the current regen. */ void set_period(int period); diff --git a/gnuradio-core/src/lib/general/gr_remez.cc b/gnuradio-core/src/lib/general/gr_remez.cc index 86c2901b5..db4789e43 100644 --- a/gnuradio-core/src/lib/general/gr_remez.cc +++ b/gnuradio-core/src/lib/general/gr_remez.cc @@ -95,7 +95,7 @@ * double W[] - Weight function on the dense grid [gridsize] *******************/ -static void +static void CreateDenseGrid (int r, int numtaps, int numband, const double bands[], const double des[], const double weight[], int gridsize, double Grid[], double D[], double W[], @@ -148,7 +148,7 @@ CreateDenseGrid (int r, int numtaps, int numband, const double bands[], * Places Extremal Frequencies evenly throughout the dense grid. * * - * INPUT: + * INPUT: * ------ * int r - 1/2 the number of filter coefficients * int gridsize - Number of elements in the dense frequency grid @@ -426,7 +426,7 @@ Search (int r, int Ext[], else if ((!up) && (E[foundExt[j]] > 0.0)) up = 1; /* switch to a maxima */ else - { + { alt = 0; // PAK: break now and you will delete the smallest overall // extremal. If you want to delete the smallest of the @@ -447,11 +447,11 @@ Search (int r, int Ext[], if (fabs(E[foundExt[k-1]]) < fabs(E[foundExt[0]])) /* Delete last extremal */ l = k-1; - // PAK: changed from l = foundExt[k-1]; + // PAK: changed from l = foundExt[k-1]; else /* Delete first extremal */ l = 0; - // PAK: changed from l = foundExt[0]; + // PAK: changed from l = foundExt[0]; } for (j=l; j<k-1; j++) /* Loop that does the deletion */ @@ -611,7 +611,7 @@ isDone (int r, int Ext[], double E[]) static int remez (double h[], int numtaps, - int numband, const double bands[], + int numband, const double bands[], const double des[], const double weight[], int type, int griddensity) { @@ -689,7 +689,7 @@ remez (double h[], int numtaps, { c = cos(Pi * Grid[i]); D[i] /= c; - W[i] *= c; + W[i] *= c; } } } @@ -782,7 +782,7 @@ remez (double h[], int numtaps, static void -punt (const std::string msg) +punt (const std::string msg) { std::cerr << msg << '\n'; throw std::runtime_error (msg); @@ -836,13 +836,13 @@ gr_remez (int order, for (int i = 0; i < numbands; i++) weight[i] = arg_weight [i]; } - + int itype = 0; - if (filter_type == "bandpass") + if (filter_type == "bandpass") itype = BANDPASS; - else if (filter_type == "differentiator") + else if (filter_type == "differentiator") itype = DIFFERENTIATOR; - else if (filter_type == "hilbert") + else if (filter_type == "hilbert") itype = HILBERT; else punt ("gr_remez: unknown ftype '" + filter_type + "'"); @@ -960,8 +960,8 @@ Frequency is in the range (0, 1), with 1 being the nyquist frequency") } } if (nargin > 5) { - if (args(5).is_real_scalar() - && !args(4).is_real_scalar() + if (args(5).is_real_scalar() + && !args(4).is_real_scalar() && !args(3).is_real_scalar()) density = NINT(args(4).double_value()); else { @@ -971,11 +971,11 @@ Frequency is in the range (0, 1), with 1 being the nyquist frequency") } int itype; - if (stype == "bandpass") + if (stype == "bandpass") itype = BANDPASS; - else if (stype == "differentiator") + else if (stype == "differentiator") itype = DIFFERENTIATOR; - else if (stype == "hilbert") + else if (stype == "hilbert") itype = HILBERT; else { error("remez: unknown ftype '%s'", stype.data()); diff --git a/gnuradio-core/src/lib/general/gr_remez.h b/gnuradio-core/src/lib/general/gr_remez.h index f7b8a72a3..d875b8822 100644 --- a/gnuradio-core/src/lib/general/gr_remez.h +++ b/gnuradio-core/src/lib/general/gr_remez.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_remez.i b/gnuradio-core/src/lib/general/gr_remez.i index d3140744b..fe3eea20d 100644 --- a/gnuradio-core/src/lib/general/gr_remez.i +++ b/gnuradio-core/src/lib/general/gr_remez.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_repeat.cc b/gnuradio-core/src/lib/general/gr_repeat.cc index 43ad50f52..2fa82cd94 100644 --- a/gnuradio-core/src/lib/general/gr_repeat.cc +++ b/gnuradio-core/src/lib/general/gr_repeat.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2010 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, @@ -28,13 +28,13 @@ #include <gr_io_signature.h> #include <string.h> -gr_repeat_sptr +gr_repeat_sptr gr_make_repeat(size_t itemsize, int interp) { return gnuradio::get_initial_sptr(new gr_repeat(itemsize, interp)); } -gr_repeat::gr_repeat(size_t itemsize, int interp) +gr_repeat::gr_repeat(size_t itemsize, int interp) : gr_sync_interpolator("extend", gr_make_io_signature(1, 1, itemsize), gr_make_io_signature(1, 1, itemsize), @@ -48,7 +48,7 @@ gr_repeat::~gr_repeat() { } -int +int gr_repeat::work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) diff --git a/gnuradio-core/src/lib/general/gr_repeat.h b/gnuradio-core/src/lib/general/gr_repeat.h index b90f2f51d..548ca79f4 100644 --- a/gnuradio-core/src/lib/general/gr_repeat.h +++ b/gnuradio-core/src/lib/general/gr_repeat.h @@ -1,19 +1,19 @@ /* -*- 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, @@ -40,7 +40,7 @@ class GR_CORE_API gr_repeat : public gr_sync_interpolator { private: friend GR_CORE_API gr_repeat_sptr gr_make_repeat(size_t itemsize, int interp); - + gr_repeat(size_t itemsize, int interp); int d_interp; diff --git a/gnuradio-core/src/lib/general/gr_reverse.cc b/gnuradio-core/src/lib/general/gr_reverse.cc index 5cbddb579..08c588cb5 100644 --- a/gnuradio-core/src/lib/general/gr_reverse.cc +++ b/gnuradio-core/src/lib/general/gr_reverse.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -27,7 +27,7 @@ #include <gr_reverse.h> -std::vector<float> +std::vector<float> gr_reverse (const std::vector<float> &taps) { int size = taps.size (); @@ -43,7 +43,7 @@ gr_reverse (const std::vector<float> &taps) } -std::vector<gr_complex> +std::vector<gr_complex> gr_reverse (const std::vector<gr_complex> &taps) { int size = taps.size (); diff --git a/gnuradio-core/src/lib/general/gr_reverse.h b/gnuradio-core/src/lib/general/gr_reverse.h index 43d84fda7..15bf3cb73 100644 --- a/gnuradio-core/src/lib/general/gr_reverse.h +++ b/gnuradio-core/src/lib/general/gr_reverse.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gr_rms_cf.cc b/gnuradio-core/src/lib/general/gr_rms_cf.cc index a7b5d99f1..44eb2221e 100644 --- a/gnuradio-core/src/lib/general/gr_rms_cf.cc +++ b/gnuradio-core/src/lib/general/gr_rms_cf.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_rms_cf.h b/gnuradio-core/src/lib/general/gr_rms_cf.h index f1bd9802c..9e701aa6a 100644 --- a/gnuradio-core/src/lib/general/gr_rms_cf.h +++ b/gnuradio-core/src/lib/general/gr_rms_cf.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gr_rms_cf.i b/gnuradio-core/src/lib/general/gr_rms_cf.i index 954a0525e..a668200ee 100644 --- a/gnuradio-core/src/lib/general/gr_rms_cf.i +++ b/gnuradio-core/src/lib/general/gr_rms_cf.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gr_rms_ff.cc b/gnuradio-core/src/lib/general/gr_rms_ff.cc index 1ff4379f6..233f419cd 100644 --- a/gnuradio-core/src/lib/general/gr_rms_ff.cc +++ b/gnuradio-core/src/lib/general/gr_rms_ff.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_rms_ff.h b/gnuradio-core/src/lib/general/gr_rms_ff.h index 0bbd53b70..30cf7f9d9 100644 --- a/gnuradio-core/src/lib/general/gr_rms_ff.h +++ b/gnuradio-core/src/lib/general/gr_rms_ff.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gr_rms_ff.i b/gnuradio-core/src/lib/general/gr_rms_ff.i index de09ef75b..00b03f5d4 100644 --- a/gnuradio-core/src/lib/general/gr_rms_ff.i +++ b/gnuradio-core/src/lib/general/gr_rms_ff.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gr_scrambler_bb.cc b/gnuradio-core/src/lib/general/gr_scrambler_bb.cc index 59bd1ca41..31eb19207 100644 --- a/gnuradio-core/src/lib/general/gr_scrambler_bb.cc +++ b/gnuradio-core/src/lib/general/gr_scrambler_bb.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2010 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, @@ -51,6 +51,6 @@ gr_scrambler_bb::work(int noutput_items, for (int i = 0; i < noutput_items; i++) out[i] = d_lfsr.next_bit_scramble(in[i]); - + return noutput_items; } diff --git a/gnuradio-core/src/lib/general/gr_scrambler_bb.h b/gnuradio-core/src/lib/general/gr_scrambler_bb.h index 79905933d..edb429e0a 100644 --- a/gnuradio-core/src/lib/general/gr_scrambler_bb.h +++ b/gnuradio-core/src/lib/general/gr_scrambler_bb.h @@ -1,19 +1,19 @@ /* -*- 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, @@ -33,9 +33,9 @@ GR_CORE_API gr_scrambler_bb_sptr gr_make_scrambler_bb(int mask, int seed, int le /*! * Scramble an input stream using an LFSR. This block works on the LSB only - * of the input data stream, i.e., on an "unpacked binary" stream, and + * of the input data stream, i.e., on an "unpacked binary" stream, and * produces the same format on its output. - * + * * \param mask Polynomial mask for LFSR * \param seed Initial shift register contents * \param len Shift register length diff --git a/gnuradio-core/src/lib/general/gr_scrambler_bb.i b/gnuradio-core/src/lib/general/gr_scrambler_bb.i index 9a607c4b1..a7ef7b364 100644 --- a/gnuradio-core/src/lib/general/gr_scrambler_bb.i +++ b/gnuradio-core/src/lib/general/gr_scrambler_bb.i @@ -1,19 +1,19 @@ /* -*- 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, diff --git a/gnuradio-core/src/lib/general/gr_short_to_char.cc b/gnuradio-core/src/lib/general/gr_short_to_char.cc index a3c096e6d..9d6c41406 100644 --- a/gnuradio-core/src/lib/general/gr_short_to_char.cc +++ b/gnuradio-core/src/lib/general/gr_short_to_char.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -59,7 +59,7 @@ gr_short_to_char::work (int noutput_items, else { volk_16i_convert_8i_a(out, in, d_vlen*noutput_items); } - + return noutput_items; } diff --git a/gnuradio-core/src/lib/general/gr_short_to_char.h b/gnuradio-core/src/lib/general/gr_short_to_char.h index f6b3b41ca..bf96211c7 100644 --- a/gnuradio-core/src/lib/general/gr_short_to_char.h +++ b/gnuradio-core/src/lib/general/gr_short_to_char.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_short_to_char.i b/gnuradio-core/src/lib/general/gr_short_to_char.i index 330a4fdda..7389ed10b 100644 --- a/gnuradio-core/src/lib/general/gr_short_to_char.i +++ b/gnuradio-core/src/lib/general/gr_short_to_char.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_short_to_float.cc b/gnuradio-core/src/lib/general/gr_short_to_float.cc index 94d376a27..960cf644d 100644 --- a/gnuradio-core/src/lib/general/gr_short_to_float.cc +++ b/gnuradio-core/src/lib/general/gr_short_to_float.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -45,7 +45,7 @@ gr_short_to_float::gr_short_to_float (size_t vlen, float scale) set_alignment(alignment_multiple); } -float +float gr_short_to_float::scale() const { return d_scale; diff --git a/gnuradio-core/src/lib/general/gr_short_to_float.h b/gnuradio-core/src/lib/general/gr_short_to_float.h index e45d0b14b..362549e70 100644 --- a/gnuradio-core/src/lib/general/gr_short_to_float.h +++ b/gnuradio-core/src/lib/general/gr_short_to_float.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -49,7 +49,7 @@ class GR_CORE_API gr_short_to_float : public gr_sync_block size_t d_vlen; float d_scale; - + public: /*! * Get the scalar divider value. @@ -60,7 +60,7 @@ class GR_CORE_API gr_short_to_float : public gr_sync_block * Set the scalar divider value. */ void set_scale(float scale); - + virtual int work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); diff --git a/gnuradio-core/src/lib/general/gr_short_to_float.i b/gnuradio-core/src/lib/general/gr_short_to_float.i index 229618890..e781e292c 100644 --- a/gnuradio-core/src/lib/general/gr_short_to_float.i +++ b/gnuradio-core/src/lib/general/gr_short_to_float.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_simple_correlator.cc b/gnuradio-core/src/lib/general/gr_simple_correlator.cc index bdfa73ef3..9c2ebef15 100644 --- a/gnuradio-core/src/lib/general/gr_simple_correlator.cc +++ b/gnuradio-core/src/lib/general/gr_simple_correlator.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -70,11 +70,11 @@ gr_simple_correlator::~gr_simple_correlator () { #ifdef DEBUG_SIMPLE_CORRELATOR fclose(d_debug_fp); -#endif +#endif delete [] d_bitbuf; delete [] d_pktbuf; } - + void gr_simple_correlator::enter_looking () @@ -141,7 +141,7 @@ gr_simple_correlator::update_avg(float x) d_accum += x; d_avbi = (d_avbi + 1) & (AVG_PERIOD-1); } - + int gr_simple_correlator::general_work (int noutput_items, @@ -152,7 +152,7 @@ gr_simple_correlator::general_work (int noutput_items, const float *in = (const float *) input_items[0]; unsigned char *out = (unsigned char *) output_items[0]; - + int n = 0; int nin = ninput_items[0]; int decision; @@ -181,7 +181,7 @@ gr_simple_correlator::general_work (int noutput_items, debug_data.sampled = 1.0; #endif decision = slice (in[n]); - + d_bitbuf[d_bbi] = decision; d_bbi++; if (d_bbi >= d_bblen){ @@ -219,7 +219,7 @@ gr_simple_correlator::general_work (int noutput_items, default: assert (0); } - + #ifdef DEBUG_SIMPLE_CORRELATOR fwrite(&debug_data, sizeof (debug_data), 1, d_debug_fp); #endif diff --git a/gnuradio-core/src/lib/general/gr_simple_correlator.h b/gnuradio-core/src/lib/general/gr_simple_correlator.h index 4c5f060cd..37d00c125 100644 --- a/gnuradio-core/src/lib/general/gr_simple_correlator.h +++ b/gnuradio-core/src/lib/general/gr_simple_correlator.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -42,7 +42,7 @@ class GR_CORE_API gr_simple_correlator : public gr_block { static const int OVERSAMPLE = 8; enum state_t { ST_LOOKING, ST_UNDER_THRESHOLD, ST_LOCKED }; - + int d_payload_bytesize; state_t d_state; unsigned int d_osi; // over sample index [0,OVERSAMPLE-1] @@ -78,7 +78,7 @@ class GR_CORE_API gr_simple_correlator : public gr_block void enter_locked (); void enter_under_threshold (); void enter_looking (); - + static int add_index (int a, int b) { int t = a + b; @@ -97,7 +97,7 @@ class GR_CORE_API gr_simple_correlator : public gr_block return t; } - + public: ~gr_simple_correlator (); diff --git a/gnuradio-core/src/lib/general/gr_simple_correlator.i b/gnuradio-core/src/lib/general/gr_simple_correlator.i index b7d2fcb0a..24d133072 100644 --- a/gnuradio-core/src/lib/general/gr_simple_correlator.i +++ b/gnuradio-core/src/lib/general/gr_simple_correlator.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_simple_framer.cc b/gnuradio-core/src/lib/general/gr_simple_framer.cc index 2a574a74e..506603bb7 100644 --- a/gnuradio-core/src/lib/general/gr_simple_framer.cc +++ b/gnuradio-core/src/lib/general/gr_simple_framer.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_simple_framer.h b/gnuradio-core/src/lib/general/gr_simple_framer.h index 15f392e4a..76a4b7bab 100644 --- a/gnuradio-core/src/lib/general/gr_simple_framer.h +++ b/gnuradio-core/src/lib/general/gr_simple_framer.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_simple_framer.i b/gnuradio-core/src/lib/general/gr_simple_framer.i index 6421507c4..c13ead87b 100644 --- a/gnuradio-core/src/lib/general/gr_simple_framer.i +++ b/gnuradio-core/src/lib/general/gr_simple_framer.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_simple_framer_sync.h b/gnuradio-core/src/lib/general/gr_simple_framer_sync.h index f28230b15..66173be42 100644 --- a/gnuradio-core/src/lib/general/gr_simple_framer_sync.h +++ b/gnuradio-core/src/lib/general/gr_simple_framer_sync.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2005 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, @@ -45,7 +45,7 @@ static const int GRSF_BITS_PER_BYTE = 8; static const int GRSF_SYNC_OVERHEAD = sizeof(GRSF_SYNC); static const int GRSF_PAYLOAD_OVERHEAD = 1; // 1 byte seqno static const int GRSF_TAIL_PAD = 1; // one byte trailing padding -static const int GRSF_OVERHEAD = GRSF_SYNC_OVERHEAD + GRSF_PAYLOAD_OVERHEAD + GRSF_TAIL_PAD; +static const int GRSF_OVERHEAD = GRSF_SYNC_OVERHEAD + GRSF_PAYLOAD_OVERHEAD + GRSF_TAIL_PAD; #endif /* INCLUDED_GR_SIMPLE_FRAMER_SYNC_H */ diff --git a/gnuradio-core/src/lib/general/gr_simple_squelch_cc.cc b/gnuradio-core/src/lib/general/gr_simple_squelch_cc.cc index cdea8055b..5d90a3da4 100644 --- a/gnuradio-core/src/lib/general/gr_simple_squelch_cc.cc +++ b/gnuradio-core/src/lib/general/gr_simple_squelch_cc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_simple_squelch_cc.h b/gnuradio-core/src/lib/general/gr_simple_squelch_cc.h index 590b86de8..4bf62c7ec 100644 --- a/gnuradio-core/src/lib/general/gr_simple_squelch_cc.h +++ b/gnuradio-core/src/lib/general/gr_simple_squelch_cc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gr_simple_squelch_cc.i b/gnuradio-core/src/lib/general/gr_simple_squelch_cc.i index adce333cb..17b469e15 100644 --- a/gnuradio-core/src/lib/general/gr_simple_squelch_cc.i +++ b/gnuradio-core/src/lib/general/gr_simple_squelch_cc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gr_skiphead.cc b/gnuradio-core/src/lib/general/gr_skiphead.cc index 1670eb7cf..c887376e4 100644 --- a/gnuradio-core/src/lib/general/gr_skiphead.cc +++ b/gnuradio-core/src/lib/general/gr_skiphead.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2007,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_skiphead.h b/gnuradio-core/src/lib/general/gr_skiphead.h index 2beaaeab0..899b40f27 100644 --- a/gnuradio-core/src/lib/general/gr_skiphead.h +++ b/gnuradio-core/src/lib/general/gr_skiphead.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gr_skiphead.i b/gnuradio-core/src/lib/general/gr_skiphead.i index 45cbd0437..3246db970 100644 --- a/gnuradio-core/src/lib/general/gr_skiphead.i +++ b/gnuradio-core/src/lib/general/gr_skiphead.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2007,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_squash_ff.i b/gnuradio-core/src/lib/general/gr_squash_ff.i deleted file mode 100644 index c89b1c28d..000000000 --- a/gnuradio-core/src/lib/general/gr_squash_ff.i +++ /dev/null @@ -1,34 +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 this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -GR_SWIG_BLOCK_MAGIC(gr,squash_ff); - -gr_squash_ff_sptr gr_make_squash_ff(const std::vector<float> &igrid, - const std::vector<float> &ogrid); - -class gr_squash_ff : public gr_sync_block -{ -private: - gr_squash_ff(const std::vector<float> &igrid, - const std::vector<float> &ogrid); - -}; - diff --git a/gnuradio-core/src/lib/general/gr_squelch_base_cc.cc b/gnuradio-core/src/lib/general/gr_squelch_base_cc.cc index aabeb515e..b32a0a695 100644 --- a/gnuradio-core/src/lib/general/gr_squelch_base_cc.cc +++ b/gnuradio-core/src/lib/general/gr_squelch_base_cc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006 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, @@ -27,7 +27,7 @@ #include <gr_squelch_base_cc.h> #include <gr_io_signature.h> -gr_squelch_base_cc::gr_squelch_base_cc(const char *name, int ramp, bool gate) : +gr_squelch_base_cc::gr_squelch_base_cc(const char *name, int ramp, bool gate) : gr_block(name, gr_make_io_signature(1, 1, sizeof(gr_complex)), gr_make_io_signature(1, 1, sizeof(gr_complex))) @@ -55,7 +55,7 @@ int gr_squelch_base_cc::general_work(int noutput_items, // Adjust envelope based on current state switch(d_state) { case ST_MUTED: - if (!mute()) + if (!mute()) d_state = d_ramp ? ST_ATTACK : ST_UNMUTED; // If not ramping, go straight to unmuted break; @@ -78,7 +78,7 @@ int gr_squelch_base_cc::general_work(int noutput_items, d_state = ST_MUTED; break; }; - + // If unmuted, copy input times envelope to output // Otherwise, if not gating, copy zero to output if (d_state != ST_MUTED) diff --git a/gnuradio-core/src/lib/general/gr_squelch_base_cc.h b/gnuradio-core/src/lib/general/gr_squelch_base_cc.h index 7c15e0121..f1814473f 100644 --- a/gnuradio-core/src/lib/general/gr_squelch_base_cc.h +++ b/gnuradio-core/src/lib/general/gr_squelch_base_cc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_squelch_base_cc.i b/gnuradio-core/src/lib/general/gr_squelch_base_cc.i index ea8dd62a3..6501b7d2b 100644 --- a/gnuradio-core/src/lib/general/gr_squelch_base_cc.i +++ b/gnuradio-core/src/lib/general/gr_squelch_base_cc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_squelch_base_ff.cc b/gnuradio-core/src/lib/general/gr_squelch_base_ff.cc index 32de7b3a0..4bf8cff97 100644 --- a/gnuradio-core/src/lib/general/gr_squelch_base_ff.cc +++ b/gnuradio-core/src/lib/general/gr_squelch_base_ff.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006 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, @@ -27,7 +27,7 @@ #include <gr_squelch_base_ff.h> #include <gr_io_signature.h> -gr_squelch_base_ff::gr_squelch_base_ff(const char *name, int ramp, bool gate) : +gr_squelch_base_ff::gr_squelch_base_ff(const char *name, int ramp, bool gate) : gr_block(name, gr_make_io_signature(1, 1, sizeof(float)), gr_make_io_signature(1, 1, sizeof(float))) @@ -55,7 +55,7 @@ int gr_squelch_base_ff::general_work(int noutput_items, // Adjust envelope based on current state switch(d_state) { case ST_MUTED: - if (!mute()) + if (!mute()) d_state = d_ramp ? ST_ATTACK : ST_UNMUTED; // If not ramping, go straight to unmuted break; @@ -78,7 +78,7 @@ int gr_squelch_base_ff::general_work(int noutput_items, d_state = ST_MUTED; break; }; - + // If unmuted, copy input times envelope to output // Otherwise, if not gating, copy zero to output if (d_state != ST_MUTED) diff --git a/gnuradio-core/src/lib/general/gr_squelch_base_ff.h b/gnuradio-core/src/lib/general/gr_squelch_base_ff.h index 92a064e63..eb52635b4 100644 --- a/gnuradio-core/src/lib/general/gr_squelch_base_ff.h +++ b/gnuradio-core/src/lib/general/gr_squelch_base_ff.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_squelch_base_ff.i b/gnuradio-core/src/lib/general/gr_squelch_base_ff.i index 197883767..a4e5c7115 100644 --- a/gnuradio-core/src/lib/general/gr_squelch_base_ff.i +++ b/gnuradio-core/src/lib/general/gr_squelch_base_ff.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_stream_mux.cc b/gnuradio-core/src/lib/general/gr_stream_mux.cc index 7ef2bb3c7..978d960b2 100644 --- a/gnuradio-core/src/lib/general/gr_stream_mux.cc +++ b/gnuradio-core/src/lib/general/gr_stream_mux.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, @@ -50,13 +50,13 @@ gr_stream_mux::gr_stream_mux (size_t itemsize, const std::vector<int> &lengths) increment_stream(); } d_residual = d_lengths[d_stream]; -} +} gr_stream_mux::~gr_stream_mux(void) { } -void +void gr_stream_mux::forecast (int noutput_items, gr_vector_int &ninput_items_required) { unsigned ninputs = ninput_items_required.size (); @@ -69,7 +69,7 @@ void gr_stream_mux::increment_stream() do { d_stream = (d_stream+1) % d_lengths.size(); } while(d_lengths[d_stream] == 0); - + d_residual = d_lengths[d_stream]; } @@ -96,11 +96,11 @@ gr_stream_mux::general_work(int noutput_items, ninput_items[d_stream] - input_index[d_stream])); if(VERBOSE) { printf("mux: r=%d\n", r); - printf("\tnoutput_items - out_index: %d\n", + printf("\tnoutput_items - out_index: %d\n", noutput_items - out_index); - printf("\td_residual: %d\n", + printf("\td_residual: %d\n", d_residual); - printf("\tninput_items[d_stream] - input_index[d_stream]: %d\n", + printf("\tninput_items[d_stream] - input_index[d_stream]: %d\n", ninput_items[d_stream] - input_index[d_stream]); } @@ -109,14 +109,14 @@ gr_stream_mux::general_work(int noutput_items, } in = (const char *) input_items[d_stream] + input_index[d_stream]*d_itemsize; - + memcpy(&out[out_index*d_itemsize], in, r*d_itemsize); out_index += r; input_index[d_stream] += r; d_residual -= r; consume(d_stream, r); - + if(d_residual == 0) { increment_stream(); } diff --git a/gnuradio-core/src/lib/general/gr_stream_mux.h b/gnuradio-core/src/lib/general/gr_stream_mux.h index 68415ab1d..742bf082d 100644 --- a/gnuradio-core/src/lib/general/gr_stream_mux.h +++ b/gnuradio-core/src/lib/general/gr_stream_mux.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -46,14 +46,14 @@ typedef boost::shared_ptr<gr_stream_mux> gr_stream_mux_sptr; -GR_CORE_API gr_stream_mux_sptr +GR_CORE_API gr_stream_mux_sptr gr_make_stream_mux (size_t itemsize, const std::vector<int> &lengths); /*! * \brief Stream muxing block to multiplex many streams into * one with a specified format. - * + * * Muxes N streams together producing an output stream that * contains N0 items from the first stream, N1 items from the second, * etc. and repeats: @@ -65,7 +65,7 @@ class GR_CORE_API gr_stream_mux : public gr_block { friend GR_CORE_API gr_stream_mux_sptr gr_make_stream_mux (size_t itemsize, const std::vector<int> &lengths); - + protected: gr_stream_mux (size_t itemsize, const std::vector<int> &lengths); @@ -74,7 +74,7 @@ class GR_CORE_API gr_stream_mux : public gr_block unsigned int d_stream; // index of currently selected stream int d_residual; // number if items left to put into current stream gr_vector_int d_lengths; // number if items to pack per stream - + void increment_stream(); public: diff --git a/gnuradio-core/src/lib/general/gr_stream_mux.i b/gnuradio-core/src/lib/general/gr_stream_mux.i index be6d58ab5..7cc116a23 100644 --- a/gnuradio-core/src/lib/general/gr_stream_mux.i +++ b/gnuradio-core/src/lib/general/gr_stream_mux.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006 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, @@ -24,7 +24,7 @@ GR_SWIG_BLOCK_MAGIC(gr,stream_mux) -gr_stream_mux_sptr +gr_stream_mux_sptr gr_make_stream_mux (size_t itemsize, const std::vector<int> &lengths); diff --git a/gnuradio-core/src/lib/general/gr_stream_to_streams.cc b/gnuradio-core/src/lib/general/gr_stream_to_streams.cc index 3d34dbc43..de72adb1d 100644 --- a/gnuradio-core/src/lib/general/gr_stream_to_streams.cc +++ b/gnuradio-core/src/lib/general/gr_stream_to_streams.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_stream_to_streams.h b/gnuradio-core/src/lib/general/gr_stream_to_streams.h index 905d3c556..117f57bf5 100644 --- a/gnuradio-core/src/lib/general/gr_stream_to_streams.h +++ b/gnuradio-core/src/lib/general/gr_stream_to_streams.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -28,7 +28,7 @@ class gr_stream_to_streams; typedef boost::shared_ptr<gr_stream_to_streams> gr_stream_to_streams_sptr; -GR_CORE_API gr_stream_to_streams_sptr +GR_CORE_API gr_stream_to_streams_sptr gr_make_stream_to_streams (size_t item_size, size_t nstreams); diff --git a/gnuradio-core/src/lib/general/gr_stream_to_streams.i b/gnuradio-core/src/lib/general/gr_stream_to_streams.i index a0c49404c..4d324372e 100644 --- a/gnuradio-core/src/lib/general/gr_stream_to_streams.i +++ b/gnuradio-core/src/lib/general/gr_stream_to_streams.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2005 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, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,stream_to_streams) -gr_stream_to_streams_sptr +gr_stream_to_streams_sptr gr_make_stream_to_streams (size_t itemsize, size_t nstreams); class gr_stream_to_streams : public gr_sync_decimator diff --git a/gnuradio-core/src/lib/general/gr_stream_to_vector.cc b/gnuradio-core/src/lib/general/gr_stream_to_vector.cc index f218601d7..d38cdd434 100644 --- a/gnuradio-core/src/lib/general/gr_stream_to_vector.cc +++ b/gnuradio-core/src/lib/general/gr_stream_to_vector.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2005,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_stream_to_vector.h b/gnuradio-core/src/lib/general/gr_stream_to_vector.h index 77272b96b..362349965 100644 --- a/gnuradio-core/src/lib/general/gr_stream_to_vector.h +++ b/gnuradio-core/src/lib/general/gr_stream_to_vector.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006 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, @@ -29,7 +29,7 @@ class gr_stream_to_vector; typedef boost::shared_ptr<gr_stream_to_vector> gr_stream_to_vector_sptr; -GR_CORE_API gr_stream_to_vector_sptr +GR_CORE_API gr_stream_to_vector_sptr gr_make_stream_to_vector (size_t item_size, size_t nitems_per_block); diff --git a/gnuradio-core/src/lib/general/gr_stream_to_vector.i b/gnuradio-core/src/lib/general/gr_stream_to_vector.i index 6d59c6804..ef867012a 100644 --- a/gnuradio-core/src/lib/general/gr_stream_to_vector.i +++ b/gnuradio-core/src/lib/general/gr_stream_to_vector.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006 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, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,stream_to_vector) -gr_stream_to_vector_sptr +gr_stream_to_vector_sptr gr_make_stream_to_vector (size_t itemsize, size_t nitems_per_block); class gr_stream_to_vector : public gr_sync_decimator diff --git a/gnuradio-core/src/lib/general/gr_streams_to_stream.cc b/gnuradio-core/src/lib/general/gr_streams_to_stream.cc index ce4101089..8bce74722 100644 --- a/gnuradio-core/src/lib/general/gr_streams_to_stream.cc +++ b/gnuradio-core/src/lib/general/gr_streams_to_stream.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_streams_to_stream.h b/gnuradio-core/src/lib/general/gr_streams_to_stream.h index 8207fed42..f63683767 100644 --- a/gnuradio-core/src/lib/general/gr_streams_to_stream.h +++ b/gnuradio-core/src/lib/general/gr_streams_to_stream.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -28,7 +28,7 @@ class gr_streams_to_stream; typedef boost::shared_ptr<gr_streams_to_stream> gr_streams_to_stream_sptr; -GR_CORE_API gr_streams_to_stream_sptr +GR_CORE_API gr_streams_to_stream_sptr gr_make_streams_to_stream (size_t item_size, size_t nstreams); diff --git a/gnuradio-core/src/lib/general/gr_streams_to_stream.i b/gnuradio-core/src/lib/general/gr_streams_to_stream.i index 5f5ac2850..a09ded071 100644 --- a/gnuradio-core/src/lib/general/gr_streams_to_stream.i +++ b/gnuradio-core/src/lib/general/gr_streams_to_stream.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2005 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, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,streams_to_stream) -gr_streams_to_stream_sptr +gr_streams_to_stream_sptr gr_make_streams_to_stream (size_t itemsize, size_t nstreams); class gr_streams_to_stream : public gr_sync_interpolator diff --git a/gnuradio-core/src/lib/general/gr_streams_to_vector.cc b/gnuradio-core/src/lib/general/gr_streams_to_vector.cc index e04fa4dcb..cf862ca95 100644 --- a/gnuradio-core/src/lib/general/gr_streams_to_vector.cc +++ b/gnuradio-core/src/lib/general/gr_streams_to_vector.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2005,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_streams_to_vector.h b/gnuradio-core/src/lib/general/gr_streams_to_vector.h index 6a05ac90a..1df289099 100644 --- a/gnuradio-core/src/lib/general/gr_streams_to_vector.h +++ b/gnuradio-core/src/lib/general/gr_streams_to_vector.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2005 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, @@ -29,7 +29,7 @@ class gr_streams_to_vector; typedef boost::shared_ptr<gr_streams_to_vector> gr_streams_to_vector_sptr; -GR_CORE_API gr_streams_to_vector_sptr +GR_CORE_API gr_streams_to_vector_sptr gr_make_streams_to_vector (size_t item_size, size_t nstreams); diff --git a/gnuradio-core/src/lib/general/gr_streams_to_vector.i b/gnuradio-core/src/lib/general/gr_streams_to_vector.i index 23ad3c8b2..4d5eca45e 100644 --- a/gnuradio-core/src/lib/general/gr_streams_to_vector.i +++ b/gnuradio-core/src/lib/general/gr_streams_to_vector.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2005 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, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,streams_to_vector) -gr_streams_to_vector_sptr +gr_streams_to_vector_sptr gr_make_streams_to_vector (size_t itemsize, size_t nstreams); class gr_streams_to_vector : public gr_sync_block diff --git a/gnuradio-core/src/lib/general/gr_stretch_ff.cc b/gnuradio-core/src/lib/general/gr_stretch_ff.cc index c6395798a..e89eadf8b 100644 --- a/gnuradio-core/src/lib/general/gr_stretch_ff.cc +++ b/gnuradio-core/src/lib/general/gr_stretch_ff.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2010 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, @@ -48,7 +48,7 @@ gr_stretch_ff::work(int noutput_items, { const float *in = (const float *) input_items[0]; float *out = (float *) output_items[0]; - + for (int count = 0; count < noutput_items; count++) { float vmax = in[0] - d_lo; @@ -57,7 +57,7 @@ gr_stretch_ff::work(int noutput_items, if (vtmp > vmax) vmax = vtmp; } - + if (vmax != 0.0) for (unsigned int i = 0; i < d_vlen; i++) out[i] = d_lo * (1.0 - (in[i] - d_lo) / vmax); @@ -68,7 +68,7 @@ gr_stretch_ff::work(int noutput_items, in += d_vlen; out += d_vlen; } - + return noutput_items; } diff --git a/gnuradio-core/src/lib/general/gr_stretch_ff.h b/gnuradio-core/src/lib/general/gr_stretch_ff.h index 578634dd8..f592c94a7 100644 --- a/gnuradio-core/src/lib/general/gr_stretch_ff.h +++ b/gnuradio-core/src/lib/general/gr_stretch_ff.h @@ -1,19 +1,19 @@ /* -*- 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, diff --git a/gnuradio-core/src/lib/general/gr_stretch_ff.i b/gnuradio-core/src/lib/general/gr_stretch_ff.i index 74c10fb2f..81366655e 100644 --- a/gnuradio-core/src/lib/general/gr_stretch_ff.i +++ b/gnuradio-core/src/lib/general/gr_stretch_ff.i @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/gnuradio-core/src/lib/general/gr_test.cc b/gnuradio-core/src/lib/general/gr_test.cc index 077b39707..cd5ef8361 100644 --- a/gnuradio-core/src/lib/general/gr_test.cc +++ b/gnuradio-core/src/lib/general/gr_test.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2008,2010 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, @@ -63,7 +63,7 @@ gr_test_sptr gr_make_test (const std::string &name, set_fixed_rate(fixed_rate); } -int +int gr_test::general_work (int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, @@ -109,7 +109,7 @@ gr_test::general_work (int noutput_items, case CONSUME_ALL_AVAILABLE_LIMIT_MAX: consume(i,std::min(ninput_items[i],d_max_consume)); break; -/* //This could result in segfault, uncomment if you want to test this +/* //This could result in segfault, uncomment if you want to test this case CONSUME_ALL_AVAILABLE_LIMIT_MIN: consume(i,std::max(ninput_items[i],d_max_consume)); break;*/ @@ -136,12 +136,12 @@ gr_test::general_work (int noutput_items, //Touch every available output_item for(unsigned int k=0;k<d_sizeof_output_item;k++) out[j*d_sizeof_input_item+k]=0; - } + } } - } + } //Now copy input to output until max ninputs or max noutputs is reached - int common_nports=std::min(ninputs,noutputs); - if(d_sizeof_output_item==d_sizeof_input_item) + int common_nports=std::min(ninputs,noutputs); + if(d_sizeof_output_item==d_sizeof_input_item) for (int i = 0; i < common_nports; i++) { memcpy(output_items[i],input_items[i],noutput_items*d_sizeof_input_item); @@ -154,7 +154,7 @@ gr_test::general_work (int noutput_items, case PRODUCE_NOUTPUT_ITEMS_LIMIT_MAX: noutput_items_produced=std::min(noutput_items,d_max_produce); break; -/* //This could result in segfault, uncomment if you want to test this +/* //This could result in segfault, uncomment if you want to test this case PRODUCE_NOUTPUT_ITEMS_LIMIT_MIN: noutput_items_produced=std::max(noutput_items,d_min_produce); break;*/ diff --git a/gnuradio-core/src/lib/general/gr_test.h b/gnuradio-core/src/lib/general/gr_test.h index 78e39d518..caeba4c51 100644 --- a/gnuradio-core/src/lib/general/gr_test.h +++ b/gnuradio-core/src/lib/general/gr_test.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -46,7 +46,7 @@ GR_CORE_API gr_test_sptr gr_make_test (const std::string &name=std::string("gr_t * It just exposes setting all standard block parameters using the contructor or public methods. * * This block can be usefull when testing the runtime system. - * You can force this block to have a large history, decimation + * You can force this block to have a large history, decimation * factor and/or large output_multiple. * The runtime system should detect this and create large enough buffers * all through the signal chain. @@ -54,9 +54,9 @@ GR_CORE_API gr_test_sptr gr_make_test (const std::string &name=std::string("gr_t class GR_CORE_API gr_test : public gr_block { public: - + ~gr_test (){} - + int general_work (int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, @@ -165,7 +165,7 @@ int general_work (int noutput_items, // ---------------------------------------------------------------------------- - + protected: unsigned int d_sizeof_input_item; unsigned int d_sizeof_output_item; diff --git a/gnuradio-core/src/lib/general/gr_test.i b/gnuradio-core/src/lib/general/gr_test.i index 414f9e3fe..d81025011 100644 --- a/gnuradio-core/src/lib/general/gr_test.i +++ b/gnuradio-core/src/lib/general/gr_test.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -38,7 +38,7 @@ gr_test_sptr gr_make_test (const std::string &name=std::string("gr_test"), class gr_test : public gr_block { public: - + ~gr_test (); void forecast (int noutput_items, gr_vector_int &ninput_items_required); diff --git a/gnuradio-core/src/lib/general/gr_test_types.h b/gnuradio-core/src/lib/general/gr_test_types.h index 6ca258120..04f38f7b2 100644 --- a/gnuradio-core/src/lib/general/gr_test_types.h +++ b/gnuradio-core/src/lib/general/gr_test_types.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_threshold_ff.cc b/gnuradio-core/src/lib/general/gr_threshold_ff.cc index 622fe1b45..952613151 100644 --- a/gnuradio-core/src/lib/general/gr_threshold_ff.cc +++ b/gnuradio-core/src/lib/general/gr_threshold_ff.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -51,7 +51,7 @@ gr_threshold_ff::work (int noutput_items, const float *in = (const float *) input_items[0]; float *out = (float *) output_items[0]; - + for(int i=0; i<noutput_items; i++) { if (in[i] > d_hi) { out[i] = 1.0; diff --git a/gnuradio-core/src/lib/general/gr_threshold_ff.h b/gnuradio-core/src/lib/general/gr_threshold_ff.h index 3bf3058cd..678f8b1d2 100644 --- a/gnuradio-core/src/lib/general/gr_threshold_ff.h +++ b/gnuradio-core/src/lib/general/gr_threshold_ff.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_threshold_ff.i b/gnuradio-core/src/lib/general/gr_threshold_ff.i index e1c6e03ee..7584feea8 100644 --- a/gnuradio-core/src/lib/general/gr_threshold_ff.i +++ b/gnuradio-core/src/lib/general/gr_threshold_ff.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_throttle.cc b/gnuradio-core/src/lib/general/gr_throttle.cc index a24b1da8c..040ab5220 100644 --- a/gnuradio-core/src/lib/general/gr_throttle.cc +++ b/gnuradio-core/src/lib/general/gr_throttle.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_throttle.h b/gnuradio-core/src/lib/general/gr_throttle.h index 0b6ada995..876d6d826 100644 --- a/gnuradio-core/src/lib/general/gr_throttle.h +++ b/gnuradio-core/src/lib/general/gr_throttle.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_throttle.i b/gnuradio-core/src/lib/general/gr_throttle.i index 0b1ec165f..5ba32de6e 100644 --- a/gnuradio-core/src/lib/general/gr_throttle.i +++ b/gnuradio-core/src/lib/general/gr_throttle.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_transcendental.cc b/gnuradio-core/src/lib/general/gr_transcendental.cc index 46dc0055b..c1482491b 100644 --- a/gnuradio-core/src/lib/general/gr_transcendental.cc +++ b/gnuradio-core/src/lib/general/gr_transcendental.cc @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_transcendental.h b/gnuradio-core/src/lib/general/gr_transcendental.h index 25c6eb75d..9841a53e9 100644 --- a/gnuradio-core/src/lib/general/gr_transcendental.h +++ b/gnuradio-core/src/lib/general/gr_transcendental.h @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_transcendental.i b/gnuradio-core/src/lib/general/gr_transcendental.i index 1eea73f40..6acdb10b7 100644 --- a/gnuradio-core/src/lib/general/gr_transcendental.i +++ b/gnuradio-core/src/lib/general/gr_transcendental.i @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gr_uchar_to_float.cc b/gnuradio-core/src/lib/general/gr_uchar_to_float.cc index 83616b428..981a93440 100644 --- a/gnuradio-core/src/lib/general/gr_uchar_to_float.cc +++ b/gnuradio-core/src/lib/general/gr_uchar_to_float.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 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, @@ -50,6 +50,6 @@ gr_uchar_to_float::work (int noutput_items, float *out = (float *) output_items[0]; gri_uchar_to_float (in, out, noutput_items); - + return noutput_items; } diff --git a/gnuradio-core/src/lib/general/gr_uchar_to_float.h b/gnuradio-core/src/lib/general/gr_uchar_to_float.h index 8e8836c2c..c02601cca 100644 --- a/gnuradio-core/src/lib/general/gr_uchar_to_float.h +++ b/gnuradio-core/src/lib/general/gr_uchar_to_float.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gr_uchar_to_float.i b/gnuradio-core/src/lib/general/gr_uchar_to_float.i index 44cb0dc2c..b6cc35329 100644 --- a/gnuradio-core/src/lib/general/gr_uchar_to_float.i +++ b/gnuradio-core/src/lib/general/gr_uchar_to_float.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.cc b/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.cc index e33c3da9a..00b88e972 100644 --- a/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.cc +++ b/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.h b/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.h index 056c69dc1..c3ea28d3f 100644 --- a/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.h +++ b/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -44,7 +44,7 @@ class GR_CORE_API gr_unpack_k_bits_bb : public gr_sync_interpolator gr_unpack_k_bits_bb (unsigned k); unsigned d_k; // number of relevent bits to unpack into k output bytes - + public: ~gr_unpack_k_bits_bb (); diff --git a/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.i b/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.i index 2e9aa406b..de0f4b33e 100644 --- a/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.i +++ b/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/general/gr_vco.h b/gnuradio-core/src/lib/general/gr_vco.h index 1e8636f7b..3ceaf15dd 100644 --- a/gnuradio-core/src/lib/general/gr_vco.h +++ b/gnuradio-core/src/lib/general/gr_vco.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -35,7 +35,7 @@ //FIXME Eventually generalize this to fixed point -template<class o_type, class i_type> +template<class o_type, class i_type> class gr_vco { public: gr_vco () : d_phase (0) {} @@ -50,7 +50,7 @@ public: void adjust_phase (double delta_phase) { d_phase += delta_phase; if (fabs (d_phase) > M_PI){ - + while (d_phase > M_PI) d_phase -= 2*M_PI; @@ -75,14 +75,14 @@ protected: double d_phase; }; -template<class o_type, class i_type> +template<class o_type, class i_type> void gr_vco<o_type,i_type>::sincos (float *sinx, float *cosx) const { gr_sincosf (d_phase, sinx, cosx); } -template<class o_type, class i_type> +template<class o_type, class i_type> void gr_vco<o_type,i_type>::cos (float *output, const float *input, int noutput_items, double k, double ampl) { diff --git a/gnuradio-core/src/lib/general/gr_vco_f.cc b/gnuradio-core/src/lib/general/gr_vco_f.cc index 43a686327..0899bc77e 100644 --- a/gnuradio-core/src/lib/general/gr_vco_f.cc +++ b/gnuradio-core/src/lib/general/gr_vco_f.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 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, @@ -53,6 +53,6 @@ gr_vco_f::work (int noutput_items, float *output = (float *)output_items[0]; d_vco.cos(output, input, noutput_items, d_k, d_amplitude); - + return noutput_items; } diff --git a/gnuradio-core/src/lib/general/gr_vco_f.h b/gnuradio-core/src/lib/general/gr_vco_f.h index b7524d581..83f6a9773 100644 --- a/gnuradio-core/src/lib/general/gr_vco_f.h +++ b/gnuradio-core/src/lib/general/gr_vco_f.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gr_vco_f.i b/gnuradio-core/src/lib/general/gr_vco_f.i index 025127a9a..8ecf31411 100644 --- a/gnuradio-core/src/lib/general/gr_vco_f.i +++ b/gnuradio-core/src/lib/general/gr_vco_f.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gr_vector_to_stream.cc b/gnuradio-core/src/lib/general/gr_vector_to_stream.cc index 0a0788de6..621b7ec58 100644 --- a/gnuradio-core/src/lib/general/gr_vector_to_stream.cc +++ b/gnuradio-core/src/lib/general/gr_vector_to_stream.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_vector_to_stream.h b/gnuradio-core/src/lib/general/gr_vector_to_stream.h index d2fa8c7ab..9fc8030f5 100644 --- a/gnuradio-core/src/lib/general/gr_vector_to_stream.h +++ b/gnuradio-core/src/lib/general/gr_vector_to_stream.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2005,2006 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, @@ -29,7 +29,7 @@ class gr_vector_to_stream; typedef boost::shared_ptr<gr_vector_to_stream> gr_vector_to_stream_sptr; -GR_CORE_API gr_vector_to_stream_sptr +GR_CORE_API gr_vector_to_stream_sptr gr_make_vector_to_stream (size_t item_size, size_t nitems_per_block); diff --git a/gnuradio-core/src/lib/general/gr_vector_to_stream.i b/gnuradio-core/src/lib/general/gr_vector_to_stream.i index 53679e6df..99776eeb8 100644 --- a/gnuradio-core/src/lib/general/gr_vector_to_stream.i +++ b/gnuradio-core/src/lib/general/gr_vector_to_stream.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006 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, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,vector_to_stream) -gr_vector_to_stream_sptr +gr_vector_to_stream_sptr gr_make_vector_to_stream (size_t itemsize, size_t nitems_per_block); class gr_vector_to_stream : public gr_sync_decimator diff --git a/gnuradio-core/src/lib/general/gr_vector_to_streams.cc b/gnuradio-core/src/lib/general/gr_vector_to_streams.cc index cc3264152..7ab352a4f 100644 --- a/gnuradio-core/src/lib/general/gr_vector_to_streams.cc +++ b/gnuradio-core/src/lib/general/gr_vector_to_streams.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2005,2010 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, diff --git a/gnuradio-core/src/lib/general/gr_vector_to_streams.h b/gnuradio-core/src/lib/general/gr_vector_to_streams.h index 04ac941a1..8db423053 100644 --- a/gnuradio-core/src/lib/general/gr_vector_to_streams.h +++ b/gnuradio-core/src/lib/general/gr_vector_to_streams.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2005 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, @@ -29,7 +29,7 @@ class gr_vector_to_streams; typedef boost::shared_ptr<gr_vector_to_streams> gr_vector_to_streams_sptr; -GR_CORE_API gr_vector_to_streams_sptr +GR_CORE_API gr_vector_to_streams_sptr gr_make_vector_to_streams (size_t item_size, size_t nstreams); diff --git a/gnuradio-core/src/lib/general/gr_vector_to_streams.i b/gnuradio-core/src/lib/general/gr_vector_to_streams.i index a6c36805a..d4123135b 100644 --- a/gnuradio-core/src/lib/general/gr_vector_to_streams.i +++ b/gnuradio-core/src/lib/general/gr_vector_to_streams.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2005 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, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,vector_to_streams) -gr_vector_to_streams_sptr +gr_vector_to_streams_sptr gr_make_vector_to_streams (size_t itemsize, size_t nstreams); class gr_vector_to_streams : public gr_sync_block diff --git a/gnuradio-core/src/lib/general/gr_wavelet_ff.i b/gnuradio-core/src/lib/general/gr_wavelet_ff.i deleted file mode 100644 index 9d4264170..000000000 --- a/gnuradio-core/src/lib/general/gr_wavelet_ff.i +++ /dev/null @@ -1,31 +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 this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -GR_SWIG_BLOCK_MAGIC(gr,wavelet_ff); - -gr_wavelet_ff_sptr gr_make_wavelet_ff(int size, int order, bool forward); - -class gr_wavelet_ff : public gr_sync_block -{ -private: - gr_wavelet_ff(int size, int order, bool forward); -}; - diff --git a/gnuradio-core/src/lib/general/gr_wvps_ff.i b/gnuradio-core/src/lib/general/gr_wvps_ff.i deleted file mode 100644 index 877126fb2..000000000 --- a/gnuradio-core/src/lib/general/gr_wvps_ff.i +++ /dev/null @@ -1,29 +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 this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -GR_SWIG_BLOCK_MAGIC(gr,wvps_ff); - -gr_wvps_ff_sptr gr_make_wvps_ff(int ilen); - -class gr_wvps_ff : public gr_sync_block -{ -private: - gr_wvps_ff(int ilen); -}; diff --git a/gnuradio-core/src/lib/general/gri_add_const_ss.h b/gnuradio-core/src/lib/general/gri_add_const_ss.h index 8315b2f8f..7433ee41b 100644 --- a/gnuradio-core/src/lib/general/gri_add_const_ss.h +++ b/gnuradio-core/src/lib/general/gri_add_const_ss.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gri_add_const_ss_generic.cc b/gnuradio-core/src/lib/general/gri_add_const_ss_generic.cc index 40d2a675f..3b5ee1824 100644 --- a/gnuradio-core/src/lib/general/gri_add_const_ss_generic.cc +++ b/gnuradio-core/src/lib/general/gri_add_const_ss_generic.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gri_agc2_cc.h b/gnuradio-core/src/lib/general/gri_agc2_cc.h index b0a027aad..55aa19b9a 100644 --- a/gnuradio-core/src/lib/general/gri_agc2_cc.h +++ b/gnuradio-core/src/lib/general/gri_agc2_cc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -34,7 +34,7 @@ class GR_CORE_API gri_agc2_cc { public: - gri_agc2_cc (float attack_rate = 1e-1, float decay_rate = 1e-2, float reference = 1.0, + gri_agc2_cc (float attack_rate = 1e-1, float decay_rate = 1e-2, float reference = 1.0, float gain = 1.0, float max_gain = 0.0) : _attack_rate(attack_rate), _decay_rate(decay_rate), _reference(reference), _gain(gain), _max_gain(max_gain) {}; @@ -53,14 +53,14 @@ class GR_CORE_API gri_agc2_cc { gr_complex scale (gr_complex input){ gr_complex output = input * _gain; - - float tmp = -_reference + sqrt(output.real()*output.real() + + + float tmp = -_reference + sqrt(output.real()*output.real() + output.imag()*output.imag()); float rate = _decay_rate; if((tmp) > _gain) rate = _attack_rate; _gain -= tmp*rate; - + #if 0 fprintf(stdout, "rate = %f\ttmp = %f\t gain = %f\n", rate, tmp, _gain); #endif @@ -71,7 +71,7 @@ class GR_CORE_API gri_agc2_cc { _gain = 10e-5; if (_max_gain > 0.0 && _gain > _max_gain) - _gain = _max_gain; + _gain = _max_gain; return output; } @@ -79,7 +79,7 @@ class GR_CORE_API gri_agc2_cc { for (unsigned i = 0; i < n; i++) output[i] = scale (input[i]); } - + protected: float _attack_rate; // attack rate for fast changing signals float _decay_rate; // decay rate for slow changing signals diff --git a/gnuradio-core/src/lib/general/gri_agc2_cc.i b/gnuradio-core/src/lib/general/gri_agc2_cc.i index 0f97f1d8e..08716c6ed 100644 --- a/gnuradio-core/src/lib/general/gri_agc2_cc.i +++ b/gnuradio-core/src/lib/general/gri_agc2_cc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -32,7 +32,7 @@ class gri_agc2_cc { public: - gri_agc2_cc (float attack_rate = 1e-1, float decay_rate = 1e-2, float reference = 1.0, + gri_agc2_cc (float attack_rate = 1e-1, float decay_rate = 1e-2, float reference = 1.0, float gain = 1.0, float max_gain = 0.0); float decay_rate (); float attack_rate (); diff --git a/gnuradio-core/src/lib/general/gri_agc2_ff.h b/gnuradio-core/src/lib/general/gri_agc2_ff.h index ee70c2537..a8b46bec5 100644 --- a/gnuradio-core/src/lib/general/gri_agc2_ff.h +++ b/gnuradio-core/src/lib/general/gri_agc2_ff.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2006 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, @@ -35,9 +35,9 @@ class GR_CORE_API gri_agc2_ff { public: - gri_agc2_ff (float attack_rate = 1e-1, float decay_rate = 1e-2, float reference = 1.0, + gri_agc2_ff (float attack_rate = 1e-1, float decay_rate = 1e-2, float reference = 1.0, float gain = 1.0, float max_gain = 0.0) - : _attack_rate(attack_rate), _decay_rate(decay_rate), _reference(reference), + : _attack_rate(attack_rate), _decay_rate(decay_rate), _reference(reference), _gain(gain), _max_gain(max_gain) {}; float attack_rate () const { return _attack_rate; } @@ -45,16 +45,16 @@ class GR_CORE_API gri_agc2_ff { float reference () const { return _reference; } float gain () const { return _gain; } float max_gain () const { return _max_gain; } - + void set_attack_rate (float rate) { _attack_rate = rate; } void set_decay_rate (float rate) { _decay_rate = rate; } void set_reference (float reference) { _reference = reference; } void set_gain (float gain) { _gain = gain; } void set_max_gain (float max_gain) { _max_gain = max_gain; } - + float scale (float input){ float output = input * _gain; - + float tmp = (fabsf(output)) - _reference; float rate = _decay_rate; if(fabsf(tmp) > _gain) @@ -78,7 +78,7 @@ class GR_CORE_API gri_agc2_ff { for (unsigned i = 0; i < n; i++) output[i] = scale (input[i]); } - + protected: float _attack_rate; // attack_rate for fast changing signals float _decay_rate; // decay rate for slow changing signals diff --git a/gnuradio-core/src/lib/general/gri_agc2_ff.i b/gnuradio-core/src/lib/general/gri_agc2_ff.i index d04b638a6..9f97d8f0d 100644 --- a/gnuradio-core/src/lib/general/gri_agc2_ff.i +++ b/gnuradio-core/src/lib/general/gri_agc2_ff.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2006 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, diff --git a/gnuradio-core/src/lib/general/gri_agc_cc.h b/gnuradio-core/src/lib/general/gri_agc_cc.h index 74dfdf1dc..90edc5dcd 100644 --- a/gnuradio-core/src/lib/general/gri_agc_cc.h +++ b/gnuradio-core/src/lib/general/gri_agc_cc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -35,7 +35,7 @@ class GR_CORE_API gri_agc_cc { public: - gri_agc_cc (float rate = 1e-4, float reference = 1.0, + gri_agc_cc (float rate = 1e-4, float reference = 1.0, float gain = 1.0, float max_gain = 0.0) : _rate(rate), _reference(reference), _gain(gain), _max_gain(max_gain) {}; @@ -52,11 +52,11 @@ class GR_CORE_API gri_agc_cc { gr_complex scale (gr_complex input){ gr_complex output = input * _gain; - - _gain += _rate * (_reference - sqrt(output.real()*output.real() + + + _gain += _rate * (_reference - sqrt(output.real()*output.real() + output.imag()*output.imag())); if (_max_gain > 0.0 && _gain > _max_gain) - _gain = _max_gain; + _gain = _max_gain; return output; } @@ -64,7 +64,7 @@ class GR_CORE_API gri_agc_cc { for (unsigned i = 0; i < n; i++) output[i] = scale (input[i]); } - + protected: float _rate; // adjustment rate float _reference; // reference value diff --git a/gnuradio-core/src/lib/general/gri_agc_cc.i b/gnuradio-core/src/lib/general/gri_agc_cc.i index f26185c0f..d3dd9b61b 100644 --- a/gnuradio-core/src/lib/general/gri_agc_cc.i +++ b/gnuradio-core/src/lib/general/gri_agc_cc.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -32,7 +32,7 @@ class gri_agc_cc { public: - gri_agc_cc (float rate = 1e-4, float reference = 1.0, + gri_agc_cc (float rate = 1e-4, float reference = 1.0, float gain = 1.0, float max_gain = 0.0); float rate (); float reference (); diff --git a/gnuradio-core/src/lib/general/gri_agc_ff.h b/gnuradio-core/src/lib/general/gri_agc_ff.h index 753bbe275..1c233c746 100644 --- a/gnuradio-core/src/lib/general/gri_agc_ff.h +++ b/gnuradio-core/src/lib/general/gri_agc_ff.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2006 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, @@ -42,12 +42,12 @@ class GR_CORE_API gri_agc_ff { float reference () const { return _reference; } float gain () const { return _gain; } float max_gain () const { return _max_gain; } - + void set_rate (float rate) { _rate = rate; } void set_reference (float reference) { _reference = reference; } void set_gain (float gain) { _gain = gain; } void set_max_gain (float max_gain) { _max_gain = max_gain; } - + float scale (float input){ float output = input * _gain; _gain += (_reference - fabsf (output)) * _rate; @@ -60,7 +60,7 @@ class GR_CORE_API gri_agc_ff { for (unsigned i = 0; i < n; i++) output[i] = scale (input[i]); } - + protected: float _rate; // adjustment rate float _reference; // reference value diff --git a/gnuradio-core/src/lib/general/gri_agc_ff.i b/gnuradio-core/src/lib/general/gri_agc_ff.i index 1358e7193..df4acf7af 100644 --- a/gnuradio-core/src/lib/general/gri_agc_ff.i +++ b/gnuradio-core/src/lib/general/gri_agc_ff.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2006 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, diff --git a/gnuradio-core/src/lib/general/gri_char_to_float.cc b/gnuradio-core/src/lib/general/gri_char_to_float.cc index f14ef4e4b..fd9a6636a 100644 --- a/gnuradio-core/src/lib/general/gri_char_to_float.cc +++ b/gnuradio-core/src/lib/general/gri_char_to_float.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -22,7 +22,7 @@ #include <gri_char_to_float.h> -void +void gri_char_to_float (const char *in, float *out, int nsamples) { while (nsamples >= 4){ diff --git a/gnuradio-core/src/lib/general/gri_char_to_float.h b/gnuradio-core/src/lib/general/gri_char_to_float.h index 890d482b5..8bd3bfde7 100644 --- a/gnuradio-core/src/lib/general/gri_char_to_float.h +++ b/gnuradio-core/src/lib/general/gri_char_to_float.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/gri_control_loop.cc b/gnuradio-core/src/lib/general/gri_control_loop.cc index 4c64bb922..5a93737f9 100644 --- a/gnuradio-core/src/lib/general/gri_control_loop.cc +++ b/gnuradio-core/src/lib/general/gri_control_loop.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -72,11 +72,11 @@ gri_control_loop::phase_wrap() void gri_control_loop::frequency_limit() -{ +{ if (d_freq > d_max_freq) d_freq = d_max_freq; else if (d_freq < d_min_freq) - d_freq = d_min_freq; + d_freq = d_min_freq; } /******************************************************************* @@ -89,18 +89,18 @@ gri_control_loop::set_loop_bandwidth(float bw) if(bw < 0) { throw std::out_of_range ("gri_control_loop: invalid bandwidth. Must be >= 0."); } - + d_loop_bw = bw; update_gains(); } void -gri_control_loop::set_damping_factor(float df) +gri_control_loop::set_damping_factor(float df) { if(df < 0 || df > 1.0) { throw std::out_of_range ("gri_control_loop: invalid damping factor. Must be in [0,1]."); } - + d_damping = df; update_gains(); } @@ -144,7 +144,7 @@ gri_control_loop::set_phase(float phase) d_phase += M_TWOPI; } - + /******************************************************************* GET FUNCTIONS *******************************************************************/ diff --git a/gnuradio-core/src/lib/general/gri_control_loop.h b/gnuradio-core/src/lib/general/gri_control_loop.h index 3aeac58f7..df260d2cf 100644 --- a/gnuradio-core/src/lib/general/gri_control_loop.h +++ b/gnuradio-core/src/lib/general/gri_control_loop.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -86,7 +86,7 @@ class GR_CORE_API gri_control_loop /*! * \brief Set the loop bandwidth * - * Set the loop filter's bandwidth to \p bw. This should be between + * Set the loop filter's bandwidth to \p bw. This should be between * 2*pi/200 and 2*pi/100 (in rads/samp). It must also be a positive * number. * @@ -164,7 +164,7 @@ class GR_CORE_API gri_control_loop */ void set_phase(float phase); - + /******************************************************************* GET FUNCTIONS *******************************************************************/ diff --git a/gnuradio-core/src/lib/general/gri_control_loop.i b/gnuradio-core/src/lib/general/gri_control_loop.i index 67f8838cb..8a23207e5 100644 --- a/gnuradio-core/src/lib/general/gri_control_loop.i +++ b/gnuradio-core/src/lib/general/gri_control_loop.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -43,7 +43,7 @@ class gri_control_loop void set_frequency(float freq); void set_phase(float phase); - + /******************************************************************* GET FUNCTIONS *******************************************************************/ diff --git a/gnuradio-core/src/lib/general/gri_debugger_hook.cc b/gnuradio-core/src/lib/general/gri_debugger_hook.cc index 2d96eda43..d9270c435 100644 --- a/gnuradio-core/src/lib/general/gri_debugger_hook.cc +++ b/gnuradio-core/src/lib/general/gri_debugger_hook.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gri_debugger_hook.h b/gnuradio-core/src/lib/general/gri_debugger_hook.h index cf227af8f..c871c7bf6 100644 --- a/gnuradio-core/src/lib/general/gri_debugger_hook.h +++ b/gnuradio-core/src/lib/general/gri_debugger_hook.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gri_fft.cc b/gnuradio-core/src/lib/general/gri_fft.cc index 2edb5f5aa..68e7e6951 100644 --- a/gnuradio-core/src/lib/general/gri_fft.cc +++ b/gnuradio-core/src/lib/general/gri_fft.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003,2008,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -81,7 +81,7 @@ wisdom_filename () return path.string().c_str(); } -static void +static void gri_fftw_import_wisdom () { const char *filename = wisdom_filename (); @@ -99,14 +99,14 @@ static void gri_fftw_config_threading (int nthreads) { static int fftw_threads_inited = 0; - + #ifdef FFTW3F_THREADS if (fftw_threads_inited == 0) { fftw_threads_inited = 1; fftwf_init_threads(); } - + fftwf_plan_with_nthreads(nthreads); #endif } @@ -134,15 +134,15 @@ gri_fft_complex::gri_fft_complex (int fft_size, bool forward, int nthreads) gri_fft_planner::scoped_lock lock(gri_fft_planner::mutex()); assert (sizeof (fftwf_complex) == sizeof (gr_complex)); - + if (fft_size <= 0) throw std::out_of_range ("gri_fftw: invalid fft_size"); - + d_fft_size = fft_size; d_inbuf = (gr_complex *) fftwf_malloc (sizeof (gr_complex) * inbuf_length ()); if (d_inbuf == 0) throw std::runtime_error ("fftwf_malloc"); - + d_outbuf = (gr_complex *) fftwf_malloc (sizeof (gr_complex) * outbuf_length ()); if (d_outbuf == 0){ fftwf_free (d_inbuf); @@ -154,7 +154,7 @@ gri_fft_complex::gri_fft_complex (int fft_size, bool forward, int nthreads) gri_fftw_import_wisdom (); // load prior wisdom from disk d_plan = fftwf_plan_dft_1d (fft_size, - reinterpret_cast<fftwf_complex *>(d_inbuf), + reinterpret_cast<fftwf_complex *>(d_inbuf), reinterpret_cast<fftwf_complex *>(d_outbuf), forward ? FFTW_FORWARD : FFTW_BACKWARD, FFTW_MEASURE); @@ -176,7 +176,7 @@ gri_fft_complex::~gri_fft_complex () fftwf_free (d_outbuf); } -void +void gri_fft_complex::set_nthreads(int n) { if (n <= 0) @@ -202,15 +202,15 @@ gri_fft_real_fwd::gri_fft_real_fwd (int fft_size, int nthreads) gri_fft_planner::scoped_lock lock(gri_fft_planner::mutex()); assert (sizeof (fftwf_complex) == sizeof (gr_complex)); - + if (fft_size <= 0) throw std::out_of_range ("gri_fftw: invalid fft_size"); - + d_fft_size = fft_size; d_inbuf = (float *) fftwf_malloc (sizeof (float) * inbuf_length ()); if (d_inbuf == 0) throw std::runtime_error ("fftwf_malloc"); - + d_outbuf = (gr_complex *) fftwf_malloc (sizeof (gr_complex) * outbuf_length ()); if (d_outbuf == 0){ fftwf_free (d_inbuf); @@ -220,7 +220,7 @@ gri_fft_real_fwd::gri_fft_real_fwd (int fft_size, int nthreads) d_nthreads = nthreads; gri_fftw_config_threading (nthreads); gri_fftw_import_wisdom (); // load prior wisdom from disk - + d_plan = fftwf_plan_dft_r2c_1d (fft_size, d_inbuf, reinterpret_cast<fftwf_complex *>(d_outbuf), @@ -243,7 +243,7 @@ gri_fft_real_fwd::~gri_fft_real_fwd () fftwf_free (d_outbuf); } -void +void gri_fft_real_fwd::set_nthreads(int n) { if (n <= 0) @@ -269,15 +269,15 @@ gri_fft_real_rev::gri_fft_real_rev (int fft_size, int nthreads) gri_fft_planner::scoped_lock lock(gri_fft_planner::mutex()); assert (sizeof (fftwf_complex) == sizeof (gr_complex)); - + if (fft_size <= 0) throw std::out_of_range ("gri_fftw: invalid fft_size"); - + d_fft_size = fft_size; d_inbuf = (gr_complex *) fftwf_malloc (sizeof (gr_complex) * inbuf_length ()); if (d_inbuf == 0) throw std::runtime_error ("fftwf_malloc"); - + d_outbuf = (float *) fftwf_malloc (sizeof (float) * outbuf_length ()); if (d_outbuf == 0){ fftwf_free (d_inbuf); @@ -287,7 +287,7 @@ gri_fft_real_rev::gri_fft_real_rev (int fft_size, int nthreads) d_nthreads = nthreads; gri_fftw_config_threading (nthreads); gri_fftw_import_wisdom (); // load prior wisdom from disk - + // FIXME If there's ever a chance that the planning functions // will be called in multiple threads, we've got to ensure single // threaded access. They are not thread-safe. @@ -310,7 +310,7 @@ gri_fft_real_rev::~gri_fft_real_rev () fftwf_free (d_outbuf); } -void +void gri_fft_real_rev::set_nthreads(int n) { if (n <= 0) diff --git a/gnuradio-core/src/lib/general/gri_fft.h b/gnuradio-core/src/lib/general/gri_fft.h index f77a18e52..65e9d046e 100644 --- a/gnuradio-core/src/lib/general/gri_fft.h +++ b/gnuradio-core/src/lib/general/gri_fft.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003,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, @@ -66,7 +66,7 @@ class GR_CORE_API gri_fft_complex { gr_complex *d_inbuf; gr_complex *d_outbuf; void *d_plan; - + public: gri_fft_complex (int fft_size, bool forward = true, int nthreads=1); virtual ~gri_fft_complex (); @@ -108,7 +108,7 @@ class GR_CORE_API gri_fft_real_fwd { float *d_inbuf; gr_complex *d_outbuf; void *d_plan; - + public: gri_fft_real_fwd (int fft_size, int nthreads=1); virtual ~gri_fft_real_fwd (); @@ -150,7 +150,7 @@ class GR_CORE_API gri_fft_real_rev { gr_complex *d_inbuf; float *d_outbuf; void *d_plan; - + public: gri_fft_real_rev (int fft_size, int nthreads=1); virtual ~gri_fft_real_rev (); diff --git a/gnuradio-core/src/lib/general/gri_float_to_char.cc b/gnuradio-core/src/lib/general/gri_float_to_char.cc index 28f15a3b3..3e779b0e7 100644 --- a/gnuradio-core/src/lib/general/gri_float_to_char.cc +++ b/gnuradio-core/src/lib/general/gri_float_to_char.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -32,7 +32,7 @@ static const int MIN_CHAR = -128; static const int MAX_CHAR = 127; -void +void gri_float_to_char (const float *in, char *out, int nsamples) { for (int i = 0; i < nsamples; i++){ diff --git a/gnuradio-core/src/lib/general/gri_float_to_char.h b/gnuradio-core/src/lib/general/gri_float_to_char.h index 184592a69..172a7da65 100644 --- a/gnuradio-core/src/lib/general/gri_float_to_char.h +++ b/gnuradio-core/src/lib/general/gri_float_to_char.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/general/gri_float_to_int.cc b/gnuradio-core/src/lib/general/gri_float_to_int.cc index 0b0b10dfe..525ea675d 100644 --- a/gnuradio-core/src/lib/general/gri_float_to_int.cc +++ b/gnuradio-core/src/lib/general/gri_float_to_int.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -33,7 +33,7 @@ static const int64_t MAX_INT = 2147483647; // (2^31)-1 static const int64_t MIN_INT = -2147483647; // -(2^31)-1 -void +void gri_float_to_int (const float *in, int *out, float scale, int nsamples) { for (int i = 0; i < nsamples; i++){ diff --git a/gnuradio-core/src/lib/general/gri_float_to_int.h b/gnuradio-core/src/lib/general/gri_float_to_int.h index d8b98efc1..84f72a420 100644 --- a/gnuradio-core/src/lib/general/gri_float_to_int.h +++ b/gnuradio-core/src/lib/general/gri_float_to_int.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gri_float_to_short.cc b/gnuradio-core/src/lib/general/gri_float_to_short.cc index 93a2784f5..4508e37a7 100644 --- a/gnuradio-core/src/lib/general/gri_float_to_short.cc +++ b/gnuradio-core/src/lib/general/gri_float_to_short.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -32,7 +32,7 @@ static const int MIN_SHORT = -32768; static const int MAX_SHORT = 32767; -void +void gri_float_to_short (const float *in, short *out, int nsamples) { for (int i = 0; i < nsamples; i++){ diff --git a/gnuradio-core/src/lib/general/gri_float_to_short.h b/gnuradio-core/src/lib/general/gri_float_to_short.h index 6d814b2b3..b9cdf685b 100644 --- a/gnuradio-core/src/lib/general/gri_float_to_short.h +++ b/gnuradio-core/src/lib/general/gri_float_to_short.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/general/gri_float_to_uchar.cc b/gnuradio-core/src/lib/general/gri_float_to_uchar.cc index a022c95d8..9ea42a31b 100644 --- a/gnuradio-core/src/lib/general/gri_float_to_uchar.cc +++ b/gnuradio-core/src/lib/general/gri_float_to_uchar.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -32,7 +32,7 @@ static const int MIN_UCHAR = 0; static const int MAX_UCHAR = 255; -void +void gri_float_to_uchar (const float *in, unsigned char *out, int nsamples) { for (int i = 0; i < nsamples; i++){ diff --git a/gnuradio-core/src/lib/general/gri_float_to_uchar.h b/gnuradio-core/src/lib/general/gri_float_to_uchar.h index ff549333e..e24b1973f 100644 --- a/gnuradio-core/src/lib/general/gri_float_to_uchar.h +++ b/gnuradio-core/src/lib/general/gri_float_to_uchar.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/general/gri_glfsr.cc b/gnuradio-core/src/lib/general/gri_glfsr.cc index 940ef0374..ba6951882 100644 --- a/gnuradio-core/src/lib/general/gri_glfsr.cc +++ b/gnuradio-core/src/lib/general/gri_glfsr.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, diff --git a/gnuradio-core/src/lib/general/gri_glfsr.h b/gnuradio-core/src/lib/general/gri_glfsr.h index e6d28cf45..9aae2d9f1 100644 --- a/gnuradio-core/src/lib/general/gri_glfsr.h +++ b/gnuradio-core/src/lib/general/gri_glfsr.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, diff --git a/gnuradio-core/src/lib/general/gri_int_to_float.cc b/gnuradio-core/src/lib/general/gri_int_to_float.cc index 342c20cc4..91da08897 100644 --- a/gnuradio-core/src/lib/general/gri_int_to_float.cc +++ b/gnuradio-core/src/lib/general/gri_int_to_float.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -28,7 +28,7 @@ #include <gri_int_to_float.h> #include <math.h> -void +void gri_int_to_float (const int *in, float *out, int nsamples) { for (int i = 0; i < nsamples; i++){ diff --git a/gnuradio-core/src/lib/general/gri_int_to_float.h b/gnuradio-core/src/lib/general/gri_int_to_float.h index 29d1e3b7d..4b08b7c6b 100644 --- a/gnuradio-core/src/lib/general/gri_int_to_float.h +++ b/gnuradio-core/src/lib/general/gri_int_to_float.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/gri_interleaved_short_to_complex.cc b/gnuradio-core/src/lib/general/gri_interleaved_short_to_complex.cc index 5eefe9343..7d0af0fc7 100644 --- a/gnuradio-core/src/lib/general/gri_interleaved_short_to_complex.cc +++ b/gnuradio-core/src/lib/general/gri_interleaved_short_to_complex.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -27,12 +27,12 @@ #include <gri_interleaved_short_to_complex.h> #include <assert.h> -void +void gri_interleaved_short_to_complex (const short *in, gr_complex *out, int nsamples) { assert (nsamples % 2 == 0); - + for (int i = 0; i < nsamples/2; i++){ out[i] = gr_complex (in[i*2 + 0], in[i*2 + 1]); } diff --git a/gnuradio-core/src/lib/general/gri_interleaved_short_to_complex.h b/gnuradio-core/src/lib/general/gri_interleaved_short_to_complex.h index 107e2f778..8d8a0d16e 100644 --- a/gnuradio-core/src/lib/general/gri_interleaved_short_to_complex.h +++ b/gnuradio-core/src/lib/general/gri_interleaved_short_to_complex.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/general/gri_lfsr.h b/gnuradio-core/src/lib/general/gri_lfsr.h index dc9358572..420236077 100644 --- a/gnuradio-core/src/lib/general/gri_lfsr.h +++ b/gnuradio-core/src/lib/general/gri_lfsr.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2010 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, @@ -32,9 +32,9 @@ * \ingroup misc * * Generates a maximal length pseudo-random sequence of length 2^degree-1 - * + * * Constructor: gri_lfsr(int mask, int seed, int reg_len); - * + * * mask - polynomial coefficients representing the locations * of feedback taps from a shift register which are xor'ed * together to form the new high order bit. @@ -48,32 +48,32 @@ * durring initialization. Low order bit corresponds * to x^0 coefficient -- the first to be shifted as output. * - * reg_len - specifies the length of the feedback shift register + * reg_len - specifies the length of the feedback shift register * to be used. Durring each iteration, the register * is rightshifted one and the new bit is placed in bit reg_len. * reg_len should generally be at least order(mask) + 1 * * - * see http://en.wikipedia.org/wiki/Linear_feedback_shift_register + * see http://en.wikipedia.org/wiki/Linear_feedback_shift_register * for more explanation. * * * * next_bit() - Standard LFSR operation - * + * * Perform one cycle of the LFSR. The output bit is taken from * the shift register LSB. The shift register MSB is assigned from * the modulo 2 sum of the masked shift register. - * + * * next_bit_scramble(unsigned char input) - Scramble an input stream - * + * * Perform one cycle of the LFSR. The output bit is taken from * the shift register LSB. The shift register MSB is assigned from * the modulo 2 sum of the masked shift register and the input LSB. * * next_bit_descramble(unsigned char input) - Descramble an input stream * - * Perform one cycle of the LFSR. The output bit is taken from + * Perform one cycle of the LFSR. The output bit is taken from * the modulo 2 sum of the masked shift register and the input LSB. * The shift register MSB is assigned from the LSB of the input. * @@ -101,8 +101,8 @@ class GR_CORE_API gri_lfsr public: gri_lfsr(uint32_t mask, uint32_t seed, uint32_t reg_len) - : d_shift_register(seed), - d_mask(mask), + : d_shift_register(seed), + d_mask(mask), d_seed(seed), d_shift_register_length(reg_len) { diff --git a/gnuradio-core/src/lib/general/gri_lfsr_15_1_0.h b/gnuradio-core/src/lib/general/gri_lfsr_15_1_0.h index 7405ffbaa..578739f7e 100644 --- a/gnuradio-core/src/lib/general/gri_lfsr_15_1_0.h +++ b/gnuradio-core/src/lib/general/gri_lfsr_15_1_0.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -40,7 +40,7 @@ class GR_CORE_API gri_lfsr_15_1_0 { gri_lfsr_15_1_0 () { reset (); } void reset () { d_sr = 0x7fff; } - + int next_bit (){ d_sr = ((((d_sr >> 1) ^ d_sr) & 0x1) << 14) | (d_sr >> 1); return d_sr & 0x1; diff --git a/gnuradio-core/src/lib/general/gri_lfsr_32k.h b/gnuradio-core/src/lib/general/gri_lfsr_32k.h index 5c0396b50..e84512b9a 100644 --- a/gnuradio-core/src/lib/general/gri_lfsr_32k.h +++ b/gnuradio-core/src/lib/general/gri_lfsr_32k.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -45,7 +45,7 @@ class GR_CORE_API gri_lfsr_32k { d_lfsr.reset (); d_count = 0; } - + int next_bit (){ if (d_count == 32767){ d_count = 0; diff --git a/gnuradio-core/src/lib/general/gri_short_to_float.cc b/gnuradio-core/src/lib/general/gri_short_to_float.cc index 84d0ed994..d5d0e786e 100644 --- a/gnuradio-core/src/lib/general/gri_short_to_float.cc +++ b/gnuradio-core/src/lib/general/gri_short_to_float.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -22,7 +22,7 @@ #include <gri_short_to_float.h> -void +void gri_short_to_float (const short *in, float *out, int nsamples) { while (nsamples >= 4){ diff --git a/gnuradio-core/src/lib/general/gri_short_to_float.h b/gnuradio-core/src/lib/general/gri_short_to_float.h index 51767efab..2ffdbb45b 100644 --- a/gnuradio-core/src/lib/general/gri_short_to_float.h +++ b/gnuradio-core/src/lib/general/gri_short_to_float.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/general/gri_uchar_to_float.cc b/gnuradio-core/src/lib/general/gri_uchar_to_float.cc index f277af7dd..91f3e7336 100644 --- a/gnuradio-core/src/lib/general/gri_uchar_to_float.cc +++ b/gnuradio-core/src/lib/general/gri_uchar_to_float.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -22,7 +22,7 @@ #include <gri_uchar_to_float.h> -void +void gri_uchar_to_float (const unsigned char *in, float *out, int nsamples) { while (nsamples >= 4){ diff --git a/gnuradio-core/src/lib/general/gri_uchar_to_float.h b/gnuradio-core/src/lib/general/gri_uchar_to_float.h index 9f342989d..633c5d4ce 100644 --- a/gnuradio-core/src/lib/general/gri_uchar_to_float.h +++ b/gnuradio-core/src/lib/general/gri_uchar_to_float.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/general/malloc16.h b/gnuradio-core/src/lib/general/malloc16.h index 6b1a3fb08..eaa32c625 100644 --- a/gnuradio-core/src/lib/general/malloc16.h +++ b/gnuradio-core/src/lib/general/malloc16.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/general/qa_general.cc b/gnuradio-core/src/lib/general/qa_general.cc index b9080f362..26b21983e 100644 --- a/gnuradio-core/src/lib/general/qa_general.cc +++ b/gnuradio-core/src/lib/general/qa_general.cc @@ -1,18 +1,18 @@ /* * Copyright 2002 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, @@ -48,6 +48,6 @@ qa_general::suite () s->addTest (qa_gr_fxpt_vco::suite ()); s->addTest (qa_gr_math::suite ()); s->addTest (qa_gri_lfsr::suite ()); - + return s; } diff --git a/gnuradio-core/src/lib/general/qa_general.h b/gnuradio-core/src/lib/general/qa_general.h index 7da188266..bf52cddc1 100644 --- a/gnuradio-core/src/lib/general/qa_general.h +++ b/gnuradio-core/src/lib/general/qa_general.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/general/qa_gr_circular_file.cc b/gnuradio-core/src/lib/general/qa_gr_circular_file.cc index 31d599ba1..243e44784 100644 --- a/gnuradio-core/src/lib/general/qa_gr_circular_file.cc +++ b/gnuradio-core/src/lib/general/qa_gr_circular_file.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -40,7 +40,7 @@ qa_gr_circular_file::t1 () #ifdef HAVE_MMAP gr_circular_file *cf_writer; gr_circular_file *cf_reader; - + // write the data... cf_writer = new gr_circular_file (test_file, true, BUFFER_SIZE * sizeof (short)); diff --git a/gnuradio-core/src/lib/general/qa_gr_circular_file.h b/gnuradio-core/src/lib/general/qa_gr_circular_file.h index 1c33aa60a..df35ab077 100644 --- a/gnuradio-core/src/lib/general/qa_gr_circular_file.h +++ b/gnuradio-core/src/lib/general/qa_gr_circular_file.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/general/qa_gr_cpm.cc b/gnuradio-core/src/lib/general/qa_gr_cpm.cc index cc32d1117..ee3e2bdea 100644 --- a/gnuradio-core/src/lib/general/qa_gr_cpm.cc +++ b/gnuradio-core/src/lib/general/qa_gr_cpm.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, diff --git a/gnuradio-core/src/lib/general/qa_gr_cpm.h b/gnuradio-core/src/lib/general/qa_gr_cpm.h index 741cb2860..2f46b42a7 100644 --- a/gnuradio-core/src/lib/general/qa_gr_cpm.h +++ b/gnuradio-core/src/lib/general/qa_gr_cpm.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, diff --git a/gnuradio-core/src/lib/general/qa_gr_firdes.cc b/gnuradio-core/src/lib/general/qa_gr_firdes.cc index 771249b2c..877b4bd56 100644 --- a/gnuradio-core/src/lib/general/qa_gr_firdes.cc +++ b/gnuradio-core/src/lib/general/qa_gr_firdes.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -37,7 +37,7 @@ using std::vector; static void print_taps (std::ostream &s, vector<float> &v) { - + for (unsigned int i = 0; i < v.size (); i++){ printf ("tap[%2d] = %16.7e\n", i, v[i]); } diff --git a/gnuradio-core/src/lib/general/qa_gr_firdes.h b/gnuradio-core/src/lib/general/qa_gr_firdes.h index d8566454a..98cee99b9 100644 --- a/gnuradio-core/src/lib/general/qa_gr_firdes.h +++ b/gnuradio-core/src/lib/general/qa_gr_firdes.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/general/qa_gr_fxpt.cc b/gnuradio-core/src/lib/general/qa_gr_fxpt.cc index 00487714e..7eac0d896 100644 --- a/gnuradio-core/src/lib/general/qa_gr_fxpt.cc +++ b/gnuradio-core/src/lib/general/qa_gr_fxpt.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/qa_gr_fxpt.h b/gnuradio-core/src/lib/general/qa_gr_fxpt.h index 822ce7936..72211563e 100644 --- a/gnuradio-core/src/lib/general/qa_gr_fxpt.h +++ b/gnuradio-core/src/lib/general/qa_gr_fxpt.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/qa_gr_fxpt_nco.cc b/gnuradio-core/src/lib/general/qa_gr_fxpt_nco.cc index 638bd1b6d..6f208eac8 100644 --- a/gnuradio-core/src/lib/general/qa_gr_fxpt_nco.cc +++ b/gnuradio-core/src/lib/general/qa_gr_fxpt_nco.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/qa_gr_fxpt_nco.h b/gnuradio-core/src/lib/general/qa_gr_fxpt_nco.h index 966b22f03..8998922bb 100644 --- a/gnuradio-core/src/lib/general/qa_gr_fxpt_nco.h +++ b/gnuradio-core/src/lib/general/qa_gr_fxpt_nco.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/general/qa_gr_fxpt_vco.cc b/gnuradio-core/src/lib/general/qa_gr_fxpt_vco.cc index 113006a22..5b6993a30 100644 --- a/gnuradio-core/src/lib/general/qa_gr_fxpt_vco.cc +++ b/gnuradio-core/src/lib/general/qa_gr_fxpt_vco.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2005 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, diff --git a/gnuradio-core/src/lib/general/qa_gr_fxpt_vco.h b/gnuradio-core/src/lib/general/qa_gr_fxpt_vco.h index f3868cb4f..fab8022e3 100644 --- a/gnuradio-core/src/lib/general/qa_gr_fxpt_vco.h +++ b/gnuradio-core/src/lib/general/qa_gr_fxpt_vco.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2005 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, diff --git a/gnuradio-core/src/lib/general/qa_gr_math.cc b/gnuradio-core/src/lib/general/qa_gr_math.cc index b3a1b959d..74d51b536 100644 --- a/gnuradio-core/src/lib/general/qa_gr_math.cc +++ b/gnuradio-core/src/lib/general/qa_gr_math.cc @@ -1,18 +1,18 @@ /* * 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, @@ -44,7 +44,7 @@ qa_gr_math::test_binary_slicer1 () y = gr_branchless_binary_slicer(x[i]); //printf("in: %f out: %d desired: %d\n", x[i], y, z[i]); - CPPUNIT_ASSERT_DOUBLES_EQUAL(y, z[i], 1e-9); + CPPUNIT_ASSERT_DOUBLES_EQUAL(y, z[i], 1e-9); } } @@ -52,7 +52,7 @@ void qa_gr_math::test_quad_0deg_slicer1 () { gr_complex x[4] = {gr_complex(1, 0), - gr_complex(0, 1), + gr_complex(0, 1), gr_complex(-1, 0), gr_complex(0, -1)}; @@ -71,7 +71,7 @@ qa_gr_math::test_quad_0deg_slicer1 () for (unsigned int i = 0; i < 4; i++) { y = gr_branchless_quad_0deg_slicer(x[i]); //printf("in: %.4f+j%.4f out: %d desired: %d\n", x[i].real(), x[i].imag(), y, z[i]); - + CPPUNIT_ASSERT_DOUBLES_EQUAL(y, z[i], 1e-9); } } @@ -80,10 +80,10 @@ void qa_gr_math::test_quad_45deg_slicer1 () { gr_complex x[4] = {gr_complex(0.707, 0.707), - gr_complex(-0.707, 0.707), + gr_complex(-0.707, 0.707), gr_complex(-0.707, -0.707), gr_complex(0.707, -0.707)}; - + unsigned int z[4] = {0, 1, 2, 3}; unsigned int y; diff --git a/gnuradio-core/src/lib/general/qa_gr_math.h b/gnuradio-core/src/lib/general/qa_gr_math.h index bcc3a62d0..86858c03d 100644 --- a/gnuradio-core/src/lib/general/qa_gr_math.h +++ b/gnuradio-core/src/lib/general/qa_gr_math.h @@ -1,19 +1,19 @@ /* -*- 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, diff --git a/gnuradio-core/src/lib/general/qa_gri_lfsr.cc b/gnuradio-core/src/lib/general/qa_gri_lfsr.cc index 9625071d8..87d610df6 100644 --- a/gnuradio-core/src/lib/general/qa_gri_lfsr.cc +++ b/gnuradio-core/src/lib/general/qa_gri_lfsr.cc @@ -1,18 +1,18 @@ /* * 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, @@ -35,7 +35,7 @@ qa_gri_lfsr::test_lfsr () gri_lfsr lfsr1(mask,seed,length); gri_lfsr lfsr2(mask,seed,length); - + unsigned char expected[] = {1, 0, 1, 1, 0, 1, 0, 1, 0, 0}; for(unsigned int i=0; i<31; i++){ @@ -67,27 +67,27 @@ qa_gri_lfsr::test_scrambler() gri_lfsr scrambler(mask, seed, length); // Impulse (1 and 126 more zeroes) - unsigned char src[] = - { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + unsigned char src[] = + { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // flush bits - + // Impulse response (including leading bits) unsigned char expected[] = - { 1, 1, 1, 1, 1, 1, 1, - 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, - 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, - 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, - 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, - 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, - 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, - 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, + { 1, 1, 1, 1, 1, 1, 1, + 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, + 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, + 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, + 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, + 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, + 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, }; int len = sizeof(src); @@ -111,27 +111,27 @@ qa_gri_lfsr::test_descrambler() // Scrambled sequence (impulse response) unsigned char src[] = - { 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, - 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, - 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, - 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, - 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, - 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, - 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, - 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0 }; + { 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, + 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, + 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, + 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, + 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, + 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0 }; // Original (garbage while synchronizing, them impulse) - unsigned char expected[] = + unsigned char expected[] = { 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - + int len = sizeof(src); std::vector<unsigned char> actual(len); diff --git a/gnuradio-core/src/lib/general/qa_gri_lfsr.h b/gnuradio-core/src/lib/general/qa_gri_lfsr.h index 2a1b92e9c..e91843bbb 100644 --- a/gnuradio-core/src/lib/general/qa_gri_lfsr.h +++ b/gnuradio-core/src/lib/general/qa_gri_lfsr.h @@ -1,19 +1,19 @@ /* -*- 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, diff --git a/gnuradio-core/src/lib/gengen/.gitignore b/gnuradio-core/src/lib/gengen/.gitignore deleted file mode 100644 index 2f53eba9a..000000000 --- a/gnuradio-core/src/lib/gengen/.gitignore +++ /dev/null @@ -1,433 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/generate-stamp -/GrFIRfilterCCC.cc -/GrFIRfilterCCC.h -/GrFIRfilterCCF.cc -/GrFIRfilterCCF.h -/GrFIRfilterFCC.cc -/GrFIRfilterFCC.h -/GrFIRfilterFFF.cc -/GrFIRfilterFFF.h -/GrFIRfilterFSF.cc -/GrFIRfilterFSF.h -/GrFIRfilterSCC.cc -/GrFIRfilterSCC.h -/GrFIRfilterSIS.cc -/GrFIRfilterSIS.h -/GrFreqXlatingFIRfilterCCC.cc -/GrFreqXlatingFIRfilterCCC.h -/GrFreqXlatingFIRfilterCCF.cc -/GrFreqXlatingFIRfilterCCF.h -/GrFreqXlatingFIRfilterFCC.cc -/GrFreqXlatingFIRfilterFCC.h -/GrFreqXlatingFIRfilterFCF.cc -/GrFreqXlatingFIRfilterFCF.h -/GrFreqXlatingFIRfilterSCC.cc -/GrFreqXlatingFIRfilterSCC.h -/GrFreqXlatingFIRfilterSCF.cc -/GrFreqXlatingFIRfilterSCF.h -/gr_fir_CCC.cc -/gr_fir_CCC.h -/gr_fir_CCC_generic.cc -/gr_fir_CCC_generic.h -/gr_fir_CCF.cc -/gr_fir_CCF.h -/gr_fir_CCF_generic.cc -/gr_fir_CCF_generic.h -/gr_fir_FCC.cc -/gr_fir_FCC.h -/gr_fir_FCC_generic.cc -/gr_fir_FCC_generic.h -/gr_fir_FFF.cc -/gr_fir_FFF.h -/gr_fir_FFF_generic.cc -/gr_fir_FFF_generic.h -/gr_fir_FSF.cc -/gr_fir_FSF.h -/gr_fir_FSF_generic.cc -/gr_fir_FSF_generic.h -/gr_fir_SCC.cc -/gr_fir_SCC.h -/gr_fir_SCC_generic.cc -/gr_fir_SCC_generic.h -/gr_fir_SIS.cc -/gr_fir_SIS.h -/gr_fir_SIS_generic.cc -/gr_fir_SIS_generic.h -/gr_fir_sysconfig.cc -/gr_fir_sysconfig.h -/gr_fir_sysconfig_generic.cc -/gr_fir_sysconfig_generic.h -/gr_fir_util.cc -/gr_fir_util.h -/GrFIRfilterCCC.i -/GrFIRfilterCCF.i -/GrFIRfilterFCC.i -/GrFIRfilterFFF.i -/GrFIRfilterFSF.i -/GrFIRfilterSCC.i -/GrFIRfilterSIS.i -/GrFreqXlatingFIRfilterCCC.i -/GrFreqXlatingFIRfilterCCF.i -/GrFreqXlatingFIRfilterFCC.i -/GrFreqXlatingFIRfilterFCF.i -/GrFreqXlatingFIRfilterSCC.i -/GrFreqXlatingFIRfilterSCF.i -/# --- generated files --- -/gr_add_cc.cc -/gr_add_cc.h -/gr_add_cc.i -/gr_add_const_c.cc -/gr_add_const_cc.cc -/gr_add_const_cc.h -/gr_add_const_cc.i -/gr_add_const_c.h -/gr_add_const_c.i -/gr_add_const_f.cc -/gr_add_const_ff.cc -/gr_add_const_ff.h -/gr_add_const_ff.i -/gr_add_const_f.h -/gr_add_const_f.i -/gr_add_const_i.cc -/gr_add_const_i.h -/gr_add_const_i.i -/gr_add_const_ii.cc -/gr_add_const_ii.h -/gr_add_const_ii.i -/gr_add_const_s.cc -/gr_add_const_sf.cc -/gr_add_const_sf.h -/gr_add_const_sf.i -/gr_add_const_s.h -/gr_add_const_s.i -/gr_add_const_ss.cc -/gr_add_const_ss.h -/gr_add_const_ss.i -/gr_add_const_vcc.cc -/gr_add_const_vcc.h -/gr_add_const_vcc.i -/gr_add_const_vff.cc -/gr_add_const_vff.h -/gr_add_const_vff.i -/gr_add_const_vii.cc -/gr_add_const_vii.h -/gr_add_const_vii.i -/gr_add_const_vss.cc -/gr_add_const_vss.h -/gr_add_const_vss.i -/gr_add_ii.cc -/gr_add_ii.h -/gr_add_ii.i -/gr_add_ss.cc -/gr_add_ss.h -/gr_add_ss.i -/gr_and_bb.cc -/gr_and_bb.h -/gr_and_bb.i -/gr_and_ii.cc -/gr_and_ii.h -/gr_and_ii.i -/gr_and_ss.cc -/gr_and_ss.h -/gr_and_ss.i -/gr_argmax_fs.cc -/gr_argmax_fs.h -/gr_argmax_fs.i -/gr_argmax_is.cc -/gr_argmax_is.h -/gr_argmax_is.i -/gr_argmax_ss.cc -/gr_argmax_ss.h -/gr_argmax_ss.i -/gr_chunks_to_symbols_bc.cc -/gr_chunks_to_symbols_bc.h -/gr_chunks_to_symbols_bc.i -/gr_chunks_to_symbols_bf.cc -/gr_chunks_to_symbols_bf.h -/gr_chunks_to_symbols_bf.i -/gr_chunks_to_symbols_ic.cc -/gr_chunks_to_symbols_ic.h -/gr_chunks_to_symbols_ic.i -/gr_chunks_to_symbols_if.cc -/gr_chunks_to_symbols_if.h -/gr_chunks_to_symbols_if.i -/gr_chunks_to_symbols_sc.cc -/gr_chunks_to_symbols_sc.h -/gr_chunks_to_symbols_sc.i -/gr_chunks_to_symbols_sf.cc -/gr_chunks_to_symbols_sf.h -/gr_chunks_to_symbols_sf.i -/gr_divide_cc.cc -/gr_divide_cc.h -/gr_divide_cc.i -/gr_divide_ff.cc -/gr_divide_ff.h -/gr_divide_ff.i -/gr_divide_ii.cc -/gr_divide_ii.h -/gr_divide_ii.i -/gr_divide_ss.cc -/gr_divide_ss.h -/gr_divide_ss.i -/gr_integrate_cc.cc -/gr_integrate_cc.h -/gr_integrate_cc.i -/gr_integrate_ff.cc -/gr_integrate_ff.h -/gr_integrate_ff.i -/gr_integrate_ii.cc -/gr_integrate_ii.h -/gr_integrate_ii.i -/gr_integrate_ss.cc -/gr_integrate_ss.h -/gr_integrate_ss.i -/gr_max_ff.cc -/gr_max_ff.h -/gr_max_ff.i -/gr_max_ii.cc -/gr_max_ii.h -/gr_max_ii.i -/gr_max_ss.cc -/gr_max_ss.h -/gr_max_ss.i -/gr_multiply_const_ii.cc -/gr_multiply_const_ii.h -/gr_multiply_const_ii.i -/gr_multiply_const_ss.cc -/gr_multiply_const_ss.h -/gr_multiply_const_ss.i -/gr_multiply_const_vcc.cc -/gr_multiply_const_vcc.h -/gr_multiply_const_vcc.i -/gr_multiply_const_vff.cc -/gr_multiply_const_vff.h -/gr_multiply_const_vff.i -/gr_multiply_const_vii.cc -/gr_multiply_const_vii.h -/gr_multiply_const_vii.i -/gr_multiply_const_vss.cc -/gr_multiply_const_vss.h -/gr_multiply_const_vss.i -/gr_multiply_ii.cc -/gr_multiply_ii.h -/gr_multiply_ii.i -/gr_multiply_ss.cc -/gr_multiply_ss.h -/gr_multiply_ss.i -/gr_mute_cc.cc -/gr_mute_cc.h -/gr_mute_cc.i -/gr_mute_ff.cc -/gr_mute_ff.h -/gr_mute_ff.i -/gr_mute_ii.cc -/gr_mute_ii.h -/gr_mute_ii.i -/gr_mute_ss.cc -/gr_mute_ss.h -/gr_mute_ss.i -/gr_noise_source_c.cc -/gr_noise_source_c.h -/gr_noise_source_c.i -/gr_noise_source_f.cc -/gr_noise_source_f.h -/gr_noise_source_f.i -/gr_noise_source_i.cc -/gr_noise_source_i.h -/gr_noise_source_i.i -/gr_noise_source_s.cc -/gr_noise_source_s.h -/gr_noise_source_s.i -/gr_not_bb.cc -/gr_not_bb.h -/gr_not_bb.i -/gr_not_ii.cc -/gr_not_ii.h -/gr_not_ii.i -/gr_not_ss.cc -/gr_not_ss.h -/gr_not_ss.i -/gr_or_bb.cc -/gr_or_bb.h -/gr_or_bb.i -/gr_or_ii.cc -/gr_or_ii.h -/gr_or_ii.i -/gr_or_ss.cc -/gr_or_ss.h -/gr_or_ss.i -/gr_packed_to_unpacked_bb.cc -/gr_packed_to_unpacked_bb.h -/gr_packed_to_unpacked_bb.i -/gr_packed_to_unpacked_ii.cc -/gr_packed_to_unpacked_ii.h -/gr_packed_to_unpacked_ii.i -/gr_packed_to_unpacked_ss.cc -/gr_packed_to_unpacked_ss.h -/gr_packed_to_unpacked_ss.i -/gr_peak_detector_fb.cc -/gr_peak_detector_fb.h -/gr_peak_detector_fb.i -/gr_peak_detector_ff.cc -/gr_peak_detector_ff.h -/gr_peak_detector_ff.i -/gr_peak_detector_ib.cc -/gr_peak_detector_ib.h -/gr_peak_detector_ib.i -/gr_peak_detector_ii.cc -/gr_peak_detector_ii.h -/gr_peak_detector_ii.i -/gr_peak_detector_sb.cc -/gr_peak_detector_sb.h -/gr_peak_detector_sb.i -/gr_peak_detector_ss.cc -/gr_peak_detector_ss.h -/gr_peak_detector_ss.i -/gr_prefix.cc -/gr_probe_signal_b.cc -/gr_probe_signal_b.h -/gr_probe_signal_b.i -/gr_probe_signal_s.cc -/gr_probe_signal_s.h -/gr_probe_signal_s.i -/gr_probe_signal_i.cc -/gr_probe_signal_i.h -/gr_probe_signal_i.i -/gr_probe_signal_f.cc -/gr_probe_signal_f.h -/gr_probe_signal_f.i -/gr_probe_signal_c.cc -/gr_probe_signal_c.h -/gr_probe_signal_c.i -/gr_probe_signal_vb.cc -/gr_probe_signal_vb.h -/gr_probe_signal_vb.i -/gr_probe_signal_vs.cc -/gr_probe_signal_vs.h -/gr_probe_signal_vs.i -/gr_probe_signal_vi.cc -/gr_probe_signal_vi.h -/gr_probe_signal_vi.i -/gr_probe_signal_vf.cc -/gr_probe_signal_vf.h -/gr_probe_signal_vf.i -/gr_probe_signal_vc.cc -/gr_probe_signal_vc.h -/gr_probe_signal_vc.i -/gr_sample_and_hold_bb.cc -/gr_sample_and_hold_bb.h -/gr_sample_and_hold_bb.i -/gr_sample_and_hold_ff.cc -/gr_sample_and_hold_ff.h -/gr_sample_and_hold_ff.i -/gr_sample_and_hold_ii.cc -/gr_sample_and_hold_ii.h -/gr_sample_and_hold_ii.i -/gr_sample_and_hold_ss.cc -/gr_sample_and_hold_ss.h -/gr_sample_and_hold_ss.i -/gr_sig_source_c.cc -/gr_sig_source_c.h -/gr_sig_source_c.i -/gr_sig_source_f.cc -/gr_sig_source_f.h -/gr_sig_source_f.i -/gr_sig_source_i.cc -/gr_sig_source_i.h -/gr_sig_source_i.i -/gr_sig_source_s.cc -/gr_sig_source_s.h -/gr_sig_source_s.i -/gr_sub_cc.cc -/gr_sub_cc.h -/gr_sub_cc.i -/gr_sub_ff.cc -/gr_sub_ff.h -/gr_sub_ff.i -/gr_sub_ii.cc -/gr_sub_ii.h -/gr_sub_ii.i -/gr_sub_ss.cc -/gr_sub_ss.h -/gr_sub_ss.i -/gr_unpacked_to_packed_bb.cc -/gr_unpacked_to_packed_bb.h -/gr_unpacked_to_packed_bb.i -/gr_unpacked_to_packed_ii.cc -/gr_unpacked_to_packed_ii.h -/gr_unpacked_to_packed_ii.i -/gr_unpacked_to_packed_ss.cc -/gr_unpacked_to_packed_ss.h -/gr_unpacked_to_packed_ss.i -/gr_vector_sink_b.cc -/gr_vector_sink_b.h -/gr_vector_sink_b.i -/gr_vector_sink_c.cc -/gr_vector_sink_c.h -/gr_vector_sink_c.i -/gr_vector_sink_f.cc -/gr_vector_sink_f.h -/gr_vector_sink_f.i -/gr_vector_sink_i.cc -/gr_vector_sink_i.h -/gr_vector_sink_i.i -/gr_vector_sink_s.cc -/gr_vector_sink_s.h -/gr_vector_sink_s.i -/gr_vector_source_b.cc -/gr_vector_source_b.h -/gr_vector_source_b.i -/gr_vector_source_c.cc -/gr_vector_source_c.h -/gr_vector_source_c.i -/gr_vector_source_f.cc -/gr_vector_source_f.h -/gr_vector_source_f.i -/gr_vector_source_i.cc -/gr_vector_source_i.h -/gr_vector_source_i.i -/gr_vector_source_s.cc -/gr_vector_source_s.h -/gr_vector_source_s.i -/gr_xor_bb.cc -/gr_xor_bb.h -/gr_xor_bb.i -/gr_xor_ii.cc -/gr_xor_ii.h -/gr_xor_ii.i -/gr_xor_ss.cc -/gr_xor_ss.h -/gr_xor_ss.i -/gr_moving_average_cc.cc -/gr_moving_average_cc.h -/gr_moving_average_cc.i -/gr_moving_average_ff.cc -/gr_moving_average_ff.h -/gr_moving_average_ff.i -/gr_moving_average_ss.cc -/gr_moving_average_ss.h -/gr_moving_average_ss.i -/gr_moving_average_ii.cc -/gr_moving_average_ii.h -/gr_moving_average_ii.i -/gr_and_const_bb.cc -/gr_and_const_ss.h -/gr_and_const_ss.i -/gr_and_const_ii.cc -/gr_and_const_bb.h -/gr_and_const_ss.cc -/gr_and_const_bb.i -/gr_and_const_ii.h -/gr_and_const_ii.i -/# --- end generated files --- -/stamp-* -/gengen_generated.i diff --git a/gnuradio-core/src/lib/gengen/Makefile.am b/gnuradio-core/src/lib/gengen/Makefile.am deleted file mode 100644 index e2f65c5da..000000000 --- a/gnuradio-core/src/lib/gengen/Makefile.am +++ /dev/null @@ -1,165 +0,0 @@ -# -# Copyright 2001,2002,2004,2006,2007,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 - -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES) $(WITH_INCLUDES) - -#noinst_LTLIBRARIES = libgengen.la libgengen-qa.la -noinst_LTLIBRARIES = libgengen.la - -# ---------------------------------------------------------------- -# these scripts generate code - -core_generator = \ - generate_all.py \ - generate_common.py \ - gr_add_XX.cc.t \ - gr_add_XX.h.t \ - gr_add_XX.i.t \ - gr_add_const_XX.cc.t \ - gr_add_const_XX.h.t \ - gr_add_const_XX.i.t \ - gr_add_const_vXX.cc.t \ - gr_add_const_vXX.h.t \ - gr_add_const_vXX.i.t \ - gr_argmax_XX.cc.t \ - gr_argmax_XX.h.t \ - gr_argmax_XX.i.t \ - gr_chunks_to_symbols_XX.cc.t \ - gr_chunks_to_symbols_XX.h.t \ - gr_chunks_to_symbols_XX.i.t \ - gr_divide_XX.cc.t \ - gr_divide_XX.h.t \ - gr_divide_XX.i.t \ - gr_integrate_XX.cc.t \ - gr_integrate_XX.h.t \ - gr_integrate_XX.i.t \ - gr_max_XX.cc.t \ - gr_max_XX.h.t \ - gr_max_XX.i.t \ - gr_multiply_XX.cc.t \ - gr_multiply_XX.h.t \ - gr_multiply_XX.i.t \ - gr_multiply_const_XX.cc.t \ - gr_multiply_const_XX.h.t \ - gr_multiply_const_XX.i.t \ - gr_multiply_const_vXX.cc.t \ - gr_multiply_const_vXX.h.t \ - gr_multiply_const_vXX.i.t \ - gr_mute_XX.cc.t \ - gr_mute_XX.h.t \ - gr_mute_XX.i.t \ - gr_noise_source_X.cc.t \ - gr_noise_source_X.h.t \ - gr_noise_source_X.i.t \ - gr_packed_to_unpacked_XX.cc.t \ - gr_packed_to_unpacked_XX.h.t \ - gr_packed_to_unpacked_XX.i.t \ - gr_peak_detector_XX.cc.t \ - gr_peak_detector_XX.h.t \ - gr_peak_detector_XX.i.t \ - gr_probe_signal_X.cc.t \ - gr_probe_signal_X.h.t \ - gr_probe_signal_X.i.t \ - gr_probe_signal_vX.cc.t \ - gr_probe_signal_vX.h.t \ - gr_probe_signal_vX.i.t \ - gr_sample_and_hold_XX.cc.t \ - gr_sample_and_hold_XX.h.t \ - gr_sample_and_hold_XX.i.t \ - gr_sig_source_X.cc.t \ - gr_sig_source_X.h.t \ - gr_sig_source_X.i.t \ - gr_sub_XX.cc.t \ - gr_sub_XX.h.t \ - gr_sub_XX.i.t \ - gr_unpacked_to_packed_XX.cc.t \ - gr_unpacked_to_packed_XX.h.t \ - gr_unpacked_to_packed_XX.i.t \ - gr_vector_source_X.cc.t \ - gr_vector_source_X.h.t \ - gr_vector_source_X.i.t \ - gr_vector_sink_X.cc.t \ - gr_vector_sink_X.h.t \ - gr_vector_sink_X.i.t \ - gr_xor_XX.cc.t \ - gr_xor_XX.h.t \ - gr_xor_XX.i.t \ - gr_and_XX.cc.t \ - gr_and_XX.h.t \ - gr_and_XX.i.t \ - gr_and_const_XX.cc.t \ - gr_and_const_XX.h.t \ - gr_and_const_XX.i.t \ - gr_or_XX.cc.t \ - gr_or_XX.h.t \ - gr_or_XX.i.t \ - gr_not_XX.cc.t \ - gr_not_XX.h.t \ - gr_not_XX.i.t \ - gr_moving_average_XX.cc.t \ - gr_moving_average_XX.h.t \ - gr_moving_average_XX.i.t - -# Source built by Python into $(builddir) -BUILT_SOURCES += \ - $(GENERATED_H) \ - $(GENERATED_I) \ - $(GENERATED_CC) \ - gengen_generated.i - -# ---------------------------------------------------------------- - -EXTRA_DIST += \ - $(core_generator) - -libgengen_la_SOURCES = \ - $(GENERATED_CC) - -grinclude_HEADERS = \ - $(GENERATED_H) \ - gr_endianness.h \ - gr_noise_type.h \ - gr_sig_source_waveform.h - -swiginclude_HEADERS = \ - $(GENERATED_I) \ - gr_endianness.i \ - gengen.i \ - gengen_generated.i - -# Do creation and inclusion of other Makefiles last - -# include the srcdir's Makefile.gen; doing this creates an implicit -# dependency between $(srcdir)/Makefile.in and $(srcdir)/Makefile.gen. -include $(srcdir)/Makefile.gen - -# common way for generating local Makefile.gen -makefile_gen_gen_command = PYTHONPATH=$(top_srcdir)/gnuradio-core/src/python srcdir=$(srcdir) do_makefile=1 do_sources=0 $(PYTHON) $(srcdir)/generate_all.py -include $(top_srcdir)/Makefile.gen.gen - -# common way for generating sources from templates when using -# BUILT_SOURCES, using parallel build protection. -gen_sources = $(BUILT_SOURCES) -gen_sources_deps = $(core_generator) -par_gen_command = PYTHONPATH=$(top_srcdir)/gnuradio-core/src/python srcdir=$(srcdir) $(PYTHON) $(srcdir)/generate_all.py -include $(top_srcdir)/Makefile.par.gen diff --git a/gnuradio-core/src/lib/gengen/generate_all.py b/gnuradio-core/src/lib/gengen/generate_all.py index 9d9902d61..6b0f20f05 100755 --- a/gnuradio-core/src/lib/gengen/generate_all.py +++ b/gnuradio-core/src/lib/gengen/generate_all.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from build_utils import output_glue diff --git a/gnuradio-core/src/lib/gengen/generate_common.py b/gnuradio-core/src/lib/gengen/generate_common.py index 70f805711..13d01b0f9 100755 --- a/gnuradio-core/src/lib/gengen/generate_common.py +++ b/gnuradio-core/src/lib/gengen/generate_common.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2006,2007,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 build_utils import expand_template, standard_dict from build_utils_codes import * @@ -93,7 +93,7 @@ def generate (): for r in reg_roots : for s in reg_signatures: expand_h_cc_i (r, s) - + for root, sigs in others: for s in sigs: expand_h_cc_i (root, s) @@ -103,4 +103,4 @@ def generate (): if __name__ == '__main__': generate () - + diff --git a/gnuradio-core/src/lib/gengen/gengen.i b/gnuradio-core/src/lib/gengen/gengen.i index c3827288e..d1895bfa8 100644 --- a/gnuradio-core/src/lib/gengen/gengen.i +++ b/gnuradio-core/src/lib/gengen/gengen.i @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/gengen/gr_add_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_add_XX.cc.t index 0e8b23ee1..5a888125b 100644 --- a/gnuradio-core/src/lib/gengen/gr_add_XX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_add_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004, 2009,2010 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, diff --git a/gnuradio-core/src/lib/gengen/gr_add_XX.h.t b/gnuradio-core/src/lib/gengen/gr_add_XX.h.t index f0e857abf..cd6d80cd9 100644 --- a/gnuradio-core/src/lib/gengen/gr_add_XX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_add_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004, 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, diff --git a/gnuradio-core/src/lib/gengen/gr_add_XX.i.t b/gnuradio-core/src/lib/gengen/gr_add_XX.i.t index f7726ccf6..b2c510610 100644 --- a/gnuradio-core/src/lib/gengen/gr_add_XX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_add_XX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004, 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, diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_add_const_XX.cc.t index 0d3034be7..3dccc86b8 100644 --- a/gnuradio-core/src/lib/gengen/gr_add_const_XX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_add_const_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -67,6 +67,6 @@ int while (size-- > 0) *optr++ = *iptr++ + d_k; - + return noutput_items; } diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_XX.h.t b/gnuradio-core/src/lib/gengen/gr_add_const_XX.h.t index 5b46d0f89..00d2c9b58 100644 --- a/gnuradio-core/src/lib/gengen/gr_add_const_XX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_add_const_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_XX.i.t b/gnuradio-core/src/lib/gengen/gr_add_const_XX.i.t index 5af10137a..b7921554e 100644 --- a/gnuradio-core/src/lib/gengen/gr_add_const_XX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_add_const_XX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_vXX.cc.t b/gnuradio-core/src/lib/gengen/gr_add_const_vXX.cc.t index f49be062e..b29f3014d 100755 --- a/gnuradio-core/src/lib/gengen/gr_add_const_vXX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_add_const_vXX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006,2010 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, @@ -50,12 +50,12 @@ int { @I_TYPE@ *iptr = (@O_TYPE@ *)input_items[0]; @O_TYPE@ *optr = (@O_TYPE@ *)output_items[0]; - + int nitems_per_block = output_signature()->sizeof_stream_item(0)/sizeof(@I_TYPE@); for (int i = 0; i < noutput_items; i++) for (int j = 0; j < nitems_per_block; j++) *optr++ = *iptr++ + d_k[j]; - + return noutput_items; } diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_vXX.h.t b/gnuradio-core/src/lib/gengen/gr_add_const_vXX.h.t index 9d986e960..438a84bfd 100644 --- a/gnuradio-core/src/lib/gengen/gr_add_const_vXX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_add_const_vXX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006,2010 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, diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_vXX.i.t b/gnuradio-core/src/lib/gengen/gr_add_const_vXX.i.t index ad1643a7e..e0e6ae905 100755 --- a/gnuradio-core/src/lib/gengen/gr_add_const_vXX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_add_const_vXX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006,2010 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, diff --git a/gnuradio-core/src/lib/gengen/gr_and_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_and_XX.cc.t index 150ef7f0d..9d60e092a 100644 --- a/gnuradio-core/src/lib/gengen/gr_and_XX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_and_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2008,2010 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, diff --git a/gnuradio-core/src/lib/gengen/gr_and_XX.h.t b/gnuradio-core/src/lib/gengen/gr_and_XX.h.t index dbb225907..224778096 100644 --- a/gnuradio-core/src/lib/gengen/gr_and_XX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_and_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,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, diff --git a/gnuradio-core/src/lib/gengen/gr_and_XX.i.t b/gnuradio-core/src/lib/gengen/gr_and_XX.i.t index e17d40eea..06db5ca59 100644 --- a/gnuradio-core/src/lib/gengen/gr_and_XX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_and_XX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,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, diff --git a/gnuradio-core/src/lib/gengen/gr_and_const_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_and_const_XX.cc.t index bd48788e6..d4f9a4b61 100644 --- a/gnuradio-core/src/lib/gengen/gr_and_const_XX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_and_const_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2009,2010 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, diff --git a/gnuradio-core/src/lib/gengen/gr_and_const_XX.h.t b/gnuradio-core/src/lib/gengen/gr_and_const_XX.h.t index ceffc3066..b331f33cc 100644 --- a/gnuradio-core/src/lib/gengen/gr_and_const_XX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_and_const_XX.h.t @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/gengen/gr_and_const_XX.i.t b/gnuradio-core/src/lib/gengen/gr_and_const_XX.i.t index 548431e66..c797c45eb 100644 --- a/gnuradio-core/src/lib/gengen/gr_and_const_XX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_and_const_XX.i.t @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/gengen/gr_argmax_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_argmax_XX.cc.t index 7fe2b6382..f780bd811 100644 --- a/gnuradio-core/src/lib/gengen/gr_argmax_XX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_argmax_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, diff --git a/gnuradio-core/src/lib/gengen/gr_argmax_XX.h.t b/gnuradio-core/src/lib/gengen/gr_argmax_XX.h.t index 437fa5735..a706221fb 100644 --- a/gnuradio-core/src/lib/gengen/gr_argmax_XX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_argmax_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, diff --git a/gnuradio-core/src/lib/gengen/gr_argmax_XX.i.t b/gnuradio-core/src/lib/gengen/gr_argmax_XX.i.t index aa6bf0ac9..233551ad9 100644 --- a/gnuradio-core/src/lib/gengen/gr_argmax_XX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_argmax_XX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, diff --git a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_XX.cc.t index 635d991ef..4a642c13e 100644 --- a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_XX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, diff --git a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_XX.h.t b/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_XX.h.t index c1393df3f..17d5688b8 100644 --- a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_XX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -42,7 +42,7 @@ GR_CORE_API @SPTR_NAME@ gr_make_@BASE_NAME@ (const std::vector<@O_TYPE@> &symbol * out[n D + k] = symbol_table[in[n] D + k], k=0,1,...,D-1 * * The combination of gr_packed_to_unpacked_XX followed by - * gr_chunks_to_symbols_XY handles the general case of mapping + * gr_chunks_to_symbols_XY handles the general case of mapping * from a stream of bytes or shorts into arbitrary float * or complex symbols. * diff --git a/gnuradio-core/src/lib/gengen/gr_divide_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_divide_XX.cc.t index ea245b57b..63450cb3d 100644 --- a/gnuradio-core/src/lib/gengen/gr_divide_XX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_divide_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004, 2009,2010 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, diff --git a/gnuradio-core/src/lib/gengen/gr_divide_XX.h.t b/gnuradio-core/src/lib/gengen/gr_divide_XX.h.t index ebe5ff5e5..40ee27a51 100644 --- a/gnuradio-core/src/lib/gengen/gr_divide_XX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_divide_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004, 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, diff --git a/gnuradio-core/src/lib/gengen/gr_divide_XX.i.t b/gnuradio-core/src/lib/gengen/gr_divide_XX.i.t index f7726ccf6..b2c510610 100644 --- a/gnuradio-core/src/lib/gengen/gr_divide_XX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_divide_XX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004, 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, diff --git a/gnuradio-core/src/lib/gengen/gr_endianness.h b/gnuradio-core/src/lib/gengen/gr_endianness.h index abc3feecc..c4ecb1383 100644 --- a/gnuradio-core/src/lib/gengen/gr_endianness.h +++ b/gnuradio-core/src/lib/gengen/gr_endianness.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/gengen/gr_endianness.i b/gnuradio-core/src/lib/gengen/gr_endianness.i index 4c0f99f5e..572b7a42f 100644 --- a/gnuradio-core/src/lib/gengen/gr_endianness.i +++ b/gnuradio-core/src/lib/gengen/gr_endianness.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/gengen/gr_integrate_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_integrate_XX.cc.t index f6e38848c..1dbee49db 100644 --- a/gnuradio-core/src/lib/gengen/gr_integrate_XX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_integrate_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2010 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, @@ -29,7 +29,7 @@ #include <@NAME@.h> #include <gr_io_signature.h> -@SPTR_NAME@ +@SPTR_NAME@ gr_make_@BASE_NAME@ (int decim) { return gnuradio::get_initial_sptr (new @NAME@ (decim)); @@ -49,14 +49,14 @@ gr_make_@BASE_NAME@ (int decim) { } -int +int @NAME@::work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) { const @I_TYPE@ *in = (const @I_TYPE@ *) input_items[0]; @O_TYPE@ *out = (@O_TYPE@ *) output_items[0]; - + for (int i = 0; i < noutput_items; i++) { out[i] = (@O_TYPE@)0; for (int j = 0; j < d_decim; j++) diff --git a/gnuradio-core/src/lib/gengen/gr_integrate_XX.h.t b/gnuradio-core/src/lib/gengen/gr_integrate_XX.h.t index c1d81000f..abb13ea90 100644 --- a/gnuradio-core/src/lib/gengen/gr_integrate_XX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_integrate_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, @@ -51,7 +51,7 @@ private: int d_count; public: - ~@NAME@ (); + ~@NAME@ (); int work (int noutput_items, gr_vector_const_void_star &input_items, diff --git a/gnuradio-core/src/lib/gengen/gr_integrate_XX.i.t b/gnuradio-core/src/lib/gengen/gr_integrate_XX.i.t index 24a2381ad..a96e5fd29 100644 --- a/gnuradio-core/src/lib/gengen/gr_integrate_XX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_integrate_XX.i.t @@ -1,19 +1,19 @@ /* -*- 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, diff --git a/gnuradio-core/src/lib/gengen/gr_max_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_max_XX.cc.t index ee88261f9..c53820cd6 100644 --- a/gnuradio-core/src/lib/gengen/gr_max_XX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_max_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, @@ -51,11 +51,11 @@ int @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0]; int ninputs = input_items.size (); - + for (int i=0; i<noutput_items; i++) { @I_TYPE@ max = ((@I_TYPE@ *) input_items[0])[i*d_vlen]; - + for (int j=0; j < (int) d_vlen; j++ ) { for (int k=0; k<ninputs; k++) { if ( ((@I_TYPE@ *) input_items[k])[i*d_vlen + j] > max) { diff --git a/gnuradio-core/src/lib/gengen/gr_max_XX.h.t b/gnuradio-core/src/lib/gengen/gr_max_XX.h.t index 437fa5735..a706221fb 100644 --- a/gnuradio-core/src/lib/gengen/gr_max_XX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_max_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, diff --git a/gnuradio-core/src/lib/gengen/gr_max_XX.i.t b/gnuradio-core/src/lib/gengen/gr_max_XX.i.t index aa6bf0ac9..233551ad9 100644 --- a/gnuradio-core/src/lib/gengen/gr_max_XX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_max_XX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, diff --git a/gnuradio-core/src/lib/gengen/gr_moving_average_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_moving_average_XX.cc.t index 8d2370d3b..ddee30bd7 100644 --- a/gnuradio-core/src/lib/gengen/gr_moving_average_XX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_moving_average_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2010 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, @@ -29,7 +29,7 @@ #include <@NAME@.h> #include <gr_io_signature.h> -@SPTR_NAME@ +@SPTR_NAME@ gr_make_@BASE_NAME@ (int length, @O_TYPE@ scale, int max_iter) { return gnuradio::get_initial_sptr (new @NAME@ (length, scale, max_iter)); @@ -61,7 +61,7 @@ void d_updated = true; } -int +int @NAME@::work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) diff --git a/gnuradio-core/src/lib/gengen/gr_moving_average_XX.h.t b/gnuradio-core/src/lib/gengen/gr_moving_average_XX.h.t index 7e228abb6..37678abe1 100644 --- a/gnuradio-core/src/lib/gengen/gr_moving_average_XX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_moving_average_XX.h.t @@ -1,19 +1,19 @@ /* -*- 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, @@ -57,7 +57,7 @@ private: bool d_updated; public: - ~@NAME@ (); + ~@NAME@ (); int work (int noutput_items, gr_vector_const_void_star &input_items, diff --git a/gnuradio-core/src/lib/gengen/gr_moving_average_XX.i.t b/gnuradio-core/src/lib/gengen/gr_moving_average_XX.i.t index 855be90b0..6e3b9ca9b 100644 --- a/gnuradio-core/src/lib/gengen/gr_moving_average_XX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_moving_average_XX.i.t @@ -1,19 +1,19 @@ /* -*- 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, diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_multiply_XX.cc.t index 5d270c763..a60118e14 100644 --- a/gnuradio-core/src/lib/gengen/gr_multiply_XX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_multiply_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004, 2009,2010 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, diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_XX.h.t b/gnuradio-core/src/lib/gengen/gr_multiply_XX.h.t index 1feb16202..18ec6d0be 100644 --- a/gnuradio-core/src/lib/gengen/gr_multiply_XX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_multiply_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004, 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, diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_XX.i.t b/gnuradio-core/src/lib/gengen/gr_multiply_XX.i.t index f7726ccf6..b2c510610 100644 --- a/gnuradio-core/src/lib/gengen/gr_multiply_XX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_multiply_XX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004, 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, diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_multiply_const_XX.cc.t index 09e658e90..424b62412 100644 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_XX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_multiply_const_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -67,6 +67,6 @@ int while (size-- > 0) *optr++ = *iptr++ * d_k; - + return noutput_items; } diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_XX.h.t b/gnuradio-core/src/lib/gengen/gr_multiply_const_XX.h.t index 6ff6f74a9..274fc3b99 100644 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_XX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_multiply_const_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_XX.i.t b/gnuradio-core/src/lib/gengen/gr_multiply_const_XX.i.t index 5af10137a..b7921554e 100644 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_XX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_multiply_const_XX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_vXX.cc.t b/gnuradio-core/src/lib/gengen/gr_multiply_const_vXX.cc.t index 5725c1c46..eb896dee5 100755 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_vXX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_multiply_const_vXX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006,2010 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, @@ -50,12 +50,12 @@ int { @I_TYPE@ *iptr = (@O_TYPE@ *)input_items[0]; @O_TYPE@ *optr = (@O_TYPE@ *)output_items[0]; - + int nitems_per_block = output_signature()->sizeof_stream_item(0)/sizeof(@I_TYPE@); for (int i = 0; i < noutput_items; i++) for (int j = 0; j < nitems_per_block; j++) *optr++ = *iptr++ * d_k[j]; - + return noutput_items; } diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_vXX.h.t b/gnuradio-core/src/lib/gengen/gr_multiply_const_vXX.h.t index f696ab7b1..2c6edd364 100644 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_vXX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_multiply_const_vXX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006,2010 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, diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_vXX.i.t b/gnuradio-core/src/lib/gengen/gr_multiply_const_vXX.i.t index ad1643a7e..e0e6ae905 100755 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_vXX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_multiply_const_vXX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006,2010 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, diff --git a/gnuradio-core/src/lib/gengen/gr_mute_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_mute_XX.cc.t index 62a8e63da..4b8ff8415 100644 --- a/gnuradio-core/src/lib/gengen/gr_mute_XX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_mute_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -74,6 +74,6 @@ int while (size-- > 0) *optr++ = *iptr++; } - + return noutput_items; } diff --git a/gnuradio-core/src/lib/gengen/gr_mute_XX.h.t b/gnuradio-core/src/lib/gengen/gr_mute_XX.h.t index ccf966e53..ca23904e9 100644 --- a/gnuradio-core/src/lib/gengen/gr_mute_XX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_mute_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/gengen/gr_mute_XX.i.t b/gnuradio-core/src/lib/gengen/gr_mute_XX.i.t index 358d9f8e4..ffcfac8a6 100644 --- a/gnuradio-core/src/lib/gengen/gr_mute_XX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_mute_XX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/gengen/gr_noise_source_X.cc.t b/gnuradio-core/src/lib/gengen/gr_noise_source_X.cc.t index 35f5fabd9..3078f6366 100644 --- a/gnuradio-core/src/lib/gengen/gr_noise_source_X.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_noise_source_X.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -30,7 +30,7 @@ #include <stdexcept> -@NAME@_sptr +@NAME@_sptr gr_make_@BASE_NAME@ (gr_noise_type_t type, float ampl, long seed) { return gnuradio::get_initial_sptr(new @NAME@ (type, ampl, seed)); @@ -53,7 +53,7 @@ int gr_vector_void_star &output_items) { @TYPE@ *out = (@TYPE@ *) output_items[0]; - + switch (d_type){ #if @IS_COMPLEX@ // complex? @@ -79,18 +79,18 @@ int for (int i = 0; i < noutput_items; i++) out[i] = (@TYPE@)(d_ampl * d_rng.gasdev ()); break; - + case GR_LAPLACIAN: for (int i = 0; i < noutput_items; i++) out[i] = (@TYPE@)(d_ampl * d_rng.laplacian ()); break; - + case GR_IMPULSE: // FIXME changeable impulse settings for (int i = 0; i < noutput_items; i++) out[i] = (@TYPE@)(d_ampl * d_rng.impulse (9)); break; #endif - + default: throw std::runtime_error ("invalid type"); } diff --git a/gnuradio-core/src/lib/gengen/gr_noise_source_X.h.t b/gnuradio-core/src/lib/gengen/gr_noise_source_X.h.t index 196501c4d..31ffb2b16 100644 --- a/gnuradio-core/src/lib/gengen/gr_noise_source_X.h.t +++ b/gnuradio-core/src/lib/gengen/gr_noise_source_X.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -40,7 +40,7 @@ typedef boost::shared_ptr<@NAME@> @NAME@_sptr; * \param seed seed for random generators. Note that for uniform and * Gaussian distributions, this should be a negative number. */ -GR_CORE_API @NAME@_sptr +GR_CORE_API @NAME@_sptr gr_make_@BASE_NAME@ (gr_noise_type_t type, float ampl, long seed = 0); /*! @@ -48,7 +48,7 @@ gr_make_@BASE_NAME@ (gr_noise_type_t type, float ampl, long seed = 0); * \ingroup source_blk * * \details - * Generate random values from different distributions. + * Generate random values from different distributions. * Currently, only Gaussian and uniform are enabled. * * \param type the random distribution to use (see gr_noise_type.h) @@ -57,7 +57,7 @@ gr_make_@BASE_NAME@ (gr_noise_type_t type, float ampl, long seed = 0); * Gaussian distributions, this should be a negative number. */ class GR_CORE_API @NAME@ : public gr_sync_block { - friend GR_CORE_API @NAME@_sptr + friend GR_CORE_API @NAME@_sptr gr_make_@BASE_NAME@ (gr_noise_type_t type, float ampl, long seed); diff --git a/gnuradio-core/src/lib/gengen/gr_noise_source_X.i.t b/gnuradio-core/src/lib/gengen/gr_noise_source_X.i.t index 36a51f31a..df27ab79b 100644 --- a/gnuradio-core/src/lib/gengen/gr_noise_source_X.i.t +++ b/gnuradio-core/src/lib/gengen/gr_noise_source_X.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -24,7 +24,7 @@ GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@); -@NAME@_sptr +@NAME@_sptr gr_make_@BASE_NAME@ (gr_noise_type_t type, float ampl, long seed = 0); class @NAME@ : public gr_block { diff --git a/gnuradio-core/src/lib/gengen/gr_noise_type.h b/gnuradio-core/src/lib/gengen/gr_noise_type.h index 8d101a9ef..d2aba9b0c 100644 --- a/gnuradio-core/src/lib/gengen/gr_noise_type.h +++ b/gnuradio-core/src/lib/gengen/gr_noise_type.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/gengen/gr_not_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_not_XX.cc.t index 432938e67..4806b142f 100644 --- a/gnuradio-core/src/lib/gengen/gr_not_XX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_not_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2008,2010 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, diff --git a/gnuradio-core/src/lib/gengen/gr_not_XX.h.t b/gnuradio-core/src/lib/gengen/gr_not_XX.h.t index b946ffc42..aff421109 100644 --- a/gnuradio-core/src/lib/gengen/gr_not_XX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_not_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,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, @@ -34,7 +34,7 @@ typedef boost::shared_ptr<@NAME@> @SPTR_NAME@; GR_CORE_API @SPTR_NAME@ gr_make_@BASE_NAME@ (); /*! - * \brief output = ~input_0 + * \brief output = ~input_0 * \ingroup math_blk * * bitwise boolean not across input stream. diff --git a/gnuradio-core/src/lib/gengen/gr_not_XX.i.t b/gnuradio-core/src/lib/gengen/gr_not_XX.i.t index e17d40eea..06db5ca59 100644 --- a/gnuradio-core/src/lib/gengen/gr_not_XX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_not_XX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,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, diff --git a/gnuradio-core/src/lib/gengen/gr_or_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_or_XX.cc.t index 07c759d73..ee55eedda 100644 --- a/gnuradio-core/src/lib/gengen/gr_or_XX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_or_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2008,2010 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, diff --git a/gnuradio-core/src/lib/gengen/gr_or_XX.h.t b/gnuradio-core/src/lib/gengen/gr_or_XX.h.t index 8d1fea951..8860eedd5 100644 --- a/gnuradio-core/src/lib/gengen/gr_or_XX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_or_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,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, diff --git a/gnuradio-core/src/lib/gengen/gr_or_XX.i.t b/gnuradio-core/src/lib/gengen/gr_or_XX.i.t index e17d40eea..06db5ca59 100644 --- a/gnuradio-core/src/lib/gengen/gr_or_XX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_or_XX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,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, diff --git a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_XX.cc.t index abab97417..75e53c4ca 100644 --- a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_XX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -35,14 +35,14 @@ static const unsigned int BITS_PER_TYPE = sizeof(@I_TYPE@) * 8; static const unsigned int LOG2_L_TYPE = gr_log2_const<sizeof(@I_TYPE@) * 8>(); -@SPTR_NAME@ +@SPTR_NAME@ gr_make_@BASE_NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness) { - return @SPTR_NAME@ + return @SPTR_NAME@ (new @NAME@ (bits_per_chunk,endianness)); } -@NAME@::@NAME@ (unsigned int bits_per_chunk, +@NAME@::@NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness) : gr_block ("@BASE_NAME@", gr_make_io_signature (1, -1, sizeof (@I_TYPE@)), diff --git a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_XX.h.t b/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_XX.h.t index 77cd2b470..e95771b37 100644 --- a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_XX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -32,7 +32,7 @@ class @NAME@; typedef boost::shared_ptr<@NAME@> @SPTR_NAME@; -GR_CORE_API @SPTR_NAME@ +GR_CORE_API @SPTR_NAME@ gr_make_@BASE_NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness); /*! @@ -43,15 +43,15 @@ gr_make_@BASE_NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness); * * This is the inverse of gr_unpacked_to_packed_XX. * - * The bits in the bytes or shorts input stream are grouped into chunks of + * The bits in the bytes or shorts input stream are grouped into chunks of * \p bits_per_chunk bits and each resulting chunk is written right- - * justified to the output stream of bytes or shorts. - * All b or 16 bits of the each input bytes or short are processed. + * justified to the output stream of bytes or shorts. + * All b or 16 bits of the each input bytes or short are processed. * The right thing is done if bits_per_chunk is not a power of two. * * The combination of gr_packed_to_unpacked_XX_ followed by * gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the - * general case of mapping from a stream of bytes or shorts into + * general case of mapping from a stream of bytes or shorts into * arbitrary float or complex symbols. * * \sa gr_packed_to_unpacked_bb, gr_unpacked_to_packed_bb, @@ -62,7 +62,7 @@ gr_make_@BASE_NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness); class GR_CORE_API @NAME@ : public gr_block { - friend GR_CORE_API @SPTR_NAME@ + friend GR_CORE_API @SPTR_NAME@ gr_make_@BASE_NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness); @NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness); diff --git a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_XX.i.t b/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_XX.i.t index 8267a7c15..1e978956a 100644 --- a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_XX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_XX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -24,7 +24,7 @@ GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@); -@SPTR_NAME@ +@SPTR_NAME@ gr_make_@BASE_NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness); class @NAME@ : public gr_block diff --git a/gnuradio-core/src/lib/gengen/gr_peak_detector_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_peak_detector_XX.cc.t index 1a4a2564b..54af3c0cd 100644 --- a/gnuradio-core/src/lib/gengen/gr_peak_detector_XX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_peak_detector_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2010 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, @@ -35,18 +35,18 @@ gr_make_@BASE_NAME@ (float threshold_factor_rise, float threshold_factor_fall, int look_ahead, float alpha) { - return gnuradio::get_initial_sptr (new @NAME@ (threshold_factor_rise, + return gnuradio::get_initial_sptr (new @NAME@ (threshold_factor_rise, threshold_factor_fall, look_ahead, alpha)); } -@NAME@::@NAME@ (float threshold_factor_rise, +@NAME@::@NAME@ (float threshold_factor_rise, float threshold_factor_fall, int look_ahead, float alpha) : gr_sync_block ("@BASE_NAME@", gr_make_io_signature (1, 1, sizeof (@I_TYPE@)), gr_make_io_signature (1, 1, sizeof (char))), - d_threshold_factor_rise(threshold_factor_rise), + d_threshold_factor_rise(threshold_factor_rise), d_threshold_factor_fall(threshold_factor_fall), d_look_ahead(look_ahead), d_avg_alpha(alpha), d_avg(0), d_found(0) { @@ -94,7 +94,7 @@ int optr[peak_ind] = 1; state = 0; peak_val = -(@I_TYPE@)INFINITY; - //printf("Leaving State 1: Peak: %f Peak Ind: %d i: %d noutput_items: %d\n", + //printf("Leaving State 1: Peak: %f Peak Ind: %d i: %d noutput_items: %d\n", //peak_val, peak_ind, i, noutput_items); } } diff --git a/gnuradio-core/src/lib/gengen/gr_peak_detector_XX.h.t b/gnuradio-core/src/lib/gengen/gr_peak_detector_XX.h.t index d6d1e5e51..3e05594fb 100644 --- a/gnuradio-core/src/lib/gengen/gr_peak_detector_XX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_peak_detector_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, @@ -40,16 +40,16 @@ GR_CORE_API @SPTR_NAME@ gr_make_@BASE_NAME@ (float threshold_factor_rise = 0.25, * \brief Detect the peak of a signal * \ingroup level_blk * - * If a peak is detected, this block outputs a 1, + * If a peak is detected, this block outputs a 1, * or it outputs 0's. * * \param threshold_factor_rise The threshold factor determins when a peak - * has started. An average of the signal is calculated and when the + * has started. An average of the signal is calculated and when the * value of the signal goes over threshold_factor_rise*average, we * start looking for a peak. * \param threshold_factor_fall The threshold factor determins when a peak - * has ended. An average of the signal is calculated and when the - * value of the signal goes bellow threshold_factor_fall*average, we + * has ended. An average of the signal is calculated and when the + * value of the signal goes bellow threshold_factor_fall*average, we * stop looking for a peak. * \param look_ahead The look-ahead value is used when the threshold is * found to look if there another peak within this step range. @@ -64,7 +64,7 @@ class GR_CORE_API @NAME@ : public gr_sync_block float threshold_factor_fall, int look_ahead, float alpha); - @NAME@ (float threshold_factor_rise, + @NAME@ (float threshold_factor_rise, float threshold_factor_fall, int look_ahead, float alpha); diff --git a/gnuradio-core/src/lib/gengen/gr_peak_detector_XX.i.t b/gnuradio-core/src/lib/gengen/gr_peak_detector_XX.i.t index af98945bb..212ce0c94 100644 --- a/gnuradio-core/src/lib/gengen/gr_peak_detector_XX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_peak_detector_XX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, @@ -25,14 +25,14 @@ GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@) @SPTR_NAME@ gr_make_@BASE_NAME@ (float threshold_factor_rise = 0.25, - float threshold_factor_fall = 0.40, + float threshold_factor_fall = 0.40, int look_ahead = 10, float alpha=0.001); class @NAME@ : public gr_sync_block { private: - @NAME@ (float threshold_factor_rise, + @NAME@ (float threshold_factor_rise, float threshold_factor_fall, int look_ahead, float alpha); @@ -42,7 +42,7 @@ class @NAME@ : public gr_sync_block void set_look_ahead(int look) { d_look_ahead = look; } void set_alpha(int alpha) { d_avg_alpha = alpha; } - float threshold_factor_rise() { return d_threshold_factor_rise; } + float threshold_factor_rise() { return d_threshold_factor_rise; } float threshold_factor_fall() { return d_threshold_factor_fall; } int look_ahead() { return d_look_ahead; } float alpha() { return d_avg_alpha; } diff --git a/gnuradio-core/src/lib/gengen/gr_probe_signal_X.cc.t b/gnuradio-core/src/lib/gengen/gr_probe_signal_X.cc.t index d60a5126a..9a10bab59 100644 --- a/gnuradio-core/src/lib/gengen/gr_probe_signal_X.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_probe_signal_X.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/gengen/gr_probe_signal_X.h.t b/gnuradio-core/src/lib/gengen/gr_probe_signal_X.h.t index 26a95b9b2..936f437f1 100644 --- a/gnuradio-core/src/lib/gengen/gr_probe_signal_X.h.t +++ b/gnuradio-core/src/lib/gengen/gr_probe_signal_X.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005, 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/gengen/gr_probe_signal_X.i.t b/gnuradio-core/src/lib/gengen/gr_probe_signal_X.i.t index 3f1ef8ffd..ec9643686 100644 --- a/gnuradio-core/src/lib/gengen/gr_probe_signal_X.i.t +++ b/gnuradio-core/src/lib/gengen/gr_probe_signal_X.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005, 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/gengen/gr_probe_signal_vX.cc.t b/gnuradio-core/src/lib/gengen/gr_probe_signal_vX.cc.t index 712b55b9a..1aedca4ec 100644 --- a/gnuradio-core/src/lib/gengen/gr_probe_signal_vX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_probe_signal_vX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010,2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -52,7 +52,7 @@ int { const @TYPE@ *in = (const @TYPE@ *) input_items[0]; - for (int i=0; i<d_size; i++) + for (size_t i=0; i<d_size; i++) d_level[i] = in[(noutput_items-1)*d_size+i]; return noutput_items; diff --git a/gnuradio-core/src/lib/gengen/gr_probe_signal_vX.h.t b/gnuradio-core/src/lib/gengen/gr_probe_signal_vX.h.t index 3a7277b93..ee673c14a 100644 --- a/gnuradio-core/src/lib/gengen/gr_probe_signal_vX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_probe_signal_vX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005, 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/gengen/gr_probe_signal_vX.i.t b/gnuradio-core/src/lib/gengen/gr_probe_signal_vX.i.t index 20191948a..b7de09125 100644 --- a/gnuradio-core/src/lib/gengen/gr_probe_signal_vX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_probe_signal_vX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005, 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.cc.t index b78c52857..68f4d544e 100644 --- a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2010 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, diff --git a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.h.t b/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.h.t index 328c47106..0364941cb 100644 --- a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, diff --git a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.i.t b/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.i.t index 342e6a88b..4620b0f2c 100644 --- a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, diff --git a/gnuradio-core/src/lib/gengen/gr_sig_source_X.cc.t b/gnuradio-core/src/lib/gengen/gr_sig_source_X.cc.t index 9354eb93c..bdd0e810a 100644 --- a/gnuradio-core/src/lib/gengen/gr_sig_source_X.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_sig_source_X.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -67,7 +67,7 @@ int for (int i = 0; i < noutput_items; i++) // FIXME unroll optr[i] = t; break; - + case GR_SIN_WAVE: case GR_COS_WAVE: d_nco.sincos (optr, noutput_items, d_ampl); @@ -78,11 +78,11 @@ int optr[i] += d_offset; } break; - - /* Implements a real square wave high from -PI to 0. + + /* Implements a real square wave high from -PI to 0. * The imaginary square wave leads by 90 deg. */ - case GR_SQR_WAVE: + case GR_SQR_WAVE: for (int i = 0; i < noutput_items; i++){ if (d_nco.get_phase() < -1*M_PI/2) optr[i] = gr_complex(d_ampl, 0)+d_offset; @@ -91,18 +91,18 @@ int else if (d_nco.get_phase() < M_PI/2) optr[i] = gr_complex(0, d_ampl)+d_offset; else - optr[i] = d_offset; + optr[i] = d_offset; d_nco.step(); } break; - - /* Implements a real triangle wave rising from -PI to 0 and + + /* Implements a real triangle wave rising from -PI to 0 and * falling from 0 to PI. The imaginary triangle wave leads by 90 deg. */ - case GR_TRI_WAVE: + case GR_TRI_WAVE: for (int i = 0; i < noutput_items; i++){ if (d_nco.get_phase() < -1*M_PI/2){ - optr[i] = gr_complex(d_ampl*d_nco.get_phase()/M_PI + d_ampl, + optr[i] = gr_complex(d_ampl*d_nco.get_phase()/M_PI + d_ampl, -1*d_ampl*d_nco.get_phase()/M_PI - d_ampl/2)+d_offset; } else if (d_nco.get_phase() < 0){ @@ -110,24 +110,24 @@ int d_ampl*d_nco.get_phase()/M_PI + d_ampl/2)+d_offset; } else if (d_nco.get_phase() < M_PI/2){ - optr[i] = gr_complex(-1*d_ampl*d_nco.get_phase()/M_PI + d_ampl, + optr[i] = gr_complex(-1*d_ampl*d_nco.get_phase()/M_PI + d_ampl, d_ampl*d_nco.get_phase()/M_PI + d_ampl/2)+d_offset; } else{ - optr[i] = gr_complex(-1*d_ampl*d_nco.get_phase()/M_PI + d_ampl, + optr[i] = gr_complex(-1*d_ampl*d_nco.get_phase()/M_PI + d_ampl, -1*d_ampl*d_nco.get_phase()/M_PI + 3*d_ampl/2)+d_offset; } d_nco.step(); } break; - - /* Implements a real saw tooth wave rising from -PI to PI. + + /* Implements a real saw tooth wave rising from -PI to PI. * The imaginary saw tooth wave leads by 90 deg. */ - case GR_SAW_WAVE: + case GR_SAW_WAVE: for (int i = 0; i < noutput_items; i++){ if (d_nco.get_phase() < -1*M_PI/2){ - optr[i] = gr_complex(d_ampl*d_nco.get_phase()/(2*M_PI) + d_ampl/2, + optr[i] = gr_complex(d_ampl*d_nco.get_phase()/(2*M_PI) + d_ampl/2, d_ampl*d_nco.get_phase()/(2*M_PI) + 5*d_ampl/4)+d_offset; } else{ @@ -135,7 +135,7 @@ int d_ampl*d_nco.get_phase()/(2*M_PI) + d_ampl/4)+d_offset; } d_nco.step(); - } + } break; #else // nope... @@ -145,7 +145,7 @@ int for (int i = 0; i < noutput_items; i++) // FIXME unroll optr[i] = t; break; - + case GR_SIN_WAVE: d_nco.sin (optr, noutput_items, d_ampl); if (d_offset == 0) @@ -165,9 +165,9 @@ int optr[i] += d_offset; } break; - - /* The square wave is high from -PI to 0. */ - case GR_SQR_WAVE: + + /* The square wave is high from -PI to 0. */ + case GR_SQR_WAVE: t = (@TYPE@) d_ampl + d_offset; for (int i = 0; i < noutput_items; i++){ if (d_nco.get_phase() < 0) @@ -177,9 +177,9 @@ int d_nco.step(); } break; - - /* The triangle wave rises from -PI to 0 and falls from 0 to PI. */ - case GR_TRI_WAVE: + + /* The triangle wave rises from -PI to 0 and falls from 0 to PI. */ + case GR_TRI_WAVE: for (int i = 0; i < noutput_items; i++){ double t = d_ampl*d_nco.get_phase()/M_PI; if (d_nco.get_phase() < 0) @@ -189,12 +189,12 @@ int d_nco.step(); } break; - + /* The saw tooth wave rises from -PI to PI. */ - case GR_SAW_WAVE: + case GR_SAW_WAVE: for (int i = 0; i < noutput_items; i++){ t = static_cast<@TYPE@>(d_ampl*d_nco.get_phase()/(2*M_PI) + d_ampl/2 + d_offset); - optr[i] = t; + optr[i] = t; d_nco.step(); } break; diff --git a/gnuradio-core/src/lib/gengen/gr_sig_source_X.h.t b/gnuradio-core/src/lib/gengen/gr_sig_source_X.h.t index 3df723868..baa82dbe2 100644 --- a/gnuradio-core/src/lib/gengen/gr_sig_source_X.h.t +++ b/gnuradio-core/src/lib/gengen/gr_sig_source_X.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -39,7 +39,7 @@ typedef boost::shared_ptr<@NAME@> @NAME@_sptr; */ class GR_CORE_API @NAME@ : public gr_sync_block { - friend GR_CORE_API @NAME@_sptr + friend GR_CORE_API @NAME@_sptr gr_make_@BASE_NAME@ (double sampling_freq, gr_waveform_t waveform, double frequency, double ampl, @TYPE@ offset); diff --git a/gnuradio-core/src/lib/gengen/gr_sig_source_X.i.t b/gnuradio-core/src/lib/gengen/gr_sig_source_X.i.t index ce197b9b6..7bd85fcb8 100644 --- a/gnuradio-core/src/lib/gengen/gr_sig_source_X.i.t +++ b/gnuradio-core/src/lib/gengen/gr_sig_source_X.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/gengen/gr_sig_source_waveform.h b/gnuradio-core/src/lib/gengen/gr_sig_source_waveform.h index e52a497c3..9fe233ba4 100644 --- a/gnuradio-core/src/lib/gengen/gr_sig_source_waveform.h +++ b/gnuradio-core/src/lib/gengen/gr_sig_source_waveform.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/gengen/gr_sub_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_sub_XX.cc.t index 1dcdf81ad..11eb7440e 100644 --- a/gnuradio-core/src/lib/gengen/gr_sub_XX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_sub_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004, 2009,2010 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, diff --git a/gnuradio-core/src/lib/gengen/gr_sub_XX.h.t b/gnuradio-core/src/lib/gengen/gr_sub_XX.h.t index 4c988945e..f96c93484 100644 --- a/gnuradio-core/src/lib/gengen/gr_sub_XX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_sub_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004, 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, diff --git a/gnuradio-core/src/lib/gengen/gr_sub_XX.i.t b/gnuradio-core/src/lib/gengen/gr_sub_XX.i.t index f7726ccf6..b2c510610 100644 --- a/gnuradio-core/src/lib/gengen/gr_sub_XX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_sub_XX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004, 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, diff --git a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_XX.cc.t index b37c67abd..ed2b713db 100644 --- a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_XX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006 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, @@ -33,14 +33,14 @@ static const unsigned int BITS_PER_TYPE = sizeof(@O_TYPE@) * 8; -@SPTR_NAME@ +@SPTR_NAME@ gr_make_@BASE_NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness) { - return @SPTR_NAME@ + return @SPTR_NAME@ (new @NAME@ (bits_per_chunk,endianness)); } -@NAME@::@NAME@ (unsigned int bits_per_chunk, +@NAME@::@NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness) : gr_block ("@BASE_NAME@", gr_make_io_signature (1, -1, sizeof (@I_TYPE@)), @@ -91,7 +91,7 @@ int // per stream processing //assert((ninput_items[m]-d_index)*d_bits_per_chunk >= noutput_items*BITS_PER_TYPE); - + switch(d_endianness){ case GR_MSB_FIRST: @@ -115,7 +115,7 @@ int out[i] = tmp; } break; - + default: assert(0); } diff --git a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_XX.h.t b/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_XX.h.t index a7db84c5c..a7b7b54df 100644 --- a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_XX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -32,7 +32,7 @@ class @NAME@; typedef boost::shared_ptr<@NAME@> @NAME@_sptr; -GR_CORE_API @SPTR_NAME@ +GR_CORE_API @SPTR_NAME@ gr_make_@BASE_NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness); /*! diff --git a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_XX.i.t b/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_XX.i.t index e079d4a9b..1e978956a 100644 --- a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_XX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_XX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/gengen/gr_vector_sink_X.cc.t b/gnuradio-core/src/lib/gengen/gr_vector_sink_X.cc.t index f3466d46f..a9e3a0a3e 100644 --- a/gnuradio-core/src/lib/gengen/gr_vector_sink_X.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_vector_sink_X.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2008,2010 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, diff --git a/gnuradio-core/src/lib/gengen/gr_vector_sink_X.h.t b/gnuradio-core/src/lib/gengen/gr_vector_sink_X.h.t index 475cc0112..b9126dc7b 100644 --- a/gnuradio-core/src/lib/gengen/gr_vector_sink_X.h.t +++ b/gnuradio-core/src/lib/gengen/gr_vector_sink_X.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,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, diff --git a/gnuradio-core/src/lib/gengen/gr_vector_sink_X.i.t b/gnuradio-core/src/lib/gengen/gr_vector_sink_X.i.t index a49276a99..d4a940911 100644 --- a/gnuradio-core/src/lib/gengen/gr_vector_sink_X.i.t +++ b/gnuradio-core/src/lib/gengen/gr_vector_sink_X.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,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, diff --git a/gnuradio-core/src/lib/gengen/gr_vector_source_X.cc.t b/gnuradio-core/src/lib/gengen/gr_vector_source_X.cc.t index 1fe5df5b5..9f68f9cf1 100644 --- a/gnuradio-core/src/lib/gengen/gr_vector_source_X.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_vector_source_X.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2008,2010 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, @@ -54,10 +54,10 @@ int if (d_repeat){ unsigned int size = d_data.size (); unsigned int offset = d_offset; - + if (size == 0) return -1; - + for (int i = 0; i < noutput_items*d_vlen; i++){ optr[i] = d_data[offset++]; if (offset >= size) diff --git a/gnuradio-core/src/lib/gengen/gr_vector_source_X.h.t b/gnuradio-core/src/lib/gengen/gr_vector_source_X.h.t index fbab3effb..fe0a77f81 100644 --- a/gnuradio-core/src/lib/gengen/gr_vector_source_X.h.t +++ b/gnuradio-core/src/lib/gengen/gr_vector_source_X.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,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, @@ -37,7 +37,7 @@ typedef boost::shared_ptr<@NAME@> @NAME@_sptr; */ class @NAME@ : public gr_sync_block { - friend GR_CORE_API @NAME@_sptr + friend GR_CORE_API @NAME@_sptr gr_make_@BASE_NAME@ (const std::vector<@TYPE@> &data, bool repeat, int vlen); std::vector<@TYPE@> d_data; diff --git a/gnuradio-core/src/lib/gengen/gr_vector_source_X.i.t b/gnuradio-core/src/lib/gengen/gr_vector_source_X.i.t index a22157893..6c20539ac 100644 --- a/gnuradio-core/src/lib/gengen/gr_vector_source_X.i.t +++ b/gnuradio-core/src/lib/gengen/gr_vector_source_X.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,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, diff --git a/gnuradio-core/src/lib/gengen/gr_xor_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_xor_XX.cc.t index 29230f7a6..d6990aa4f 100644 --- a/gnuradio-core/src/lib/gengen/gr_xor_XX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_xor_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2008,2010 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, diff --git a/gnuradio-core/src/lib/gengen/gr_xor_XX.h.t b/gnuradio-core/src/lib/gengen/gr_xor_XX.h.t index b2e1a68c8..8fe47d9e0 100644 --- a/gnuradio-core/src/lib/gengen/gr_xor_XX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_xor_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,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, diff --git a/gnuradio-core/src/lib/gengen/gr_xor_XX.i.t b/gnuradio-core/src/lib/gengen/gr_xor_XX.i.t index e17d40eea..06db5ca59 100644 --- a/gnuradio-core/src/lib/gengen/gr_xor_XX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_xor_XX.i.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,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, diff --git a/gnuradio-core/src/lib/gnuradio-config-info.cc b/gnuradio-core/src/lib/gnuradio-config-info.cc index 6fa53b877..d3e6454fd 100644 --- a/gnuradio-core/src/lib/gnuradio-config-info.cc +++ b/gnuradio-core/src/lib/gnuradio-config-info.cc @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -52,7 +52,7 @@ main(int argc, char **argv) std::cout << desc << std::endl; return 1; } - + if (vm.count("prefix")) std::cout << gr_prefix() << std::endl; diff --git a/gnuradio-core/src/lib/hier/.gitignore b/gnuradio-core/src/lib/hier/.gitignore deleted file mode 100644 index 89a768d46..000000000 --- a/gnuradio-core/src/lib/hier/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/Makefile -/Makefile.in -/.libs -/.deps diff --git a/gnuradio-core/src/lib/hier/Makefile.am b/gnuradio-core/src/lib/hier/Makefile.am deleted file mode 100644 index 369feef75..000000000 --- a/gnuradio-core/src/lib/hier/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -# -# Copyright 2009,2010 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 - - -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(WITH_INCLUDES) - -noinst_LTLIBRARIES = libhier.la - -libhier_la_SOURCES = \ - gr_channel_model.cc - -grinclude_HEADERS = \ - gr_channel_model.h - -swiginclude_HEADERS = \ - hier.i \ - gr_channel_model.i diff --git a/gnuradio-core/src/lib/hier/gr_channel_model.cc b/gnuradio-core/src/lib/hier/gr_channel_model.cc index 5f190e972..bb01972d2 100644 --- a/gnuradio-core/src/lib/hier/gr_channel_model.cc +++ b/gnuradio-core/src/lib/hier/gr_channel_model.cc @@ -1,18 +1,18 @@ /* * 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, @@ -46,23 +46,23 @@ gr_channel_model::gr_channel_model(double noise_voltage, const std::vector<gr_complex> &taps, double noise_seed) : gr_hier_block2("gr_channel_model", - gr_make_io_signature(1, 1, sizeof(gr_complex)), + gr_make_io_signature(1, 1, sizeof(gr_complex)), gr_make_io_signature(1, 1, sizeof(gr_complex))) { d_taps = taps; while(d_taps.size() < 2) { d_taps.push_back(0); } - + d_timing_offset = gr_make_fractional_interpolator_cc(0, epsilon); - + d_multipath = gr_make_fir_filter_ccc(1, d_taps); - + d_noise_adder = gr_make_add_cc(); d_noise = gr_make_noise_source_c(GR_GAUSSIAN, noise_voltage, noise_seed); d_freq_offset = gr_make_sig_source_c(1, GR_SIN_WAVE, frequency_offset, 1.0, 0.0); d_mixer_offset = gr_make_multiply_cc(); - + connect(self(), 0, d_timing_offset, 0); connect(d_timing_offset, 0, d_multipath, 0); connect(d_multipath, 0, d_mixer_offset, 0); @@ -77,13 +77,13 @@ gr_channel_model::set_noise_voltage(double noise_voltage) { d_noise->set_amplitude(noise_voltage); } - + void gr_channel_model::set_frequency_offset(double frequency_offset) { d_freq_offset->set_frequency(frequency_offset); } - + void gr_channel_model::set_taps(const std::vector<gr_complex> &taps) { diff --git a/gnuradio-core/src/lib/hier/gr_channel_model.h b/gnuradio-core/src/lib/hier/gr_channel_model.h index c5d06ce11..3f289e320 100644 --- a/gnuradio-core/src/lib/hier/gr_channel_model.h +++ b/gnuradio-core/src/lib/hier/gr_channel_model.h @@ -1,18 +1,18 @@ /* * 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, @@ -56,16 +56,16 @@ class GR_CORE_API gr_channel_model : public gr_hier_block2 double epsilon, const std::vector<gr_complex> &taps, double noise_seed); - + gr_fractional_interpolator_cc_sptr d_timing_offset; gr_sig_source_c_sptr d_freq_offset; gr_fir_filter_ccc_sptr d_multipath; gr_add_cc_sptr d_noise_adder; gr_noise_source_c_sptr d_noise; gr_multiply_cc_sptr d_mixer_offset; - + std::vector<gr_complex> d_taps; - + public: void set_noise_voltage(double noise_voltage); void set_frequency_offset(double frequency_offset); diff --git a/gnuradio-core/src/lib/hier/gr_channel_model.i b/gnuradio-core/src/lib/hier/gr_channel_model.i index 2e0cb7bdf..24a9388e5 100644 --- a/gnuradio-core/src/lib/hier/gr_channel_model.i +++ b/gnuradio-core/src/lib/hier/gr_channel_model.i @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -36,7 +36,7 @@ class gr_channel_model : public gr_hier_block2 double epsilon, const std::vector<gr_complex> &taps, double noise_seed); - + public: void set_noise_voltage(double noise_voltage); void set_frequency_offset(double frequency_offset); diff --git a/gnuradio-core/src/lib/hier/hier.i b/gnuradio-core/src/lib/hier/hier.i index bec3de7ed..82044415e 100644 --- a/gnuradio-core/src/lib/hier/hier.i +++ b/gnuradio-core/src/lib/hier/hier.i @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/io/.gitignore b/gnuradio-core/src/lib/io/.gitignore deleted file mode 100644 index a02b6ff73..000000000 --- a/gnuradio-core/src/lib/io/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo diff --git a/gnuradio-core/src/lib/io/Makefile.am b/gnuradio-core/src/lib/io/Makefile.am deleted file mode 100644 index 442d5e3a9..000000000 --- a/gnuradio-core/src/lib/io/Makefile.am +++ /dev/null @@ -1,116 +0,0 @@ -# -# Copyright 2001,2003,2004,2006,2007,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. -# - -include $(top_srcdir)/Makefile.common - - -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(WITH_INCLUDES) - -noinst_LTLIBRARIES = libio.la - - -libio_la_SOURCES = \ - gr_file_sink.cc \ - gr_file_sink_base.cc \ - gr_file_source.cc \ - gr_file_descriptor_sink.cc \ - gr_file_descriptor_source.cc \ - gr_histo_sink_f.cc \ - gr_message_sink.cc \ - gr_message_source.cc \ - gr_oscope_guts.cc \ - gr_oscope_sink_f.cc \ - gr_oscope_sink_x.cc \ - i2c.cc \ - i2c_bitbang.cc \ - i2c_bbio.cc \ - i2c_bbio_pp.cc \ - microtune_4702.cc \ - microtune_4937.cc \ - microtune_4702_eval_board.cc \ - microtune_4937_eval_board.cc \ - microtune_xxxx.cc \ - microtune_xxxx_eval_board.cc \ - ppio.cc \ - ppio_ppdev.cc \ - sdr_1000.cc \ - gr_udp_sink.cc \ - gr_udp_source.cc \ - gr_wavfile_sink.cc \ - gr_wavfile_source.cc \ - gri_wavfile.cc \ - gr_tagged_file_sink.cc - -grinclude_HEADERS = \ - gr_file_sink.h \ - gr_file_sink_base.h \ - gr_file_source.h \ - gr_file_descriptor_sink.h \ - gr_file_descriptor_source.h \ - gr_histo_sink_f.h \ - gr_message_sink.h \ - gr_message_source.h \ - gr_oscope_guts.h \ - gr_oscope_sink_f.h \ - gr_oscope_sink_x.h \ - gr_trigger_mode.h \ - i2c.h \ - i2c_bitbang.h \ - i2c_bbio.h \ - i2c_bbio_pp.h \ - microtune_4702.h \ - microtune_4937.h \ - microtune_4702_eval_board.h \ - microtune_4937_eval_board.h \ - microtune_eval_board_defs.h \ - microtune_xxxx.h \ - microtune_xxxx_eval_board.h \ - ppio.h \ - ppio_ppdev.h \ - sdr_1000.h \ - gr_udp_sink.h \ - gr_udp_source.h \ - gr_wavfile_source.h \ - gr_wavfile_sink.h \ - gri_wavfile.h \ - gr_tagged_file_sink.h - -swiginclude_HEADERS = \ - io.i \ - gr_file_sink.i \ - gr_file_sink_base.i \ - gr_file_source.i \ - gr_file_descriptor_sink.i \ - gr_file_descriptor_source.i \ - gr_histo_sink.i \ - gr_message_sink.i \ - gr_message_source.i \ - gr_oscope_sink.i \ - microtune_xxxx_eval_board.i \ - microtune_4702_eval_board.i \ - microtune_4937_eval_board.i \ - ppio.i \ - sdr_1000.i \ - gr_udp_sink.i \ - gr_udp_source.i \ - gr_wavfile_source.i \ - gr_wavfile_sink.i \ - gr_tagged_file_sink.i diff --git a/gnuradio-core/src/lib/io/gr_file_descriptor_sink.cc b/gnuradio-core/src/lib/io/gr_file_descriptor_sink.cc index 11e0a8eb9..099d46dbd 100644 --- a/gnuradio-core/src/lib/io/gr_file_descriptor_sink.cc +++ b/gnuradio-core/src/lib/io/gr_file_descriptor_sink.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -57,7 +57,7 @@ gr_file_descriptor_sink::~gr_file_descriptor_sink () close (d_fd); } -int +int gr_file_descriptor_sink::work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) diff --git a/gnuradio-core/src/lib/io/gr_file_descriptor_sink.h b/gnuradio-core/src/lib/io/gr_file_descriptor_sink.h index 5e4cc6505..3b1c1167f 100644 --- a/gnuradio-core/src/lib/io/gr_file_descriptor_sink.h +++ b/gnuradio-core/src/lib/io/gr_file_descriptor_sink.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/io/gr_file_descriptor_sink.i b/gnuradio-core/src/lib/io/gr_file_descriptor_sink.i index 14c37f68e..2c256e44d 100644 --- a/gnuradio-core/src/lib/io/gr_file_descriptor_sink.i +++ b/gnuradio-core/src/lib/io/gr_file_descriptor_sink.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,file_descriptor_sink) -gr_file_descriptor_sink_sptr +gr_file_descriptor_sink_sptr gr_make_file_descriptor_sink (size_t itemsize, int fd); class gr_file_descriptor_sink : public gr_sync_block diff --git a/gnuradio-core/src/lib/io/gr_file_descriptor_source.cc b/gnuradio-core/src/lib/io/gr_file_descriptor_source.cc index 334a57848..a63abf96b 100644 --- a/gnuradio-core/src/lib/io/gr_file_descriptor_source.cc +++ b/gnuradio-core/src/lib/io/gr_file_descriptor_source.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2005 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, @@ -133,9 +133,9 @@ gr_file_descriptor_source::read_items (char *buf, int nitems) if (r == 0) // block until we get something return read_items (buf, nitems); - + return r; -} +} int gr_file_descriptor_source::handle_residue (char *buf, int nbytes_read) diff --git a/gnuradio-core/src/lib/io/gr_file_descriptor_source.h b/gnuradio-core/src/lib/io/gr_file_descriptor_source.h index fa513fd25..ebabd81ed 100644 --- a/gnuradio-core/src/lib/io/gr_file_descriptor_source.h +++ b/gnuradio-core/src/lib/io/gr_file_descriptor_source.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/io/gr_file_descriptor_source.i b/gnuradio-core/src/lib/io/gr_file_descriptor_source.i index cee0b5765..3ca082522 100644 --- a/gnuradio-core/src/lib/io/gr_file_descriptor_source.i +++ b/gnuradio-core/src/lib/io/gr_file_descriptor_source.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,file_descriptor_source) -gr_file_descriptor_source_sptr +gr_file_descriptor_source_sptr gr_make_file_descriptor_source (size_t itemsize, int fd, bool repeat=false); class gr_file_descriptor_source : public gr_sync_block diff --git a/gnuradio-core/src/lib/io/gr_file_sink.cc b/gnuradio-core/src/lib/io/gr_file_sink.cc index aab0158e7..5d147fcfe 100644 --- a/gnuradio-core/src/lib/io/gr_file_sink.cc +++ b/gnuradio-core/src/lib/io/gr_file_sink.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006,2007,2010 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, @@ -50,7 +50,7 @@ gr_file_sink::~gr_file_sink () { } -int +int gr_file_sink::work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) @@ -59,7 +59,7 @@ gr_file_sink::work (int noutput_items, int nwritten = 0; do_update(); // update d_fp is reqd - + if (!d_fp) return noutput_items; // drop output on the floor @@ -72,6 +72,6 @@ gr_file_sink::work (int noutput_items, } if (d_unbuffered) fflush (d_fp); - + return nwritten; } diff --git a/gnuradio-core/src/lib/io/gr_file_sink.h b/gnuradio-core/src/lib/io/gr_file_sink.h index 180cbef2a..e40ec9ab8 100644 --- a/gnuradio-core/src/lib/io/gr_file_sink.h +++ b/gnuradio-core/src/lib/io/gr_file_sink.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2007 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, diff --git a/gnuradio-core/src/lib/io/gr_file_sink.i b/gnuradio-core/src/lib/io/gr_file_sink.i index 64260392c..47ab9e964 100644 --- a/gnuradio-core/src/lib/io/gr_file_sink.i +++ b/gnuradio-core/src/lib/io/gr_file_sink.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,file_sink) -gr_file_sink_sptr +gr_file_sink_sptr gr_make_file_sink (size_t itemsize, const char *filename); class gr_file_sink : public gr_sync_block, public gr_file_sink_base @@ -33,7 +33,7 @@ class gr_file_sink : public gr_sync_block, public gr_file_sink_base public: ~gr_file_sink (); - /*! + /*! * \brief open filename and begin output to it. */ bool open(const char *filename); diff --git a/gnuradio-core/src/lib/io/gr_file_sink_base.cc b/gnuradio-core/src/lib/io/gr_file_sink_base.cc index c43304b0d..b2dcc1be5 100644 --- a/gnuradio-core/src/lib/io/gr_file_sink_base.cc +++ b/gnuradio-core/src/lib/io/gr_file_sink_base.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2006,2007,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, @@ -117,7 +117,7 @@ gr_file_sink_base::do_update() d_new_fp = 0; d_updated = false; } -} +} void gr_file_sink_base::set_unbuffered(bool unbuffered) diff --git a/gnuradio-core/src/lib/io/gr_file_sink_base.h b/gnuradio-core/src/lib/io/gr_file_sink_base.h index 6765dbad8..8a70cee76 100644 --- a/gnuradio-core/src/lib/io/gr_file_sink_base.h +++ b/gnuradio-core/src/lib/io/gr_file_sink_base.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2007,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, @@ -46,7 +46,7 @@ class GR_CORE_API gr_file_sink_base public: ~gr_file_sink_base(); - /*! + /*! * \brief Open filename and begin output to it. */ bool open(const char *filename); @@ -63,8 +63,8 @@ class GR_CORE_API gr_file_sink_base * \brief if we've had an update, do it now. */ void do_update(); - - + + /*! * \brief turn on unbuffered writes for slower outputs */ diff --git a/gnuradio-core/src/lib/io/gr_file_sink_base.i b/gnuradio-core/src/lib/io/gr_file_sink_base.i index ed4342482..993dba277 100644 --- a/gnuradio-core/src/lib/io/gr_file_sink_base.i +++ b/gnuradio-core/src/lib/io/gr_file_sink_base.i @@ -1,24 +1,24 @@ /* -*- c++ -*- */ /* * Copyright 2006 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. */ -class gr_file_sink_base +class gr_file_sink_base { protected: gr_file_sink_base(const char *filename, bool is_binary); @@ -26,7 +26,7 @@ class gr_file_sink_base public: ~gr_file_sink_base(); - /*! + /*! * \brief Open filename and begin output to it. */ bool open(const char *filename); diff --git a/gnuradio-core/src/lib/io/gr_file_source.cc b/gnuradio-core/src/lib/io/gr_file_source.cc index d045e26b3..3f06a8244 100644 --- a/gnuradio-core/src/lib/io/gr_file_source.cc +++ b/gnuradio-core/src/lib/io/gr_file_source.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -56,7 +56,7 @@ gr_file_source::gr_file_source (size_t itemsize, const char *filename, bool repe d_itemsize (itemsize), d_fp (0), d_repeat (repeat) { // we use "open" to use to the O_LARGEFILE flag - + int fd; if ((fd = open (filename, O_RDONLY | OUR_O_LARGEFILE | OUR_O_BINARY)) < 0){ perror (filename); @@ -82,7 +82,7 @@ gr_file_source::~gr_file_source () fclose ((FILE *) d_fp); } -int +int gr_file_source::work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) @@ -93,7 +93,7 @@ gr_file_source::work (int noutput_items, while (size) { i = fread(o, d_itemsize, size, (FILE *) d_fp); - + size -= i; o += i * d_itemsize; diff --git a/gnuradio-core/src/lib/io/gr_file_source.h b/gnuradio-core/src/lib/io/gr_file_source.h index 6e8fc4074..1cc44a3b1 100644 --- a/gnuradio-core/src/lib/io/gr_file_source.h +++ b/gnuradio-core/src/lib/io/gr_file_source.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/io/gr_file_source.i b/gnuradio-core/src/lib/io/gr_file_source.i index f538ea3ae..9bf44691d 100644 --- a/gnuradio-core/src/lib/io/gr_file_source.i +++ b/gnuradio-core/src/lib/io/gr_file_source.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -28,7 +28,7 @@ GR_SWIG_BLOCK_MAGIC(gr,file_source) -gr_file_source_sptr +gr_file_source_sptr gr_make_file_source (size_t itemsize, const char *filename, bool repeat=false); class gr_file_source : public gr_sync_block diff --git a/gnuradio-core/src/lib/io/gr_histo_sink.i b/gnuradio-core/src/lib/io/gr_histo_sink.i index 544d772fb..14079e190 100644 --- a/gnuradio-core/src/lib/io/gr_histo_sink.i +++ b/gnuradio-core/src/lib/io/gr_histo_sink.i @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/io/gr_message_sink.cc b/gnuradio-core/src/lib/io/gr_message_sink.cc index 8881e97f4..ae0b5c764 100644 --- a/gnuradio-core/src/lib/io/gr_message_sink.cc +++ b/gnuradio-core/src/lib/io/gr_message_sink.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 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, @@ -37,7 +37,7 @@ // public constructor that returns a shared_ptr -gr_message_sink_sptr +gr_message_sink_sptr gr_make_message_sink (size_t itemsize, gr_msg_queue_sptr msgq, bool dont_block) { return gnuradio::get_initial_sptr(new gr_message_sink(itemsize, msgq, dont_block)); diff --git a/gnuradio-core/src/lib/io/gr_message_sink.h b/gnuradio-core/src/lib/io/gr_message_sink.h index 180055261..84005694a 100644 --- a/gnuradio-core/src/lib/io/gr_message_sink.h +++ b/gnuradio-core/src/lib/io/gr_message_sink.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/io/gr_message_sink.i b/gnuradio-core/src/lib/io/gr_message_sink.i index a42cb7eca..8415cbd66 100644 --- a/gnuradio-core/src/lib/io/gr_message_sink.i +++ b/gnuradio-core/src/lib/io/gr_message_sink.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/io/gr_message_source.cc b/gnuradio-core/src/lib/io/gr_message_source.cc index 0fa24f2f9..fb3da89a8 100644 --- a/gnuradio-core/src/lib/io/gr_message_source.cc +++ b/gnuradio-core/src/lib/io/gr_message_source.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 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, diff --git a/gnuradio-core/src/lib/io/gr_message_source.h b/gnuradio-core/src/lib/io/gr_message_source.h index 16a0f4474..c510d1775 100644 --- a/gnuradio-core/src/lib/io/gr_message_source.h +++ b/gnuradio-core/src/lib/io/gr_message_source.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/io/gr_message_source.i b/gnuradio-core/src/lib/io/gr_message_source.i index e4e2016d0..9ee9157e8 100644 --- a/gnuradio-core/src/lib/io/gr_message_source.i +++ b/gnuradio-core/src/lib/io/gr_message_source.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -22,14 +22,6 @@ GR_SWIG_BLOCK_MAGIC(gr,message_source); -#ifdef SWIGGUILE -// Rename these. Without this, the primitive bindings are OK, but the -// goops bindings try to create a bogus generic-function... -// See core.scm for the second part of the workaround. -%rename(message_source_limit_ctor) gr_make_message_source(size_t itemsize, int msgq_limit); -%rename(message_source_msgq_ctor) gr_make_message_source(size_t itemsize, gr_msg_queue_sptr msgq); -#endif - gr_message_source_sptr gr_make_message_source (size_t itemsize, int msgq_limit=0); gr_message_source_sptr gr_make_message_source (size_t itemsize, gr_msg_queue_sptr msgq); diff --git a/gnuradio-core/src/lib/io/gr_oscope_guts.cc b/gnuradio-core/src/lib/io/gr_oscope_guts.cc index 8b0d1e632..a5ea3002a 100644 --- a/gnuradio-core/src/lib/io/gr_oscope_guts.cc +++ b/gnuradio-core/src/lib/io/gr_oscope_guts.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003,2005 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, @@ -65,7 +65,7 @@ decr_bi (int buffer_index, int mx) // decrement buffer index gr_oscope_guts::gr_oscope_guts (double sample_rate, gr_msg_queue_sptr msgq) : d_nchannels (1), - d_msgq (msgq), + d_msgq (msgq), d_trigger_mode (gr_TRIG_MODE_AUTO), d_trigger_slope (gr_TRIG_SLOPE_POS), d_trigger_channel (0), @@ -115,7 +115,7 @@ gr_oscope_guts::process_sample (const float *channel_data) return; d_decimator_count = d_decimator_count_init; - + if (d_trigger_mode != gr_TRIG_MODE_STRIPCHART) { for (int i = 0; i < d_nchannels; i++) @@ -198,7 +198,7 @@ gr_oscope_guts::found_trigger () { int mx = d_trigger_mode == gr_TRIG_MODE_STRIPCHART ? OUTPUT_RECORD_SIZE*SCHART_MULT : OUTPUT_RECORD_SIZE; - + float prev_sample = d_buffer[d_trigger_channel][decr_bi(d_obi, mx)]; float new_sample = d_buffer[d_trigger_channel][d_obi]; @@ -241,15 +241,15 @@ void gr_oscope_guts::write_output_records () { int mx; - - mx = d_trigger_mode == gr_TRIG_MODE_STRIPCHART ? + + mx = d_trigger_mode == gr_TRIG_MODE_STRIPCHART ? OUTPUT_RECORD_SIZE*SCHART_MULT : OUTPUT_RECORD_SIZE; - + // if the output queue if full, drop the data like its hot. if (d_msgq->full_p()) return; // Build a message to hold the output records - gr_message_sptr msg = + gr_message_sptr msg = gr_make_message(0, // msg type d_nchannels, // arg1 for other side mx, // arg2 for other side @@ -427,7 +427,7 @@ int gr_oscope_guts::get_samples_per_output_record () const { int mx; - + mx = OUTPUT_RECORD_SIZE; if (d_trigger_mode == gr_TRIG_MODE_STRIPCHART) { diff --git a/gnuradio-core/src/lib/io/gr_oscope_guts.h b/gnuradio-core/src/lib/io/gr_oscope_guts.h index 3223d4e38..bc9513c7e 100644 --- a/gnuradio-core/src/lib/io/gr_oscope_guts.h +++ b/gnuradio-core/src/lib/io/gr_oscope_guts.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003,2005 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, @@ -56,7 +56,7 @@ private: double d_update_rate; // approx freq to produce an output record (Hz) double d_trigger_level; - int d_obi; // output buffer index + int d_obi; // output buffer index float *d_buffer[MAX_CHANNELS]; scope_state d_state; diff --git a/gnuradio-core/src/lib/io/gr_oscope_sink.i b/gnuradio-core/src/lib/io/gr_oscope_sink.i index 9d634193b..3d7072ed4 100644 --- a/gnuradio-core/src/lib/io/gr_oscope_sink.i +++ b/gnuradio-core/src/lib/io/gr_oscope_sink.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/io/gr_oscope_sink_f.cc b/gnuradio-core/src/lib/io/gr_oscope_sink_f.cc index eca0f6dc6..493a25e81 100644 --- a/gnuradio-core/src/lib/io/gr_oscope_sink_f.cc +++ b/gnuradio-core/src/lib/io/gr_oscope_sink_f.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003,2004,2005,2010 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, @@ -68,7 +68,7 @@ gr_oscope_sink_f::work (int noutput_items, for (int i = 0; i < noutput_items; i++){ // FIXME for now, copy the data. Fix later if reqd - for (int ch = 0; ch < ni; ch++) + for (int ch = 0; ch < ni; ch++) tmp[ch] = ((const float *) input_items[ch])[i]; d_guts->process_sample (tmp); diff --git a/gnuradio-core/src/lib/io/gr_oscope_sink_f.h b/gnuradio-core/src/lib/io/gr_oscope_sink_f.h index e3d1f65e5..8d434d2bc 100644 --- a/gnuradio-core/src/lib/io/gr_oscope_sink_f.h +++ b/gnuradio-core/src/lib/io/gr_oscope_sink_f.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003,2004,2005 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, diff --git a/gnuradio-core/src/lib/io/gr_oscope_sink_x.cc b/gnuradio-core/src/lib/io/gr_oscope_sink_x.cc index 2bbd57463..9580dbf6a 100644 --- a/gnuradio-core/src/lib/io/gr_oscope_sink_x.cc +++ b/gnuradio-core/src/lib/io/gr_oscope_sink_x.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/io/gr_oscope_sink_x.h b/gnuradio-core/src/lib/io/gr_oscope_sink_x.h index aaff5870b..153d0937a 100644 --- a/gnuradio-core/src/lib/io/gr_oscope_sink_x.h +++ b/gnuradio-core/src/lib/io/gr_oscope_sink_x.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -40,7 +40,7 @@ class GR_CORE_API gr_oscope_sink_x : public gr_sync_block protected: double d_sampling_rate; gr_oscope_guts *d_guts; - + gr_oscope_sink_x (const std::string name, gr_io_signature_sptr input_sig, double sampling_rate); @@ -71,7 +71,7 @@ public: // # of samples written to each output record. int get_samples_per_output_record () const; - + }; #endif /* INCLUDED_GR_OSCOPE_SINK_X_H */ diff --git a/gnuradio-core/src/lib/io/gr_tagged_file_sink.cc b/gnuradio-core/src/lib/io/gr_tagged_file_sink.cc index 4ac8c3512..d69892762 100644 --- a/gnuradio-core/src/lib/io/gr_tagged_file_sink.cc +++ b/gnuradio-core/src/lib/io/gr_tagged_file_sink.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -72,7 +72,7 @@ gr_tagged_file_sink::~gr_tagged_file_sink () { } -int +int gr_tagged_file_sink::work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) @@ -112,7 +112,7 @@ gr_tagged_file_sink::work (int noutput_items, pmt::pmt_string_to_symbol("time")); if(time_tags.size() > 0) { const gr_tag_t tag = time_tags[time_tags.size()-1]; - + uint64_t time_nitems = tag.offset; // Get time based on last time tag from USRP @@ -139,13 +139,13 @@ gr_tagged_file_sink::work (int noutput_items, //std::cout << " time: " << d_timeval << std::endl; } d_last_N = N; - + std::stringstream filename; filename.setf(std::ios::fixed, std::ios::floatfield); filename.precision(8); filename << "file" << d_n << "_" << d_timeval << ".dat"; d_n++; - + int fd; if ((fd = ::open (filename.str().c_str(), O_WRONLY|O_CREAT|O_TRUNC|OUR_O_LARGEFILE|OUR_O_BINARY, @@ -153,7 +153,7 @@ gr_tagged_file_sink::work (int noutput_items, perror (filename.str().c_str()); return -1; } - + // FIXME: //if ((d_handle = fdopen (fd, d_is_binary ? "wb" : "w")) == NULL){ if ((d_handle = fdopen (fd, "wb")) == NULL){ @@ -166,7 +166,7 @@ gr_tagged_file_sink::work (int noutput_items, d_state = IN_BURST; break; } - + vitr++; } if(d_state == NOT_IN_BURST) diff --git a/gnuradio-core/src/lib/io/gr_tagged_file_sink.h b/gnuradio-core/src/lib/io/gr_tagged_file_sink.h index da12dca78..d6f931a67 100644 --- a/gnuradio-core/src/lib/io/gr_tagged_file_sink.h +++ b/gnuradio-core/src/lib/io/gr_tagged_file_sink.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, diff --git a/gnuradio-core/src/lib/io/gr_tagged_file_sink.i b/gnuradio-core/src/lib/io/gr_tagged_file_sink.i index 1408adfc1..2f2596e12 100644 --- a/gnuradio-core/src/lib/io/gr_tagged_file_sink.i +++ b/gnuradio-core/src/lib/io/gr_tagged_file_sink.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(gr,tagged_file_sink) -gr_tagged_file_sink_sptr +gr_tagged_file_sink_sptr gr_make_tagged_file_sink (size_t itemsize, double samp_rate); class gr_tagged_file_sink : public gr_sync_block diff --git a/gnuradio-core/src/lib/io/gr_trigger_mode.h b/gnuradio-core/src/lib/io/gr_trigger_mode.h index 8e1222856..be131686b 100644 --- a/gnuradio-core/src/lib/io/gr_trigger_mode.h +++ b/gnuradio-core/src/lib/io/gr_trigger_mode.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/io/gr_udp_sink.cc b/gnuradio-core/src/lib/io/gr_udp_sink.cc index 9fc4da0ae..6b1d34ef7 100644 --- a/gnuradio-core/src/lib/io/gr_udp_sink.cc +++ b/gnuradio-core/src/lib/io/gr_udp_sink.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2008,2009,2010 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, @@ -92,7 +92,7 @@ static void report_error( const char *msg1, const char *msg2 ) return; } -gr_udp_sink::gr_udp_sink (size_t itemsize, +gr_udp_sink::gr_udp_sink (size_t itemsize, const char *host, unsigned short port, int payload_size, bool eof) : gr_sync_block ("udp_sink", @@ -133,11 +133,11 @@ gr_udp_sink::gr_udp_sink (size_t itemsize, // public constructor that returns a shared_ptr gr_udp_sink_sptr -gr_make_udp_sink (size_t itemsize, +gr_make_udp_sink (size_t itemsize, const char *host, unsigned short port, int payload_size, bool eof) { - return gnuradio::get_initial_sptr(new gr_udp_sink (itemsize, + return gnuradio::get_initial_sptr(new gr_udp_sink (itemsize, host, port, payload_size, eof)); } @@ -163,7 +163,7 @@ gr_udp_sink::~gr_udp_sink () #endif } -int +int gr_udp_sink::work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) @@ -180,7 +180,7 @@ gr_udp_sink::work (int noutput_items, while(bytes_sent < total_size) { bytes_to_send = std::min((ssize_t)d_payload_size, (total_size-bytes_sent)); - + if(d_connected) { r = send(d_socket, (in+bytes_sent), bytes_to_send, 0); if(r == -1) { // error on send command @@ -195,7 +195,7 @@ gr_udp_sink::work (int noutput_items, else r = bytes_to_send; // discarded for lack of connection bytes_sent += r; - + #if SNK_VERBOSE printf("\tbyte sent: %d bytes\n", r); #endif diff --git a/gnuradio-core/src/lib/io/gr_udp_sink.h b/gnuradio-core/src/lib/io/gr_udp_sink.h index e9d4f8c73..bf042a6d1 100644 --- a/gnuradio-core/src/lib/io/gr_udp_sink.h +++ b/gnuradio-core/src/lib/io/gr_udp_sink.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2008,2009,2010 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, @@ -31,14 +31,14 @@ class gr_udp_sink; typedef boost::shared_ptr<gr_udp_sink> gr_udp_sink_sptr; GR_CORE_API gr_udp_sink_sptr -gr_make_udp_sink (size_t itemsize, +gr_make_udp_sink (size_t itemsize, const char *host, unsigned short port, int payload_size=1472, bool eof=true); /*! * \brief Write stream to an UDP socket. * \ingroup sink_blk - * + * * \param itemsize The size (in bytes) of the item datatype * \param host The name or IP address of the receiving host; use * NULL or None for no connection @@ -50,7 +50,7 @@ gr_make_udp_sink (size_t itemsize, class GR_CORE_API gr_udp_sink : public gr_sync_block { - friend GR_CORE_API gr_udp_sink_sptr gr_make_udp_sink (size_t itemsize, + friend GR_CORE_API gr_udp_sink_sptr gr_make_udp_sink (size_t itemsize, const char *host, unsigned short port, int payload_size, bool eof); @@ -66,16 +66,16 @@ class GR_CORE_API gr_udp_sink : public gr_sync_block protected: /*! * \brief UDP Sink Constructor - * + * * \param itemsize The size (in bytes) of the item datatype * \param host The name or IP address of the receiving host; use * NULL or None for no connection * \param port Destination port to connect to on receiving host - * \param payload_size UDP payload size by default set to + * \param payload_size UDP payload size by default set to * 1472 = (1500 MTU - (8 byte UDP header) - (20 byte IP header)) * \param eof Send zero-length packet on disconnect */ - gr_udp_sink (size_t itemsize, + gr_udp_sink (size_t itemsize, const char *host, unsigned short port, int payload_size, bool eof); diff --git a/gnuradio-core/src/lib/io/gr_udp_sink.i b/gnuradio-core/src/lib/io/gr_udp_sink.i index a71006ae0..ba7043937 100644 --- a/gnuradio-core/src/lib/io/gr_udp_sink.i +++ b/gnuradio-core/src/lib/io/gr_udp_sink.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2010 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, @@ -23,17 +23,17 @@ GR_SWIG_BLOCK_MAGIC(gr,udp_sink) -gr_udp_sink_sptr -gr_make_udp_sink (size_t itemsize, +gr_udp_sink_sptr +gr_make_udp_sink (size_t itemsize, const char *host, unsigned short port, int payload_size=1472, bool eof=true) throw (std::runtime_error); class gr_udp_sink : public gr_sync_block { protected: - gr_udp_sink (size_t itemsize, + gr_udp_sink (size_t itemsize, const char *host, unsigned short port, - int payload_size, bool eof) + int payload_size, bool eof) throw (std::runtime_error); public: diff --git a/gnuradio-core/src/lib/io/gr_udp_source.cc b/gnuradio-core/src/lib/io/gr_udp_source.cc index ca31233de..af41159ee 100644 --- a/gnuradio-core/src/lib/io/gr_udp_source.cc +++ b/gnuradio-core/src/lib/io/gr_udp_source.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2008,2009,2010 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, @@ -97,7 +97,7 @@ static void report_error( const char *msg1, const char *msg2 ) return; } -gr_udp_source::gr_udp_source(size_t itemsize, const char *host, +gr_udp_source::gr_udp_source(size_t itemsize, const char *host, unsigned short port, int payload_size, bool eof, bool wait) : gr_sync_block ("udp_source", @@ -116,7 +116,7 @@ gr_udp_source::gr_udp_source(size_t itemsize, const char *host, report_error( "gr_udp_source WSAStartup", "can't open socket" ); } #endif - + // Set up the address stucture for the source address and port numbers // Get the source IP address from the host name struct addrinfo *ip_src; // store the source IP address to use @@ -186,10 +186,10 @@ gr_udp_source::gr_udp_source(size_t itemsize, const char *host, } gr_udp_source_sptr -gr_make_udp_source (size_t itemsize, const char *ipaddr, +gr_make_udp_source (size_t itemsize, const char *ipaddr, unsigned short port, int payload_size, bool eof, bool wait) { - return gnuradio::get_initial_sptr(new gr_udp_source (itemsize, ipaddr, + return gnuradio::get_initial_sptr(new gr_udp_source (itemsize, ipaddr, port, payload_size, eof, wait)); } @@ -213,7 +213,7 @@ gr_udp_source::~gr_udp_source () #endif } -int +int gr_udp_source::work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) @@ -233,13 +233,13 @@ gr_udp_source::work (int noutput_items, bytes_received = nbytes; #if SRC_VERBOSE - printf("\tTemp buff size: %d offset: %d (bytes_received: %d) (noutput_items: %d)\n", + printf("\tTemp buff size: %d offset: %d (bytes_received: %d) (noutput_items: %d)\n", d_residual, d_temp_offset, bytes_received, noutput_items); #endif // Increment pointer out += bytes_received; - + // Update indexing of amount of bytes left in the buffer d_residual -= nbytes; d_temp_offset += nbytes; @@ -280,7 +280,7 @@ gr_udp_source::work (int noutput_items, // This is a non-blocking call with a timeout set in the constructor r = recv(d_socket, d_temp_buff, d_payload_size, 0); // get the entire payload or the what's available - // If r > 0, round it down to a multiple of d_itemsize + // If r > 0, round it down to a multiple of d_itemsize // (If sender is broken, don't propagate problem) if (r > 0) r = (r/d_itemsize) * d_itemsize; @@ -289,7 +289,7 @@ gr_udp_source::work (int noutput_items, if(r == -1) { if( is_error(EAGAIN) ) { // handle non-blocking call timeout #if SRC_VERBOSE - printf("UDP receive timed out\n"); + printf("UDP receive timed out\n"); #endif if( d_wait ) { @@ -324,12 +324,12 @@ gr_udp_source::work (int noutput_items, else { // Calculate the number of bytes we can take from the buffer in this call nbytes = std::min(r, total_bytes-bytes_received); - + // adjust the total number of bytes we have to round down to nearest integer of an itemsize - nbytes -= ((bytes_received+nbytes) % d_itemsize); + nbytes -= ((bytes_received+nbytes) % d_itemsize); // copy the number of bytes we want to look at here - memcpy(out, d_temp_buff, nbytes); + memcpy(out, d_temp_buff, nbytes); d_residual = r - nbytes; // save the number of bytes stored d_temp_offset=nbytes; // reset buffer index @@ -350,7 +350,7 @@ gr_udp_source::work (int noutput_items, } #if SRC_VERBOSE - printf("Total Bytes Received: %d (bytes_received / noutput_items = %d / %d)\n", + printf("Total Bytes Received: %d (bytes_received / noutput_items = %d / %d)\n", bytes_received, bytes_received, noutput_items); #endif diff --git a/gnuradio-core/src/lib/io/gr_udp_source.h b/gnuradio-core/src/lib/io/gr_udp_source.h index e2898981d..56dcb3c0a 100644 --- a/gnuradio-core/src/lib/io/gr_udp_source.h +++ b/gnuradio-core/src/lib/io/gr_udp_source.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2008,2009,2010 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, @@ -30,12 +30,12 @@ class gr_udp_source; typedef boost::shared_ptr<gr_udp_source> gr_udp_source_sptr; -GR_CORE_API gr_udp_source_sptr gr_make_udp_source(size_t itemsize, const char *host, +GR_CORE_API gr_udp_source_sptr gr_make_udp_source(size_t itemsize, const char *host, unsigned short port, int payload_size=1472, bool eof=true, bool wait=true); -/*! +/*! * \brief Read stream from an UDP socket. * \ingroup source_blk * @@ -56,7 +56,7 @@ GR_CORE_API gr_udp_source_sptr gr_make_udp_source(size_t itemsize, const char *h class GR_CORE_API gr_udp_source : public gr_sync_block { friend GR_CORE_API gr_udp_source_sptr gr_make_udp_source(size_t itemsize, - const char *host, + const char *host, unsigned short port, int payload_size, bool eof, bool wait); @@ -74,7 +74,7 @@ class GR_CORE_API gr_udp_source : public gr_sync_block protected: /*! * \brief UDP Source Constructor - * + * * \param itemsize The size (in bytes) of the item datatype * \param host The name or IP address of the receiving host; can be * NULL, None, or "0.0.0.0" to allow reading from any diff --git a/gnuradio-core/src/lib/io/gr_udp_source.i b/gnuradio-core/src/lib/io/gr_udp_source.i index 2001f33e9..18823a356 100644 --- a/gnuradio-core/src/lib/io/gr_udp_source.i +++ b/gnuradio-core/src/lib/io/gr_udp_source.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2010 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, @@ -22,15 +22,15 @@ GR_SWIG_BLOCK_MAGIC(gr,udp_source) -gr_udp_source_sptr -gr_make_udp_source (size_t itemsize, const char *host, +gr_udp_source_sptr +gr_make_udp_source (size_t itemsize, const char *host, unsigned short port, int payload_size=1472, bool eof=true, bool wait=true) throw (std::runtime_error); class gr_udp_source : public gr_sync_block { protected: - gr_udp_source (size_t itemsize, const char *host, + gr_udp_source (size_t itemsize, const char *host, unsigned short port, int payload_size, bool eof, bool wait) throw (std::runtime_error); public: diff --git a/gnuradio-core/src/lib/io/gr_wavfile_sink.cc b/gnuradio-core/src/lib/io/gr_wavfile_sink.cc index a96aadc72..8526032f6 100644 --- a/gnuradio-core/src/lib/io/gr_wavfile_sink.cc +++ b/gnuradio-core/src/lib/io/gr_wavfile_sink.cc @@ -80,7 +80,7 @@ gr_wavfile_sink::gr_wavfile_sink(const char *filename, } d_bytes_per_sample = bits_per_sample / 8; d_bytes_per_sample_new = d_bytes_per_sample; - + if (!open(filename)) { throw std::runtime_error ("can't open file"); } @@ -106,7 +106,7 @@ bool gr_wavfile_sink::open(const char* filename) { gruel::scoped_lock guard(d_mutex); - + // we use the open system call to get access to the O_LARGEFILE flag. int fd; if ((fd = ::open (filename, @@ -120,14 +120,14 @@ gr_wavfile_sink::open(const char* filename) fclose(d_new_fp); d_new_fp = 0; } - + if ((d_new_fp = fdopen (fd, "wb")) == NULL) { perror (filename); ::close(fd); // don't leak file descriptor if fdopen fails. return false; } d_updated = true; - + if (!gri_wavheader_write(d_new_fp, d_sample_rate, d_nchans, @@ -135,7 +135,7 @@ gr_wavfile_sink::open(const char* filename) fprintf(stderr, "[%s] could not write to WAV file\n", __FILE__); exit(-1); } - + return true; } @@ -144,19 +144,19 @@ void gr_wavfile_sink::close() { gruel::scoped_lock guard(d_mutex); - + if (!d_fp) return; - + close_wav(); } void gr_wavfile_sink::close_wav() { unsigned int byte_count = d_sample_count * d_bytes_per_sample; - + gri_wavheader_complete(d_fp, byte_count); - + fclose(d_fp); d_fp = NULL; } @@ -179,28 +179,29 @@ gr_wavfile_sink::work (int noutput_items, { float **in = (float **) &input_items[0]; int n_in_chans = input_items.size(); - + short int sample_buf_s; - + int nwritten; - + + gruel::scoped_lock guard(d_mutex); // hold mutex for duration of this block do_update(); // update: d_fp is reqd if (!d_fp) // drop output on the floor return noutput_items; - + for (nwritten = 0; nwritten < noutput_items; nwritten++) { for (int chan = 0; chan < d_nchans; chan++) { // Write zeros to channels which are in the WAV file // but don't have any inputs here if (chan < n_in_chans) { - sample_buf_s = + sample_buf_s = convert_to_short(in[chan][nwritten]); } else { sample_buf_s = 0; } - + gri_wav_write_sample(d_fp, sample_buf_s, d_bytes_per_sample); - + if (feof(d_fp) || ferror(d_fp)) { fprintf(stderr, "[%s] file i/o error\n", __FILE__); close(); @@ -209,7 +210,7 @@ gr_wavfile_sink::work (int noutput_items, d_sample_count++; } } - + return nwritten; } @@ -224,7 +225,7 @@ gr_wavfile_sink::convert_to_short(float sample) } else if (sample < d_min_sample_val) { sample = d_min_sample_val; } - + return (short int) boost::math::iround(sample); } @@ -253,8 +254,7 @@ gr_wavfile_sink::do_update() if (!d_updated) { return; } - - gruel::scoped_lock guard(d_mutex); // hold mutex for duration of this block + if (d_fp) { close_wav(); } @@ -275,6 +275,6 @@ gr_wavfile_sink::do_update() d_normalize_fac = d_max_sample_val; d_normalize_shift = 0; } - + d_updated = false; } diff --git a/gnuradio-core/src/lib/io/gr_wavfile_sink.h b/gnuradio-core/src/lib/io/gr_wavfile_sink.h index 348f789ae..162151b7a 100644 --- a/gnuradio-core/src/lib/io/gr_wavfile_sink.h +++ b/gnuradio-core/src/lib/io/gr_wavfile_sink.h @@ -1,19 +1,19 @@ /* -*- 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, @@ -78,7 +78,7 @@ private: FILE *d_new_fp; bool d_updated; boost::mutex d_mutex; - + /*! * \brief Convert a sample value within [-1;+1] to a corresponding * short integer value @@ -86,6 +86,13 @@ private: short convert_to_short(float sample); /*! + * \brief If any file changes have occurred, update now. This is called + * internally by work() and thus doesn't usually need to be called by + * hand. + */ + void do_update(); + + /*! * \brief Writes information to the WAV header which is not available * a-priori (chunk size etc.) and closes the file. Not thread-safe and * assumes d_fp is a valid file pointer, should thus only be called by @@ -108,31 +115,24 @@ public: void close(); /*! - * \brief If any file changes have occurred, update now. This is called - * internally by work() and thus doesn't usually need to be called by - * hand. - */ - void do_update(); - - /*! * \brief Set the sample rate. This will not affect the WAV file * currently opened. Any following open() calls will use this new * sample rate. */ void set_sample_rate(unsigned int sample_rate); - + /*! * \brief Set bits per sample. This will not affect the WAV file * currently opened (see set_sample_rate()). If the value is neither * 8 nor 16, the call is ignored and the current value is kept. */ void set_bits_per_sample(int bits_per_sample); - - + + int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); - + }; #endif /* INCLUDED_GR_WAVFILE_SINK_H */ diff --git a/gnuradio-core/src/lib/io/gr_wavfile_sink.i b/gnuradio-core/src/lib/io/gr_wavfile_sink.i index 7ccad1978..48d1130bd 100644 --- a/gnuradio-core/src/lib/io/gr_wavfile_sink.i +++ b/gnuradio-core/src/lib/io/gr_wavfile_sink.i @@ -36,7 +36,7 @@ protected: int n_channels, unsigned int sample_rate, int bits_per_sample) throw (std::runtime_error); - + public: ~gr_wavfile_sink (); bool open(const char* filename); diff --git a/gnuradio-core/src/lib/io/gr_wavfile_source.cc b/gnuradio-core/src/lib/io/gr_wavfile_source.cc index 136e52611..c8372868b 100644 --- a/gnuradio-core/src/lib/io/gr_wavfile_source.cc +++ b/gnuradio-core/src/lib/io/gr_wavfile_source.cc @@ -85,7 +85,7 @@ gr_wavfile_source::gr_wavfile_source (const char *filename, bool repeat) d_samples_per_chan)) { throw std::runtime_error("is not a valid wav file"); } - + if (d_samples_per_chan == 0) { throw std::runtime_error("WAV file does not contain any samples"); } @@ -134,7 +134,7 @@ gr_wavfile_source::work(int noutput_items, d_sample_idx = 0; } - + for (int chan = 0; chan < d_nchans; chan++) { sample = gri_wav_read_sample(d_fp, d_bytes_per_sample); @@ -144,7 +144,7 @@ gr_wavfile_source::work(int noutput_items, } d_sample_idx++; - + // OK, EOF is not necessarily an error. But we're not going to // deal with handling corrupt wav files, so if they give us any // trouble they won't be processed. Serves them bloody right. @@ -156,7 +156,7 @@ gr_wavfile_source::work(int noutput_items, return i; } } - + return noutput_items; } diff --git a/gnuradio-core/src/lib/io/gr_wavfile_source.h b/gnuradio-core/src/lib/io/gr_wavfile_source.h index b300f2808..02e6e3678 100644 --- a/gnuradio-core/src/lib/io/gr_wavfile_source.h +++ b/gnuradio-core/src/lib/io/gr_wavfile_source.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,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, @@ -51,7 +51,7 @@ private: FILE *d_fp; bool d_repeat; - + unsigned d_sample_rate; int d_nchans; int d_bytes_per_sample; @@ -60,7 +60,7 @@ private: unsigned d_sample_idx; int d_normalize_shift; int d_normalize_fac; - + /*! * \brief Convert an integer sample value to a float value within [-1;1] */ @@ -68,7 +68,7 @@ private: public: ~gr_wavfile_source (); - + int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); @@ -83,7 +83,7 @@ public: * file header. Only 8 or 16 bit are supported here. */ int bits_per_sample() const { return d_bytes_per_sample * 8; }; - + /*! * \brief Return the number of channels in the wav file as specified in * the wav file header. This is also the max number of outputs you can diff --git a/gnuradio-core/src/lib/io/gri_wavfile.cc b/gnuradio-core/src/lib/io/gri_wavfile.cc index 8f1c6a2bb..e316a0825 100644 --- a/gnuradio-core/src/lib/io/gri_wavfile.cc +++ b/gnuradio-core/src/lib/io/gri_wavfile.cc @@ -142,7 +142,7 @@ gri_wavheader_parse(FILE *fp, { // _o variables take return values char str_buf[8] = {0}; - + uint32_t file_size; uint32_t fmt_hdr_skip; uint16_t compression_type; @@ -152,52 +152,52 @@ gri_wavheader_parse(FILE *fp, uint16_t block_align; uint16_t bits_per_sample; uint32_t chunk_size; - + size_t fresult; fresult = fread(str_buf, 1, 4, fp); if (fresult != 4 || strncmp(str_buf, "RIFF", 4) || feof(fp)) { return false; } - + fresult = fread(&file_size, 1, 4, fp); - + fresult = fread(str_buf, 1, 8, fp); if (fresult != 8 || strncmp(str_buf, "WAVEfmt ", 8) || feof(fp)) { return false; } - + fresult = fread(&fmt_hdr_skip, 1, 4, fp); - + fresult = fread(&compression_type, 1, 2, fp); if (wav_to_host(compression_type) != VALID_COMPRESSION_TYPE) { return false; } - + fresult = fread(&nchans, 1, 2, fp); fresult = fread(&sample_rate, 1, 4, fp); fresult = fread(&avg_bytes_per_sec, 1, 4, fp); fresult = fread(&block_align, 1, 2, fp); fresult = fread(&bits_per_sample, 1, 2, fp); - + if (ferror(fp)) { return false; } - + fmt_hdr_skip = wav_to_host(fmt_hdr_skip); nchans = wav_to_host(nchans); sample_rate = wav_to_host(sample_rate); bits_per_sample = wav_to_host(bits_per_sample); - + if (bits_per_sample != 8 && bits_per_sample != 16) { return false; } - + fmt_hdr_skip -= 16; if (fmt_hdr_skip) { fseek(fp, fmt_hdr_skip, SEEK_CUR); } - + // data chunk fresult = fread(str_buf, 1, 4, fp); if (strncmp(str_buf, "data", 4)) { @@ -208,10 +208,10 @@ gri_wavheader_parse(FILE *fp, if (ferror(fp)) { return false; } - + // More byte swapping chunk_size = wav_to_host(chunk_size); - + // Output values sample_rate_o = (unsigned) sample_rate; nchans_o = (int) nchans; @@ -229,7 +229,7 @@ gri_wav_read_sample(FILE *fp, int bytes_per_sample) size_t fresult; fresult = fread(&buf, bytes_per_sample, 1, fp); - + return (short) wav_to_host(buf); } @@ -247,13 +247,13 @@ gri_wavheader_write(FILE *fp, uint16_t block_align = bytes_per_sample * nchans; uint32_t avg_bytes = sample_rate * block_align; uint16_t bits_per_sample = bytes_per_sample * 8; - + nchans_f = host_to_wav(nchans_f); sample_rate_f = host_to_wav(sample_rate_f); block_align = host_to_wav(block_align); avg_bytes = host_to_wav(avg_bytes); bits_per_sample = host_to_wav(bits_per_sample); - + wav_hdr[16] = 0x10; // no extra bytes wav_hdr[20] = 0x01; // no compression memcpy((void *) (wav_hdr + 22), (void *) &nchans_f, 2); @@ -261,12 +261,12 @@ gri_wavheader_write(FILE *fp, memcpy((void *) (wav_hdr + 28), (void *) &avg_bytes, 4); memcpy((void *) (wav_hdr + 32), (void *) &block_align, 2); memcpy((void *) (wav_hdr + 34), (void *) &bits_per_sample, 2); - + fwrite(&wav_hdr, 1, header_len, fp); if (ferror(fp)) { return false; } - + return true; } @@ -277,7 +277,7 @@ gri_wav_write_sample(FILE *fp, short int sample, int bytes_per_sample) void *data_ptr; unsigned char buf_8bit; int16_t buf_16bit; - + if (bytes_per_sample == 1) { buf_8bit = (unsigned char) sample; data_ptr = (void *) &buf_8bit; @@ -285,7 +285,7 @@ gri_wav_write_sample(FILE *fp, short int sample, int bytes_per_sample) buf_16bit = host_to_wav((int16_t) sample); data_ptr = (void *) &buf_16bit; } - + fwrite(data_ptr, 1, bytes_per_sample, fp); } @@ -295,19 +295,19 @@ gri_wavheader_complete(FILE *fp, unsigned int byte_count) { uint32_t chunk_size = (uint32_t) byte_count; chunk_size = host_to_wav(chunk_size); - + fseek(fp, 40, SEEK_SET); fwrite(&chunk_size, 1, 4, fp); - + chunk_size = (uint32_t) byte_count + 36; // fmt chunk and data header chunk_size = host_to_wav(chunk_size); fseek(fp, 4, SEEK_SET); - + fwrite(&chunk_size, 1, 4, fp); - + if (ferror(fp)) { return false; } - + return true; } diff --git a/gnuradio-core/src/lib/io/gri_wavfile.h b/gnuradio-core/src/lib/io/gri_wavfile.h index 2268474fb..c757be26b 100644 --- a/gnuradio-core/src/lib/io/gri_wavfile.h +++ b/gnuradio-core/src/lib/io/gri_wavfile.h @@ -91,7 +91,7 @@ gri_wav_write_sample(FILE *fp, short int sample, int bytes_per_sample); * * Note: The stream position is changed during this function. If anything * needs to be written to the WAV file after calling this function (which - * shouldn't happen), you need to fseek() to the end of the file (or + * shouldn't happen), you need to fseek() to the end of the file (or * whereever). * * \p fp File pointer to an open WAV file with a blank header diff --git a/gnuradio-core/src/lib/io/i2c.cc b/gnuradio-core/src/lib/io/i2c.cc index 65d426f7f..02dd47b53 100644 --- a/gnuradio-core/src/lib/io/i2c.cc +++ b/gnuradio-core/src/lib/io/i2c.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2001,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/io/i2c.h b/gnuradio-core/src/lib/io/i2c.h index 7d446dfa3..6b7f25a29 100644 --- a/gnuradio-core/src/lib/io/i2c.h +++ b/gnuradio-core/src/lib/io/i2c.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2001,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -34,10 +34,10 @@ typedef boost::shared_ptr<i2c> i2c_sptr; */ class GR_CORE_API i2c { public: - + i2c () {} virtual ~i2c (); - + //! \returns true iff successful virtual bool write (int addr, const unsigned char *buf, int nbytes) = 0; diff --git a/gnuradio-core/src/lib/io/i2c_bbio.cc b/gnuradio-core/src/lib/io/i2c_bbio.cc index 453681d8a..ddd00290d 100644 --- a/gnuradio-core/src/lib/io/i2c_bbio.cc +++ b/gnuradio-core/src/lib/io/i2c_bbio.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2001,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/io/i2c_bbio.h b/gnuradio-core/src/lib/io/i2c_bbio.h index 110a56555..6bf47b9cd 100644 --- a/gnuradio-core/src/lib/io/i2c_bbio.h +++ b/gnuradio-core/src/lib/io/i2c_bbio.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2001,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -39,7 +39,7 @@ class GR_CORE_API i2c_bbio { i2c_bbio () {} virtual ~i2c_bbio (); - + virtual void set_scl (bool state) = 0; virtual void set_sda (bool state) = 0; virtual bool get_sda () = 0; diff --git a/gnuradio-core/src/lib/io/i2c_bbio_pp.cc b/gnuradio-core/src/lib/io/i2c_bbio_pp.cc index fda225ec8..382bb6b37 100644 --- a/gnuradio-core/src/lib/io/i2c_bbio_pp.cc +++ b/gnuradio-core/src/lib/io/i2c_bbio_pp.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2001,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/io/i2c_bbio_pp.h b/gnuradio-core/src/lib/io/i2c_bbio_pp.h index 4a311a2c9..2391bc1fc 100644 --- a/gnuradio-core/src/lib/io/i2c_bbio_pp.h +++ b/gnuradio-core/src/lib/io/i2c_bbio_pp.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2001,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/io/i2c_bitbang.cc b/gnuradio-core/src/lib/io/i2c_bitbang.cc index 401c76b0d..eb801c68f 100644 --- a/gnuradio-core/src/lib/io/i2c_bitbang.cc +++ b/gnuradio-core/src/lib/io/i2c_bitbang.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2001,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -32,7 +32,7 @@ i2c_bitbang::i2c_bitbang (i2c_bbio_sptr io) d_io->unlock (); } -i2c_sptr +i2c_sptr make_i2c_bitbang (i2c_bbio_sptr io) { return i2c_sptr (new i2c_bitbang (io)); @@ -43,7 +43,7 @@ make_i2c_bitbang (i2c_bbio_sptr io) // entry: SCL = 1, SDA = 1 // exit: SCL = 0, SDA = 0 -void +void i2c_bitbang::start () { set_sda (1); @@ -53,11 +53,11 @@ i2c_bitbang::start () } -// stop: +// stop: // entry: SCL = X, SDA = X // exit: SCL = 1, SDA = 1 -void +void i2c_bitbang::stop () { set_scl (0); @@ -71,7 +71,7 @@ i2c_bitbang::stop () // entry: SCL = 0, SDA = X // exit: SCL = 0, SDA = X -void +void i2c_bitbang::write_bit (bool bit) { set_sda (bit); @@ -114,7 +114,7 @@ bool i2c_bitbang::write (int addr, const unsigned char *buf, int nbytes) { bool ok = true; - + d_io->lock (); start (); ok = write_byte ((addr << 1) | 0); // addr plus "read opcode" diff --git a/gnuradio-core/src/lib/io/i2c_bitbang.h b/gnuradio-core/src/lib/io/i2c_bitbang.h index feb23b787..1d6fe5044 100644 --- a/gnuradio-core/src/lib/io/i2c_bitbang.h +++ b/gnuradio-core/src/lib/io/i2c_bitbang.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2001,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -37,7 +37,7 @@ class GR_CORE_API i2c_bitbang : public i2c { public: ~i2c_bitbang () {} - + //! \returns true iff successful bool write (int addr, const unsigned char *buf, int nbytes); @@ -50,7 +50,7 @@ private: void stop (); void write_bit (bool bit); bool write_byte (char byte); - + void set_sda (bool bit) { d_io->set_sda (bit); } void set_scl (bool bit) { d_io->set_scl (bit); } bool get_sda () { return d_io->get_sda (); } diff --git a/gnuradio-core/src/lib/io/io.i b/gnuradio-core/src/lib/io/io.i index 365577cd4..eab1346f1 100644 --- a/gnuradio-core/src/lib/io/io.i +++ b/gnuradio-core/src/lib/io/io.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2007 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, diff --git a/gnuradio-core/src/lib/io/microtune_4702.cc b/gnuradio-core/src/lib/io/microtune_4702.cc index 59c88e26e..3ec072d51 100644 --- a/gnuradio-core/src/lib/io/microtune_4702.cc +++ b/gnuradio-core/src/lib/io/microtune_4702.cc @@ -1,7 +1,7 @@ /* -*- c++-*- */ /* * Copyright 2001,2003,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio * * GNU Radio is free software; you can redistribute it and/or modify @@ -13,7 +13,7 @@ * 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, @@ -166,7 +166,7 @@ microtune_4702::set_RF_freq (double target_freq, double *p_actual_freq) /*! * \returns true iff PLL is locked */ -bool +bool microtune_4702::pll_locked_p () { // FIXME diff --git a/gnuradio-core/src/lib/io/microtune_4702.h b/gnuradio-core/src/lib/io/microtune_4702.h index fd8d89305..ccc66db71 100644 --- a/gnuradio-core/src/lib/io/microtune_4702.h +++ b/gnuradio-core/src/lib/io/microtune_4702.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2001,2003 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, @@ -51,7 +51,7 @@ public: * \returns true iff PLL is locked */ bool pll_locked_p (); - + /*! * \returns the output frequency of the tuner in Hz. */ diff --git a/gnuradio-core/src/lib/io/microtune_4702_eval_board.h b/gnuradio-core/src/lib/io/microtune_4702_eval_board.h index e3c07fdf9..d866a4b94 100644 --- a/gnuradio-core/src/lib/io/microtune_4702_eval_board.h +++ b/gnuradio-core/src/lib/io/microtune_4702_eval_board.h @@ -1,19 +1,19 @@ /* -*- C++ -*- */ /* * Copyright 2001,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/io/microtune_4702_eval_board.i b/gnuradio-core/src/lib/io/microtune_4702_eval_board.i index 832a722fa..fc085a975 100644 --- a/gnuradio-core/src/lib/io/microtune_4702_eval_board.i +++ b/gnuradio-core/src/lib/io/microtune_4702_eval_board.i @@ -1,19 +1,19 @@ /* -*- C++ -*- */ /* * Copyright 2001,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/io/microtune_4937.cc b/gnuradio-core/src/lib/io/microtune_4937.cc index 1369df514..72ddd4bb6 100644 --- a/gnuradio-core/src/lib/io/microtune_4937.cc +++ b/gnuradio-core/src/lib/io/microtune_4937.cc @@ -1,19 +1,19 @@ /* -*- c++-*- */ /* * Copyright 2001,2003 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, @@ -99,7 +99,7 @@ microtune_4937::set_RF_freq (double target_freq, double *p_actual_freq) unsigned char buf[4]; double target_f_osc = target_freq + first_IF; - + double f_ref = 4e6 / d_reference_divider; // f_osc = f_ref * 8 * divisor @@ -129,7 +129,7 @@ microtune_4937::set_RF_freq (double target_freq, double *p_actual_freq) /*! * \returns true iff PLL is locked */ -bool +bool microtune_4937::pll_locked_p () { // FIXME diff --git a/gnuradio-core/src/lib/io/microtune_4937.h b/gnuradio-core/src/lib/io/microtune_4937.h index bc8a26c64..be8657c95 100644 --- a/gnuradio-core/src/lib/io/microtune_4937.h +++ b/gnuradio-core/src/lib/io/microtune_4937.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2001,2003 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, @@ -44,12 +44,12 @@ public: * \returns true iff sucessful. */ bool set_RF_freq (double freq, double *actual_freq); - + /*! * \returns true iff PLL is locked */ bool pll_locked_p (); - + /*! * \returns the output frequency (IF center freq) of the tuner in Hz. */ diff --git a/gnuradio-core/src/lib/io/microtune_4937_eval_board.cc b/gnuradio-core/src/lib/io/microtune_4937_eval_board.cc index f7a586075..a25b8addf 100644 --- a/gnuradio-core/src/lib/io/microtune_4937_eval_board.cc +++ b/gnuradio-core/src/lib/io/microtune_4937_eval_board.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2001,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/io/microtune_4937_eval_board.h b/gnuradio-core/src/lib/io/microtune_4937_eval_board.h index 09c00d116..3abd9084e 100644 --- a/gnuradio-core/src/lib/io/microtune_4937_eval_board.h +++ b/gnuradio-core/src/lib/io/microtune_4937_eval_board.h @@ -1,19 +1,19 @@ /* -*- C++ -*- */ /* * Copyright 2001,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/io/microtune_4937_eval_board.i b/gnuradio-core/src/lib/io/microtune_4937_eval_board.i index 1fe92c0f0..e261416f7 100644 --- a/gnuradio-core/src/lib/io/microtune_4937_eval_board.i +++ b/gnuradio-core/src/lib/io/microtune_4937_eval_board.i @@ -1,19 +1,19 @@ /* -*- C++ -*- */ /* * Copyright 2001,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/io/microtune_eval_board.i b/gnuradio-core/src/lib/io/microtune_eval_board.i index 3ad7eb61b..f77ef47b4 100644 --- a/gnuradio-core/src/lib/io/microtune_eval_board.i +++ b/gnuradio-core/src/lib/io/microtune_eval_board.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003 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, @@ -35,12 +35,12 @@ public: // returns actual freq or 0 if error (easier interface for SWIG) double set_RF_freq (double freq); - + /*! * \returns true iff PLL is locked */ bool pll_locked_p (); - + /*! * \returns the output frequency (IF center freq) of the tuner in Hz. */ diff --git a/gnuradio-core/src/lib/io/microtune_eval_board_defs.h b/gnuradio-core/src/lib/io/microtune_eval_board_defs.h index 5cba50bdf..61c52364f 100644 --- a/gnuradio-core/src/lib/io/microtune_eval_board_defs.h +++ b/gnuradio-core/src/lib/io/microtune_eval_board_defs.h @@ -9,19 +9,19 @@ /* * Copyright 2001 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, diff --git a/gnuradio-core/src/lib/io/microtune_xxxx.cc b/gnuradio-core/src/lib/io/microtune_xxxx.cc index f9ce44b2b..3d55f534a 100644 --- a/gnuradio-core/src/lib/io/microtune_xxxx.cc +++ b/gnuradio-core/src/lib/io/microtune_xxxx.cc @@ -1,19 +1,19 @@ /* -*- c++-*- */ /* * Copyright 2001,2003,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -38,4 +38,4 @@ microtune_xxxx::set_RF_freq (double target_freq) return 0.0; } - + diff --git a/gnuradio-core/src/lib/io/microtune_xxxx.h b/gnuradio-core/src/lib/io/microtune_xxxx.h index 8b6ec25aa..b2646d39f 100644 --- a/gnuradio-core/src/lib/io/microtune_xxxx.h +++ b/gnuradio-core/src/lib/io/microtune_xxxx.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2001,2003,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -47,7 +47,7 @@ public: * \returns true iff sucessful. */ virtual bool set_RF_freq (double freq, double *actual_freq) = 0; - + // returns actual freq or 0 if error (easier interface for SWIG) double set_RF_freq (double freq); @@ -55,7 +55,7 @@ public: * \returns true iff PLL is locked */ virtual bool pll_locked_p () = 0; - + /*! * \returns the output frequency (IF center freq) of the tuner in Hz. */ diff --git a/gnuradio-core/src/lib/io/microtune_xxxx_eval_board.cc b/gnuradio-core/src/lib/io/microtune_xxxx_eval_board.cc index 14f2b8589..35600ff06 100644 --- a/gnuradio-core/src/lib/io/microtune_xxxx_eval_board.cc +++ b/gnuradio-core/src/lib/io/microtune_xxxx_eval_board.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2001,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -49,7 +49,7 @@ microtune_xxxx_eval_board::~microtune_xxxx_eval_board () //! is the eval board present? -bool +bool microtune_xxxx_eval_board::board_present_p () { bool result = true; @@ -73,7 +73,7 @@ microtune_xxxx_eval_board::board_present_p () * We're using a MAX518 8-bit 5V dual dac for setting the AGC's * ---------------------------------------------------------------- */ -void +void microtune_xxxx_eval_board::write_dac (int which, int value) { unsigned char cmd[2]; @@ -82,7 +82,7 @@ microtune_xxxx_eval_board::write_dac (int which, int value) d_i2c->write (AGC_DAC_I2C_ADDR, cmd, sizeof (cmd)); } -void +void microtune_xxxx_eval_board::write_both_dacs (int value0, int value1) { unsigned char cmd[4]; @@ -111,7 +111,7 @@ microtune_xxxx_eval_board::set_RF_AGC_voltage (float volts) write_dac (0, scale_volts (volts)); } -void +void microtune_xxxx_eval_board::set_IF_AGC_voltage (float volts) { write_dac (1, scale_volts (volts)); @@ -124,7 +124,7 @@ microtune_xxxx_eval_board::set_RF_freq (double freq, double *actual_freq) { return d_tuner->set_RF_freq (freq, actual_freq); } - + double microtune_xxxx_eval_board::set_RF_freq (double freq) { diff --git a/gnuradio-core/src/lib/io/microtune_xxxx_eval_board.h b/gnuradio-core/src/lib/io/microtune_xxxx_eval_board.h index 08aa438c0..7fd784ade 100644 --- a/gnuradio-core/src/lib/io/microtune_xxxx_eval_board.h +++ b/gnuradio-core/src/lib/io/microtune_xxxx_eval_board.h @@ -1,19 +1,19 @@ /* -*- C++ -*- */ /* * Copyright 2001,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -70,7 +70,7 @@ public: * \returns true iff sucessful. */ bool set_RF_freq (double freq, double *actual_freq); - + // returns actual freq or 0 if error (easier interface for SWIG) double set_RF_freq (double freq); @@ -78,7 +78,7 @@ public: * \returns true iff PLL is locked */ bool pll_locked_p (); - + /*! * \returns the output frequency (IF center freq) of the tuner in Hz. */ @@ -88,7 +88,7 @@ public: private: void write_dac (int which, int value); void write_both_dacs (int val0, int val1); - + protected: ppio_sptr d_ppio; i2c_sptr d_i2c; diff --git a/gnuradio-core/src/lib/io/microtune_xxxx_eval_board.i b/gnuradio-core/src/lib/io/microtune_xxxx_eval_board.i index d6000ea08..8a8a59742 100644 --- a/gnuradio-core/src/lib/io/microtune_xxxx_eval_board.i +++ b/gnuradio-core/src/lib/io/microtune_xxxx_eval_board.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -50,7 +50,7 @@ public: * \returns true iff PLL is locked */ bool pll_locked_p (); - + /*! * \returns the output frequency (IF center freq) of the tuner in Hz. */ diff --git a/gnuradio-core/src/lib/io/ppio.cc b/gnuradio-core/src/lib/io/ppio.cc index 9f0ed62de..a5edc539c 100644 --- a/gnuradio-core/src/lib/io/ppio.cc +++ b/gnuradio-core/src/lib/io/ppio.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003 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, diff --git a/gnuradio-core/src/lib/io/ppio.h b/gnuradio-core/src/lib/io/ppio.h index f7d14d52e..d99f7bf79 100644 --- a/gnuradio-core/src/lib/io/ppio.h +++ b/gnuradio-core/src/lib/io/ppio.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2001,2003 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, @@ -51,7 +51,7 @@ class GR_CORE_API ppio { }; /*! - * \brief Factory method. + * \brief Factory method. * * Split out from class to make life easier for SWIG */ diff --git a/gnuradio-core/src/lib/io/ppio.i b/gnuradio-core/src/lib/io/ppio.i index 8d9571e28..6b95dcf88 100644 --- a/gnuradio-core/src/lib/io/ppio.i +++ b/gnuradio-core/src/lib/io/ppio.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/io/ppio_ppdev.cc b/gnuradio-core/src/lib/io/ppio_ppdev.cc index 074de1aa1..f52845958 100644 --- a/gnuradio-core/src/lib/io/ppio_ppdev.cc +++ b/gnuradio-core/src/lib/io/ppio_ppdev.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2001,2003,2004,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, @@ -94,7 +94,7 @@ ppio_ppdev::~ppio_ppdev () } -void +void ppio_ppdev::write_data (unsigned char v) { if (ioctl (d_fd, PPWDATA, &v) != 0){ @@ -115,7 +115,7 @@ ppio_ppdev::read_data () return v; } -void +void ppio_ppdev::write_control (unsigned char v) { unsigned char ctrl = v ^ CP_ACTIVE_LOW_BITS; @@ -198,7 +198,7 @@ ppio_ppdev::~ppio_ppdev () } -void +void ppio_ppdev::write_data (unsigned char v) { if (ioctl (d_fd, PPISDATA, &v) != 0){ @@ -219,7 +219,7 @@ ppio_ppdev::read_data () return v; } -void +void ppio_ppdev::write_control (unsigned char v) { unsigned char ctrl = v ^ CP_ACTIVE_LOW_BITS; @@ -274,7 +274,7 @@ ppio_ppdev::~ppio_ppdev () { } -void +void ppio_ppdev::write_data (unsigned char v) { } @@ -285,7 +285,7 @@ ppio_ppdev::read_data () return 0; } -void +void ppio_ppdev::write_control (unsigned char v) { } diff --git a/gnuradio-core/src/lib/io/ppio_ppdev.h b/gnuradio-core/src/lib/io/ppio_ppdev.h index 5d082d784..1f86d7e04 100644 --- a/gnuradio-core/src/lib/io/ppio_ppdev.h +++ b/gnuradio-core/src/lib/io/ppio_ppdev.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2001,2003 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, diff --git a/gnuradio-core/src/lib/io/sdr_1000.cc b/gnuradio-core/src/lib/io/sdr_1000.cc index df26237ef..a8c2555e0 100644 --- a/gnuradio-core/src/lib/io/sdr_1000.cc +++ b/gnuradio-core/src/lib/io/sdr_1000.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003 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, @@ -49,13 +49,13 @@ sdr_1000_base::reset () write_latch (L_DDS1, 0x00, 0xff); } - + void sdr_1000_base::write_latch (int which, int value, int mask) { if (!(0 <= which && which <= 3)) return; - + d_ppio->lock (); d_shadow[which] = (d_shadow[which] & ~mask) | (value & mask); d_ppio->write_data (d_shadow[which]); diff --git a/gnuradio-core/src/lib/io/sdr_1000.h b/gnuradio-core/src/lib/io/sdr_1000.h index 6647fbba5..c00608a3a 100644 --- a/gnuradio-core/src/lib/io/sdr_1000.h +++ b/gnuradio-core/src/lib/io/sdr_1000.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -40,12 +40,12 @@ enum { L_EXT = 0, L_BAND = 1, L_DDS0 = 2, L_DDS1 = 3 }; class GR_CORE_API sdr_1000_base { ppio_sptr d_ppio; int d_shadow[4]; // shadow latches - + public: sdr_1000_base (int which_pp); ~sdr_1000_base (); - + void reset (); void write_latch (int which, int value, int mask); }; diff --git a/gnuradio-core/src/lib/io/sdr_1000.i b/gnuradio-core/src/lib/io/sdr_1000.i index fbdef85e5..c9b1ef560 100644 --- a/gnuradio-core/src/lib/io/sdr_1000.i +++ b/gnuradio-core/src/lib/io/sdr_1000.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/missing/.gitignore b/gnuradio-core/src/lib/missing/.gitignore deleted file mode 100644 index a02b6ff73..000000000 --- a/gnuradio-core/src/lib/missing/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo diff --git a/gnuradio-core/src/lib/missing/CMakeLists.txt b/gnuradio-core/src/lib/missing/CMakeLists.txt index 0a376645f..85267ee48 100644 --- a/gnuradio-core/src/lib/missing/CMakeLists.txt +++ b/gnuradio-core/src/lib/missing/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2010 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, diff --git a/gnuradio-core/src/lib/missing/Makefile.am b/gnuradio-core/src/lib/missing/Makefile.am deleted file mode 100644 index 1cc6014a1..000000000 --- a/gnuradio-core/src/lib/missing/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright 2003,2004,2008,2009,2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -AM_CPPFLAGS = $(GRUEL_INCLUDES) $(GNURADIO_INCLUDES) $(WITH_INCLUDES) - -EXTRA_DIST += \ - getopt.h \ - getopt.c \ - gettimeofday.c \ - posix_memalign.cc \ - posix_memalign.h \ - usleep.c - -noinst_LTLIBRARIES = libmissing.la - -libmissing_la_common_SOURCES = \ - bug_work_around_8.cc - -powerpc_CODE = \ - posix_memalign.cc - -if MD_CPU_powerpc -libmissing_la_SOURCES = $(libmissing_la_common_SOURCES) $(powerpc_CODE) -else -libmissing_la_SOURCES = $(libmissing_la_common_SOURCES) -endif diff --git a/gnuradio-core/src/lib/missing/getopt.c b/gnuradio-core/src/lib/missing/getopt.c index 75be3307c..69c7c16f7 100644 --- a/gnuradio-core/src/lib/missing/getopt.c +++ b/gnuradio-core/src/lib/missing/getopt.c @@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - + /* NOTE!!! AIX requires this to be the first thing in the file. Do not put ANYTHING before it! */ #if !defined (__GNUC__) && defined (_AIX) @@ -172,7 +172,7 @@ static enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; - + #ifdef __GNU_LIBRARY__ /* We want to avoid inclusion of string.h with non-GNU libraries because there are many ways it can cause trouble. @@ -213,7 +213,7 @@ my_bcopy (from, to, size) to[i] = from[i]; } #endif /* GNU C library. */ - + /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have @@ -253,7 +253,7 @@ exchange (argv) first_nonopt += (optind - last_nonopt); last_nonopt = optind; } - + /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. @@ -659,7 +659,7 @@ getopt (argc, argv, optstring) #endif #endif /* _LIBC or not __GNU_LIBRARY__. */ - + #ifdef TEST /* Compile with -DTEST to make an executable for use in testing diff --git a/gnuradio-core/src/lib/missing/gettimeofday.c b/gnuradio-core/src/lib/missing/gettimeofday.c index 098793ac9..a53e47ed9 100644 --- a/gnuradio-core/src/lib/missing/gettimeofday.c +++ b/gnuradio-core/src/lib/missing/gettimeofday.c @@ -1,18 +1,18 @@ /* * Copyright 2003 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, @@ -32,15 +32,15 @@ #include <sys/time.h> #endif -/* - * broken implementation for WIN32. +/* + * broken implementation for WIN32. * FIXME: usec precision */ int gettimeofday(struct timeval *tv, struct timezone *tz) { if (tv) { time_t tm; - + time(&tm); tv->tv_sec = tm; tv->tv_usec = 0; diff --git a/gnuradio-core/src/lib/missing/posix_memalign.cc b/gnuradio-core/src/lib/missing/posix_memalign.cc index a2e98b018..aaeff7804 100644 --- a/gnuradio-core/src/lib/missing/posix_memalign.cc +++ b/gnuradio-core/src/lib/missing/posix_memalign.cc @@ -1,19 +1,19 @@ /* -*- 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, diff --git a/gnuradio-core/src/lib/missing/posix_memalign.h b/gnuradio-core/src/lib/missing/posix_memalign.h index 1be4bfc5b..ea79ced2e 100644 --- a/gnuradio-core/src/lib/missing/posix_memalign.h +++ b/gnuradio-core/src/lib/missing/posix_memalign.h @@ -1,19 +1,19 @@ /* -*- 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, diff --git a/gnuradio-core/src/lib/reed-solomon/.gitignore b/gnuradio-core/src/lib/reed-solomon/.gitignore deleted file mode 100644 index f137f5c67..000000000 --- a/gnuradio-core/src/lib/reed-solomon/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo -/rstest diff --git a/gnuradio-core/src/lib/reed-solomon/Makefile.am b/gnuradio-core/src/lib/reed-solomon/Makefile.am deleted file mode 100644 index 5548f4280..000000000 --- a/gnuradio-core/src/lib/reed-solomon/Makefile.am +++ /dev/null @@ -1,55 +0,0 @@ -# -# Copyright 2002,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. -# - -include $(top_srcdir)/Makefile.common - -# Note, this Makefile.am only builds the char versions of the reed soloman routines. -# If you need the int versions too, please figure out how to add them *cleanly* to -# this Makefile.am. - -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES) $(WITH_INCLUDES) - -TESTS = rstest - -EXTRA_DIST += \ - README.karn - -noinst_LTLIBRARIES = librs.la - -noinst_PROGRAMS = \ - rstest - -librs_la_SOURCES = \ - encode_rs.c \ - decode_rs.c \ - init_rs.c - -grinclude_HEADERS = \ - rs.h - -noinst_HEADERS = \ - ccsds.h \ - char.h \ - int.h \ - fixed.h - -rstest_SOURCES = rstest.c exercise.c -rstest_LDADD = librs.la diff --git a/gnuradio-core/src/lib/reed-solomon/char.h b/gnuradio-core/src/lib/reed-solomon/char.h index 762e9e295..7b2030a0b 100644 --- a/gnuradio-core/src/lib/reed-solomon/char.h +++ b/gnuradio-core/src/lib/reed-solomon/char.h @@ -32,7 +32,7 @@ static inline unsigned int modnn(struct rs *rs, unsigned int x){ #define MM (rs->mm) #define NN (rs->nn) -#define ALPHA_TO (rs->alpha_to) +#define ALPHA_TO (rs->alpha_to) #define INDEX_OF (rs->index_of) #define GENPOLY (rs->genpoly) #define NROOTS (rs->nroots) diff --git a/gnuradio-core/src/lib/reed-solomon/decode_rs.c b/gnuradio-core/src/lib/reed-solomon/decode_rs.c index 4b7d27cec..f9438cf26 100644 --- a/gnuradio-core/src/lib/reed-solomon/decode_rs.c +++ b/gnuradio-core/src/lib/reed-solomon/decode_rs.c @@ -92,7 +92,7 @@ DTYPE *data, int *eras_pos, int no_eras){ #if DEBUG >= 1 /* Test code that verifies the erasure locator polynomial just constructed Needed only for decoder debugging. */ - + /* find roots of the erasure location polynomial */ for(i=1;i<=no_eras;i++) reg[i] = INDEX_OF[lambda[i]]; @@ -127,7 +127,7 @@ DTYPE *data, int *eras_pos, int no_eras){ } for(i=0;(unsigned int)i<NROOTS+1;i++) b[i] = INDEX_OF[lambda[i]]; - + /* * Begin Berlekamp-Massey algorithm to determine error+erasure * locator polynomial @@ -230,7 +230,7 @@ DTYPE *data, int *eras_pos, int no_eras){ omega[i] = INDEX_OF[tmp]; } omega[NROOTS] = A0; - + /* * Compute error values in poly-form. num1 = omega(inv(X(l))), num2 = * inv(X(l))**(FCR-1) and den = lambda_pr(inv(X(l))) all in poly-form @@ -243,7 +243,7 @@ DTYPE *data, int *eras_pos, int no_eras){ } num2 = ALPHA_TO[MODNN(root[j] * (FCR - 1) + NN)]; den = 0; - + /* lambda[i+1] for i even is the formal derivative lambda_pr of lambda[i] */ for (i = (int)min((unsigned int)deg_lambda,NROOTS-1) & ~1; i >= 0; i -=2) { if(lambda[i+1] != A0) diff --git a/gnuradio-core/src/lib/reed-solomon/exercise.c b/gnuradio-core/src/lib/reed-solomon/exercise.c index be3d3bd13..de33a6bff 100644 --- a/gnuradio-core/src/lib/reed-solomon/exercise.c +++ b/gnuradio-core/src/lib/reed-solomon/exercise.c @@ -71,7 +71,7 @@ int trials){ /* Load block with random data and encode */ for(i=0;i<NN-NROOTS;i++) block[i] = random() & NN; - + #if defined(CCSDS) || defined(FIXED) ENCODE_RS(&block[0],&block[NN-NROOTS]); #else diff --git a/gnuradio-core/src/lib/reed-solomon/int.h b/gnuradio-core/src/lib/reed-solomon/int.h index 79979f827..403d68757 100644 --- a/gnuradio-core/src/lib/reed-solomon/int.h +++ b/gnuradio-core/src/lib/reed-solomon/int.h @@ -31,7 +31,7 @@ static inline int modnn(struct rs *rs,int x){ #define MM (rs->mm) #define NN (rs->nn) -#define ALPHA_TO (rs->alpha_to) +#define ALPHA_TO (rs->alpha_to) #define INDEX_OF (rs->index_of) #define GENPOLY (rs->genpoly) #define NROOTS (rs->nroots) diff --git a/gnuradio-core/src/lib/runtime/.gitignore b/gnuradio-core/src/lib/runtime/.gitignore deleted file mode 100644 index a02b6ff73..000000000 --- a/gnuradio-core/src/lib/runtime/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo diff --git a/gnuradio-core/src/lib/runtime/CMakeLists.txt b/gnuradio-core/src/lib/runtime/CMakeLists.txt index 105fc0e06..1415ff4c6 100644 --- a/gnuradio-core/src/lib/runtime/CMakeLists.txt +++ b/gnuradio-core/src/lib/runtime/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2010-2010 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, diff --git a/gnuradio-core/src/lib/runtime/Makefile.am b/gnuradio-core/src/lib/runtime/Makefile.am deleted file mode 100644 index 38da3d5fd..000000000 --- a/gnuradio-core/src/lib/runtime/Makefile.am +++ /dev/null @@ -1,165 +0,0 @@ -# -# Copyright 2003,2004,2007,2008,2009,2010,2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -AM_CPPFLAGS = $(GRUEL_INCLUDES) $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES) $(WITH_INCLUDES) - -noinst_LTLIBRARIES = libruntime.la libruntime-qa.la - -libruntime_la_LIBADD = \ - $(SHM_OPEN_LIBS) - - -libruntime_la_SOURCES = \ - gr_basic_block.cc \ - gr_flowgraph.cc \ - gr_flat_flowgraph.cc \ - gr_block.cc \ - gr_block_detail.cc \ - gr_block_executor.cc \ - gr_hier_block2.cc \ - gr_hier_block2_detail.cc \ - gr_buffer.cc \ - gr_dispatcher.cc \ - gr_error_handler.cc \ - gr_io_signature.cc \ - gr_local_sighandler.cc \ - gr_message.cc \ - gr_msg_accepter.cc \ - gr_msg_handler.cc \ - gr_msg_queue.cc \ - gr_pagesize.cc \ - gr_preferences.cc \ - gr_realtime.cc \ - gr_scheduler.cc \ - gr_scheduler_sts.cc \ - gr_scheduler_tpb.cc \ - gr_single_threaded_scheduler.cc \ - gr_sptr_magic.cc \ - gr_sync_block.cc \ - gr_sync_decimator.cc \ - gr_sync_interpolator.cc \ - gr_sys_paths.cc \ - gr_top_block.cc \ - gr_top_block_impl.cc \ - gr_tpb_detail.cc \ - gr_tpb_thread_body.cc \ - gr_vmcircbuf.cc \ - gr_vmcircbuf_mmap_shm_open.cc \ - gr_vmcircbuf_mmap_tmpfile.cc \ - gr_vmcircbuf_createfilemapping.cc \ - gr_vmcircbuf_sysv_shm.cc \ - gr_select_handler.cc - -libruntime_qa_la_SOURCES = \ - qa_gr_block.cc \ - qa_gr_hier_block2.cc \ - qa_gr_hier_block2_derived.cc \ - qa_gr_buffer.cc \ - qa_gr_flowgraph.cc \ - qa_gr_top_block.cc \ - qa_gr_io_signature.cc \ - qa_gr_vmcircbuf.cc \ - qa_block_tags.cc \ - qa_set_msg_handler.cc \ - qa_runtime.cc - -grinclude_HEADERS = \ - gr_basic_block.h \ - gr_flowgraph.h \ - gr_flat_flowgraph.h \ - gr_block.h \ - gr_block_detail.h \ - gr_block_executor.h \ - gr_hier_block2.h \ - gr_hier_block2_detail.h \ - gr_buffer.h \ - gr_complex.h \ - gr_dispatcher.h \ - gr_error_handler.h \ - gr_io_signature.h \ - gr_local_sighandler.h \ - gr_message.h \ - gr_msg_accepter.h \ - gr_msg_handler.h \ - gr_msg_queue.h \ - gr_pagesize.h \ - gr_preferences.h \ - gr_realtime.h \ - gr_runtime_types.h \ - gr_scheduler.h \ - gr_scheduler_sts.h \ - gr_scheduler_tpb.h \ - gr_select_handler.h \ - gr_single_threaded_scheduler.h \ - gr_sptr_magic.h \ - gr_sync_block.h \ - gr_sync_decimator.h \ - gr_sync_interpolator.h \ - gr_top_block.h \ - gr_top_block_impl.h \ - gr_tpb_detail.h \ - gr_tpb_thread_body.h \ - gr_timer.h \ - gr_sys_paths.h \ - gr_types.h \ - gr_unittests.h \ - gr_vmcircbuf.h \ - gr_tags.h - -noinst_HEADERS = \ - gr_vmcircbuf_mmap_shm_open.h \ - gr_vmcircbuf_mmap_tmpfile.h \ - gr_vmcircbuf_sysv_shm.h \ - gr_vmcircbuf_createfilemapping.h \ - qa_gr_block.h \ - qa_gr_flowgraph.h \ - qa_gr_hier_block2.h \ - qa_gr_hier_block2_derived.h \ - qa_gr_buffer.h \ - qa_gr_io_signature.h \ - qa_gr_top_block.h \ - qa_gr_vmcircbuf.h \ - qa_block_tags.h \ - qa_set_msg_handler.h \ - qa_runtime.h - -swiginclude_HEADERS = \ - gr_basic_block.i \ - gr_block.i \ - gr_block_detail.i \ - gr_hier_block2.i \ - gr_buffer.i \ - gr_dispatcher.i \ - gr_error_handler.i \ - gr_io_signature.i \ - gr_message.i \ - gr_msg_handler.i \ - gr_msg_queue.i \ - gr_realtime.i \ - gr_single_threaded_scheduler.i \ - gr_sync_block.i \ - gr_sync_decimator.i \ - gr_sync_interpolator.i \ - gr_tags.i \ - gr_top_block.i \ - runtime.i diff --git a/gnuradio-core/src/lib/runtime/gr_basic_block.cc b/gnuradio-core/src/lib/runtime/gr_basic_block.cc index 0e0dad16b..d7263b92d 100644 --- a/gnuradio-core/src/lib/runtime/gr_basic_block.cc +++ b/gnuradio-core/src/lib/runtime/gr_basic_block.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -32,7 +32,7 @@ using namespace pmt; static long s_next_id = 0; static long s_ncurrently_allocated = 0; -long +long gr_basic_block_ncurrently_allocated() { return s_ncurrently_allocated; @@ -40,7 +40,7 @@ gr_basic_block_ncurrently_allocated() gr_basic_block::gr_basic_block(const std::string &name, gr_io_signature_sptr input_signature, - gr_io_signature_sptr output_signature) + gr_io_signature_sptr output_signature) : d_name(name), d_input_signature(input_signature), d_output_signature(output_signature), @@ -49,13 +49,13 @@ gr_basic_block::gr_basic_block(const std::string &name, { s_ncurrently_allocated++; } - + gr_basic_block::~gr_basic_block() { s_ncurrently_allocated--; } -gr_basic_block_sptr +gr_basic_block_sptr gr_basic_block::to_basic_block() { return shared_from_this(); diff --git a/gnuradio-core/src/lib/runtime/gr_basic_block.h b/gnuradio-core/src/lib/runtime/gr_basic_block.h index 2adca8ccb..4d03b878e 100644 --- a/gnuradio-core/src/lib/runtime/gr_basic_block.h +++ b/gnuradio-core/src/lib/runtime/gr_basic_block.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2008,2009,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -85,7 +85,7 @@ protected: void set_input_signature(gr_io_signature_sptr iosig) { d_input_signature = iosig; } - + //! may only be called during constructor void set_output_signature(gr_io_signature_sptr iosig) { d_output_signature = iosig; @@ -103,7 +103,7 @@ public: std::string name() const { return d_name; } gr_io_signature_sptr input_signature() const { return d_input_signature; } gr_io_signature_sptr output_signature() const { return d_output_signature; } - gr_basic_block_sptr to_basic_block(); // Needed for Python/Guile type coercion + gr_basic_block_sptr to_basic_block(); // Needed for Python type coercion /*! * \brief Confirm that ninputs and noutputs is an acceptable combination. diff --git a/gnuradio-core/src/lib/runtime/gr_basic_block.i b/gnuradio-core/src/lib/runtime/gr_basic_block.i index 03d4725d5..e43cc114c 100644 --- a/gnuradio-core/src/lib/runtime/gr_basic_block.i +++ b/gnuradio-core/src/lib/runtime/gr_basic_block.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, diff --git a/gnuradio-core/src/lib/runtime/gr_block.cc b/gnuradio-core/src/lib/runtime/gr_block.cc index 78f77486b..9a5255a93 100644 --- a/gnuradio-core/src/lib/runtime/gr_block.cc +++ b/gnuradio-core/src/lib/runtime/gr_block.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2009,2010 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, @@ -43,7 +43,7 @@ gr_block::gr_block (const std::string &name, d_tag_propagation_policy(TPP_ALL_TO_ALL) { } - + gr_block::~gr_block () { } @@ -102,7 +102,7 @@ gr_block::set_unaligned (int na) d_unaligned = na; } -void +void gr_block::set_is_unaligned (bool u) { d_is_unaligned = u; @@ -113,7 +113,7 @@ gr_block::set_relative_rate (double relative_rate) { if (relative_rate < 0.0) throw std::invalid_argument ("gr_block::set_relative_rate"); - + d_relative_rate = relative_rate; } @@ -149,7 +149,7 @@ gr_block::fixed_rate_noutput_to_ninput(int noutput) } uint64_t -gr_block::nitems_read(unsigned int which_input) +gr_block::nitems_read(unsigned int which_input) { if(d_detail) { return d_detail->nitems_read(which_input); @@ -161,7 +161,7 @@ gr_block::nitems_read(unsigned int which_input) } uint64_t -gr_block::nitems_written(unsigned int which_output) +gr_block::nitems_written(unsigned int which_output) { if(d_detail) { return d_detail->nitems_written(which_output); @@ -186,7 +186,7 @@ gr_block::get_tags_in_range(std::vector<gr_tag_t> &v, { d_detail->get_tags_in_range(v, which_output, start, end); } - + void gr_block::get_tags_in_range(std::vector<gr_tag_t> &v, unsigned int which_output, diff --git a/gnuradio-core/src/lib/runtime/gr_block.h b/gnuradio-core/src/lib/runtime/gr_block.h index 9171942e0..71ac8eee6 100644 --- a/gnuradio-core/src/lib/runtime/gr_block.h +++ b/gnuradio-core/src/lib/runtime/gr_block.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2007,2009,2010 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, @@ -31,11 +31,11 @@ * \brief The abstract base class for all 'terminal' processing blocks. * \ingroup base_blk * - * A signal processing flow is constructed by creating a tree of + * A signal processing flow is constructed by creating a tree of * hierarchical blocks, which at any level may also contain terminal nodes * that actually implement signal processing functions. This is the base * class for all such leaf nodes. - + * Blocks have a set of input streams and output streams. The * input_signature and output_signature define the number of input * streams and output streams respectively, and the type of the data @@ -58,7 +58,7 @@ class GR_CORE_API gr_block : public gr_basic_block { public: - + //! Magic return values from general_work enum { WORK_CALLED_PRODUCE = -2, @@ -82,7 +82,7 @@ class GR_CORE_API gr_block : public gr_basic_block { */ unsigned history () const { return d_history; } void set_history (unsigned history) { d_history = history; } - + /*! * \brief Return true if this block has a fixed input to output rate. * @@ -177,7 +177,7 @@ class GR_CORE_API gr_block : public gr_basic_block { int unaligned () const { return d_unaligned; } void set_is_unaligned (bool u); bool is_unaligned () const { return d_is_unaligned; } - + /*! * \brief Tell the scheduler \p how_many_items of input stream \p which_input were consumed. */ @@ -264,7 +264,7 @@ class GR_CORE_API gr_block : public gr_basic_block { unsigned d_history; bool d_fixed_rate; tag_propagation_policy_t d_tag_propagation_policy; // policy for moving tags downstream - + protected: gr_block (void){} //allows pure virtual interface sub-classes gr_block (const std::string &name, @@ -273,10 +273,10 @@ class GR_CORE_API gr_block : public gr_basic_block { void set_fixed_rate(bool fixed_rate){ d_fixed_rate = fixed_rate; } - + /*! * \brief Adds a new tag onto the given output buffer. - * + * * \param which_output an integer of which output stream to attach the tag * \param abs_offset a uint64 number of the absolute item number * assicated with the tag. Can get from nitems_written. @@ -323,7 +323,7 @@ class GR_CORE_API gr_block : public gr_basic_block { unsigned int which_input, uint64_t abs_start, uint64_t abs_end); - + /*! * \brief Given a [start,end), returns a vector of all tags in the range * with a given key. diff --git a/gnuradio-core/src/lib/runtime/gr_block.i b/gnuradio-core/src/lib/runtime/gr_block.i index bb0c5f221..4cc260bfe 100644 --- a/gnuradio-core/src/lib/runtime/gr_block.i +++ b/gnuradio-core/src/lib/runtime/gr_block.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -38,9 +38,9 @@ class gr_block : public gr_basic_block { gr_io_signature_sptr output_signature); public: - + virtual ~gr_block (); - + unsigned history () const; int output_multiple () const; diff --git a/gnuradio-core/src/lib/runtime/gr_block_detail.cc b/gnuradio-core/src/lib/runtime/gr_block_detail.cc index cbd4239f3..2792cd471 100644 --- a/gnuradio-core/src/lib/runtime/gr_block_detail.cc +++ b/gnuradio-core/src/lib/runtime/gr_block_detail.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2009,2010 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, @@ -87,7 +87,7 @@ gr_block_detail::set_done (bool done) d_input[i]->set_done (done); } -void +void gr_block_detail::consume (int which_input, int how_many_items) { if (how_many_items > 0) { @@ -134,7 +134,7 @@ gr_block_detail::_post(pmt_t msg) } uint64_t -gr_block_detail::nitems_read(unsigned int which_input) +gr_block_detail::nitems_read(unsigned int which_input) { if(which_input >= d_ninputs) throw std::invalid_argument ("gr_block_detail::n_input_items"); @@ -142,7 +142,7 @@ gr_block_detail::nitems_read(unsigned int which_input) } uint64_t -gr_block_detail::nitems_written(unsigned int which_output) +gr_block_detail::nitems_written(unsigned int which_output) { if(which_output >= d_noutputs) throw std::invalid_argument ("gr_block_detail::n_output_items"); @@ -179,7 +179,7 @@ gr_block_detail::get_tags_in_range(std::vector<gr_tag_t> &v, const pmt_t &key) { std::vector<gr_tag_t> found_items; - + v.resize(0); // get from gr_buffer_reader's deque of tags diff --git a/gnuradio-core/src/lib/runtime/gr_block_detail.h b/gnuradio-core/src/lib/runtime/gr_block_detail.h index 89081156a..c96f00db8 100644 --- a/gnuradio-core/src/lib/runtime/gr_block_detail.h +++ b/gnuradio-core/src/lib/runtime/gr_block_detail.h @@ -96,11 +96,11 @@ class GR_CORE_API gr_block_detail { // Return the number of items written on output stream which_output uint64_t nitems_written(unsigned int which_output); - + /*! * \brief Adds a new tag to the given output stream. - * - * This takes the input parameters and builds a PMT tuple + * + * This takes the input parameters and builds a PMT tuple * from it. It then calls gr_buffer::add_item_tag(pmt::pmt_t t), * which appends the tag onto its deque. * @@ -112,7 +112,7 @@ class GR_CORE_API gr_block_detail { /*! * \brief Given a [start,end), returns a vector of all tags in the range. * - * Pass-through function to gr_buffer_reader to get a vector of tags + * Pass-through function to gr_buffer_reader to get a vector of tags * in given range. Range of counts is from start to end-1. * * Tags are tuples of: @@ -127,7 +127,7 @@ class GR_CORE_API gr_block_detail { unsigned int which_input, uint64_t abs_start, uint64_t abs_end); - + /*! * \brief Given a [start,end), returns a vector of all tags in the range * with a given key. diff --git a/gnuradio-core/src/lib/runtime/gr_block_detail.i b/gnuradio-core/src/lib/runtime/gr_block_detail.i index c8600c3cf..74ff46360 100644 --- a/gnuradio-core/src/lib/runtime/gr_block_detail.i +++ b/gnuradio-core/src/lib/runtime/gr_block_detail.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/runtime/gr_block_executor.cc b/gnuradio-core/src/lib/runtime/gr_block_executor.cc index 86289695a..6fea14613 100644 --- a/gnuradio-core/src/lib/runtime/gr_block_executor.cc +++ b/gnuradio-core/src/lib/runtime/gr_block_executor.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2008,2009,2010 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, @@ -147,7 +147,7 @@ propagate_tags(gr_block::tag_propagation_policy_t policy, gr_block_detail *d, std::cerr << "Error: gr_block_executor: propagation_policy 'ONE-TO-ONE' requires ninputs == noutputs" << std::endl; return false; } - + break; default: return true; @@ -241,10 +241,10 @@ gr_block_executor::run_one_iteration() LOG(*d_log << " d_ninput_items[" << i << "] = " << d_ninput_items[i] << std::endl); LOG(*d_log << " d_input_done[" << i << "] = " << d_input_done[i] << std::endl); - + if (d_ninput_items[i] < m->output_multiple() && d_input_done[i]) goto were_done; - + max_items_avail = std::max (max_items_avail, d_ninput_items[i]); } @@ -309,7 +309,7 @@ gr_block_executor::run_one_iteration() // try to work it forward starting with max_items_avail. // We want to try to consume all the input we've got. int reqd_noutput_items = m->fixed_rate_ninput_to_noutput(max_items_avail); - + // only test this if we specifically set the output_multiple if(m->output_multiple_set()) reqd_noutput_items = round_down(reqd_noutput_items, m->output_multiple()); @@ -442,7 +442,7 @@ gr_block_executor::run_one_iteration() if (n != gr_block::WORK_CALLED_PRODUCE) d->produce_each (n); // advance write pointers - + if (d->d_produce_or > 0) // block produced something return READY; @@ -461,7 +461,7 @@ gr_block_executor::run_one_iteration() return READY_NO_OUTPUT; } assert (0); - + were_done: LOG(*d_log << " were_done\n"); d->set_done (true); diff --git a/gnuradio-core/src/lib/runtime/gr_block_executor.h b/gnuradio-core/src/lib/runtime/gr_block_executor.h index e022d8273..0ae5affba 100644 --- a/gnuradio-core/src/lib/runtime/gr_block_executor.h +++ b/gnuradio-core/src/lib/runtime/gr_block_executor.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,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, diff --git a/gnuradio-core/src/lib/runtime/gr_buffer.cc b/gnuradio-core/src/lib/runtime/gr_buffer.cc index 8ccc9db32..b923ca57a 100644 --- a/gnuradio-core/src/lib/runtime/gr_buffer.cc +++ b/gnuradio-core/src/lib/runtime/gr_buffer.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2009,2010 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, @@ -90,7 +90,7 @@ gr_buffer::gr_buffer (int nitems, size_t sizeof_item, gr_block_sptr link) s_buffer_count++; } -gr_buffer_sptr +gr_buffer_sptr gr_make_buffer (int nitems, size_t sizeof_item, gr_block_sptr link) { return gr_buffer_sptr (new gr_buffer (nitems, sizeof_item, link)); @@ -111,7 +111,7 @@ bool gr_buffer::allocate_buffer (int nitems, size_t sizeof_item) { int orig_nitems = nitems; - + // Any buffersize we come up with must be a multiple of min_nitems. int granularity = gr_vmcircbuf_sysconfig::granularity (); @@ -240,7 +240,7 @@ gr_buffer::prune_tags(uint64_t max_time) d_item_tags. In practice, this function is only called at runtime by min_available_space in gr_block_executor.cc, which locks the mutex itself. - + If this function is used elsewhere, remember to lock the buffer's mutex al la the scoped_lock line below. */ @@ -285,7 +285,7 @@ gr_buffer_reader::~gr_buffer_reader () d_buffer->drop_reader(this); s_buffer_reader_count--; } - + int gr_buffer_reader::items_available () const { @@ -315,7 +315,7 @@ gr_buffer_reader::get_tags_in_range(std::vector<gr_tag_t> &v, v.resize(0); std::deque<gr_tag_t>::iterator itr = d_buffer->get_tags_begin(); - + uint64_t item_time; while(itr != d_buffer->get_tags_end()) { item_time = (*itr).offset; diff --git a/gnuradio-core/src/lib/runtime/gr_buffer.h b/gnuradio-core/src/lib/runtime/gr_buffer.h index 9478e1ce0..67d48fb2d 100644 --- a/gnuradio-core/src/lib/runtime/gr_buffer.h +++ b/gnuradio-core/src/lib/runtime/gr_buffer.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2009,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -97,14 +97,14 @@ class GR_CORE_API gr_buffer { /*! * \brief Adds a new tag to the buffer. - * + * * \param tag the new tag */ void add_item_tag(const gr_tag_t &tag); /*! * \brief Removes all tags before \p max_time from buffer - * + * * \param max_time the time (item number) to trim up until. */ void prune_tags(uint64_t max_time); @@ -130,7 +130,7 @@ class GR_CORE_API gr_buffer { boost::weak_ptr<gr_block> d_link; // block that writes to this buffer // - // The mutex protects d_write_index, d_abs_write_offset, d_done, d_item_tags + // The mutex protects d_write_index, d_abs_write_offset, d_done, d_item_tags // and the d_read_index's and d_abs_read_offset's in the buffer readers. // gruel::mutex d_mutex; @@ -139,7 +139,7 @@ class GR_CORE_API gr_buffer { bool d_done; std::deque<gr_tag_t> d_item_tags; uint64_t d_last_min_items_read; - + unsigned index_add (unsigned a, unsigned b) { @@ -194,7 +194,7 @@ class GR_CORE_API gr_buffer { * \param nzero_preload -- number of zero items to "preload" into buffer. * \param link is the block that reads from the buffer using this gr_buffer_reader. */ -GR_CORE_API gr_buffer_reader_sptr +GR_CORE_API gr_buffer_reader_sptr gr_buffer_add_reader (gr_buffer_sptr buf, int nzero_preload, gr_block_sptr link=gr_block_sptr()); //! returns # of gr_buffers currently allocated @@ -280,7 +280,7 @@ class GR_CORE_API gr_buffer_reader { private: friend class gr_buffer; - friend GR_CORE_API gr_buffer_reader_sptr + friend GR_CORE_API gr_buffer_reader_sptr gr_buffer_add_reader (gr_buffer_sptr buf, int nzero_preload, gr_block_sptr link); diff --git a/gnuradio-core/src/lib/runtime/gr_buffer.i b/gnuradio-core/src/lib/runtime/gr_buffer.i index 4c1c5afae..390a94e05 100644 --- a/gnuradio-core/src/lib/runtime/gr_buffer.i +++ b/gnuradio-core/src/lib/runtime/gr_buffer.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -35,7 +35,7 @@ class gr_buffer { private: gr_buffer (int nitems, size_t sizeof_item, gr_block_sptr link); }; - + class gr_buffer_reader; typedef boost::shared_ptr<gr_buffer_reader> gr_buffer_reader_sptr; diff --git a/gnuradio-core/src/lib/runtime/gr_complex.h b/gnuradio-core/src/lib/runtime/gr_complex.h index 32e996eef..758002106 100644 --- a/gnuradio-core/src/lib/runtime/gr_complex.h +++ b/gnuradio-core/src/lib/runtime/gr_complex.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/runtime/gr_dispatcher.cc b/gnuradio-core/src/lib/runtime/gr_dispatcher.cc index e165361fc..96ebe9ad8 100644 --- a/gnuradio-core/src/lib/runtime/gr_dispatcher.cc +++ b/gnuradio-core/src/lib/runtime/gr_dispatcher.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/runtime/gr_dispatcher.h b/gnuradio-core/src/lib/runtime/gr_dispatcher.h index 735974766..72a0b0176 100644 --- a/gnuradio-core/src/lib/runtime/gr_dispatcher.h +++ b/gnuradio-core/src/lib/runtime/gr_dispatcher.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/runtime/gr_dispatcher.i b/gnuradio-core/src/lib/runtime/gr_dispatcher.i index fc361701a..28737cd31 100644 --- a/gnuradio-core/src/lib/runtime/gr_dispatcher.i +++ b/gnuradio-core/src/lib/runtime/gr_dispatcher.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/runtime/gr_error_handler.cc b/gnuradio-core/src/lib/runtime/gr_error_handler.cc index 4b4cdacef..448682966 100644 --- a/gnuradio-core/src/lib/runtime/gr_error_handler.cc +++ b/gnuradio-core/src/lib/runtime/gr_error_handler.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -23,7 +23,7 @@ * This code is based on error.cc from the "Click Modular Router". * Original copyright follows: */ -/* +/* * error.{cc,hh} -- flexible classes for error reporting * Eddie Kohler * @@ -205,7 +205,7 @@ gr_file_error_handler::handle_text(seriousness s, const std::string &text) { if (text.length() <= 0) return; - + fwrite(text.data(), 1, text.length(), d_file); if (text[text.length()-1] != '\n') fwrite("\n", 1, 1, d_file); @@ -213,7 +213,7 @@ gr_file_error_handler::handle_text(seriousness s, const std::string &text) if (d_fd != -1) fflush(d_file); // keep synced with any other users of fd } - + // ---------------------------------------------------------------- // static error handlers diff --git a/gnuradio-core/src/lib/runtime/gr_error_handler.h b/gnuradio-core/src/lib/runtime/gr_error_handler.h index 4c30791f2..569c01c45 100644 --- a/gnuradio-core/src/lib/runtime/gr_error_handler.h +++ b/gnuradio-core/src/lib/runtime/gr_error_handler.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -23,7 +23,7 @@ * This code is based on error.hh from the "Click Modular Router". * Original copyright follows: */ -/* +/* * error.{cc,hh} -- flexible classes for error reporting * Eddie Kohler * diff --git a/gnuradio-core/src/lib/runtime/gr_error_handler.i b/gnuradio-core/src/lib/runtime/gr_error_handler.i index b4aa1fa39..072394a72 100644 --- a/gnuradio-core/src/lib/runtime/gr_error_handler.i +++ b/gnuradio-core/src/lib/runtime/gr_error_handler.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/runtime/gr_flat_flowgraph.cc b/gnuradio-core/src/lib/runtime/gr_flat_flowgraph.cc index 5c9e4bf3f..030e2d97d 100644 --- a/gnuradio-core/src/lib/runtime/gr_flat_flowgraph.cc +++ b/gnuradio-core/src/lib/runtime/gr_flat_flowgraph.cc @@ -134,11 +134,11 @@ gr_flat_flowgraph::connect_block_inputs(gr_basic_block_sptr block) gr_block_sptr grblock = cast_to_block_sptr(block); if (!grblock) throw std::runtime_error("connect_block_inputs found non-gr_block"); - + // Get its detail and edges that feed into it gr_block_detail_sptr detail = grblock->detail(); gr_edge_vector_t in_edges = calc_upstream_edges(block); - + // For each edge that feeds into it for (gr_edge_viter_t e = in_edges.begin(); e != in_edges.end(); e++) { // Set the buffer reader on the destination port to the output @@ -150,7 +150,7 @@ gr_flat_flowgraph::connect_block_inputs(gr_basic_block_sptr block) if (!src_grblock) throw std::runtime_error("connect_block_inputs found non-gr_block"); gr_buffer_sptr src_buffer = src_grblock->detail()->output(src_port); - + if (GR_FLAT_FLOWGRAPH_DEBUG) std::cout << "Setting input " << dst_port << " from edge " << (*e) << std::endl; @@ -166,7 +166,7 @@ gr_flat_flowgraph::merge_connections(gr_flat_flowgraph_sptr old_ffg) // already have one. for (gr_basic_block_viter_t p = d_blocks.begin(); p != d_blocks.end(); p++) { gr_block_sptr block = cast_to_block_sptr(*p); - + if (!block->detail()) { if (GR_FLAT_FLOWGRAPH_DEBUG) std::cout << "merge: allocating new detail for block " << (*p) << std::endl; @@ -182,7 +182,7 @@ gr_flat_flowgraph::merge_connections(gr_flat_flowgraph_sptr old_ffg) for (gr_edge_viter_t old_edge = old_ffg->d_edges.begin(); old_edge != old_ffg->d_edges.end(); old_edge++) { if (GR_FLAT_FLOWGRAPH_DEBUG) std::cout << "merge: testing old edge " << (*old_edge) << "..."; - + gr_edge_viter_t new_edge; for (new_edge = d_edges.begin(); new_edge != d_edges.end(); new_edge++) if (new_edge->src() == old_edge->src() && @@ -201,7 +201,7 @@ gr_flat_flowgraph::merge_connections(gr_flat_flowgraph_sptr old_ffg) if (GR_FLAT_FLOWGRAPH_DEBUG) std::cout << "found in new edge list" << std::endl; } - } + } // Now connect inputs to outputs, reusing old buffer readers if they exist for (gr_basic_block_viter_t p = d_blocks.begin(); p != d_blocks.end(); p++) { @@ -209,13 +209,13 @@ gr_flat_flowgraph::merge_connections(gr_flat_flowgraph_sptr old_ffg) if (GR_FLAT_FLOWGRAPH_DEBUG) std::cout << "merge: merging " << (*p) << "..."; - + if (old_ffg->has_block_p(*p)) { // Block exists in old flow graph if (GR_FLAT_FLOWGRAPH_DEBUG) std::cout << "used in old flow graph" << std::endl; gr_block_detail_sptr detail = block->detail(); - + // Iterate through the inputs and see what needs to be done int ninputs = calc_used_ports(block, true).size(); // Might be different now for (int i = 0; i < ninputs; i++) { @@ -228,9 +228,9 @@ gr_flat_flowgraph::merge_connections(gr_flat_flowgraph_sptr old_ffg) gr_block_detail_sptr src_detail = src_block->detail(); gr_buffer_sptr src_buffer = src_detail->output(edge.src().port()); gr_buffer_reader_sptr old_reader; - if (i < detail->ninputs()) // Don't exceed what the original detail has + if (i < detail->ninputs()) // Don't exceed what the original detail has old_reader = detail->input(i); - + // If there's a match, use it if (old_reader && (src_buffer == old_reader->buffer())) { if (GR_FLAT_FLOWGRAPH_DEBUG) @@ -255,9 +255,9 @@ gr_flat_flowgraph::merge_connections(gr_flat_flowgraph_sptr old_ffg) setup_buffer_alignment(block); } - // Now deal with the fact that the block details might have changed numbers of + // Now deal with the fact that the block details might have changed numbers of // inputs and outputs vs. in the old flowgraph. - } + } } void @@ -298,7 +298,7 @@ void gr_flat_flowgraph::dump() std::cout << " block: " << (*p) << std::endl; gr_block_detail_sptr detail = cast_to_block_sptr(*p)->detail(); std::cout << " detail @" << detail << ":" << std::endl; - + int ni = detail->ninputs(); int no = detail->noutputs(); for (int i = 0; i < no; i++) { diff --git a/gnuradio-core/src/lib/runtime/gr_flat_flowgraph.h b/gnuradio-core/src/lib/runtime/gr_flat_flowgraph.h index ce863509b..0926bcc8f 100644 --- a/gnuradio-core/src/lib/runtime/gr_flat_flowgraph.h +++ b/gnuradio-core/src/lib/runtime/gr_flat_flowgraph.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2007 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, @@ -64,7 +64,7 @@ private: gr_buffer_sptr allocate_buffer(gr_basic_block_sptr block, int port); void connect_block_inputs(gr_basic_block_sptr block); - /* When reusing a flowgraph's blocks, this call makes sure all of the + /* When reusing a flowgraph's blocks, this call makes sure all of the * buffer's are aligned at the machine's alignment boundary and tells * the blocks that they are aligned. * diff --git a/gnuradio-core/src/lib/runtime/gr_flowgraph.cc b/gnuradio-core/src/lib/runtime/gr_flowgraph.cc index 0d3bbb011..78e1bc99a 100644 --- a/gnuradio-core/src/lib/runtime/gr_flowgraph.cc +++ b/gnuradio-core/src/lib/runtime/gr_flowgraph.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -44,7 +44,7 @@ gr_flowgraph_sptr gr_make_flowgraph() gr_flowgraph::gr_flowgraph() { } - + gr_flowgraph::~gr_flowgraph() { } @@ -57,7 +57,7 @@ unique_vector(std::vector<T> v) { std::vector<T> result; std::insert_iterator<std::vector<T> > inserter(result, result.begin()); - + sort(v.begin(), v.end()); unique_copy(v.begin(), v.end(), inserter); return result; @@ -113,7 +113,7 @@ gr_flowgraph::validate() if (!((*p)->check_topology(ninputs, noutputs))) { std::stringstream msg; msg << "check topology failed on " << (*p) - << " using ninputs=" << ninputs + << " using ninputs=" << ninputs << ", noutputs=" << noutputs; throw std::runtime_error(msg.str()); } @@ -194,7 +194,7 @@ gr_flowgraph::calc_used_ports(gr_basic_block_sptr block, bool check_inputs) { std::vector<int> tmp; - // Collect all seen ports + // Collect all seen ports gr_edge_vector_t edges = calc_connections(block, check_inputs); for (gr_edge_viter_t p = edges.begin(); p != edges.end(); p++) { if (check_inputs == true) @@ -259,7 +259,7 @@ gr_flowgraph::check_contiguity(gr_basic_block_sptr block, if (used_ports[nports-1]+1 != nports) { for (int i = 0; i < nports; i++) { if (used_ports[i] != i) { - msg << block << ": missing connection " + msg << block << ": missing connection " << (check_inputs ? "to input port " : "from output port ") << i; throw std::runtime_error(msg.str()); @@ -367,7 +367,7 @@ gr_flowgraph::calc_reachable_blocks(gr_basic_block_sptr block, gr_basic_block_ve } // Recursively mark all reachable blocks from given block and block list -void +void gr_flowgraph::reachable_dfs_visit(gr_basic_block_sptr block, gr_basic_block_vector_t &blocks) { // Mark the current one as visited @@ -382,18 +382,18 @@ gr_flowgraph::reachable_dfs_visit(gr_basic_block_sptr block, gr_basic_block_vect } // Return a list of block adjacent to a given block along any edge -gr_basic_block_vector_t +gr_basic_block_vector_t gr_flowgraph::calc_adjacent_blocks(gr_basic_block_sptr block, gr_basic_block_vector_t &blocks) { gr_basic_block_vector_t tmp; - + // Find any blocks that are inputs or outputs for (gr_edge_viter_t p = d_edges.begin(); p != d_edges.end(); p++) { if (p->src().block() == block) tmp.push_back(p->dst().block()); if (p->dst().block() == block) tmp.push_back(p->src().block()); - } + } return unique_vector<gr_basic_block_sptr>(tmp); } @@ -412,7 +412,7 @@ gr_flowgraph::topological_sort(gr_basic_block_vector_t &blocks) for (gr_basic_block_viter_t p = tmp.begin(); p != tmp.end(); p++) { if ((*p)->color() == gr_basic_block::WHITE) topological_dfs_visit(*p, result); - } + } reverse(result.begin(), result.end()); return result; @@ -453,11 +453,11 @@ gr_flowgraph::topological_dfs_visit(gr_basic_block_sptr block, gr_basic_block_ve for (gr_basic_block_viter_t p = blocks.begin(); p != blocks.end(); p++) { switch ((*p)->color()) { - case gr_basic_block::WHITE: + case gr_basic_block::WHITE: topological_dfs_visit(*p, output); break; - case gr_basic_block::GREY: + case gr_basic_block::GREY: throw std::runtime_error("flow graph has loops!"); case gr_basic_block::BLACK: diff --git a/gnuradio-core/src/lib/runtime/gr_flowgraph.h b/gnuradio-core/src/lib/runtime/gr_flowgraph.h index 8f9a8ba71..a2c1580eb 100644 --- a/gnuradio-core/src/lib/runtime/gr_flowgraph.h +++ b/gnuradio-core/src/lib/runtime/gr_flowgraph.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2007 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, @@ -44,11 +44,11 @@ public: int port() const { return d_port; } bool operator==(const gr_endpoint &other) const; -}; +}; inline bool gr_endpoint::operator==(const gr_endpoint &other) const { - return (d_basic_block == other.d_basic_block && + return (d_basic_block == other.d_basic_block && d_port == other.d_port); } @@ -134,7 +134,7 @@ protected: gr_edge_vector_t d_edges; gr_flowgraph(); - std::vector<int> calc_used_ports(gr_basic_block_sptr block, bool check_inputs); + std::vector<int> calc_used_ports(gr_basic_block_sptr block, bool check_inputs); gr_basic_block_vector_t calc_downstream_blocks(gr_basic_block_sptr block, int port); gr_edge_vector_t calc_upstream_edges(gr_basic_block_sptr block); bool has_block_p(gr_basic_block_sptr block); diff --git a/gnuradio-core/src/lib/runtime/gr_hier_block2.cc b/gnuradio-core/src/lib/runtime/gr_hier_block2.cc index d6e317136..756852df8 100644 --- a/gnuradio-core/src/lib/runtime/gr_hier_block2.cc +++ b/gnuradio-core/src/lib/runtime/gr_hier_block2.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2007,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, @@ -33,7 +33,7 @@ gr_hier_block2_sptr -gr_make_hier_block2(const std::string &name, +gr_make_hier_block2(const std::string &name, gr_io_signature_sptr input_signature, gr_io_signature_sptr output_signature) { @@ -67,27 +67,27 @@ gr_hier_block2::to_hier_block2() return cast_to_hier_block2_sptr(shared_from_this()); } -void +void gr_hier_block2::connect(gr_basic_block_sptr block) { d_detail->connect(block); } -void -gr_hier_block2::connect(gr_basic_block_sptr src, int src_port, +void +gr_hier_block2::connect(gr_basic_block_sptr src, int src_port, gr_basic_block_sptr dst, int dst_port) { d_detail->connect(src, src_port, dst, dst_port); } -void +void gr_hier_block2::disconnect(gr_basic_block_sptr block) { d_detail->disconnect(block); } -void -gr_hier_block2::disconnect(gr_basic_block_sptr src, int src_port, +void +gr_hier_block2::disconnect(gr_basic_block_sptr src, int src_port, gr_basic_block_sptr dst, int dst_port) { d_detail->disconnect(src, src_port, dst, dst_port); diff --git a/gnuradio-core/src/lib/runtime/gr_hier_block2.h b/gnuradio-core/src/lib/runtime/gr_hier_block2.h index 9652f6bf4..123178724 100644 --- a/gnuradio-core/src/lib/runtime/gr_hier_block2.h +++ b/gnuradio-core/src/lib/runtime/gr_hier_block2.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2007,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, @@ -48,21 +48,21 @@ private: friend GR_CORE_API gr_hier_block2_sptr gr_make_hier_block2(const std::string &name, gr_io_signature_sptr input_signature, gr_io_signature_sptr output_signature); - + /*! * \brief Private implementation details of gr_hier_block2 */ gr_hier_block2_detail *d_detail; - -protected: + +protected: gr_hier_block2 (void){} //allows pure virtual interface sub-classes gr_hier_block2(const std::string &name, gr_io_signature_sptr input_signature, gr_io_signature_sptr output_signature); - + public: virtual ~gr_hier_block2(); - + /*! * \brief typedef for object returned from self(). * @@ -90,11 +90,11 @@ public: /*! * \brief Add gr-blocks or hierarchical blocks to internal graph and wire together * - * This adds (if not done earlier by another connect) a pair of gr-blocks or - * hierarchical blocks to the internal flowgraph, and wires the specified output + * This adds (if not done earlier by another connect) a pair of gr-blocks or + * hierarchical blocks to the internal flowgraph, and wires the specified output * port to the specified input port. */ - void connect(gr_basic_block_sptr src, int src_port, + void connect(gr_basic_block_sptr src, int src_port, gr_basic_block_sptr dst, int dst_port); /*! @@ -150,7 +150,7 @@ public: // ignored by the user. gr_flat_flowgraph_sptr flatten() const; - gr_hier_block2_sptr to_hier_block2(); // Needed for Python/Guile type coercion + gr_hier_block2_sptr to_hier_block2(); // Needed for Python type coercion }; inline gr_hier_block2_sptr cast_to_hier_block2_sptr(gr_basic_block_sptr block) { diff --git a/gnuradio-core/src/lib/runtime/gr_hier_block2.i b/gnuradio-core/src/lib/runtime/gr_hier_block2.i index 32b656e24..eefb965b4 100644 --- a/gnuradio-core/src/lib/runtime/gr_hier_block2.i +++ b/gnuradio-core/src/lib/runtime/gr_hier_block2.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2006,2007 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, @@ -45,10 +45,10 @@ private: gr_hier_block2(const std::string name, gr_io_signature_sptr input_signature, gr_io_signature_sptr output_signature); - + public: ~gr_hier_block2 (); - + void connect(gr_basic_block_sptr block) throw (std::invalid_argument); void connect(gr_basic_block_sptr src, int src_port, @@ -63,5 +63,5 @@ public: void lock(); void unlock(); - gr_hier_block2_sptr to_hier_block2(); // Needed for Python/Guile type coercion + gr_hier_block2_sptr to_hier_block2(); // Needed for Python type coercion }; diff --git a/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc b/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc index 1d0c66fb8..76c5ce06f 100644 --- a/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc +++ b/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc @@ -1,18 +1,18 @@ /* * Copyright 2006,2007,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, @@ -31,7 +31,7 @@ #define GR_HIER_BLOCK2_DETAIL_DEBUG 0 gr_hier_block2_detail::gr_hier_block2_detail(gr_hier_block2 *owner) : - d_owner(owner), + d_owner(owner), d_parent_detail(0), d_fg(gr_make_flowgraph()) { @@ -83,16 +83,16 @@ gr_hier_block2_detail::connect(gr_basic_block_sptr block) std::cout << "connect: block is hierarchical, setting parent to " << this << std::endl; hblock->d_detail->d_parent_detail = this; } - + d_blocks.push_back(block); } -void -gr_hier_block2_detail::connect(gr_basic_block_sptr src, int src_port, +void +gr_hier_block2_detail::connect(gr_basic_block_sptr src, int src_port, gr_basic_block_sptr dst, int dst_port) { std::stringstream msg; - + if (GR_HIER_BLOCK2_DETAIL_DEBUG) std::cout << "connecting: " << gr_endpoint(src, src_port) << " -> " << gr_endpoint(dst, dst_port) << std::endl; @@ -108,7 +108,7 @@ gr_hier_block2_detail::connect(gr_basic_block_sptr src, int src_port, std::cout << "connect: src is hierarchical, setting parent to " << this << std::endl; src_block->d_detail->d_parent_detail = this; } - + if (dst_block && dst.get() != d_owner) { if (GR_HIER_BLOCK2_DETAIL_DEBUG) std::cout << "connect: dst is hierarchical, setting parent to " << this << std::endl; @@ -150,14 +150,14 @@ gr_hier_block2_detail::disconnect(gr_basic_block_sptr block) for (gr_basic_block_viter_t p = d_blocks.begin(); p != d_blocks.end(); p++) { if (*p == block) { d_blocks.erase(p); - + gr_hier_block2_sptr hblock(cast_to_hier_block2_sptr(block)); if (block && block.get() != d_owner) { if (GR_HIER_BLOCK2_DETAIL_DEBUG) std::cout << "disconnect: block is hierarchical, clearing parent" << std::endl; hblock->d_detail->d_parent_detail = 0; } - + return; } } @@ -170,7 +170,7 @@ gr_hier_block2_detail::disconnect(gr_basic_block_sptr block) edges.push_back(*p); if (GR_HIER_BLOCK2_DETAIL_DEBUG) - std::cout << "disconnect: block found in edge " << (*p) << std::endl; + std::cout << "disconnect: block found in edge " << (*p) << std::endl; } } @@ -186,8 +186,8 @@ gr_hier_block2_detail::disconnect(gr_basic_block_sptr block) } } -void -gr_hier_block2_detail::disconnect(gr_basic_block_sptr src, int src_port, +void +gr_hier_block2_detail::disconnect(gr_basic_block_sptr src, int src_port, gr_basic_block_sptr dst, int dst_port) { if (GR_HIER_BLOCK2_DETAIL_DEBUG) @@ -205,7 +205,7 @@ gr_hier_block2_detail::disconnect(gr_basic_block_sptr src, int src_port, std::cout << "disconnect: src is hierarchical, clearing parent" << std::endl; src_block->d_detail->d_parent_detail = 0; } - + if (dst_block && dst.get() != d_owner) { if (GR_HIER_BLOCK2_DETAIL_DEBUG) std::cout << "disconnect: dst is hierarchical, clearing parent" << std::endl; @@ -240,7 +240,7 @@ gr_hier_block2_detail::connect_input(int my_port, int port, gr_basic_block_sptr msg << "external input port " << my_port << " already wired to " << endp; throw std::invalid_argument(msg.str()); } - + endps.push_back(endp); } @@ -281,7 +281,7 @@ gr_hier_block2_detail::disconnect_input(int my_port, int port, gr_basic_block_sp msg << "external input port " << my_port << " not connected to " << endp; throw std::invalid_argument(msg.str()); } - + endps.erase(p); } @@ -296,7 +296,7 @@ gr_hier_block2_detail::disconnect_output(int my_port, int port, gr_basic_block_s } if (d_outputs[my_port].block() != block) { - msg << "block " << block << " not assigned to output " + msg << "block " << block << " not assigned to output " << my_port << ", can't disconnect"; throw std::invalid_argument(msg.str()); } @@ -390,7 +390,7 @@ gr_hier_block2_detail::resolve_endpoint(const gr_endpoint &endp, bool is_input) gr_hier_block2_sptr hier_block2(cast_to_hier_block2_sptr(endp.block())); if (hier_block2) { if (GR_HIER_BLOCK2_DETAIL_DEBUG) - std::cout << "Resolving endpoint " << endp << " as an " + std::cout << "Resolving endpoint " << endp << " as an " << (is_input ? "input" : "output") << ", recursing" << std::endl; return hier_block2->d_detail->resolve_port(endp.port(), is_input); @@ -428,7 +428,7 @@ gr_hier_block2_detail::flatten_aux(gr_flat_flowgraph_sptr sfg) const } } - // Construct unique list of blocks used either in edges, inputs, + // Construct unique list of blocks used either in edges, inputs, // outputs, or by themselves. I still hate STL. gr_basic_block_vector_t blocks; // unique list of used blocks gr_basic_block_vector_t tmp = d_fg->calc_used_blocks(); @@ -446,7 +446,7 @@ gr_hier_block2_detail::flatten_aux(gr_flat_flowgraph_sptr sfg) const << " is not connected internally"; throw std::runtime_error(msg.str()); } - + for (unsigned int j = 0; j < d_inputs[i].size(); j++) tmp.push_back(d_inputs[i][j].block()); } diff --git a/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.h b/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.h index 5a77d6a03..f4f950e9d 100644 --- a/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.h +++ b/gnuradio-core/src/lib/runtime/gr_hier_block2_detail.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2007,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, @@ -37,10 +37,10 @@ public: ~gr_hier_block2_detail(); void connect(gr_basic_block_sptr block); - void connect(gr_basic_block_sptr src, int src_port, + void connect(gr_basic_block_sptr src, int src_port, gr_basic_block_sptr dst, int dst_port); void disconnect(gr_basic_block_sptr block); - void disconnect(gr_basic_block_sptr, int src_port, + void disconnect(gr_basic_block_sptr, int src_port, gr_basic_block_sptr, int dst_port); void disconnect_all(); void lock(); @@ -48,7 +48,7 @@ public: void flatten_aux(gr_flat_flowgraph_sptr sfg) const; private: - + // Private implementation data gr_hier_block2 *d_owner; gr_hier_block2_detail *d_parent_detail; @@ -56,7 +56,7 @@ private: std::vector<gr_endpoint_vector_t> d_inputs; // Multiple internal endpoints per external input gr_endpoint_vector_t d_outputs; // Single internal endpoint per external output gr_basic_block_vector_t d_blocks; - + void connect_input(int my_port, int port, gr_basic_block_sptr block); void connect_output(int my_port, int port, gr_basic_block_sptr block); void disconnect_input(int my_port, int port, gr_basic_block_sptr block); diff --git a/gnuradio-core/src/lib/runtime/gr_io_signature.cc b/gnuradio-core/src/lib/runtime/gr_io_signature.cc index 1c1b06f02..6ac9acd17 100644 --- a/gnuradio-core/src/lib/runtime/gr_io_signature.cc +++ b/gnuradio-core/src/lib/runtime/gr_io_signature.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2007 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, @@ -56,7 +56,7 @@ gr_make_io_signature2(int min_streams, int max_streams, } gr_io_signature_sptr -gr_make_io_signature3(int min_streams, int max_streams, +gr_make_io_signature3(int min_streams, int max_streams, int sizeof_stream_item1, int sizeof_stream_item2, int sizeof_stream_item3) @@ -85,7 +85,7 @@ gr_io_signature::gr_io_signature (int min_streams, int max_streams, if (max_streams != 0 && sizeof_stream_items[i] < 1) throw std::invalid_argument("gr_io_signature(3)"); } - + d_min_streams = min_streams; d_max_streams = max_streams; d_sizeof_stream_item = sizeof_stream_items; @@ -95,12 +95,12 @@ gr_io_signature::~gr_io_signature () { } -int +int gr_io_signature::sizeof_stream_item (int _index) const { if (_index < 0) throw std::invalid_argument ("gr_io_signature::sizeof_stream_item"); - + size_t index = _index; return d_sizeof_stream_item[std::min(index, d_sizeof_stream_item.size() - 1)]; } diff --git a/gnuradio-core/src/lib/runtime/gr_io_signature.h b/gnuradio-core/src/lib/runtime/gr_io_signature.h index 11c6b7f13..fd1825797 100644 --- a/gnuradio-core/src/lib/runtime/gr_io_signature.h +++ b/gnuradio-core/src/lib/runtime/gr_io_signature.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2007 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, @@ -62,7 +62,7 @@ gr_make_io_signature2(int min_streams, int max_streams, * \param sizeof_stream_item3 specify the size of the items in the third and subsequent streams */ GR_CORE_API gr_io_signature_sptr -gr_make_io_signature3(int min_streams, int max_streams, +gr_make_io_signature3(int min_streams, int max_streams, int sizeof_stream_item1, int sizeof_stream_item2, int sizeof_stream_item3 @@ -96,7 +96,7 @@ class GR_CORE_API gr_io_signature { gr_io_signature(int min_streams, int max_streams, const std::vector<int> &sizeof_stream_items); - friend GR_CORE_API gr_io_signature_sptr + friend GR_CORE_API gr_io_signature_sptr gr_make_io_signaturev(int min_streams, int max_streams, const std::vector<int> &sizeof_stream_items); @@ -104,9 +104,9 @@ class GR_CORE_API gr_io_signature { public: static const int IO_INFINITE = -1; - + ~gr_io_signature (); - + int min_streams () const { return d_min_streams; } int max_streams () const { return d_max_streams; } int sizeof_stream_item (int index) const; diff --git a/gnuradio-core/src/lib/runtime/gr_io_signature.i b/gnuradio-core/src/lib/runtime/gr_io_signature.i index 78465b19e..fe1707e41 100644 --- a/gnuradio-core/src/lib/runtime/gr_io_signature.i +++ b/gnuradio-core/src/lib/runtime/gr_io_signature.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2005,2007 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, @@ -40,7 +40,7 @@ gr_make_io_signature2(int min_streams, int max_streams, int sizeof_stream_item2 ); gr_io_signature_sptr -gr_make_io_signature3(int min_streams, int max_streams, +gr_make_io_signature3(int min_streams, int max_streams, int sizeof_stream_item1, int sizeof_stream_item2, int sizeof_stream_item3 @@ -53,7 +53,7 @@ gr_make_io_signaturev(int min_streams, int max_streams, class gr_io_signature { gr_io_signature (int min_streams, int max_streams, int sizeof_stream_item); - friend gr_io_signature_sptr + friend gr_io_signature_sptr gr_make_io_signaturev(int min_streams, int max_streams, const std::vector<int> &sizeof_stream_item); @@ -62,9 +62,9 @@ class gr_io_signature { // disabled. Suspected bug in SWIG 1.3.24 // static const int IO_INFINITE = -1; - + ~gr_io_signature (); - + int min_streams () const { return d_min_streams; } int max_streams () const { return d_max_streams; } int sizeof_stream_item (int index) const; diff --git a/gnuradio-core/src/lib/runtime/gr_local_sighandler.cc b/gnuradio-core/src/lib/runtime/gr_local_sighandler.cc index adad55791..fb31742e1 100644 --- a/gnuradio-core/src/lib/runtime/gr_local_sighandler.cc +++ b/gnuradio-core/src/lib/runtime/gr_local_sighandler.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -172,7 +172,7 @@ gr_signal::name () const #endif default: #if defined (HAVE_SNPRINTF) -#if defined (SIGRTMIN) && defined (SIGRTMAX) +#if defined (SIGRTMIN) && defined (SIGRTMAX) if (signal () >= SIGRTMIN && signal () <= SIGRTMAX){ snprintf (tmp, sizeof (tmp), "SIGRTMIN + %d", signal ()); return tmp; diff --git a/gnuradio-core/src/lib/runtime/gr_local_sighandler.h b/gnuradio-core/src/lib/runtime/gr_local_sighandler.h index 9e4eacc47..a30e2c13a 100644 --- a/gnuradio-core/src/lib/runtime/gr_local_sighandler.h +++ b/gnuradio-core/src/lib/runtime/gr_local_sighandler.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/runtime/gr_message.cc b/gnuradio-core/src/lib/runtime/gr_message.cc index 6bef71ed5..a99dcd765 100644 --- a/gnuradio-core/src/lib/runtime/gr_message.cc +++ b/gnuradio-core/src/lib/runtime/gr_message.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -67,7 +67,7 @@ gr_message::~gr_message () std::string gr_message::to_string() const -{ +{ return std::string((char *)d_msg_start, length()); } diff --git a/gnuradio-core/src/lib/runtime/gr_message.h b/gnuradio-core/src/lib/runtime/gr_message.h index ead002616..d386ca009 100644 --- a/gnuradio-core/src/lib/runtime/gr_message.h +++ b/gnuradio-core/src/lib/runtime/gr_message.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -32,7 +32,7 @@ typedef boost::shared_ptr<gr_message> gr_message_sptr; /*! * \brief public constructor for gr_message */ -GR_CORE_API gr_message_sptr +GR_CORE_API gr_message_sptr gr_make_message(long type = 0, double arg1 = 0, double arg2 = 0, size_t length = 0); GR_CORE_API gr_message_sptr @@ -55,7 +55,7 @@ class GR_CORE_API gr_message { unsigned char *d_msg_start; // where the msg starts unsigned char *d_msg_end; // one beyond end of msg unsigned char *d_buf_end; // one beyond end of allocated buffer - + gr_message (long type, double arg1, double arg2, size_t length); friend GR_CORE_API gr_message_sptr diff --git a/gnuradio-core/src/lib/runtime/gr_message.i b/gnuradio-core/src/lib/runtime/gr_message.i index 44636fde6..356bba5b5 100644 --- a/gnuradio-core/src/lib/runtime/gr_message.i +++ b/gnuradio-core/src/lib/runtime/gr_message.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/runtime/gr_msg_accepter.cc b/gnuradio-core/src/lib/runtime/gr_msg_accepter.cc index 89876ae29..5018ee9e6 100644 --- a/gnuradio-core/src/lib/runtime/gr_msg_accepter.cc +++ b/gnuradio-core/src/lib/runtime/gr_msg_accepter.cc @@ -1,19 +1,19 @@ /* -*- 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. @@ -45,7 +45,7 @@ gr_msg_accepter::post(pmt_t msg) { // Notify derived class, handled case by case gr_block *p = dynamic_cast<gr_block *>(this); - if (p) { + if (p) { p->detail()->_post(msg); return; } diff --git a/gnuradio-core/src/lib/runtime/gr_msg_accepter.h b/gnuradio-core/src/lib/runtime/gr_msg_accepter.h index 4aec127a9..3e5c97638 100644 --- a/gnuradio-core/src/lib/runtime/gr_msg_accepter.h +++ b/gnuradio-core/src/lib/runtime/gr_msg_accepter.h @@ -1,19 +1,19 @@ /* -*- 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. diff --git a/gnuradio-core/src/lib/runtime/gr_msg_handler.cc b/gnuradio-core/src/lib/runtime/gr_msg_handler.cc index a3a85a463..0f9349708 100644 --- a/gnuradio-core/src/lib/runtime/gr_msg_handler.cc +++ b/gnuradio-core/src/lib/runtime/gr_msg_handler.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/runtime/gr_msg_handler.h b/gnuradio-core/src/lib/runtime/gr_msg_handler.h index ebe3ffe37..57e8a95d6 100644 --- a/gnuradio-core/src/lib/runtime/gr_msg_handler.h +++ b/gnuradio-core/src/lib/runtime/gr_msg_handler.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -35,7 +35,7 @@ typedef boost::shared_ptr<gr_msg_handler> gr_msg_handler_sptr; class GR_CORE_API gr_msg_handler { public: virtual ~gr_msg_handler (); - + //! handle \p msg virtual void handle (gr_message_sptr msg) = 0; }; diff --git a/gnuradio-core/src/lib/runtime/gr_msg_handler.i b/gnuradio-core/src/lib/runtime/gr_msg_handler.i index 17ccd0ec5..f493dac1b 100644 --- a/gnuradio-core/src/lib/runtime/gr_msg_handler.i +++ b/gnuradio-core/src/lib/runtime/gr_msg_handler.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -26,7 +26,7 @@ class gr_msg_handler { public: virtual ~gr_msg_handler () = 0; - + //! handle \p msg virtual void handle (gr_message_sptr msg) = 0; }; diff --git a/gnuradio-core/src/lib/runtime/gr_msg_queue.cc b/gnuradio-core/src/lib/runtime/gr_msg_queue.cc index 3097acc9e..0cf046771 100644 --- a/gnuradio-core/src/lib/runtime/gr_msg_queue.cc +++ b/gnuradio-core/src/lib/runtime/gr_msg_queue.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,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, diff --git a/gnuradio-core/src/lib/runtime/gr_msg_queue.h b/gnuradio-core/src/lib/runtime/gr_msg_queue.h index bf7b89882..86440bbb0 100644 --- a/gnuradio-core/src/lib/runtime/gr_msg_queue.h +++ b/gnuradio-core/src/lib/runtime/gr_msg_queue.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,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, @@ -71,16 +71,16 @@ public: * If no message is available, return 0. */ gr_message_sptr delete_head_nowait(); - + //! Delete all messages from the queue void flush(); //! is the queue empty? bool empty_p() const { return d_count == 0; } - + //! is the queue full? bool full_p() const { return d_limit != 0 && d_count >= d_limit; } - + //! return number of messages in queue unsigned int count() const { return d_count; } diff --git a/gnuradio-core/src/lib/runtime/gr_msg_queue.i b/gnuradio-core/src/lib/runtime/gr_msg_queue.i index 0a4eda78a..65cbe782b 100644 --- a/gnuradio-core/src/lib/runtime/gr_msg_queue.i +++ b/gnuradio-core/src/lib/runtime/gr_msg_queue.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2009,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -58,13 +58,13 @@ public: * If no message is available, return 0. */ gr_message_sptr delete_head_nowait(); - + //! is the queue empty? bool empty_p() const; - + //! is the queue full? bool full_p() const; - + //! return number of messages in queue unsigned int count() const; @@ -105,64 +105,3 @@ gr_msg_queue_sptr.insert_tail = gr_py_msg_queue__insert_tail gr_msg_queue_sptr.handle = gr_py_msg_queue__insert_tail %} #endif // SWIGPYTHON - -/* - * Similar trickery as above, only this time for Guile - */ -#ifdef SWIGGUILE - -%{ - struct arg_holder { - gr_msg_queue_sptr q; - gr_message_sptr msg; - }; - - static void * - insert_tail_shim(void *arg) - { - arg_holder *a = (arg_holder *)arg; - a->q->insert_tail(a->msg); - return 0; - } - - static void * - delete_head_shim(void *arg) - { - arg_holder *a = (arg_holder *)arg; - a->msg = a->q->delete_head(); - return 0; - } -%} - -%inline %{ - - // handle and insert_tail are equivalent - static void - handle(gr_msg_queue_sptr q, gr_message_sptr msg) - { - arg_holder a; - a.q = q; - a.msg = msg; - scm_without_guile(insert_tail_shim, (void *) &a); - } - - static void - insert_tail(gr_msg_queue_sptr q, gr_message_sptr msg) - { - arg_holder a; - a.q = q; - a.msg = msg; - scm_without_guile(insert_tail_shim, (void *) &a); - } - - static gr_message_sptr - delete_head(gr_msg_queue_sptr q) - { - arg_holder a; - a.q = q; - scm_without_guile(delete_head_shim, (void *) &a); - return a.msg; - } -%} - -#endif // SWIGGUILE diff --git a/gnuradio-core/src/lib/runtime/gr_pagesize.cc b/gnuradio-core/src/lib/runtime/gr_pagesize.cc index 09fdf5578..e31e05ca7 100644 --- a/gnuradio-core/src/lib/runtime/gr_pagesize.cc +++ b/gnuradio-core/src/lib/runtime/gr_pagesize.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003 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, diff --git a/gnuradio-core/src/lib/runtime/gr_pagesize.h b/gnuradio-core/src/lib/runtime/gr_pagesize.h index 60dad42c9..3e2daa925 100644 --- a/gnuradio-core/src/lib/runtime/gr_pagesize.h +++ b/gnuradio-core/src/lib/runtime/gr_pagesize.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003 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, diff --git a/gnuradio-core/src/lib/runtime/gr_preferences.cc b/gnuradio-core/src/lib/runtime/gr_preferences.cc index c2ca047a8..a0f561660 100644 --- a/gnuradio-core/src/lib/runtime/gr_preferences.cc +++ b/gnuradio-core/src/lib/runtime/gr_preferences.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -85,7 +85,7 @@ gr_preferences::get (const char *key) return buf; } -void +void gr_preferences::set (const char *key, const char *value) { ensure_dir_path (); diff --git a/gnuradio-core/src/lib/runtime/gr_preferences.h b/gnuradio-core/src/lib/runtime/gr_preferences.h index ab4dc0cb0..bfcc0424b 100644 --- a/gnuradio-core/src/lib/runtime/gr_preferences.h +++ b/gnuradio-core/src/lib/runtime/gr_preferences.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003 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, diff --git a/gnuradio-core/src/lib/runtime/gr_realtime.cc b/gnuradio-core/src/lib/runtime/gr_realtime.cc index b44c4d408..75b497999 100644 --- a/gnuradio-core/src/lib/runtime/gr_realtime.cc +++ b/gnuradio-core/src/lib/runtime/gr_realtime.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2007,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, diff --git a/gnuradio-core/src/lib/runtime/gr_realtime.h b/gnuradio-core/src/lib/runtime/gr_realtime.h index 58db83086..fe6549039 100644 --- a/gnuradio-core/src/lib/runtime/gr_realtime.h +++ b/gnuradio-core/src/lib/runtime/gr_realtime.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gnuradio-core/src/lib/runtime/gr_realtime.i b/gnuradio-core/src/lib/runtime/gr_realtime.i index be7f12bf0..1051d3e2b 100644 --- a/gnuradio-core/src/lib/runtime/gr_realtime.i +++ b/gnuradio-core/src/lib/runtime/gr_realtime.i @@ -1,19 +1,19 @@ /* -*- 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, diff --git a/gnuradio-core/src/lib/runtime/gr_runtime_types.h b/gnuradio-core/src/lib/runtime/gr_runtime_types.h index 98f08b417..0d6149288 100644 --- a/gnuradio-core/src/lib/runtime/gr_runtime_types.h +++ b/gnuradio-core/src/lib/runtime/gr_runtime_types.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2007 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, diff --git a/gnuradio-core/src/lib/runtime/gr_scheduler.cc b/gnuradio-core/src/lib/runtime/gr_scheduler.cc index 3ae08a7a3..c691f5d99 100644 --- a/gnuradio-core/src/lib/runtime/gr_scheduler.cc +++ b/gnuradio-core/src/lib/runtime/gr_scheduler.cc @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/gnuradio-core/src/lib/runtime/gr_scheduler.h b/gnuradio-core/src/lib/runtime/gr_scheduler.h index 92af8d1cb..6d130327f 100644 --- a/gnuradio-core/src/lib/runtime/gr_scheduler.h +++ b/gnuradio-core/src/lib/runtime/gr_scheduler.h @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/gnuradio-core/src/lib/runtime/gr_scheduler_sts.cc b/gnuradio-core/src/lib/runtime/gr_scheduler_sts.cc index 3cc1d4d45..2c96def6d 100644 --- a/gnuradio-core/src/lib/runtime/gr_scheduler_sts.cc +++ b/gnuradio-core/src/lib/runtime/gr_scheduler_sts.cc @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -29,7 +29,7 @@ class sts_container { gr_block_vector_t d_blocks; - + public: sts_container(gr_block_vector_t blocks) diff --git a/gnuradio-core/src/lib/runtime/gr_scheduler_sts.h b/gnuradio-core/src/lib/runtime/gr_scheduler_sts.h index 08c68d88a..011874ec0 100644 --- a/gnuradio-core/src/lib/runtime/gr_scheduler_sts.h +++ b/gnuradio-core/src/lib/runtime/gr_scheduler_sts.h @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/gnuradio-core/src/lib/runtime/gr_scheduler_tpb.cc b/gnuradio-core/src/lib/runtime/gr_scheduler_tpb.cc index 0a7ff4556..131ddd19c 100644 --- a/gnuradio-core/src/lib/runtime/gr_scheduler_tpb.cc +++ b/gnuradio-core/src/lib/runtime/gr_scheduler_tpb.cc @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -34,7 +34,7 @@ class tpb_container { gr_block_sptr d_block; int d_max_noutput_items; - + public: tpb_container(gr_block_sptr block, int max_noutput_items) : d_block(block), d_max_noutput_items(max_noutput_items) {} diff --git a/gnuradio-core/src/lib/runtime/gr_scheduler_tpb.h b/gnuradio-core/src/lib/runtime/gr_scheduler_tpb.h index ab74fa84d..a9b3abcfa 100644 --- a/gnuradio-core/src/lib/runtime/gr_scheduler_tpb.h +++ b/gnuradio-core/src/lib/runtime/gr_scheduler_tpb.h @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/gnuradio-core/src/lib/runtime/gr_select_handler.cc b/gnuradio-core/src/lib/runtime/gr_select_handler.cc index 869e46511..0fc86354a 100644 --- a/gnuradio-core/src/lib/runtime/gr_select_handler.cc +++ b/gnuradio-core/src/lib/runtime/gr_select_handler.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gnuradio-core/src/lib/runtime/gr_select_handler.h b/gnuradio-core/src/lib/runtime/gr_select_handler.h index 532707a02..c4c359213 100644 --- a/gnuradio-core/src/lib/runtime/gr_select_handler.h +++ b/gnuradio-core/src/lib/runtime/gr_select_handler.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -60,7 +60,7 @@ public: /*! * \brief Called when file_descriptor is writable. * - * Called when dispatcher detects that file descriptor can be + * Called when dispatcher detects that file descriptor can be * written without blocking. */ virtual void handle_write() = 0; diff --git a/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.cc b/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.cc index ae04e4a65..1bb9e9b0a 100644 --- a/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.cc +++ b/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -81,7 +81,7 @@ gr_single_threaded_scheduler::run () void gr_single_threaded_scheduler::stop () -{ +{ if (0) std::cout << "gr_singled_threaded_scheduler::stop() " << this << std::endl; @@ -206,7 +206,7 @@ gr_single_threaded_scheduler::main_loop () //if (ninput_items[i] == 0 && d->input(i)->done()) if (ninput_items[i] < m->output_multiple() && d->input(i)->done()) goto were_done; - + max_items_avail = std::max (max_items_avail, ninput_items[i]); } @@ -345,7 +345,7 @@ gr_single_threaded_scheduler::main_loop () goto next_block; } assert (0); - + were_done: LOG(*d_log << " were_done\n"); d->set_done (true); diff --git a/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.h b/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.h index 17f4a1c54..3a95c7194 100644 --- a/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.h +++ b/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -51,7 +51,7 @@ class GR_CORE_API gr_single_threaded_scheduler { gr_single_threaded_scheduler (const std::vector<gr_block_sptr> &blocks); void main_loop (); - + friend GR_CORE_API gr_single_threaded_scheduler_sptr gr_make_single_threaded_scheduler (const std::vector<gr_block_sptr> &blocks); }; diff --git a/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.i b/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.i index 2378a1880..7305cc9ad 100644 --- a/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.i +++ b/gnuradio-core/src/lib/runtime/gr_single_threaded_scheduler.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -28,7 +28,7 @@ typedef boost::shared_ptr<gr_single_threaded_scheduler> gr_single_threaded_sched %rename(single_threaded_scheduler) gr_make_single_threaded_scheduler; %ignore gr_single_threaded_scheduler; -gr_single_threaded_scheduler_sptr +gr_single_threaded_scheduler_sptr gr_make_single_threaded_scheduler (const std::vector<gr_block_sptr> &modules); class gr_single_threaded_scheduler { diff --git a/gnuradio-core/src/lib/runtime/gr_sptr_magic.cc b/gnuradio-core/src/lib/runtime/gr_sptr_magic.cc index b0351248c..7fdadf24a 100644 --- a/gnuradio-core/src/lib/runtime/gr_sptr_magic.cc +++ b/gnuradio-core/src/lib/runtime/gr_sptr_magic.cc @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -44,7 +44,7 @@ namespace gnuradio { } - gr_basic_block_sptr + gr_basic_block_sptr detail::sptr_magic::fetch_initial_sptr(gr_basic_block *p) { /* diff --git a/gnuradio-core/src/lib/runtime/gr_sptr_magic.h b/gnuradio-core/src/lib/runtime/gr_sptr_magic.h index 4b7f9899d..3d997539c 100644 --- a/gnuradio-core/src/lib/runtime/gr_sptr_magic.h +++ b/gnuradio-core/src/lib/runtime/gr_sptr_magic.h @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -30,7 +30,7 @@ class gr_hier_block2; namespace gnuradio { namespace detail { - + class GR_CORE_API sptr_magic { public: static boost::shared_ptr<gr_basic_block> fetch_initial_sptr(gr_basic_block *p); @@ -38,7 +38,7 @@ namespace gnuradio { }; }; - /* + /* * \brief New! Improved! Standard method to get/create the boost::shared_ptr for a block. */ template<class T> diff --git a/gnuradio-core/src/lib/runtime/gr_sync_block.cc b/gnuradio-core/src/lib/runtime/gr_sync_block.cc index 1427570ae..94efcdc8e 100644 --- a/gnuradio-core/src/lib/runtime/gr_sync_block.cc +++ b/gnuradio-core/src/lib/runtime/gr_sync_block.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/runtime/gr_sync_block.h b/gnuradio-core/src/lib/runtime/gr_sync_block.h index 808c1c18a..1e4109b03 100644 --- a/gnuradio-core/src/lib/runtime/gr_sync_block.h +++ b/gnuradio-core/src/lib/runtime/gr_sync_block.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -50,7 +50,7 @@ class GR_CORE_API gr_sync_block : public gr_block virtual int work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) = 0; - + // gr_sync_block overrides these to assist work void forecast (int noutput_items, gr_vector_int &ninput_items_required); @@ -62,5 +62,5 @@ class GR_CORE_API gr_sync_block : public gr_block int fixed_rate_ninput_to_noutput(int ninput); int fixed_rate_noutput_to_ninput(int noutput); }; - + #endif /* INCLUDED_GR_SYNC_BLOCK_H */ diff --git a/gnuradio-core/src/lib/runtime/gr_sync_block.i b/gnuradio-core/src/lib/runtime/gr_sync_block.i index 8e140bb88..d3e1bb957 100644 --- a/gnuradio-core/src/lib/runtime/gr_sync_block.i +++ b/gnuradio-core/src/lib/runtime/gr_sync_block.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/runtime/gr_sync_decimator.cc b/gnuradio-core/src/lib/runtime/gr_sync_decimator.cc index 1add2fadd..a0f907db5 100644 --- a/gnuradio-core/src/lib/runtime/gr_sync_decimator.cc +++ b/gnuradio-core/src/lib/runtime/gr_sync_decimator.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/runtime/gr_sync_decimator.h b/gnuradio-core/src/lib/runtime/gr_sync_decimator.h index 7228d3655..657aba985 100644 --- a/gnuradio-core/src/lib/runtime/gr_sync_decimator.h +++ b/gnuradio-core/src/lib/runtime/gr_sync_decimator.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/runtime/gr_sync_decimator.i b/gnuradio-core/src/lib/runtime/gr_sync_decimator.i index 821b2648e..af4574b19 100644 --- a/gnuradio-core/src/lib/runtime/gr_sync_decimator.i +++ b/gnuradio-core/src/lib/runtime/gr_sync_decimator.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/runtime/gr_sync_interpolator.cc b/gnuradio-core/src/lib/runtime/gr_sync_interpolator.cc index d130a5be1..ece873c14 100644 --- a/gnuradio-core/src/lib/runtime/gr_sync_interpolator.cc +++ b/gnuradio-core/src/lib/runtime/gr_sync_interpolator.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,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, diff --git a/gnuradio-core/src/lib/runtime/gr_sync_interpolator.h b/gnuradio-core/src/lib/runtime/gr_sync_interpolator.h index c332a5272..86d2fde43 100644 --- a/gnuradio-core/src/lib/runtime/gr_sync_interpolator.h +++ b/gnuradio-core/src/lib/runtime/gr_sync_interpolator.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,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, diff --git a/gnuradio-core/src/lib/runtime/gr_sync_interpolator.i b/gnuradio-core/src/lib/runtime/gr_sync_interpolator.i index 4443ed0aa..6f8b08252 100644 --- a/gnuradio-core/src/lib/runtime/gr_sync_interpolator.i +++ b/gnuradio-core/src/lib/runtime/gr_sync_interpolator.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/runtime/gr_sys_paths.cc b/gnuradio-core/src/lib/runtime/gr_sys_paths.cc index 9d10a3ccd..b4918af33 100644 --- a/gnuradio-core/src/lib/runtime/gr_sys_paths.cc +++ b/gnuradio-core/src/lib/runtime/gr_sys_paths.cc @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/runtime/gr_sys_paths.h b/gnuradio-core/src/lib/runtime/gr_sys_paths.h index 1f1759c36..bd51ebdf9 100644 --- a/gnuradio-core/src/lib/runtime/gr_sys_paths.h +++ b/gnuradio-core/src/lib/runtime/gr_sys_paths.h @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/runtime/gr_tags.h b/gnuradio-core/src/lib/runtime/gr_tags.h index 5fff6f15b..8bffcd0fe 100644 --- a/gnuradio-core/src/lib/runtime/gr_tags.h +++ b/gnuradio-core/src/lib/runtime/gr_tags.h @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/runtime/gr_timer.h b/gnuradio-core/src/lib/runtime/gr_timer.h index fa3c06ece..e0b4cc437 100644 --- a/gnuradio-core/src/lib/runtime/gr_timer.h +++ b/gnuradio-core/src/lib/runtime/gr_timer.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -57,7 +57,7 @@ public: //! return absolute current time (seconds since the epoc). static double now (); - + /*! * \brief schedule timer to fire at abs_when * \param abs_when absolute time in seconds since the epoc. diff --git a/gnuradio-core/src/lib/runtime/gr_top_block.cc b/gnuradio-core/src/lib/runtime/gr_top_block.cc index 56d1352cd..e47473edd 100644 --- a/gnuradio-core/src/lib/runtime/gr_top_block.cc +++ b/gnuradio-core/src/lib/runtime/gr_top_block.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, @@ -30,48 +30,48 @@ #include <gr_io_signature.h> #include <iostream> -gr_top_block_sptr +gr_top_block_sptr gr_make_top_block(const std::string &name) { return gnuradio::get_initial_sptr(new gr_top_block(name)); } gr_top_block::gr_top_block(const std::string &name) - : gr_hier_block2(name, - gr_make_io_signature(0,0,0), + : gr_hier_block2(name, + gr_make_io_signature(0,0,0), gr_make_io_signature(0,0,0)) - + { d_impl = new gr_top_block_impl(this); } - + gr_top_block::~gr_top_block() { stop(); wait(); - + delete d_impl; } -void +void gr_top_block::start(int max_noutput_items) { d_impl->start(max_noutput_items); } -void +void gr_top_block::stop() { d_impl->stop(); } -void +void gr_top_block::wait() { d_impl->wait(); } -void +void gr_top_block::run(int max_noutput_items) { start(max_noutput_items); diff --git a/gnuradio-core/src/lib/runtime/gr_top_block.h b/gnuradio-core/src/lib/runtime/gr_top_block.h index 9d01ba3ef..04d1e95e5 100644 --- a/gnuradio-core/src/lib/runtime/gr_top_block.h +++ b/gnuradio-core/src/lib/runtime/gr_top_block.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,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, @@ -44,7 +44,7 @@ private: protected: gr_top_block(const std::string &name); - + public: ~gr_top_block(); @@ -72,7 +72,7 @@ public: * this to adjust the maximum latency a flowgraph can exhibit. */ void start(int max_noutput_items=100000); - + /*! * Stop the running flowgraph. Notifies each thread created by the * scheduler to shutdown, then returns to caller. Calling stop() on @@ -118,11 +118,11 @@ public: //! Get the number of max noutput_items in the flowgraph int max_noutput_items(); - + //! Set the maximum number of noutput_items in the flowgraph void set_max_noutput_items(int nmax); - gr_top_block_sptr to_top_block(); // Needed for Python/Guile type coercion + gr_top_block_sptr to_top_block(); // Needed for Python type coercion }; inline gr_top_block_sptr cast_to_top_block_sptr(gr_basic_block_sptr block) { diff --git a/gnuradio-core/src/lib/runtime/gr_top_block.i b/gnuradio-core/src/lib/runtime/gr_top_block.i index 70c627ffd..80a1b82ae 100644 --- a/gnuradio-core/src/lib/runtime/gr_top_block.i +++ b/gnuradio-core/src/lib/runtime/gr_top_block.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2008,2010 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, @@ -29,14 +29,14 @@ typedef boost::shared_ptr<gr_top_block> gr_top_block_sptr; // Hack to have a Python shim implementation of gr.top_block // that instantiates one of these and passes through calls %rename(top_block_swig) gr_make_top_block; -gr_top_block_sptr gr_make_top_block(const std::string name) +gr_top_block_sptr gr_make_top_block(const std::string name) throw (std::logic_error); class gr_top_block : public gr_hier_block2 { private: gr_top_block(const std::string &name); - + public: ~gr_top_block(); @@ -51,20 +51,20 @@ public: int max_noutput_items(); void set_max_noutput_items(int nmax); - gr_top_block_sptr to_top_block(); // Needed for Python/Guile type coercion + gr_top_block_sptr to_top_block(); // Needed for Python type coercion }; #ifdef SWIGPYTHON %inline %{ -void top_block_run_unlocked(gr_top_block_sptr r) throw (std::runtime_error) +void top_block_run_unlocked(gr_top_block_sptr r) throw (std::runtime_error) { Py_BEGIN_ALLOW_THREADS; // release global interpreter lock r->run(); Py_END_ALLOW_THREADS; // acquire global interpreter lock } -void top_block_wait_unlocked(gr_top_block_sptr r) throw (std::runtime_error) +void top_block_wait_unlocked(gr_top_block_sptr r) throw (std::runtime_error) { Py_BEGIN_ALLOW_THREADS; // release global interpreter lock r->wait(); @@ -73,34 +73,3 @@ void top_block_wait_unlocked(gr_top_block_sptr r) throw (std::runtime_error) %} #endif - -#ifdef SWIGGUILE - -%{ - struct tb_arg_holder { - gr_top_block_sptr tb; - }; - - static void * - tb_wait_shim(void *arg) - { - tb_arg_holder *a = (tb_arg_holder *)arg; - a->tb->wait(); - return 0; - } - -%} - -%inline %{ - - static void - top_block_wait_unlocked(gr_top_block_sptr r) throw (std::runtime_error) - { - tb_arg_holder a; - a.tb = r; - scm_without_guile(tb_wait_shim, (void *) &a); - } - -%} - -#endif diff --git a/gnuradio-core/src/lib/runtime/gr_top_block_impl.cc b/gnuradio-core/src/lib/runtime/gr_top_block_impl.cc index 0227d789c..4a3694163 100644 --- a/gnuradio-core/src/lib/runtime/gr_top_block_impl.cc +++ b/gnuradio-core/src/lib/runtime/gr_top_block_impl.cc @@ -77,7 +77,7 @@ make_scheduler(gr_flat_flowgraph_sptr ffg, int max_noutput_items) } -gr_top_block_impl::gr_top_block_impl(gr_top_block *owner) +gr_top_block_impl::gr_top_block_impl(gr_top_block *owner) : d_owner(owner), d_ffg(), d_state(IDLE), d_lock_count(0) { @@ -112,7 +112,7 @@ gr_top_block_impl::start(int max_noutput_items) d_state = RUNNING; } -void +void gr_top_block_impl::stop() { if (d_scheduler) @@ -165,7 +165,7 @@ gr_top_block_impl::restart() wait(); // Create new simple flow graph - gr_flat_flowgraph_sptr new_ffg = d_owner->flatten(); + gr_flat_flowgraph_sptr new_ffg = d_owner->flatten(); new_ffg->validate(); // check consistency, sanity, etc new_ffg->merge_connections(d_ffg); // reuse buffers, etc d_ffg = new_ffg; @@ -187,7 +187,7 @@ gr_top_block_impl::max_noutput_items() { return d_max_noutput_items; } - + void gr_top_block_impl::set_max_noutput_items(int nmax) { diff --git a/gnuradio-core/src/lib/runtime/gr_top_block_impl.h b/gnuradio-core/src/lib/runtime/gr_top_block_impl.h index d804e3f30..f55c3f021 100644 --- a/gnuradio-core/src/lib/runtime/gr_top_block_impl.h +++ b/gnuradio-core/src/lib/runtime/gr_top_block_impl.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,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, @@ -61,12 +61,12 @@ public: // Get the number of max noutput_items in the flowgraph int max_noutput_items(); - + // Set the maximum number of noutput_items in the flowgraph void set_max_noutput_items(int nmax); - + protected: - + enum tb_state { IDLE, RUNNING }; gr_top_block *d_owner; @@ -77,7 +77,7 @@ protected: tb_state d_state; int d_lock_count; int d_max_noutput_items; - + private: void restart(); }; diff --git a/gnuradio-core/src/lib/runtime/gr_tpb_detail.cc b/gnuradio-core/src/lib/runtime/gr_tpb_detail.cc index c6311ccaa..46b33d91f 100644 --- a/gnuradio-core/src/lib/runtime/gr_tpb_detail.cc +++ b/gnuradio-core/src/lib/runtime/gr_tpb_detail.cc @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -80,7 +80,7 @@ gr_tpb_detail::insert_tail(pmt::pmt_t msg) output_cond.notify_one(); } -pmt_t +pmt_t gr_tpb_detail::delete_head_nowait() { gruel::scoped_lock guard(mutex); @@ -97,7 +97,7 @@ gr_tpb_detail::delete_head_nowait() /* * Caller must already be holding the mutex */ -pmt_t +pmt_t gr_tpb_detail::delete_head_nowait_already_holding_mutex() { if (empty_p()) diff --git a/gnuradio-core/src/lib/runtime/gr_tpb_detail.h b/gnuradio-core/src/lib/runtime/gr_tpb_detail.h index 90908c2f5..b6e342dee 100644 --- a/gnuradio-core/src/lib/runtime/gr_tpb_detail.h +++ b/gnuradio-core/src/lib/runtime/gr_tpb_detail.h @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -62,11 +62,11 @@ public: input_changed = false; output_changed = false; } - + //! is the queue empty? bool empty_p() const { return msg_queue.empty(); } - //| Acquires and release the mutex + //| Acquires and release the mutex void insert_tail(pmt::pmt_t msg); /*! diff --git a/gnuradio-core/src/lib/runtime/gr_tpb_thread_body.cc b/gnuradio-core/src/lib/runtime/gr_tpb_thread_body.cc index d44c09aa6..a5aabb379 100644 --- a/gnuradio-core/src/lib/runtime/gr_tpb_thread_body.cc +++ b/gnuradio-core/src/lib/runtime/gr_tpb_thread_body.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -40,7 +40,7 @@ gr_tpb_thread_body::gr_tpb_thread_body(gr_block_sptr block, int max_noutput_item while (1){ boost::this_thread::interruption_point(); - + // handle any queued up messages while ((msg = d->d_tpb.delete_head_nowait())) block->dispatch_msg(msg); @@ -65,7 +65,7 @@ gr_tpb_thread_body::gr_tpb_thread_body(gr_block_sptr block, int max_noutput_item { gruel::scoped_lock guard(d->d_tpb.mutex); while (!d->d_tpb.input_changed){ - + // wait for input or message while(!d->d_tpb.input_changed && d->d_tpb.empty_p()) d->d_tpb.input_cond.wait(guard); @@ -80,12 +80,12 @@ gr_tpb_thread_body::gr_tpb_thread_body(gr_block_sptr block, int max_noutput_item } break; - + case gr_block_executor::BLKD_OUT: // Wait for output buffer space. { gruel::scoped_lock guard(d->d_tpb.mutex); while (!d->d_tpb.output_changed){ - + // wait for output room or message while(!d->d_tpb.output_changed && d->d_tpb.empty_p()) d->d_tpb.output_cond.wait(guard); diff --git a/gnuradio-core/src/lib/runtime/gr_tpb_thread_body.h b/gnuradio-core/src/lib/runtime/gr_tpb_thread_body.h index 3170b402e..f920663a2 100644 --- a/gnuradio-core/src/lib/runtime/gr_tpb_thread_body.h +++ b/gnuradio-core/src/lib/runtime/gr_tpb_thread_body.h @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/gnuradio-core/src/lib/runtime/gr_types.h b/gnuradio-core/src/lib/runtime/gr_types.h index fd5ca7758..ad6cee768 100644 --- a/gnuradio-core/src/lib/runtime/gr_types.h +++ b/gnuradio-core/src/lib/runtime/gr_types.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -37,7 +37,7 @@ typedef std::vector<void *> gr_vector_void_star; typedef std::vector<const void *> gr_vector_const_void_star; /* - * #include <config.h> must be placed beforehand + * #include <config.h> must be placed beforehand * in the source file including gr_types.h for * the following to work correctly */ diff --git a/gnuradio-core/src/lib/runtime/gr_unittests.h b/gnuradio-core/src/lib/runtime/gr_unittests.h index 7161b31e7..9fbf228cd 100644 --- a/gnuradio-core/src/lib/runtime/gr_unittests.h +++ b/gnuradio-core/src/lib/runtime/gr_unittests.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/runtime/gr_vmcircbuf.cc b/gnuradio-core/src/lib/runtime/gr_vmcircbuf.cc index 7138605c9..522d9515d 100644 --- a/gnuradio-core/src/lib/runtime/gr_vmcircbuf.cc +++ b/gnuradio-core/src/lib/runtime/gr_vmcircbuf.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003 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, @@ -135,7 +135,7 @@ static bool check_mapping (gr_vmcircbuf *c, int counter, int size, const char *msg, bool verbose) { bool ok = true; - + if (verbose) fprintf (stderr, "... %s", msg); @@ -246,7 +246,7 @@ gr_vmcircbuf_sysconfig::test_factory (gr_vmcircbuf_factory *f, int verbose) { // Install local signal handlers for SIGSEGV and SIGBUS. // If something goes wrong, these signals may be invoked. - + #ifdef SIGSEGV gr_local_sighandler sigsegv (SIGSEGV, gr_local_sighandler::throw_signal); #endif @@ -285,7 +285,7 @@ bool gr_vmcircbuf_sysconfig::test_all_factories (int verbose) { bool ok = false; - + std::vector<gr_vmcircbuf_factory *> all = all_factories (); for (unsigned int i = 0; i < all.size (); i++) diff --git a/gnuradio-core/src/lib/runtime/gr_vmcircbuf.h b/gnuradio-core/src/lib/runtime/gr_vmcircbuf.h index 0e67d405b..45c6f969c 100644 --- a/gnuradio-core/src/lib/runtime/gr_vmcircbuf.h +++ b/gnuradio-core/src/lib/runtime/gr_vmcircbuf.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003 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, @@ -88,10 +88,10 @@ class GR_CORE_API gr_vmcircbuf_sysconfig { */ static gr_vmcircbuf_factory *get_default_factory (); - + static int granularity () { return get_default_factory()->granularity(); } static gr_vmcircbuf *make (int size) { return get_default_factory()->make(size); } - + // N.B. not all factories are guaranteed to work. // It's too hard to check everything at config time, so we check at runtime diff --git a/gnuradio-core/src/lib/runtime/gr_vmcircbuf_mmap_shm_open.cc b/gnuradio-core/src/lib/runtime/gr_vmcircbuf_mmap_shm_open.cc index 4f7ae39cd..3d170081d 100644 --- a/gnuradio-core/src/lib/runtime/gr_vmcircbuf_mmap_shm_open.cc +++ b/gnuradio-core/src/lib/runtime/gr_vmcircbuf_mmap_shm_open.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -57,7 +57,7 @@ gr_vmcircbuf_mmap_shm_open::gr_vmcircbuf_mmap_shm_open (int size) int shm_fd = -1; char seg_name[1024]; static bool portable_format = true; - + // open a new named shared memory segment while (1){ @@ -65,7 +65,7 @@ gr_vmcircbuf_mmap_shm_open::gr_vmcircbuf_mmap_shm_open (int size) // This is the POSIX recommended "portable format". // Of course the "portable format" doesn't work on some systems... - + snprintf (seg_name, sizeof (seg_name), "/gnuradio-%d-%d", getpid (), s_seg_counter); } @@ -73,7 +73,7 @@ gr_vmcircbuf_mmap_shm_open::gr_vmcircbuf_mmap_shm_open (int size) // Where the "portable format" doesn't work, we try building // a full filesystem pathname pointing into a suitable temporary directory. - + snprintf (seg_name, sizeof (seg_name), "%s/gnuradio-%d-%d", gr_tmp_path (), getpid (), s_seg_counter); } @@ -149,7 +149,7 @@ gr_vmcircbuf_mmap_shm_open::gr_vmcircbuf_mmap_shm_open (int size) close (shm_fd); // fd no longer needed. The mapping is retained. - if (shm_unlink (seg_name) == -1){ // unlink the seg_name. + if (shm_unlink (seg_name) == -1){ // unlink the seg_name. perror ("gr_vmcircbuf_mmap_shm_open: shm_unlink"); throw std::runtime_error ("gr_vmcircbuf_mmap_shm_open"); } @@ -163,7 +163,7 @@ gr_vmcircbuf_mmap_shm_open::gr_vmcircbuf_mmap_shm_open (int size) gr_vmcircbuf_mmap_shm_open::~gr_vmcircbuf_mmap_shm_open () { -#if defined(HAVE_MMAP) +#if defined(HAVE_MMAP) if (munmap (d_base, 2 * d_size) == -1){ perror ("gr_vmcircbuf_mmap_shm_open: munmap (2)"); } diff --git a/gnuradio-core/src/lib/runtime/gr_vmcircbuf_mmap_shm_open.h b/gnuradio-core/src/lib/runtime/gr_vmcircbuf_mmap_shm_open.h index 002f5b434..bcbbbac42 100644 --- a/gnuradio-core/src/lib/runtime/gr_vmcircbuf_mmap_shm_open.h +++ b/gnuradio-core/src/lib/runtime/gr_vmcircbuf_mmap_shm_open.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003 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, diff --git a/gnuradio-core/src/lib/runtime/gr_vmcircbuf_mmap_tmpfile.cc b/gnuradio-core/src/lib/runtime/gr_vmcircbuf_mmap_tmpfile.cc index ee8b0c485..35de64699 100644 --- a/gnuradio-core/src/lib/runtime/gr_vmcircbuf_mmap_tmpfile.cc +++ b/gnuradio-core/src/lib/runtime/gr_vmcircbuf_mmap_tmpfile.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -56,7 +56,7 @@ gr_vmcircbuf_mmap_tmpfile::gr_vmcircbuf_mmap_tmpfile (int size) int seg_fd = -1; char seg_name[1024]; - + static int s_seg_counter = 0; @@ -121,7 +121,7 @@ gr_vmcircbuf_mmap_tmpfile::gr_vmcircbuf_mmap_tmpfile (int size) if (second_copy == MAP_FAILED){ munmap(first_copy, size); // cleanup - close (seg_fd); + close (seg_fd); perror ("gr_vmcircbuf_mmap_tmpfile: mmap (2)"); throw std::runtime_error ("gr_vmcircbuf_mmap_tmpfile"); } @@ -130,7 +130,7 @@ gr_vmcircbuf_mmap_tmpfile::gr_vmcircbuf_mmap_tmpfile (int size) if ((char *) second_copy != (char *) first_copy + size){ munmap(first_copy, size); // cleanup munmap(second_copy, size); - close (seg_fd); + close (seg_fd); perror ("gr_vmcircbuf_mmap_tmpfile: non-contiguous second copy"); throw std::runtime_error ("gr_vmcircbuf_mmap_tmpfile"); } diff --git a/gnuradio-core/src/lib/runtime/gr_vmcircbuf_mmap_tmpfile.h b/gnuradio-core/src/lib/runtime/gr_vmcircbuf_mmap_tmpfile.h index a2ed6b87b..28ff31490 100644 --- a/gnuradio-core/src/lib/runtime/gr_vmcircbuf_mmap_tmpfile.h +++ b/gnuradio-core/src/lib/runtime/gr_vmcircbuf_mmap_tmpfile.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003 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, diff --git a/gnuradio-core/src/lib/runtime/gr_vmcircbuf_sysv_shm.cc b/gnuradio-core/src/lib/runtime/gr_vmcircbuf_sysv_shm.cc index 88869dc75..d9cf75e70 100644 --- a/gnuradio-core/src/lib/runtime/gr_vmcircbuf_sysv_shm.cc +++ b/gnuradio-core/src/lib/runtime/gr_vmcircbuf_sysv_shm.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003 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, @@ -97,7 +97,7 @@ gr_vmcircbuf_sysv_shm::gr_vmcircbuf_sysv_shm (int size) // some other segment to first_copy or first_copoy + size between // our detach and attach, the attaches below could fail [I've never // seen it fail for this reason]. - + shmdt (first_copy); // first read-only guard page diff --git a/gnuradio-core/src/lib/runtime/gr_vmcircbuf_sysv_shm.h b/gnuradio-core/src/lib/runtime/gr_vmcircbuf_sysv_shm.h index c7a008581..9f5c04f0d 100644 --- a/gnuradio-core/src/lib/runtime/gr_vmcircbuf_sysv_shm.h +++ b/gnuradio-core/src/lib/runtime/gr_vmcircbuf_sysv_shm.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003 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, diff --git a/gnuradio-core/src/lib/runtime/qa_block_tags.cc b/gnuradio-core/src/lib/runtime/qa_block_tags.cc index ab5840c6d..4fa0a0323 100644 --- a/gnuradio-core/src/lib/runtime/qa_block_tags.cc +++ b/gnuradio-core/src/lib/runtime/qa_block_tags.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, @@ -57,7 +57,7 @@ qa_block_tags::t0 () gr_block_sptr src (gr_make_null_source(sizeof(int))); gr_block_sptr head (gr_make_head(sizeof(int), N)); gr_block_sptr snk (gr_make_null_sink(sizeof(int))); - + tb->connect(src, 0, head, 0); tb->connect(head, 0, snk, 0); @@ -89,7 +89,7 @@ qa_block_tags::t1 () gr_annotator_alltoall_sptr ann4 (gr_make_annotator_alltoall(10000, sizeof(int))); gr_block_sptr snk0 (gr_make_null_sink(sizeof(int))); gr_block_sptr snk1 (gr_make_null_sink(sizeof(int))); - + tb->connect(src, 0, head, 0); tb->connect(head, 0, ann0, 0); @@ -140,7 +140,7 @@ qa_block_tags::t1 () expected_tags4[7] = mp(pmt_from_uint64(30000), mp(str0.str()), mp("seq"), mp(7)); std::cout << std::endl << "qa_block_tags::t1" << std::endl; - + // For annotator 3, we know it gets tags from ann0 and ann1, test this for(size_t i = 0; i < tags3.size(); i++) { std::cout << "tags3[" << i << "] = " << tags3[i] << "\t\t" << expected_tags3[i] << std::endl; @@ -171,7 +171,7 @@ qa_block_tags::t2 () gr_block_sptr snk0 (gr_make_null_sink(sizeof(int))); gr_block_sptr snk1 (gr_make_null_sink(sizeof(int))); gr_block_sptr snk2 (gr_make_null_sink(sizeof(int))); - + tb->connect(src, 0, head, 0); tb->connect(head, 0, ann0, 0); @@ -271,7 +271,7 @@ qa_block_tags::t3 () gr_annotator_1to1_sptr ann4 (gr_make_annotator_1to1(10000, sizeof(int))); gr_block_sptr snk0 (gr_make_null_sink(sizeof(int))); gr_block_sptr snk1 (gr_make_null_sink(sizeof(int))); - + tb->connect(src, 0, head, 0); tb->connect(head, 0, ann0, 0); tb->connect(head, 0, ann0, 1); @@ -286,7 +286,7 @@ qa_block_tags::t3 () tb->run(); - + std::vector<gr_tag_t> tags0 = ann0->data(); std::vector<gr_tag_t> tags3 = ann3->data(); std::vector<gr_tag_t> tags4 = ann4->data(); @@ -324,7 +324,7 @@ qa_block_tags::t3 () expected_tags4[7] = mp(pmt_from_uint64(30000), mp(str0.str()), mp("seq"), mp(7)); std::cout << std::endl << "qa_block_tags::t3" << std::endl; - + // For annotator 3, we know it gets tags from ann0 and ann1, test this for(size_t i = 0; i < tags3.size(); i++) { std::cout << "tags3[" << i << "] = " << tags3[i] << "\t\t" << expected_tags3[i] << std::endl; diff --git a/gnuradio-core/src/lib/runtime/qa_block_tags.h b/gnuradio-core/src/lib/runtime/qa_block_tags.h index b0d211390..6b7e5975d 100644 --- a/gnuradio-core/src/lib/runtime/qa_block_tags.h +++ b/gnuradio-core/src/lib/runtime/qa_block_tags.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, diff --git a/gnuradio-core/src/lib/runtime/qa_gr_block.cc b/gnuradio-core/src/lib/runtime/qa_gr_block.cc index ea3f3e14c..aeab5b74a 100644 --- a/gnuradio-core/src/lib/runtime/qa_gr_block.cc +++ b/gnuradio-core/src/lib/runtime/qa_gr_block.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/runtime/qa_gr_block.h b/gnuradio-core/src/lib/runtime/qa_gr_block.h index 24634998e..14c7c40d1 100644 --- a/gnuradio-core/src/lib/runtime/qa_gr_block.h +++ b/gnuradio-core/src/lib/runtime/qa_gr_block.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/runtime/qa_gr_buffer.cc b/gnuradio-core/src/lib/runtime/qa_gr_buffer.cc index 7434cf657..c74baf398 100644 --- a/gnuradio-core/src/lib/runtime/qa_gr_buffer.cc +++ b/gnuradio-core/src/lib/runtime/qa_gr_buffer.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -65,7 +65,7 @@ t0_body () sa = buf->space_available (); CPPUNIT_ASSERT_EQUAL (last_sa, sa); last_sa = sa; - + int *p = (int *) buf->write_pointer (); CPPUNIT_ASSERT (p != 0); @@ -80,7 +80,7 @@ t0_body () // test single writer, single reader // -static void +static void t1_body () { int nitems = 4000 / sizeof (int); @@ -89,7 +89,7 @@ t1_body () gr_buffer_sptr buf(gr_make_buffer(nitems, sizeof (int), gr_block_sptr())); gr_buffer_reader_sptr r1 (gr_buffer_add_reader (buf, 0, gr_block_sptr())); - + int sa; @@ -106,7 +106,7 @@ t1_body () } buf->update_write_pointer (sa/3); - + // write the next 1/3 (1/2 of what's left) sa = buf->space_available (); @@ -125,7 +125,7 @@ t1_body () int ia = r1->items_available (); CPPUNIT_ASSERT_EQUAL (write_counter, ia); - + int *rp = (int *) r1->read_pointer (); CPPUNIT_ASSERT (rp != 0); @@ -159,7 +159,7 @@ t2_body () { // 64K is the largest granularity we've seen so far (MS windows file mapping). // This allows a bit of "white box testing" - + int nitems = (64 * (1L << 10)) / sizeof (int); // 64K worth of ints gr_buffer_sptr buf(gr_make_buffer (nitems, sizeof (int), gr_block_sptr())); @@ -170,7 +170,7 @@ t2_body () int n; int *wp = 0; int *rp = 0; - + // Write 3/4 of buffer n = (int) (buf->space_available () * 0.75); @@ -203,7 +203,7 @@ t2_body () for (int i = 0; i < n; i++) *wp++ = write_counter++; buf->update_write_pointer (n); - + // now read it all m = r1->items_available (); diff --git a/gnuradio-core/src/lib/runtime/qa_gr_buffer.h b/gnuradio-core/src/lib/runtime/qa_gr_buffer.h index 7e812e721..2937c24b6 100644 --- a/gnuradio-core/src/lib/runtime/qa_gr_buffer.h +++ b/gnuradio-core/src/lib/runtime/qa_gr_buffer.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/runtime/qa_gr_flowgraph.cc b/gnuradio-core/src/lib/runtime/qa_gr_flowgraph.cc index c883c1678..cce83cb0a 100644 --- a/gnuradio-core/src/lib/runtime/qa_gr_flowgraph.cc +++ b/gnuradio-core/src/lib/runtime/qa_gr_flowgraph.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, @@ -223,7 +223,7 @@ void qa_gr_flowgraph::t16_partition() gr_block_sptr nop31 = gr_make_nop(sizeof(int)); gr_block_sptr nop32 = gr_make_nop(sizeof(int)); - + // Build disjoint graph #1 fg->connect(nop11, 0, nop12, 0); fg->connect(nop12, 0, nop13, 0); diff --git a/gnuradio-core/src/lib/runtime/qa_gr_flowgraph.h b/gnuradio-core/src/lib/runtime/qa_gr_flowgraph.h index 2253afccd..2c2686f71 100644 --- a/gnuradio-core/src/lib/runtime/qa_gr_flowgraph.h +++ b/gnuradio-core/src/lib/runtime/qa_gr_flowgraph.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, @@ -27,10 +27,10 @@ #include <cppunit/TestCase.h> #include <stdexcept> -class qa_gr_flowgraph : public CppUnit::TestCase +class qa_gr_flowgraph : public CppUnit::TestCase { CPPUNIT_TEST_SUITE(qa_gr_flowgraph); - + CPPUNIT_TEST(t0); CPPUNIT_TEST(t1_connect); CPPUNIT_TEST(t2_connect_invalid_src_port_neg); diff --git a/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.cc b/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.cc index d9d89ce2c..9844d3381 100644 --- a/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.cc +++ b/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 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, @@ -39,14 +39,14 @@ void qa_gr_hier_block2::test_make() CPPUNIT_ASSERT(src1); CPPUNIT_ASSERT_EQUAL(std::string("test"), src1->name()); - CPPUNIT_ASSERT_EQUAL(1 * (int) sizeof(int), + CPPUNIT_ASSERT_EQUAL(1 * (int) sizeof(int), src1->input_signature()->sizeof_stream_item(0)); CPPUNIT_ASSERT_EQUAL(1, src1->input_signature()->min_streams()); CPPUNIT_ASSERT_EQUAL(1, src1->input_signature()->max_streams()); - CPPUNIT_ASSERT_EQUAL(1 * (int) sizeof(int), + CPPUNIT_ASSERT_EQUAL(1 * (int) sizeof(int), src1->output_signature()->sizeof_stream_item(0)); CPPUNIT_ASSERT_EQUAL(1, src1->output_signature()->min_streams()); diff --git a/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.h b/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.h index 3870b9f0f..653cd2725 100644 --- a/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.h +++ b/gnuradio-core/src/lib/runtime/qa_gr_hier_block2.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -27,12 +27,12 @@ #include <cppunit/TestCase.h> #include <stdexcept> -class qa_gr_hier_block2 : public CppUnit::TestCase +class qa_gr_hier_block2 : public CppUnit::TestCase { CPPUNIT_TEST_SUITE(qa_gr_hier_block2); CPPUNIT_TEST(test_make); - + CPPUNIT_TEST_SUITE_END(); private: diff --git a/gnuradio-core/src/lib/runtime/qa_gr_hier_block2_derived.cc b/gnuradio-core/src/lib/runtime/qa_gr_hier_block2_derived.cc index fe5f3a751..060c4e244 100644 --- a/gnuradio-core/src/lib/runtime/qa_gr_hier_block2_derived.cc +++ b/gnuradio-core/src/lib/runtime/qa_gr_hier_block2_derived.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,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, @@ -78,7 +78,7 @@ void qa_gr_hier_block2_derived::test_1() gr_block_sptr head(gr_make_head(sizeof(int), 1000)); gr_derived_block_sptr blk(gr_make_derived_block()); gr_block_sptr dst(gr_make_null_sink(sizeof(int))); - + tb->connect(src, 0, head, 0); tb->connect(head, 0, blk, 0); tb->connect(blk, 0, dst, 0); diff --git a/gnuradio-core/src/lib/runtime/qa_gr_hier_block2_derived.h b/gnuradio-core/src/lib/runtime/qa_gr_hier_block2_derived.h index 5a27b1b2d..8e0a1880c 100644 --- a/gnuradio-core/src/lib/runtime/qa_gr_hier_block2_derived.h +++ b/gnuradio-core/src/lib/runtime/qa_gr_hier_block2_derived.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,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, @@ -28,7 +28,7 @@ #include <stdexcept> // Declare a QA test case -class qa_gr_hier_block2_derived : public CppUnit::TestCase +class qa_gr_hier_block2_derived : public CppUnit::TestCase { CPPUNIT_TEST_SUITE(qa_gr_hier_block2_derived); CPPUNIT_TEST(test_1); diff --git a/gnuradio-core/src/lib/runtime/qa_gr_io_signature.cc b/gnuradio-core/src/lib/runtime/qa_gr_io_signature.cc index 07abe10b3..c1737ffb8 100644 --- a/gnuradio-core/src/lib/runtime/qa_gr_io_signature.cc +++ b/gnuradio-core/src/lib/runtime/qa_gr_io_signature.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/runtime/qa_gr_io_signature.h b/gnuradio-core/src/lib/runtime/qa_gr_io_signature.h index 02fc9ddc4..9cd6bb524 100644 --- a/gnuradio-core/src/lib/runtime/qa_gr_io_signature.h +++ b/gnuradio-core/src/lib/runtime/qa_gr_io_signature.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/runtime/qa_gr_top_block.cc b/gnuradio-core/src/lib/runtime/qa_gr_top_block.cc index 52677f0de..cc7b7c720 100644 --- a/gnuradio-core/src/lib/runtime/qa_gr_top_block.cc +++ b/gnuradio-core/src/lib/runtime/qa_gr_top_block.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, diff --git a/gnuradio-core/src/lib/runtime/qa_gr_top_block.h b/gnuradio-core/src/lib/runtime/qa_gr_top_block.h index 278b5ffb4..b223633e5 100644 --- a/gnuradio-core/src/lib/runtime/qa_gr_top_block.h +++ b/gnuradio-core/src/lib/runtime/qa_gr_top_block.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, @@ -27,10 +27,10 @@ #include <cppunit/TestCase.h> #include <stdexcept> -class qa_gr_top_block : public CppUnit::TestCase +class qa_gr_top_block : public CppUnit::TestCase { CPPUNIT_TEST_SUITE(qa_gr_top_block); - + CPPUNIT_TEST(t0); CPPUNIT_TEST(t1_run); CPPUNIT_TEST(t2_start_stop_wait); diff --git a/gnuradio-core/src/lib/runtime/qa_gr_vmcircbuf.cc b/gnuradio-core/src/lib/runtime/qa_gr_vmcircbuf.cc index 2e787ac28..e3b36d882 100644 --- a/gnuradio-core/src/lib/runtime/qa_gr_vmcircbuf.cc +++ b/gnuradio-core/src/lib/runtime/qa_gr_vmcircbuf.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -35,6 +35,6 @@ qa_gr_vmcircbuf::test_all () int verbose = 1; // summary bool ok = gr_vmcircbuf_sysconfig::test_all_factories (verbose); - + CPPUNIT_ASSERT_EQUAL (true, ok); } diff --git a/gnuradio-core/src/lib/runtime/qa_gr_vmcircbuf.h b/gnuradio-core/src/lib/runtime/qa_gr_vmcircbuf.h index 42f6a1917..3576660d5 100644 --- a/gnuradio-core/src/lib/runtime/qa_gr_vmcircbuf.h +++ b/gnuradio-core/src/lib/runtime/qa_gr_vmcircbuf.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/runtime/qa_runtime.cc b/gnuradio-core/src/lib/runtime/qa_runtime.cc index c0bee8ea0..5e62c7991 100644 --- a/gnuradio-core/src/lib/runtime/qa_runtime.cc +++ b/gnuradio-core/src/lib/runtime/qa_runtime.cc @@ -1,18 +1,18 @@ /* * Copyright 2002,2007,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -56,6 +56,6 @@ qa_runtime::suite () s->addTest (qa_gr_buffer::suite ()); s->addTest (qa_block_tags::suite ()); s->addTest (qa_set_msg_handler::suite ()); - + return s; } diff --git a/gnuradio-core/src/lib/runtime/qa_runtime.h b/gnuradio-core/src/lib/runtime/qa_runtime.h index e1038aaf6..da71cbd0f 100644 --- a/gnuradio-core/src/lib/runtime/qa_runtime.h +++ b/gnuradio-core/src/lib/runtime/qa_runtime.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gnuradio-core/src/lib/runtime/qa_set_msg_handler.cc b/gnuradio-core/src/lib/runtime/qa_set_msg_handler.cc index 35ef5527e..25ae0b1e1 100644 --- a/gnuradio-core/src/lib/runtime/qa_set_msg_handler.cc +++ b/gnuradio-core/src/lib/runtime/qa_set_msg_handler.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/runtime/qa_set_msg_handler.h b/gnuradio-core/src/lib/runtime/qa_set_msg_handler.h index e73fffbcd..60277a12c 100644 --- a/gnuradio-core/src/lib/runtime/qa_set_msg_handler.h +++ b/gnuradio-core/src/lib/runtime/qa_set_msg_handler.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -27,10 +27,10 @@ #include <cppunit/TestCase.h> #include <stdexcept> -class qa_set_msg_handler : public CppUnit::TestCase +class qa_set_msg_handler : public CppUnit::TestCase { CPPUNIT_TEST_SUITE(qa_set_msg_handler); - + CPPUNIT_TEST(t0); CPPUNIT_TEST_SUITE_END(); diff --git a/gnuradio-core/src/lib/runtime/runtime.i b/gnuradio-core/src/lib/runtime/runtime.i index 9bf2df31e..8e35df834 100644 --- a/gnuradio-core/src/lib/runtime/runtime.i +++ b/gnuradio-core/src/lib/runtime/runtime.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/runtime/test_shared_block_ptr.cc b/gnuradio-core/src/lib/runtime/test_shared_block_ptr.cc index e541c5402..bb4e86322 100644 --- a/gnuradio-core/src/lib/runtime/test_shared_block_ptr.cc +++ b/gnuradio-core/src/lib/runtime/test_shared_block_ptr.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -23,7 +23,7 @@ #include <gr_shared_block_sptr.h> #include <gr_vector_source_i.h> -gr_block_sptr +gr_block_sptr foo (gr_vector_source_i_sptr s) { return gr_block_sptr (s); @@ -38,14 +38,14 @@ bar (gr_vector_source_i *s) return gr_vector_source_i_ptrX (s); } -gr_block_sptr +gr_block_sptr baz_1 (gr_vector_source_i_ptrX s) { return gr_block_sptr (s); } #if 0 -gr_block_sptr +gr_block_sptr baz_2 (gr_vector_source_i_ptrX s) { return s.block_sptr (); diff --git a/gnuradio-core/src/lib/swig/.gitignore b/gnuradio-core/src/lib/swig/.gitignore deleted file mode 100644 index a6f145618..000000000 --- a/gnuradio-core/src/lib/swig/.gitignore +++ /dev/null @@ -1,49 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/swigrun.py -/swigrun_wrap.c -/Makefile.swigdeps.new -gnuradio_core_filter.cc -gnuradio_core_filter.d -gnuradio_core_filter.h -gnuradio_core_filter.py -gnuradio_core_filter.scm -gnuradio_core_filter-primitive.scm -gnuradio_core_general.cc -gnuradio_core_general.d -gnuradio_core_general.h -gnuradio_core_general.py -gnuradio_core_general.scm -gnuradio_core_general-primitive.scm -gnuradio_core_gengen.cc -gnuradio_core_gengen.d -gnuradio_core_gengen.h -gnuradio_core_gengen.py -gnuradio_core_gengen.scm -gnuradio_core_gengen-primitive.scm -gnuradio_core_hier.cc -gnuradio_core_hier.d -gnuradio_core_hier.h -gnuradio_core_hier.py -gnuradio_core_hier.scm -gnuradio_core_hier-primitive.scm -gnuradio_core_io.cc -gnuradio_core_io.d -gnuradio_core_io.h -gnuradio_core_io.py -gnuradio_core_io.scm -gnuradio_core_io-primitive.scm -gnuradio_core_runtime.cc -gnuradio_core_runtime.d -gnuradio_core_runtime.h -gnuradio_core_runtime.py -gnuradio_core_runtime.scm -gnuradio_core_runtime-primitive.scm - diff --git a/gnuradio-core/src/lib/swig/CMakeLists.txt b/gnuradio-core/src/lib/swig/CMakeLists.txt index bb7ce9a81..d3c381b4b 100644 --- a/gnuradio-core/src/lib/swig/CMakeLists.txt +++ b/gnuradio-core/src/lib/swig/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2010-2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/swig/Makefile.am b/gnuradio-core/src/lib/swig/Makefile.am deleted file mode 100644 index 91c1746e6..000000000 --- a/gnuradio-core/src/lib/swig/Makefile.am +++ /dev/null @@ -1,109 +0,0 @@ -# -# Copyright 2001,2003,2004,2005,2006,2007,2008,2009,2010 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 -include $(top_srcdir)/Makefile.swig - -AM_CPPFLAGS = -I$(srcdir) $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) \ - $(WITH_INCLUDES) - -# ---------------------------------------------------------------- -# We've split the previously monstrous gnuradio_core into 6 -# smaller pieces. This reduces compile time coupling and creates -# smaller pieces for the compiler to digest. prior to this change, on -# X86_64, g++'s resident set size was 650MB! -# ---------------------------------------------------------------- - -TOP_SWIG_DOC_IFILES = \ - filter_swig_doc.i \ - general_swig_doc.i \ - gengen_swig_doc.i \ - hier_swig_doc.i \ - io_swig_doc.i \ - runtime_swig_doc.i - -TOP_SWIG_IFILES = \ - $(TOP_SWIG_DOC_IFILES) \ - gnuradio_core_runtime.i \ - gnuradio_core_general.i \ - gnuradio_core_gengen.i \ - gnuradio_core_filter.i \ - gnuradio_core_io.i \ - gnuradio_core_hier.i - -BUILT_SOURCES += \ - $(TOP_SWIG_DOC_IFILES) - -EXTRA_DIST += \ - $(TOP_SWIG_DOC_IFILES) - -$(TOP_SWIG_DOC_IFILES): - `echo "" > $@` - -# SWIG headers get installed in ${prefix}/include/gnuradio/swig -swiginclude_HEADERS = \ - gnuradio.i \ - gr_swig_block_magic.i \ - gr_shared_ptr.i \ - $(TOP_SWIG_DOC_IFILES) - -# SWIG headers that get installed in ${prefix}/include/gnuradio/swig/... -nobase_swiginclude_HEADERS = \ - guile/std_complex.i \ - guile/std_vector.i - - -# special install for this top-level Python script which includes all -# of the split Python libraries. -ourpythondir = $(grpythondir)/gr -ourpython_PYTHON = gnuradio_core.py - -# ---------------------------------------------------------------- -# FIXME As of swig 1.3.31, this still seems to be required... -# gnuradio_swig_bug_workaround.h : gnuradio_core_runtime.py $(srcdir)/gen-swig-bug-fix -# $(PYTHON) $(srcdir)/gen-swig-bug-fix python/gnuradio_core_runtime.cc $@ - -EXTRA_DIST += gen-swig-bug-fix - -# C/C++ headers get installed in ${prefix}/include/gnuradio -grinclude_HEADERS = gnuradio_swig_bug_workaround.h - - -# Install so that they end up available as: -# import gnuradio.gr -# This ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio/gr -gnuradio_core_runtime_pythondir_category = gnuradio/gr -gnuradio_core_general_pythondir_category = gnuradio/gr -gnuradio_core_gengen_pythondir_category = gnuradio/gr -gnuradio_core_filter_pythondir_category = gnuradio/gr -gnuradio_core_io_pythondir_category = gnuradio/gr -gnuradio_core_hier_pythondir_category = gnuradio/gr - -# additional libraries for linking with each SWIG-generated library -gnuradio_core_runtime_la_swig_libadd = $(GNURADIO_CORE_LA) -gnuradio_core_general_la_swig_libadd = $(GNURADIO_CORE_LA) -gnuradio_core_gengen_la_swig_libadd = $(GNURADIO_CORE_LA) -gnuradio_core_filter_la_swig_libadd = $(GNURADIO_CORE_LA) -gnuradio_core_io_la_swig_libadd = $(GNURADIO_CORE_LA) -gnuradio_core_hier_la_swig_libadd = $(GNURADIO_CORE_LA) - -SWIG_GUILE_FLAGS += -DIN_GNURADIO_CORE diff --git a/gnuradio-core/src/lib/swig/Makefile.swig.gen b/gnuradio-core/src/lib/swig/Makefile.swig.gen deleted file mode 100644 index cede68817..000000000 --- a/gnuradio-core/src/lib/swig/Makefile.swig.gen +++ /dev/null @@ -1,870 +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 gnuradio_core_runtime.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/gnuradio_core_runtime -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/gnuradio_core_runtime -## -## 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. - -gnuradio_core_runtime_pythondir_category ?= gnuradio/gnuradio_core_runtime -gnuradio_core_runtime_pylibdir_category ?= $(gnuradio_core_runtime_pythondir_category) -gnuradio_core_runtime_pythondir = $(pythondir)/$(gnuradio_core_runtime_pythondir_category) -gnuradio_core_runtime_pylibdir = $(pyexecdir)/$(gnuradio_core_runtime_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -gnuradio_core_runtime_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/gnuradio_core_runtime -# FIXME: determince whether these should be installed with gnuradio. -gnuradio_core_runtime_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -gnuradio_core_runtime_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 > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -gnuradio_core_runtime_swiginclude_HEADERS = \ - gnuradio_core_runtime.i \ - $(gnuradio_core_runtime_swiginclude_headers) - -if PYTHON -gnuradio_core_runtime_pylib_LTLIBRARIES = \ - _gnuradio_core_runtime.la - -_gnuradio_core_runtime_la_SOURCES = \ - python/gnuradio_core_runtime.cc \ - $(gnuradio_core_runtime_la_swig_sources) - -gnuradio_core_runtime_python_PYTHON = \ - gnuradio_core_runtime.py \ - $(gnuradio_core_runtime_python) - -_gnuradio_core_runtime_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(gnuradio_core_runtime_la_swig_libadd) - -_gnuradio_core_runtime_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(gnuradio_core_runtime_la_swig_ldflags) - -_gnuradio_core_runtime_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(gnuradio_core_runtime_la_swig_cxxflags) - -python/gnuradio_core_runtime.cc: gnuradio_core_runtime.py -gnuradio_core_runtime.py: gnuradio_core_runtime.i - -# Include the python dependencies for this file --include python/gnuradio_core_runtime.d - -endif # end of if python - -if GUILE - -gnuradio_core_runtime_scmlib_LTLIBRARIES = \ - libguile-gnuradio-gnuradio_core_runtime.la -libguile_gnuradio_gnuradio_core_runtime_la_SOURCES = \ - guile/gnuradio_core_runtime.cc \ - $(gnuradio_core_runtime_la_swig_sources) -nobase_gnuradio_core_runtime_scm_DATA = \ - gnuradio/gnuradio_core_runtime.scm \ - gnuradio/gnuradio_core_runtime-primitive.scm -libguile_gnuradio_gnuradio_core_runtime_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(gnuradio_core_runtime_la_swig_libadd) -libguile_gnuradio_gnuradio_core_runtime_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(gnuradio_core_runtime_la_swig_ldflags) -libguile_gnuradio_gnuradio_core_runtime_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(gnuradio_core_runtime_la_swig_cxxflags) - -guile/gnuradio_core_runtime.cc: gnuradio/gnuradio_core_runtime.scm -gnuradio/gnuradio_core_runtime.scm: gnuradio_core_runtime.i -gnuradio/gnuradio_core_runtime-primitive.scm: gnuradio/gnuradio_core_runtime.scm - -# Include the guile dependencies for this file --include guile/gnuradio_core_runtime.d - -endif # end of GUILE - - -# -*- 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 gnuradio_core_general.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/gnuradio_core_general -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/gnuradio_core_general -## -## 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. - -gnuradio_core_general_pythondir_category ?= gnuradio/gnuradio_core_general -gnuradio_core_general_pylibdir_category ?= $(gnuradio_core_general_pythondir_category) -gnuradio_core_general_pythondir = $(pythondir)/$(gnuradio_core_general_pythondir_category) -gnuradio_core_general_pylibdir = $(pyexecdir)/$(gnuradio_core_general_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -gnuradio_core_general_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/gnuradio_core_general -# FIXME: determince whether these should be installed with gnuradio. -gnuradio_core_general_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -gnuradio_core_general_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 > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -gnuradio_core_general_swiginclude_HEADERS = \ - gnuradio_core_general.i \ - $(gnuradio_core_general_swiginclude_headers) - -if PYTHON -gnuradio_core_general_pylib_LTLIBRARIES = \ - _gnuradio_core_general.la - -_gnuradio_core_general_la_SOURCES = \ - python/gnuradio_core_general.cc \ - $(gnuradio_core_general_la_swig_sources) - -gnuradio_core_general_python_PYTHON = \ - gnuradio_core_general.py \ - $(gnuradio_core_general_python) - -_gnuradio_core_general_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(gnuradio_core_general_la_swig_libadd) - -_gnuradio_core_general_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(gnuradio_core_general_la_swig_ldflags) - -_gnuradio_core_general_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(gnuradio_core_general_la_swig_cxxflags) - -python/gnuradio_core_general.cc: gnuradio_core_general.py -gnuradio_core_general.py: gnuradio_core_general.i - -# Include the python dependencies for this file --include python/gnuradio_core_general.d - -endif # end of if python - -if GUILE - -gnuradio_core_general_scmlib_LTLIBRARIES = \ - libguile-gnuradio-gnuradio_core_general.la -libguile_gnuradio_gnuradio_core_general_la_SOURCES = \ - guile/gnuradio_core_general.cc \ - $(gnuradio_core_general_la_swig_sources) -nobase_gnuradio_core_general_scm_DATA = \ - gnuradio/gnuradio_core_general.scm \ - gnuradio/gnuradio_core_general-primitive.scm -libguile_gnuradio_gnuradio_core_general_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(gnuradio_core_general_la_swig_libadd) -libguile_gnuradio_gnuradio_core_general_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(gnuradio_core_general_la_swig_ldflags) -libguile_gnuradio_gnuradio_core_general_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(gnuradio_core_general_la_swig_cxxflags) - -guile/gnuradio_core_general.cc: gnuradio/gnuradio_core_general.scm -gnuradio/gnuradio_core_general.scm: gnuradio_core_general.i -gnuradio/gnuradio_core_general-primitive.scm: gnuradio/gnuradio_core_general.scm - -# Include the guile dependencies for this file --include guile/gnuradio_core_general.d - -endif # end of GUILE - - -# -*- 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 gnuradio_core_gengen.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/gnuradio_core_gengen -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/gnuradio_core_gengen -## -## 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. - -gnuradio_core_gengen_pythondir_category ?= gnuradio/gnuradio_core_gengen -gnuradio_core_gengen_pylibdir_category ?= $(gnuradio_core_gengen_pythondir_category) -gnuradio_core_gengen_pythondir = $(pythondir)/$(gnuradio_core_gengen_pythondir_category) -gnuradio_core_gengen_pylibdir = $(pyexecdir)/$(gnuradio_core_gengen_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -gnuradio_core_gengen_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/gnuradio_core_gengen -# FIXME: determince whether these should be installed with gnuradio. -gnuradio_core_gengen_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -gnuradio_core_gengen_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 > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -gnuradio_core_gengen_swiginclude_HEADERS = \ - gnuradio_core_gengen.i \ - $(gnuradio_core_gengen_swiginclude_headers) - -if PYTHON -gnuradio_core_gengen_pylib_LTLIBRARIES = \ - _gnuradio_core_gengen.la - -_gnuradio_core_gengen_la_SOURCES = \ - python/gnuradio_core_gengen.cc \ - $(gnuradio_core_gengen_la_swig_sources) - -gnuradio_core_gengen_python_PYTHON = \ - gnuradio_core_gengen.py \ - $(gnuradio_core_gengen_python) - -_gnuradio_core_gengen_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(gnuradio_core_gengen_la_swig_libadd) - -_gnuradio_core_gengen_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(gnuradio_core_gengen_la_swig_ldflags) - -_gnuradio_core_gengen_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(gnuradio_core_gengen_la_swig_cxxflags) - -python/gnuradio_core_gengen.cc: gnuradio_core_gengen.py -gnuradio_core_gengen.py: gnuradio_core_gengen.i - -# Include the python dependencies for this file --include python/gnuradio_core_gengen.d - -endif # end of if python - -if GUILE - -gnuradio_core_gengen_scmlib_LTLIBRARIES = \ - libguile-gnuradio-gnuradio_core_gengen.la -libguile_gnuradio_gnuradio_core_gengen_la_SOURCES = \ - guile/gnuradio_core_gengen.cc \ - $(gnuradio_core_gengen_la_swig_sources) -nobase_gnuradio_core_gengen_scm_DATA = \ - gnuradio/gnuradio_core_gengen.scm \ - gnuradio/gnuradio_core_gengen-primitive.scm -libguile_gnuradio_gnuradio_core_gengen_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(gnuradio_core_gengen_la_swig_libadd) -libguile_gnuradio_gnuradio_core_gengen_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(gnuradio_core_gengen_la_swig_ldflags) -libguile_gnuradio_gnuradio_core_gengen_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(gnuradio_core_gengen_la_swig_cxxflags) - -guile/gnuradio_core_gengen.cc: gnuradio/gnuradio_core_gengen.scm -gnuradio/gnuradio_core_gengen.scm: gnuradio_core_gengen.i -gnuradio/gnuradio_core_gengen-primitive.scm: gnuradio/gnuradio_core_gengen.scm - -# Include the guile dependencies for this file --include guile/gnuradio_core_gengen.d - -endif # end of GUILE - - -# -*- 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 gnuradio_core_filter.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/gnuradio_core_filter -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/gnuradio_core_filter -## -## 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. - -gnuradio_core_filter_pythondir_category ?= gnuradio/gnuradio_core_filter -gnuradio_core_filter_pylibdir_category ?= $(gnuradio_core_filter_pythondir_category) -gnuradio_core_filter_pythondir = $(pythondir)/$(gnuradio_core_filter_pythondir_category) -gnuradio_core_filter_pylibdir = $(pyexecdir)/$(gnuradio_core_filter_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -gnuradio_core_filter_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/gnuradio_core_filter -# FIXME: determince whether these should be installed with gnuradio. -gnuradio_core_filter_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -gnuradio_core_filter_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 > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -gnuradio_core_filter_swiginclude_HEADERS = \ - gnuradio_core_filter.i \ - $(gnuradio_core_filter_swiginclude_headers) - -if PYTHON -gnuradio_core_filter_pylib_LTLIBRARIES = \ - _gnuradio_core_filter.la - -_gnuradio_core_filter_la_SOURCES = \ - python/gnuradio_core_filter.cc \ - $(gnuradio_core_filter_la_swig_sources) - -gnuradio_core_filter_python_PYTHON = \ - gnuradio_core_filter.py \ - $(gnuradio_core_filter_python) - -_gnuradio_core_filter_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(gnuradio_core_filter_la_swig_libadd) - -_gnuradio_core_filter_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(gnuradio_core_filter_la_swig_ldflags) - -_gnuradio_core_filter_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(gnuradio_core_filter_la_swig_cxxflags) - -python/gnuradio_core_filter.cc: gnuradio_core_filter.py -gnuradio_core_filter.py: gnuradio_core_filter.i - -# Include the python dependencies for this file --include python/gnuradio_core_filter.d - -endif # end of if python - -if GUILE - -gnuradio_core_filter_scmlib_LTLIBRARIES = \ - libguile-gnuradio-gnuradio_core_filter.la -libguile_gnuradio_gnuradio_core_filter_la_SOURCES = \ - guile/gnuradio_core_filter.cc \ - $(gnuradio_core_filter_la_swig_sources) -nobase_gnuradio_core_filter_scm_DATA = \ - gnuradio/gnuradio_core_filter.scm \ - gnuradio/gnuradio_core_filter-primitive.scm -libguile_gnuradio_gnuradio_core_filter_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(gnuradio_core_filter_la_swig_libadd) -libguile_gnuradio_gnuradio_core_filter_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(gnuradio_core_filter_la_swig_ldflags) -libguile_gnuradio_gnuradio_core_filter_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(gnuradio_core_filter_la_swig_cxxflags) - -guile/gnuradio_core_filter.cc: gnuradio/gnuradio_core_filter.scm -gnuradio/gnuradio_core_filter.scm: gnuradio_core_filter.i -gnuradio/gnuradio_core_filter-primitive.scm: gnuradio/gnuradio_core_filter.scm - -# Include the guile dependencies for this file --include guile/gnuradio_core_filter.d - -endif # end of GUILE - - -# -*- 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 gnuradio_core_io.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/gnuradio_core_io -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/gnuradio_core_io -## -## 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. - -gnuradio_core_io_pythondir_category ?= gnuradio/gnuradio_core_io -gnuradio_core_io_pylibdir_category ?= $(gnuradio_core_io_pythondir_category) -gnuradio_core_io_pythondir = $(pythondir)/$(gnuradio_core_io_pythondir_category) -gnuradio_core_io_pylibdir = $(pyexecdir)/$(gnuradio_core_io_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -gnuradio_core_io_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/gnuradio_core_io -# FIXME: determince whether these should be installed with gnuradio. -gnuradio_core_io_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -gnuradio_core_io_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 > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -gnuradio_core_io_swiginclude_HEADERS = \ - gnuradio_core_io.i \ - $(gnuradio_core_io_swiginclude_headers) - -if PYTHON -gnuradio_core_io_pylib_LTLIBRARIES = \ - _gnuradio_core_io.la - -_gnuradio_core_io_la_SOURCES = \ - python/gnuradio_core_io.cc \ - $(gnuradio_core_io_la_swig_sources) - -gnuradio_core_io_python_PYTHON = \ - gnuradio_core_io.py \ - $(gnuradio_core_io_python) - -_gnuradio_core_io_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(gnuradio_core_io_la_swig_libadd) - -_gnuradio_core_io_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(gnuradio_core_io_la_swig_ldflags) - -_gnuradio_core_io_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(gnuradio_core_io_la_swig_cxxflags) - -python/gnuradio_core_io.cc: gnuradio_core_io.py -gnuradio_core_io.py: gnuradio_core_io.i - -# Include the python dependencies for this file --include python/gnuradio_core_io.d - -endif # end of if python - -if GUILE - -gnuradio_core_io_scmlib_LTLIBRARIES = \ - libguile-gnuradio-gnuradio_core_io.la -libguile_gnuradio_gnuradio_core_io_la_SOURCES = \ - guile/gnuradio_core_io.cc \ - $(gnuradio_core_io_la_swig_sources) -nobase_gnuradio_core_io_scm_DATA = \ - gnuradio/gnuradio_core_io.scm \ - gnuradio/gnuradio_core_io-primitive.scm -libguile_gnuradio_gnuradio_core_io_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(gnuradio_core_io_la_swig_libadd) -libguile_gnuradio_gnuradio_core_io_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(gnuradio_core_io_la_swig_ldflags) -libguile_gnuradio_gnuradio_core_io_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(gnuradio_core_io_la_swig_cxxflags) - -guile/gnuradio_core_io.cc: gnuradio/gnuradio_core_io.scm -gnuradio/gnuradio_core_io.scm: gnuradio_core_io.i -gnuradio/gnuradio_core_io-primitive.scm: gnuradio/gnuradio_core_io.scm - -# Include the guile dependencies for this file --include guile/gnuradio_core_io.d - -endif # end of GUILE - - -# -*- 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 gnuradio_core_hier.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/gnuradio_core_hier -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/gnuradio_core_hier -## -## 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. - -gnuradio_core_hier_pythondir_category ?= gnuradio/gnuradio_core_hier -gnuradio_core_hier_pylibdir_category ?= $(gnuradio_core_hier_pythondir_category) -gnuradio_core_hier_pythondir = $(pythondir)/$(gnuradio_core_hier_pythondir_category) -gnuradio_core_hier_pylibdir = $(pyexecdir)/$(gnuradio_core_hier_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -gnuradio_core_hier_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/gnuradio_core_hier -# FIXME: determince whether these should be installed with gnuradio. -gnuradio_core_hier_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -gnuradio_core_hier_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 > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -gnuradio_core_hier_swiginclude_HEADERS = \ - gnuradio_core_hier.i \ - $(gnuradio_core_hier_swiginclude_headers) - -if PYTHON -gnuradio_core_hier_pylib_LTLIBRARIES = \ - _gnuradio_core_hier.la - -_gnuradio_core_hier_la_SOURCES = \ - python/gnuradio_core_hier.cc \ - $(gnuradio_core_hier_la_swig_sources) - -gnuradio_core_hier_python_PYTHON = \ - gnuradio_core_hier.py \ - $(gnuradio_core_hier_python) - -_gnuradio_core_hier_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(gnuradio_core_hier_la_swig_libadd) - -_gnuradio_core_hier_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(gnuradio_core_hier_la_swig_ldflags) - -_gnuradio_core_hier_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(gnuradio_core_hier_la_swig_cxxflags) - -python/gnuradio_core_hier.cc: gnuradio_core_hier.py -gnuradio_core_hier.py: gnuradio_core_hier.i - -# Include the python dependencies for this file --include python/gnuradio_core_hier.d - -endif # end of if python - -if GUILE - -gnuradio_core_hier_scmlib_LTLIBRARIES = \ - libguile-gnuradio-gnuradio_core_hier.la -libguile_gnuradio_gnuradio_core_hier_la_SOURCES = \ - guile/gnuradio_core_hier.cc \ - $(gnuradio_core_hier_la_swig_sources) -nobase_gnuradio_core_hier_scm_DATA = \ - gnuradio/gnuradio_core_hier.scm \ - gnuradio/gnuradio_core_hier-primitive.scm -libguile_gnuradio_gnuradio_core_hier_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(gnuradio_core_hier_la_swig_libadd) -libguile_gnuradio_gnuradio_core_hier_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(gnuradio_core_hier_la_swig_ldflags) -libguile_gnuradio_gnuradio_core_hier_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(gnuradio_core_hier_la_swig_cxxflags) - -guile/gnuradio_core_hier.cc: gnuradio/gnuradio_core_hier.scm -gnuradio/gnuradio_core_hier.scm: gnuradio_core_hier.i -gnuradio/gnuradio_core_hier-primitive.scm: gnuradio/gnuradio_core_hier.scm - -# Include the guile dependencies for this file --include guile/gnuradio_core_hier.d - -endif # end of GUILE - - diff --git a/gnuradio-core/src/lib/swig/gen-swig-bug-fix b/gnuradio-core/src/lib/swig/gen-swig-bug-fix index 0b8070dc4..5e9f82e7d 100755 --- a/gnuradio-core/src/lib/swig/gen-swig-bug-fix +++ b/gnuradio-core/src/lib/swig/gen-swig-bug-fix @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# import sys import re @@ -27,19 +27,19 @@ def write_header (f): f.write ('''/* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -56,7 +56,7 @@ def write_header (f): */ ''') - + def write_trailer (f): f.write (''' #endif /* INCLUDED_GNURADIO_SWIG_BUG_WORKAROUND_H */ @@ -68,7 +68,7 @@ def doit (input, output): re_RETURN = re.compile ('^\s*return') re_NOT_ID = re.compile ('[^a-zA-Z0-9_]') words = {} - + write_header (output) for line in input: if re_RULES_BEGIN.search (line): @@ -86,14 +86,14 @@ def doit (input, output): for w in ('', 'return', 'void', 'x'): del words[w] - + wl = words.keys() wl.sort () for w in wl: output.write ('class ' + w + ';\n') write_trailer (output) - + def main (): if len (sys.argv) != 3: diff --git a/gnuradio-core/src/lib/swig/gnuradio.i b/gnuradio-core/src/lib/swig/gnuradio.i index 972d56c84..239223851 100644 --- a/gnuradio-core/src/lib/swig/gnuradio.i +++ b/gnuradio-core/src/lib/swig/gnuradio.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003,2004,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, @@ -39,30 +39,11 @@ %feature("autodoc","1"); -#ifdef SWIGGUILE -// Export constants and enums as scheme variables, not functions. -%feature("constasvar"); -#endif - // local file %include <gr_shared_ptr.i> - -// non-local SWIG files -#ifdef SWIGGUILE // Local overrides to support complex -// It's kind of screwy, but the target language subdir isn't -// searched automatically except for under ./swig_lib which -// doesn't really help us since we run swig in many directories -%include <guile/std_complex.i> -%include <guile/std_vector.i> -%include <std_common.i> -%include <std_string.i> -%include <std_map.i> -%include <std_pair.i> -#else %include <std_complex.i> %include <std_vector.i> %include <stl.i> -#endif %include <std_except.i> typedef std::complex<float> gr_complex; diff --git a/gnuradio-core/src/lib/swig/gnuradio_core.py b/gnuradio-core/src/lib/swig/gnuradio_core.py index 172051013..23de74077 100644 --- a/gnuradio-core/src/lib/swig/gnuradio_core.py +++ b/gnuradio-core/src/lib/swig/gnuradio_core.py @@ -1,18 +1,18 @@ # # Copyright 2006,2009,2010 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. diff --git a/gnuradio-core/src/lib/swig/gnuradio_core_filter.i b/gnuradio-core/src/lib/swig/gnuradio_core_filter.i index 952bf93b4..e9a44e54b 100644 --- a/gnuradio-core/src/lib/swig/gnuradio_core_filter.i +++ b/gnuradio-core/src/lib/swig/gnuradio_core_filter.i @@ -30,13 +30,3 @@ %include "gnuradio.i" // the common stuff %include "filter.i" - -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-gnuradio_core_filter" "scm_init_gnuradio_gnuradio_core_filter_module") -%} - -%goops %{ - (use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif diff --git a/gnuradio-core/src/lib/swig/gnuradio_core_general.i b/gnuradio-core/src/lib/swig/gnuradio_core_general.i index e39a0197a..33f97815e 100644 --- a/gnuradio-core/src/lib/swig/gnuradio_core_general.i +++ b/gnuradio-core/src/lib/swig/gnuradio_core_general.i @@ -52,13 +52,3 @@ } %} - -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-gnuradio_core_general" "scm_init_gnuradio_gnuradio_core_general_module") -%} - -%goops %{ -(use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif diff --git a/gnuradio-core/src/lib/swig/gnuradio_core_gengen.i b/gnuradio-core/src/lib/swig/gnuradio_core_gengen.i index 8753cd36b..b90a5bab3 100644 --- a/gnuradio-core/src/lib/swig/gnuradio_core_gengen.i +++ b/gnuradio-core/src/lib/swig/gnuradio_core_gengen.i @@ -30,13 +30,3 @@ %include "gnuradio.i" // the common stuff %include "gengen.i" - -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-gnuradio_core_gengen" "scm_init_gnuradio_gnuradio_core_gengen_module") -%} - -%goops %{ - (use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif diff --git a/gnuradio-core/src/lib/swig/gnuradio_core_hier.i b/gnuradio-core/src/lib/swig/gnuradio_core_hier.i index bb9c71f53..141d9b163 100644 --- a/gnuradio-core/src/lib/swig/gnuradio_core_hier.i +++ b/gnuradio-core/src/lib/swig/gnuradio_core_hier.i @@ -30,13 +30,3 @@ %include "gnuradio.i" // the common stuff %include "hier.i" - -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-gnuradio_core_hier" "scm_init_gnuradio_gnuradio_core_hier_module") -%} - -%goops %{ - (use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif diff --git a/gnuradio-core/src/lib/swig/gnuradio_core_io.i b/gnuradio-core/src/lib/swig/gnuradio_core_io.i index d2fa0aede..522b12b34 100644 --- a/gnuradio-core/src/lib/swig/gnuradio_core_io.i +++ b/gnuradio-core/src/lib/swig/gnuradio_core_io.i @@ -30,13 +30,3 @@ %include "gnuradio.i" // the common stuff %include "io.i" - -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-gnuradio_core_io" "scm_init_gnuradio_gnuradio_core_io_module") -%} - -%goops %{ - (use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif diff --git a/gnuradio-core/src/lib/swig/gnuradio_core_runtime.i b/gnuradio-core/src/lib/swig/gnuradio_core_runtime.i index 7fcac5069..fb311d226 100644 --- a/gnuradio-core/src/lib/swig/gnuradio_core_runtime.i +++ b/gnuradio-core/src/lib/swig/gnuradio_core_runtime.i @@ -32,28 +32,3 @@ %include "gnuradio.i" // the common stuff %include "runtime.i" - - -#if SWIGGUILE -%scheme %{ - -;; Load our gsubr that loads libraries using the RTLD_GLOBAL option -(load-extension "libguile-gnuradio-dynl-global" "scm_init_gnuradio_dynl_global_module") - -;; Define load-extension-global in module '(guile) -(module-define! (resolve-module '(guile)) - 'load-extension-global - (lambda (lib init) - (dynamic-call init (dynamic-link-global lib)))) - -;; Use load-extension-global to load our swig modules -(load-extension-global "libguile-gnuradio-gnuradio_core_runtime" "scm_init_gnuradio_gnuradio_core_runtime_module") -%} - -%goops %{ -(use-modules (gnuradio export-safely)) -(re-export export-syms-if-not-imported-gf) -(re-export-syntax export-safely) -(re-export re-export-all) -%} -#endif diff --git a/gnuradio-core/src/lib/swig/gnuradio_swig_bug_workaround.h b/gnuradio-core/src/lib/swig/gnuradio_swig_bug_workaround.h index 8f7eea0bf..1994f0660 100644 --- a/gnuradio-core/src/lib/swig/gnuradio_swig_bug_workaround.h +++ b/gnuradio-core/src/lib/swig/gnuradio_swig_bug_workaround.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/lib/swig/gr_shared_ptr.i b/gnuradio-core/src/lib/swig/gr_shared_ptr.i index 9663033ae..323d33ad7 100644 --- a/gnuradio-core/src/lib/swig/gr_shared_ptr.i +++ b/gnuradio-core/src/lib/swig/gr_shared_ptr.i @@ -31,7 +31,7 @@ public: { return px; } - + private: diff --git a/gnuradio-core/src/lib/swig/gr_swig_block_magic.i b/gnuradio-core/src/lib/swig/gr_swig_block_magic.i index a080c2b27..cdc9fbe49 100644 --- a/gnuradio-core/src/lib/swig/gr_swig_block_magic.i +++ b/gnuradio-core/src/lib/swig/gr_swig_block_magic.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -40,21 +40,3 @@ FULL_NAME ## _sptr.__repr__ = lambda self: "<gr_block %s (%d)>" % (self.name(), %} %enddef #endif - -#ifdef SWIGGUILE -#ifdef IN_GNURADIO_CORE // normal behavior -%define _GR_SWIG_BLOCK_MAGIC_HELPER(PKG, BASE_NAME, FULL_NAME) -_GR_SWIG_BLOCK_MAGIC_HELPER_COMMON(PKG, BASE_NAME, FULL_NAME) -/* FIXME May want to add something here to get a friendlier printed representation */ -%enddef -#else // Don't strip PKG from name -%define _GR_SWIG_BLOCK_MAGIC_HELPER(PKG, BASE_NAME, FULL_NAME) -class FULL_NAME; -typedef boost::shared_ptr<FULL_NAME> FULL_NAME ## _sptr; -%template(FULL_NAME ## _sptr) boost::shared_ptr<FULL_NAME>; -%ignore FULL_NAME; -%rename(FULL_NAME) PKG ## _make_ ## BASE_NAME; -/* FIXME May want to add something here to get a friendlier printed representation */ -%enddef -#endif -#endif diff --git a/gnuradio-core/src/lib/swig/guile/std_complex.i b/gnuradio-core/src/lib/swig/guile/std_complex.i deleted file mode 100644 index 2a5c72aa2..000000000 --- a/gnuradio-core/src/lib/swig/guile/std_complex.i +++ /dev/null @@ -1,37 +0,0 @@ -%{ -#include <complex> -%} - -// To the target language, complex number conversion -%typemap(out) complex, complex<double>, std::complex<double> { - $result = scm_make_rectangular( gh_double2scm ($1.real ()), - gh_double2scm ($1.imag ()) ); -} - -// To the target language, complex number conversion -%typemap(out) complex, complex<float>, std::complex<float> { - $result = scm_make_rectangular( gh_double2scm ($1.real ()), - gh_double2scm ($1.imag ()) ); -} - -// From the target language, complex number conversion -%typemap(in) complex, complex<double>, std::complex<double> { - $1 = std::complex<double>( gh_scm2double (scm_real_part ($input)), - gh_scm2double (scm_imag_part ($input)) ); -} - -// From the target language, complex number conversion -%typemap(in) complex, complex<float>, std::complex<float> { - $1 = std::complex<float>( gh_scm2double (scm_real_part ($input)), - gh_scm2double (scm_imag_part ($input)) ); -} - -%typemaps_primitive(%checkcode(CPLXDBL), std::complex<double>); -%typemaps_primitive(%checkcode(CPLXFLT), std::complex<float>); - -%typecheck(SWIG_TYPECHECK_COMPLEX) - std::complex<float>, std::complex<double>, - const std::complex<float> &, const std::complex<double> & -{ - $1 = scm_is_complex($input) ? 1 : 0; -} diff --git a/gnuradio-core/src/lib/swig/guile/std_vector.i b/gnuradio-core/src/lib/swig/guile/std_vector.i deleted file mode 100644 index ef1f20667..000000000 --- a/gnuradio-core/src/lib/swig/guile/std_vector.i +++ /dev/null @@ -1,437 +0,0 @@ -/* ----------------------------------------------------------------------------- - * See the LICENSE file for information on copyright, usage and redistribution - * of SWIG, and the README file for authors - http://www.swig.org/release.html. - * - * std_vector.i - * - * SWIG typemaps for std::vector - * ----------------------------------------------------------------------------- */ - -%include <std_common.i> - -// ------------------------------------------------------------------------ -// std::vector -// -// The aim of all that follows would be to integrate std::vector with -// Guile as much as possible, namely, to allow the user to pass and -// be returned Guile vectors or lists. -// const declarations are used to guess the intent of the function being -// exported; therefore, the following rationale is applied: -// -// -- f(std::vector<T>), f(const std::vector<T>&), f(const std::vector<T>*): -// the parameter being read-only, either a Guile sequence or a -// previously wrapped std::vector<T> can be passed. -// -- f(std::vector<T>&), f(std::vector<T>*): -// the parameter must be modified; therefore, only a wrapped std::vector -// can be passed. -// -- std::vector<T> f(): -// the vector is returned by copy; therefore, a Guile vector of T:s -// is returned which is most easily used in other Guile functions -// -- std::vector<T>& f(), std::vector<T>* f(), const std::vector<T>& f(), -// const std::vector<T>* f(): -// the vector is returned by reference; therefore, a wrapped std::vector -// is returned -// ------------------------------------------------------------------------ - -%{ -#include <vector> -#include <algorithm> -#include <stdexcept> -#include <complex> -%} - -%{ - inline std::complex<float> SWIG_scm2cmplxfloat(SCM x){ - return std::complex<float>(scm_c_real_part(x), scm_c_imag_part(x)); - } - - inline std::complex<double> SWIG_scm2cmplxdouble(SCM x){ - return std::complex<double>(scm_c_real_part(x), scm_c_imag_part(x)); - } - - inline SCM SWIG_cmplxfloat2scm(std::complex<float> x){ - return scm_c_make_rectangular(x.real(), x.imag()); - } - - inline SCM SWIG_cmplxdouble2scm(std::complex<double> x){ - return scm_c_make_rectangular(x.real(), x.imag()); - } -%} - -// exported class - -namespace std { - - template<class T> class vector { - %typemap(in) vector<T> { - if (gh_vector_p($input)) { - unsigned long size = gh_vector_length($input); - $1 = std::vector<T >(size); - for (unsigned long i=0; i<size; i++) { - SCM o = gh_vector_ref($input,gh_ulong2scm(i)); - (($1_type &)$1)[i] = - *((T*) SWIG_MustGetPtr(o,$descriptor(T *),$argnum, 0)); - } - } else if (gh_null_p($input)) { - $1 = std::vector<T >(); - } else if (gh_pair_p($input)) { - SCM head, tail; - $1 = std::vector<T >(); - tail = $input; - while (!gh_null_p(tail)) { - head = gh_car(tail); - tail = gh_cdr(tail); - $1.push_back(*((T*)SWIG_MustGetPtr(head, - $descriptor(T *), - $argnum, 0))); - } - } else { - $1 = *(($&1_type) - SWIG_MustGetPtr($input,$&1_descriptor,$argnum, 0)); - } - } - %typemap(in) const vector<T>& (std::vector<T> temp), - const vector<T>* (std::vector<T> temp) { - if (gh_vector_p($input)) { - unsigned long size = gh_vector_length($input); - temp = std::vector<T >(size); - $1 = &temp; - for (unsigned long i=0; i<size; i++) { - SCM o = gh_vector_ref($input,gh_ulong2scm(i)); - temp[i] = *((T*) SWIG_MustGetPtr(o, - $descriptor(T *), - $argnum, 0)); - } - } else if (gh_null_p($input)) { - temp = std::vector<T >(); - $1 = &temp; - } else if (gh_pair_p($input)) { - temp = std::vector<T >(); - $1 = &temp; - SCM head, tail; - tail = $input; - while (!gh_null_p(tail)) { - head = gh_car(tail); - tail = gh_cdr(tail); - temp.push_back(*((T*) SWIG_MustGetPtr(head, - $descriptor(T *), - $argnum, 0))); - } - } else { - $1 = ($1_ltype) SWIG_MustGetPtr($input,$1_descriptor,$argnum, 0); - } - } - %typemap(out) vector<T> { - $result = gh_make_vector(gh_long2scm($1.size()),SCM_UNSPECIFIED); - for (unsigned int i=0; i<$1.size(); i++) { - T* x = new T((($1_type &)$1)[i]); - gh_vector_set_x($result,gh_long2scm(i), - SWIG_NewPointerObj(x, $descriptor(T *), 1)); - } - } - %typecheck(SWIG_TYPECHECK_VECTOR) vector<T> { - /* native sequence? */ - if (gh_vector_p($input)) { - unsigned int size = gh_vector_length($input); - if (size == 0) { - /* an empty sequence can be of any type */ - $1 = 1; - } else { - /* check the first element only */ - SCM o = gh_vector_ref($input,gh_ulong2scm(0)); - T* x; - if (SWIG_ConvertPtr(o,(void**) &x, - $descriptor(T *), 0) != -1) - $1 = 1; - else - $1 = 0; - } - } else if (gh_null_p($input)) { - /* again, an empty sequence can be of any type */ - $1 = 1; - } else if (gh_pair_p($input)) { - /* check the first element only */ - T* x; - SCM head = gh_car($input); - if (SWIG_ConvertPtr(head,(void**) &x, - $descriptor(T *), 0) != -1) - $1 = 1; - else - $1 = 0; - } else { - /* wrapped vector? */ - std::vector<T >* v; - if (SWIG_ConvertPtr($input,(void **) &v, - $&1_descriptor, 0) != -1) - $1 = 1; - else - $1 = 0; - } - } - %typecheck(SWIG_TYPECHECK_VECTOR) const vector<T>&, - const vector<T>* { - /* native sequence? */ - if (gh_vector_p($input)) { - unsigned int size = gh_vector_length($input); - if (size == 0) { - /* an empty sequence can be of any type */ - $1 = 1; - } else { - /* check the first element only */ - T* x; - SCM o = gh_vector_ref($input,gh_ulong2scm(0)); - if (SWIG_ConvertPtr(o,(void**) &x, - $descriptor(T *), 0) != -1) - $1 = 1; - else - $1 = 0; - } - } else if (gh_null_p($input)) { - /* again, an empty sequence can be of any type */ - $1 = 1; - } else if (gh_pair_p($input)) { - /* check the first element only */ - T* x; - SCM head = gh_car($input); - if (SWIG_ConvertPtr(head,(void**) &x, - $descriptor(T *), 0) != -1) - $1 = 1; - else - $1 = 0; - } else { - /* wrapped vector? */ - std::vector<T >* v; - if (SWIG_ConvertPtr($input,(void **) &v, - $1_descriptor, 0) != -1) - $1 = 1; - else - $1 = 0; - } - } - public: - vector(unsigned int size = 0); - vector(unsigned int size, const T& value); - vector(const vector<T>&); - %rename(length) size; - unsigned int size() const; - %rename("empty?") empty; - bool empty() const; - %rename("clear!") clear; - void clear(); - %rename("set!") set; - %rename("pop!") pop; - %rename("push!") push_back; - void push_back(const T& x); - %extend { - T pop() throw (std::out_of_range) { - if (self->size() == 0) - throw std::out_of_range("pop from empty vector"); - T x = self->back(); - self->pop_back(); - return x; - } - T& ref(int i) throw (std::out_of_range) { - int size = int(self->size()); - if (i>=0 && i<size) - return (*self)[i]; - else - throw std::out_of_range("vector index out of range"); - } - void set(int i, const T& x) throw (std::out_of_range) { - int size = int(self->size()); - if (i>=0 && i<size) - (*self)[i] = x; - else - throw std::out_of_range("vector index out of range"); - } - } - }; - - - // specializations for built-ins - %define specialize_stl_vector(T,CHECK,CONVERT_FROM,CONVERT_TO) - template<> class vector<T > { - %typemap(in) vector<T > { - if (gh_vector_p($input)) { - unsigned long size = gh_vector_length($input); - $1 = std::vector<T >(size); - for (unsigned long i=0; i<size; i++) { - SCM o = gh_vector_ref($input,gh_ulong2scm(i)); - if (CHECK(o)) - (($1_type &)$1)[i] = (T)(CONVERT_FROM(o)); - else - scm_wrong_type_arg(FUNC_NAME, $argnum, $input); - } - } else if (gh_null_p($input)) { - $1 = std::vector<T >(); - } else if (gh_pair_p($input)) { - SCM v = gh_list_to_vector($input); - unsigned long size = gh_vector_length(v); - $1 = std::vector<T >(size); - for (unsigned long i=0; i<size; i++) { - SCM o = gh_vector_ref(v,gh_ulong2scm(i)); - if (CHECK(o)) - (($1_type &)$1)[i] = (T)(CONVERT_FROM(o)); - else - scm_wrong_type_arg(FUNC_NAME, $argnum, $input); - } - } else { - $1 = *(($&1_type) - SWIG_MustGetPtr($input,$&1_descriptor,$argnum, 0)); - } - } - %typemap(in) const vector<T >& (std::vector<T > temp), - const vector<T >* (std::vector<T > temp) { - if (gh_vector_p($input)) { - unsigned long size = gh_vector_length($input); - temp = std::vector<T >(size); - $1 = &temp; - for (unsigned long i=0; i<size; i++) { - SCM o = gh_vector_ref($input,gh_ulong2scm(i)); - if (CHECK(o)) - temp[i] = (T)(CONVERT_FROM(o)); - else - scm_wrong_type_arg(FUNC_NAME, $argnum, $input); - } - } else if (gh_null_p($input)) { - temp = std::vector<T >(); - $1 = &temp; - } else if (gh_pair_p($input)) { - SCM v = gh_list_to_vector($input); - unsigned long size = gh_vector_length(v); - temp = std::vector<T >(size); - $1 = &temp; - for (unsigned long i=0; i<size; i++) { - SCM o = gh_vector_ref(v,gh_ulong2scm(i)); - if (CHECK(o)) - temp[i] = (T)(CONVERT_FROM(o)); - else - scm_wrong_type_arg(FUNC_NAME, $argnum, $input); - } - } else { - $1 = ($1_ltype) SWIG_MustGetPtr($input,$1_descriptor,$argnum, 0); - } - } - %typemap(out) vector<T > { - $result = gh_make_vector(gh_long2scm($1.size()),SCM_UNSPECIFIED); - for (unsigned int i=0; i<$1.size(); i++) { - SCM x = CONVERT_TO((($1_type &)$1)[i]); - gh_vector_set_x($result,gh_long2scm(i),x); - } - } - %typecheck(SWIG_TYPECHECK_VECTOR) vector<T > { - /* native sequence? */ - if (gh_vector_p($input)) { - unsigned int size = gh_vector_length($input); - if (size == 0) { - /* an empty sequence can be of any type */ - $1 = 1; - } else { - /* check the first element only */ - T* x; - SCM o = gh_vector_ref($input,gh_ulong2scm(0)); - $1 = CHECK(o) ? 1 : 0; - } - } else if (gh_null_p($input)) { - /* again, an empty sequence can be of any type */ - $1 = 1; - } else if (gh_pair_p($input)) { - /* check the first element only */ - T* x; - SCM head = gh_car($input); - $1 = CHECK(head) ? 1 : 0; - } else { - /* wrapped vector? */ - std::vector<T >* v; - $1 = (SWIG_ConvertPtr($input,(void **) &v, - $&1_descriptor, 0) != -1) ? 1 : 0; - } - } - %typecheck(SWIG_TYPECHECK_VECTOR) const vector<T >&, - const vector<T >* { - /* native sequence? */ - if (gh_vector_p($input)) { - unsigned int size = gh_vector_length($input); - if (size == 0) { - /* an empty sequence can be of any type */ - $1 = 1; - } else { - /* check the first element only */ - T* x; - SCM o = gh_vector_ref($input,gh_ulong2scm(0)); - $1 = CHECK(o) ? 1 : 0; - } - } else if (gh_null_p($input)) { - /* again, an empty sequence can be of any type */ - $1 = 1; - } else if (gh_pair_p($input)) { - /* check the first element only */ - T* x; - SCM head = gh_car($input); - $1 = CHECK(head) ? 1 : 0; - } else { - /* wrapped vector? */ - std::vector<T >* v; - $1 = (SWIG_ConvertPtr($input,(void **) &v, - $1_descriptor, 0) != -1) ? 1 : 0; - } - } - public: - vector(unsigned int size = 0); - vector(unsigned int size, const T& value); - vector(const vector<T >&); - %rename(length) size; - unsigned int size() const; - %rename("empty?") empty; - bool empty() const; - %rename("clear!") clear; - void clear(); - %rename("set!") set; - %rename("pop!") pop; - %rename("push!") push_back; - void push_back(T x); - %extend { - T pop() throw (std::out_of_range) { - if (self->size() == 0) - throw std::out_of_range("pop from empty vector"); - T x = self->back(); - self->pop_back(); - return x; - } - T ref(int i) throw (std::out_of_range) { - int size = int(self->size()); - if (i>=0 && i<size) - return (*self)[i]; - else - throw std::out_of_range("vector index out of range"); - } - void set(int i, T x) throw (std::out_of_range) { - int size = int(self->size()); - if (i>=0 && i<size) - (*self)[i] = x; - else - throw std::out_of_range("vector index out of range"); - } - } - }; - %enddef - - specialize_stl_vector(bool,gh_boolean_p,gh_scm2bool,SWIG_bool2scm); - specialize_stl_vector(char,gh_number_p,gh_scm2long,gh_long2scm); - specialize_stl_vector(int,gh_number_p,gh_scm2long,gh_long2scm); - specialize_stl_vector(long,gh_number_p,gh_scm2long,gh_long2scm); - specialize_stl_vector(short,gh_number_p,gh_scm2long,gh_long2scm); - specialize_stl_vector(unsigned char,gh_number_p,gh_scm2ulong,gh_ulong2scm); - specialize_stl_vector(unsigned int,gh_number_p,gh_scm2ulong,gh_ulong2scm); - specialize_stl_vector(unsigned long,gh_number_p,gh_scm2ulong,gh_ulong2scm); - specialize_stl_vector(unsigned short,gh_number_p,gh_scm2ulong,gh_ulong2scm); - specialize_stl_vector(float,gh_number_p,gh_scm2double,gh_double2scm); - specialize_stl_vector(double,gh_number_p,gh_scm2double,gh_double2scm); - specialize_stl_vector(std::string,gh_string_p,SWIG_scm2string,SWIG_string2scm); - specialize_stl_vector(std::complex<float>, scm_is_complex, - SWIG_scm2cmplxfloat, SWIG_cmplxfloat2scm); - specialize_stl_vector(std::complex<double>, scm_is_complex, - SWIG_scm2cmplxdouble,SWIG_cmplxdouble2scm); - -} - diff --git a/gnuradio-core/src/lib/viterbi/.gitignore b/gnuradio-core/src/lib/viterbi/.gitignore deleted file mode 100644 index 85bb5cc04..000000000 --- a/gnuradio-core/src/lib/viterbi/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/Makefile -/Makefile.in -/.libs -/.deps -/encode -/decode diff --git a/gnuradio-core/src/lib/viterbi/Makefile.am b/gnuradio-core/src/lib/viterbi/Makefile.am deleted file mode 100644 index 7e65880b3..000000000 --- a/gnuradio-core/src/lib/viterbi/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright 2008 Free Software Foundation, Inc. -# -# 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 - -LIBS = -lm - -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(GRUEL_INCLUDES) \ - -I$(top_srcdir)/gnuradio-core/src/lib/general \ - $(WITH_INCLUDES) - -noinst_LTLIBRARIES = libviterbi.la - -libviterbi_la_SOURCES = \ - metrics.c \ - tab.c \ - viterbi.c - -noinst_HEADERS = \ - viterbi.h - -noinst_PROGRAMS = encode decode - -encode_SOURCES = encode.cc - -encode_LDADD = libviterbi.la - -decode_SOURCES = decode.cc - -decode_LDADD = libviterbi.la diff --git a/gnuradio-core/src/lib/viterbi/decode.cc b/gnuradio-core/src/lib/viterbi/decode.cc index 6580e4d66..368e69713 100644 --- a/gnuradio-core/src/lib/viterbi/decode.cc +++ b/gnuradio-core/src/lib/viterbi/decode.cc @@ -1,19 +1,19 @@ /* -*- 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, @@ -22,7 +22,7 @@ /* * This is a minimal example demonstrating how to call the Viterbi decoder - * in continuous streaming mode. It accepts data on stdin and writes to + * in continuous streaming mode. It accepts data on stdin and writes to * stdout. * */ @@ -55,12 +55,12 @@ int main() struct viterbi_state state0[64]; struct viterbi_state state1[64]; unsigned char viterbi_in[16]; - viterbi_chunks_init(state0); + viterbi_chunks_init(state0); while (!feof(stdin)) { unsigned int n = fread(syms, 1, MAXENCSIZE, stdin); unsigned char *out = data; - + for (unsigned int i = 0; i < n; i++) { // FIXME: This implements hard decoding by slicing the input stream @@ -71,7 +71,7 @@ int main() // Every four symbols, perform the butterfly2 operation if ((count % 4) == 3) { - viterbi_butterfly2(viterbi_in, mettab, state0, state1); + viterbi_butterfly2(viterbi_in, mettab, state0, state1); // Every sixteen symbols, perform the readback operation if ((count > 64) && (count % 16) == 11) { @@ -79,9 +79,9 @@ int main() fwrite(out++, 1, 1, stdout); } } - + count++; - } + } } return 0; diff --git a/gnuradio-core/src/lib/viterbi/encode.cc b/gnuradio-core/src/lib/viterbi/encode.cc index 01acb3987..83a85fcac 100644 --- a/gnuradio-core/src/lib/viterbi/encode.cc +++ b/gnuradio-core/src/lib/viterbi/encode.cc @@ -1,19 +1,19 @@ /* -*- 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, @@ -22,9 +22,9 @@ /* * This is a minimal example demonstrating how to call the ECC encoder - * in continuous streaming mode. It accepts data on stdin and writes to + * in continuous streaming mode. It accepts data on stdin and writes to * stdout. - * + * * FIXME: This does not flush the final bits out of the encoder. * */ @@ -43,7 +43,7 @@ int main() unsigned char encoder_state = 0; unsigned char data[MAXCHUNKSIZE]; unsigned char syms[MAXENCSIZE]; - + while (!feof(stdin)) { unsigned int n = fread(data, 1, MAXCHUNKSIZE, stdin); encoder_state = encode(syms, data, n, encoder_state); diff --git a/gnuradio-core/src/lib/viterbi/metrics.c b/gnuradio-core/src/lib/viterbi/metrics.c index 77c6a63c8..0d91c301f 100644 --- a/gnuradio-core/src/lib/viterbi/metrics.c +++ b/gnuradio-core/src/lib/viterbi/metrics.c @@ -1,26 +1,26 @@ /* * Copyright 1995 Phil Karn, KA9Q * 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. */ -/* +/* * Generate metric tables for a soft-decision convolutional decoder * assuming gaussian noise on a PSK channel. * @@ -48,7 +48,7 @@ extern double erf(double x); /* Normal function integrated from -Inf to x. Range: 0-1 */ #define normal(x) (0.5 + 0.5*erf((x)/M_SQRT2)) -/* Logarithm base 2 */ +/* Logarithm base 2 */ #define gr_log2(x) (log(x)*M_LOG2E) /* Generate log-likelihood metrics for 8-bit soft quantized channel @@ -65,33 +65,33 @@ gen_met(int mettab[2][256], /* Metric table, [sent sym][rx symbol] */ int s,bit; double metrics[2][256]; double p0,p1; - + /* Es/N0 as power ratio */ esn0 = pow(10.,esn0/10); - + noise = 0.5/esn0; /* only half the noise for BPSK */ noise = sqrt(noise); /* noise/signal Voltage ratio */ - + /* Zero is a special value, since this sample includes all * lower samples that were clipped to this value, i.e., it - * takes the whole lower tail of the curve + * takes the whole lower tail of the curve */ p1 = normal(((0-OFFSET+0.5)/amp - 1)/noise); /* P(s|1) */ - + /* Prob of this value occurring for a 0-bit */ /* P(s|0) */ p0 = normal(((0-OFFSET+0.5)/amp + 1)/noise); metrics[0][0] = gr_log2(2*p0/(p1+p0)) - bias; metrics[1][0] = gr_log2(2*p1/(p1+p0)) - bias; - + for(s=1;s<255;s++){ /* P(s|1), prob of receiving s given 1 transmitted */ p1 = normal(((s-OFFSET+0.5)/amp - 1)/noise) - normal(((s-OFFSET-0.5)/amp - 1)/noise); - + /* P(s|0), prob of receiving s given 0 transmitted */ p0 = normal(((s-OFFSET+0.5)/amp + 1)/noise) - normal(((s-OFFSET-0.5)/amp + 1)/noise); - + #ifdef notdef printf("P(%d|1) = %lg, P(%d|0) = %lg\n",s,p1,s,p0); #endif @@ -103,7 +103,7 @@ gen_met(int mettab[2][256], /* Metric table, [sent sym][rx symbol] */ p1 = 1 - normal(((255-OFFSET-0.5)/amp - 1)/noise); /* P(s|0) */ p0 = 1 - normal(((255-OFFSET-0.5)/amp + 1)/noise); - + metrics[0][255] = gr_log2(2*p0/(p1+p0)) - bias; metrics[1][255] = gr_log2(2*p1/(p1+p0)) - bias; #ifdef notdef diff --git a/gnuradio-core/src/lib/viterbi/tab.c b/gnuradio-core/src/lib/viterbi/tab.c index 1133c6308..1c135acfe 100644 --- a/gnuradio-core/src/lib/viterbi/tab.c +++ b/gnuradio-core/src/lib/viterbi/tab.c @@ -1,19 +1,19 @@ /* * Copyright 1995 Phil Karn, KA9Q * 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, diff --git a/gnuradio-core/src/lib/viterbi/viterbi.c b/gnuradio-core/src/lib/viterbi/viterbi.c index 9f5c1e72a..fc8886603 100644 --- a/gnuradio-core/src/lib/viterbi/viterbi.c +++ b/gnuradio-core/src/lib/viterbi/viterbi.c @@ -1,26 +1,26 @@ /* * Copyright 1995 Phil Karn, KA9Q * 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. */ -/* +/* * Viterbi decoder for K=7 rate=1/2 convolutional code * Some modifications from original Karn code by Matt Ettus */ @@ -94,7 +94,7 @@ encode(unsigned char *symbols, unsigned char encstate) { int i; - + while(nbytes-- != 0){ for(i=7;i>=0;i--){ encstate = (encstate << 1) | ((*data >> i) & 1); @@ -103,7 +103,7 @@ encode(unsigned char *symbols, } data++; } - + return encstate; } @@ -120,16 +120,16 @@ viterbi(unsigned long *metric, /* Final path metric (returned value) */ long bestmetric; int beststate,i; struct viterbi_state state0[64],state1[64],*state,*next; - + state = state0; next = state1; - + /* Initialize starting metrics to prefer 0 state */ state[0].metric = 0; for(i=1;i<64;i++) state[i].metric = -999999; state[0].path = 0; - + for(bitcnt = 0;bitcnt < nbits;bitcnt++){ /* Read input symbol pair and compute all possible branch * metrics @@ -173,7 +173,7 @@ viterbi(unsigned long *metric, /* Final path metric (returned value) */ BUTTERFLY(29,0); BUTTERFLY(30,2); BUTTERFLY(31,3); - + /* Swap current and next states */ if(bitcnt & 1){ state = state0; @@ -205,7 +205,7 @@ viterbi(unsigned long *metric, /* Final path metric (returned value) */ #endif *data++ = state[beststate].path >> 24; } - + } /* Output remaining bits from 0 state */ // ETTUS Find best state instead @@ -219,7 +219,7 @@ viterbi(unsigned long *metric, /* Final path metric (returned value) */ } if((i = bitcnt % 8) != 6) state[beststate].path <<= 6-i; - + *data++ = state[beststate].path >> 24; *data++ = state[beststate].path >> 16; *data++ = state[beststate].path >> 8; @@ -245,7 +245,7 @@ viterbi_butterfly8(unsigned char *symbols, int mettab[2][256], struct viterbi_st { unsigned int bitcnt; int mets[4]; - + struct viterbi_state *state, *next; state = state0; next = state1; @@ -257,8 +257,8 @@ viterbi_butterfly8(unsigned char *symbols, int mettab[2][256], struct viterbi_st mets[2] = mettab[1][symbols[0]] + mettab[0][symbols[1]]; mets[3] = mettab[1][symbols[0]] + mettab[1][symbols[1]]; symbols += 2; - - // These macro calls were generated by genbut.c + + // These macro calls were generated by genbut.c BUTTERFLY(0,0);BUTTERFLY(1,1);BUTTERFLY(2,3);BUTTERFLY(3,2); BUTTERFLY(4,3);BUTTERFLY(5,2);BUTTERFLY(6,0);BUTTERFLY(7,1); BUTTERFLY(8,0);BUTTERFLY(9,1);BUTTERFLY(10,3);BUTTERFLY(11,2); @@ -267,7 +267,7 @@ viterbi_butterfly8(unsigned char *symbols, int mettab[2][256], struct viterbi_st BUTTERFLY(20,1);BUTTERFLY(21,0);BUTTERFLY(22,2);BUTTERFLY(23,3); BUTTERFLY(24,2);BUTTERFLY(25,3);BUTTERFLY(26,1);BUTTERFLY(27,0); BUTTERFLY(28,1);BUTTERFLY(29,0);BUTTERFLY(30,2);BUTTERFLY(31,3); - + // Swap current and next states if(bitcnt & 1){ state = state0; @@ -284,19 +284,19 @@ viterbi_butterfly2(unsigned char *symbols, int mettab[2][256], struct viterbi_st { //unsigned int bitcnt; int mets[4]; - + struct viterbi_state *state, *next; state = state0; next = state1; // Operate on 4 symbols (2 bits) at a time - + // Read input symbol pair and compute all possible branch metrics mets[0] = mettab[0][symbols[0]] + mettab[0][symbols[1]]; mets[1] = mettab[0][symbols[0]] + mettab[1][symbols[1]]; mets[2] = mettab[1][symbols[0]] + mettab[0][symbols[1]]; mets[3] = mettab[1][symbols[0]] + mettab[1][symbols[1]]; - - // These macro calls were generated by genbut.c + + // These macro calls were generated by genbut.c BUTTERFLY(0,0);BUTTERFLY(1,1);BUTTERFLY(2,3);BUTTERFLY(3,2); BUTTERFLY(4,3);BUTTERFLY(5,2);BUTTERFLY(6,0);BUTTERFLY(7,1); BUTTERFLY(8,0);BUTTERFLY(9,1);BUTTERFLY(10,3);BUTTERFLY(11,2); @@ -305,17 +305,17 @@ viterbi_butterfly2(unsigned char *symbols, int mettab[2][256], struct viterbi_st BUTTERFLY(20,1);BUTTERFLY(21,0);BUTTERFLY(22,2);BUTTERFLY(23,3); BUTTERFLY(24,2);BUTTERFLY(25,3);BUTTERFLY(26,1);BUTTERFLY(27,0); BUTTERFLY(28,1);BUTTERFLY(29,0);BUTTERFLY(30,2);BUTTERFLY(31,3); - + state = state1; next = state0; - + // Read input symbol pair and compute all possible branch metrics mets[0] = mettab[0][symbols[2]] + mettab[0][symbols[3]]; mets[1] = mettab[0][symbols[2]] + mettab[1][symbols[3]]; mets[2] = mettab[1][symbols[2]] + mettab[0][symbols[3]]; mets[3] = mettab[1][symbols[2]] + mettab[1][symbols[3]]; - - // These macro calls were generated by genbut.c + + // These macro calls were generated by genbut.c BUTTERFLY(0,0);BUTTERFLY(1,1);BUTTERFLY(2,3);BUTTERFLY(3,2); BUTTERFLY(4,3);BUTTERFLY(5,2);BUTTERFLY(6,0);BUTTERFLY(7,1); BUTTERFLY(8,0);BUTTERFLY(9,1);BUTTERFLY(10,3);BUTTERFLY(11,2); @@ -328,13 +328,13 @@ viterbi_butterfly2(unsigned char *symbols, int mettab[2][256], struct viterbi_st unsigned char viterbi_get_output(struct viterbi_state *state, unsigned char *outbuf) { - // Produce output every 8 bits once path memory is full + // Produce output every 8 bits once path memory is full // if((bitcnt % 8) == 5 && bitcnt > 32) { - + // Find current best path unsigned int i,beststate; int bestmetric; - + bestmetric = state[0].metric; beststate = 0; for(i=1;i<64;i++) diff --git a/gnuradio-core/src/lib/viterbi/viterbi.h b/gnuradio-core/src/lib/viterbi/viterbi.h index 3a3ea5615..bcdbe116d 100644 --- a/gnuradio-core/src/lib/viterbi/viterbi.h +++ b/gnuradio-core/src/lib/viterbi/viterbi.h @@ -1,18 +1,18 @@ /* * 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, @@ -46,7 +46,7 @@ GR_CORE_API void viterbi_chunks_init(struct viterbi_state* state); GR_CORE_API void -viterbi_butterfly2(unsigned char *symbols, int mettab[2][256], +viterbi_butterfly2(unsigned char *symbols, int mettab[2][256], struct viterbi_state *state0, struct viterbi_state *state1); GR_CORE_API unsigned char diff --git a/gnuradio-core/src/python/.gitignore b/gnuradio-core/src/python/.gitignore deleted file mode 100644 index f9c5da0db..000000000 --- a/gnuradio-core/src/python/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/Makefile -/Makefile.in -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/*.pyo diff --git a/gnuradio-core/src/python/Makefile.am b/gnuradio-core/src/python/Makefile.am deleted file mode 100644 index a90aaba5c..000000000 --- a/gnuradio-core/src/python/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright 2004 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -if PYTHON -SUBDIRS = gnuradio bin - -noinst_PYTHON = \ - build_utils.py \ - build_utils_codes.py -endif diff --git a/gnuradio-core/src/python/bin/.gitignore b/gnuradio-core/src/python/bin/.gitignore deleted file mode 100644 index f9c5da0db..000000000 --- a/gnuradio-core/src/python/bin/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/Makefile -/Makefile.in -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/*.pyo diff --git a/gnuradio-core/src/python/bin/Makefile.am b/gnuradio-core/src/python/bin/Makefile.am deleted file mode 100644 index 6f9f162f1..000000000 --- a/gnuradio-core/src/python/bin/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright 2005,2009,2010 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 - - -EXTRA_DIST += microtune.py - -noinst_SCRIPTS = \ - microtune.py diff --git a/gnuradio-core/src/python/bin/microtune.py b/gnuradio-core/src/python/bin/microtune.py index 0e799c93d..fbe743f39 100755 --- a/gnuradio-core/src/python/bin/microtune.py +++ b/gnuradio-core/src/python/bin/microtune.py @@ -36,7 +36,7 @@ def main (): actual = front_end.set_RF_freq (options.freq) print "microtune: actual freq = %s" % (eng_notation.num_to_str (actual),) - + if __name__ == '__main__': main () diff --git a/gnuradio-core/src/python/build_utils.py b/gnuradio-core/src/python/build_utils.py index 90c7978f2..0660941d5 100644 --- a/gnuradio-core/src/python/build_utils.py +++ b/gnuradio-core/src/python/build_utils.py @@ -1,23 +1,23 @@ # # Copyright 2004,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. -# +# """Misc utilities used at build time """ @@ -56,10 +56,10 @@ name_dict = {} def log_output_name (name): (base, ext) = os.path.splitext (name) ext = ext[1:] # drop the leading '.' - + entry = name_dict.setdefault (ext, []) entry.append (name) - + def open_and_log_name (name, dir): global do_sources if do_sources: @@ -139,29 +139,29 @@ def do_substitution (d, in_file, out_file): key = match_obj.group (1) # print key return d[key] - + inp = in_file.read () out = re.sub (r"@([a-zA-Z0-9_]+)@", repl, inp) out_file.write (out) - + copyright = '''/* -*- c++ -*- */ /* * Copyright 2003,2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/python/build_utils_codes.py b/gnuradio-core/src/python/build_utils_codes.py index 49ded78a6..9ea96baae 100644 --- a/gnuradio-core/src/python/build_utils_codes.py +++ b/gnuradio-core/src/python/build_utils_codes.py @@ -1,23 +1,23 @@ # # Copyright 2004 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# def i_code (code3): return code3[0] diff --git a/gnuradio-core/src/python/gnuradio/.gitignore b/gnuradio-core/src/python/gnuradio/.gitignore deleted file mode 100644 index f9c5da0db..000000000 --- a/gnuradio-core/src/python/gnuradio/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/Makefile -/Makefile.in -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/*.pyo diff --git a/gnuradio-core/src/python/gnuradio/Makefile.am b/gnuradio-core/src/python/gnuradio/Makefile.am deleted file mode 100644 index ffc171b2d..000000000 --- a/gnuradio-core/src/python/gnuradio/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -# -# Copyright 2004-2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -if PYTHON -SUBDIRS = gr gru gruimpl blks2 blks2impl - -grpython_PYTHON = \ - __init__.py \ - eng_notation.py \ - eng_option.py \ - gr_unittest.py \ - gr_xmlrunner.py \ - optfir.py \ - window.py -endif diff --git a/gnuradio-core/src/python/gnuradio/blks2/.gitignore b/gnuradio-core/src/python/gnuradio/blks2/.gitignore deleted file mode 100644 index b6950912c..000000000 --- a/gnuradio-core/src/python/gnuradio/blks2/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -/*.pyc diff --git a/gnuradio-core/src/python/gnuradio/blks2/Makefile.am b/gnuradio-core/src/python/gnuradio/blks2/Makefile.am deleted file mode 100644 index 04b7c6500..000000000 --- a/gnuradio-core/src/python/gnuradio/blks2/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright 2005,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 - -# EXTRA_DIST = run_tests.in -# TESTS = run_tests - -grblks2pythondir = $(grpythondir)/blks2 - -grblks2python_PYTHON = \ - __init__.py diff --git a/gnuradio-core/src/python/gnuradio/blks2/__init__.py b/gnuradio-core/src/python/gnuradio/blks2/__init__.py index 89ebb9229..2dfdc77f4 100644 --- a/gnuradio-core/src/python/gnuradio/blks2/__init__.py +++ b/gnuradio-core/src/python/gnuradio/blks2/__init__.py @@ -1,29 +1,29 @@ # # Copyright 2005 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. -# +# import glob import os.path # Semi-hideous kludge to import everything in the blksimpl2 directory -# into the gnuradio.blks2 namespace. This keeps us from having to remember +# into the gnuradio.blks2 namespace. This keeps us from having to remember # to manually update this file. for p in __path__: diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/.gitignore b/gnuradio-core/src/python/gnuradio/blks2impl/.gitignore deleted file mode 100644 index f9c5da0db..000000000 --- a/gnuradio-core/src/python/gnuradio/blks2impl/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/Makefile -/Makefile.in -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/*.pyo diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/Makefile.am b/gnuradio-core/src/python/gnuradio/blks2impl/Makefile.am deleted file mode 100644 index eb031cd20..000000000 --- a/gnuradio-core/src/python/gnuradio/blks2impl/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright 2005,2007,2009,2010 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 - -# EXTRA_DIST = run_tests.in -# TESTS = run_tests - -grblkspythondir = $(grpythondir)/blks2impl - -grblkspython_PYTHON = \ - __init__.py \ - am_demod.py \ - channel_model.py \ - filterbank.py \ - fm_demod.py \ - fm_emph.py \ - logpwrfft.py \ - nbfm_rx.py \ - nbfm_tx.py \ - pfb_arb_resampler.py \ - pfb_channelizer.py \ - pfb_decimator.py \ - pfb_interpolator.py \ - rational_resampler.py \ - standard_squelch.py \ - stream_to_vector_decimator.py \ - wfm_rcv.py \ - wfm_rcv_fmdet.py \ - wfm_rcv_pll.py \ - wfm_tx.py diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/am_demod.py b/gnuradio-core/src/python/gnuradio/blks2impl/am_demod.py index b454f0942..68d024565 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/am_demod.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/am_demod.py @@ -1,23 +1,23 @@ # # Copyright 2006,2007 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, optfir @@ -25,8 +25,8 @@ class am_demod_cf(gr.hier_block2): """ Generalized AM demodulation block with audio filtering. - This block demodulates a band-limited, complex down-converted AM - channel into the the original baseband signal, applying low pass + This block demodulates a band-limited, complex down-converted AM + channel into the the original baseband signal, applying low pass filtering to the audio output. It produces a float stream in the range [-1.0, +1.0]. @@ -34,11 +34,11 @@ class am_demod_cf(gr.hier_block2): @type sample_rate: integer @param audio_decim: input to output decimation rate @type audio_decim: integer - @param audio_pass: audio low pass filter passband frequency + @param audio_pass: audio low pass filter passband frequency @type audio_pass: float @param audio_stop: audio low pass filter stop frequency @type audio_stop: float - """ + """ def __init__(self, channel_rate, audio_decim, audio_pass, audio_stop): gr.hier_block2.__init__(self, "am_demod_cf", gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature @@ -60,7 +60,7 @@ class am_demod_cf(gr.hier_block2): class demod_10k0a3e_cf(am_demod_cf): """ AM demodulation block, 10 KHz channel. - + This block demodulates an AM channel conformant to 10K0A3E emission standards, such as broadcast band AM transmissions. @@ -70,7 +70,6 @@ class demod_10k0a3e_cf(am_demod_cf): @type audio_decim: integer """ def __init__(self, channel_rate, audio_decim): - am_demod_cf.__init__(self, channel_rate, audio_decim, + am_demod_cf.__init__(self, channel_rate, audio_decim, 5000, # Audio passband 5500) # Audio stopband -
\ No newline at end of file diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/channel_model.py b/gnuradio-core/src/python/gnuradio/blks2impl/channel_model.py index 57487dff2..e5cd471df 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/channel_model.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/channel_model.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # 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. -# +# from gnuradio import gr diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/filterbank.py b/gnuradio-core/src/python/gnuradio/blks2impl/filterbank.py index f214da4a9..08f1d450b 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/filterbank.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/filterbank.py @@ -1,23 +1,23 @@ # # Copyright 2005,2007 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. -# +# import sys from gnuradio import gr, gru @@ -53,11 +53,11 @@ class synthesis_filterbank(gr.hier_block2): sample rate * nchannels. Output stream to frequency mapping: - + channel zero is at zero frequency. if mpoints is odd: - + Channels with increasing positive frequencies come from channels 1 through (N-1)/2. @@ -106,7 +106,7 @@ class synthesis_filterbank(gr.hier_block2): for i in range(mpoints): self.connect((self, i), (self.ss2v, i)) - + self.connect(self.ss2v, self.ifft, self.v2ss) # build mpoints fir filters... @@ -116,7 +116,7 @@ class synthesis_filterbank(gr.hier_block2): self.connect(f, (self.ss2s, i)) self.connect(self.ss2s, self) - + class analysis_filterbank(gr.hier_block2): """ Uniformly modulated polyphase DFT filter bank: analysis @@ -137,7 +137,7 @@ class analysis_filterbank(gr.hier_block2): gr.hier_block2.__init__(self, "analysis_filterbank", gr.io_signature(1, 1, item_size), # Input signature gr.io_signature(mpoints, mpoints, item_size)) # Output signature - + if taps is None: taps = _generate_synthesis_taps(mpoints) @@ -145,12 +145,12 @@ class analysis_filterbank(gr.hier_block2): r = len(taps) % mpoints if r != 0: taps = taps + (mpoints - r) * (0,) - + # split in mpoints separate set of taps sub_taps = _split_taps(taps, mpoints) - # print >> sys.stderr, "mpoints =", mpoints, "len(sub_taps) =", len(sub_taps) - + # print >> sys.stderr, "mpoints =", mpoints, "len(sub_taps) =", len(sub_taps) + self.s2ss = gr.stream_to_streams(item_size, mpoints) # filters here self.ss2v = gr.streams_to_vector(item_size, mpoints) @@ -158,12 +158,12 @@ class analysis_filterbank(gr.hier_block2): self.v2ss = gr.vector_to_streams(item_size, mpoints) self.connect(self, self.s2ss) - + # build mpoints fir filters... for i in range(mpoints): f = gr.fft_filter_ccc(1, sub_taps[mpoints-i-1]) self.connect((self.s2ss, i), f) self.connect(f, (self.ss2v, i)) self.connect((self.v2ss, i), (self, i)) - + self.connect(self.ss2v, self.fft, self.v2ss) diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/fm_demod.py b/gnuradio-core/src/python/gnuradio/blks2impl/fm_demod.py index 55870513a..6bc0d7ed0 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/fm_demod.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/fm_demod.py @@ -1,23 +1,23 @@ # # Copyright 2006,2007 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, optfir from gnuradio.blks2impl.fm_emph import fm_deemph @@ -25,10 +25,10 @@ from math import pi class fm_demod_cf(gr.hier_block2): """ - Generalized FM demodulation block with deemphasis and audio + Generalized FM demodulation block with deemphasis and audio filtering. - This block demodulates a band-limited, complex down-converted FM + This block demodulates a band-limited, complex down-converted FM channel into the the original baseband signal, optionally applying deemphasis. Low pass filtering is done on the resultant signal. It produces an output float strem in the range of [-1.0, +1.0]. @@ -39,7 +39,7 @@ class fm_demod_cf(gr.hier_block2): @type deviation: float @param audio_decim: input to output decimation rate @type audio_decim: integer - @param audio_pass: audio low pass filter passband frequency + @param audio_pass: audio low pass filter passband frequency @type audio_pass: float @param audio_stop: audio low pass filter stop frequency @type audio_stop: float @@ -47,13 +47,13 @@ class fm_demod_cf(gr.hier_block2): @type gain: float @param tau: deemphasis time constant (default = 75e-6), specify 'None' to prevent deemphasis - """ - def __init__(self, channel_rate, audio_decim, deviation, + """ + def __init__(self, channel_rate, audio_decim, deviation, audio_pass, audio_stop, gain=1.0, tau=75e-6): gr.hier_block2.__init__(self, "fm_demod_cf", gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature gr.io_signature(1, 1, gr.sizeof_float)) # Output signature - + k = channel_rate/(2*pi*deviation) QUAD = gr.quadrature_demod_cf(k) @@ -75,15 +75,15 @@ class demod_20k0f3e_cf(fm_demod_cf): """ NBFM demodulation block, 20 KHz channels - This block demodulates a complex, downconverted, narrowband FM + This block demodulates a complex, downconverted, narrowband FM channel conforming to 20K0F3E emission standards, outputting floats in the range [-1.0, +1.0]. - + @param sample_rate: incoming sample rate of the FM baseband @type sample_rate: integer @param audio_decim: input to output decimation rate @type audio_decim: integer - """ + """ def __init__(self, channel_rate, audio_decim): fm_demod_cf.__init__(self, channel_rate, audio_decim, 5000, # Deviation @@ -93,9 +93,9 @@ class demod_20k0f3e_cf(fm_demod_cf): class demod_200kf3e_cf(fm_demod_cf): """ WFM demodulation block, mono. - - This block demodulates a complex, downconverted, wideband FM - channel conforming to 200KF3E emission standards, outputting + + This block demodulates a complex, downconverted, wideband FM + channel conforming to 200KF3E emission standards, outputting floats in the range [-1.0, +1.0]. @param sample_rate: incoming sample rate of the FM baseband @@ -103,7 +103,7 @@ class demod_200kf3e_cf(fm_demod_cf): @param audio_decim: input to output decimation rate @type audio_decim: integer """ - def __init__(self, channel_rate, audio_decim): + def __init__(self, channel_rate, audio_decim): fm_demod_cf.__init__(self, channel_rate, audio_decim, 75000, # Deviation 15000, # Audio passband diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/fm_emph.py b/gnuradio-core/src/python/gnuradio/blks2impl/fm_emph.py index fd19f5fd9..fc3f2d60d 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/fm_emph.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/fm_emph.py @@ -1,23 +1,23 @@ # # Copyright 2005,2007 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 import math @@ -39,8 +39,8 @@ class fm_deemph(gr.hier_block2): """ FM Deemphasis IIR filter. """ - - + + def __init__(self, fs, tau=75e-6): """ @param fs: sampling frequency in Hz @@ -51,7 +51,7 @@ class fm_deemph(gr.hier_block2): gr.hier_block2.__init__(self, "fm_deemph", gr.io_signature(1, 1, gr.sizeof_float), # Input signature gr.io_signature(1, 1, gr.sizeof_float)) # Output signature - + w_p = 1/tau w_pp = math.tan (w_p / (fs * 2)) # prewarped analog freq @@ -135,9 +135,9 @@ class fm_preemph(gr.hier_block2): gr.hier_block2.__init__(self, "fm_deemph", gr.io_signature(1, 1, gr.sizeof_float), # Input signature gr.io_signature(1, 1, gr.sizeof_float)) # Output signature - + # FIXME make this compute the right answer - + btaps = [1] ataps = [1] diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/nbfm_rx.py b/gnuradio-core/src/python/gnuradio/blks2impl/nbfm_rx.py index dcdd460b5..8bcb47ae1 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/nbfm_rx.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/nbfm_rx.py @@ -1,23 +1,23 @@ # # Copyright 2005 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. -# +# import math from gnuradio import gr, optfir diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/nbfm_tx.py b/gnuradio-core/src/python/gnuradio/blks2impl/nbfm_tx.py index 15818c204..839cf6784 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/nbfm_tx.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/nbfm_tx.py @@ -1,23 +1,23 @@ # # Copyright 2005 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. -# +# import math from gnuradio import gr, optfir @@ -48,7 +48,7 @@ class nbfm_tx(gr.hier_block2): gr.hier_block2.__init__(self, "nbfm_tx", gr.io_signature(1, 1, gr.sizeof_float), # Input signature gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature - + # FIXME audio_rate and quad_rate ought to be exact rationals audio_rate = int(audio_rate) quad_rate = int(quad_rate) @@ -56,9 +56,9 @@ class nbfm_tx(gr.hier_block2): if quad_rate % audio_rate != 0: raise ValueError, "quad_rate is not an integer multiple of audio_rate" - + do_interp = audio_rate != quad_rate - + if do_interp: interp_factor = quad_rate / audio_rate interp_taps = optfir.low_pass (interp_factor, # gain @@ -72,7 +72,7 @@ class nbfm_tx(gr.hier_block2): self.interpolator = gr.interp_fir_filter_fff (interp_factor, interp_taps) self.preemph = fm_preemph (quad_rate, tau=tau) - + k = 2 * math.pi * max_dev / quad_rate self.modulator = gr.frequency_modulator_fc (k) @@ -80,8 +80,8 @@ class nbfm_tx(gr.hier_block2): self.connect (self, self.interpolator, self.preemph, self.modulator, self) else: self.connect(self, self.preemph, self.modulator, self) - - + + class ctcss_gen_f(gr.hier_block2): def __init__(self, sample_rate, tone_freq): gr.hier_block2.__init__(self, "ctcss_gen_f", @@ -89,4 +89,4 @@ class ctcss_gen_f(gr.hier_block2): gr.io_signature(1, 1, gr.sizeof_float)) # Output signature self.plgen = gr.sig_source_f(sample_rate, gr.GR_SIN_WAVE, tone_freq, 0.1, 0.0) - self.connect(self.plgen, self) + self.connect(self.plgen, self) diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/pfb_arb_resampler.py b/gnuradio-core/src/python/gnuradio/blks2impl/pfb_arb_resampler.py index 3aadf700b..e83c327fc 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/pfb_arb_resampler.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/pfb_arb_resampler.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # 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. -# +# from gnuradio import gr, optfir @@ -35,7 +35,7 @@ class pfb_arb_resampler_ccf(gr.hier_block2): gr.hier_block2.__init__(self, "pfb_arb_resampler_ccf", gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature - + self._rate = rate self._size = flt_size @@ -63,7 +63,7 @@ class pfb_arb_resampler_ccf(gr.hier_block2): self.pfb = gr.pfb_arb_resampler_ccf(self._rate, self._taps, self._size) #print "PFB has %d taps\n" % (len(self._taps),) - + self.connect(self, self.pfb) self.connect(self.pfb, self) @@ -88,7 +88,7 @@ class pfb_arb_resampler_fff(gr.hier_block2): gr.hier_block2.__init__(self, "pfb_arb_resampler_fff", gr.io_signature(1, 1, gr.sizeof_float), # Input signature gr.io_signature(1, 1, gr.sizeof_float)) # Output signature - + self._rate = rate self._size = flt_size @@ -116,7 +116,7 @@ class pfb_arb_resampler_fff(gr.hier_block2): self.pfb = gr.pfb_arb_resampler_fff(self._rate, self._taps, self._size) #print "PFB has %d taps\n" % (len(self._taps),) - + self.connect(self, self.pfb) self.connect(self.pfb, self) diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/pfb_channelizer.py b/gnuradio-core/src/python/gnuradio/blks2impl/pfb_channelizer.py index 3ddc1749a..4bbe1bec6 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/pfb_channelizer.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/pfb_channelizer.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2009,2010 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, optfir @@ -34,7 +34,7 @@ class pfb_channelizer_ccf(gr.hier_block2): gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature gr.io_signature(numchans, numchans, gr.sizeof_gr_complex)) # Output signature - self._numchans = numchans + self._nchans = numchans self._oversample_rate = oversample_rate if taps is not None: @@ -47,7 +47,7 @@ class pfb_channelizer_ccf(gr.hier_block2): made = False while not made: try: - self._taps = optfir.low_pass(1, self._numchans, bw, bw+tb, ripple, atten) + self._taps = optfir.low_pass(1, self._nchans, bw, bw+tb, ripple, atten) made = True except RuntimeError: ripple += 0.01 @@ -58,22 +58,16 @@ class pfb_channelizer_ccf(gr.hier_block2): if(ripple >= 1.0): raise RuntimeError("optfir could not generate an appropriate filter.") - self.s2ss = gr.stream_to_streams(gr.sizeof_gr_complex, self._numchans) - self.pfb = gr.pfb_channelizer_ccf(self._numchans, self._taps, + self.s2ss = gr.stream_to_streams(gr.sizeof_gr_complex, self._nchans) + self.pfb = gr.pfb_channelizer_ccf(self._nchans, self._taps, self._oversample_rate) - self.v2s = gr.vector_to_streams(gr.sizeof_gr_complex, self._numchans) - self.connect(self, self.s2ss) - for i in xrange(self._numchans): + for i in xrange(self._nchans): self.connect((self.s2ss,i), (self.pfb,i)) + self.connect((self.pfb,i), (self,i)) - # Get independent streams from the filterbank and send them out - self.connect(self.pfb, self.v2s) + def set_channel_map(self, newmap): + self.pfb.set_channel_map(newmap) - for i in xrange(self._numchans): - self.connect((self.v2s,i), (self,i)) - - - diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/pfb_decimator.py b/gnuradio-core/src/python/gnuradio/blks2impl/pfb_decimator.py index 2e36e7bc1..adcdfe9ba 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/pfb_decimator.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/pfb_decimator.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # 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. -# +# from gnuradio import gr, optfir diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/pfb_interpolator.py b/gnuradio-core/src/python/gnuradio/blks2impl/pfb_interpolator.py index a6094f7f4..5492dfcac 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/pfb_interpolator.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/pfb_interpolator.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # 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. -# +# from gnuradio import gr, optfir @@ -64,7 +64,7 @@ class pfb_interpolator_ccf(gr.hier_block2): self.connect(self, self.pfb) self.connect(self.pfb, self) - - - - + + + + diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/rational_resampler.py b/gnuradio-core/src/python/gnuradio/blks2impl/rational_resampler.py index b7de0de7c..eea12af95 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/rational_resampler.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/rational_resampler.py @@ -1,23 +1,23 @@ # # Copyright 2005,2007 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, gru @@ -91,7 +91,7 @@ class _rational_resampler_base(gr.hier_block2): d = gru.gcd(interpolation, decimation) interpolation = interpolation // d decimation = decimation // d - + if taps is None: taps = design_filter(interpolation, decimation, fractional_bw) @@ -118,7 +118,7 @@ class rational_resampler_ccf(_rational_resampler_base): Rational resampling polyphase FIR filter with complex input, complex output and float taps. """ - _rational_resampler_base.__init__(self, gr.rational_resampler_base_ccf, + _rational_resampler_base.__init__(self, gr.rational_resampler_base_ccf, interpolation, decimation, taps, fractional_bw) class rational_resampler_ccc(_rational_resampler_base): @@ -127,5 +127,5 @@ class rational_resampler_ccc(_rational_resampler_base): Rational resampling polyphase FIR filter with complex input, complex output and complex taps. """ - _rational_resampler_base.__init__(self, gr.rational_resampler_base_ccc, + _rational_resampler_base.__init__(self, gr.rational_resampler_base_ccc, interpolation, decimation, taps, fractional_bw) diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/standard_squelch.py b/gnuradio-core/src/python/gnuradio/blks2impl/standard_squelch.py index c5fdc01db..bd7fb535a 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/standard_squelch.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/standard_squelch.py @@ -1,23 +1,23 @@ # # Copyright 2005,2007 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. -# +# import math from gnuradio import gr, optfir @@ -27,9 +27,9 @@ class standard_squelch(gr.hier_block2): gr.hier_block2.__init__(self, "standard_squelch", gr.io_signature(1, 1, gr.sizeof_float), # Input signature gr.io_signature(1, 1, gr.sizeof_float)) # Output signature - + self.input_node = gr.add_const_ff(0) # FIXME kludge - + self.low_iir = gr.iir_filter_ffd((0.0193,0,-0.0193),(1,1.9524,-0.9615)) self.low_square = gr.multiply_ff() self.low_smooth = gr.single_pole_iir_filter_ff(1/(0.01*audio_rate)) # 100ms time constant @@ -71,6 +71,6 @@ class standard_squelch(gr.hier_block2): def threshold(self): return self.gate.hi() - + def squelch_range(self): return (0.0, 1.0, 1.0/100) diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv.py b/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv.py index 3bdb22cce..d1cbcf912 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv.py @@ -1,23 +1,23 @@ # # Copyright 2005,2007 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 from gnuradio.blks2impl.fm_emph import fm_deemph @@ -27,10 +27,10 @@ class wfm_rcv(gr.hier_block2): def __init__ (self, quad_rate, audio_decimation): """ Hierarchical block for demodulating a broadcast FM signal. - + The input is the downconverted complex baseband signal (gr_complex). The output is the demodulated audio (float). - + @param quad_rate: input sample rate of complex baseband input. @type quad_rate: float @param audio_decimation: how much to decimate quad_rate to get to audio. @@ -45,9 +45,9 @@ class wfm_rcv(gr.hier_block2): max_dev = 75e3 fm_demod_gain = quad_rate/(2*math.pi*max_dev) audio_rate = quad_rate / audio_decimation - - # We assign to self so that outsiders can grab the demodulator + + # We assign to self so that outsiders can grab the demodulator # if they need to. E.g., to plot its output. # # input: complex; output: float @@ -55,7 +55,7 @@ class wfm_rcv(gr.hier_block2): # input: float; output: float self.deemph = fm_deemph (audio_rate) - + # compute FIR filter taps for audio filter width_of_transition_band = audio_rate / 32 audio_coeffs = gr.firdes.low_pass (1.0, # gain diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv_fmdet.py b/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv_fmdet.py index 14eaa1606..e229bcc2e 100755 --- a/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv_fmdet.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv_fmdet.py @@ -1,23 +1,23 @@ # # Copyright 2005,2006 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 from gnuradio.blks2impl.fm_emph import fm_deemph @@ -27,11 +27,11 @@ class wfm_rcv_fmdet(gr.hier_block2): def __init__ (self, demod_rate, audio_decimation): """ Hierarchical block for demodulating a broadcast FM signal. - + The input is the downconverted complex baseband signal (gr_complex). The output is two streams of the demodulated audio (float) 0=Left, 1=Right. - + @param demod_rate: input sample rate of complex baseband input. @type demod_rate: float @param audio_decimation: how much to decimate demod_rate to get to audio. @@ -48,13 +48,13 @@ class wfm_rcv_fmdet(gr.hier_block2): # if they need to. E.g., to plot its output. # # input: complex; output: float - + self.fm_demod = gr.fmdet_cf (demod_rate, lowfreq, highfreq, 0.05) # input: float; output: float self.deemph_Left = fm_deemph (audio_rate) self.deemph_Right = fm_deemph (audio_rate) - + # compute FIR filter taps for audio filter width_of_transition_band = audio_rate / 32 audio_coeffs = gr.firdes.low_pass (1.0 , # gain @@ -79,7 +79,7 @@ class wfm_rcv_fmdet(gr.hier_block2): -18980, width_of_transition_band, gr.firdes.WIN_HAMMING) - + #print "len stereo carrier filter = ",len(stereo_carrier_filter_coeffs) #print "stereo carrier filter ", stereo_carrier_filter_coeffs #print "width of transition band = ",width_of_transition_band, " audio rate = ", audio_rate @@ -125,7 +125,7 @@ class wfm_rcv_fmdet(gr.hier_block2): loop_bw = 2*math.pi/100.0 max_freq = -2.0*math.pi*18990/audio_rate; - min_freq = -2.0*math.pi*19010/audio_rate; + min_freq = -2.0*math.pi*19010/audio_rate; self.stereo_carrier_pll_recovery = gr.pll_refout_cc(loop_bw, max_freq, min_freq); @@ -133,7 +133,7 @@ class wfm_rcv_fmdet(gr.hier_block2): #self.stereo_carrier_pll_recovery.squelch_enable(False) ##pll_refout does not have squelch yet, so disabled for #now - + # set up mixer (multiplier) to get the L-R signal at # baseband @@ -145,7 +145,7 @@ class wfm_rcv_fmdet(gr.hier_block2): self.LmR_real = gr.complex_to_real(); self.Make_Left = gr.add_ff(); self.Make_Right = gr.sub_ff(); - + self.stereo_dsbsc_filter = gr.fir_filter_fcc(audio_decimation, stereo_dsbsc_filter_coeffs) @@ -155,7 +155,7 @@ class wfm_rcv_fmdet(gr.hier_block2): # send the real signal to complex filter to pick off the # carrier and then to one side of a multiplier self.connect (self, self.fm_demod, self.stereo_carrier_filter, - self.stereo_carrier_pll_recovery, + self.stereo_carrier_pll_recovery, (self.stereo_carrier_generator,0)) # send the already filtered carrier to the otherside of the carrier @@ -182,7 +182,7 @@ class wfm_rcv_fmdet(gr.hier_block2): # Make rds carrier by taking the squared pilot tone and # multiplying by pilot tone self.connect (self.stereo_basebander,(self.rds_carrier_generator,0)) - self.connect (self.stereo_carrier_pll_recovery,(self.rds_carrier_generator,1)) + self.connect (self.stereo_carrier_pll_recovery,(self.rds_carrier_generator,1)) # take signal, filter off rds, send into mixer 0 channel self.connect (self.fm_demod,self.rds_signal_filter,(self.rds_signal_generator,0)) @@ -194,7 +194,7 @@ class wfm_rcv_fmdet(gr.hier_block2): # send basebanded rds signal and send into "processor" # which for now is a null sink self.connect (self.rds_signal_generator,self_rds_signal_processor) - + if 1: # pick off the audio, L+R that is what we used to have and diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv_pll.py b/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv_pll.py index a2c1b3651..d4ce6d223 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv_pll.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/wfm_rcv_pll.py @@ -1,23 +1,23 @@ # # Copyright 2005,2006 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 from gnuradio.blks2impl.fm_emph import fm_deemph @@ -27,10 +27,10 @@ class wfm_rcv_pll(gr.hier_block2): def __init__ (self, demod_rate, audio_decimation): """ Hierarchical block for demodulating a broadcast FM signal. - + The input is the downconverted complex baseband signal (gr_complex). The output is two streams of the demodulated audio (float) 0=Left, 1=Right. - + @param demod_rate: input sample rate of complex baseband input. @type demod_rate: float @param audio_decimation: how much to decimate demod_rate to get to audio. @@ -43,7 +43,7 @@ class wfm_rcv_pll(gr.hier_block2): audio_rate = demod_rate / audio_decimation - # We assign to self so that outsiders can grab the demodulator + # We assign to self so that outsiders can grab the demodulator # if they need to. E.g., to plot its output. # # input: complex; output: float @@ -54,7 +54,7 @@ class wfm_rcv_pll(gr.hier_block2): # input: float; output: float self.deemph_Left = fm_deemph (audio_rate) self.deemph_Right = fm_deemph (audio_rate) - + # compute FIR filter taps for audio filter width_of_transition_band = audio_rate / 32 audio_coeffs = gr.firdes.low_pass (1.0 , # gain @@ -75,7 +75,7 @@ class wfm_rcv_pll(gr.hier_block2): -18980, width_of_transition_band, gr.firdes.WIN_HAMMING) - + #print "len stereo carrier filter = ",len(stereo_carrier_filter_coeffs) #print "stereo carrier filter ", stereo_carrier_filter_coeffs #print "width of transition band = ",width_of_transition_band, " audio rate = ", audio_rate @@ -126,10 +126,10 @@ class wfm_rcv_pll(gr.hier_block2): loop_bw = 2*math.pi/100.0 max_freq = -2.0*math.pi*18990/audio_rate; min_freq = -2.0*math.pi*19010/audio_rate; - + self.stereo_carrier_pll_recovery = gr.pll_refout_cc(loop_bw, max_freq, min_freq); - #self.stereo_carrier_pll_recovery.squelch_enable(False) #pll_refout does not have squelch yet, so disabled for now - + #self.stereo_carrier_pll_recovery.squelch_enable(False) #pll_refout does not have squelch yet, so disabled for now + # set up mixer (multiplier) to get the L-R signal at baseband @@ -140,7 +140,7 @@ class wfm_rcv_pll(gr.hier_block2): self.LmR_real = gr.complex_to_real(); self.Make_Left = gr.add_ff(); self.Make_Right = gr.sub_ff(); - + self.stereo_dsbsc_filter = gr.fir_filter_fcc(audio_decimation, stereo_dsbsc_filter_coeffs) @@ -166,14 +166,14 @@ class wfm_rcv_pll(gr.hier_block2): # Make rds carrier by taking the squared pilot tone and multiplying by pilot tone self.connect (self.stereo_basebander,(self.rds_carrier_generator,0)) - self.connect (self.stereo_carrier_pll_recovery,(self.rds_carrier_generator,1)) + self.connect (self.stereo_carrier_pll_recovery,(self.rds_carrier_generator,1)) # take signal, filter off rds, send into mixer 0 channel self.connect (self.fm_demod,self.rds_signal_filter,(self.rds_signal_generator,0)) # take rds_carrier_generator output and send into mixer 1 channel self.connect (self.rds_carrier_generator,(self.rds_signal_generator,1)) # send basebanded rds signal and send into "processor" which for now is a null sink self.connect (self.rds_signal_generator,self_rds_signal_processor) - + if 1: # pick off the audio, L+R that is what we used to have and send it to the summer diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/wfm_tx.py b/gnuradio-core/src/python/gnuradio/blks2impl/wfm_tx.py index c7c831ca1..3fcf98f89 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/wfm_tx.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/wfm_tx.py @@ -1,23 +1,23 @@ # # Copyright 2005,2007 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. -# +# import math from gnuradio import gr, optfir @@ -45,7 +45,7 @@ class wfm_tx(gr.hier_block2): gr.hier_block2.__init__(self, "wfm_tx", gr.io_signature(1, 1, gr.sizeof_float), # Input signature gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature - + # FIXME audio_rate and quad_rate ought to be exact rationals audio_rate = int(audio_rate) quad_rate = int(quad_rate) @@ -53,9 +53,9 @@ class wfm_tx(gr.hier_block2): if quad_rate % audio_rate != 0: raise ValueError, "quad_rate is not an integer multiple of audio_rate" - + do_interp = audio_rate != quad_rate - + if do_interp: interp_factor = quad_rate / audio_rate interp_taps = optfir.low_pass (interp_factor, # gain @@ -69,7 +69,7 @@ class wfm_tx(gr.hier_block2): self.interpolator = gr.interp_fir_filter_fff (interp_factor, interp_taps) self.preemph = fm_preemph (quad_rate, tau=tau) - + k = 2 * math.pi * max_dev / quad_rate self.modulator = gr.frequency_modulator_fc (k) diff --git a/gnuradio-core/src/python/gnuradio/eng_notation.py b/gnuradio-core/src/python/gnuradio/eng_notation.py index 63ff19944..c552a45f5 100644 --- a/gnuradio-core/src/python/gnuradio/eng_notation.py +++ b/gnuradio-core/src/python/gnuradio/eng_notation.py @@ -1,23 +1,23 @@ # # Copyright 2003 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. -# +# scale_factor = {} scale_factor['E'] = 1e18 diff --git a/gnuradio-core/src/python/gnuradio/eng_option.py b/gnuradio-core/src/python/gnuradio/eng_option.py index e10235f14..02e9b0b6d 100644 --- a/gnuradio-core/src/python/gnuradio/eng_option.py +++ b/gnuradio-core/src/python/gnuradio/eng_option.py @@ -1,23 +1,23 @@ # # Copyright 2004 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# '''Add support for engineering notation to optparse.OptionParser''' diff --git a/gnuradio-core/src/python/gnuradio/gr/.gitignore b/gnuradio-core/src/python/gnuradio/gr/.gitignore deleted file mode 100644 index bf03975bb..000000000 --- a/gnuradio-core/src/python/gnuradio/gr/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -/Makefile -/Makefile.in -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/*.pyo -/run_tests diff --git a/gnuradio-core/src/python/gnuradio/gr/Makefile.am b/gnuradio-core/src/python/gnuradio/gr/Makefile.am deleted file mode 100644 index b1550fc57..000000000 --- a/gnuradio-core/src/python/gnuradio/gr/Makefile.am +++ /dev/null @@ -1,103 +0,0 @@ -# -# Copyright 2004,2005,2006,2008,2010 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 - -EXTRA_DIST += \ - run_tests.in \ - test_16bit_1chunk.wav - -TESTS = run_tests - - -grgrpythondir = $(grpythondir)/gr - -grgrpython_PYTHON = \ - __init__.py \ - exceptions.py \ - gr_threading.py \ - gr_threading_23.py \ - gr_threading_24.py \ - hier_block2.py \ - prefs.py \ - top_block.py \ - pubsub.py - -noinst_PYTHON = \ - benchmark_filters.py \ - qa_add_and_friends.py \ - qa_add_v_and_friends.py \ - qa_agc.py \ - qa_argmax.py \ - qa_bin_statistics.py \ - qa_classify.py \ - qa_complex_to_xxx.py \ - qa_conjugate.py \ - qa_copy.py \ - qa_delay.py \ - qa_dc_blocker.py \ - qa_diff_encoder.py \ - qa_diff_phasor_cc.py \ - qa_ecc_ccsds_27.py \ - qa_feval.py \ - qa_fft.py \ - qa_fft_filter.py \ - qa_filter_delay_fc.py \ - qa_float_to_char.py \ - qa_float_to_int.py \ - qa_float_to_short.py \ - qa_fractional_interpolator.py \ - qa_frequency_modulator.py \ - qa_fsk_stuff.py \ - qa_glfsr_source.py \ - qa_goertzel.py \ - qa_head.py \ - qa_hier_block2.py \ - qa_hilbert.py \ - qa_iir.py \ - qa_int_to_float.py \ - qa_interleave.py \ - qa_interp_fir_filter.py \ - qa_kludge_copy.py \ - qa_kludged_imports.py \ - qa_max.py \ - qa_message.py \ - qa_multiply_conjugate.py \ - qa_mute.py \ - qa_nlog10.py \ - qa_noise.py \ - qa_packed_to_unpacked.py \ - qa_pipe_fittings.py \ - qa_pll_carriertracking.py \ - qa_pll_freqdet.py \ - qa_pll_refout.py \ - qa_pn_correlator_cc.py \ - qa_probe_signal.py \ - qa_rational_resampler.py \ - qa_sig_source.py \ - qa_single_pole_iir.py \ - qa_single_pole_iir_cc.py \ - qa_skiphead.py \ - qa_unpack_k_bits.py \ - qa_repeat.py \ - qa_scrambler.py \ - qa_udp_sink_source.py \ - qa_vector_sink_source.py diff --git a/gnuradio-core/src/python/gnuradio/gr/__init__.py b/gnuradio-core/src/python/gnuradio/gr/__init__.py index 73ca8e08f..602d1119f 100644 --- a/gnuradio-core/src/python/gnuradio/gr/__init__.py +++ b/gnuradio-core/src/python/gnuradio/gr/__init__.py @@ -1,23 +1,23 @@ # # Copyright 2003,2004,2006,2008,2009,2010 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. -# +# # The presence of this file turns this directory into a Python package @@ -35,7 +35,7 @@ except ImportError: from DLFCN import RTLD_GLOBAL as _RTLD_GLOBAL except ImportError: pass - + if _RTLD_GLOBAL != 0: _dlopenflags = sys.getdlopenflags() sys.setdlopenflags(_dlopenflags|_RTLD_GLOBAL) diff --git a/gnuradio-core/src/python/gnuradio/gr/benchmark_filters.py b/gnuradio-core/src/python/gnuradio/gr/benchmark_filters.py index 4d99a397f..4fc10b721 100755 --- a/gnuradio-core/src/python/gnuradio/gr/benchmark_filters.py +++ b/gnuradio-core/src/python/gnuradio/gr/benchmark_filters.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005,2006,2007 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. -# +# import time import random @@ -32,7 +32,7 @@ def make_random_complex_tuple(L): result.append(complex(random.uniform(-1000,1000), random.uniform(-1000,1000))) return tuple(result) - + def benchmark(name, creator, dec, ntaps, total_test_size, block_size): block_size = 32768 diff --git a/gnuradio-core/src/python/gnuradio/gr/exceptions.py b/gnuradio-core/src/python/gnuradio/gr/exceptions.py index 40b97e3ef..dba04750b 100644 --- a/gnuradio-core/src/python/gnuradio/gr/exceptions.py +++ b/gnuradio-core/src/python/gnuradio/gr/exceptions.py @@ -1,18 +1,18 @@ # # Copyright 2004 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/python/gnuradio/gr/gr_threading.py b/gnuradio-core/src/python/gnuradio/gr/gr_threading.py index 56d4228f7..5d6f0fdaf 100644 --- a/gnuradio-core/src/python/gnuradio/gr/gr_threading.py +++ b/gnuradio-core/src/python/gnuradio/gr/gr_threading.py @@ -1,23 +1,23 @@ # # Copyright 2005 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 sys import version_info as _version_info diff --git a/gnuradio-core/src/python/gnuradio/gr/hier_block2.py b/gnuradio-core/src/python/gnuradio/gr/hier_block2.py index debb65d91..0c45f1691 100644 --- a/gnuradio-core/src/python/gnuradio/gr/hier_block2.py +++ b/gnuradio-core/src/python/gnuradio/gr/hier_block2.py @@ -1,23 +1,23 @@ # # Copyright 2006,2007 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_core import hier_block2_swig @@ -95,7 +95,7 @@ class hier_block2(object): If more than two arguments are provided, they are disconnected successively. """ - + if len (points) < 1: raise ValueError, ("disconnect requires at least one endpoint; %d provided." % (len (points),)) else: diff --git a/gnuradio-core/src/python/gnuradio/gr/prefs.py b/gnuradio-core/src/python/gnuradio/gr/prefs.py index 40347a2f4..644aea848 100644 --- a/gnuradio-core/src/python/gnuradio/gr/prefs.py +++ b/gnuradio-core/src/python/gnuradio/gr/prefs.py @@ -1,23 +1,23 @@ # # Copyright 2006,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. -# +# import gnuradio_core as gsp _prefs_base = gsp.gr_prefs @@ -31,7 +31,7 @@ import sys def _user_prefs_filename(): return os.path.expanduser('~/.gnuradio/config.conf') - + def _sys_prefs_dirname(): return gsp.prefsdir() @@ -44,7 +44,7 @@ def _bool(x): if isinstance(x, (float, int)): return bool(x) raise TypeError, x - + class _prefs(_prefs_base): """ @@ -98,7 +98,7 @@ class _prefs(_prefs_base): return self.cp.getint(section, option) except: return default_val - + def get_double(self, section, option, default_val): try: return self.cp.getfloat(section, option) @@ -115,7 +115,7 @@ _prefs_db = _prefs() # (make check uses this to avoid interactions.) if os.getenv("GR_DONT_LOAD_PREFS", None) is None: _prefs_db._read_files() - + _prefs_base.set_singleton(_prefs_db) # tell C++ what instance to use diff --git a/gnuradio-core/src/python/gnuradio/gr/pubsub.py b/gnuradio-core/src/python/gnuradio/gr/pubsub.py index 8fb7a8519..90568418f 100644 --- a/gnuradio-core/src/python/gnuradio/gr/pubsub.py +++ b/gnuradio-core/src/python/gnuradio/gr/pubsub.py @@ -31,15 +31,15 @@ class pubsub(dict): self._publishers = { } self._subscribers = { } self._proxies = { } - + def __missing__(self, key, value=None): dict.__setitem__(self, key, value) self._publishers[key] = None self._subscribers[key] = [] self._proxies[key] = None - + def __setitem__(self, key, val): - if not self.has_key(key): + if not self.has_key(key): self.__missing__(key, val) elif self._proxies[key] is not None: (p, newkey) = self._proxies[key] @@ -68,7 +68,7 @@ class pubsub(dict): p.publish(newkey, publisher) else: self._publishers[key] = publisher - + def subscribe(self, key, subscriber): if not self.has_key(key): self.__missing__(key) if self._proxies[key] is not None: @@ -76,14 +76,14 @@ class pubsub(dict): p.subscribe(newkey, subscriber) else: self._subscribers[key].append(subscriber) - + def unpublish(self, key): if self._proxies[key] is not None: (p, newkey) = self._proxies[key] p.unpublish(newkey) else: self._publishers[key] = None - + def unsubscribe(self, key, subscriber): if self._proxies[key] is not None: (p, newkey) = self._proxies[key] @@ -94,7 +94,7 @@ class pubsub(dict): def proxy(self, key, p, newkey=None): if not self.has_key(key): self.__missing__(key) if newkey is None: newkey = key - self._proxies[key] = (p, newkey) + self._proxies[key] = (p, newkey) def unproxy(self, key): self._proxies[key] = None @@ -125,7 +125,7 @@ if __name__ == "__main__": # The third is a lambda function o.subscribe('foo', lambda x: sys.stdout.write('val='+`x`+'\n')) - # Update key 'foo', will notify subscribers + # Update key 'foo', will notify subscribers print "Updating 'foo' with three subscribers:" o['foo'] = 'bar'; @@ -135,7 +135,7 @@ if __name__ == "__main__": # Update now will only trigger second and third subscriber print "Updating 'foo' after removing a subscriber:" o['foo'] = 'bar2'; - + # Publish a key as a function, in this case, a lambda function o.publish('baz', lambda : 42) print "Published value of 'baz':", o['baz'] @@ -145,7 +145,7 @@ if __name__ == "__main__": # This will return None, as there is no publisher print "Value of 'baz' with no publisher:", o['baz'] - + # Set 'baz' key, it gets cached o['baz'] = 'bazzz' diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_add_and_friends.py b/gnuradio-core/src/python/gnuradio/gr/qa_add_and_friends.py index e3b20c3c3..7ccbbe8ad 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_add_and_friends.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_add_and_friends.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007,2010 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 diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_add_v_and_friends.py b/gnuradio-core/src/python/gnuradio/gr/qa_add_v_and_friends.py index 90056e09f..c8df47b39 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_add_v_and_friends.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_add_v_and_friends.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007,2010 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 @@ -91,7 +91,7 @@ class test_add_v_and_friends(gr_unittest.TestCase): self.tb.run() result_data = dst.data() self.assertEqual(exp_data, result_data) - + def help_const_ii(self, src_data, exp_data, op): src = gr.vector_source_i(src_data) srcv = gr.stream_to_vector(gr.sizeof_int, len(src_data)) @@ -101,7 +101,7 @@ class test_add_v_and_friends(gr_unittest.TestCase): self.tb.run() result_data = dst.data() self.assertEqual(exp_data, result_data) - + def help_const_ff(self, src_data, exp_data, op): src = gr.vector_source_f(src_data) srcv = gr.stream_to_vector(gr.sizeof_float, len(src_data)) @@ -111,7 +111,7 @@ class test_add_v_and_friends(gr_unittest.TestCase): self.tb.run() result_data = dst.data() self.assertEqual(exp_data, result_data) - + def help_const_cc(self, src_data, exp_data, op): src = gr.vector_source_c(src_data) srcv = gr.stream_to_vector(gr.sizeof_gr_complex, len(src_data)) @@ -121,7 +121,7 @@ class test_add_v_and_friends(gr_unittest.TestCase): self.tb.run() result_data = dst.data() self.assertEqual(exp_data, result_data) - + def test_add_vss_one(self): src1_data = (1,) @@ -130,7 +130,7 @@ class test_add_v_and_friends(gr_unittest.TestCase): expected_result = (6,) op = gr.add_vss(1) self.help_ss(1, (src1_data, src2_data, src3_data), expected_result, op) - + def test_add_vss_five(self): src1_data = (1, 2, 3, 4, 5) src2_data = (6, 7, 8, 9, 10) @@ -146,7 +146,7 @@ class test_add_v_and_friends(gr_unittest.TestCase): expected_result = (6,) op = gr.add_vii(1) self.help_ii(1, (src1_data, src2_data, src3_data), expected_result, op) - + def test_add_vii_five(self): src1_data = (1, 2, 3, 4, 5) src2_data = (6, 7, 8, 9, 10) @@ -162,7 +162,7 @@ class test_add_v_and_friends(gr_unittest.TestCase): expected_result = (6.0,) op = gr.add_vff(1) self.help_ff(1, (src1_data, src2_data, src3_data), expected_result, op) - + def test_add_vff_five(self): src1_data = (1.0, 2.0, 3.0, 4.0, 5.0) src2_data = (6.0, 7.0, 8.0, 9.0, 10.0) @@ -178,7 +178,7 @@ class test_add_v_and_friends(gr_unittest.TestCase): expected_result = (9.0+12j,) op = gr.add_vcc(1) self.help_cc(1, (src1_data, src2_data, src3_data), expected_result, op) - + def test_add_vcc_five(self): src1_data = (1.0+2.0j, 3.0+4.0j, 5.0+6.0j, 7.0+8.0j, 9.0+10.0j) src2_data = (11.0+12.0j, 13.0+14.0j, 15.0+16.0j, 17.0+18.0j, 19.0+20.0j) @@ -243,7 +243,7 @@ class test_add_v_and_friends(gr_unittest.TestCase): expected_result = (6,) op = gr.multiply_vss(1) self.help_ss(1, (src1_data, src2_data, src3_data), expected_result, op) - + def test_multiply_vss_five(self): src1_data = (1, 2, 3, 4, 5) src2_data = (6, 7, 8, 9, 10) @@ -259,7 +259,7 @@ class test_add_v_and_friends(gr_unittest.TestCase): expected_result = (6,) op = gr.multiply_vii(1) self.help_ii(1, (src1_data, src2_data, src3_data), expected_result, op) - + def test_multiply_vii_five(self): src1_data = (1, 2, 3, 4, 5) src2_data = (6, 7, 8, 9, 10) @@ -275,7 +275,7 @@ class test_add_v_and_friends(gr_unittest.TestCase): expected_result = (6.0,) op = gr.multiply_vff(1) self.help_ff(1, (src1_data, src2_data, src3_data), expected_result, op) - + def test_multiply_vff_five(self): src1_data = (1.0, 2.0, 3.0, 4.0, 5.0) src2_data = (6.0, 7.0, 8.0, 9.0, 10.0) @@ -291,7 +291,7 @@ class test_add_v_and_friends(gr_unittest.TestCase): expected_result = (-85+20j,) op = gr.multiply_vcc(1) self.help_cc(1, (src1_data, src2_data, src3_data), expected_result, op) - + def test_multiply_vcc_five(self): src1_data = (1.0+2.0j, 3.0+4.0j, 5.0+6.0j, 7.0+8.0j, 9.0+10.0j) src2_data = (11.0+12.0j, 13.0+14.0j, 15.0+16.0j, 17.0+18.0j, 19.0+20.0j) diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_agc.py b/gnuradio-core/src/python/gnuradio/gr/qa_agc.py index c55d191e0..9fd633576 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_agc.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_agc.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007,2010 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 math @@ -33,7 +33,7 @@ class test_agc (gr_unittest.TestCase): def tearDown (self): self.tb = None - + def test_001(self): ''' Test the complex AGC loop (single rate input) ''' tb = self.tb @@ -97,7 +97,7 @@ class test_agc (gr_unittest.TestCase): head = gr.head (gr.sizeof_gr_complex, int (5*sampling_freq * 0.10)) agc = gr.agc_cc(1e-3, 1, 1, 1000) - + tb.connect (src1, head) tb.connect (head, agc) tb.connect (agc, dst1) @@ -172,7 +172,7 @@ class test_agc (gr_unittest.TestCase): head = gr.head (gr.sizeof_float, int (5*sampling_freq * 0.10)) agc = gr.agc_ff(1e-3, 1, 1, 1000) - + tb.connect (src1, head) tb.connect (head, agc) tb.connect (agc, dst1) @@ -247,7 +247,7 @@ class test_agc (gr_unittest.TestCase): head = gr.head (gr.sizeof_gr_complex, int (5*sampling_freq * 0.10)) agc = gr.agc2_cc(1e-2, 1e-3, 1, 1, 1000) - + tb.connect (src1, head) tb.connect (head, agc) tb.connect (agc, dst1) @@ -322,7 +322,7 @@ class test_agc (gr_unittest.TestCase): head = gr.head (gr.sizeof_float, int (5*sampling_freq * 0.10)) agc = gr.agc2_ff(1e-2, 1e-3, 1, 1, 1000) - + tb.connect (src1, head) tb.connect (head, agc) tb.connect (agc, dst1) @@ -398,7 +398,7 @@ class test_agc (gr_unittest.TestCase): head = gr.head (gr.sizeof_gr_complex, int (5*sampling_freq * 0.10)) agc = gr.agc2_cc(1e-2, 1e-3, 1, 1, 1000) - + tb.connect (src1, head) tb.connect (head, agc) tb.connect (agc, dst1) diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_argmax.py b/gnuradio-core/src/python/gnuradio/gr/qa_argmax.py index a9db3295a..564eb620b 100644 --- a/gnuradio-core/src/python/gnuradio/gr/qa_argmax.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_argmax.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2007,2010 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 math diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_bin_statistics.py b/gnuradio-core/src/python/gnuradio/gr/qa_bin_statistics.py index b8b718a09..8a6dd9056 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_bin_statistics.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_bin_statistics.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2006,2007,2010 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 random @@ -44,7 +44,7 @@ class counter(gr.feval_dd): t = self.count self.count = self.count + self.step_size return t - + class counter3(gr.feval_dd): def __init__(self, f, step_size): @@ -62,7 +62,7 @@ class counter3(gr.feval_dd): except Exception, e: print "Exception: ", e return t - + def foobar3(new_t): #print "foobar3: new_t =", new_t pass @@ -84,7 +84,7 @@ class counter4(gr.feval_dd): except Exception, e: print "Exception: ", e return t - + class parse_msg(object): def __init__(self, msg): @@ -122,7 +122,7 @@ class xtest_bin_statistics(gr_unittest.TestCase): 9, 10, 11, 12, 13, 14, 15, 16 )]) - + src = gr.vector_source_f(src_data, False) s2v = gr.stream_to_vector(gr.sizeof_float, vlen) stats = gr.bin_statistics_f(vlen, msgq, tune, tune_delay, dwell_delay) @@ -150,7 +150,7 @@ class xtest_bin_statistics(gr_unittest.TestCase): expected_results = tuple([float(x) for x in ( 9, 10, 11, 12)]) - + src = gr.vector_source_f(src_data, False) s2v = gr.stream_to_vector(gr.sizeof_float, vlen) stats = gr.bin_statistics_f(vlen, msgq, tune, tune_delay, dwell_delay) @@ -180,7 +180,7 @@ class xtest_bin_statistics(gr_unittest.TestCase): expected_results = tuple([float(x) for x in ( 9, 10, 11, 12)]) - + src = gr.vector_source_f(src_data, False) s2v = gr.stream_to_vector(gr.sizeof_float, vlen) stats = gr.bin_statistics_f(vlen, msgq, tune, tune_delay, dwell_delay) @@ -196,7 +196,7 @@ class xtest_bin_statistics(gr_unittest.TestCase): def foobar4(self, new_t): #print "foobar4: new_t =", new_t pass - + def xtest_004(self): vlen = 4 tune = counter4(self, 1) @@ -213,7 +213,7 @@ class xtest_bin_statistics(gr_unittest.TestCase): expected_results = tuple([float(x) for x in ( 9, 10, 11, 12)]) - + src = gr.vector_source_f(src_data, False) s2v = gr.stream_to_vector(gr.sizeof_float, vlen) stats = gr.bin_statistics_f(vlen, msgq, tune, tune_delay, dwell_delay) diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_boolean_operators.py b/gnuradio-core/src/python/gnuradio/gr/qa_boolean_operators.py index 8cfb60099..d7d134dcb 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_boolean_operators.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_boolean_operators.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007,2008,2010 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 @@ -59,7 +59,7 @@ class test_boolean_operators (gr_unittest.TestCase): self.tb.run () result_data = dst.data () self.assertEqual (exp_data, result_data) - + def test_xor_ss (self): src1_data = (1, 2, 3, 0x5004, 0x1150) src2_data = (8, 2, 1 , 0x0508, 0x1105) diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_complex_to_xxx.py b/gnuradio-core/src/python/gnuradio/gr/qa_complex_to_xxx.py index 01679dc05..946c0d7f8 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_complex_to_xxx.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_complex_to_xxx.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007,2010 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 math diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_conjugate.py b/gnuradio-core/src/python/gnuradio/gr/qa_conjugate.py index c07902a5a..17fa891e2 100644 --- a/gnuradio-core/src/python/gnuradio/gr/qa_conjugate.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_conjugate.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest @@ -34,11 +34,11 @@ class test_conjugate (gr_unittest.TestCase): src_data = (-2-2j, -1-1j, -2+2j, -1+1j, 2-2j, 1-1j, 2+2j, 1+1j, 0+0j) - + exp_data = (-2+2j, -1+1j, -2-2j, -1-1j, 2+2j, 1+1j, 2-2j, 1-1j, 0-0j) - + src = gr.vector_source_c(src_data) op = gr.conjugate_cc () dst = gr.vector_sink_c () diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_copy.py b/gnuradio-core/src/python/gnuradio/gr/qa_copy.py index e8ee480cc..68c8e451f 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_copy.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_copy.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2009,2010 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 @@ -40,7 +40,7 @@ class test_copy(gr_unittest.TestCase): self.tb.run() dst_data = dst.data() self.assertEqual(expected_result, dst_data) - + def test_copy_drop (self): src_data = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) expected_result = () @@ -52,7 +52,7 @@ class test_copy(gr_unittest.TestCase): self.tb.run() dst_data = dst.data() self.assertEqual(expected_result, dst_data) - + if __name__ == '__main__': gr_unittest.run(test_copy, "test_copy.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_dc_blocker.py b/gnuradio-core/src/python/gnuradio/gr/qa_dc_blocker.py index 8977b475a..0f6fa86f5 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_dc_blocker.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_dc_blocker.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest @@ -32,7 +32,7 @@ class test_dc_blocker(gr_unittest.TestCase): def test_001(self): ''' Test impulse response - long form, cc ''' - src_data = [1,] + 100*[0,] + src_data = [1,] + 100*[0,] expected_result = ((-0.02072429656982422+0j), (-0.02081298828125+0j), (0.979156494140625+0j), (-0.02081298828125+0j), (-0.02072429656982422+0j)) @@ -50,7 +50,7 @@ class test_dc_blocker(gr_unittest.TestCase): def test_002(self): ''' Test impulse response - short form, cc ''' - src_data = [1,] + 100*[0,] + src_data = [1,] + 100*[0,] expected_result = ((-0.029296875+0j), (-0.0302734375+0j), (0.96875+0j), (-0.0302734375+0j), (-0.029296875+0j)) @@ -69,7 +69,7 @@ class test_dc_blocker(gr_unittest.TestCase): def test_003(self): ''' Test impulse response - long form, ff ''' - src_data = [1,] + 100*[0,] + src_data = [1,] + 100*[0,] expected_result = ((-0.02072429656982422), (-0.02081298828125), (0.979156494140625), (-0.02081298828125), (-0.02072429656982422)) @@ -87,7 +87,7 @@ class test_dc_blocker(gr_unittest.TestCase): def test_004(self): ''' Test impulse response - short form, ff ''' - src_data = [1,] + 100*[0,] + src_data = [1,] + 100*[0,] expected_result = ((-0.029296875), (-0.0302734375), (0.96875), (-0.0302734375), (-0.029296875)) @@ -105,4 +105,4 @@ class test_dc_blocker(gr_unittest.TestCase): if __name__ == '__main__': gr_unittest.run(test_dc_blocker, "test_dc_blocker.xml") - + diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_delay.py b/gnuradio-core/src/python/gnuradio/gr/qa_delay.py index 114e50108..0d0bc1330 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_delay.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_delay.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007,2010 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 math diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_diff_encoder.py b/gnuradio-core/src/python/gnuradio/gr/qa_diff_encoder.py index 97e9e329a..c1fe2a700 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_diff_encoder.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_diff_encoder.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2006,2007,2010 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 math @@ -30,7 +30,7 @@ def make_random_int_tuple(L, min, max): result.append(random.randint(min, max)) return tuple(result) - + class test_diff_encoder (gr_unittest.TestCase): def setUp (self): diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_diff_phasor_cc.py b/gnuradio-core/src/python/gnuradio/gr/qa_diff_phasor_cc.py index 5ac115e20..41f96aa61 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_diff_phasor_cc.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_diff_phasor_cc.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007,2010 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 math diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_ecc_ccsds_27.py b/gnuradio-core/src/python/gnuradio/gr/qa_ecc_ccsds_27.py index caf3959f4..29122ff3e 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_ecc_ccsds_27.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_ecc_ccsds_27.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007,2010 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 @@ -44,7 +44,7 @@ class test_ccsds_27 (gr_unittest.TestCase): self.tb.run() dst_data = dst.data() self.assertEqual(expected, dst_data) - + if __name__ == '__main__': gr_unittest.run(test_ccsds_27, "test_ccsds_27.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_feval.py b/gnuradio-core/src/python/gnuradio/gr/qa_feval.py index a91409537..9018e12f3 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_feval.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_feval.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2006,2007,2010 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 @@ -59,7 +59,7 @@ class test_feval(gr_unittest.TestCase): actual_result = tuple([gr.feval_dd_example(f, x) for x in src_data]) self.assertEqual(expected_result, actual_result) - + def test_ll_1(self): f = my_add2_ll() src_data = (0, 1, 2, 3, 4) @@ -92,7 +92,7 @@ class test_feval(gr_unittest.TestCase): # this is python -> C++ -> python and back again... actual_result = tuple([gr.feval_cc_example(f, x) for x in src_data]) self.assertEqual(expected_result, actual_result) - + def test_void_1(self): # this is all in python f = my_feval() diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_fft.py b/gnuradio-core/src/python/gnuradio/gr/qa_fft.py index e90eb2e7f..693d0e67c 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_fft.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_fft.py @@ -1,19 +1,19 @@ #!/usr/bin/env python # # Copyright 2008,2010 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. @@ -209,4 +209,4 @@ class test_fft(gr_unittest.TestCase): if __name__ == '__main__': gr_unittest.run(test_fft, "test_fft.xml") - + diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_fft_filter.py b/gnuradio-core/src/python/gnuradio/gr/qa_fft_filter.py index 1e9fdb6a8..c0aadc306 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_fft_filter.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_fft_filter.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2005,2007,2010 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 sys @@ -107,7 +107,7 @@ class test_fft_filter(gr_unittest.TestCase): #print 'expected:', expected_result #print 'results: ', result_data self.assertComplexTuplesAlmostEqual (expected_result, result_data, 5) - + def test_ccc_002(self): # Test nthreads @@ -125,7 +125,7 @@ class test_fft_filter(gr_unittest.TestCase): #print 'expected:', expected_result #print 'results: ', result_data self.assertComplexTuplesAlmostEqual (expected_result, result_data, 5) - + def test_ccc_003(self): tb = gr.top_block() src_data = (0,1,2,3,4,5,6,7) @@ -140,7 +140,7 @@ class test_fft_filter(gr_unittest.TestCase): #print 'expected:', expected_result #print 'results: ', result_data self.assertComplexTuplesAlmostEqual (expected_result, result_data, 5) - + def test_ccc_004(self): random.seed(0) @@ -160,7 +160,7 @@ class test_fft_filter(gr_unittest.TestCase): tb.run() result_data = dst.data() del tb - + self.assert_fft_ok2(expected_result, result_data) def test_ccc_005(self): @@ -227,7 +227,7 @@ class test_fft_filter(gr_unittest.TestCase): #print 'expected:', expected_result #print 'results: ', result_data self.assertFloatTuplesAlmostEqual (expected_result, result_data, 5) - + def test_fff_002(self): tb = gr.top_block() @@ -243,7 +243,7 @@ class test_fft_filter(gr_unittest.TestCase): #print 'expected:', expected_result #print 'results: ', result_data self.assertFloatTuplesAlmostEqual (expected_result, result_data, 5) - + def test_fff_003(self): # Test 02 with nthreads tb = gr.top_block() @@ -258,7 +258,7 @@ class test_fft_filter(gr_unittest.TestCase): tb.run() result_data = dst.data() self.assertFloatTuplesAlmostEqual (expected_result, result_data, 5) - + def xtest_fff_004(self): random.seed(0) for i in xrange(25): @@ -380,4 +380,4 @@ class test_fft_filter(gr_unittest.TestCase): if __name__ == '__main__': gr_unittest.run(test_fft_filter, "test_fft_filter.xml") - + diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_filter_delay_fc.py b/gnuradio-core/src/python/gnuradio/gr/qa_filter_delay_fc.py index a25c65e5c..8d325fc3e 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_filter_delay_fc.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_filter_delay_fc.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007,2010 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 math @@ -34,68 +34,68 @@ class test_filter_delay_fc (gr_unittest.TestCase): def test_001_filter_delay_one_input (self): # expected result - expected_result = ( -1.4678005338941702e-11j, - -0.0011950774351134896j, - -0.0019336787518113852j, - -0.0034673355985432863j, - -0.0036765895783901215j, - -0.004916108213365078j, - -0.0042778430506587029j, - -0.006028641015291214j, - -0.005476709920912981j, - -0.0092810001224279404j, - -0.0095402700826525688j, - -0.016060983762145042j, - -0.016446959227323532j, - -0.02523401565849781j, - -0.024382550269365311j, - -0.035477779805660248j, - -0.033021725714206696j, - -0.048487484455108643j, - -0.04543270543217659j, - -0.069477587938308716j, - -0.066984444856643677j, - -0.10703597217798233j, - -0.10620346665382385j, - -0.1852707713842392j, - -0.19357112050056458j, - (7.2191945754696007e-09 -0.50004088878631592j), - (0.58778399229049683 -0.6155126690864563j), - (0.95105588436126709 -0.12377222627401352j), - (0.95105588436126709 +0.41524654626846313j), - (0.5877838134765625 +0.91611981391906738j), - (5.8516356205018383e-09 +1.0670661926269531j), - (-0.5877840518951416 +0.87856143712997437j), - (-0.95105588436126709 +0.35447561740875244j), - (-0.95105588436126709 -0.26055556535720825j), - (-0.5877838134765625 -0.77606213092803955j), - (-8.7774534307527574e-09 -0.96460390090942383j), - (0.58778399229049683 -0.78470128774642944j), - (0.95105588436126709 -0.28380891680717468j), - (0.95105588436126709 +0.32548999786376953j), - (0.5877838134765625 +0.82514488697052002j), - (1.4629089051254596e-08 +1.0096219778060913j), - (-0.5877840518951416 +0.81836479902267456j), - (-0.95105588436126709 +0.31451958417892456j), - (-0.95105588436126709 -0.3030143678188324j), - (-0.5877838134765625 -0.80480599403381348j), - (-1.7554906861505515e-08 -0.99516552686691284j), - (0.58778399229049683 -0.80540722608566284j), - (0.95105582475662231 -0.30557557940483093j), - (0.95105588436126709 +0.31097668409347534j), - (0.5877838134765625 +0.81027895212173462j), - (2.3406542482007353e-08 +1.0000816583633423j), - (-0.5877840518951416 +0.80908381938934326j), - (-0.95105588436126709 +0.30904293060302734j), - (-0.95105588436126709 -0.30904296040534973j), - (-0.5877838134765625 -0.80908387899398804j), - (-2.6332360292258272e-08 -1.0000815391540527j), - (0.58778399229049683 -0.80908381938934326j), - (0.95105582475662231 -0.30904299020767212j), - (0.95105588436126709 +0.30904293060302734j), - (0.5877838134765625 +0.80908381938934326j), - (3.218399768911695e-08 +1.0000815391540527j)) - + expected_result = ( -1.4678005338941702e-11j, + -0.0011950774351134896j, + -0.0019336787518113852j, + -0.0034673355985432863j, + -0.0036765895783901215j, + -0.004916108213365078j, + -0.0042778430506587029j, + -0.006028641015291214j, + -0.005476709920912981j, + -0.0092810001224279404j, + -0.0095402700826525688j, + -0.016060983762145042j, + -0.016446959227323532j, + -0.02523401565849781j, + -0.024382550269365311j, + -0.035477779805660248j, + -0.033021725714206696j, + -0.048487484455108643j, + -0.04543270543217659j, + -0.069477587938308716j, + -0.066984444856643677j, + -0.10703597217798233j, + -0.10620346665382385j, + -0.1852707713842392j, + -0.19357112050056458j, + (7.2191945754696007e-09 -0.50004088878631592j), + (0.58778399229049683 -0.6155126690864563j), + (0.95105588436126709 -0.12377222627401352j), + (0.95105588436126709 +0.41524654626846313j), + (0.5877838134765625 +0.91611981391906738j), + (5.8516356205018383e-09 +1.0670661926269531j), + (-0.5877840518951416 +0.87856143712997437j), + (-0.95105588436126709 +0.35447561740875244j), + (-0.95105588436126709 -0.26055556535720825j), + (-0.5877838134765625 -0.77606213092803955j), + (-8.7774534307527574e-09 -0.96460390090942383j), + (0.58778399229049683 -0.78470128774642944j), + (0.95105588436126709 -0.28380891680717468j), + (0.95105588436126709 +0.32548999786376953j), + (0.5877838134765625 +0.82514488697052002j), + (1.4629089051254596e-08 +1.0096219778060913j), + (-0.5877840518951416 +0.81836479902267456j), + (-0.95105588436126709 +0.31451958417892456j), + (-0.95105588436126709 -0.3030143678188324j), + (-0.5877838134765625 -0.80480599403381348j), + (-1.7554906861505515e-08 -0.99516552686691284j), + (0.58778399229049683 -0.80540722608566284j), + (0.95105582475662231 -0.30557557940483093j), + (0.95105588436126709 +0.31097668409347534j), + (0.5877838134765625 +0.81027895212173462j), + (2.3406542482007353e-08 +1.0000816583633423j), + (-0.5877840518951416 +0.80908381938934326j), + (-0.95105588436126709 +0.30904293060302734j), + (-0.95105588436126709 -0.30904296040534973j), + (-0.5877838134765625 -0.80908387899398804j), + (-2.6332360292258272e-08 -1.0000815391540527j), + (0.58778399229049683 -0.80908381938934326j), + (0.95105582475662231 -0.30904299020767212j), + (0.95105588436126709 +0.30904293060302734j), + (0.5877838134765625 +0.80908381938934326j), + (3.218399768911695e-08 +1.0000815391540527j)) + tb = self.tb sampling_freq = 100 @@ -113,7 +113,7 @@ class test_filter_delay_fc (gr_unittest.TestCase): tb.connect (src1, head) tb.connect (head, hd) tb.connect (hd,dst2) - + tb.run () # get output @@ -126,69 +126,69 @@ class test_filter_delay_fc (gr_unittest.TestCase): # as above # expected result - expected_result = ( -1.4678005338941702e-11j, - -0.0011950774351134896j, - -0.0019336787518113852j, - -0.0034673355985432863j, - -0.0036765895783901215j, - -0.004916108213365078j, - -0.0042778430506587029j, - -0.006028641015291214j, - -0.005476709920912981j, - -0.0092810001224279404j, - -0.0095402700826525688j, - -0.016060983762145042j, - -0.016446959227323532j, - -0.02523401565849781j, - -0.024382550269365311j, - -0.035477779805660248j, - -0.033021725714206696j, - -0.048487484455108643j, - -0.04543270543217659j, - -0.069477587938308716j, - -0.066984444856643677j, - -0.10703597217798233j, - -0.10620346665382385j, - -0.1852707713842392j, - -0.19357112050056458j, - (7.2191945754696007e-09 -0.50004088878631592j), - (0.58778399229049683 -0.6155126690864563j), - (0.95105588436126709 -0.12377222627401352j), - (0.95105588436126709 +0.41524654626846313j), - (0.5877838134765625 +0.91611981391906738j), - (5.8516356205018383e-09 +1.0670661926269531j), - (-0.5877840518951416 +0.87856143712997437j), - (-0.95105588436126709 +0.35447561740875244j), - (-0.95105588436126709 -0.26055556535720825j), - (-0.5877838134765625 -0.77606213092803955j), - (-8.7774534307527574e-09 -0.96460390090942383j), - (0.58778399229049683 -0.78470128774642944j), - (0.95105588436126709 -0.28380891680717468j), - (0.95105588436126709 +0.32548999786376953j), - (0.5877838134765625 +0.82514488697052002j), - (1.4629089051254596e-08 +1.0096219778060913j), - (-0.5877840518951416 +0.81836479902267456j), - (-0.95105588436126709 +0.31451958417892456j), - (-0.95105588436126709 -0.3030143678188324j), - (-0.5877838134765625 -0.80480599403381348j), - (-1.7554906861505515e-08 -0.99516552686691284j), - (0.58778399229049683 -0.80540722608566284j), - (0.95105582475662231 -0.30557557940483093j), - (0.95105588436126709 +0.31097668409347534j), - (0.5877838134765625 +0.81027895212173462j), - (2.3406542482007353e-08 +1.0000816583633423j), - (-0.5877840518951416 +0.80908381938934326j), - (-0.95105588436126709 +0.30904293060302734j), - (-0.95105588436126709 -0.30904296040534973j), - (-0.5877838134765625 -0.80908387899398804j), - (-2.6332360292258272e-08 -1.0000815391540527j), - (0.58778399229049683 -0.80908381938934326j), - (0.95105582475662231 -0.30904299020767212j), - (0.95105588436126709 +0.30904293060302734j), - (0.5877838134765625 +0.80908381938934326j), - (3.218399768911695e-08 +1.0000815391540527j)) - - + expected_result = ( -1.4678005338941702e-11j, + -0.0011950774351134896j, + -0.0019336787518113852j, + -0.0034673355985432863j, + -0.0036765895783901215j, + -0.004916108213365078j, + -0.0042778430506587029j, + -0.006028641015291214j, + -0.005476709920912981j, + -0.0092810001224279404j, + -0.0095402700826525688j, + -0.016060983762145042j, + -0.016446959227323532j, + -0.02523401565849781j, + -0.024382550269365311j, + -0.035477779805660248j, + -0.033021725714206696j, + -0.048487484455108643j, + -0.04543270543217659j, + -0.069477587938308716j, + -0.066984444856643677j, + -0.10703597217798233j, + -0.10620346665382385j, + -0.1852707713842392j, + -0.19357112050056458j, + (7.2191945754696007e-09 -0.50004088878631592j), + (0.58778399229049683 -0.6155126690864563j), + (0.95105588436126709 -0.12377222627401352j), + (0.95105588436126709 +0.41524654626846313j), + (0.5877838134765625 +0.91611981391906738j), + (5.8516356205018383e-09 +1.0670661926269531j), + (-0.5877840518951416 +0.87856143712997437j), + (-0.95105588436126709 +0.35447561740875244j), + (-0.95105588436126709 -0.26055556535720825j), + (-0.5877838134765625 -0.77606213092803955j), + (-8.7774534307527574e-09 -0.96460390090942383j), + (0.58778399229049683 -0.78470128774642944j), + (0.95105588436126709 -0.28380891680717468j), + (0.95105588436126709 +0.32548999786376953j), + (0.5877838134765625 +0.82514488697052002j), + (1.4629089051254596e-08 +1.0096219778060913j), + (-0.5877840518951416 +0.81836479902267456j), + (-0.95105588436126709 +0.31451958417892456j), + (-0.95105588436126709 -0.3030143678188324j), + (-0.5877838134765625 -0.80480599403381348j), + (-1.7554906861505515e-08 -0.99516552686691284j), + (0.58778399229049683 -0.80540722608566284j), + (0.95105582475662231 -0.30557557940483093j), + (0.95105588436126709 +0.31097668409347534j), + (0.5877838134765625 +0.81027895212173462j), + (2.3406542482007353e-08 +1.0000816583633423j), + (-0.5877840518951416 +0.80908381938934326j), + (-0.95105588436126709 +0.30904293060302734j), + (-0.95105588436126709 -0.30904296040534973j), + (-0.5877838134765625 -0.80908387899398804j), + (-2.6332360292258272e-08 -1.0000815391540527j), + (0.58778399229049683 -0.80908381938934326j), + (0.95105582475662231 -0.30904299020767212j), + (0.95105588436126709 +0.30904293060302734j), + (0.5877838134765625 +0.80908381938934326j), + (3.218399768911695e-08 +1.0000815391540527j)) + + tb = self.tb sampling_freq = 100 @@ -220,76 +220,76 @@ class test_filter_delay_fc (gr_unittest.TestCase): # give two different inputs # expected result - expected_result = ( -0.0020331963896751404j, - -0.0016448829555884004j, - -0.0032375147566199303j, - -0.0014826074475422502j, - -0.0033034090884029865j, - -0.00051144487224519253j, - -0.0043686260469257832j, - -0.0010198024101555347j, - -0.0082517862319946289j, - -0.003456643782556057j, - -0.014193611219525337j, - -0.005875137634575367j, - -0.020293503999710083j, - -0.0067503536120057106j, - -0.026798896491527557j, - -0.0073488112539052963j, - -0.037041611969470978j, - -0.010557252913713455j, - -0.055669989436864853j, - -0.018332764506340027j, - -0.089904911816120148j, - -0.033361352980136871j, - -0.16902604699134827j, - -0.074318811297416687j, - -0.58429563045501709j, - (7.2191945754696007e-09 -0.35892376303672791j), - (0.58778399229049683 +0.63660913705825806j), - (0.95105588436126709 +0.87681591510772705j), - (0.95105588436126709 +0.98705857992172241j), - (0.5877838134765625 +0.55447429418563843j), - (5.8516356205018383e-09 +0.026006083935499191j), - (-0.5877840518951416 -0.60616838932037354j), - (-0.95105588436126709 -0.9311758279800415j), - (-0.95105588436126709 -0.96169203519821167j), - (-0.5877838134765625 -0.57292771339416504j), - (-8.7774534307527574e-09 -0.0073488391935825348j), - (0.58778399229049683 +0.59720659255981445j), - (0.95105588436126709 +0.94438445568084717j), - (0.95105588436126709 +0.95582199096679688j), - (0.5877838134765625 +0.58196049928665161j), - (1.4629089051254596e-08 +0.0026587247848510742j), - (-0.5877840518951416 -0.59129220247268677j), - (-0.95105588436126709 -0.94841635227203369j), - (-0.95105588436126709 -0.95215457677841187j), - (-0.5877838134765625 -0.58535969257354736j), - (-1.7554906861505515e-08 -0.00051158666610717773j), - (0.58778399229049683 +0.58867418766021729j), - (0.95105582475662231 +0.94965213537216187j), - (0.95105588436126709 +0.95050644874572754j), - (0.5877838134765625 +0.58619076013565063j), - (2.3406542482007353e-08 +1.1920928955078125e-07j), - (-0.5877840518951416 -0.58783555030822754j), - (-0.95105588436126709 -0.95113480091094971j), - (-0.95105588436126709 -0.95113474130630493j), - (-0.5877838134765625 -0.58783555030822754j), - (-2.6332360292258272e-08 -8.1956386566162109e-08j), - (0.58778399229049683 +0.58783555030822754j), - (0.95105582475662231 +0.95113474130630493j), - (0.95105588436126709 +0.95113474130630493j), - (0.5877838134765625 +0.58783560991287231j), + expected_result = ( -0.0020331963896751404j, + -0.0016448829555884004j, + -0.0032375147566199303j, + -0.0014826074475422502j, + -0.0033034090884029865j, + -0.00051144487224519253j, + -0.0043686260469257832j, + -0.0010198024101555347j, + -0.0082517862319946289j, + -0.003456643782556057j, + -0.014193611219525337j, + -0.005875137634575367j, + -0.020293503999710083j, + -0.0067503536120057106j, + -0.026798896491527557j, + -0.0073488112539052963j, + -0.037041611969470978j, + -0.010557252913713455j, + -0.055669989436864853j, + -0.018332764506340027j, + -0.089904911816120148j, + -0.033361352980136871j, + -0.16902604699134827j, + -0.074318811297416687j, + -0.58429563045501709j, + (7.2191945754696007e-09 -0.35892376303672791j), + (0.58778399229049683 +0.63660913705825806j), + (0.95105588436126709 +0.87681591510772705j), + (0.95105588436126709 +0.98705857992172241j), + (0.5877838134765625 +0.55447429418563843j), + (5.8516356205018383e-09 +0.026006083935499191j), + (-0.5877840518951416 -0.60616838932037354j), + (-0.95105588436126709 -0.9311758279800415j), + (-0.95105588436126709 -0.96169203519821167j), + (-0.5877838134765625 -0.57292771339416504j), + (-8.7774534307527574e-09 -0.0073488391935825348j), + (0.58778399229049683 +0.59720659255981445j), + (0.95105588436126709 +0.94438445568084717j), + (0.95105588436126709 +0.95582199096679688j), + (0.5877838134765625 +0.58196049928665161j), + (1.4629089051254596e-08 +0.0026587247848510742j), + (-0.5877840518951416 -0.59129220247268677j), + (-0.95105588436126709 -0.94841635227203369j), + (-0.95105588436126709 -0.95215457677841187j), + (-0.5877838134765625 -0.58535969257354736j), + (-1.7554906861505515e-08 -0.00051158666610717773j), + (0.58778399229049683 +0.58867418766021729j), + (0.95105582475662231 +0.94965213537216187j), + (0.95105588436126709 +0.95050644874572754j), + (0.5877838134765625 +0.58619076013565063j), + (2.3406542482007353e-08 +1.1920928955078125e-07j), + (-0.5877840518951416 -0.58783555030822754j), + (-0.95105588436126709 -0.95113480091094971j), + (-0.95105588436126709 -0.95113474130630493j), + (-0.5877838134765625 -0.58783555030822754j), + (-2.6332360292258272e-08 -8.1956386566162109e-08j), + (0.58778399229049683 +0.58783555030822754j), + (0.95105582475662231 +0.95113474130630493j), + (0.95105588436126709 +0.95113474130630493j), + (0.5877838134765625 +0.58783560991287231j), (3.218399768911695e-08 +1.1920928955078125e-07j)) tb = self.tb sampling_freq = 100 ntaps = 51 - + src1 = gr.sig_source_f (sampling_freq, gr.GR_SIN_WAVE,sampling_freq * 0.10, 1.0) src2 = gr.sig_source_f (sampling_freq, gr.GR_COS_WAVE,sampling_freq * 0.10, 1.0) - + head1 = gr.head (gr.sizeof_float, int (ntaps + sampling_freq * 0.10)) head2 = gr.head (gr.sizeof_float, int (ntaps + sampling_freq * 0.10)) @@ -300,7 +300,7 @@ class test_filter_delay_fc (gr_unittest.TestCase): tb.connect (src1, head1) tb.connect (src2, head2) - + tb.connect (head1, (hd,0)) tb.connect (head2, (hd,1)) tb.connect (hd, dst2) @@ -312,6 +312,6 @@ class test_filter_delay_fc (gr_unittest.TestCase): self.assertComplexTuplesAlmostEqual (expected_result, result_data, 5) - + if __name__ == '__main__': gr_unittest.run(test_filter_delay_fc, "test_filter_delay_fc.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_float_to_char.py b/gnuradio-core/src/python/gnuradio/gr/qa_float_to_char.py index ecdd36228..057e297f9 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_float_to_char.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_float_to_char.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011,2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest class test_float_to_char (gr_unittest.TestCase): @@ -60,7 +60,7 @@ class test_float_to_char (gr_unittest.TestCase): self.assertEqual(expected_result, result_data) def test_003(self): - + scale = 2 vlen = 3 src_data = (0.0, 1.1, 2.2, 3.3, 4.4, 5.5, -1.1, -2.2, -3.3) diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_float_to_int.py b/gnuradio-core/src/python/gnuradio/gr/qa_float_to_int.py index 977a8518d..5c7a412d2 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_float_to_int.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_float_to_int.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest @@ -63,7 +63,7 @@ class test_float_to_int (gr_unittest.TestCase): def test_003(self): - + scale = 2 vlen = 3 src_data = (0.0, 1.1, 2.2, 3.3, 4.4, 5.5, -1.1, -2.2, -3.3) diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_float_to_short.py b/gnuradio-core/src/python/gnuradio/gr/qa_float_to_short.py index 0d89a149c..3f8b66975 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_float_to_short.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_float_to_short.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011,2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest import ctypes diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_float_to_uchar.py b/gnuradio-core/src/python/gnuradio/gr/qa_float_to_uchar.py index 0d54f45f3..831bed93e 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_float_to_uchar.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_float_to_uchar.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest import ctypes diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_fractional_interpolator.py b/gnuradio-core/src/python/gnuradio/gr/qa_fractional_interpolator.py index c9ba54164..e19bb28f3 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_fractional_interpolator.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_fractional_interpolator.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2007,2010 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 @@ -33,6 +33,6 @@ class test_fractional_resampler (gr_unittest.TestCase): def test_000_make(self): op = gr.fractional_interpolator_ff(0.0, 1.0) op2 = gr.fractional_interpolator_cc(0.0, 1.0) - + if __name__ == '__main__': gr_unittest.run(test_fractional_resampler, "test_fractional_resampler.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_frequency_modulator.py b/gnuradio-core/src/python/gnuradio/gr/qa_frequency_modulator.py index 7328f041d..23459fff3 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_frequency_modulator.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_frequency_modulator.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007,2010 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 math @@ -53,4 +53,4 @@ class test_frequency_modulator (gr_unittest.TestCase): if __name__ == '__main__': gr_unittest.run(test_frequency_modulator, "test_frequency_modulator.xml") - + diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_fsk_stuff.py b/gnuradio-core/src/python/gnuradio/gr/qa_fsk_stuff.py index 429e57c32..95b8c0664 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_fsk_stuff.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_fsk_stuff.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007,2010 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 math @@ -49,9 +49,9 @@ class test_bytes_to_syms (gr_unittest.TestCase): self.assertEqual (expected_result, result_data) def test_simple_framer (self): - src_data = (0x00, 0x11, 0x22, 0x33, + src_data = (0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff) expected_result = ( @@ -68,8 +68,8 @@ class test_bytes_to_syms (gr_unittest.TestCase): self.tb.run () result_data = dst.data () self.assertEqual (expected_result, result_data) - + if __name__ == '__main__': gr_unittest.run(test_bytes_to_syms, "test_bytes_to_syms.xml") - + diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_glfsr_source.py b/gnuradio-core/src/python/gnuradio/gr/qa_glfsr_source.py index 1665d9dd5..161e4a5cc 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_glfsr_source.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_glfsr_source.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2007,2010 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 @@ -81,7 +81,7 @@ class test_glfsr_source(gr_unittest.TestCase): self.assertEqual(R[0], float(len(R))) # Auto-correlation peak at origin for i in range(len(R)-1): self.assertEqual(R[i+1], -1.0) # Auto-correlation minimum everywhere else - + def auto_correlate(data): l = len(data) R = [0,]*l diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_goertzel.py b/gnuradio-core/src/python/gnuradio/gr/qa_goertzel.py index dcb3d867e..77f1b5f89 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_goertzel.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_goertzel.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2006,2007,2010 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 from math import pi, cos @@ -40,7 +40,7 @@ class test_goertzel(gr_unittest.TestCase): dst = gr.vector_sink_c() self.tb.connect(src, dft, dst) self.tb.run() - return dst.data() + return dst.data() def test_001(self): # Measure single tone magnitude rate = 8000 diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_head.py b/gnuradio-core/src/python/gnuradio/gr/qa_head.py index aae233b56..d7cb354dc 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_head.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_head.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007,2010 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 @@ -41,7 +41,7 @@ class test_head (gr_unittest.TestCase): self.tb.run () dst_data = dst1.data () self.assertEqual (expected_result, dst_data) - + if __name__ == '__main__': gr_unittest.run(test_head, "test_head.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_hier_block2.py b/gnuradio-core/src/python/gnuradio/gr/qa_hier_block2.py index 924a0fb52..3132d91b0 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_hier_block2.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_hier_block2.py @@ -11,8 +11,8 @@ class test_hier_block2(gr_unittest.TestCase): pass def test_001_make(self): - hblock = gr.hier_block2("test_block", - gr.io_signature(1,1,gr.sizeof_int), + hblock = gr.hier_block2("test_block", + gr.io_signature(1,1,gr.sizeof_int), gr.io_signature(1,1,gr.sizeof_int)) self.assertEqual("test_block", hblock.name()) self.assertEqual(1, hblock.input_signature().max_streams()) @@ -21,22 +21,22 @@ class test_hier_block2(gr_unittest.TestCase): self.assertEqual(gr.sizeof_int, hblock.output_signature().sizeof_stream_item(0)) def test_002_connect_input(self): - hblock = gr.hier_block2("test_block", - gr.io_signature(1,1,gr.sizeof_int), + hblock = gr.hier_block2("test_block", + gr.io_signature(1,1,gr.sizeof_int), gr.io_signature(1,1,gr.sizeof_int)) nop1 = gr.nop(gr.sizeof_int) hblock.connect(hblock, nop1) def test_004_connect_output(self): - hblock = gr.hier_block2("test_block", - gr.io_signature(1,1,gr.sizeof_int), + hblock = gr.hier_block2("test_block", + gr.io_signature(1,1,gr.sizeof_int), gr.io_signature(1,1,gr.sizeof_int)) nop1 = gr.nop(gr.sizeof_int) hblock.connect(nop1, hblock) def test_005_connect_output_in_use(self): - hblock = gr.hier_block2("test_block", - gr.io_signature(1,1,gr.sizeof_int), + hblock = gr.hier_block2("test_block", + gr.io_signature(1,1,gr.sizeof_int), gr.io_signature(1,1,gr.sizeof_int)) nop1 = gr.nop(gr.sizeof_int) nop2 = gr.nop(gr.sizeof_int) @@ -45,37 +45,37 @@ class test_hier_block2(gr_unittest.TestCase): lambda: hblock.connect(nop2, hblock)) def test_006_connect_invalid_src_port_neg(self): - hblock = gr.hier_block2("test_block", - gr.io_signature(1,1,gr.sizeof_int), + hblock = gr.hier_block2("test_block", + gr.io_signature(1,1,gr.sizeof_int), gr.io_signature(1,1,gr.sizeof_int)) nop1 = gr.nop(gr.sizeof_int) - self.assertRaises(ValueError, + self.assertRaises(ValueError, lambda: hblock.connect((hblock, -1), nop1)) def test_005_connect_invalid_src_port_exceeds(self): - hblock = gr.hier_block2("test_block", - gr.io_signature(1,1,gr.sizeof_int), + hblock = gr.hier_block2("test_block", + gr.io_signature(1,1,gr.sizeof_int), gr.io_signature(1,1,gr.sizeof_int)) nop1 = gr.nop(gr.sizeof_int) - self.assertRaises(ValueError, + self.assertRaises(ValueError, lambda: hblock.connect((hblock, 1), nop1)) def test_007_connect_invalid_dst_port_neg(self): - hblock = gr.hier_block2("test_block", - gr.io_signature(1,1,gr.sizeof_int), + hblock = gr.hier_block2("test_block", + gr.io_signature(1,1,gr.sizeof_int), gr.io_signature(1,1,gr.sizeof_int)) nop1 = gr.nop(gr.sizeof_int) nop2 = gr.nop(gr.sizeof_int) - self.assertRaises(ValueError, + self.assertRaises(ValueError, lambda: hblock.connect(nop1, (nop2, -1))) def test_008_connect_invalid_dst_port_exceeds(self): - hblock = gr.hier_block2("test_block", - gr.io_signature(1,1,gr.sizeof_int), + hblock = gr.hier_block2("test_block", + gr.io_signature(1,1,gr.sizeof_int), gr.io_signature(1,1,gr.sizeof_int)) nop1 = gr.null_sink(gr.sizeof_int) nop2 = gr.null_sink(gr.sizeof_int) - self.assertRaises(ValueError, + self.assertRaises(ValueError, lambda: hblock.connect(nop1, (nop2, 1))) def test_009_check_topology(self): @@ -97,26 +97,26 @@ class test_hier_block2(gr_unittest.TestCase): self.assertEquals(expected, actual2) def test_012_disconnect_input(self): - hblock = gr.hier_block2("test_block", - gr.io_signature(1,1,gr.sizeof_int), + hblock = gr.hier_block2("test_block", + gr.io_signature(1,1,gr.sizeof_int), gr.io_signature(1,1,gr.sizeof_int)) nop1 = gr.nop(gr.sizeof_int) hblock.connect(hblock, nop1) hblock.disconnect(hblock, nop1) - + def test_013_disconnect_input_not_connected(self): - hblock = gr.hier_block2("test_block", - gr.io_signature(1,1,gr.sizeof_int), + hblock = gr.hier_block2("test_block", + gr.io_signature(1,1,gr.sizeof_int), gr.io_signature(1,1,gr.sizeof_int)) nop1 = gr.nop(gr.sizeof_int) nop2 = gr.nop(gr.sizeof_int) hblock.connect(hblock, nop1) self.assertRaises(ValueError, lambda: hblock.disconnect(hblock, nop2)) - + def test_014_disconnect_input_neg(self): - hblock = gr.hier_block2("test_block", - gr.io_signature(1,1,gr.sizeof_int), + hblock = gr.hier_block2("test_block", + gr.io_signature(1,1,gr.sizeof_int), gr.io_signature(1,1,gr.sizeof_int)) nop1 = gr.nop(gr.sizeof_int) hblock.connect(hblock, nop1) @@ -124,8 +124,8 @@ class test_hier_block2(gr_unittest.TestCase): lambda: hblock.disconnect((hblock, -1), nop1)) def test_015_disconnect_input_exceeds(self): - hblock = gr.hier_block2("test_block", - gr.io_signature(1,1,gr.sizeof_int), + hblock = gr.hier_block2("test_block", + gr.io_signature(1,1,gr.sizeof_int), gr.io_signature(1,1,gr.sizeof_int)) nop1 = gr.nop(gr.sizeof_int) hblock.connect(hblock, nop1) @@ -133,26 +133,26 @@ class test_hier_block2(gr_unittest.TestCase): lambda: hblock.disconnect((hblock, 1), nop1)) def test_016_disconnect_output(self): - hblock = gr.hier_block2("test_block", - gr.io_signature(1,1,gr.sizeof_int), + hblock = gr.hier_block2("test_block", + gr.io_signature(1,1,gr.sizeof_int), gr.io_signature(1,1,gr.sizeof_int)) nop1 = gr.nop(gr.sizeof_int) hblock.connect(nop1, hblock) hblock.disconnect(nop1, hblock) - + def test_017_disconnect_output_not_connected(self): - hblock = gr.hier_block2("test_block", - gr.io_signature(1,1,gr.sizeof_int), + hblock = gr.hier_block2("test_block", + gr.io_signature(1,1,gr.sizeof_int), gr.io_signature(1,1,gr.sizeof_int)) nop1 = gr.nop(gr.sizeof_int) nop2 = gr.nop(gr.sizeof_int) hblock.connect(nop1, hblock) self.assertRaises(ValueError, lambda: hblock.disconnect(nop2, hblock)) - + def test_018_disconnect_output_neg(self): - hblock = gr.hier_block2("test_block", - gr.io_signature(1,1,gr.sizeof_int), + hblock = gr.hier_block2("test_block", + gr.io_signature(1,1,gr.sizeof_int), gr.io_signature(1,1,gr.sizeof_int)) nop1 = gr.nop(gr.sizeof_int) hblock.connect(hblock, nop1) @@ -160,8 +160,8 @@ class test_hier_block2(gr_unittest.TestCase): lambda: hblock.disconnect(nop1, (hblock, -1))) def test_019_disconnect_output_exceeds(self): - hblock = gr.hier_block2("test_block", - gr.io_signature(1,1,gr.sizeof_int), + hblock = gr.hier_block2("test_block", + gr.io_signature(1,1,gr.sizeof_int), gr.io_signature(1,1,gr.sizeof_int)) nop1 = gr.nop(gr.sizeof_int) hblock.connect(nop1, hblock) @@ -240,7 +240,7 @@ class test_hier_block2(gr_unittest.TestCase): src = gr.vector_source_b([1, ]) dst = gr.vector_sink_b() tb.connect(src, hb, dst) # hb's input is not connected internally - self.assertRaises(RuntimeError, + self.assertRaises(RuntimeError, lambda: tb.run()) def test_027b_internally_unconnected_output(self): @@ -254,7 +254,7 @@ class test_hier_block2(gr_unittest.TestCase): src = gr.vector_source_b([1, ]) dst = gr.vector_sink_b() tb.connect(src, hb, dst) # hb's output is not connected internally - self.assertRaises(RuntimeError, + self.assertRaises(RuntimeError, lambda: tb.run()) def test_027c_fully_unconnected_output(self): @@ -267,7 +267,7 @@ class test_hier_block2(gr_unittest.TestCase): src = gr.vector_source_b([1, ]) dst = gr.vector_sink_b() tb.connect(src, hb) # hb's output is not connected internally or externally - self.assertRaises(RuntimeError, + self.assertRaises(RuntimeError, lambda: tb.run()) def test_027d_fully_unconnected_input(self): @@ -279,12 +279,12 @@ class test_hier_block2(gr_unittest.TestCase): hb.connect(hdst, hb) # wire output internally dst = gr.vector_sink_b() tb.connect(hb, dst) # hb's input is not connected internally or externally - self.assertRaises(RuntimeError, + self.assertRaises(RuntimeError, lambda: tb.run()) def test_028_singleton_reconfigure(self): tb = gr.top_block() - hb = gr.hier_block2("block", + hb = gr.hier_block2("block", gr.io_signature(0, 0, 0), gr.io_signature(0, 0, 0)) src = gr.vector_source_b([1, ]) dst = gr.vector_sink_b() @@ -332,7 +332,7 @@ class test_hier_block2(gr_unittest.TestCase): add = gr.add_ff() hb.connect(hb, m1) # m1 is connected to hb external input #0 hb.connect(hb, m2) # m2 is also connected to hb external input #0 - hb.connect(m1, (add, 0)) + hb.connect(m1, (add, 0)) hb.connect(m2, (add, 1)) hb.connect(add, hb) # add is connected to hb external output #0 dst = gr.vector_sink_f() @@ -355,7 +355,7 @@ class test_hier_block2(gr_unittest.TestCase): add = gr.add_ff() hb2.connect(hb2, m1) # m1 is connected to hb2 external input #0 hb2.connect(hb2, m2) # m2 is also connected to hb2 external input #0 - hb2.connect(m1, (add, 0)) + hb2.connect(m1, (add, 0)) hb2.connect(m2, (add, 1)) hb2.connect(add, hb2) # add is connected to hb2 external output #0 hb.connect(hb, hb2, hb) # hb as hb2 as nested internal block @@ -363,7 +363,7 @@ class test_hier_block2(gr_unittest.TestCase): tb.connect(src, hb, dst) tb.run() self.assertEquals(dst.data(), (3.0,)) - - + + if __name__ == "__main__": gr_unittest.run(test_hier_block2, "test_hier_block2.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_hilbert.py b/gnuradio-core/src/python/gnuradio/gr/qa_hilbert.py index 2235f28b1..27d01092b 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_hilbert.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_hilbert.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007,2010 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 math @@ -36,68 +36,68 @@ class test_hilbert (gr_unittest.TestCase): ntaps = 51 sampling_freq = 100 - expected_result = ( -1.4678005338941702e-11j, - -0.0011950774351134896j, - -0.0019336787518113852j, - -0.0034673355985432863j, - -0.0036765895783901215j, - -0.004916108213365078j, - -0.0042778430506587029j, - -0.006028641015291214j, - -0.005476709920912981j, - -0.0092810001224279404j, - -0.0095402700826525688j, - -0.016060983762145042j, - -0.016446959227323532j, - -0.02523401565849781j, - -0.024382550269365311j, - -0.035477779805660248j, - -0.033021725714206696j, - -0.048487484455108643j, - -0.04543270543217659j, - -0.069477587938308716j, - -0.066984444856643677j, - -0.10703597217798233j, - -0.10620346665382385j, - -0.1852707713842392j, - -0.19357112050056458j, - (7.2191945754696007e-09 -0.50004088878631592j), - (0.58778399229049683 -0.6155126690864563j), - (0.95105588436126709 -0.12377222627401352j), - (0.95105588436126709 +0.41524654626846313j), - (0.5877838134765625 +0.91611981391906738j), - (5.8516356205018383e-09 +1.0670661926269531j), - (-0.5877840518951416 +0.87856143712997437j), - (-0.95105588436126709 +0.35447561740875244j), - (-0.95105588436126709 -0.26055556535720825j), - (-0.5877838134765625 -0.77606213092803955j), - (-8.7774534307527574e-09 -0.96460390090942383j), - (0.58778399229049683 -0.78470128774642944j), - (0.95105588436126709 -0.28380891680717468j), - (0.95105588436126709 +0.32548999786376953j), - (0.5877838134765625 +0.82514488697052002j), - (1.4629089051254596e-08 +1.0096219778060913j), - (-0.5877840518951416 +0.81836479902267456j), - (-0.95105588436126709 +0.31451958417892456j), - (-0.95105588436126709 -0.3030143678188324j), - (-0.5877838134765625 -0.80480599403381348j), - (-1.7554906861505515e-08 -0.99516552686691284j), - (0.58778399229049683 -0.80540722608566284j), - (0.95105582475662231 -0.30557557940483093j), - (0.95105588436126709 +0.31097668409347534j), - (0.5877838134765625 +0.81027895212173462j), - (2.3406542482007353e-08 +1.0000816583633423j), - (-0.5877840518951416 +0.80908381938934326j), - (-0.95105588436126709 +0.30904293060302734j), - (-0.95105588436126709 -0.30904296040534973j), - (-0.5877838134765625 -0.80908387899398804j), - (-2.6332360292258272e-08 -1.0000815391540527j), - (0.58778399229049683 -0.80908381938934326j), - (0.95105582475662231 -0.30904299020767212j), - (0.95105588436126709 +0.30904293060302734j), - (0.5877838134765625 +0.80908381938934326j), + expected_result = ( -1.4678005338941702e-11j, + -0.0011950774351134896j, + -0.0019336787518113852j, + -0.0034673355985432863j, + -0.0036765895783901215j, + -0.004916108213365078j, + -0.0042778430506587029j, + -0.006028641015291214j, + -0.005476709920912981j, + -0.0092810001224279404j, + -0.0095402700826525688j, + -0.016060983762145042j, + -0.016446959227323532j, + -0.02523401565849781j, + -0.024382550269365311j, + -0.035477779805660248j, + -0.033021725714206696j, + -0.048487484455108643j, + -0.04543270543217659j, + -0.069477587938308716j, + -0.066984444856643677j, + -0.10703597217798233j, + -0.10620346665382385j, + -0.1852707713842392j, + -0.19357112050056458j, + (7.2191945754696007e-09 -0.50004088878631592j), + (0.58778399229049683 -0.6155126690864563j), + (0.95105588436126709 -0.12377222627401352j), + (0.95105588436126709 +0.41524654626846313j), + (0.5877838134765625 +0.91611981391906738j), + (5.8516356205018383e-09 +1.0670661926269531j), + (-0.5877840518951416 +0.87856143712997437j), + (-0.95105588436126709 +0.35447561740875244j), + (-0.95105588436126709 -0.26055556535720825j), + (-0.5877838134765625 -0.77606213092803955j), + (-8.7774534307527574e-09 -0.96460390090942383j), + (0.58778399229049683 -0.78470128774642944j), + (0.95105588436126709 -0.28380891680717468j), + (0.95105588436126709 +0.32548999786376953j), + (0.5877838134765625 +0.82514488697052002j), + (1.4629089051254596e-08 +1.0096219778060913j), + (-0.5877840518951416 +0.81836479902267456j), + (-0.95105588436126709 +0.31451958417892456j), + (-0.95105588436126709 -0.3030143678188324j), + (-0.5877838134765625 -0.80480599403381348j), + (-1.7554906861505515e-08 -0.99516552686691284j), + (0.58778399229049683 -0.80540722608566284j), + (0.95105582475662231 -0.30557557940483093j), + (0.95105588436126709 +0.31097668409347534j), + (0.5877838134765625 +0.81027895212173462j), + (2.3406542482007353e-08 +1.0000816583633423j), + (-0.5877840518951416 +0.80908381938934326j), + (-0.95105588436126709 +0.30904293060302734j), + (-0.95105588436126709 -0.30904296040534973j), + (-0.5877838134765625 -0.80908387899398804j), + (-2.6332360292258272e-08 -1.0000815391540527j), + (0.58778399229049683 -0.80908381938934326j), + (0.95105582475662231 -0.30904299020767212j), + (0.95105588436126709 +0.30904293060302734j), + (0.5877838134765625 +0.80908381938934326j), (3.218399768911695e-08 +1.0000815391540527j)) - + src1 = gr.sig_source_f (sampling_freq, gr.GR_SIN_WAVE, sampling_freq * 0.10, 1.0) diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_iir.py b/gnuradio-core/src/python/gnuradio/gr/qa_iir.py index 0e522c16b..06b8d767e 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_iir.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_iir.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007,2010 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 @@ -133,7 +133,7 @@ class test_iir (gr_unittest.TestCase): self.tb.run () result_data = dst.data () self.assertFloatTuplesAlmostEqual (expected_result, result_data) - + def test_iir_direct_008 (self): src_data = (1, 2, 3, 4, 5, 6, 7, 8) expected_result = (2,4,4,10,18,14,26,56) @@ -150,10 +150,10 @@ class test_iir (gr_unittest.TestCase): self.tb.run () result_data = dst.data () self.assertFloatTuplesAlmostEqual (expected_result, result_data) - - + + if __name__ == '__main__': gr_unittest.run(test_iir, "test_iir.xml") - + diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_int_to_float.py b/gnuradio-core/src/python/gnuradio/gr/qa_int_to_float.py index 530b2a5cc..7536b3820 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_int_to_float.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_int_to_float.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest @@ -41,7 +41,7 @@ class test_int_to_float (gr_unittest.TestCase): self.tb.connect(src, op, dst) self.tb.run() result_data = dst.data() - + self.assertFloatTuplesAlmostEqual(expected_result, result_data) def test_002(self): @@ -49,7 +49,7 @@ class test_int_to_float (gr_unittest.TestCase): vlen = 3 src_data = ( 65000, 65001, 65002, 65003, 65004, 65005, -65001, -65002, -65003) - expected_result = [ 65000.0, 65001.0, 65002.0, + expected_result = [ 65000.0, 65001.0, 65002.0, 65003.0, 65004.0, 65005.0, -65001.0, -65002.0, -65003.0] src = gr.vector_source_i(src_data) diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_integrate.py b/gnuradio-core/src/python/gnuradio/gr/qa_integrate.py index 501a89f84..ddb1310b6 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_integrate.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_integrate.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2008,2010 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 math @@ -40,7 +40,7 @@ class test_integrate (gr_unittest.TestCase): self.tb.connect(src, itg, dst) self.tb.run() self.assertEqual(dst_data, dst.data()) - + def test_001_ii(self): src_data = (1, 2, 3, 4, 5, 6) dst_data = (6, 15) @@ -50,7 +50,7 @@ class test_integrate (gr_unittest.TestCase): self.tb.connect(src, itg, dst) self.tb.run() self.assertEqual(dst_data, dst.data()) - + def test_002_ff(self): src_data = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] dst_data = [6.0, 15.0] @@ -59,7 +59,7 @@ class test_integrate (gr_unittest.TestCase): dst = gr.vector_sink_f() self.tb.connect(src, itg, dst) self.tb.run() - self.assertFloatTuplesAlmostEqual(dst_data, dst.data(), 6) + self.assertFloatTuplesAlmostEqual(dst_data, dst.data(), 6) def test_003_cc(self): src_data = [1.0+1.0j, 2.0+2.0j, 3.0+3.0j, 4.0+4.0j, 5.0+5.0j, 6.0+6.0j] @@ -69,7 +69,7 @@ class test_integrate (gr_unittest.TestCase): dst = gr.vector_sink_c() self.tb.connect(src, itg, dst) self.tb.run() - self.assertComplexTuplesAlmostEqual(dst_data, dst.data(), 6) + self.assertComplexTuplesAlmostEqual(dst_data, dst.data(), 6) if __name__ == '__main__': gr_unittest.run(test_integrate, "test_integrate.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_interleave.py b/gnuradio-core/src/python/gnuradio/gr/qa_interleave.py index 1320d0ec5..1ff178251 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_interleave.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_interleave.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007,2010 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 math @@ -78,4 +78,4 @@ class test_interleave (gr_unittest.TestCase): if __name__ == '__main__': gr_unittest.run(test_interleave, "test_interleave.xml") - + diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_interp_fir_filter.py b/gnuradio-core/src/python/gnuradio/gr/qa_interp_fir_filter.py index 9901b71b7..9bd9977c7 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_interp_fir_filter.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_interp_fir_filter.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007,2010 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 math @@ -51,4 +51,4 @@ class test_interp_fir_filter (gr_unittest.TestCase): if __name__ == '__main__': gr_unittest.run(test_interp_fir_filter, "test_interp_fir_filter.xml") - + diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_kludge_copy.py b/gnuradio-core/src/python/gnuradio/gr/qa_kludge_copy.py index 2f0bbe33d..2a3aa44b1 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_kludge_copy.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_kludge_copy.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2006,2010 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 math @@ -53,7 +53,7 @@ class test_kludge_copy(gr_unittest.TestCase): self.tb.run() dst0_data = dst0.data() self.assertEqual(src0_data, dst0_data) - + def test_002(self): # 2 input streams; 2 output streams src0_data = self.make_random_int_tuple(16000) @@ -70,7 +70,7 @@ class test_kludge_copy(gr_unittest.TestCase): dst1_data = dst1.data() self.assertEqual(src0_data, dst0_data) self.assertEqual(src1_data, dst1_data) - + # Note: this is disabled due to triggering bug in ticket:181 # It only occurs with new top block code def xtest_003(self): @@ -88,4 +88,4 @@ class test_kludge_copy(gr_unittest.TestCase): if __name__ == '__main__': gr_unittest.run(test_kludge_copy, "test_kludge_copy.xml") - + diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_kludged_imports.py b/gnuradio-core/src/python/gnuradio/gr/qa_kludged_imports.py index 7d29a9507..39b5d781e 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_kludged_imports.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_kludged_imports.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005,2008,2010 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 diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_max.py b/gnuradio-core/src/python/gnuradio/gr/qa_max.py index 5aa231623..f962df457 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_max.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_max.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2007,2010 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 math diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_message.py b/gnuradio-core/src/python/gnuradio/gr/qa_message.py index e7f2778d1..4cef39bd7 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_message.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_message.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2010 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 @@ -38,7 +38,7 @@ class test_message (gr_unittest.TestCase): def tearDown (self): self.msgq = None - + def leak_check (self, fct): begin = all_counts () fct () @@ -61,7 +61,7 @@ class test_message (gr_unittest.TestCase): def test_200 (self): self.leak_check (self.body_200) - + def body_200 (self): self.msgq.insert_tail (gr.message (0)) self.assertEquals (1, self.msgq.count()) @@ -75,7 +75,7 @@ class test_message (gr_unittest.TestCase): def test_201 (self): self.leak_check (self.body_201) - + def body_201 (self): self.msgq.insert_tail (gr.message (0)) self.assertEquals (1, self.msgq.count()) @@ -84,7 +84,7 @@ class test_message (gr_unittest.TestCase): def test_202 (self): self.leak_check (self.body_202) - + def body_202 (self): # global msg msg = gr.message (666) @@ -111,7 +111,7 @@ class test_message (gr_unittest.TestCase): src.msgq().insert_tail(gr.message(1)) # send EOF tb.run() self.assertEquals(tuple(map(ord, '0123456789')), dst.data()) - + def test_302(self): # Use itemsize, msgq constructor msgq = gr.msg_queue() diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_multiply_conjugate.py b/gnuradio-core/src/python/gnuradio/gr/qa_multiply_conjugate.py index aaf3cc125..1601a109e 100644 --- a/gnuradio-core/src/python/gnuradio/gr/qa_multiply_conjugate.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_multiply_conjugate.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest @@ -37,8 +37,8 @@ class test_multiply_conjugate (gr_unittest.TestCase): src_data1 = (-3-3j, -4-4j, -3+3j, -4+4j, 3-3j, 4-4j, 3+3j, 4+4j, 0+0j) - - exp_data = (12+0j, 8+0j, 12+0j, 8+0j, + + exp_data = (12+0j, 8+0j, 12+0j, 8+0j, 12+0j, 8+0j, 12+0j, 8+0j, 0+0j) src0 = gr.vector_source_c(src_data0) diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_mute.py b/gnuradio-core/src/python/gnuradio/gr/qa_mute.py index 58c5062a5..afdfdfe13 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_mute.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_mute.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2005,2007,2010 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 diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_nlog10.py b/gnuradio-core/src/python/gnuradio/gr/qa_nlog10.py index 5a2e6a0d2..a87ed87ee 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_nlog10.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_nlog10.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005,2007,2010 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 @@ -44,4 +44,4 @@ class test_nlog10(gr_unittest.TestCase): if __name__ == '__main__': gr_unittest.run(test_nlog10, "test_nlog10.xml") - + diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_noise.py b/gnuradio-core/src/python/gnuradio/gr/qa_noise.py index d7750cfe2..e87519150 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_noise.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_noise.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2007,2010 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 @@ -44,8 +44,8 @@ class test_noise_source(gr_unittest.TestCase): self.assertEqual(get_type, set_type) self.assertEqual(get_ampl, set_ampl) - + if __name__ == '__main__': gr_unittest.run(test_noise_source, "test_noise_source.xml") - + diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_packed_to_unpacked.py b/gnuradio-core/src/python/gnuradio/gr/qa_packed_to_unpacked.py index 8833f755b..08accd0ad 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_packed_to_unpacked.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_packed_to_unpacked.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005,2007,2010 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 random @@ -40,7 +40,7 @@ class test_packing(gr_unittest.TestCase): src = gr.vector_source_b(src_data,False) op = gr.packed_to_unpacked_bb(1, gr.GR_MSB_FIRST) self.tb.connect(src, op) - + dst = gr.vector_sink_b() self.tb.connect(op, dst) @@ -57,7 +57,7 @@ class test_packing(gr_unittest.TestCase): src = gr.vector_source_b(src_data,False) op = gr.packed_to_unpacked_bb(1, gr.GR_LSB_FIRST) self.tb.connect(src, op) - + dst = gr.vector_sink_b() self.tb.connect(op, dst) @@ -74,7 +74,7 @@ class test_packing(gr_unittest.TestCase): src = gr.vector_source_b(src_data,False) op = gr.packed_to_unpacked_bb(3, gr.GR_LSB_FIRST) self.tb.connect(src, op) - + dst = gr.vector_sink_b() self.tb.connect(op, dst) @@ -91,7 +91,7 @@ class test_packing(gr_unittest.TestCase): src = gr.vector_source_b(src_data,False) op = gr.packed_to_unpacked_bb(3, gr.GR_MSB_FIRST) self.tb.connect(src, op) - + dst = gr.vector_sink_b() self.tb.connect(op, dst) @@ -108,7 +108,7 @@ class test_packing(gr_unittest.TestCase): src = gr.vector_source_b(src_data,False) op = gr.unpacked_to_packed_bb(1, gr.GR_MSB_FIRST) self.tb.connect(src, op) - + dst = gr.vector_sink_b() self.tb.connect(op, dst) @@ -125,7 +125,7 @@ class test_packing(gr_unittest.TestCase): src = gr.vector_source_b(src_data,False) op = gr.unpacked_to_packed_bb(1, gr.GR_LSB_FIRST) self.tb.connect(src, op) - + dst = gr.vector_sink_b() self.tb.connect(op, dst) @@ -143,7 +143,7 @@ class test_packing(gr_unittest.TestCase): src = gr.vector_source_b(src_data,False) op = gr.unpacked_to_packed_bb(3, gr.GR_LSB_FIRST) self.tb.connect(src, op) - + dst = gr.vector_sink_b() self.tb.connect(op, dst) @@ -160,7 +160,7 @@ class test_packing(gr_unittest.TestCase): src = gr.vector_source_b(src_data,False) op = gr.unpacked_to_packed_bb(3, gr.GR_MSB_FIRST) self.tb.connect(src, op) - + dst = gr.vector_sink_b() self.tb.connect(op, dst) @@ -184,12 +184,12 @@ class test_packing(gr_unittest.TestCase): op1 = gr.packed_to_unpacked_bb(3, gr.GR_MSB_FIRST) op2 = gr.unpacked_to_packed_bb(3, gr.GR_MSB_FIRST) self.tb.connect(src, op1, op2) - + dst = gr.vector_sink_b() self.tb.connect(op2, dst) self.tb.run() - + self.assertEqual(expected_results[0:201], dst.data()) def test_010(self): @@ -233,10 +233,10 @@ class test_packing(gr_unittest.TestCase): self.tb.run() self.assertEqual(expected_results[0:201], dst.data()) - + # tests on shorts - + def test_100a(self): """ test short version @@ -318,7 +318,7 @@ class test_packing(gr_unittest.TestCase): self.assertEqual(expected_results, dst.data()) # tests on ints - + def test_200a(self): """ test int version @@ -402,4 +402,4 @@ class test_packing(gr_unittest.TestCase): if __name__ == '__main__': gr_unittest.run(test_packing, "test_packing.xml") - + diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_pipe_fittings.py b/gnuradio-core/src/python/gnuradio/gr/qa_pipe_fittings.py index a6683c5c3..1f24062b1 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_pipe_fittings.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_pipe_fittings.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005,2007,2010 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 @@ -58,7 +58,7 @@ class test_pipe_fittings(gr_unittest.TestCase): src = gr.vector_source_i(src_data) op = gr.stream_to_streams(gr.sizeof_int, n) self.tb.connect(src, op) - + dsts = [] for i in range(n): dst = gr.vector_sink_i() @@ -83,15 +83,15 @@ class test_pipe_fittings(gr_unittest.TestCase): op1 = gr.stream_to_streams(gr.sizeof_int, n) op2 = gr.streams_to_stream(gr.sizeof_int, n) dst = gr.vector_sink_i() - + self.tb.connect(src, op1) for i in range(n): self.tb.connect((op1, i), (op2, i)) self.tb.connect(op2, dst) - + self.tb.run() self.assertEqual(expected_results, dst.data()) - + def test_003(self): """ Test streams_to_vector (using stream_to_streams & vector_to_stream). @@ -106,15 +106,15 @@ class test_pipe_fittings(gr_unittest.TestCase): op2 = gr.streams_to_vector(gr.sizeof_int, n) op3 = gr.vector_to_stream(gr.sizeof_int, n) dst = gr.vector_sink_i() - + self.tb.connect(src, op1) for i in range(n): self.tb.connect((op1, i), (op2, i)) self.tb.connect(op2, op3, dst) - + self.tb.run() self.assertEqual(expected_results, dst.data()) - + def test_004(self): """ Test vector_to_streams. @@ -129,15 +129,15 @@ class test_pipe_fittings(gr_unittest.TestCase): op2 = gr.vector_to_streams(gr.sizeof_int, n) op3 = gr.streams_to_stream(gr.sizeof_int, n) dst = gr.vector_sink_i() - + self.tb.connect(src, op1, op2) for i in range(n): self.tb.connect((op2, i), (op3, i)) self.tb.connect(op3, dst) - + self.tb.run() self.assertEqual(expected_results, dst.data()) if __name__ == '__main__': gr_unittest.run(test_pipe_fittings, "test_pipe_fittings.xml") - + diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_pll_carriertracking.py b/gnuradio-core/src/python/gnuradio/gr/qa_pll_carriertracking.py index 5977c1b52..8964db53d 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_pll_carriertracking.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_pll_carriertracking.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007,2010,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest import math diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_pll_freqdet.py b/gnuradio-core/src/python/gnuradio/gr/qa_pll_freqdet.py index 152026c35..219e9b84b 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_pll_freqdet.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_pll_freqdet.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007,2010,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest import math @@ -153,7 +153,7 @@ class test_pll_freqdet (gr_unittest.TestCase): # convert it from normalized frequency to absolute frequency (Hz) dst_data = [i*(sampling_freq/(2*math.pi)) for i in dst_data] - + self.assertFloatTuplesAlmostEqual (expected_result, dst_data, 3) if __name__ == '__main__': diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_pll_refout.py b/gnuradio-core/src/python/gnuradio/gr/qa_pll_refout.py index 4d82ed692..f319f6381 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_pll_refout.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_pll_refout.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2010 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 math diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_pn_correlator_cc.py b/gnuradio-core/src/python/gnuradio/gr/qa_pn_correlator_cc.py index fbdabb4cb..6a62a6997 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_pn_correlator_cc.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_pn_correlator_cc.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2007,2010 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 @@ -45,6 +45,6 @@ class test_pn_correlator_cc(gr_unittest.TestCase): self.tb.run() data = dst.data() self.assertEqual(data[-1], (1.0+0j)) - + if __name__ == '__main__': gr_unittest.run(test_pn_correlator_cc, "test_pn_correlator_cc.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_probe_signal.py b/gnuradio-core/src/python/gnuradio/gr/qa_probe_signal.py index ed0756f5b..4e10afdb6 100644 --- a/gnuradio-core/src/python/gnuradio/gr/qa_probe_signal.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_probe_signal.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# import time @@ -33,7 +33,7 @@ class test_probe_signal (gr_unittest.TestCase): self.tb = None def test_001(self): - + value = 12.3 repeats = 100 src_data = [value] * repeats @@ -52,7 +52,7 @@ class test_probe_signal (gr_unittest.TestCase): repeats = 10 value = [0.5+i for i in range(0, vector_length)] src_data = value * repeats - + src = gr.vector_source_f(src_data) s2v = gr.stream_to_vector(gr.sizeof_float, vector_length) dst = gr.probe_signal_vf(vector_length) diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_rational_resampler.py b/gnuradio-core/src/python/gnuradio/gr/qa_rational_resampler.py index 3bd6160df..cc963d757 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_rational_resampler.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_rational_resampler.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005,2006,2007,2010 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 from gnuradio import blks2 @@ -71,7 +71,7 @@ def reference_interp_dec_filter(src_data, interp, decim, taps): result_data = dst.data() tb = None return result_data - + class test_rational_resampler (gr_unittest.TestCase): @@ -80,11 +80,11 @@ class test_rational_resampler (gr_unittest.TestCase): def tearDown(self): pass - + # # test the gr.rational_resampler_base primitives... # - + def test_000_1_to_1(self): taps = (-4, 5) src_data = (234, -4, 23, -56, 45, 98, -23, -7) @@ -100,7 +100,7 @@ class test_rational_resampler (gr_unittest.TestCase): tb.run() result_data = dst.data() self.assertEqual(expected_result, result_data) - + def test_001_interp(self): taps = [1, 10, 100, 1000, 10000] src_data = (0, 2, 3, 5, 7, 11, 13, 17) @@ -118,7 +118,7 @@ class test_rational_resampler (gr_unittest.TestCase): result_data = dst.data() self.assertEqual(expected_result, result_data) - def test_002_interp(self): + def test_002_interp(self): taps = random_floats(31) #src_data = random_floats(10000) # FIXME the 10k case fails! src_data = random_floats(1000) @@ -295,4 +295,4 @@ if __name__ == '__main__': pass # FIXME: Disabled, see ticket:210 # gr_unittest.run(test_rational_resampler, "test_rational_resampler.xml") - + diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_regenerate.py b/gnuradio-core/src/python/gnuradio/gr/qa_regenerate.py index 32ecc3776..5aca03b77 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_regenerate.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_regenerate.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2007,2010 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 math @@ -33,7 +33,7 @@ class test_regenerate (gr_unittest.TestCase): def test_regen1 (self): tb = self.tb - + data = [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] @@ -52,12 +52,12 @@ class test_regenerate (gr_unittest.TestCase): tb.run () dst_data = dst.data () - + self.assertEqual (expected_result, dst_data) def test_regen2 (self): tb = self.tb - + data = 200*[0,] data[9] = 1 data[99] = 1 @@ -67,7 +67,7 @@ class test_regenerate (gr_unittest.TestCase): expected_result[19] = 1 expected_result[29] = 1 expected_result[39] = 1 - + expected_result[99] = 1 expected_result[109] = 1 expected_result[119] = 1 @@ -82,7 +82,7 @@ class test_regenerate (gr_unittest.TestCase): tb.run () dst_data = dst.data () - + self.assertEqual (tuple(expected_result), dst_data) diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_repeat.py b/gnuradio-core/src/python/gnuradio/gr/qa_repeat.py index 2b1429980..116f37115 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_repeat.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_repeat.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2008,2010 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 math @@ -36,13 +36,13 @@ class test_repeat (gr_unittest.TestCase): dst_data = [] for n in range(100): dst_data += [1.0*n, 1.0*n, 1.0*n] - + src = gr.vector_source_f(src_data) rpt = gr.repeat(gr.sizeof_float, 3) dst = gr.vector_sink_f() self.tb.connect(src, rpt, dst) self.tb.run() - self.assertFloatTuplesAlmostEqual(dst_data, dst.data(), 6) + self.assertFloatTuplesAlmostEqual(dst_data, dst.data(), 6) if __name__ == '__main__': gr_unittest.run(test_repeat, "test_repeat.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_scrambler.py b/gnuradio-core/src/python/gnuradio/gr/qa_scrambler.py index 241d8ec2a..5fe89bdc7 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_scrambler.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_scrambler.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2008,2010 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 @@ -34,7 +34,7 @@ class test_scrambler(gr_unittest.TestCase): src_data = (1,)*1000 src = gr.vector_source_b(src_data, False) scrambler = gr.scrambler_bb(0x8a, 0x7F, 7) # CCSDS 7-bit scrambler - descrambler = gr.descrambler_bb(0x8a, 0x7F, 7) + descrambler = gr.descrambler_bb(0x8a, 0x7F, 7) dst = gr.vector_sink_b() self.tb.connect(src, scrambler, descrambler, dst) self.tb.run() @@ -48,7 +48,7 @@ class test_scrambler(gr_unittest.TestCase): dst = gr.vector_sink_b() self.tb.connect(src, scrambler, descrambler, dst) self.tb.run() - self.assertEqual(src_data, dst.data()) + self.assertEqual(src_data, dst.data()) def test_additive_scrambler_reset(self): src_data = (1,)*1000 @@ -58,7 +58,7 @@ class test_scrambler(gr_unittest.TestCase): dst = gr.vector_sink_b() self.tb.connect(src, scrambler, descrambler, dst) self.tb.run() - self.assertEqual(src_data, dst.data()) + self.assertEqual(src_data, dst.data()) if __name__ == '__main__': gr_unittest.run(test_scrambler, "test_scrambler.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_short_to_char.py b/gnuradio-core/src/python/gnuradio/gr/qa_short_to_char.py index 6a95fa01d..490b149c7 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_short_to_char.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_short_to_char.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011,2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest import ctypes diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_short_to_float.py b/gnuradio-core/src/python/gnuradio/gr/qa_short_to_float.py index 8f331b495..130f034ec 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_short_to_float.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_short_to_float.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011,2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest import ctypes diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_sig_source.py b/gnuradio-core/src/python/gnuradio/gr/qa_sig_source.py index 4bb58038f..122b169b7 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_sig_source.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_sig_source.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007,2010 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 math @@ -42,7 +42,7 @@ class test_sig_source (gr_unittest.TestCase): tb.run () dst_data = dst1.data () self.assertEqual (expected_result, dst_data) - + def test_const_i (self): tb = self.tb expected_result = (1, 1, 1, 1) @@ -54,7 +54,7 @@ class test_sig_source (gr_unittest.TestCase): tb.run () dst_data = dst1.data () self.assertEqual (expected_result, dst_data) - + def test_sine_f (self): tb = self.tb sqrt2 = math.sqrt(2) / 2 @@ -80,7 +80,7 @@ class test_sig_source (gr_unittest.TestCase): tb.run () dst_data = dst1.data () self.assertFloatTuplesAlmostEqual (expected_result, dst_data, 5) - + def test_sqr_c (self): tb = self.tb #arg6 is a bit before -PI/2 expected_result = (1j, 1j, 0, 0, 1, 1, 1+0j, 1+1j, 1j) @@ -92,7 +92,7 @@ class test_sig_source (gr_unittest.TestCase): tb.run () dst_data = dst1.data () self.assertEqual (expected_result, dst_data) - + def test_tri_c (self): tb = self.tb expected_result = (1+.5j, .75+.75j, .5+1j, .25+.75j, 0+.5j, .25+.25j, .5+0j, .75+.25j, 1+.5j) @@ -104,7 +104,7 @@ class test_sig_source (gr_unittest.TestCase): tb.run () dst_data = dst1.data () self.assertComplexTuplesAlmostEqual (expected_result, dst_data, 5) - + def test_saw_c (self): tb = self.tb expected_result = (.5+.25j, .625+.375j, .75+.5j, .875+.625j, 0+.75j, .125+.875j, .25+1j, .375+.125j, .5+.25j) @@ -116,7 +116,7 @@ class test_sig_source (gr_unittest.TestCase): tb.run () dst_data = dst1.data () self.assertComplexTuplesAlmostEqual (expected_result, dst_data, 5) - + def test_sqr_f (self): tb = self.tb expected_result = (0, 0, 0, 0, 1, 1, 1, 1, 0) @@ -128,7 +128,7 @@ class test_sig_source (gr_unittest.TestCase): tb.run () dst_data = dst1.data () self.assertEqual (expected_result, dst_data) - + def test_tri_f (self): tb = self.tb expected_result = (1, .75, .5, .25, 0, .25, .5, .75, 1) @@ -140,7 +140,7 @@ class test_sig_source (gr_unittest.TestCase): tb.run () dst_data = dst1.data () self.assertFloatTuplesAlmostEqual (expected_result, dst_data, 5) - + def test_saw_f (self): tb = self.tb expected_result = (.5, .625, .75, .875, 0, .125, .25, .375, .5) diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_single_pole_iir.py b/gnuradio-core/src/python/gnuradio/gr/qa_single_pole_iir.py index 1d2e6595c..bfe2d8fc8 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_single_pole_iir.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_single_pole_iir.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005,2007,2010 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 @@ -69,4 +69,4 @@ class test_single_pole_iir(gr_unittest.TestCase): if __name__ == '__main__': gr_unittest.run(test_single_pole_iir, "test_single_pole_iir.xml") - + diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_single_pole_iir_cc.py b/gnuradio-core/src/python/gnuradio/gr/qa_single_pole_iir_cc.py index 47b4948ba..353df1bc0 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_single_pole_iir_cc.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_single_pole_iir_cc.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005,2006,2007,2010 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 @@ -69,4 +69,4 @@ class test_single_pole_iir_cc(gr_unittest.TestCase): if __name__ == '__main__': gr_unittest.run(test_single_pole_iir_cc, "test_single_pole_iir_cc.xml") - + diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_skiphead.py b/gnuradio-core/src/python/gnuradio/gr/qa_skiphead.py index de2d8fc95..1e730398c 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_skiphead.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_skiphead.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2007,2010 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 @@ -41,7 +41,7 @@ class test_skiphead (gr_unittest.TestCase): self.tb.run () dst_data = dst1.data () self.assertEqual (expected_result, dst_data) - + def test_skip_1(self): skip_cnt = 1 expected_result = tuple(self.src_data[skip_cnt:]) @@ -52,7 +52,7 @@ class test_skiphead (gr_unittest.TestCase): self.tb.run () dst_data = dst1.data () self.assertEqual (expected_result, dst_data) - + def test_skip_1023(self): skip_cnt = 1023 expected_result = tuple(self.src_data[skip_cnt:]) @@ -63,7 +63,7 @@ class test_skiphead (gr_unittest.TestCase): self.tb.run () dst_data = dst1.data () self.assertEqual (expected_result, dst_data) - + def test_skip_6339(self): skip_cnt = 6339 expected_result = tuple(self.src_data[skip_cnt:]) @@ -74,7 +74,7 @@ class test_skiphead (gr_unittest.TestCase): self.tb.run () dst_data = dst1.data () self.assertEqual (expected_result, dst_data) - + def test_skip_12678(self): skip_cnt = 12678 expected_result = tuple(self.src_data[skip_cnt:]) @@ -96,7 +96,7 @@ class test_skiphead (gr_unittest.TestCase): self.tb.run () dst_data = dst1.data () self.assertEqual (expected_result, dst_data) - + if __name__ == '__main__': gr_unittest.run(test_skiphead, "test_skiphead.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_stream_mux.py b/gnuradio-core/src/python/gnuradio/gr/qa_stream_mux.py index 7d6ddf81b..779d0b25e 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_stream_mux.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_stream_mux.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2005,2007,2010 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 @@ -33,7 +33,7 @@ class test_stream_mux (gr_unittest.TestCase): def help_stream_2ff(self, N, stream_sizes): v0 = gr.vector_source_f(N*[1,], False) v1 = gr.vector_source_f(N*[2,], False) - + mux = gr.stream_mux(gr.sizeof_float, stream_sizes) dst = gr.vector_sink_f () @@ -44,7 +44,7 @@ class test_stream_mux (gr_unittest.TestCase): self.tb.run () return dst.data () - + def help_stream_ramp_2ff(self, N, stream_sizes): r1 = range(N) r2 = range(N) @@ -52,7 +52,7 @@ class test_stream_mux (gr_unittest.TestCase): v0 = gr.vector_source_f(r1, False) v1 = gr.vector_source_f(r2, False) - + mux = gr.stream_mux(gr.sizeof_float, stream_sizes) dst = gr.vector_sink_f () @@ -63,7 +63,7 @@ class test_stream_mux (gr_unittest.TestCase): self.tb.run () return dst.data () - + def test_stream_2NN_ff(self): N = 40 stream_sizes = [10, 10] @@ -101,17 +101,17 @@ class test_stream_mux (gr_unittest.TestCase): result_data = self.help_stream_2ff(N, stream_sizes) - exp_data = (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + exp_data = (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0) - + self.assertEqual (exp_data, result_data) @@ -122,13 +122,13 @@ class test_stream_mux (gr_unittest.TestCase): result_data = self.help_stream_2ff(N, stream_sizes) - exp_data = (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + exp_data = (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0) @@ -142,12 +142,12 @@ class test_stream_mux (gr_unittest.TestCase): result_data = self.help_stream_2ff(N, stream_sizes) - exp_data = (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, - 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + exp_data = (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0) - + self.assertEqual (exp_data, result_data) def test_stream_20N_ff(self): @@ -157,11 +157,11 @@ class test_stream_mux (gr_unittest.TestCase): result_data = self.help_stream_2ff(N, stream_sizes) - exp_data = (2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, + exp_data = (2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0) - + self.assertEqual (exp_data, result_data) if __name__ == '__main__': diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_udp_sink_source.py b/gnuradio-core/src/python/gnuradio/gr/qa_udp_sink_source.py index 097e394c9..0a719990e 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_udp_sink_source.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_udp_sink_source.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2008,2010 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 from threading import Timer @@ -32,7 +32,7 @@ class test_udp_sink_source(gr_unittest.TestCase): def tearDown(self): self.tb_rcv = None self.tb_snd = None - + def test_001(self): port = 65500 @@ -59,7 +59,7 @@ class test_udp_sink_source(gr_unittest.TestCase): result_data = dst.data() self.assertEqual(expected_result, result_data) self.assert_(not self.timeout) - + def test_002(self): udp_rcv = gr.udp_source( gr.sizeof_float, '0.0.0.0', 0, eof=False ) rcv_port = udp_rcv.get_port() @@ -93,7 +93,7 @@ class test_udp_sink_source(gr_unittest.TestCase): self.timeout = True self.tb_rcv.stop() #print "tb_rcv stopped by Timer" - + if __name__ == '__main__': gr_unittest.run(test_udp_sink_source, "test_udp_sink_source.xml") - + diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_unpack_k_bits.py b/gnuradio-core/src/python/gnuradio/gr/qa_unpack_k_bits.py index d1faf9d9e..bb4e7733d 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_unpack_k_bits.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_unpack_k_bits.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2006,2010 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 random @@ -54,4 +54,4 @@ class test_unpack(gr_unittest.TestCase): if __name__ == '__main__': gr_unittest.run(test_unpack, "test_unpack.xml") - + diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_vector_sink_source.py b/gnuradio-core/src/python/gnuradio/gr/qa_vector_sink_source.py index 5d8d85c7c..64cbbe72a 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_vector_sink_source.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_vector_sink_source.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2008,2010 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 math diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_wavefile.py b/gnuradio-core/src/python/gnuradio/gr/qa_wavefile.py index d9f38e3f1..3b9a3eb20 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_wavefile.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_wavefile.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2008,2010 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 @@ -61,7 +61,7 @@ class test_wavefile(gr_unittest.TestCase): out_data = out_f.read() out_f.close() os.remove(outfile) - + self.assertEqual(in_data, out_data) diff --git a/gnuradio-core/src/python/gnuradio/gr/run_tests.in b/gnuradio-core/src/python/gnuradio/gr/run_tests.in deleted file mode 100755 index 107efe728..000000000 --- a/gnuradio-core/src/python/gnuradio/gr/run_tests.in +++ /dev/null @@ -1,14 +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 - -# Note: calling master run_tests.sh in gnuradio core is not strictly -# correct, as it will result in a partially bogus PYTHONPATH, but it -# does make the correct paths in the second half so all is well. - -@top_builddir@/run_tests.sh \ - @abs_top_srcdir@/gnuradio-core \ - @abs_top_builddir@/gnuradio-core \ - @srcdir@ diff --git a/gnuradio-core/src/python/gnuradio/gr/top_block.py b/gnuradio-core/src/python/gnuradio/gr/top_block.py index f2d83893c..43af8073b 100644 --- a/gnuradio-core/src/python/gnuradio/gr/top_block.py +++ b/gnuradio-core/src/python/gnuradio/gr/top_block.py @@ -1,23 +1,23 @@ # # Copyright 2007 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_core import top_block_swig, \ top_block_wait_unlocked, top_block_run_unlocked @@ -95,7 +95,7 @@ class top_block(object): def start(self, max_noutput_items=100000): self._tb.start(max_noutput_items) - + def stop(self): self._tb.stop() diff --git a/gnuradio-core/src/python/gnuradio/gr_unittest.py b/gnuradio-core/src/python/gnuradio/gr_unittest.py index c2c4df2ba..e4510a6eb 100755 --- a/gnuradio-core/src/python/gnuradio/gr_unittest.py +++ b/gnuradio-core/src/python/gnuradio/gr_unittest.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2010 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. -# +# import unittest import gr_xmlrunner @@ -45,7 +45,7 @@ class TestCase(unittest.TestCase): if round(second.imag-first.imag, places) != 0: raise self.failureException, \ (msg or '%s != %s within %s places' % (`first`, `second`, `places` )) - + def assertComplexAlmostEqual2 (self, ref, x, abs_eps=1e-12, rel_eps=1e-6, msg=None): """ Fail if the two complex objects are unequal as determined by... @@ -64,7 +64,7 @@ class TestCase(unittest.TestCase): `ref`, `x`, abs(ref-x)/abs(ref), `rel_eps` )) - + def assertComplexTuplesAlmostEqual (self, a, b, places=7, msg=None): self.assertEqual (len(a), len(b)) for i in xrange (len(a)): @@ -108,7 +108,7 @@ TestProgram = unittest.TestProgram main = TestProgram def run(PUT, filename=None): - ''' + ''' Runs the unittest on a TestCase and produces an optional XML report PUT: the program under test and should be a gr_unittest.TestCase filename: an optional filename to save the XML report of the tests @@ -149,7 +149,7 @@ def run(PUT, filename=None): xmlrunner.run(suite) main() - + # This will run and fail make check if problem # but does not output to screen. #main(testRunner = xmlrunner) diff --git a/gnuradio-core/src/python/gnuradio/gr_xmlrunner.py b/gnuradio-core/src/python/gnuradio/gr_xmlrunner.py index c3dc5cf13..31298197f 100644 --- a/gnuradio-core/src/python/gnuradio/gr_xmlrunner.py +++ b/gnuradio-core/src/python/gnuradio/gr_xmlrunner.py @@ -25,9 +25,9 @@ except ImportError: class _TestInfo(object): """Information about a particular test. - + Used by _XMLTestResult. - + """ def __init__(self, test, time): @@ -132,7 +132,7 @@ class _XMLTestResult(unittest.TestResult): def print_report(self, stream, time_taken, out, err): """Prints the XML report to the supplied stream. - + The time the tests took to perform as well as the captured standard output and standard error streams must be passed in.a @@ -210,7 +210,7 @@ class XMLTestRunner(object): path = property(lambda self: self._path, _set_path, None, """The path where the XML files are stored. - + This property is ignored when the XML file is written to a file stream.""") @@ -262,7 +262,7 @@ class XMLTestRunnerTest(unittest.TestCase): def test_no_tests(self): """Regression test: Check whether a test run without any tests matches a previous run. - + """ class TestTest(unittest.TestCase): pass @@ -275,7 +275,7 @@ class XMLTestRunnerTest(unittest.TestCase): def test_success(self): """Regression test: Check whether a test run with a successful test matches a previous run. - + """ class TestTest(unittest.TestCase): def test_foo(self): @@ -290,7 +290,7 @@ class XMLTestRunnerTest(unittest.TestCase): def test_failure(self): """Regression test: Check whether a test run with a failing test matches a previous run. - + """ class TestTest(unittest.TestCase): def test_foo(self): @@ -307,7 +307,7 @@ class XMLTestRunnerTest(unittest.TestCase): def test_error(self): """Regression test: Check whether a test run with a erroneous test matches a previous run. - + """ class TestTest(unittest.TestCase): def test_foo(self): @@ -324,7 +324,7 @@ class XMLTestRunnerTest(unittest.TestCase): def test_stdout_capture(self): """Regression test: Check whether a test run with output to stdout matches a previous run. - + """ class TestTest(unittest.TestCase): def test_foo(self): @@ -340,7 +340,7 @@ class XMLTestRunnerTest(unittest.TestCase): def test_stderr_capture(self): """Regression test: Check whether a test run with output to stderr matches a previous run. - + """ class TestTest(unittest.TestCase): def test_foo(self): diff --git a/gnuradio-core/src/python/gnuradio/gru/.gitignore b/gnuradio-core/src/python/gnuradio/gru/.gitignore deleted file mode 100644 index f9c5da0db..000000000 --- a/gnuradio-core/src/python/gnuradio/gru/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/Makefile -/Makefile.in -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/*.pyo diff --git a/gnuradio-core/src/python/gnuradio/gru/Makefile.am b/gnuradio-core/src/python/gnuradio/gru/Makefile.am deleted file mode 100644 index 9b311d81f..000000000 --- a/gnuradio-core/src/python/gnuradio/gru/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright 2005,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 - -# EXTRA_DIST = run_tests.in -# TESTS = run_tests - -grblkspythondir = $(grpythondir)/gru - -grblkspython_PYTHON = \ - __init__.py diff --git a/gnuradio-core/src/python/gnuradio/gru/__init__.py b/gnuradio-core/src/python/gnuradio/gru/__init__.py index 8fcdf83ed..c24439ff5 100644 --- a/gnuradio-core/src/python/gnuradio/gru/__init__.py +++ b/gnuradio-core/src/python/gnuradio/gru/__init__.py @@ -1,29 +1,29 @@ # # Copyright 2005 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. -# +# import glob import os.path # Semi-hideous kludge to import everything in the gruimpl directory -# into the gnuradio.gru namespace. This keeps us from having to remember +# into the gnuradio.gru namespace. This keeps us from having to remember # to manually update this file. for p in __path__: diff --git a/gnuradio-core/src/python/gnuradio/gruimpl/.gitignore b/gnuradio-core/src/python/gnuradio/gruimpl/.gitignore deleted file mode 100644 index f9c5da0db..000000000 --- a/gnuradio-core/src/python/gnuradio/gruimpl/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/Makefile -/Makefile.in -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/*.pyo diff --git a/gnuradio-core/src/python/gnuradio/gruimpl/Makefile.am b/gnuradio-core/src/python/gnuradio/gruimpl/Makefile.am deleted file mode 100644 index 903bc2695..000000000 --- a/gnuradio-core/src/python/gnuradio/gruimpl/Makefile.am +++ /dev/null @@ -1,39 +0,0 @@ -# -# Copyright 2005,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 - -grupythondir = $(grpythondir)/gruimpl - -grupython_PYTHON = \ - __init__.py \ - freqz.py \ - gnuplot_freqz.py \ - hexint.py \ - listmisc.py \ - mathmisc.py \ - lmx2306.py \ - msgq_runner.py \ - os_read_exactly.py \ - sdr_1000.py \ - seq_with_cursor.py \ - socket_stuff.py \ - daemon.py diff --git a/gnuradio-core/src/python/gnuradio/gruimpl/daemon.py b/gnuradio-core/src/python/gnuradio/gruimpl/daemon.py index 4fa972ad2..e04702152 100644 --- a/gnuradio-core/src/python/gnuradio/gruimpl/daemon.py +++ b/gnuradio-core/src/python/gnuradio/gruimpl/daemon.py @@ -1,23 +1,23 @@ # # 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. -# +# import os, sys, signal # Turn application into a background daemon process. @@ -62,7 +62,7 @@ def daemonize(pidfile=None, logfile=None): if pid == 0: # First child of first fork() # Become session leader of new session os.setsid() - + # fork() into background again try: pid = os.fork() @@ -74,14 +74,14 @@ def daemonize(pidfile=None, logfile=None): else: # Second child of first fork() os._exit(0) - + os.umask(0111) # Write pid pid = os.getpid() if pidfile is not None: open(pidfile, 'w').write('%d\n'%pid) - + # Redirect streams if logfile is not None: lf = open(logfile, 'a+') diff --git a/gnuradio-core/src/python/gnuradio/gruimpl/freqz.py b/gnuradio-core/src/python/gnuradio/gruimpl/freqz.py index 46696a50e..60dca64a5 100644 --- a/gnuradio-core/src/python/gnuradio/gruimpl/freqz.py +++ b/gnuradio-core/src/python/gnuradio/gruimpl/freqz.py @@ -1,34 +1,34 @@ #!/usr/bin/env python # # Copyright 2005,2007 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# # This code lifted from various parts of www.scipy.org -eb 2005-01-24 # Copyright (c) 2001, 2002 Enthought, Inc. -# +# # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # a. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # b. Redistributions in binary form must reproduce the above copyright @@ -37,8 +37,8 @@ # c. Neither the name of the Enthought 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 @@ -50,7 +50,7 @@ # 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. -# +# __all__ = ['freqz'] @@ -62,7 +62,7 @@ def atleast_1d(*arys): """ Force a sequence of arrays to each be at least 1D. Description: - Force an array to be at least 1D. If an array is 0D, the + Force an array to be at least 1D. If an array is 0D, the array is converted to a single row of values. Otherwise, the array is unaltered. Arguments: @@ -73,7 +73,7 @@ def atleast_1d(*arys): res = [] for ary in arys: ary = asarray(ary) - if len(ary.shape) == 0: + if len(ary.shape) == 0: result = numpy.array([ary[0]]) else: result = ary @@ -147,7 +147,7 @@ class poly1d: def __coerce__(self,other): return None - + def __repr__(self): vals = repr(self.coeffs) vals = vals[6:-1] @@ -177,14 +177,14 @@ class poly1d: newstr = '' elif coefstr == '1': newstr = 'x' - else: + else: newstr = '%s x' % (coefstr,) else: if coefstr == '0': newstr = '' elif coefstr == '1': newstr = 'x**%d' % (power,) - else: + else: newstr = '%s x**%d' % (coefstr, power) if k > 0: @@ -198,7 +198,7 @@ class poly1d: else: thestr = newstr return _raise_power(thestr) - + def __call__(self, val): return polyval(self.coeffs, val) @@ -215,12 +215,12 @@ class poly1d: return poly1d(other * self.coeffs) else: other = poly1d(other) - return poly1d(polymul(self.coeffs, other.coeffs)) - + return poly1d(polymul(self.coeffs, other.coeffs)) + def __add__(self, other): other = poly1d(other) - return poly1d(polyadd(self.coeffs, other.coeffs)) - + return poly1d(polyadd(self.coeffs, other.coeffs)) + def __radd__(self, other): other = poly1d(other) return poly1d(polyadd(self.coeffs, other.coeffs)) @@ -267,7 +267,7 @@ class poly1d: return self.order else: return self.__dict__[key] - + def __getitem__(self, val): ind = self.order - val if val > self.order: @@ -306,7 +306,7 @@ def freqz(b, a, worN=None, whole=0, plot=None): jw B(e) b[0] + b[1]e + .... + b[m]e H(e) = ---- = ------------------------------------ jw -jw -jnw - A(e) a[0] + a[2]e + .... + a[n]e + A(e) a[0] + a[2]e + .... + a[n]e Inputs: diff --git a/gnuradio-core/src/python/gnuradio/gruimpl/gnuplot_freqz.py b/gnuradio-core/src/python/gnuradio/gruimpl/gnuplot_freqz.py index 2c2a06847..defc47b59 100755 --- a/gnuradio-core/src/python/gnuradio/gruimpl/gnuplot_freqz.py +++ b/gnuradio-core/src/python/gnuradio/gruimpl/gnuplot_freqz.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005,2007 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. -# +# __all__ = ['gnuplot_freqz'] @@ -40,14 +40,14 @@ def gnuplot_freqz (hw, Fs=None, logfreq=False): Returns a handle to the gnuplot graph. When the handle is reclaimed the graph is torn down.""" - + data_file = tempfile.NamedTemporaryFile () cmd_file = os.popen ('gnuplot', 'w') h, w = hw ampl = 20 * numpy.log10 (numpy.absolute (h) + 1e-9) phase = map (lambda x: math.atan2 (x.imag, x.real), h) - + if Fs: w *= (Fs/(2*math.pi)) @@ -63,7 +63,7 @@ def gnuplot_freqz (hw, Fs=None, logfreq=False): cmd_file.write ("unset logscale x\n") cmd_file.write ("plot '%s' using 1:2 with lines\n" % (data_file.name,)) cmd_file.flush () - + return (cmd_file, data_file) diff --git a/gnuradio-core/src/python/gnuradio/gruimpl/hexint.py b/gnuradio-core/src/python/gnuradio/gruimpl/hexint.py index f2808c448..0fb5ecde0 100644 --- a/gnuradio-core/src/python/gnuradio/gruimpl/hexint.py +++ b/gnuradio-core/src/python/gnuradio/gruimpl/hexint.py @@ -1,23 +1,23 @@ # # Copyright 2005 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# def hexint(mask): """ diff --git a/gnuradio-core/src/python/gnuradio/gruimpl/listmisc.py b/gnuradio-core/src/python/gnuradio/gruimpl/listmisc.py index 953bf90b1..9e70eb863 100644 --- a/gnuradio-core/src/python/gnuradio/gruimpl/listmisc.py +++ b/gnuradio-core/src/python/gnuradio/gruimpl/listmisc.py @@ -1,23 +1,23 @@ # # Copyright 2005 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# def list_reverse(x): """ diff --git a/gnuradio-core/src/python/gnuradio/gruimpl/lmx2306.py b/gnuradio-core/src/python/gnuradio/gruimpl/lmx2306.py index 1a7741814..aa4efc3e9 100755 --- a/gnuradio-core/src/python/gnuradio/gruimpl/lmx2306.py +++ b/gnuradio-core/src/python/gnuradio/gruimpl/lmx2306.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# '''Control National LMX2306 based frequency synthesizer''' @@ -78,7 +78,7 @@ class lmx2306 (object): self._set_fosc (fosc) self._set_step (step_size) - + def program (self, r, a, b): if self.verbose: print "lmx2306: r = %d a = %d b = %d" % (r, a, b) @@ -102,10 +102,10 @@ class lmx2306 (object): return actual # ---------------------------------------------------------------- - + def _set_fosc (self, ref_oscillator_freq): self.fosc = ref_oscillator_freq - + def _set_step (self, step_size): r = int (self.fosc / step_size) if r * step_size != self.fosc: @@ -114,7 +114,7 @@ class lmx2306 (object): raise ValueError, "r is out of range" self.r = r self.step_size = step_size - + def _compute_ab (self, divisor): b = divisor / 8 a = divisor - (b * 8) @@ -174,7 +174,7 @@ if __name__ == '__main__': eng_notation.num_to_str (options.fosc), eng_notation.num_to_str (options.step_size), eng_notation.num_to_str (options.freq)) - + lmx = lmx2306 (options.fosc, options.step_size) lmx.verbose = options.verbose diff --git a/gnuradio-core/src/python/gnuradio/gruimpl/mathmisc.py b/gnuradio-core/src/python/gnuradio/gruimpl/mathmisc.py index 77f2e03b5..7e6f23a34 100644 --- a/gnuradio-core/src/python/gnuradio/gruimpl/mathmisc.py +++ b/gnuradio-core/src/python/gnuradio/gruimpl/mathmisc.py @@ -1,23 +1,23 @@ # # Copyright 2005 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. -# +# import math diff --git a/gnuradio-core/src/python/gnuradio/gruimpl/os_read_exactly.py b/gnuradio-core/src/python/gnuradio/gruimpl/os_read_exactly.py index 0d999dd02..40b053770 100644 --- a/gnuradio-core/src/python/gnuradio/gruimpl/os_read_exactly.py +++ b/gnuradio-core/src/python/gnuradio/gruimpl/os_read_exactly.py @@ -1,23 +1,23 @@ # # Copyright 2005 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. -# +# import os diff --git a/gnuradio-core/src/python/gnuradio/gruimpl/sdr_1000.py b/gnuradio-core/src/python/gnuradio/gruimpl/sdr_1000.py index 8296831b1..5192a7155 100644 --- a/gnuradio-core/src/python/gnuradio/gruimpl/sdr_1000.py +++ b/gnuradio-core/src/python/gnuradio/gruimpl/sdr_1000.py @@ -1,23 +1,23 @@ # # Copyright 2003,2004 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr @@ -33,7 +33,7 @@ class sdr_1000 (gr.sdr_1000_base): self.write_latch (2, data, 0xff) self.write_latch (3, 0x40, 0x40) self.write_latch (3, 0x00, 0x40) - + def set_freq(self, freq): self.set_band (freq) ftw = freq / 200e6; @@ -56,23 +56,23 @@ class sdr_1000 (gr.sdr_1000_base): band = 4 else: band = 5 - + self.write_latch (1, 1 << band, 0x3f) def set_bit (self, reg, bit, state): val = 0x00 if state: val = 1<<bit self.write_latch (reg, val, 1<<bit) - + def set_tx (self, on = 1): self.set_bit(1, 6, on) def set_rx (self): self.set_bit(1, 6, 0) - + def set_gain (self, high): self.set_bit(0, 7, high) - + def set_mute (self, mute = 1): self.set_bit(1, 7, mute) diff --git a/gnuradio-core/src/python/gnuradio/gruimpl/seq_with_cursor.py b/gnuradio-core/src/python/gnuradio/gruimpl/seq_with_cursor.py index 7416423bf..def3299b6 100644 --- a/gnuradio-core/src/python/gnuradio/gruimpl/seq_with_cursor.py +++ b/gnuradio-core/src/python/gnuradio/gruimpl/seq_with_cursor.py @@ -1,23 +1,23 @@ # # Copyright 2003,2004 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# # misc utilities @@ -41,7 +41,7 @@ class seq_with_cursor (object): self.index = initial_index else: raise exceptions.ValueError - + def set_index_by_value(self, v): """ Set index to the smallest value such that items[index] >= v. @@ -52,7 +52,7 @@ class seq_with_cursor (object): more = True while cv < v and more: cv, more = self.next() # side effect! - + def next (self): new_index = self.index + 1 if new_index < len (self.items): @@ -74,4 +74,4 @@ class seq_with_cursor (object): def get_seq (self): return self.items[:] # copy of items - + diff --git a/gnuradio-core/src/python/gnuradio/gruimpl/socket_stuff.py b/gnuradio-core/src/python/gnuradio/gruimpl/socket_stuff.py index cc2381d2e..329fd2ed3 100644 --- a/gnuradio-core/src/python/gnuradio/gruimpl/socket_stuff.py +++ b/gnuradio-core/src/python/gnuradio/gruimpl/socket_stuff.py @@ -1,23 +1,23 @@ # # Copyright 2005 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. -# +# # random socket related stuff diff --git a/gnuradio-core/src/python/gnuradio/optfir.py b/gnuradio-core/src/python/gnuradio/optfir.py index aee1d2a0c..bbf9ead74 100644 --- a/gnuradio-core/src/python/gnuradio/optfir.py +++ b/gnuradio-core/src/python/gnuradio/optfir.py @@ -1,23 +1,23 @@ # # Copyright 2004,2005,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. -# +# ''' Routines for designing optimal FIR filters. @@ -150,7 +150,7 @@ def high_pass (gain, Fs, freq1, freq2, passband_ripple_db, stopband_atten_db, # In gr.remez, ntaps = n+1, so n must be even if((n+nextra_taps)%2 == 1): n += 1 - + # The remezord typically under-estimates the filter order, so add 2 taps by default taps = gr.remez (n + nextra_taps, fo, ao, w, "bandpass") return taps @@ -210,7 +210,7 @@ def remezord (fcuts, mags, devs, fsamp = 2): fcuts = fcuts[:] mags = mags[:] devs = devs[:] - + for i in range (len (fcuts)): fcuts[i] = float (fcuts[i]) / fsamp @@ -224,11 +224,11 @@ def remezord (fcuts, mags, devs, fsamp = 2): if nf != 2 * (nbands - 1): raise ValueError, "Length of f must be 2 * len (mags) - 2" - + for i in range (len (mags)): if mags[i] != 0: # if not stopband, get relative deviation devs[i] = devs[i] / mags[i] - + # separate the passband and stopband edges f1 = fcuts[0::2] f2 = fcuts[1::2] @@ -254,7 +254,7 @@ def remezord (fcuts, mags, devs, fsamp = 2): l = max (l, l1, l2) n = int (math.ceil (l)) - 1 # need order, not length for remez - + # cook up remez compatible result ff = [0] + fcuts + [1] for i in range (1, len (ff) - 1): diff --git a/gnuradio-core/src/python/gnuradio/vocoder/.gitignore b/gnuradio-core/src/python/gnuradio/vocoder/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gnuradio-core/src/python/gnuradio/vocoder/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gnuradio-core/src/python/gnuradio/window.py b/gnuradio-core/src/python/gnuradio/window.py index e109a9892..4a1d0c516 100644 --- a/gnuradio-core/src/python/gnuradio/window.py +++ b/gnuradio-core/src/python/gnuradio/window.py @@ -1,23 +1,23 @@ # # Copyright 2004,2005,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. -# +# ''' Routines for designing window functions. @@ -54,7 +54,7 @@ def rate(fft_size): def expn(fft_size): math.log(2.0)/(midn(fft_size) + 1.0) - + def hamming(fft_size): window = [] for index in xrange(fft_size): @@ -93,7 +93,7 @@ def bartlett(fft_size): angle += freq j -= 1 return window - + def blackman2(fft_size): mfrq = freq(fft_size) angle = 0 @@ -105,7 +105,7 @@ def blackman2(fft_size): angle += freq j -= 1 return window - + def blackman3(fft_size): mfrq = freq(fft_size) angle = 0 @@ -117,7 +117,7 @@ def blackman3(fft_size): angle += freq j -= 1 return window - + def blackman4(fft_size): mfrq = freq(fft_size) angle = 0 @@ -129,7 +129,7 @@ def blackman4(fft_size): angle += freq j -= 1 return window - + def exponential(fft_size): expsum = 1.0 window = [0 for i in range(fft_size)] diff --git a/gnuradio-core/src/tests/.gitignore b/gnuradio-core/src/tests/.gitignore deleted file mode 100644 index 8687003d4..000000000 --- a/gnuradio-core/src/tests/.gitignore +++ /dev/null @@ -1,28 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo -/t1 -/test_dtv -/check_dups -/test_gr -/test_all -/exercise_correlator -/test_grbase -/test_vmcircbuf -/test_atsc -/test_general -/test_runtime -/test_filter -/benchmark_dotprod_fff -/benchmark_dotprod_ccc -/benchmark_dotprod_fcc -/benchmark_dotprod_scc -/benchmark_nco -/benchmark_dotprod_ccf -/benchmark_dotprod_fsf -/benchmark_vco diff --git a/gnuradio-core/src/tests/CMakeLists.txt b/gnuradio-core/src/tests/CMakeLists.txt index 34ad36568..3c7f632b3 100644 --- a/gnuradio-core/src/tests/CMakeLists.txt +++ b/gnuradio-core/src/tests/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2010-2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gnuradio-core/src/tests/Makefile.am b/gnuradio-core/src/tests/Makefile.am deleted file mode 100644 index 5879a13d8..000000000 --- a/gnuradio-core/src/tests/Makefile.am +++ /dev/null @@ -1,105 +0,0 @@ -# -# Copyright 2001,2008,2010 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 - -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES) $(WITH_INCLUDES) - -# list of programs run by "make check" and "make distcheck" - -TESTS = test_all - - -# test_atsc - -#Test program to test setting up buffers using gr_test which can be run manually -EXTRA_DIST += \ - test_buffers.py \ - benchmark_dotprod - - -noinst_PROGRAMS = \ - benchmark_dotprod_fff \ - benchmark_dotprod_fsf \ - benchmark_dotprod_fcc \ - benchmark_dotprod_scc \ - benchmark_dotprod_ccc \ - benchmark_dotprod_ccf \ - benchmark_nco \ - benchmark_vco \ - test_all \ - test_runtime \ - test_general \ - test_filter \ - test_vmcircbuf - -#bin_PROGRAMS = \ -# test_all - - -noinst_SCRIPTS = \ - benchmark_dotprod - - -LIBGNURADIO = $(GNURADIO_CORE_LA) $(BOOST_FILESYSTEM_LIB) -LIBGNURADIOQA = $(top_builddir)/gnuradio-core/src/lib/libgnuradio-core-qa.la $(LIBGNURADIO) - -benchmark_dotprod_fff_SOURCES = benchmark_dotprod_fff.cc -benchmark_dotprod_fff_LDADD = $(LIBGNURADIO) - -benchmark_dotprod_fsf_SOURCES = benchmark_dotprod_fsf.cc -benchmark_dotprod_fsf_LDADD = $(LIBGNURADIO) - -benchmark_dotprod_ccf_SOURCES = benchmark_dotprod_ccf.cc -benchmark_dotprod_ccf_LDADD = $(LIBGNURADIO) - -benchmark_dotprod_fcc_SOURCES = benchmark_dotprod_fcc.cc -benchmark_dotprod_fcc_LDADD = $(LIBGNURADIO) - -benchmark_dotprod_scc_SOURCES = benchmark_dotprod_scc.cc -benchmark_dotprod_scc_LDADD = $(LIBGNURADIO) - -benchmark_dotprod_ccc_SOURCES = benchmark_dotprod_ccc.cc -benchmark_dotprod_ccc_LDADD = $(LIBGNURADIO) - -benchmark_nco_SOURCES = benchmark_nco.cc -benchmark_nco_LDADD = $(LIBGNURADIO) - -benchmark_vco_SOURCES = benchmark_vco.cc -benchmark_vco_LDADD = $(LIBGNURADIO) - -test_runtime_SOURCES = test_runtime.cc -test_runtime_LDADD = $(LIBGNURADIOQA) - -test_general_SOURCES = test_general.cc -test_general_LDADD = $(LIBGNURADIOQA) - -test_filter_SOURCES = test_filter.cc -test_filter_LDADD = $(LIBGNURADIOQA) - -# test_atsc_SOURCES = test_atsc.cc -#test_atsc_LDADD = $(LIBGNURADIOQA) - -test_vmcircbuf_SOURCES = test_vmcircbuf.cc -test_vmcircbuf_LDADD = $(LIBGNURADIOQA) - -test_all_SOURCES = test_all.cc -test_all_LDADD = $(LIBGNURADIOQA) diff --git a/gnuradio-core/src/tests/benchmark_dotprod b/gnuradio-core/src/tests/benchmark_dotprod index 69489e465..82f3b5c3f 100755 --- a/gnuradio-core/src/tests/benchmark_dotprod +++ b/gnuradio-core/src/tests/benchmark_dotprod @@ -1,19 +1,19 @@ #!/bin/sh # # 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 this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/gnuradio-core/src/tests/benchmark_dotprod_fcc.cc b/gnuradio-core/src/tests/benchmark_dotprod_fcc.cc index 8363a03b3..e9eeee43a 100644 --- a/gnuradio-core/src/tests/benchmark_dotprod_fcc.cc +++ b/gnuradio-core/src/tests/benchmark_dotprod_fcc.cc @@ -79,7 +79,7 @@ benchmark (fir_maker_t filter_maker, const char *implementation_name) std::vector<gr_complex> taps (&coeffs[0], &coeffs[NTAPS]); filter_t *f = filter_maker (taps); - + // get starting CPU usage #ifdef HAVE_SYS_RESOURCE_H if (getrusage (RUSAGE_SELF, &rusage_start) < 0){ diff --git a/gnuradio-core/src/tests/benchmark_dotprod_scc.cc b/gnuradio-core/src/tests/benchmark_dotprod_scc.cc index 49bbfe5bf..9a65bb4c6 100644 --- a/gnuradio-core/src/tests/benchmark_dotprod_scc.cc +++ b/gnuradio-core/src/tests/benchmark_dotprod_scc.cc @@ -66,7 +66,7 @@ benchmark (fir_maker_t filter_maker, const char *implementation_name) double clock_start; double clock_end; #endif - + // setup coefficients and input data @@ -78,7 +78,7 @@ benchmark (fir_maker_t filter_maker, const char *implementation_name) std::vector<gr_complex> taps (&coeffs[0], &coeffs[NTAPS]); filter_t *f = filter_maker (taps); - + // get starting CPU usage #ifdef HAVE_SYS_RESOURCE_H diff --git a/gnuradio-core/src/tests/benchmark_nco.cc b/gnuradio-core/src/tests/benchmark_nco.cc index 9c4eff346..20d53e410 100644 --- a/gnuradio-core/src/tests/benchmark_nco.cc +++ b/gnuradio-core/src/tests/benchmark_nco.cc @@ -124,7 +124,7 @@ void native_sincos_vec (float *x, float *y) gr_nco<float,float> nco; nco.set_freq (2 * M_PI / FREQ); - + for (int i = 0; i < ITERATIONS/BLOCK_SIZE; i++){ nco.sincos ((gr_complex*)x, BLOCK_SIZE); } @@ -133,9 +133,9 @@ void native_sincos_vec (float *x, float *y) void fxpt_sincos_vec (float *x, float *y) { gr_fxpt_nco nco; - + nco.set_freq (2 * M_PI / FREQ); - + for (int i = 0; i < ITERATIONS/BLOCK_SIZE; i++){ nco.sincos ((gr_complex*)x, BLOCK_SIZE); } diff --git a/gnuradio-core/src/tests/test_all.cc b/gnuradio-core/src/tests/test_all.cc index 6cec8ad0e..8a1423e9e 100644 --- a/gnuradio-core/src/tests/test_all.cc +++ b/gnuradio-core/src/tests/test_all.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -31,7 +31,7 @@ // FIXME add atsc back in. -int +int main (int argc, char **argv) { CppUnit::TextTestRunner runner; @@ -43,7 +43,7 @@ main (int argc, char **argv) runner.addTest (qa_filter::suite ()); // runner.addTest (qa_atsc::suite ()); runner.setOutputter(xmlout); - + bool was_successful = runner.run ("", false); return was_successful ? 0 : 1; diff --git a/gnuradio-core/src/tests/test_atsc.cc b/gnuradio-core/src/tests/test_atsc.cc index 66cb2a312..d99bccce5 100644 --- a/gnuradio-core/src/tests/test_atsc.cc +++ b/gnuradio-core/src/tests/test_atsc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -26,7 +26,7 @@ #include <gr_unittests.h> #include <qa_atsc.h> -int +int main (int argc, char **argv) { CppUnit::TextTestRunner runner; diff --git a/gnuradio-core/src/tests/test_buffers.py b/gnuradio-core/src/tests/test_buffers.py index 186a60bb9..b867c727c 100755 --- a/gnuradio-core/src/tests/test_buffers.py +++ b/gnuradio-core/src/tests/test_buffers.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2006 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, gru from gnuradio import audio diff --git a/gnuradio-core/src/tests/test_filter.cc b/gnuradio-core/src/tests/test_filter.cc index 3227a9ff2..8b17034c6 100644 --- a/gnuradio-core/src/tests/test_filter.cc +++ b/gnuradio-core/src/tests/test_filter.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -26,7 +26,7 @@ #include <gr_unittests.h> #include <qa_filter.h> -int +int main (int argc, char **argv) { CppUnit::TextTestRunner runner; @@ -35,7 +35,7 @@ main (int argc, char **argv) runner.addTest (qa_filter::suite ()); runner.setOutputter(xmlout); - + bool was_successful = runner.run ("", false); return was_successful ? 0 : 1; diff --git a/gnuradio-core/src/tests/test_general.cc b/gnuradio-core/src/tests/test_general.cc index ca6dee40a..32fac1b35 100644 --- a/gnuradio-core/src/tests/test_general.cc +++ b/gnuradio-core/src/tests/test_general.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -26,7 +26,7 @@ #include <gr_unittests.h> #include <qa_general.h> -int +int main (int argc, char **argv) { CppUnit::TextTestRunner runner; @@ -35,7 +35,7 @@ main (int argc, char **argv) runner.addTest (qa_general::suite ()); runner.setOutputter(xmlout); - + bool was_successful = runner.run ("", false); return was_successful ? 0 : 1; diff --git a/gnuradio-core/src/tests/test_runtime.cc b/gnuradio-core/src/tests/test_runtime.cc index 77af3001b..bd5378332 100644 --- a/gnuradio-core/src/tests/test_runtime.cc +++ b/gnuradio-core/src/tests/test_runtime.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -26,7 +26,7 @@ #include <gr_unittests.h> #include <qa_runtime.h> -int +int main (int argc, char **argv) { CppUnit::TextTestRunner runner; @@ -35,7 +35,7 @@ main (int argc, char **argv) runner.addTest (qa_runtime::suite ()); runner.setOutputter(xmlout); - + bool was_successful = runner.run ("", false); return was_successful ? 0 : 1; diff --git a/gnuradio-core/src/tests/test_vmcircbuf.cc b/gnuradio-core/src/tests/test_vmcircbuf.cc index 5145b17c4..ee24b6d62 100644 --- a/gnuradio-core/src/tests/test_vmcircbuf.cc +++ b/gnuradio-core/src/tests/test_vmcircbuf.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2003 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, @@ -23,7 +23,7 @@ #include <gr_vmcircbuf.h> #include <stdio.h> -int +int main (int argc, char **argv) { int verbose = 1; // summary diff --git a/gnuradio-core/src/utils/.gitignore b/gnuradio-core/src/utils/.gitignore deleted file mode 100644 index a02b6ff73..000000000 --- a/gnuradio-core/src/utils/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo diff --git a/gnuradio-core/src/utils/Makefile.am b/gnuradio-core/src/utils/Makefile.am deleted file mode 100644 index acf439140..000000000 --- a/gnuradio-core/src/utils/Makefile.am +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright 2001 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 - -EXTRA_DIST += \ - cic_comp_taps.m \ - db_width.m \ - filter_tools.m \ - plot_freq_response.m \ - plot_freq_response_db.m \ - plot_freq_response_phase.m \ - plotfft.m \ - plotfftavgk.m \ - plotfftavgk_db.m \ - plotfftk.m \ - plotfftk_db.m \ - put_markers.m \ - read_char_binary.m \ - read_complex_binary.m \ - read_float_binary.m \ - read_int_binary.m \ - read_short_binary.m \ - read_cshort_binary.m \ - single_pole_iir.m \ - write_float_binary.m \ - write_short_binary.m \ - is_complex.m \ - split_vect.m \ - rainbow.m \ - lp_to_bp.m \ - cool.m \ - read_xambi.m \ - runsum.m \ - plot_cic_decimator_response.m - -# partition-cascaded-decimating-filters.scm -# permute.scm diff --git a/gnuradio-core/src/utils/cic_comp_taps.m b/gnuradio-core/src/utils/cic_comp_taps.m index e0e0c2ebd..9ae5cb167 100644 --- a/gnuradio-core/src/utils/cic_comp_taps.m +++ b/gnuradio-core/src/utils/cic_comp_taps.m @@ -1,23 +1,23 @@ # # 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. -# +# # See Altera Application Note AN455 # diff --git a/gnuradio-core/src/utils/cool.m b/gnuradio-core/src/utils/cool.m index e996a3a9f..f8b8a5cea 100644 --- a/gnuradio-core/src/utils/cool.m +++ b/gnuradio-core/src/utils/cool.m @@ -16,7 +16,7 @@ %% -*- texinfo -*- %% @deftypefn {Function File} {} cool (@var{n}) -%% Create color colormap. +%% Create color colormap. %% (cyan to magenta) %% The argument @var{n} should be a scalar. If it %% is omitted, the length of the current colormap or 64 is assumed. @@ -38,7 +38,7 @@ function map = cool (number) end if (number == 1) - map = [0, 1, 1]; + map = [0, 1, 1]; elseif (number > 1) r = (0:number - 1)' ./ (number - 1); g = 1 - r; diff --git a/gnuradio-core/src/utils/db_width.m b/gnuradio-core/src/utils/db_width.m index 204005c01..e9c64cc79 100644 --- a/gnuradio-core/src/utils/db_width.m +++ b/gnuradio-core/src/utils/db_width.m @@ -1,18 +1,18 @@ % % Copyright 2001 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, diff --git a/gnuradio-core/src/utils/filter_tools.m b/gnuradio-core/src/utils/filter_tools.m index 6368edf5d..552791e33 100644 --- a/gnuradio-core/src/utils/filter_tools.m +++ b/gnuradio-core/src/utils/filter_tools.m @@ -1,23 +1,23 @@ % % Copyright 2001 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. -% +% %% equivalent to the C++ code in VrComplexFIRfilter::buildFilterComplex 1; @@ -36,7 +36,7 @@ end function new_taps = freq_shift_filter (old_taps, center_freq) ntaps = length(old_taps); - + new_taps = exp (j*2*pi*center_freq*(0:ntaps-1)') .* old_taps; end diff --git a/gnuradio-core/src/utils/is_complex.m b/gnuradio-core/src/utils/is_complex.m index ce9a7010f..4700467b1 100644 --- a/gnuradio-core/src/utils/is_complex.m +++ b/gnuradio-core/src/utils/is_complex.m @@ -1,23 +1,23 @@ # # Copyright 2004 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# function p = is_complex (x) p = any (imag (x) != 0); diff --git a/gnuradio-core/src/utils/lp_to_bp.m b/gnuradio-core/src/utils/lp_to_bp.m index e4ef3178d..4e73f6cc7 100644 --- a/gnuradio-core/src/utils/lp_to_bp.m +++ b/gnuradio-core/src/utils/lp_to_bp.m @@ -1,23 +1,23 @@ # # Copyright 2002 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. -# +# ## transform low pass coefficients into bandpass coefficients diff --git a/gnuradio-core/src/utils/partition-cascaded-decimating-filters.scm b/gnuradio-core/src/utils/partition-cascaded-decimating-filters.scm index 598f79d8c..6ae7877f9 100644 --- a/gnuradio-core/src/utils/partition-cascaded-decimating-filters.scm +++ b/gnuradio-core/src/utils/partition-cascaded-decimating-filters.scm @@ -1,7 +1,7 @@ ;; Estimate the total work (ntaps * sampling rate) for two cascaded ;; decimating low pass filters. ;; -;; The basic assumption is that the number of taps required in any +;; The basic assumption is that the number of taps required in any ;; section is inversely proportional to the normalized transition width ;; for that section. ;; @@ -65,4 +65,3 @@ (define (extract-nth n lst) lst) -
\ No newline at end of file diff --git a/gnuradio-core/src/utils/plot_cic_decimator_response.m b/gnuradio-core/src/utils/plot_cic_decimator_response.m index 50d85e413..8f06aeafe 100644 --- a/gnuradio-core/src/utils/plot_cic_decimator_response.m +++ b/gnuradio-core/src/utils/plot_cic_decimator_response.m @@ -1,23 +1,23 @@ # # Copyright 2004 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# function plot_cic_decimator_response (R, N, M) ## R = decimation rate @@ -42,4 +42,3 @@ function plot_cic_decimator_response (R, N, M) endfunction -
\ No newline at end of file diff --git a/gnuradio-core/src/utils/plot_freq_response.m b/gnuradio-core/src/utils/plot_freq_response.m index 032d98961..335c51d62 100644 --- a/gnuradio-core/src/utils/plot_freq_response.m +++ b/gnuradio-core/src/utils/plot_freq_response.m @@ -1,23 +1,23 @@ # # Copyright 2001 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. -# +# function plot_freq_response (b,...) if (nargin == 1) diff --git a/gnuradio-core/src/utils/plot_freq_response_db.m b/gnuradio-core/src/utils/plot_freq_response_db.m index 6cd9bbfc2..10ce7d6e1 100644 --- a/gnuradio-core/src/utils/plot_freq_response_db.m +++ b/gnuradio-core/src/utils/plot_freq_response_db.m @@ -1,23 +1,23 @@ # # Copyright 2001 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. -# +# function plot_freq_response_db (b,...) if (nargin == 1) diff --git a/gnuradio-core/src/utils/plot_freq_response_phase.m b/gnuradio-core/src/utils/plot_freq_response_phase.m index c593d5dd3..591bd5b94 100644 --- a/gnuradio-core/src/utils/plot_freq_response_phase.m +++ b/gnuradio-core/src/utils/plot_freq_response_phase.m @@ -1,23 +1,23 @@ # # Copyright 2001 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. -# +# function plot_freq_response_db (b,...) if (nargin == 1) diff --git a/gnuradio-core/src/utils/plotfft.m b/gnuradio-core/src/utils/plotfft.m index ddb8d9de4..20a2efd4c 100644 --- a/gnuradio-core/src/utils/plotfft.m +++ b/gnuradio-core/src/utils/plotfft.m @@ -1,18 +1,18 @@ # # Copyright 2001 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, diff --git a/gnuradio-core/src/utils/plotfftavgk.m b/gnuradio-core/src/utils/plotfftavgk.m index afe9aae5b..c82c540f3 100644 --- a/gnuradio-core/src/utils/plotfftavgk.m +++ b/gnuradio-core/src/utils/plotfftavgk.m @@ -1,23 +1,23 @@ # # Copyright 2002 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. -# +# function plotfftavgk_db (all_data, k, sample_rate) diff --git a/gnuradio-core/src/utils/plotfftavgk_db.m b/gnuradio-core/src/utils/plotfftavgk_db.m index 420ee9fad..73cee140d 100644 --- a/gnuradio-core/src/utils/plotfftavgk_db.m +++ b/gnuradio-core/src/utils/plotfftavgk_db.m @@ -1,23 +1,23 @@ # # Copyright 2001 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. -# +# function plotfftavgk_db (all_data, k, sample_rate) @@ -62,7 +62,7 @@ function plotfftavgk_db (all_data, k, sample_rate) x = min_x:incr:max_x; y = 20 * log10(s(1:len/2)); plot (x, y); - + endif; diff --git a/gnuradio-core/src/utils/plotfftk.m b/gnuradio-core/src/utils/plotfftk.m index 94a8ffb77..df2bf3aca 100644 --- a/gnuradio-core/src/utils/plotfftk.m +++ b/gnuradio-core/src/utils/plotfftk.m @@ -1,23 +1,23 @@ # # Copyright 2001 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. -# +# function plotfftk (all_data, k, sample_rate) diff --git a/gnuradio-core/src/utils/plotfftk_db.m b/gnuradio-core/src/utils/plotfftk_db.m index 9ec981ac5..b2c85412f 100644 --- a/gnuradio-core/src/utils/plotfftk_db.m +++ b/gnuradio-core/src/utils/plotfftk_db.m @@ -1,23 +1,23 @@ # # Copyright 2001 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. -# +# function plotfftk_db (all_data, k, sample_rate) diff --git a/gnuradio-core/src/utils/put_markers.m b/gnuradio-core/src/utils/put_markers.m index 250702ce6..1244d31aa 100644 --- a/gnuradio-core/src/utils/put_markers.m +++ b/gnuradio-core/src/utils/put_markers.m @@ -1,23 +1,23 @@ # # Copyright 2002 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. -# +# function put_markers (y) diff --git a/gnuradio-core/src/utils/rainbow.m b/gnuradio-core/src/utils/rainbow.m index 9b16aab25..35fab19b8 100644 --- a/gnuradio-core/src/utils/rainbow.m +++ b/gnuradio-core/src/utils/rainbow.m @@ -16,7 +16,7 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} rainbow (@var{n}) -## Create color colormap. +## Create color colormap. ## (red through yellow, green, cyan,blue,magenta to red) ## The argument @var{n} should be a scalar. If it ## is omitted, the length of the current colormap or 64 is assumed. @@ -42,7 +42,7 @@ function map = rainbow (number) endif if (number == 1) - map = [1, 0, 0]; + map = [1, 0, 0]; elseif (number > 1) h = linspace (0, 1, number)'; map = hsv2rgb ([h, ones(number, 1), ones(number, 1)]); diff --git a/gnuradio-core/src/utils/read_char_binary.m b/gnuradio-core/src/utils/read_char_binary.m index 27044b447..029cea783 100644 --- a/gnuradio-core/src/utils/read_char_binary.m +++ b/gnuradio-core/src/utils/read_char_binary.m @@ -1,23 +1,23 @@ % % Copyright 2001 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. -% +% function v = read_char_binary (filename, count) diff --git a/gnuradio-core/src/utils/read_complex_binary.m b/gnuradio-core/src/utils/read_complex_binary.m index 67158b528..eb81f0fa0 100644 --- a/gnuradio-core/src/utils/read_complex_binary.m +++ b/gnuradio-core/src/utils/read_complex_binary.m @@ -1,29 +1,29 @@ % % Copyright 2001 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. -% +% function v = read_complex_binary (filename, count) %% usage: read_complex_binary (filename, [count]) %% - %% open filename and return the contents as a column vector, + %% open filename and return the contents as a column vector, %% treating them as 32 bit complex numbers %% diff --git a/gnuradio-core/src/utils/read_cshort_binary.m b/gnuradio-core/src/utils/read_cshort_binary.m index 047067107..149b6ca88 100644 --- a/gnuradio-core/src/utils/read_cshort_binary.m +++ b/gnuradio-core/src/utils/read_cshort_binary.m @@ -1,23 +1,23 @@ % % Copyright 2001,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. -% +% function cv = read_cshort_binary (filename, count) diff --git a/gnuradio-core/src/utils/read_float_binary.m b/gnuradio-core/src/utils/read_float_binary.m index 69d064096..d27d09b9c 100644 --- a/gnuradio-core/src/utils/read_float_binary.m +++ b/gnuradio-core/src/utils/read_float_binary.m @@ -1,23 +1,23 @@ % % Copyright 2001 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. -% +% function v = read_float_binary (filename, count) diff --git a/gnuradio-core/src/utils/read_int_binary.m b/gnuradio-core/src/utils/read_int_binary.m index 821f68829..cd83bb663 100644 --- a/gnuradio-core/src/utils/read_int_binary.m +++ b/gnuradio-core/src/utils/read_int_binary.m @@ -1,23 +1,23 @@ % % Copyright 2001,2002 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. -% +% function v = read_int_binary (filename, count) diff --git a/gnuradio-core/src/utils/read_short_binary.m b/gnuradio-core/src/utils/read_short_binary.m index 92720856a..7b42f5e2b 100644 --- a/gnuradio-core/src/utils/read_short_binary.m +++ b/gnuradio-core/src/utils/read_short_binary.m @@ -1,23 +1,23 @@ % % Copyright 2001 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. -% +% function v = read_short_binary (filename, count) diff --git a/gnuradio-core/src/utils/read_xambi.m b/gnuradio-core/src/utils/read_xambi.m index ac5bf389b..5adb94264 100644 --- a/gnuradio-core/src/utils/read_xambi.m +++ b/gnuradio-core/src/utils/read_xambi.m @@ -1,23 +1,23 @@ # # Copyright 2001,2005 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. -# +# function v = read_xambi (filename) diff --git a/gnuradio-core/src/utils/single_pole_iir.m b/gnuradio-core/src/utils/single_pole_iir.m index 8ff4c3247..12e21f2ac 100644 --- a/gnuradio-core/src/utils/single_pole_iir.m +++ b/gnuradio-core/src/utils/single_pole_iir.m @@ -1,23 +1,23 @@ # # Copyright 2002 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. -# +# function [b, a] = single_pole_iir (alpha) b = [alpha]; diff --git a/gnuradio-core/src/utils/split_vect.m b/gnuradio-core/src/utils/split_vect.m index c492581e4..aef5c5c38 100644 --- a/gnuradio-core/src/utils/split_vect.m +++ b/gnuradio-core/src/utils/split_vect.m @@ -3,7 +3,7 @@ function y = split_vect(vect,N) Z = floor(max(size(vect))/N); y = []; - if(size(vect)(1)>size(vect)(2)) + if(size(vect)(1)>size(vect)(2)) v = vect'; else v = vect; diff --git a/gnuradio-core/src/utils/write_float_binary.m b/gnuradio-core/src/utils/write_float_binary.m index 99f375790..79414878b 100644 --- a/gnuradio-core/src/utils/write_float_binary.m +++ b/gnuradio-core/src/utils/write_float_binary.m @@ -1,23 +1,23 @@ # # Copyright 2001 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. -# +# function v = write_float_binary (data, filename) diff --git a/gnuradio-core/src/utils/write_short_binary.m b/gnuradio-core/src/utils/write_short_binary.m index 0266e434b..72b3c408e 100644 --- a/gnuradio-core/src/utils/write_short_binary.m +++ b/gnuradio-core/src/utils/write_short_binary.m @@ -1,23 +1,23 @@ # # Copyright 2001 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. -# +# function v = write_short_binary (data, filename) diff --git a/gnuradio-examples/.gitignore b/gnuradio-examples/.gitignore deleted file mode 100644 index 29ec71e01..000000000 --- a/gnuradio-examples/.gitignore +++ /dev/null @@ -1,25 +0,0 @@ -/Makefile -/Makefile.in -/aclocal.m4 -/configure -/config.h.in -/stamp-h.in -/libtool -/config.log -/config.h -/config.cache -/config.status -/missing -/stamp-h -/stamp-h1 -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo -/autom4te.cache -/*.cache -/missing -/make.log -/gnuradio.pc diff --git a/gnuradio-examples/Makefile.am b/gnuradio-examples/Makefile.am deleted file mode 100644 index ded4e743d..000000000 --- a/gnuradio-examples/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright 2004,2007,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 = - -if PYTHON -SUBDIRS += python grc -endif -if GUILE -SUBDIRS += waveforms -endif diff --git a/gnuradio-examples/grc/.gitignore b/gnuradio-examples/grc/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gnuradio-examples/grc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gnuradio-examples/grc/CMakeLists.txt b/gnuradio-examples/grc/CMakeLists.txt deleted file mode 100644 index 75f10d86a..000000000 --- a/gnuradio-examples/grc/CMakeLists.txt +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. - -# AUDIO -install( - FILES - audio/cvsd_sweep.grc - audio/dial_tone.grc - DESTINATION ${GR_PKG_DATA_DIR}/examples/grc/audio - COMPONENT "gnuadio-examples" -) - -# DEMOD -install( - FILES - demod/digital_freq_lock.grc - demod/mpsk_demod.grc - demod/pam_sync.grc - demod/pam_timing.grc - DESTINATION ${GR_PKG_DATA_DIR}/examples/grc/demod - COMPONENT "gnuadio-examples" -) - -# SIMPLE -install( - FILES - simple/ber_simulation.grc - simple/dpsk_loopback.grc - simple/variable_config.grc - DESTINATION ${GR_PKG_DATA_DIR}/examples/grc/simple - COMPONENT "gnuadio-examples" -) - -# TRELLIS -install( - FILES - trellis/interference_cancellation.grc - trellis/pccc1.grc - trellis/pccc.grc - trellis/sccc1.grc - trellis/sccc.grc - trellis/readme.txt - DESTINATION ${GR_PKG_DATA_DIR}/examples/grc/trellis - COMPONENT "gnuadio-examples" -) - -# UHD -install( - FILES - uhd/uhd_const_wave.grc - uhd/uhd_dpsk_mod.grc - uhd/uhd_fft.grc - uhd/uhd_rx_dpsk.grc - uhd/uhd_two_tone_loopback.grc - uhd/uhd_tx_dpsk.grc - uhd/uhd_wbfm_receive.grc - DESTINATION ${GR_PKG_DATA_DIR}/examples/grc/uhd - COMPONENT "gnuadio-examples" -) - -# XMLRPC -install( - FILES - xmlrpc/readme.txt - xmlrpc/xmlrpc_client.grc - xmlrpc/xmlrpc_client_script.py - xmlrpc/xmlrpc_server.grc - DESTINATION ${GR_PKG_DATA_DIR}/examples/grc/xmlrpc - COMPONENT "gnuadio-examples" -) diff --git a/gnuradio-examples/grc/Makefile.am b/gnuradio-examples/grc/Makefile.am deleted file mode 100644 index f8906ea67..000000000 --- a/gnuradio-examples/grc/Makefile.am +++ /dev/null @@ -1,68 +0,0 @@ -# -# 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. -# - -include $(top_srcdir)/Makefile.common - -grc_examples_prefix = $(exampledir)/grc - -audiodatadir = $(grc_examples_prefix)/audio -dist_audiodata_DATA = \ - audio/dial_tone.grc \ - audio/cvsd_sweep.grc - -demoddatadir = $(grc_examples_prefix)/demod -dist_demoddata_DATA = \ - demod/mpsk_demod.grc \ - demod/pam_timing.grc \ - demod/pam_sync.grc \ - demod/digital_freq_lock.grc - -simpledatadir = $(grc_examples_prefix)/simple -dist_simpledata_DATA = \ - simple/ber_simulation.grc \ - simple/dpsk_loopback.grc \ - simple/variable_config.grc - -trellisdatadir = $(grc_examples_prefix)/trellis -dist_trellisdata_DATA = \ - trellis/readme.txt \ - trellis/interference_cancellation.grc \ - trellis/pccc.grc \ - trellis/pccc1.grc \ - trellis/sccc.grc \ - trellis/sccc1.grc - -uhddatadir = $(grc_examples_prefix)/uhd -dist_uhddata_DATA = \ - uhd/uhd_const_wave.grc \ - uhd/uhd_dpsk_mod.grc \ - uhd/uhd_rx_dpsk.grc \ - uhd/uhd_tx_dpsk.grc \ - uhd/uhd_fft.grc \ - uhd/uhd_two_tone_loopback.grc \ - uhd/uhd_wbfm_receive.grc - -xmlrpcdatadir = $(grc_examples_prefix)/xmlrpc -dist_xmlrpcdata_DATA = \ - xmlrpc/readme.txt \ - xmlrpc/xmlrpc_client.grc \ - xmlrpc/xmlrpc_client_script.py\ - xmlrpc/xmlrpc_server.grc diff --git a/gnuradio-examples/grc/uhd/.gitignore b/gnuradio-examples/grc/uhd/.gitignore deleted file mode 100644 index f6c10401f..000000000 --- a/gnuradio-examples/grc/uhd/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.py -*.pyc diff --git a/gnuradio-examples/python/.gitignore b/gnuradio-examples/python/.gitignore deleted file mode 100644 index c400497f5..000000000 --- a/gnuradio-examples/python/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/*.pyo diff --git a/gnuradio-examples/python/Makefile.am b/gnuradio-examples/python/Makefile.am deleted file mode 100644 index 4327fd359..000000000 --- a/gnuradio-examples/python/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright 2004,2007,2009,2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = \ - mp-sched \ - network \ - pfb \ - tags diff --git a/gnuradio-examples/python/mp-sched/.gitignore b/gnuradio-examples/python/mp-sched/.gitignore deleted file mode 100644 index c400497f5..000000000 --- a/gnuradio-examples/python/mp-sched/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/*.pyo diff --git a/gnuradio-examples/python/mp-sched/Makefile.am b/gnuradio-examples/python/mp-sched/Makefile.am deleted file mode 100644 index 98fa283ef..000000000 --- a/gnuradio-examples/python/mp-sched/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -# -# 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 this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - -include $(top_srcdir)/Makefile.common - -ourdatadir = $(exampledir)/mp-sched - -dist_ourdata_DATA = \ - README - -dist_ourdata_SCRIPTS = \ - plot_flops.py \ - run_synthetic.py \ - synthetic.py \ - wfm_rcv_pll_to_wav.py diff --git a/gnuradio-examples/python/network/.gitignore b/gnuradio-examples/python/network/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gnuradio-examples/python/network/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gnuradio-examples/python/network/Makefile.am b/gnuradio-examples/python/network/Makefile.am deleted file mode 100644 index 77cacbfd2..000000000 --- a/gnuradio-examples/python/network/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright 2007,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 - -ourdatadir = $(exampledir)/network - -dist_ourdata_SCRIPTS = \ - audio_sink.py \ - audio_source.py \ - dial_tone_sink.py \ - dial_tone_source.py \ - vector_sink.py \ - vector_source.py diff --git a/gnuradio-examples/python/pfb/.gitignore b/gnuradio-examples/python/pfb/.gitignore deleted file mode 100644 index 282522db0..000000000 --- a/gnuradio-examples/python/pfb/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/gnuradio-examples/python/pfb/Makefile.am b/gnuradio-examples/python/pfb/Makefile.am deleted file mode 100644 index 39c81bfc2..000000000 --- a/gnuradio-examples/python/pfb/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -# -# 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. -# - -include $(top_srcdir)/Makefile.common - -ourdatadir = $(exampledir)/pfb - -dist_ourdata_SCRIPTS = \ - channelize.py \ - chirp_channelize.py \ - decimate.py \ - interpolate.py \ - fmtest.py \ - resampler.py \ - synth_filter.py \ - synth_to_chan.py - -dist_ourdata_DATA = \ - resampler_demo.grc diff --git a/gnuradio-examples/python/tags/.gitignore b/gnuradio-examples/python/tags/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gnuradio-examples/python/tags/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gnuradio-examples/python/tags/Makefile.am b/gnuradio-examples/python/tags/Makefile.am deleted file mode 100644 index 5d71bf9b0..000000000 --- a/gnuradio-examples/python/tags/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -ourdatadir = $(exampledir)/tags - -dist_ourdata_SCRIPTS = \ - test_file_tags.py \ - uhd_burst_detector.py - diff --git a/gnuradio-examples/waveforms/.gitignore b/gnuradio-examples/waveforms/.gitignore deleted file mode 100644 index 16c984055..000000000 --- a/gnuradio-examples/waveforms/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/Makefile -/Makefile.in -/.deps -/.libs -/*.la -/*.lo diff --git a/gnuradio-examples/waveforms/Makefile.am b/gnuradio-examples/waveforms/Makefile.am deleted file mode 100644 index c07020a5c..000000000 --- a/gnuradio-examples/waveforms/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright 2010 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, see <http://www.gnu.org/licenses/>. -# - -include $(top_srcdir)/Makefile.common - -ourdatadir = $(exampledir)/waveforms - -dist_ourdata_DATA = \ - README \ - dial-tone.wfd diff --git a/gnuradio-examples/waveforms/README b/gnuradio-examples/waveforms/README deleted file mode 100644 index afaf1db73..000000000 --- a/gnuradio-examples/waveforms/README +++ /dev/null @@ -1,270 +0,0 @@ -# -# Copyright 2010 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, see <http://www.gnu.org/licenses/>. -# - -Introduction ------------- - -This directory contains example "Waveform Description Files" that are -designed to be loaded and run using the gr-run-waveform command. - -"Waveform Description Files" are written in an extended dialect of the -Scheme language. The dialect is "The Revised^5 Report on the -Algorithmic Language Scheme" (R5RS)[1] as implemented and extended by -Guile 1.8 [2], extended with the GNU Radio specific "define-waveform" -macro and "gr-run-waveform" command. - -For those of you who may be unfamiliar with the Scheme language, -it's a very simple high-level language defined by a brief 50 page -specification[1]. Those 50 pages define the language, standard -libraries and the formal semantics! - -For a quick tutorial introduction see the first 30 pages of "How to -Teach Yourself Scheme in Fixnum Days"[3] (This covers a different -Scheme dialect, but the first 30 pages or so are valid for Guile too.) - -Another text worth mentioning is "How To Design Programs"[4], a book -on the systematic design of computer programs which utilizes Scheme. - - -A Quick Walk-Through --------------------- - -We'll use dial-tone.wfd as our example. - -Assuming that you've already built and installed GNU Radio, you can -run dial-tone.wfd using: - - $ gr-run-waveform <prefix>/share/gnuradio/examples/waveforms/dial-tone.wfd - -where <prefix> is the location where GNU Radio is installed, typically /usr/local. - - -Here is dial-tone.wfd in its entirety: - -;; Start of dial-tone.wfd - -(use-modules (gnuradio audio_alsa)) - -(define-waveform (dial-tone cmd-line-args) - (vars - (sample-rate 48000) - (ampl 0.1)) - - (blocks - (src0 (gr:sig-source-f sample-rate gr:GR-SIN-WAVE 350 ampl)) - (src1 (gr:sig-source-f sample-rate gr:GR-SIN-WAVE 440 ampl)) - (sink (gr:audio-alsa-sink sample-rate "plughw:0,0"))) - - (connections - (src0 (list sink 0)) ; src0 to left input - (src1 (list sink 1)))) ; src1 to right input - -;; End of dial-tone.wfd - - -By default, waveforms have all of gnuradio-core available for their -use. This line: - - (use-modules (gnuradio audio_alsa)) - -imports the audio_alsa module, which we need for the audio sink. -Unlike python, there's no gr.<foo> notation. All names exported by -the (gnuradio audio_alsa) module are made available in the current -module. - - -"define-waveform" is where the real work gets done. -It has this general structure: - -(define-waveform (<waveform-name> cmd-line-args) - (vars - (<variable-name-1> <variable-value-1>) - ...) - - (blocks - (<block-variable-name-1> <block-value-1>) - ...) - - (connections - (<endpoint-1> ...) - ...)) - - -<waveform-name> is an identifier that names the waveform. - -Identifiers are similar to identifiers in other programming languages. -They are a sequence of letters, digits and "extended alphabetic -characters" that begins with a character that cannot begin a number. -"extended alphabetic characters" include: - - ! $ % & * + - . / : < = > ? @ ^ _ - - -By convention in Scheme and LISP, '-' is used in preference to '_' in identifiers. - -<variable-names> and <block-variable-names> name variables that store -associated values, which may be any Scheme value. (<block-variables> -should contain only instances of GNU Radio blocks.) - - -<variable-value-*> and <block-value-*> may be any valid Scheme expression. -E.g., constants, nested function calls, bindings using "let", or -lambda expressions. - - -The (connections ...) section contains 0 or more lists of endpoints, -specifying which endpoints are to be connected together. In the -general case, endpoints have both a block and a port number, though -the port number defaults to zero if not specified. - -To specify a port number, create a two element list of the block and -port number as illustrated above. - -Like the python implementation, more than a pair of endpoints can be -strung together. Assuming blk0, blk1 and blk2 are block variables, -this would connect blk0, output 0, to blk1, input 0; blk1, output 0 to -blk2, input 0: - - (connect - (blk0 blk1 blk2)) - -It could also be written like this: - - (connect - (blk0 blk1) - (blk1 blk2)) - -Or even more verbosely as: - - (connect - ((list blk0 0) (list blk1 0)) - ((list blk1 0) (list blk2 0))) - -And finally, using Scheme's quasiquote mechanism, this works too: - - (connect - (`(,blk0 0) (,blk1 0)) - (`(,blk1 0) (,blk2 0))) - - -When gr-run-waveform loads the waveform file, it expands the -define-waveform section into code that creates a GNU Radio top block, -creates and initializes all variables and blocks specified in the -respective sections and connects them together according the -connections specifications. Finally it runs the resulting GNU Radio -flowgraph. - - -Naming conventions (or what's my block called???!!!) ----------------------------------------------------- - -All GNU Radio block constructors as well as everything else wrapped -for export by SWIG starts with a "gr:" prefix. This is to avoid -collisions with any built in Scheme procedures. - -All blocks contained in gnuradio-core are named like this: - - C++ name Python name Guile name - -------- ----------- ---------- - gr_head gr.head gr:head - gr_add_const_ff gr.add_const_ff gr:add-const-ff - - -GNU Radio blocks in any other component besides gnuradio-core use a -slightly different convention. They also start with gr: but in -addition include the component name after the gr:. This is because -Scheme implements its namespace differently than Python does. -Thus: - - C++ name Python name Guile name - -------- ----------- ---------- - audio_alsa_sink audio_alsa.sink gr:audio-alsa-sink - audio_jack_sink audio_jack.sink gr:audio-jack-sink - usrp2_sink_32fc usrp2.sink_32fc gr:usrp2-sink-32fc - - -Now, because we're working in Scheme and not C++ or Python, the -calling of class methods (member functions) is different too. SWIG -converts C++ member functions into what are called "generic functions" -using GOOPS[5], Guile's object oriented extension. (For those familar -with Common Lisp, GOOPS is very close in spirit to CLOS, the Common -Lisp Object System, but adapted for the Scheme language.) - -Assuming "u2" is a variable holding an instance of a usrp2 sink, -these all retrieve the current interpolation value: - - C++ Python Guile - -------- ----------- ---------- - u2->interp() u2.interp() (gr:interp u2) - - -Mapping of Guile types to/from C++ ----------------------------------- - -The mapping is similar in flavor to the Python <-> C++ mapping - - C++ Python Guile - -------- ----------- ---------- - true True #t - false False #f - "a string" "a string" "a string" - 3.14159 3.14159 3.14159 - gr_complex(1,-1) 1-1j 1-1i - vector<int> (1, 2, 3) #(1 2 3) - vector<float> (1.0, 2.0, 3.0) #(1.0 2.0 3.0) - - -You can find examples of each block constructor being called by -looking in the guile QA code contained in gnuradio-core/src/guile/tests/*.test -The types and values passed are syntactically correct, but don't -necessarily doing anything meaningful. - - -gr-run-waveform vs gr-run-waveform-script vs gr-run-waveform-binary -------------------------------------------------------------------- - -There are two implementations of gr-run-waveform: -gr-run-waveform-script and gr-run-waveform-binary. gr-run-waveform is -symlinked to one of them, with preference to gr-run-waveform-binary if -the gr-run-waveform component was built and installed. - -gr-run-waveform-script is contained in gnuradio-core and uses the -system's Guile interpreter and assocated files to implement this -functionality. - -gr-run-waveform-binary is built by the optional standalone component -gr-run-waveform. gr-run-waveform-binary is a C binary that requires -only handful of shared libraries and a single data file. To function -it requires the main program: gr-run-waveform-binary; the GNU Radio -C++ libraries: libgnuradio-*.so; the SWIG generated wrapper libraries: -libguile-gnuradio-*.so; and one additional file: -<prefix>/share/gnuradio/gr-run-waveform/filesystem.dat. - -The two programs run waveform files identically. They differ only in -the details of how they are implemented. - - -References ----------- - -[1] http://www.schemers.org/Documents/Standards/R5RS/r5rs.pdf -[2] http://www.gnu.org/software/guile/guile.html -[3] html: http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme.html - pdf: http://download.plt-scheme.org/doc/205/pdf/t-y-scheme.pdf -[4] http://www.htdp.org/2003-09-26 -[5] http://www.gnu.org/software/guile/docs/goops/index.html diff --git a/gnuradio-examples/waveforms/dial-tone.wfd b/gnuradio-examples/waveforms/dial-tone.wfd deleted file mode 100644 index 5ab60075a..000000000 --- a/gnuradio-examples/waveforms/dial-tone.wfd +++ /dev/null @@ -1,40 +0,0 @@ -;;; Emacs, format this using -*-scheme-*- mode. -;;; -;;; Copyright 2010 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, see <http://www.gnu.org/licenses/>. -;;; - -;;; This example waveform outputs a signal to an audio_alsa_sink -;;; that sounds like North American dial tone. - -(use-modules (gnuradio audio_alsa)) - - -(define-waveform (dial-tone cmd-line-args) - (vars - (sample-rate 48000) - (ampl 0.1)) - - (blocks - (src0 (gr:sig-source-f sample-rate gr:GR-SIN-WAVE 350 ampl)) - (src1 (gr:sig-source-f sample-rate gr:GR-SIN-WAVE 440 ampl)) - (sink (gr:audio-alsa-sink sample-rate "plughw:0,0")) - ) - - (connections - (src0 (list sink 0)) ; src0 to left input - (src1 (list sink 1)))) ; src1 to right input diff --git a/gnuradio-pkg_chk.conf b/gnuradio-pkg_chk.conf deleted file mode 100644 index 0c7de2bb6..000000000 --- a/gnuradio-pkg_chk.conf +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright 2007, 2008 Free Software Foundation - -# pkg_chk -a -k -C gnuradio-pkg_chk.conf -# pkg_chk -a -k -C gnuradio-pkg_chk.conf -D doc - -# This is a control file for pkg_chk, an automatic package manager for -# pkgsrc. After installing pkgsrc, install pkgtools/pkg_chk, use the -# commented-out first line above. The second addtionally includes -# packages needed for documentation. Note that gnuradio is in pkgsrc; -# this file is useful for those who want dependencies from pkgsrc but -# want to build GNU Radio itself from svn. This file should perhaps -# grow conventions for building minimal vs. expanded dependencies. - -# See http://www.netbsd.org/Documentation/software/packages.html for -# more information about pkgsrc. - -# To build against pkgsrc, run configure as -# LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib" CPPFLAGS="-I/usr/pkg/include" ./configure - -# This file is intended to be useful even to those not using pkgsrc by -# crisply listing the dependencies required for GNU Radio. - -# This file may be incorrect; please feel free to correct or mail -# comments to gdt@ir.bbn.com or discuss-gnuradio@gnu.org. - -## Core - -devel/autoconf -devel/automake -devel/libtool-base -# gmake isn't actually required, but it's helpful to have to separate -# real build failures from unportable makefiles. -devel/gmake - -devel/pkg-config - -math/fftwf - -# python is forced by py-Numeric. pkgsrc now (200701) defaults to 2.4, -# which is fine. We don't include python explicitly since we'd have to -# specify a version. -math/py-Numeric -# numarray is not documented to be needed, but the pkgsrc packages depend on it. -# Include it until this confusion is resolved. -math/py-numarray - -# Smart pointers. -devel/boost-headers -# Apparently all of boost is not needed. -#meta-pkgs/boost - -devel/cppunit - -devel/swig - -lang/guile - -## audio -audio/jack -audio/portaudio-devel -devel/SDL - -## documentation - -devel/doxygen doc -textproc/xmlto doc - -## GUI - -x11/py-wxWidgets diff --git a/gr-atsc/.gitignore b/gr-atsc/.gitignore deleted file mode 100644 index 16905156d..000000000 --- a/gr-atsc/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -/Makefile -/Makefile.in -/aclocal.m4 -/configure -/config.h.in -/stamp-h.in -/libtool -/config.log -/config.h -/config.cache -/config.status -/missing -/stamp-h -/stamp-h1 -/.deps -/.libs -/*.la -/*.lo -/autom4te.cache -/*.cache -/missing -/make.log -/gnuradio-atsc.pc diff --git a/gr-atsc/CMakeLists.txt b/gr-atsc/CMakeLists.txt index 670ff7e40..26f99a157 100644 --- a/gr-atsc/CMakeLists.txt +++ b/gr-atsc/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-atsc/Makefile.am b/gr-atsc/Makefile.am deleted file mode 100644 index ffb37f7ec..000000000 --- a/gr-atsc/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright 2004,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 -DIST_SUBDIRS = src doc - -pkgconfigdir = $(libdir)/pkgconfig -dist_pkgconfig_DATA = gnuradio-atsc.pc diff --git a/gr-atsc/README b/gr-atsc/README index c6837aebb..aa73910bd 100644 --- a/gr-atsc/README +++ b/gr-atsc/README @@ -1,25 +1,25 @@ # # Copyright 2006 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# -This module contains the GNU Radio 2.x code for the +This module contains the GNU Radio 2.x code for the ATSC (HDTV) transmitter and receiver. See http://www.atsc.org for specifications. The most relevant ones diff --git a/gr-atsc/README.signal_flow b/gr-atsc/README.signal_flow index 879cb2c42..eee83a484 100644 --- a/gr-atsc/README.signal_flow +++ b/gr-atsc/README.signal_flow @@ -12,7 +12,7 @@ GrAtscRSEncoder atsc_mpeg_packet_no_sync atsc_mpeg_packet_rs_encode GrAtscInterleaver atsc_mpeg_packet_rs_encoded atsc_mpeg_packet_rs_encoded convolutional interleaver GrAtscTrellisEncoder atsc_mpeg_packet_rs_encoded atsc_data_segment trellis encoder GrAtscFieldSyncMux atsc_data_segment atsc_data_segment add in field syncs -GrAtscSymbolMapper atsc_data_segment float map [0,7] to +/- {1,3,5,7} and add pilot +GrAtscSymbolMapper atsc_data_segment float map [0,7] to +/- {1,3,5,7} and add pilot GrWeaverModHead float float,float front half of Weaver VSB modulator GrFIRfilterFFF (2x) float float low pass root raised cosine (matched filter) GrWeaverModTail float,float short back half of Weaver VSB modulator @@ -22,7 +22,7 @@ VrFileSink short "16-bit passband data" ATSC Receiver ============= -module input output notes +module input output notes -------------------- ---------------- ------------------- ------- VrFileSource "16-bit passband data" short GrConvertSF short float convert short to float @@ -38,4 +38,4 @@ GrAtscViterbiDecoder atsc_soft_data_segment atsc_mpeg_packet_rs_encod GrAtscDeinterleaver atsc_mpeg_packet_rs_encoded atsc_mpeg_packet_rs_encoded convolutional de-interleaver (52 seg delay) GrAtscRSDecoder atsc_mpeg_packet_rs_encoded atsc_mpeg_packet_no_sync Reed-Solomon decoder GrAtscDerandomizer atsc_mpeg_packet_no_sync atsc_mpeg_packet de-whiten with LFSR -VrFileSink atsc_mpeg_packet "MPEG transport stream" +VrFileSink atsc_mpeg_packet "MPEG transport stream" diff --git a/gr-atsc/doc/.gitignore b/gr-atsc/doc/.gitignore deleted file mode 100644 index bb3f27777..000000000 --- a/gr-atsc/doc/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo -/howto.cc -/howto.py diff --git a/gr-atsc/doc/Makefile.am b/gr-atsc/doc/Makefile.am deleted file mode 100644 index e69de29bb..000000000 --- a/gr-atsc/doc/Makefile.am +++ /dev/null diff --git a/gr-atsc/src/.gitignore b/gr-atsc/src/.gitignore deleted file mode 100644 index bb3f27777..000000000 --- a/gr-atsc/src/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo -/howto.cc -/howto.py diff --git a/gr-atsc/src/Makefile.am b/gr-atsc/src/Makefile.am deleted file mode 100644 index 78e03f580..000000000 --- a/gr-atsc/src/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright 2004 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -SUBDIRS = lib -if PYTHON -SUBDIRS += python -endif - diff --git a/gr-atsc/src/lib/.gitignore b/gr-atsc/src/lib/.gitignore deleted file mode 100644 index 7cd5d520b..000000000 --- a/gr-atsc/src/lib/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo -/atsc.cc -/atsc.py -/atsci_viterbi_gen -/atsci_viterbi_mux.cc -/test_atsci -/*.pyc -/gnuradio -/guile -/python diff --git a/gr-atsc/src/lib/GrAtscBitTimingLoop.cc b/gr-atsc/src/lib/GrAtscBitTimingLoop.cc index 97b62cb93..8053736ee 100644 --- a/gr-atsc/src/lib/GrAtscBitTimingLoop.cc +++ b/gr-atsc/src/lib/GrAtscBitTimingLoop.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -46,7 +46,7 @@ GrAtscBitTimingLoop::GrAtscBitTimingLoop () { d_timing_rate = DEFAULT_TIMING_RATE; loop.set_taps (DEFAULT_LOOP_TAP); - + history = 1500; // spare input samples in case we need them. #ifdef _BT_DIAG_OUTPUT_ @@ -55,7 +55,7 @@ GrAtscBitTimingLoop::GrAtscBitTimingLoop () perror ("loop.out"); exit (1); } - + fp_ps = fopen ("ps.out", "w"); if (fp_ps == 0){ perror ("ps.out"); @@ -79,13 +79,13 @@ GrAtscBitTimingLoop::forecast(VrSampleRange output, inputs[i].size=output.size*decimation + history-1; } return 0; -} +} inline double GrAtscBitTimingLoop::filter_error (double e) { static const double limit = 50 * FPLL_BTLOOP_COUPLING_CONST; - + // first limit if (e > limit) @@ -96,7 +96,7 @@ GrAtscBitTimingLoop::filter_error (double e) return loop.filter (e); } -int +int GrAtscBitTimingLoop::work (VrSampleRange output, void *ao[], VrSampleRange inputs[], void *ai[]) { @@ -107,8 +107,8 @@ GrAtscBitTimingLoop::work (VrSampleRange output, void *ao[], // This is required because of our slightly variable decimation factor sync (output.index); - - // We are tasked with producing output.size output samples. + + // We are tasked with producing output.size output samples. // We will consume approximately 2 * output.size input samples. @@ -158,7 +158,7 @@ GrAtscBitTimingLoop::work (VrSampleRange output, void *ao[], if (!debug_no_update){ mu += filtered_timing_error * d_timing_rate; } - + #ifdef _BT_DIAG_OUTPUT_ float iodata[8]; iodata[0] = left; diff --git a/gr-atsc/src/lib/GrAtscBitTimingLoop.h b/gr-atsc/src/lib/GrAtscBitTimingLoop.h index 9fcffcffe..fa64f4d37 100644 --- a/gr-atsc/src/lib/GrAtscBitTimingLoop.h +++ b/gr-atsc/src/lib/GrAtscBitTimingLoop.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -80,7 +80,7 @@ class GrAtscBitTimingLoop : public VrDecimatingSigProc<float,float> { double d_loop_filter_tap; double d_timing_rate; - + #ifdef _BT_DIAG_OUTPUT_ FILE *fp_loop; FILE *fp_ps; diff --git a/gr-atsc/src/lib/GrAtscBitTimingLoop2.cc b/gr-atsc/src/lib/GrAtscBitTimingLoop2.cc index 3f9cf106e..c741a5bb2 100644 --- a/gr-atsc/src/lib/GrAtscBitTimingLoop2.cc +++ b/gr-atsc/src/lib/GrAtscBitTimingLoop2.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -45,7 +45,7 @@ GrAtscBitTimingLoop2::GrAtscBitTimingLoop2 () perror ("loop.out"); exit (1); } - + fp_ps = fopen ("ps.out", "w"); if (fp_ps == 0){ perror ("ps.out"); @@ -70,7 +70,7 @@ GrAtscBitTimingLoop2::forecast(VrSampleRange output, inputs[i].size=output.size*decimation + history-1; } return 0; -} +} inline float GrAtscBitTimingLoop2::filter_error (float e) @@ -78,7 +78,7 @@ GrAtscBitTimingLoop2::filter_error (float e) return e; // identity function } -int +int GrAtscBitTimingLoop2::work (VrSampleRange output, void *ao[], VrSampleRange inputs[], void *ai[]) { @@ -89,8 +89,8 @@ GrAtscBitTimingLoop2::work (VrSampleRange output, void *ao[], // This is required because of our slightly variable decimation factor sync (output.index); - - // We are tasked with producing output.size output samples. + + // We are tasked with producing output.size output samples. // We will consume approximately 2 * output.size input samples. @@ -117,7 +117,7 @@ GrAtscBitTimingLoop2::work (VrSampleRange output, void *ao[], for (k = 0; k < output.size; k++){ left = right; - + iType middle_raw = produce_sample (in, ii); iType middle_dc = dc.filter (middle_raw); middle = middle_raw - middle_dc; @@ -127,7 +127,7 @@ GrAtscBitTimingLoop2::work (VrSampleRange output, void *ao[], right = right_raw - right_dc; if (use_right_p) // produce our output - out[k] = right; + out[k] = right; else out[k] = middle; } diff --git a/gr-atsc/src/lib/GrAtscBitTimingLoop2.h b/gr-atsc/src/lib/GrAtscBitTimingLoop2.h index c03e64a0c..4f36c902e 100644 --- a/gr-atsc/src/lib/GrAtscBitTimingLoop2.h +++ b/gr-atsc/src/lib/GrAtscBitTimingLoop2.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/GrAtscBitTimingLoop3.cc b/gr-atsc/src/lib/GrAtscBitTimingLoop3.cc index 3ee2880e6..f9c1eb02e 100644 --- a/gr-atsc/src/lib/GrAtscBitTimingLoop3.cc +++ b/gr-atsc/src/lib/GrAtscBitTimingLoop3.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -37,7 +37,7 @@ GrAtscBitTimingLoop3::GrAtscBitTimingLoop3 (double ratio_of_rx_clock_to_symbol_f { assert (ratio_of_rx_clock_to_symbol_freq >= 1.8); // sanity check - + history = 1500; // spare input samples in case we need them. } @@ -51,17 +51,17 @@ int GrAtscBitTimingLoop3::forecast(VrSampleRange output, VrSampleRange inputs[]) { assert (numberInputs == 1); - + /* dec:1 ratio with history */ inputs[0].index = d_next_input; inputs[0].size = ((unsigned long) (output.size * d_rx_clock_to_symbol_freq) + history - 1); return 0; -} +} -int +int GrAtscBitTimingLoop3::work (VrSampleRange output, void *ao[], VrSampleRange inputs[], void *ai[]) { @@ -73,7 +73,7 @@ GrAtscBitTimingLoop3::work (VrSampleRange output, void *ao[], // This is required because of our slightly variable decimation factor sync (output.index); - // We are tasked with producing output.size output samples. + // We are tasked with producing output.size output samples. // We will consume approximately 2 * output.size input samples. int si = 0; // source index @@ -93,7 +93,7 @@ GrAtscBitTimingLoop3::work (VrSampleRange output, void *ao[], fprintf (stderr, "GrAtscBitTimingLoop3: ran short on data...\n"); break; } - + d_sssr.update (interp_sample, &seg_locked, &symbol_index, &timing_adjustment); out_sample[k] = interp_sample; tag.valid = seg_locked; diff --git a/gr-atsc/src/lib/GrAtscBitTimingLoop3.h b/gr-atsc/src/lib/GrAtscBitTimingLoop3.h index fd2ea03e5..7e019e49c 100644 --- a/gr-atsc/src/lib/GrAtscBitTimingLoop3.h +++ b/gr-atsc/src/lib/GrAtscBitTimingLoop3.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/GrAtscConvert2xTo20.cc b/gr-atsc/src/lib/GrAtscConvert2xTo20.cc index ec74503e8..1f540464d 100644 --- a/gr-atsc/src/lib/GrAtscConvert2xTo20.cc +++ b/gr-atsc/src/lib/GrAtscConvert2xTo20.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -51,7 +51,7 @@ GrAtscConvert2xTo20::pre_initialize () fprintf (stderr, "GrAtscConvert2xTo20: argument to setSamplingFrequency = %g\n", getInputSamplingFrequencyN(0) / DEC_RATIO); - + int r; r = setSamplingFrequency (getInputSamplingFrequencyN (0) / DEC_RATIO); @@ -99,7 +99,7 @@ GrAtscConvert2xTo20::work (VrSampleRange output, void *ao[], int incr = (int) float_incr; si += incr; } - + d_next_input += si; d_frac_part = frac_part; return output.size; diff --git a/gr-atsc/src/lib/GrAtscConvert2xTo20.h b/gr-atsc/src/lib/GrAtscConvert2xTo20.h index eba6f715e..05b1023e5 100644 --- a/gr-atsc/src/lib/GrAtscConvert2xTo20.h +++ b/gr-atsc/src/lib/GrAtscConvert2xTo20.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -29,7 +29,7 @@ class GrAtscConvert2xTo20 : public VrDecimatingSigProc<float,float> { gr_mmse_fir_interpolator d_interp; double d_frac_part; VrSampleIndex d_next_input; - + public: GrAtscConvert2xTo20 (); ~GrAtscConvert2xTo20 (); diff --git a/gr-atsc/src/lib/GrAtscDataSegToSoftDataSeg.cc b/gr-atsc/src/lib/GrAtscDataSegToSoftDataSeg.cc index 417e108d4..09c3db4e0 100644 --- a/gr-atsc/src/lib/GrAtscDataSegToSoftDataSeg.cc +++ b/gr-atsc/src/lib/GrAtscDataSegToSoftDataSeg.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -49,7 +49,7 @@ GrAtscDataSegToSoftDataSeg::GrAtscDataSegToSoftDataSeg () // used by the superclass's forecast routine to get us the correct // range on our inputs. // We're one-to-one input-to-output so set it to 1. - history = 1; + history = 1; // any other init here. } @@ -65,7 +65,7 @@ GrAtscDataSegToSoftDataSeg::~GrAtscDataSegToSoftDataSeg () * use a single input and output stream. */ -int +int GrAtscDataSegToSoftDataSeg::work (VrSampleRange output, void *ao[], VrSampleRange inputs[], void *ai[]) { diff --git a/gr-atsc/src/lib/GrAtscDataSegToSoftDataSeg.h b/gr-atsc/src/lib/GrAtscDataSegToSoftDataSeg.h index 7579bedf1..207324d55 100644 --- a/gr-atsc/src/lib/GrAtscDataSegToSoftDataSeg.h +++ b/gr-atsc/src/lib/GrAtscDataSegToSoftDataSeg.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/GrAtscDeinterleaver.cc b/gr-atsc/src/lib/GrAtscDeinterleaver.cc index 357b9be38..fd67d7a20 100644 --- a/gr-atsc/src/lib/GrAtscDeinterleaver.cc +++ b/gr-atsc/src/lib/GrAtscDeinterleaver.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -37,7 +37,7 @@ GrAtscDeinterleaver::GrAtscDeinterleaver () // used by the superclass's forecast routine to get us the correct // range on our inputs. // We're one-to-one input-to-output so set it to 1. - history = 1; + history = 1; // any other init here. } @@ -53,7 +53,7 @@ GrAtscDeinterleaver::~GrAtscDeinterleaver () * use a single input and output stream. */ -int +int GrAtscDeinterleaver::work (VrSampleRange output, void *ao[], VrSampleRange inputs[], void *ai[]) { diff --git a/gr-atsc/src/lib/GrAtscDeinterleaver.h b/gr-atsc/src/lib/GrAtscDeinterleaver.h index c10e17dfb..f0f9830b6 100644 --- a/gr-atsc/src/lib/GrAtscDeinterleaver.h +++ b/gr-atsc/src/lib/GrAtscDeinterleaver.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/GrAtscDerandomizer.cc b/gr-atsc/src/lib/GrAtscDerandomizer.cc index 4935483c7..db3583a62 100644 --- a/gr-atsc/src/lib/GrAtscDerandomizer.cc +++ b/gr-atsc/src/lib/GrAtscDerandomizer.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -37,7 +37,7 @@ GrAtscDerandomizer::GrAtscDerandomizer () // used by the superclass's forecast routine to get us the correct // range on our inputs. // We're one-to-one input-to-output so set it to 1. - history = 1; + history = 1; // any other init here. } @@ -53,7 +53,7 @@ GrAtscDerandomizer::~GrAtscDerandomizer () * use a single input and output stream. */ -int +int GrAtscDerandomizer::work (VrSampleRange output, void *ao[], VrSampleRange inputs[], void *ai[]) { @@ -85,7 +85,7 @@ GrAtscDerandomizer::work (VrSampleRange output, void *ao[], if (in[i].pli.first_regular_seg_p ()) rand.reset (); - + rand.derandomize (out[i], in[i]); // take a look at the transport error bit in the pipeline info @@ -102,5 +102,5 @@ GrAtscDerandomizer::work (VrSampleRange output, void *ao[], // Note that for all intents and purposes, it is an error to // produce less than you are asked for. - return output.size; + return output.size; } diff --git a/gr-atsc/src/lib/GrAtscDerandomizer.h b/gr-atsc/src/lib/GrAtscDerandomizer.h index d1de3a54a..bd0d70d94 100644 --- a/gr-atsc/src/lib/GrAtscDerandomizer.h +++ b/gr-atsc/src/lib/GrAtscDerandomizer.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/GrAtscEqualizer.cc b/gr-atsc/src/lib/GrAtscEqualizer.cc index b0a9d9987..27f64c2b7 100644 --- a/gr-atsc/src/lib/GrAtscEqualizer.cc +++ b/gr-atsc/src/lib/GrAtscEqualizer.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -28,7 +28,7 @@ typedef float dataType; typedef atsc::syminfo tagType; -static const int NUMBER_OF_OUTPUTS = 2; // # of output streams +static const int NUMBER_OF_OUTPUTS = 2; // # of output streams GrAtscEqualizer::GrAtscEqualizer (atsci_equalizer *equalizer) @@ -36,7 +36,7 @@ GrAtscEqualizer::GrAtscEqualizer (atsci_equalizer *equalizer) { // due to limitation of runtime, all inputs must be the same size assert (sizeof (dataType) == sizeof (tagType)); - + d_equalizer = equalizer; // 1 + number of extra input elements at which we look. This is @@ -63,19 +63,19 @@ GrAtscEqualizer::~GrAtscEqualizer () int GrAtscEqualizer::forecast (VrSampleRange output, - VrSampleRange inputs[]) + VrSampleRange inputs[]) { assert (numberInputs == 2); - + int ntaps = d_equalizer->ntaps (); int npretaps = d_equalizer->npretaps (); - + assert (ntaps >= 1); assert (npretaps >= 0 && npretaps < ntaps); - + inputs[0].index = output.index; // the equalizer data inputs[0].size = output.size + ntaps - 1; // history on data - + // FIXME if there's a problem, it's probably on the next line... int offset = ntaps - npretaps - 1; @@ -85,19 +85,19 @@ GrAtscEqualizer::forecast (VrSampleRange output, inputs[1].size = output.size; // N.B., no extra history on tags return 0; -} +} /* * This is the real work horse. We consume 2 input streams * and produce 2 output streams. */ -int +int GrAtscEqualizer::work (VrSampleRange output, void *ao[], VrSampleRange inputs[], void *ai[]) { // assert (numberInputs == 2); - + // If we have state that persists across invocations (e.g., we have // instance variables that we modify), we must use the sync method // to indicate to the scheduler that our output must be computed in diff --git a/gr-atsc/src/lib/GrAtscEqualizer.h b/gr-atsc/src/lib/GrAtscEqualizer.h index b67e98400..ff944deb7 100644 --- a/gr-atsc/src/lib/GrAtscEqualizer.h +++ b/gr-atsc/src/lib/GrAtscEqualizer.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/GrAtscFPLL.cc b/gr-atsc/src/lib/GrAtscFPLL.cc index ce5b183e6..df7d6b8c0 100644 --- a/gr-atsc/src/lib/GrAtscFPLL.cc +++ b/gr-atsc/src/lib/GrAtscFPLL.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -59,7 +59,7 @@ GrAtscFPLL::initialize () float Fs = getInputSamplingFrequencyN (0); float alpha = 1 - exp(-1.0 / Fs / 5e-6); - + afci.set_taps (alpha); afcq.set_taps (alpha); @@ -67,7 +67,7 @@ GrAtscFPLL::initialize () nco.set_phase (initial_phase); } -int +int GrAtscFPLL::work (VrSampleRange output, void *ao[], VrSampleRange inputs[], void *ai[]) { @@ -109,7 +109,7 @@ GrAtscFPLL::work (VrSampleRange output, void *ao[], // static const float alpha = 0.037; // Max value // static const float alpha = 0.005; // takes about 5k samples to pull in, stddev = 323 // static const float alpha = 0.002; // takes about 15k samples to pull in, stddev = 69 - // or about 120k samples on noisy data, + // or about 120k samples on noisy data, static const float alpha = 0.001; static const float beta = alpha * alpha / 4; diff --git a/gr-atsc/src/lib/GrAtscFPLL.h b/gr-atsc/src/lib/GrAtscFPLL.h index f89411a50..597a4a891 100644 --- a/gr-atsc/src/lib/GrAtscFPLL.h +++ b/gr-atsc/src/lib/GrAtscFPLL.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -37,7 +37,7 @@ * * Used as follows: * float float - * A/D --> GrFIRfilterFFF ----> GrAtscFPLL ----> + * A/D --> GrFIRfilterFFF ----> GrAtscFPLL ----> * * We use GrFIRfilterFFF to bandpass filter the signal of interest. * @@ -49,7 +49,7 @@ class GrAtscFPLL : public VrSigProc { typedef float iType; typedef float oType; - + public: GrAtscFPLL (double a_initial_freq); @@ -77,7 +77,7 @@ class GrAtscFPLL : public VrSigProc { gr_agc agc; // automatic gain control gr_single_pole_iir<float,float,float> afci; gr_single_pole_iir<float,float,float> afcq; - + #ifdef _FPLL_DIAG_OUTPUT_ FILE *fp; #endif diff --git a/gr-atsc/src/lib/GrAtscFieldSyncChecker.cc b/gr-atsc/src/lib/GrAtscFieldSyncChecker.cc index c52b18442..d2c82d6d4 100644 --- a/gr-atsc/src/lib/GrAtscFieldSyncChecker.cc +++ b/gr-atsc/src/lib/GrAtscFieldSyncChecker.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -31,7 +31,7 @@ typedef atsc::syminfo iTagType; typedef float oDataType; typedef atsc::syminfo oTagType; -static const int NUMBER_OF_OUTPUTS = 2; // # of output streams +static const int NUMBER_OF_OUTPUTS = 2; // # of output streams GrAtscFieldSyncChecker::GrAtscFieldSyncChecker () @@ -45,7 +45,7 @@ GrAtscFieldSyncChecker::GrAtscFieldSyncChecker () // used by the superclass's forecast routine to get us the correct // range on our inputs. // We're one-to-one input-to-output so set it to 1. - history = 1; + history = 1; d_fsc = create_atsci_fs_checker (); } @@ -63,7 +63,7 @@ GrAtscFieldSyncChecker::~GrAtscFieldSyncChecker () * use a single input and output stream. */ -int +int GrAtscFieldSyncChecker::work (VrSampleRange output, void *ao[], VrSampleRange inputs[], void *ai[]) { diff --git a/gr-atsc/src/lib/GrAtscFieldSyncChecker.h b/gr-atsc/src/lib/GrAtscFieldSyncChecker.h index e2f48281b..28458a19b 100644 --- a/gr-atsc/src/lib/GrAtscFieldSyncChecker.h +++ b/gr-atsc/src/lib/GrAtscFieldSyncChecker.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/GrAtscFieldSyncCorrelator.cc b/gr-atsc/src/lib/GrAtscFieldSyncCorrelator.cc index 4cbf17103..42f93aa8c 100644 --- a/gr-atsc/src/lib/GrAtscFieldSyncCorrelator.cc +++ b/gr-atsc/src/lib/GrAtscFieldSyncCorrelator.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -29,7 +29,7 @@ typedef float iType; typedef float oType; -static const int NUMBER_OF_OUTPUTS = 2; // # of output streams +static const int NUMBER_OF_OUTPUTS = 2; // # of output streams GrAtscFieldSyncCorrelator::GrAtscFieldSyncCorrelator () @@ -39,7 +39,7 @@ GrAtscFieldSyncCorrelator::GrAtscFieldSyncCorrelator () // used by the superclass's forecast routine to get us the correct // range on our inputs. // We're one-to-one input-to-output so set it to 1. - history = 1; + history = 1; d_fsc = create_atsci_fs_correlator (); } @@ -57,7 +57,7 @@ GrAtscFieldSyncCorrelator::~GrAtscFieldSyncCorrelator () * use a single input and output stream. */ -int +int GrAtscFieldSyncCorrelator::work (VrSampleRange output, void *ao[], VrSampleRange inputs[], void *ai[]) { diff --git a/gr-atsc/src/lib/GrAtscFieldSyncCorrelator.h b/gr-atsc/src/lib/GrAtscFieldSyncCorrelator.h index 9f5c43563..1a16048b2 100644 --- a/gr-atsc/src/lib/GrAtscFieldSyncCorrelator.h +++ b/gr-atsc/src/lib/GrAtscFieldSyncCorrelator.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/GrAtscFieldSyncDemux.cc b/gr-atsc/src/lib/GrAtscFieldSyncDemux.cc index 239499325..e311acc8a 100644 --- a/gr-atsc/src/lib/GrAtscFieldSyncDemux.cc +++ b/gr-atsc/src/lib/GrAtscFieldSyncDemux.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -50,13 +50,13 @@ GrAtscFieldSyncDemux::forecast (VrSampleRange output, /* dec:1 ratio with history */ assert (numberInputs == 2); - + for (unsigned int i = 0; i < numberInputs; i++) { inputs[i].index = d_next_input; inputs[i].size = output.size * decimation + history - 1; } return 0; -} +} inline static bool tag_is_seg_sync_or_field_sync (atsc::syminfo tag) @@ -103,12 +103,12 @@ GrAtscFieldSyncDemux::work (VrSampleRange output, void *ao[], str = "FIELD-2"; else str = "SEGMENT"; - + cerr << "GrAtscFieldSyncDemux: synced (" << str << ") at " << inputs[0].index + ii << " [delta = " << inputs[0].index + ii - d_lost_index << "]\n"; - + d_next_input += ii; // update for forecast return 0; // no work completed so far } @@ -117,7 +117,7 @@ GrAtscFieldSyncDemux::work (VrSampleRange output, void *ao[], d_next_input += ii; // update for forecast return 0; // no work completed so far } - + // We are in sync. Produce output... unsigned int k = 0; // output index @@ -135,7 +135,7 @@ GrAtscFieldSyncDemux::work (VrSampleRange output, void *ao[], // lost sync... // cerr << "GrAtscFieldSyncDemux: lost sync at " // << inputs[0].index + ii << endl; - + d_next_input += ii; // update for forecast return k; // return amount of work completed so far } @@ -146,7 +146,7 @@ GrAtscFieldSyncDemux::work (VrSampleRange output, void *ao[], ii += ATSC_DATA_SEGMENT_LENGTH; // skip over field sync continue; } - + if (atsc::tag_is_start_field_sync_2 (input_tags[ii])){ d_in_field2 = true; d_segment_number = 0; diff --git a/gr-atsc/src/lib/GrAtscFieldSyncDemux.h b/gr-atsc/src/lib/GrAtscFieldSyncDemux.h index 5796aa233..f5bab9b87 100644 --- a/gr-atsc/src/lib/GrAtscFieldSyncDemux.h +++ b/gr-atsc/src/lib/GrAtscFieldSyncDemux.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/GrAtscFieldSyncMux.cc b/gr-atsc/src/lib/GrAtscFieldSyncMux.cc index 8df36ba4b..7ebab72ad 100644 --- a/gr-atsc/src/lib/GrAtscFieldSyncMux.cc +++ b/gr-atsc/src/lib/GrAtscFieldSyncMux.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -54,7 +54,7 @@ init_field_sync_common (unsigned char *p, int mask, for (int j = 0; j < 63; j++) // PN63, toggled on field 2 p[i++] = bin_map[atsc_pn63[j] ^ mask]; - + for (int j = 0; j < 63; j++) // PN63 p[i++] = bin_map[atsc_pn63[j]]; @@ -124,7 +124,7 @@ save_last_symbols (unsigned char saved_symbols[N_SAVED_SYMBOLS], } -inline static bool +inline static bool last_regular_seg_p (const plinfo &pli) { return pli.regular_seg_p () && (pli.segno () == ATSC_DSEGS_PER_FIELD - 1); @@ -138,7 +138,7 @@ GrAtscFieldSyncMux::GrAtscFieldSyncMux () // 1 + number of extra input elements at which we look. This is // used by the superclass's forecast routine to get us the correct // range on our inputs. - history = 1; + history = 1; // any other init here. } @@ -160,7 +160,7 @@ GrAtscFieldSyncMux::pre_initialize () * exactly 1:1 with our input. */ -int +int GrAtscFieldSyncMux::forecast (VrSampleRange output, VrSampleRange inputs[]) { for(unsigned int i = 0; i < numberInputs; i++) { @@ -175,7 +175,7 @@ GrAtscFieldSyncMux::forecast (VrSampleRange output, VrSampleRange inputs[]) * multiple streams of input and output, but we almost always * use a single input and output stream. */ -int +int GrAtscFieldSyncMux::work (VrSampleRange output, void *ao[], VrSampleRange inputs[], void *ai[]) { @@ -204,7 +204,7 @@ GrAtscFieldSyncMux::work (VrSampleRange output, void *ao[], for (unsigned int outdex = 0; outdex < output.size; outdex++){ assert (in[index].pli.regular_seg_p ()); - + if (!in[index].pli.first_regular_seg_p ()){ out[outdex] = in[index]; // just copy in to out @@ -242,5 +242,5 @@ GrAtscFieldSyncMux::work (VrSampleRange output, void *ao[], // Note that for all intents and purposes, it is an error to // produce less than you are asked for. - return output.size; + return output.size; } diff --git a/gr-atsc/src/lib/GrAtscFieldSyncMux.h b/gr-atsc/src/lib/GrAtscFieldSyncMux.h index 66dd4494a..ae52b8e5c 100644 --- a/gr-atsc/src/lib/GrAtscFieldSyncMux.h +++ b/gr-atsc/src/lib/GrAtscFieldSyncMux.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -46,7 +46,7 @@ public: int forecast (VrSampleRange output, VrSampleRange inputs[]); void pre_initialize (); - + static const int N_SAVED_SYMBOLS = 12; protected: diff --git a/gr-atsc/src/lib/GrAtscInterleaver.cc b/gr-atsc/src/lib/GrAtscInterleaver.cc index cd50a8679..2c8f0c7e8 100644 --- a/gr-atsc/src/lib/GrAtscInterleaver.cc +++ b/gr-atsc/src/lib/GrAtscInterleaver.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -37,7 +37,7 @@ GrAtscInterleaver::GrAtscInterleaver () // used by the superclass's forecast routine to get us the correct // range on our inputs. // We're one-to-one input-to-output so set it to 1. - history = 1; + history = 1; // any other init here. } @@ -53,7 +53,7 @@ GrAtscInterleaver::~GrAtscInterleaver () * use a single input and output stream. */ -int +int GrAtscInterleaver::work (VrSampleRange output, void *ao[], VrSampleRange inputs[], void *ai[]) { @@ -97,5 +97,5 @@ GrAtscInterleaver::work (VrSampleRange output, void *ao[], // Note that for all intents and purposes, it is an error to // produce less than you are asked for. - return output.size; + return output.size; } diff --git a/gr-atsc/src/lib/GrAtscInterleaver.h b/gr-atsc/src/lib/GrAtscInterleaver.h index 07066133a..76be38a21 100644 --- a/gr-atsc/src/lib/GrAtscInterleaver.h +++ b/gr-atsc/src/lib/GrAtscInterleaver.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/GrAtscRSDecoder.cc b/gr-atsc/src/lib/GrAtscRSDecoder.cc index c9092a298..fd0122ad2 100644 --- a/gr-atsc/src/lib/GrAtscRSDecoder.cc +++ b/gr-atsc/src/lib/GrAtscRSDecoder.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -37,7 +37,7 @@ GrAtscRSDecoder::GrAtscRSDecoder () // used by the superclass's forecast routine to get us the correct // range on our inputs. // We're one-to-one input-to-output so set it to 1. - history = 1; + history = 1; // any other init here. } @@ -53,7 +53,7 @@ GrAtscRSDecoder::~GrAtscRSDecoder () * use a single input and output stream. */ -int +int GrAtscRSDecoder::work (VrSampleRange output, void *ao[], VrSampleRange inputs[], void *ai[]) { @@ -77,5 +77,5 @@ GrAtscRSDecoder::work (VrSampleRange output, void *ao[], // Note that for all intents and purposes, it is an error to // produce less than you are asked for. - return output.size; + return output.size; } diff --git a/gr-atsc/src/lib/GrAtscRSDecoder.h b/gr-atsc/src/lib/GrAtscRSDecoder.h index 4586a20b2..d64102d10 100644 --- a/gr-atsc/src/lib/GrAtscRSDecoder.h +++ b/gr-atsc/src/lib/GrAtscRSDecoder.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/GrAtscRSEncoder.cc b/gr-atsc/src/lib/GrAtscRSEncoder.cc index 2954779a1..249678427 100644 --- a/gr-atsc/src/lib/GrAtscRSEncoder.cc +++ b/gr-atsc/src/lib/GrAtscRSEncoder.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -37,7 +37,7 @@ GrAtscRSEncoder::GrAtscRSEncoder () // used by the superclass's forecast routine to get us the correct // range on our inputs. // We're one-to-one input-to-output so set it to 1. - history = 1; + history = 1; // any other init here. } @@ -53,7 +53,7 @@ GrAtscRSEncoder::~GrAtscRSEncoder () * use a single input and output stream. */ -int +int GrAtscRSEncoder::work (VrSampleRange output, void *ao[], VrSampleRange inputs[], void *ai[]) { @@ -80,5 +80,5 @@ GrAtscRSEncoder::work (VrSampleRange output, void *ao[], // Note that for all intents and purposes, it is an error to // produce less than you are asked for. - return output.size; + return output.size; } diff --git a/gr-atsc/src/lib/GrAtscRSEncoder.h b/gr-atsc/src/lib/GrAtscRSEncoder.h index 3f41d7797..29921d8b3 100644 --- a/gr-atsc/src/lib/GrAtscRSEncoder.h +++ b/gr-atsc/src/lib/GrAtscRSEncoder.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/GrAtscRandomizer.cc b/gr-atsc/src/lib/GrAtscRandomizer.cc index 3217b9b87..c5172699c 100644 --- a/gr-atsc/src/lib/GrAtscRandomizer.cc +++ b/gr-atsc/src/lib/GrAtscRandomizer.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -38,7 +38,7 @@ GrAtscRandomizer::GrAtscRandomizer () // used by the superclass's forecast routine to get us the correct // range on our inputs. // We're one-to-one input-to-output so set it to 1. - history = 1; + history = 1; // any other init here. } @@ -54,7 +54,7 @@ GrAtscRandomizer::~GrAtscRandomizer () * use a single input and output stream. */ -int +int GrAtscRandomizer::work (VrSampleRange output, void *ao[], VrSampleRange inputs[], void *ai[]) { @@ -106,5 +106,5 @@ GrAtscRandomizer::work (VrSampleRange output, void *ao[], // Note that for all intents and purposes, it is an error to // produce less than you are asked for. - return output.size; + return output.size; } diff --git a/gr-atsc/src/lib/GrAtscRandomizer.h b/gr-atsc/src/lib/GrAtscRandomizer.h index 7a1908d01..f56f7178e 100644 --- a/gr-atsc/src/lib/GrAtscRandomizer.h +++ b/gr-atsc/src/lib/GrAtscRandomizer.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/GrAtscSegSymSync.cc b/gr-atsc/src/lib/GrAtscSegSymSync.cc index 721f36c10..2d9419c25 100644 --- a/gr-atsc/src/lib/GrAtscSegSymSync.cc +++ b/gr-atsc/src/lib/GrAtscSegSymSync.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/GrAtscSegSymSync.h b/gr-atsc/src/lib/GrAtscSegSymSync.h index 0f01a8de3..750483f54 100644 --- a/gr-atsc/src/lib/GrAtscSegSymSync.h +++ b/gr-atsc/src/lib/GrAtscSegSymSync.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -48,7 +48,7 @@ public: GrAtscSegSymSync (); ~GrAtscSegSymSync (); - + /*! * \brief reset bit timing loop on channel change */ diff --git a/gr-atsc/src/lib/GrAtscSegSymSyncImpl.cc b/gr-atsc/src/lib/GrAtscSegSymSyncImpl.cc index a7925bf8f..8e2cfc208 100644 --- a/gr-atsc/src/lib/GrAtscSegSymSyncImpl.cc +++ b/gr-atsc/src/lib/GrAtscSegSymSyncImpl.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -33,7 +33,7 @@ GrAtscSegSymSyncImpl::GrAtscSegSymSyncImpl ( decimation = (int) rint (nominal_ratio_of_rx_clock_to_symbol_freq); history = 1500; // spare input samples in case we need them. - + d_sssr.reset (); d_interp.reset (); d_next_input = 0; diff --git a/gr-atsc/src/lib/GrAtscSegSymSyncImpl.h b/gr-atsc/src/lib/GrAtscSegSymSyncImpl.h index b1052cf5e..650dab569 100644 --- a/gr-atsc/src/lib/GrAtscSegSymSyncImpl.h +++ b/gr-atsc/src/lib/GrAtscSegSymSyncImpl.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -45,7 +45,7 @@ class GrAtscSegSymSyncImpl : public GrAtscSegSymSync { public: // the standard methods... - + GrAtscSegSymSyncImpl (double nominal_ratio_of_rx_clock_to_symbol_freq); virtual ~GrAtscSegSymSyncImpl (); @@ -58,7 +58,7 @@ public: VrSampleRange inputs[], void *i[]); void pre_initialize (); - + // reset on channel change diff --git a/gr-atsc/src/lib/GrAtscSegSymSyncImpl_export.h b/gr-atsc/src/lib/GrAtscSegSymSyncImpl_export.h index 569c0dd27..187f1a039 100644 --- a/gr-atsc/src/lib/GrAtscSegSymSyncImpl_export.h +++ b/gr-atsc/src/lib/GrAtscSegSymSyncImpl_export.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/GrAtscSymbolMapper.h b/gr-atsc/src/lib/GrAtscSymbolMapper.h index 41bea5917..a37703f1f 100644 --- a/gr-atsc/src/lib/GrAtscSymbolMapper.h +++ b/gr-atsc/src/lib/GrAtscSymbolMapper.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -58,15 +58,15 @@ protected: template<class oType> -int +int GrAtscSymbolMapper<oType>::work (VrSampleRange output, void *ao[], VrSampleRange inputs[], void *ai[]) { atsc_data_segment *in = ((atsc_data_segment **) ai)[0]; oType *out = ((oType **) ao)[0]; - + assert ((output.size % INTERP_FACTOR) == 0); - + static const float pilot_add = 1.25; static const float map[8] = { -7 + pilot_add, diff --git a/gr-atsc/src/lib/GrAtscTrellisEncoder.cc b/gr-atsc/src/lib/GrAtscTrellisEncoder.cc index 9def275d7..a0df3e9a7 100644 --- a/gr-atsc/src/lib/GrAtscTrellisEncoder.cc +++ b/gr-atsc/src/lib/GrAtscTrellisEncoder.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -43,7 +43,7 @@ GrAtscTrellisEncoder::GrAtscTrellisEncoder () // any other init here. - // Let the bottom end know we must produce output in multiples of 12 segments. + // Let the bottom end know we must produce output in multiples of 12 segments. setOutputSize (atsci_trellis_encoder::NCODERS); } @@ -58,7 +58,7 @@ GrAtscTrellisEncoder::~GrAtscTrellisEncoder () * use a single input and output stream. */ -int +int GrAtscTrellisEncoder::work (VrSampleRange output, void *ao[], VrSampleRange inputs[], void *ai[]) { @@ -88,7 +88,7 @@ GrAtscTrellisEncoder::work (VrSampleRange output, void *ao[], << " sum = " << output.index + output.size << " \t[in = " << in << "]" << endl; -#endif +#endif assert (output.size % atsci_trellis_encoder::NCODERS == 0); @@ -140,5 +140,5 @@ GrAtscTrellisEncoder::work (VrSampleRange output, void *ao[], // Note that for all intents and purposes, it is an error to // produce less than you are asked for. - return output.size; + return output.size; } diff --git a/gr-atsc/src/lib/GrAtscTrellisEncoder.h b/gr-atsc/src/lib/GrAtscTrellisEncoder.h index ebe8dafa9..e4de388ae 100644 --- a/gr-atsc/src/lib/GrAtscTrellisEncoder.h +++ b/gr-atsc/src/lib/GrAtscTrellisEncoder.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/GrAtscViterbiDecoder.cc b/gr-atsc/src/lib/GrAtscViterbiDecoder.cc index 98e0a81a5..c89b3556b 100644 --- a/gr-atsc/src/lib/GrAtscViterbiDecoder.cc +++ b/gr-atsc/src/lib/GrAtscViterbiDecoder.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -44,7 +44,7 @@ GrAtscViterbiDecoder::GrAtscViterbiDecoder () // any other init here. - // Let the bottom end know we must produce output in multiples of 12 segments. + // Let the bottom end know we must produce output in multiples of 12 segments. setOutputSize (atsci_viterbi_decoder::NCODERS); } @@ -59,7 +59,7 @@ GrAtscViterbiDecoder::~GrAtscViterbiDecoder () * use a single input and output stream. */ -int +int GrAtscViterbiDecoder::work (VrSampleRange output, void *ao[], VrSampleRange inputs[], void *ai[]) { @@ -126,10 +126,10 @@ GrAtscViterbiDecoder::work (VrSampleRange output, void *ao[], << " output.size = " << output.size << " sum = " << output.index + output.size << endl; #endif - + // Return the number of units we produced. // Note that for all intents and purposes, it is an error to // produce less than you are asked for. - return output.size; + return output.size; } diff --git a/gr-atsc/src/lib/GrAtscViterbiDecoder.h b/gr-atsc/src/lib/GrAtscViterbiDecoder.h index 4bc93e88a..1b3bdd84a 100644 --- a/gr-atsc/src/lib/GrAtscViterbiDecoder.h +++ b/gr-atsc/src/lib/GrAtscViterbiDecoder.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/Makefile.am b/gr-atsc/src/lib/Makefile.am deleted file mode 100644 index 30f408c02..000000000 --- a/gr-atsc/src/lib/Makefile.am +++ /dev/null @@ -1,254 +0,0 @@ -# -# Copyright 2001,2004,2005,2006,2008,2009,2010 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 -include $(top_srcdir)/Makefile.swig - -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) \ - $(CPPUNIT_INCLUDES) $(WITH_INCLUDES) - -EXTRA_DIST += \ - atsci_viterbi_gen.cc \ - gen_encoder.py \ - qa_atsci_trellis_encoder_t1_input.dat \ - qa_atsci_trellis_encoder_t1_output.dat \ - qa_atsci_viterbi_decoder_t1_input.dat \ - qa_atsci_viterbi_decoder_t1_output.dat - - -TESTS = test_atsci - -lib_LTLIBRARIES = libgnuradio-atsc.la - -# FIXME -# atsci_exp2_lp.cc \ -# atsci_root_raised_cosine.cc \ -# atsci_root_raised_cosine_bandpass.cc \ -# atsci_vsbtx_lp.cc \ -# - -libgnuradio_atsc_la_SOURCES = \ - atsc_derandomizer.cc \ - atsc_randomizer.cc \ - atsc_rs_decoder.cc \ - atsc_rs_encoder.cc \ - atsc_interleaver.cc \ - atsc_deinterleaver.cc \ - atsc_trellis_encoder.cc \ - atsc_viterbi_decoder.cc \ - atsc_ds_to_softds.cc \ - atsc_field_sync_mux.cc \ - atsc_field_sync_demux.cc \ - atsc_equalizer.cc \ - atsc_fs_checker.cc \ - atsc_bit_timing_loop.cc \ - atsc_fpll.cc \ - atsc_depad.cc \ - atsc_pad.cc \ - atsci_basic_trellis_encoder.cc \ - atsci_data_interleaver.cc \ - atsci_equalizer.cc \ - atsci_equalizer_lms.cc \ - atsci_equalizer_lms2.cc \ - atsci_equalizer_nop.cc \ - atsci_fake_single_viterbi.cc \ - atsci_fs_checker.cc \ - atsci_fs_checker_naive.cc \ - atsci_fs_correlator.cc \ - atsci_fs_correlator_naive.cc \ - atsci_single_viterbi.cc \ - atsci_sssr.cc \ - atsci_pnXXX.cc \ - atsci_randomizer.cc \ - atsci_reed_solomon.cc \ - atsci_sliding_correlator.cc \ - atsci_trellis_encoder.cc \ - atsci_viterbi_decoder.cc \ - create_atsci_equalizer.cc \ - create_atsci_fs_checker.cc \ - create_atsci_fs_correlator.cc \ - plinfo.cc - - -BUILT_SOURCES += \ - atsci_viterbi_mux.cc - -libgnuradio_atsc_la_LIBADD = \ - $(GNURADIO_CORE_LA) - -libgnuradio_atsc_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) - -noinst_LTLIBRARIES = libgnuradio-atsc-qa.la - -libgnuradio_atsc_qa_la_SOURCES = \ - qa_atsci_basic_trellis_encoder.cc \ - qa_atsci_data_interleaver.cc \ - qa_atsci_equalizer_nop.cc \ - qa_atsci_fake_single_viterbi.cc \ - qa_atsci_fs_correlator.cc \ - qa_atsci_single_viterbi.cc \ - qa_atsci_randomizer.cc \ - qa_atsci_reed_solomon.cc \ - qa_atsci_sliding_correlator.cc \ - qa_atsci_trellis_encoder.cc \ - qa_atsci_viterbi_decoder.cc \ - qa_convolutional_interleaver.cc \ - qa_atsci.cc \ - qa_interleaver_fifo.cc - -libgnuradio_atsc_qa_la_LIBADD = \ - $(GNURADIO_CORE_LA) - -libgnuradio_atsc_qa_la_LDFLAGS = \ - $(NO_UNDEFINED) - - -# These headers get installed in ${prefix}/include/gnuradio -grinclude_HEADERS = \ - atsc_api.h \ - atsc_consts.h \ - atsc_derandomizer.h \ - atsc_randomizer.h \ - atsc_rs_decoder.h \ - atsc_rs_encoder.h \ - atsc_interleaver.h \ - atsc_deinterleaver.h \ - atsc_trellis_encoder.h \ - atsc_viterbi_decoder.h \ - atsc_ds_to_softds.h \ - atsc_field_sync_mux.h \ - atsc_field_sync_demux.h \ - atsc_equalizer.h \ - atsc_fs_checker.h \ - atsc_bit_timing_loop.h \ - atsc_fpll.h \ - atsc_depad.h \ - atsc_pad.h \ - atsc_types.h \ - atsci_basic_trellis_encoder.h \ - atsci_data_interleaver.h \ - atsci_diag_output.h \ - atsci_equalizer.h \ - atsci_equalizer_lms.h \ - atsci_equalizer_lms2.h \ - atsci_equalizer_nop.h \ - atsci_exp2_lp.h \ - atsci_fake_single_viterbi.h \ - atsci_fs_checker.h \ - atsci_fs_checker_naive.h \ - atsci_fs_correlator.h \ - atsci_fs_correlator_naive.h \ - atsci_pnXXX.h \ - atsci_randomizer.h \ - atsci_reed_solomon.h \ - atsci_root_raised_cosine.h \ - atsci_root_raised_cosine_bandpass.h \ - atsci_single_viterbi.h \ - atsci_slicer_agc.h \ - atsci_sliding_correlator.h \ - atsci_sssr.h \ - atsci_syminfo.h \ - atsci_sync_tag.h \ - atsci_trellis_encoder.h \ - atsci_viterbi_decoder.h \ - atsci_vsbtx_lp.h \ - convolutional_interleaver.h \ - create_atsci_equalizer.h \ - create_atsci_fs_checker.h \ - create_atsci_fs_correlator.h \ - fpll_btloop_coupling.h \ - interleaver_fifo.h - -noinst_HEADERS = \ - qa_atsci.h \ - qa_atsci_basic_trellis_encoder.h \ - qa_atsci_data_interleaver.h \ - qa_atsci_equalizer_nop.h \ - qa_atsci_fake_single_viterbi.h \ - qa_atsci_fs_correlator.h \ - qa_atsci_randomizer.h \ - qa_atsci_reed_solomon.h \ - qa_atsci_single_viterbi.h \ - qa_atsci_sliding_correlator.h \ - qa_atsci_trellis_encoder.h \ - qa_atsci_viterbi_decoder.h \ - qa_convolutional_interleaver.h \ - qa_interleaver_fifo.h - - -# programs we build but don't install -# FIXME add test_atsc -noinst_PROGRAMS = \ - test_atsci - -atsci_viterbi_gen$(EXEEXT): $(srcdir)/atsci_viterbi_gen.cc - $(CXX_FOR_BUILD) -O2 $(srcdir)/atsci_viterbi_gen.cc -o atsci_viterbi_gen$(EXEEXT) - -atsci_viterbi_mux.cc: atsci_viterbi_gen$(EXEEXT) - ./atsci_viterbi_gen$(EXEEXT) -o atsci_viterbi_mux.cc - -test_atsci_SOURCES = test_atsci.cc -test_atsci_LDADD = \ - libgnuradio-atsc-qa.la \ - libgnuradio-atsc.la \ - $(CPPUNIT_LIBS) - -# ------------------------------------------------------------------------ -# Cleanup -# ------------------------------------------------------------------------ - -CLEANFILES += atsci_viterbi_mux.cc atsci_viterbi_gen$(EXEEXT) - -# ------------------------------------------------------------------------ -# This is the swig-ish part of the Makefile. -# It builds the atsc modules which we'll load into python or guile -# ------------------------------------------------------------------------ - -TOP_SWIG_DOC_IFILES = \ - atsc_swig_doc.i - -TOP_SWIG_IFILES = \ - $(TOP_SWIG_DOC_IFILES) \ - atsc.i - -BUILT_SOURCES += \ - $(TOP_SWIG_DOC_IFILES) - -EXTRA_DIST += \ - $(TOP_SWIG_DOC_IFILES) - -$(TOP_SWIG_DOC_IFILES): - `echo "" > $@` - -# Install so that they end up available as: -# import gnuradio -# This ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio -atsc_pythondir_category = \ - gnuradio - -# additional libraries for linking with the SWIG-generated library -atsc_la_swig_libadd = \ - libgnuradio-atsc.la - -# additional SWIG files to be installed -atsc_swig_swiginclude_headers = \ - $(TOP_SWIG_DOC_IFILES) diff --git a/gr-atsc/src/lib/Makefile.swig.gen b/gr-atsc/src/lib/Makefile.swig.gen deleted file mode 100644 index 67f9c094a..000000000 --- a/gr-atsc/src/lib/Makefile.swig.gen +++ /dev/null @@ -1,145 +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 atsc.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/atsc -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/atsc -## -## 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. - -atsc_pythondir_category ?= gnuradio/atsc -atsc_pylibdir_category ?= $(atsc_pythondir_category) -atsc_pythondir = $(pythondir)/$(atsc_pythondir_category) -atsc_pylibdir = $(pyexecdir)/$(atsc_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -atsc_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/atsc -# FIXME: determince whether these should be installed with gnuradio. -atsc_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -atsc_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 > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -atsc_swiginclude_HEADERS = \ - atsc.i \ - $(atsc_swiginclude_headers) - -if PYTHON -atsc_pylib_LTLIBRARIES = \ - _atsc.la - -_atsc_la_SOURCES = \ - python/atsc.cc \ - $(atsc_la_swig_sources) - -atsc_python_PYTHON = \ - atsc.py \ - $(atsc_python) - -_atsc_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(atsc_la_swig_libadd) - -_atsc_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(atsc_la_swig_ldflags) - -_atsc_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(atsc_la_swig_cxxflags) - -python/atsc.cc: atsc.py -atsc.py: atsc.i - -# Include the python dependencies for this file --include python/atsc.d - -endif # end of if python - -if GUILE - -atsc_scmlib_LTLIBRARIES = \ - libguile-gnuradio-atsc.la -libguile_gnuradio_atsc_la_SOURCES = \ - guile/atsc.cc \ - $(atsc_la_swig_sources) -nobase_atsc_scm_DATA = \ - gnuradio/atsc.scm \ - gnuradio/atsc-primitive.scm -libguile_gnuradio_atsc_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(atsc_la_swig_libadd) -libguile_gnuradio_atsc_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(atsc_la_swig_ldflags) -libguile_gnuradio_atsc_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(atsc_la_swig_cxxflags) - -guile/atsc.cc: gnuradio/atsc.scm -gnuradio/atsc.scm: atsc.i -gnuradio/atsc-primitive.scm: gnuradio/atsc.scm - -# Include the guile dependencies for this file --include guile/atsc.d - -endif # end of GUILE - - diff --git a/gr-atsc/src/lib/atsc.i b/gr-atsc/src/lib/atsc.i index c26584cc2..6e5662ae6 100644 --- a/gr-atsc/src/lib/atsc.i +++ b/gr-atsc/src/lib/atsc.i @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-atsc/src/lib/atsc_bit_timing_loop.cc b/gr-atsc/src/lib/atsc_bit_timing_loop.cc index d87a2c3fd..7abd907cc 100644 --- a/gr-atsc/src/lib/atsc_bit_timing_loop.cc +++ b/gr-atsc/src/lib/atsc_bit_timing_loop.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, @@ -102,7 +102,7 @@ atsc_bit_timing_loop::work (int noutput_items, // ammount actually consumed d_si = 0; - + for (k = 0; k < noutput_items; k++){ if (!d_interp.update (in, input_size, &d_si, timing_adjustment, &interp_sample)){ fprintf (stderr, "GrAtscBitTimingLoop3: ran short on data...\n"); diff --git a/gr-atsc/src/lib/atsc_bit_timing_loop.h b/gr-atsc/src/lib/atsc_bit_timing_loop.h index 2adff26b8..8b352f7eb 100644 --- a/gr-atsc/src/lib/atsc_bit_timing_loop.h +++ b/gr-atsc/src/lib/atsc_bit_timing_loop.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gr-atsc/src/lib/atsc_consts.h b/gr-atsc/src/lib/atsc_consts.h index 160ad7633..bbe2ec69a 100644 --- a/gr-atsc/src/lib/atsc_consts.h +++ b/gr-atsc/src/lib/atsc_consts.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -28,7 +28,7 @@ static const double ATSC_DATA_SEGMENT_RATE = ATSC_SYMBOL_RATE / 832; // ~12.935 static const int ATSC_MPEG_DATA_LENGTH = 187; -static const int ATSC_MPEG_PKT_LENGTH = 188; // sync + data +static const int ATSC_MPEG_PKT_LENGTH = 188; // sync + data static const int ATSC_MPEG_RS_ENCODED_LENGTH = 207; static const int ATSC_DATA_SEGMENT_LENGTH = 832; // includes 4 sync symbols at beginning static const int ATSC_DSEGS_PER_FIELD = 312; // regular data segs / field diff --git a/gr-atsc/src/lib/atsc_deinterleaver.cc b/gr-atsc/src/lib/atsc_deinterleaver.cc index aee9cd58b..f251c7f4e 100644 --- a/gr-atsc/src/lib/atsc_deinterleaver.cc +++ b/gr-atsc/src/lib/atsc_deinterleaver.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, diff --git a/gr-atsc/src/lib/atsc_deinterleaver.h b/gr-atsc/src/lib/atsc_deinterleaver.h index 8cab62b62..e398dfcc7 100644 --- a/gr-atsc/src/lib/atsc_deinterleaver.h +++ b/gr-atsc/src/lib/atsc_deinterleaver.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gr-atsc/src/lib/atsc_depad.cc b/gr-atsc/src/lib/atsc_depad.cc index 5cf0c3de2..9792a4e6a 100644 --- a/gr-atsc/src/lib/atsc_depad.cc +++ b/gr-atsc/src/lib/atsc_depad.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2008,2010 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, diff --git a/gr-atsc/src/lib/atsc_depad.h b/gr-atsc/src/lib/atsc_depad.h index b514efe28..9d1a381bf 100644 --- a/gr-atsc/src/lib/atsc_depad.h +++ b/gr-atsc/src/lib/atsc_depad.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gr-atsc/src/lib/atsc_derandomizer.cc b/gr-atsc/src/lib/atsc_derandomizer.cc index 7dc4cf4c1..6642adb25 100644 --- a/gr-atsc/src/lib/atsc_derandomizer.cc +++ b/gr-atsc/src/lib/atsc_derandomizer.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, diff --git a/gr-atsc/src/lib/atsc_derandomizer.h b/gr-atsc/src/lib/atsc_derandomizer.h index 54254d0c5..1881a69a3 100644 --- a/gr-atsc/src/lib/atsc_derandomizer.h +++ b/gr-atsc/src/lib/atsc_derandomizer.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -35,7 +35,7 @@ ATSC_API atsc_derandomizer_sptr atsc_make_derandomizer(); * \brief "dewhiten" incoming mpeg transport stream packets * \ingroup atsc * - * input: atsc_mpeg_packet_no_sync; output: atsc_mpeg_packet; + * input: atsc_mpeg_packet_no_sync; output: atsc_mpeg_packet; */ class ATSC_API atsc_derandomizer : public gr_sync_block { diff --git a/gr-atsc/src/lib/atsc_ds_to_softds.cc b/gr-atsc/src/lib/atsc_ds_to_softds.cc index c589bbb9f..a8f93bde4 100644 --- a/gr-atsc/src/lib/atsc_ds_to_softds.cc +++ b/gr-atsc/src/lib/atsc_ds_to_softds.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, diff --git a/gr-atsc/src/lib/atsc_ds_to_softds.h b/gr-atsc/src/lib/atsc_ds_to_softds.h index 1021eed6f..0ba61c7d6 100644 --- a/gr-atsc/src/lib/atsc_ds_to_softds.h +++ b/gr-atsc/src/lib/atsc_ds_to_softds.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gr-atsc/src/lib/atsc_equalizer.cc b/gr-atsc/src/lib/atsc_equalizer.cc index 3e68de992..b8f31aeb4 100644 --- a/gr-atsc/src/lib/atsc_equalizer.cc +++ b/gr-atsc/src/lib/atsc_equalizer.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, diff --git a/gr-atsc/src/lib/atsc_equalizer.h b/gr-atsc/src/lib/atsc_equalizer.h index 773cd1a04..32b449b62 100644 --- a/gr-atsc/src/lib/atsc_equalizer.h +++ b/gr-atsc/src/lib/atsc_equalizer.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gr-atsc/src/lib/atsc_field_sync_demux.cc b/gr-atsc/src/lib/atsc_field_sync_demux.cc index 3b321eae6..2783e4a90 100644 --- a/gr-atsc/src/lib/atsc_field_sync_demux.cc +++ b/gr-atsc/src/lib/atsc_field_sync_demux.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, @@ -52,7 +52,7 @@ atsc_field_sync_demux::atsc_field_sync_demux() gr_make_io_signature(2, 2, sizeof(float)), gr_make_io_signature(1, 1, sizeof(atsc_soft_data_segment))), d_locked(false), d_in_field2(true), d_segment_number(0), - d_next_input(0), d_lost_index(0), d_inputs0_index(0), + d_next_input(0), d_lost_index(0), d_inputs0_index(0), d_inputs0_size(0), d_consume(0) { reset(); diff --git a/gr-atsc/src/lib/atsc_field_sync_demux.h b/gr-atsc/src/lib/atsc_field_sync_demux.h index 0e3a5003d..ea9a5d1ac 100644 --- a/gr-atsc/src/lib/atsc_field_sync_demux.h +++ b/gr-atsc/src/lib/atsc_field_sync_demux.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gr-atsc/src/lib/atsc_field_sync_mux.cc b/gr-atsc/src/lib/atsc_field_sync_mux.cc index 3d0e20a1c..99fa5bff3 100644 --- a/gr-atsc/src/lib/atsc_field_sync_mux.cc +++ b/gr-atsc/src/lib/atsc_field_sync_mux.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, @@ -147,9 +147,9 @@ void atsc_field_sync_mux::forecast (int noutput_items, gr_vector_int &ninput_items_required) { unsigned ninputs = ninput_items_required.size(); - for (unsigned i = 0; i < ninputs; i++) + for (unsigned i = 0; i < ninputs; i++) ninput_items_required[i] = fixed_rate_noutput_to_ninput (noutput_items); - + } diff --git a/gr-atsc/src/lib/atsc_field_sync_mux.h b/gr-atsc/src/lib/atsc_field_sync_mux.h index d08a99b5b..ce4514e9c 100644 --- a/gr-atsc/src/lib/atsc_field_sync_mux.h +++ b/gr-atsc/src/lib/atsc_field_sync_mux.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gr-atsc/src/lib/atsc_fpll.cc b/gr-atsc/src/lib/atsc_fpll.cc index 676a7453e..c8d62c415 100644 --- a/gr-atsc/src/lib/atsc_fpll.cc +++ b/gr-atsc/src/lib/atsc_fpll.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, diff --git a/gr-atsc/src/lib/atsc_fpll.h b/gr-atsc/src/lib/atsc_fpll.h index dac3cda86..0474b8f76 100644 --- a/gr-atsc/src/lib/atsc_fpll.h +++ b/gr-atsc/src/lib/atsc_fpll.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gr-atsc/src/lib/atsc_fs_checker.cc b/gr-atsc/src/lib/atsc_fs_checker.cc index 6162c9ef6..f8c4e43d5 100644 --- a/gr-atsc/src/lib/atsc_fs_checker.cc +++ b/gr-atsc/src/lib/atsc_fs_checker.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, diff --git a/gr-atsc/src/lib/atsc_fs_checker.h b/gr-atsc/src/lib/atsc_fs_checker.h index c08f06c9d..d034fdd28 100644 --- a/gr-atsc/src/lib/atsc_fs_checker.h +++ b/gr-atsc/src/lib/atsc_fs_checker.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gr-atsc/src/lib/atsc_interleaver.cc b/gr-atsc/src/lib/atsc_interleaver.cc index a87091436..fff5b2fa6 100644 --- a/gr-atsc/src/lib/atsc_interleaver.cc +++ b/gr-atsc/src/lib/atsc_interleaver.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, diff --git a/gr-atsc/src/lib/atsc_interleaver.h b/gr-atsc/src/lib/atsc_interleaver.h index 00cd54c11..3090d49de 100644 --- a/gr-atsc/src/lib/atsc_interleaver.h +++ b/gr-atsc/src/lib/atsc_interleaver.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -31,7 +31,7 @@ typedef boost::shared_ptr<atsc_interleaver> atsc_interleaver_sptr; ATSC_API atsc_interleaver_sptr atsc_make_interleaver(); -/*! \brief Interleave RS encoded ATSC data ( atsc_mpeg_packet_rs_encoded --> atsc_mpeg_packet_rs_encoded)* +/*! \brief Interleave RS encoded ATSC data ( atsc_mpeg_packet_rs_encoded --> atsc_mpeg_packet_rs_encoded)* * \ingroup atsc * * input: atsc_mpeg_packet_rs_encoded; output: atsc_mpeg_packet_rs_encoded diff --git a/gr-atsc/src/lib/atsc_pad.cc b/gr-atsc/src/lib/atsc_pad.cc index 8a36307af..317b16aca 100644 --- a/gr-atsc/src/lib/atsc_pad.cc +++ b/gr-atsc/src/lib/atsc_pad.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, @@ -49,7 +49,7 @@ void atsc_pad::forecast (int noutput_items, gr_vector_int &ninput_items_required) { unsigned ninputs = ninput_items_required.size(); - for (unsigned i = 0; i < ninputs; i++) + for (unsigned i = 0; i < ninputs; i++) ninput_items_required[i] = noutput_items * ATSC_MPEG_PKT_LENGTH; } @@ -61,7 +61,7 @@ atsc_pad::work (int noutput_items, { const unsigned char *in = (const unsigned char *) input_items[0]; atsc_mpeg_packet *out = (atsc_mpeg_packet *) output_items[0]; - + int i; for (i = 0; i < noutput_items; i++){ diff --git a/gr-atsc/src/lib/atsc_pad.h b/gr-atsc/src/lib/atsc_pad.h index 866c72552..139d951a6 100644 --- a/gr-atsc/src/lib/atsc_pad.h +++ b/gr-atsc/src/lib/atsc_pad.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -31,7 +31,7 @@ typedef boost::shared_ptr<atsc_pad> atsc_pad_sptr; ATSC_API atsc_pad_sptr atsc_make_pad(); /*! - * \brief pad mpeg ts packets from 188 byte char to + * \brief pad mpeg ts packets from 188 byte char to * to 256 byte atsc_mpeg_packet * \ingroup atsc * diff --git a/gr-atsc/src/lib/atsc_randomizer.cc b/gr-atsc/src/lib/atsc_randomizer.cc index cd797b8f5..73375e84c 100644 --- a/gr-atsc/src/lib/atsc_randomizer.cc +++ b/gr-atsc/src/lib/atsc_randomizer.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, diff --git a/gr-atsc/src/lib/atsc_randomizer.h b/gr-atsc/src/lib/atsc_randomizer.h index 1178f06c0..7d00efcf9 100644 --- a/gr-atsc/src/lib/atsc_randomizer.h +++ b/gr-atsc/src/lib/atsc_randomizer.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gr-atsc/src/lib/atsc_rs_decoder.cc b/gr-atsc/src/lib/atsc_rs_decoder.cc index aa3f9369e..e4bb6e57a 100644 --- a/gr-atsc/src/lib/atsc_rs_decoder.cc +++ b/gr-atsc/src/lib/atsc_rs_decoder.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, diff --git a/gr-atsc/src/lib/atsc_rs_decoder.h b/gr-atsc/src/lib/atsc_rs_decoder.h index 4b8d6c1b4..9e4bf8d44 100644 --- a/gr-atsc/src/lib/atsc_rs_decoder.h +++ b/gr-atsc/src/lib/atsc_rs_decoder.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gr-atsc/src/lib/atsc_rs_encoder.cc b/gr-atsc/src/lib/atsc_rs_encoder.cc index f98ff664c..7c4ec293b 100644 --- a/gr-atsc/src/lib/atsc_rs_encoder.cc +++ b/gr-atsc/src/lib/atsc_rs_encoder.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, diff --git a/gr-atsc/src/lib/atsc_rs_encoder.h b/gr-atsc/src/lib/atsc_rs_encoder.h index d9812678a..b0d69d95d 100644 --- a/gr-atsc/src/lib/atsc_rs_encoder.h +++ b/gr-atsc/src/lib/atsc_rs_encoder.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gr-atsc/src/lib/atsc_trellis_encoder.cc b/gr-atsc/src/lib/atsc_trellis_encoder.cc index 4cf81a045..fa0a889aa 100644 --- a/gr-atsc/src/lib/atsc_trellis_encoder.cc +++ b/gr-atsc/src/lib/atsc_trellis_encoder.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, diff --git a/gr-atsc/src/lib/atsc_trellis_encoder.h b/gr-atsc/src/lib/atsc_trellis_encoder.h index c84816118..da51f633d 100644 --- a/gr-atsc/src/lib/atsc_trellis_encoder.h +++ b/gr-atsc/src/lib/atsc_trellis_encoder.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gr-atsc/src/lib/atsc_types.h b/gr-atsc/src/lib/atsc_types.h index d505a51c1..ed4dedace 100644 --- a/gr-atsc/src/lib/atsc_types.h +++ b/gr-atsc/src/lib/atsc_types.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2001,2006 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, @@ -33,7 +33,7 @@ * * Not all modules need all the info */ -class plinfo { +class plinfo { public: plinfo () : _flags (0), _segno (0) { } @@ -108,7 +108,7 @@ public: * confirm that \p X is plausible */ static void sanity_check (const plinfo &in); - + protected: unsigned short _flags; // bitmask @@ -213,7 +213,7 @@ class atsc_data_segment { /*! * Contains 832 bipolar floating point symbols. - * Nominal values are +/- {1, 3, 5, 7}. + * Nominal values are +/- {1, 3, 5, 7}. * This data type represents the input to the viterbi decoder. */ diff --git a/gr-atsc/src/lib/atsc_viterbi_decoder.cc b/gr-atsc/src/lib/atsc_viterbi_decoder.cc index 81ad9178a..72b9a965b 100644 --- a/gr-atsc/src/lib/atsc_viterbi_decoder.cc +++ b/gr-atsc/src/lib/atsc_viterbi_decoder.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, diff --git a/gr-atsc/src/lib/atsc_viterbi_decoder.h b/gr-atsc/src/lib/atsc_viterbi_decoder.h index 1a43b4952..de571db33 100644 --- a/gr-atsc/src/lib/atsc_viterbi_decoder.h +++ b/gr-atsc/src/lib/atsc_viterbi_decoder.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gr-atsc/src/lib/atsci_basic_trellis_encoder.cc b/gr-atsc/src/lib/atsci_basic_trellis_encoder.cc index 6b6fc19cb..2ae481cbc 100644 --- a/gr-atsc/src/lib/atsci_basic_trellis_encoder.cc +++ b/gr-atsc/src/lib/atsci_basic_trellis_encoder.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -55,7 +55,7 @@ int atsci_basic_trellis_encoder::encode (unsigned int input) { assert (input < 4); - int index = (state << 2) + input; + int index = (state << 2) + input; state = next_state[index]; return out_symbol[index]; } diff --git a/gr-atsc/src/lib/atsci_basic_trellis_encoder.h b/gr-atsc/src/lib/atsci_basic_trellis_encoder.h index c17e5653e..a1bbbf5a0 100644 --- a/gr-atsc/src/lib/atsci_basic_trellis_encoder.h +++ b/gr-atsc/src/lib/atsci_basic_trellis_encoder.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/atsci_data_interleaver.cc b/gr-atsc/src/lib/atsci_data_interleaver.cc index b20dde941..a2eef0fea 100644 --- a/gr-atsc/src/lib/atsci_data_interleaver.cc +++ b/gr-atsc/src/lib/atsci_data_interleaver.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -22,7 +22,7 @@ #include <atsci_data_interleaver.h> -void +void atsci_data_interleaver::interleave (atsc_mpeg_packet_rs_encoded &out, const atsc_mpeg_packet_rs_encoded &in) { @@ -37,7 +37,7 @@ atsci_data_interleaver::interleave (atsc_mpeg_packet_rs_encoded &out, } -void +void atsci_data_deinterleaver::deinterleave (atsc_mpeg_packet_rs_encoded &out, const atsc_mpeg_packet_rs_encoded &in) { @@ -47,7 +47,7 @@ atsci_data_deinterleaver::deinterleave (atsc_mpeg_packet_rs_encoded &out, // reset commutator if required using INPUT pipeline info if (in.pli.first_regular_seg_p ()) sync (); - + // remap OUTPUT pipeline info to reflect 52 data segment end-to-end delay plinfo::delay (out.pli, in.pli, 52); diff --git a/gr-atsc/src/lib/atsci_data_interleaver.h b/gr-atsc/src/lib/atsci_data_interleaver.h index e7f982db4..290607ea3 100644 --- a/gr-atsc/src/lib/atsci_data_interleaver.h +++ b/gr-atsc/src/lib/atsci_data_interleaver.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/atsci_diag_output.h b/gr-atsc/src/lib/atsci_diag_output.h index 5e3239d67..09fd763d6 100644 --- a/gr-atsc/src/lib/atsci_diag_output.h +++ b/gr-atsc/src/lib/atsci_diag_output.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/atsci_equalizer.cc b/gr-atsc/src/lib/atsci_equalizer.cc index fb04db7c2..4aec47495 100644 --- a/gr-atsc/src/lib/atsci_equalizer.cc +++ b/gr-atsc/src/lib/atsci_equalizer.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -53,7 +53,7 @@ atsci_equalizer::reset () d_offset_from_last_field_sync = 0; d_current_field = 0; } - + /* * Errrr.... Define to 1 if compiler handles tail recursion without pushing * unnecessary stack frames, else define to 0 for lame compilers. @@ -71,7 +71,7 @@ atsci_equalizer::reset () * Today's strategy: get it working. */ -void +void atsci_equalizer::filter (const float *input_samples, const atsc::syminfo *input_tags, float *output_samples, @@ -138,15 +138,15 @@ atsci_equalizer::filter (const float *input_samples, else { // we're lost... no field sync where we expected it cerr << "!!! atsci_equalizer: expected field sync, didn't find one\n"; - + d_locked_p = false; - d_offset_from_last_field_sync = 0; + d_offset_from_last_field_sync = 0; if (WINNING_COMPILER) filter (input_samples, input_tags, output_samples, nsamples); else goto lame_compiler_kludge; - + return; } @@ -206,7 +206,7 @@ atsci_equalizer::filter (const float *input_samples, int n = min (4 - seg_offset, nsamples); filter_data_seg_sync (input_samples, output_samples, n, seg_offset); - + d_offset_from_last_field_sync += n; nsamples -= n; @@ -227,7 +227,7 @@ atsci_equalizer::filter (const float *input_samples, // otherwise... we're in the normal zone int n = min (ATSC_DATA_SEGMENT_LENGTH - seg_offset, nsamples); - + filter_normal (input_samples, output_samples, n); d_offset_from_last_field_sync += n; @@ -235,7 +235,7 @@ atsci_equalizer::filter (const float *input_samples, if (nsamples <= 0) return; - + if (WINNING_COMPILER) filter (&input_samples[n], &input_tags[n], &output_samples[n], nsamples); diff --git a/gr-atsc/src/lib/atsci_equalizer.h b/gr-atsc/src/lib/atsci_equalizer.h index 853c52689..a0a1fc674 100644 --- a/gr-atsc/src/lib/atsci_equalizer.h +++ b/gr-atsc/src/lib/atsci_equalizer.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -53,7 +53,7 @@ public: // CREATORS atsci_equalizer (); virtual ~atsci_equalizer (); - + // MANIPULATORS /*! @@ -62,7 +62,7 @@ public: * Note, subclasses must invoke the superclass's method too! */ virtual void reset (); - + /*! * \brief produce \p nsamples of output from given inputs and tags * @@ -71,11 +71,11 @@ public: * to handle each sub-segment of the input data. * * \p input_samples must have (nsamples + ntaps() - 1) valid entries. - * input_samples[0] .. input_samples[nsamples - 1 + ntaps() - 1] are + * input_samples[0] .. input_samples[nsamples - 1 + ntaps() - 1] are * referenced to compute the output values. * * \p input_tags must have nsamples valid entries. - * input_tags[0] .. input_tags[nsamples - 1] are referenced to + * input_tags[0] .. input_tags[nsamples - 1] are referenced to * compute the output values. */ virtual void filter (const float *input_samples, @@ -94,10 +94,10 @@ public: virtual int ntaps () const = 0; /*! - * \brief how many taps are "in the future". + * \brief how many taps are "in the future". * * This allows us to handle what the ATSC folks call "pre-ghosts". - * What it really does is allow the caller to jack with the offset + * What it really does is allow the caller to jack with the offset * between the tags and the data so that everything magically works out. * * npretaps () must return a value between 0 and ntaps() - 1. @@ -107,7 +107,7 @@ public: * like 15% - 20% of ntaps (). */ virtual int npretaps () const = 0; - + protected: @@ -139,14 +139,14 @@ protected: float *output_samples, int nsamples, int offset) = 0; - + /*! * Input range is known to consist of only a field sync segment or a * portion of a field sync segment. \p nsamples will be in [1,832]. * \p offset will be in [0,831]. \p offset is the offset of the input * from the beginning of the data segment sync pattern. We consider the * 4 symbols of the immediately preceding data segment sync to be the - * first symbols of the field sync segment. \p which_field is in [0,1] + * first symbols of the field sync segment. \p which_field is in [0,1] * and specifies which field (duh). * * \p input_samples has (nsamples + ntaps() - 1) valid entries. diff --git a/gr-atsc/src/lib/atsci_equalizer_lms.cc b/gr-atsc/src/lib/atsci_equalizer_lms.cc index 6358b5334..bab962e32 100644 --- a/gr-atsc/src/lib/atsci_equalizer_lms.cc +++ b/gr-atsc/src/lib/atsci_equalizer_lms.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -86,7 +86,7 @@ atsci_equalizer_lms::npretaps () const * input_samples[0] .. input_samples[nsamples - 1 + ntaps() - 1] may be * referenced to compute the output values. */ -void +void atsci_equalizer_lms::filter_normal (const float *input_samples, float *output_samples, int nsamples) @@ -106,7 +106,7 @@ atsci_equalizer_lms::filter_normal (const float *input_samples, * input_samples[0] .. input_samples[nsamples - 1 + ntaps() - 1] may be * referenced to compute the output values. */ -void +void atsci_equalizer_lms::filter_data_seg_sync (const float *input_samples, float *output_samples, int nsamples, @@ -119,24 +119,24 @@ atsci_equalizer_lms::filter_data_seg_sync (const float *input_samples, // cerr << "Seg Sync: offset " << offset << "\tnsamples\t" << nsamples << "\t pre, 5 -5 -5 5\t" << // output_samples[0] << "\t" << output_samples[1] << "\t" << output_samples[2] << "\t" << output_samples[3] << endl; - + } - + /*! * Input range is known to consist of only a field sync segment or a * portion of a field sync segment. \p nsamples will be in [1,832]. * \p offset will be in [0,831]. \p offset is the offset of the input * from the beginning of the data segment sync pattern. We consider the * 4 symbols of the immediately preceding data segment sync to be the - * first symbols of the field sync segment. \p which_field is in [0,1] + * first symbols of the field sync segment. \p which_field is in [0,1] * and specifies which field (duh). * * \p input_samples has (nsamples + ntaps() - 1) valid entries. * input_samples[0] .. input_samples[nsamples - 1 + ntaps() - 1] may be * referenced to compute the output values. */ -void +void atsci_equalizer_lms::filter_field_sync (const float *input_samples, float *output_samples, int nsamples, @@ -144,11 +144,11 @@ atsci_equalizer_lms::filter_field_sync (const float *input_samples, int which_field) { // Only the first 4 + 511 + 3 * 63 symbols are completely defined. - // Those after that the symbols are bilevel, so we could use decision feedback and use + // Those after that the symbols are bilevel, so we could use decision feedback and use // that to train, but for now, don't train on them. int n = min (nsamples, get_field_sync_training_sequence_length (offset)); - + // handle known training sequence adaptN (input_samples, get_field_sync_training_sequence (which_field, offset), output_samples, n); @@ -205,7 +205,7 @@ float atsci_equalizer_lms::adapt1 (const float input[], float ideal_output) { static const double BETA = 0.00005; // FIXME figure out what this ought to be - // FIXME add gear-shifting + // FIXME add gear-shifting double y = filter1 (input); double e = y - ideal_output; @@ -228,7 +228,7 @@ atsci_equalizer_lms::filterN (const float *input_samples, } -void +void atsci_equalizer_lms::adaptN (const float *input_samples, const float *training_pattern, float *output_samples, @@ -248,7 +248,7 @@ bin_map (int bit) static void init_field_sync_common (float *p, int mask) - + { int i = 0; @@ -265,7 +265,7 @@ init_field_sync_common (float *p, int mask) for (int j = 0; j < 63; j++) // PN63, toggled on field 2 p[i++] = bin_map (atsc_pn63[j] ^ mask); - + for (int j = 0; j < 63; j++) // PN63 p[i++] = bin_map (atsc_pn63[j]); @@ -281,7 +281,7 @@ get_data_seg_sync_training_sequence (int offset) } #endif -static int +static int get_field_sync_training_sequence_length (int offset) { return max (0, KNOWN_FIELD_SYNC_LENGTH - offset); diff --git a/gr-atsc/src/lib/atsci_equalizer_lms.h b/gr-atsc/src/lib/atsci_equalizer_lms.h index 8a39255c6..68aa34ca5 100644 --- a/gr-atsc/src/lib/atsci_equalizer_lms.h +++ b/gr-atsc/src/lib/atsci_equalizer_lms.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -37,7 +37,7 @@ public: virtual void reset (); virtual int ntaps () const; virtual int npretaps () const; - + protected: FILE *trainingfile; virtual void filter_normal (const float *input_samples, @@ -48,7 +48,7 @@ protected: float *output_samples, int nsamples, int offset); - + virtual void filter_field_sync (const float *input_samples, float *output_samples, int nsamples, diff --git a/gr-atsc/src/lib/atsci_equalizer_lms2.cc b/gr-atsc/src/lib/atsci_equalizer_lms2.cc index f9fb57c7b..2825aad50 100644 --- a/gr-atsc/src/lib/atsci_equalizer_lms2.cc +++ b/gr-atsc/src/lib/atsci_equalizer_lms2.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -43,22 +43,22 @@ static const int KNOWN_FIELD_SYNC_LENGTH = 4 + 511 + 3 * 63; static int get_field_sync_training_sequence_length (int offset); static const float *get_field_sync_training_sequence (int which_field, int offset); -static inline int -wrap (int d) +static inline int +wrap (int d) { assert (d >= 0 && d <= (2 * NFBTAPS)); - + if(d >= NFBTAPS) return d - NFBTAPS; return d; } -static inline float +static inline float slice (float d) { if (boost::math::isnan (d)) return 0.0; - + if (d >= 0.0){ if (d >= 4.0){ if (d >= 6.0) @@ -129,7 +129,7 @@ atsci_equalizer_lms2::npretaps () const * input_samples[0] .. input_samples[nsamples - 1 + ntaps() - 1] may be * referenced to compute the output values. */ -void +void atsci_equalizer_lms2::filter_normal (const float *input_samples, float *output_samples, int nsamples) @@ -149,7 +149,7 @@ atsci_equalizer_lms2::filter_normal (const float *input_samples, * input_samples[0] .. input_samples[nsamples - 1 + ntaps() - 1] may be * referenced to compute the output values. */ -void +void atsci_equalizer_lms2::filter_data_seg_sync (const float *input_samples, float *output_samples, int nsamples, @@ -162,24 +162,24 @@ atsci_equalizer_lms2::filter_data_seg_sync (const float *input_samples, // cerr << "Seg Sync: offset " << offset << "\tnsamples\t" << nsamples << "\t pre, 5 -5 -5 5\t" << // output_samples[0] << "\t" << output_samples[1] << "\t" << output_samples[2] << "\t" << output_samples[3] << endl; - + } - + /*! * Input range is known to consist of only a field sync segment or a * portion of a field sync segment. \p nsamples will be in [1,832]. * \p offset will be in [0,831]. \p offset is the offset of the input * from the beginning of the data segment sync pattern. We consider the * 4 symbols of the immediately preceding data segment sync to be the - * first symbols of the field sync segment. \p which_field is in [0,1] + * first symbols of the field sync segment. \p which_field is in [0,1] * and specifies which field (duh). * * \p input_samples has (nsamples + ntaps() - 1) valid entries. * input_samples[0] .. input_samples[nsamples - 1 + ntaps() - 1] may be * referenced to compute the output values. */ -void +void atsci_equalizer_lms2::filter_field_sync (const float *input_samples, float *output_samples, int nsamples, @@ -187,11 +187,11 @@ atsci_equalizer_lms2::filter_field_sync (const float *input_samples, int which_field) { // Only the first 4 + 511 + 3 * 63 symbols are completely defined. - // Those after that the symbols are bilevel, so we could use decision feedback and use + // Those after that the symbols are bilevel, so we could use decision feedback and use // that to train, but for now, don't train on them. int n = min (nsamples, get_field_sync_training_sequence_length (offset)); - + // handle known training sequence adaptN (input_samples, get_field_sync_training_sequence (which_field, offset), output_samples, n); @@ -268,7 +268,7 @@ float atsci_equalizer_lms2::adapt1 (const float input[], float ideal_output) { static const double BETA = 0.00005; // FIXME figure out what this ought to be - // FIXME add gear-shifting + // FIXME add gear-shifting double y = filter1 (input); double e = y - ideal_output; @@ -296,7 +296,7 @@ atsci_equalizer_lms2::filterN (const float *input_samples, } -void +void atsci_equalizer_lms2::adaptN (const float *input_samples, const float *training_pattern, float *output_samples, @@ -316,7 +316,7 @@ bin_map (int bit) static void init_field_sync_common (float *p, int mask) - + { int i = 0; @@ -333,7 +333,7 @@ init_field_sync_common (float *p, int mask) for (int j = 0; j < 63; j++) // PN63, toggled on field 2 p[i++] = bin_map (atsc_pn63[j] ^ mask); - + for (int j = 0; j < 63; j++) // PN63 p[i++] = bin_map (atsc_pn63[j]); @@ -349,7 +349,7 @@ get_data_seg_sync_training_sequence (int offset) } #endif -static int +static int get_field_sync_training_sequence_length (int offset) { return max (0, KNOWN_FIELD_SYNC_LENGTH - offset); diff --git a/gr-atsc/src/lib/atsci_equalizer_lms2.h b/gr-atsc/src/lib/atsci_equalizer_lms2.h index 7c60fc174..d0f2660d5 100644 --- a/gr-atsc/src/lib/atsci_equalizer_lms2.h +++ b/gr-atsc/src/lib/atsci_equalizer_lms2.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -37,7 +37,7 @@ public: virtual void reset (); virtual int ntaps () const; virtual int npretaps () const; - + protected: FILE *trainingfile; virtual void filter_normal (const float *input_samples, @@ -48,7 +48,7 @@ protected: float *output_samples, int nsamples, int offset); - + virtual void filter_field_sync (const float *input_samples, float *output_samples, int nsamples, diff --git a/gr-atsc/src/lib/atsci_equalizer_nop.cc b/gr-atsc/src/lib/atsci_equalizer_nop.cc index 9b2b53269..5af2cc4e7 100644 --- a/gr-atsc/src/lib/atsci_equalizer_nop.cc +++ b/gr-atsc/src/lib/atsci_equalizer_nop.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -38,7 +38,7 @@ atsci_equalizer_nop::reset () atsci_equalizer::reset (); // invoke superclass } -int +int atsci_equalizer_nop::ntaps () const { return 1; @@ -60,7 +60,7 @@ atsci_equalizer_nop::npretaps () const * input_samples[0] .. input_samples[nsamples - 1 + ntaps() - 1] may be * referenced to compute the output values. */ -void +void atsci_equalizer_nop::filter_normal (const float *input_samples, float *output_samples, int nsamples) @@ -81,7 +81,7 @@ atsci_equalizer_nop::filter_normal (const float *input_samples, * input_samples[0] .. input_samples[nsamples - 1 + ntaps() - 1] may be * referenced to compute the output values. */ -void +void atsci_equalizer_nop::filter_data_seg_sync (const float *input_samples, float *output_samples, int nsamples, @@ -92,21 +92,21 @@ atsci_equalizer_nop::filter_data_seg_sync (const float *input_samples, } } - + /*! * Input range is known to consist of only a field sync segment or a * portion of a field sync segment. \p nsamples will be in [1,832]. * \p offset will be in [0,831]. \p offset is the offset of the input * from the beginning of the data segment sync pattern. We consider the * 4 symbols of the immediately preceding data segment sync to be the - * first symbols of the field sync segment. \p which_field is in [0,1] + * first symbols of the field sync segment. \p which_field is in [0,1] * and specifies which field (duh). * * \p input_samples has (nsamples + ntaps() - 1) valid entries. * input_samples[0] .. input_samples[nsamples - 1 + ntaps() - 1] may be * referenced to compute the output values. */ -void +void atsci_equalizer_nop::filter_field_sync (const float *input_samples, float *output_samples, int nsamples, @@ -114,7 +114,7 @@ atsci_equalizer_nop::filter_field_sync (const float *input_samples, int which_field) { int i = 0; - + if (offset == 0 && nsamples > 0){ output_samples[0] = scale_and_train (input_samples[0]); i++; diff --git a/gr-atsc/src/lib/atsci_equalizer_nop.h b/gr-atsc/src/lib/atsci_equalizer_nop.h index 6d842601f..d29fded64 100644 --- a/gr-atsc/src/lib/atsci_equalizer_nop.h +++ b/gr-atsc/src/lib/atsci_equalizer_nop.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -32,7 +32,7 @@ private: float scale (float input) { return input; } float scale_and_train (float input); - + public: atsci_equalizer_nop (); @@ -41,7 +41,7 @@ public: virtual void reset (); virtual int ntaps () const; virtual int npretaps () const; - + protected: virtual void filter_normal (const float *input_samples, float *output_samples, @@ -51,7 +51,7 @@ protected: float *output_samples, int nsamples, int offset); - + virtual void filter_field_sync (const float *input_samples, float *output_samples, int nsamples, diff --git a/gr-atsc/src/lib/atsci_exp2_lp.cc b/gr-atsc/src/lib/atsci_exp2_lp.cc index 38e62d929..8f411977e 100644 --- a/gr-atsc/src/lib/atsci_exp2_lp.cc +++ b/gr-atsc/src/lib/atsci_exp2_lp.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -35,8 +35,8 @@ using std::endl; * FILTER TYPE:LOW PASS 1H * PASSBAND RIPPLE IN -dB -.0100 * STOPBAND RIPPLE IN -dB -66.0000 - * PASSBAND CUTOFF FREQUENCY 5.69000 HERTZ - * STOPBAND CUTOFF FREQUENCY 6.12000 HERTZ + * PASSBAND CUTOFF FREQUENCY 5.69000 HERTZ + * STOPBAND CUTOFF FREQUENCY 6.12000 HERTZ * SAMPLING FREQUENCY 21.5200 HERTZ */ static const float atsci_exp2_lp2x[] = { @@ -48,8 +48,8 @@ static const float atsci_exp2_lp2x[] = { * FILTER TYPE:LOW PASS 1H * PASSBAND RIPPLE IN -dB -.0100 * STOPBAND RIPPLE IN -dB -66.0000 - * PASSBAND CUTOFF FREQUENCY 5.69000 HERTZ - * STOPBAND CUTOFF FREQUENCY 6.12000 HERTZ + * PASSBAND CUTOFF FREQUENCY 5.69000 HERTZ + * STOPBAND CUTOFF FREQUENCY 6.12000 HERTZ * SAMPLING FREQUENCY 20.0000 HERTZ */ static const float atsci_exp2_lp20[] = { @@ -61,7 +61,7 @@ static const float atsci_exp2_lp20[] = { // is A within 5% of TARGET? -static bool +static bool close_enough_p (double a, double target) { double delta = fabs (target * 0.05); // 5 percent @@ -69,7 +69,7 @@ close_enough_p (double a, double target) return fabs (target - a) <= delta; } -vector<float> +vector<float> atsci_exp2_lp::taps (double sampling_freq) { if (close_enough_p (sampling_freq, 20e6)){ diff --git a/gr-atsc/src/lib/atsci_exp2_lp.h b/gr-atsc/src/lib/atsci_exp2_lp.h index 12d08fa6d..e04c42528 100644 --- a/gr-atsc/src/lib/atsci_exp2_lp.h +++ b/gr-atsc/src/lib/atsci_exp2_lp.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/atsci_exp2_lp20.dat b/gr-atsc/src/lib/atsci_exp2_lp20.dat index b810fac70..d09c5aca2 100644 --- a/gr-atsc/src/lib/atsci_exp2_lp20.dat +++ b/gr-atsc/src/lib/atsci_exp2_lp20.dat @@ -3,8 +3,8 @@ * FILTER TYPE:LOW PASS 1H * PASSBAND RIPPLE IN -dB -.0100 * STOPBAND RIPPLE IN -dB -66.0000 - * PASSBAND CUTOFF FREQUENCY 5.69000 HERTZ - * STOPBAND CUTOFF FREQUENCY 6.12000 HERTZ + * PASSBAND CUTOFF FREQUENCY 5.69000 HERTZ + * STOPBAND CUTOFF FREQUENCY 6.12000 HERTZ * SAMPLING FREQUENCY 20.0000 HERTZ */ -.3137849271297455e-03, diff --git a/gr-atsc/src/lib/atsci_exp2_lp2x.dat b/gr-atsc/src/lib/atsci_exp2_lp2x.dat index 16b2b47df..67dd204cb 100644 --- a/gr-atsc/src/lib/atsci_exp2_lp2x.dat +++ b/gr-atsc/src/lib/atsci_exp2_lp2x.dat @@ -3,8 +3,8 @@ * FILTER TYPE:LOW PASS 1H * PASSBAND RIPPLE IN -dB -.0100 * STOPBAND RIPPLE IN -dB -66.0000 - * PASSBAND CUTOFF FREQUENCY 5.69000 HERTZ - * STOPBAND CUTOFF FREQUENCY 6.12000 HERTZ + * PASSBAND CUTOFF FREQUENCY 5.69000 HERTZ + * STOPBAND CUTOFF FREQUENCY 6.12000 HERTZ * SAMPLING FREQUENCY 21.5200 HERTZ */ diff --git a/gr-atsc/src/lib/atsci_fake_single_viterbi.cc b/gr-atsc/src/lib/atsci_fake_single_viterbi.cc index bf5cf9ab7..6246a9050 100644 --- a/gr-atsc/src/lib/atsci_fake_single_viterbi.cc +++ b/gr-atsc/src/lib/atsci_fake_single_viterbi.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -46,7 +46,7 @@ char atsci_fake_single_viterbi::decode (float input) { int y2, y1; - + if (input < -4){ y2 = 0; y1 = 0; diff --git a/gr-atsc/src/lib/atsci_fake_single_viterbi.h b/gr-atsc/src/lib/atsci_fake_single_viterbi.h index b4cb6e3b3..561afb3d3 100644 --- a/gr-atsc/src/lib/atsci_fake_single_viterbi.h +++ b/gr-atsc/src/lib/atsci_fake_single_viterbi.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -30,7 +30,7 @@ */ class ATSC_API atsci_fake_single_viterbi { - + public: atsci_fake_single_viterbi (); @@ -49,4 +49,4 @@ protected: int post_coder_state; }; -#endif +#endif diff --git a/gr-atsc/src/lib/atsci_fs_checker.cc b/gr-atsc/src/lib/atsci_fs_checker.cc index 80af1239c..7d321307c 100644 --- a/gr-atsc/src/lib/atsci_fs_checker.cc +++ b/gr-atsc/src/lib/atsci_fs_checker.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/atsci_fs_checker.h b/gr-atsc/src/lib/atsci_fs_checker.h index cdcd541e8..7a426b742 100644 --- a/gr-atsc/src/lib/atsci_fs_checker.h +++ b/gr-atsc/src/lib/atsci_fs_checker.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -31,7 +31,7 @@ * Processes input samples one at a time looking for * an occurence of either the field sync 1 or field sync 2 pattern. * - * Note that unlike atsci_fs_correlator, this class uses the symbol_num in + * Note that unlike atsci_fs_correlator, this class uses the symbol_num in * input_tag to avoid having to test each symbol position. * * For each sample processed, an output sample and an output tag are produced. @@ -66,5 +66,5 @@ public: //! return delay in samples from input to output virtual int delay () const = 0; }; - + #endif /* _ATSC_FS_CHECKER_H_ */ diff --git a/gr-atsc/src/lib/atsci_fs_checker_naive.cc b/gr-atsc/src/lib/atsci_fs_checker_naive.cc index ab50aff8b..f14472aa2 100644 --- a/gr-atsc/src/lib/atsci_fs_checker_naive.cc +++ b/gr-atsc/src/lib/atsci_fs_checker_naive.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -85,7 +85,7 @@ atsci_fs_checker_naive::filter (float input_sample, atsc::syminfo input_tag, atsc::syminfo proto_tag = d_tag_sr[d_index]; // oldest tag in the queue if (proto_tag.symbol_num == 0){ // check for field sync pattern - + d_segment_num = (d_segment_num + 1) & atsc::SI_SEGMENT_NUM_MASK; // increment // check for a hit on the PN 511 pattern @@ -119,7 +119,7 @@ atsci_fs_checker_naive::filter (float input_sample, atsc::syminfo input_tag, } } - proto_tag.segment_num = d_segment_num; // fill in segment number and field number + proto_tag.segment_num = d_segment_num; // fill in segment number and field number proto_tag.field_num = d_field_num; // return oldest sample diff --git a/gr-atsc/src/lib/atsci_fs_checker_naive.h b/gr-atsc/src/lib/atsci_fs_checker_naive.h index 3ef507111..21c628a1d 100644 --- a/gr-atsc/src/lib/atsci_fs_checker_naive.h +++ b/gr-atsc/src/lib/atsci_fs_checker_naive.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -67,7 +67,7 @@ class ATSC_API atsci_fs_checker_naive : public atsci_fs_checker { //! return delay in samples from input to output int delay () const; - + }; diff --git a/gr-atsc/src/lib/atsci_fs_correlator.cc b/gr-atsc/src/lib/atsci_fs_correlator.cc index 9e76537a0..efeb35176 100644 --- a/gr-atsc/src/lib/atsci_fs_correlator.cc +++ b/gr-atsc/src/lib/atsci_fs_correlator.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/atsci_fs_correlator.h b/gr-atsc/src/lib/atsci_fs_correlator.h index a6db7f518..ff70245c9 100644 --- a/gr-atsc/src/lib/atsci_fs_correlator.h +++ b/gr-atsc/src/lib/atsci_fs_correlator.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -61,5 +61,5 @@ public: //! return delay in samples from input to output virtual int delay () const = 0; }; - + #endif /* _ATSC_FS_CORRELATOR_H_ */ diff --git a/gr-atsc/src/lib/atsci_fs_correlator_naive.cc b/gr-atsc/src/lib/atsci_fs_correlator_naive.cc index 695641c20..ccf903531 100644 --- a/gr-atsc/src/lib/atsci_fs_correlator_naive.cc +++ b/gr-atsc/src/lib/atsci_fs_correlator_naive.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/atsci_fs_correlator_naive.h b/gr-atsc/src/lib/atsci_fs_correlator_naive.h index 92e3f7499..d8afc2ca6 100644 --- a/gr-atsc/src/lib/atsci_fs_correlator_naive.h +++ b/gr-atsc/src/lib/atsci_fs_correlator_naive.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -63,7 +63,7 @@ class ATSC_API atsci_fs_correlator_naive : public atsci_fs_correlator { //! return delay in samples from input to output int delay () const; - + }; diff --git a/gr-atsc/src/lib/atsci_pnXXX.cc b/gr-atsc/src/lib/atsci_pnXXX.cc index cfcf87f0b..128582d2d 100644 --- a/gr-atsc/src/lib/atsci_pnXXX.cc +++ b/gr-atsc/src/lib/atsci_pnXXX.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -45,7 +45,7 @@ const unsigned char atsc_pn511[511] = { 1,0,0,0, 1,1,0,0, 0,0,0,1, 1,1,1,0, 1,1,1,1, 1,1,0,1, 0,1,1,0, 1,0,1,0, 1,1,0,0, 1,0,0,1, 1,0,0,1, 0,0,0,1, 1,1,0,1, 1,1,0,0, 0,0,1,0, 1,1,0,1, - 0,0,0,0, 0,1,1,0, 1,1,0,0, 0,0,0,0, 1,0,0,1, 0,0,0,0, 0,0,0,1, 1,1,0 + 0,0,0,0, 0,1,1,0, 1,1,0,0, 0,0,0,0, 1,0,0,1, 0,0,0,0, 0,0,0,1, 1,1,0 }; const unsigned char atsc_pn63[63] = { diff --git a/gr-atsc/src/lib/atsci_pnXXX.h b/gr-atsc/src/lib/atsci_pnXXX.h index 58cb2d02d..612ed2034 100644 --- a/gr-atsc/src/lib/atsci_pnXXX.h +++ b/gr-atsc/src/lib/atsci_pnXXX.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/atsci_randomizer.cc b/gr-atsc/src/lib/atsci_randomizer.cc index 4a18e263a..8766bbef0 100644 --- a/gr-atsc/src/lib/atsci_randomizer.cc +++ b/gr-atsc/src/lib/atsci_randomizer.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -48,19 +48,19 @@ void atsci_randomizer::initialize_output_map () { s_output_map_initialized_p = true; - + for (int i = 0; i < (1 << 14); i++) s_output_map[i] = slow_output_map (i << 2); } -void +void atsci_randomizer::reset () { d_state = PRELOAD_VALUE; } -void +void atsci_randomizer::randomize (atsc_mpeg_packet_no_sync &out, const atsc_mpeg_packet &in) { assert (in.data[0] == MPEG_SYNC_BYTE); // confirm it's there, then drop diff --git a/gr-atsc/src/lib/atsci_randomizer.h b/gr-atsc/src/lib/atsci_randomizer.h index 30c3235bb..aedd0d808 100644 --- a/gr-atsc/src/lib/atsci_randomizer.h +++ b/gr-atsc/src/lib/atsci_randomizer.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2001 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, @@ -26,16 +26,16 @@ #include <atsc_api.h> #include <atsc_types.h> -/*! +/*! * \brief ATSC data "whitener" * - * The data randomizer described in ATSC standard A/53B. + * The data randomizer described in ATSC standard A/53B. * See figure D4 on page 54. */ class ATSC_API atsci_randomizer { friend class qa_atsci_randomizer; - + public: atsci_randomizer(); @@ -60,12 +60,12 @@ class ATSC_API atsci_randomizer { static unsigned char slow_output_map (int st); static unsigned char fast_output_map (int st){ - return s_output_map[(st & 0xb23c) >> 2]; // Magic const with 8 bits set improves cache + return s_output_map[(st & 0xb23c) >> 2]; // Magic const with 8 bits set improves cache // utilization. The bits correspond to the taps - // used in output calculation. Others may be + // used in output calculation. Others may be // safely ignored. } - + //! return current output value unsigned char output (){ return fast_output_map (d_state); diff --git a/gr-atsc/src/lib/atsci_reed_solomon.cc b/gr-atsc/src/lib/atsci_reed_solomon.cc index e20e76d71..a4a40e3f1 100644 --- a/gr-atsc/src/lib/atsci_reed_solomon.cc +++ b/gr-atsc/src/lib/atsci_reed_solomon.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -60,7 +60,7 @@ atsci_reed_solomon::encode (atsc_mpeg_packet_rs_encoded &out, const atsc_mpeg_pa unsigned char tmp[K]; assert ((int)(amount_of_pad + sizeof (in.data)) == K); - + // add missing prefix zero padding to message memset (tmp, 0, amount_of_pad); memcpy (&tmp[amount_of_pad], in.data, sizeof (in.data)); @@ -79,14 +79,14 @@ atsci_reed_solomon::decode (atsc_mpeg_packet_no_sync &out, const atsc_mpeg_packe int ncorrections; assert ((int)(amount_of_pad + sizeof (in.data)) == N); - + // add missing prefix zero padding to message memset (tmp, 0, amount_of_pad); memcpy (&tmp[amount_of_pad], in.data, sizeof (in.data)); - // correct message... + // correct message... ncorrections = decode_rs_char (d_rs, tmp, 0, 0); - + // copy corrected message to output, skipping prefix zero padding memcpy (out.data, &tmp[amount_of_pad], sizeof (out.data)); diff --git a/gr-atsc/src/lib/atsci_reed_solomon.h b/gr-atsc/src/lib/atsci_reed_solomon.h index 6f53c77ca..8f6e26426 100644 --- a/gr-atsc/src/lib/atsci_reed_solomon.h +++ b/gr-atsc/src/lib/atsci_reed_solomon.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/atsci_root_raised_cosine.cc b/gr-atsc/src/lib/atsci_root_raised_cosine.cc index 9409d2b9c..f555d90ac 100644 --- a/gr-atsc/src/lib/atsci_root_raised_cosine.cc +++ b/gr-atsc/src/lib/atsci_root_raised_cosine.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -24,7 +24,7 @@ #include <atsci_root_raised_cosine.h> #include <gr_firdes.h> -vector<float> +vector<float> atsc_root_raised_cosine::taps (double sampling_rate) { static const double symbol_rate = ATSC_SYMBOL_RATE/2; // 1/2 as wide because we're designing lp filter diff --git a/gr-atsc/src/lib/atsci_root_raised_cosine.h b/gr-atsc/src/lib/atsci_root_raised_cosine.h index 12870faba..f24606992 100644 --- a/gr-atsc/src/lib/atsci_root_raised_cosine.h +++ b/gr-atsc/src/lib/atsci_root_raised_cosine.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/atsci_root_raised_cosine_bandpass.cc b/gr-atsc/src/lib/atsci_root_raised_cosine_bandpass.cc index a7c427d06..f795a4166 100644 --- a/gr-atsc/src/lib/atsci_root_raised_cosine_bandpass.cc +++ b/gr-atsc/src/lib/atsci_root_raised_cosine_bandpass.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -29,7 +29,7 @@ using std::cerr; using std::endl; -vector<float> +vector<float> atsc_root_raised_cosine_bandpass::taps (double sampling_freq) { @@ -37,7 +37,7 @@ atsc_root_raised_cosine_bandpass::taps (double sampling_freq) cerr << "atsc_root_raised_cosine_bandpass::taps -- " << t.size () << endl; - // heterodyne the low pass coefficients up to the specified bandpass + // heterodyne the low pass coefficients up to the specified bandpass // center frequency. Note that when we do this, the filter bandwidth // is effectively twice the low pass (2.69 * 2 = 5.38) and hence // matches the diagram in the ATSC spec. diff --git a/gr-atsc/src/lib/atsci_root_raised_cosine_bandpass.h b/gr-atsc/src/lib/atsci_root_raised_cosine_bandpass.h index 98329ab53..bdb33c28d 100644 --- a/gr-atsc/src/lib/atsci_root_raised_cosine_bandpass.h +++ b/gr-atsc/src/lib/atsci_root_raised_cosine_bandpass.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/atsci_single_viterbi.cc b/gr-atsc/src/lib/atsci_single_viterbi.cc index f9d66ff8a..a1bf2ea49 100644 --- a/gr-atsc/src/lib/atsci_single_viterbi.cc +++ b/gr-atsc/src/lib/atsci_single_viterbi.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -70,11 +70,11 @@ atsci_single_viterbi::decode(float input) float min_metric = fabs(input - was_sent[index + 0]) + path_metrics[phase][transition_table[index + 0]]; - for (unsigned int symbol_sent = 1; symbol_sent < 4; symbol_sent++) - if( (fabs(input-was_sent[index+symbol_sent]) + + for (unsigned int symbol_sent = 1; symbol_sent < 4; symbol_sent++) + if( (fabs(input-was_sent[index+symbol_sent]) + path_metrics[phase][transition_table[index+symbol_sent]]) < min_metric) { - min_metric = fabs(input-was_sent[index+symbol_sent]) + + min_metric = fabs(input-was_sent[index+symbol_sent]) + path_metrics[phase][transition_table[index+symbol_sent]]; min_metric_symb = symbol_sent; } diff --git a/gr-atsc/src/lib/atsci_single_viterbi.h b/gr-atsc/src/lib/atsci_single_viterbi.h index cc752cb3a..01b13fb25 100644 --- a/gr-atsc/src/lib/atsci_single_viterbi.h +++ b/gr-atsc/src/lib/atsci_single_viterbi.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -30,7 +30,7 @@ */ class ATSC_API atsci_single_viterbi { - + public: atsci_single_viterbi (); @@ -55,4 +55,4 @@ protected: unsigned char phase; }; -#endif +#endif diff --git a/gr-atsc/src/lib/atsci_slicer_agc.h b/gr-atsc/src/lib/atsci_slicer_agc.h index 520fec44b..8a3927b70 100644 --- a/gr-atsc/src/lib/atsci_slicer_agc.h +++ b/gr-atsc/src/lib/atsci_slicer_agc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -38,7 +38,7 @@ class ATSC_API atsci_slicer_agc { public: atsci_slicer_agc () : _gain(1), dc(0.0025) {}; - + float gain () { return _gain; } #if 1 @@ -59,7 +59,7 @@ class ATSC_API atsci_slicer_agc { #endif protected: - + static const float REFERENCE = 1.25; // pilot reference value static const float RATE = 1.0e-5; // adjustment rate float _gain; // current gain diff --git a/gr-atsc/src/lib/atsci_sliding_correlator.cc b/gr-atsc/src/lib/atsci_sliding_correlator.cc index bde8022e0..877037db7 100644 --- a/gr-atsc/src/lib/atsci_sliding_correlator.cc +++ b/gr-atsc/src/lib/atsci_sliding_correlator.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2006 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, diff --git a/gr-atsc/src/lib/atsci_sliding_correlator.h b/gr-atsc/src/lib/atsci_sliding_correlator.h index 64834a4e2..ffa2124ed 100644 --- a/gr-atsc/src/lib/atsci_sliding_correlator.h +++ b/gr-atsc/src/lib/atsci_sliding_correlator.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -39,13 +39,13 @@ class ATSC_API atsci_sliding_correlator { ~atsci_sliding_correlator (){}; //! input hard decision bit, return correlation (0,511) - // Result is the number of wrong bits. + // Result is the number of wrong bits. // E.g., 0 -> perfect match; 511 -> all bits are wrong int input_bit (int bit); //! input sample, return correlation (0,511) - // Result is the number of wrong bits. + // Result is the number of wrong bits. // E.g., 0 -> perfect match; 511 -> all bits are wrong int input_int (int sample){ @@ -53,7 +53,7 @@ class ATSC_API atsci_sliding_correlator { } //! input sample, return correlation (0,511) - // Result is the number of wrong bits. + // Result is the number of wrong bits. // E.g., 0 -> perfect match; 511 -> all bits are wrong int input_float (float sample){ @@ -61,7 +61,7 @@ class ATSC_API atsci_sliding_correlator { } void reset () { input.reset (); } - + private: typedef unsigned long srblock; diff --git a/gr-atsc/src/lib/atsci_sssr.cc b/gr-atsc/src/lib/atsci_sssr.cc index 4ccee85de..48c0c51fb 100644 --- a/gr-atsc/src/lib/atsci_sssr.cc +++ b/gr-atsc/src/lib/atsci_sssr.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,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, @@ -47,7 +47,7 @@ sipp (bool digcorr_output) return -1; // no correlation } -/* +/* * ---------------------------------------------------------------- * Segment Sync Integrator... */ @@ -61,7 +61,7 @@ sssr::seg_sync_integrator::reset () for (int i = 0; i < ATSC_DATA_SEGMENT_LENGTH; i++) d_integrator[i] = SSI_MIN; } - + int sssr::seg_sync_integrator::update (int weight, int index) { @@ -78,7 +78,7 @@ sssr::seg_sync_integrator::find_max (int *v) { int best_value = d_integrator[0]; int best_index = 0; - + for (int i = 1; i < ATSC_DATA_SEGMENT_LENGTH; i++) if (d_integrator[i] > best_value){ best_value = d_integrator[i]; @@ -101,7 +101,7 @@ atsci_sssr::atsci_sssr () : d_debug_fp(0) { reset (); - + if (_SSSR_DIAG_OUTPUT_){ const char *file = "sssr.ssout"; if ((d_debug_fp = fopen (file, "wb")) == 0){ @@ -126,7 +126,7 @@ atsci_sssr::reset () for (int i = 0; i < ATSC_DATA_SEGMENT_LENGTH; i++) d_quad_output[i] = 0; - + d_timing_adjust = 0; d_counter = 0; d_symbol_index = 0; @@ -189,7 +189,7 @@ atsci_sssr::update (sssr::sample_t sample_in, // input static const double LOOP_FILTER_TAP = 0.00025; // 0.0005 works static const double ADJUSTMENT_GAIN = 1.0e-5 / (10 * ATSC_DATA_SEGMENT_LENGTH); - + atsci_interpolator::atsci_interpolator (double nominal_ratio_of_rx_clock_to_symbol_freq) : d_debug_fp(0) { @@ -239,10 +239,10 @@ atsci_interpolator::update ( return false; // FIXME Confirm that this is right. I think it is. It was (1-d_mu) - *output_sample = d_interp.interpolate (&input_samples[*index], d_mu); + *output_sample = d_interp.interpolate (&input_samples[*index], d_mu); double filter_out = 0; - + #if 0 filter_out = d_loop.filter (timing_adjustment); @@ -262,9 +262,9 @@ atsci_interpolator::update ( d_mu = d_mu + alpha * x; // conceptually "phase" d_w = d_w + beta * x; // conceptually "frequency" - + #endif - + double s = d_mu + d_w; double float_incr = floor (s); d_mu = s - float_incr; diff --git a/gr-atsc/src/lib/atsci_sssr.h b/gr-atsc/src/lib/atsci_sssr.h index 1dee54c1d..f3b825b3c 100644 --- a/gr-atsc/src/lib/atsci_sssr.h +++ b/gr-atsc/src/lib/atsci_sssr.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -48,7 +48,7 @@ namespace sssr { int d_sr; // 4 bit shift register public: - + // Constructor digital_correlator () { reset (); } @@ -73,7 +73,7 @@ namespace sssr { class ATSC_API seg_sync_integrator { signed char d_integrator[ATSC_DATA_SEGMENT_LENGTH]; - + public: // Constructor @@ -83,7 +83,7 @@ namespace sssr { //! called on channel change void reset (); - + //! update current tap with weight and return integrated correlation value int update (int weight, int index); @@ -91,7 +91,7 @@ namespace sssr { int find_max (int *value); }; - + // ---------------------------------------------------------------- //! quad filter (used to compute timing error) @@ -140,7 +140,7 @@ class ATSC_API atsci_sssr { bool d_seg_locked; FILE *d_debug_fp; - + bool incr_counter () { d_counter++; if (d_counter >= ATSC_DATA_SEGMENT_LENGTH){ @@ -149,7 +149,7 @@ class ATSC_API atsci_sssr { } return false; } - + void incr_symbol_index () { d_symbol_index++; if (d_symbol_index >= ATSC_DATA_SEGMENT_LENGTH) @@ -175,9 +175,9 @@ public: * track of where the segment sync's occur. \p timing_adjust is * returned to indicate how the interpolator timing needs to be * adjusted to track the transmitter's symbol timing. If \p seg_locked - * is true, then \p symbol_index is the index of this sample in - * the current segment. The symbols are numbered from 0 to 831, where - * symbols 0, 1, 2 and 3 correspond to the data segment sync pattern, + * is true, then \p symbol_index is the index of this sample in + * the current segment. The symbols are numbered from 0 to 831, where + * symbols 0, 1, 2 and 3 correspond to the data segment sync pattern, * nominally +5, -5, -5, +5. */ @@ -193,7 +193,7 @@ public: /*! * \brief interpolator control for segment and symbol sync recovery */ - + class ATSC_API atsci_interpolator { gri_mmse_fir_interpolator d_interp; gr_single_pole_iir<float,float,float> d_loop; // ``VCO'' loop filter @@ -235,7 +235,7 @@ public: double mu () const { return d_mu; } double w () const { return d_w; } int incr () const { return d_incr; } - + }; #endif /* _ATSC_SSSR_H_ */ diff --git a/gr-atsc/src/lib/atsci_syminfo.h b/gr-atsc/src/lib/atsci_syminfo.h index a8999e77a..9f25e4902 100644 --- a/gr-atsc/src/lib/atsci_syminfo.h +++ b/gr-atsc/src/lib/atsci_syminfo.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/atsci_sync_tag.h b/gr-atsc/src/lib/atsci_sync_tag.h index c644da39f..bdb64c5d3 100644 --- a/gr-atsc/src/lib/atsci_sync_tag.h +++ b/gr-atsc/src/lib/atsci_sync_tag.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -34,7 +34,7 @@ * type and all output streams share the same type. We'd use unsigned * char otherwise. */ - + namespace atsc_sync_tag { // Nothing special diff --git a/gr-atsc/src/lib/atsci_trellis_encoder.cc b/gr-atsc/src/lib/atsci_trellis_encoder.cc index 2ebccc371..2b3e851bc 100644 --- a/gr-atsc/src/lib/atsci_trellis_encoder.cc +++ b/gr-atsc/src/lib/atsci_trellis_encoder.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2006 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, @@ -65,7 +65,7 @@ atsci_trellis_encoder::reset () enc[i].reset (); } -void +void atsci_trellis_encoder::encode (atsc_data_segment out[NCODERS], const atsc_mpeg_packet_rs_encoded in[NCODERS]) { @@ -85,7 +85,7 @@ atsci_trellis_encoder::encode (atsc_data_segment out[NCODERS], } memset (out_copy, 0, sizeof (out_copy)); // FIXME, sanity check - + // do the deed... encode_helper (out_copy, in_copy); @@ -108,7 +108,7 @@ atsci_trellis_encoder::encode (atsc_data_segment out[NCODERS], * the correct answer. Maybe someday, when we've run out of better * things to do, rework to avoid the copying in encode. */ -void +void atsci_trellis_encoder::encode_helper (unsigned char output[OUTPUT_SIZE], const unsigned char input[INPUT_SIZE]) { @@ -123,7 +123,7 @@ atsci_trellis_encoder::encode_helper (unsigned char output[OUTPUT_SIZE], unsigned char symbol; int skip_encoder_bump; - /* FIXME, we may want special processing here + /* FIXME, we may want special processing here for a flag byte to keep track of which part of the field we're in? */ encoder = NCODERS - ENCODER_SEG_BUMP; @@ -136,7 +136,7 @@ atsci_trellis_encoder::encode_helper (unsigned char output[OUTPUT_SIZE], chunk += NCODERS) { /* Load a new chunk of bytes into the Trellis encoder buffers. They get loaded in an order that depends on where we are in the - segment sync progress (sigh). + segment sync progress (sigh). GRR! When the chunk reload happens at the same time as the segment boundary, we should bump the encoder NOW for the reload, rather than LATER during the bitshift transition!!! */ @@ -144,7 +144,7 @@ atsci_trellis_encoder::encode_helper (unsigned char output[OUTPUT_SIZE], encoder = (encoder + ENCODER_SEG_BUMP) % NCODERS; skip_encoder_bump = 1; } - + for (i = 0; i < NCODERS; i++) { /* for debug */ trellis_wherefrom[encoder] = chunk+i; trellis_buffer[encoder] = input [chunk+i]; @@ -193,7 +193,7 @@ atsci_trellis_encoder::encode_helper (unsigned char output[OUTPUT_SIZE], } /* Encoders */ } /* Bit shifts */ } /* Chunks */ - + /* Check up on ourselves */ #if 0 assertIntsEqual (0, (INPUT_SIZE * DIBITS_PER_BYTE) % NCODERS, "not %"); diff --git a/gr-atsc/src/lib/atsci_trellis_encoder.h b/gr-atsc/src/lib/atsci_trellis_encoder.h index 53be3fc22..294ad860f 100644 --- a/gr-atsc/src/lib/atsci_trellis_encoder.h +++ b/gr-atsc/src/lib/atsci_trellis_encoder.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -50,12 +50,12 @@ class ATSC_API atsci_trellis_encoder { void encode (atsc_data_segment out[NCODERS], const atsc_mpeg_packet_rs_encoded in[NCODERS]); - + protected: static const int SEGMENT_SIZE = ATSC_MPEG_RS_ENCODED_LENGTH; // 207 static const int INPUT_SIZE = (SEGMENT_SIZE * 12); static const int OUTPUT_SIZE = (ATSC_DATA_SEGMENT_LENGTH * 12); - + void encode_helper (unsigned char out[OUTPUT_SIZE], const unsigned char in[INPUT_SIZE]); diff --git a/gr-atsc/src/lib/atsci_viterbi_decoder.cc b/gr-atsc/src/lib/atsci_viterbi_decoder.cc index 5b9ae4e10..8804f6007 100644 --- a/gr-atsc/src/lib/atsci_viterbi_decoder.cc +++ b/gr-atsc/src/lib/atsci_viterbi_decoder.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -49,7 +49,7 @@ atsci_viterbi_decoder::atsci_viterbi_decoder () * If anybody cares, it is possible to do it with less delay, but * this approach is at least somewhat understandable... */ - + // the -4 is for the 4 sync symbols int fifo_size = ATSC_DATA_SEGMENT_LENGTH - 4 - viterbi[0].delay (); for (int i = 0; i < NCODERS; i++) @@ -90,7 +90,7 @@ atsci_viterbi_decoder::decode (atsc_mpeg_packet_rs_encoded out[NCODERS], } memset (out_copy, 0, sizeof (out_copy)); // sanity check - + // do the deed... decode_helper (out_copy, in_copy); @@ -99,8 +99,8 @@ atsci_viterbi_decoder::decode (atsc_mpeg_packet_rs_encoded out[NCODERS], memcpy (&out[i].data[0], &out_copy[i * OUTPUT_SIZE/NCODERS], ATSC_MPEG_RS_ENCODED_LENGTH * sizeof (out_copy[0])); - - + + // adjust pipeline info to reflect 12 segment delay plinfo::delay (out[i].pli, in[i].pli, NCODERS); } @@ -150,13 +150,13 @@ atsci_viterbi_decoder::decode_helper (unsigned char out[OUTPUT_SIZE], #undef VERBOSE // printf ("@@@ DIBITS @@@\n"); - + /* Now run each of the 12 Trellis encoders over their subset of the input symbols */ for (encoder = 0; encoder < NCODERS; encoder++) { dbi = 0; /* Reinitialize dibit index for new encoder */ fifo_t *dibit_fifo = fifo[encoder]; - + /* Feed all the incoming symbols into one encoder; pump them into the relevant dibits. */ for (i = 0; i < enco_which_max; i++) { diff --git a/gr-atsc/src/lib/atsci_viterbi_decoder.h b/gr-atsc/src/lib/atsci_viterbi_decoder.h index 1243feeb5..f339ce79a 100644 --- a/gr-atsc/src/lib/atsci_viterbi_decoder.h +++ b/gr-atsc/src/lib/atsci_viterbi_decoder.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -61,20 +61,20 @@ public: const atsc_soft_data_segment in[NCODERS]); - + protected: typedef interleaver_fifo<unsigned char> fifo_t; static const int SEGMENT_SIZE = ATSC_MPEG_RS_ENCODED_LENGTH; // 207 static const int OUTPUT_SIZE = (SEGMENT_SIZE * 12); static const int INPUT_SIZE = (ATSC_DATA_SEGMENT_LENGTH * 12); - + void decode_helper (unsigned char out[OUTPUT_SIZE], const float in[INPUT_SIZE]); - + single_viterbi_t viterbi[NCODERS]; - fifo_t *fifo[NCODERS]; + fifo_t *fifo[NCODERS]; bool debug; }; diff --git a/gr-atsc/src/lib/atsci_viterbi_gen.cc b/gr-atsc/src/lib/atsci_viterbi_gen.cc index ea5c3fa87..bff3c4773 100644 --- a/gr-atsc/src/lib/atsci_viterbi_gen.cc +++ b/gr-atsc/src/lib/atsci_viterbi_gen.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2006 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, @@ -71,7 +71,7 @@ static const int bit2[8] = {0, 99, 2, 98, 4, 97, 6, 96}; /* Detailed Debugging */ int debug_dec = 0; -/* +/* * Build indirect data structures to say which symbols go into which * encoder, and then where the resulting dibits from the encoders go. */ @@ -116,7 +116,7 @@ build_decode_structures (char *fileout) chunk += ENCODERS) { /* Associate data bytes with the Trellis encoders. They get loaded or stored in an order that depends on where we are in the - segment sync progress (sigh). + segment sync progress (sigh). GRR! When the chunk reload happens at the same time as the segment boundary, we should bump the encoder NOW for the reload, rather than LATER during the bitshift transition!!! */ @@ -124,7 +124,7 @@ build_decode_structures (char *fileout) encoder = (encoder + ENCODER_SEG_BUMP) % ENCODERS; skip_encoder_bump = 1; } - + /* Remember where the data bytes are going to go, once we've accumulated them from the 12 interleaved decoders */ for (i = 0; i < ENCODERS; i++) { @@ -175,7 +175,7 @@ build_decode_structures (char *fileout) encoder++; if (encoder >= ENCODERS) encoder = 0; } /* Encoders */ } /* Bit shifts */ - + #if 0 /* Now dump out the chunk of 12 data bytes that the twelve decoders have accumulated. */ @@ -190,7 +190,7 @@ build_decode_structures (char *fileout) } /* Dumping encoder bytes */ #endif } /* Chunks */ - + /* Now print the resulting data structures in C++ */ if (!freopen(fileout, "w", stdout)) @@ -215,7 +215,7 @@ build_decode_structures (char *fileout) printf ("};\n\n"); enco_which_max = enco_dibits[0] - enco_which_dibits[0]; - for (i = 0; i < ENCODERS; i++) + for (i = 0; i < ENCODERS; i++) if (enco_which_max != enco_dibits[i] - enco_which_dibits[i]) { cerr << "Encoder " << i << " has different max_dibits " << enco_dibits[i] - enco_which_dibits[i] << " than " << enco_which_max; @@ -248,7 +248,7 @@ build_decode_structures (char *fileout) int usage() -{ +{ cerr << "atsc_viterbi_gen: Usage:\n"; cerr << " ./atsc_viterbi_gen -o atsc_viterbi_mux.cc\n"; cerr << "That's all, folks!\n"; @@ -257,7 +257,7 @@ usage() int -main(int argc, char **argv) +main(int argc, char **argv) { if (argc != 3) return usage(); if (argv[1][0] != '-' diff --git a/gr-atsc/src/lib/atsci_vsbtx_lp.cc b/gr-atsc/src/lib/atsci_vsbtx_lp.cc index 224d29ac1..704cd00ca 100644 --- a/gr-atsc/src/lib/atsci_vsbtx_lp.cc +++ b/gr-atsc/src/lib/atsci_vsbtx_lp.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -39,7 +39,7 @@ static const float atsc_vsbtx_lp2x[] = { // is a within 5% of target? -static bool +static bool close_enough_p (double a, double target) { double delta = fabs (target * 0.05); // 5 percent @@ -47,7 +47,7 @@ close_enough_p (double a, double target) return fabs (target - a) <= delta; } -vector<float> +vector<float> atsc_vsbtx_lp::taps (double sampling_freq) { if (close_enough_p (sampling_freq, 2 * ATSC_SYMBOL_RATE)){ diff --git a/gr-atsc/src/lib/atsci_vsbtx_lp.dat b/gr-atsc/src/lib/atsci_vsbtx_lp.dat index 448fda7a2..0fa54d42b 100644 --- a/gr-atsc/src/lib/atsci_vsbtx_lp.dat +++ b/gr-atsc/src/lib/atsci_vsbtx_lp.dat @@ -3,9 +3,9 @@ * FILTER TYPE:LOW PASS 1H * PASSBAND RIPPLE IN -dB -.0100 * STOPBAND RIPPLE IN -dB -76.0000 - * PASSBAND CUTOFF FREQUENCY .250000 HERTZ - * STOPBAND CUTOFF FREQUENCY .360000 HERTZ - * SAMPLING FREQUENCY 1.00000 HERTZ + * PASSBAND CUTOFF FREQUENCY .250000 HERTZ + * STOPBAND CUTOFF FREQUENCY .360000 HERTZ + * SAMPLING FREQUENCY 1.00000 HERTZ */ /* * gain of 2 diff --git a/gr-atsc/src/lib/atsci_vsbtx_lp.h b/gr-atsc/src/lib/atsci_vsbtx_lp.h index d3bb0c9d1..b892641c9 100644 --- a/gr-atsc/src/lib/atsci_vsbtx_lp.h +++ b/gr-atsc/src/lib/atsci_vsbtx_lp.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/convolutional_interleaver.h b/gr-atsc/src/lib/convolutional_interleaver.h index 0b5ae6f4b..35a31d487 100644 --- a/gr-atsc/src/lib/convolutional_interleaver.h +++ b/gr-atsc/src/lib/convolutional_interleaver.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -40,7 +40,7 @@ class convolutional_interleaver { //! reset interleaver (flushes contents and resets commutator) void reset (); - + //! sync interleaver (resets commutator, but doesn't flush fifos) void sync () { m_commutator = 0; } @@ -79,7 +79,7 @@ convolutional_interleaver<symbol_type>::convolutional_interleaver ( m_fifo_size_incr = fifo_size_incr; m_fifo.resize (nbanks); - + if (interleave_p){ // configure as interleaver for (int i = 0; i < nbanks; i++) m_fifo[i] = new interleaver_fifo<symbol_type>(i * fifo_size_incr); diff --git a/gr-atsc/src/lib/create_atsci_equalizer.cc b/gr-atsc/src/lib/create_atsci_equalizer.cc index bc4eecfb3..f784116d2 100644 --- a/gr-atsc/src/lib/create_atsci_equalizer.cc +++ b/gr-atsc/src/lib/create_atsci_equalizer.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/create_atsci_equalizer.h b/gr-atsc/src/lib/create_atsci_equalizer.h index fd26237d8..b291e0bbd 100644 --- a/gr-atsc/src/lib/create_atsci_equalizer.h +++ b/gr-atsc/src/lib/create_atsci_equalizer.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/create_atsci_fs_checker.cc b/gr-atsc/src/lib/create_atsci_fs_checker.cc index 107e35ce7..5b9a4092c 100644 --- a/gr-atsc/src/lib/create_atsci_fs_checker.cc +++ b/gr-atsc/src/lib/create_atsci_fs_checker.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/create_atsci_fs_checker.h b/gr-atsc/src/lib/create_atsci_fs_checker.h index 23451757a..42119a6d4 100644 --- a/gr-atsc/src/lib/create_atsci_fs_checker.h +++ b/gr-atsc/src/lib/create_atsci_fs_checker.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/create_atsci_fs_correlator.cc b/gr-atsc/src/lib/create_atsci_fs_correlator.cc index 6f65a7e7d..414b2d7f4 100644 --- a/gr-atsc/src/lib/create_atsci_fs_correlator.cc +++ b/gr-atsc/src/lib/create_atsci_fs_correlator.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/create_atsci_fs_correlator.h b/gr-atsc/src/lib/create_atsci_fs_correlator.h index 7b663fd56..b9b037403 100644 --- a/gr-atsc/src/lib/create_atsci_fs_correlator.h +++ b/gr-atsc/src/lib/create_atsci_fs_correlator.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/fpll_btloop_coupling.h b/gr-atsc/src/lib/fpll_btloop_coupling.h index e17425d04..9a1a99d86 100644 --- a/gr-atsc/src/lib/fpll_btloop_coupling.h +++ b/gr-atsc/src/lib/fpll_btloop_coupling.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/gen_encoder.py b/gr-atsc/src/lib/gen_encoder.py index 4356cdc6a..6c8fabf7a 100755 --- a/gr-atsc/src/lib/gen_encoder.py +++ b/gr-atsc/src/lib/gen_encoder.py @@ -1,24 +1,24 @@ #!/usr/bin/python # # Copyright 2002 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# def output(input, state): x2 = (input >> 1) & 0x1 @@ -43,7 +43,7 @@ def next_state(input, state): s1 = x2 ^ s0 t1 = u0 u1 = t0 ^ x1 - + return (s1 << 2) | (t1 << 1) | u1 print "@@@ NEXT @@@" @@ -60,4 +60,4 @@ for i in range (32): state = (i >> 2) & 0x7 input = i & 0x3 print output (input, state) - + diff --git a/gr-atsc/src/lib/interleaver_fifo.h b/gr-atsc/src/lib/interleaver_fifo.h index 6d1a44580..cacac85a3 100644 --- a/gr-atsc/src/lib/interleaver_fifo.h +++ b/gr-atsc/src/lib/interleaver_fifo.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -40,7 +40,7 @@ class interleaver_fifo { //! reset interleaver (flushes contents and resets commutator) void reset (); - + //! stuff a symbol into the fifo and return the oldest symbol_type stuff (symbol_type input){ if (m_size == 0) diff --git a/gr-atsc/src/lib/plinfo.cc b/gr-atsc/src/lib/plinfo.cc index 905037b4b..30e192907 100644 --- a/gr-atsc/src/lib/plinfo.cc +++ b/gr-atsc/src/lib/plinfo.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2006 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, @@ -28,7 +28,7 @@ plinfo::delay (plinfo &out, const plinfo &in, int nsegs_of_delay) { assert (in.regular_seg_p ()); assert (nsegs_of_delay >= 0); - + int s = in.segno (); if (in.in_field2_p ()) s += ATSC_DSEGS_PER_FIELD; diff --git a/gr-atsc/src/lib/qa_atsci.cc b/gr-atsc/src/lib/qa_atsci.cc index 262b52841..8dc940bcb 100644 --- a/gr-atsc/src/lib/qa_atsci.cc +++ b/gr-atsc/src/lib/qa_atsci.cc @@ -1,18 +1,18 @@ /* * Copyright 2002 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, @@ -58,6 +58,6 @@ qa_atsc::suite () s->addTest (qa_atsci_viterbi_decoder::suite ()); s->addTest (qa_atsci_fs_correlator::suite ()); s->addTest (qa_atsci_equalizer_nop::suite ()); - + return s; } diff --git a/gr-atsc/src/lib/qa_atsci.h b/gr-atsc/src/lib/qa_atsci.h index abf3aab58..86aca2d32 100644 --- a/gr-atsc/src/lib/qa_atsci.h +++ b/gr-atsc/src/lib/qa_atsci.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/qa_atsci_basic_trellis_encoder.cc b/gr-atsc/src/lib/qa_atsci_basic_trellis_encoder.cc index c7ed016d4..4a8137424 100644 --- a/gr-atsc/src/lib/qa_atsci_basic_trellis_encoder.cc +++ b/gr-atsc/src/lib/qa_atsci_basic_trellis_encoder.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/qa_atsci_basic_trellis_encoder.h b/gr-atsc/src/lib/qa_atsci_basic_trellis_encoder.h index 1ac4867ba..e413d0d3d 100644 --- a/gr-atsc/src/lib/qa_atsci_basic_trellis_encoder.h +++ b/gr-atsc/src/lib/qa_atsci_basic_trellis_encoder.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/qa_atsci_data_interleaver.cc b/gr-atsc/src/lib/qa_atsci_data_interleaver.cc index e76a2f1f5..6069e8680 100644 --- a/gr-atsc/src/lib/qa_atsci_data_interleaver.cc +++ b/gr-atsc/src/lib/qa_atsci_data_interleaver.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -62,7 +62,7 @@ qa_atsci_data_interleaver::print_packet (FILE *fp, for (int i = 0; i < 8; i++) fprintf (fp, "%02X", p[i]); - + fprintf (fp, " ... "); p = &in.data[191]; for (int i = 0; i < 8; i++) @@ -102,7 +102,7 @@ qa_atsci_data_interleaver::t0 () atsc_mpeg_packet_rs_encoded zero; memset (&zero, 0, sizeof (zero)); - + for (int frame = 0; frame < 4; frame++){ for (int field = 0; field < 2; field++){ for (int segment = 0; segment < 312; segment++, counter++){ @@ -149,9 +149,9 @@ qa_atsci_data_interleaver::t1 () atsc_mpeg_packet_rs_encoded zero; memset (&zero, 0, sizeof (zero)); - + static const int NCRAP = 13; - + // push NCRAP segments of crap into the interleaver, // but don't change the deinterleaver state @@ -164,7 +164,7 @@ qa_atsci_data_interleaver::t1 () // now run the normal test. // we should get good segments after NCRAP + 52 - + int starting_counter = 3141; counter = starting_counter; diff --git a/gr-atsc/src/lib/qa_atsci_data_interleaver.h b/gr-atsc/src/lib/qa_atsci_data_interleaver.h index c5088bb5a..6b9408c9a 100644 --- a/gr-atsc/src/lib/qa_atsci_data_interleaver.h +++ b/gr-atsc/src/lib/qa_atsci_data_interleaver.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -45,7 +45,7 @@ class qa_atsci_data_interleaver : public CppUnit::TestCase { private: atsci_data_interleaver outbound; atsci_data_deinterleaver inbound; - + void t0 (); void t1 (); diff --git a/gr-atsc/src/lib/qa_atsci_equalizer_nop.cc b/gr-atsc/src/lib/qa_atsci_equalizer_nop.cc index 85584f55f..7039eeb8e 100644 --- a/gr-atsc/src/lib/qa_atsci_equalizer_nop.cc +++ b/gr-atsc/src/lib/qa_atsci_equalizer_nop.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -83,7 +83,7 @@ init_field_sync_tags (atsc::syminfo *tags, int fieldnum) static void init_field_sync_common (float *p, int mask) - + { int i = 0; @@ -100,7 +100,7 @@ init_field_sync_common (float *p, int mask) for (int j = 0; j < 63; j++) // PN63, toggled on field 2 p[i++] = bin_map (atsc_pn63[j] ^ mask); - + for (int j = 0; j < 63; j++) // PN63 p[i++] = bin_map (atsc_pn63[j]); diff --git a/gr-atsc/src/lib/qa_atsci_equalizer_nop.h b/gr-atsc/src/lib/qa_atsci_equalizer_nop.h index a0d23da08..244daf8b3 100644 --- a/gr-atsc/src/lib/qa_atsci_equalizer_nop.h +++ b/gr-atsc/src/lib/qa_atsci_equalizer_nop.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/qa_atsci_fake_single_viterbi.cc b/gr-atsc/src/lib/qa_atsci_fake_single_viterbi.cc index 1f5ba6b59..2cc646daf 100644 --- a/gr-atsc/src/lib/qa_atsci_fake_single_viterbi.cc +++ b/gr-atsc/src/lib/qa_atsci_fake_single_viterbi.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -39,7 +39,7 @@ static const int NN = 200; static const int MAXDIBIT = 3; void -qa_atsci_fake_single_viterbi::encode_block (unsigned char *out, unsigned char *in, +qa_atsci_fake_single_viterbi::encode_block (unsigned char *out, unsigned char *in, unsigned int n) { for (unsigned int i = 0; i < n; i++) { @@ -49,7 +49,7 @@ qa_atsci_fake_single_viterbi::encode_block (unsigned char *out, unsigned char *i void -qa_atsci_fake_single_viterbi::decode_block (unsigned char *out, unsigned char *in, +qa_atsci_fake_single_viterbi::decode_block (unsigned char *out, unsigned char *in, unsigned int n) { for (unsigned int i = 0; i < n; i++) { @@ -79,9 +79,9 @@ qa_atsci_fake_single_viterbi::t0 () int i; // printf (" Delay is %d.\n", delay); - + srandom (27); // reproducable sequence of "random" values - + for (int nt = 0; nt < NTRIALS; nt++){ // load block with random data and encode diff --git a/gr-atsc/src/lib/qa_atsci_fake_single_viterbi.h b/gr-atsc/src/lib/qa_atsci_fake_single_viterbi.h index 60a8d964e..47805952c 100644 --- a/gr-atsc/src/lib/qa_atsci_fake_single_viterbi.h +++ b/gr-atsc/src/lib/qa_atsci_fake_single_viterbi.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -33,7 +33,7 @@ class qa_atsci_fake_single_viterbi : public CppUnit::TestCase { private: atsci_fake_single_viterbi decoder; atsci_basic_trellis_encoder encoder; - + CPPUNIT_TEST_SUITE (qa_atsci_fake_single_viterbi); CPPUNIT_TEST (t0); CPPUNIT_TEST_SUITE_END (); diff --git a/gr-atsc/src/lib/qa_atsci_fs_correlator.cc b/gr-atsc/src/lib/qa_atsci_fs_correlator.cc index ebfc564de..591c84050 100644 --- a/gr-atsc/src/lib/qa_atsci_fs_correlator.cc +++ b/gr-atsc/src/lib/qa_atsci_fs_correlator.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -52,7 +52,7 @@ bin_map (int bit) static void init_field_sync_common (float *p, int mask) - + { int i = 0; @@ -69,7 +69,7 @@ init_field_sync_common (float *p, int mask) for (int j = 0; j < 63; j++) // PN63, toggled on field 2 p[i++] = bin_map(atsc_pn63[j] ^ mask); - + for (int j = 0; j < 63; j++) // PN63 p[i++] = bin_map(atsc_pn63[j]); @@ -191,9 +191,9 @@ qa_atsci_fs_correlator::util (int which_field, int nerrs1, int nerrs2) float input[ISIZE]; fsc->reset (); // known starting conditions - + // build input - + for (i = 0; i < PAD; i++) input[i] = uniform () * 7; @@ -205,7 +205,7 @@ qa_atsci_fs_correlator::util (int which_field, int nerrs1, int nerrs2) input[i] = uniform () * 7; // run the input and check - + for (i = 0; i < ISIZE; i++){ fsc->filter (input[i], &output_sample, &output_tag); if (i == delay + PAD){ // should be field sync diff --git a/gr-atsc/src/lib/qa_atsci_fs_correlator.h b/gr-atsc/src/lib/qa_atsci_fs_correlator.h index 9d984d94f..4785f096e 100644 --- a/gr-atsc/src/lib/qa_atsci_fs_correlator.h +++ b/gr-atsc/src/lib/qa_atsci_fs_correlator.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -30,7 +30,7 @@ class atsci_fs_correlator; class qa_atsci_fs_correlator : public CppUnit::TestCase { private: atsci_fs_correlator *fsc; - + public: void setUp (); @@ -47,7 +47,7 @@ private: private: void util (int which_field, int nerr1, int nerr2); - + void t0 (); void t1 (); void t2 (); diff --git a/gr-atsc/src/lib/qa_atsci_randomizer.cc b/gr-atsc/src/lib/qa_atsci_randomizer.cc index b2d0bde8a..c12582dfd 100644 --- a/gr-atsc/src/lib/qa_atsci_randomizer.cc +++ b/gr-atsc/src/lib/qa_atsci_randomizer.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -93,7 +93,7 @@ qa_atsci_randomizer::t3_reset () } randomizer.reset (); // reset LFSR - + // and now should repeat expected values for (unsigned int i = 0; i < NELEMENTS (expected_initial_values); i++){ @@ -110,7 +110,7 @@ qa_atsci_randomizer::t4_high_level () atsc_mpeg_packet in[N]; atsc_mpeg_packet_no_sync middle[N]; atsc_mpeg_packet out[N]; - + memset (in, 0, sizeof (in)); memset (middle, 0, sizeof (middle)); memset (out, 0, sizeof (out)); diff --git a/gr-atsc/src/lib/qa_atsci_randomizer.h b/gr-atsc/src/lib/qa_atsci_randomizer.h index f1b1a1b26..16d12754f 100644 --- a/gr-atsc/src/lib/qa_atsci_randomizer.h +++ b/gr-atsc/src/lib/qa_atsci_randomizer.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -30,7 +30,7 @@ class qa_atsci_randomizer : public CppUnit::TestCase { private: atsci_randomizer randomizer; - + public: void setUp (){ @@ -56,7 +56,7 @@ class qa_atsci_randomizer : public CppUnit::TestCase { void t2_initial_values (); void t3_reset (); void t4_high_level (); - + }; #endif /* _QA_ATSC_RANDOMIZER_H_ */ diff --git a/gr-atsc/src/lib/qa_atsci_reed_solomon.cc b/gr-atsc/src/lib/qa_atsci_reed_solomon.cc index b08c8af52..81766f856 100644 --- a/gr-atsc/src/lib/qa_atsci_reed_solomon.cc +++ b/gr-atsc/src/lib/qa_atsci_reed_solomon.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/qa_atsci_reed_solomon.h b/gr-atsc/src/lib/qa_atsci_reed_solomon.h index 22f1743de..95d642e72 100644 --- a/gr-atsc/src/lib/qa_atsci_reed_solomon.h +++ b/gr-atsc/src/lib/qa_atsci_reed_solomon.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/qa_atsci_single_viterbi.cc b/gr-atsc/src/lib/qa_atsci_single_viterbi.cc index 95e595026..ca0cf7464 100644 --- a/gr-atsc/src/lib/qa_atsci_single_viterbi.cc +++ b/gr-atsc/src/lib/qa_atsci_single_viterbi.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -40,7 +40,7 @@ static const int NN = 200; static const int MAXDIBIT = 3; void -qa_atsci_single_viterbi::encode_block (unsigned char *out, unsigned char *in, +qa_atsci_single_viterbi::encode_block (unsigned char *out, unsigned char *in, unsigned int n) { for (unsigned int i = 0; i < n; i++) { @@ -50,7 +50,7 @@ qa_atsci_single_viterbi::encode_block (unsigned char *out, unsigned char *in, void -qa_atsci_single_viterbi::decode_block (unsigned char *out, unsigned char *in, +qa_atsci_single_viterbi::decode_block (unsigned char *out, unsigned char *in, unsigned int n, float noise_factor) { for (unsigned int i = 0; i < n; i++) { @@ -76,9 +76,9 @@ qa_atsci_single_viterbi::t0 () int i; // printf (" Delay is %d.\n", delay); - + srandom (27); // reproducable sequence of "random" values - + for (int nt = 0; nt < NTRIALS; nt++){ // load block with random data and encode @@ -154,9 +154,9 @@ qa_atsci_single_viterbi::t1 () int i; // printf (" Delay is %d.\n", delay); - + srandom (1); // reproducable sequence of "random" values - + for (int nt = 0; nt < NTRIALS; nt++){ // test up to the error correction capacity of the code @@ -180,7 +180,7 @@ qa_atsci_single_viterbi::t1 () // If we munge any or all of the three bits of the symbol, // our decoder frequently gets the wrong data even with a single // error. - // + // // Let's see what it can do with just the two low-order bits. // // ALSO: Don't let any error be within 12 spots of another @@ -198,7 +198,7 @@ qa_atsci_single_viterbi::t1 () // Don't insert errors in the first delay slot, since we // don't have valid history to correct them. Also, don't // insert burst errors (adjacent errors), or errors within 2, - // since we can't reliably correct them. Also we must not choose + // since we can't reliably correct them. Also we must not choose // the same location twice when inserting an error. do { diff --git a/gr-atsc/src/lib/qa_atsci_single_viterbi.h b/gr-atsc/src/lib/qa_atsci_single_viterbi.h index 057c29e8e..07585de22 100644 --- a/gr-atsc/src/lib/qa_atsci_single_viterbi.h +++ b/gr-atsc/src/lib/qa_atsci_single_viterbi.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -33,7 +33,7 @@ class qa_atsci_single_viterbi : public CppUnit::TestCase { private: atsci_single_viterbi decoder; atsci_basic_trellis_encoder encoder; - + CPPUNIT_TEST_SUITE (qa_atsci_single_viterbi); CPPUNIT_TEST (t0); CPPUNIT_TEST (t1); diff --git a/gr-atsc/src/lib/qa_atsci_sliding_correlator.cc b/gr-atsc/src/lib/qa_atsci_sliding_correlator.cc index 0c5d98701..4b215ba85 100644 --- a/gr-atsc/src/lib/qa_atsci_sliding_correlator.cc +++ b/gr-atsc/src/lib/qa_atsci_sliding_correlator.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, diff --git a/gr-atsc/src/lib/qa_atsci_sliding_correlator.h b/gr-atsc/src/lib/qa_atsci_sliding_correlator.h index 6e7417326..bdcd09319 100644 --- a/gr-atsc/src/lib/qa_atsci_sliding_correlator.h +++ b/gr-atsc/src/lib/qa_atsci_sliding_correlator.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -33,7 +33,7 @@ class qa_atsci_sliding_correlator : public CppUnit::TestCase { public: - void setUp (void) + void setUp (void) { corr.reset (); } @@ -44,7 +44,7 @@ class qa_atsci_sliding_correlator : public CppUnit::TestCase { private: atsci_sliding_correlator corr; - + void t0 (); }; diff --git a/gr-atsc/src/lib/qa_atsci_trellis_encoder.cc b/gr-atsc/src/lib/qa_atsci_trellis_encoder.cc index 390776e82..d3a3482f0 100644 --- a/gr-atsc/src/lib/qa_atsci_trellis_encoder.cc +++ b/gr-atsc/src/lib/qa_atsci_trellis_encoder.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -45,7 +45,7 @@ qa_atsci_trellis_encoder::t0 () atsc_mpeg_packet_rs_encoded in[NCODERS]; atsc_data_segment out[NCODERS]; - + memset (in, 0, sizeof (in)); memset (out, 0, sizeof (out)); @@ -59,7 +59,7 @@ qa_atsci_trellis_encoder::t0 () printf ("%d\n", t); } } - + enc.reset (); enc.encode (out, in); diff --git a/gr-atsc/src/lib/qa_atsci_trellis_encoder.h b/gr-atsc/src/lib/qa_atsci_trellis_encoder.h index 42b33239d..fcd114330 100644 --- a/gr-atsc/src/lib/qa_atsci_trellis_encoder.h +++ b/gr-atsc/src/lib/qa_atsci_trellis_encoder.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -33,7 +33,7 @@ class qa_atsci_trellis_encoder : public CppUnit::TestCase { public: - void setUp (void) + void setUp (void) { enc.reset (); } @@ -45,7 +45,7 @@ class qa_atsci_trellis_encoder : public CppUnit::TestCase { private: atsci_trellis_encoder enc; - + void t0 (); void t1 (); }; diff --git a/gr-atsc/src/lib/qa_atsci_viterbi_decoder.cc b/gr-atsc/src/lib/qa_atsci_viterbi_decoder.cc index 4632ec40a..8902b6eb8 100644 --- a/gr-atsc/src/lib/qa_atsci_viterbi_decoder.cc +++ b/gr-atsc/src/lib/qa_atsci_viterbi_decoder.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -75,7 +75,7 @@ qa_atsci_viterbi_decoder::t0 () atsc_mpeg_packet_rs_encoded decoder_out[NCODERS]; atsc_mpeg_packet_rs_encoded decoder_out_pad[NCODERS]; - + memset (encoder_in, 0, sizeof (encoder_in)); memset (encoder_out, 0, sizeof (encoder_out)); memset (decoder_out_pad, 0, sizeof (decoder_out_pad)); @@ -88,7 +88,7 @@ qa_atsci_viterbi_decoder::t0 () encoder_in[i].data[j] = t; } } - + fflush (stdout); printf ("@@@ ENCODER INPUT @@@\n"); for (int i = 0; i < NCODERS; i++){ @@ -113,7 +113,7 @@ qa_atsci_viterbi_decoder::t0 () viterbi.reset (); // this has only the previous (non-existant) output - viterbi.decode (decoder_out_pad, decoder_in); + viterbi.decode (decoder_out_pad, decoder_in); // now we'll see the real output pad_decoder_input (decoder_in_pad); @@ -166,7 +166,7 @@ qa_atsci_viterbi_decoder::t1 () viterbi.reset (); // this has only the previous (non-existant) output - viterbi.decode (decoder_out_pad, decoder_in); + viterbi.decode (decoder_out_pad, decoder_in); // now we'll see the real output pad_decoder_input (decoder_in_pad); diff --git a/gr-atsc/src/lib/qa_atsci_viterbi_decoder.h b/gr-atsc/src/lib/qa_atsci_viterbi_decoder.h index 3e74d2bb6..440c79caf 100644 --- a/gr-atsc/src/lib/qa_atsci_viterbi_decoder.h +++ b/gr-atsc/src/lib/qa_atsci_viterbi_decoder.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -33,7 +33,7 @@ class qa_atsci_viterbi_decoder : public CppUnit::TestCase { public: - void setUp (void) + void setUp (void) { viterbi.reset (); } @@ -45,7 +45,7 @@ class qa_atsci_viterbi_decoder : public CppUnit::TestCase { private: atsci_viterbi_decoder viterbi; - + void t0 (); void t1 (); }; diff --git a/gr-atsc/src/lib/qa_convolutional_interleaver.cc b/gr-atsc/src/lib/qa_convolutional_interleaver.cc index fff6e61c9..bfe86f0ea 100644 --- a/gr-atsc/src/lib/qa_convolutional_interleaver.cc +++ b/gr-atsc/src/lib/qa_convolutional_interleaver.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -79,7 +79,7 @@ qa_convolutional_interleaver::t2 () int icount = 6000; int dcount = 6000; - + int end_to_end_delay = intl->end_to_end_delay (); for (int i = 0; i < end_to_end_delay; i++){ CPPUNIT_ASSERT_EQUAL (0, deintl->transform (intl->transform (icount++))); @@ -98,7 +98,7 @@ qa_convolutional_interleaver::t3 () int icount = 6000; int dcount = 6000; - + int end_to_end_delay = intl->end_to_end_delay (); for (int i = 0; i < end_to_end_delay; i++){ CPPUNIT_ASSERT_EQUAL (0, deintl->transform (intl->transform (icount++))); @@ -117,10 +117,10 @@ qa_convolutional_interleaver::t4 () int icount = 6000; int dcount = 6000; - + int end_to_end_delay = intl->end_to_end_delay (); CPPUNIT_ASSERT_EQUAL (10608, end_to_end_delay); - + for (int i = 0; i < end_to_end_delay; i++){ CPPUNIT_ASSERT_EQUAL (0, deintl->transform (intl->transform (icount++))); } diff --git a/gr-atsc/src/lib/qa_convolutional_interleaver.h b/gr-atsc/src/lib/qa_convolutional_interleaver.h index 3f96065e0..b60181d73 100644 --- a/gr-atsc/src/lib/qa_convolutional_interleaver.h +++ b/gr-atsc/src/lib/qa_convolutional_interleaver.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -32,7 +32,7 @@ class qa_convolutional_interleaver : public CppUnit::TestCase { private: convolutional_interleaver<int> *intl; convolutional_interleaver<int> *deintl; - + CPPUNIT_TEST_SUITE (qa_convolutional_interleaver); CPPUNIT_TEST (t0); CPPUNIT_TEST (t1); diff --git a/gr-atsc/src/lib/qa_interleaver_fifo.cc b/gr-atsc/src/lib/qa_interleaver_fifo.cc index 3c3aad43c..a9de97ff3 100644 --- a/gr-atsc/src/lib/qa_interleaver_fifo.cc +++ b/gr-atsc/src/lib/qa_interleaver_fifo.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -38,7 +38,7 @@ qa_interleaver_fifo::t1 () fifo = new interleaver_fifo<int>(1); CPPUNIT_ASSERT_EQUAL (0, fifo->stuff (2)); - + for (int i = 1; i < 10; i++) CPPUNIT_ASSERT_EQUAL (i * 2, fifo->stuff ((i + 1) * 2)); } diff --git a/gr-atsc/src/lib/qa_interleaver_fifo.h b/gr-atsc/src/lib/qa_interleaver_fifo.h index bd29baaed..9783548ca 100644 --- a/gr-atsc/src/lib/qa_interleaver_fifo.h +++ b/gr-atsc/src/lib/qa_interleaver_fifo.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002 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, @@ -31,7 +31,7 @@ class qa_interleaver_fifo : public CppUnit::TestCase { private: interleaver_fifo<int> *fifo; - + public: void tearDown (){ diff --git a/gr-atsc/src/lib/test_atsci.cc b/gr-atsc/src/lib/test_atsci.cc index 031ca42ae..bf0a7eafc 100644 --- a/gr-atsc/src/lib/test_atsci.cc +++ b/gr-atsc/src/lib/test_atsci.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2002,2006,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -25,7 +25,7 @@ #include <cppunit/XmlOutputter.h> #include <qa_atsci.h> -int +int main (int argc, char **argv) { CppUnit::TextTestRunner runner; @@ -34,7 +34,7 @@ main (int argc, char **argv) runner.addTest (qa_atsc::suite ()); runner.setOutputter(xmlout); - + bool was_successful = runner.run ("", false); return was_successful ? 0 : 1; diff --git a/gr-atsc/src/python/.gitignore b/gr-atsc/src/python/.gitignore deleted file mode 100644 index bf03975bb..000000000 --- a/gr-atsc/src/python/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -/Makefile -/Makefile.in -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/*.pyo -/run_tests diff --git a/gr-atsc/src/python/CMakeLists.txt b/gr-atsc/src/python/CMakeLists.txt index 4c2442ba0..d38d6d803 100644 --- a/gr-atsc/src/python/CMakeLists.txt +++ b/gr-atsc/src/python/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011-2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-atsc/src/python/Makefile.am b/gr-atsc/src/python/Makefile.am deleted file mode 100644 index 7b2f5c871..000000000 --- a/gr-atsc/src/python/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -# -# Copyright 2004,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 - -EXTRA_DIST += \ - run_tests.in - -ourdatadir = $(exampledir)/atsc - -dist_ourdata_DATA = \ - README - -dist_ourdata_SCRIPTS = \ - btl-fsd.py \ - fpll.py \ - interp.py \ - xlate.py \ - viterbi-out.py - -TESTS = run_tests - -noinst_PYTHON = \ - atsc_utils.py \ - qa_atsc.py diff --git a/gr-atsc/src/python/README b/gr-atsc/src/python/README index 6c23b46fd..74d6ba134 100644 --- a/gr-atsc/src/python/README +++ b/gr-atsc/src/python/README @@ -7,7 +7,7 @@ station frequency from the fcc video database, and sample rate to 6.4e6. 2) Capture data - adjust gain (-g) frequency (-f) and which side the tvrx is on to fit your local setup: -uhd_rx_cfile.py -s --samp-rate=6.4e6 -g 65 -f 503e6 atsc_data_6-4m_complex +uhd_rx_cfile.py -s --samp-rate=6.4e6 -g 65 -f 503e6 atsc_data_6-4m_complex You probably still need fast disks to take the data, like a raid-0 set of striped sata drives. Make sure there are no or very few Ou overruns. Saving diff --git a/gr-atsc/src/python/atsc_utils.py b/gr-atsc/src/python/atsc_utils.py index 1e74d22ed..fced6d190 100644 --- a/gr-atsc/src/python/atsc_utils.py +++ b/gr-atsc/src/python/atsc_utils.py @@ -1,23 +1,23 @@ # # Copyright 2006 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. -# +# import random import sys @@ -42,7 +42,7 @@ def make_fake_transport_stream_packet(npkts): for n in range(186): r[i + n] = random.randint(0, 255) i = i + 186 - + return r diff --git a/gr-atsc/src/python/btl-fsd.py b/gr-atsc/src/python/btl-fsd.py index 37f3f9806..826e71016 100755 --- a/gr-atsc/src/python/btl-fsd.py +++ b/gr-atsc/src/python/btl-fsd.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2005,2007 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., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -# +# from gnuradio import gr from gnuradio import atsc diff --git a/gr-atsc/src/python/fpll.py b/gr-atsc/src/python/fpll.py index 24bc7277f..aed975557 100755 --- a/gr-atsc/src/python/fpll.py +++ b/gr-atsc/src/python/fpll.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2005 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., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -# +# from gnuradio import gr, atsc import math, os @@ -36,7 +36,7 @@ def main(): # 1/2 as wide because we're designing lp filter - symbol_rate = atsc.ATSC_SYMBOL_RATE/2. + symbol_rate = atsc.ATSC_SYMBOL_RATE/2. NTAPS = 279 tt = gr.firdes.root_raised_cosine (1.0, input_rate, symbol_rate, .115, NTAPS) # heterodyne the low pass coefficients up to the specified bandpass diff --git a/gr-atsc/src/python/interp.py b/gr-atsc/src/python/interp.py index b17b3a312..8a3cc8d4c 100755 --- a/gr-atsc/src/python/interp.py +++ b/gr-atsc/src/python/interp.py @@ -1,31 +1,31 @@ #!/usr/bin/env /usr/bin/python # # Copyright 2004,2007 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., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -# +# # This module starts the atsc processing chain taking the captured # off-air signal created with: # # uhd_rx_cfile.py --samp-rate=6.4e6 # -f <center of tv signal channel freq> # -g <appropriate gain for best signal / noise> -# +# # All this module does is multiply the sample rate by 3, from 6.4e6 to # 19.2e6 complex samples / sec, then lowpass filter with a cutoff of 3.2MHz # and a transition band width of .5MHz. Center of the tv channels is diff --git a/gr-atsc/src/python/interp_short.py b/gr-atsc/src/python/interp_short.py index 732ca831d..c5ea337f9 100755 --- a/gr-atsc/src/python/interp_short.py +++ b/gr-atsc/src/python/interp_short.py @@ -1,24 +1,24 @@ #!/usr/bin/env /usr/bin/python # # Copyright 2004 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, 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., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -# +# # This module starts the atsc processing chain taking the captured # off-air signal created with: # diff --git a/gr-atsc/src/python/qa_atsc.py b/gr-atsc/src/python/qa_atsc.py index 63621bd90..c6b8d2e95 100755 --- a/gr-atsc/src/python/qa_atsc.py +++ b/gr-atsc/src/python/qa_atsc.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2006,2007 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 atsc # qa code needs to run without being installed @@ -44,7 +44,7 @@ class memoize(object): """ Make a fake transport stream that's big enough for our purposes. We generate 8 full fields. This is relatively expensive. It -takes about 2 seconds to execute. +takes about 2 seconds to execute. """ make_transport_stream = \ memoize(lambda : tuple(make_fake_transport_stream_packet(8 * atsc.ATSC_DSEGS_PER_FIELD))) @@ -75,11 +75,11 @@ class vector_source_ts(gr.hier_block2): def __init__(self, ts): """ Pad tranport stream packets to 256 bytes and reformat appropriately. - + @param ts: MPEG transport stream. @type ts: sequence of ints in [0,255]; len(ts) % 188 == 0 """ - + src = gr.vector_source_b(pad_transport_stream(ts)) s2v = gr.stream_to_vector(gr.sizeof_char, atsc.sizeof_atsc_mpeg_packet) @@ -163,7 +163,7 @@ class qa_atsc(gr_unittest.TestCase): def test_loopback_002(self): """ Loopback randomizer/rs_encoder/interleaver to - deinterleaver/rs_decoder/derandomizer + deinterleaver/rs_decoder/derandomizer """ src_data = make_transport_stream() interleaver_delay = 52 @@ -188,7 +188,7 @@ class qa_atsc(gr_unittest.TestCase): """ Loopback randomizer/rs_encoder/interleaver/trellis_encoder via ds_to_softds to - viterbi_decoder/deinterleaver/rs_decoder/derandomizer + viterbi_decoder/deinterleaver/rs_decoder/derandomizer """ src_data = make_transport_stream() interleaver_delay = 52 @@ -211,7 +211,7 @@ class qa_atsc(gr_unittest.TestCase): result_data = dst.data ()[((interleaver_delay+viterbi_delay)*atsc.ATSC_MPEG_PKT_LENGTH):len(dst.data())] self.assertEqual (expected_result, result_data) - + if __name__ == '__main__': gr_unittest.main() diff --git a/gr-atsc/src/python/run_tests.in b/gr-atsc/src/python/run_tests.in deleted file mode 100644 index 561917fed..000000000 --- a/gr-atsc/src/python/run_tests.in +++ /dev/null @@ -1,10 +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 - -@top_builddir@/run_tests.sh \ - @abs_top_srcdir@/gr-atsc \ - @abs_top_builddir@/gr-atsc \ - @srcdir@ diff --git a/gr-atsc/src/python/viterbi-out.py b/gr-atsc/src/python/viterbi-out.py index eedbaa5d6..67edd99b2 100755 --- a/gr-atsc/src/python/viterbi-out.py +++ b/gr-atsc/src/python/viterbi-out.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2006,2007 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., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -# +# from gnuradio import gr, atsc import sys, os @@ -46,7 +46,7 @@ def main(args): tb.connect(src, viterbi, deinter, rs_dec, derand, depad, dst) tb.run () - + if __name__ == '__main__': main(sys.argv[1:]) diff --git a/gr-atsc/src/python/xlate.py b/gr-atsc/src/python/xlate.py index e37af9a22..68e280a8c 100755 --- a/gr-atsc/src/python/xlate.py +++ b/gr-atsc/src/python/xlate.py @@ -1,24 +1,24 @@ #!/usr/bin/env /usr/bin/python # # Copyright 2004,2007 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., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -# +# # This module upconverts the 19.2e6 sample rate signal from a center # of 0 to 5.75e6 and converts to float, to prepare the signal for # the old gnuradio 0.9 block (bit timing loop, field sync checker, diff --git a/gr-audio/.gitignore b/gr-audio/.gitignore deleted file mode 100644 index a37fc0c1a..000000000 --- a/gr-audio/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -/*.pc diff --git a/gr-audio/CMakeLists.txt b/gr-audio/CMakeLists.txt index 7038b9b0f..35fd7fc23 100644 --- a/gr-audio/CMakeLists.txt +++ b/gr-audio/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, @@ -33,6 +33,8 @@ GR_REGISTER_COMPONENT("gr-audio" ENABLE_GR_AUDIO GR_SET_GLOBAL(GR_AUDIO_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include) +SET(GR_PKG_AUDIO_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/audio) + ######################################################################## # Begin conditional configuration ######################################################################## @@ -65,6 +67,13 @@ CPACK_COMPONENT("audio_python" DEPENDS "core_python;audio_runtime" ) +CPACK_COMPONENT("audio_examples" + GROUP "Audio" + DISPLAY_NAME "Examples" + DESCRIPTION "Example programs" + DEPENDS "audio_runtime" +) + CPACK_COMPONENT("audio_swig" GROUP "Audio" DISPLAY_NAME "SWIG" @@ -77,12 +86,13 @@ CPACK_COMPONENT("audio_swig" ######################################################################## add_subdirectory(include) add_subdirectory(lib) -add_subdirectory(examples/c++) add_subdirectory(doc) +add_subdirectory(examples/c++) if(ENABLE_PYTHON) add_subdirectory(swig) add_subdirectory(grc) add_subdirectory(examples/python) + add_subdirectory(examples/grc) endif(ENABLE_PYTHON) ######################################################################## diff --git a/gr-audio/doc/.gitignore b/gr-audio/doc/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-audio/doc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-audio/doc/CMakeLists.txt b/gr-audio/doc/CMakeLists.txt index f4e6c4a07..483554a0e 100644 --- a/gr-audio/doc/CMakeLists.txt +++ b/gr-audio/doc/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-audio/doc/Makefile.am b/gr-audio/doc/Makefile.am deleted file mode 100644 index 959a9044f..000000000 --- a/gr-audio/doc/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = - -dist_gr_doc_DATA = \ - README.audio diff --git a/gr-audio/doc/README.audio b/gr-audio/doc/README.audio index ebd0fe5d7..754c849c8 100644 --- a/gr-audio/doc/README.audio +++ b/gr-audio/doc/README.audio @@ -14,7 +14,7 @@ based on the system it is run on. Import this package with: See the Doxygen documentation for details about the blocks available in this package. A quick listing of the details can be found in Python -after importing by using: +after importing by using: help(audio) diff --git a/gr-audio/examples/.gitignore b/gr-audio/examples/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-audio/examples/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-audio/examples/Makefile.am b/gr-audio/examples/Makefile.am deleted file mode 100644 index a2365d403..000000000 --- a/gr-audio/examples/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = c++ - -if PYTHON -SUBDIRS += python -endif diff --git a/gr-audio/examples/c++/.gitignore b/gr-audio/examples/c++/.gitignore deleted file mode 100644 index bb08aaf91..000000000 --- a/gr-audio/examples/c++/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -/dial_tone diff --git a/gr-audio/examples/c++/CMakeLists.txt b/gr-audio/examples/c++/CMakeLists.txt index 38490cce8..f0d45817c 100644 --- a/gr-audio/examples/c++/CMakeLists.txt +++ b/gr-audio/examples/c++/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, @@ -21,3 +21,9 @@ include_directories(${GR_AUDIO_INCLUDE_DIRS}) include_directories(${GNURADIO_CORE_INCLUDE_DIRS}) add_executable(dial_tone dial_tone.cc) target_link_libraries(dial_tone gnuradio-audio) + +INSTALL(TARGETS + dial_tone + DESTINATION ${GR_PKG_AUDIO_EXAMPLES_DIR} + COMPONENT "audio_examples" +) diff --git a/gr-audio/examples/c++/Makefile.am b/gr-audio/examples/c++/Makefile.am deleted file mode 100644 index d3283354f..000000000 --- a/gr-audio/examples/c++/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -# For compiling with the GNU Radio build tree, use include dir below. -# For compiling outside the tree, use 'pkg-config --cflags gnuradio-audio' -AM_CPPFLAGS = \ - -I$(top_srcdir)/gr-audio/include \ - $(STD_DEFINES_AND_INCLUDES) \ - $(WITH_INCLUDES) - -# For compiling within the GNU Radio build tree, link against GR_AUDIO_LA -# For compiling outside the tree, use 'pkg-config --libs gnuradio-audio' -GR_AUDIO_LA=$(top_builddir)/gr-audio/lib/libgnuradio-audio.la - -noinst_PROGRAMS = dial_tone - -dial_tone_SOURCES = dial_tone.cc -dial_tone_LDADD = \ - $(GNURADIO_CORE_LA) $(GR_AUDIO_LA) \ - $(BOOST_FILESYSTEM_LIB) diff --git a/gr-audio/examples/c++/dial_tone.cc b/gr-audio/examples/c++/dial_tone.cc index e4e3d8ceb..4cd0ff59c 100644 --- a/gr-audio/examples/c++/dial_tone.cc +++ b/gr-audio/examples/c++/dial_tone.cc @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-fcd/include/fcd/Makefile.am b/gr-audio/examples/grc/CMakeLists.txt index 282fd93f7..179b42fcc 100644 --- a/gr-fcd/include/fcd/Makefile.am +++ b/gr-audio/examples/grc/CMakeLists.txt @@ -1,26 +1,27 @@ -# # Copyright 2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# -include $(top_srcdir)/Makefile.common +install( + FILES + cvsd_sweep.grc + dial_tone.grc + DESTINATION ${GR_PKG_AUDIO_EXAMPLES_DIR} + COMPONENT "audio_python" +) -grinclude_HEADERS = \ - fcd_api.h \ - fcd_source_c.h diff --git a/gnuradio-examples/grc/audio/cvsd_sweep.grc b/gr-audio/examples/grc/cvsd_sweep.grc index b645b747a..b645b747a 100644 --- a/gnuradio-examples/grc/audio/cvsd_sweep.grc +++ b/gr-audio/examples/grc/cvsd_sweep.grc diff --git a/gnuradio-examples/grc/audio/dial_tone.grc b/gr-audio/examples/grc/dial_tone.grc index ac8cbef27..ac8cbef27 100644 --- a/gnuradio-examples/grc/audio/dial_tone.grc +++ b/gr-audio/examples/grc/dial_tone.grc diff --git a/gr-audio/examples/python/.gitignore b/gr-audio/examples/python/.gitignore deleted file mode 100644 index b4813f3c8..000000000 --- a/gr-audio/examples/python/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/Makefile -/Makefile.in -/*.pyc -/*.pyo diff --git a/gr-audio/examples/python/CMakeLists.txt b/gr-audio/examples/python/CMakeLists.txt index 86ba86ac0..24e29e234 100644 --- a/gr-audio/examples/python/CMakeLists.txt +++ b/gr-audio/examples/python/CMakeLists.txt @@ -32,6 +32,6 @@ GR_PYTHON_INSTALL(PROGRAMS noise.py spectrum_inversion.py test_resampler.py - DESTINATION ${GR_PKG_DATA_DIR}/examples/audio + DESTINATION ${GR_PKG_AUDIO_EXAMPLES_DIR} COMPONENT "audio_python" ) diff --git a/gr-audio/examples/python/Makefile.am b/gr-audio/examples/python/Makefile.am deleted file mode 100644 index 356b51559..000000000 --- a/gr-audio/examples/python/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -# -# Copyright 2004,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 - -ourdatadir = $(exampledir)/audio - -dist_ourdata_SCRIPTS = \ - audio_copy.py \ - audio_fft.py \ - audio_play.py \ - audio_to_file.py \ - dial_tone.py \ - dial_tone_daemon.py \ - dial_tone_wav.py \ - mono_tone.py \ - multi_tone.py \ - noise.py \ - spectrum_inversion.py \ - test_resampler.py diff --git a/gr-audio/examples/python/audio_copy.py b/gr-audio/examples/python/audio_copy.py index 3094c9f7a..946aae1c2 100755 --- a/gr-audio/examples/python/audio_copy.py +++ b/gr-audio/examples/python/audio_copy.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2005,2007 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 from gnuradio import audio @@ -61,4 +61,4 @@ if __name__ == '__main__': my_top_block().run() except KeyboardInterrupt: pass - + diff --git a/gr-audio/examples/python/audio_fft.py b/gr-audio/examples/python/audio_fft.py index 960e0f94d..519963da5 100755 --- a/gr-audio/examples/python/audio_fft.py +++ b/gr-audio/examples/python/audio_fft.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2005,2007 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, gru, audio from gnuradio import eng_notation @@ -34,7 +34,7 @@ class app_top_block(stdgui2.std_top_block): self.frame = frame self.panel = panel - + parser = OptionParser(option_class=eng_option) parser.add_option("-W", "--waterfall", action="store_true", default=False, help="Enable waterfall display") @@ -45,15 +45,15 @@ class app_top_block(stdgui2.std_top_block): parser.add_option("-r", "--sample-rate", type="eng_float", default=48000, help="set sample rate to RATE (48000)") - (options, args) = parser.parse_args() + (options, args) = parser.parse_args() sample_rate = int(options.sample_rate) - + if len(args) != 0: parser.print_help() sys.exit(1) self.show_debug_info = True - + # build the graph if options.waterfall: self.scope = \ @@ -79,9 +79,9 @@ class app_top_block(stdgui2.std_top_block): def _form_set_freq(kv): return self.set_freq(kv['freq']) - + vbox.Add(self.scope.win, 10, wx.EXPAND) - + #self._build_subpanel(vbox) def _build_subpanel(self, vbox_arg): @@ -89,7 +89,7 @@ class app_top_block(stdgui2.std_top_block): # FIXME figure out how to have this be a subpanel that is always # created, but has its visibility controlled by foo.Show(True/False) - + def _form_set_decim(kv): return self.set_decim(kv['decim']) @@ -129,7 +129,7 @@ class app_top_block(stdgui2.std_top_block): hbox.Add((5,0), 0) vbox.Add(hbox, 0, wx.EXPAND) - + def main (): app = stdgui2.stdapp(app_top_block, "Audio FFT", nstatus=1) app.MainLoop() diff --git a/gr-audio/examples/python/audio_play.py b/gr-audio/examples/python/audio_play.py index f9520c7cf..465590f69 100755 --- a/gr-audio/examples/python/audio_play.py +++ b/gr-audio/examples/python/audio_play.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2005,2007 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 from gnuradio import audio diff --git a/gr-audio/examples/python/audio_to_file.py b/gr-audio/examples/python/audio_to_file.py index 0d54f7bd2..3f7a4f8d1 100755 --- a/gr-audio/examples/python/audio_to_file.py +++ b/gr-audio/examples/python/audio_to_file.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007 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 from gnuradio import audio @@ -38,7 +38,7 @@ class my_top_block(gr.top_block): help="set sample rate to RATE (48000)") parser.add_option("-N", "--nsamples", type="eng_float", default=None, help="number of samples to collect [default=+inf]") - + (options, args) = parser.parse_args () if len(args) != 1: parser.print_help() diff --git a/gr-audio/examples/python/dial_tone.py b/gr-audio/examples/python/dial_tone.py index 65c5e50b2..5661d13d4 100755 --- a/gr-audio/examples/python/dial_tone.py +++ b/gr-audio/examples/python/dial_tone.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2005,2007 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 from gnuradio import audio diff --git a/gr-audio/examples/python/dial_tone_daemon.py b/gr-audio/examples/python/dial_tone_daemon.py index d30d0e117..b25baebee 100755 --- a/gr-audio/examples/python/dial_tone_daemon.py +++ b/gr-audio/examples/python/dial_tone_daemon.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2005,2007,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. -# +# from gnuradio import gr, gru from gnuradio import audio diff --git a/gr-audio/examples/python/dial_tone_wav.py b/gr-audio/examples/python/dial_tone_wav.py index 6e87b2a48..c06af55b7 100755 --- a/gr-audio/examples/python/dial_tone_wav.py +++ b/gr-audio/examples/python/dial_tone_wav.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2005,2007,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. -# +# # GNU Radio example program to record a dial tone to a WAV file diff --git a/gr-audio/examples/python/mono_tone.py b/gr-audio/examples/python/mono_tone.py index 869c2e5ff..bce486e4a 100755 --- a/gr-audio/examples/python/mono_tone.py +++ b/gr-audio/examples/python/mono_tone.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2005,2007 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 from gnuradio import audio @@ -55,7 +55,7 @@ class my_top_block(gr.top_block): dst = audio.sink (sample_rate, options.audio_output, options.ok_to_block) - + self.connect (src0, (dst, 0)) diff --git a/gr-audio/examples/python/multi_tone.py b/gr-audio/examples/python/multi_tone.py index 7d47dd5d5..00c213b63 100755 --- a/gr-audio/examples/python/multi_tone.py +++ b/gr-audio/examples/python/multi_tone.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2006,2007 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 from gnuradio import audio @@ -72,7 +72,7 @@ class my_top_block(gr.top_block): dst = audio.sink (sample_rate, options.audio_output, options.ok_to_block) - + max_chan = dst.input_signature().max_streams() if (max_chan == -1) or (max_chan > limit_channels): max_chan = limit_channels diff --git a/gr-audio/examples/python/noise.py b/gr-audio/examples/python/noise.py index 75f741082..12eee1906 100755 --- a/gr-audio/examples/python/noise.py +++ b/gr-audio/examples/python/noise.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2007 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 from gnuradio import audio diff --git a/gr-audio/examples/python/spectrum_inversion.py b/gr-audio/examples/python/spectrum_inversion.py index 021e23f2d..e152430cd 100755 --- a/gr-audio/examples/python/spectrum_inversion.py +++ b/gr-audio/examples/python/spectrum_inversion.py @@ -1,19 +1,19 @@ #!/usr/bin/env python # # Copyright 2004,2005,2007 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, diff --git a/gr-audio/examples/python/test_resampler.py b/gr-audio/examples/python/test_resampler.py index 4644c5e2f..db7f79fba 100755 --- a/gr-audio/examples/python/test_resampler.py +++ b/gr-audio/examples/python/test_resampler.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2005,2007 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, gru, blks2 from gnuradio import audio diff --git a/gr-audio/grc/.gitignore b/gr-audio/grc/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-audio/grc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-audio/grc/CMakeLists.txt b/gr-audio/grc/CMakeLists.txt index a077f7fb4..35c540ad3 100644 --- a/gr-audio/grc/CMakeLists.txt +++ b/gr-audio/grc/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-audio/grc/Makefile.am b/gr-audio/grc/Makefile.am deleted file mode 100644 index 36d9daa7a..000000000 --- a/gr-audio/grc/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -grcblocksdir = $(grc_blocksdir) - -dist_grcblocks_DATA = \ - audio_source.xml \ - audio_sink.xml - diff --git a/gr-audio/include/.gitignore b/gr-audio/include/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-audio/include/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-audio/include/CMakeLists.txt b/gr-audio/include/CMakeLists.txt index 6db55e92c..a41506373 100644 --- a/gr-audio/include/CMakeLists.txt +++ b/gr-audio/include/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-audio/include/gr_audio_api.h b/gr-audio/include/gr_audio_api.h index 65782d308..2ddd0fec6 100644 --- a/gr-audio/include/gr_audio_api.h +++ b/gr-audio/include/gr_audio_api.h @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-audio/include/gr_audio_sink.h b/gr-audio/include/gr_audio_sink.h index 7a1caaf80..c2c8bdc30 100644 --- a/gr-audio/include/gr_audio_sink.h +++ b/gr-audio/include/gr_audio_sink.h @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-audio/include/gr_audio_source.h b/gr-audio/include/gr_audio_source.h index 8fe2b9b47..0e46ab198 100644 --- a/gr-audio/include/gr_audio_source.h +++ b/gr-audio/include/gr_audio_source.h @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-audio/lib/.gitignore b/gr-audio/lib/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-audio/lib/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-audio/lib/CMakeLists.txt b/gr-audio/lib/CMakeLists.txt index 28188a77b..7e0252a8b 100644 --- a/gr-audio/lib/CMakeLists.txt +++ b/gr-audio/lib/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-audio/lib/Makefile.am b/gr-audio/lib/Makefile.am deleted file mode 100644 index ee2247aa6..000000000 --- a/gr-audio/lib/Makefile.am +++ /dev/null @@ -1,185 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -AM_CPPFLAGS = \ - $(STD_DEFINES_AND_INCLUDES) \ - $(WITH_INCLUDES) \ - -I$(abs_top_srcdir)/gr-audio/include \ - -Dgnuradio_audio_EXPORTS - -lib_LTLIBRARIES = libgnuradio-audio.la - -libgnuradio_audio_la_SOURCES = \ - gr_audio_registry.cc - -libgnuradio_audio_la_LIBADD = \ - $(GNURADIO_CORE_LA) - -libgnuradio_audio_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) - -noinst_HEADERS = gr_audio_registry.h - -etcdir = $(gr_prefsdir) -dist_etc_DATA = gr-audio.conf - -######################################################################## -## ALSA Support -######################################################################## -if GR_AUDIO_ALSA_SUPPORT - -AM_CPPFLAGS += \ - -I$(srcdir)/alsa \ - $(ALSA_CPPFLAGS) - -libgnuradio_audio_la_LIBADD += $(ALSA_LIBS) - -libgnuradio_audio_la_SOURCES += \ - alsa/gri_alsa.cc \ - alsa/audio_alsa_source.cc \ - alsa/audio_alsa_sink.cc - -noinst_HEADERS += \ - alsa/gri_alsa.h \ - alsa/audio_alsa_source.h \ - alsa/audio_alsa_sink.h - -dist_etc_DATA += alsa/gr-audio-alsa.conf - -endif - -######################################################################## -## OSS Support -######################################################################## -if GR_AUDIO_OSS_SUPPORT - -AM_CPPFLAGS += \ - -I$(srcdir)/oss - -libgnuradio_audio_la_LIBADD += $(OSS_LIBS) - -libgnuradio_audio_la_SOURCES += \ - oss/audio_oss_source.cc \ - oss/audio_oss_sink.cc - -noinst_HEADERS += \ - oss/audio_oss_source.h \ - oss/audio_oss_sink.h - -dist_etc_DATA += oss/gr-audio-oss.conf - -endif - -######################################################################## -## Jack Support -######################################################################## -if GR_AUDIO_JACK_SUPPORT - -AM_CPPFLAGS += \ - -I$(srcdir)/jack \ - $(JACK_CPPFLAGS) - -libgnuradio_audio_la_LIBADD += $(JACK_LIBS) - -libgnuradio_audio_la_SOURCES += \ - jack/gri_jack.cc \ - jack/audio_jack_source.cc \ - jack/audio_jack_sink.cc - -noinst_HEADERS += \ - jack/gri_jack.h \ - jack/audio_jack_source.h \ - jack/audio_jack_sink.h - -dist_etc_DATA += jack/gr-audio-jack.conf - -endif - -######################################################################## -## OSX Support -######################################################################## -if GR_AUDIO_OSX_SUPPORT - -AM_CPPFLAGS += \ - -I$(srcdir)/osx - -libgnuradio_audio_la_LDFLAGS += \ - -framework AudioUnit \ - -framework CoreAudio \ - -framework AudioToolbox - -libgnuradio_audio_la_SOURCES += \ - osx/audio_osx_source.cc \ - osx/audio_osx_sink.cc - -noinst_HEADERS += \ - osx/audio_osx.h \ - osx/audio_osx_source.h \ - osx/audio_osx_sink.h \ - osx/circular_buffer.h - -endif - -######################################################################## -## PortAudio Support -######################################################################## -if GR_AUDIO_PORTAUDIO_SUPPORT - -AM_CPPFLAGS += \ - -I$(srcdir)/portaudio \ - $(PORTAUDIO_CPPFLAGS) - -libgnuradio_audio_la_LIBADD += $(PORTAUDIO_LIBS) - -libgnuradio_audio_la_SOURCES += \ - portaudio/gri_portaudio.cc \ - portaudio/audio_portaudio_source.cc \ - portaudio/audio_portaudio_sink.cc - -noinst_HEADERS += \ - portaudio/gri_portaudio.h \ - portaudio/audio_portaudio_source.h \ - portaudio/audio_portaudio_sink.h - -dist_etc_DATA += portaudio/gr-audio-portaudio.conf - -endif - -######################################################################## -## Windows Support -######################################################################## -if GR_AUDIO_WINDOWS_SUPPORT - -AM_CPPFLAGS += \ - -I$(srcdir)/windows - -libgnuradio_audio_la_LIBADD += $(WINAUDIO_LIBS) - -libgnuradio_audio_la_SOURCES += \ - windows/audio_windows_source.cc \ - windows/audio_windows_sink.cc - -noinst_HEADERS += \ - windows/audio_windows_source.h \ - windows/audio_windows_sink.h - -endif diff --git a/gr-audio/lib/alsa/audio_alsa_sink.cc b/gr-audio/lib/alsa/audio_alsa_sink.cc index 0bda42470..687f24bde 100644 --- a/gr-audio/lib/alsa/audio_alsa_sink.cc +++ b/gr-audio/lib/alsa/audio_alsa_sink.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -51,7 +51,7 @@ static snd_pcm_format_t acceptable_formats[] = { #define NELEMS(x) (sizeof(x)/sizeof(x[0])) -static std::string +static std::string default_device_name () { return gr_prefs::singleton()->get_string("audio_alsa", "default_output_device", "hw:0,0"); @@ -131,7 +131,7 @@ audio_alsa_sink::audio_alsa_sink (int sampling_rate, } set_input_signature (gr_make_io_signature (min_chan, max_chan, sizeof (float))); - + // fill in portions of the d_hw_params that we know now... // Specify the access methods we implement @@ -156,14 +156,14 @@ audio_alsa_sink::audio_alsa_sink (int sampling_rate, "audio_alsa_sink", CHATTY_DEBUG)) throw std::runtime_error ("audio_alsa_sink"); - + // sampling rate unsigned int orig_sampling_rate = d_sampling_rate; if ((error = snd_pcm_hw_params_set_rate_near (d_pcm_handle, d_hw_params, &d_sampling_rate, 0)) < 0) bail ("failed to set rate near", error); - + if (orig_sampling_rate != d_sampling_rate){ fprintf (stderr, "audio_alsa_sink[%s]: unable to support sampling rate %d\n", snd_pcm_name (d_pcm_handle), orig_sampling_rate); @@ -204,7 +204,7 @@ audio_alsa_sink::audio_alsa_sink (int sampling_rate, &d_period_size, &dir); if (error < 0) bail ("get_period_size failed", error); - + set_output_multiple (d_period_size); } @@ -226,11 +226,11 @@ audio_alsa_sink::check_topology (int ninputs, int noutputs) return true; // If stream is running, don't change any parameters else if(state == SND_PCM_STATE_XRUN ) snd_pcm_prepare ( d_pcm_handle ); // Prepare stream on underrun, and we can set parameters; - + bool special_case = nchan == 1 && d_special_case_mono_to_stereo; if (special_case) nchan = 2; - + err = snd_pcm_hw_params_set_channels (d_pcm_handle, d_hw_params, nchan); if (err < 0){ @@ -249,7 +249,7 @@ audio_alsa_sink::check_topology (int ninputs, int noutputs) err = snd_pcm_sw_params_current (d_pcm_handle, d_sw_params); if (err < 0) bail ("snd_pcm_sw_params_current", err); - + // Tell the PCM device to wait to start until we've filled // it's buffers half way full. This helps avoid audio underruns. @@ -327,7 +327,7 @@ audio_alsa_sink::work_s16 (int noutput_items, { typedef gr_int16 sample_t; // the type of samples we're creating static const float scale_factor = std::pow(2.0f, 16-1) - 1; - + unsigned int nchan = input_items.size (); const float **in = (const float **) &input_items[0]; sample_t *buf = (sample_t *) d_buffer; @@ -351,7 +351,7 @@ audio_alsa_sink::work_s16 (int noutput_items, for (unsigned int chan = 0; chan < nchan; chan++) in[chan] += d_period_size; - if (!write_buffer (buf, d_period_size, sizeof_frame)) + if (!write_buffer (buf, d_period_size, sizeof_frame)) return -1; // No fixing this problem. Say we're done. } @@ -369,7 +369,7 @@ audio_alsa_sink::work_s32 (int noutput_items, { typedef gr_int32 sample_t; // the type of samples we're creating static const float scale_factor = std::pow(2.0f, 32-1) - 1; - + unsigned int nchan = input_items.size (); const float **in = (const float **) &input_items[0]; sample_t *buf = (sample_t *) d_buffer; @@ -393,7 +393,7 @@ audio_alsa_sink::work_s32 (int noutput_items, for (unsigned int chan = 0; chan < nchan; chan++) in[chan] += d_period_size; - if (!write_buffer (buf, d_period_size, sizeof_frame)) + if (!write_buffer (buf, d_period_size, sizeof_frame)) return -1; // No fixing this problem. Say we're done. } @@ -411,7 +411,7 @@ audio_alsa_sink::work_s16_1x2 (int noutput_items, { typedef gr_int16 sample_t; // the type of samples we're creating static const float scale_factor = std::pow(2.0f, 16-1) - 1; - + assert (input_items.size () == 1); static const unsigned int nchan = 2; const float **in = (const float **) &input_items[0]; @@ -435,7 +435,7 @@ audio_alsa_sink::work_s16_1x2 (int noutput_items, // update src pointers in[0] += d_period_size; - if (!write_buffer (buf, d_period_size, sizeof_frame)) + if (!write_buffer (buf, d_period_size, sizeof_frame)) return -1; // No fixing this problem. Say we're done. } @@ -453,7 +453,7 @@ audio_alsa_sink::work_s32_1x2 (int noutput_items, { typedef gr_int32 sample_t; // the type of samples we're creating static const float scale_factor = std::pow(2.0f, 32-1) - 1; - + assert (input_items.size () == 1); static unsigned int nchan = 2; const float **in = (const float **) &input_items[0]; @@ -477,7 +477,7 @@ audio_alsa_sink::work_s32_1x2 (int noutput_items, // update src pointers in[0] += d_period_size; - if (!write_buffer (buf, d_period_size, sizeof_frame)) + if (!write_buffer (buf, d_period_size, sizeof_frame)) return -1; // No fixing this problem. Say we're done. } @@ -496,7 +496,7 @@ audio_alsa_sink::write_buffer (const void *vbuffer, { if (d_ok_to_block == true) continue; // try again - + break; } diff --git a/gr-audio/lib/alsa/audio_alsa_sink.h b/gr-audio/lib/alsa/audio_alsa_sink.h index b33b84644..d456e53de 100644 --- a/gr-audio/lib/alsa/audio_alsa_sink.h +++ b/gr-audio/lib/alsa/audio_alsa_sink.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -74,7 +74,7 @@ public: bool ok_to_block); ~audio_alsa_sink (); - + bool check_topology (int ninputs, int noutputs); int work (int noutput_items, diff --git a/gr-audio/lib/alsa/audio_alsa_source.cc b/gr-audio/lib/alsa/audio_alsa_source.cc index a90552ff5..9fdf80b43 100644 --- a/gr-audio/lib/alsa/audio_alsa_source.cc +++ b/gr-audio/lib/alsa/audio_alsa_source.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -50,7 +50,7 @@ static snd_pcm_format_t acceptable_formats[] = { #define NELEMS(x) (sizeof(x)/sizeof(x[0])) -static std::string +static std::string default_device_name () { return gr_prefs::singleton()->get_string("audio_alsa", "default_input_device", "hw:0,0"); @@ -127,10 +127,10 @@ audio_alsa_source::audio_alsa_source (int sampling_rate, min_chan = 1; d_special_case_stereo_to_mono = true; } - + set_output_signature (gr_make_io_signature (min_chan, max_chan, sizeof (float))); - + // fill in portions of the d_hw_params that we know now... // Specify the access methods we implement @@ -155,14 +155,14 @@ audio_alsa_source::audio_alsa_source (int sampling_rate, "audio_alsa_source", CHATTY_DEBUG)) throw std::runtime_error ("audio_alsa_source"); - + // sampling rate unsigned int orig_sampling_rate = d_sampling_rate; if ((error = snd_pcm_hw_params_set_rate_near (d_pcm_handle, d_hw_params, &d_sampling_rate, 0)) < 0) bail ("failed to set rate near", error); - + if (orig_sampling_rate != d_sampling_rate){ fprintf (stderr, "audio_alsa_source[%s]: unable to support sampling rate %d\n", snd_pcm_name (d_pcm_handle), orig_sampling_rate); @@ -204,7 +204,7 @@ audio_alsa_source::audio_alsa_source (int sampling_rate, &d_period_size, &dir); if (error < 0) bail ("get_period_size failed", error); - + set_output_multiple (d_period_size); } @@ -309,7 +309,7 @@ audio_alsa_source::work_s16 (int noutput_items, { typedef gr_int16 sample_t; // the type of samples we're creating static const float scale_factor = 1.0 / std::pow(2.0f, 16-1); - + unsigned int nchan = output_items.size (); float **out = (float **) &output_items[0]; sample_t *buf = (sample_t *) d_buffer; @@ -321,7 +321,7 @@ audio_alsa_source::work_s16 (int noutput_items, // To minimize latency, return at most a single period's worth of samples. // [We could also read the first one in a blocking mode and subsequent // ones in non-blocking mode, but we'll leave that for later (or never).] - + if (!read_buffer (buf, d_period_size, sizeof_frame)) return -1; // No fixing this problem. Say we're done. @@ -347,7 +347,7 @@ audio_alsa_source::work_s16_2x1 (int noutput_items, { typedef gr_int16 sample_t; // the type of samples we're creating static const float scale_factor = 1.0 / std::pow(2.0f, 16-1); - + float **out = (float **) &output_items[0]; sample_t *buf = (sample_t *) d_buffer; int bi; @@ -360,7 +360,7 @@ audio_alsa_source::work_s16_2x1 (int noutput_items, // To minimize latency, return at most a single period's worth of samples. // [We could also read the first one in a blocking mode and subsequent // ones in non-blocking mode, but we'll leave that for later (or never).] - + if (!read_buffer (buf, d_period_size, sizeof_frame)) return -1; // No fixing this problem. Say we're done. @@ -385,7 +385,7 @@ audio_alsa_source::work_s32 (int noutput_items, { typedef gr_int32 sample_t; // the type of samples we're creating static const float scale_factor = 1.0 / std::pow(2.0f, 32-1); - + unsigned int nchan = output_items.size (); float **out = (float **) &output_items[0]; sample_t *buf = (sample_t *) d_buffer; @@ -397,7 +397,7 @@ audio_alsa_source::work_s32 (int noutput_items, // To minimize latency, return at most a single period's worth of samples. // [We could also read the first one in a blocking mode and subsequent // ones in non-blocking mode, but we'll leave that for later (or never).] - + if (!read_buffer (buf, d_period_size, sizeof_frame)) return -1; // No fixing this problem. Say we're done. @@ -423,7 +423,7 @@ audio_alsa_source::work_s32_2x1 (int noutput_items, { typedef gr_int32 sample_t; // the type of samples we're creating static const float scale_factor = 1.0 / std::pow(2.0f, 32-1); - + float **out = (float **) &output_items[0]; sample_t *buf = (sample_t *) d_buffer; int bi; @@ -436,7 +436,7 @@ audio_alsa_source::work_s32_2x1 (int noutput_items, // To minimize latency, return at most a single period's worth of samples. // [We could also read the first one in a blocking mode and subsequent // ones in non-blocking mode, but we'll leave that for later (or never).] - + if (!read_buffer (buf, d_period_size, sizeof_frame)) return -1; // No fixing this problem. Say we're done. diff --git a/gr-audio/lib/alsa/audio_alsa_source.h b/gr-audio/lib/alsa/audio_alsa_source.h index 142ae711a..320d49bd2 100644 --- a/gr-audio/lib/alsa/audio_alsa_source.h +++ b/gr-audio/lib/alsa/audio_alsa_source.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -77,7 +77,7 @@ public: bool ok_to_block); ~audio_alsa_source (); - + bool check_topology (int ninputs, int noutputs); int work (int noutput_items, diff --git a/gr-audio/lib/alsa/gri_alsa.cc b/gr-audio/lib/alsa/gri_alsa.cc index d9fda0f7d..7bae0937d 100644 --- a/gr-audio/lib/alsa/gri_alsa.cc +++ b/gr-audio/lib/alsa/gri_alsa.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -87,7 +87,7 @@ void gri_alsa_dump_hw_params (snd_pcm_t *pcm, snd_pcm_hw_params_t *hwparams, FILE *fp) { fprintf (fp, "PCM name: %s\n", snd_pcm_name (pcm)); - + fprintf (fp, "Access types:\n"); for (unsigned i = 0; i < NELEMS (access_types); i++){ snd_pcm_access_t at = access_types[i]; @@ -168,7 +168,7 @@ gri_alsa_pick_acceptable_format (snd_pcm_t *pcm, return true; } } - + fprintf (stderr, "%s[%s]: failed to find acceptable format", error_msg_tag, snd_pcm_name (pcm)); return false; diff --git a/gr-audio/lib/alsa/gri_alsa.h b/gr-audio/lib/alsa/gri_alsa.h index 3d72fd950..9c64e2c36 100644 --- a/gr-audio/lib/alsa/gri_alsa.h +++ b/gr-audio/lib/alsa/gri_alsa.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -26,7 +26,7 @@ #include <stdio.h> #include <alsa/asoundlib.h> -void +void gri_alsa_dump_hw_params (snd_pcm_t *pcm, snd_pcm_hw_params_t *hwparams, FILE *fp); diff --git a/gr-audio/lib/gr_audio_registry.cc b/gr-audio/lib/gr_audio_registry.cc index da4b16b35..e07bf844a 100644 --- a/gr-audio/lib/gr_audio_registry.cc +++ b/gr-audio/lib/gr_audio_registry.cc @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-audio/lib/gr_audio_registry.h b/gr-audio/lib/gr_audio_registry.h index ec341e95e..c40e15657 100644 --- a/gr-audio/lib/gr_audio_registry.h +++ b/gr-audio/lib/gr_audio_registry.h @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-audio/lib/jack/audio_jack_sink.cc b/gr-audio/lib/jack/audio_jack_sink.cc index f06e77bd5..9caabe8e2 100644 --- a/gr-audio/lib/jack/audio_jack_sink.cc +++ b/gr-audio/lib/jack/audio_jack_sink.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -50,7 +50,7 @@ typedef jack_default_audio_sample_t sample_t; // TODO: make it to match at least the quantity of items passed by work() static const unsigned int N_BUFFERS = 16; -static std::string +static std::string default_device_name () { return gr_prefs::singleton()->get_string("audio_jack", "default_output_device", "gr_sink"); @@ -77,7 +77,7 @@ jack_sink_process (jack_nframes_t nframes, void *arg) // Tell the sink thread there is room in the ringbuffer. // If it is already running, the lock will not be available. // We can't wait here in the process() thread, but we don't - // need to signal in that case, because the sink thread will + // need to signal in that case, because the sink thread will // check for room availability. if (pthread_mutex_trylock (&self->d_jack_process_lock) == 0) { @@ -108,7 +108,7 @@ audio_jack_sink::audio_jack_sink (int sampling_rate, pthread_cond_init(&d_ringbuffer_ready, NULL);; pthread_mutex_init(&d_jack_process_lock, NULL); #endif - + // try to become a client of the JACK server jack_options_t options = JackNullOption; jack_status_t status; @@ -130,9 +130,9 @@ audio_jack_sink::audio_jack_sink (int sampling_rate, // just decides to stop calling us. //jack_on_shutdown (d_jack_client, &jack_shutdown, (void*)this); - - d_jack_output_port = - jack_port_register (d_jack_client, "out", + + d_jack_output_port = + jack_port_register (d_jack_client, "out", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0); @@ -165,7 +165,7 @@ audio_jack_sink::check_topology (int ninputs, int noutputs) if (ninputs != 1) return false; - // tell the JACK server that we are ready to roll + // tell the JACK server that we are ready to roll if (jack_activate (d_jack_client)) throw std::runtime_error ("audio_jack_sink"); @@ -191,7 +191,7 @@ audio_jack_sink::work (int noutput_items, unsigned int write_space; // bytes #ifdef NO_PTHREAD - while ((write_space=jack_ringbuffer_write_space (d_ringbuffer)) < + while ((write_space=jack_ringbuffer_write_space (d_ringbuffer)) < d_jack_buffer_size*sizeof(sample_t)) { usleep(1000000*((d_jack_buffer_size-write_space/sizeof(sample_t))/d_sampling_rate)); } @@ -199,7 +199,7 @@ audio_jack_sink::work (int noutput_items, // JACK actually requires POSIX pthread_mutex_lock (&d_jack_process_lock); - while ((write_space=jack_ringbuffer_write_space (d_ringbuffer)) < + while ((write_space=jack_ringbuffer_write_space (d_ringbuffer)) < d_jack_buffer_size*sizeof(sample_t)) { // wait until jack_sink_process() signals more room diff --git a/gr-audio/lib/jack/audio_jack_sink.h b/gr-audio/lib/jack/audio_jack_sink.h index 5500b3641..8cc343937 100644 --- a/gr-audio/lib/jack/audio_jack_sink.h +++ b/gr-audio/lib/jack/audio_jack_sink.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -69,7 +69,7 @@ public: audio_jack_sink (int sampling_rate, const std::string device_name, bool ok_to_block); ~audio_jack_sink (); - + bool check_topology (int ninputs, int noutputs); int work (int noutput_items, diff --git a/gr-audio/lib/jack/audio_jack_source.cc b/gr-audio/lib/jack/audio_jack_source.cc index dcd41c3ac..137fd538e 100644 --- a/gr-audio/lib/jack/audio_jack_source.cc +++ b/gr-audio/lib/jack/audio_jack_source.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2006,2010 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, @@ -50,7 +50,7 @@ typedef jack_default_audio_sample_t sample_t; // TODO: make it to match at least the quantity of items passed to work() static const unsigned int N_BUFFERS = 16; -static std::string +static std::string default_device_name () { return gr_prefs::singleton()->get_string("audio_jack", "default_input_device", "gr_source"); @@ -78,7 +78,7 @@ jack_source_process (jack_nframes_t nframes, void *arg) // Tell the source thread there is data in the ringbuffer. // If it is already running, the lock will not be available. // We can't wait here in the process() thread, but we don't - // need to signal in that case, because the source thread will + // need to signal in that case, because the source thread will // check for data availability. if (pthread_mutex_trylock (&self->d_jack_process_lock) == 0) { @@ -131,8 +131,8 @@ audio_jack_source::audio_jack_source (int sampling_rate, // just decides to stop calling us. //jack_on_shutdown (d_jack_client, &jack_shutdown, (void*)this); - - d_jack_input_port = jack_port_register (d_jack_client, "in", + + d_jack_input_port = jack_port_register (d_jack_client, "in", JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0); @@ -162,7 +162,7 @@ audio_jack_source::audio_jack_source (int sampling_rate, bool audio_jack_source::check_topology (int ninputs, int noutputs) { - // tell the JACK server that we are ready to roll + // tell the JACK server that we are ready to roll if (jack_activate (d_jack_client)) throw std::runtime_error ("audio_jack_source"); @@ -192,7 +192,7 @@ audio_jack_source::work (int noutput_items, unsigned int read_space; // bytes #ifdef NO_PTHREAD - while ((read_space=jack_ringbuffer_read_space (d_ringbuffer)) < + while ((read_space=jack_ringbuffer_read_space (d_ringbuffer)) < d_jack_buffer_size*sizeof(sample_t)) { usleep(1000000*((d_jack_buffer_size-read_space/sizeof(sample_t))/d_sampling_rate)); } @@ -200,7 +200,7 @@ audio_jack_source::work (int noutput_items, // JACK actually requires POSIX pthread_mutex_lock (&d_jack_process_lock); - while ((read_space=jack_ringbuffer_read_space (d_ringbuffer)) < + while ((read_space=jack_ringbuffer_read_space (d_ringbuffer)) < d_jack_buffer_size*sizeof(sample_t)) { // wait until jack_source_process() signals more data diff --git a/gr-audio/lib/jack/audio_jack_source.h b/gr-audio/lib/jack/audio_jack_source.h index a155bf95b..2849c84b0 100644 --- a/gr-audio/lib/jack/audio_jack_source.h +++ b/gr-audio/lib/jack/audio_jack_source.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -69,7 +69,7 @@ public: audio_jack_source (int sampling_rate, const std::string device_name, bool ok_to_block); ~audio_jack_source (); - + bool check_topology (int ninputs, int noutputs); int work (int noutput_items, diff --git a/gr-audio/lib/jack/gri_jack.cc b/gr-audio/lib/jack/gri_jack.cc index fef1c58a6..793ed8336 100644 --- a/gr-audio/lib/jack/gri_jack.cc +++ b/gr-audio/lib/jack/gri_jack.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gr-audio/lib/jack/gri_jack.h b/gr-audio/lib/jack/gri_jack.h index ddc0b744d..5dcd3b811 100644 --- a/gr-audio/lib/jack/gri_jack.h +++ b/gr-audio/lib/jack/gri_jack.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gr-audio/lib/oss/audio_oss_sink.cc b/gr-audio/lib/oss/audio_oss_sink.cc index 34af16cce..26b71be24 100644 --- a/gr-audio/lib/oss/audio_oss_sink.cc +++ b/gr-audio/lib/oss/audio_oss_sink.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -66,7 +66,7 @@ audio_oss_sink::audio_oss_sink (int sampling_rate, throw std::runtime_error ("audio_oss_sink"); } - double CHUNK_TIME = + double CHUNK_TIME = std::max(0.001, gr_prefs::singleton()->get_double("audio_oss", "latency", 0.005)); d_chunk_size = (int) (d_sampling_rate * CHUNK_TIME); @@ -121,7 +121,7 @@ audio_oss_sink::work (int noutput_items, gr_vector_void_star &output_items) { const float *f0, *f1; - + switch (input_items.size ()){ case 1: // mono input @@ -138,7 +138,7 @@ audio_oss_sink::work (int noutput_items, perror ("audio_oss_sink: write"); } break; - + case 2: // stereo input f0 = (const float *) input_items[0]; diff --git a/gr-audio/lib/oss/audio_oss_sink.h b/gr-audio/lib/oss/audio_oss_sink.h index 47b1407d3..8148ec34b 100644 --- a/gr-audio/lib/oss/audio_oss_sink.h +++ b/gr-audio/lib/oss/audio_oss_sink.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -46,7 +46,7 @@ public: audio_oss_sink (int sampling_rate, const std::string device_name = "", bool ok_to_block = true); ~audio_oss_sink (); - + int work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); diff --git a/gr-audio/lib/oss/audio_oss_source.cc b/gr-audio/lib/oss/audio_oss_source.cc index eefe4dd04..e186e30ae 100644 --- a/gr-audio/lib/oss/audio_oss_source.cc +++ b/gr-audio/lib/oss/audio_oss_source.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -126,13 +126,13 @@ audio_oss_source::work (int noutput_items, const int bytes_per_item = shorts_per_item * sizeof (short); // To minimize latency, never return more than CHUNK_TIME - // worth of samples per call to work. + // worth of samples per call to work. noutput_items = std::min (noutput_items, d_chunk_size); int base = 0; int ntogo = noutput_items; - + while (ntogo > 0){ int nbytes = std::min (ntogo, d_chunk_size) * bytes_per_item; int result_nbytes = read (d_fd, d_buffer, nbytes); @@ -158,7 +158,7 @@ audio_oss_source::work (int noutput_items, } break; - case 2: // stereo output + case 2: // stereo output for (int i = 0; i < result_nitems; i++){ f0[base+i] = d_buffer[2*i+0] * (1.0 / 32767); f1[base+i] = d_buffer[2*i+1] * (1.0 / 32767); diff --git a/gr-audio/lib/oss/audio_oss_source.h b/gr-audio/lib/oss/audio_oss_source.h index df9f68e42..abb2db1f8 100644 --- a/gr-audio/lib/oss/audio_oss_source.h +++ b/gr-audio/lib/oss/audio_oss_source.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -48,7 +48,7 @@ public: bool ok_to_block = true); ~audio_oss_source (); - + int work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); diff --git a/gr-audio/lib/osx/audio_osx.h b/gr-audio/lib/osx/audio_osx.h index 79e79e36c..0a98b71ef 100644 --- a/gr-audio/lib/osx/audio_osx.h +++ b/gr-audio/lib/osx/audio_osx.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gr-audio/lib/osx/audio_osx_sink.cc b/gr-audio/lib/osx/audio_osx_sink.cc index 901881da6..939e5e0a1 100644 --- a/gr-audio/lib/osx/audio_osx_sink.cc +++ b/gr-audio/lib/osx/audio_osx_sink.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio. * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -144,10 +144,10 @@ audio_osx_sink::audio_osx_sink (int sample_rate, input.inputProcRefCon = this; err = AudioUnitSetProperty (d_OutputAU, - kAudioUnitProperty_SetRenderCallback, + kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input, - 0, - &input, + 0, + &input, sizeof (input)); CheckErrorAndThrow (err, "AudioUnitSetProperty Render Callback", "audio_osx_sink::audio_osx_sink"); @@ -355,11 +355,11 @@ audio_osx_sink::work (int noutput_items, } OSStatus audio_osx_sink::AUOutputCallback -(void *inRefCon, - AudioUnitRenderActionFlags *ioActionFlags, - const AudioTimeStamp *inTimeStamp, - UInt32 inBusNumber, - UInt32 inNumberFrames, +(void *inRefCon, + AudioUnitRenderActionFlags *ioActionFlags, + const AudioTimeStamp *inTimeStamp, + UInt32 inBusNumber, + UInt32 inNumberFrames, AudioBufferList *ioData) { audio_osx_sink* This = (audio_osx_sink*) inRefCon; diff --git a/gr-audio/lib/osx/audio_osx_sink.h b/gr-audio/lib/osx/audio_osx_sink.h index e7598097d..73b3db40d 100644 --- a/gr-audio/lib/osx/audio_osx_sink.h +++ b/gr-audio/lib/osx/audio_osx_sink.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio. * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -69,11 +69,11 @@ public: gr_vector_void_star &output_items); private: - static OSStatus AUOutputCallback (void *inRefCon, - AudioUnitRenderActionFlags *ioActionFlags, - const AudioTimeStamp *inTimeStamp, - UInt32 inBusNumber, - UInt32 inNumberFrames, + static OSStatus AUOutputCallback (void *inRefCon, + AudioUnitRenderActionFlags *ioActionFlags, + const AudioTimeStamp *inTimeStamp, + UInt32 inBusNumber, + UInt32 inNumberFrames, AudioBufferList *ioData); }; diff --git a/gr-audio/lib/osx/audio_osx_source.cc b/gr-audio/lib/osx/audio_osx_source.cc index 6c5609d20..29f0ac381 100644 --- a/gr-audio/lib/osx/audio_osx_source.cc +++ b/gr-audio/lib/osx/audio_osx_source.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio. * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -134,7 +134,7 @@ audio_osx_source::audio_osx_source (int sample_rate, #else ComponentDescription InputDesc; #endif - + InputDesc.componentType = kAudioUnitType_Output; InputDesc.componentSubType = kAudioUnitSubType_HALOutput; @@ -147,7 +147,7 @@ audio_osx_source::audio_osx_source (int sample_rate, #else Component comp = FindNextComponent (NULL, &InputDesc); #endif - + if (comp == NULL) { #ifndef GR_USE_OLD_AUDIO_UNIT std::cerr << "AudioComponentFindNext Error" << std::endl; @@ -166,11 +166,11 @@ audio_osx_source::audio_osx_source (int sample_rate, CheckErrorAndThrow (err, "OpenAComponent", "audio_osx_source::audio_osx_source"); #endif - + UInt32 enableIO; -// must enable the AUHAL for input and disable output +// must enable the AUHAL for input and disable output // before setting the AUHAL's current device // Enable input on the AUHAL @@ -392,7 +392,7 @@ audio_osx_source::audio_osx_source (int sample_rate, // UInt32 ACPrimeMethod = kConverterPrimeMethod_None; UInt32 ACPrimeMethod = kConverterPrimeMethod_Pre; propertySize = sizeof (ACPrimeMethod); - err = AudioConverterSetProperty (d_AudioConverter, + err = AudioConverterSetProperty (d_AudioConverter, kAudioConverterPrimeMethod, propertySize, &ACPrimeMethod); @@ -400,12 +400,12 @@ audio_osx_source::audio_osx_source (int sample_rate, "audio_osx_source::audio_osx_source"); // Get the size of the I/O buffer(s) to allow for pre-allocated buffers - + // lead frame info (trail frame info is ignored) AudioConverterPrimeInfo ACPrimeInfo = {0, 0}; propertySize = sizeof (ACPrimeInfo); - err = AudioConverterGetProperty (d_AudioConverter, + err = AudioConverterGetProperty (d_AudioConverter, kAudioConverterPrimeInfo, &propertySize, &ACPrimeInfo); @@ -981,7 +981,7 @@ audio_osx_source::SetDefaultInputDeviceAsCurrent #if _OSX_DO_LISTENERS_ OSStatus audio_osx_source::HardwareListener -(AudioHardwarePropertyID inPropertyID, +(AudioHardwarePropertyID inPropertyID, void *inClientData) { OSStatus err = noErr; @@ -1012,7 +1012,7 @@ audio_osx_source::UnitListener { OSStatus err = noErr; audio_osx_source* This = static_cast<audio_osx_source*>(inRefCon); - AudioStreamBasicDescription asbd; + AudioStreamBasicDescription asbd; std::cerr << "a_o_s::UnitListener" << std::endl; diff --git a/gr-audio/lib/osx/audio_osx_source.h b/gr-audio/lib/osx/audio_osx_source.h index 435172a2c..bb34d972c 100644 --- a/gr-audio/lib/osx/audio_osx_source.h +++ b/gr-audio/lib/osx/audio_osx_source.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio. * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -108,7 +108,7 @@ private: AudioUnitScope inScope, AudioUnitElement inElement); - static OSStatus HardwareListener (AudioHardwarePropertyID inPropertyID, + static OSStatus HardwareListener (AudioHardwarePropertyID inPropertyID, void *inClientData); #endif }; diff --git a/gr-audio/lib/osx/circular_buffer.h b/gr-audio/lib/osx/circular_buffer.h index 48758bf87..65788d482 100644 --- a/gr-audio/lib/osx/circular_buffer.h +++ b/gr-audio/lib/osx/circular_buffer.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2009,2010 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, diff --git a/gr-audio/lib/portaudio/audio_portaudio_sink.cc b/gr-audio/lib/portaudio/audio_portaudio_sink.cc index 7fdb99577..af7f1e48c 100644 --- a/gr-audio/lib/portaudio/audio_portaudio_sink.cc +++ b/gr-audio/lib/portaudio/audio_portaudio_sink.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in he 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, @@ -49,7 +49,7 @@ typedef float sample_t; // Number of portaudio buffers in the ringbuffer static const unsigned int N_BUFFERS = 4; -static std::string +static std::string default_device_name () { return gr_prefs::singleton()->get_string("audio_portaudio", "default_output_device", ""); @@ -59,7 +59,7 @@ void audio_portaudio_sink::create_ringbuffer(void) { int bufsize_samples = d_portaudio_buffer_size_frames * d_output_parameters.channelCount; - + if (d_verbose) fprintf(stderr,"ring buffer size = %d frames\n", N_BUFFERS*bufsize_samples/d_output_parameters.channelCount); @@ -89,7 +89,7 @@ portaudio_sink_callback (const void *inputBuffer, framesPerBuffer * self->d_output_parameters.channelCount; int navail_samples = self->d_reader->items_available(); - + if (nreqd_samples <= navail_samples) { // We've got enough data... { gruel::scoped_lock guard(self->d_ringbuffer_mutex); @@ -167,7 +167,7 @@ audio_portaudio_sink::audio_portaudio_sink(int sampling_rate, if (numDevices == 0) bail("no devices available", 0); - if (d_device_name.empty()) + if (d_device_name.empty()) { // FIXME Get smarter about picking something fprintf(stderr,"\nUsing Default Device\n"); @@ -259,7 +259,7 @@ audio_portaudio_sink::check_topology (int ninputs, int noutputs) return false; } -#if 0 +#if 0 const PaStreamInfo *psi = Pa_GetStreamInfo(d_stream); d_portaudio_buffer_size_frames = (int)(d_output_parameters.suggestedLatency * psi->sampleRate); @@ -332,11 +332,11 @@ audio_portaudio_sink::work (int noutput_items, int nf = std::min(noutput_items - k, nframes); float *p = (float *) d_writer->write_pointer(); - + for (int i = 0; i < nf; i++) for (unsigned int c = 0; c < nchan; c++) *p++ = in[c][k + i]; - + d_writer->update_write_pointer(nf * nchan); k += nf; diff --git a/gr-audio/lib/portaudio/audio_portaudio_sink.h b/gr-audio/lib/portaudio/audio_portaudio_sink.h index 04a881f7e..cf64d3da0 100644 --- a/gr-audio/lib/portaudio/audio_portaudio_sink.h +++ b/gr-audio/lib/portaudio/audio_portaudio_sink.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -75,7 +75,7 @@ public: bool ok_to_block); ~audio_portaudio_sink (); - + bool check_topology (int ninputs, int noutputs); int work (int noutput_items, diff --git a/gr-audio/lib/portaudio/audio_portaudio_source.cc b/gr-audio/lib/portaudio/audio_portaudio_source.cc index 55828ad21..ddb1a6fb6 100644 --- a/gr-audio/lib/portaudio/audio_portaudio_source.cc +++ b/gr-audio/lib/portaudio/audio_portaudio_source.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in he 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, @@ -49,7 +49,7 @@ typedef float sample_t; // Number of portaudio buffers in the ringbuffer static const unsigned int N_BUFFERS = 4; -static std::string +static std::string default_device_name () { return gr_prefs::singleton()->get_string("audio_portaudio", "default_input_device", ""); @@ -59,7 +59,7 @@ void audio_portaudio_source::create_ringbuffer(void) { int bufsize_samples = d_portaudio_buffer_size_frames * d_input_parameters.channelCount; - + if (d_verbose) fprintf(stderr, "ring buffer size = %d frames\n", N_BUFFERS*bufsize_samples/d_input_parameters.channelCount); @@ -101,7 +101,7 @@ portaudio_source_callback (const void *inputBuffer, inputBuffer, nframes_to_copy * nchan * sizeof(sample_t)); self->d_writer->update_write_pointer(nframes_to_copy * nchan); - + // Tell the source thread there is new data in the ringbuffer. self->d_ringbuffer_ready = true; } @@ -167,7 +167,7 @@ audio_portaudio_source::audio_portaudio_source(int sampling_rate, if (numDevices == 0) bail("no devices available", 0); - if (d_device_name.empty()) + if (d_device_name.empty()) { // FIXME Get smarter about picking something device = Pa_GetDefaultInputDevice(); @@ -178,7 +178,7 @@ audio_portaudio_source::audio_portaudio_source(int sampling_rate, else { bool found = false; - + for (i=0;i<numDevices;i++) { deviceInfo = Pa_GetDeviceInfo( i ); fprintf(stderr,"Testing device name: %s",deviceInfo->name); @@ -257,7 +257,7 @@ audio_portaudio_source::check_topology (int ninputs, int noutputs) return false; } -#if 0 +#if 0 const PaStreamInfo *psi = Pa_GetStreamInfo(d_stream); d_portaudio_buffer_size_frames = (int)(d_input_parameters.suggestedLatency * psi->sampleRate); @@ -309,7 +309,7 @@ audio_portaudio_source::work (int noutput_items, d_ringbuffer_cond.wait(guard); // block here, then try again continue; } - + assert(k == 0); // There's no data and we're not allowed to block. @@ -343,7 +343,7 @@ audio_portaudio_source::work (int noutput_items, gruel::scoped_lock guard(d_ringbuffer_mutex); int nf = std::min(noutput_items - k, nframes); - + const float *p = (const float *) d_reader->read_pointer(); for (int i = 0; i < nf; i++){ for (unsigned int c = 0; c < nchan; c++){ diff --git a/gr-audio/lib/portaudio/audio_portaudio_source.h b/gr-audio/lib/portaudio/audio_portaudio_source.h index b555bc759..e81389a3b 100644 --- a/gr-audio/lib/portaudio/audio_portaudio_source.h +++ b/gr-audio/lib/portaudio/audio_portaudio_source.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -73,7 +73,7 @@ public: bool ok_to_block); ~audio_portaudio_source (); - + bool check_topology (int ninputs, int noutputs); int work (int ninput_items, diff --git a/gr-audio/lib/portaudio/gri_portaudio.cc b/gr-audio/lib/portaudio/gri_portaudio.cc index faa472337..66f3d4647 100644 --- a/gr-audio/lib/portaudio/gri_portaudio.cc +++ b/gr-audio/lib/portaudio/gri_portaudio.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -80,7 +80,7 @@ gri_print_devices() printf( "[ Default %s Input", hostInfo->name ); defaultDisplayed = 1; } - + if( i == Pa_GetDefaultOutputDevice() ) { printf( (defaultDisplayed ? "," : "[") ); @@ -90,7 +90,7 @@ gri_print_devices() else if( i == Pa_GetHostApiInfo( deviceInfo->hostApi )->defaultOutputDevice ) { const PaHostApiInfo *hostInfo = Pa_GetHostApiInfo( deviceInfo->hostApi ); - printf( (defaultDisplayed ? "," : "[") ); + printf( (defaultDisplayed ? "," : "[") ); printf( " Default %s Output", hostInfo->name ); defaultDisplayed = 1; } diff --git a/gr-audio/lib/portaudio/gri_portaudio.h b/gr-audio/lib/portaudio/gri_portaudio.h index 36191e25a..c3ea7d064 100644 --- a/gr-audio/lib/portaudio/gri_portaudio.h +++ b/gr-audio/lib/portaudio/gri_portaudio.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gr-audio/swig/.gitignore b/gr-audio/swig/.gitignore deleted file mode 100644 index 7fd371091..000000000 --- a/gr-audio/swig/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/audio_swig.cc -/audio_swig.py -/Makefile -/Makefile.in -/python diff --git a/gr-audio/swig/CMakeLists.txt b/gr-audio/swig/CMakeLists.txt index 8a3258f66..4997ca3f7 100644 --- a/gr-audio/swig/CMakeLists.txt +++ b/gr-audio/swig/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-audio/swig/Makefile.am b/gr-audio/swig/Makefile.am deleted file mode 100644 index a5d5f4ad0..000000000 --- a/gr-audio/swig/Makefile.am +++ /dev/null @@ -1,71 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common -include $(top_srcdir)/Makefile.swig - -AUDIO_CPPFLAGS = -I$(abs_top_srcdir)/gr-audio/include - -AM_CPPFLAGS = \ - $(STD_DEFINES_AND_INCLUDES) \ - $(PYTHON_CPPFLAGS) \ - $(AUDIO_CPPFLAGS) \ - $(WITH_INCLUDES) - -# ---------------------------------------------------------------- -# The SWIG library - -TOP_SWIG_DOC_IFILES = \ - audio_swig_doc.i - -TOP_SWIG_IFILES = \ - $(TOP_SWIG_DOC_IFILES) \ - audio_swig.i - -BUILT_SOURCES += \ - $(TOP_SWIG_DOC_IFILES) - -EXTRA_DIST += \ - $(TOP_SWIG_DOC_IFILES) - -$(TOP_SWIG_DOC_IFILES): - `echo "" > $@` - -# Install so that they end up available as: -# import gnuradio.audio -# This ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio/audio -audio_swig_pythondir_category = \ - gnuradio/audio - -# additional libraries for linking with the SWIG-generated library -audio_swig_la_swig_libadd = \ - $(top_builddir)/gr-audio/lib/libgnuradio-audio.la - -# additional Python files to be installed along with the SWIG-generated one -audio_swig_python = \ - __init__.py - -# additional SWIG files to be installed -audio_swig_swiginclude_headers = \ - $(TOP_SWIG_DOC_IFILES) - -audio_swig_swig_args = $(AUDIO_CPPFLAGS) diff --git a/gr-audio/swig/Makefile.swig.gen b/gr-audio/swig/Makefile.swig.gen deleted file mode 100644 index 14322c0e5..000000000 --- a/gr-audio/swig/Makefile.swig.gen +++ /dev/null @@ -1,145 +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 audio_swig.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/audio_swig -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/audio_swig -## -## 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. - -audio_swig_pythondir_category ?= gnuradio/audio_swig -audio_swig_pylibdir_category ?= $(audio_swig_pythondir_category) -audio_swig_pythondir = $(pythondir)/$(audio_swig_pythondir_category) -audio_swig_pylibdir = $(pyexecdir)/$(audio_swig_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -audio_swig_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/audio_swig -# FIXME: determince whether these should be installed with gnuradio. -audio_swig_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -audio_swig_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 > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -audio_swig_swiginclude_HEADERS = \ - audio_swig.i \ - $(audio_swig_swiginclude_headers) - -if PYTHON -audio_swig_pylib_LTLIBRARIES = \ - _audio_swig.la - -_audio_swig_la_SOURCES = \ - python/audio_swig.cc \ - $(audio_swig_la_swig_sources) - -audio_swig_python_PYTHON = \ - audio_swig.py \ - $(audio_swig_python) - -_audio_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(audio_swig_la_swig_libadd) - -_audio_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(audio_swig_la_swig_ldflags) - -_audio_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(audio_swig_la_swig_cxxflags) - -python/audio_swig.cc: audio_swig.py -audio_swig.py: audio_swig.i - -# Include the python dependencies for this file --include python/audio_swig.d - -endif # end of if python - -if GUILE - -audio_swig_scmlib_LTLIBRARIES = \ - libguile-gnuradio-audio_swig.la -libguile_gnuradio_audio_swig_la_SOURCES = \ - guile/audio_swig.cc \ - $(audio_swig_la_swig_sources) -nobase_audio_swig_scm_DATA = \ - gnuradio/audio_swig.scm \ - gnuradio/audio_swig-primitive.scm -libguile_gnuradio_audio_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(audio_swig_la_swig_libadd) -libguile_gnuradio_audio_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(audio_swig_la_swig_ldflags) -libguile_gnuradio_audio_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(audio_swig_la_swig_cxxflags) - -guile/audio_swig.cc: gnuradio/audio_swig.scm -gnuradio/audio_swig.scm: audio_swig.i -gnuradio/audio_swig-primitive.scm: gnuradio/audio_swig.scm - -# Include the guile dependencies for this file --include guile/audio_swig.d - -endif # end of GUILE - - diff --git a/gr-audio/swig/__init__.py b/gr-audio/swig/__init__.py index c1b9a0493..ff10a8976 100644 --- a/gr-audio/swig/__init__.py +++ b/gr-audio/swig/__init__.py @@ -1,18 +1,18 @@ # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-audio/swig/audio_swig.i b/gr-audio/swig/audio_swig.i index 71db0ae09..089055dac 100644 --- a/gr-audio/swig/audio_swig.i +++ b/gr-audio/swig/audio_swig.i @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-comedi/.gitignore b/gr-comedi/.gitignore deleted file mode 100644 index 53edad32f..000000000 --- a/gr-comedi/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -/*.cache -/*.la -/*.lo -/*.pc -/.deps -/.la -/.libs -/.lo -/Makefile -/Makefile.in -/aclocal.m4 -/autom4te.cache -/config.cache -/config.h -/config.h.in -/config.log -/config.status -/configure -/depcomp -/install-sh -/libtool -/ltmain.sh -/make.log -/missing -/missing -/mkinstalldirs -/py-compile -/stamp-h -/stamp-h.in -/stamp-h1 -/stamp-h1.in -/stamp-h2.in diff --git a/gr-comedi/CMakeLists.txt b/gr-comedi/CMakeLists.txt index b12177fda..a10a66a4b 100644 --- a/gr-comedi/CMakeLists.txt +++ b/gr-comedi/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-comedi/Makefile.am b/gr-comedi/Makefile.am deleted file mode 100644 index 4fc1e1eb5..000000000 --- a/gr-comedi/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright 2005 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 -dist_pkgconfig_DATA = gnuradio-comedi.pc diff --git a/gr-comedi/src/.gitignore b/gr-comedi/src/.gitignore deleted file mode 100644 index c43df1bab..000000000 --- a/gr-comedi/src/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo -/comedi.cc -/*.pyc -/comedi.py -/run_tests -/gnuradio -/guile -/python diff --git a/gr-comedi/src/CMakeLists.txt b/gr-comedi/src/CMakeLists.txt index 6ad14737b..1d3d16908 100644 --- a/gr-comedi/src/CMakeLists.txt +++ b/gr-comedi/src/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am deleted file mode 100644 index 5ea0729e1..000000000 --- a/gr-comedi/src/Makefile.am +++ /dev/null @@ -1,92 +0,0 @@ -# -# Copyright 2005,2008,2009,2010 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 -include $(top_srcdir)/Makefile.swig - -TESTS = -EXTRA_DIST += run_tests.in -DISTCLEANFILES += run_tests - - -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES) - -# C/C++ headers get installed in ${prefix}/include/gnuradio -grinclude_HEADERS = \ - comedi_sink_s.h \ - comedi_source_s.h - -noinst_HEADERS = \ - gri_comedi.h - -noinst_PYTHON = \ - qa_comedi.py - -lib_LTLIBRARIES = libgnuradio-comedi.la - -libgnuradio_comedi_la_SOURCES = \ - comedi_sink_s.cc \ - comedi_source_s.cc \ - gri_comedi.cc - -libgnuradio_comedi_la_LIBADD = \ - $(GNURADIO_CORE_LA) \ - $(COMEDI_LIBS) - -libgnuradio_comedi_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) - -################################### -# SWIG interfaces and libraries - -TOP_SWIG_DOC_IFILES = \ - comedi_swig_doc.i - -TOP_SWIG_IFILES = \ - $(TOP_SWIG_DOC_IFILES) \ - comedi.i - -BUILT_SOURCES += \ - $(TOP_SWIG_DOC_IFILES) - -EXTRA_DIST += \ - $(TOP_SWIG_DOC_IFILES) - -$(TOP_SWIG_DOC_IFILES): - `echo "" > $@` - -# Install so that they end up available as: -# import gnuradio.comedi -# This ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio -comedi_pythondir_category = \ - gnuradio - -# additional libraries for linking with the SWIG-generated library -comedi_la_swig_libadd = \ - libgnuradio-comedi.la - -# additional SWIG files to be installed -comedi_swig_swiginclude_headers = \ - $(TOP_SWIG_DOC_IFILES) - -if PYTHON -TESTS += run_tests -endif diff --git a/gr-comedi/src/Makefile.swig.gen b/gr-comedi/src/Makefile.swig.gen deleted file mode 100644 index cf55aa8ad..000000000 --- a/gr-comedi/src/Makefile.swig.gen +++ /dev/null @@ -1,145 +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 comedi.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/comedi -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/comedi -## -## 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. - -comedi_pythondir_category ?= gnuradio/comedi -comedi_pylibdir_category ?= $(comedi_pythondir_category) -comedi_pythondir = $(pythondir)/$(comedi_pythondir_category) -comedi_pylibdir = $(pyexecdir)/$(comedi_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -comedi_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/comedi -# FIXME: determince whether these should be installed with gnuradio. -comedi_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -comedi_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 > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -comedi_swiginclude_HEADERS = \ - comedi.i \ - $(comedi_swiginclude_headers) - -if PYTHON -comedi_pylib_LTLIBRARIES = \ - _comedi.la - -_comedi_la_SOURCES = \ - python/comedi.cc \ - $(comedi_la_swig_sources) - -comedi_python_PYTHON = \ - comedi.py \ - $(comedi_python) - -_comedi_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(comedi_la_swig_libadd) - -_comedi_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(comedi_la_swig_ldflags) - -_comedi_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(comedi_la_swig_cxxflags) - -python/comedi.cc: comedi.py -comedi.py: comedi.i - -# Include the python dependencies for this file --include python/comedi.d - -endif # end of if python - -if GUILE - -comedi_scmlib_LTLIBRARIES = \ - libguile-gnuradio-comedi.la -libguile_gnuradio_comedi_la_SOURCES = \ - guile/comedi.cc \ - $(comedi_la_swig_sources) -nobase_comedi_scm_DATA = \ - gnuradio/comedi.scm \ - gnuradio/comedi-primitive.scm -libguile_gnuradio_comedi_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(comedi_la_swig_libadd) -libguile_gnuradio_comedi_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(comedi_la_swig_ldflags) -libguile_gnuradio_comedi_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(comedi_la_swig_cxxflags) - -guile/comedi.cc: gnuradio/comedi.scm -gnuradio/comedi.scm: comedi.i -gnuradio/comedi-primitive.scm: gnuradio/comedi.scm - -# Include the guile dependencies for this file --include guile/comedi.d - -endif # end of GUILE - - diff --git a/gr-comedi/src/comedi.i b/gr-comedi/src/comedi.i index a15b4d3b9..d3660580a 100644 --- a/gr-comedi/src/comedi.i +++ b/gr-comedi/src/comedi.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,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, @@ -72,13 +72,3 @@ class comedi_sink_s : public gr_sync_block { public: ~comedi_sink_s (); }; - -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-comedi" "scm_init_gnuradio_comedi_module") -%} - -%goops %{ -(use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif diff --git a/gr-comedi/src/comedi_sink_s.cc b/gr-comedi/src/comedi_sink_s.cc index fc5c14931..de1decfb6 100644 --- a/gr-comedi/src/comedi_sink_s.cc +++ b/gr-comedi/src/comedi_sink_s.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 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, @@ -40,7 +40,7 @@ * Feedback is welcome! --SF */ -static std::string +static std::string default_device_name () { return "/dev/comedi0"; diff --git a/gr-comedi/src/comedi_sink_s.h b/gr-comedi/src/comedi_sink_s.h index b36d41304..94d39710c 100644 --- a/gr-comedi/src/comedi_sink_s.h +++ b/gr-comedi/src/comedi_sink_s.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -78,7 +78,7 @@ class comedi_sink_s : public gr_sync_block { public: ~comedi_sink_s (); - + bool check_topology (int ninputs, int noutputs); int work (int noutput_items, diff --git a/gr-comedi/src/comedi_source_s.cc b/gr-comedi/src/comedi_source_s.cc index 5d9f2f6b0..517f1440b 100644 --- a/gr-comedi/src/comedi_source_s.cc +++ b/gr-comedi/src/comedi_source_s.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 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, @@ -38,7 +38,7 @@ // FIXME these should query some kind of user preference -static std::string +static std::string default_device_name () { return "/dev/comedi0"; @@ -197,7 +197,7 @@ comedi_source_s::work (int noutput_items, int o_idx = noutput_items-work_left/d_n_chan/sizeof(sampl_t)+(i-d_buf_back/sizeof(sampl_t))/d_n_chan; if (output_items[chan]) - ((short*)(output_items[chan]))[o_idx] = + ((short*)(output_items[chan]))[o_idx] = (int)pbuf[i%(d_buffer_size/sizeof(sampl_t))] - 32767; } diff --git a/gr-comedi/src/comedi_source_s.h b/gr-comedi/src/comedi_source_s.h index c406f274b..b9fde4c1e 100644 --- a/gr-comedi/src/comedi_source_s.h +++ b/gr-comedi/src/comedi_source_s.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, @@ -79,7 +79,7 @@ class comedi_source_s : public gr_sync_block { public: ~comedi_source_s (); - + bool check_topology (int ninputs, int noutputs); int work (int noutput_items, diff --git a/gr-comedi/src/gri_comedi.cc b/gr-comedi/src/gri_comedi.cc index 15caac4d4..97b3ccd3e 100644 --- a/gr-comedi/src/gri_comedi.cc +++ b/gr-comedi/src/gri_comedi.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gr-comedi/src/gri_comedi.h b/gr-comedi/src/gri_comedi.h index 410db842d..571a41180 100644 --- a/gr-comedi/src/gri_comedi.h +++ b/gr-comedi/src/gri_comedi.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gr-comedi/src/qa_comedi.py b/gr-comedi/src/qa_comedi.py index e690dfa19..a407ab62b 100755 --- a/gr-comedi/src/qa_comedi.py +++ b/gr-comedi/src/qa_comedi.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005,2007 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 comedi @@ -35,6 +35,6 @@ class qa_comedi (gr_unittest.TestCase): """Just see if we can import the module... They may not have COMEDI library, etc. Don't try to run anything""" pass - + if __name__ == '__main__': gr_unittest.main () diff --git a/gr-comedi/src/run_tests.in b/gr-comedi/src/run_tests.in deleted file mode 100644 index 84fefbaca..000000000 --- a/gr-comedi/src/run_tests.in +++ /dev/null @@ -1,10 +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 - -@top_builddir@/run_tests.sh \ - @abs_top_srcdir@/gr-comedi \ - @abs_top_builddir@/gr-comedi \ - @srcdir@ diff --git a/gr-digital/.gitignore b/gr-digital/.gitignore deleted file mode 100644 index 37c287f40..000000000 --- a/gr-digital/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -gnuradio-digital.pc diff --git a/gr-digital/CMakeLists.txt b/gr-digital/CMakeLists.txt index 099af0869..eb7ed67e1 100644 --- a/gr-digital/CMakeLists.txt +++ b/gr-digital/CMakeLists.txt @@ -39,6 +39,8 @@ GR_SET_GLOBAL(GR_DIGITAL_SWIG_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/swig ) +SET(GR_PKG_DIGITAL_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/digital) + ######################################################################## # Begin conditional configuration ######################################################################## diff --git a/gr-digital/Makefile.am b/gr-digital/Makefile.am deleted file mode 100644 index 85a9bbbde..000000000 --- a/gr-digital/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = include lib doc - -if PYTHON -SUBDIRS += swig python apps grc examples -endif - -pkgconfigdir = $(libdir)/pkgconfig -dist_pkgconfig_DATA = gnuradio-digital.pc diff --git a/gr-digital/apps/.gitignore b/gr-digital/apps/.gitignore deleted file mode 100644 index 282522db0..000000000 --- a/gr-digital/apps/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/gr-digital/apps/Makefile.am b/gr-digital/apps/Makefile.am deleted file mode 100644 index 7373a0719..000000000 --- a/gr-digital/apps/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -if PYTHON - -dist_bin_SCRIPTS = - -noinst_PYTHON = - -endif - -EXTRA_DIST += - diff --git a/gr-digital/doc/.gitignore b/gr-digital/doc/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-digital/doc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-digital/doc/Makefile.am b/gr-digital/doc/Makefile.am deleted file mode 100644 index dbfe1d5a2..000000000 --- a/gr-digital/doc/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = - -dist_gr_doc_DATA = \ - README.digital diff --git a/gr-digital/examples/.gitignore b/gr-digital/examples/.gitignore deleted file mode 100644 index d7028d40d..000000000 --- a/gr-digital/examples/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/Makefile -/Makefile.in -/*.8b -/*.16s -/*.16i -/*.32f -/*.32fc -/*.16sc diff --git a/gr-digital/examples/CMakeLists.txt b/gr-digital/examples/CMakeLists.txt index 5c652fc83..33d257e59 100644 --- a/gr-digital/examples/CMakeLists.txt +++ b/gr-digital/examples/CMakeLists.txt @@ -19,6 +19,7 @@ include(GrPython) +# Base stuff GR_PYTHON_INSTALL(PROGRAMS example_costas.py example_fll.py @@ -26,10 +27,11 @@ GR_PYTHON_INSTALL(PROGRAMS run_length.py gen_whitener.py snr_estimators.py - DESTINATION ${GR_PKG_DATA_DIR}/examples/digital + DESTINATION ${GR_PKG_DIGITAL_EXAMPLES_DIR} COMPONENT "digital_python" ) +# Narrowband GR_PYTHON_INSTALL(PROGRAMS narrowband/transmit_path.py narrowband/receive_path.py @@ -41,10 +43,11 @@ GR_PYTHON_INSTALL(PROGRAMS narrowband/digital_bert_rx.py narrowband/digital_bert_tx.py narrowband/tunnel.py - DESTINATION ${GR_PKG_DATA_DIR}/examples/digital/narrowband + DESTINATION ${GR_PKG_DIGITAL_EXAMPLES_DIR}/narrowband COMPONENT "digital_python" ) +# OFDM GR_PYTHON_INSTALL(PROGRAMS ofdm/benchmark_add_channel.py ofdm/benchmark_rx.py @@ -55,6 +58,19 @@ GR_PYTHON_INSTALL(PROGRAMS ofdm/transmit_path.py ofdm/tunnel.py ofdm/uhd_interface.py - DESTINATION ${GR_PKG_DATA_DIR}/examples/digital/ofdm + DESTINATION ${GR_PKG_DIGITAL_EXAMPLES_DIR}/ofdm + COMPONENT "digital_python" +) + +# DEMOD +install( + FILES + demod/digital_freq_lock.grc + demod/mpsk_demod.grc + demod/pam_sync.grc + demod/pam_timing.grc + demod/ber_simulation.grc + demod/dpsk_loopback.grc + DESTINATION ${GR_PKG_DIGITAL_EXAMPLES_DIR}/demod COMPONENT "digital_python" ) diff --git a/gr-digital/examples/Makefile.am b/gr-digital/examples/Makefile.am deleted file mode 100644 index 3e6b32e85..000000000 --- a/gr-digital/examples/Makefile.am +++ /dev/null @@ -1,47 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -dig_examples_prefix= $(exampledir)/digital - -basicdatadir = $(dig_examples_prefix) -dist_basicdata_SCRIPTS = \ - example_costas.py \ - example_fll.py \ - example_timing.py \ - run_length.py \ - gen_whitener.py \ - snr_estimators.py - -nbdatadir = $(dig_examples_prefix)/narrowband -dist_nbdata_SCRIPTS = \ - narrowband/transmit_path.py \ - narrowband/receive_path.py \ - narrowband/uhd_interface.py \ - narrowband/benchmark_tx.py \ - narrowband/benchmark_rx.py \ - narrowband/tx_voice.py \ - narrowband/rx_voice.py \ - narrowband/digital_bert_rx.py \ - narrowband/digital_bert_tx.py \ - narrowband/tunnel.py - diff --git a/gnuradio-examples/grc/simple/ber_simulation.grc b/gr-digital/examples/demod/ber_simulation.grc index 618add29c..6a9361ed1 100644 --- a/gnuradio-examples/grc/simple/ber_simulation.grc +++ b/gr-digital/examples/demod/ber_simulation.grc @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='ASCII'?> <flow_graph> - <timestamp>Thu Mar 19 11:08:59 2009</timestamp> + <timestamp>Tue Apr 3 18:11:51 2012</timestamp> <block> <key>options</key> <param> @@ -36,6 +36,14 @@ <value>Custom</value> </param> <param> + <key>run_options</key> + <value>prompt</value> + </param> + <param> + <key>run</key> + <value>True</value> + </param> + <param> <key>realtime_scheduling</key> <value></value> </param> @@ -84,41 +92,6 @@ </param> </block> <block> - <key>gr_chunks_to_symbols_xx</key> - <param> - <key>id</key> - <value>gr_chunks_to_symbols_xx</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>in_type</key> - <value>byte</value> - </param> - <param> - <key>out_type</key> - <value>complex</value> - </param> - <param> - <key>symbol_table</key> - <value>const</value> - </param> - <param> - <key>dimension</key> - <value>1</value> - </param> - <param> - <key>_coordinate</key> - <value>(360, 237)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> <key>wxgui_numbersink2</key> <param> <key>id</key> @@ -145,10 +118,6 @@ <value>samp_rate</value> </param> <param> - <key>base_value</key> - <value>0.0</value> - </param> - <param> <key>min_value</key> <value>0.0</value> </param> @@ -189,10 +158,18 @@ <value>False</value> </param> <param> + <key>win_size</key> + <value></value> + </param> + <param> <key>grid_pos</key> <value>1, 0, 1, 1</value> </param> <param> + <key>notebook</key> + <value></value> + </param> + <param> <key>_coordinate</key> <value>(1062, 11)</value> </param> @@ -233,30 +210,22 @@ </param> </block> <block> - <key>blks2_error_rate</key> + <key>variable</key> <param> <key>id</key> - <value>blks2_error_rate</value> + <value>samp_rate</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>type</key> - <value>'BER'</value> - </param> - <param> - <key>win_size</key> - <value>1000000</value> - </param> - <param> - <key>bits_per_symbol</key> - <value>int(math.log(len(const))/math.log(2))</value> + <key>value</key> + <value>50e3</value> </param> <param> <key>_coordinate</key> - <value>(670, 41)</value> + <value>(20, 168)</value> </param> <param> <key>_rotation</key> @@ -264,26 +233,22 @@ </param> </block> <block> - <key>gr_constellation_decoder_cb</key> + <key>import</key> <param> <key>id</key> - <value>gr_constellation_decoder_cb</value> + <value>import</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>sym_position</key> - <value>const</value> - </param> - <param> - <key>sym_value_out</key> - <value>range(len(const))</value> + <key>import</key> + <value>import math</value> </param> <param> <key>_coordinate</key> - <value>(708, 224)</value> + <value>(138, 168)</value> </param> <param> <key>_rotation</key> @@ -291,10 +256,10 @@ </param> </block> <block> - <key>random_source_x</key> + <key>wxgui_scopesink2</key> <param> <key>id</key> - <value>random_source_x</value> + <value>wxgui_scopesink2_0</value> </param> <param> <key>_enabled</key> @@ -302,27 +267,63 @@ </param> <param> <key>type</key> - <value>byte</value> + <value>complex</value> </param> <param> - <key>min</key> + <key>title</key> + <value>"Constellation: "+str(const)</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>v_scale</key> <value>0</value> </param> <param> - <key>max</key> - <value>len(const)</value> + <key>v_offset</key> + <value>0</value> </param> <param> - <key>num_samps</key> - <value>1000000</value> + <key>t_scale</key> + <value>0</value> </param> <param> - <key>repeat</key> + <key>ac_couple</key> <value>False</value> </param> <param> + <key>xy_mode</key> + <value>True</value> + </param> + <param> + <key>num_inputs</key> + <value>1</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value>2, 0, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>trig_mode</key> + <value>gr.gr_TRIG_MODE_AUTO</value> + </param> + <param> + <key>y_axis_label</key> + <value>Counts</value> + </param> + <param> <key>_coordinate</key> - <value>(15, 244)</value> + <value>(828, 368)</value> </param> <param> <key>_rotation</key> @@ -330,22 +331,53 @@ </param> </block> <block> - <key>variable</key> + <key>gr_add_xx</key> <param> <key>id</key> - <value>noise</value> + <value>gr_add_xx</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>value</key> - <value>.25</value> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>num_inputs</key> + <value>2</value> + </param> + <param> + <key>vlen</key> + <value>1</value> </param> <param> <key>_coordinate</key> - <value>(18, 386)</value> + <value>(652, 395)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>digital_constellation_decoder_cb</key> + <param> + <key>id</key> + <value>digital_constellation_decoder_cb_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>constellation</key> + <value>const.base()</value> + </param> + <param> + <key>_coordinate</key> + <value>(693, 205)</value> </param> <param> <key>_rotation</key> @@ -364,7 +396,7 @@ </param> <param> <key>value</key> - <value>1+1j, 1-1j, -1-1j, -1+1j</value> + <value>digital.qpsk_constellation()</value> </param> <param> <key>_coordinate</key> @@ -379,7 +411,7 @@ <key>variable</key> <param> <key>id</key> - <value>samp_rate</value> + <value>const_points</value> </param> <param> <key>_enabled</key> @@ -387,11 +419,11 @@ </param> <param> <key>value</key> - <value>50e3</value> + <value>const.points()</value> </param> <param> <key>_coordinate</key> - <value>(20, 168)</value> + <value>(17, 532)</value> </param> <param> <key>_rotation</key> @@ -399,22 +431,38 @@ </param> </block> <block> - <key>import</key> + <key>random_source_x</key> <param> <key>id</key> - <value>import</value> + <value>random_source_x</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>import</key> - <value>import math</value> + <key>type</key> + <value>byte</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>len(const_points)</value> + </param> + <param> + <key>num_samps</key> + <value>1000000</value> + </param> + <param> + <key>repeat</key> + <value>False</value> </param> <param> <key>_coordinate</key> - <value>(138, 168)</value> + <value>(15, 244)</value> </param> <param> <key>_rotation</key> @@ -422,30 +470,38 @@ </param> </block> <block> - <key>gr_add_xx</key> + <key>gr_chunks_to_symbols_xx</key> <param> <key>id</key> - <value>gr_add_xx</value> + <value>gr_chunks_to_symbols_xx</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>type</key> + <key>in_type</key> + <value>byte</value> + </param> + <param> + <key>out_type</key> <value>complex</value> </param> <param> - <key>num_inputs</key> - <value>2</value> + <key>symbol_table</key> + <value>const_points</value> </param> <param> - <key>vlen</key> + <key>dimension</key> + <value>1</value> + </param> + <param> + <key>num_ports</key> <value>1</value> </param> <param> <key>_coordinate</key> - <value>(652, 395)</value> + <value>(367, 260)</value> </param> <param> <key>_rotation</key> @@ -453,10 +509,10 @@ </param> </block> <block> - <key>wxgui_scopesink2</key> + <key>blks2_error_rate</key> <param> <key>id</key> - <value>wxgui_scopesink2_0</value> + <value>blks2_error_rate</value> </param> <param> <key>_enabled</key> @@ -464,43 +520,74 @@ </param> <param> <key>type</key> - <value>complex</value> + <value>'BER'</value> </param> <param> - <key>title</key> - <value>"Constellation: "+str(const)</value> + <key>win_size</key> + <value>1000000</value> </param> <param> - <key>samp_rate</key> - <value>samp_rate</value> + <key>bits_per_symbol</key> + <value>int(math.log(len(const_points))/math.log(2))</value> </param> <param> - <key>v_scale</key> - <value>0</value> + <key>_coordinate</key> + <value>(670, 41)</value> </param> <param> - <key>t_scale</key> + <key>_rotation</key> <value>0</value> </param> + </block> + <block> + <key>variable_slider</key> <param> - <key>ac_couple</key> - <value>False</value> + <key>id</key> + <value>noise</value> </param> <param> - <key>xy_mode</key> + <key>_enabled</key> <value>True</value> </param> <param> - <key>num_inputs</key> + <key>label</key> + <value>AWGN Noise</value> + </param> + <param> + <key>value</key> + <value>0.10</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> <value>1</value> </param> <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> <key>grid_pos</key> - <value>2, 0, 1, 1</value> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> </param> <param> <key>_coordinate</key> - <value>(828, 368)</value> + <value>(268, 481)</value> </param> <param> <key>_rotation</key> @@ -520,18 +607,6 @@ <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_constellation_decoder_cb</source_block_id> - <sink_block_id>blks2_error_rate</sink_block_id> - <source_key>0</source_key> - <sink_key>1</sink_key> - </connection> - <connection> - <source_block_id>gr_add_xx</source_block_id> - <sink_block_id>gr_constellation_decoder_cb</sink_block_id> - <source_key>0</source_key> - <sink_key>0</sink_key> - </connection> - <connection> <source_block_id>gr_chunks_to_symbols_xx</source_block_id> <sink_block_id>gr_add_xx</sink_block_id> <source_key>0</source_key> @@ -561,4 +636,16 @@ <source_key>0</source_key> <sink_key>0</sink_key> </connection> + <connection> + <source_block_id>digital_constellation_decoder_cb_0</source_block_id> + <sink_block_id>blks2_error_rate</sink_block_id> + <source_key>0</source_key> + <sink_key>1</sink_key> + </connection> + <connection> + <source_block_id>gr_add_xx</source_block_id> + <sink_block_id>digital_constellation_decoder_cb_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> </flow_graph> diff --git a/gnuradio-examples/grc/demod/digital_freq_lock.grc b/gr-digital/examples/demod/digital_freq_lock.grc index 36037febb..36037febb 100644 --- a/gnuradio-examples/grc/demod/digital_freq_lock.grc +++ b/gr-digital/examples/demod/digital_freq_lock.grc diff --git a/gnuradio-examples/grc/simple/dpsk_loopback.grc b/gr-digital/examples/demod/dpsk_loopback.grc index 6a507c98d..aef6a7738 100644 --- a/gnuradio-examples/grc/simple/dpsk_loopback.grc +++ b/gr-digital/examples/demod/dpsk_loopback.grc @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='ASCII'?> <flow_graph> - <timestamp>Tue Mar 17 12:53:37 2009</timestamp> + <timestamp>Tue Apr 3 18:03:52 2012</timestamp> <block> <key>options</key> <param> @@ -36,47 +36,20 @@ <value>Custom</value> </param> <param> - <key>realtime_scheduling</key> - <value></value> - </param> - <param> - <key>_coordinate</key> - <value>(10, 10)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>blks2_dxpsk_mod</key> - <param> - <key>id</key> - <value>blks2_dxpsk_mod_0</value> + <key>run_options</key> + <value>prompt</value> </param> <param> - <key>_enabled</key> + <key>run</key> <value>True</value> </param> <param> - <key>type</key> - <value>dbpsk</value> - </param> - <param> - <key>samples_per_symbol</key> - <value>2</value> - </param> - <param> - <key>excess_bw</key> - <value>0.35</value> - </param> - <param> - <key>gray_code</key> - <value>True</value> + <key>realtime_scheduling</key> + <value></value> </param> <param> <key>_coordinate</key> - <value>(426, 295)</value> + <value>(10, 10)</value> </param> <param> <key>_rotation</key> @@ -137,63 +110,24 @@ <value>100</value> </param> <param> - <key>slider_length</key> - <value>200</value> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> </param> <param> - <key>slider_type</key> - <value>horizontal</value> + <key>converver</key> + <value>float_converter</value> </param> <param> <key>grid_pos</key> <value></value> </param> <param> - <key>_coordinate</key> - <value>(12, 257)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>blks2_packet_encoder</key> - <param> - <key>id</key> - <value>blks2_packet_encoder_0</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>float</value> - </param> - <param> - <key>samples_per_symbol</key> - <value>2</value> - </param> - <param> - <key>bits_per_symbol</key> - <value>1</value> - </param> - <param> - <key>access_code</key> + <key>notebook</key> <value></value> </param> <param> - <key>pad_for_usrp</key> - <value>True</value> - </param> - <param> - <key>payload_length</key> - <value>0</value> - </param> - <param> <key>_coordinate</key> - <value>(216, 260)</value> + <value>(12, 257)</value> </param> <param> <key>_rotation</key> @@ -306,10 +240,10 @@ </param> </block> <block> - <key>wxgui_scopesink2</key> + <key>digital_dxpsk_demod</key> <param> <key>id</key> - <value>wxgui_scopesink2_0</value> + <value>digital_dxpsk_demod_0</value> </param> <param> <key>_enabled</key> @@ -317,43 +251,51 @@ </param> <param> <key>type</key> - <value>float</value> + <value>dbpsk</value> </param> <param> - <key>title</key> - <value>Scope Plot</value> + <key>samples_per_symbol</key> + <value>2</value> </param> <param> - <key>samp_rate</key> - <value>samp_rate</value> + <key>excess_bw</key> + <value>0.35</value> </param> <param> - <key>frame_decim</key> - <value>15</value> + <key>freq_bw</key> + <value>6.28/100.0</value> </param> <param> - <key>v_scale</key> - <value>0</value> + <key>phase_bw</key> + <value>6.28/100.0</value> </param> <param> - <key>t_scale</key> - <value>1./freq</value> + <key>timing_bw</key> + <value>6.28/100.0</value> </param> <param> - <key>marker</key> - <value>set_format_line</value> + <key>omega_relative_limit</key> + <value>0.005</value> </param> <param> - <key>num_inputs</key> - <value>1</value> + <key>gray_coded</key> + <value>True</value> </param> <param> - <key>grid_pos</key> - <value></value> + <key>verbose</key> + <value>False</value> + </param> + <param> + <key>log</key> + <value>False</value> + </param> + <param> + <key>sync_out</key> + <value>False</value> </param> <param> <key>_coordinate</key> - <value>(769, 12)</value> + <value>(639, 254)</value> </param> <param> <key>_rotation</key> @@ -361,10 +303,10 @@ </param> </block> <block> - <key>blks2_dxpsk_demod</key> + <key>digital_dxpsk_mod</key> <param> <key>id</key> - <value>blks2_dxpsk_demod_0</value> + <value>digital_dxpsk_mod_0</value> </param> <param> <key>_enabled</key> @@ -383,28 +325,138 @@ <value>0.35</value> </param> <param> - <key>costas_alpha</key> - <value>0.175</value> + <key>gray_coded</key> + <value>True</value> </param> <param> - <key>gain_mu</key> - <value>0.175</value> + <key>verbose</key> + <value>False</value> </param> <param> - <key>mu</key> - <value>0.5</value> + <key>log</key> + <value>False</value> </param> <param> - <key>omega_relative_limit</key> - <value>0.005</value> + <key>_coordinate</key> + <value>(421, 294)</value> </param> <param> - <key>gray_code</key> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>blks2_packet_encoder</key> + <param> + <key>id</key> + <value>blks2_packet_encoder_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>samples_per_symbol</key> + <value>2</value> + </param> + <param> + <key>bits_per_symbol</key> + <value>1</value> + </param> + <param> + <key>access_code</key> + <value></value> + </param> + <param> + <key>pad_for_usrp</key> <value>True</value> </param> <param> + <key>payload_length</key> + <value>0</value> + </param> + <param> <key>_coordinate</key> - <value>(691, 219)</value> + <value>(216, 286)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_scopesink2</key> + <param> + <key>id</key> + <value>wxgui_scopesink2_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>title</key> + <value>Scope Plot</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>v_scale</key> + <value>0</value> + </param> + <param> + <key>v_offset</key> + <value>0</value> + </param> + <param> + <key>t_scale</key> + <value>1./freq</value> + </param> + <param> + <key>ac_couple</key> + <value>False</value> + </param> + <param> + <key>xy_mode</key> + <value>False</value> + </param> + <param> + <key>num_inputs</key> + <value>1</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>trig_mode</key> + <value>gr.gr_TRIG_MODE_AUTO</value> + </param> + <param> + <key>y_axis_label</key> + <value>Counts</value> + </param> + <param> + <key>_coordinate</key> + <value>(760, 41)</value> </param> <param> <key>_rotation</key> @@ -412,38 +464,38 @@ </param> </block> <connection> - <source_block_id>blks2_dxpsk_mod_0</source_block_id> - <sink_block_id>blks2_dxpsk_demod_0</sink_block_id> + <source_block_id>gr_sig_source_x_0</source_block_id> + <sink_block_id>gr_throttle_0_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>blks2_dxpsk_demod_0</source_block_id> - <sink_block_id>blks2_packet_decoder_0</sink_block_id> + <source_block_id>gr_throttle_0_0</source_block_id> + <sink_block_id>blks2_packet_encoder_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>blks2_packet_encoder_0</source_block_id> - <sink_block_id>blks2_dxpsk_mod_0</sink_block_id> + <source_block_id>blks2_packet_decoder_0</source_block_id> + <sink_block_id>wxgui_scopesink2_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_sig_source_x_0</source_block_id> - <sink_block_id>gr_throttle_0_0</sink_block_id> + <source_block_id>digital_dxpsk_demod_0</source_block_id> + <sink_block_id>blks2_packet_decoder_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_throttle_0_0</source_block_id> - <sink_block_id>blks2_packet_encoder_0</sink_block_id> + <source_block_id>digital_dxpsk_mod_0</source_block_id> + <sink_block_id>digital_dxpsk_demod_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>blks2_packet_decoder_0</source_block_id> - <sink_block_id>wxgui_scopesink2_0</sink_block_id> + <source_block_id>blks2_packet_encoder_0</source_block_id> + <sink_block_id>digital_dxpsk_mod_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> diff --git a/gnuradio-examples/grc/demod/mpsk_demod.grc b/gr-digital/examples/demod/mpsk_demod.grc index 08108dcba..d7cca9661 100644 --- a/gnuradio-examples/grc/demod/mpsk_demod.grc +++ b/gr-digital/examples/demod/mpsk_demod.grc @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='ASCII'?> <flow_graph> - <timestamp>Mon Oct 5 18:34:52 2009</timestamp> + <timestamp>Tue Apr 3 18:01:57 2012</timestamp> <block> <key>options</key> <param> @@ -80,119 +80,6 @@ </param> </block> <block> - <key>random_source_x</key> - <param> - <key>id</key> - <value>random_source_x_0</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>byte</value> - </param> - <param> - <key>min</key> - <value>0</value> - </param> - <param> - <key>max</key> - <value>2**8</value> - </param> - <param> - <key>num_samps</key> - <value>10000</value> - </param> - <param> - <key>repeat</key> - <value>True</value> - </param> - <param> - <key>_coordinate</key> - <value>(155, 160)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>blks2_dxpsk_mod</key> - <param> - <key>id</key> - <value>blks2_dxpsk_mod_0</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>dqpsk</value> - </param> - <param> - <key>samples_per_symbol</key> - <value>samps_per_sym</value> - </param> - <param> - <key>excess_bw</key> - <value>0.35</value> - </param> - <param> - <key>gray_code</key> - <value>True</value> - </param> - <param> - <key>verbose</key> - <value>False</value> - </param> - <param> - <key>log</key> - <value>False</value> - </param> - <param> - <key>_coordinate</key> - <value>(391, 54)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>gr_throttle</key> - <param> - <key>id</key> - <value>gr_throttle_0</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>complex</value> - </param> - <param> - <key>samples_per_second</key> - <value>samp_rate</value> - </param> - <param> - <key>vlen</key> - <value>1</value> - </param> - <param> - <key>_coordinate</key> - <value>(654, 142)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> <key>variable</key> <param> <key>id</key> @@ -216,45 +103,6 @@ </param> </block> <block> - <key>gr_channel_model</key> - <param> - <key>id</key> - <value>gr_channel_model_0</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>noise_voltage</key> - <value>noise</value> - </param> - <param> - <key>freq_offset</key> - <value>freq_off</value> - </param> - <param> - <key>epsilon</key> - <value>1.0</value> - </param> - <param> - <key>taps</key> - <value>1.0</value> - </param> - <param> - <key>seed</key> - <value>42</value> - </param> - <param> - <key>_coordinate</key> - <value>(487, 282)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> <key>variable_slider</key> <param> <key>id</key> @@ -434,8 +282,8 @@ <value>0</value> </param> <param> - <key>alpha</key> - <value>0.005</value> + <key>loop_bw</key> + <value>6.28/100.0</value> </param> <param> <key>fmax</key> @@ -458,6 +306,10 @@ <value>0.005</value> </param> <param> + <key>win_size</key> + <value></value> + </param> + <param> <key>grid_pos</key> <value></value> </param> @@ -537,6 +389,14 @@ <value>0</value> </param> <param> + <key>win</key> + <value>None</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> <key>grid_pos</key> <value></value> </param> @@ -553,33 +413,185 @@ <value>0</value> </param> </block> + <block> + <key>gr_channel_model</key> + <param> + <key>id</key> + <value>gr_channel_model_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>noise_voltage</key> + <value>noise</value> + </param> + <param> + <key>freq_offset</key> + <value>freq_off</value> + </param> + <param> + <key>epsilon</key> + <value>1.0</value> + </param> + <param> + <key>taps</key> + <value>1.0</value> + </param> + <param> + <key>seed</key> + <value>42</value> + </param> + <param> + <key>_coordinate</key> + <value>(487, 282)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_throttle</key> + <param> + <key>id</key> + <value>gr_throttle_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>samples_per_second</key> + <value>samp_rate</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(633, 82)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>random_source_x</key> + <param> + <key>id</key> + <value>random_source_x_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>byte</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>2**8</value> + </param> + <param> + <key>num_samps</key> + <value>10000</value> + </param> + <param> + <key>repeat</key> + <value>True</value> + </param> + <param> + <key>_coordinate</key> + <value>(161, 119)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>digital_dxpsk_mod</key> + <param> + <key>id</key> + <value>digital_dxpsk_mod_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>dqpsk</value> + </param> + <param> + <key>samples_per_symbol</key> + <value>samps_per_sym</value> + </param> + <param> + <key>excess_bw</key> + <value>0.35</value> + </param> + <param> + <key>gray_coded</key> + <value>True</value> + </param> + <param> + <key>verbose</key> + <value>False</value> + </param> + <param> + <key>log</key> + <value>False</value> + </param> + <param> + <key>_coordinate</key> + <value>(361, 119)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> <connection> - <source_block_id>random_source_x_0</source_block_id> - <sink_block_id>blks2_dxpsk_mod_0</sink_block_id> + <source_block_id>gr_throttle_0</source_block_id> + <sink_block_id>wxgui_constellationsink2_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> <source_block_id>gr_throttle_0</source_block_id> - <sink_block_id>wxgui_constellationsink2_0</sink_block_id> + <sink_block_id>wxgui_fftsink2_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_throttle_0</source_block_id> - <sink_block_id>wxgui_fftsink2_0</sink_block_id> + <source_block_id>gr_channel_model_0</source_block_id> + <sink_block_id>gr_throttle_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>blks2_dxpsk_mod_0</source_block_id> + <source_block_id>digital_dxpsk_mod_0</source_block_id> <sink_block_id>gr_channel_model_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_channel_model_0</source_block_id> - <sink_block_id>gr_throttle_0</sink_block_id> + <source_block_id>random_source_x_0</source_block_id> + <sink_block_id>digital_dxpsk_mod_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> diff --git a/gnuradio-examples/grc/demod/pam_sync.grc b/gr-digital/examples/demod/pam_sync.grc index 8571995a5..8571995a5 100644 --- a/gnuradio-examples/grc/demod/pam_sync.grc +++ b/gr-digital/examples/demod/pam_sync.grc diff --git a/gnuradio-examples/grc/demod/pam_timing.grc b/gr-digital/examples/demod/pam_timing.grc index 02130f481..02130f481 100644 --- a/gnuradio-examples/grc/demod/pam_timing.grc +++ b/gr-digital/examples/demod/pam_timing.grc diff --git a/gr-digital/examples/narrowband/digital_bert_rx.py b/gr-digital/examples/narrowband/digital_bert_rx.py index dfed0eee7..cc12b71b2 100755 --- a/gr-digital/examples/narrowband/digital_bert_rx.py +++ b/gr-digital/examples/narrowband/digital_bert_rx.py @@ -74,7 +74,7 @@ class bert_receiver(gr.hier_block2): self._sample_rate = self._symbol_rate * samples_per_symbol # Add an SNR probe on the demodulated constellation - self._snr_probe = gr.probe_mpsk_snr_c(10.0/self._symbol_rate) + self._snr_probe = digital.probe_mpsk_snr_est_c(digital.SNR_EST_M2M4, alpha=10.0/self._symbol_rate) self.connect(self._demod.time_recov, self._snr_probe) # Descramble BERT sequence. A channel error will create 3 incorrect bits diff --git a/gr-digital/grc/.gitignore b/gr-digital/grc/.gitignore deleted file mode 100644 index 3dda72986..000000000 --- a/gr-digital/grc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile diff --git a/gr-digital/grc/Makefile.am b/gr-digital/grc/Makefile.am deleted file mode 100644 index 029eeece2..000000000 --- a/gr-digital/grc/Makefile.am +++ /dev/null @@ -1,57 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -grcblocksdir = $(grc_blocksdir) - -dist_grcblocks_DATA = \ - digital_block_tree.xml \ - digital_binary_slicer_fb.xml \ - digital_clock_recovery_mm_xx.xml \ - digital_constellation_decoder_cb.xml \ - digital_constellation_receiver_cb.xml \ - digital_correlate_access_code_bb.xml \ - digital_costas_loop_cc.xml \ - digital_cma_equalizer_cc.xml \ - digital_cpmmod_bc.xml \ - digital_fll_band_edge_cc.xml \ - digital_gmsk_demod.xml \ - digital_gmsk_mod.xml \ - digital_gmskmod_bc.xml \ - digital_kurtotic_equalizer_cc.xml \ - digital_lms_dd_equalizer_cc.xml \ - digital_mpsk_receiver_cc.xml \ - digital_mpsk_snr_est_cc.xml \ - digital_probe_mpsk_snr_est_c.xml \ - digital_dxpsk_mod.xml \ - digital_dxpsk_demod.xml \ - digital_psk_mod.xml \ - digital_psk_demod.xml \ - digital_qam_mod.xml \ - digital_qam_demod.xml \ - digital_ofdm_mod.xml \ - digital_ofdm_demod.xml \ - digital_ofdm_cyclic_prefixer.xml \ - digital_ofdm_frame_acquisition.xml \ - digital_ofdm_insert_preamble.xml \ - digital_ofdm_sampler.xml \ - digital_ofdm_sync_pn.xml diff --git a/gr-digital/include/.gitignore b/gr-digital/include/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-digital/include/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-digital/include/Makefile.am b/gr-digital/include/Makefile.am deleted file mode 100644 index 3cf186d3d..000000000 --- a/gr-digital/include/Makefile.am +++ /dev/null @@ -1,54 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -# These headers get installed in ${prefix}/include/gnuradio -grinclude_HEADERS = \ - digital_api.h \ - digital_impl_mpsk_snr_est.h \ - digital_binary_slicer_fb.h \ - digital_clock_recovery_mm_cc.h \ - digital_clock_recovery_mm_ff.h \ - digital_constellation.h \ - digital_constellation_receiver_cb.h \ - digital_constellation_decoder_cb.h \ - digital_correlate_access_code_bb.h \ - digital_costas_loop_cc.h \ - digital_cma_equalizer_cc.h \ - digital_crc32.h \ - digital_fll_band_edge_cc.h \ - digital_lms_dd_equalizer_cc.h \ - digital_kurtotic_equalizer_cc.h \ - digital_metric_type.h \ - digital_mpsk_receiver_cc.h \ - digital_mpsk_snr_est_cc.h \ - digital_ofdm_cyclic_prefixer.h \ - digital_ofdm_frame_acquisition.h \ - digital_ofdm_frame_sink.h \ - digital_ofdm_insert_preamble.h \ - digital_ofdm_mapper_bcv.h \ - digital_ofdm_sampler.h \ - digital_probe_mpsk_snr_est_c.h \ - digital_gmskmod_bc.h \ - digital_cpmmod_bc.h - -libgnuradio_digital_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) diff --git a/gr-digital/lib/.gitignore b/gr-digital/lib/.gitignore deleted file mode 100644 index 1b6114c39..000000000 --- a/gr-digital/lib/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/.libs -/.deps -/Makefile -/Makefile.in diff --git a/gr-digital/lib/Makefile.am b/gr-digital/lib/Makefile.am deleted file mode 100644 index d5ad199e3..000000000 --- a/gr-digital/lib/Makefile.am +++ /dev/null @@ -1,59 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) \ - $(GR_DIGITAL_INCLUDES) $(WITH_INCLUDES) - -lib_LTLIBRARIES = libgnuradio-digital.la - -libgnuradio_digital_la_SOURCES = \ - digital_impl_mpsk_snr_est.cc \ - digital_binary_slicer_fb.cc \ - digital_clock_recovery_mm_cc.cc \ - digital_clock_recovery_mm_ff.cc \ - digital_constellation.cc \ - digital_constellation_receiver_cb.cc \ - digital_constellation_decoder_cb.cc \ - digital_correlate_access_code_bb.cc \ - digital_costas_loop_cc.cc \ - digital_cma_equalizer_cc.cc \ - digital_crc32.cc \ - digital_fll_band_edge_cc.cc \ - digital_lms_dd_equalizer_cc.cc \ - digital_kurtotic_equalizer_cc.cc \ - digital_mpsk_receiver_cc.cc \ - digital_mpsk_snr_est_cc.cc \ - digital_ofdm_cyclic_prefixer.cc \ - digital_ofdm_frame_acquisition.cc \ - digital_ofdm_frame_sink.cc \ - digital_ofdm_insert_preamble.cc \ - digital_ofdm_mapper_bcv.cc \ - digital_ofdm_sampler.cc \ - digital_probe_mpsk_snr_est_c.cc \ - digital_gmskmod_bc.cc \ - digital_cpmmod_bc.cc - -libgnuradio_digital_la_LIBADD = \ - $(GNURADIO_CORE_LA) - -libgnuradio_digital_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) diff --git a/gr-digital/python/.gitignore b/gr-digital/python/.gitignore deleted file mode 100644 index 604b402c5..000000000 --- a/gr-digital/python/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -/run_tests diff --git a/gr-digital/python/Makefile.am b/gr-digital/python/Makefile.am deleted file mode 100644 index 42bcc4dd2..000000000 --- a/gr-digital/python/Makefile.am +++ /dev/null @@ -1,71 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -TESTS = -EXTRA_DIST += run_tests.in - -if PYTHON -SUBDIRS = utils -TESTS += run_tests - -digitaldir = $(grpythondir)/digital - -noinst_PYTHON = \ - qa_digital.py \ - qa_binary_slicer_fb.py \ - qa_clock_recovery_mm.py \ - qa_cma_equalizer.py \ - qa_cpm.py \ - qa_constellation.py \ - qa_constellation_receiver.py \ - qa_constellation_decoder_cb.py \ - qa_correlate_access_code.py \ - qa_costas_loop_cc.py \ - qa_crc32.py \ - qa_fll_band_edge.py \ - qa_lms_equalizer.py \ - qa_mpsk_receiver.py \ - qa_mpsk_snr_est.py \ - qa_ofdm_insert_preamble.py - -digital_PYTHON = \ - __init__.py \ - bpsk.py \ - cpm.py \ - crc.py \ - generic_mod_demod.py \ - gmsk.py \ - modulation_utils.py \ - ofdm.py \ - ofdm_packet_utils.py \ - ofdm_receiver.py \ - ofdm_sync_fixed.py \ - ofdm_sync_ml.py \ - ofdm_sync_pnac.py \ - ofdm_sync_pn.py \ - packet_utils.py \ - pkt.py \ - psk.py \ - qam.py \ - qpsk.py -endif diff --git a/gr-digital/python/run_tests.in b/gr-digital/python/run_tests.in deleted file mode 100644 index b39e7e847..000000000 --- a/gr-digital/python/run_tests.in +++ /dev/null @@ -1,10 +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 - -@top_builddir@/run_tests.sh \ - @abs_top_srcdir@/gr-digital \ - @abs_top_builddir@/gr-digital \ - @srcdir@ diff --git a/gr-digital/python/utils/.gitignore b/gr-digital/python/utils/.gitignore deleted file mode 100644 index 60c81fdce..000000000 --- a/gr-digital/python/utils/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -run_tests -Makefile -Makefile.in diff --git a/gr-digital/python/utils/Makefile.am b/gr-digital/python/utils/Makefile.am deleted file mode 100644 index 6da4d61dd..000000000 --- a/gr-digital/python/utils/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -if PYTHON -utilspythondir = $(grpythondir)/digital/utils - -TESTS = - -utilspython_PYTHON = \ - __init__.py \ - gray_code.py \ - mod_codes.py \ - alignment.py -endif
\ No newline at end of file diff --git a/gr-digital/swig/.gitignore b/gr-digital/swig/.gitignore deleted file mode 100644 index 7e864f43f..000000000 --- a/gr-digital/swig/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -/Makefile -/Makefile.in -/pager_swig.py -/pager_swig.cc -/*.pyc -/run_tests -/run_guile_tests -/guile -/python diff --git a/gr-digital/swig/Makefile.am b/gr-digital/swig/Makefile.am deleted file mode 100644 index 97b47fafa..000000000 --- a/gr-digital/swig/Makefile.am +++ /dev/null @@ -1,104 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common -include $(top_srcdir)/Makefile.swig - -TESTS = -EXTRA_DIST += $(nobase_guile_DATA) - -AM_CPPFLAGS = \ - $(GR_DIGITAL_INCLUDES) \ - $(STD_DEFINES_AND_INCLUDES) \ - $(PYTHON_CPPFLAGS) \ - $(WITH_INCLUDES) - -TOP_SWIG_DOC_IFILES = \ - digital_swig_doc.i - -BUILT_SOURCES += \ - $(TOP_SWIG_DOC_IFILES) - -EXTRA_DIST += \ - $(TOP_SWIG_DOC_IFILES) - -$(TOP_SWIG_DOC_IFILES): - `echo "" > $@` - -if GUILE -nobase_guile_DATA = \ - gnuradio/digital.scm -endif - -noinst_GUILE = digital.test - - -############################## -# SWIG interface and library -TOP_SWIG_IFILES = \ - $(TOP_SWIG_DOC_IFILES) \ - digital_swig.i - -# Install so that they end up available as: -# import gnuradio.digital -# This ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio/digital -digital_swig_pythondir_category = \ - gnuradio/digital - -# additional libraries for linking with the SWIG-generated library -digital_swig_la_swig_libadd = \ - $(abs_top_builddir)/gr-digital/lib/libgnuradio-digital.la - -# additional SWIG files to be installed -digital_swig_swiginclude_headers = \ - digital_binary_slicer_fb.i \ - digital_clock_recovery_mm_cc.i \ - digital_clock_recovery_mm_ff.i \ - digital_constellation.i \ - digital_constellation_receiver_cb.i \ - digital_constellation_decoder_cb.i \ - digital_correlate_access_code_bb.i \ - digital_costas_loop_cc.i \ - digital_cma_equalizer_cc.i \ - digital_crc32.i \ - digital_fll_band_edge_cc.i \ - digital_lms_dd_equalizer_cc.i \ - digital_kurtotic_equalizer_cc.i \ - digital_mpsk_receiver_cc.i \ - digital_mpsk_snr_est_cc.i \ - digital_ofdm_cyclic_prefixer.i \ - digital_ofdm_frame_acquisition.i \ - digital_ofdm_frame_sink.i \ - digital_ofdm_insert_preamble.i \ - digital_ofdm_mapper_bcv.i \ - digital_ofdm_sampler.i \ - digital_probe_mpsk_snr_est_c.i \ - digital_gmskmod_bc.i \ - digital_cpmmod_bc.i \ - $(TOP_SWIG_DOC_IFILES) - -digital_swig_swig_args = \ - $(GR_DIGITAL_INCLUDES) - -if GUILE -TESTS += run_guile_tests -endif
\ No newline at end of file diff --git a/gr-digital/swig/Makefile.swig.gen b/gr-digital/swig/Makefile.swig.gen deleted file mode 100644 index ff3eff4e9..000000000 --- a/gr-digital/swig/Makefile.swig.gen +++ /dev/null @@ -1,142 +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 digital_swig.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/digital_swig -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/digital_swig -## -## 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. - -digital_swig_pythondir_category ?= gnuradio/digital_swig -digital_swig_pylibdir_category ?= $(digital_swig_pythondir_category) -digital_swig_pythondir = $(pythondir)/$(digital_swig_pythondir_category) -digital_swig_pylibdir = $(pyexecdir)/$(digital_swig_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -digital_swig_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/digital_swig -# FIXME: determince whether these should be installed with gnuradio. -digital_swig_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -digital_swig_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 > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -digital_swig_swiginclude_HEADERS = \ - digital_swig.i \ - $(digital_swig_swiginclude_headers) - -if PYTHON -digital_swig_pylib_LTLIBRARIES = \ - _digital_swig.la - -_digital_swig_la_SOURCES = \ - python/digital_swig.cc \ - $(digital_swig_la_swig_sources) - -digital_swig_python_PYTHON = \ - digital_swig.py \ - $(digital_swig_python) - -_digital_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(digital_swig_la_swig_libadd) - -_digital_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(digital_swig_la_swig_ldflags) - -_digital_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) - -python/digital_swig.cc: digital_swig.py -digital_swig.py: digital_swig.i - -# Include the python dependencies for this file --include python/digital_swig.d - -endif # end of if python - -if GUILE - -digital_swig_scmlib_LTLIBRARIES = \ - libguile-gnuradio-digital_swig.la -libguile_gnuradio_digital_swig_la_SOURCES = \ - guile/digital_swig.cc \ - $(digital_swig_la_swig_sources) -nobase_digital_swig_scm_DATA = \ - gnuradio/digital_swig.scm \ - gnuradio/digital_swig-primitive.scm -libguile_gnuradio_digital_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(digital_swig_la_swig_libadd) -libguile_gnuradio_digital_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(digital_swig_la_swig_ldflags) -libguile_gnuradio_digital_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(digital_swig_la_swig_cxxflags) - -guile/digital_swig.cc: gnuradio/digital_swig.scm -gnuradio/digital_swig.scm: digital_swig.i -gnuradio/digital_swig-primitive.scm: gnuradio/digital_swig.scm - -# Include the guile dependencies for this file --include guile/digital_swig.d - -endif # end of GUILE diff --git a/gr-digital/swig/digital_swig.i b/gr-digital/swig/digital_swig.i index a39ef9ab7..4e9c660bc 100644 --- a/gr-digital/swig/digital_swig.i +++ b/gr-digital/swig/digital_swig.i @@ -86,21 +86,3 @@ enum snr_est_type_t { %include "digital_probe_mpsk_snr_est_c.i" %include "digital_cpmmod_bc.i" %include "digital_gmskmod_bc.i" - -#if SWIGGUILE - -enum snr_est_type_t { - SNR_EST_SIMPLE = 0, // Simple estimator (>= 7 dB) - SNR_EST_SKEW, // Skewness-base est (>= 5 dB) - SNR_EST_M2M4, // 2nd & 4th moment est (>= 1 dB) - SNR_EST_SVR // SVR-based est (>= 0dB) -}; - -%scheme %{ -(load-extension-global "libguile-gnuradio-digital_swig" "scm_init_gnuradio_digital_swig_module") -%} - -%goops %{ -(use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif diff --git a/gr-digital/swig/gnuradio/.gitignore b/gr-digital/swig/gnuradio/.gitignore deleted file mode 100644 index c264c571a..000000000 --- a/gr-digital/swig/gnuradio/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -digital_swig-primitive.scm -digital_swig.scm diff --git a/gr-digital/swig/run_guile_tests.in b/gr-digital/swig/run_guile_tests.in deleted file mode 100644 index 5d08b0dd5..000000000 --- a/gr-digital/swig/run_guile_tests.in +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -. @top_builddir@/setup_guile_test_env - -# 1st argument is absolute path to hand coded guile source directory -# 2nd argument is absolute path to component C++ shared library build directory -# 3nd argument is absolute path to component SWIG build directory - -add_local_paths \ - @srcdir@ \ - @abs_builddir@ \ - @abs_builddir@ - -@GUILE@ -e main -c '(use-modules (gnuradio test-suite guile-test))' -t @srcdir@ diff --git a/gr-fcd/.gitignore b/gr-fcd/.gitignore deleted file mode 100644 index 862bbab8b..000000000 --- a/gr-fcd/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -Makefile -Makefile.in -aclocal.m4 -autom4te.cache/ -config.h.in -configure -depcomp -install-sh -ltmain.sh -missing -py-compile -config.h -config.log -config.status -libtool -setup_guile_test_env -stamp-h1 -gnuradio-fcd.pc -config.h.in~ - diff --git a/gr-fcd/CMakeLists.txt b/gr-fcd/CMakeLists.txt index e454c01fa..1185b3a32 100644 --- a/gr-fcd/CMakeLists.txt +++ b/gr-fcd/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, @@ -44,13 +44,15 @@ else() ENABLE_GR_CORE ENABLE_GR_AUDIO ) -endif() +endif() GR_SET_GLOBAL(GR_FCD_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/lib ${CMAKE_CURRENT_SOURCE_DIR}/include/fcd ) +SET(GR_PKG_FCD_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/fcd) + ######################################################################## # Begin conditional configuration ######################################################################## @@ -83,6 +85,13 @@ CPACK_COMPONENT("fcd_python" DEPENDS "core_python;fcd_runtime" ) +CPACK_COMPONENT("fcd_examples" + GROUP "FCD" + DISPLAY_NAME "Examples" + DESCRIPTION "Example programs" + DEPENDS "fcd_runtime" +) + CPACK_COMPONENT("fcd_swig" GROUP "FCD" DISPLAY_NAME "SWIG" @@ -99,8 +108,9 @@ if(ENABLE_PYTHON) add_subdirectory(swig) add_subdirectory(python) add_subdirectory(grc) + add_subdirectory(examples/grc) endif(ENABLE_PYTHON) -add_subdirectory(examples) +add_subdirectory(examples/c++) add_subdirectory(doc) ######################################################################## diff --git a/gr-fcd/Makefile.am b/gr-fcd/Makefile.am deleted file mode 100644 index 85d5f9a9b..000000000 --- a/gr-fcd/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright 2012 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. -# - -ACLOCAL_AMFLAGS = -I config - -include $(top_srcdir)/Makefile.common - -EXTRA_DIST = \ - AUTHORS - -SUBDIRS = lib include swig python grc examples doc - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = gnuradio-fcd.pc diff --git a/gr-fcd/doc/.gitignore b/gr-fcd/doc/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-fcd/doc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-fcd/doc/CMakeLists.txt b/gr-fcd/doc/CMakeLists.txt index d080b384e..6a4b7962d 100644 --- a/gr-fcd/doc/CMakeLists.txt +++ b/gr-fcd/doc/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-fcd/doc/README.fcd b/gr-fcd/doc/README.fcd index 6fff012b8..83b4da1ce 100644 --- a/gr-fcd/doc/README.fcd +++ b/gr-fcd/doc/README.fcd @@ -8,6 +8,6 @@ imported as: See the Doxygen documentation for details about the blocks available in this package. A quick listing of the details can be found in Python -after importing by using: +after importing by using: help(fcd) diff --git a/gr-fcd/doc/fcd.dox b/gr-fcd/doc/fcd.dox index a4420f6b3..6e07c585b 100644 --- a/gr-fcd/doc/fcd.dox +++ b/gr-fcd/doc/fcd.dox @@ -14,7 +14,7 @@ imported as: See the Doxygen documentation for details about the blocks available in this package. A quick listing of the details can be found in Python -after importing by using: +after importing by using: \code help(fcd) diff --git a/gr-fcd/examples/.gitignore b/gr-fcd/examples/.gitignore deleted file mode 100644 index 52ffc3037..000000000 --- a/gr-fcd/examples/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/Makefile -/Makefile.in -/.deps/* -/.libs/* -/fcd_nfm_rx -/fcd_nfm_rx.o diff --git a/gr-fcd/examples/Makefile.am b/gr-fcd/examples/Makefile.am deleted file mode 100644 index a57d7a808..000000000 --- a/gr-fcd/examples/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright 2011,2012 Free Software Foundation, Inc. -# -# 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 - -AM_CPPFLAGS = \ - -I$(top_srcdir)/gr-fcd/include/fcd \ - -I$(top_srcdir)/gr-audio/include \ - $(STD_DEFINES_AND_INCLUDES) \ - $(WITH_INCLUDES) - -GR_FCD_LA=$(top_builddir)/gr-fcd/lib/libgnuradio-fcd.la -GNURADIO_AUDIO_LA=$(top_builddir)/gr-audio/lib/libgnuradio-audio.la - -ourdatadir = $(exampledir)/fcd - -ourdata_PROGRAMS = \ - fcd_nfm_rx - -fcd_nfm_rx_SOURCES = \ - fcd_nfm_rx.cc - -fcd_nfm_rx_LDADD = \ - $(GR_FCD_LA) \ - $(GNURADIO_CORE_LA) \ - $(GNURADIO_AUDIO_LA) \ - $(BOOST_PROGRAM_OPTIONS_LIB) - -dist_ourdata_SCRIPTS = \ - fcd_fft_wx.grc \ - fcd_apt_rx.grc \ - fcd_nfm_rx.grc - diff --git a/gr-fcd/examples/CMakeLists.txt b/gr-fcd/examples/c++/CMakeLists.txt index 477a6311b..05574f4a8 100644 --- a/gr-fcd/examples/CMakeLists.txt +++ b/gr-fcd/examples/c++/CMakeLists.txt @@ -26,16 +26,6 @@ target_link_libraries(fcd_nfm_rx gnuradio-fcd) INSTALL(TARGETS fcd_nfm_rx - DESTINATION ${GR_PKG_DATA_DIR}/examples/fcd + DESTINATION ${GR_PKG_FCD_EXAMPLES_DIR} COMPONENT "fcd_examples" ) - -if(ENABLE_PYTHON) - INSTALL(FILES - fcd_apt_rx.grc - fcd_fft_wx.grc - fcd_nfm_rx.grc - DESTINATION ${GR_PKG_DATA_DIR}/examples/fcd - COMPONENT "fcd_examples" - ) -endif() diff --git a/gr-fcd/examples/fcd_nfm_rx.cc b/gr-fcd/examples/c++/fcd_nfm_rx.cc index 97ef7cf19..0ebc5d288 100644 --- a/gr-fcd/examples/fcd_nfm_rx.cc +++ b/gr-fcd/examples/c++/fcd_nfm_rx.cc @@ -1,16 +1,16 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * 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, @@ -19,10 +19,10 @@ /* * Simple GNU Radio C++ example for using the Funcube Dongle. - * + * * Construct a simple narrow band FM receiver using the gr-fcd * block as source. - * + * * This example uses "hw:1" as FCD source device and the default * audio device for output. * @@ -83,7 +83,7 @@ int main(int argc, char **argv) fcd_source_c_sptr fcd = fcd_make_source_c(device); fcd->set_freq_khz(freq); fcd->set_lna_gain(gain); - + // Low pass filter std::vector<float> taps = gr_firdes::low_pass(1.0, 96000, 5000.0, 1000.0); gr_fir_filter_ccf_sptr filter = gr_make_fir_filter_ccf (2, taps); diff --git a/gr-fcd/doc/Makefile.am b/gr-fcd/examples/grc/CMakeLists.txt index f3cf30ac3..e33fdf182 100644 --- a/gr-fcd/doc/Makefile.am +++ b/gr-fcd/examples/grc/CMakeLists.txt @@ -1,29 +1,26 @@ -# # Copyright 2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = - -dist_gr_doc_DATA = \ - README.fcd -EXTRA_DIST = fcd.dox
\ No newline at end of file +INSTALL(FILES + fcd_apt_rx.grc + fcd_fft_wx.grc + fcd_nfm_rx.grc + DESTINATION ${GR_PKG_FCD_EXAMPLES_DIR} + COMPONENT "fcd_examples" +)
\ No newline at end of file diff --git a/gr-fcd/examples/fcd_apt_rx.grc b/gr-fcd/examples/grc/fcd_apt_rx.grc index c4d3e64d1..c4d3e64d1 100644 --- a/gr-fcd/examples/fcd_apt_rx.grc +++ b/gr-fcd/examples/grc/fcd_apt_rx.grc diff --git a/gr-fcd/examples/fcd_fft_wx.grc b/gr-fcd/examples/grc/fcd_fft_wx.grc index c045bbfa2..c045bbfa2 100644 --- a/gr-fcd/examples/fcd_fft_wx.grc +++ b/gr-fcd/examples/grc/fcd_fft_wx.grc diff --git a/gr-fcd/examples/fcd_nfm_rx.grc b/gr-fcd/examples/grc/fcd_nfm_rx.grc index 9dac3fcb8..9dac3fcb8 100644 --- a/gr-fcd/examples/fcd_nfm_rx.grc +++ b/gr-fcd/examples/grc/fcd_nfm_rx.grc diff --git a/gr-fcd/grc/.gitignore b/gr-fcd/grc/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-fcd/grc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-fcd/grc/CMakeLists.txt b/gr-fcd/grc/CMakeLists.txt index 16af2cdba..d1eb00e32 100644 --- a/gr-fcd/grc/CMakeLists.txt +++ b/gr-fcd/grc/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-fcd/include/fcd/fcd_source_c.h b/gr-fcd/include/fcd/fcd_source_c.h index 988925c2e..19c589023 100644 --- a/gr-fcd/include/fcd/fcd_source_c.h +++ b/gr-fcd/include/fcd/fcd_source_c.h @@ -1,17 +1,17 @@ /* -*- c++ -*- */ /* * Copyright 2011-2012 Free Software Foundation, Inc. - * + * * 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, @@ -38,11 +38,11 @@ typedef boost::shared_ptr<fcd_source_c> fcd_source_c_sptr; FCD_API fcd_source_c_sptr fcd_make_source_c(const std::string device_name = ""); /*! \brief Funcube Dongle source block. - * + * * This class provides a Funcube Dongle soure block by wrapping the * USB audio interface and the USB HID control interface of the Funcube * Dongle into one convenient source block. - * + * * The Funcube Dongle needs to have firmware 18f or later for the control * interface to work properly. As of early 2011, FCDs still come with firmware * 18b. You can use qthid 2.2 (not 3) to upgrade the firmware: http://qthid.sf.net @@ -52,42 +52,42 @@ class FCD_API fcd_source_c : virtual public gr_hier_block2 public: /*! \brief Set frequency with Hz resolution. * \param freq The frequency in Hz - * + * * Set the frequency of the Funcube Dongle with 1 Hz resolution applying * the frequency correction set by set_freq_corr(). - * + * * \see set_freq_khz() */ virtual void set_freq(int freq) = 0; /*! \brief Set frequency with Hz resolution. * \param freq The frequency in Hz - * + * * This is a convenience function that uses float parameter in order to allow * using engineering notation in GRC. - * + * * \see set_freq_khz() */ virtual void set_freq(float freq) = 0; - + /*! \brief Set frequency with kHz resolution. * \param freq The frequency in kHz - * + * * Sets the frequency of the Funcube Dongle with 1 kHz resolution * applying the frequency correction set by set_freq_corr(). - * + * * \see set_freq() */ virtual void set_freq_khz(int freq) = 0; - + /*! \brief Set LNA gain. * \param gain The new gain in dB. - * + * * Set the LNA gain in the FCD. Valid range is -5 to 30. Although * the LNA gain in the FCD takes enumerated values corresponding to * 2.5 dB steps, you can can call this method with any float value * and it will be rounded to the nearest valid value. - * + * * By default the LNA gain is set to 20 dB and this is a good value for * most cases. In noisy areas you may try to reduce the gain. */ @@ -105,26 +105,26 @@ public: /*! \brief Set new frequency correction. * \param ppm The new frequency correction in parts per million - * + * * Version 1.1 FCDs (S/N 810 or later) need a correction of -12 ppm. * Earlier FCDs need roughly -120 ppm (default for gr-fcd). - * + * * Ref: http://www.funcubedongle.com/?p=617 */ virtual void set_freq_corr(int ppm) = 0; - + /*! \brief Set DC offset correction. * \param _dci DC correction for I component (-1.0 to 1.0) * \param _dcq DC correction for Q component (-1.0 to 1.0) - * + * * Set DC offset correction in the device. Default is 0.0. */ virtual void set_dc_corr(double _dci, double _dcq) = 0; - + /*! \brief Set IQ phase and gain balance. * \param _gain The gain correction (-1.0 to 1.0) * \param _phase The phase correction (-1.0 to 1.0) - * + * * Set IQ phase and gain balance in the device. The default values * are 0.0 for phase and 1.0 for gain. */ diff --git a/gr-fcd/lib/.gitignore b/gr-fcd/lib/.gitignore deleted file mode 100644 index cfb223502..000000000 --- a/gr-fcd/lib/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo -/*.pyc -*.o diff --git a/gr-fcd/lib/Makefile.am b/gr-fcd/lib/Makefile.am deleted file mode 100644 index a288740b4..000000000 --- a/gr-fcd/lib/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright 2012 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = hid fcd - -AM_CPPFLAGS = \ - $(STD_DEFINES_AND_INCLUDES) \ - $(WITH_INCLUDES) \ - -I$(top_srcdir)/gr-audio/include \ - -I$(top_srcdir)/gr-fcd/include/fcd \ - -I$(top_srcdir)/gr-fcd/lib/fcd - -lib_LTLIBRARIES = libgnuradio-fcd.la - -libgnuradio_fcd_la_SOURCES = fcd_source_c_impl.cc - -noinst_HEADERS = fcd_source_c_impl.h - -libgnuradio_fcd_la_LIBADD = \ - $(GNURADIO_CORE_LA) \ - $(top_builddir)/gr-fcd/lib/fcd/libfcd.la \ - $(top_builddir)/gr-audio/lib/libgnuradio-audio.la - - -libgnuradio_fcd_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) - diff --git a/gr-fcd/lib/fcd/Makefile.am b/gr-fcd/lib/fcd/Makefile.am deleted file mode 100644 index f328a7cac..000000000 --- a/gr-fcd/lib/fcd/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -# -# Copyright 2012 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -AM_CPPFLAGS = \ - $(STD_DEFINES_AND_INCLUDES) \ - $(WITH_INCLUDES) \ - $(USB_CPPFLAGS) \ - -I$(top_srcdir)/gr-fcd/include/fcd \ - -I$(top_srcdir)/gr-fcd/lib/hid - -noinst_LTLIBRARIES = libfcd.la - -libfcd_la_SOURCES = fcd.c - -noinst_HEADERS = \ - fcd.h \ - fcdhidcmd.h - -libfcd_la_LIBADD = \ - $(top_builddir)/gr-fcd/lib/hid/libhid.la - diff --git a/gr-fcd/lib/fcd/fcd.c b/gr-fcd/lib/fcd/fcd.c index ca9050231..011d77be9 100644 --- a/gr-fcd/lib/fcd/fcd.c +++ b/gr-fcd/lib/fcd/fcd.c @@ -1,10 +1,10 @@ /*************************************************************************** * This file is part of Qthid. - * + * * Copyright (C) 2010 Howard Long, G6LVB * CopyRight (C) 2011 Alexandru Csete, OZ9AEC * Mario Lorenz, DL5MLO - * + * * Qthid 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 diff --git a/gr-fcd/lib/fcd/fcdhidcmd.h b/gr-fcd/lib/fcd/fcdhidcmd.h index fad55f15f..1741ede30 100644 --- a/gr-fcd/lib/fcd/fcdhidcmd.h +++ b/gr-fcd/lib/fcd/fcdhidcmd.h @@ -87,7 +87,7 @@ #define FCD_CMD_APP_RESET 255 // Reset to bootloader -typedef enum +typedef enum { TLGE_N5_0DB=0, TLGE_N2_5DB=1, diff --git a/gr-fcd/lib/fcd_source_c_impl.cc b/gr-fcd/lib/fcd_source_c_impl.cc index ca370d9f3..34a221827 100644 --- a/gr-fcd/lib/fcd_source_c_impl.cc +++ b/gr-fcd/lib/fcd_source_c_impl.cc @@ -1,17 +1,17 @@ /* -*- c++ -*- */ /* * Copyright 2011-2012 Free Software Foundation, Inc. - * + * * 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, @@ -46,7 +46,7 @@ static const int MAX_IN = 0; /*!< Maximum number of input streams. */ static const int MIN_OUT = 1; /*!< Minimum number of output streams. */ static const int MAX_OUT = 1; /*!< Maximum number of output streams. */ -fcd_source_c_impl::fcd_source_c_impl(const std::string device_name) +fcd_source_c_impl::fcd_source_c_impl(const std::string device_name) : gr_hier_block2 ("fcd_source_c", gr_make_io_signature (MIN_IN, MAX_IN, sizeof (gr_complex)), gr_make_io_signature (MIN_OUT, MAX_OUT, sizeof (gr_complex))), @@ -54,13 +54,13 @@ fcd_source_c_impl::fcd_source_c_impl(const std::string device_name) d_freq_req(0) { gr_float_to_complex_sptr f2c; - + /* Audio source; sample rate fixed at 96kHz */ fcd = audio_make_source(96000, device_name, true); - + /* block to convert stereo audio to a complex stream */ f2c = gr_make_float_to_complex(1); - + connect(fcd, 0, f2c, 0); connect(fcd, 1, f2c, 1); connect(f2c, 0, self(), 0); @@ -71,15 +71,15 @@ void fcd_source_c_impl::set_freq(int freq) { FCD_MODE_ENUM __GR_ATTR_UNUSED fme; double f = (double)freq; - + /* valid range 50 MHz - 2.0 GHz */ if ((freq < 50000000) || (freq > 2000000000)) { return; } - + d_freq_req = freq; f *= 1.0 + d_freq_corr/1000000.0; - + fme = fcdAppSetFreq((int)f); /* TODO: check fme */ } @@ -89,34 +89,34 @@ void fcd_source_c_impl::set_freq(float freq) { FCD_MODE_ENUM __GR_ATTR_UNUSED fme; double f = (double)freq; - + /* valid range 50 MHz - 2.0 GHz */ if ((freq < 50.0e6) || (freq > 2.0e9)) { return; } - + d_freq_req = (int)freq; f *= 1.0 + d_freq_corr/1000000.0; - + fme = fcdAppSetFreq((int)f); /* TODO: check fme */ } - + // Set frequency with kHz resolution. void fcd_source_c_impl::set_freq_khz(int freq) { FCD_MODE_ENUM __GR_ATTR_UNUSED fme; double f = freq*1000.0; - + /* valid range 50 MHz - 2.0 GHz */ if ((freq < 50000) || (freq > 2000000)) { return; } - + d_freq_req = freq*1000; f *= 1.0 + d_freq_corr/1000000.0; - + fme = fcdAppSetFreqkHz((int)(f/1000.0)); /* TODO: check fme */ } @@ -127,7 +127,7 @@ void fcd_source_c_impl::set_lna_gain(float gain) { FCD_MODE_ENUM __GR_ATTR_UNUSED fme; unsigned char g; - + /* convert to nearest discrete value */ if (gain > 27.5) { g = 14; // 30.0 dB @@ -168,7 +168,7 @@ void fcd_source_c_impl::set_lna_gain(float gain) else { g = 0; // -5.0 dB } - + fme = fcdAppSetParam(FCD_CMD_APP_SET_LNA_GAIN, &g, 1); /* TODO: check fme */ } @@ -207,13 +207,13 @@ void fcd_source_c_impl::set_dc_corr(double _dci, double _dcq) signed short dcq; }; } dcinfo; - + if ((_dci < -1.0) || (_dci > 1.0) || (_dcq < -1.0) || (_dcq > 1.0)) return; - + dcinfo.dci = static_cast<signed short>(_dci*32768.0); dcinfo.dcq = static_cast<signed short>(_dcq*32768.0); - + fcdAppSetParam(FCD_CMD_APP_SET_DC_CORR, dcinfo.auc, 4); } @@ -227,12 +227,12 @@ void fcd_source_c_impl::set_iq_corr(double _gain, double _phase) signed short gain; }; } iqinfo; - + if ((_gain < -1.0) || (_gain > 1.0) || (_phase < -1.0) || (_phase > 1.0)) return; - + iqinfo.phase = static_cast<signed short>(_phase*32768.0); iqinfo.gain = static_cast<signed short>(_gain*32768.0); - + fcdAppSetParam(FCD_CMD_APP_SET_IQ_CORR, iqinfo.auc, 4); } diff --git a/gr-fcd/lib/fcd_source_c_impl.h b/gr-fcd/lib/fcd_source_c_impl.h index d082ecc1e..d4ac40417 100644 --- a/gr-fcd/lib/fcd_source_c_impl.h +++ b/gr-fcd/lib/fcd_source_c_impl.h @@ -1,17 +1,17 @@ /* -*- c++ -*- */ /* * Copyright 2011-2012 Free Software Foundation, Inc. - * + * * 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, @@ -36,12 +36,12 @@ public: void set_freq_corr(int ppm); void set_dc_corr(double _dci, double _dcq); void set_iq_corr(double _gain, double _phase); - + private: fcd_source_c_impl(const std::string device_name = ""); friend FCD_API fcd_source_c_sptr fcd_make_source_c(const std::string device_name); - + audio_source::sptr fcd; /*!< The audio input source */ int d_freq_corr; /*!< The frequency correction in ppm */ int d_freq_req; /*!< The latest requested frequency in Hz */ diff --git a/gr-fcd/lib/hid/Makefile.am b/gr-fcd/lib/hid/Makefile.am deleted file mode 100644 index 2ad4796fe..000000000 --- a/gr-fcd/lib/hid/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -# -# Copyright 2012 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -AM_CPPFLAGS = \ - $(STD_DEFINES_AND_INCLUDES) \ - $(WITH_INCLUDES) \ - $(USB_CPPFLAGS) - -noinst_LTLIBRARIES = libhid.la - -libhid_la_SOURCES = - -if FCD_MACOSX - libhid_la_SOURCES += hidmac.c -else if FCD_WINDOWS - libhid_la_SOURCES += hidwin.c -else - libhid_la_SOURCES += hid-libusb.c -endif - -noinst_HEADERS = hidapi.h - -libhid_la_LIBADD = $(USB_LIBS) - diff --git a/gr-fcd/lib/hid/hid-libusb.c b/gr-fcd/lib/hid/hid-libusb.c index 7069f50d0..82cbc9151 100644 --- a/gr-fcd/lib/hid/hid-libusb.c +++ b/gr-fcd/lib/hid/hid-libusb.c @@ -10,7 +10,7 @@ Libusb Version - 8/13/2010 Copyright 2009, All Rights Reserved. - + At the discretion of the user of this library, this software may be licensed under the terms of the GNU Public License v3, a BSD-Style license, or the @@ -77,23 +77,23 @@ struct input_report { struct hid_device_ { /* Handle to the actual device. */ libusb_device_handle *device_handle; - + /* Endpoint information */ int input_endpoint; int output_endpoint; int input_ep_max_packet_size; - /* The interface number of the HID */ + /* The interface number of the HID */ int interface; - + /* Indexes of Strings */ int manufacturer_index; int product_index; int serial_index; - + /* Whether blocking reads are used */ int blocking; /* boolean */ - + /* Read thread objects */ pthread_t thread; pthread_mutex_t mutex; /* Protects input_reports */ @@ -126,11 +126,11 @@ static hid_device *new_hid_device(void) dev->shutdown_thread = 0; dev->transfer = NULL; dev->input_reports = NULL; - + pthread_mutex_init(&dev->mutex, NULL); pthread_cond_init(&dev->condition, NULL); pthread_barrier_init(&dev->barrier, NULL, 2); - + return dev; } @@ -191,13 +191,13 @@ static int get_usage(uint8_t *report_descriptor, size_t size, int size_code; int data_len, key_size; int usage_found = 0, usage_page_found = 0; - + while (i < size) { int key = report_descriptor[i]; int key_cmd = key & 0xfc; //printf("key: %02hhx\n", key); - + if ((key & 0xf0) == 0xf0) { /* This is a Long Item. The next byte contains the length of the data section (value) for this key. @@ -232,7 +232,7 @@ static int get_usage(uint8_t *report_descriptor, size_t size, }; key_size = 1; } - + if (key_cmd == 0x4) { *usage_page = get_bytes(report_descriptor, size, data_len, i); usage_page_found = 1; @@ -246,11 +246,11 @@ static int get_usage(uint8_t *report_descriptor, size_t size, if (usage_page_found && usage_found) return 0; /* success */ - + /* Skip over this key and it's associated data */ i += data_len + key_size; } - + return -1; /* failure */ } #endif // INVASIVE_GET_USAGE @@ -262,7 +262,7 @@ static uint16_t get_first_language(libusb_device_handle *dev) { uint16_t buf[32]; int len; - + /* Get the string from libusb. */ len = libusb_get_string_descriptor(dev, 0x0, /* String ID */ @@ -271,7 +271,7 @@ static uint16_t get_first_language(libusb_device_handle *dev) sizeof(buf)); if (len < 4) return 0x0; - + return buf[1]; // First two bytes are len and descriptor type. } @@ -280,7 +280,7 @@ static int is_language_supported(libusb_device_handle *dev, uint16_t lang) uint16_t buf[32]; int len; int i; - + /* Get the string from libusb. */ len = libusb_get_string_descriptor(dev, 0x0, /* String ID */ @@ -289,8 +289,8 @@ static int is_language_supported(libusb_device_handle *dev, uint16_t lang) sizeof(buf)); if (len < 4) return 0x0; - - + + len /= 2; /* language IDs are two-bytes each. */ /* Start at index 1 because there are two bytes of protocol data. */ for (i = 1; i < len; i++) { @@ -325,7 +325,7 @@ static wchar_t *get_usb_string(libusb_device_handle *dev, uint8_t idx) lang = get_usb_code_for_current_locale(); if (!is_language_supported(dev, lang)) lang = get_first_language(dev); - + /* Get the string from libusb. */ len = libusb_get_string_descriptor(dev, idx, @@ -334,17 +334,17 @@ static wchar_t *get_usb_string(libusb_device_handle *dev, uint8_t idx) sizeof(buf)); if (len < 0) return NULL; - + buf[sizeof(buf)-1] = '\0'; - + if (len+1 < sizeof(buf)) buf[len+1] = '\0'; - + /* Initialize iconv. */ ic = iconv_open("UTF-32", "UTF-16"); if (ic == (iconv_t)-1) return NULL; - + /* Convert to UTF-32 (wchar_t on glibc systems). Skip the first character (2-bytes). */ inptr = buf+2; @@ -359,13 +359,13 @@ static wchar_t *get_usb_string(libusb_device_handle *dev, uint8_t idx) wbuf[sizeof(wbuf)/sizeof(wbuf[0])-1] = 0x00000000; if (outbytes >= sizeof(wbuf[0])) *((wchar_t*)outptr) = 0x00000000; - + /* Allocate and copy the string. */ str = wcsdup(wbuf+1); err: iconv_close(ic); - + return str; } @@ -377,7 +377,7 @@ static char *make_path(libusb_device *dev, int interface_number) libusb_get_device_address(dev), interface_number); str[sizeof(str)-1] = '\0'; - + return strdup(str); } @@ -410,12 +410,12 @@ struct hid_device_info HID_API_EXPORT *hid_enumerate(unsigned short vendor_id, libusb_device_handle *handle; ssize_t num_devs; int i = 0; - + struct hid_device_info *root = NULL; // return object struct hid_device_info *cur_dev = NULL; - + setlocale(LC_ALL,""); - + if (!initialized) hid_init(); @@ -431,7 +431,7 @@ struct hid_device_info HID_API_EXPORT *hid_enumerate(unsigned short vendor_id, int res = libusb_get_device_descriptor(dev, &desc); unsigned short dev_vid = desc.idVendor; unsigned short dev_pid = desc.idProduct; - + /* HID's are defined at the interface level. */ if (desc.bDeviceClass != LIBUSB_CLASS_PER_INTERFACE) continue; @@ -462,11 +462,11 @@ struct hid_device_info HID_API_EXPORT *hid_enumerate(unsigned short vendor_id, root = tmp; } cur_dev = tmp; - + /* Fill out the record */ cur_dev->next = NULL; cur_dev->path = make_path(dev, interface_num); - + res = libusb_open(dev, &handle); if (res >= 0) { @@ -501,7 +501,7 @@ struct hid_device_info HID_API_EXPORT *hid_enumerate(unsigned short vendor_id, between interfaces. */ int detached = 0; unsigned char data[256]; - + /* Usage Page and Usage */ res = libusb_kernel_driver_active(handle, interface_num); if (res == 1) { @@ -550,7 +550,7 @@ struct hid_device_info HID_API_EXPORT *hid_enumerate(unsigned short vendor_id, /* Release Number */ cur_dev->release_number = desc.bcdDevice; - + /* Interface Number */ cur_dev->interface_number = interface_num; } @@ -585,7 +585,7 @@ hid_device * hid_open(unsigned short vendor_id, unsigned short product_id, wchar struct hid_device_info *devs, *cur_dev; const char *path_to_open = NULL; hid_device *handle = NULL; - + devs = hid_enumerate(vendor_id, product_id); cur_dev = devs; while (cur_dev) { @@ -611,14 +611,14 @@ hid_device * hid_open(unsigned short vendor_id, unsigned short product_id, wchar } hid_free_enumeration(devs); - + return handle; } static void read_callback(struct libusb_transfer *transfer) { hid_device *dev = transfer->user_data; - + if (transfer->status == LIBUSB_TRANSFER_COMPLETED) { struct input_report *rpt = malloc(sizeof(*rpt)); @@ -644,13 +644,13 @@ static void read_callback(struct libusb_transfer *transfer) num_queued++; } cur->next = rpt; - + /* Pop one off if we've reached 30 in the queue. This way we don't grow forever if the user never reads anything from the device. */ if (num_queued > 30) { return_data(dev, NULL, 0); - } + } } pthread_mutex_unlock(&dev->mutex); } @@ -668,7 +668,7 @@ static void read_callback(struct libusb_transfer *transfer) else { LOG("Unknown transfer code: %d\n", transfer->status); } - + /* Re-submit the transfer object. */ libusb_submit_transfer(transfer); } @@ -691,14 +691,14 @@ static void *read_thread(void *param) read_callback, dev, 5000/*timeout*/); - + /* Make the first submission. Further submissions are made from inside read_callback() */ libusb_submit_transfer(dev->transfer); // Notify the main thread that the read thread is up and running. pthread_barrier_wait(&dev->barrier); - + /* Handle all the events. */ while (!dev->shutdown_thread) { int res; @@ -708,14 +708,14 @@ static void *read_thread(void *param) break; } } - + /* Cancel any transfer that may be pending. This call will fail if no transfers are pending, but that's OK. */ if (libusb_cancel_transfer(dev->transfer) == 0) { /* The transfer was cancelled, so wait for its completion. */ libusb_handle_events(NULL); } - + /* Now that the read thread is stopping, Wake any threads which are waiting on data (in hid_read_timeout()). Do this under a mutex to make sure that a thread which is about to go to sleep waiting on @@ -732,7 +732,7 @@ static void *read_thread(void *param) cleaned up after the call to pthread_join() (in hid_close()), but since hid_close() calls libusb_cancel_transfer(), on these objects, they can not be cleaned up here. */ - + return NULL; } @@ -749,9 +749,9 @@ hid_device * HID_API_EXPORT hid_open_path(const char *path) int res; int d = 0; int good_open = 0; - + setlocale(LC_ALL,""); - + if (!initialized) hid_init(); @@ -782,7 +782,7 @@ hid_device * HID_API_EXPORT hid_open_path(const char *path) break; } good_open = 1; - + /* Detach the kernel driver, but only if the device is managed by the kernel */ if (libusb_kernel_driver_active(dev->device_handle, intf_desc->bInterfaceNumber) == 1) { @@ -795,7 +795,7 @@ hid_device * HID_API_EXPORT hid_open_path(const char *path) break; } } - + res = libusb_claim_interface(dev->device_handle, intf_desc->bInterfaceNumber); if (res < 0) { LOG("can't claim interface %d: %d\n", intf_desc->bInterfaceNumber, res); @@ -812,7 +812,7 @@ hid_device * HID_API_EXPORT hid_open_path(const char *path) /* Store off the interface number */ dev->interface = intf_desc->bInterfaceNumber; - + /* Find the INPUT and OUTPUT endpoints. An OUTPUT endpoint is not required. */ for (i = 0; i < intf_desc->bNumEndpoints; i++) { @@ -824,10 +824,10 @@ hid_device * HID_API_EXPORT hid_open_path(const char *path) int is_interrupt = (ep->bmAttributes & LIBUSB_TRANSFER_TYPE_MASK) == LIBUSB_TRANSFER_TYPE_INTERRUPT; - int is_output = + int is_output = (ep->bEndpointAddress & LIBUSB_ENDPOINT_DIR_MASK) == LIBUSB_ENDPOINT_OUT; - int is_input = + int is_input = (ep->bEndpointAddress & LIBUSB_ENDPOINT_DIR_MASK) == LIBUSB_ENDPOINT_IN; @@ -844,12 +844,12 @@ hid_device * HID_API_EXPORT hid_open_path(const char *path) dev->output_endpoint = ep->bEndpointAddress; } } - + pthread_create(&dev->thread, NULL, read_thread, dev); - + // Wait here for the read thread to be initialized. pthread_barrier_wait(&dev->barrier); - + } free(dev_path); } @@ -860,7 +860,7 @@ hid_device * HID_API_EXPORT hid_open_path(const char *path) } libusb_free_device_list(devs, 1); - + // If we have a good handle, return it. if (good_open) { return dev; @@ -895,13 +895,13 @@ int HID_API_EXPORT hid_write(hid_device *dev, const unsigned char *data, size_t dev->interface, (unsigned char *)data, length, 1000/*timeout millis*/); - + if (res < 0) return -1; - + if (skipped_report_id) length++; - + return length; } else { @@ -912,13 +912,13 @@ int HID_API_EXPORT hid_write(hid_device *dev, const unsigned char *data, size_t (unsigned char*)data, length, &actual_length, 1000); - + if (res < 0) return -1; - + if (skipped_report_id) actual_length++; - + return actual_length; } } @@ -966,14 +966,14 @@ int HID_API_EXPORT hid_read_timeout(hid_device *dev, unsigned char *data, size_t bytes_read = return_data(dev, data, length); goto ret; } - + if (dev->shutdown_thread) { /* This means the device has been disconnected. An error code of -1 should be returned. */ bytes_read = -1; goto ret; } - + if (milliseconds == -1) { /* Blocking */ while (!dev->input_reports && !dev->shutdown_thread) { @@ -994,7 +994,7 @@ int HID_API_EXPORT hid_read_timeout(hid_device *dev, unsigned char *data, size_t ts.tv_sec++; ts.tv_nsec -= 1000000000L; } - + while (!dev->input_reports && !dev->shutdown_thread) { res = pthread_cond_timedwait(&dev->condition, &dev->mutex, &ts); if (res == 0) { @@ -1002,7 +1002,7 @@ int HID_API_EXPORT hid_read_timeout(hid_device *dev, unsigned char *data, size_t bytes_read = return_data(dev, data, length); break; } - + /* If we're here, there was a spurious wake up or the read thread was shutdown. Run the loop again (ie: don't break). */ @@ -1039,7 +1039,7 @@ int HID_API_EXPORT hid_read(hid_device *dev, unsigned char *data, size_t length) int HID_API_EXPORT hid_set_nonblocking(hid_device *dev, int nonblock) { dev->blocking = !nonblock; - + return 0; } @@ -1063,14 +1063,14 @@ int HID_API_EXPORT hid_send_feature_report(hid_device *dev, const unsigned char dev->interface, (unsigned char *)data, length, 1000/*timeout millis*/); - + if (res < 0) return -1; - + /* Account for the report ID */ if (skipped_report_id) length++; - + return length; } @@ -1094,13 +1094,13 @@ int HID_API_EXPORT hid_get_feature_report(hid_device *dev, unsigned char *data, dev->interface, (unsigned char *)data, length, 1000/*timeout millis*/); - + if (res < 0) return -1; if (skipped_report_id) res++; - + return res; } @@ -1109,31 +1109,31 @@ void HID_API_EXPORT hid_close(hid_device *dev) { if (!dev) return; - + /* Cause read_thread() to stop. */ dev->shutdown_thread = 1; libusb_cancel_transfer(dev->transfer); /* Wait for read_thread() to end. */ pthread_join(dev->thread, NULL); - + /* Clean up the Transfer objects allocated in read_thread(). */ free(dev->transfer->buffer); libusb_free_transfer(dev->transfer); - + /* release the interface */ libusb_release_interface(dev->device_handle, dev->interface); - + /* Close the handle */ libusb_close(dev->device_handle); - + /* Clear out the queue of received reports. */ pthread_mutex_lock(&dev->mutex); while (dev->input_reports) { return_data(dev, NULL, 0); } pthread_mutex_unlock(&dev->mutex); - + free_hid_device(dev); } @@ -1316,7 +1316,7 @@ static struct lang_map_entry lang_map[] = { LANG("Xhosa", "xh", 0x0434), LANG("Yiddish", "yi", 0x043D), LANG("Zulu", "zu", 0x0435), - LANG(NULL, NULL, 0x0), + LANG(NULL, NULL, 0x0), }; uint16_t get_usb_code_for_current_locale(void) @@ -1324,16 +1324,16 @@ uint16_t get_usb_code_for_current_locale(void) char *locale; char search_string[64]; char *ptr; - + /* Get the current locale. */ locale = setlocale(0, NULL); if (!locale) return 0x0; - + /* Make a copy of the current locale string. */ strncpy(search_string, locale, sizeof(search_string)); search_string[sizeof(search_string)-1] = '\0'; - + /* Chop off the encoding part, and make it lower case. */ ptr = search_string; while (*ptr) { @@ -1350,10 +1350,10 @@ uint16_t get_usb_code_for_current_locale(void) while (lang->string_code) { if (!strcmp(lang->string_code, search_string)) { return lang->usb_code; - } + } lang++; } - + /* There was no match. Find with just the language only. */ /* Chop off the variant. Chop it off at the '_'. */ ptr = search_string; @@ -1365,18 +1365,18 @@ uint16_t get_usb_code_for_current_locale(void) } ptr++; } - + #if 0 // TODO: Do we need this? /* Find the entry which matches the string code of our language. */ lang = lang_map; while (lang->string_code) { if (!strcmp(lang->string_code, search_string)) { return lang->usb_code; - } + } lang++; } #endif - + /* Found nothing. */ return 0x0; } diff --git a/gr-fcd/lib/hid/hidapi.h b/gr-fcd/lib/hid/hidapi.h index 31b1cf206..8e55c8474 100644 --- a/gr-fcd/lib/hid/hidapi.h +++ b/gr-fcd/lib/hid/hidapi.h @@ -87,7 +87,7 @@ extern "C" { needed. This function should be called at the beginning of execution however, if there is a chance of HIDAPI handles being opened by different threads simultaneously. - + @ingroup API @returns diff --git a/gr-fcd/lib/hid/hidmac.c b/gr-fcd/lib/hid/hidmac.c index 276541be1..d8c69a8e5 100644 --- a/gr-fcd/lib/hid/hidmac.c +++ b/gr-fcd/lib/hid/hidmac.c @@ -1,14 +1,14 @@ /******************************************************* HIDAPI - Multi-Platform library for communication with HID devices. - + Alan Ott Signal 11 Software 2010-07-03 Copyright 2010, All Rights Reserved. - + At the discretion of the user of this library, this software may be licensed under the terms of the GNU Public License v3, a BSD-Style license, or the @@ -51,7 +51,7 @@ static int pthread_barrier_init(pthread_barrier_t *barrier, const pthread_barrie errno = EINVAL; return -1; } - + if(pthread_mutex_init(&barrier->mutex, 0) < 0) { return -1; } @@ -118,7 +118,7 @@ struct hid_device_ { pthread_barrier_t barrier; /* Ensures correct startup sequence */ pthread_barrier_t shutdown_barrier; /* Ensures correct shutdown sequence */ int shutdown_thread; - + hid_device *next; }; @@ -148,7 +148,7 @@ static hid_device *new_hid_device(void) pthread_cond_init(&dev->condition, NULL); pthread_barrier_init(&dev->barrier, NULL, 2); pthread_barrier_init(&dev->shutdown_barrier, NULL, 2); - + /* Add the new record to the device_list. */ pthread_mutex_lock(&device_list_mutex); if (!device_list) @@ -164,7 +164,7 @@ static hid_device *new_hid_device(void) } } pthread_mutex_unlock(&device_list_mutex); - + return dev; } @@ -172,7 +172,7 @@ static void free_hid_device(hid_device *dev) { if (!dev) return; - + /* Delete any input reports still left over. */ struct input_report *rpt = dev->input_reports; while (rpt) { @@ -209,7 +209,7 @@ static void free_hid_device(hid_device *dev) d->next = d->next->next; break; } - + d = d->next; } } @@ -234,7 +234,7 @@ static int32_t get_int_property(IOHIDDeviceRef device, CFStringRef key) { CFTypeRef ref; int32_t value; - + ref = IOHIDDeviceGetProperty(device, key); if (ref) { if (CFGetTypeID(ref) == CFNumberGetTypeID()) { @@ -285,7 +285,7 @@ static int get_string_property(IOHIDDeviceRef device, CFStringRef prop, wchar_t } else return 0; - + } static int get_string_property_utf8(IOHIDDeviceRef device, CFStringRef prop, char *buf, size_t len) @@ -312,7 +312,7 @@ static int get_string_property_utf8(IOHIDDeviceRef device, CFStringRef prop, cha } else return 0; - + } @@ -354,7 +354,7 @@ static int make_path(IOHIDDeviceRef device, char *buf, size_t len) res = get_string_property_utf8( device, CFSTR(kIOHIDTransportKey), transport, sizeof(transport)); - + if (!res) return -1; @@ -363,8 +363,8 @@ static int make_path(IOHIDDeviceRef device, char *buf, size_t len) res = snprintf(buf, len, "%s_%04hx_%04hx_%p", transport, vid, pid, device); - - + + buf[len-1] = '\0'; return res+1; } @@ -372,7 +372,7 @@ static int make_path(IOHIDDeviceRef device, char *buf, size_t len) static int init_hid_manager(void) { IOReturn res; - + /* Initialize all the HID Manager Objects */ hid_mgr = IOHIDManagerCreate(kCFAllocatorDefault, kIOHIDOptionsTypeNone); IOHIDManagerSetDeviceMatching(hid_mgr, NULL); @@ -400,7 +400,7 @@ int HID_API_EXPORT hid_exit(void) CFRelease(hid_mgr); hid_mgr = NULL; } - + return 0; } @@ -410,21 +410,21 @@ struct hid_device_info HID_API_EXPORT *hid_enumerate(unsigned short vendor_id, struct hid_device_info *cur_dev = NULL; CFIndex num_devices; int i; - + setlocale(LC_ALL,""); /* Set up the HID Manager if it hasn't been done */ hid_init(); - + /* Get a list of the Devices */ CFSetRef device_set = IOHIDManagerCopyDevices(hid_mgr); - /* Convert the list into a C array so we can iterate easily. */ + /* Convert the list into a C array so we can iterate easily. */ num_devices = CFSetGetCount(device_set); IOHIDDeviceRef *device_array = calloc(num_devices, sizeof(IOHIDDeviceRef)); CFSetGetValues(device_set, (const void **) device_array); - /* Iterate over each device, making an entry for it. */ + /* Iterate over each device, making an entry for it. */ for (i = 0; i < num_devices; i++) { unsigned short dev_vid; unsigned short dev_pid; @@ -474,7 +474,7 @@ struct hid_device_info HID_API_EXPORT *hid_enumerate(unsigned short vendor_id, cur_dev->manufacturer_string = dup_wcs(buf); get_product_string(dev, buf, BUF_LEN); cur_dev->product_string = dup_wcs(buf); - + /* VID/PID */ cur_dev->vendor_id = dev_vid; cur_dev->product_id = dev_pid; @@ -486,10 +486,10 @@ struct hid_device_info HID_API_EXPORT *hid_enumerate(unsigned short vendor_id, cur_dev->interface_number = -1; } } - + free(device_array); CFRelease(device_set); - + return root; } @@ -514,7 +514,7 @@ hid_device * HID_API_EXPORT hid_open(unsigned short vendor_id, unsigned short pr struct hid_device_info *devs, *cur_dev; const char *path_to_open = NULL; hid_device * handle = NULL; - + devs = hid_enumerate(vendor_id, product_id); cur_dev = devs; while (cur_dev) { @@ -540,7 +540,7 @@ hid_device * HID_API_EXPORT hid_open(unsigned short vendor_id, unsigned short pr } hid_free_enumeration(devs); - + return handle; } @@ -555,7 +555,7 @@ static void hid_device_removal_callback(void *context, IOReturn result, d->disconnected = 1; CFRunLoopStop(d->run_loop); } - + d = d->next; } pthread_mutex_unlock(&device_list_mutex); @@ -580,7 +580,7 @@ static void hid_report_callback(void *context, IOReturn result, void *sender, /* Lock this section */ pthread_mutex_lock(&dev->mutex); - + /* Attach the new report object to the end of the list. */ if (dev->input_reports == NULL) { /* The list is empty. Put it at the root. */ @@ -623,7 +623,7 @@ static void perform_signal_callback(void *context) static void *read_thread(void *param) { hid_device *dev = param; - + /* Move the device's run loop to this thread. */ IOHIDDeviceScheduleWithRunLoop(dev->device_handle, CFRunLoopGetCurrent(), dev->run_loop_mode); @@ -636,7 +636,7 @@ static void *read_thread(void *param) ctx.perform = &perform_signal_callback; dev->source = CFRunLoopSourceCreate(kCFAllocatorDefault, 0/*order*/, &ctx); CFRunLoopAddSource(CFRunLoopGetCurrent(), dev->source, dev->run_loop_mode); - + /* Store off the Run Loop so it can be stopped from hid_close() and on device disconnection. */ dev->run_loop = CFRunLoopGetCurrent(); @@ -682,7 +682,7 @@ static void *read_thread(void *param) if (!dev->disconnected) { IOHIDDeviceClose(dev->device_handle, kIOHIDOptionsTypeNone); } - + /* Wait here until hid_close() is called and makes it past the call to CFRunLoopWakeUp(). This thread still needs to be valid when that function is called on the other thread. */ @@ -696,22 +696,22 @@ hid_device * HID_API_EXPORT hid_open_path(const char *path) int i; hid_device *dev = NULL; CFIndex num_devices; - + dev = new_hid_device(); /* Set up the HID Manager if it hasn't been done */ hid_init(); CFSetRef device_set = IOHIDManagerCopyDevices(hid_mgr); - + num_devices = CFSetGetCount(device_set); IOHIDDeviceRef *device_array = calloc(num_devices, sizeof(IOHIDDeviceRef)); - CFSetGetValues(device_set, (const void **) device_array); + CFSetGetValues(device_set, (const void **) device_array); for (i = 0; i < num_devices; i++) { char cbuf[BUF_LEN]; size_t len; IOHIDDeviceRef os_dev = device_array[i]; - + len = make_path(os_dev, cbuf, sizeof(cbuf)); if (!strcmp(cbuf, path)) { // Matched Paths. Open this Device. @@ -722,29 +722,29 @@ hid_device * HID_API_EXPORT hid_open_path(const char *path) free(device_array); CFRelease(device_set); dev->device_handle = os_dev; - + /* Create the buffers for receiving data */ dev->max_input_report_len = (CFIndex) get_max_report_length(os_dev); dev->input_report_buf = calloc(dev->max_input_report_len, sizeof(uint8_t)); - + /* Create the Run Loop Mode for this device. printing the reference seems to work. */ sprintf(str, "HIDAPI_%p", os_dev); - dev->run_loop_mode = + dev->run_loop_mode = CFStringCreateWithCString(NULL, str, kCFStringEncodingASCII); - + /* Attach the device to a Run Loop */ IOHIDDeviceRegisterInputReportCallback( os_dev, dev->input_report_buf, dev->max_input_report_len, &hid_report_callback, dev); IOHIDManagerRegisterDeviceRemovalCallback(hid_mgr, hid_device_removal_callback, NULL); - + /* Start the read thread */ pthread_create(&dev->thread, NULL, read_thread, dev); /* Wait here for the read thread to be initialized. */ pthread_barrier_wait(&dev->barrier); - + return dev; } else { @@ -782,20 +782,20 @@ static int set_report(hid_device *dev, IOHIDReportType type, const unsigned char data_to_send = data; length_to_send = length; } - + if (!dev->disconnected) { res = IOHIDDeviceSetReport(dev->device_handle, type, data[0], /* Report ID*/ data_to_send, length_to_send); - + if (res == kIOReturnSuccess) { return length; } else return -1; } - + return -1; } @@ -830,11 +830,11 @@ static int cond_wait(const hid_device *dev, pthread_cond_t *cond, pthread_mutex_ data in the queue before returning, and if not, go back to sleep. See the pthread_cond_timedwait() man page for details. */ - + if (dev->shutdown_thread || dev->disconnected) return -1; } - + return 0; } @@ -850,11 +850,11 @@ static int cond_timedwait(const hid_device *dev, pthread_cond_t *cond, pthread_m data in the queue before returning, and if not, go back to sleep. See the pthread_cond_timedwait() man page for details. */ - + if (dev->shutdown_thread || dev->disconnected) return -1; } - + return 0; } @@ -865,7 +865,7 @@ int HID_API_EXPORT hid_read_timeout(hid_device *dev, unsigned char *data, size_t /* Lock the access to the report list. */ pthread_mutex_lock(&dev->mutex); - + /* There's an input report queued up. Return it. */ if (dev->input_reports) { /* Return the first one */ @@ -878,7 +878,7 @@ int HID_API_EXPORT hid_read_timeout(hid_device *dev, unsigned char *data, size_t bytes_read = -1; goto ret; } - + if (dev->shutdown_thread) { /* This means the device has been closed (or there has been an error. An error code of -1 should @@ -888,7 +888,7 @@ int HID_API_EXPORT hid_read_timeout(hid_device *dev, unsigned char *data, size_t } /* There is no data. Go to sleep and wait for data. */ - + if (milliseconds == -1) { /* Blocking */ int res; @@ -913,7 +913,7 @@ int HID_API_EXPORT hid_read_timeout(hid_device *dev, unsigned char *data, size_t ts.tv_sec++; ts.tv_nsec -= 1000000000L; } - + res = cond_timedwait(dev, &dev->condition, &dev->mutex, &ts); if (res == 0) bytes_read = return_data(dev, data, length); @@ -942,7 +942,7 @@ int HID_API_EXPORT hid_set_nonblocking(hid_device *dev, int nonblock) { /* All Nonblocking operation is handled by the library. */ dev->blocking = !nonblock; - + return 0; } @@ -985,14 +985,14 @@ void HID_API_EXPORT hid_close(hid_device *dev) IOHIDDeviceUnscheduleFromRunLoop(dev->device_handle, dev->run_loop, dev->run_loop_mode); IOHIDDeviceScheduleWithRunLoop(dev->device_handle, CFRunLoopGetMain(), kCFRunLoopDefaultMode); } - + /* Cause read_thread() to stop. */ dev->shutdown_thread = 1; - + /* Wake up the run thread's event loop so that the thread can exit. */ CFRunLoopSourceSignal(dev->source); CFRunLoopWakeUp(dev->run_loop); - + /* Notify the read thread that it can shut down now. */ pthread_barrier_wait(&dev->shutdown_barrier); @@ -1005,7 +1005,7 @@ void HID_API_EXPORT hid_close(hid_device *dev) if (!dev->disconnected) { IOHIDDeviceClose(dev->device_handle, kIOHIDOptionsTypeNone); } - + /* Clear out the queue of received reports. */ pthread_mutex_lock(&dev->mutex); while (dev->input_reports) { @@ -1085,19 +1085,19 @@ int main(void) { IOHIDManagerRef mgr; int i; - + mgr = IOHIDManagerCreate(kCFAllocatorDefault, kIOHIDOptionsTypeNone); IOHIDManagerSetDeviceMatching(mgr, NULL); IOHIDManagerOpen(mgr, kIOHIDOptionsTypeNone); - + CFSetRef device_set = IOHIDManagerCopyDevices(mgr); - + CFIndex num_devices = CFSetGetCount(device_set); IOHIDDeviceRef *device_array = calloc(num_devices, sizeof(IOHIDDeviceRef)); CFSetGetValues(device_set, (const void **) device_array); - + setlocale(LC_ALL, ""); - + for (i = 0; i < num_devices; i++) { IOHIDDeviceRef dev = device_array[i]; printf("Device: %p\n", dev); @@ -1107,16 +1107,16 @@ int main(void) char cbuf[256]; get_serial_number(dev, serial, 256); - + printf(" Serial: %ls\n", serial); printf(" Loc: %ld\n", get_location_id(dev)); get_transport(dev, buf, 256); printf(" Trans: %ls\n", buf); make_path(dev, cbuf, 256); printf(" Path: %s\n", cbuf); - + } - + return 0; } #endif diff --git a/gr-fcd/lib/hid/hidwin.c b/gr-fcd/lib/hid/hidwin.c index 26d870fd8..5d34aadf4 100644 --- a/gr-fcd/lib/hid/hidwin.c +++ b/gr-fcd/lib/hid/hidwin.c @@ -8,7 +8,7 @@ 8/22/2009 Copyright 2009, All Rights Reserved. - + At the discretion of the user of this library, this software may be licensed under the terms of the GNU Public License v3, a BSD-Style license, or the @@ -162,7 +162,7 @@ static void register_error(hid_device *device, const char *op) MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPWSTR)&msg, 0/*sz*/, NULL); - + // Get rid of the CR and LF that FormatMessage() sticks at the // end of the message. Thanks Microsoft! ptr = msg; @@ -174,7 +174,7 @@ static void register_error(hid_device *device, const char *op) ptr++; } - // Store the message off in the Device entry so that + // Store the message off in the Device entry so that // the hid_error() function can pick it up. LocalFree(device->last_error_str); device->last_error_str = msg; @@ -284,9 +284,9 @@ struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned shor // Get information for all the devices belonging to the HID class. device_info_set = SetupDiGetClassDevsA(&InterfaceClassGuid, NULL, NULL, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE); - + // Iterate over each device in the HID class, looking for the right one. - + for (;;) { HANDLE write_handle = INVALID_HANDLE_VALUE; DWORD required_size = 0; @@ -297,7 +297,7 @@ struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned shor &InterfaceClassGuid, device_index, &device_interface_data); - + if (!res) { // A return of FALSE from this function means that // there are no more devices. @@ -344,7 +344,7 @@ struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned shor // Unable to open the device. //register_error(dev, "CreateFile"); goto cont_close; - } + } // Get the Vendor ID and Product ID for this device. @@ -354,7 +354,7 @@ struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned shor // Check the VID/PID to see if we should add this // device to the enumeration list. - if ((vendor_id == 0x0 && product_id == 0x0) || + if ((vendor_id == 0x0 && product_id == 0x0) || (attrib.VendorID == vendor_id && attrib.ProductID == product_id)) { #define WSTR_LEN 512 @@ -388,7 +388,7 @@ struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned shor HidD_FreePreparsedData(pp_data); } - + /* Fill out the record */ cur_dev->next = NULL; str = device_interface_detail_data->DevicePath; @@ -488,7 +488,7 @@ HID_API_EXPORT hid_device * HID_API_CALL hid_open(unsigned short vendor_id, unsi struct hid_device_info *devs, *cur_dev; const char *path_to_open = NULL; hid_device *handle = NULL; - + devs = hid_enumerate(vendor_id, product_id); cur_dev = devs; while (cur_dev) { @@ -514,7 +514,7 @@ HID_API_EXPORT hid_device * HID_API_CALL hid_open(unsigned short vendor_id, unsi } hid_free_enumeration(devs); - + return handle; } @@ -550,7 +550,7 @@ HID_API_EXPORT hid_device * HID_API_CALL hid_open_path(const char *path) } nt_res = HidP_GetCaps(pp_data, &caps); if (nt_res != HIDP_STATUS_SUCCESS) { - register_error(dev, "HidP_GetCaps"); + register_error(dev, "HidP_GetCaps"); goto err_pp_data; } dev->input_report_length = caps.InputReportByteLength; @@ -562,7 +562,7 @@ HID_API_EXPORT hid_device * HID_API_CALL hid_open_path(const char *path) err_pp_data: HidD_FreePreparsedData(pp_data); -err: +err: CloseHandle(dev->device_handle); free(dev); return NULL; @@ -577,7 +577,7 @@ int HID_API_EXPORT HID_API_CALL hid_write(hid_device *dev, const unsigned char * memset(&ol, 0, sizeof(ol)); res = WriteFile(dev->device_handle, data, length, NULL, &ol); - + if (!res) { if (GetLastError() != ERROR_IO_PENDING) { // WriteFile() failed. Return error. @@ -612,7 +612,7 @@ int HID_API_EXPORT HID_API_CALL hid_read_timeout(hid_device *dev, unsigned char dev->read_pending = TRUE; ResetEvent(ev); res = ReadFile(dev->device_handle, dev->read_buf, dev->input_report_length, &bytes_read, &dev->ol); - + if (!res) { if (GetLastError() != ERROR_IO_PENDING) { // ReadFile() has failed. @@ -638,7 +638,7 @@ int HID_API_EXPORT HID_API_CALL hid_read_timeout(hid_device *dev, unsigned char // we are in non-blocking mode. Get the number of bytes read. The actual // data has been copied to the data[] array which was passed to ReadFile(). res = GetOverlappedResult(dev->device_handle, &dev->ol, &bytes_read, TRUE/*wait*/); - + // Set pending back to false, even if GetOverlappedResult() returned error. dev->read_pending = FALSE; @@ -656,13 +656,13 @@ int HID_API_EXPORT HID_API_CALL hid_read_timeout(hid_device *dev, unsigned char memcpy(data, dev->read_buf, length); } } - + end_of_function: if (!res) { register_error(dev, "GetOverlappedResult"); return -1; } - + return bytes_read; } @@ -805,7 +805,7 @@ HID_API_EXPORT const wchar_t * HID_API_CALL hid_error(hid_device *dev) //#define PICPGM //#define S11 #define P32 -#ifdef S11 +#ifdef S11 unsigned short VendorID = 0xa0a0; unsigned short ProductID = 0x0001; #endif @@ -835,7 +835,7 @@ int __cdecl main(int argc, char* argv[]) memset(buf,0x00,sizeof(buf)); buf[0] = 0; buf[1] = 0x81; - + // Open the device. int handle = open(VendorID, ProductID, L"12345"); diff --git a/gr-fcd/python/.gitignore b/gr-fcd/python/.gitignore deleted file mode 100644 index bf03975bb..000000000 --- a/gr-fcd/python/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -/Makefile -/Makefile.in -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/*.pyo -/run_tests diff --git a/gr-fcd/python/CMakeLists.txt b/gr-fcd/python/CMakeLists.txt index 1c5dde35f..55233d256 100644 --- a/gr-fcd/python/CMakeLists.txt +++ b/gr-fcd/python/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-fcd/python/__init__.py b/gr-fcd/python/__init__.py index 9e573450f..daf9c890d 100644 --- a/gr-fcd/python/__init__.py +++ b/gr-fcd/python/__init__.py @@ -1,23 +1,23 @@ # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# ''' This is the gr-fcd package. This package provides a GNU Radio diff --git a/gr-fcd/python/qa_fcd.py b/gr-fcd/python/qa_fcd.py index f2546ce92..0993cab42 100755 --- a/gr-fcd/python/qa_fcd.py +++ b/gr-fcd/python/qa_fcd.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest import fcd_swig @@ -34,6 +34,6 @@ class test_fcd(gr_unittest.TestCase): def test_000_nop (self): """Just see if we can import the module...""" pass - + if __name__ == '__main__': gr_unittest.run(test_fcd, "test_fcd.xml") diff --git a/gr-fcd/swig/.gitignore b/gr-fcd/swig/.gitignore deleted file mode 100644 index 7dcd448b7..000000000 --- a/gr-fcd/swig/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -/.deps -/.libs -/Makefile.in -/Makefile -/fcd_swig.cc -/fcd_swig.py -/gnuradio -/guile -/python -/run_guile_tests -*.la -*.lo -*.o diff --git a/gr-fcd/swig/Makefile.am b/gr-fcd/swig/Makefile.am deleted file mode 100644 index 225f32ae0..000000000 --- a/gr-fcd/swig/Makefile.am +++ /dev/null @@ -1,81 +0,0 @@ -# -# Copyright 2012 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common -include $(top_srcdir)/Makefile.swig - -TESTS = -EXTRA_DIST += $(nobase_guile_DATA) - -noinst_GUILE = fcd.test - -if GUILE -nobase_guile_DATA = gnuradio/fcd_swig.scm -endif - - -AM_CPPFLAGS = \ - -I$(top_srcdir)/gr-fcd/include/fcd \ - -I$(top_srcdir)/gr-audio/include \ - $(STD_DEFINES_AND_INCLUDES) \ - $(PYTHON_CPPFLAGS) \ - $(WITH_INCLUDES) - -# ---------------------------------------------------------------- -# The SWIG library -# TESTS = run_tests - -fcd_swig_swig_args = $(FCD_CPPFLAGS) - -TOP_SWIG_DOC_IFILES = \ - fcd_swig_doc.i - -TOP_SWIG_IFILES = \ - $(TOP_SWIG_DOC_IFILES) \ - fcd_swig.i - -BUILT_SOURCES += \ - $(TOP_SWIG_DOC_IFILES) - -EXTRA_DIST += \ - $(TOP_SWIG_DOC_IFILES) - -$(TOP_SWIG_DOC_IFILES): - `echo "" > $@` - -# Install so that they end up available as: -# import gnuradio.fcd -# This ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio/fcd -fcd_swig_pythondir_category = \ - gnuradio/fcd - -# additional libraries for linking with the SWIG-generated library -fcd_swig_la_swig_libadd = \ - $(top_builddir)/gr-fcd/lib/libgnuradio-fcd.la - -# additional SWIG files to be installed -fcd_swig_swiginclude_headers = \ - $(TOP_SWIG_DOC_IFILES) - -if GUILE -TESTS += run_guile_tests -endif diff --git a/gr-fcd/swig/Makefile.swig.gen b/gr-fcd/swig/Makefile.swig.gen deleted file mode 100644 index 849e1ea52..000000000 --- a/gr-fcd/swig/Makefile.swig.gen +++ /dev/null @@ -1,145 +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 fcd_swig.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/fcd_swig -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/fcd_swig -## -## 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. - -fcd_swig_pythondir_category ?= gnuradio/fcd_swig -fcd_swig_pylibdir_category ?= $(fcd_swig_pythondir_category) -fcd_swig_pythondir = $(pythondir)/$(fcd_swig_pythondir_category) -fcd_swig_pylibdir = $(pyexecdir)/$(fcd_swig_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -fcd_swig_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/fcd_swig -# FIXME: determince whether these should be installed with gnuradio. -fcd_swig_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -fcd_swig_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 > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -fcd_swig_swiginclude_HEADERS = \ - fcd_swig.i \ - $(fcd_swig_swiginclude_headers) - -if PYTHON -fcd_swig_pylib_LTLIBRARIES = \ - _fcd_swig.la - -_fcd_swig_la_SOURCES = \ - python/fcd_swig.cc \ - $(fcd_swig_la_swig_sources) - -fcd_swig_python_PYTHON = \ - fcd_swig.py \ - $(fcd_swig_python) - -_fcd_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(fcd_swig_la_swig_libadd) - -_fcd_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(fcd_swig_la_swig_ldflags) - -_fcd_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(fcd_swig_la_swig_cxxflags) - -python/fcd_swig.cc: fcd_swig.py -fcd_swig.py: fcd_swig.i - -# Include the python dependencies for this file --include python/fcd_swig.d - -endif # end of if python - -if GUILE - -fcd_swig_scmlib_LTLIBRARIES = \ - libguile-gnuradio-fcd_swig.la -libguile_gnuradio_fcd_swig_la_SOURCES = \ - guile/fcd_swig.cc \ - $(fcd_swig_la_swig_sources) -nobase_fcd_swig_scm_DATA = \ - gnuradio/fcd_swig.scm \ - gnuradio/fcd_swig-primitive.scm -libguile_gnuradio_fcd_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(fcd_swig_la_swig_libadd) -libguile_gnuradio_fcd_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(fcd_swig_la_swig_ldflags) -libguile_gnuradio_fcd_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(fcd_swig_la_swig_cxxflags) - -guile/fcd_swig.cc: gnuradio/fcd_swig.scm -gnuradio/fcd_swig.scm: fcd_swig.i -gnuradio/fcd_swig-primitive.scm: gnuradio/fcd_swig.scm - -# Include the guile dependencies for this file --include guile/fcd_swig.d - -endif # end of GUILE - - diff --git a/gr-fcd/swig/fcd_swig.i b/gr-fcd/swig/fcd_swig.i index 8fcc7d059..f4ad1b320 100644 --- a/gr-fcd/swig/fcd_swig.i +++ b/gr-fcd/swig/fcd_swig.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -38,13 +38,3 @@ GR_SWIG_BLOCK_MAGIC(fcd,source_c); fcd_source_c_sptr fcd_make_source_c (const std::string device_name = ""); - -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-fcd_swig" "scm_init_gnuradio_fcd_swig_module") -%} - -%goops %{ -(use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif diff --git a/gr-fcd/swig/run_guile_tests.in b/gr-fcd/swig/run_guile_tests.in deleted file mode 100644 index 5d08b0dd5..000000000 --- a/gr-fcd/swig/run_guile_tests.in +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -. @top_builddir@/setup_guile_test_env - -# 1st argument is absolute path to hand coded guile source directory -# 2nd argument is absolute path to component C++ shared library build directory -# 3nd argument is absolute path to component SWIG build directory - -add_local_paths \ - @srcdir@ \ - @abs_builddir@ \ - @abs_builddir@ - -@GUILE@ -e main -c '(use-modules (gnuradio test-suite guile-test))' -t @srcdir@ diff --git a/gr-howto-write-a-block-cmake/apps/howto_square.grc b/gr-howto-write-a-block-cmake/apps/howto_square.grc deleted file mode 100644 index a8563698b..000000000 --- a/gr-howto-write-a-block-cmake/apps/howto_square.grc +++ /dev/null @@ -1,325 +0,0 @@ -<?xml version='1.0' encoding='ASCII'?> -<flow_graph> - <timestamp>Thu Nov 12 11:26:07 2009</timestamp> - <block> - <key>options</key> - <param> - <key>id</key> - <value>howto_square</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>title</key> - <value></value> - </param> - <param> - <key>author</key> - <value></value> - </param> - <param> - <key>description</key> - <value></value> - </param> - <param> - <key>window_size</key> - <value>1280, 1024</value> - </param> - <param> - <key>generate_options</key> - <value>wx_gui</value> - </param> - <param> - <key>category</key> - <value>Custom</value> - </param> - <param> - <key>run_options</key> - <value>prompt</value> - </param> - <param> - <key>run</key> - <value>True</value> - </param> - <param> - <key>realtime_scheduling</key> - <value></value> - </param> - <param> - <key>_coordinate</key> - <value>(10, 10)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>variable</key> - <param> - <key>id</key> - <value>samp_rate</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>value</key> - <value>10e3</value> - </param> - <param> - <key>_coordinate</key> - <value>(10, 170)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>wxgui_scopesink2</key> - <param> - <key>id</key> - <value>sink</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>float</value> - </param> - <param> - <key>title</key> - <value>Input</value> - </param> - <param> - <key>samp_rate</key> - <value>samp_rate</value> - </param> - <param> - <key>v_scale</key> - <value>20</value> - </param> - <param> - <key>v_offset</key> - <value>0</value> - </param> - <param> - <key>t_scale</key> - <value>0.002</value> - </param> - <param> - <key>ac_couple</key> - <value>False</value> - </param> - <param> - <key>xy_mode</key> - <value>False</value> - </param> - <param> - <key>num_inputs</key> - <value>1</value> - </param> - <param> - <key>win_size</key> - <value></value> - </param> - <param> - <key>grid_pos</key> - <value></value> - </param> - <param> - <key>notebook</key> - <value></value> - </param> - <param> - <key>_coordinate</key> - <value>(691, 222)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>howto_square_ff</key> - <param> - <key>id</key> - <value>sqr</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>_coordinate</key> - <value>(709, 344)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>gr_throttle</key> - <param> - <key>id</key> - <value>thr</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>float</value> - </param> - <param> - <key>samples_per_second</key> - <value>samp_rate</value> - </param> - <param> - <key>vlen</key> - <value>1</value> - </param> - <param> - <key>_coordinate</key> - <value>(497, 340)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>gr_vector_source_x</key> - <param> - <key>id</key> - <value>src</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>float</value> - </param> - <param> - <key>vector</key> - <value>[float(n)-50 for n in range(100)]</value> - </param> - <param> - <key>repeat</key> - <value>True</value> - </param> - <param> - <key>vlen</key> - <value>1</value> - </param> - <param> - <key>_coordinate</key> - <value>(246, 332)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>wxgui_scopesink2</key> - <param> - <key>id</key> - <value>sink2</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>float</value> - </param> - <param> - <key>title</key> - <value>Output</value> - </param> - <param> - <key>samp_rate</key> - <value>samp_rate</value> - </param> - <param> - <key>v_scale</key> - <value>0</value> - </param> - <param> - <key>v_offset</key> - <value>0</value> - </param> - <param> - <key>t_scale</key> - <value>0.002</value> - </param> - <param> - <key>ac_couple</key> - <value>False</value> - </param> - <param> - <key>xy_mode</key> - <value>False</value> - </param> - <param> - <key>num_inputs</key> - <value>1</value> - </param> - <param> - <key>win_size</key> - <value></value> - </param> - <param> - <key>grid_pos</key> - <value></value> - </param> - <param> - <key>notebook</key> - <value></value> - </param> - <param> - <key>_coordinate</key> - <value>(869, 324)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <connection> - <source_block_id>thr</source_block_id> - <sink_block_id>sqr</sink_block_id> - <source_key>0</source_key> - <sink_key>0</sink_key> - </connection> - <connection> - <source_block_id>src</source_block_id> - <sink_block_id>thr</sink_block_id> - <source_key>0</source_key> - <sink_key>0</sink_key> - </connection> - <connection> - <source_block_id>thr</source_block_id> - <sink_block_id>sink</sink_block_id> - <source_key>0</source_key> - <sink_key>0</sink_key> - </connection> - <connection> - <source_block_id>sqr</source_block_id> - <sink_block_id>sink2</sink_block_id> - <source_key>0</source_key> - <sink_key>0</sink_key> - </connection> -</flow_graph> diff --git a/gr-howto-write-a-block-cmake/apps/howto_square.py b/gr-howto-write-a-block-cmake/apps/howto_square.py deleted file mode 100755 index f14e28325..000000000 --- a/gr-howto-write-a-block-cmake/apps/howto_square.py +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/env python -################################################## -# Gnuradio Python Flow Graph -# Title: Howto Square -# Generated: Thu Nov 12 11:26:07 2009 -################################################## - -import howto -from gnuradio import eng_notation -from gnuradio import gr -from gnuradio.eng_option import eng_option -from gnuradio.gr import firdes -from gnuradio.wxgui import scopesink2 -from grc_gnuradio import wxgui as grc_wxgui -from optparse import OptionParser -import wx - -class howto_square(grc_wxgui.top_block_gui): - - def __init__(self): - grc_wxgui.top_block_gui.__init__(self, title="Howto Square") - - ################################################## - # Variables - ################################################## - self.samp_rate = samp_rate = 10e3 - - ################################################## - # Blocks - ################################################## - self.sink = scopesink2.scope_sink_f( - self.GetWin(), - title="Input", - sample_rate=samp_rate, - v_scale=20, - v_offset=0, - t_scale=0.002, - ac_couple=False, - xy_mode=False, - num_inputs=1, - ) - self.Add(self.sink.win) - self.sink2 = scopesink2.scope_sink_f( - self.GetWin(), - title="Output", - sample_rate=samp_rate, - v_scale=0, - v_offset=0, - t_scale=0.002, - ac_couple=False, - xy_mode=False, - num_inputs=1, - ) - self.Add(self.sink2.win) - self.sqr = howto.square_ff() - self.src = gr.vector_source_f(([float(n)-50 for n in range(100)]), True, 1) - self.thr = gr.throttle(gr.sizeof_float*1, samp_rate) - - ################################################## - # Connections - ################################################## - self.connect((self.thr, 0), (self.sqr, 0)) - self.connect((self.src, 0), (self.thr, 0)) - self.connect((self.thr, 0), (self.sink, 0)) - self.connect((self.sqr, 0), (self.sink2, 0)) - - def set_samp_rate(self, samp_rate): - self.samp_rate = samp_rate - self.sink.set_sample_rate(self.samp_rate) - self.sink2.set_sample_rate(self.samp_rate) - -if __name__ == '__main__': - parser = OptionParser(option_class=eng_option, usage="%prog: [options]") - (options, args) = parser.parse_args() - tb = howto_square() - tb.Run(True) - diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/.gitignore b/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/.gitignore deleted file mode 100644 index 0a864cc38..000000000 --- a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in - diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/Makefile.am b/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/Makefile.am deleted file mode 100644 index 141f46e5a..000000000 --- a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/Makefile.am +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright 2007,2009,2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -EXTRA_DIST = \ - example/aadvark.cc \ - example/aadvark.h \ - example/Doxyfile \ - example/xml/aadvark_8cc.xml \ - example/xml/aadvark_8h.xml \ - example/xml/classAadvark.xml \ - example/xml/combine.xslt \ - example/xml/compound.xsd \ - example/xml/index.xml \ - example/xml/index.xsd - -if PYTHON -utilspythondir = $(grpythondir)/doxyxml - -TESTS = \ - run_tests - -nobase_utilspython_PYTHON = \ - __init__.py \ - base.py \ - doxyindex.py \ - text.py \ - generated/__init__.py \ - generated/index.py \ - generated/indexsuper.py \ - generated/compound.py \ - generated/compoundsuper.py -endif
\ No newline at end of file diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/run_tests.in b/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/run_tests.in deleted file mode 100644 index db9cc62bc..000000000 --- a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/run_tests.in +++ /dev/null @@ -1,16 +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 - -# Note: calling master run_tests.sh in gnuradio core is not strictly -# correct, as it will result in a partially bogus PYTHONPATH, but it -# does make the correct paths in the second half so all is well. - -@PYTHON@ @srcdir@/__init__.py - -# @top_builddir@/run_tests.sh \ -# @abs_top_srcdir@/gnuradio-core \ -# @abs_top_builddir@/gnuradio-core \ -# @srcdir@ diff --git a/gr-howto-write-a-block-cmake/grc/howto_square2_ff.xml b/gr-howto-write-a-block-cmake/grc/howto_square2_ff.xml deleted file mode 100644 index c58ef0047..000000000 --- a/gr-howto-write-a-block-cmake/grc/howto_square2_ff.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>Square2</name> - <key>howto_square2_ff</key> - <category>HOWTO</category> - <import>import howto</import> - <make>howto.square2_ff()</make> - - <sink> - <name>in</name> - <type>float</type> - </sink> - - <source> - <name>out</name> - <type>float</type> - </source> -</block> diff --git a/gr-howto-write-a-block-cmake/grc/howto_square_ff.xml b/gr-howto-write-a-block-cmake/grc/howto_square_ff.xml deleted file mode 100644 index 34a0b0a3f..000000000 --- a/gr-howto-write-a-block-cmake/grc/howto_square_ff.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>Square</name> - <key>howto_square_ff</key> - <category>HOWTO</category> - <import>import howto</import> - <make>howto.square_ff()</make> - - <sink> - <name>in</name> - <type>float</type> - </sink> - - <source> - <name>out</name> - <type>float</type> - </source> -</block> diff --git a/gr-howto-write-a-block-cmake/lib/howto_square2_ff.cc b/gr-howto-write-a-block-cmake/lib/howto_square2_ff.cc deleted file mode 100644 index 5e0fd7a43..000000000 --- a/gr-howto-write-a-block-cmake/lib/howto_square2_ff.cc +++ /dev/null @@ -1,92 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2010 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. - */ - -/* - * config.h is generated by configure. It contains the results - * of probing for features, options etc. It should be the first - * file included in your .cc file. - */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <howto_square2_ff.h> -#include <gr_io_signature.h> - -/* - * Create a new instance of howto_square2_ff and return - * a boost shared_ptr. This is effectively the public constructor. - */ -howto_square2_ff_sptr -howto_make_square2_ff () -{ - return gnuradio::get_initial_sptr(new howto_square2_ff ()); -} - -/* - * Specify constraints on number of input and output streams. - * This info is used to construct the input and output signatures - * (2nd & 3rd args to gr_block's constructor). The input and - * output signatures are used by the runtime system to - * check that a valid number and type of inputs and outputs - * are connected to this block. In this case, we accept - * only 1 input and 1 output. - */ -static const int MIN_IN = 1; // mininum number of input streams -static const int MAX_IN = 1; // maximum number of input streams -static const int MIN_OUT = 1; // minimum number of output streams -static const int MAX_OUT = 1; // maximum number of output streams - -/* - * The private constructor - */ -howto_square2_ff::howto_square2_ff () - : gr_sync_block ("square2_ff", - gr_make_io_signature (MIN_IN, MAX_IN, sizeof (float)), - gr_make_io_signature (MIN_OUT, MAX_OUT, sizeof (float))) -{ - // nothing else required in this example -} - -/* - * Our virtual destructor. - */ -howto_square2_ff::~howto_square2_ff () -{ - // nothing else required in this example -} - -int -howto_square2_ff::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const float *in = (const float *) input_items[0]; - float *out = (float *) output_items[0]; - - for (int i = 0; i < noutput_items; i++){ - out[i] = in[i] * in[i]; - } - - // Tell runtime system how many output items we produced. - return noutput_items; -} diff --git a/gr-howto-write-a-block-cmake/lib/howto_square_ff.cc b/gr-howto-write-a-block-cmake/lib/howto_square_ff.cc deleted file mode 100644 index f1d5a7848..000000000 --- a/gr-howto-write-a-block-cmake/lib/howto_square_ff.cc +++ /dev/null @@ -1,98 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2010 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. - */ - -/* - * config.h is generated by configure. It contains the results - * of probing for features, options etc. It should be the first - * file included in your .cc file. - */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <howto_square_ff.h> -#include <gr_io_signature.h> - -/* - * Create a new instance of howto_square_ff and return - * a boost shared_ptr. This is effectively the public constructor. - */ -howto_square_ff_sptr -howto_make_square_ff () -{ - return gnuradio::get_initial_sptr(new howto_square_ff ()); -} - -/* - * Specify constraints on number of input and output streams. - * This info is used to construct the input and output signatures - * (2nd & 3rd args to gr_block's constructor). The input and - * output signatures are used by the runtime system to - * check that a valid number and type of inputs and outputs - * are connected to this block. In this case, we accept - * only 1 input and 1 output. - */ -static const int MIN_IN = 1; // mininum number of input streams -static const int MAX_IN = 1; // maximum number of input streams -static const int MIN_OUT = 1; // minimum number of output streams -static const int MAX_OUT = 1; // maximum number of output streams - -/* - * The private constructor - */ -howto_square_ff::howto_square_ff () - : gr_block ("square_ff", - gr_make_io_signature (MIN_IN, MAX_IN, sizeof (float)), - gr_make_io_signature (MIN_OUT, MAX_OUT, sizeof (float))) -{ - // nothing else required in this example -} - -/* - * Our virtual destructor. - */ -howto_square_ff::~howto_square_ff () -{ - // nothing else required in this example -} - -int -howto_square_ff::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const float *in = (const float *) input_items[0]; - float *out = (float *) output_items[0]; - - for (int i = 0; i < noutput_items; i++){ - out[i] = in[i] * in[i]; - } - - // Tell runtime system how many input items we consumed on - // each input stream. - - consume_each (noutput_items); - - // Tell runtime system how many output items we produced. - return noutput_items; -} diff --git a/gr-howto-write-a-block-cmake/lib/qa_howto_square2_ff.cc b/gr-howto-write-a-block-cmake/lib/qa_howto_square2_ff.cc deleted file mode 100644 index 9c37b62c1..000000000 --- a/gr-howto-write-a-block-cmake/lib/qa_howto_square2_ff.cc +++ /dev/null @@ -1,32 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2011 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include <boost/test/unit_test.hpp> - -BOOST_AUTO_TEST_CASE(qa_howto_square2_ff_t1){ - BOOST_CHECK_EQUAL(2 + 2, 4); - // TODO BOOST_* test macros here -} - -BOOST_AUTO_TEST_CASE(qa_howto_square2_ff_t2){ - BOOST_CHECK_EQUAL(2 + 2, 4); - // TODO BOOST_* test macros here -} diff --git a/gr-howto-write-a-block-cmake/lib/qa_howto_square_ff.cc b/gr-howto-write-a-block-cmake/lib/qa_howto_square_ff.cc deleted file mode 100644 index da1d3040a..000000000 --- a/gr-howto-write-a-block-cmake/lib/qa_howto_square_ff.cc +++ /dev/null @@ -1,32 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2011 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include <boost/test/unit_test.hpp> - -BOOST_AUTO_TEST_CASE(qa_howto_square_ff_t1){ - BOOST_CHECK_EQUAL(2 + 2, 4); - // TODO BOOST_* test macros here -} - -BOOST_AUTO_TEST_CASE(qa_howto_square_ff_t2){ - BOOST_CHECK_EQUAL(2 + 2, 4); - // TODO BOOST_* test macros here -} diff --git a/gr-howto-write-a-block-cmake/python/__init__.py b/gr-howto-write-a-block-cmake/python/__init__.py deleted file mode 100644 index 86395851d..000000000 --- a/gr-howto-write-a-block-cmake/python/__init__.py +++ /dev/null @@ -1,54 +0,0 @@ -# -# Copyright 2008,2009 Free Software Foundation, Inc. -# -# This application 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. -# -# This application 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. -# - -# The presence of this file turns this directory into a Python package - -''' -This is the GNU Radio HOWTO module. Place your Python package -description here (python/__init__.py). -''' - -# ---------------------------------------------------------------- -# Temporary workaround for ticket:181 (swig+python problem) -import sys -_RTLD_GLOBAL = 0 -try: - from dl import RTLD_GLOBAL as _RTLD_GLOBAL -except ImportError: - try: - from DLFCN import RTLD_GLOBAL as _RTLD_GLOBAL - except ImportError: - pass - -if _RTLD_GLOBAL != 0: - _dlopenflags = sys.getdlopenflags() - sys.setdlopenflags(_dlopenflags|_RTLD_GLOBAL) -# ---------------------------------------------------------------- - - -# import swig generated symbols into the howto namespace -from howto_swig import * - -# import any pure python here -# - -# ---------------------------------------------------------------- -# Tail of workaround -if _RTLD_GLOBAL != 0: - sys.setdlopenflags(_dlopenflags) # Restore original flags -# ---------------------------------------------------------------- diff --git a/gr-howto-write-a-block-cmake/python/qa_howto.py b/gr-howto-write-a-block-cmake/python/qa_howto.py deleted file mode 100755 index 630f57bf4..000000000 --- a/gr-howto-write-a-block-cmake/python/qa_howto.py +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2004,2007 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 howto_swig - -class qa_howto (gr_unittest.TestCase): - - def setUp (self): - self.tb = gr.top_block () - - def tearDown (self): - self.tb = None - - def test_001_square_ff (self): - src_data = (-3, 4, -5.5, 2, 3) - expected_result = (9, 16, 30.25, 4, 9) - src = gr.vector_source_f (src_data) - sqr = howto_swig.square_ff () - dst = gr.vector_sink_f () - self.tb.connect (src, sqr) - self.tb.connect (sqr, dst) - self.tb.run () - result_data = dst.data () - self.assertFloatTuplesAlmostEqual (expected_result, result_data, 6) - - def test_002_square2_ff (self): - src_data = (-3, 4, -5.5, 2, 3) - expected_result = (9, 16, 30.25, 4, 9) - src = gr.vector_source_f (src_data) - sqr = howto_swig.square2_ff () - dst = gr.vector_sink_f () - self.tb.connect (src, sqr) - self.tb.connect (sqr, dst) - self.tb.run () - result_data = dst.data () - self.assertFloatTuplesAlmostEqual (expected_result, result_data, 6) - -if __name__ == '__main__': - gr_unittest.main () diff --git a/gr-howto-write-a-block-cmake/swig/howto_swig.i b/gr-howto-write-a-block-cmake/swig/howto_swig.i deleted file mode 100644 index bc2563cd7..000000000 --- a/gr-howto-write-a-block-cmake/swig/howto_swig.i +++ /dev/null @@ -1,30 +0,0 @@ -/* -*- c++ -*- */ - -#define HOWTO_API - -%include "gnuradio.i" // the common stuff - -//load generated python docstrings -%include "howto_swig_doc.i" - - -%{ -#include "howto_square_ff.h" -#include "howto_square2_ff.h" -%} - -GR_SWIG_BLOCK_MAGIC(howto,square_ff); -%include "howto_square_ff.h" - -GR_SWIG_BLOCK_MAGIC(howto,square2_ff); -%include "howto_square2_ff.h" - -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-howto_swig" "scm_init_gnuradio_howto_swig_module") -%} - -%goops %{ -(use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif diff --git a/gr-howto-write-a-block/.gitignore b/gr-howto-write-a-block/.gitignore deleted file mode 100644 index 16d3cf02e..000000000 --- a/gr-howto-write-a-block/.gitignore +++ /dev/null @@ -1,27 +0,0 @@ -/Makefile -/Makefile.in -/aclocal.m4 -/configure -/config.h.in -/stamp-h.in -/libtool -/config.log -/config.h -/config.cache -/config.status -/missing -/stamp-h -/stamp-h1 -/.deps -/.libs -/*.la -/*.lo -/autom4te.cache -/*.cache -/missing -/make.log -/py-compile -/depcomp -/ltmain.sh -/install-sh -/setup_guile_test_env diff --git a/gr-howto-write-a-block/AUTHORS b/gr-howto-write-a-block/AUTHORS deleted file mode 100644 index ee4560a55..000000000 --- a/gr-howto-write-a-block/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -Eric Blossom <eb@comsec.com> diff --git a/gr-howto-write-a-block-cmake/CMakeLists.txt b/gr-howto-write-a-block/CMakeLists.txt index cb5a0fe2e..5d2477f89 100644 --- a/gr-howto-write-a-block-cmake/CMakeLists.txt +++ b/gr-howto-write-a-block/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-howto-write-a-block/COPYING b/gr-howto-write-a-block/COPYING deleted file mode 100644 index 94a9ed024..000000000 --- a/gr-howto-write-a-block/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - 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/>. - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - <program> Copyright (C) <year> <name of author> - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -<http://www.gnu.org/licenses/>. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -<http://www.gnu.org/philosophy/why-not-lgpl.html>. diff --git a/gr-howto-write-a-block/ChangeLog b/gr-howto-write-a-block/ChangeLog deleted file mode 100644 index 4b6c4f99b..000000000 --- a/gr-howto-write-a-block/ChangeLog +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright 2001,2002,2003,2004,2005,2006,2007 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. -# - -For the blow by blow changes for each file, please consult -http://gnuradio.org/trac/timeline - -It's got everything that used to be in here ;) diff --git a/gr-howto-write-a-block/INSTALL b/gr-howto-write-a-block/INSTALL deleted file mode 100644 index 7d1c323be..000000000 --- a/gr-howto-write-a-block/INSTALL +++ /dev/null @@ -1,365 +0,0 @@ -Installation Instructions -************************* - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008, 2009 Free Software Foundation, Inc. - - Copying and distribution of this file, with or without modification, -are permitted in any medium without royalty provided the copyright -notice and this notice are preserved. This file is offered as-is, -without warranty of any kind. - -Basic Installation -================== - - Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following -more-detailed instructions are generic; see the `README' file for -instructions specific to this package. Some packages provide this -`INSTALL' file but do not implement all of the features documented -below. The lack of an optional feature in a given package is not -necessarily a bug. More recommendations for GNU packages can be found -in *note Makefile Conventions: (standards)Makefile Conventions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. Caching is -disabled by default to prevent problems with accidental use of stale -cache files. - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You need `configure.ac' if -you want to change it or regenerate `configure' using a newer version -of `autoconf'. - - The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. - - Running `configure' might take a while. While running, it prints - some messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package, generally using the just-built uninstalled binaries. - - 4. Type `make install' to install the programs and any data files and - documentation. When installing into a prefix owned by root, it is - recommended that the package be configured and built as a regular - user, and only the `make install' phase executed with root - privileges. - - 5. Optionally, type `make installcheck' to repeat any self-tests, but - this time using the binaries in their final installed location. - This target does not install anything. Running this target as a - regular user, particularly if the prior `make install' required - root privileges, verifies that the installation completed - correctly. - - 6. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - - 7. Often, you can also type `make uninstall' to remove the installed - files again. In practice, not all packages have tested that - uninstallation works correctly, even though it is required by the - GNU Coding Standards. - - 8. Some packages, particularly those that use Automake, provide `make - distcheck', which can by used by developers to test that all other - targets like `make install' and `make uninstall' work correctly. - This target is generally not run by end users. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' -for details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c99 CFLAGS=-g LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you can use GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. This -is known as a "VPATH" build. - - With a non-GNU `make', it is safer to compile the package for one -architecture at a time in the source code directory. After you have -installed the package for one architecture, use `make distclean' before -reconfiguring for another architecture. - - On MacOS X 10.5 and later systems, you can create libraries and -executables that work on multiple system types--known as "fat" or -"universal" binaries--by specifying multiple `-arch' options to the -compiler but only a single `-arch' option to the preprocessor. Like -this: - - ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CPP="gcc -E" CXXCPP="g++ -E" - - This is not guaranteed to produce working output in all cases, you -may have to build one architecture at a time and combine the results -using the `lipo' tool if you have problems. - -Installation Names -================== - - By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX', where PREFIX must be an -absolute file name. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. In general, the -default for these options is expressed in terms of `${prefix}', so that -specifying just `--prefix' will affect all of the other directory -specifications that were not explicitly provided. - - The most portable way to affect installation locations is to pass the -correct locations to `configure'; however, many packages provide one or -both of the following shortcuts of passing variable assignments to the -`make install' command line to change installation locations without -having to reconfigure or recompile. - - The first method involves providing an override variable for each -affected directory. For example, `make install -prefix=/alternate/directory' will choose an alternate location for all -directory configuration variables that were expressed in terms of -`${prefix}'. Any directories that were specified during `configure', -but not in terms of `${prefix}', must each be overridden at install -time for the entire installation to be relocated. The approach of -makefile variable overrides for each directory variable is required by -the GNU Coding Standards, and ideally causes no recompilation. -However, some platforms have known limitations with the semantics of -shared libraries that end up requiring recompilation when using this -method, particularly noticeable in packages that use GNU Libtool. - - The second method involves providing the `DESTDIR' variable. For -example, `make install DESTDIR=/alternate/directory' will prepend -`/alternate/directory' before all installation names. The approach of -`DESTDIR' overrides is not required by the GNU Coding Standards, and -does not work on platforms that have drive letters. On the other hand, -it does better at avoiding recompilation issues, and works well even -when some directory options were not specified in terms of `${prefix}' -at `configure' time. - -Optional Features -================= - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - - Some packages offer the ability to configure how verbose the -execution of `make' will be. For these packages, running `./configure ---enable-silent-rules' sets the default to minimal output, which can be -overridden with `make V=1'; while running `./configure ---disable-silent-rules' sets the default to verbose, which can be -overridden with `make V=0'. - -Particular systems -================== - - On HP-UX, the default C compiler is not ANSI C compatible. If GNU -CC is not installed, it is recommended to use the following options in -order to use an ANSI C compiler: - - ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" - -and if that doesn't work, install pre-built binaries of GCC for HP-UX. - - On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot -parse its `<wchar.h>' header file. The option `-nodtk' can be used as -a workaround. If GNU CC is not installed, it is therefore recommended -to try - - ./configure CC="cc" - -and if that doesn't work, try - - ./configure CC="cc -nodtk" - - On Solaris, don't put `/usr/ucb' early in your `PATH'. This -directory contains several dysfunctional programs; working variants of -these programs are available in `/usr/bin'. So, if you need `/usr/ucb' -in your `PATH', put it _after_ `/usr/bin'. - - On Haiku, software installed for all users goes in `/boot/common', -not `/usr/local'. It is recommended to use the following options: - - ./configure --prefix=/boot/common - -Specifying the System Type -========================== - - There may be some features `configure' cannot figure out -automatically, but needs to determine by the type of machine the package -will run on. Usually, assuming the package is built to be run on the -_same_ architectures, `configure' can figure that out, but if it prints -a message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS - KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - - Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). - -Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: - - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash - -`configure' Invocation -====================== - - `configure' recognizes the following options to control how it -operates. - -`--help' -`-h' - Print a summary of all of the options to `configure', and exit. - -`--help=short' -`--help=recursive' - Print a summary of the options unique to this package's - `configure', and exit. The `short' variant lists options used - only in the top level, while the `recursive' variant lists options - also present in any nested packages. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`--prefix=DIR' - Use DIR as the installation prefix. *note Installation Names:: - for more details, including other options available for fine-tuning - the installation locations. - -`--no-create' -`-n' - Run the configure checks, but stop before creating any output - files. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/gr-howto-write-a-block/Makefile.am b/gr-howto-write-a-block/Makefile.am deleted file mode 100644 index 4ceb210ba..000000000 --- a/gr-howto-write-a-block/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -# -# Copyright 2004,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. -# - -ACLOCAL_AMFLAGS = -I config - -include $(top_srcdir)/Makefile.common - -EXTRA_DIST = \ - bootstrap \ - configure \ - config.h.in \ - Makefile.swig \ - Makefile.swig.gen.t \ - version.sh \ - README \ - README.hacking - -SUBDIRS = config lib swig python grc apps - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = - -DISTCLEANFILES += gr-howto-write-a-block*.tar.gz diff --git a/gr-howto-write-a-block/Makefile.common b/gr-howto-write-a-block/Makefile.common deleted file mode 100644 index 2b9cc75af..000000000 --- a/gr-howto-write-a-block/Makefile.common +++ /dev/null @@ -1,90 +0,0 @@ -# -*- Makefile -*- -# -# Copyright 2004,2006,2009,2010 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. -# - -# Every Makefile starts with common vars so we can -# consistently use += -BUILT_SOURCES = -MOSTLYCLEANFILES = $(BUILT_SOURCES) $(STAMPS) *.pyc *.pyo *~ *.tmp *.loT -CLEANFILES = guile.log -DISTCLEANFILES = -#EXTRA_DIST = -STAMPS = - - -# The name of this "out-of-tree" module -modname = howto - -# Make rebuilds less verbose with stuff we can safely ignore -# about GNU make only extensions. -AUTOMAKE += -Wno-portability -Wnone - -# these flags are used when compiling non-SWIG-wrapper files -# when going in to non-SWIG libraries -AM_CXXFLAGS = @autoconf_default_CXXFLAGS@ - -# Sets ABI version in SONAME and appends -LIBVER to filename -LTVERSIONFLAGS = -version-info 0:0:0 -release $(LIBVER) - -# these flags are used when compiling any CXX file -AM_CPPFLAGS = \ - $(STD_DEFINES_AND_INCLUDES) \ - $(PYTHON_CPPFLAGS) \ - $(CPPUNIT_INCLUDES) \ - $(GNURADIO_CORE_CPPFLAGS) - -# these are used by both SWIG and CXX -STD_DEFINES_AND_INCLUDES = \ - $(DEFINES) \ - -I$(abs_top_srcdir)/lib \ - -I$(GNURADIO_CORE_INCLUDEDIR) \ - -I$(GNURADIO_CORE_INCLUDEDIR)/swig \ - -I$(GRUEL_INCLUDEDIR)/gruel/swig - -# includes -modincludedir = $(includedir)/$(modname) - -# swig includes -swigincludedir = $(modincludedir)/swig - -# Guile scheme code ends up under here: -guiledir = $(prefix)/share/guile/site - -# Install this stuff in the appropriate subdirectory -# This usually ends up at: -# ${prefix}/lib/python${python_version}/site-packages/$(modname) - -modpythondir = $(pythondir)/$(modname) -modpyexecdir = $(pyexecdir)/$(modname) - -# Data directory for grc block wrappers -grc_blocksdir = $(prefix)/share/gnuradio/grc/blocks - -# Don't assume that make predefines $(RM), because BSD make does -# not. We define it now in configure.ac using AM_PATH_PROG, but now -# here have to add a -f to be like GNU make. -RM=$(RM_PROG) -f - -dist-hook: - @for file in $(no_dist_files); do \ - echo $(RM) $(distdir)/$$file; \ - $(RM) $(distdir)/$$file; \ - done diff --git a/gr-howto-write-a-block/Makefile.swig b/gr-howto-write-a-block/Makefile.swig deleted file mode 100644 index 2ed69c6c7..000000000 --- a/gr-howto-write-a-block/Makefile.swig +++ /dev/null @@ -1,208 +0,0 @@ -# -*- Makefile -*- -# -# Copyright 2009,2010 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -## This makefile should be included using -## include $(top_srcdir)/Makefile.swig -## in Makefile.am's which require SWIG wrapping / compilation. -## For just installing .i files, this Makefile is not required. - - -## include the built Makefile.swig.gen, always the one from the srcdir -include $(srcdir)/Makefile.swig.gen - - -## swig flags -## -w511 turns off keyword argument warning -## "-outdir $(builddir)" writes all generated output files to -## the local builddir (which should always be '.') -## In some older autotools, $(builddir) is not defined, so -## just use '.' instead. - -SWIG_PYTHON_FLAGS = \ - -fvirtual \ - -python \ - -modern \ - -keyword \ - -w511 \ - -outdir . - -STD_SWIG_PYTHON_ARGS = \ - $(SWIG_PYTHON_FLAGS) \ - $(STD_DEFINES_AND_INCLUDES) \ - $(WITH_SWIG_INCLUDES) \ - $(WITH_INCLUDES) - -# NOTE: -Linkage passive and -Linkage module don't define SWIG_init() -SWIG_GUILE_FLAGS = \ - -guile \ - -scm \ - -scmstub \ - -package gnuradio \ - -Linkage module \ - -proxy \ - -goopsprefix gr: \ - -emit-slot-accessors \ - -emit-setters \ - -outdir . - -## standard swig flags used by most components - -STD_SWIG_GUILE_ARGS = \ - $(SWIG_GUILE_FLAGS) \ - $(STD_DEFINES_AND_INCLUDES) \ - $(WITH_SWIG_INCLUDES) \ - $(WITH_INCLUDES) - -## standard SWIG LD flags for library creation - -STD_SWIG_LA_LD_FLAGS = \ - $(PYTHON_LDFLAGS) \ - -module \ - -avoid-version \ - $(NO_UNDEFINED) - -## standard SWIG library additions for library creation - -STD_SWIG_LA_LIB_ADD = -lstdc++ - -## standard SWIG CXXFLAGS -## This allows for code to be compiled with "-O1" instead of "-g -O2" -## for some systems, avoiding some optimization issues. - -STD_SWIG_CXX_FLAGS = @swig_CXXFLAGS@ - -# We drive the dependencies off of swig_built_sources. This variable -# ends up containing only the generated .py and/or .scm files, not the .h -# or .cc files. This allows us to use the pattern rules defined -# below to generate all the pieces without the parallel make -# problems that occur when both the .py's and .cc's are in swig_built_sources. - -swig_built_sources = - -# swig_all_built_sources contains swig_built_sources plus the .cc and .h files. -# It contains the files to remove from the distribution and the files to -# remove for make clean. - -swig_all_built_sources = - -if PYTHON -# Create a list of .py files based on the top level .i files. -PYTHON_GEN = $(foreach IFILE,$(TOP_SWIG_IFILES), $(subst .i,.py,$(IFILE))) -swig_built_sources += $(PYTHON_GEN) -swig_all_built_sources += $(PYTHON_GEN) - -# Now add .h, .cc to _all_ -swig_all_built_sources += $(foreach IFILE,$(TOP_SWIG_IFILES), $(patsubst %.i,python/%.h,$(IFILE))) -swig_all_built_sources += $(foreach IFILE,$(TOP_SWIG_IFILES), $(patsubst %.i,python/%.cc,$(IFILE))) -endif - -if GUILE -# Create a list of .scm files based on the top level .i files. -GUILE_GEN = $(foreach IFILE,$(TOP_SWIG_IFILES), $(patsubst %.i,gnuradio/%.scm,$(IFILE))) -swig_built_sources += $(GUILE_GEN) -swig_all_built_sources += $(GUILE_GEN) - -# Now add -primitive.scm, .cc to _all_ -swig_all_built_sources += $(foreach IFILE,$(TOP_SWIG_IFILES), $(patsubst %.i,gnuradio/%-primitive.scm,$(IFILE))) -swig_all_built_sources += $(foreach IFILE,$(TOP_SWIG_IFILES), $(patsubst %.i,guile/%.cc,$(IFILE))) -endif - -# N.B. Only $(swig_built_sources), not $(swig_all_built_sources) -BUILT_SOURCES += $(swig_built_sources) - -# Don't distribute any of the swig generated files -no_dist_files = $(swig_all_built_sources) - -CLEANFILES += $(swig_all_built_sources) -CLEANFILES += python/*.lo python/*.o python/*.d -CLEANFILES += guile/*.lo guile/*.o guile/*.d - - -## SWIG suffixes for automake to know about -SUFFIXES = .i .scm .py - -# Compile a .i to what guile needs. We use -o to set the output file name, -# or even with -outdir guile in SWIG_GUILE_ARGS, swig keeps putting a -# gnuradio_core_*_wrap.cxx in the source directory. -gnuradio/%.scm : %.i - @echo "Compile .i to .scm" - @test -d "guile" || $(mkinstalldirs) "guile" - @test -d "gnuradio" || $(mkinstalldirs) "gnuradio" - $(SWIG) $(STD_SWIG_GUILE_ARGS) $($*_swig_args) \ - -MD -MF guile/$*.Std \ - -module $* -o guile/$*.cc $< - $(SED) -e 's|guile/\(.*\)\.cc:|gnuradio/\1.scm:|' guile/$*.Std > guile/$*.d - $(SED) -i -e 's/<--dummy-[0-9]\+-->/<top>/g' gnuradio/$*.scm - $(SED) -i -e 's/^(export /(export-safely /' gnuradio/$*.scm - $(RM) guile/$*.Std - -# Compile a .i file to what python needs -.i.py: - @echo "Compile .i to .py" - @test -d "python" || $(mkinstalldirs) "python" - $(SWIG) $(STD_SWIG_PYTHON_ARGS) $($*_swig_args) \ - -MD -MF python/$*.Std \ - -module $* -o python/$*.cc -oh python/$*.h $< - $(SED) -e 's|python/\(.*\)\.cc:|\1.py:|' python/$*.Std > python/$*.d - $(RM) python/$*.Std - -## ------------------------------------------------------------------------ -## Rule that (re)generates Makefile.swig.gen using TOP_SWIG_IFILES and -## Makefile.swig.gen.t -## -## Create $(srcdir)/Makefile.swig.gen, containing all of the rules -## for running SWIG to generate or re-generate outputs. SWIG file -## names are to be defined in TOP_SWIG_IFILES, and must include the -## full path to the file and full filename including extension. This -## Makefile addition will be made only if either it does not exist or -## if the top-level template has been modified. - -generate-makefile-swig $(srcdir)/Makefile.swig.gen: $(top_srcdir)/Makefile.swig.gen.t -## recreate $(srcdir)/Makefile.swig.gen only if ... - @do_recreate=0; \ - if test -f $(srcdir)/Makefile.swig.gen; then \ -## the file exists and can be removed; or ... - if $(RM) $(srcdir)/Makefile.swig.gen 2>/dev/null; then \ - if touch $(srcdir)/Makefile.swig.gen 2>/dev/null; then \ - do_recreate=1; \ - fi; \ - fi; \ - else \ -## the file doesn't exist, but can be created (e.g., by touching it). - if touch $(srcdir)/Makefile.swig.gen 2>/dev/null; then \ - do_recreate=1; \ - fi; \ - fi; \ - if test "$$do_recreate" == "1"; then \ - echo "Regenerating $(srcdir)/Makefile.swig.gen"; \ - for TFILE in $(TOP_SWIG_IFILES); do \ -## retrieve just the filename, without path or extension - TNAME=`python -c "import os.path as op; (dN, fN) = op.split ('$$TFILE'); (fbN, fE) = op.splitext (fN); print fbN;"`; \ -## Replace the @-named strings in the template Makefile for SWIG. - $(SED) -e 's|@NAME@|'$$TNAME'|g;' < $(top_srcdir)/Makefile.swig.gen.t >> $(srcdir)/Makefile.swig.gen; \ - echo "" >> $(srcdir)/Makefile.swig.gen; \ - done; \ - else \ - echo "Cannot recreate $(srcdir)/Makefile.swig.gen because the directory or file is write-protected."; \ - exit -1; \ - fi; - diff --git a/gr-howto-write-a-block/Makefile.swig.gen.t b/gr-howto-write-a-block/Makefile.swig.gen.t deleted file mode 100644 index 3c76ee4b4..000000000 --- a/gr-howto-write-a-block/Makefile.swig.gen.t +++ /dev/null @@ -1,144 +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 @NAME@.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/@NAME@ -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/@NAME@ -## -## 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. - -@NAME@_pythondir_category ?= @NAME@ -@NAME@_pylibdir_category ?= $(@NAME@_pythondir_category) -@NAME@_pythondir = $(pythondir)/$(@NAME@_pythondir_category) -@NAME@_pylibdir = $(pyexecdir)/$(@NAME@_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -@NAME@_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/@NAME@ -# FIXME: determince whether these should be installed with gnuradio. -@NAME@_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -@NAME@_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 > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -@NAME@_swiginclude_HEADERS = \ - @NAME@.i \ - $(@NAME@_swiginclude_headers) - -if PYTHON -@NAME@_pylib_LTLIBRARIES = \ - _@NAME@.la - -_@NAME@_la_SOURCES = \ - python/@NAME@.cc \ - $(@NAME@_la_swig_sources) - -@NAME@_python_PYTHON = \ - @NAME@.py \ - $(@NAME@_python) - -_@NAME@_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(@NAME@_la_swig_libadd) - -_@NAME@_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(@NAME@_la_swig_ldflags) - -_@NAME@_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(@NAME@_la_swig_cxxflags) - -python/@NAME@.cc: @NAME@.py -@NAME@.py: @NAME@.i - -# Include the python dependencies for this file --include python/@NAME@.d - -endif # end of if python - -if GUILE - -@NAME@_scmlib_LTLIBRARIES = \ - libguile-gnuradio-@NAME@.la -libguile_gnuradio_@NAME@_la_SOURCES = \ - guile/@NAME@.cc \ - $(@NAME@_la_swig_sources) -nobase_@NAME@_scm_DATA = \ - gnuradio/@NAME@.scm \ - gnuradio/@NAME@-primitive.scm -libguile_gnuradio_@NAME@_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(@NAME@_la_swig_libadd) -libguile_gnuradio_@NAME@_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(@NAME@_la_swig_ldflags) -libguile_gnuradio_@NAME@_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(@NAME@_la_swig_cxxflags) - -guile/@NAME@.cc: gnuradio/@NAME@.scm -gnuradio/@NAME@.scm: @NAME@.i -gnuradio/@NAME@-primitive.scm: gnuradio/@NAME@.scm - -# Include the guile dependencies for this file --include guile/@NAME@.d - -endif # end of GUILE - diff --git a/gr-howto-write-a-block/NEWS b/gr-howto-write-a-block/NEWS deleted file mode 100644 index e69de29bb..000000000 --- a/gr-howto-write-a-block/NEWS +++ /dev/null diff --git a/gr-howto-write-a-block/README b/gr-howto-write-a-block/README deleted file mode 100644 index 368e71994..000000000 --- a/gr-howto-write-a-block/README +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright 2005,2006,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. -# - -This directory (and the resulting tarball) contains a build tree with -examples, Makefiles, etc that demonstrate how to write signal -processing blocks for the GNU Radio system. This directory is -intentionally distributed separately from the unified tarball of the -rest of GNU Radio in order to avoid problems for people who have begun -to write blocks with a modified copy of gr-howto-write-a-block. - -This package requires that gnuradio-core is already installed. It -also depends on some GNU Radio prerequisites, such as Boost and -cppunit. - -To build the examples from the tarball use the normal recipe: - - $ ./configure - $ make - $ make check - -If you're building from git, you'll need to use this sequence, since -git doesn't contain configure or the generated Makefiles. - - $ ./bootstrap - $ ./configure - $ make - $ make check diff --git a/gr-howto-write-a-block/README.hacking b/gr-howto-write-a-block/README.hacking deleted file mode 100644 index c670fd19e..000000000 --- a/gr-howto-write-a-block/README.hacking +++ /dev/null @@ -1,95 +0,0 @@ -# -# 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. -# - -The layout of this tree is as follows. The top-level directory contains -the autoconf/automake build definition files: - -bootstrap -config.guess -config.sub -configure.ac -Makefile.am -Makefile.common -Makefile.swig -Makefile.swig.gen.t -version.sh - -Of these files, only configure.ac, Makefile.am, and Makefile.common would -likely need changing in order to customize this into a new out-of-tree -project. - -Subdirectory Layout -------------------- - -config - autoconf configuration macros -lib - GNU Radio blocks C++ API, shared lib and headers and QA code -swig - Generates Python API from C++ blocks -python - Pure Python modules (hierarchical blocks, other classes) -grc - GNU Radio Companion block wrappers -apps - GRC applications, scripts, or other executables installed to bin - -The 'config' directory contains autoconf configuration files which help the -configuration script discover various things about the software development -environment during the execution of the 'configure' script. These files -would likely not need any changing to customize this tree. - -The 'lib' directory contains those files needed to generate GNU Radio -signal processing blocks. These take the form of a shared library that one -dynamically links against, and header files that one would include in -their C++ GNU Radio application. This directory also contains the framework -for adding QA tests that are executed during 'make check' using the cppunit -unit testing framework. The generated shared library is installed into -$prefix/lib and the header files are installed into $prefix/include/gnuradio. - -Adding new blocks starts here, by adding new .cc and new .h files for each -new block, and modifying Makefile.am to add them to the build and link. If -desired, one can add unit tests to the QA framework that get executed during -'make check'. - -The 'swig' directory contains the SWIG machinery to create a Python module -that exports the C++ API into a Python namespace. Each GNU Radio block gets a -.i file (using SWIG syntax). The master howto.i file must also have a line -to include the block header file and a line to import the block .i file. The -resulting _howto_swig.so and _howto_swig.py files are installed into the -system Python lib directory under gnuradio/howto and become part of the -gnuradio.howto Python namespace. The Makefile.am must be customized to -recognize new files created here. - -The 'python' directory contains pure Python modules that get installed into -the system Python lib directory under gnuradio/howto and the __init__.py -module needed to turn the directory into the gnuradio.howto namespace. -This is the appropriate place to put hierarchical blocks and utility classes. -Be sure to edit the __init__.py to add your module/symbol imports as -necessary, and to modify the Makefile.am accordingly. - -This directory also contains Python-based QA code, which is executed during -'make check'. - -The 'grc' directory contains the XML-based wrappers that describe your blocks -to the GNU Radio Companion graphical flowgraph editor. These get installed -into the $prefix/share/gnuradio/grc/blocks directory and require modification -of the Makefile.am to recognize new files put here. Note: GRC only scans the -system directory for wrapper files, so you must do a 'make install' before -GRC will see your new files or modifications to existing ones. - -The 'apps' directory contains those Python and C++ programs which are to be -installed into the system $prefix/bin directory. (FIXME: there is not -currently an example of building a C++ binary in this directory.) diff --git a/gr-howto-write-a-block/apps/.gitignore b/gr-howto-write-a-block/apps/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-howto-write-a-block/apps/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-howto-write-a-block-cmake/apps/CMakeLists.txt b/gr-howto-write-a-block/apps/CMakeLists.txt index a736fb2d0..875b6b4ce 100644 --- a/gr-howto-write-a-block-cmake/apps/CMakeLists.txt +++ b/gr-howto-write-a-block/apps/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-howto-write-a-block/apps/Makefile.am b/gr-howto-write-a-block/apps/Makefile.am deleted file mode 100644 index 85ed222cf..000000000 --- a/gr-howto-write-a-block/apps/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -# -# 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. -# - -include $(top_srcdir)/Makefile.common - -if PYTHON - -dist_bin_SCRIPTS = \ - howto_square.py - -EXTRA_DIST = \ - howto_square.grc - -endif diff --git a/gr-howto-write-a-block/bootstrap b/gr-howto-write-a-block/bootstrap deleted file mode 100755 index 2412a7a82..000000000 --- a/gr-howto-write-a-block/bootstrap +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -# Copyright 2001,2005,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. - - -rm -fr config.cache autom4te*.cache - -aclocal -I config -autoconf -autoheader -libtoolize --automake -c -f -automake --add-missing -c -f -Wno-portability diff --git a/gr-howto-write-a-block-cmake/cmake/Modules/CMakeParseArgumentsCopy.cmake b/gr-howto-write-a-block/cmake/Modules/CMakeParseArgumentsCopy.cmake index 7ce4c49ae..7ce4c49ae 100644 --- a/gr-howto-write-a-block-cmake/cmake/Modules/CMakeParseArgumentsCopy.cmake +++ b/gr-howto-write-a-block/cmake/Modules/CMakeParseArgumentsCopy.cmake diff --git a/gr-howto-write-a-block-cmake/cmake/Modules/FindGnuradioCore.cmake b/gr-howto-write-a-block/cmake/Modules/FindGnuradioCore.cmake index 3773588a7..3773588a7 100644 --- a/gr-howto-write-a-block-cmake/cmake/Modules/FindGnuradioCore.cmake +++ b/gr-howto-write-a-block/cmake/Modules/FindGnuradioCore.cmake diff --git a/gr-howto-write-a-block-cmake/cmake/Modules/FindGruel.cmake b/gr-howto-write-a-block/cmake/Modules/FindGruel.cmake index 58dff7044..58dff7044 100644 --- a/gr-howto-write-a-block-cmake/cmake/Modules/FindGruel.cmake +++ b/gr-howto-write-a-block/cmake/Modules/FindGruel.cmake diff --git a/gr-howto-write-a-block-cmake/cmake/Modules/GrMiscUtils.cmake b/gr-howto-write-a-block/cmake/Modules/GrMiscUtils.cmake index 0e1f40027..9331d5deb 100644 --- a/gr-howto-write-a-block-cmake/cmake/Modules/GrMiscUtils.cmake +++ b/gr-howto-write-a-block/cmake/Modules/GrMiscUtils.cmake @@ -1,17 +1,17 @@ # Copyright 2010-2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-howto-write-a-block-cmake/cmake/Modules/GrPlatform.cmake b/gr-howto-write-a-block/cmake/Modules/GrPlatform.cmake index ce2e15fef..a2e4f3b34 100644 --- a/gr-howto-write-a-block-cmake/cmake/Modules/GrPlatform.cmake +++ b/gr-howto-write-a-block/cmake/Modules/GrPlatform.cmake @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-howto-write-a-block-cmake/cmake/Modules/GrPython.cmake b/gr-howto-write-a-block/cmake/Modules/GrPython.cmake index efdddf371..efdddf371 100644 --- a/gr-howto-write-a-block-cmake/cmake/Modules/GrPython.cmake +++ b/gr-howto-write-a-block/cmake/Modules/GrPython.cmake diff --git a/gr-howto-write-a-block-cmake/cmake/Modules/GrSwig.cmake b/gr-howto-write-a-block/cmake/Modules/GrSwig.cmake index 47e18085b..6ba5ee3a5 100644 --- a/gr-howto-write-a-block-cmake/cmake/Modules/GrSwig.cmake +++ b/gr-howto-write-a-block/cmake/Modules/GrSwig.cmake @@ -1,17 +1,17 @@ # Copyright 2010-2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-howto-write-a-block-cmake/cmake/Modules/GrTest.cmake b/gr-howto-write-a-block/cmake/Modules/GrTest.cmake index 9ec3141f9..6174c034e 100644 --- a/gr-howto-write-a-block-cmake/cmake/Modules/GrTest.cmake +++ b/gr-howto-write-a-block/cmake/Modules/GrTest.cmake @@ -1,17 +1,17 @@ # Copyright 2010-2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-howto-write-a-block-cmake/cmake/cmake_uninstall.cmake.in b/gr-howto-write-a-block/cmake/cmake_uninstall.cmake.in index 9ae1ae4bd..9ae1ae4bd 100644 --- a/gr-howto-write-a-block-cmake/cmake/cmake_uninstall.cmake.in +++ b/gr-howto-write-a-block/cmake/cmake_uninstall.cmake.in diff --git a/gr-howto-write-a-block/config.guess b/gr-howto-write-a-block/config.guess deleted file mode 100755 index d622a44e5..000000000 --- a/gr-howto-write-a-block/config.guess +++ /dev/null @@ -1,1530 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. - -timestamp='2012-02-10' - -# This file 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 2 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/>. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to <config-patches@gnu.org> and include a ChangeLog -# entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to <config-patches@gnu.org>." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include <stdio.h> /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include <sys/systemcfg.h> - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include <stdlib.h> - #include <unistd.h> - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include <unistd.h> - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` - case ${UNAME_PROCESSOR} in - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:MSYS*:*) - echo ${UNAME_MACHINE}-pc-msys - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - aarch64_be:Linux:*:*) - UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf - fi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` - echo ${UNAME_MACHINE}-pc-isc$UNAME_REL - elif /bin/uname -X 2>/dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says <Richard.M.Bartel@ccMail.Census.GOV> - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes <hewes@openmarket.com>. - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NEO-?:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; - x86_64:VMkernel:*:*) - echo ${UNAME_MACHINE}-unknown-esx - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c <<EOF -#ifdef _SEQUENT_ -# include <sys/types.h> -# include <sys/utsname.h> -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include <sys/param.h> - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include <sys/param.h> -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 <<EOF -$0: unable to guess system type - -This script, last modified $timestamp, has failed to recognize -the operating system you are using. It is advised that you -download the most up to date version of the config scripts from - - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD -and - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -If the version you run ($0) is already up to date, please -send the following data and any information you think might be -pertinent to <config-patches@gnu.org> in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/gr-howto-write-a-block/config.sub b/gr-howto-write-a-block/config.sub deleted file mode 100755 index c894da455..000000000 --- a/gr-howto-write-a-block/config.sub +++ /dev/null @@ -1,1773 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. - -timestamp='2012-02-10' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file 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 2 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/>. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to <config-patches@gnu.org>. Submit a context -# diff and a properly formatted GNU ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to <config-patches@gnu.org>." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | be32 | be64 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | epiphany \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 \ - | ns16k | ns32k \ - | open8 \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pyramid \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | we32k \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - strongarm | thumb | xscale) - basic_machine=arm-unknown - ;; - xgate) - basic_machine=$basic_machine-unknown - os=-none - ;; - xscaleeb) - basic_machine=armeb-unknown - ;; - - xscaleel) - basic_machine=armel-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pyramid-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze) - basic_machine=microblaze-xilinx - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i386-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc | ppcbe) basic_machine=powerpc-unknown - ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - strongarm-* | thumb-*) - basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tile*) - basic_machine=$basic_machine-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - xscale-* | xscalee[bl]-*) - basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -nacl*) - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - tic54x-*) - os=-coff - ;; - tic55x-*) - os=-coff - ;; - tic6x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/gr-howto-write-a-block/config/.gitignore b/gr-howto-write-a-block/config/.gitignore deleted file mode 100644 index 16f775e32..000000000 --- a/gr-howto-write-a-block/config/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -/*.cache -/*.la -/*.lo -/*.pc -/.deps -/.la -/.libs -/.lo -/Makefile -/Makefile.in -/libtool.m4 -/lt~obsolete.m4 -/ltsugar.m4 -/ltversion.m4 -/ltoptions.m4 diff --git a/gr-howto-write-a-block/config/Makefile.am b/gr-howto-write-a-block/config/Makefile.am deleted file mode 100644 index 7b7e5812e..000000000 --- a/gr-howto-write-a-block/config/Makefile.am +++ /dev/null @@ -1,80 +0,0 @@ -# -# Copyright 2001,2010 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 - -# Install m4 macros in this directory -m4datadir = $(datadir)/aclocal - -# List your m4 macros here -m4macros = \ - acx_pthread.m4 \ - ax_boost_base.m4 \ - ax_boost_date_time.m4 \ - ax_boost_filesystem.m4 \ - ax_boost_iostreams.m4 \ - ax_boost_program_options.m4 \ - ax_boost_python.m4 \ - ax_boost_regex.m4 \ - ax_boost_serialization.m4 \ - ax_boost_signals.m4 \ - ax_boost_system.m4 \ - ax_boost_test_exec_monitor.m4 \ - ax_boost_thread.m4 \ - ax_boost_unit_test_framework.m4 \ - ax_boost_wserialization.m4 \ - bnv_have_qt.m4 \ - cppunit.m4 \ - gr_check_createfilemapping.m4 \ - gr_check_mc4020.m4 \ - gr_check_shm_open.m4 \ - gr_doxygen.m4 \ - gr_fortran.m4 \ - gr_git.m4 \ - gr_gprof.m4 \ - gr_guile.m4 \ - gr_lib64.m4 \ - gr_libgnuradio_core_extra_ldflags.m4 \ - gr_no_undefined.m4 \ - gr_omnithread.m4 \ - gr_pwin32.m4 \ - gr_python.m4 \ - gr_require_mc4020.m4 \ - gr_scripting.m4 \ - gr_set_md_cpu.m4 \ - gr_standalone.m4 \ - gr_subversion.m4 \ - gr_swig.m4 \ - gr_sysv_shm.m4 \ - gr_version.m4 \ - lf_cc.m4 \ - lf_cxx.m4 \ - lf_warnings.m4 \ - lf_x11.m4 \ - mkstemp.m4 \ - onceonly.m4 \ - pkg.m4 - - -# Don't install m4 macros anymore -# m4data_DATA = $(m4macros) - -EXTRA_DIST = $(m4macros) diff --git a/gr-howto-write-a-block/config/acx_pthread.m4 b/gr-howto-write-a-block/config/acx_pthread.m4 deleted file mode 100644 index eb09f5acc..000000000 --- a/gr-howto-write-a-block/config/acx_pthread.m4 +++ /dev/null @@ -1,275 +0,0 @@ -# =========================================================================== -# http://autoconf-archive.cryp.to/acx_pthread.html -# =========================================================================== -# -# SYNOPSIS -# -# ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -# -# DESCRIPTION -# -# This macro figures out how to build C programs using POSIX threads. It -# sets the PTHREAD_LIBS output variable to the threads library and linker -# flags, and the PTHREAD_CFLAGS output variable to any special C compiler -# flags that are needed. (The user can also force certain compiler -# flags/libs to be tested by setting these environment variables.) -# -# Also sets PTHREAD_CC to any special C compiler that is needed for -# multi-threaded programs (defaults to the value of CC otherwise). (This -# is necessary on AIX to use the special cc_r compiler alias.) -# -# NOTE: You are assumed to not only compile your program with these flags, -# but also link it with them as well. e.g. you should link with -# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS -# -# If you are only building threads programs, you may wish to use these -# variables in your default LIBS, CFLAGS, and CC: -# -# LIBS="$PTHREAD_LIBS $LIBS" -# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -# CC="$PTHREAD_CC" -# -# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant -# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name -# (e.g. PTHREAD_CREATE_UNDETACHED on AIX). -# -# ACTION-IF-FOUND is a list of shell commands to run if a threads library -# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it -# is not found. If ACTION-IF-FOUND is not specified, the default action -# will define HAVE_PTHREAD. -# -# Please let the authors know if this macro fails on any platform, or if -# you have any other suggestions or comments. This macro was based on work -# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help -# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by -# Alejandro Forero Cuervo to the autoconf macro repository. We are also -# grateful for the helpful feedback of numerous users. -# -# LAST MODIFICATION -# -# 2008-04-12 -# -# COPYLEFT -# -# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu> -# -# 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/>. -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Macro Archive. When you make and -# distribute a modified version of the Autoconf Macro, you may extend this -# special exception to the GPL to apply to your modified version as well. - -AC_DEFUN([ACX_PTHREAD], [ -AC_REQUIRE([AC_CANONICAL_HOST]) -AC_LANG_SAVE -AC_LANG_C -acx_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) - AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) - AC_MSG_RESULT($acx_pthread_ok) - if test x"$acx_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. - -acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# ... -mt is also the pthreads flag for HP/aCC -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) - -case "${host_cpu}-${host_os}" in - *solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - - acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" - ;; -esac - -if test x"$acx_pthread_ok" = xno; then -for flag in $acx_pthread_flags; do - - case $flag in - none) - AC_MSG_CHECKING([whether pthreads work without any flags]) - ;; - - -*) - AC_MSG_CHECKING([whether pthreads work with $flag]) - PTHREAD_CFLAGS="$flag" - ;; - - pthread-config) - AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no) - if test x"$acx_pthread_config" = xno; then continue; fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - AC_MSG_CHECKING([for the pthreads library -l$flag]) - PTHREAD_LIBS="-l$flag" - ;; - esac - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - AC_TRY_LINK([#include <pthread.h>], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [acx_pthread_ok=yes]) - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - AC_MSG_RESULT($acx_pthread_ok) - if test "x$acx_pthread_ok" = xyes; then - break; - fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - -# Various other checks: -if test "x$acx_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - AC_MSG_CHECKING([for joinable pthread attribute]) - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;], - [attr_name=$attr; break]) - done - AC_MSG_RESULT($attr_name) - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, - [Define to necessary symbol if this constant - uses a non-standard name on your system.]) - fi - - AC_MSG_CHECKING([if more special flags are required for pthreads]) - flag=no - case "${host_cpu}-${host_os}" in - *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; - *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; - esac - AC_MSG_RESULT(${flag}) - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - # More AIX lossage: must compile with xlc_r or cc_r - if test x"$GCC" != xyes; then - AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC}) - else - PTHREAD_CC=$CC - fi -else - PTHREAD_CC="$CC" -fi - -AC_SUBST(PTHREAD_LIBS) -AC_SUBST(PTHREAD_CFLAGS) -AC_SUBST(PTHREAD_CC) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$acx_pthread_ok" = xyes; then - ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) - : -else - acx_pthread_ok=no - $2 -fi -AC_LANG_RESTORE -])dnl ACX_PTHREAD diff --git a/gr-howto-write-a-block/config/ax_boost_base.m4 b/gr-howto-write-a-block/config/ax_boost_base.m4 deleted file mode 100644 index e9790227e..000000000 --- a/gr-howto-write-a-block/config/ax_boost_base.m4 +++ /dev/null @@ -1,334 +0,0 @@ -# =========================================================================== -# http://autoconf-archive.cryp.to/ax_boost_base.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_BOOST_BASE([MINIMUM-VERSION]) -# -# DESCRIPTION -# -# Test for the Boost C++ libraries of a particular version (or newer) -# -# If no path to the installed boost library is given the macro searchs -# under /usr, /usr/local, /opt and /opt/local and evaluates the -# $BOOST_ROOT environment variable. Further documentation is available at -# <http://randspringer.de/boost/index.html>. -# -# This macro calls: -# -# AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS) -# -# And sets: -# -# HAVE_BOOST -# -# LAST MODIFICATION -# -# 2008-04-12 -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_BASE], -[ -AC_REQUIRE([GR_LIB64]) -AC_ARG_WITH([boost], - AS_HELP_STRING([--with-boost@<:@=DIR@:>@], - [use boost (default is yes) - it is possible to specify the root directory for boost (optional)]), - [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ac_boost_path="" - else - want_boost="yes" - ac_boost_path="$withval" - fi - ], - [want_boost="yes"]) - - -AC_ARG_WITH([boost-libdir], - AS_HELP_STRING([--with-boost-libdir=LIB_DIR], - [Force given directory for boost libraries. Note that this - will overwrite library path detection, so use this parameter - only if default library detection fails and you know exactly - where your boost libraries are located.]), - [ - if test -d $withval - then - ac_boost_lib_path="$withval" - else - AC_MSG_ERROR(--with-boost-libdir expected directory name) - fi - ], - [ac_boost_lib_path=""] -) - -if test "x$want_boost" = "xyes"; then - boost_lib_version_req=ifelse([$1], ,1.20.0,$1) - boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'` - boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'` - boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'` - boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` - if test "x$boost_lib_version_req_sub_minor" = "x" ; then - boost_lib_version_req_sub_minor="0" - fi - WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor` - AC_MSG_CHECKING(for boost >= $boost_lib_version_req) - succeeded=no - - dnl first we check the system location for boost libraries - dnl this location ist chosen if boost libraries are installed with the --layout=system option - dnl or if you install boost with RPM - if test "$ac_boost_path" != ""; then - dnl Look first where we think they ought to be, accounting for a possible "64" suffix on lib. - dnl If that directory doesn't exist, fall back to the default behavior - if test -d "$ac_boost_path/lib${gr_libdir_suffix}"; then - BOOST_LDFLAGS="-L$ac_boost_path/lib${gr_libdir_suffix}" - else - BOOST_LDFLAGS="-L$ac_boost_path/lib" - fi - BOOST_CPPFLAGS="-I$ac_boost_path/include" - else - for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do - if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then - dnl Look first where we think they ought to be, accounting for a possible "64" suffix on lib. - dnl If that directory doesn't exist, fall back to the default behavior - if test -d "$ac_boost_path_tmp/lib${gr_libdir_suffix}"; then - BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib${gr_libdir_suffix}" - else - BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib" - fi - BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include" - break; - fi - done - fi - - dnl overwrite ld flags if we have required special directory with - dnl --with-boost-libdir parameter - if test "$ac_boost_lib_path" != ""; then - BOOST_LDFLAGS="-L$ac_boost_lib_path" - fi - - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - @%:@include <boost/version.hpp> - ]], [[ - #if BOOST_VERSION >= $WANT_BOOST_VERSION - // Everything is okay - #else - # error Boost version is too old - #endif - ]])],[AC_MSG_RESULT(yes) - succeeded=yes - found_system=yes - ], - []) - AC_LANG_POP([C++]) - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - - - dnl if we found no boost with system layout we search for boost libraries - dnl built and installed without the --layout=system option - if test "$succeeded" != "yes"; then - _version=0 - - if test "$ac_boost_path" != ""; then - path_list="$ac_boost_path" - else - path_list="/usr /usr/local /opt /opt/local" - fi - for ac_boost_path in $path_list ; do - if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then - for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's,/include/boost-,,; s,_,.,'` - V_CHECK=`expr $_version_tmp \> $_version` - if test "$V_CHECK" = "1" ; then - _version=$_version_tmp - best_path=$ac_boost_path - fi - done - fi - done - - VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` - BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" - - if test "$ac_boost_lib_path" = ""; then - dnl Look first where we think they ought to be, accounting for a possible "64" suffix on lib. - dnl If that directory doesn't exist, fall back to the default behavior - if test -d "$best_path/lib${gr_libdir_suffix}"; then - BOOST_LDFLAGS="-L$best_path/lib${gr_libdir_suffix}" - else - BOOST_LDFLAGS="-L$best_path/lib" - fi - fi - - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - @%:@include <boost/version.hpp> - ]], [[ - #if BOOST_VERSION >= $WANT_BOOST_VERSION - // Everything is okay - #else - # error Boost version is too old - #endif - ]])],[AC_MSG_RESULT(yes) - succeeded=yes - found_system=yes - ], - []) - AC_LANG_POP([C++]) - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - fi - - if test "$succeeded" != "yes" ; then - AC_MSG_RESULT([no]) - if test "$_version" = "0" ; then - AC_MSG_ERROR([[we could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). -If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>.]]) - else - AC_MSG_ERROR([your boost libraries seem to old (version $_version).]) - fi - else - AC_SUBST(BOOST_CPPFLAGS) - AC_SUBST(BOOST_LDFLAGS) - AC_DEFINE(HAVE_BOOST,1,[Define if the Boost headers are available]) - fi -fi -]) - -dnl -dnl Macros used by the boost items that need libraries. -dnl - -dnl $1 is unit name. E.g., boost_thread -AC_DEFUN([_AX_BOOST_CHECK_LIB],[ - _AX_BOOST_CHECK_LIB_($1,HAVE_[]m4_toupper($1),m4_toupper($1)_LIB) -]) - -dnl $1 is unit name. E.g., boost_thread -dnl $2 is AC_DEFINE name. E.g., HAVE_BOOST_THREAD -dnl $3 is lib var name. E.g., BOOST_THREAD_LIB -AC_DEFUN([_AX_BOOST_CHECK_LIB_],[ - AC_LANG_PUSH([C++]) - AC_DEFINE($2,1,[Define if the $1 library is available]) - BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` - - dnl See if we can find a usable library - link_ok="no" - if test "$ax_boost_user_lib" != ""; then - dnl use what the user supplied - for ax_lib in $ax_boost_user_lib $1-${ax_boost_user_lib}; do - AC_CHECK_LIB($ax_lib, exit, - [$3="-l$ax_lib"; AC_SUBST($3) link_ok="yes"; break]) - done - else - dnl Look in BOOSTLIBDIR for possible candidates - head=$BOOSTLIBDIR/lib[]$1 - for f in ${head}*.so* ${head}*.a* ${head}*.dll* ${head}*.dylib; do - dnl echo 1: $f - case $f in - *\**) continue;; - esac - f=`echo $f | sed -e 's,.*/,,' -e 's,^lib,,'` - dnl echo 2: $f - f=`echo $f | sed -e 's,\($1.*\)\.so.*$,\1,' -e 's,\($1.*\)\.a.*$,\1,' -e 's,\($1.*\)\.dll.*$,\1,' -e 's,\($1.*\)\.dylib.*$,\1,'` - dnl echo 3: $f - - ax_lib=$f - AC_CHECK_LIB($ax_lib, exit, - [$3="-l$ax_lib"; AC_SUBST($3) link_ok="yes"; break]) - done - fi - - if test "$link_ok" != "yes"; then - AC_MSG_ERROR([Could not link against lib[$1]!]) - fi - AC_LANG_POP([C++]) -]) - - -dnl $1 is unit name. E.g., boost_thread -AC_DEFUN([_AX_BOOST_WITH],[ - _AX_BOOST_WITH_($1,m4_bpatsubst($1,_,-)) -]) - -dnl $1 is unit name. E.g., boost_thread -dnl $2 is hyphenated unit name. E.g., boost-thread -AC_DEFUN([_AX_BOOST_WITH_],[ - AC_ARG_WITH([$2], - AC_HELP_STRING([--with-$2@<:@=special-lib@:>@], - [Use the m4_substr($1,6) library from boost. It is possible to specify a certain - library to the linker. E.g., --with-$2=$1-gcc41-mt-1_35]), - [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ax_boost_user_lib="" - else - want_boost="yes" - ax_boost_user_lib="$withval" - fi - ], - [want_boost="yes"]) -]) - -dnl $1 is unit name. E.g., boost_thread -dnl $2 is AC_LANG_PROGRAM argument 1 -dnl $3 is AC_LANG_PROGRAM argument 2 -dnl $4 is cv variable name. E.g., ax_cv_boost_thread -AC_DEFUN([_AX_BOOST_CHECK_],[ - _AX_BOOST_WITH($1) - if test "$want_boost" = "yes"; then - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_PROG_CXX]) - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - AC_CACHE_CHECK([whether the boost::m4_substr([$1],6) includes are available], [$4], - [AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE(AC_LANG_PROGRAM([$2],[$3]),[$4]=yes,[$4]=no) - AC_LANG_POP([C++]) - ]) - if test "$[$4]" = "yes"; then - _AX_BOOST_CHECK_LIB([$1]) - fi - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - fi -]) - -dnl $1 is unit name. E.g., boost_thread -dnl $2 is AC_LANG_PROGRAM argument 1 -dnl $3 is AC_LANG_PROGRAM argument 2 -AC_DEFUN([_AX_BOOST_CHECK],[ - _AX_BOOST_CHECK_($1,$2,$3,ax_cv_$1) -]) diff --git a/gr-howto-write-a-block/config/ax_boost_date_time.m4 b/gr-howto-write-a-block/config/ax_boost_date_time.m4 deleted file mode 100644 index 7b3f0fe3d..000000000 --- a/gr-howto-write-a-block/config/ax_boost_date_time.m4 +++ /dev/null @@ -1,34 +0,0 @@ -# -# SYNOPSIS -# -# AX_BOOST_DATE_TIME -# -# DESCRIPTION -# -# Test for date_time library from the Boost C++ libraries. -# -# This macro calls: -# -# AC_SUBST(BOOST_DATE_TIME_LIB) -# -# And sets: -# -# HAVE_BOOST_DATE_TIME -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Michael Tindal -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_DATE_TIME], -[ - AC_REQUIRE([AX_BOOST_BASE]) - _AX_BOOST_CHECK([boost_date_time], - [@%:@include <boost/date_time/gregorian/gregorian_types.hpp>], - [using namespace boost::gregorian; date d(2002,Jan,10); return 0;]) -]) diff --git a/gr-howto-write-a-block/config/ax_boost_filesystem.m4 b/gr-howto-write-a-block/config/ax_boost_filesystem.m4 deleted file mode 100644 index bcb3fa44f..000000000 --- a/gr-howto-write-a-block/config/ax_boost_filesystem.m4 +++ /dev/null @@ -1,45 +0,0 @@ -# -# SYNOPSIS -# -# AX_BOOST_FILESYSTEM -# -# DESCRIPTION -# -# Test for Filesystem library from the Boost C++ libraries. The macro -# requires a preceding call to AX_BOOST_BASE. -# -# This macro calls: -# -# AC_SUBST(BOOST_FILESYSTEM_LIB) -# -# And sets: -# -# HAVE_BOOST_FILESYSTEM -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Michael Tindal -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_FILESYSTEM], -[ - AC_REQUIRE([AX_BOOST_BASE]) - - dnl depends on boost_system - AC_REQUIRE([AX_BOOST_SYSTEM]) - axbf_LDFLAGS_SAVED=$LDFLAGS - LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LIB" - - _AX_BOOST_CHECK([boost_filesystem], - [@%:@include <boost/filesystem/path.hpp>], - [using namespace boost::filesystem; - path my_path( "foo/bar/data.txt" ); - return 0;]) - - LDFLAGS=$axbf_LDFLAGS_SAVED -]) diff --git a/gr-howto-write-a-block/config/ax_boost_iostreams.m4 b/gr-howto-write-a-block/config/ax_boost_iostreams.m4 deleted file mode 100644 index 181b1e752..000000000 --- a/gr-howto-write-a-block/config/ax_boost_iostreams.m4 +++ /dev/null @@ -1,39 +0,0 @@ -# -# SYNOPSIS -# -# AX_BOOST_IOSTREAMS -# -# DESCRIPTION -# -# Test for IOStreams library from the Boost C++ libraries. The macro -# requires a preceding call to AX_BOOST_BASE. -# -# This macro calls: -# -# AC_SUBST(BOOST_IOSTREAMS_LIB) -# -# And sets: -# -# HAVE_BOOST_IOSTREAMS -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_IOSTREAMS], -[ - AC_REQUIRE([AX_BOOST_BASE]) - _AX_BOOST_CHECK([boost_iostreams], - [@%:@include <boost/iostreams/filtering_stream.hpp> - @%:@include <boost/range/iterator_range.hpp>], - [std::string input = "Hello World!"; - namespace io = boost::iostreams; - io::filtering_istream in(boost::make_iterator_range(input)); - return 0;]) - -]) diff --git a/gr-howto-write-a-block/config/ax_boost_program_options.m4 b/gr-howto-write-a-block/config/ax_boost_program_options.m4 deleted file mode 100644 index 3829373be..000000000 --- a/gr-howto-write-a-block/config/ax_boost_program_options.m4 +++ /dev/null @@ -1,35 +0,0 @@ -# -# SYNOPSIS -# -# AX_BOOST_PROGRAM_OPTIONS -# -# DESCRIPTION -# -# Test for program options library from the Boost C++ libraries. The macro -# requires a preceding call to AX_BOOST_BASE. -# -# This macro calls: -# -# AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) -# -# And sets: -# -# HAVE_BOOST_PROGRAM_OPTIONS -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS], -[ - AC_REQUIRE([AX_BOOST_BASE]) - _AX_BOOST_CHECK([boost_program_options], - [@%:@include <boost/program_options.hpp>], - [boost::program_options::options_description generic("Generic options"); - return 0;]) -]) diff --git a/gr-howto-write-a-block/config/ax_boost_python.m4 b/gr-howto-write-a-block/config/ax_boost_python.m4 deleted file mode 100644 index 3c6c666f7..000000000 --- a/gr-howto-write-a-block/config/ax_boost_python.m4 +++ /dev/null @@ -1,92 +0,0 @@ -# =========================================================================== -# http://autoconf-archive.cryp.to/ax_boost_python.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_BOOST_PYTHON -# -# DESCRIPTION -# -# This macro checks to see if the Boost.Python library is installed. It -# also attempts to guess the currect library name using several attempts. -# It tries to build the library name using a user supplied name or suffix -# and then just the raw library. -# -# If the library is found, HAVE_BOOST_PYTHON is defined and -# BOOST_PYTHON_LIB is set to the name of the library. -# -# This macro calls AC_SUBST(BOOST_PYTHON_LIB). -# -# In order to ensure that the Python headers are specified on the include -# path, this macro requires AX_PYTHON to be called. -# -# LAST MODIFICATION -# -# 2008-04-12 -# -# COPYLEFT -# -# Copyright (c) 2008 Michael Tindal -# -# 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 2 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/>. -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Macro Archive. When you make and -# distribute a modified version of the Autoconf Macro, you may extend this -# special exception to the GPL to apply to your modified version as well. - -AC_DEFUN([AX_BOOST_PYTHON], -[AC_REQUIRE([AX_PYTHON])dnl -AC_CACHE_CHECK(whether the Boost::Python library is available, -ac_cv_boost_python, -[AC_LANG_SAVE - AC_LANG_CPLUSPLUS - CPPFLAGS_SAVE=$CPPFLAGS - if test x$PYTHON_INCLUDE_DIR != x; then - CPPFLAGS=-I$PYTHON_INCLUDE_DIR $CPPFLAGS - fi - AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[ - #include <boost/python/module.hpp> - using namespace boost::python; - BOOST_PYTHON_MODULE(test) { throw "Boost::Python test."; }]], - [[return 0;]]), - ac_cv_boost_python=yes, ac_cv_boost_python=no) - AC_LANG_RESTORE - CPPFLAGS=$CPPFLAGS_SAVE -]) -if test "$ac_cv_boost_python" = "yes"; then - AC_LANG_PUSH([C++]) - AC_DEFINE(HAVE_BOOST_PYTHON,,[define if the Boost::Python library is available]) - ax_python_lib=boost_python - AC_ARG_WITH([boost-python],AS_HELP_STRING([--with-boost-python],[specify the boost python library or suffix to use]), - [if test "x$with_boost_python" != "xno"; then - ax_python_lib=$with_boost_python - ax_boost_python_lib=boost_python-$with_boost_python - fi]) - for ax_lib in $ax_python_lib $ax_boost_python_lib boost_python; do - AC_CHECK_LIB($ax_lib, exit, [BOOST_PYTHON_LIB=$ax_lib break]) - done - AC_SUBST(BOOST_PYTHON_LIB) - AC_LANG_POP([C++]) -fi -])dnl diff --git a/gr-howto-write-a-block/config/ax_boost_regex.m4 b/gr-howto-write-a-block/config/ax_boost_regex.m4 deleted file mode 100644 index 32b531369..000000000 --- a/gr-howto-write-a-block/config/ax_boost_regex.m4 +++ /dev/null @@ -1,35 +0,0 @@ -# -# SYNOPSIS -# -# AX_BOOST_REGEX -# -# DESCRIPTION -# -# Test for Regex library from the Boost C++ libraries. The macro requires -# a preceding call to AX_BOOST_BASE. -# -# This macro calls: -# -# AC_SUBST(BOOST_REGEX_LIB) -# -# And sets: -# -# HAVE_BOOST_REGEX -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Michael Tindal -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_REGEX], -[ - AC_REQUIRE([AX_BOOST_BASE]) - _AX_BOOST_CHECK([boost_regex], - [@%:@include <boost/regex.hpp>], - [boost::regex r(); return 0;]) -]) diff --git a/gr-howto-write-a-block/config/ax_boost_serialization.m4 b/gr-howto-write-a-block/config/ax_boost_serialization.m4 deleted file mode 100644 index 78c950078..000000000 --- a/gr-howto-write-a-block/config/ax_boost_serialization.m4 +++ /dev/null @@ -1,38 +0,0 @@ -# -# SYNOPSIS -# -# AX_BOOST_SERIALIZATION -# -# DESCRIPTION -# -# Test for Serialization library from the Boost C++ libraries. The macro -# requires a preceding call to AX_BOOST_BASE. -# -# This macro calls: -# -# AC_SUBST(BOOST_SERIALIZATION_LIB) -# -# And sets: -# -# HAVE_BOOST_SERIALIZATION -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_SERIALIZATION], -[ - AC_REQUIRE([AX_BOOST_BASE]) - _AX_BOOST_CHECK([boost_serialization], - [@%:@include <fstream> - @%:@include <boost/archive/text_oarchive.hpp> - @%:@include <boost/archive/text_iarchive.hpp>], - [std::ofstream ofs("filename"); - boost::archive::text_oarchive oa(ofs); - return 0;]) -]) diff --git a/gr-howto-write-a-block/config/ax_boost_signals.m4 b/gr-howto-write-a-block/config/ax_boost_signals.m4 deleted file mode 100644 index 3c4971748..000000000 --- a/gr-howto-write-a-block/config/ax_boost_signals.m4 +++ /dev/null @@ -1,35 +0,0 @@ -# -# SYNOPSIS -# -# AX_BOOST_SIGNALS -# -# DESCRIPTION -# -# Test for Signals library from the Boost C++ libraries. The macro -# requires a preceding call to AX_BOOST_BASE. -# -# This macro calls: -# -# AC_SUBST(BOOST_SIGNALS_LIB) -# -# And sets: -# -# HAVE_BOOST_SIGNALS -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Michael Tindal -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_SIGNALS], -[ - AC_REQUIRE([AX_BOOST_BASE]) - _AX_BOOST_CHECK([boost_signals], - [@%:@include <boost/signal.hpp>], - [boost::signal<void ()> sig; return 0;]) -]) diff --git a/gr-howto-write-a-block/config/ax_boost_system.m4 b/gr-howto-write-a-block/config/ax_boost_system.m4 deleted file mode 100644 index cb73f2577..000000000 --- a/gr-howto-write-a-block/config/ax_boost_system.m4 +++ /dev/null @@ -1,40 +0,0 @@ -# =========================================================================== -# started with this: http://autoconf-archive.cryp.to/ax_boost_system.html, -# virtually nothing left -# =========================================================================== -# -# SYNOPSIS -# -# AX_BOOST_SYSTEM -# -# DESCRIPTION -# -# Test for System library from the Boost C++ libraries. The macro requires -# a preceding call to AX_BOOST_BASE. -# -# This macro calls: -# -# AC_SUBST(BOOST_SYSTEM_LIB) -# -# And sets: -# -# HAVE_BOOST_SYSTEM -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Michael Tindal -# Copyright (c) 2008 Daniel Casimiro <dan.casimiro@gmail.com> -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_SYSTEM], -[ - AC_REQUIRE([AX_BOOST_BASE]) - _AX_BOOST_CHECK([boost_system], - [@%:@include <boost/system/error_code.hpp>], - [boost::system::system_category]) -]) diff --git a/gr-howto-write-a-block/config/ax_boost_test_exec_monitor.m4 b/gr-howto-write-a-block/config/ax_boost_test_exec_monitor.m4 deleted file mode 100644 index 2c30c0b4a..000000000 --- a/gr-howto-write-a-block/config/ax_boost_test_exec_monitor.m4 +++ /dev/null @@ -1,35 +0,0 @@ -# -# SYNOPSIS -# -# AX_BOOST_TEST_EXEC_MONITOR -# -# DESCRIPTION -# -# Test for Test_Exec_Monitor library from the Boost C++ libraries. The -# macro requires a preceding call to AX_BOOST_BASE. -# -# This macro calls: -# -# AC_SUBST(BOOST_TEST_EXEC_MONITOR_LIB) -# -# And sets: -# -# HAVE_BOOST_TEST_EXEC_MONITOR -# -# COPYLEFT -# -# Copyright (c) 2008 Dodji Seketeli <dodji@seketeli.org> -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_TEST_EXEC_MONITOR], -[ - AC_REQUIRE([AX_BOOST_BASE]) - _AX_BOOST_CHECK([boost_test_exec_monitor], - [@%:@include <boost/test/test_tools.hpp>], - [int i=1 ; BOOST_REQUIRE(i==1); ; return 0;]) -]) diff --git a/gr-howto-write-a-block/config/ax_boost_thread.m4 b/gr-howto-write-a-block/config/ax_boost_thread.m4 deleted file mode 100644 index 4df23224a..000000000 --- a/gr-howto-write-a-block/config/ax_boost_thread.m4 +++ /dev/null @@ -1,72 +0,0 @@ -# -# SYNOPSIS -# -# AX_BOOST_THREAD -# -# DESCRIPTION -# -# Test for Thread library from the Boost C++ libraries. -# -# This macro calls: -# -# AC_SUBST(BOOST_THREAD_LIB) -# AC_SUBST(BOOST_CXXFLAGS) -# -# And sets: -# -# HAVE_BOOST_THREAD -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Michael Tindal -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - - -AC_DEFUN([AX_BOOST_THREAD], -[ - AC_REQUIRE([AX_BOOST_BASE]) - AC_REQUIRE([ACX_PTHREAD]) - _AX_BOOST_WITH([boost_thread]) - - if test "$want_boost" = "yes"; then - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_PROG_CXX]) - AC_REQUIRE([AC_CANONICAL_HOST]) - - CPPFLAGS_SAVED="$CPPFLAGS" - LDFLAGS_SAVED="$LDFLAGS" - CXXFLAGS_SAVED="$CXXFLAGS" - - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS $PTHREAD_LIBS" - CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" - - AC_CACHE_CHECK(whether the boost::thread includes are available, - ax_cv_boost_thread, - [AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[@%:@include <boost/thread/thread.hpp>]], - [[boost::thread_group thrds; - return 0;]]), - ax_cv_boost_thread=yes, ax_cv_boost_thread=no) - AC_LANG_POP([C++]) - ]) - - if test "$ax_cv_boost_thread" = "yes"; then - BOOST_CXXFLAGS="$PTHREAD_CFLAGS" - AC_SUBST(BOOST_CXXFLAGS) - _AX_BOOST_CHECK_LIB([boost_thread]) - if test "$link_ok" = "yes" && test -n "$PTHREAD_LIBS"; then - BOOST_THREAD_LIB="$BOOST_THREAD_LIB $PTHREAD_LIBS" - fi - fi - - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - CXXFLAGS="$CXXFLAGS_SAVED" - fi -]) diff --git a/gr-howto-write-a-block/config/ax_boost_unit_test_framework.m4 b/gr-howto-write-a-block/config/ax_boost_unit_test_framework.m4 deleted file mode 100644 index 73affccfd..000000000 --- a/gr-howto-write-a-block/config/ax_boost_unit_test_framework.m4 +++ /dev/null @@ -1,36 +0,0 @@ -# -# SYNOPSIS -# -# AX_BOOST_UNIT_TEST_FRAMEWORK -# -# DESCRIPTION -# -# Test for Unit_Test_Framework library from the Boost C++ libraries. The -# macro requires a preceding call to AX_BOOST_BASE. -# -# This macro calls: -# -# AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB) -# -# And sets: -# -# HAVE_BOOST_UNIT_TEST_FRAMEWORK -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_UNIT_TEST_FRAMEWORK], -[ - AC_REQUIRE([AX_BOOST_BASE]) - _AX_BOOST_CHECK([boost_unit_test_framework], - [@%:@include <boost/test/unit_test.hpp>], - [using boost::unit_test::test_suite; - test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" ); - return 0;]) -]) diff --git a/gr-howto-write-a-block/config/ax_boost_wserialization.m4 b/gr-howto-write-a-block/config/ax_boost_wserialization.m4 deleted file mode 100644 index f384988cb..000000000 --- a/gr-howto-write-a-block/config/ax_boost_wserialization.m4 +++ /dev/null @@ -1,46 +0,0 @@ -# -# SYNOPSIS -# -# AX_BOOST_WSERIALIZATION -# -# DESCRIPTION -# -# Test for WSerialization library from the Boost C++ libraries. The macro -# requires a preceding call to AX_BOOST_BASE. -# -# This macro calls: -# -# AC_SUBST(BOOST_WSERIALIZATION_LIB) -# -# And sets: -# -# HAVE_BOOST_WSERIALIZATION -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_WSERIALIZATION], -[ - AC_REQUIRE([AX_BOOST_BASE]) - - dnl depends on BOOST_SERIALIZATION - AC_REQUIRE([AX_BOOST_SERIALIZATION]) - axbws_LDFLAGS_SAVED=$LDFLAGS - LDFLAGS="$LDFLAGS $BOOST_SERIALIZATION_LIB" - - _AX_BOOST_CHECK([boost_wserialization], - [@%:@include <fstream> - @%:@include <boost/archive/text_oarchive.hpp> - @%:@include <boost/archive/text_iarchive.hpp>], - [std::ofstream ofs("filename"); - boost::archive::text_oarchive oa(ofs); - return 0;]) - - LDFLAGS=$axbf_LDFLAGS_SAVED -]) diff --git a/gr-howto-write-a-block/config/bnv_have_qt.m4 b/gr-howto-write-a-block/config/bnv_have_qt.m4 deleted file mode 100644 index 1469bfbfd..000000000 --- a/gr-howto-write-a-block/config/bnv_have_qt.m4 +++ /dev/null @@ -1,404 +0,0 @@ -dnl Available from the GNU Autoconf Macro Archive at: -dnl http://www.gnu.org/software/ac-archive/htmldoc/bnv_have_qt.html -dnl -AC_DEFUN([BNV_HAVE_QT], -[ - dnl THANKS! This code includes bug fixes by: - dnl Tim McClarren. - - AC_REQUIRE([AC_PROG_CXX]) - AC_REQUIRE([AC_PATH_X]) - AC_REQUIRE([AC_PATH_XTRA]) - - AC_MSG_CHECKING(for Qt) - - AC_ARG_WITH([Qt-dir], - [ --with-Qt-dir=DIR DIR is equal to \$QTDIR if you have followed the - installation instructions of Trolltech. Header - files are in DIR/include, binary utilities are - in DIR/bin and the library is in DIR/lib]) - AC_ARG_WITH([Qt-include-dir], - [ --with-Qt-include-dir=DIR - Qt header files are in DIR]) - AC_ARG_WITH([Qt-bin-dir], - [ --with-Qt-bin-dir=DIR Qt utilities such as moc and uic are in DIR]) - AC_ARG_WITH([Qt-lib-dir], - [ --with-Qt-lib-dir=DIR The Qt library is in DIR]) - AC_ARG_WITH([Qt-lib], - [ --with-Qt-lib=LIB Use -lLIB to link with the Qt library]) - if test x"$with_Qt_dir" = x"no" || - test x"$with_Qt_include-dir" = x"no" || - test x"$with_Qt_bin_dir" = x"no" || - test x"$with_Qt_lib_dir" = x"no" || - test x"$with_Qt_lib" = x"no"; then - # user disabled Qt. Leave cache alone. - have_qt="User disabled Qt." - else - # "yes" is a bogus option - if test x"$with_Qt_dir" = xyes; then - with_Qt_dir= - fi - if test x"$with_Qt_include_dir" = xyes; then - with_Qt_include_dir= - fi - if test x"$with_Qt_bin_dir" = xyes; then - with_Qt_bin_dir= - fi - if test x"$with_Qt_lib_dir" = xyes; then - with_Qt_lib_dir= - fi - if test x"$with_Qt_lib" = xyes; then - with_Qt_lib= - fi - # No Qt unless we discover otherwise - have_qt=no - # Check whether we are requested to link with a specific version - if test x"$with_Qt_lib" != x; then - bnv_qt_lib="$with_Qt_lib" - fi - # Check whether we were supplied with an answer already - if test x"$with_Qt_dir" != x; then - have_qt=yes - bnv_qt_dir="$with_Qt_dir" - bnv_qt_include_dir="$with_Qt_dir/include" - bnv_qt_bin_dir="$with_Qt_dir/bin" - bnv_qt_lib_dir="$with_Qt_dir/lib" - # Only search for the lib if the user did not define one already - if test x"$bnv_qt_lib" = x; then - bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p | - sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`" - fi - bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" - else - # Use cached value or do search, starting with suggestions from - # the command line - AC_CACHE_VAL(bnv_cv_have_qt, - [ - # We are not given a solution and there is no cached value. - bnv_qt_dir=NO - bnv_qt_include_dir=NO - bnv_qt_lib_dir=NO - if test x"$bnv_qt_lib" = x; then - bnv_qt_lib=NO - fi - BNV_PATH_QT_DIRECT - if test "$bnv_qt_dir" = NO || - test "$bnv_qt_include_dir" = NO || - test "$bnv_qt_lib_dir" = NO || - test "$bnv_qt_lib" = NO; then - # Problem with finding complete Qt. Cache the known absence of Qt. - bnv_cv_have_qt="have_qt=no" - else - # Record where we found Qt for the cache. - bnv_cv_have_qt="have_qt=yes \ - bnv_qt_dir=$bnv_qt_dir \ - bnv_qt_include_dir=$bnv_qt_include_dir \ - bnv_qt_bin_dir=$bnv_qt_bin_dir \ - bnv_qt_LIBS=\"$bnv_qt_LIBS\"" - fi - ])dnl - eval "$bnv_cv_have_qt" - fi # all $bnv_qt_* are set - fi # $have_qt reflects the system status - if test x"$have_qt" = xyes; then - QT_CXXFLAGS="-I$bnv_qt_include_dir" - QT_DIR="$bnv_qt_dir" - QT_LIBS="$bnv_qt_LIBS" - # If bnv_qt_dir is defined, utilities are expected to be in the - # bin subdirectory - if test x"$bnv_qt_dir" != x; then - if test -x "$bnv_qt_dir/bin/uic"; then - QT_UIC="$bnv_qt_dir/bin/uic" - else - # Old versions of Qt don't have uic - QT_UIC= - fi - QT_MOC="$bnv_qt_dir/bin/moc" - else - # Or maybe we are told where to look for the utilities - if test x"$bnv_qt_bin_dir" != x; then - if test -x "$bnv_qt_bin_dir/uic"; then - QT_UIC="$bnv_qt_bin_dir/uic" - else - # Old versions of Qt don't have uic - QT_UIC= - fi - QT_MOC="$bnv_qt_bin_dir/moc" - else - # Last possibility is that they are in $PATH - QT_UIC="`which uic`" - QT_MOC="`which moc`" - fi - fi - # All variables are defined, report the result - AC_MSG_RESULT([$have_qt: - QT_CXXFLAGS=$QT_CXXFLAGS - QT_DIR=$QT_DIR - QT_LIBS=$QT_LIBS - QT_UIC=$QT_UIC - QT_MOC=$QT_MOC]) - else - # Qt was not found - QT_CXXFLAGS= - QT_DIR= - QT_LIBS= - QT_UIC= - QT_MOC= - AC_MSG_RESULT($have_qt) - fi - AC_SUBST(QT_CXXFLAGS) - AC_SUBST(QT_DIR) - AC_SUBST(QT_LIBS) - AC_SUBST(QT_UIC) - AC_SUBST(QT_MOC) - - #### Being paranoid: - if test x"$have_qt" = xyes; then - AC_MSG_CHECKING(correct functioning of Qt installation) - AC_CACHE_VAL(bnv_cv_qt_test_result, - [ - cat > bnv_qt_test.h << EOF -#include <qobject.h> -class Test : public QObject -{ -Q_OBJECT -public: - Test() {} - ~Test() {} -public slots: - void receive() {} -signals: - void send(); -}; -EOF - - cat > bnv_qt_main.$ac_ext << EOF -#include "bnv_qt_test.h" -#include <qapplication.h> -int main( int argc, char **argv ) -{ - QApplication app( argc, argv ); - Test t; - QObject::connect( &t, SIGNAL(send()), &t, SLOT(receive()) ); -} -EOF - - bnv_cv_qt_test_result="failure" - bnv_try_1="$QT_MOC bnv_qt_test.h -o moc_bnv_qt_test.$ac_ext >/dev/null 2>bnv_qt_test_1.out" - AC_TRY_EVAL(bnv_try_1) - bnv_err_1=`grep -v '^ *+' bnv_qt_test_1.out | grep -v "^bnv_qt_test.h\$"` - if test x"$bnv_err_1" != x; then - echo "$bnv_err_1" >&AC_FD_CC - echo "configure: could not run $QT_MOC on:" >&AC_FD_CC - cat bnv_qt_test.h >&AC_FD_CC - else - bnv_try_2="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o moc_bnv_qt_test.o moc_bnv_qt_test.$ac_ext >/dev/null 2>bnv_qt_test_2.out" - AC_TRY_EVAL(bnv_try_2) - bnv_err_2=`grep -v '^ *+' bnv_qt_test_2.out | grep -v "^bnv_qt_test.{$ac_ext}\$"` - if test x"$bnv_err_2" != x; then - echo "$bnv_err_2" >&AC_FD_CC - echo "configure: could not compile:" >&AC_FD_CC - cat bnv_qt_test.$ac_ext >&AC_FD_CC - else - bnv_try_3="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o bnv_qt_main.o bnv_qt_main.$ac_ext >/dev/null 2>bnv_qt_test_3.out" - AC_TRY_EVAL(bnv_try_3) - bnv_err_3=`grep -v '^ *+' bnv_qt_test_3.out | grep -v "^bnv_qt_main.{$ac_ext}\$"` - if test x"$bnv_err_3" != x; then - echo "$bnv_err_3" >&AC_FD_CC - echo "configure: could not compile:" >&AC_FD_CC - cat bnv_qt_main.$ac_ext >&AC_FD_CC - else - bnv_try_4="$CXX $QT_LIBS $LIBS -o bnv_qt_main bnv_qt_main.o moc_bnv_qt_test.o >/dev/null 2>bnv_qt_test_4.out" - AC_TRY_EVAL(bnv_try_4) - bnv_err_4=`grep -v '^ *+' bnv_qt_test_4.out` - if test x"$bnv_err_4" != x; then - echo "$bnv_err_4" >&AC_FD_CC - else - bnv_cv_qt_test_result="success" - fi - fi - fi - fi - ])dnl AC_CACHE_VAL bnv_cv_qt_test_result - AC_MSG_RESULT([$bnv_cv_qt_test_result]); - if test x"$bnv_cv_qt_test_result" = "xfailure"; then - # working Qt was not found - QT_CXXFLAGS= - QT_DIR= - QT_LIBS= - QT_UIC= - QT_MOC= - have_qt=no - AC_MSG_WARN([Failed to find matching components of a complete - Qt installation. Try using more options, - see ./configure --help.]) - fi - - rm -f bnv_qt_test.h moc_bnv_qt_test.$ac_ext moc_bnv_qt_test.o \ - bnv_qt_main.$ac_ext bnv_qt_main.o bnv_qt_main \ - bnv_qt_test_1.out bnv_qt_test_2.out bnv_qt_test_3.out bnv_qt_test_4.out - fi -]) - -dnl Internal subroutine of BNV_HAVE_QT -dnl Set bnv_qt_dir bnv_qt_include_dir bnv_qt_bin_dir bnv_qt_lib_dir bnv_qt_lib -dnl Copyright 2001 Bastiaan N. Veelo <Bastiaan.N.Veelo@immtek.ntnu.no> -AC_DEFUN([BNV_PATH_QT_DIRECT], -[ - ## Binary utilities ## - if test x"$with_Qt_bin_dir" != x; then - bnv_qt_bin_dir=$with_Qt_bin_dir - fi - ## Look for header files ## - if test x"$with_Qt_include_dir" != x; then - bnv_qt_include_dir="$with_Qt_include_dir" - else - # The following header file is expected to define QT_VERSION. - qt_direct_test_header=qglobal.h - # Look for the header file in a standard set of common directories. - bnv_include_path_list=" - /usr/include - `ls -dr /usr/include/qt* 2>/dev/null` - `ls -dr /usr/lib/qt*/include 2>/dev/null` - `ls -dr /usr/local/qt*/include 2>/dev/null` - `ls -dr /opt/qt*/include 2>/dev/null` - " - for bnv_dir in $bnv_include_path_list; do - if test -r "$bnv_dir/$qt_direct_test_header"; then - bnv_dirs="$bnv_dirs $bnv_dir" - fi - done - # Now look for the newest in this list - bnv_prev_ver=0 - for bnv_dir in $bnv_dirs; do - bnv_this_ver=`egrep -w '#define QT_VERSION' $bnv_dir/$qt_direct_test_header | sed s/'#define QT_VERSION'//` - if expr $bnv_this_ver '>' $bnv_prev_ver > /dev/null; then - bnv_qt_include_dir=$bnv_dir - bnv_prev_ver=$bnv_this_ver - fi - done - fi dnl Found header files. - - # Are these headers located in a traditional Trolltech installation? - # That would be $bnv_qt_include_dir stripped from its last element: - bnv_possible_qt_dir=`dirname $bnv_qt_include_dir` - if test -x $bnv_possible_qt_dir/bin/moc && - ls $bnv_possible_qt_dir/lib/libqt* > /dev/null; then - # Then the rest is a piece of cake - bnv_qt_dir=$bnv_possible_qt_dir - bnv_qt_bin_dir="$bnv_qt_dir/bin" - bnv_qt_lib_dir="$bnv_qt_dir/lib" - # Only look for lib if the user did not supply it already - if test x"$bnv_qt_lib" = xNO; then - bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p | - sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`" - fi - bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" - else - # There is no valid definition for $QTDIR as Trolltech likes to see it - bnv_qt_dir= - ## Look for Qt library ## - if test x"$with_Qt_lib_dir" != x; then - bnv_qt_lib_dir="$with_Qt_lib_dir" - # Only look for lib if the user did not supply it already - if test x"$bnv_qt_lib" = xNO; then - bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p | - sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`" - fi - bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" - else - # Normally, when there is no traditional Trolltech installation, - # the library is installed in a place where the linker finds it - # automatically. - # If the user did not define the library name, try with qt - if test x"$bnv_qt_lib" = xNO; then - bnv_qt_lib=qt - fi - qt_direct_test_header=qapplication.h - qt_direct_test_main=" - int argc; - char ** argv; - QApplication app(argc,argv); - " - # See if we find the library without any special options. - # Don't add top $LIBS permanently yet - bnv_save_LIBS="$LIBS" - LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" - bnv_qt_LIBS="$LIBS" - bnv_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="-I$bnv_qt_include_dir" - AC_TRY_LINK([#include <$qt_direct_test_header>], - $qt_direct_test_main, - [ - # Success. - # We can link with no special library directory. - bnv_qt_lib_dir= - ], [ - # That did not work. Try the multi-threaded version - echo "Non-critical error, please neglect the above." >&AC_FD_CC - bnv_qt_lib=qt-mt - LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" - AC_TRY_LINK([#include <$qt_direct_test_header>], - $qt_direct_test_main, - [ - # Success. - # We can link with no special library directory. - bnv_qt_lib_dir= - ], [ - # That did not work. Try the OpenGL version - echo "Non-critical error, please neglect the above." >&AC_FD_CC - bnv_qt_lib=qt-gl - LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" - AC_TRY_LINK([#include <$qt_direct_test_header>], - $qt_direct_test_main, - [ - # Succes. - # We can link with no special library directory. - bnv_qt_lib_dir= - ], [ - # That did not work. Maybe a library version I don't know about? - echo "Non-critical error, please neglect the above." >&AC_FD_CC - # Look for some Qt lib in a standard set of common directories. - bnv_dir_list=" - `echo $bnv_qt_includes | sed ss/includess` - /lib - /usr/lib - /usr/local/lib - /opt/lib - `ls -dr /usr/lib/qt* 2>/dev/null` - `ls -dr /usr/local/qt* 2>/dev/null` - `ls -dr /opt/qt* 2>/dev/null` - " - for bnv_dir in $bnv_dir_list; do - if ls $bnv_dir/libqt*; then - # Gamble that it's the first one... - bnv_qt_lib="`ls $bnv_dir/libqt* | sed -n 1p | - sed s@$bnv_dir/lib@@ | sed s/[.].*//`" - bnv_qt_lib_dir="$bnv_dir" - break - fi - done - # Try with that one - LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" - AC_TRY_LINK([#include <$qt_direct_test_header>], - $qt_direct_test_main, - [ - # Succes. - # We can link with no special library directory. - bnv_qt_lib_dir= - ], [ - # Leave bnv_qt_lib_dir defined - ]) - ]) - ]) - ]) - if test x"$bnv_qt_lib_dir" != x; then - bnv_qt_LIBS="-l$bnv_qt_lib_dir $LIBS" - else - bnv_qt_LIBS="$LIBS" - fi - LIBS="$bnv_save_LIBS" - CXXFLAGS="$bnv_save_CXXFLAGS" - fi dnl $with_Qt_lib_dir was not given - fi dnl Done setting up for non-traditional Trolltech installation -]) diff --git a/gr-howto-write-a-block/config/cppunit.m4 b/gr-howto-write-a-block/config/cppunit.m4 deleted file mode 100644 index 0991d51ec..000000000 --- a/gr-howto-write-a-block/config/cppunit.m4 +++ /dev/null @@ -1,80 +0,0 @@ -dnl -dnl AM_PATH_CPPUNIT(MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -dnl -AC_DEFUN([AM_PATH_CPPUNIT], -[ - -AC_ARG_WITH(cppunit-prefix,[ --with-cppunit-prefix=PFX Prefix where CppUnit is installed (optional)], - cppunit_config_prefix="$withval", cppunit_config_prefix="") -AC_ARG_WITH(cppunit-exec-prefix,[ --with-cppunit-exec-prefix=PFX Exec prefix where CppUnit is installed (optional)], - cppunit_config_exec_prefix="$withval", cppunit_config_exec_prefix="") - - if test x$cppunit_config_exec_prefix != x ; then - cppunit_config_args="$cppunit_config_args --exec-prefix=$cppunit_config_exec_prefix" - if test x${CPPUNIT_CONFIG+set} != xset ; then - CPPUNIT_CONFIG=$cppunit_config_exec_prefix/bin/cppunit-config - fi - fi - if test x$cppunit_config_prefix != x ; then - cppunit_config_args="$cppunit_config_args --prefix=$cppunit_config_prefix" - if test x${CPPUNIT_CONFIG+set} != xset ; then - CPPUNIT_CONFIG=$cppunit_config_prefix/bin/cppunit-config - fi - fi - - AC_PATH_PROG(CPPUNIT_CONFIG, cppunit-config, no) - cppunit_version_min=$1 - - AC_MSG_CHECKING(for Cppunit - version >= $cppunit_version_min) - no_cppunit="" - if test "$CPPUNIT_CONFIG" = "no" ; then - no_cppunit=yes - else - CPPUNIT_CFLAGS=`$CPPUNIT_CONFIG --cflags` - CPPUNIT_LIBS=`$CPPUNIT_CONFIG --libs` - cppunit_version=`$CPPUNIT_CONFIG --version` - - cppunit_major_version=`echo $cppunit_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - cppunit_minor_version=`echo $cppunit_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - cppunit_micro_version=`echo $cppunit_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - - cppunit_major_min=`echo $cppunit_version_min | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - cppunit_minor_min=`echo $cppunit_version_min | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - cppunit_micro_min=`echo $cppunit_version_min | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - - cppunit_version_proper=`expr \ - $cppunit_major_version \> $cppunit_major_min \| \ - $cppunit_major_version \= $cppunit_major_min \& \ - $cppunit_minor_version \> $cppunit_minor_min \| \ - $cppunit_major_version \= $cppunit_major_min \& \ - $cppunit_minor_version \= $cppunit_minor_min \& \ - $cppunit_micro_version \>= $cppunit_micro_min ` - - if test "$cppunit_version_proper" = "1" ; then - AC_MSG_RESULT([$cppunit_major_version.$cppunit_minor_version.$cppunit_micro_version]) - else - AC_MSG_RESULT(no) - no_cppunit=yes - fi - fi - - if test "x$no_cppunit" = x ; then - ifelse([$2], , :, [$2]) - else - CPPUNIT_CFLAGS="" - CPPUNIT_LIBS="" - ifelse([$3], , :, [$3]) - fi - - AC_SUBST(CPPUNIT_CFLAGS) - AC_SUBST(CPPUNIT_LIBS) -]) - - - diff --git a/gr-howto-write-a-block/config/gr_check_createfilemapping.m4 b/gr-howto-write-a-block/config/gr_check_createfilemapping.m4 deleted file mode 100644 index 5f9b4a49a..000000000 --- a/gr-howto-write-a-block/config/gr_check_createfilemapping.m4 +++ /dev/null @@ -1,52 +0,0 @@ -dnl -dnl Copyright 2005 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. - -dnl AC_DEFUN([GR_CHECK_CREATEFILEMAPPING], -dnl [ -dnl AC_CHECK_FUNCS([CreateFileMapping]) -dnl ]) - -AC_DEFUN([GR_CHECK_CREATEFILEMAPPING],[ - AC_MSG_CHECKING([for CreateFileMapping function]) - AC_COMPILE_IFELSE([ -#include <windows.h> -int main (int argc, char **argv) -{ - HANDLE handle; - int size; - char seg_name[[1024]]; - handle = CreateFileMapping( - INVALID_HANDLE_VALUE, // use paging file - NULL, // default security - PAGE_READWRITE, // read/write access - 0, // max. object size - size, // buffer size - seg_name); // name of mapping object - return 0; -} -],[HAVE_CREATEFILEMAPPING=yes - AC_DEFINE(HAVE_CREATEFILEMAPPING,[1],[Define if you have the CreateFilemapping function(win32).])], - [HAVE_CREATEFILEMAPPING=no]) - - AC_MSG_RESULT($HAVE_CREATEFILEMAPPING) - AM_CONDITIONAL(HAVE_CREATEFILEMAPPING, test x$HAVE_CREATEFILEMAPPING = xyes) -]) - - diff --git a/gr-howto-write-a-block/config/gr_check_mc4020.m4 b/gr-howto-write-a-block/config/gr_check_mc4020.m4 deleted file mode 100644 index 28987c26b..000000000 --- a/gr-howto-write-a-block/config/gr_check_mc4020.m4 +++ /dev/null @@ -1,37 +0,0 @@ -dnl -dnl Copyright 2003 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. -dnl - -AC_DEFUN([GR_CHECK_MC4020],[ - AC_MSG_CHECKING([for mc4020 A/D driver include file]) - AC_COMPILE_IFELSE([ -#include <mc4020.h> -int main (int argc, char **argv) -{ - return 0; -} -],[HAVE_MC4020=yes - AC_DEFINE(HAVE_MC4020,[1],[Define if you have a Measurement Computing PCI-DAS4020/12 A/D])], - [HAVE_MC4020=no]) - - AC_MSG_RESULT($HAVE_MC4020) - AM_CONDITIONAL(HAVE_MC4020, test x$HAVE_MC4020 = xyes) -]) - diff --git a/gr-howto-write-a-block/config/gr_check_shm_open.m4 b/gr-howto-write-a-block/config/gr_check_shm_open.m4 deleted file mode 100644 index 83d260b9b..000000000 --- a/gr-howto-write-a-block/config/gr_check_shm_open.m4 +++ /dev/null @@ -1,29 +0,0 @@ -dnl -dnl Copyright 2003 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([GR_CHECK_SHM_OPEN], -[ - SHM_OPEN_LIBS="" - save_LIBS="$LIBS" - AC_SEARCH_LIBS([shm_open], [rt], [SHM_OPEN_LIBS="$LIBS"]) - AC_CHECK_FUNCS([shm_open]) - LIBS="$save_LIBS" - AC_SUBST(SHM_OPEN_LIBS) -]) diff --git a/gr-howto-write-a-block/config/gr_check_usrp.m4 b/gr-howto-write-a-block/config/gr_check_usrp.m4 deleted file mode 100644 index 12a5d1c05..000000000 --- a/gr-howto-write-a-block/config/gr_check_usrp.m4 +++ /dev/null @@ -1,32 +0,0 @@ -dnl -dnl Copyright 2003 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. -dnl - -dnl Check for Universal Software Radio Peripheral - -AC_DEFUN([GR_CHECK_USRP],[ - PKG_CHECK_MODULES(USRP, usrp >= 0.2, - [HAVE_USRP=yes - AC_DEFINE(HAVE_USRP,[1],[Define if you have a USRP])], - [HAVE_USRP=no]) - - AM_CONDITIONAL(HAVE_USRP, test x$HAVE_USRP = xyes) -]) - diff --git a/gr-howto-write-a-block/config/gr_doxygen.m4 b/gr-howto-write-a-block/config/gr_doxygen.m4 deleted file mode 100644 index 15ece8b12..000000000 --- a/gr-howto-write-a-block/config/gr_doxygen.m4 +++ /dev/null @@ -1,60 +0,0 @@ -dnl -dnl Copyright 2003,2005 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. -dnl - -AC_DEFUN([GR_CHECK_DOXYGEN],[ - AC_ARG_ENABLE(doxygen, - AC_HELP_STRING([--enable-doxygen], - [enable documentation generation with doxygen (no)])) - AC_ARG_ENABLE(dot, AC_HELP_STRING([--enable-dot],[use 'dot' to generate graphs in doxygen (auto)])) - - if test "x$enable_doxygen" = xyes; then - AC_PATH_PROG(DOXYGEN, doxygen, , $PATH) - if test x$DOXYGEN = x; then - if test "x$enable_doxygen" = xyes; then - AC_MSG_ERROR([could not find doxygen]) - fi - enable_doc=no - generate_docs= - else - enable_doc=yes - generate_docs=docs - AC_PATH_PROG(DOT, dot, , $PATH) - fi - else - enable_doc=no - fi - - AM_CONDITIONAL(DOC, test x$enable_doc = xyes) - - if test x$DOT = x; then - if test "x$enable_dot" = xyes; then - AC_MSG_ERROR([could not find dot]) - fi - enable_dot=no - else - enable_dot=yes - fi - AC_SUBST(enable_dot) - AC_SUBST(enable_xml_docs, YES) - AC_SUBST(enable_html_docs, YES) - AC_SUBST(enable_latex_docs, NO) - AC_SUBST(generate_docs) -]) diff --git a/gr-howto-write-a-block/config/gr_fortran.m4 b/gr-howto-write-a-block/config/gr_fortran.m4 deleted file mode 100644 index 033ef0307..000000000 --- a/gr-howto-write-a-block/config/gr_fortran.m4 +++ /dev/null @@ -1,33 +0,0 @@ -dnl Copyright 2001,2002,2003,2004,2005,2006 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([GR_FORTRAN],[ - dnl if you want to generate a different table of interpolator taps, you need fortran. - dnl we default to off, since almost no one wants to do this. - AC_ARG_ENABLE(fortran, AC_HELP_STRING([--enable-fortran],[enable fortran (no)]), - [], [enable_fortran=no]) - AM_CONDITIONAL(ENABLE_FORTRAN, test "x$enable_fortran" = xyes) - - if test "x$enable_fortran" = xyes - then - AC_PROG_F77 - AC_F77_LIBRARY_LDFLAGS - fi - AC_PROG_CC dnl bug fix to restore $ac_ext -]) diff --git a/gr-howto-write-a-block/config/gr_git.m4 b/gr-howto-write-a-block/config/gr_git.m4 deleted file mode 100644 index c4f1ea0c0..000000000 --- a/gr-howto-write-a-block/config/gr_git.m4 +++ /dev/null @@ -1,63 +0,0 @@ -dnl Copyright 2009,2010 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([GR_GIT],[ - dnl Identify git binary - AC_PATH_PROG([GIT],[git]) - - dnl If it exists, get either 'git describe' or fallback to current commit - if test x$GIT != x ; then - AC_MSG_CHECKING([existence of git version control directory]) - if test -d $srcdir/.git ; then - AC_MSG_RESULT([ok]) - AC_MSG_CHECKING([git description of current commit]) - if (cd $srcdir && $GIT describe >/dev/null 2>&1); then - GIT_DESCRIBE=`cd $srcdir && $GIT describe --abbrev=8 --long` - # Release candidate tags create an extra -rcX field - case $GIT_DESCRIBE in - *-*-*-*) - GIT_TAG=`echo $GIT_DESCRIBE | cut -f -2 -d '-'` - GIT_SEQNO=`echo $GIT_DESCRIBE | cut -f 3 -d '-'` - GIT_COMMIT=`echo $GIT_DESCRIBE | cut -f 4 -d '-' | cut -f 2- -d 'g'` - ;; - *-*-*) - GIT_TAG=`echo $GIT_DESCRIBE | cut -f 1 -d '-'` - GIT_SEQNO=`echo $GIT_DESCRIBE | cut -f 2 -d '-'` - GIT_COMMIT=`echo $GIT_DESCRIBE | cut -f 3 -d '-' | cut -f 2- -d 'g'` - ;; - esac - - AC_MSG_RESULT([$GIT_DESCRIBE]) - else - AC_MSG_RESULT([no tag in history, using current commit]) - GIT_TAG='' - GIT_SEQNO='' - GIT_COMMIT=`cd $srcdir && $GIT describe --always --abbrev=8` - fi - else - AC_MSG_RESULT([not found]) - fi - - AC_SUBST([GIT_DESCRIBE]) - AC_SUBST([GIT_TAG]) - AC_SUBST([GIT_SEQNO]) - AC_SUBST([GIT_COMMIT]) - fi -]) diff --git a/gr-howto-write-a-block/config/gr_gprof.m4 b/gr-howto-write-a-block/config/gr_gprof.m4 deleted file mode 100644 index 20bacf363..000000000 --- a/gr-howto-write-a-block/config/gr_gprof.m4 +++ /dev/null @@ -1,72 +0,0 @@ -dnl -dnl Copyright 2002 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. -dnl - -dnl FIXME probably need to add linker flag too... - -AC_DEFUN([GR_SET_GPROF],[ - dnl Check for --with-gprof - AC_MSG_CHECKING([whether user wants gprof]) - AC_ARG_WITH(gprof, - [ --with-gprof Turn on gprof profiling], - [], [ with_gprof=no ]) - AC_MSG_RESULT($with_gprof) - - dnl gprof profiling flags for the two main compilers - cc_profiling_flags="-pg" - cxx_profiling_flags="-pg" - ld_profiling_flags="-pg" - if test $with_gprof = yes - then - if test -n "${CC}" - then - LF_CHECK_CC_FLAG($cc_profiling_flags) - fi - if test -n "${CXX}" - then - LF_CHECK_CXX_FLAG($cxx_profiling_flags) - fi - fi -]) - -AC_DEFUN([GR_SET_PROF],[ - dnl Check for --with-prof - AC_MSG_CHECKING([whether user wants prof]) - AC_ARG_WITH(prof, - [ --with-prof Turn on prof profiling], - [], [ with_prof=no ]) - AC_MSG_RESULT($with_prof) - - dnl prof profiling flags for the two main compilers - cc_profiling_flags="-p" - cxx_profiling_flags="-p" - ld_profiling_flags="-p" - if test $with_prof = yes - then - if test -n "${CC}" - then - LF_CHECK_CC_FLAG($cc_profiling_flags) - fi - if test -n "${CXX}" - then - LF_CHECK_CXX_FLAG($cxx_profiling_flags) - fi - fi -]) diff --git a/gr-howto-write-a-block/config/gr_guile.m4 b/gr-howto-write-a-block/config/gr_guile.m4 deleted file mode 100644 index 1f0793944..000000000 --- a/gr-howto-write-a-block/config/gr_guile.m4 +++ /dev/null @@ -1,65 +0,0 @@ -dnl -dnl Copyright 2003,2004,2005 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. -dnl - -# GUILE_DEVEL() -# -# Checks for Guile and tries to get the include path to 'Guile.h'. -# It sets the $(GUILE_CPPFLAGS), $(GUILE_LDFLAGS) and $(guiledir) output variables, -# -AC_DEFUN([GUILE_DEVEL],[ - dnl see if GUILE is installed - AC_PATH_PROG(GUILE, guile) - dnl get the config program - AC_PATH_PROG(GUILE_CONFIG, guile-config) - if test x${GUILE_CONFIG} != x; then - GUILE_CFLAGS="`${GUILE_CONFIG} compile`" - GUILE_LIBS="`${GUILE_CONFIG} link`" - GUILE_PKLIBDIR="`${GUILE_CONFIG} info pkglibdir`" - GUILE_PKDATADIR="`${GUILE_CONFIG} info pkgdatadir`/site" - else - GUILE_CFLAGS="" - GUILE_PKLIBDIR="" - GUILE_LIBS="Wl,-Bsymbolic-functions -lguile -lgmp -lcrypt" - fi - AC_SUBST(GUILE_CFLAGS) - AC_SUBST(GUILE_PKLIBDIR) - AC_SUBST(GUILE_PKDATADIR) - AC_SUBST(GUILE_LIBS) -]) - -# GUILE_CHECK_MODULE -# -# Determines if a particular Guile module can be imported -# -# $1 - module name -# $2 - module description -# $3 - action if found -# $4 - action if not found -# $5 - test command - -AC_DEFUN([GUILE_CHECK_MODULE],[ - AC_MSG_CHECKING([for $2]) - dnl ######################################## - dnl # import and test checking - dnl ######################################## - dnl if test x${enable_guile} = xyes; then - dnl fi -]) diff --git a/gr-howto-write-a-block/config/gr_lib64.m4 b/gr-howto-write-a-block/config/gr_lib64.m4 deleted file mode 100644 index 751f774b4..000000000 --- a/gr-howto-write-a-block/config/gr_lib64.m4 +++ /dev/null @@ -1,85 +0,0 @@ -dnl -dnl Copyright 2005,2008 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. -dnl - -dnl GR_LIB64() -dnl -dnl Checks to see if we're on a x86_64 or powerpc64 machine, and if so, determine -dnl if libdir should end in "64" or not. -dnl -dnl Sets gr_libdir_suffix to "" or "64" and calls AC_SUBST(gr_libdir_suffix) -dnl May append "64" to libdir. -dnl -dnl The current heuristic is: -dnl if the host_cpu isn't x86_64 or powerpc64, then "" -dnl if the host_os isn't linux, then "" -dnl if we're cross-compiling, ask the linker, by way of the selected compiler -dnl if we're x86_64 and there's a /lib64 and it's not a symlink, then "64", else "" -dnl else ask the compiler -dnl -AC_DEFUN([GR_LIB64],[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AC_PROG_CXX]) - - AC_MSG_CHECKING([gr_libdir_suffix]) - gr_libdir_suffix="" - AC_SUBST(gr_libdir_suffix) - - case "$host_os" in - linux*) is_linux=yes ;; - *) is_linux=no ;; - esac - - if test "$is_linux" = no || test "$host_cpu" != "x86_64" && test "$host_cpu" != "powerpc64"; then - gr_libdir_suffix="" - elif test "$cross_compiling" = yes; then - _GR_LIB64_ASK_COMPILER - elif test "$host_cpu" = "x86_64"; then - if test -d /lib64 && test ! -L /lib64; then - gr_libdir_suffix=64 - fi - else - _GR_LIB64_ASK_COMPILER - fi - AC_MSG_RESULT([$gr_libdir_suffix]) - - - AC_MSG_CHECKING([whether to append 64 to libdir]) - t=${libdir##*/lib} - if test "$t" != 64 && test "$gr_libdir_suffix" = "64"; then - libdir=${libdir}64 - AC_MSG_RESULT([yes. Setting libdir to $libdir]) - else - AC_MSG_RESULT([no]) - fi -]) - -dnl If we're using g++, extract the first SEARCH_DIR("...") entry from the linker script -dnl and see if it contains a suffix after the final .../lib part of the path. -dnl (This works because the linker script varies depending on whether we're generating -dnl 32-bit or 64-bit executables) -dnl -AC_DEFUN([_GR_LIB64_ASK_COMPILER],[ - if test "$ac_cv_cxx_compiler_gnu" = "yes"; - then - gr_libdir_suffix=`$CXX -Wl,--verbose 2>/dev/null | sed -n -e '/SEARCH_DIR/{s/;.*$//; s,^.*/,,; s/".*$//; s/^lib//; p}'` - fi -]) - diff --git a/gr-howto-write-a-block/config/gr_libgnuradio_core_extra_ldflags.m4 b/gr-howto-write-a-block/config/gr_libgnuradio_core_extra_ldflags.m4 deleted file mode 100644 index 43f872c04..000000000 --- a/gr-howto-write-a-block/config/gr_libgnuradio_core_extra_ldflags.m4 +++ /dev/null @@ -1,40 +0,0 @@ -# Check for (MinGW)win32 extra ld options. -*- Autoconf -*- - -# Copyright 2003,2004,2005 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. - -dnl -AC_DEFUN([GR_LIBGNURADIO_CORE_EXTRA_LDFLAGS], [ -AC_REQUIRE([AC_PROG_LD]) -# on Mingw32 extra LDFLAGS are required to ease global variable linking -LIBGNURADIO_CORE_EXTRA_LDFLAGS="" - -AC_MSG_CHECKING([whether $LD accepts --enable-runtime-pseudo-reloc]) -if ${LD} --enable-runtime-pseudo-reloc --version >/dev/null 2>&1 -then - # libtool requires the quotes - LIBGNURADIO_CORE_EXTRA_LDFLAGS="\"-Wl,--enable-runtime-pseudo-reloc\"" - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -AC_SUBST(LIBGNURADIO_CORE_EXTRA_LDFLAGS) - -]) diff --git a/gr-howto-write-a-block/config/gr_no_undefined.m4 b/gr-howto-write-a-block/config/gr_no_undefined.m4 deleted file mode 100644 index c8d745d5f..000000000 --- a/gr-howto-write-a-block/config/gr_no_undefined.m4 +++ /dev/null @@ -1,44 +0,0 @@ -dnl -dnl Copyright 2005 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. -dnl - -# GR_NO_UNDEFINED() -# -# Detemine whether we need to use the -no-undefined linker flag -# when building shared libraries. -# Sets NO_UNDEFINED to "" or "-no-undefined" -# -# As far as I can tell, we need -no-undefined only when building -# windows DLLs. This occurs when using MinGW and Cygwin. -# -# For now, we stub this out. - -AC_DEFUN([GR_NO_UNDEFINED],[ - AC_REQUIRE([AC_CANONICAL_HOST]) - no_undefined="" - case "${host_os}" in - *mingw* | *cygwin*) - - # on MinGW/Cygwin extra LDFLAGS are required - no_undefined="-no-undefined" - ;; - esac - AC_SUBST(NO_UNDEFINED,[$no_undefined]) -]) diff --git a/gr-howto-write-a-block/config/gr_omnithread.m4 b/gr-howto-write-a-block/config/gr_omnithread.m4 deleted file mode 100644 index 054f07824..000000000 --- a/gr-howto-write-a-block/config/gr_omnithread.m4 +++ /dev/null @@ -1,52 +0,0 @@ -# Check for Omnithread (pthread/NT) thread support. -*- Autoconf -*- - -# Copyright 2003,2007 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, 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, Boston, MA -# 02110-1301, USA. - -AC_DEFUN([GR_OMNITHREAD], -[ - # Check first for POSIX - ACX_PTHREAD( - [ AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]) - ot_posix="yes" - DEFINES="$DEFINES -DOMNITHREAD_POSIX=1" - ],[ - # If no POSIX support found, then check for NT threads - AC_MSG_CHECKING([for NT threads]) - - AC_LINK_IFELSE([ - #include <windows.h> - #include <winbase.h> - int main() { InitializeCriticalSection(NULL); return 0; } - ], - [ - ot_nt="yes" - DEFINES="$DEFINES -DOMNITHREAD_NT=1" - ], - [AC_MSG_FAILURE([GNU Radio requires POSIX threads. pthreads not found.])] - ) - AC_MSG_RESULT(yes) - ]) - AM_CONDITIONAL(OMNITHREAD_POSIX, test "x$ot_posix" = xyes) - AM_CONDITIONAL(OMNITHREAD_NT, test "x$ot_nt" = xyes) - - save_LIBS="$LIBS" - AC_SEARCH_LIBS([clock_gettime], [rt], [PTHREAD_LIBS="$PTHREAD_LIBS $LIBS"]) - AC_CHECK_FUNCS([clock_gettime gettimeofday nanosleep]) - LIBS="$save_LIBS" -]) - diff --git a/gr-howto-write-a-block/config/gr_pwin32.m4 b/gr-howto-write-a-block/config/gr_pwin32.m4 deleted file mode 100644 index 6b27b439f..000000000 --- a/gr-howto-write-a-block/config/gr_pwin32.m4 +++ /dev/null @@ -1,138 +0,0 @@ -# Check for (mingw)win32 POSIX replacements. -*- Autoconf -*- - -# Copyright 2003,2004,2005,2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. - - -AC_DEFUN([GR_PWIN32], -[ -AC_REQUIRE([AC_HEADER_TIME]) -AC_CHECK_HEADERS([sys/types.h fcntl.h io.h]) -AC_CHECK_HEADERS([windows.h]) -AC_CHECK_HEADERS([winioctl.h winbase.h], [], [], [ - #if HAVE_WINDOWS_H - #include <windows.h> - #endif -]) - -AC_CHECK_FUNCS([getopt usleep gettimeofday nanosleep rand srand random srandom sleep sigaction]) -AC_CHECK_TYPES([struct timezone, struct timespec, ssize_t],[],[],[ - #if HAVE_SYS_TYPES_H - # include <sys/types.h> - #endif - #if TIME_WITH_SYS_TIME - # include <sys/time.h> - # include <time.h> - #else - # if HAVE_SYS_TIME_H - # include <sys/time.h> - # else - # include <time.h> - # endif - #endif -]) - -dnl Checks for replacements -AC_REPLACE_FUNCS([getopt usleep gettimeofday]) - - -AC_MSG_CHECKING(for Sleep) -AC_TRY_LINK([ #include <windows.h> - #include <winbase.h> - ], [ Sleep(0); ], - [AC_DEFINE(HAVE_SSLEEP,1,[Define to 1 if you have win32 Sleep]) - AC_MSG_RESULT(yes)], - AC_MSG_RESULT(no) - ) - -AH_BOTTOM( -[ -/* Define missing prototypes, implemented in replacement lib */ -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef HAVE_GETOPT -int getopt (int argc, char * const argv[], const char * optstring); -extern char * optarg; -extern int optind, opterr, optopt; -#endif - -#ifndef HAVE_USLEEP -int usleep(unsigned long usec); /* SUSv2 */ -#endif - -#ifndef HAVE_NANOSLEEP -#ifndef HAVE_STRUCT_TIMESPEC -#if HAVE_SYS_TYPES_H -# include <sys/types.h> /* need time_t */ -#endif -struct timespec { - time_t tv_sec; - long tv_nsec; -}; -#endif -#if HAVE_UNISTD_H -#include <unistd.h> -#endif -static inline int nanosleep(const struct timespec *req, struct timespec *rem) { return usleep(req->tv_sec*1000000+req->tv_nsec/1000); } -#endif - -#if defined(HAVE_SSLEEP) && !defined(HAVE_SLEEP) -#ifdef HAVE_WINBASE_H -#include <windows.h> -#include <winbase.h> -#endif -/* TODO: what about SleepEx? */ -static inline unsigned int sleep (unsigned int nb_sec) { Sleep(nb_sec*1000); return 0; } -#endif - -#ifndef HAVE_GETTIMEOFDAY -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> -#endif -#ifndef HAVE_STRUCT_TIMEZONE -struct timezone { - int tz_minuteswest; - int tz_dsttime; -}; -#endif -int gettimeofday(struct timeval *tv, struct timezone *tz); -#endif - -#if !defined(HAVE_RANDOM) && defined(HAVE_RAND) -#include <stdlib.h> -static inline long int random (void) { return rand(); } -#endif - -#if !defined(HAVE_SRANDOM) && defined(HAVE_SRAND) -static inline void srandom (unsigned int seed) { srand(seed); } -#endif - -#ifndef HAVE_SSIZE_T -typedef size_t ssize_t; -#endif - -#ifdef __cplusplus -} -#endif -]) - - -]) diff --git a/gr-howto-write-a-block/config/gr_python.m4 b/gr-howto-write-a-block/config/gr_python.m4 deleted file mode 100644 index 43ccfc015..000000000 --- a/gr-howto-write-a-block/config/gr_python.m4 +++ /dev/null @@ -1,172 +0,0 @@ -dnl -dnl Copyright 2003,2004,2005 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. -dnl - -# PYTHON_DEVEL() -# -# Checks for Python and tries to get the include path to 'Python.h'. -# It sets the $(PYTHON_CPPFLAGS), $(PYTHON_LDFLAGS) and $(pythondir) output variables, -# -AC_DEFUN([PYTHON_DEVEL],[ - AC_REQUIRE([AM_PATH_PYTHON]) - AC_REQUIRE([AC_CANONICAL_HOST]) - - AC_ARG_WITH(pythondir, - AC_HELP_STRING([--with-pythondir=DIR], - [python installation directory (cross-compiling) [[default=$prefix/lib/python2.5/site-packages]]]), - [with_pythondir=${withval}],[with_pythondir=${prefix}/lib/python2.5/site-packages]) - - # if we're cross-compiling, asking the host python about any of - # this is completely useless... - - if test x$cross_compiling != xno - then - pythondir=$with_pythondir - pyexecdir=$with_pythondir - AC_SUBST(PYTHON_CPPFLAGS) - AC_SUBST(PYTHON_LDFLAGS) - else - - # For Fedora Core 5 and 6, see ticket:39 in Trac - if test -f '/etc/redhat-release'; then - if (echo $pyexecdir | grep -q lib64); then - pythondir="$pyexecdir" - fi - fi - - # Check for Python include path - AC_MSG_CHECKING([for Python include path]) - if test -z "$PYTHON" ; then - AC_MSG_ERROR([cannot find Python path]) - fi - - # ask distutils which include path we should use - python_cmd=' -import distutils.sysconfig -import os -path = distutils.sysconfig.get_python_inc(plat_specific=False) -if os.sep == "\\": - path = path.replace("\\", "/") -print path -' - python_path=`$PYTHON -c "$python_cmd"` - AC_MSG_RESULT([$python_path]) - if test -z "$python_path" ; then - AC_MSG_ERROR([cannot find Python include path]) - fi - - AC_SUBST(PYTHON_CPPFLAGS,[-I$python_path]) - - # Check for Python headers usability - python_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" - AC_CHECK_HEADERS([Python.h], [], - [AC_MSG_ERROR([cannot find usable Python headers])]) - CPPFLAGS="$python_save_CPPFLAGS" - - # Only set this on mingw and cygwin hosts, (only implemented - # for mingw host, for crosscompiling you need to trick this) - - PYTHON_LDFLAGS="" - case $host_os in - *mingw* | *cygwin* ) - AC_MSG_CHECKING([for Python LDFLAGS]) - - python_cmd=' -import distutils.sysconfig -import os -path = distutils.sysconfig.get_config_var("LIBPL") -if path == None: - path = distutils.sysconfig.PREFIX + "/libs" -if os.sep == "\\": - path = path.replace("\\", "/") -print path -' - python_stdlib_path=`$PYTHON -c "$python_cmd"` - - python_version_nodot=`echo $PYTHON_VERSION | sed "s,\.,,"` - libpython_name="python$PYTHON_VERSION" - - # Standard install of python for win32 has libpython24.a - # instead of libpython2.4.a so we check for the library - # without the dot in the version number. - - python_stdlib_filename=`find $python_stdlib_path -type f -name libpython$python_version_nodot.* -print | sed "1q"` - if test -n "$python_stdlib_filename" ; then - libpython_name="python$python_version_nodot" - fi - - PYTHON_LDFLAGS="-L$python_stdlib_path -l$libpython_name" - AC_MSG_RESULT($PYTHON_LDFLAGS) - # Replace all backslashes in PYTHON Paths with forward slashes - pythondir=`echo $pythondir |sed 's,\\\\,/,g'` - pkgpythondir=`echo $pkgpythondir |sed 's,\\\\,/,g'` - pyexecdir=`echo $pyexecdir |sed 's,\\\\,/,g'` - pkgpyexecdir=`echo $pkgpyexecdir |sed 's,\\\\,/,g'` - ;; - esac - - case $host_os in - *mingw* ) - # Python 2.5 requires ".pyd" instead of ".dll" for extensions - PYTHON_LDFLAGS="-shrext .pyd ${PYTHON_LDFLAGS}" - esac - - AC_SUBST(PYTHON_LDFLAGS) - fi -]) - -# PYTHON_CHECK_MODULE -# -# Determines if a particular Python module can be imported -# -# $1 - module name -# $2 - module description -# $3 - action if found -# $4 - action if not found -# $5 - test command - -AC_DEFUN([PYTHON_CHECK_MODULE],[ - AC_MSG_CHECKING([for $2]) - dnl ######################################## - dnl # import and test checking - dnl ######################################## - if test "$5"; then - python_cmd=' -try: - import $1 - assert $5 -except: exit(1)' - dnl ######################################## - dnl # import checking only - dnl ######################################## - else - python_cmd=' -try: import $1 -except: exit(1)' - fi - if ! $PYTHON -c "$python_cmd" 2> /dev/null; then - AC_MSG_RESULT([no]) - $4 - else - AC_MSG_RESULT([yes]) - $3 - fi -]) diff --git a/gr-howto-write-a-block/config/gr_require_mc4020.m4 b/gr-howto-write-a-block/config/gr_require_mc4020.m4 deleted file mode 100644 index 90774fd33..000000000 --- a/gr-howto-write-a-block/config/gr_require_mc4020.m4 +++ /dev/null @@ -1,33 +0,0 @@ -dnl -dnl Copyright 2003,2004 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. -dnl - -AC_DEFUN([GR_REQUIRE_MC4020],[ - AC_MSG_CHECKING([for mc4020 A/D driver include file]) - AC_COMPILE_IFELSE([ -#include <mc4020.h> -int main (int argc, char **argv) -{ - return 0; -} -],[AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([mc4020.h not found.])]) -]) diff --git a/gr-howto-write-a-block/config/gr_scripting.m4 b/gr-howto-write-a-block/config/gr_scripting.m4 deleted file mode 100644 index 866b7e017..000000000 --- a/gr-howto-write-a-block/config/gr_scripting.m4 +++ /dev/null @@ -1,38 +0,0 @@ -dnl -dnl Copyright 2003 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. -dnl - -AC_DEFUN([GR_SCRIPTING],[ - AC_REQUIRE([AC_PROG_LN_S]) - AC_REQUIRE([AC_PROG_CXX]) - AC_REQUIRE([AC_PROG_LIBTOOL]) - - SWIG_PROG(1.3.31) - SWIG_ENABLE_CXX - dnl We need python at build time, as it's used as for utilities. If python - dnl isn't enabled, then we don't want the SWIG support for python. - AC_REQUIRE([AM_PATH_PYTHON]) - if test x${enable_python} = xyes; then - SWIG_PYTHON - fi - if test x${enable_guile} = xyes; then - SWIG_GUILE - fi -]) diff --git a/gr-howto-write-a-block/config/gr_set_md_cpu.m4 b/gr-howto-write-a-block/config/gr_set_md_cpu.m4 deleted file mode 100644 index cb5fb5aac..000000000 --- a/gr-howto-write-a-block/config/gr_set_md_cpu.m4 +++ /dev/null @@ -1,115 +0,0 @@ -dnl -dnl Copyright 2003,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. -dnl - -AC_DEFUN([_TRY_ADD_ALTIVEC], -[ - LF_CHECK_CC_FLAG([-mabi=altivec -maltivec]) - LF_CHECK_CXX_FLAG([-mabi=altivec -maltivec]) -]) - -AC_DEFUN([_FIND_ARM_ISA], -[ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[#ifndef __ARM_ARCH_5__ - #error "Not armv5" - #endif - ]])], - [is_armv5=yes], - [is_armv5=no]) - - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[#ifndef __ARM_ARCH_7A__ - #error "Not armv7-a" - #endif - ]])], - [is_armv7_a=yes], - [is_armv7_a=no]) - -]) - -AC_DEFUN([GR_SET_MD_CPU],[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_ARG_WITH(md-cpu, - AC_HELP_STRING([--with-md-cpu=ARCH],[set machine dependent speedups (auto)]), - [cf_with_md_cpu="$withval"], - [ - 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 ;; - powerpc*) MD_CPU=powerpc ;; - arm*) - _FIND_ARM_ISA - if test $is_armv5 = yes; then MD_CPU=armv5; - elif test $is_armv7_a = yes; then MD_CPU=armv7_a; - else MD_CPU=generic; fi - ;; - *) MD_CPU=generic ;; - esac - - AC_ARG_ENABLE(altivec, - AC_HELP_STRING([--enable-altivec],[enable altivec on PowerPC (yes)]), - [ if test $MD_CPU = powerpc; then - case "$enableval" in - (no) MD_CPU=generic ;; - (yes) _TRY_ADD_ALTIVEC ;; - (*) AC_MSG_ERROR([Invalid argument ($enableval) to --enable-altivec]) ;; - esac - fi], - [ if test $MD_CPU = powerpc; then _TRY_ADD_ALTIVEC fi]) - - - AC_MSG_CHECKING([for machine dependent speedups]) - AC_MSG_RESULT($MD_CPU) - AC_SUBST(MD_CPU) - AC_SUBST(MD_SUBCPU) - - AM_CONDITIONAL(MD_CPU_x86, test "$MD_CPU" = "x86") - AM_CONDITIONAL(MD_SUBCPU_x86_64, test "$MD_SUBCPU" = "x86_64") - AM_CONDITIONAL(MD_CPU_powerpc, test "$MD_CPU" = "powerpc") - AM_CONDITIONAL(MD_CPU_armv5, test "$MD_CPU" = "armv5") - AM_CONDITIONAL(MD_CPU_armv7_a, test "$MD_CPU" = "armv7_a") - AM_CONDITIONAL(MD_CPU_generic, test "$MD_CPU" = "generic") -]) diff --git a/gr-howto-write-a-block/config/gr_standalone.m4 b/gr-howto-write-a-block/config/gr_standalone.m4 deleted file mode 100644 index 5ba48892f..000000000 --- a/gr-howto-write-a-block/config/gr_standalone.m4 +++ /dev/null @@ -1,160 +0,0 @@ -dnl -dnl Copyright 2008,2009,2010 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 along -dnl with this program; if not, write to the Free Software Foundation, Inc., -dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -dnl - -dnl -dnl GR_STANDALONE([package],[version]) -dnl -dnl Handles the bulk of the configure.ac work for an out-of-tree build -dnl -dnl N.B., this is an m4_define because if it were an AC_DEFUN it would -dnl get called too late to be useful. - -m4_define([GR_STANDALONE], -[ - AC_CONFIG_SRCDIR([config/gr_standalone.m4]) - AM_CONFIG_HEADER(config.h) - - dnl Remember if the user explicity set CXXFLAGS - if test -n "${CXXFLAGS}"; then - user_set_cxxflags=yes - fi - - LF_CONFIGURE_CC - LF_CONFIGURE_CXX - GR_LIB64 dnl check for lib64 suffix after choosing compilers - - dnl The three macros above are known to override CXXFLAGS if the user - dnl didn't specify them. Though I'm sure somebody thought this was - dnl a good idea, it makes it hard to use other than -g -O2 when compiling - dnl selected files. Thus we "undo" the damage here... - dnl - dnl If the user specified CXXFLAGS, we use them. Otherwise when compiling - dnl the output of swig use use -O1 if we're using g++. - dnl See Makefile.common for the rest of the magic. - if test "$user_set_cxxflags" != yes; then - autoconf_default_CXXFLAGS="$CXXFLAGS" - if test "$GXX" = yes; then - case "$host_cpu" in - powerpc*) - dnl "-O1" is broken on the PPC for some reason - dnl (at least as of g++ 4.1.1) - swig_CXXFLAGS="-g1 -O2 -Wno-strict-aliasing -Wno-parentheses" - ;; - *) - swig_CXXFLAGS="-g -O1 -Wno-strict-aliasing -Wno-parentheses" - ;; - esac - fi - fi - AC_SUBST(autoconf_default_CXXFLAGS) - AC_SUBST(swig_CXXFLAGS) - - dnl add ${prefix}/lib${gr_libdir_suffix}/pkgconfig to the head of the PKG_CONFIG_PATH - if test x${PKG_CONFIG_PATH} = x; then - PKG_CONFIG_PATH=${prefix}/lib${gr_libdir_suffix}/pkgconfig - else - PKG_CONFIG_PATH=${prefix}/lib${gr_libdir_suffix}/pkgconfig:${PKG_CONFIG_PATH} - fi - export PKG_CONFIG_PATH - - LF_SET_WARNINGS - GR_SET_GPROF - GR_SET_PROF - AM_PROG_AS - AC_PROG_LN_S - AC_PROG_MAKE_SET - AC_PROG_INSTALL - AC_PATH_PROG([RM_PROG], [rm]) - - AC_LIBTOOL_WIN32_DLL - AC_ENABLE_SHARED dnl do build shared libraries - AC_DISABLE_STATIC dnl don't build static libraries - m4_ifdef([LT_INIT],[LT_INIT],[AC_PROG_LIBTOOL]) - dnl GR_FORTRAN - - GR_NO_UNDEFINED dnl do we need the -no-undefined linker flag - GR_SCRIPTING dnl Locate python, SWIG, etc - - dnl Checks for header files. - AC_HEADER_STDC - - dnl Checks for typedefs, structures, and compiler characteristics. - AC_C_CONST - AC_C_INLINE - AC_TYPE_SIZE_T - AC_HEADER_TIME - AC_C_BIGENDIAN - - dnl Check for Mingw support - GR_PWIN32 - - AC_CHECK_PROG([XMLTO],[xmlto],[yes],[]) - AM_CONDITIONAL([HAS_XMLTO], [test x$XMLTO = xyes]) - - PKG_CHECK_MODULES(GNURADIO_CORE, gnuradio-core >= 3) - PKG_CHECK_MODULES(GRUEL, gruel >= 3) - LIBS="$LIBS $GNURADIO_CORE_LIBS" - - gnuradio_core_GUILE_LOAD_PATH="`pkg-config --variable=guile_load_path gnuradio-core`" - gnuradio_core_LIBDIRPATH="`pkg-config --variable=libdir gnuradio-core`" - AC_SUBST(gnuradio_core_GUILE_LOAD_PATH) - AC_SUBST(gnuradio_core_LIBDIRPATH) - - dnl Allow user to choose whether to generate SWIG/Python - dnl Default is enabled - AC_ARG_ENABLE([python], - [AS_HELP_STRING([--enable-python], - [generate SWIG/Python components (default is yes)])], - [case "${enableval}" in - yes) enable_python=yes ;; - no) enable_python=no ;; - *) AC_MSG_ERROR([bad value ${enableval} for --enable-python]) ;; - esac], - [enable_python=yes] - ) - AM_CONDITIONAL([PYTHON], [test x$enable_python = xyes]) - - dnl Allow user to choose whether to generate SWIG/Guile - dnl Default is disabled - AC_ARG_ENABLE([guile], - [AS_HELP_STRING([--enable-guile], - [generate SWIG/Guile components (default is no)])], - [case "${enableval}" in - yes) enable_guile=yes ;; - no) enable_guile=no ;; - *) AC_MSG_ERROR([bad value ${enableval} for --enable-guile]) ;; - esac], - [enable_guile=no] - ) - AM_CONDITIONAL([GUILE], [test x$enable_guile = xyes]) - - dnl see if GUILE is installed - if test x${enable_guile} == xyes; then - AC_PATH_PROG(GUILE,guile) - fi - - dnl Define where to look for cppunit includes and libs - dnl sets CPPUNIT_CFLAGS and CPPUNIT_LIBS - dnl Try using pkg-config first, then fall back to cppunit-config. - PKG_CHECK_EXISTS(cppunit, - [PKG_CHECK_MODULES(CPPUNIT, cppunit >= 1.9.14)], - [AM_PATH_CPPUNIT([1.9.14],[], - [AC_MSG_ERROR([GNU Radio requires cppunit. Stop])])]) -]) diff --git a/gr-howto-write-a-block/config/gr_subversion.m4 b/gr-howto-write-a-block/config/gr_subversion.m4 deleted file mode 100644 index 849d7a9f6..000000000 --- a/gr-howto-write-a-block/config/gr_subversion.m4 +++ /dev/null @@ -1,36 +0,0 @@ -dnl -dnl Copyright 2007 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. -dnl - -# GR_SUBVERSION() -# -# Test for presence of subversion, and create variables for -# current repository version and last changed date. - -AC_DEFUN([GR_SUBVERSION],[ - AC_PATH_PROG([SVN],[svn]) - if test "$SVN" != "" -a -d .svn ; then - SVNVERSION=`$SVN info . | grep '^Revision' | cut -f 2- -d ' '` - SVNDATE=`$SVN info . | grep 'Last Changed Date' | cut -f 4-6 -d ' '` - fi - - AC_SUBST(SVNVERSION) - AC_SUBST(SVNDATE) -]) diff --git a/gr-howto-write-a-block/config/gr_swig.m4 b/gr-howto-write-a-block/config/gr_swig.m4 deleted file mode 100644 index dcc2e72dc..000000000 --- a/gr-howto-write-a-block/config/gr_swig.m4 +++ /dev/null @@ -1,109 +0,0 @@ -dnl -dnl Copyright 2003 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. -dnl - -# SWIG_PROG([required-version]) -# -# Checks for the SWIG program. If found you can (and should) call SWIG via $(SWIG). -# You can use the optional first argument to check if the version of the available SWIG -# is greater or equal to the value of the argument. It should have the format: -# N[.N[.N]] (N is a number between 0 and 999. Only the first N is mandatory.) -AC_DEFUN([SWIG_PROG],[ - AC_REQUIRE([AC_PROG_MAKE_SET]) - AC_CHECK_PROG(SWIG,swig,[`which swig`]) - if test -z "$SWIG" ; then - AC_MSG_ERROR([Cannot find 'swig' program. SWIG version >= $1 required]) - SWIG=false - elif test -n "$1" ; then - AC_MSG_CHECKING([for SWIG version]) - swig_version=`$SWIG -version 2>&1 | \ - awk '/^SWIG Version [[0-9]+\.[0-9]+\.[0-9]]+.*$/ { split($[3],a,"[[^.0-9]]"); print a[[1]] }'` - AC_MSG_RESULT([$swig_version]) - if test -n "$swig_version" ; then - swig_version=`echo $swig_version | \ - awk '{ split($[1],a,"\."); print [a[1]*1000000+a[2]*1000+a[3]] }' 2>/dev/null` - swig_required_version=`echo $1 | \ - awk '{ split($[1],a,"\."); print [a[1]*1000000+a[2]*1000+a[3]] }' 2>/dev/null` - if test $swig_required_version -gt $swig_version ; then - AC_MSG_ERROR([SWIG version >= $1 required]) - fi - else - AC_MSG_ERROR([cannot determine SWIG version]) - fi - fi -]) - -# SWIG_ENABLE_CXX() -# -# Enable swig C++ support. This effects all invocations of $(SWIG). -AC_DEFUN([SWIG_ENABLE_CXX],[ - AC_REQUIRE([SWIG_PROG]) - AC_REQUIRE([AC_PROG_CXX]) - if test "$SWIG" != "false" ; then - SWIG="$SWIG -c++" - fi -]) - -# SWIG_PYTHON([use-shadow-classes]) -# -# Checks for Python and provides the $(SWIG_PYTHON_CPPFLAGS), -# $(SWIG_PYTHON_LIB) and $(SWIG_PYTHON_OPT) output variables. -# $(SWIG_PYTHON_OPT) contains all necessary swig options to generate -# code for Python. If you need multi module support use -# $(SWIG_PYTHON_LIB) (provided by the SWIG_MULTI_MODULE_SUPPORT() -# macro) to link against the appropriate library. It contains the -# SWIG Python runtime library that is needed by the type check system -# for example. - -AC_DEFUN([SWIG_PYTHON],[ - AC_REQUIRE([SWIG_PROG]) - AC_REQUIRE([PYTHON_DEVEL]) - if test "$SWIG" != "false" ; then - AC_SUBST(SWIG_PYTHON_LIB,[-lswigpy]) -dnl test ! "x$1" = "xno" && swig_shadow=" -shadow" || swig_shadow="" -dnl AC_SUBST(SWIG_PYTHON_OPT,[-python$swig_shadow]) - AC_SUBST(SWIG_PYTHON_OPT,[-python]) - fi - AC_SUBST(SWIG_PYTHON_CPPFLAGS,[$PYTHON_CPPFLAGS]) -]) - -AC_DEFUN([SWIG_TCL],[ - AC_REQUIRE([SWIG_PROG]) - AC_REQUIRE([TCL_DEVEL]) - if test "$SWIG" != "false" ; then - AC_SUBST(SWIG_TCL_LIB,[-ltcl]) -dnl test ! "x$1" = "xno" && swig_shadow=" -shadow" || swig_shadow="" -dnl AC_SUBST(SWIG_PYTHON_OPT,[-python$swig_shadow]) - AC_SUBST(SWIG_TCL_OPT,[-tcl]) - fi - AC_SUBST(SWIG_TCL_CPPFLAGS,[$TCL_CPPFLAGS]) -]) - -AC_DEFUN([SWIG_GUILE],[ - AC_REQUIRE([SWIG_PROG]) - AC_REQUIRE([GUILE_DEVEL]) - if test "$SWIG" != "false" ; then - AC_SUBST(SWIG_GUILE_LIB,[-lguile]) -dnl test ! "x$1" = "xno" && swig_shadow=" -shadow" || swig_shadow="" -dnl AC_SUBST(SWIG_PYTHON_OPT,[-python$swig_shadow]) - AC_SUBST(SWIG_GUILE_OPT,[-guile]) - fi - AC_SUBST(SWIG_GUILE_CPPFLAGS,[$GUILE_CPPFLAGS]) -]) diff --git a/gr-howto-write-a-block/config/gr_sysv_shm.m4 b/gr-howto-write-a-block/config/gr_sysv_shm.m4 deleted file mode 100644 index db5c8351e..000000000 --- a/gr-howto-write-a-block/config/gr_sysv_shm.m4 +++ /dev/null @@ -1,36 +0,0 @@ -# Check for IPC System V shm support. -*- Autoconf -*- - -# Copyright 2003 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, 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, Boston, MA -# 02110-1301, USA. - -AC_DEFUN([GR_SYSV_SHM], -[ - AC_LANG_SAVE - AC_LANG_C - - AC_CHECK_HEADERS([sys/ipc.h sys/shm.h]) - - save_LIBS="$LIBS" - AC_SEARCH_LIBS(shmat, [cygipc ipc], - [ IPC_LIBS="$LIBS" ], - [ AC_MSG_WARN([SystemV IPC support not found. ]) ] - ) - LIBS="$save_LIBS" - - AC_LANG_RESTORE - AC_SUBST(IPC_LIBS) -]) diff --git a/gr-howto-write-a-block/config/gr_version.m4 b/gr-howto-write-a-block/config/gr_version.m4 deleted file mode 100644 index a7a202238..000000000 --- a/gr-howto-write-a-block/config/gr_version.m4 +++ /dev/null @@ -1,73 +0,0 @@ -dnl Copyright 2009,2010 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([GR_VERSION],[ - dnl Computed version based on version.sh - dnl Does not force recompile on rev change - dnl - dnl Source the variables describing the release version - dnl - dnl MAJOR_VERSION Major release generation (2.x, 3.x, etc.) - dnl API_COMPAT API compatibility version (3.2.x, 3.3.x, etc.) - dnl MINOR_VERSION Minor release version (3.3.0, 3.3.1, etc.) - dnl MAINT_VERSION Pure bugfix additions to make maintenance release - dnl - dnl The last two fields can have 'git' instead of a number to indicate - dnl that this branch is between versions. - . $srcdir/version.sh - - dnl Get git version if available - GR_GIT - - dnl Test if we should use git version - if test "$MINOR_VERSION" == "git"; then - dnl RELEASE: 3.3git-xxx-gxxxxxxxx - dnl DOCVER: 3.3git - dnl LIBVER: 3.3git - RELEASE=$GIT_DESCRIBE - DOCVER=$MAJOR_VERSION.$API_COMPAT$MINOR_VERSION - LIBVER=$MAJOR_VERSION.$API_COMPAT$MINOR_VERSION - else - if test "$MAINT_VERSION" == "git" ; then - dnl RELEASE: 3.3.1git-xxx-gxxxxxxxx - dnl DOCVER: 3.3.1git - dnl LIBVER: 3.3.1git - RELEASE=$GIT_DESCRIBE - DOCVER=$MAJOR_VERSION.$API_COMPAT.$MINOR_VERSION$MAINT_VERSION - LIBVER=$MAJOR_VERSION.$API_COMPAT.$MINOR_VERSION$MAINT_VERSION - else - dnl This is a numbered release. - dnl RELEASE: 3.3.1{.x} - dnl DOCVER: 3.3.1{.x} - dnl LIBVER: 3.3.1{.x} - RELEASE=$MAJOR_VERSION.$API_COMPAT.$MINOR_VERSION - if test "$MAINT_VERSION" != "0"; then - RELEASE=$RELEASE.$MAINT_VERSION - fi - - DOCVER=$RELEASE - LIBVER=$RELEASE - fi - fi - - AC_MSG_NOTICE([GNU Radio Release $RELEASE]) - AC_SUBST(RELEASE) - AC_SUBST(DOCVER) - AC_SUBST(LIBVER) -]) diff --git a/gr-howto-write-a-block/config/lf_cc.m4 b/gr-howto-write-a-block/config/lf_cc.m4 deleted file mode 100644 index b75e1a4c5..000000000 --- a/gr-howto-write-a-block/config/lf_cc.m4 +++ /dev/null @@ -1,41 +0,0 @@ -dnl Autoconf support for C++ -dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> -dnl -dnl This program 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 of the License, or -dnl (at your option) any later version. -dnl -dnl This program 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 this program; if not, write to the Free Software -dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA. -dnl -dnl As a special exception to the GNU General Public License, if you -dnl distribute this file as part of a program that contains a configuration -dnl script generated by Autoconf, you may include it under the same -dnl distribution terms that you use for the rest of that program. - -# ------------------------------------------------------------------------- -# Use this macro to configure your C compiler -# When called the macro does the following things: -# 1. It finds an appropriate C compiler. -# If you passed the flag --with-cc=foo then it uses that -# particular compiler -# 2. Check whether the compiler works. -# 3. Checks whether the compiler accepts the -g -# ------------------------------------------------------------------------- - -AC_DEFUN([LF_CONFIGURE_CC],[ - dnl Sing the song - AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([AC_PROG_CPP])dnl - AC_REQUIRE([AC_AIX])dnl - AC_REQUIRE([AC_ISC_POSIX])dnl - AC_REQUIRE([AC_HEADER_STDC])dnl -]) - diff --git a/gr-howto-write-a-block/config/lf_cxx.m4 b/gr-howto-write-a-block/config/lf_cxx.m4 deleted file mode 100644 index 7cce5f8a4..000000000 --- a/gr-howto-write-a-block/config/lf_cxx.m4 +++ /dev/null @@ -1,50 +0,0 @@ -dnl Autoconf support for C++ -dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> -dnl -dnl This program 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 of the License, or -dnl (at your option) any later version. -dnl -dnl This program 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 this program; if not, write to the Free Software -dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA. -dnl -dnl As a special exception to the GNU General Public License, if you -dnl distribute this file as part of a program that contains a configuration -dnl script generated by Autoconf, you may include it under the same -dnl distribution terms that you use for the rest of that program. - -# ----------------------------------------------------------------- -# This macro should be called to configure your C++ compiler. -# When called, the macro does the following things: -# 1. It finds an appropriate C++ compiler -# If you passed the flag --with-cxx=foo, then it uses that -# particular compiler -# 2. Checks whether the compiler accepts the -g -# ------------------------------------------------------------------ - -AC_DEFUN([LF_CONFIGURE_CXX],[ - AC_REQUIRE([AC_PROG_CXX])dnl - AC_REQUIRE([AC_PROG_CXXCPP])dnl - LF_CXX_PORTABILITY -]) - -# ----------------------------------------------------------------------- -# This macro tests the C++ compiler for various portability problem. -# ----------------------------------------------------------------------- - - -AC_DEFUN([LF_CXX_PORTABILITY],[ - - dnl - dnl Check for common C++ portability problems - dnl - -]) - diff --git a/gr-howto-write-a-block/config/lf_warnings.m4 b/gr-howto-write-a-block/config/lf_warnings.m4 deleted file mode 100644 index d40c77f14..000000000 --- a/gr-howto-write-a-block/config/lf_warnings.m4 +++ /dev/null @@ -1,121 +0,0 @@ -dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> -dnl Copyright (C) 2009 Free Software Foundation, Inc. -dnl -dnl This program 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 of the License, or -dnl (at your option) any later version. -dnl -dnl This program 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 this program; if not, write to the Free Software -dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA. -dnl -dnl As a special exception to the GNU General Public License, if you -dnl distribute this file as part of a program that contains a configuration -dnl script generated by Autoconf, you may include it under the same -dnl distribution terms that you use for the rest of that program. - -# -------------------------------------------------------------------------- -# Check whether the C++ compiler accepts a certain flag -# If it does it adds the flag to lf_CXXFLAGS -# If it does not then it returns an error to lf_ok -# Usage: -# LF_CHECK_CXX_FLAG(-flag1 -flag2 -flag3 ...) -# ------------------------------------------------------------------------- - -AC_DEFUN([LF_CHECK_CXX_FLAG],[ - echo 'void f(){}' > conftest.cc - for i in $1 - do - AC_MSG_CHECKING([whether $CXX accepts $i]) - if test -z "`${CXX} $i -c conftest.cc 2>&1`" - then - lf_CXXFLAGS="${lf_CXXFLAGS} $i" - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi - done - rm -f conftest.cc conftest.o - AC_SUBST(lf_CXXFLAGS) -]) - -# -------------------------------------------------------------------------- -# Check whether the C compiler accepts a certain flag -# If it does it adds the flag to lf_CFLAGS -# If it does not then it returns an error to lf_ok -# Usage: -# LF_CHECK_CC_FLAG(-flag1 -flag2 -flag3 ...) -# ------------------------------------------------------------------------- - -AC_DEFUN([LF_CHECK_CC_FLAG],[ - echo 'void f(){}' > conftest.c - for i in $1 - do - AC_MSG_CHECKING([whether $CC accepts $i]) - if test -z "`${CC} $i -c conftest.c 2>&1`" - then - lf_CFLAGS="${lf_CFLAGS} $i" - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi - done - rm -f conftest.c conftest.o - AC_SUBST(lf_CFLAGS) -]) - -# -------------------------------------------------------------------------- -# Check whether the Fortran compiler accepts a certain flag -# If it does it adds the flag to lf_FFLAGS -# If it does not then it returns an error to lf_ok -# Usage: -# LF_CHECK_F77_FLAG(-flag1 -flag2 -flag3 ...) -# ------------------------------------------------------------------------- - -AC_DEFUN([LF_CHECK_F77_FLAG],[ - cat << EOF > conftest.f -c....:++++++++++++++++++++++++ - PROGRAM MAIN - PRINT*,'Hello World!' - END -EOF - for i in $1 - do - AC_MSG_CHECKING([whether $F77 accepts $i]) - if test -z "`${F77} $i -c conftest.f 2>&1`" - then - lf_FFLAGS="${lf_FFLAGS} $i" - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi - done - rm -f conftest.f conftest.o - AC_SUBST(lf_FFLAGS) -]) - -# ---------------------------------------------------------------------- -# Enable compiler warnings. -# Call this command AFTER you have configured ALL your compilers. -# ---------------------------------------------------------------------- - -AC_DEFUN([LF_SET_WARNINGS],[ - dnl Warnings for the two main compilers - dnl add -Wextra when you're got time to fix a bunch of them ;-) - cc_warning_flags="-Wall -Werror-implicit-function-declaration" - cxx_warning_flags="-Wall -Woverloaded-virtual" - if test -n "${CC}" - then - LF_CHECK_CC_FLAG($cc_warning_flags) - fi - if test -n "${CXX}" - then - LF_CHECK_CXX_FLAG($cxx_warning_flags) - fi -]) diff --git a/gr-howto-write-a-block/config/lf_x11.m4 b/gr-howto-write-a-block/config/lf_x11.m4 deleted file mode 100644 index 460cd605f..000000000 --- a/gr-howto-write-a-block/config/lf_x11.m4 +++ /dev/null @@ -1,39 +0,0 @@ -dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> -dnl -dnl This program 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 of the License, or -dnl (at your option) any later version. -dnl -dnl This program 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 this program; if not, write to the Free Software -dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA. -dnl -dnl As a special exception to the GNU General Public License, if you -dnl distribute this file as part of a program that contains a configuration -dnl script generated by Autoconf, you may include it under the same -dnl distribution terms that you use for the rest of that program. - - -#----------------------------------------------------------------------- -# This macro searches for Xlib and when it finds it it adds the -# appropriate flags to CXXFLAGS and export the link sequence to -# the variable XLIB. -# In your configure.in file add: -# LF_PATH_XLIB -# In your Makefile.am add -# program_LDADD = .... $(XLIB) -#------------------------------------------------------------------------ - -AC_DEFUN([LF_PATH_XLIB],[ - AC_PATH_XTRA - CXXFLAGS="$CXXFLAGS $X_CFLAGS" - XLIB="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" - AC_SUBST(XLIB) -]) - diff --git a/gr-howto-write-a-block/config/mkstemp.m4 b/gr-howto-write-a-block/config/mkstemp.m4 deleted file mode 100644 index 2d1fbee9b..000000000 --- a/gr-howto-write-a-block/config/mkstemp.m4 +++ /dev/null @@ -1,78 +0,0 @@ -#serial 4 - -# On some hosts (e.g., HP-UX 10.20, SunOS 4.1.4, Solaris 2.5.1), mkstemp has a -# silly limit that it can create no more than 26 files from a given template. -# Other systems lack mkstemp altogether. -# On OSF1/Tru64 V4.0F, the system-provided mkstemp function can create -# only 32 files per process. -# On systems like the above, arrange to use the replacement function. -AC_DEFUN([UTILS_FUNC_MKSTEMP], -[dnl - AC_REPLACE_FUNCS(mkstemp) - if test $ac_cv_func_mkstemp = no; then - utils_cv_func_mkstemp_limitations=yes - else - AC_CACHE_CHECK([for mkstemp limitations], - utils_cv_func_mkstemp_limitations, - [ - AC_TRY_RUN([ -# include <stdlib.h> - int main () - { - int i; - for (i = 0; i < 70; i++) - { - char template[] = "conftestXXXXXX"; - int fd = mkstemp (template); - if (fd == -1) - exit (1); - close (fd); - } - exit (0); - } - ], - utils_cv_func_mkstemp_limitations=no, - utils_cv_func_mkstemp_limitations=yes, - utils_cv_func_mkstemp_limitations=yes - ) - ] - ) - fi - - if test $utils_cv_func_mkstemp_limitations = yes; then - AC_LIBOBJ(mkstemp) - AC_LIBOBJ(tempname) - AC_DEFINE(mkstemp, rpl_mkstemp, - [Define to rpl_mkstemp if the replacement function should be used.]) - gl_PREREQ_MKSTEMP - jm_PREREQ_TEMPNAME - fi -]) - -# Prerequisites of lib/mkstemp.c. -AC_DEFUN([gl_PREREQ_MKSTEMP], -[ - AH_BOTTOM( - [ - #ifndef HAVE_MKSTEMP - #ifdef __cplusplus - extern "C" { - #endif - int rpl_mkstemp (char *templ); - #ifdef __cplusplus - } - #endif - #endif - ]) -]) - -# Prerequisites of lib/tempname.c. -AC_DEFUN([jm_PREREQ_TEMPNAME], -[ - AC_REQUIRE([AC_HEADER_STAT]) - AC_CHECK_HEADERS_ONCE(fcntl.h sys/time.h unistd.h) - AC_CHECK_HEADERS(stdint.h) - AC_CHECK_FUNCS(__secure_getenv gettimeofday lstat) - AC_CHECK_DECLS_ONCE(getenv) - # AC_REQUIRE([jm_AC_TYPE_UINTMAX_T]) -]) diff --git a/gr-howto-write-a-block/config/onceonly.m4 b/gr-howto-write-a-block/config/onceonly.m4 deleted file mode 100644 index f6fec37cb..000000000 --- a/gr-howto-write-a-block/config/onceonly.m4 +++ /dev/null @@ -1,63 +0,0 @@ -# onceonly.m4 serial 3 -dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. -dnl This file is free software, distributed under the terms of the GNU -dnl General Public License. As a special exception to the GNU General -dnl Public License, this file may be distributed as part of a program -dnl that contains a configuration script generated by Autoconf, under -dnl the same distribution terms as the rest of that program. - -dnl This file defines some "once only" variants of standard autoconf macros. -dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS -dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS -dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS -dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC -dnl The advantage is that the check for each of the headers/functions/decls -dnl will be put only once into the 'configure' file. It keeps the size of -dnl the 'configure' file down, and avoids redundant output when 'configure' -dnl is run. -dnl The drawback is that the checks cannot be conditionalized. If you write -dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi -dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to -dnl empty, and the check will be inserted before the body of the AC_DEFUNed -dnl function. - -dnl Autoconf version 2.57 or newer is recommended. -AC_PREREQ(2.54) - -# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of -# AC_CHECK_HEADERS(HEADER1 HEADER2 ...). -AC_DEFUN([AC_CHECK_HEADERS_ONCE], [ - : - AC_FOREACH([gl_HEADER_NAME], [$1], [ - AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(defn([gl_HEADER_NAME]), - [-./], [___])), [ - AC_CHECK_HEADERS(gl_HEADER_NAME) - ]) - AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME, - [-./], [___]))) - ]) -]) - -# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of -# AC_CHECK_FUNCS(FUNC1 FUNC2 ...). -AC_DEFUN([AC_CHECK_FUNCS_ONCE], [ - : - AC_FOREACH([gl_FUNC_NAME], [$1], [ - AC_DEFUN([gl_CHECK_FUNC_]defn([gl_FUNC_NAME]), [ - AC_CHECK_FUNCS(defn([gl_FUNC_NAME])) - ]) - AC_REQUIRE([gl_CHECK_FUNC_]defn([gl_FUNC_NAME])) - ]) -]) - -# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of -# AC_CHECK_DECLS(DECL1, DECL2, ...). -AC_DEFUN([AC_CHECK_DECLS_ONCE], [ - : - AC_FOREACH([gl_DECL_NAME], [$1], [ - AC_DEFUN([gl_CHECK_DECL_]defn([gl_DECL_NAME]), [ - AC_CHECK_DECLS(defn([gl_DECL_NAME])) - ]) - AC_REQUIRE([gl_CHECK_DECL_]defn([gl_DECL_NAME])) - ]) -]) diff --git a/gr-howto-write-a-block/config/pkg.m4 b/gr-howto-write-a-block/config/pkg.m4 deleted file mode 100644 index 2d4d96109..000000000 --- a/gr-howto-write-a-block/config/pkg.m4 +++ /dev/null @@ -1,201 +0,0 @@ -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# -# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. -# Copyright © 2008 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 2 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- -AC_DEFUN([PKG_PROG_PKG_CONFIG], -[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_default([$1], [0.18]) - AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi - -fi[]dnl -])# PKG_PROG_PKG_CONFIG - -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# -# Similar to PKG_CHECK_MODULES, make sure that the first instance of -# this or PKG_CHECK_MODULES is called, or make sure to call -# PKG_CHECK_EXISTS manually -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_EXISTS], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -if test -n "$PKG_CONFIG" && \ - AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_ifval([$2], [$2], [:]) -m4_ifvaln([$3], [else - $3])dnl -fi]) - - -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- -m4_define([_PKG_CONFIG], -[if test -n "$PKG_CONFIG"; then - if test -n "$$1"; then - pkg_cv_[]$1="$$1" - else - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - fi -else - pkg_failed=untried -fi[]dnl -])# _PKG_CONFIG - -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- -AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi[]dnl -])# _PKG_SHORT_ERRORS_SUPPORTED - - -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) -# -# E.g., -# PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) -# defines: -# -# GSTUFF_LIBS -# GSTUFF_CFLAGS -# GSTUFF_INCLUDEDIR -# GSTUFF_CPPFLAGS # the -I, -D and -U's out of CFLAGS -# -# see pkg-config man page also defines GSTUFF_PKG_ERRORS on error -# -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -# -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_MODULES],[ -AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl - -AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl -AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl -AC_ARG_VAR([$1][_INCLUDEDIR], [includedir for $1, overriding pkg-config])dnl - -pkg_failed=no -AC_MSG_CHECKING([for $1]) - -_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) - -if test x$cross_compiling = xyes -then - dnl _PKG_CONFIG([$1][_LIBS], [libs-only-l --static], [$2]) - _PKG_CONFIG([$1][_LIBS], [libs --static], [$2]) - dnl prune out any -L/lib or -L/usr/lib since they're pointing to the wrong filesystem root - _pkg_tmp= - for flag in [$]pkg_cv_[$1][_LIBS]; do - case $flag in - (-L/lib* | -L/usr/lib* ) ;; # ignore - (*) _pkg_tmp="$_pkg_tmp $flag" ;; - esac - done - pkg_cv_[$1][_LIBS]="$_pkg_tmp" -else - _PKG_CONFIG([$1][_LIBS], [libs --static], [$2]) -fi - -_PKG_CONFIG([$1][_INCLUDEDIR], [variable=includedir], [$2]) - - -m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS -and $1[]_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details.]) - -if test $pkg_failed = yes; then - _PKG_SHORT_ERRORS_SUPPORTED - if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` - else - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` - fi - # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - - ifelse([$4], , [AC_MSG_ERROR(dnl -[Package requirements ($2) were not met: - -$$1_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -_PKG_TEXT -])], - [AC_MSG_RESULT([no]) - $4]) -elif test $pkg_failed = untried; then - ifelse([$4], , [AC_MSG_FAILURE(dnl -[The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -_PKG_TEXT - -To get pkg-config, see <http://pkg-config.freedesktop.org/>.])], - [$4]) -else - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS - $1[]_INCLUDEDIR=$pkg_cv_[]$1[]_INCLUDEDIR - - $1[]_CPPFLAGS="" - for flag in $$1[]_CFLAGS; do - case $flag in - -I* | -D* | -U*) $1[]_CPPFLAGS="$$1[]_CPPFLAGS $flag" ;; - esac - done - pkg_cv_[]$1[]_CPPFLAGS=$$1[]_CPPFLAGS - AC_SUBST($1[]_CPPFLAGS) - - AC_MSG_RESULT([yes]) - ifelse([$3], , :, [$3]) -fi[]dnl -])# PKG_CHECK_MODULES diff --git a/gr-howto-write-a-block/config/usrp_fusb_tech.m4 b/gr-howto-write-a-block/config/usrp_fusb_tech.m4 deleted file mode 100644 index b99cf2432..000000000 --- a/gr-howto-write-a-block/config/usrp_fusb_tech.m4 +++ /dev/null @@ -1,87 +0,0 @@ -dnl -dnl Copyright 2003,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. -dnl - -# $1 is $enable_usrp: -# yes : do these tests -# no : do not do these tests -# "" : do these tests - -AC_DEFUN([USRP_SET_FUSB_TECHNIQUE],[ - req_libusb1=no - USE_LIBUSB1=0 - AC_ARG_WITH([fusb-tech], - AC_HELP_STRING([--with-fusb-tech=OS], - [Set fast USB technique (default=auto)]), - [cf_with_fusb_tech="$withval"], - [cf_with_fusb_tech="$host_os"]) - if test [x]$1 != xno; then - case "$cf_with_fusb_tech" in - libusb1*) - FUSB_TECH=libusb1 - req_libusb1=yes - USE_LIBUSB1=1 - ;; - linux*) - AC_CHECK_HEADER([linux/usbdevice_fs.h], - [x_have_usbdevice_fs_h=yes], - [x_have_usbdevice_fs_h=no]) - if test x${x_have_usbdevice_fs_h} = xyes; then - FUSB_TECH=linux - else - FUSB_TECH=generic - fi - ;; - darwin*) - FUSB_TECH=darwin - ;; - cygwin*|win*|mingw*) - FUSB_TECH=win32 - ;; - *bsd*) - AC_MSG_CHECKING([for RA/WB]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <dev/usb/usb.h>]], - [[struct usb_bulk_ra_wb_opt o; - ioctl(0, USB_SET_BULK_RA, &o);]])], - [FUSB_TECH=ra_wb], - [FUSB_TECH=generic]) - ;; - *) - FUSB_TECH=generic - ;; - esac - - AC_MSG_CHECKING([for fast usb technique to use]) - AC_MSG_RESULT($FUSB_TECH) - AC_SUBST(FUSB_TECH) - fi - - AM_CONDITIONAL(FUSB_TECH_darwin, test x$FUSB_TECH = xdarwin) - AM_CONDITIONAL(FUSB_TECH_win32, test x$FUSB_TECH = xwin32) - AM_CONDITIONAL(FUSB_TECH_generic, test x$FUSB_TECH = xgeneric) - AM_CONDITIONAL(FUSB_TECH_linux, test x$FUSB_TECH = xlinux) - AM_CONDITIONAL(FUSB_TECH_libusb1, test x$FUSB_TECH = xlibusb1) - AM_CONDITIONAL(FUSB_TECH_ra_wb, test x$FUSB_TECH = xra_wb) - - AC_SUBST(USE_LIBUSB1) - AC_CONFIG_FILES([\ - usrp/host/include/usrp/libusb_types.h \ - ]) -]) diff --git a/gr-howto-write-a-block/config/usrp_libusb.m4 b/gr-howto-write-a-block/config/usrp_libusb.m4 deleted file mode 100644 index cb3130c87..000000000 --- a/gr-howto-write-a-block/config/usrp_libusb.m4 +++ /dev/null @@ -1,48 +0,0 @@ -dnl Copyright 2003,2008 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([USRP_LIBUSB], [ - libusbok=yes - PKG_CHECK_MODULES(USB, libusb, [], [ - AC_LANG_PUSH(C) - - AC_CHECK_HEADERS([usb.h], [], [libusbok=no; AC_MSG_RESULT([USRP requires libusb. usb.h not found. See http://libusb.sf.net])]) - - save_LIBS="$LIBS" - case "$host_os" in - darwin*) - LIBS="$LIBS -lIOKit" - ;; - *) ;; - esac - - AC_SEARCH_LIBS(usb_bulk_write, [usb], [USB_LIBS="$LIBS"], [libusbok=no; AC_MSG_RESULT([USRP requires libusb. usb_bulk_write not found. See http://libusb.sf.net])]) - - LIBS="$save_LIBS" - - AC_LANG_POP - ]) - - if test x$libusbok = xyes; then - AC_SUBST(USB_LIBS) - ifelse([$1], , :, [$1]) - else - ifelse([$2], , :, [$2]) - fi -]) diff --git a/gr-howto-write-a-block/config/usrp_sdcc.m4 b/gr-howto-write-a-block/config/usrp_sdcc.m4 deleted file mode 100644 index 86f6429e5..000000000 --- a/gr-howto-write-a-block/config/usrp_sdcc.m4 +++ /dev/null @@ -1,75 +0,0 @@ -# Check for sdcc support. -*- Autoconf -*- - -# Copyright 2004 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, 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, Boston, MA -# 02110-1301, USA. - -AC_DEFUN([USRP_SDCC], -[ - sdccok=yes - AC_CHECK_PROG(XCC, sdcc, sdcc -mmcs51 --no-xinit-opt,no) - AC_CHECK_PROG(XAS, asx8051, asx8051 -plosgff,no) - - if test "$XCC" = "no" -o "$XAS" = "no" ; then - AC_MSG_RESULT([USRP requires sdcc. sdcc not found. See http://sdcc.sf.net]) - sdccok=no - else - sdcc_version_min=$1 - - sdcc_version=`sdcc --version 2>&1 | \ - sed 's/\(SDCC.* \)\([[0-9]]*\.[[0-9]]*\.[[0-9]]*\)\( .*$\)/\2/'` - - AC_MSG_CHECKING([sdcc_version "$sdcc_version"]) - - sdcc_major_version=`echo $sdcc_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - sdcc_minor_version=`echo $sdcc_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - sdcc_micro_version=`echo $sdcc_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - - sdcc_major_min=`echo $sdcc_version_min | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - sdcc_minor_min=`echo $sdcc_version_min | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - sdcc_micro_min=`echo $sdcc_version_min | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - - sdcc_version_proper=`expr \ - "$sdcc_major_version" \> "$sdcc_major_min" \| \ - "$sdcc_major_version" \= "$sdcc_major_min" \& \ - "$sdcc_minor_version" \> "$sdcc_minor_min" \| \ - "$sdcc_major_version" \= "$sdcc_major_min" \& \ - "$sdcc_minor_version" \= "$sdcc_minor_min" \& \ - "$sdcc_micro_version" \>= "$sdcc_micro_min" ` - - if test "$sdcc_version_proper" = "1" ; then - AC_MSG_RESULT([$sdcc_major_version.$sdcc_minor_version.$sdcc_micro_version]) - else - sdccok=no - AC_MSG_RESULT([USRP requires sdcc >= $sdcc_version_min. sdcc not found. See http://sdcc.sf.net]) - fi - - AC_SUBST(XCC) - AC_SUBST(XAS) - fi - - if test $sdccok = yes; then - ifelse([$2], , :, [$2]) - else - ifelse([$3], , :, [$3]) - fi -]) diff --git a/gr-howto-write-a-block/configure.ac b/gr-howto-write-a-block/configure.ac deleted file mode 100644 index ef5c98eeb..000000000 --- a/gr-howto-write-a-block/configure.ac +++ /dev/null @@ -1,100 +0,0 @@ -dnl -dnl Copyright 2004,2005,2007,2008,2009,2010 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. -dnl - - -AC_INIT -AC_PREREQ(2.57) -AC_CONFIG_AUX_DIR([.]) - -dnl Set the prefix to the default when --prefix is not specified. -dnl This is critical for variable substitutions in the configure. -if test "${prefix}" = "NONE"; then - prefix=${ac_default_prefix} -fi - -AC_CANONICAL_BUILD -AC_CANONICAL_HOST -AC_CANONICAL_TARGET - -GR_VERSION -dnl ustar required to have pathnames > 99 chars -_AM_SET_OPTION([tar-ustar]) -AM_INIT_AUTOMAKE(gr-howto-write-a-block,$RELEASE) - -dnl This is kind of non-standard, but it sure shortens up this file :-) -m4_include([config/gr_standalone.m4]) -GR_STANDALONE - -dnl Check for any libraries you need -dnl AC_CHECK_LIBRARY - -dnl Check for header files you need -dnl AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/ioctl.h sys/time.h unistd.h) -dnl AC_CHECK_HEADERS(sys/mman.h) - -dnl Checks for library functions. -dnl AC_CHECK_FUNCS([]) - -dnl We pick up the boost cppflags, cxxflags and thread lib via GNURADIO_CORE -dnl -dnl If you need additional boost libraries, you'll need to -dnl uncomment AX_BOOST_BASE, plus some of the following: -dnl -dnl calls AC_SUBST(BOOST_CPPFLAGS), AC_SUBST(BOOST_LDFLAGS) and defines HAVE_BOOST -dnl AX_BOOST_BASE([1.35]) -dnl -dnl All the rest of these call AC_SUBST(BOOST_<foo>_LIB) and define HAVE_BOOST_<foo> -dnl -dnl AX_BOOST_DATE_TIME -dnl AX_BOOST_FILESYSTEM -dnl AX_BOOST_IOSTREAMS -dnl AX_BOOST_PROGRAM_OPTIONS -dnl AX_BOOST_REGEX -dnl AX_BOOST_SERIALIZATION -dnl AX_BOOST_SIGNALS -dnl AX_BOOST_SYSTEM -dnl AX_BOOST_TEST_EXEC_MONITOR -dnl AX_BOOST_UNIT_TEST_FRAMEWORK -dnl AX_BOOST_WSERIALIZATION - -AC_CONFIG_FILES([\ - Makefile \ - setup_guile_test_env \ - apps/Makefile \ - config/Makefile \ - grc/Makefile \ - lib/Makefile \ - python/Makefile \ - python/run_tests \ - swig/Makefile \ - swig/run_guile_tests \ - ]) - -dnl run_tests is created from run_tests.in. Make it executable. -AC_CONFIG_COMMANDS([run_tests], - [ - chmod +x python/run_tests - chmod +x swig/run_guile_tests - ]) - -AC_OUTPUT - -echo Configured gr-howto-write-a-block release $RELEASE for build. diff --git a/gr-howto-write-a-block-cmake/docs/CMakeLists.txt b/gr-howto-write-a-block/docs/CMakeLists.txt index 1491898a1..f16fbf6db 100644 --- a/gr-howto-write-a-block-cmake/docs/CMakeLists.txt +++ b/gr-howto-write-a-block/docs/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/CMakeLists.txt b/gr-howto-write-a-block/docs/doxygen/CMakeLists.txt index 7826630e8..1b4479929 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/CMakeLists.txt +++ b/gr-howto-write-a-block/docs/doxygen/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/Doxyfile.in b/gr-howto-write-a-block/docs/doxygen/Doxyfile.in index 7105c0f39..cb6a913bb 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/Doxyfile.in +++ b/gr-howto-write-a-block/docs/doxygen/Doxyfile.in @@ -14,204 +14,204 @@ # Project related configuration options #--------------------------------------------------------------------------- -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See # http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = "GNU Radio's HOWTO Package" -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = +PROJECT_NUMBER = -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = +OUTPUT_DIRECTORY = -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, -# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, -# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, +# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, +# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, # Spanish, Swedish, and Ukrainian. OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" -ABBREVIATE_BRIEF = +ABBREVIATE_BRIEF = -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = YES -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the # path to strip. -STRIP_FROM_PATH = +STRIP_FROM_PATH = -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. -STRIP_FROM_INC_PATH = +STRIP_FROM_INC_PATH = -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = NO -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = YES -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO -# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. -ALIASES = +ALIASES = -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for # Fortran. OPTIMIZE_FOR_FORTRAN = NO -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for # VHDL. OPTIMIZE_OUTPUT_VHDL = NO -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = YES @@ -221,58 +221,58 @@ BUILTIN_STL_SUPPORT = YES CPP_CLI_SUPPORT = NO -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen to replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the # methods anyway, you should set this option to NO. IDL_PROPERTY_SUPPORT = YES -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. TYPEDEF_HIDES_STRUCT = NO -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to # determine which symbols to keep in memory and which to flush to disk. # When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penality. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will rougly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols SYMBOL_CACHE_SIZE = 4 @@ -281,305 +281,305 @@ SYMBOL_CACHE_SIZE = 4 # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file +# If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default # anonymous namespace are hidden. EXTRACT_ANON_NSPACES = NO -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. SORT_GROUP_NAMES = NO -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the +# Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = NO -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = NO -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = NO -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= NO -# The ENABLED_SECTIONS tag can be used to enable conditional +# The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. -ENABLED_SECTIONS = +ENABLED_SECTIONS = -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO # Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the +# This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES. SHOW_FILES = YES -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the # Namespaces page. This will remove the Namespaces entry from the Quick Index # and from the Folder Tree View (if specified). The default is YES. SHOW_NAMESPACES = NO -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command <command> <input-file>, where <command> is the value of -# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file -# provided by doxygen. Whatever the program writes to standard output +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command <command> <input-file>, where <command> is the value of +# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file +# provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. -FILE_VERSION_FILTER = +FILE_VERSION_FILTER = -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by -# doxygen. The layout file controls the global structure of the generated output files -# in an output format independent way. The create the layout file that represents -# doxygen's defaults, run doxygen with the -l option. You can optionally specify a -# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name # of the layout file. -LAYOUT_FILE = +LAYOUT_FILE = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- -# The QUIET tag can be used to turn on/off the messages that are generated +# The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = YES -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text " -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written # to stderr. -WARN_LOGFILE = +WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = @top_srcdir@ @top_builddir@ -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 FILE_PATTERNS = *.h \ *.dox -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = @abs_top_builddir@/docs/doxygen/html \ @@ -588,16 +588,16 @@ EXCLUDE = @abs_top_builddir@/docs/doxygen/html \ @abs_top_builddir@/_CPack_Packages \ @abs_top_srcdir@/cmake -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = */.deps/* \ @@ -609,10 +609,10 @@ EXCLUDE_PATTERNS = */.deps/* \ */qa_*.h \ */qa_*.py -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = ad9862 \ @@ -636,53 +636,53 @@ EXCLUDE_SYMBOLS = ad9862 \ *wxapt_rx_block* \ *example_signal* -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see # the \include command). -EXAMPLE_PATH = +EXAMPLE_PATH = -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left # blank all files are included. -EXAMPLE_PATTERNS = +EXAMPLE_PATTERNS = -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see # the \image command). -IMAGE_PATH = +IMAGE_PATH = -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command <filter> <input-file>, where <filter> -# is the value of the INPUT_FILTER tag, and <input-file> is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command <filter> <input-file>, where <filter> +# is the value of the INPUT_FILTER tag, and <input-file> is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. -INPUT_FILTER = +INPUT_FILTER = -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. FILTER_PATTERNS = *.py=@top_srcdir@/gnuradio-core/doc/other/doxypy.py -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO @@ -691,32 +691,32 @@ FILTER_SOURCE_FILES = NO # configuration options related to source browsing #--------------------------------------------------------------------------- -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO -# Setting the INLINE_SOURCES tag to YES will include the body +# Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = NO -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES @@ -728,16 +728,16 @@ REFERENCES_RELATION = YES REFERENCES_LINK_SOURCE = YES -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES @@ -746,130 +746,130 @@ VERBATIM_HEADERS = YES # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = YES -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. -IGNORE_PREFIX = +IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = @enable_html_docs@ -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a # standard header. -HTML_HEADER = +HTML_HEADER = -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a # standard footer. -HTML_FOOTER = +HTML_FOOTER = -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! -HTML_STYLESHEET = +HTML_STYLESHEET = -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). HTML_DYNAMIC_SECTIONS = NO -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. GENERATE_DOCSET = NO -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) # can be grouped. DOCSET_FEEDNAME = "Doxygen generated docs" -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. DOCSET_BUNDLE_ID = org.doxygen.Project -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be # written to the html output directory. -CHM_FILE = +CHM_FILE = -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. -HHC_LOCATION = +HHC_LOCATION = -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO @@ -878,58 +878,58 @@ GENERATE_CHI = NO # is used to encode HtmlHelp index (hhk), content (hhc) and project file # content. -CHM_INDEX_ENCODING = +CHM_INDEX_ENCODING = -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO -# The TOC_EXPAND flag can be set to YES to add extra items for group members +# The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = YES -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER -# are set, an additional index file will be generated that can be used as input for -# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated # HTML documentation. GENERATE_QHP = NO -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. # The path specified is relative to the HTML output folder. -QCH_FILE = +QCH_FILE = -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see # <a href="http://doc.trolltech.com/qthelpproject.html#namespace">Qt Help Project / Namespace</a>. QHP_NAMESPACE = org.doxygen.Project -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see # <a href="http://doc.trolltech.com/qthelpproject.html#virtual-folders">Qt Help Project / Virtual Folders</a>. QHP_VIRTUAL_FOLDER = doc -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated # .qhp file . -QHG_LOCATION = +QHG_LOCATION = -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = YES -# This tag can be used to set the number of enum values (range [1..20]) +# This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 @@ -937,11 +937,11 @@ ENUM_VALUES_PER_LINE = 4 # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. # If the tag value is set to FRAME, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. Other possible values +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. Other possible values # for this tag are: HIERARCHIES, which will generate the Groups, Directories, # and Class Hierarchy pages using a tree view instead of an ordered list; # ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which @@ -951,16 +951,16 @@ ENUM_VALUES_PER_LINE = 4 GENERATE_TREEVIEW = YES -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 180 -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory # to force them to be regenerated. FORMULA_FONTSIZE = 10 @@ -969,74 +969,74 @@ FORMULA_FONTSIZE = 10 # configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = @enable_latex_docs@ -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = letter -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. -EXTRA_PACKAGES = +EXTRA_PACKAGES = -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! -LATEX_HEADER = +LATEX_HEADER = -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = YES -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO @@ -1045,68 +1045,68 @@ LATEX_HIDE_INDICES = NO # configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. -RTF_STYLESHEET_FILE = +RTF_STYLESHEET_FILE = -# Set optional variables used in the generation of an rtf document. +# Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. -RTF_EXTENSIONS_FILE = +RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man -# The MAN_EXTENSION tag determines the extension that is added to +# The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO @@ -1115,33 +1115,33 @@ MAN_LINKS = NO # configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = @enable_xml_docs@ -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_SCHEMA = +XML_SCHEMA = -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_DTD = +XML_DTD = -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = NO @@ -1150,10 +1150,10 @@ XML_PROGRAMLISTING = NO # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO @@ -1162,343 +1162,343 @@ GENERATE_AUTOGEN_DEF = NO # configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. -PERLMOD_MAKEVAR_PREFIX = +PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by # the preprocessor. -INCLUDE_PATH = +INCLUDE_PATH = -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. -INCLUDE_FILE_PATTERNS = +INCLUDE_FILE_PATTERNS = -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator # instead of the = operator. -PREDEFINED = +PREDEFINED = -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- -# Configuration::additions related to external references +# Configuration::additions related to external references #--------------------------------------------------------------------------- -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen +# If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. -TAGFILES = +TAGFILES = -# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. -GENERATE_TAGFILE = +GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES -# The PERL_PATH should be the absolute path and name of the perl script +# The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- -# Configuration options related to the dot tool +# Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. -MSCGEN_PATH = +MSCGEN_PATH = -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = @HAVE_DOT@ -# By default doxygen will write a font called FreeSans.ttf to the output -# directory and reference it in all dot files that doxygen generates. This -# font does not include all possible unicode characters however, so when you need -# these (or just want a differently looking font) you can specify the font name -# using DOT_FONTNAME. You need need to make sure dot is able to find the font, -# which can be done by putting it in a standard location or by setting the -# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory # containing the font. DOT_FONTNAME = FreeSans -# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. # The default size is 10pt. DOT_FONTSIZE = 10 -# By default doxygen will tell dot to use the output directory to look for the -# FreeSans.ttf font (which doxygen will put there itself). If you specify a -# different font using DOT_FONTNAME you can set the path where dot +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot # can find it using this tag. -DOT_FONTPATH = +DOT_FONTPATH = -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = NO -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO -# If set to YES, the inheritance and collaboration graphs will show the +# If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES -# If the CALL_GRAPH and HAVE_DOT options are set to YES then -# doxygen will generate a call dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable call graphs +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = NO -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -# doxygen will generate a caller dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable caller +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png -# The tag DOT_PATH can be used to specify the path where the dot tool can be +# The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. -DOT_PATH = +DOT_PATH = -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the # \dotfile command). -DOTFILE_DIRS = +DOTFILE_DIRS = -# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the -# number of direct children of the root node in a graph is already larger than -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, because dot on Windows does not -# seem to support this out of the box. Warning: Depending on the platform used, -# enabling this option may lead to badly anti-aliased labels on the edges of +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of # a graph (i.e. they become hard to read). DOT_TRANSPARENT = NO -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = YES -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- -# Configuration::additions related to the search engine +# Configuration::additions related to the search engine #--------------------------------------------------------------------------- -# The SEARCHENGINE tag specifies whether or not a search engine should be +# The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/Doxyfile.swig_doc.in b/gr-howto-write-a-block/docs/doxygen/Doxyfile.swig_doc.in index 50b8aa81d..50b8aa81d 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/Doxyfile.swig_doc.in +++ b/gr-howto-write-a-block/docs/doxygen/Doxyfile.swig_doc.in diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/__init__.py b/gr-howto-write-a-block/docs/doxygen/doxyxml/__init__.py index c9786c3f8..5cd0b3c6c 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/__init__.py +++ b/gr-howto-write-a-block/docs/doxygen/doxyxml/__init__.py @@ -1,23 +1,23 @@ # # Copyright 2010 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. -# +# """ Python interface to contents of doxygen xml documentation. @@ -27,7 +27,7 @@ doxygen-generated xml used in this example. >>> # Parse the doxygen docs. >>> import os ->>> this_dir = os.path.dirname(globals()['__file__']) +>>> this_dir = os.path.dirname(globals()['__file__']) >>> xml_path = this_dir + "/example/xml/" >>> di = DoxyIndex(xml_path) @@ -68,7 +68,7 @@ from doxyindex import DoxyIndex, DoxyFunction, DoxyParam, DoxyClass, DoxyFile, D def _test(): import os - this_dir = os.path.dirname(globals()['__file__']) + this_dir = os.path.dirname(globals()['__file__']) xml_path = this_dir + "/example/xml/" di = DoxyIndex(xml_path) # Get the Aadvark class diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/base.py b/gr-howto-write-a-block/docs/doxygen/doxyxml/base.py index 097e3f15b..e8f026ab9 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/base.py +++ b/gr-howto-write-a-block/docs/doxygen/doxyxml/base.py @@ -1,23 +1,23 @@ # # Copyright 2010 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. -# +# """ A base class is created. @@ -144,7 +144,7 @@ class Base(object): self._in_category[cat] = [mem for mem in self._members if cat.includes(mem)] return self._in_category[cat] - + def get_member(self, name, cat=None): self.confirm_no_error() # Check if it's in a namespace or class. @@ -173,7 +173,7 @@ class Base(object): def members(self): self.confirm_no_error() return self._members - + def process_memberdefs(self): mdtss = [] for sec in self._retrieved_data.compounddef.sectiondef: @@ -188,7 +188,7 @@ class Base(object): if pair not in uniques: uniques.add(pair) self._members.append(converted) - + def retrieve_data(self): filename = os.path.join(self._xml_path, self.refid + '.xml') try: @@ -197,7 +197,7 @@ class Base(object): print('Error in xml in file %s' % filename) self._error = True self._retrieved_data = None - + def check_parsed(self): if not self._parsed: self._parse() diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/doxyindex.py b/gr-howto-write-a-block/docs/doxygen/doxyxml/doxyindex.py index 42aa4ca58..0132ab86f 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/doxyindex.py +++ b/gr-howto-write-a-block/docs/doxygen/doxyxml/doxyindex.py @@ -1,23 +1,23 @@ # # Copyright 2010 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. -# +# """ Classes providing more user-friendly interfaces to the doxygen xml docs than the generated classes provide. @@ -40,7 +40,7 @@ class DoxyIndex(Base): if self._parsed: return super(DoxyIndex, self)._parse() - self._root = index.parse(os.path.join(self._xml_path, 'index.xml')) + self._root = index.parse(os.path.join(self._xml_path, 'index.xml')) for mem in self._root.compound: converted = self.convert_mem(mem) # For files we want the contents to be accessible directly @@ -78,14 +78,14 @@ class DoxyCompMem(Base): bd = description(getattr(parse_data, 'briefdescription', None)) dd = description(getattr(parse_data, 'detaileddescription', None)) self._data['brief_description'] = bd - self._data['detailed_description'] = dd + self._data['detailed_description'] = dd class DoxyCompound(DoxyCompMem): pass class DoxyMember(DoxyCompMem): pass - + class DoxyFunction(DoxyMember): @@ -111,7 +111,7 @@ Base.mem_classes.append(DoxyFunction) class DoxyParam(DoxyMember): - + __module__ = "gnuradio.utils.doxyxml" def _parse(self): @@ -126,11 +126,11 @@ class DoxyParam(DoxyMember): declname = property(lambda self: self.data()['declname']) class DoxyClass(DoxyCompound): - + __module__ = "gnuradio.utils.doxyxml" kind = 'class' - + def _parse(self): if self._parsed: return @@ -147,14 +147,14 @@ class DoxyClass(DoxyCompound): detailed_description = property(lambda self: self.data()['detailed_description']) Base.mem_classes.append(DoxyClass) - + class DoxyFile(DoxyCompound): - + __module__ = "gnuradio.utils.doxyxml" kind = 'file' - + def _parse(self): if self._parsed: return @@ -164,7 +164,7 @@ class DoxyFile(DoxyCompound): if self._error: return self.process_memberdefs() - + brief_description = property(lambda self: self.data()['brief_description']) detailed_description = property(lambda self: self.data()['detailed_description']) @@ -172,16 +172,16 @@ Base.mem_classes.append(DoxyFile) class DoxyNamespace(DoxyCompound): - + __module__ = "gnuradio.utils.doxyxml" kind = 'namespace' - + Base.mem_classes.append(DoxyNamespace) class DoxyGroup(DoxyCompound): - + __module__ = "gnuradio.utils.doxyxml" kind = 'group' @@ -209,7 +209,7 @@ class DoxyGroup(DoxyCompound): self.process_memberdefs() title = property(lambda self: self.data()['title']) - + Base.mem_classes.append(DoxyGroup) @@ -224,7 +224,7 @@ Base.mem_classes.append(DoxyFriend) class DoxyOther(Base): - + __module__ = "gnuradio.utils.doxyxml" kinds = set(['variable', 'struct', 'union', 'define', 'typedef', 'enum', 'dir', 'page']) @@ -232,6 +232,6 @@ class DoxyOther(Base): @classmethod def can_parse(cls, obj): return obj.kind in cls.kinds - + Base.mem_classes.append(DoxyOther) diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/example/Doxyfile b/gr-howto-write-a-block/docs/doxygen/doxyxml/example/Doxyfile index 9780043be..9780043be 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/example/Doxyfile +++ b/gr-howto-write-a-block/docs/doxygen/doxyxml/example/Doxyfile diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/example/aadvark.cc b/gr-howto-write-a-block/docs/doxygen/doxyxml/example/aadvark.cc index 5744c428a..f91c1ba56 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/example/aadvark.cc +++ b/gr-howto-write-a-block/docs/doxygen/doxyxml/example/aadvark.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/example/aadvark.h b/gr-howto-write-a-block/docs/doxygen/doxyxml/example/aadvark.h index 7b8f29c98..d3c17445e 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/example/aadvark.h +++ b/gr-howto-write-a-block/docs/doxygen/doxyxml/example/aadvark.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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, diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/example/xml/aadvark_8cc.xml b/gr-howto-write-a-block/docs/doxygen/doxyxml/example/xml/aadvark_8cc.xml index f031e01ac..f031e01ac 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/example/xml/aadvark_8cc.xml +++ b/gr-howto-write-a-block/docs/doxygen/doxyxml/example/xml/aadvark_8cc.xml diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/example/xml/aadvark_8h.xml b/gr-howto-write-a-block/docs/doxygen/doxyxml/example/xml/aadvark_8h.xml index a1854b685..a1854b685 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/example/xml/aadvark_8h.xml +++ b/gr-howto-write-a-block/docs/doxygen/doxyxml/example/xml/aadvark_8h.xml diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/example/xml/classAadvark.xml b/gr-howto-write-a-block/docs/doxygen/doxyxml/example/xml/classAadvark.xml index 54fe8b32c..54fe8b32c 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/example/xml/classAadvark.xml +++ b/gr-howto-write-a-block/docs/doxygen/doxyxml/example/xml/classAadvark.xml diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/example/xml/combine.xslt b/gr-howto-write-a-block/docs/doxygen/doxyxml/example/xml/combine.xslt index abdd9ac75..6de203a2b 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/example/xml/combine.xslt +++ b/gr-howto-write-a-block/docs/doxygen/doxyxml/example/xml/combine.xslt @@ -1,4 +1,4 @@ -<!-- XSLT script to combine the generated output into a single file. +<!-- XSLT script to combine the generated output into a single file. If you have xsltproc you could use: xsltproc combine.xslt index.xml >all.xml --> diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/example/xml/compound.xsd b/gr-howto-write-a-block/docs/doxygen/doxyxml/example/xml/compound.xsd index 369e2300f..5bb567052 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/example/xml/compound.xsd +++ b/gr-howto-write-a-block/docs/doxygen/doxyxml/example/xml/compound.xsd @@ -173,7 +173,7 @@ <xsd:complexType name="descriptionType" mixed="true"> <xsd:sequence> - <xsd:element name="title" type="xsd:string" minOccurs="0"/> + <xsd:element name="title" type="xsd:string" minOccurs="0"/> <xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="sect1" type="docSect1Type" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="internal" type="docInternalType" minOccurs="0" /> @@ -283,7 +283,7 @@ <xsd:complexType name="docSect1Type" mixed="true"> <xsd:sequence> - <xsd:element name="title" type="xsd:string" /> + <xsd:element name="title" type="xsd:string" /> <xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="sect2" type="docSect2Type" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="internal" type="docInternalS1Type" minOccurs="0" /> @@ -293,7 +293,7 @@ <xsd:complexType name="docSect2Type" mixed="true"> <xsd:sequence> - <xsd:element name="title" type="xsd:string" /> + <xsd:element name="title" type="xsd:string" /> <xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="sect3" type="docSect3Type" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="internal" type="docInternalS2Type" minOccurs="0" /> @@ -303,7 +303,7 @@ <xsd:complexType name="docSect3Type" mixed="true"> <xsd:sequence> - <xsd:element name="title" type="xsd:string" /> + <xsd:element name="title" type="xsd:string" /> <xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="sect4" type="docSect4Type" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="internal" type="docInternalS3Type" minOccurs="0" /> @@ -313,7 +313,7 @@ <xsd:complexType name="docSect4Type" mixed="true"> <xsd:sequence> - <xsd:element name="title" type="xsd:string" /> + <xsd:element name="title" type="xsd:string" /> <xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="internal" type="docInternalS4Type" minOccurs="0" /> </xsd:sequence> @@ -353,7 +353,7 @@ <xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> - + <xsd:group name="docTitleCmdGroup"> <xsd:choice> <xsd:element name="ulink" type="docURLLink" /> @@ -532,20 +532,20 @@ <xsd:complexType name="docImageType" mixed="true"> <xsd:group ref="docTitleCmdGroup" minOccurs="0" maxOccurs="unbounded" /> - <xsd:attribute name="type" type="DoxImageKind" /> - <xsd:attribute name="name" type="xsd:string" /> - <xsd:attribute name="width" type="xsd:string" /> - <xsd:attribute name="height" type="xsd:string" /> + <xsd:attribute name="type" type="DoxImageKind" /> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="width" type="xsd:string" /> + <xsd:attribute name="height" type="xsd:string" /> </xsd:complexType> <xsd:complexType name="docDotFileType" mixed="true"> <xsd:group ref="docTitleCmdGroup" minOccurs="0" maxOccurs="unbounded" /> - <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> </xsd:complexType> <xsd:complexType name="docTocItemType" mixed="true"> <xsd:group ref="docTitleCmdGroup" minOccurs="0" maxOccurs="unbounded" /> - <xsd:attribute name="id" type="xsd:string" /> + <xsd:attribute name="id" type="xsd:string" /> </xsd:complexType> <xsd:complexType name="docTocListType"> @@ -558,14 +558,14 @@ <xsd:sequence> <xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> - <xsd:attribute name="langid" type="xsd:string" /> + <xsd:attribute name="langid" type="xsd:string" /> </xsd:complexType> <xsd:complexType name="docParamListType"> <xsd:sequence> <xsd:element name="parameteritem" type="docParamListItem" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> - <xsd:attribute name="kind" type="DoxParamListKind" /> + <xsd:attribute name="kind" type="DoxParamListKind" /> </xsd:complexType> <xsd:complexType name="docParamListItem"> @@ -593,7 +593,7 @@ <xsd:element name="xreftitle" type="xsd:string" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="xrefdescription" type="descriptionType" /> </xsd:sequence> - <xsd:attribute name="id" type="xsd:string" /> + <xsd:attribute name="id" type="xsd:string" /> </xsd:complexType> <xsd:complexType name="docCopyType"> @@ -602,11 +602,11 @@ <xsd:element name="sect1" type="docSect1Type" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="internal" type="docInternalType" minOccurs="0" /> </xsd:sequence> - <xsd:attribute name="link" type="xsd:string" /> + <xsd:attribute name="link" type="xsd:string" /> </xsd:complexType> <xsd:complexType name="docCharType"> - <xsd:attribute name="char" type="DoxCharRange"/> + <xsd:attribute name="char" type="DoxCharRange"/> </xsd:complexType> <xsd:complexType name="docEmptyType"/> diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/example/xml/index.xml b/gr-howto-write-a-block/docs/doxygen/doxyxml/example/xml/index.xml index 13fd53f90..13fd53f90 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/example/xml/index.xml +++ b/gr-howto-write-a-block/docs/doxygen/doxyxml/example/xml/index.xml diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/example/xml/index.xsd b/gr-howto-write-a-block/docs/doxygen/doxyxml/example/xml/index.xsd index d7ab2a906..bfe960c0f 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/example/xml/index.xsd +++ b/gr-howto-write-a-block/docs/doxygen/doxyxml/example/xml/index.xsd @@ -25,7 +25,7 @@ <xsd:attribute name="refid" type="xsd:string" use="required"/> <xsd:attribute name="kind" type="MemberKind" use="required"/> </xsd:complexType> - + <xsd:simpleType name="CompoundKind"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="class"/> diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/generated/__init__.py b/gr-howto-write-a-block/docs/doxygen/doxyxml/generated/__init__.py index 39823979f..39823979f 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/generated/__init__.py +++ b/gr-howto-write-a-block/docs/doxygen/doxyxml/generated/__init__.py diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/generated/compound.py b/gr-howto-write-a-block/docs/doxygen/doxyxml/generated/compound.py index 1522ac23f..1522ac23f 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/generated/compound.py +++ b/gr-howto-write-a-block/docs/doxygen/doxyxml/generated/compound.py diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/generated/compoundsuper.py b/gr-howto-write-a-block/docs/doxygen/doxyxml/generated/compoundsuper.py index 6255dda16..6255dda16 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/generated/compoundsuper.py +++ b/gr-howto-write-a-block/docs/doxygen/doxyxml/generated/compoundsuper.py diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/generated/index.py b/gr-howto-write-a-block/docs/doxygen/doxyxml/generated/index.py index 7a70e14a1..7a70e14a1 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/generated/index.py +++ b/gr-howto-write-a-block/docs/doxygen/doxyxml/generated/index.py diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/generated/indexsuper.py b/gr-howto-write-a-block/docs/doxygen/doxyxml/generated/indexsuper.py index a99153019..a99153019 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/generated/indexsuper.py +++ b/gr-howto-write-a-block/docs/doxygen/doxyxml/generated/indexsuper.py diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/text.py b/gr-howto-write-a-block/docs/doxygen/doxyxml/text.py index ddf2c36e2..629edd180 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/doxyxml/text.py +++ b/gr-howto-write-a-block/docs/doxygen/doxyxml/text.py @@ -1,23 +1,23 @@ # # Copyright 2010 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. -# +# """ Utilities for extracting text from generated classes. """ diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/other/group_defs.dox b/gr-howto-write-a-block/docs/doxygen/other/group_defs.dox index ac40c0960..708f8c6d9 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/other/group_defs.dox +++ b/gr-howto-write-a-block/docs/doxygen/other/group_defs.dox @@ -1,5 +1,5 @@ -/*! - * \defgroup block GNU Radio HOWTO C++ Signal Processing Blocks +/*! + * \defgroup block GNU Radio HOWTO C++ Signal Processing Blocks * \brief All C++ blocks that can be used from the HOWTO GNU Radio * module are listed here or in the subcategories below. * diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/other/main_page.dox b/gr-howto-write-a-block/docs/doxygen/other/main_page.dox index 635704491..635704491 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/other/main_page.dox +++ b/gr-howto-write-a-block/docs/doxygen/other/main_page.dox diff --git a/gr-howto-write-a-block-cmake/docs/doxygen/swig_doc.py b/gr-howto-write-a-block/docs/doxygen/swig_doc.py index 62c8437e1..4e1ce2e47 100644 --- a/gr-howto-write-a-block-cmake/docs/doxygen/swig_doc.py +++ b/gr-howto-write-a-block/docs/doxygen/swig_doc.py @@ -1,23 +1,23 @@ # # Copyright 2010,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# """ Creates the swig_doc.i SWIG interface file. Execute using: python swig_doc.py xml_path outputfilename @@ -82,13 +82,13 @@ def combine_descriptions(obj): if dd: description.append(dd) return utoascii('\n\n'.join(description)).strip() - + entry_templ = '%feature("docstring") {name} "{docstring}"' def make_entry(obj, name=None, templ="{description}", description=None): """ Create a docstring entry for a swig interface file. - + obj - a doxyxml object from which documentation will be extracted. name - the name of the C object (defaults to obj.name()) templ - an optional template for the docstring containing only one @@ -182,11 +182,11 @@ def make_block_entry(di, block): def make_swig_interface_file(di, swigdocfilename, custom_output=None): - + output = [""" /* * This file was automatically generated using swig_doc.py. - * + * * Any changes to it will be lost next time it is regenerated. */ """] diff --git a/gr-howto-write-a-block/grc/.gitignore b/gr-howto-write-a-block/grc/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-howto-write-a-block/grc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-howto-write-a-block-cmake/grc/CMakeLists.txt b/gr-howto-write-a-block/grc/CMakeLists.txt index cc43db7ba..b7bd11d80 100644 --- a/gr-howto-write-a-block-cmake/grc/CMakeLists.txt +++ b/gr-howto-write-a-block/grc/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-howto-write-a-block/grc/Makefile.am b/gr-howto-write-a-block/grc/Makefile.am deleted file mode 100644 index 32dcf1b9e..000000000 --- a/gr-howto-write-a-block/grc/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -# -# 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. -# - -include $(top_srcdir)/Makefile.common - -grcblocksdir = $(grc_blocksdir) - -dist_grcblocks_DATA = \ - howto_square_ff.xml \ - howto_square2_ff.xml - diff --git a/gr-howto-write-a-block-cmake/include/CMakeLists.txt b/gr-howto-write-a-block/include/CMakeLists.txt index 475cc73c6..475cc73c6 100644 --- a/gr-howto-write-a-block-cmake/include/CMakeLists.txt +++ b/gr-howto-write-a-block/include/CMakeLists.txt diff --git a/gr-howto-write-a-block-cmake/include/howto_api.h b/gr-howto-write-a-block/include/howto_api.h index 5263a1cf7..5263a1cf7 100644 --- a/gr-howto-write-a-block-cmake/include/howto_api.h +++ b/gr-howto-write-a-block/include/howto_api.h diff --git a/gr-howto-write-a-block-cmake/include/howto_square2_ff.h b/gr-howto-write-a-block/include/howto_square2_ff.h index c45a1851f..2d6c7938b 100644 --- a/gr-howto-write-a-block-cmake/include/howto_square2_ff.h +++ b/gr-howto-write-a-block/include/howto_square2_ff.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-howto-write-a-block-cmake/include/howto_square_ff.h b/gr-howto-write-a-block/include/howto_square_ff.h index 729f1cf44..2efc7fc71 100644 --- a/gr-howto-write-a-block-cmake/include/howto_square_ff.h +++ b/gr-howto-write-a-block/include/howto_square_ff.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-howto-write-a-block/lib/.gitignore b/gr-howto-write-a-block/lib/.gitignore deleted file mode 100644 index b1e56d39e..000000000 --- a/gr-howto-write-a-block/lib/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/howto.cc -/howto.py -/test_all
\ No newline at end of file diff --git a/gr-howto-write-a-block-cmake/lib/CMakeLists.txt b/gr-howto-write-a-block/lib/CMakeLists.txt index 835ae02d6..835ae02d6 100644 --- a/gr-howto-write-a-block-cmake/lib/CMakeLists.txt +++ b/gr-howto-write-a-block/lib/CMakeLists.txt diff --git a/gr-howto-write-a-block/lib/Makefile.am b/gr-howto-write-a-block/lib/Makefile.am deleted file mode 100644 index f0a18358f..000000000 --- a/gr-howto-write-a-block/lib/Makefile.am +++ /dev/null @@ -1,79 +0,0 @@ -# -# Copyright 2004,2005,2006,2008,2009,2010 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 - -# list of programs run by "make check" and "make distcheck" -TESTS = test_all - -# ---------------------------------------------------------------- -# howto C++ library: libgnuradio-howto.so -# ---------------------------------------------------------------- - -# C/C++ headers get installed in ${prefix}/include/$(modname) -modinclude_HEADERS = \ - howto_square_ff.h \ - howto_square2_ff.h - -lib_LTLIBRARIES = libgnuradio-howto.la - -libgnuradio_howto_la_SOURCES = \ - howto_square_ff.cc \ - howto_square2_ff.cc - -libgnuradio_howto_la_LIBADD = \ - $(GNURADIO_CORE_LA) - -libgnuradio_howto_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) - -# ---------------------------------------------------------------- -# howto C++ QA library: libgnuradio-howto-qa.so (not installed) -# ---------------------------------------------------------------- - -noinst_LTLIBRARIES = libgnuradio-howto-qa.la - -libgnuradio_howto_qa_la_SOURCES = \ - qa_howto.cc \ - qa_howto_square_ff.cc \ - qa_howto_square2_ff.cc - -libgnuradio_howto_qa_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0 - -libgnuradio_howto_qa_la_LIBADD = \ - libgnuradio-howto.la \ - $(CPPUNIT_LIBS) - -# ---------------------------------------------------------------- -# headers that don't get installed -# ---------------------------------------------------------------- -noinst_HEADERS = \ - qa_howto.h \ - qa_howto_square_ff.h \ - qa_howto_square2_ff.h - -# ---------------------------------------------------------------- -# test program -# ---------------------------------------------------------------- -noinst_PROGRAMS = \ - test_all - -test_all_SOURCES = test_all.cc -test_all_LDADD = libgnuradio-howto-qa.la diff --git a/gr-howto-write-a-block/lib/howto_square2_ff.cc b/gr-howto-write-a-block/lib/howto_square2_ff.cc index 5e0fd7a43..3586559ff 100644 --- a/gr-howto-write-a-block/lib/howto_square2_ff.cc +++ b/gr-howto-write-a-block/lib/howto_square2_ff.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -36,7 +36,7 @@ * Create a new instance of howto_square2_ff and return * a boost shared_ptr. This is effectively the public constructor. */ -howto_square2_ff_sptr +howto_square2_ff_sptr howto_make_square2_ff () { return gnuradio::get_initial_sptr(new howto_square2_ff ()); @@ -75,7 +75,7 @@ howto_square2_ff::~howto_square2_ff () // nothing else required in this example } -int +int howto_square2_ff::work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) diff --git a/gr-howto-write-a-block/lib/howto_square2_ff.h b/gr-howto-write-a-block/lib/howto_square2_ff.h deleted file mode 100644 index 536b04fab..000000000 --- a/gr-howto-write-a-block/lib/howto_square2_ff.h +++ /dev/null @@ -1,77 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ -#ifndef INCLUDED_HOWTO_SQUARE2_FF_H -#define INCLUDED_HOWTO_SQUARE2_FF_H - -#include <gr_sync_block.h> - -class howto_square2_ff; - -/* - * We use boost::shared_ptr's instead of raw pointers for all access - * to gr_blocks (and many other data structures). The shared_ptr gets - * us transparent reference counting, which greatly simplifies storage - * management issues. This is especially helpful in our hybrid - * C++ / Python system. - * - * See http://www.boost.org/libs/smart_ptr/smart_ptr.htm - * - * As a convention, the _sptr suffix indicates a boost::shared_ptr - */ -typedef boost::shared_ptr<howto_square2_ff> howto_square2_ff_sptr; - -/*! - * \brief Return a shared_ptr to a new instance of howto_square2_ff. - * - * To avoid accidental use of raw pointers, howto_square2_ff's - * constructor is private. howto_make_square2_ff is the public - * interface for creating new instances. - */ -howto_square2_ff_sptr howto_make_square2_ff (); - -/*! - * \brief square2 a stream of floats. - * \ingroup block - * - * This uses the preferred technique: subclassing gr_sync_block. - */ -class howto_square2_ff : public gr_sync_block -{ -private: - // The friend declaration allows howto_make_square2_ff to - // access the private constructor. - - friend howto_square2_ff_sptr howto_make_square2_ff (); - - howto_square2_ff (); // private constructor - - public: - ~howto_square2_ff (); // public destructor - - // Where all the action really happens - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif /* INCLUDED_HOWTO_SQUARE2_FF_H */ diff --git a/gr-howto-write-a-block/lib/howto_square_ff.cc b/gr-howto-write-a-block/lib/howto_square_ff.cc index f1d5a7848..f0d2e1f86 100644 --- a/gr-howto-write-a-block/lib/howto_square_ff.cc +++ b/gr-howto-write-a-block/lib/howto_square_ff.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -36,7 +36,7 @@ * Create a new instance of howto_square_ff and return * a boost shared_ptr. This is effectively the public constructor. */ -howto_square_ff_sptr +howto_square_ff_sptr howto_make_square_ff () { return gnuradio::get_initial_sptr(new howto_square_ff ()); @@ -75,7 +75,7 @@ howto_square_ff::~howto_square_ff () // nothing else required in this example } -int +int howto_square_ff::general_work (int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, diff --git a/gr-howto-write-a-block/lib/howto_square_ff.h b/gr-howto-write-a-block/lib/howto_square_ff.h deleted file mode 100644 index 092b93698..000000000 --- a/gr-howto-write-a-block/lib/howto_square_ff.h +++ /dev/null @@ -1,78 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ -#ifndef INCLUDED_HOWTO_SQUARE_FF_H -#define INCLUDED_HOWTO_SQUARE_FF_H - -#include <gr_block.h> - -class howto_square_ff; - -/* - * We use boost::shared_ptr's instead of raw pointers for all access - * to gr_blocks (and many other data structures). The shared_ptr gets - * us transparent reference counting, which greatly simplifies storage - * management issues. This is especially helpful in our hybrid - * C++ / Python system. - * - * See http://www.boost.org/libs/smart_ptr/smart_ptr.htm - * - * As a convention, the _sptr suffix indicates a boost::shared_ptr - */ -typedef boost::shared_ptr<howto_square_ff> howto_square_ff_sptr; - -/*! - * \brief Return a shared_ptr to a new instance of howto_square_ff. - * - * To avoid accidental use of raw pointers, howto_square_ff's - * constructor is private. howto_make_square_ff is the public - * interface for creating new instances. - */ -howto_square_ff_sptr howto_make_square_ff (); - -/*! - * \brief square a stream of floats. - * \ingroup block - * - * \sa howto_square2_ff for a version that subclasses gr_sync_block. - */ -class howto_square_ff : public gr_block -{ -private: - // The friend declaration allows howto_make_square_ff to - // access the private constructor. - - friend howto_square_ff_sptr howto_make_square_ff (); - - howto_square_ff (); // private constructor - - public: - ~howto_square_ff (); // public destructor - - // Where all the action really happens - - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif /* INCLUDED_HOWTO_SQUARE_FF_H */ diff --git a/gr-howto-write-a-block/lib/qa_howto.h b/gr-howto-write-a-block/lib/qa_howto.h deleted file mode 100644 index fa5a42fd3..000000000 --- a/gr-howto-write-a-block/lib/qa_howto.h +++ /dev/null @@ -1,36 +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 Example 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 Example Public License for more details. - * - * You should have received a copy of the GNU Example 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_QA_HOWTO_H -#define INCLUDED_QA_HOWTO_H - -#include <cppunit/TestSuite.h> - -//! collect all the tests for the example directory - -class qa_howto { - public: - //! return suite of tests for all of example directory - static CppUnit::TestSuite *suite (); -}; - -#endif /* INCLUDED_QA_HOWTO_H */ diff --git a/gr-howto-write-a-block/lib/qa_howto_square2_ff.cc b/gr-howto-write-a-block/lib/qa_howto_square2_ff.cc index a37465104..ff1e5d5b0 100644 --- a/gr-howto-write-a-block/lib/qa_howto_square2_ff.cc +++ b/gr-howto-write-a-block/lib/qa_howto_square2_ff.cc @@ -1,35 +1,32 @@ /* -*- c++ -*- */ /* - * Copyright 2009 Free Software Foundation, Inc. - * + * Copyright 2011 Free Software Foundation, Inc. + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include <qa_howto_square2_ff.h> -#include <cppunit/TestAssert.h> +#include <boost/test/unit_test.hpp> -void -qa_howto_square2_ff::t1() -{ - // Insert CPPUNIT tests/asserts here +BOOST_AUTO_TEST_CASE(qa_howto_square2_ff_t1){ + BOOST_CHECK_EQUAL(2 + 2, 4); + // TODO BOOST_* test macros here } -void -qa_howto_square2_ff::t2() -{ - // Insert CPPUNIT tests/asserts here +BOOST_AUTO_TEST_CASE(qa_howto_square2_ff_t2){ + BOOST_CHECK_EQUAL(2 + 2, 4); + // TODO BOOST_* test macros here } diff --git a/gr-howto-write-a-block/lib/qa_howto_square2_ff.h b/gr-howto-write-a-block/lib/qa_howto_square2_ff.h deleted file mode 100644 index c74d0866f..000000000 --- a/gr-howto-write-a-block/lib/qa_howto_square2_ff.h +++ /dev/null @@ -1,39 +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_QA_HOWTO_SQUARE2_FF_H -#define INCLUDED_QA_HOWTO_SQUARE2_FF_H - -#include <cppunit/extensions/HelperMacros.h> -#include <cppunit/TestCase.h> - -class qa_howto_square2_ff : public CppUnit::TestCase { - - CPPUNIT_TEST_SUITE (qa_howto_square2_ff); - CPPUNIT_TEST (t1); - CPPUNIT_TEST (t2); - CPPUNIT_TEST_SUITE_END (); - - private: - void t1 (); - void t2 (); -}; - -#endif /* INCLUDED_QA_HOWTO_SQUARE2_FF_H */ diff --git a/gr-howto-write-a-block/lib/qa_howto_square_ff.cc b/gr-howto-write-a-block/lib/qa_howto_square_ff.cc index 2f0b59773..98f6cc587 100644 --- a/gr-howto-write-a-block/lib/qa_howto_square_ff.cc +++ b/gr-howto-write-a-block/lib/qa_howto_square_ff.cc @@ -1,35 +1,32 @@ /* -*- c++ -*- */ /* - * Copyright 2009 Free Software Foundation, Inc. - * + * Copyright 2011 Free Software Foundation, Inc. + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include <qa_howto_square_ff.h> -#include <cppunit/TestAssert.h> +#include <boost/test/unit_test.hpp> -void -qa_howto_square_ff::t1() -{ - // Insert CPPUNIT tests/asserts here +BOOST_AUTO_TEST_CASE(qa_howto_square_ff_t1){ + BOOST_CHECK_EQUAL(2 + 2, 4); + // TODO BOOST_* test macros here } -void -qa_howto_square_ff::t2() -{ - // Insert CPPUNIT tests/asserts here +BOOST_AUTO_TEST_CASE(qa_howto_square_ff_t2){ + BOOST_CHECK_EQUAL(2 + 2, 4); + // TODO BOOST_* test macros here } diff --git a/gr-howto-write-a-block/lib/qa_howto_square_ff.h b/gr-howto-write-a-block/lib/qa_howto_square_ff.h deleted file mode 100644 index 1b7c5e99f..000000000 --- a/gr-howto-write-a-block/lib/qa_howto_square_ff.h +++ /dev/null @@ -1,39 +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_QA_HOWTO_SQUARE_FF_H -#define INCLUDED_QA_HOWTO_SQUARE_FF_H - -#include <cppunit/extensions/HelperMacros.h> -#include <cppunit/TestCase.h> - -class qa_howto_square_ff : public CppUnit::TestCase { - - CPPUNIT_TEST_SUITE (qa_howto_square_ff); - CPPUNIT_TEST (t1); - CPPUNIT_TEST (t2); - CPPUNIT_TEST_SUITE_END (); - - private: - void t1 (); - void t2 (); -}; - -#endif /* INCLUDED_QA_HOWTO_SQUARE_FF_H */ diff --git a/gr-howto-write-a-block/python/.gitignore b/gr-howto-write-a-block/python/.gitignore deleted file mode 100644 index bf03975bb..000000000 --- a/gr-howto-write-a-block/python/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -/Makefile -/Makefile.in -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/*.pyo -/run_tests diff --git a/gr-howto-write-a-block-cmake/python/CMakeLists.txt b/gr-howto-write-a-block/python/CMakeLists.txt index 5da80ef15..d5fb19523 100644 --- a/gr-howto-write-a-block-cmake/python/CMakeLists.txt +++ b/gr-howto-write-a-block/python/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-howto-write-a-block/python/Makefile.am b/gr-howto-write-a-block/python/Makefile.am deleted file mode 100644 index c216cca29..000000000 --- a/gr-howto-write-a-block/python/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright 2004,2010 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 - -TESTS = run_tests -EXTRA_DIST = run_tests.in - -modpython_PYTHON = \ - __init__.py - -noinst_PYTHON = \ - qa_howto.py diff --git a/gr-howto-write-a-block/python/__init__.py b/gr-howto-write-a-block/python/__init__.py index d4a41c271..575cbfc22 100644 --- a/gr-howto-write-a-block/python/__init__.py +++ b/gr-howto-write-a-block/python/__init__.py @@ -1,16 +1,16 @@ # # Copyright 2008,2009 Free Software Foundation, Inc. -# +# # This application 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. -# +# # This application 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. @@ -18,6 +18,11 @@ # The presence of this file turns this directory into a Python package +''' +This is the GNU Radio HOWTO module. Place your Python package +description here (python/__init__.py). +''' + # ---------------------------------------------------------------- # Temporary workaround for ticket:181 (swig+python problem) import sys @@ -29,7 +34,7 @@ except ImportError: from DLFCN import RTLD_GLOBAL as _RTLD_GLOBAL except ImportError: pass - + if _RTLD_GLOBAL != 0: _dlopenflags = sys.getdlopenflags() sys.setdlopenflags(_dlopenflags|_RTLD_GLOBAL) diff --git a/gr-howto-write-a-block/python/qa_howto.py b/gr-howto-write-a-block/python/qa_howto.py index 630f57bf4..7321941d5 100755 --- a/gr-howto-write-a-block/python/qa_howto.py +++ b/gr-howto-write-a-block/python/qa_howto.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007 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 howto_swig @@ -54,6 +54,6 @@ class qa_howto (gr_unittest.TestCase): self.tb.run () result_data = dst.data () self.assertFloatTuplesAlmostEqual (expected_result, result_data, 6) - + if __name__ == '__main__': gr_unittest.main () diff --git a/gr-howto-write-a-block/python/run_tests.in b/gr-howto-write-a-block/python/run_tests.in deleted file mode 100644 index 2c32539c7..000000000 --- a/gr-howto-write-a-block/python/run_tests.in +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh - -# All this strange PYTHONPATH manipulation is required to run our -# tests using our just built shared library and swig-generated python -# code prior to installation. - -# build tree == src tree unless you're doing a VPATH build. -# If you don't know what a VPATH build is, you're not doing one. Relax... - -prefix=@prefix@ -exec_prefix=@exec_prefix@ - -# Where to look in the build tree for our shared library -libbld=@abs_top_builddir@/lib -# Where to look in the build tree for swig generated python code -libswig=@abs_top_builddir@/swig -# Where to look in the src tree for hand written python code -py=@abs_top_srcdir@/python - -# Where to look for installed GNU Radio python modules -# FIXME this is wrong on a distcheck. We really need to ask gnuradio-core -# where it put its python files. -installed_pythondir=@pythondir@ -installed_pyexecdir=@pyexecdir@ - -PYTHONPATH="$libbld:$libbld/.libs:$libswig:$libswig/.libs:$py:$installed_pythondir:$installed_pyexecdir:$PYTHONPATH" -echo $PYTHONPATH - -export PYTHONPATH - -case "@host_os@" in - darwin*) - # FIXME: Code for Darwin guessed but not tested - # Special Code for executing on Darwin / Mac OS X only - if [ "$DYLD_LIBRARY_PATH" = "" ] - then - DYLD_LIBRARY_PATH=$libbld/.libs - else - DYLD_LIBRARY_PATH=$libbld/.libs:$DYLD_LIBRARY_PATH - fi - export DYLD_LIBRARY_PATH - ;; - cygwin*|win*|mingw*) - # Special Code for executing on Win32 variants only - if [ "$PATH" = "" ] - then - PATH=$libbld/.libs - else - PATH=$libbld/.libs:$PATH - fi - export PATH - ;; -esac - -# -# This is the simple part... -# Run everything that matches qa_*.py and return the final result. -# - -ok=yes -for file in @srcdir@/qa_*.py -do - if ! $file - then - ok=no - fi -done - -if [ $ok = yes ] -then - exit 0 -else - exit 1 -fi diff --git a/gr-howto-write-a-block/setup_guile_test_env.in b/gr-howto-write-a-block/setup_guile_test_env.in deleted file mode 100644 index 3437fab44..000000000 --- a/gr-howto-write-a-block/setup_guile_test_env.in +++ /dev/null @@ -1,140 +0,0 @@ -# -# Copyright 2010 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, see <http://www.gnu.org/licenses/>. -# - -# This is sourced by run_guile_tests to establish the environment -# variables required to run the tests in the build tree. - -# add_local_paths is the only "public" function in this file - -# 1st argument is absolute path to hand coded guile source directory -# 2nd argument is absolute path to component C++ shared library build directory -# 3nd argument is absolute path to component SWIG build directory - -add_local_paths() { - if [ $# -ne 3 ] - then - echo "$0: requires 3 args" 1>&2 - exit 1 - fi - - # Add local dirs to the front - prepend_to_guile_load_path "$1" - prepend_to_libpath "$2/.libs" - [ "$2" != "$3" ] && prepend_to_libpath "$3/.libs" - prepend_to_guile_load_path "$3" -} - -# ------------------------------------------------------------------------ - -abs_top_srcdir=@abs_top_srcdir@ -abs_top_builddir=@abs_top_builddir@ - -# usage: prepend <path-varname> <dir> -prepend() { - if [ $# -ne 2 ] - then - echo "$0: prepend needs 2 args" 1>&2 - exit 1 - fi - local path="$1" dir="$2" contents="" - eval "contents=\$$path" - if [ "$dir" != "" ] - then - if [ "$contents" = "" ] - then - eval "$path=\"$dir\"" - else - eval "$path=\"$dir:$contents\"" - fi - fi - #echo end-of-prepend: $path=${!path} -} - -# usage: append <path-varname> <dir> -append() { - if [ $# -ne 2 ] - then - echo "$0: append needs 2 args" 1>&2 - exit 1 - fi - local path="$1" dir="$2" contents="" - eval "contents=\$$path" - if [ "$dir" != "" ] - then - if [ "$contents" = "" ] - then - eval "$path=\"$dir\"" - else - eval "$path=\"$contents:$dir\"" - fi - fi - #echo end-of-append: $path=${!path} -} - -prepend_to_guile_load_path() { - prepend GUILE_LOAD_PATH "$1" - export GUILE_LOAD_PATH -} - -append_to_guile_load_path() { - append GUILE_LOAD_PATH "$1" - export GUILE_LOAD_PATH -} - -prepend_to_libpath() { - prepend LTDL_LIBRARY_PATH "$1" - export LTDL_LIBRARY_PATH - case "@host_os@" in - darwin*) - prepend DYLD_LIBRARY_PATH "$1" - export DYLD_LIBRARY_PATH - ;; - cygwin*|win*|mingw*) - prepend PATH "$1" - export PATH - ;; - esac -} - -append_to_libpath() { - append LTDL_LIBRARY_PATH "$1" - export LTDL_LIBRARY_PATH - case "@host_os@" in - darwin*) - append DYLD_LIBRARY_PATH "$1" - export DYLD_LIBRARY_PATH - ;; - cygwin*|win*|mingw*) - append PATH "$1" - export PATH - ;; - esac -} - -# ------------------------------------------------------------------------ -# Start with gnuradio_core_LIBDIRPATH and gnuradio_core_GUILE_LOAD_PATH -# ------------------------------------------------------------------------ - -# Where to search for gnuradio-core shared libraries -prepend_to_libpath @gnuradio_core_LIBDIRPATH@ - -# Where to seach for gnuradio-core guile code -prepend_to_guile_load_path @gnuradio_core_GUILE_LOAD_PATH@ - -export GUILE_WARN_DEPRECATED=no diff --git a/gr-howto-write-a-block/swig/.gitignore b/gr-howto-write-a-block/swig/.gitignore deleted file mode 100644 index 21a9eb98c..000000000 --- a/gr-howto-write-a-block/swig/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/.deps -/.libs -/Makefile.in -/Makefile -/howto_swig.cc -/howto_swig.py -/gnuradio -/guile -/python -/run_guile_tests diff --git a/gr-howto-write-a-block-cmake/swig/CMakeLists.txt b/gr-howto-write-a-block/swig/CMakeLists.txt index 1e3e59e2c..1e3e59e2c 100644 --- a/gr-howto-write-a-block-cmake/swig/CMakeLists.txt +++ b/gr-howto-write-a-block/swig/CMakeLists.txt diff --git a/gr-howto-write-a-block/swig/Makefile.am b/gr-howto-write-a-block/swig/Makefile.am deleted file mode 100644 index 326004235..000000000 --- a/gr-howto-write-a-block/swig/Makefile.am +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright 2004,2005,2006,2008,2009,2010 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 -include $(top_srcdir)/Makefile.swig - -noinst_GUILE = howto.test - -AM_CPPFLAGS += -I$(top_srcdir)/lib - -################################### -# SWIG interfaces and libraries - -TOP_SWIG_IFILES = \ - howto_swig.i - -# Install so that they end up available as: -# import howto -# This ends up at: -# ${prefix}/lib/python${python_version}/site-packages/$(modname) -howto_swig_pythondir_category = $(modname) - -# additional libraries for linking with the SWIG-generated library -howto_swig_la_swig_libadd = \ - $(top_builddir)/lib/libgnuradio-howto.la - -# additional SWIG files to be installed -howto_swiginclude_headers = \ - howto_square_ff.i \ - howto_square2_ff.i - -EXTRA_DIST = $(howto_swiginclude_headers) - -if GUILE -TESTS = run_guile_tests -nobase_guile_DATA = \ - gnuradio/howto_swig.scm -endif - -EXTRA_DIST += $(nobase_guile_DATA) diff --git a/gr-howto-write-a-block/swig/Makefile.swig.gen b/gr-howto-write-a-block/swig/Makefile.swig.gen deleted file mode 100644 index 6b7be2185..000000000 --- a/gr-howto-write-a-block/swig/Makefile.swig.gen +++ /dev/null @@ -1,145 +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 howto_swig.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/howto_swig -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/howto_swig -## -## 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. - -howto_swig_pythondir_category ?= howto_swig -howto_swig_pylibdir_category ?= $(howto_swig_pythondir_category) -howto_swig_pythondir = $(pythondir)/$(howto_swig_pythondir_category) -howto_swig_pylibdir = $(pyexecdir)/$(howto_swig_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -howto_swig_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/howto_swig -# FIXME: determince whether these should be installed with gnuradio. -howto_swig_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -howto_swig_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 > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -howto_swig_swiginclude_HEADERS = \ - howto_swig.i \ - $(howto_swig_swiginclude_headers) - -if PYTHON -howto_swig_pylib_LTLIBRARIES = \ - _howto_swig.la - -_howto_swig_la_SOURCES = \ - python/howto_swig.cc \ - $(howto_swig_la_swig_sources) - -howto_swig_python_PYTHON = \ - howto_swig.py \ - $(howto_swig_python) - -_howto_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(howto_swig_la_swig_libadd) - -_howto_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(howto_swig_la_swig_ldflags) - -_howto_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(howto_swig_la_swig_cxxflags) - -python/howto_swig.cc: howto_swig.py -howto_swig.py: howto_swig.i - -# Include the python dependencies for this file --include python/howto_swig.d - -endif # end of if python - -if GUILE - -howto_swig_scmlib_LTLIBRARIES = \ - libguile-gnuradio-howto_swig.la -libguile_gnuradio_howto_swig_la_SOURCES = \ - guile/howto_swig.cc \ - $(howto_swig_la_swig_sources) -nobase_howto_swig_scm_DATA = \ - gnuradio/howto_swig.scm \ - gnuradio/howto_swig-primitive.scm -libguile_gnuradio_howto_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(howto_swig_la_swig_libadd) -libguile_gnuradio_howto_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(howto_swig_la_swig_ldflags) -libguile_gnuradio_howto_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(howto_swig_la_swig_cxxflags) - -guile/howto_swig.cc: gnuradio/howto_swig.scm -gnuradio/howto_swig.scm: howto_swig.i -gnuradio/howto_swig-primitive.scm: gnuradio/howto_swig.scm - -# Include the guile dependencies for this file --include guile/howto_swig.d - -endif # end of GUILE - - diff --git a/gr-howto-write-a-block/swig/howto.test b/gr-howto-write-a-block/swig/howto.test deleted file mode 100644 index dc257a61e..000000000 --- a/gr-howto-write-a-block/swig/howto.test +++ /dev/null @@ -1,69 +0,0 @@ -;;; -*- Scheme -*- -;;; -;;; Copyright 2010 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, see <http://www.gnu.org/licenses/>. -;;; - -;;; If you're using Emacs's Scheme mode: -;;; (put 'with-test-prefix 'scheme-indent-function 1) - -;;; See the comments in gnuradio/test-suite/lib.scm for info on writing tests. -;;; See also the very end of the file, where the test-equal, test-eqv -;;; and test-eq macros are defined. - -(define-module (test-module) - #:use-module (oop goops) - #:use-module (gnuradio core) - #:use-module (gnuradio test-suite lib) - #:duplicates (merge-generics replace check)) - - -;; Use our module -(use-modules (gnuradio howto_swig)) - - -(define (vector-map f v) - (list->vector (map f (vector->list v)))) - - -(with-test-prefix "square-ff" - (let* ((src-data #(-3. 4. -5.5 2. 3.)) - (expected-result (vector-map (lambda (x) (* x x)) src-data)) - (tb (gr:top-block-swig "QA top block")) - (src (gr:vector-source-f src-data #f)) - (op (gr:howto-square-ff)) - (dst (gr:vector-sink-f))) - - (gr:connect tb src op dst) - - (gr:run tb) - (test-equal expected-result (gr:data dst)))) - - -(with-test-prefix "square2-ff" - (let* ((src-data #(-3. 4. -5.5 2. 3.)) - (expected-result (vector-map (lambda (x) (* x x)) src-data)) - (tb (gr:top-block-swig "QA top block")) - (src (gr:vector-source-f src-data #f)) - (op (gr:howto-square2-ff)) - (dst (gr:vector-sink-f))) - - (gr:connect tb src op dst) - - (gr:run tb) - (test-equal expected-result (gr:data dst)))) - diff --git a/gr-howto-write-a-block/swig/howto_square2_ff.i b/gr-howto-write-a-block/swig/howto_square2_ff.i deleted file mode 100644 index 683a93d61..000000000 --- a/gr-howto-write-a-block/swig/howto_square2_ff.i +++ /dev/null @@ -1,9 +0,0 @@ -GR_SWIG_BLOCK_MAGIC(howto,square2_ff); - -howto_square2_ff_sptr howto_make_square2_ff (); - -class howto_square2_ff : public gr_sync_block -{ -private: - howto_square2_ff (); -}; diff --git a/gr-howto-write-a-block/swig/howto_square_ff.i b/gr-howto-write-a-block/swig/howto_square_ff.i deleted file mode 100644 index f8ae76986..000000000 --- a/gr-howto-write-a-block/swig/howto_square_ff.i +++ /dev/null @@ -1,16 +0,0 @@ -/* - * First arg is the package prefix. - * Second arg is the name of the class minus the prefix. - * - * This does some behind-the-scenes magic so we can - * access howto_square_ff from python as howto.square_ff - */ -GR_SWIG_BLOCK_MAGIC(howto,square_ff); - -howto_square_ff_sptr howto_make_square_ff (); - -class howto_square_ff : public gr_block -{ -private: - howto_square_ff (); -}; diff --git a/gr-howto-write-a-block/swig/howto_swig.i b/gr-howto-write-a-block/swig/howto_swig.i index d0bbcdc11..dd662b5e5 100644 --- a/gr-howto-write-a-block/swig/howto_swig.i +++ b/gr-howto-write-a-block/swig/howto_swig.i @@ -1,21 +1,20 @@ /* -*- c++ -*- */ +#define HOWTO_API + %include "gnuradio.i" // the common stuff +//load generated python docstrings +%include "howto_swig_doc.i" + + %{ #include "howto_square_ff.h" #include "howto_square2_ff.h" %} -%include "howto_square_ff.i" -%include "howto_square2_ff.i" +GR_SWIG_BLOCK_MAGIC(howto,square_ff); +%include "howto_square_ff.h" -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-howto_swig" "scm_init_gnuradio_howto_swig_module") -%} - -%goops %{ -(use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif +GR_SWIG_BLOCK_MAGIC(howto,square2_ff); +%include "howto_square2_ff.h" diff --git a/gr-howto-write-a-block/swig/run_guile_tests.in b/gr-howto-write-a-block/swig/run_guile_tests.in deleted file mode 100644 index 5d08b0dd5..000000000 --- a/gr-howto-write-a-block/swig/run_guile_tests.in +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -. @top_builddir@/setup_guile_test_env - -# 1st argument is absolute path to hand coded guile source directory -# 2nd argument is absolute path to component C++ shared library build directory -# 3nd argument is absolute path to component SWIG build directory - -add_local_paths \ - @srcdir@ \ - @abs_builddir@ \ - @abs_builddir@ - -@GUILE@ -e main -c '(use-modules (gnuradio test-suite guile-test))' -t @srcdir@ diff --git a/gr-howto-write-a-block/version.sh b/gr-howto-write-a-block/version.sh deleted file mode 100644 index 8cc77fff0..000000000 --- a/gr-howto-write-a-block/version.sh +++ /dev/null @@ -1,4 +0,0 @@ -MAJOR_VERSION=3 -API_COMPAT=5 -MINOR_VERSION=3 -MAINT_VERSION=0 diff --git a/gr-noaa/.gitignore b/gr-noaa/.gitignore deleted file mode 100644 index 2f7735b5e..000000000 --- a/gr-noaa/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -Makefile -Makefile.in -*.pc diff --git a/gr-noaa/CMakeLists.txt b/gr-noaa/CMakeLists.txt index a3a5d56db..09ce2a329 100644 --- a/gr-noaa/CMakeLists.txt +++ b/gr-noaa/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, @@ -35,6 +35,8 @@ GR_SET_GLOBAL(GR_NOAA_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/lib ) +SET(GR_PKG_NOAA_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/noaa) + ######################################################################## # Begin conditional configuration ######################################################################## @@ -81,7 +83,7 @@ add_subdirectory(lib) if(ENABLE_PYTHON) add_subdirectory(swig) add_subdirectory(grc) - add_subdirectory(apps) + add_subdirectory(examples) endif(ENABLE_PYTHON) ######################################################################## diff --git a/gr-noaa/Makefile.am b/gr-noaa/Makefile.am deleted file mode 100644 index ce5f66109..000000000 --- a/gr-noaa/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -# -# 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. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = lib grc oct - -if PYTHON -SUBDIRS += swig python apps -endif - -pkgconfigdir = $(libdir)/pkgconfig -dist_pkgconfig_DATA = gnuradio-noaa.pc diff --git a/gr-noaa/apps/.gitignore b/gr-noaa/apps/.gitignore deleted file mode 100644 index be02dd265..000000000 --- a/gr-noaa/apps/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.dat -#*.txt -*.hrpt diff --git a/gr-noaa/apps/Makefile.am b/gr-noaa/apps/Makefile.am deleted file mode 100644 index c60c8c137..000000000 --- a/gr-noaa/apps/Makefile.am +++ /dev/null @@ -1,39 +0,0 @@ -# -# Copyright 2009,2010 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 - -if PYTHON - -dist_bin_SCRIPTS = \ - hrpt_decode.py \ - hrpt_demod.py \ - file_rx_hrpt.py \ - usrp_rx_hrpt.py \ - usrp_rx_hrpt_nogui.py - -EXTRA_DIST += \ - hrpt_decode.grc \ - hrpt_demod.grc \ - file_rx_hrpt.grc \ - usrp_rx_hrpt.grc \ - usrp_rx_hrpt_nogui.grc -endif diff --git a/gr-noaa/apps/file_rx_hrpt.py b/gr-noaa/apps/file_rx_hrpt.py deleted file mode 100755 index fcd1832f6..000000000 --- a/gr-noaa/apps/file_rx_hrpt.py +++ /dev/null @@ -1,239 +0,0 @@ -#!/usr/bin/env python -################################################## -# Gnuradio Python Flow Graph -# Title: USRP HRPT Receiver -# Generated: Thu Oct 27 13:48:25 2011 -################################################## - -from gnuradio import digital -from gnuradio import eng_notation -from gnuradio import gr -from gnuradio import noaa -from gnuradio.eng_option import eng_option -from gnuradio.gr import firdes -from optparse import OptionParser -import ConfigParser -import math, os - -class file_rx_hrpt(gr.top_block): - - def __init__(self): - gr.top_block.__init__(self, "USRP HRPT Receiver") - - ################################################## - # Variables - ################################################## - self.sym_rate = sym_rate = 600*1109 - self.sample_rate = sample_rate = 4e6 - self.sps = sps = sample_rate/sym_rate - self.config_filename = config_filename = os.environ['HOME']+'/.gnuradio/config.conf' - self._pll_alpha_config = ConfigParser.ConfigParser() - self._pll_alpha_config.read(config_filename) - try: pll_alpha = self._pll_alpha_config.getfloat('usrp_rx_hrpt', 'pll_alpha') - except: pll_alpha = 0.01 - self.pll_alpha = pll_alpha - self._output_filename_config = ConfigParser.ConfigParser() - self._output_filename_config.read(config_filename) - try: output_filename = self._output_filename_config.get('usrp_rx_hrpt', 'filename') - except: output_filename = 'frames.hrpt' - self.output_filename = output_filename - self.max_clock_offset = max_clock_offset = 100e-6 - self.max_carrier_offset = max_carrier_offset = 2*math.pi*100e3/sample_rate - self.hs = hs = int(sps/2.0) - self._gain_config = ConfigParser.ConfigParser() - self._gain_config.read(config_filename) - try: gain = self._gain_config.getfloat('usrp_rx_hrpt', 'gain') - except: gain = 35 - self.gain = gain - self._freq_config = ConfigParser.ConfigParser() - self._freq_config.read(config_filename) - try: freq = self._freq_config.getfloat('usrp_rx_hrpt', 'freq') - except: freq = 1698e6 - self.freq = freq - self._clock_alpha_config = ConfigParser.ConfigParser() - self._clock_alpha_config.read(config_filename) - try: clock_alpha = self._clock_alpha_config.getfloat('usrp_rx_hrpt', 'clock_alpha') - except: clock_alpha = 0.01 - self.clock_alpha = clock_alpha - - ################################################## - # Blocks - ################################################## - self.throttle = gr.throttle(gr.sizeof_short*1, 2*sample_rate) - self.pll = noaa.hrpt_pll_cf(pll_alpha, pll_alpha**2/4.0, max_carrier_offset) - self.gr_moving_average_xx_0 = gr.moving_average_ff(hs, 1.0/hs, 4000) - self.gr_interleaved_short_to_complex_0 = gr.interleaved_short_to_complex() - self.gr_file_source_0 = gr.file_source(gr.sizeof_short*1, "input_filename", False) - self.frame_sink = gr.file_sink(gr.sizeof_short*1, output_filename) - self.frame_sink.set_unbuffered(False) - self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(sps/2.0, clock_alpha**2/4.0, 0.5, clock_alpha, max_clock_offset) - self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb() - self.deframer = noaa.hrpt_deframer() - self.decoder = noaa.hrpt_decoder(True,True) - self.agc = gr.agc_cc(1e-6, 1.0, 1.0, 1.0) - - ################################################## - # Connections - ################################################## - self.connect((self.gr_moving_average_xx_0, 0), (self.digital_clock_recovery_mm_xx_0, 0)) - self.connect((self.pll, 0), (self.gr_moving_average_xx_0, 0)) - self.connect((self.agc, 0), (self.pll, 0)) - self.connect((self.deframer, 0), (self.decoder, 0)) - self.connect((self.deframer, 0), (self.frame_sink, 0)) - self.connect((self.gr_interleaved_short_to_complex_0, 0), (self.agc, 0)) - self.connect((self.throttle, 0), (self.gr_interleaved_short_to_complex_0, 0)) - self.connect((self.gr_file_source_0, 0), (self.throttle, 0)) - self.connect((self.digital_clock_recovery_mm_xx_0, 0), (self.digital_binary_slicer_fb_0, 0)) - self.connect((self.digital_binary_slicer_fb_0, 0), (self.deframer, 0)) - - def get_sym_rate(self): - return self.sym_rate - - def set_sym_rate(self, sym_rate): - self.sym_rate = sym_rate - self.set_sps(self.sample_rate/self.sym_rate) - - def get_sample_rate(self): - return self.sample_rate - - def set_sample_rate(self, sample_rate): - self.sample_rate = sample_rate - self.set_max_carrier_offset(2*math.pi*100e3/self.sample_rate) - self.set_sps(self.sample_rate/self.sym_rate) - - def get_sps(self): - return self.sps - - def set_sps(self, sps): - self.sps = sps - self.set_hs(int(self.sps/2.0)) - self.digital_clock_recovery_mm_xx_0.set_omega(self.sps/2.0) - - def get_config_filename(self): - return self.config_filename - - def set_config_filename(self, config_filename): - self.config_filename = config_filename - self._freq_config = ConfigParser.ConfigParser() - self._freq_config.read(self.config_filename) - if not self._freq_config.has_section('usrp_rx_hrpt'): - self._freq_config.add_section('usrp_rx_hrpt') - self._freq_config.set('usrp_rx_hrpt', 'freq', str(self.freq)) - self._freq_config.write(open(self.config_filename, 'w')) - self._gain_config = ConfigParser.ConfigParser() - self._gain_config.read(self.config_filename) - if not self._gain_config.has_section('usrp_rx_hrpt'): - self._gain_config.add_section('usrp_rx_hrpt') - self._gain_config.set('usrp_rx_hrpt', 'gain', str(self.gain)) - self._gain_config.write(open(self.config_filename, 'w')) - self._pll_alpha_config = ConfigParser.ConfigParser() - self._pll_alpha_config.read(self.config_filename) - if not self._pll_alpha_config.has_section('usrp_rx_hrpt'): - self._pll_alpha_config.add_section('usrp_rx_hrpt') - self._pll_alpha_config.set('usrp_rx_hrpt', 'pll_alpha', str(self.pll_alpha)) - self._pll_alpha_config.write(open(self.config_filename, 'w')) - self._clock_alpha_config = ConfigParser.ConfigParser() - self._clock_alpha_config.read(self.config_filename) - if not self._clock_alpha_config.has_section('usrp_rx_hrpt'): - self._clock_alpha_config.add_section('usrp_rx_hrpt') - self._clock_alpha_config.set('usrp_rx_hrpt', 'clock_alpha', str(self.clock_alpha)) - self._clock_alpha_config.write(open(self.config_filename, 'w')) - self._output_filename_config = ConfigParser.ConfigParser() - self._output_filename_config.read(self.config_filename) - if not self._output_filename_config.has_section('usrp_rx_hrpt'): - self._output_filename_config.add_section('usrp_rx_hrpt') - self._output_filename_config.set('usrp_rx_hrpt', 'filename', str(self.output_filename)) - self._output_filename_config.write(open(self.config_filename, 'w')) - - def get_pll_alpha(self): - return self.pll_alpha - - def set_pll_alpha(self, pll_alpha): - self.pll_alpha = pll_alpha - self.pll.set_alpha(self.pll_alpha) - self.pll.set_beta(self.pll_alpha**2/4.0) - self._pll_alpha_config = ConfigParser.ConfigParser() - self._pll_alpha_config.read(self.config_filename) - if not self._pll_alpha_config.has_section('usrp_rx_hrpt'): - self._pll_alpha_config.add_section('usrp_rx_hrpt') - self._pll_alpha_config.set('usrp_rx_hrpt', 'pll_alpha', str(self.pll_alpha)) - self._pll_alpha_config.write(open(self.config_filename, 'w')) - - def get_output_filename(self): - return self.output_filename - - def set_output_filename(self, output_filename): - self.output_filename = output_filename - self._output_filename_config = ConfigParser.ConfigParser() - self._output_filename_config.read(self.config_filename) - if not self._output_filename_config.has_section('usrp_rx_hrpt'): - self._output_filename_config.add_section('usrp_rx_hrpt') - self._output_filename_config.set('usrp_rx_hrpt', 'filename', str(self.output_filename)) - self._output_filename_config.write(open(self.config_filename, 'w')) - - def get_max_clock_offset(self): - return self.max_clock_offset - - def set_max_clock_offset(self, max_clock_offset): - self.max_clock_offset = max_clock_offset - - def get_max_carrier_offset(self): - return self.max_carrier_offset - - def set_max_carrier_offset(self, max_carrier_offset): - self.max_carrier_offset = max_carrier_offset - self.pll.set_max_offset(self.max_carrier_offset) - - def get_hs(self): - return self.hs - - def set_hs(self, hs): - self.hs = hs - self.gr_moving_average_xx_0.set_length_and_scale(self.hs, 1.0/self.hs) - - def get_gain(self): - return self.gain - - def set_gain(self, gain): - self.gain = gain - self._gain_config = ConfigParser.ConfigParser() - self._gain_config.read(self.config_filename) - if not self._gain_config.has_section('usrp_rx_hrpt'): - self._gain_config.add_section('usrp_rx_hrpt') - self._gain_config.set('usrp_rx_hrpt', 'gain', str(self.gain)) - self._gain_config.write(open(self.config_filename, 'w')) - - def get_freq(self): - return self.freq - - def set_freq(self, freq): - self.freq = freq - self._freq_config = ConfigParser.ConfigParser() - self._freq_config.read(self.config_filename) - if not self._freq_config.has_section('usrp_rx_hrpt'): - self._freq_config.add_section('usrp_rx_hrpt') - self._freq_config.set('usrp_rx_hrpt', 'freq', str(self.freq)) - self._freq_config.write(open(self.config_filename, 'w')) - - def get_clock_alpha(self): - return self.clock_alpha - - def set_clock_alpha(self, clock_alpha): - self.clock_alpha = clock_alpha - self.digital_clock_recovery_mm_xx_0.set_gain_omega(self.clock_alpha**2/4.0) - self.digital_clock_recovery_mm_xx_0.set_gain_mu(self.clock_alpha) - self._clock_alpha_config = ConfigParser.ConfigParser() - self._clock_alpha_config.read(self.config_filename) - if not self._clock_alpha_config.has_section('usrp_rx_hrpt'): - self._clock_alpha_config.add_section('usrp_rx_hrpt') - self._clock_alpha_config.set('usrp_rx_hrpt', 'clock_alpha', str(self.clock_alpha)) - self._clock_alpha_config.write(open(self.config_filename, 'w')) - -if __name__ == '__main__': - parser = OptionParser(option_class=eng_option, usage="%prog: [options]") - (options, args) = parser.parse_args() - tb = file_rx_hrpt() - tb.start() - raw_input('Press Enter to quit: ') - tb.stop() - diff --git a/gr-noaa/apps/hrpt_decode.py b/gr-noaa/apps/hrpt_decode.py deleted file mode 100755 index 158780b17..000000000 --- a/gr-noaa/apps/hrpt_decode.py +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/env python -################################################## -# Gnuradio Python Flow Graph -# Title: Hrpt Decode -# Generated: Sun Nov 8 10:49:01 2009 -################################################## - -from gnuradio import eng_notation -from gnuradio import gr -from gnuradio import noaa -from gnuradio.eng_option import eng_option -from gnuradio.gr import firdes -from optparse import OptionParser -import math, os - -class hrpt_decode(gr.top_block): - - def __init__(self, decim=32, pll_alpha=0.01, clock_alpha=0.01, input_filename="frames.hrpt"): - gr.top_block.__init__(self, "Hrpt Decode") - - ################################################## - # Parameters - ################################################## - self.decim = decim - self.pll_alpha = pll_alpha - self.clock_alpha = clock_alpha - self.input_filename = input_filename - - ################################################## - # Variables - ################################################## - self.sym_rate = sym_rate = 600*1109 - self.sample_rate = sample_rate = 64e6/decim - self.sps = sps = sample_rate/sym_rate - self.max_clock_offset = max_clock_offset = 100e-6 - self.max_carrier_offset = max_carrier_offset = 2*math.pi*100e3/sample_rate - self.hs = hs = int(sps/2.0) - - ################################################## - # Blocks - ################################################## - self.decoder = noaa.hrpt_decoder(True,True) - self.file_source = gr.file_source(gr.sizeof_short*1, input_filename, False) - - ################################################## - # Connections - ################################################## - self.connect((self.file_source, 0), (self.decoder, 0)) - - def set_decim(self, decim): - self.decim = decim - self.set_sample_rate(64e6/self.decim) - - def set_pll_alpha(self, pll_alpha): - self.pll_alpha = pll_alpha - - def set_clock_alpha(self, clock_alpha): - self.clock_alpha = clock_alpha - - def set_input_filename(self, input_filename): - self.input_filename = input_filename - - def set_sym_rate(self, sym_rate): - self.sym_rate = sym_rate - self.set_sps(self.sample_rate/self.sym_rate) - - def set_sample_rate(self, sample_rate): - self.sample_rate = sample_rate - self.set_max_carrier_offset(2*math.pi*100e3/self.sample_rate) - self.set_sps(self.sample_rate/self.sym_rate) - - def set_sps(self, sps): - self.sps = sps - self.set_hs(int(self.sps/2.0)) - - def set_max_clock_offset(self, max_clock_offset): - self.max_clock_offset = max_clock_offset - - def set_max_carrier_offset(self, max_carrier_offset): - self.max_carrier_offset = max_carrier_offset - - def set_hs(self, hs): - self.hs = hs - -if __name__ == '__main__': - parser = OptionParser(option_class=eng_option, usage="%prog: [options]") - parser.add_option("-d", "--decim", dest="decim", type="intx", default=32, - help="Set decim [default=%default]") - parser.add_option("-p", "--pll-alpha", dest="pll_alpha", type="eng_float", default=eng_notation.num_to_str(0.01), - help="Set pll_alpha [default=%default]") - parser.add_option("-s", "--clock-alpha", dest="clock_alpha", type="eng_float", default=eng_notation.num_to_str(0.01), - help="Set clock_alpha [default=%default]") - parser.add_option("-F", "--input-filename", dest="input_filename", type="string", default="frames.hrpt", - help="Set frames.hrpt [default=%default]") - (options, args) = parser.parse_args() - tb = hrpt_decode(decim=options.decim, pll_alpha=options.pll_alpha, clock_alpha=options.clock_alpha, input_filename=options.input_filename) - tb.run() - diff --git a/gr-noaa/apps/hrpt_demod.py b/gr-noaa/apps/hrpt_demod.py deleted file mode 100755 index 38b4b2fe3..000000000 --- a/gr-noaa/apps/hrpt_demod.py +++ /dev/null @@ -1,161 +0,0 @@ -#!/usr/bin/env python -################################################## -# Gnuradio Python Flow Graph -# Title: Hrpt Demod -# Generated: Thu Oct 27 13:51:59 2011 -################################################## - -from gnuradio import digital -from gnuradio import eng_notation -from gnuradio import gr -from gnuradio import noaa -from gnuradio.eng_option import eng_option -from gnuradio.gr import firdes -from optparse import OptionParser -import math, os - -class hrpt_demod(gr.top_block): - - def __init__(self, input_filename="usrp.dat", output_filename="frames.dat", decim=32, pll_alpha=0.01, clock_alpha=0.01): - gr.top_block.__init__(self, "Hrpt Demod") - - ################################################## - # Parameters - ################################################## - self.input_filename = input_filename - self.output_filename = output_filename - self.decim = decim - self.pll_alpha = pll_alpha - self.clock_alpha = clock_alpha - - ################################################## - # Variables - ################################################## - self.sym_rate = sym_rate = 600*1109 - self.sample_rate = sample_rate = 4e6 - self.sps = sps = sample_rate/sym_rate - self.max_clock_offset = max_clock_offset = 100e-6 - self.max_carrier_offset = max_carrier_offset = 2*math.pi*100e3/sample_rate - self.hs = hs = int(sps/2.0) - - ################################################## - # Blocks - ################################################## - self.pll = noaa.hrpt_pll_cf(pll_alpha, pll_alpha**2/4.0, max_carrier_offset) - self.noaa_hrpt_deframer_0 = noaa.hrpt_deframer() - self.gr_moving_average_xx_0 = gr.moving_average_ff(hs, 1.0/hs, 4000) - self.gr_file_sink_0 = gr.file_sink(gr.sizeof_short*1, output_filename) - self.gr_file_sink_0.set_unbuffered(False) - self.file_source = gr.file_source(gr.sizeof_short*1, input_filename, False) - self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(sps/2.0, clock_alpha**2/4.0, 0.5, clock_alpha, max_clock_offset) - self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb() - self.decoder = noaa.hrpt_decoder(True,False) - self.cs2cf = gr.interleaved_short_to_complex() - self.agc = gr.agc_cc(1e-5, 1.0, 1.0/32768.0, 1.0) - - ################################################## - # Connections - ################################################## - self.connect((self.file_source, 0), (self.cs2cf, 0)) - self.connect((self.pll, 0), (self.gr_moving_average_xx_0, 0)) - self.connect((self.cs2cf, 0), (self.agc, 0)) - self.connect((self.agc, 0), (self.pll, 0)) - self.connect((self.noaa_hrpt_deframer_0, 0), (self.gr_file_sink_0, 0)) - self.connect((self.noaa_hrpt_deframer_0, 0), (self.decoder, 0)) - self.connect((self.gr_moving_average_xx_0, 0), (self.digital_clock_recovery_mm_xx_0, 0)) - self.connect((self.digital_clock_recovery_mm_xx_0, 0), (self.digital_binary_slicer_fb_0, 0)) - self.connect((self.digital_binary_slicer_fb_0, 0), (self.noaa_hrpt_deframer_0, 0)) - - def get_input_filename(self): - return self.input_filename - - def set_input_filename(self, input_filename): - self.input_filename = input_filename - - def get_output_filename(self): - return self.output_filename - - def set_output_filename(self, output_filename): - self.output_filename = output_filename - - def get_decim(self): - return self.decim - - def set_decim(self, decim): - self.decim = decim - - def get_pll_alpha(self): - return self.pll_alpha - - def set_pll_alpha(self, pll_alpha): - self.pll_alpha = pll_alpha - self.pll.set_alpha(self.pll_alpha) - self.pll.set_beta(self.pll_alpha**2/4.0) - - def get_clock_alpha(self): - return self.clock_alpha - - def set_clock_alpha(self, clock_alpha): - self.clock_alpha = clock_alpha - self.digital_clock_recovery_mm_xx_0.set_gain_omega(self.clock_alpha**2/4.0) - self.digital_clock_recovery_mm_xx_0.set_gain_mu(self.clock_alpha) - - def get_sym_rate(self): - return self.sym_rate - - def set_sym_rate(self, sym_rate): - self.sym_rate = sym_rate - self.set_sps(self.sample_rate/self.sym_rate) - - def get_sample_rate(self): - return self.sample_rate - - def set_sample_rate(self, sample_rate): - self.sample_rate = sample_rate - self.set_max_carrier_offset(2*math.pi*100e3/self.sample_rate) - self.set_sps(self.sample_rate/self.sym_rate) - - def get_sps(self): - return self.sps - - def set_sps(self, sps): - self.sps = sps - self.set_hs(int(self.sps/2.0)) - self.digital_clock_recovery_mm_xx_0.set_omega(self.sps/2.0) - - def get_max_clock_offset(self): - return self.max_clock_offset - - def set_max_clock_offset(self, max_clock_offset): - self.max_clock_offset = max_clock_offset - - def get_max_carrier_offset(self): - return self.max_carrier_offset - - def set_max_carrier_offset(self, max_carrier_offset): - self.max_carrier_offset = max_carrier_offset - self.pll.set_max_offset(self.max_carrier_offset) - - def get_hs(self): - return self.hs - - def set_hs(self, hs): - self.hs = hs - self.gr_moving_average_xx_0.set_length_and_scale(self.hs, 1.0/self.hs) - -if __name__ == '__main__': - parser = OptionParser(option_class=eng_option, usage="%prog: [options]") - parser.add_option("-F", "--input-filename", dest="input_filename", type="string", default="usrp.dat", - help="Set usrp.dat [default=%default]") - parser.add_option("-o", "--output-filename", dest="output_filename", type="string", default="frames.dat", - help="Set frames.dat [default=%default]") - parser.add_option("-d", "--decim", dest="decim", type="intx", default=32, - help="Set None [default=%default]") - parser.add_option("-p", "--pll-alpha", dest="pll_alpha", type="eng_float", default=eng_notation.num_to_str(0.01), - help="Set None [default=%default]") - parser.add_option("-s", "--clock-alpha", dest="clock_alpha", type="eng_float", default=eng_notation.num_to_str(0.01), - help="Set None [default=%default]") - (options, args) = parser.parse_args() - tb = hrpt_demod(input_filename=options.input_filename, output_filename=options.output_filename, decim=options.decim, pll_alpha=options.pll_alpha, clock_alpha=options.clock_alpha) - tb.run() - diff --git a/gr-noaa/apps/usrp_rx_hrpt.py b/gr-noaa/apps/usrp_rx_hrpt.py deleted file mode 100755 index e603e768e..000000000 --- a/gr-noaa/apps/usrp_rx_hrpt.py +++ /dev/null @@ -1,462 +0,0 @@ -#!/usr/bin/env python -################################################## -# Gnuradio Python Flow Graph -# Title: USRP HRPT Receiver -# Generated: Thu Oct 27 13:26:42 2011 -################################################## - -from gnuradio import digital -from gnuradio import eng_notation -from gnuradio import gr -from gnuradio import noaa -from gnuradio import uhd -from gnuradio import window -from gnuradio.eng_option import eng_option -from gnuradio.gr import firdes -from gnuradio.wxgui import fftsink2 -from gnuradio.wxgui import forms -from gnuradio.wxgui import scopesink2 -from grc_gnuradio import wxgui as grc_wxgui -from optparse import OptionParser -import ConfigParser -import math, os -import wx - -class usrp_rx_hrpt(grc_wxgui.top_block_gui): - - def __init__(self): - grc_wxgui.top_block_gui.__init__(self, title="USRP HRPT Receiver") - - ################################################## - # Variables - ################################################## - self.sym_rate = sym_rate = 600*1109 - self.sample_rate = sample_rate = 4e6 - self.config_filename = config_filename = os.environ['HOME']+'/.gnuradio/config.conf' - self.sps = sps = sample_rate/sym_rate - self._saved_pll_alpha_config = ConfigParser.ConfigParser() - self._saved_pll_alpha_config.read(config_filename) - try: saved_pll_alpha = self._saved_pll_alpha_config.getfloat('usrp_rx_hrpt', 'pll_alpha') - except: saved_pll_alpha = 0.01 - self.saved_pll_alpha = saved_pll_alpha - self._saved_gain_config = ConfigParser.ConfigParser() - self._saved_gain_config.read(config_filename) - try: saved_gain = self._saved_gain_config.getfloat('usrp_rx_hrpt', 'gain') - except: saved_gain = 35 - self.saved_gain = saved_gain - self._saved_freq_config = ConfigParser.ConfigParser() - self._saved_freq_config.read(config_filename) - try: saved_freq = self._saved_freq_config.getfloat('usrp_rx_hrpt', 'freq') - except: saved_freq = 1698e6 - self.saved_freq = saved_freq - self._saved_clock_alpha_config = ConfigParser.ConfigParser() - self._saved_clock_alpha_config.read(config_filename) - try: saved_clock_alpha = self._saved_clock_alpha_config.getfloat('usrp_rx_hrpt', 'clock_alpha') - except: saved_clock_alpha = 0.01 - self.saved_clock_alpha = saved_clock_alpha - self._addr_config = ConfigParser.ConfigParser() - self._addr_config.read(config_filename) - try: addr = self._addr_config.get('usrp_rx_hrpt', 'addr') - except: addr = "" - self.addr = addr - self.rate_text = rate_text = sample_rate - self.pll_alpha = pll_alpha = saved_pll_alpha - self._output_filename_config = ConfigParser.ConfigParser() - self._output_filename_config.read(config_filename) - try: output_filename = self._output_filename_config.get('usrp_rx_hrpt', 'filename') - except: output_filename = 'frames.hrpt' - self.output_filename = output_filename - self.max_clock_offset = max_clock_offset = 100e-6 - self.max_carrier_offset = max_carrier_offset = 2*math.pi*100e3/sample_rate - self.hs = hs = int(sps/2.0) - self.gain = gain = saved_gain - self.freq = freq = saved_freq - self.clock_alpha = clock_alpha = saved_clock_alpha - self.addr_text = addr_text = addr - - ################################################## - # Blocks - ################################################## - self._freq_text_box = forms.text_box( - parent=self.GetWin(), - value=self.freq, - callback=self.set_freq, - label="Frequency", - converter=forms.float_converter(), - ) - self.GridAdd(self._freq_text_box, 0, 0, 1, 1) - self.displays = self.displays = wx.Notebook(self.GetWin(), style=wx.NB_TOP) - self.displays.AddPage(grc_wxgui.Panel(self.displays), "Spectrum") - self.displays.AddPage(grc_wxgui.Panel(self.displays), "Demod") - self.GridAdd(self.displays, 2, 0, 1, 4) - _clock_alpha_sizer = wx.BoxSizer(wx.VERTICAL) - self._clock_alpha_text_box = forms.text_box( - parent=self.GetWin(), - sizer=_clock_alpha_sizer, - value=self.clock_alpha, - callback=self.set_clock_alpha, - label="Clock Alpha", - converter=forms.float_converter(), - proportion=0, - ) - self._clock_alpha_slider = forms.slider( - parent=self.GetWin(), - sizer=_clock_alpha_sizer, - value=self.clock_alpha, - callback=self.set_clock_alpha, - minimum=0.0, - maximum=0.5, - num_steps=100, - style=wx.SL_HORIZONTAL, - cast=float, - proportion=1, - ) - self.GridAdd(_clock_alpha_sizer, 0, 3, 1, 1) - self.uhd_usrp_source_0 = uhd.usrp_source( - device_addr=addr, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1, - ) - self.uhd_usrp_source_0.set_samp_rate(sample_rate) - self.uhd_usrp_source_0.set_center_freq(freq, 0) - self.uhd_usrp_source_0.set_gain(0, 0) - self.rx_fft = fftsink2.fft_sink_c( - self.displays.GetPage(0).GetWin(), - baseband_freq=freq, - y_per_div=5, - y_divs=8, - ref_level=-5, - ref_scale=2.0, - sample_rate=sample_rate, - fft_size=1024, - fft_rate=15, - average=True, - avg_alpha=0.1, - title="RX Spectrum", - peak_hold=False, - size=(640, 360), - ) - self.displays.GetPage(0).GridAdd(self.rx_fft.win, 0, 0, 1, 1) - self._rate_text_static_text = forms.static_text( - parent=self.GetWin(), - value=self.rate_text, - callback=self.set_rate_text, - label="Baseband Rate", - converter=forms.float_converter(), - ) - self.GridAdd(self._rate_text_static_text, 1, 1, 1, 1) - _pll_alpha_sizer = wx.BoxSizer(wx.VERTICAL) - self._pll_alpha_text_box = forms.text_box( - parent=self.GetWin(), - sizer=_pll_alpha_sizer, - value=self.pll_alpha, - callback=self.set_pll_alpha, - label="PLL Alpha", - converter=forms.float_converter(), - proportion=0, - ) - self._pll_alpha_slider = forms.slider( - parent=self.GetWin(), - sizer=_pll_alpha_sizer, - value=self.pll_alpha, - callback=self.set_pll_alpha, - minimum=0.0, - maximum=0.5, - num_steps=100, - style=wx.SL_HORIZONTAL, - cast=float, - proportion=1, - ) - self.GridAdd(_pll_alpha_sizer, 0, 2, 1, 1) - self.pll = noaa.hrpt_pll_cf(pll_alpha, pll_alpha**2/4.0, max_carrier_offset) - self.gr_moving_average_xx_0 = gr.moving_average_ff(hs, 1.0/hs, 4000) - _gain_sizer = wx.BoxSizer(wx.VERTICAL) - self._gain_text_box = forms.text_box( - parent=self.GetWin(), - sizer=_gain_sizer, - value=self.gain, - callback=self.set_gain, - label="RX Gain", - converter=forms.float_converter(), - proportion=0, - ) - self._gain_slider = forms.slider( - parent=self.GetWin(), - sizer=_gain_sizer, - value=self.gain, - callback=self.set_gain, - minimum=0, - maximum=100, - num_steps=100, - style=wx.SL_HORIZONTAL, - cast=float, - proportion=1, - ) - self.GridAdd(_gain_sizer, 0, 1, 1, 1) - self.frame_sink = gr.file_sink(gr.sizeof_short*1, output_filename) - self.frame_sink.set_unbuffered(False) - self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(sps/2.0, clock_alpha**2/4.0, 0.5, clock_alpha, max_clock_offset) - self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb() - self.demod_scope = scopesink2.scope_sink_f( - self.displays.GetPage(1).GetWin(), - title="Post-Demod", - sample_rate=sym_rate*2.0, - v_scale=0.5, - v_offset=0, - t_scale=10.0/sym_rate, - ac_couple=False, - xy_mode=False, - num_inputs=1, - trig_mode=gr.gr_TRIG_MODE_AUTO, - y_axis_label="Counts", - ) - self.displays.GetPage(1).GridAdd(self.demod_scope.win, 0, 0, 1, 1) - self.deframer = noaa.hrpt_deframer() - self.decoder = noaa.hrpt_decoder(True,True) - self.agc = gr.agc_cc(1e-6, 1.0, 1.0, 1.0) - self._addr_text_static_text = forms.static_text( - parent=self.GetWin(), - value=self.addr_text, - callback=self.set_addr_text, - label="USRP Addr", - converter=forms.str_converter(), - ) - self.GridAdd(self._addr_text_static_text, 1, 0, 1, 1) - - ################################################## - # Connections - ################################################## - self.connect((self.deframer, 0), (self.frame_sink, 0)) - self.connect((self.deframer, 0), (self.decoder, 0)) - self.connect((self.agc, 0), (self.pll, 0)) - self.connect((self.agc, 0), (self.rx_fft, 0)) - self.connect((self.uhd_usrp_source_0, 0), (self.agc, 0)) - self.connect((self.pll, 0), (self.gr_moving_average_xx_0, 0)) - self.connect((self.gr_moving_average_xx_0, 0), (self.demod_scope, 0)) - self.connect((self.gr_moving_average_xx_0, 0), (self.digital_clock_recovery_mm_xx_0, 0)) - self.connect((self.digital_clock_recovery_mm_xx_0, 0), (self.digital_binary_slicer_fb_0, 0)) - self.connect((self.digital_binary_slicer_fb_0, 0), (self.deframer, 0)) - - def get_sym_rate(self): - return self.sym_rate - - def set_sym_rate(self, sym_rate): - self.sym_rate = sym_rate - self.set_sps(self.sample_rate/self.sym_rate) - self.demod_scope.set_sample_rate(self.sym_rate*2.0) - - def get_sample_rate(self): - return self.sample_rate - - def set_sample_rate(self, sample_rate): - self.sample_rate = sample_rate - self.set_max_carrier_offset(2*math.pi*100e3/self.sample_rate) - self.set_sps(self.sample_rate/self.sym_rate) - self.rx_fft.set_sample_rate(self.sample_rate) - self.uhd_usrp_source_0.set_samp_rate(self.sample_rate) - self.set_rate_text(self.sample_rate) - - def get_config_filename(self): - return self.config_filename - - def set_config_filename(self, config_filename): - self.config_filename = config_filename - self._addr_config = ConfigParser.ConfigParser() - self._addr_config.read(self.config_filename) - if not self._addr_config.has_section('usrp_rx_hrpt'): - self._addr_config.add_section('usrp_rx_hrpt') - self._addr_config.set('usrp_rx_hrpt', 'addr', str(self.addr)) - self._addr_config.write(open(self.config_filename, 'w')) - self._output_filename_config = ConfigParser.ConfigParser() - self._output_filename_config.read(self.config_filename) - if not self._output_filename_config.has_section('usrp_rx_hrpt'): - self._output_filename_config.add_section('usrp_rx_hrpt') - self._output_filename_config.set('usrp_rx_hrpt', 'filename', str(self.output_filename)) - self._output_filename_config.write(open(self.config_filename, 'w')) - self._saved_clock_alpha_config = ConfigParser.ConfigParser() - self._saved_clock_alpha_config.read(self.config_filename) - if not self._saved_clock_alpha_config.has_section('usrp_rx_hrpt'): - self._saved_clock_alpha_config.add_section('usrp_rx_hrpt') - self._saved_clock_alpha_config.set('usrp_rx_hrpt', 'clock_alpha', str(self.clock_alpha)) - self._saved_clock_alpha_config.write(open(self.config_filename, 'w')) - self._saved_pll_alpha_config = ConfigParser.ConfigParser() - self._saved_pll_alpha_config.read(self.config_filename) - if not self._saved_pll_alpha_config.has_section('usrp_rx_hrpt'): - self._saved_pll_alpha_config.add_section('usrp_rx_hrpt') - self._saved_pll_alpha_config.set('usrp_rx_hrpt', 'pll_alpha', str(self.pll_alpha)) - self._saved_pll_alpha_config.write(open(self.config_filename, 'w')) - self._saved_gain_config = ConfigParser.ConfigParser() - self._saved_gain_config.read(self.config_filename) - if not self._saved_gain_config.has_section('usrp_rx_hrpt'): - self._saved_gain_config.add_section('usrp_rx_hrpt') - self._saved_gain_config.set('usrp_rx_hrpt', 'gain', str(self.gain)) - self._saved_gain_config.write(open(self.config_filename, 'w')) - self._saved_freq_config = ConfigParser.ConfigParser() - self._saved_freq_config.read(self.config_filename) - if not self._saved_freq_config.has_section('usrp_rx_hrpt'): - self._saved_freq_config.add_section('usrp_rx_hrpt') - self._saved_freq_config.set('usrp_rx_hrpt', 'freq', str(self.freq)) - self._saved_freq_config.write(open(self.config_filename, 'w')) - - def get_sps(self): - return self.sps - - def set_sps(self, sps): - self.sps = sps - self.set_hs(int(self.sps/2.0)) - self.digital_clock_recovery_mm_xx_0.set_omega(self.sps/2.0) - - def get_saved_pll_alpha(self): - return self.saved_pll_alpha - - def set_saved_pll_alpha(self, saved_pll_alpha): - self.saved_pll_alpha = saved_pll_alpha - self.set_pll_alpha(self.saved_pll_alpha) - - def get_saved_gain(self): - return self.saved_gain - - def set_saved_gain(self, saved_gain): - self.saved_gain = saved_gain - self.set_gain(self.saved_gain) - - def get_saved_freq(self): - return self.saved_freq - - def set_saved_freq(self, saved_freq): - self.saved_freq = saved_freq - self.set_freq(self.saved_freq) - - def get_saved_clock_alpha(self): - return self.saved_clock_alpha - - def set_saved_clock_alpha(self, saved_clock_alpha): - self.saved_clock_alpha = saved_clock_alpha - self.set_clock_alpha(self.saved_clock_alpha) - - def get_addr(self): - return self.addr - - def set_addr(self, addr): - self.addr = addr - self._addr_config = ConfigParser.ConfigParser() - self._addr_config.read(self.config_filename) - if not self._addr_config.has_section('usrp_rx_hrpt'): - self._addr_config.add_section('usrp_rx_hrpt') - self._addr_config.set('usrp_rx_hrpt', 'addr', str(self.addr)) - self._addr_config.write(open(self.config_filename, 'w')) - self.set_addr_text(self.addr) - - def get_rate_text(self): - return self.rate_text - - def set_rate_text(self, rate_text): - self.rate_text = rate_text - self._rate_text_static_text.set_value(self.rate_text) - - def get_pll_alpha(self): - return self.pll_alpha - - def set_pll_alpha(self, pll_alpha): - self.pll_alpha = pll_alpha - self._pll_alpha_slider.set_value(self.pll_alpha) - self._pll_alpha_text_box.set_value(self.pll_alpha) - self.pll.set_alpha(self.pll_alpha) - self.pll.set_beta(self.pll_alpha**2/4.0) - self._saved_pll_alpha_config = ConfigParser.ConfigParser() - self._saved_pll_alpha_config.read(self.config_filename) - if not self._saved_pll_alpha_config.has_section('usrp_rx_hrpt'): - self._saved_pll_alpha_config.add_section('usrp_rx_hrpt') - self._saved_pll_alpha_config.set('usrp_rx_hrpt', 'pll_alpha', str(self.pll_alpha)) - self._saved_pll_alpha_config.write(open(self.config_filename, 'w')) - - def get_output_filename(self): - return self.output_filename - - def set_output_filename(self, output_filename): - self.output_filename = output_filename - self._output_filename_config = ConfigParser.ConfigParser() - self._output_filename_config.read(self.config_filename) - if not self._output_filename_config.has_section('usrp_rx_hrpt'): - self._output_filename_config.add_section('usrp_rx_hrpt') - self._output_filename_config.set('usrp_rx_hrpt', 'filename', str(self.output_filename)) - self._output_filename_config.write(open(self.config_filename, 'w')) - - def get_max_clock_offset(self): - return self.max_clock_offset - - def set_max_clock_offset(self, max_clock_offset): - self.max_clock_offset = max_clock_offset - - def get_max_carrier_offset(self): - return self.max_carrier_offset - - def set_max_carrier_offset(self, max_carrier_offset): - self.max_carrier_offset = max_carrier_offset - self.pll.set_max_offset(self.max_carrier_offset) - - def get_hs(self): - return self.hs - - def set_hs(self, hs): - self.hs = hs - self.gr_moving_average_xx_0.set_length_and_scale(self.hs, 1.0/self.hs) - - def get_gain(self): - return self.gain - - def set_gain(self, gain): - self.gain = gain - self._gain_slider.set_value(self.gain) - self._gain_text_box.set_value(self.gain) - self._saved_gain_config = ConfigParser.ConfigParser() - self._saved_gain_config.read(self.config_filename) - if not self._saved_gain_config.has_section('usrp_rx_hrpt'): - self._saved_gain_config.add_section('usrp_rx_hrpt') - self._saved_gain_config.set('usrp_rx_hrpt', 'gain', str(self.gain)) - self._saved_gain_config.write(open(self.config_filename, 'w')) - - def get_freq(self): - return self.freq - - def set_freq(self, freq): - self.freq = freq - self._freq_text_box.set_value(self.freq) - self.rx_fft.set_baseband_freq(self.freq) - self.uhd_usrp_source_0.set_center_freq(self.freq, 0) - self._saved_freq_config = ConfigParser.ConfigParser() - self._saved_freq_config.read(self.config_filename) - if not self._saved_freq_config.has_section('usrp_rx_hrpt'): - self._saved_freq_config.add_section('usrp_rx_hrpt') - self._saved_freq_config.set('usrp_rx_hrpt', 'freq', str(self.freq)) - self._saved_freq_config.write(open(self.config_filename, 'w')) - - def get_clock_alpha(self): - return self.clock_alpha - - def set_clock_alpha(self, clock_alpha): - self.clock_alpha = clock_alpha - self._clock_alpha_slider.set_value(self.clock_alpha) - self._clock_alpha_text_box.set_value(self.clock_alpha) - self._saved_clock_alpha_config = ConfigParser.ConfigParser() - self._saved_clock_alpha_config.read(self.config_filename) - if not self._saved_clock_alpha_config.has_section('usrp_rx_hrpt'): - self._saved_clock_alpha_config.add_section('usrp_rx_hrpt') - self._saved_clock_alpha_config.set('usrp_rx_hrpt', 'clock_alpha', str(self.clock_alpha)) - self._saved_clock_alpha_config.write(open(self.config_filename, 'w')) - self.digital_clock_recovery_mm_xx_0.set_gain_omega(self.clock_alpha**2/4.0) - self.digital_clock_recovery_mm_xx_0.set_gain_mu(self.clock_alpha) - - def get_addr_text(self): - return self.addr_text - - def set_addr_text(self, addr_text): - self.addr_text = addr_text - self._addr_text_static_text.set_value(self.addr_text) - -if __name__ == '__main__': - parser = OptionParser(option_class=eng_option, usage="%prog: [options]") - (options, args) = parser.parse_args() - tb = usrp_rx_hrpt() - tb.Run(True) - diff --git a/gr-noaa/apps/usrp_rx_hrpt_nogui.py b/gr-noaa/apps/usrp_rx_hrpt_nogui.py deleted file mode 100755 index 4fc5642ff..000000000 --- a/gr-noaa/apps/usrp_rx_hrpt_nogui.py +++ /dev/null @@ -1,268 +0,0 @@ -#!/usr/bin/env python -################################################## -# Gnuradio Python Flow Graph -# Title: USRP HRPT Receiver -# Generated: Thu Oct 27 13:49:01 2011 -################################################## - -from gnuradio import digital -from gnuradio import eng_notation -from gnuradio import gr -from gnuradio import noaa -from gnuradio import uhd -from gnuradio.eng_option import eng_option -from gnuradio.gr import firdes -from optparse import OptionParser -import ConfigParser -import math, os - -class usrp_rx_hrpt_nogui(gr.top_block): - - def __init__(self): - gr.top_block.__init__(self, "USRP HRPT Receiver") - - ################################################## - # Variables - ################################################## - self.sym_rate = sym_rate = 600*1109 - self.sample_rate = sample_rate = 4e6 - self.sps = sps = sample_rate/sym_rate - self.config_filename = config_filename = os.environ['HOME']+'/.gnuradio/config.conf' - self._pll_alpha_config = ConfigParser.ConfigParser() - self._pll_alpha_config.read(config_filename) - try: pll_alpha = self._pll_alpha_config.getfloat('usrp_rx_hrpt', 'pll_alpha') - except: pll_alpha = 0.01 - self.pll_alpha = pll_alpha - self._output_filename_config = ConfigParser.ConfigParser() - self._output_filename_config.read(config_filename) - try: output_filename = self._output_filename_config.get('usrp_rx_hrpt', 'filename') - except: output_filename = 'frames.hrpt' - self.output_filename = output_filename - self.max_clock_offset = max_clock_offset = 100e-6 - self.max_carrier_offset = max_carrier_offset = 2*math.pi*100e3/sample_rate - self.hs = hs = int(sps/2.0) - self._gain_config = ConfigParser.ConfigParser() - self._gain_config.read(config_filename) - try: gain = self._gain_config.getfloat('usrp_rx_hrpt', 'gain') - except: gain = 35 - self.gain = gain - self._freq_config = ConfigParser.ConfigParser() - self._freq_config.read(config_filename) - try: freq = self._freq_config.getfloat('usrp_rx_hrpt', 'freq') - except: freq = 1698e6 - self.freq = freq - self._clock_alpha_config = ConfigParser.ConfigParser() - self._clock_alpha_config.read(config_filename) - try: clock_alpha = self._clock_alpha_config.getfloat('usrp_rx_hrpt', 'clock_alpha') - except: clock_alpha = 0.01 - self.clock_alpha = clock_alpha - self._addr_config = ConfigParser.ConfigParser() - self._addr_config.read(config_filename) - try: addr = self._addr_config.get('usrp_rx_hrpt', 'addr') - except: addr = "" - self.addr = addr - - ################################################## - # Blocks - ################################################## - self.uhd_usrp_source_0 = uhd.usrp_source( - device_addr=addr, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1, - ) - self.uhd_usrp_source_0.set_samp_rate(sample_rate) - self.uhd_usrp_source_0.set_center_freq(freq, 0) - self.uhd_usrp_source_0.set_gain(0, 0) - self.pll = noaa.hrpt_pll_cf(pll_alpha, pll_alpha**2/4.0, max_carrier_offset) - self.gr_moving_average_xx_0 = gr.moving_average_ff(hs, 1.0/hs, 4000) - self.frame_sink = gr.file_sink(gr.sizeof_short*1, output_filename) - self.frame_sink.set_unbuffered(False) - self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(sps/2.0, clock_alpha**2/4.0, 0.5, clock_alpha, max_clock_offset) - self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb() - self.deframer = noaa.hrpt_deframer() - self.decoder = noaa.hrpt_decoder(True,True) - self.agc = gr.agc_cc(1e-6, 1.0, 1.0, 1.0) - - ################################################## - # Connections - ################################################## - self.connect((self.gr_moving_average_xx_0, 0), (self.digital_clock_recovery_mm_xx_0, 0)) - self.connect((self.pll, 0), (self.gr_moving_average_xx_0, 0)) - self.connect((self.uhd_usrp_source_0, 0), (self.agc, 0)) - self.connect((self.agc, 0), (self.pll, 0)) - self.connect((self.digital_binary_slicer_fb_0, 0), (self.deframer, 0)) - self.connect((self.digital_clock_recovery_mm_xx_0, 0), (self.digital_binary_slicer_fb_0, 0)) - self.connect((self.deframer, 0), (self.decoder, 0)) - self.connect((self.deframer, 0), (self.frame_sink, 0)) - - def get_sym_rate(self): - return self.sym_rate - - def set_sym_rate(self, sym_rate): - self.sym_rate = sym_rate - self.set_sps(self.sample_rate/self.sym_rate) - - def get_sample_rate(self): - return self.sample_rate - - def set_sample_rate(self, sample_rate): - self.sample_rate = sample_rate - self.set_max_carrier_offset(2*math.pi*100e3/self.sample_rate) - self.set_sps(self.sample_rate/self.sym_rate) - self.uhd_usrp_source_0.set_samp_rate(self.sample_rate) - - def get_sps(self): - return self.sps - - def set_sps(self, sps): - self.sps = sps - self.set_hs(int(self.sps/2.0)) - self.digital_clock_recovery_mm_xx_0.set_omega(self.sps/2.0) - - def get_config_filename(self): - return self.config_filename - - def set_config_filename(self, config_filename): - self.config_filename = config_filename - self._clock_alpha_config = ConfigParser.ConfigParser() - self._clock_alpha_config.read(self.config_filename) - if not self._clock_alpha_config.has_section('usrp_rx_hrpt'): - self._clock_alpha_config.add_section('usrp_rx_hrpt') - self._clock_alpha_config.set('usrp_rx_hrpt', 'clock_alpha', str(self.clock_alpha)) - self._clock_alpha_config.write(open(self.config_filename, 'w')) - self._pll_alpha_config = ConfigParser.ConfigParser() - self._pll_alpha_config.read(self.config_filename) - if not self._pll_alpha_config.has_section('usrp_rx_hrpt'): - self._pll_alpha_config.add_section('usrp_rx_hrpt') - self._pll_alpha_config.set('usrp_rx_hrpt', 'pll_alpha', str(self.pll_alpha)) - self._pll_alpha_config.write(open(self.config_filename, 'w')) - self._gain_config = ConfigParser.ConfigParser() - self._gain_config.read(self.config_filename) - if not self._gain_config.has_section('usrp_rx_hrpt'): - self._gain_config.add_section('usrp_rx_hrpt') - self._gain_config.set('usrp_rx_hrpt', 'gain', str(self.gain)) - self._gain_config.write(open(self.config_filename, 'w')) - self._freq_config = ConfigParser.ConfigParser() - self._freq_config.read(self.config_filename) - if not self._freq_config.has_section('usrp_rx_hrpt'): - self._freq_config.add_section('usrp_rx_hrpt') - self._freq_config.set('usrp_rx_hrpt', 'freq', str(self.freq)) - self._freq_config.write(open(self.config_filename, 'w')) - self._output_filename_config = ConfigParser.ConfigParser() - self._output_filename_config.read(self.config_filename) - if not self._output_filename_config.has_section('usrp_rx_hrpt'): - self._output_filename_config.add_section('usrp_rx_hrpt') - self._output_filename_config.set('usrp_rx_hrpt', 'filename', str(self.output_filename)) - self._output_filename_config.write(open(self.config_filename, 'w')) - self._addr_config = ConfigParser.ConfigParser() - self._addr_config.read(self.config_filename) - if not self._addr_config.has_section('usrp_rx_hrpt'): - self._addr_config.add_section('usrp_rx_hrpt') - self._addr_config.set('usrp_rx_hrpt', 'addr', str(self.addr)) - self._addr_config.write(open(self.config_filename, 'w')) - - def get_pll_alpha(self): - return self.pll_alpha - - def set_pll_alpha(self, pll_alpha): - self.pll_alpha = pll_alpha - self._pll_alpha_config = ConfigParser.ConfigParser() - self._pll_alpha_config.read(self.config_filename) - if not self._pll_alpha_config.has_section('usrp_rx_hrpt'): - self._pll_alpha_config.add_section('usrp_rx_hrpt') - self._pll_alpha_config.set('usrp_rx_hrpt', 'pll_alpha', str(self.pll_alpha)) - self._pll_alpha_config.write(open(self.config_filename, 'w')) - self.pll.set_alpha(self.pll_alpha) - self.pll.set_beta(self.pll_alpha**2/4.0) - - def get_output_filename(self): - return self.output_filename - - def set_output_filename(self, output_filename): - self.output_filename = output_filename - self._output_filename_config = ConfigParser.ConfigParser() - self._output_filename_config.read(self.config_filename) - if not self._output_filename_config.has_section('usrp_rx_hrpt'): - self._output_filename_config.add_section('usrp_rx_hrpt') - self._output_filename_config.set('usrp_rx_hrpt', 'filename', str(self.output_filename)) - self._output_filename_config.write(open(self.config_filename, 'w')) - - def get_max_clock_offset(self): - return self.max_clock_offset - - def set_max_clock_offset(self, max_clock_offset): - self.max_clock_offset = max_clock_offset - - def get_max_carrier_offset(self): - return self.max_carrier_offset - - def set_max_carrier_offset(self, max_carrier_offset): - self.max_carrier_offset = max_carrier_offset - self.pll.set_max_offset(self.max_carrier_offset) - - def get_hs(self): - return self.hs - - def set_hs(self, hs): - self.hs = hs - self.gr_moving_average_xx_0.set_length_and_scale(self.hs, 1.0/self.hs) - - def get_gain(self): - return self.gain - - def set_gain(self, gain): - self.gain = gain - self._gain_config = ConfigParser.ConfigParser() - self._gain_config.read(self.config_filename) - if not self._gain_config.has_section('usrp_rx_hrpt'): - self._gain_config.add_section('usrp_rx_hrpt') - self._gain_config.set('usrp_rx_hrpt', 'gain', str(self.gain)) - self._gain_config.write(open(self.config_filename, 'w')) - - def get_freq(self): - return self.freq - - def set_freq(self, freq): - self.freq = freq - self._freq_config = ConfigParser.ConfigParser() - self._freq_config.read(self.config_filename) - if not self._freq_config.has_section('usrp_rx_hrpt'): - self._freq_config.add_section('usrp_rx_hrpt') - self._freq_config.set('usrp_rx_hrpt', 'freq', str(self.freq)) - self._freq_config.write(open(self.config_filename, 'w')) - self.uhd_usrp_source_0.set_center_freq(self.freq, 0) - - def get_clock_alpha(self): - return self.clock_alpha - - def set_clock_alpha(self, clock_alpha): - self.clock_alpha = clock_alpha - self._clock_alpha_config = ConfigParser.ConfigParser() - self._clock_alpha_config.read(self.config_filename) - if not self._clock_alpha_config.has_section('usrp_rx_hrpt'): - self._clock_alpha_config.add_section('usrp_rx_hrpt') - self._clock_alpha_config.set('usrp_rx_hrpt', 'clock_alpha', str(self.clock_alpha)) - self._clock_alpha_config.write(open(self.config_filename, 'w')) - self.digital_clock_recovery_mm_xx_0.set_gain_omega(self.clock_alpha**2/4.0) - self.digital_clock_recovery_mm_xx_0.set_gain_mu(self.clock_alpha) - - def get_addr(self): - return self.addr - - def set_addr(self, addr): - self.addr = addr - self._addr_config = ConfigParser.ConfigParser() - self._addr_config.read(self.config_filename) - if not self._addr_config.has_section('usrp_rx_hrpt'): - self._addr_config.add_section('usrp_rx_hrpt') - self._addr_config.set('usrp_rx_hrpt', 'addr', str(self.addr)) - self._addr_config.write(open(self.config_filename, 'w')) - -if __name__ == '__main__': - parser = OptionParser(option_class=eng_option, usage="%prog: [options]") - (options, args) = parser.parse_args() - tb = usrp_rx_hrpt_nogui() - tb.start() - raw_input('Press Enter to quit: ') - tb.stop() - diff --git a/gr-noaa/apps/CMakeLists.txt b/gr-noaa/examples/CMakeLists.txt index 233f0ee5f..6994148df 100644 --- a/gr-noaa/apps/CMakeLists.txt +++ b/gr-noaa/examples/CMakeLists.txt @@ -17,15 +17,13 @@ # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -include(GrPython) - -GR_PYTHON_INSTALL( - PROGRAMS - hrpt_decode.py - hrpt_demod.py - file_rx_hrpt.py - usrp_rx_hrpt.py - usrp_rx_hrpt_nogui.py - DESTINATION ${GR_RUNTIME_DIR} +INSTALL( + FILES + hrpt_decode.grc + hrpt_demod.grc + file_rx_hrpt.grc + usrp_rx_hrpt.grc + usrp_rx_hrpt_nogui.grc + DESTINATION ${GR_PKG_NOAA_EXAMPLES_DIR} COMPONENT "noaa_python" ) diff --git a/gr-noaa/apps/file_rx_hrpt.grc b/gr-noaa/examples/file_rx_hrpt.grc index 4097e83d3..4097e83d3 100644 --- a/gr-noaa/apps/file_rx_hrpt.grc +++ b/gr-noaa/examples/file_rx_hrpt.grc diff --git a/gr-noaa/apps/hrpt_decode.grc b/gr-noaa/examples/hrpt_decode.grc index 39fe195d1..39fe195d1 100644 --- a/gr-noaa/apps/hrpt_decode.grc +++ b/gr-noaa/examples/hrpt_decode.grc diff --git a/gr-noaa/apps/hrpt_demod.grc b/gr-noaa/examples/hrpt_demod.grc index f5833b864..f5833b864 100644 --- a/gr-noaa/apps/hrpt_demod.grc +++ b/gr-noaa/examples/hrpt_demod.grc diff --git a/gr-noaa/apps/usrp_rx_hrpt.grc b/gr-noaa/examples/usrp_rx_hrpt.grc index 26af48ff0..26af48ff0 100644 --- a/gr-noaa/apps/usrp_rx_hrpt.grc +++ b/gr-noaa/examples/usrp_rx_hrpt.grc diff --git a/gr-noaa/apps/usrp_rx_hrpt_nogui.grc b/gr-noaa/examples/usrp_rx_hrpt_nogui.grc index 5936c94c8..5936c94c8 100644 --- a/gr-noaa/apps/usrp_rx_hrpt_nogui.grc +++ b/gr-noaa/examples/usrp_rx_hrpt_nogui.grc diff --git a/gr-noaa/grc/.gitignore b/gr-noaa/grc/.gitignore deleted file mode 100644 index 70845e08e..000000000 --- a/gr-noaa/grc/.gitignore +++ /dev/null @@ -1 +0,0 @@ -Makefile.in diff --git a/gr-noaa/grc/CMakeLists.txt b/gr-noaa/grc/CMakeLists.txt index 92d707477..ae04d4b6e 100644 --- a/gr-noaa/grc/CMakeLists.txt +++ b/gr-noaa/grc/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-noaa/grc/Makefile.am b/gr-noaa/grc/Makefile.am deleted file mode 100644 index 73a028231..000000000 --- a/gr-noaa/grc/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -# -# 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. -# - -include $(top_srcdir)/Makefile.common - -grcblocksdir = $(grc_blocksdir) - -dist_grcblocks_DATA = \ - noaa_hrpt_decoder.xml \ - noaa_hrpt_deframer.xml \ - noaa_hrpt_pll_cf.xml - diff --git a/gr-noaa/lib/.gitignore b/gr-noaa/lib/.gitignore deleted file mode 100644 index 02b052397..000000000 --- a/gr-noaa/lib/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -Makefile -Makefile.in -.deps -.libs diff --git a/gr-noaa/lib/Makefile.am b/gr-noaa/lib/Makefile.am deleted file mode 100644 index 8eedbbb18..000000000 --- a/gr-noaa/lib/Makefile.am +++ /dev/null @@ -1,48 +0,0 @@ -# -# 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. -# - -include $(top_srcdir)/Makefile.common - -AM_CPPFLAGS = \ - $(STD_DEFINES_AND_INCLUDES) \ - $(WITH_INCLUDES) - -lib_LTLIBRARIES = \ - libgnuradio-noaa.la - -libgnuradio_noaa_la_SOURCES = \ - noaa_hrpt_decoder.cc \ - noaa_hrpt_deframer.cc \ - noaa_hrpt_pll_cf.cc - -noinst_HEADERS = \ - noaa_hrpt.h - -libgnuradio_noaa_la_LIBADD = \ - $(GNURADIO_CORE_LA) - -libgnuradio_noaa_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) - -grinclude_HEADERS = \ - noaa_api.h \ - noaa_hrpt_decoder.h \ - noaa_hrpt_deframer.h \ - noaa_hrpt_pll_cf.h diff --git a/gr-noaa/lib/noaa_hrpt.h b/gr-noaa/lib/noaa_hrpt.h index 3812e9368..f0f0e53f4 100644 --- a/gr-noaa/lib/noaa_hrpt.h +++ b/gr-noaa/lib/noaa_hrpt.h @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-noaa/lib/noaa_hrpt_decoder.cc b/gr-noaa/lib/noaa_hrpt_decoder.cc index 243310089..d6a063285 100644 --- a/gr-noaa/lib/noaa_hrpt_decoder.cc +++ b/gr-noaa/lib/noaa_hrpt_decoder.cc @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -142,7 +142,7 @@ noaa_hrpt_decoder::process_mfnum() else if (d_verbose) fprintf(stderr, " "); - + if (d_verbose) fprintf(stderr, "%i ", d_current_mfnum); d_expected_mfnum = (d_current_mfnum == 3) ? 1 : d_current_mfnum+1; diff --git a/gr-noaa/lib/noaa_hrpt_decoder.h b/gr-noaa/lib/noaa_hrpt_decoder.h index 4db09106e..3b3214b72 100644 --- a/gr-noaa/lib/noaa_hrpt_decoder.h +++ b/gr-noaa/lib/noaa_hrpt_decoder.h @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-noaa/lib/noaa_hrpt_deframer.cc b/gr-noaa/lib/noaa_hrpt_deframer.cc index 1a2af6c37..d668ccad3 100644 --- a/gr-noaa/lib/noaa_hrpt_deframer.cc +++ b/gr-noaa/lib/noaa_hrpt_deframer.cc @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -86,7 +86,7 @@ noaa_hrpt_deframer::general_work(int noutput_items, switch (d_state) { case ST_IDLE: d_shifter = (d_shifter << 1) | bit; // MSB transmitted first - + if ((d_shifter & 0x0FFFFFFFFFFFFFFFLL) == HRPT_MINOR_FRAME_SYNC) { out[j++] = HRPT_SYNC1; out[j++] = HRPT_SYNC2; @@ -97,7 +97,7 @@ noaa_hrpt_deframer::general_work(int noutput_items, enter_synced(); } break; - + case ST_SYNCED: d_word = (d_word << 1) | bit; // MSB transmitted first if (--d_bit_count == 0) { @@ -109,7 +109,7 @@ noaa_hrpt_deframer::general_work(int noutput_items, } } break; - + default: throw std::runtime_error("noaa_hrpt_deframer: bad state\n"); } diff --git a/gr-noaa/lib/noaa_hrpt_deframer.h b/gr-noaa/lib/noaa_hrpt_deframer.h index d254746af..475ad90f6 100644 --- a/gr-noaa/lib/noaa_hrpt_deframer.h +++ b/gr-noaa/lib/noaa_hrpt_deframer.h @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -47,7 +47,7 @@ class NOAA_API noaa_hrpt_deframer : public gr_block void enter_idle(); void enter_synced(); - + public: int general_work(int noutput_items, gr_vector_int &ninput_items, diff --git a/gr-noaa/lib/noaa_hrpt_pll_cf.cc b/gr-noaa/lib/noaa_hrpt_pll_cf.cc index ba2ce98d5..ea948f04b 100644 --- a/gr-noaa/lib/noaa_hrpt_pll_cf.cc +++ b/gr-noaa/lib/noaa_hrpt_pll_cf.cc @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-noaa/lib/noaa_hrpt_pll_cf.h b/gr-noaa/lib/noaa_hrpt_pll_cf.h index 8d3e8f8d5..178dccfb3 100644 --- a/gr-noaa/lib/noaa_hrpt_pll_cf.h +++ b/gr-noaa/lib/noaa_hrpt_pll_cf.h @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-noaa/oct/.gitignore b/gr-noaa/oct/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-noaa/oct/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-noaa/oct/Makefile.am b/gr-noaa/oct/Makefile.am deleted file mode 100644 index 68a0d1aed..000000000 --- a/gr-noaa/oct/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright 2009,2010 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 - -EXTRA_DIST += \ - frames_to_ppm.m \ - frames-to-png.sh diff --git a/gr-noaa/oct/frames_to_ppm.m b/gr-noaa/oct/frames_to_ppm.m index 73842f0a9..099f96f2b 100644 --- a/gr-noaa/oct/frames_to_ppm.m +++ b/gr-noaa/oct/frames_to_ppm.m @@ -1,24 +1,24 @@ % -*- octave -*- % % 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. -% +% % Extract AVHRR images from HRPT frames.dat clear @@ -40,7 +40,7 @@ for line = 1:len start = start + frame_len; stop = stop + frame_len; end - + start = 752; stop = 10987; @@ -49,7 +49,7 @@ for line = 1:len start = start + frame_len; stop = stop + frame_len; end - + start = 753; stop = 10988; @@ -58,7 +58,7 @@ for line = 1:len start = start + frame_len; stop = stop + frame_len; end - + start = 754; stop = 10989; @@ -67,7 +67,7 @@ for line = 1:len start = start + frame_len; stop = stop + frame_len; end - + start = 755; stop = 10990; @@ -77,7 +77,7 @@ for line = 1:len stop = stop + frame_len; end -colormap(gray) +colormap(gray) saveimage("chan1.ppm", chan1/4, 'ppm') saveimage("chan2.ppm", chan2/4, 'ppm') saveimage("chan3.ppm", chan3/4, 'ppm') diff --git a/gr-noaa/python/Makefile.am b/gr-noaa/python/Makefile.am deleted file mode 100644 index 869c5f353..000000000 --- a/gr-noaa/python/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# -# 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. -# - -include $(top_srcdir)/Makefile.common - -if PYTHON - -endif - diff --git a/gr-noaa/swig/.gitignore b/gr-noaa/swig/.gitignore deleted file mode 100644 index 7dc6d984b..000000000 --- a/gr-noaa/swig/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -Makefile -Makefile.in -.deps -.libs -noaa_swig.cc -noaa_swig.py -/run_guile_tests -/guile -/python diff --git a/gr-noaa/swig/Makefile.am b/gr-noaa/swig/Makefile.am deleted file mode 100644 index 5a0a8f154..000000000 --- a/gr-noaa/swig/Makefile.am +++ /dev/null @@ -1,85 +0,0 @@ -# -# Copyright 2004,2005,2006,2008,2009,2010 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 -include $(top_srcdir)/Makefile.swig - -TESTS = -EXTRA_DIST += $(nobase_guile_DATA) - -noinst_GUILE = noaa.test - -if GUILE -nobase_guile_DATA = gnuradio/noaa.scm -endif - - -AM_CPPFLAGS = \ - -I$(top_srcdir)/gr-noaa/lib \ - $(STD_DEFINES_AND_INCLUDES) \ - $(PYTHON_CPPFLAGS) \ - $(WITH_INCLUDES) - -# ---------------------------------------------------------------- -# The SWIG library -# TESTS = run_tests - -TOP_SWIG_DOC_IFILES = \ - noaa_swig_doc.i - -TOP_SWIG_IFILES = \ - $(TOP_SWIG_DOC_IFILES) \ - noaa_swig.i - -BUILT_SOURCES += \ - $(TOP_SWIG_DOC_IFILES) - -EXTRA_DIST += \ - $(TOP_SWIG_DOC_IFILES) - -$(TOP_SWIG_DOC_IFILES): - `echo "" > $@` - -# Install so that they end up available as: -# import gnuradio.noaa -# This ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio/noaa -noaa_swig_pythondir_category = \ - gnuradio/noaa - -# additional libraries for linking with the SWIG-generated library -noaa_swig_la_swig_libadd = \ - $(top_builddir)/gr-noaa/lib/libgnuradio-noaa.la - -# additional Python files to be installed along with the SWIG-generated one -noaa_swig_python = \ - __init__.py - -# additional SWIG files to be installed -noaa_swig_swiginclude_headers = \ - noaa_hrpt_decoder.i \ - noaa_hrpt_deframer.i \ - noaa_hrpt_pll_cf.i \ - $(TOP_SWIG_DOC_IFILES) - -if GUILE -TESTS += run_guile_tests -endif diff --git a/gr-noaa/swig/Makefile.swig.gen b/gr-noaa/swig/Makefile.swig.gen deleted file mode 100644 index 757c368f5..000000000 --- a/gr-noaa/swig/Makefile.swig.gen +++ /dev/null @@ -1,145 +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 noaa_swig.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/noaa_swig -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/noaa_swig -## -## 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. - -noaa_swig_pythondir_category ?= gnuradio/noaa_swig -noaa_swig_pylibdir_category ?= $(noaa_swig_pythondir_category) -noaa_swig_pythondir = $(pythondir)/$(noaa_swig_pythondir_category) -noaa_swig_pylibdir = $(pyexecdir)/$(noaa_swig_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -noaa_swig_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/noaa_swig -# FIXME: determince whether these should be installed with gnuradio. -noaa_swig_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -noaa_swig_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 > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -noaa_swig_swiginclude_HEADERS = \ - noaa_swig.i \ - $(noaa_swig_swiginclude_headers) - -if PYTHON -noaa_swig_pylib_LTLIBRARIES = \ - _noaa_swig.la - -_noaa_swig_la_SOURCES = \ - python/noaa_swig.cc \ - $(noaa_swig_la_swig_sources) - -noaa_swig_python_PYTHON = \ - noaa_swig.py \ - $(noaa_swig_python) - -_noaa_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(noaa_swig_la_swig_libadd) - -_noaa_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(noaa_swig_la_swig_ldflags) - -_noaa_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(noaa_swig_la_swig_cxxflags) - -python/noaa_swig.cc: noaa_swig.py -noaa_swig.py: noaa_swig.i - -# Include the python dependencies for this file --include python/noaa_swig.d - -endif # end of if python - -if GUILE - -noaa_swig_scmlib_LTLIBRARIES = \ - libguile-gnuradio-noaa_swig.la -libguile_gnuradio_noaa_swig_la_SOURCES = \ - guile/noaa_swig.cc \ - $(noaa_swig_la_swig_sources) -nobase_noaa_swig_scm_DATA = \ - gnuradio/noaa_swig.scm \ - gnuradio/noaa_swig-primitive.scm -libguile_gnuradio_noaa_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(noaa_swig_la_swig_libadd) -libguile_gnuradio_noaa_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(noaa_swig_la_swig_ldflags) -libguile_gnuradio_noaa_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(noaa_swig_la_swig_cxxflags) - -guile/noaa_swig.cc: gnuradio/noaa_swig.scm -gnuradio/noaa_swig.scm: noaa_swig.i -gnuradio/noaa_swig-primitive.scm: gnuradio/noaa_swig.scm - -# Include the guile dependencies for this file --include guile/noaa_swig.d - -endif # end of GUILE - - diff --git a/gr-noaa/swig/__init__.py b/gr-noaa/swig/__init__.py index b82603953..5ea4d934c 100644 --- a/gr-noaa/swig/__init__.py +++ b/gr-noaa/swig/__init__.py @@ -1,23 +1,23 @@ # # 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. -# +# # The presence of this file turns this directory into a Python package diff --git a/gr-noaa/swig/gnuradio/.gitignore b/gr-noaa/swig/gnuradio/.gitignore deleted file mode 100644 index 0c49489de..000000000 --- a/gr-noaa/swig/gnuradio/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/noaa_swig-primitive.scm -/noaa_swig.scm diff --git a/gr-noaa/swig/noaa.test b/gr-noaa/swig/noaa.test deleted file mode 100644 index 9a0862fdf..000000000 --- a/gr-noaa/swig/noaa.test +++ /dev/null @@ -1,36 +0,0 @@ -;;; -*- Scheme -*- -;;; -;;; Copyright 2010 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, see <http://www.gnu.org/licenses/>. -;;; - -;;; If you're using Emacs's Scheme mode: -;;; (put 'with-test-prefix 'scheme-indent-function 1) - -;;; See the comments in gnuradio/test-suite/lib.scm for info on writing tests. -;;; See also the very end of the file, where the test-equal, test-eqv -;;; and test-eq macros are defined. - -(define-module (test-module) - #:use-module (oop goops) - #:use-module (gnuradio core) - #:use-module (gnuradio test-suite lib) - #:duplicates (merge-generics replace check)) - -;;; Confirm we can import the module... -(use-modules (gnuradio noaa)) - diff --git a/gr-noaa/swig/noaa_hrpt_decoder.i b/gr-noaa/swig/noaa_hrpt_decoder.i index 220a5714d..a3f8f48c3 100644 --- a/gr-noaa/swig/noaa_hrpt_decoder.i +++ b/gr-noaa/swig/noaa_hrpt_decoder.i @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-noaa/swig/noaa_hrpt_deframer.i b/gr-noaa/swig/noaa_hrpt_deframer.i index 6914b93e6..833ad18ad 100644 --- a/gr-noaa/swig/noaa_hrpt_deframer.i +++ b/gr-noaa/swig/noaa_hrpt_deframer.i @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-noaa/swig/noaa_hrpt_pll_cf.i b/gr-noaa/swig/noaa_hrpt_pll_cf.i index 859548a2d..2a5f524b3 100644 --- a/gr-noaa/swig/noaa_hrpt_pll_cf.i +++ b/gr-noaa/swig/noaa_hrpt_pll_cf.i @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-noaa/swig/noaa_swig.i b/gr-noaa/swig/noaa_swig.i index bc139651d..3c4d19650 100644 --- a/gr-noaa/swig/noaa_swig.i +++ b/gr-noaa/swig/noaa_swig.i @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -34,13 +34,3 @@ %include "noaa_hrpt_decoder.i" %include "noaa_hrpt_deframer.i" %include "noaa_hrpt_pll_cf.i" - -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-noaa_swig" "scm_init_gnuradio_noaa_swig_module") -%} - -%goops %{ -(use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif diff --git a/gr-noaa/swig/run_guile_tests.in b/gr-noaa/swig/run_guile_tests.in deleted file mode 100644 index 5d08b0dd5..000000000 --- a/gr-noaa/swig/run_guile_tests.in +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -. @top_builddir@/setup_guile_test_env - -# 1st argument is absolute path to hand coded guile source directory -# 2nd argument is absolute path to component C++ shared library build directory -# 3nd argument is absolute path to component SWIG build directory - -add_local_paths \ - @srcdir@ \ - @abs_builddir@ \ - @abs_builddir@ - -@GUILE@ -e main -c '(use-modules (gnuradio test-suite guile-test))' -t @srcdir@ diff --git a/gr-pager/.gitignore b/gr-pager/.gitignore deleted file mode 100644 index 27ff67327..000000000 --- a/gr-pager/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/Makefile -/Makefile.in -/data -/*.pc diff --git a/gr-pager/CMakeLists.txt b/gr-pager/CMakeLists.txt index 8dfecced7..845444859 100644 --- a/gr-pager/CMakeLists.txt +++ b/gr-pager/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-pager/Makefile.am b/gr-pager/Makefile.am deleted file mode 100644 index 002387c0c..000000000 --- a/gr-pager/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright 2006,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 = lib - -if PYTHON -SUBDIRS += swig python apps grc -endif - -pkgconfigdir = $(libdir)/pkgconfig -dist_pkgconfig_DATA = gnuradio-pager.pc diff --git a/gr-pager/README b/gr-pager/README index 2d4f3c95c..441fee0b4 100644 --- a/gr-pager/README +++ b/gr-pager/README @@ -26,10 +26,10 @@ usrp_flex.py - Receives and displays pages from a single paging channel. To Example, to receive from 931.95M (a common nationwide channel) with DBSRX in side A of USRP: - + $ usrp_flex.py -f 931.95M -g 32 -R A - + usrp_flex_band.py - Receives and displays pages from a 1 MHz paging band (40 pager channels.) To work from recorded data, record from USRP with decimation 64 at center frequency. @@ -48,8 +48,8 @@ Usage: usrp_flex_band.py [options] Example, to receive from the lower third of the pager band with DBSRX in side B of USRP: - - $ usrp_flex_band.py -f 929.5M -g 32 -R B + + $ usrp_flex_band.py -f 929.5M -g 32 -R B usrp_flex_all.py - Receives and displays pages from entire pager band (3 MHz, 120 pager channels.) This does not work in real time due @@ -69,11 +69,11 @@ usrp_flex_all.py - Receives and displays pages from entire pager band (3 MHz, -v, --verbose display debug output Example, to receive all pager channels with DBSRX in side A: - + $ usrp_flex_all.py -R A The demodulator is relatively sensitive to frequency offset and can capture a signal -within 3k of the actual signal. +within 3k of the actual signal. All three scripts take a 'calibration' parameter, which specifies the frequency offset of the daughterboard. This causes the USRP to be tuned to the given center frequency diff --git a/gr-pager/apps/.gitignore b/gr-pager/apps/.gitignore deleted file mode 100644 index 282522db0..000000000 --- a/gr-pager/apps/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/gr-pager/apps/CMakeLists.txt b/gr-pager/apps/CMakeLists.txt index 1965c6e66..a02cad56e 100644 --- a/gr-pager/apps/CMakeLists.txt +++ b/gr-pager/apps/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, @@ -21,9 +21,9 @@ include(GrPython) GR_PYTHON_INSTALL( PROGRAMS - usrp_flex.py - usrp_flex_all.py - usrp_flex_band.py + usrp_flex + usrp_flex_all + usrp_flex_band DESTINATION ${GR_RUNTIME_DIR} COMPONENT "pager_python" ) diff --git a/gr-pager/apps/Makefile.am b/gr-pager/apps/Makefile.am deleted file mode 100644 index a320ffefc..000000000 --- a/gr-pager/apps/Makefile.am +++ /dev/null @@ -1,36 +0,0 @@ -# -# Copyright 2009,2010 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 - -if PYTHON - -dist_bin_SCRIPTS = \ - usrp_flex.py \ - usrp_flex_all.py \ - usrp_flex_band.py - -noinst_PYTHON = \ - usrp_rx_flex.py -endif - -EXTRA_DIST += \ - usrp_rx_flex.grc diff --git a/gr-pager/apps/usrp_flex.py b/gr-pager/apps/usrp_flex index 7d0d66a95..33877ea4e 100755 --- a/gr-pager/apps/usrp_flex.py +++ b/gr-pager/apps/usrp_flex @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2006,2007,2009,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gru, uhd, optfir, eng_notation, pager from gnuradio.eng_option import eng_option @@ -32,7 +32,7 @@ class app_top_block(gr.top_block): self.offset = 0.0 self.adj_time = time.time() self.verbose = options.verbose - + if options.from_file is None: # Set up USRP source self.u = uhd.usrp_source(device_addr=options.address, stream_args=uhd.stream_args('fc32')) @@ -44,7 +44,7 @@ class app_top_block(gr.top_block): if rate != 250e3: print "Unable to set required sample rate of 250 Ksps (got %f)" % rate sys.exit(1) - + # Tune daughterboard r = self.u.set_center_freq(options.freq+options.calibration, 0) if not r: @@ -60,15 +60,15 @@ class app_top_block(gr.top_block): print "\nNo gain specified." print "Setting gain to %f (from [%f, %f])" % \ (options.rx_gain, grange.start(), grange.stop()) - + self.u.set_gain(options.rx_gain, 0) - + else: # Use supplied file as source of samples self.u = gr.file_source(gr.sizeof_gr_complex, options.from_file) if options.verbose: print "Reading samples from", options.from_file - + if options.log and not options.from_file: usrp_sink = gr.file_sink(gr.sizeof_gr_complex, 'usrp.dat') self.connect(self.u, usrp_sink) @@ -81,7 +81,7 @@ class app_top_block(gr.top_block): 12500, # One-sided channel bandwidth 0.1, # Passband ripple 60) # Stopband attenuation - + if options.verbose: print "Channel filter has", len(taps), "taps." @@ -109,7 +109,7 @@ class app_top_block(gr.top_block): self.chan.set_center_freq(self.offset) if self.verbose: print "Channel frequency offset (Hz):", int(self.offset) - + def get_options(): parser = OptionParser(option_class=eng_option) @@ -140,7 +140,7 @@ def get_options(): if (options.freq is None): sys.stderr.write("You must specify -f FREQ or --freq FREQ\n") sys.exit(1) - + return (options, args) if __name__ == "__main__": @@ -151,7 +151,7 @@ if __name__ == "__main__": queue = gr.msg_queue() tb = app_top_block(options, queue) runner = pager.queue_runner(queue) - + try: tb.run() except KeyboardInterrupt: diff --git a/gr-pager/apps/usrp_flex_all.py b/gr-pager/apps/usrp_flex_all index 36bd90034..75c4c1e73 100755 --- a/gr-pager/apps/usrp_flex_all.py +++ b/gr-pager/apps/usrp_flex_all @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2006,2007,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, gru, uhd, optfir, eng_notation, blks2, pager from gnuradio.eng_option import eng_option @@ -59,7 +59,7 @@ class app_top_block(gr.top_block): print "\nNo gain specified." print "Setting gain to %f (from [%f, %f])" % \ (options.rx_gain, grange.start(), grange.stop()) - + self.u.set_gain(options.rx_gain, 0) # Grab >=3 MHz of spectrum, evenly divisible by 25 KHz channels @@ -74,11 +74,11 @@ class app_top_block(gr.top_block): if (rate != 3.2e6): print "Unable to set required sample rate for >= 3MHz of 25 KHz channels." sys.exit(1) - + self.nchan = int(rate/25e3) if options.verbose: print "\nReceiving", rate/1e6, "MHz of bandwidth containing", self.nchan, "baseband channels." - + taps = gr.firdes.low_pass(1.0, 1.0, 1.0/self.nchan*0.4, @@ -143,7 +143,7 @@ def get_options(): sys.exit(1) return (options, args) - + def main(): @@ -159,6 +159,6 @@ def main(): pass runner.end() - + if __name__ == "__main__": main() diff --git a/gr-pager/apps/usrp_flex_band.py b/gr-pager/apps/usrp_flex_band index 63fb93fa1..5ec0065d6 100755 --- a/gr-pager/apps/usrp_flex_band.py +++ b/gr-pager/apps/usrp_flex_band @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2006,2007,2009,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gru, uhd, optfir, eng_notation, blks2, pager from gnuradio.eng_option import eng_option @@ -44,7 +44,7 @@ class app_top_block(gr.top_block): if rate != 1e6: print "Unable to set required sample rate of 1 Msps (got %f)" % rate sys.exit(1) - + # Tune daughterboard r = self.u.set_center_freq(options.freq+options.calibration, 0) if not r: @@ -60,7 +60,7 @@ class app_top_block(gr.top_block): print "\nNo gain specified." print "Setting gain to %f (from [%f, %f])" % \ (options.rx_gain, grange.start(), grange.stop()) - + self.u.set_gain(options.rx_gain, 0) @@ -120,10 +120,10 @@ def get_options(): if (options.freq is None): sys.stderr.write("You must specify -f FREQ or --freq FREQ\n") sys.exit(1) - + return (options, args) - + if __name__ == "__main__": (options, args) = get_options() diff --git a/gr-pager/grc/.gitignore b/gr-pager/grc/.gitignore deleted file mode 100644 index 3dda72986..000000000 --- a/gr-pager/grc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile diff --git a/gr-pager/grc/CMakeLists.txt b/gr-pager/grc/CMakeLists.txt index 2b01a1e0b..c982995b0 100644 --- a/gr-pager/grc/CMakeLists.txt +++ b/gr-pager/grc/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-pager/grc/Makefile.am b/gr-pager/grc/Makefile.am deleted file mode 100644 index 8c84f89ac..000000000 --- a/gr-pager/grc/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -# -# 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. -# - -include $(top_srcdir)/Makefile.common - -grcblocksdir = $(grc_blocksdir) - -dist_grcblocks_DATA = \ - pager_slicer_fb.xml \ - pager_flex_sync.xml \ - pager_flex_deinterleave.xml diff --git a/gr-pager/lib/.gitignore b/gr-pager/lib/.gitignore deleted file mode 100644 index 1b6114c39..000000000 --- a/gr-pager/lib/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/.libs -/.deps -/Makefile -/Makefile.in diff --git a/gr-pager/lib/Makefile.am b/gr-pager/lib/Makefile.am deleted file mode 100644 index b6131171d..000000000 --- a/gr-pager/lib/Makefile.am +++ /dev/null @@ -1,53 +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 - -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES) - -# These headers get installed in ${prefix}/include/gnuradio -grinclude_HEADERS = \ - pager_api.h \ - pager_slicer_fb.h \ - pager_flex_sync.h \ - pager_flex_deinterleave.h \ - pager_flex_parse.h \ - pager_flex_frame.h \ - pageri_bch3221.h \ - pageri_flex_modes.h \ - pageri_util.h - -lib_LTLIBRARIES = libgnuradio-pager.la - -libgnuradio_pager_la_SOURCES = \ - pager_flex_frame.cc \ - pager_slicer_fb.cc \ - pager_flex_sync.cc \ - pager_flex_deinterleave.cc \ - pager_flex_parse.cc \ - pageri_bch3221.cc \ - pageri_flex_modes.cc \ - pageri_util.cc - -libgnuradio_pager_la_LIBADD = \ - $(GNURADIO_CORE_LA) - -libgnuradio_pager_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) diff --git a/gr-pager/lib/pager_flex_deinterleave.cc b/gr-pager/lib/pager_flex_deinterleave.cc index a51670b22..f7f1d9f69 100644 --- a/gr-pager/lib/pager_flex_deinterleave.cc +++ b/gr-pager/lib/pager_flex_deinterleave.cc @@ -1,18 +1,18 @@ /* * Copyright 2004,2006,2010 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, @@ -46,7 +46,7 @@ int pager_flex_deinterleave::work(int noutput_items, gr_vector_void_star &output_items) { const unsigned char *in = (const unsigned char *)input_items[0]; - gr_int32 *out = (gr_int32 *)output_items[0]; + gr_int32 *out = (gr_int32 *)output_items[0]; // FLEX codewords are interleaved in blocks of 256 bits or 8, 32 bit // codes. To deinterleave we parcel each incoming bit into the MSB @@ -56,7 +56,7 @@ int pager_flex_deinterleave::work(int noutput_items, // conversion to data words. // // FLEX data words are recovered by reversing the bit order of the code - // word, masking off the (reversed) ECC, and inverting the remainder of + // word, masking off the (reversed) ECC, and inverting the remainder of // the bits (!). // // The data portion of a FLEX frame consists of 11 of these deinterleaved @@ -73,14 +73,14 @@ int pager_flex_deinterleave::work(int noutput_items, } } - // Now convert code words into data words + // Now convert code words into data words for (j = 0; j < 8; j++) { gr_int32 codeword = d_codewords[j]; - + // Apply BCH 32,21 error correction // TODO: mark dataword when codeword fails ECC pageri_bch3221(codeword); - + // Reverse bit order codeword = pageri_reverse_bits32(codeword); @@ -89,6 +89,6 @@ int pager_flex_deinterleave::work(int noutput_items, *out++ = codeword; } - + return j; } diff --git a/gr-pager/lib/pager_flex_deinterleave.h b/gr-pager/lib/pager_flex_deinterleave.h index 87094490d..c702da23d 100644 --- a/gr-pager/lib/pager_flex_deinterleave.h +++ b/gr-pager/lib/pager_flex_deinterleave.h @@ -1,18 +1,18 @@ /* * Copyright 2006 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, @@ -44,11 +44,11 @@ private: // One FLEX block of deinterleaved data gr_int32 d_codewords[8]; - + public: int work(int noutput_items, - gr_vector_const_void_star &input_items, + gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); }; diff --git a/gr-pager/lib/pager_flex_frame.cc b/gr-pager/lib/pager_flex_frame.cc index b707dbbc4..949f60320 100644 --- a/gr-pager/lib/pager_flex_frame.cc +++ b/gr-pager/lib/pager_flex_frame.cc @@ -1,18 +1,18 @@ /* * Copyright 2006 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, diff --git a/gr-pager/lib/pager_flex_frame.h b/gr-pager/lib/pager_flex_frame.h index 857b49d29..61973f722 100644 --- a/gr-pager/lib/pager_flex_frame.h +++ b/gr-pager/lib/pager_flex_frame.h @@ -1,18 +1,18 @@ /* * Copyright 2006 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, diff --git a/gr-pager/lib/pager_flex_parse.cc b/gr-pager/lib/pager_flex_parse.cc index 19d3d96c6..9418c4461 100644 --- a/gr-pager/lib/pager_flex_parse.cc +++ b/gr-pager/lib/pager_flex_parse.cc @@ -1,18 +1,18 @@ /* * Copyright 2004,2006,2007,2010 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, @@ -50,7 +50,7 @@ int pager_flex_parse::work(int noutput_items, gr_vector_void_star &output_items) { const gr_int32 *in = (const gr_int32 *)input_items[0]; - + int i = 0; while (i < noutput_items) { // Accumulate one whole frame's worth of data words (88 of them) @@ -74,8 +74,8 @@ void pager_flex_parse::parse_capcode(gr_int32 aw1, gr_int32 aw2) { d_laddr = (aw1 < 0x008001L) || (aw1 > 0x1E0000L) || - (aw1 > 0x1E7FFEL); - + (aw1 > 0x1E7FFEL); + if (d_laddr) d_capcode = aw1+((aw2^0x001FFFFF)<<15)+0x1F9000; // Don't ask else @@ -95,7 +95,7 @@ void pager_flex_parse::parse_data() // Address start address is bits 9-8, plus one for offset int voffset = (biw >> 10) & 0x3f; int aoffset = ((biw >> 8) & 0x03) + 1; - + //printf("BIW:%08X AW:%02i-%02i\n", biw, aoffset, voffset); // Iterate through pages and dispatch to appropriate handler @@ -109,9 +109,9 @@ void pager_flex_parse::parse_data() parse_capcode(d_datawords[i], d_datawords[i+1]); if (d_laddr) i++; - + if (d_capcode < 0) // Invalid address, skip - continue; + continue; // Parse vector information word for address @ offset 'i' gr_int32 viw = d_datawords[j]; @@ -122,7 +122,7 @@ void pager_flex_parse::parse_data() if (is_numeric_page(d_type)) len &= 0x07; int mw2 = mw1+len; - + if (mw1 == 0 && mw2 == 0) continue; // Invalid VIW @@ -135,7 +135,7 @@ void pager_flex_parse::parse_data() d_payload.str(""); d_payload.setf(std::ios::showpoint); d_payload << std::setprecision(6) << std::setw(7) - << d_freq/1e6 << FIELD_DELIM + << d_freq/1e6 << FIELD_DELIM << std::setw(10) << d_capcode << FIELD_DELIM << flex_page_desc[d_type] << FIELD_DELIM; @@ -167,7 +167,7 @@ void pager_flex_parse::parse_alphanumeric(int mw1, int mw2, int j) frag = (d_datawords[j+1] >> 11) & 0x03; cont = (d_datawords[j+1] >> 10) & 0x01; mw2--; - } + } //d_payload << frag << FIELD_DELIM; //d_payload << cont << FIELD_DELIM; @@ -175,17 +175,17 @@ void pager_flex_parse::parse_alphanumeric(int mw1, int mw2, int j) for (int i = mw1; i <= mw2; i++) { gr_int32 dw = d_datawords[i]; unsigned char ch; - + if (i > mw1 || frag != 0x03) { ch = dw & 0x7F; if (ch != 0x03) d_payload << ch; } - + ch = (dw >> 7) & 0x7F; if (ch != 0x03) // Fill d_payload << ch; - + ch = (dw >> 14) & 0x7F; if (ch != 0x03) // Fill d_payload << ch; @@ -212,7 +212,7 @@ void pager_flex_parse::parse_numeric(int mw1, int mw2, int j) count += 10; // Skip 10 header bits for numbered numeric pages else count += 2; // Otherwise skip 2 - + for (int i = mw1; i <= mw2; i++) { for (int k = 0; k < 21; k++) { // Shift LSB from data word into digit @@ -226,7 +226,7 @@ void pager_flex_parse::parse_numeric(int mw1, int mw2, int j) count = 4; } } - + dw = d_datawords[i]; } } diff --git a/gr-pager/lib/pager_flex_parse.h b/gr-pager/lib/pager_flex_parse.h index dcbd19eae..499be299a 100644 --- a/gr-pager/lib/pager_flex_parse.h +++ b/gr-pager/lib/pager_flex_parse.h @@ -1,18 +1,18 @@ /* * Copyright 2006 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, @@ -56,17 +56,17 @@ private: int d_capcode; // Current page destination address bool d_laddr; // Current page has long address float d_freq; // Channel frequency - + void parse_data(); // Handle a frame's worth of data - void parse_capcode(gr_int32 aw1, gr_int32 aw2); + void parse_capcode(gr_int32 aw1, gr_int32 aw2); void parse_alphanumeric(int mw1, int mw2, int j); void parse_numeric(int mw1, int mw2, int j); void parse_tone_only(); void parse_unknown(int mw1, int mw2); - + public: int work(int noutput_items, - gr_vector_const_void_star &input_items, + gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); }; diff --git a/gr-pager/lib/pager_flex_sync.cc b/gr-pager/lib/pager_flex_sync.cc index 30666298f..c31acd7d2 100644 --- a/gr-pager/lib/pager_flex_sync.cc +++ b/gr-pager/lib/pager_flex_sync.cc @@ -1,18 +1,18 @@ /* * Copyright 2004,2006,2010 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, @@ -36,7 +36,7 @@ pager_flex_sync_sptr pager_make_flex_sync() return gnuradio::get_initial_sptr(new pager_flex_sync()); } -// FLEX sync block takes input from sliced baseband stream [0-3] at specified +// FLEX sync block takes input from sliced baseband stream [0-3] at specified // channel rate. Symbol timing is established based on receiving one of the // defined FLEX protocol synchronization words. The block outputs one FLEX frame // worth of bits on each output phase for the data portion of the frame. Unused phases @@ -75,7 +75,7 @@ bool pager_flex_sync::test_sync(unsigned char sym) // // Where BBBBBBBB is always 0xA6C6AAAA // and AAAA^CCCC is 0xFFFF - // + // // Specific values of AAAA determine what bps and encoding the // packet is beyond the frame information word // @@ -158,9 +158,9 @@ void pager_flex_sync::enter_sync2() // We're here at the center of a 1600 baud bit // So this hack puts the index and bit counter // in the right place for 3200 bps. - d_index = d_index/2-d_spb/2; - d_count = -1; - } + d_index = d_index/2-d_spb/2; + d_count = -1; + } } void pager_flex_sync::enter_data() @@ -177,7 +177,7 @@ void pager_flex_sync::parse_fiw() // Bits 31-28 are frame number related, but unknown function // This might be a checksum d_unknown2 = pageri_reverse_bits8((d_fiw >> 24) & 0xF0); - + // Cycle is bits 27-24, reversed d_cycle = pageri_reverse_bits8((d_fiw >> 20) & 0xF0); @@ -204,7 +204,7 @@ int pager_flex_sync::output_symbol(unsigned char sym) // At 1600 bps, 2-level, a single "phase" is transmitted with bit // value '0' using level '3' and bit value '1' using level '0'. // - // At 1600 bps, 4-level, a second "phase" is transmitted, and the + // At 1600 bps, 4-level, a second "phase" is transmitted, and the // di-bits are encoded with a gray code: // // Symbol Phase 1 Phase 2 @@ -220,9 +220,9 @@ int pager_flex_sync::output_symbol(unsigned char sym) // additionally two streams are interleaved on alternating symbols. // Thus, PHASE A (and PHASE B if 4-level) are decoded on one symbol, // then PHASE C (and PHASE D if 4-level) are decoded on the next. - + int bits = 0; - + if (d_baudrate == 1600) { d_bit_a = (sym < 2); if (d_levels == 4) @@ -275,7 +275,7 @@ int pager_flex_sync::general_work(int noutput_items, while (i < ninputs && j < noutput_items) { unsigned char sym = *in++; i++; d_index = (d_index+1) % d_spb; - + switch (d_state) { case ST_IDLE: // Continually compare the received symbol stream @@ -283,14 +283,14 @@ int pager_flex_sync::general_work(int noutput_items, if (test_sync(sym)) enter_syncing(); break; - + case ST_SYNCING: // Wait until we stop seeing sync, then calculate // the center of the bit period (d_center) if (!test_sync(sym)) enter_sync1(); break; - + case ST_SYNC1: // Skip 16 bits of dotting, then accumulate 32 bits // of Frame Information Word. @@ -300,11 +300,11 @@ int pager_flex_sync::general_work(int noutput_items, // FIW is accumulated, call BCH to error correct it pageri_bch3221(d_fiw); parse_fiw(); - enter_sync2(); + enter_sync2(); } } break; - + case ST_SYNC2: // This part and the remainder of the frame are transmitted // at either 1600 bps or 3200 bps based on the received @@ -316,14 +316,14 @@ int pager_flex_sync::general_work(int noutput_items, enter_data(); } break; - + case ST_DATA: - // The data portion of the frame is 1760 ms long at either + // The data portion of the frame is 1760 ms long at either // baudrate. This is 2816 bits @ 1600 bps and 5632 bits @ 3200 bps. // The output_symbol() routine decodes and doles out the bits // to each of the four transmitted phases of FLEX interleaved codes. if (d_index == d_center) { - j += output_symbol(sym); + j += output_symbol(sym); if (++d_count == d_baudrate*1760/1000) enter_idle(); } diff --git a/gr-pager/lib/pager_flex_sync.h b/gr-pager/lib/pager_flex_sync.h index 53b6f950a..b53737d12 100644 --- a/gr-pager/lib/pager_flex_sync.h +++ b/gr-pager/lib/pager_flex_sync.h @@ -1,18 +1,18 @@ /* * Copyright 2006 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, @@ -42,7 +42,7 @@ private: // Constructors friend PAGER_API pager_flex_sync_sptr pager_make_flex_sync(); pager_flex_sync(); - + // State machine transitions void enter_idle(); void enter_syncing(); @@ -53,14 +53,14 @@ private: int index_avg(int start, int end); bool test_sync(unsigned char sym); void parse_fiw(); - int output_symbol(unsigned char sym); - + int output_symbol(unsigned char sym); + // Simple state machine enum state_t { ST_IDLE, ST_SYNCING, ST_SYNC1, ST_SYNC2, ST_DATA }; - state_t d_state; + state_t d_state; int d_index; // Index into current baud - int d_start; // Start of good sync + int d_start; // Start of good sync int d_center; // Center of bit int d_end; // End of good sync int d_count; // Bit counter @@ -70,7 +70,7 @@ private: int d_levels; // Current decoding levels int d_spb; // Current samples per baud bool d_hibit; // Alternating bit indicator for 3200 bps - + gr_int32 d_fiw; // Frame information word int d_frame; // Current FLEX frame int d_cycle; // Current FLEX cycle @@ -81,12 +81,12 @@ private: unsigned char d_bit_b; unsigned char d_bit_c; unsigned char d_bit_d; - - unsigned char *d_phase_a; + + unsigned char *d_phase_a; unsigned char *d_phase_b; unsigned char *d_phase_c; unsigned char *d_phase_d; - + gr_int64_vector d_sync; // Trial synchronizers public: @@ -94,7 +94,7 @@ public: int general_work(int noutput_items, gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, + gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); }; diff --git a/gr-pager/lib/pager_slicer_fb.cc b/gr-pager/lib/pager_slicer_fb.cc index 53ba7b9de..415e898cd 100644 --- a/gr-pager/lib/pager_slicer_fb.cc +++ b/gr-pager/lib/pager_slicer_fb.cc @@ -1,18 +1,18 @@ /* * Copyright 2004,2006,2007,2010 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, @@ -53,7 +53,7 @@ unsigned char pager_slicer_fb::slice(float sample) sample -= d_avg; if (sample > 0) { - if (sample > 2.0) + if (sample > 2.0) decision = 3; else decision = 2; diff --git a/gr-pager/lib/pager_slicer_fb.h b/gr-pager/lib/pager_slicer_fb.h index b3d92780f..cbbf9cd22 100644 --- a/gr-pager/lib/pager_slicer_fb.h +++ b/gr-pager/lib/pager_slicer_fb.h @@ -1,18 +1,18 @@ /* * Copyright 2006,2007 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, @@ -48,7 +48,7 @@ private: public: int work (int noutput_items, - gr_vector_const_void_star &input_items, + gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); float dc_offset() const { return d_avg; } diff --git a/gr-pager/lib/pageri_bch3221.cc b/gr-pager/lib/pageri_bch3221.cc index 984ed4d44..9c6dd8148 100644 --- a/gr-pager/lib/pageri_bch3221.cc +++ b/gr-pager/lib/pageri_bch3221.cc @@ -1,18 +1,18 @@ /* * Copyright 2006 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, diff --git a/gr-pager/lib/pageri_bch3221.h b/gr-pager/lib/pageri_bch3221.h index 9dd2be86a..54227e438 100644 --- a/gr-pager/lib/pageri_bch3221.h +++ b/gr-pager/lib/pageri_bch3221.h @@ -1,18 +1,18 @@ /* * Copyright 2006 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, diff --git a/gr-pager/lib/pageri_flex_modes.cc b/gr-pager/lib/pageri_flex_modes.cc index 4553e0bf3..ad424fda1 100644 --- a/gr-pager/lib/pageri_flex_modes.cc +++ b/gr-pager/lib/pageri_flex_modes.cc @@ -1,18 +1,18 @@ /* * Copyright 2006,2007 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, @@ -21,7 +21,7 @@ #include "pageri_flex_modes.h" -const flex_mode_t flex_modes[] = +const flex_mode_t flex_modes[] = { { 0x870C78F3, 1600, 2 }, { 0xB0684F97, 1600, 4 }, @@ -51,7 +51,7 @@ int find_flex_mode(gr_int32 sync_code) for (int i = 0; i < num_flex_modes; i++) if (flex_modes[i].sync == sync_code) return i; - + // Not found return -1; } diff --git a/gr-pager/lib/pageri_flex_modes.h b/gr-pager/lib/pageri_flex_modes.h index bc53c12bf..6d81613d7 100644 --- a/gr-pager/lib/pageri_flex_modes.h +++ b/gr-pager/lib/pageri_flex_modes.h @@ -1,18 +1,18 @@ /* * Copyright 2006,2007 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, diff --git a/gr-pager/lib/pageri_util.cc b/gr-pager/lib/pageri_util.cc index bdd095706..7fa85e6ed 100644 --- a/gr-pager/lib/pageri_util.cc +++ b/gr-pager/lib/pageri_util.cc @@ -1,18 +1,18 @@ /* * Copyright 2006 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, @@ -27,8 +27,8 @@ unsigned char pageri_reverse_bits8(unsigned char val) { - // This method was attributed to Rich Schroeppel in the Programming - // Hacks section of Beeler, M., Gosper, R. W., and Schroeppel, R. + // This method was attributed to Rich Schroeppel in the Programming + // Hacks section of Beeler, M., Gosper, R. W., and Schroeppel, R. // HAKMEM. MIT AI Memo 239, Feb. 29, 1972. // // Reverses 8 bits in 5 machine operations with 64 bit arch diff --git a/gr-pager/lib/pageri_util.h b/gr-pager/lib/pageri_util.h index 78ae7aab3..b90cddcce 100644 --- a/gr-pager/lib/pageri_util.h +++ b/gr-pager/lib/pageri_util.h @@ -1,18 +1,18 @@ /* * Copyright 2006 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, diff --git a/gr-pager/python/.gitignore b/gr-pager/python/.gitignore deleted file mode 100644 index 604b402c5..000000000 --- a/gr-pager/python/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -/run_tests diff --git a/gr-pager/python/CMakeLists.txt b/gr-pager/python/CMakeLists.txt index 08915aa00..c0e1b1be1 100644 --- a/gr-pager/python/CMakeLists.txt +++ b/gr-pager/python/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011-2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-pager/python/Makefile.am b/gr-pager/python/Makefile.am deleted file mode 100644 index 4502859c3..000000000 --- a/gr-pager/python/Makefile.am +++ /dev/null @@ -1,39 +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 - -TESTS = -EXTRA_DIST += run_tests.in - -if PYTHON -TESTS += run_tests - -pagerdir = $(grpythondir)/pager - -noinst_PYTHON = \ - qa_pager.py - -pager_PYTHON = \ - __init__.py \ - pager_utils.py \ - flex_demod.py -endif diff --git a/gr-pager/python/__init__.py b/gr-pager/python/__init__.py index fffefd51d..c395d4e45 100644 --- a/gr-pager/python/__init__.py +++ b/gr-pager/python/__init__.py @@ -1,23 +1,23 @@ # # Copyright 2006 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. -# +# # The presence of this file turns this directory into a Python package diff --git a/gr-pager/python/flex_demod.py b/gr-pager/python/flex_demod.py index b79c1adaa..4146695f8 100644 --- a/gr-pager/python/flex_demod.py +++ b/gr-pager/python/flex_demod.py @@ -1,23 +1,23 @@ # # Copyright 2006,2007 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, gru, optfir, blks2 from math import pi @@ -27,7 +27,7 @@ class flex_demod(gr.hier_block2): """ FLEX pager protocol demodulation block. - This block demodulates a band-limited, complex down-converted baseband + This block demodulates a band-limited, complex down-converted baseband channel into FLEX protocol frames. """ @@ -40,7 +40,7 @@ class flex_demod(gr.hier_block2): k = 25000/(2*pi*1600) # 4800 Hz max deviation quad = gr.quadrature_demod_cf(k) self.connect(self, quad) - + rsamp = blks2.rational_resampler_fff(16, 25) self.slicer = pager_swig.slicer_fb(5e-6) # DC removal averaging filter constant self.sync = pager_swig.flex_sync() @@ -61,4 +61,3 @@ class flex_demod(gr.hier_block2): def dc_offset(self): return self.slicer.dc_offset() -
\ No newline at end of file diff --git a/gr-pager/python/pager_utils.py b/gr-pager/python/pager_utils.py index 72aac6826..e935c86d4 100644 --- a/gr-pager/python/pager_utils.py +++ b/gr-pager/python/pager_utils.py @@ -1,18 +1,18 @@ # # 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 this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -50,11 +50,11 @@ class queue_runner(_threading.Thread): msg = self.msgq.delete_head() # Blocking read if msg.type() != 0: break - + page = join(split(msg.to_string(), chr(128)), '|') s = make_printable(page) print msg.type(), s - + def end(self): self.msgq.insert_tail(gr.message(1)) self.done = True diff --git a/gr-pager/python/qa_pager.py b/gr-pager/python/qa_pager.py index 12a45d4c3..87f0d0026 100755 --- a/gr-pager/python/qa_pager.py +++ b/gr-pager/python/qa_pager.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2006,2010 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 pager_swig diff --git a/gr-pager/python/run_tests.in b/gr-pager/python/run_tests.in deleted file mode 100644 index 6bb0c3980..000000000 --- a/gr-pager/python/run_tests.in +++ /dev/null @@ -1,10 +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 - -@top_builddir@/run_tests.sh \ - @abs_top_srcdir@/gr-pager \ - @abs_top_builddir@/gr-pager \ - @srcdir@ diff --git a/gr-pager/swig/.gitignore b/gr-pager/swig/.gitignore deleted file mode 100644 index 7e864f43f..000000000 --- a/gr-pager/swig/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -/Makefile -/Makefile.in -/pager_swig.py -/pager_swig.cc -/*.pyc -/run_tests -/run_guile_tests -/guile -/python diff --git a/gr-pager/swig/Makefile.am b/gr-pager/swig/Makefile.am deleted file mode 100644 index abd714aac..000000000 --- a/gr-pager/swig/Makefile.am +++ /dev/null @@ -1,83 +0,0 @@ -# -# Copyright 2004,2005,2006,2008,2009,2010 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 -include $(top_srcdir)/Makefile.swig - -TESTS = -EXTRA_DIST += $(nobase_guile_DATA) - -AM_CPPFLAGS = \ - -I$(top_srcdir)/gr-pager/lib \ - $(STD_DEFINES_AND_INCLUDES) \ - $(PYTHON_CPPFLAGS) \ - $(WITH_INCLUDES) - -if GUILE -nobase_guile_DATA = \ - gnuradio/pager.scm -endif - -noinst_GUILE = pager.test - - -############################## -# SWIG interface and library - -TOP_SWIG_DOC_IFILES = \ - pager_swig_doc.i - -TOP_SWIG_IFILES = \ - $(TOP_SWIG_DOC_IFILES) \ - pager_swig.i - -BUILT_SOURCES += \ - $(TOP_SWIG_DOC_IFILES) - -EXTRA_DIST += \ - $(TOP_SWIG_DOC_IFILES) - -$(TOP_SWIG_DOC_IFILES): - `echo "" > $@` - -# Install so that they end up available as: -# import gnuradio.pager -# This ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio/pager -pager_swig_pythondir_category = \ - gnuradio/pager - -# additional libraries for linking with the SWIG-generated library -pager_swig_la_swig_libadd = \ - $(abs_top_builddir)/gr-pager/lib/libgnuradio-pager.la - -# additional SWIG files to be installed -pager_swig_swiginclude_headers = \ - pager_flex_deinterleave.i \ - pager_flex_frame.i \ - pager_flex_parse.i \ - pager_flex_sync.i \ - pager_slicer_fb.i \ - $(TOP_SWIG_DOC_IFILES) - -if GUILE -TESTS += run_guile_tests -endif
\ No newline at end of file diff --git a/gr-pager/swig/Makefile.swig.gen b/gr-pager/swig/Makefile.swig.gen deleted file mode 100644 index 9f7467c1c..000000000 --- a/gr-pager/swig/Makefile.swig.gen +++ /dev/null @@ -1,145 +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 pager_swig.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/pager_swig -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/pager_swig -## -## 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. - -pager_swig_pythondir_category ?= gnuradio/pager_swig -pager_swig_pylibdir_category ?= $(pager_swig_pythondir_category) -pager_swig_pythondir = $(pythondir)/$(pager_swig_pythondir_category) -pager_swig_pylibdir = $(pyexecdir)/$(pager_swig_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -pager_swig_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/pager_swig -# FIXME: determince whether these should be installed with gnuradio. -pager_swig_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -pager_swig_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 > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -pager_swig_swiginclude_HEADERS = \ - pager_swig.i \ - $(pager_swig_swiginclude_headers) - -if PYTHON -pager_swig_pylib_LTLIBRARIES = \ - _pager_swig.la - -_pager_swig_la_SOURCES = \ - python/pager_swig.cc \ - $(pager_swig_la_swig_sources) - -pager_swig_python_PYTHON = \ - pager_swig.py \ - $(pager_swig_python) - -_pager_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(pager_swig_la_swig_libadd) - -_pager_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(pager_swig_la_swig_ldflags) - -_pager_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(pager_swig_la_swig_cxxflags) - -python/pager_swig.cc: pager_swig.py -pager_swig.py: pager_swig.i - -# Include the python dependencies for this file --include python/pager_swig.d - -endif # end of if python - -if GUILE - -pager_swig_scmlib_LTLIBRARIES = \ - libguile-gnuradio-pager_swig.la -libguile_gnuradio_pager_swig_la_SOURCES = \ - guile/pager_swig.cc \ - $(pager_swig_la_swig_sources) -nobase_pager_swig_scm_DATA = \ - gnuradio/pager_swig.scm \ - gnuradio/pager_swig-primitive.scm -libguile_gnuradio_pager_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(pager_swig_la_swig_libadd) -libguile_gnuradio_pager_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(pager_swig_la_swig_ldflags) -libguile_gnuradio_pager_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(pager_swig_la_swig_cxxflags) - -guile/pager_swig.cc: gnuradio/pager_swig.scm -gnuradio/pager_swig.scm: pager_swig.i -gnuradio/pager_swig-primitive.scm: gnuradio/pager_swig.scm - -# Include the guile dependencies for this file --include guile/pager_swig.d - -endif # end of GUILE - - diff --git a/gr-pager/swig/gnuradio/.gitignore b/gr-pager/swig/gnuradio/.gitignore deleted file mode 100644 index 15034e70e..000000000 --- a/gr-pager/swig/gnuradio/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -pager_swig-primitive.scm -pager_swig.scm diff --git a/gr-pager/swig/pager.test b/gr-pager/swig/pager.test deleted file mode 100644 index a5deb5810..000000000 --- a/gr-pager/swig/pager.test +++ /dev/null @@ -1,36 +0,0 @@ -;;; -*- Scheme -*- -;;; -;;; Copyright 2010 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, see <http://www.gnu.org/licenses/>. -;;; - -;;; If you're using Emacs's Scheme mode: -;;; (put 'with-test-prefix 'scheme-indent-function 1) - -;;; See the comments in gnuradio/test-suite/lib.scm for info on writing tests. -;;; See also the very end of the file, where the test-equal, test-eqv -;;; and test-eq macros are defined. - -(define-module (test-module) - #:use-module (oop goops) - #:use-module (gnuradio core) - #:use-module (gnuradio test-suite lib) - #:duplicates (merge-generics replace check)) - -;;; Confirm we can import the module... -(use-modules (gnuradio pager)) - diff --git a/gr-pager/swig/pager_flex_frame.i b/gr-pager/swig/pager_flex_frame.i index d754f5f79..0ea996500 100644 --- a/gr-pager/swig/pager_flex_frame.i +++ b/gr-pager/swig/pager_flex_frame.i @@ -1,18 +1,18 @@ /* * Copyright 2006 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, diff --git a/gr-pager/swig/pager_swig.i b/gr-pager/swig/pager_swig.i index 2cf54c2a7..04f804157 100644 --- a/gr-pager/swig/pager_swig.i +++ b/gr-pager/swig/pager_swig.i @@ -1,18 +1,18 @@ /* * Copyright 2005,2006,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, @@ -37,13 +37,3 @@ %include "pager_flex_sync.i" %include "pager_flex_deinterleave.i" %include "pager_flex_parse.i" - -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-pager_swig" "scm_init_gnuradio_pager_swig_module") -%} - -%goops %{ -(use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif diff --git a/gr-pager/swig/run_guile_tests.in b/gr-pager/swig/run_guile_tests.in deleted file mode 100644 index 5d08b0dd5..000000000 --- a/gr-pager/swig/run_guile_tests.in +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -. @top_builddir@/setup_guile_test_env - -# 1st argument is absolute path to hand coded guile source directory -# 2nd argument is absolute path to component C++ shared library build directory -# 3nd argument is absolute path to component SWIG build directory - -add_local_paths \ - @srcdir@ \ - @abs_builddir@ \ - @abs_builddir@ - -@GUILE@ -e main -c '(use-modules (gnuradio test-suite guile-test))' -t @srcdir@ diff --git a/gr-qtgui/.gitignore b/gr-qtgui/.gitignore deleted file mode 100644 index a37fc0c1a..000000000 --- a/gr-qtgui/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -/*.pc diff --git a/gr-qtgui/CMakeLists.txt b/gr-qtgui/CMakeLists.txt index a8fead401..f6260bc7e 100644 --- a/gr-qtgui/CMakeLists.txt +++ b/gr-qtgui/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2010-2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, @@ -57,6 +57,8 @@ GR_SET_GLOBAL(GR_QTGUI_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/lib ) +SET(GR_PKG_QTGUI_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/qt-gui) + ######################################################################## # Begin conditional configuration ######################################################################## diff --git a/gr-qtgui/Makefile.am b/gr-qtgui/Makefile.am deleted file mode 100644 index e850567cc..000000000 --- a/gr-qtgui/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright 2008-2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = include lib doc - -if PYTHON -SUBDIRS += swig python apps grc examples -endif - -pkgconfigdir = $(libdir)/pkgconfig -dist_pkgconfig_DATA = gnuradio-qtgui.pc diff --git a/gr-qtgui/apps/.gitignore b/gr-qtgui/apps/.gitignore deleted file mode 100644 index 943275d5c..000000000 --- a/gr-qtgui/apps/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -Makefile -Makefile.in -grc_qt_example.py diff --git a/gr-qtgui/apps/Makefile.am b/gr-qtgui/apps/Makefile.am deleted file mode 100644 index ba799bbee..000000000 --- a/gr-qtgui/apps/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -if PYTHON - -noinst_PYTHON = \ - qt_digital.py \ - qt_digital_window.py \ - uhd_display.py \ - qt_digital_window.py \ - usrp_display_qtgui.py - -EXTRA_DIST += \ - qt_digital_window.ui \ - usrp_display_qtgui.ui -endif - -EXTRA_DIST += diff --git a/gr-qtgui/apps/uhd_display.py b/gr-qtgui/apps/uhd_display.py index 30325a2c8..d02fbad9e 100755 --- a/gr-qtgui/apps/uhd_display.py +++ b/gr-qtgui/apps/uhd_display.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2009,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr from gnuradio import uhd @@ -92,14 +92,14 @@ class main_window(QtGui.QMainWindow): else: self.fg.start() self.gui.pauseButton.setText("Pause") - + # Functions to set the values in the GUI def set_frequency(self, freq): self.freq = freq sfreq = eng_notation.num_to_str(self.freq) self.gui.frequencyEdit.setText(QtCore.QString("%1").arg(sfreq)) - + def set_gain(self, gain): self.gain = gain self.gui.gainEdit.setText(QtCore.QString("%1").arg(self.gain)) @@ -117,7 +117,7 @@ class main_window(QtGui.QMainWindow): # Functions called when signals are triggered in the GUI def frequencyEditText(self): try: - freq = eng_notation.str_to_num(self.gui.frequencyEdit.text().toAscii()) + freq = eng_notation.str_to_num(self.gui.frequencyEdit.text().toAscii()) self.fg.set_frequency(freq) self.freq = freq except RuntimeError: @@ -130,7 +130,7 @@ class main_window(QtGui.QMainWindow): self.gain = gain except ValueError: pass - + def bandwidthEditText(self): try: bw = eng_notation.str_to_num(self.gui.bandwidthEdit.text().toAscii()) @@ -138,7 +138,7 @@ class main_window(QtGui.QMainWindow): self.bw = bw except ValueError: pass - + def amplifierEditText(self): try: amp = float(self.gui.amplifierEdit.text()) @@ -155,20 +155,20 @@ class main_window(QtGui.QMainWindow): def dcGainEditText(self): gain = float(self.gui.dcGainEdit.text()) self.fg.set_dc_gain(gain) - + def dcCancelClicked(self, state): self.dcGainEditText() self.fg.cancel_dc(state) - - + + class my_top_block(gr.top_block): def __init__(self, options): gr.top_block.__init__(self) self.options = options self.show_debug_info = True - + self.qapp = QtGui.QApplication(sys.argv) self.u = uhd.usrp_source(device_addr=options.address, stream_args=uhd.stream_args('fc32')) @@ -267,7 +267,7 @@ class my_top_block(gr.top_block): def set_dc_gain(self, gain): self.dc.set_taps(gain) - + def cancel_dc(self, state): self.lock() @@ -300,7 +300,7 @@ def main (): parser.add_option("--fft-size", type="int", default=2048, help="Set number of FFT bins [default=%default]") (options, args) = parser.parse_args() - + if len(args) != 0: parser.print_help() sys.exit(1) @@ -314,4 +314,4 @@ if __name__ == '__main__': main () except KeyboardInterrupt: pass - + diff --git a/gr-qtgui/doc/.gitignore b/gr-qtgui/doc/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-qtgui/doc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-qtgui/doc/CMakeLists.txt b/gr-qtgui/doc/CMakeLists.txt index e6d01b8b0..668ed59f5 100644 --- a/gr-qtgui/doc/CMakeLists.txt +++ b/gr-qtgui/doc/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-qtgui/doc/Makefile.am b/gr-qtgui/doc/Makefile.am deleted file mode 100644 index b65eb062f..000000000 --- a/gr-qtgui/doc/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = - -dist_gr_doc_DATA = \ - README.qtgui diff --git a/gr-qtgui/doc/README.qtgui b/gr-qtgui/doc/README.qtgui index e54c3d907..b5b523bf6 100644 --- a/gr-qtgui/doc/README.qtgui +++ b/gr-qtgui/doc/README.qtgui @@ -7,6 +7,6 @@ imported as: See the Doxygen documentation for details about the blocks available in this package. A quick listing of the details can be found in Python -after importing by using: +after importing by using: help(qtgui) diff --git a/gr-qtgui/doc/qtgui.dox b/gr-qtgui/doc/qtgui.dox index c7f4b7146..8664af163 100644 --- a/gr-qtgui/doc/qtgui.dox +++ b/gr-qtgui/doc/qtgui.dox @@ -60,7 +60,7 @@ class grclass(gr.top_block): self.snk = qtgui.sink_c(1024, #fftsize samp_rate, #bw "QT GUI Plot") #name - + self.snk_win = sip.wrapinstance(self.snk.pyqwidget(), Qt.QWidget) self.snk_win.show() diff --git a/gr-qtgui/examples/.gitignore b/gr-qtgui/examples/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-qtgui/examples/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-qtgui/examples/CMakeLists.txt b/gr-qtgui/examples/CMakeLists.txt index 30fdc5e75..998d17bd9 100644 --- a/gr-qtgui/examples/CMakeLists.txt +++ b/gr-qtgui/examples/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, @@ -24,6 +24,6 @@ GR_PYTHON_INSTALL(PROGRAMS pyqt_example_f.py pyqt_time_c.py pyqt_time_f.py - DESTINATION ${GR_PKG_DATA_DIR}/examples/qt-gui - COMPONENT "gnuradio_examples" + DESTINATION ${GR_PKG_QTGUI_EXAMPLES_DIR} + COMPONENT "qtgui_python" ) diff --git a/gr-qtgui/examples/Makefile.am b/gr-qtgui/examples/Makefile.am deleted file mode 100644 index a204d1fcc..000000000 --- a/gr-qtgui/examples/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright 2008-2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -if PYTHON -ourdatadir = $(exampledir)/qt-gui - -dist_ourdata_SCRIPTS = \ - pyqt_example_c.py \ - pyqt_example_f.py \ - pyqt_time_c.py \ - pyqt_time_f.py -endif - -EXTRA_DIST += diff --git a/gr-qtgui/examples/pyqt_example_c.py b/gr-qtgui/examples/pyqt_example_c.py index 553d346c9..0b43fce0e 100755 --- a/gr-qtgui/examples/pyqt_example_c.py +++ b/gr-qtgui/examples/pyqt_example_c.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr import sys @@ -111,7 +111,7 @@ class control_box(QtGui.QWidget): except ValueError: print "Bad amplitude value entered" - + def freq2EditText(self): try: newfreq = float(self.freq2Edit.text()) @@ -138,7 +138,7 @@ class my_top_block(gr.top_block): fftsize = 2048 self.qapp = QtGui.QApplication(sys.argv) - + src1 = gr.sig_source_c(Rs, gr.GR_SIN_WAVE, f1, 0.1, 0) src2 = gr.sig_source_c(Rs, gr.GR_SIN_WAVE, f2, 0.1, 0) src = gr.add_cc() @@ -167,10 +167,10 @@ class my_top_block(gr.top_block): self.main_box = dialog_box(pyWin, self.ctrl_win) self.main_box.show() - + if __name__ == "__main__": tb = my_top_block(); tb.start() tb.qapp.exec_() tb.stop() - + diff --git a/gr-qtgui/examples/pyqt_example_f.py b/gr-qtgui/examples/pyqt_example_f.py index 5e432fe78..d00011f40 100755 --- a/gr-qtgui/examples/pyqt_example_f.py +++ b/gr-qtgui/examples/pyqt_example_f.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr import sys @@ -111,7 +111,7 @@ class control_box(QtGui.QWidget): except ValueError: print "Bad amplitude value entered" - + def freq2EditText(self): try: newfreq = float(self.freq2Edit.text()) @@ -138,7 +138,7 @@ class my_top_block(gr.top_block): fftsize = 2048 self.qapp = QtGui.QApplication(sys.argv) - + src1 = gr.sig_source_f(Rs, gr.GR_SIN_WAVE, f1, 0.1, 0) src2 = gr.sig_source_f(Rs, gr.GR_SIN_WAVE, f2, 0.1, 0) src = gr.add_ff() @@ -170,7 +170,7 @@ class my_top_block(gr.top_block): self.main_box = dialog_box(pyWin, self.ctrl_win) self.main_box.show() - + if __name__ == "__main__": tb = my_top_block(); tb.start() diff --git a/gr-qtgui/examples/pyqt_time_c.py b/gr-qtgui/examples/pyqt_time_c.py index a47302d19..04425e11f 100755 --- a/gr-qtgui/examples/pyqt_time_c.py +++ b/gr-qtgui/examples/pyqt_time_c.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr import sys @@ -111,7 +111,7 @@ class control_box(QtGui.QWidget): except ValueError: print "Bad amplitude value entered" - + def freq2EditText(self): try: newfreq = float(self.freq2Edit.text()) @@ -138,7 +138,7 @@ class my_top_block(gr.top_block): npts = 2048 self.qapp = QtGui.QApplication(sys.argv) - + src1 = gr.sig_source_c(Rs, gr.GR_SIN_WAVE, f1, 0.1, 0) src2 = gr.sig_source_c(Rs, gr.GR_SIN_WAVE, f2, 0.1, 0) src = gr.add_cc() @@ -180,10 +180,10 @@ class my_top_block(gr.top_block): #pyWin.show() self.main_box = dialog_box(pyWin, self.ctrl_win) self.main_box.show() - + if __name__ == "__main__": tb = my_top_block(); tb.start() tb.qapp.exec_() tb.stop() - + diff --git a/gr-qtgui/examples/pyqt_time_f.py b/gr-qtgui/examples/pyqt_time_f.py index 835b42a75..464d8939b 100755 --- a/gr-qtgui/examples/pyqt_time_f.py +++ b/gr-qtgui/examples/pyqt_time_f.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr import sys @@ -111,7 +111,7 @@ class control_box(QtGui.QWidget): except ValueError: print "Bad amplitude value entered" - + def freq2EditText(self): try: newfreq = float(self.freq2Edit.text()) @@ -138,7 +138,7 @@ class my_top_block(gr.top_block): npts = 2048 self.qapp = QtGui.QApplication(sys.argv) - + src1 = gr.sig_source_f(Rs, gr.GR_SIN_WAVE, f1, 0.1, 0) src2 = gr.sig_source_f(Rs, gr.GR_SIN_WAVE, f2, 0.1, 0) src = gr.add_ff() @@ -180,10 +180,10 @@ class my_top_block(gr.top_block): #pyWin.show() self.main_box = dialog_box(pyWin, self.ctrl_win) self.main_box.show() - + if __name__ == "__main__": tb = my_top_block(); tb.start() tb.qapp.exec_() tb.stop() - + diff --git a/gr-qtgui/grc/.gitignore b/gr-qtgui/grc/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-qtgui/grc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-qtgui/grc/CMakeLists.txt b/gr-qtgui/grc/CMakeLists.txt index 370a71725..d56158ac7 100644 --- a/gr-qtgui/grc/CMakeLists.txt +++ b/gr-qtgui/grc/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-qtgui/grc/Makefile.am b/gr-qtgui/grc/Makefile.am deleted file mode 100644 index ccd459a13..000000000 --- a/gr-qtgui/grc/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright 2010-2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -grcblocksdir = $(grc_blocksdir) - -dist_grcblocks_DATA = \ - qtgui_check_box.xml \ - qtgui_entry.xml \ - qtgui_label.xml \ - qtgui_range.xml \ - qtgui_sink_x.xml \ - qtgui_time_sink_x.xml \ - qtgui_tab_widget.xml \ - qtgui_chooser.xml diff --git a/gr-qtgui/include/.gitignore b/gr-qtgui/include/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-qtgui/include/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-qtgui/include/Makefile.am b/gr-qtgui/include/Makefile.am deleted file mode 100644 index 59a030854..000000000 --- a/gr-qtgui/include/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -# These headers get installed in ${prefix}/include/gnuradio -grinclude_HEADERS = \ - gr_qtgui_api.h \ - qtgui_time_sink_c.h \ - qtgui_time_sink_f.h \ - qtgui_sink_c.h \ - qtgui_sink_f.h \ - qtgui_util.h - -libgnuradio_digital_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) diff --git a/gr-qtgui/include/qtgui_sink_c.h b/gr-qtgui/include/qtgui_sink_c.h index 024ea360b..68fff368a 100644 --- a/gr-qtgui/include/qtgui_sink_c.h +++ b/gr-qtgui/include/qtgui_sink_c.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -50,7 +50,7 @@ GR_QTGUI_API qtgui_sink_c_sptr qtgui_make_sink_c (int fftsize, int wintype, * plots it. The default action is to plot the signal as a PSD (FFT), * spectrogram (waterfall), time domain I&Q, and constellation (I * vs. Q) plots. The plots may be turned off by setting the - * appropriate boolean value in the constructor to False. + * appropriate boolean value in the constructor to False. */ class GR_QTGUI_API qtgui_sink_c : public gr_block @@ -63,7 +63,7 @@ private: bool plottime, bool plotconst, QWidget *parent); qtgui_sink_c (int fftsize, int wintype, - double fc, double bw, + double fc, double bw, const std::string &name, bool plotfreq, bool plotwaterfall, bool plottime, bool plotconst, @@ -81,7 +81,7 @@ private: std::string d_name; gruel::high_res_timer_type d_last_update; bool d_update_active; - + bool d_shift; gri_fft_complex *d_fft; @@ -89,7 +89,7 @@ private: gr_complex *d_residbuf; bool d_plotfreq, d_plotwaterfall, d_plottime, d_plotconst; - + gruel::high_res_timer_type d_update_time; QWidget *d_parent; @@ -99,7 +99,7 @@ private: void buildwindow(); void fftresize(); void fft(const gr_complex *data_in, int size); - + public: ~qtgui_sink_c(); void exec_(); diff --git a/gr-qtgui/include/qtgui_sink_f.h b/gr-qtgui/include/qtgui_sink_f.h index 2d79b5eef..709f02a2f 100644 --- a/gr-qtgui/include/qtgui_sink_f.h +++ b/gr-qtgui/include/qtgui_sink_f.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -78,7 +78,7 @@ private: double d_center_freq; double d_bandwidth; std::string d_name; - + bool d_shift; gri_fft_complex *d_fft; @@ -90,13 +90,13 @@ private: double d_update_time; QWidget *d_parent; - SpectrumGUIClass *d_main_gui; + SpectrumGUIClass *d_main_gui; void windowreset(); void buildwindow(); void fftresize(); void fft(const float *data_in, int size); - + public: ~qtgui_sink_f(); void exec_(); diff --git a/gr-qtgui/include/qtgui_time_sink_c.h b/gr-qtgui/include/qtgui_time_sink_c.h index ec7cc490b..561d796cf 100644 --- a/gr-qtgui/include/qtgui_time_sink_c.h +++ b/gr-qtgui/include/qtgui_time_sink_c.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -61,7 +61,7 @@ private: const std::string &name, int nconnections, QWidget *parent=NULL); - + void initialize(); int d_size; diff --git a/gr-qtgui/include/qtgui_time_sink_f.h b/gr-qtgui/include/qtgui_time_sink_f.h index ff17f8a1b..993e0556c 100644 --- a/gr-qtgui/include/qtgui_time_sink_f.h +++ b/gr-qtgui/include/qtgui_time_sink_f.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -59,7 +59,7 @@ private: const std::string &name, int nconnections, QWidget *parent=NULL); - + void initialize(); int d_size; diff --git a/gr-qtgui/include/qtgui_util.h b/gr-qtgui/include/qtgui_util.h index 7b3692e75..2deaddb94 100644 --- a/gr-qtgui/include/qtgui_util.h +++ b/gr-qtgui/include/qtgui_util.h @@ -43,12 +43,12 @@ class GR_QTGUI_API QwtPickerDblClickPointMachine: public QwtPickerMachine public: QwtPickerDblClickPointMachine(); ~QwtPickerDblClickPointMachine(); - + #if QWT_VERSION < 0x060000 virtual CommandList transition( const QwtEventPattern &eventPattern, const QEvent *e); #else - virtual QList<QwtPickerMachine::Command> + virtual QList<QwtPickerMachine::Command> transition( const QwtEventPattern &eventPattern, const QEvent *e); #endif diff --git a/gr-qtgui/lib/.gitignore b/gr-qtgui/lib/.gitignore deleted file mode 100644 index 7754ad227..000000000 --- a/gr-qtgui/lib/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -/Makefile -/Makefile.in -/.libs -/.deps -/qtgui.cc -/qtgui.py -/WaterfallDisplayPlot.moc.cc -/TimeDomainDisplayPlot.moc.cc -/spectrumdisplayform.moc.cc -/spectrumdisplayform.ui.h -/FrequencyDisplayPlot.moc.cc -/ConstellationDisplayPlot.moc.cc -/timedisplayform.moc.cc -/gnuradio -/guile -/python diff --git a/gr-qtgui/lib/ConstellationDisplayPlot.cc b/gr-qtgui/lib/ConstellationDisplayPlot.cc index fb549b697..7a595fef4 100644 --- a/gr-qtgui/lib/ConstellationDisplayPlot.cc +++ b/gr-qtgui/lib/ConstellationDisplayPlot.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -40,14 +40,14 @@ public: virtual ~ConstellationDisplayZoomer(){ } - + virtual void updateTrackerText(){ updateDisplay(); } protected: using QwtPlotZoomer::trackerText; - virtual QwtText trackerText( const QwtDoublePoint& p ) const + virtual QwtText trackerText( const QwtDoublePoint& p ) const { QwtText t(QString("(%1, %2)").arg(p.x(), 0, 'f', 4). arg(p.y(), 0, 'f', 4)); @@ -73,7 +73,7 @@ ConstellationDisplayPlot::ConstellationDisplayPlot(QWidget* parent) #else QwtPainter::setPolylineSplitting(false); #endif - + #if QWT_VERSION < 0x060000 // We don't need the cache here canvas()->setPaintAttribute(QwtPlotCanvas::PaintCached, false); @@ -82,7 +82,7 @@ ConstellationDisplayPlot::ConstellationDisplayPlot(QWidget* parent) QPalette palette; palette.setColor(canvas()->backgroundRole(), QColor("white")); - canvas()->setPalette(palette); + canvas()->setPalette(palette); setAxisScaleEngine(QwtPlot::xBottom, new QwtLinearScaleEngine); set_xaxis(-2.0, 2.0); @@ -144,7 +144,7 @@ ConstellationDisplayPlot::ConstellationDisplayPlot(QWidget* parent) this, SLOT(OnPickerPointSelected6(const QPointF &))); #endif - connect(this, SIGNAL(legendChecked(QwtPlotItem *, bool ) ), + connect(this, SIGNAL(legendChecked(QwtPlotItem *, bool ) ), this, SLOT(LegendEntryChecked(QwtPlotItem *, bool ) )); } @@ -157,7 +157,7 @@ ConstellationDisplayPlot::~ConstellationDisplayPlot() // _zoomer and _panner deleted when parent deleted } -void +void ConstellationDisplayPlot::set_pen_size(int size) { if(size > 0 && size < 30){ @@ -203,7 +203,7 @@ void ConstellationDisplayPlot::PlotNewData(const double* realDataPoints, const int64_t numDataPoints, const double timeInterval) { - if((numDataPoints > 0) && + if((numDataPoints > 0) && (gruel::high_res_timer_now() - _lastReplot > timeInterval*gruel::high_res_timer_tps())) { if(numDataPoints != _numPoints){ @@ -213,12 +213,12 @@ void ConstellationDisplayPlot::PlotNewData(const double* realDataPoints, delete[] _imagDataPoints; _realDataPoints = new double[_numPoints]; _imagDataPoints = new double[_numPoints]; - + #if QWT_VERSION < 0x060000 _plot_curve->setRawData(_realDataPoints, _imagDataPoints, _numPoints); #else _plot_curve->setRawSamples(_realDataPoints, _imagDataPoints, _numPoints); -#endif +#endif } memcpy(_realDataPoints, realDataPoints, numDataPoints*sizeof(double)); diff --git a/gr-qtgui/lib/ConstellationDisplayPlot.h b/gr-qtgui/lib/ConstellationDisplayPlot.h index 80ac3a63a..9e0f6f26a 100644 --- a/gr-qtgui/lib/ConstellationDisplayPlot.h +++ b/gr-qtgui/lib/ConstellationDisplayPlot.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -51,11 +51,11 @@ public: ConstellationDisplayPlot(QWidget*); virtual ~ConstellationDisplayPlot(); - void PlotNewData(const double* realDataPoints, - const double* imagDataPoints, + void PlotNewData(const double* realDataPoints, + const double* imagDataPoints, const int64_t numDataPoints, const double timeInterval); - + virtual void replot(); void set_xaxis(double min, double max); @@ -86,7 +86,7 @@ private: QwtPlotPanner* _panner; QwtPlotZoomer* _zoomer; - + QwtDblClickPlotPicker *_picker; double* _realDataPoints; diff --git a/gr-qtgui/lib/FrequencyDisplayPlot.cc b/gr-qtgui/lib/FrequencyDisplayPlot.cc index b48cd7233..b74d46015 100644 --- a/gr-qtgui/lib/FrequencyDisplayPlot.cc +++ b/gr-qtgui/lib/FrequencyDisplayPlot.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -63,7 +63,7 @@ public: { } - virtual ~FreqDisplayScaleDraw() + virtual ~FreqDisplayScaleDraw() { } @@ -90,7 +90,7 @@ public: virtual ~FreqDisplayZoomer(){ } - + virtual void updateTrackerText(){ updateDisplay(); } @@ -119,11 +119,11 @@ FrequencyDisplayPlot::FrequencyDisplayPlot(QWidget* parent) { _startFrequency = 0; _stopFrequency = 4000; - + _lastReplot = 0; resize(parent->width(), parent->height()); - + _useCenterFrequencyFlag = false; _numPoints = 1024; @@ -138,16 +138,16 @@ FrequencyDisplayPlot::FrequencyDisplayPlot(QWidget* parent) #else QwtPainter::setPolylineSplitting(false); #endif - + #if QWT_VERSION < 0x060000 // We don't need the cache here canvas()->setPaintAttribute(QwtPlotCanvas::PaintCached, false); canvas()->setPaintAttribute(QwtPlotCanvas::PaintPacked, false); #endif - + QPalette palette; palette.setColor(canvas()->backgroundRole(), QColor("white")); - canvas()->setPalette(palette); + canvas()->setPalette(palette); setAxisTitle(QwtPlot::xBottom, "Frequency (Hz)"); setAxisScaleDraw(QwtPlot::xBottom, new FreqDisplayScaleDraw(0)); @@ -229,7 +229,7 @@ FrequencyDisplayPlot::FrequencyDisplayPlot(QWidget* parent) /// THIS CAUSES A PROBLEM! //_markerPeakAmplitude->attach(this); - + _markerNoiseFloorAmplitude = new QwtPlotMarker(); _markerNoiseFloorAmplitude->setLineStyle(QwtPlotMarker::HLine); _markerNoiseFloorAmplitude->setLinePen(QPen(Qt::darkRed, 0, Qt::DotLine)); @@ -344,7 +344,7 @@ FrequencyDisplayPlot::SetFrequencyRange(const double constStartFreq, if(stopFreq > startFreq) { _startFrequency = startFreq; _stopFrequency = stopFreq; - + if((axisScaleDraw(QwtPlot::xBottom) != NULL) && (_zoomer != NULL)){ double display_units = ceil(log10(units)/2.0); setAxisScaleDraw(QwtPlot::xBottom, new FreqDisplayScaleDraw(display_units)); @@ -352,7 +352,7 @@ FrequencyDisplayPlot::SetFrequencyRange(const double constStartFreq, if(reset) _resetXAxisPoints(); - + ((FreqDisplayZoomer*)_zoomer)->SetFrequencyPrecision(display_units); ((FreqDisplayZoomer*)_zoomer)->SetUnitType(strunits); } @@ -376,7 +376,7 @@ void FrequencyDisplayPlot::replot() { _markerNoiseFloorAmplitude->setYValue(_noiseFloorAmplitude); - + // Make sure to take into account the start frequency if(_useCenterFrequencyFlag){ _markerPeakAmplitude->setXValue((_peakFrequency/1000.0) + _startFrequency); @@ -385,10 +385,10 @@ FrequencyDisplayPlot::replot() _markerPeakAmplitude->setXValue(_peakFrequency + _startFrequency); } _markerPeakAmplitude->setYValue(_peakAmplitude); - + QwtPlot::replot(); } - + void FrequencyDisplayPlot::resizeSlot( QSize *s ) { @@ -401,12 +401,12 @@ FrequencyDisplayPlot::PlotNewData(const double* dataPoints, const int64_t numDat const double peakAmplitude, const double timeInterval) { // Only update plot if there is data and if the time interval has elapsed - if((numDataPoints > 0) && + if((numDataPoints > 0) && (gruel::high_res_timer_now() - _lastReplot > timeInterval*gruel::high_res_timer_tps())) { - + if(numDataPoints != _numPoints) { _numPoints = numDataPoints; - + delete[] _dataPoints; delete[] _minFFTPoints; delete[] _maxFFTPoints; @@ -425,7 +425,7 @@ FrequencyDisplayPlot::PlotNewData(const double* dataPoints, const int64_t numDat _min_fft_plot_curve->setRawSamples(_xAxisPoints, _minFFTPoints, _numPoints); _max_fft_plot_curve->setRawSamples(_xAxisPoints, _maxFFTPoints, _numPoints); #endif - + _resetXAxisPoints(); ClearMaxData(); ClearMinData(); @@ -521,7 +521,7 @@ FrequencyDisplayPlot::SetTraceColour (QColor c) _fft_plot_curve->setPen(QPen(c)); } -void +void FrequencyDisplayPlot::SetBGColour (QColor c) { QPalette palette; diff --git a/gr-qtgui/lib/FrequencyDisplayPlot.h b/gr-qtgui/lib/FrequencyDisplayPlot.h index e79000789..5c3ea708c 100644 --- a/gr-qtgui/lib/FrequencyDisplayPlot.h +++ b/gr-qtgui/lib/FrequencyDisplayPlot.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -50,9 +50,9 @@ public: FrequencyDisplayPlot(QWidget*); virtual ~FrequencyDisplayPlot(); - void SetFrequencyRange(const double, const double, + void SetFrequencyRange(const double, const double, const double, const bool, - const double units=1000.0, + const double units=1000.0, const std::string &strunits = "kHz"); double GetStartFrequency()const; double GetStopFrequency()const; @@ -60,13 +60,13 @@ public: void PlotNewData(const double* dataPoints, const int64_t numDataPoints, const double noiseFloorAmplitude, const double peakFrequency, const double peakAmplitude, const double timeInterval); - + void ClearMaxData(); void ClearMinData(); - + void SetMaxFFTVisible(const bool); void SetMinFFTVisible(const bool); - + virtual void replot(); void set_yaxis(double min, double max); @@ -94,12 +94,12 @@ protected: private: void _resetXAxisPoints(); - + double _startFrequency; double _stopFrequency; double _maxYAxis; double _minYAxis; - + QwtPlotCurve* _fft_plot_curve; QwtPlotCurve* _min_fft_plot_curve; QwtPlotCurve* _max_fft_plot_curve; @@ -115,9 +115,9 @@ private: QwtPlotMarker *_markerCF; QwtDblClickPlotPicker *_picker; - + QwtPlotMagnifier *_magnifier; - + double* _dataPoints; double* _xAxisPoints; int _xAxisMultiplier; diff --git a/gr-qtgui/lib/Makefile.am b/gr-qtgui/lib/Makefile.am deleted file mode 100644 index aba311297..000000000 --- a/gr-qtgui/lib/Makefile.am +++ /dev/null @@ -1,95 +0,0 @@ -# -# Copyright 2008-2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -EXTRA_DIST += spectrumdisplayform.ui - -AM_CPPFLAGS = -I. $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) \ - $(QT_INCLUDES) $(BOOST_CPPFLAGS) $(GR_QTGUI_INCLUDES) \ - $(WITH_INCLUDES) -Dlibgnuradio_qtgui_EXPORTS - -# Only include these files in the build if qtgui passes configure checks -# This is mostly to help make distcheck pass -QMAKE_SOURCES = \ - spectrumdisplayform.moc.cc \ - timedisplayform.moc.cc \ - FrequencyDisplayPlot.moc.cc \ - TimeDomainDisplayPlot.moc.cc \ - WaterfallDisplayPlot.moc.cc \ - ConstellationDisplayPlot.moc.cc \ - spectrumdisplayform.ui.h - -BUILT_SOURCES += $(QMAKE_SOURCES) - -# Build the normal library for C++ apps to link against -lib_LTLIBRARIES = libgnuradio-qtgui.la - -# These are the source files that go into the shared library -libgnuradio_qtgui_la_SOURCES = \ - FrequencyDisplayPlot.cc \ - TimeDomainDisplayPlot.cc \ - WaterfallDisplayPlot.cc \ - waterfallGlobalData.cc \ - ConstellationDisplayPlot.cc \ - spectrumdisplayform.cc \ - timedisplayform.cc \ - SpectrumGUIClass.cc \ - spectrumUpdateEvents.cc \ - plot_waterfall.cc \ - qtgui_sink_c.cc \ - qtgui_sink_f.cc \ - qtgui_time_sink_c.cc \ - qtgui_time_sink_f.cc \ - qtgui_util.cc - -nodist_libgnuradio_qtgui_la_SOURCES=$(QMAKE_SOURCES) - -# These headers get installed in ${prefix}/include/gnuradio -grinclude_HEADERS = \ - FrequencyDisplayPlot.h \ - TimeDomainDisplayPlot.h \ - WaterfallDisplayPlot.h \ - waterfallGlobalData.h \ - ConstellationDisplayPlot.h \ - spectrumdisplayform.h \ - timedisplayform.h \ - SpectrumGUIClass.h \ - plot_waterfall.h \ - spectrumUpdateEvents.h - -#QT_MOC_FLAGS=-DQT_SHARED -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -QT_MOC_FLAGS=-DQT_SHARED -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -%.moc.cc : %.h - $(QT_MOC_EXEC) $(QT_MOC_FLAGS) -p $(srcdir) $< -o $@ - -%.ui.h : %.ui - $(QT_UIC_EXEC) $< -o $@ - -# magic flags -libgnuradio_qtgui_la_LDFLAGS = $(NO_UNDEFINED) $(BOOST_LDFLAGS) $(LTVERSIONFLAGS) - -libgnuradio_qtgui_la_LIBADD = \ - $(GNURADIO_CORE_LA) \ - $(BOOST_THREAD_LIB) \ - $(BOOST_DATE_TIME_LIB) \ - -lstdc++ \ - $(QT_LIBS) diff --git a/gr-qtgui/lib/SpectrumGUIClass.cc b/gr-qtgui/lib/SpectrumGUIClass.cc index 1e9aa0169..d2dbc7772 100644 --- a/gr-qtgui/lib/SpectrumGUIClass.cc +++ b/gr-qtgui/lib/SpectrumGUIClass.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -54,7 +54,7 @@ SpectrumGUIClass::SpectrumGUIClass(const uint64_t maxDataSize, _windowType = 5; - _lastGUIUpdateTime = 0; + _lastGUIUpdateTime = 0; _windowOpennedFlag = false; _fftBuffersCreatedFlag = false; @@ -92,16 +92,16 @@ SpectrumGUIClass::OpenSpectrumWindow(QWidget* parent, _realTimeDomainPoints = new double[_dataPoints]; _imagTimeDomainPoints = new double[_dataPoints]; _fftBuffersCreatedFlag = true; - - + + memset(_fftPoints, 0x0, _dataPoints*sizeof(std::complex<float>)); memset(_realTimeDomainPoints, 0x0, _dataPoints*sizeof(double)); memset(_imagTimeDomainPoints, 0x0, _dataPoints*sizeof(double)); } - + // Called from the Event Thread _spectrumDisplayForm = new SpectrumDisplayForm(parent); - + // Toggle Windows on/off _spectrumDisplayForm->ToggleTabFrequency(frequency); _spectrumDisplayForm->ToggleTabWaterfall(waterfall); @@ -140,8 +140,8 @@ SpectrumGUIClass::Reset() { if(GetWindowOpenFlag()) { qApp->postEvent(_spectrumDisplayForm, - new SpectrumFrequencyRangeEvent(_centerFrequency, - _startFrequency, + new SpectrumFrequencyRangeEvent(_centerFrequency, + _startFrequency, _stopFrequency)); qApp->postEvent(_spectrumDisplayForm, new SpectrumWindowResetEvent()); } @@ -304,7 +304,7 @@ SpectrumGUIClass::UpdateWindow(const bool updateDisplayFlag, lastOfMultipleFFTUpdateFlag, currentTime, _droppedEntriesCount)); - + // Only reset the dropped entries counter if this is not // repeat data since repeat data is dropped by the display systems if(!repeatDataFlag){ diff --git a/gr-qtgui/lib/SpectrumGUIClass.h b/gr-qtgui/lib/SpectrumGUIClass.h index 857c2515f..e0612413b 100644 --- a/gr-qtgui/lib/SpectrumGUIClass.h +++ b/gr-qtgui/lib/SpectrumGUIClass.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -44,7 +44,7 @@ class SpectrumGUIClass public: SpectrumGUIClass(const uint64_t maxDataSize, const uint64_t fftSize, const double newCenterFrequency, - const double newStartFrequency, + const double newStartFrequency, const double newStopFrequency); ~SpectrumGUIClass(); void Reset(); diff --git a/gr-qtgui/lib/TimeDomainDisplayPlot.cc b/gr-qtgui/lib/TimeDomainDisplayPlot.cc index 192ec82ee..84b09af90 100644 --- a/gr-qtgui/lib/TimeDomainDisplayPlot.cc +++ b/gr-qtgui/lib/TimeDomainDisplayPlot.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -68,7 +68,7 @@ public: virtual ~TimeDomainDisplayZoomer(){ } - + virtual void updateTrackerText(){ updateDisplay(); } @@ -80,7 +80,7 @@ public: protected: using QwtPlotZoomer::trackerText; - virtual QwtText trackerText( const QwtDoublePoint& p ) const + virtual QwtText trackerText( const QwtDoublePoint& p ) const { QwtText t(QString("%1 %2, %3 V").arg(p.x(), 0, 'f', GetTimePrecision()). arg(_unitType.c_str()). @@ -114,7 +114,7 @@ TimeDomainDisplayPlot::TimeDomainDisplayPlot(int nplots, QWidget* parent) #else QwtPainter::setPolylineSplitting(false); #endif - + #if QWT_VERSION < 0x060000 // We don't need the cache here canvas()->setPaintAttribute(QwtPlotCanvas::PaintCached, false); @@ -123,7 +123,7 @@ TimeDomainDisplayPlot::TimeDomainDisplayPlot(int nplots, QWidget* parent) QPalette palette; palette.setColor(canvas()->backgroundRole(), QColor("white")); - canvas()->setPalette(palette); + canvas()->setPalette(palette); setAxisScaleEngine(QwtPlot::xBottom, new QwtLinearScaleEngine); setXaxis(0, _numPoints); @@ -198,7 +198,7 @@ TimeDomainDisplayPlot::TimeDomainDisplayPlot(int nplots, QWidget* parent) legendDisplay->setItemMode(QwtLegend::CheckableItem); insertLegend(legendDisplay); - connect(this, SIGNAL( legendChecked(QwtPlotItem *, bool ) ), + connect(this, SIGNAL( legendChecked(QwtPlotItem *, bool ) ), this, SLOT( LegendEntryChecked(QwtPlotItem *, bool ) )); } @@ -270,7 +270,7 @@ void TimeDomainDisplayPlot::PlotNewData(const std::vector<double*> dataPoints, _plot_curve[i]->setRawSamples(_xAxisPoints, _dataPoints[i], _numPoints); #endif } - + setXaxis(0, numDataPoints); _resetXAxisPoints(); } @@ -314,7 +314,7 @@ TimeDomainDisplayPlot::SetSampleRate(double sr, double units, if(newsr != _sampleRate) { _sampleRate = sr/units; _resetXAxisPoints(); - + // While we could change the displayed sigfigs based on the unit being // displayed, I think it looks better by just setting it to 4 regardless. //double display_units = ceil(log10(units)/2.0); diff --git a/gr-qtgui/lib/TimeDomainDisplayPlot.h b/gr-qtgui/lib/TimeDomainDisplayPlot.h index 1f3f2c574..356da25ad 100644 --- a/gr-qtgui/lib/TimeDomainDisplayPlot.h +++ b/gr-qtgui/lib/TimeDomainDisplayPlot.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -50,9 +50,9 @@ public: TimeDomainDisplayPlot(int nplots, QWidget*); virtual ~TimeDomainDisplayPlot(); - void PlotNewData(const std::vector<double*> dataPoints, + void PlotNewData(const std::vector<double*> dataPoints, const int64_t numDataPoints, const double timeInterval); - + virtual void replot(); public slots: @@ -62,7 +62,7 @@ public slots: void setColor(int which, QString color); void resizeSlot( QSize *s ); - void SetSampleRate(double sr, double units, + void SetSampleRate(double sr, double units, const std::string &strunits); // Because of the preprocessing of slots in QT, these are no @@ -87,10 +87,10 @@ private: QwtPlotPanner* _panner; QwtPlotZoomer* _zoomer; - + QwtDblClickPlotPicker *_picker; QwtPlotMagnifier *_magnifier; - + std::vector<double*> _dataPoints; double* _xAxisPoints; diff --git a/gr-qtgui/lib/WaterfallDisplayPlot.cc b/gr-qtgui/lib/WaterfallDisplayPlot.cc index ffb27f2aa..63eb57ffe 100644 --- a/gr-qtgui/lib/WaterfallDisplayPlot.cc +++ b/gr-qtgui/lib/WaterfallDisplayPlot.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -113,16 +113,16 @@ public: _zeroTime = 0; _secondsPerLine = 1.0; } - + virtual ~TimeScaleData() - { + { } virtual gruel::high_res_timer_type GetZeroTime() const { return _zeroTime; } - + virtual void SetZeroTime(const gruel::high_res_timer_type newTime) { _zeroTime = newTime - gruel::high_res_timer_epoch(); @@ -138,13 +138,13 @@ public: return _secondsPerLine; } - + protected: gruel::high_res_timer_type _zeroTime; double _secondsPerLine; - + private: - + }; static QString @@ -164,11 +164,11 @@ class QwtTimeScaleDraw: public QwtScaleDraw, public TimeScaleData { public: QwtTimeScaleDraw():QwtScaleDraw(),TimeScaleData() - { + { } virtual ~QwtTimeScaleDraw() - { + { } virtual QwtText label(double value) const @@ -183,19 +183,19 @@ public: // updates is to prevent the display from being updated too often... invalidateCache(); } - + protected: private: }; -class WaterfallZoomer: public QwtPlotZoomer, public TimeScaleData, +class WaterfallZoomer: public QwtPlotZoomer, public TimeScaleData, public FreqOffsetAndPrecisionClass { public: WaterfallZoomer(QwtPlotCanvas* canvas, const unsigned int freqPrecision) - : QwtPlotZoomer(canvas), TimeScaleData(), + : QwtPlotZoomer(canvas), TimeScaleData(), FreqOffsetAndPrecisionClass(freqPrecision) { setTrackerMode(QwtPicker::AlwaysOn); @@ -204,7 +204,7 @@ public: virtual ~WaterfallZoomer() { } - + virtual void updateTrackerText() { updateDisplay(); @@ -217,7 +217,7 @@ public: protected: using QwtPlotZoomer::trackerText; - virtual QwtText trackerText( const QwtDoublePoint& p ) const + virtual QwtText trackerText( const QwtDoublePoint& p ) const { double secs = GetZeroTime()/double(gruel::high_res_timer_tps()) - (p.y() * GetSecondsPerLine()); QwtText t(QString("%1 %2, %3"). @@ -289,13 +289,13 @@ WaterfallDisplayPlot::WaterfallDisplayPlot(QWidget* parent) _zoomer = NULL; _startFrequency = 0; _stopFrequency = 4000; - + resize(parent->width(), parent->height()); _numPoints = 1024; QPalette palette; palette.setColor(canvas()->backgroundRole(), QColor("white")); - canvas()->setPalette(palette); + canvas()->setPalette(palette); setAxisTitle(QwtPlot::xBottom, "Frequency (Hz)"); setAxisScaleDraw(QwtPlot::xBottom, new WaterfallFreqDisplayScaleDraw(0)); @@ -309,7 +309,7 @@ WaterfallDisplayPlot::WaterfallDisplayPlot(QWidget* parent) d_data = new WaterfallData(_startFrequency, _stopFrequency, _numPoints, 200); - + #if QWT_VERSION < 0x060000 d_spectrogram = new PlotWaterfall(d_data, "Waterfall Display"); @@ -324,7 +324,7 @@ WaterfallDisplayPlot::WaterfallDisplayPlot(QWidget* parent) #endif d_spectrogram->attach(this); - + // LeftButton for the zooming // MidButton for the panning // RightButton: zoom out by 1 @@ -337,11 +337,11 @@ WaterfallDisplayPlot::WaterfallDisplayPlot(QWidget* parent) Qt::RightButton, Qt::ControlModifier); _zoomer->setMousePattern(QwtEventPattern::MouseSelect3, Qt::RightButton); - + _panner = new QwtPlotPanner(canvas()); _panner->setAxisEnabled(QwtPlot::yRight, false); _panner->setMouseButton(Qt::MidButton); - + // emit the position of clicks on widget _picker = new QwtDblClickPlotPicker(canvas()); #if QWT_VERSION < 0x060000 @@ -354,11 +354,11 @@ WaterfallDisplayPlot::WaterfallDisplayPlot(QWidget* parent) // Avoid jumping when labels with more/less digits // appear/disappear when scrolling vertically - + const QFontMetrics fm(axisWidget(QwtPlot::yLeft)->font()); QwtScaleDraw *sd = axisScaleDraw(QwtPlot::yLeft); sd->setMinimumExtent( fm.width("100.00") ); - + const QColor c(Qt::black); _zoomer->setRubberBandPen(c); _zoomer->setTrackerPen(c); @@ -374,7 +374,7 @@ WaterfallDisplayPlot::~WaterfallDisplayPlot() delete d_spectrogram; } -void +void WaterfallDisplayPlot::Reset() { d_data->ResizeData(_startFrequency, _stopFrequency, _numPoints); @@ -418,7 +418,7 @@ WaterfallDisplayPlot::SetFrequencyRange(const double constStartFreq, if(stopFreq > startFreq) { _startFrequency = startFreq; _stopFrequency = stopFreq; - + if((axisScaleDraw(QwtPlot::xBottom) != NULL) && (_zoomer != NULL)){ double display_units = ceil(log10(units)/2.0); setAxisScaleDraw(QwtPlot::xBottom, new WaterfallFreqDisplayScaleDraw(display_units)); @@ -448,7 +448,7 @@ WaterfallDisplayPlot::GetStopFrequency() const } void -WaterfallDisplayPlot::PlotNewData(const double* dataPoints, +WaterfallDisplayPlot::PlotNewData(const double* dataPoints, const int64_t numDataPoints, const double timePerFFT, const gruel::high_res_timer_type timestamp, @@ -457,30 +457,30 @@ WaterfallDisplayPlot::PlotNewData(const double* dataPoints, if(numDataPoints > 0){ if(numDataPoints != _numPoints){ _numPoints = numDataPoints; - + Reset(); - + d_spectrogram->invalidateCache(); d_spectrogram->itemChanged(); - + if(isVisible()){ replot(); } - + _lastReplot = gruel::high_res_timer_now(); } if(gruel::high_res_timer_now() - _lastReplot > timePerFFT*gruel::high_res_timer_tps()) { d_data->addFFTData(dataPoints, numDataPoints, droppedFrames); d_data->IncrementNumLinesToUpdate(); - + QwtTimeScaleDraw* timeScale = (QwtTimeScaleDraw*)axisScaleDraw(QwtPlot::yLeft); timeScale->SetSecondsPerLine(timePerFFT); timeScale->SetZeroTime(timestamp); - + ((WaterfallZoomer*)_zoomer)->SetSecondsPerLine(timePerFFT); ((WaterfallZoomer*)_zoomer)->SetZeroTime(timestamp); - + d_spectrogram->invalidateCache(); d_spectrogram->itemChanged(); @@ -492,7 +492,7 @@ WaterfallDisplayPlot::PlotNewData(const double* dataPoints, } void -WaterfallDisplayPlot::SetIntensityRange(const double minIntensity, +WaterfallDisplayPlot::SetIntensityRange(const double minIntensity, const double maxIntensity) { #if QWT_VERSION < 0x060000 @@ -547,11 +547,11 @@ WaterfallDisplayPlot::GetIntensityColorMapType() const } void -WaterfallDisplayPlot::SetIntensityColorMapType(const int newType, - const QColor lowColor, +WaterfallDisplayPlot::SetIntensityColorMapType(const int newType, + const QColor lowColor, const QColor highColor) { - if((_intensityColorMapType != newType) || + if((_intensityColorMapType != newType) || ((newType == INTENSITY_COLOR_MAP_TYPE_USER_DEFINED) && (lowColor.isValid() && highColor.isValid()))){ switch(newType){ @@ -609,7 +609,7 @@ WaterfallDisplayPlot::SetIntensityColorMapType(const int newType, } default: break; } - + _UpdateIntensityRangeDisplay(); } } @@ -636,7 +636,7 @@ WaterfallDisplayPlot::_UpdateIntensityRangeDisplay() #if QWT_VERSION < 0x060000 rightAxis->setColorMap(d_spectrogram->data()->range(), d_spectrogram->colorMap()); - setAxisScale(QwtPlot::yRight, + setAxisScale(QwtPlot::yRight, d_spectrogram->data()->range().minValue(), d_spectrogram->data()->range().maxValue()); #else @@ -660,7 +660,7 @@ WaterfallDisplayPlot::_UpdateIntensityRangeDisplay() #endif enableAxis(QwtPlot::yRight); - + plotLayout()->setAlignCanvasToScales(true); // Tell the display to redraw everything diff --git a/gr-qtgui/lib/WaterfallDisplayPlot.h b/gr-qtgui/lib/WaterfallDisplayPlot.h index b78c750ff..d189ca2cb 100644 --- a/gr-qtgui/lib/WaterfallDisplayPlot.h +++ b/gr-qtgui/lib/WaterfallDisplayPlot.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -49,9 +49,9 @@ public: void Reset(); - void SetFrequencyRange(const double, const double, + void SetFrequencyRange(const double, const double, const double, const bool, - const double units=1000.0, + const double units=1000.0, const std::string &strunits = "kHz"); double GetStartFrequency()const; double GetStopFrequency()const; @@ -85,7 +85,7 @@ public slots: // version until it's worked out. void OnPickerPointSelected(const QwtDoublePoint & p); void OnPickerPointSelected6(const QPointF & p); - + signals: void UpdatedLowerIntensityLevel(const double); void UpdatedUpperIntensityLevel(const double); diff --git a/gr-qtgui/lib/plot_waterfall.cc b/gr-qtgui/lib/plot_waterfall.cc index dbba657b8..517ec0275 100644 --- a/gr-qtgui/lib/plot_waterfall.cc +++ b/gr-qtgui/lib/plot_waterfall.cc @@ -21,12 +21,12 @@ public: ? QImage::Format_ARGB32 : QImage::Format_Indexed8 ) { } - + PlotWaterfallImage(const QImage &other): QImage(other) { } - + void initColorTable(const QImage& other) { setColorTable(other.colorTable()); @@ -45,7 +45,7 @@ public: { delete colorMap; } - + WaterfallData *data; QwtColorMap *colorMap; }; @@ -56,7 +56,7 @@ public: - QwtPlotItem::Legend: false The z value is initialized by 8.0. - + \param title Title \sa QwtPlotItem::setItemAttribute(), QwtPlotItem::setZ() @@ -131,7 +131,7 @@ QwtDoubleRect PlotWaterfall::boundingRect() const { return d_data->data->boundingRect(); } -#endif +#endif /*! \brief Returns the recommended raster for a given rect. @@ -152,7 +152,7 @@ QSize PlotWaterfall::rasterHint(const QwtDoubleRect &rect) const /*! \brief Render an image from the data and color map. - The area is translated into a rect of the paint device. + The area is translated into a rect of the paint device. For each pixel of this rect the intensity is mapped into a color. @@ -160,7 +160,7 @@ QSize PlotWaterfall::rasterHint(const QwtDoubleRect &rect) const \param yMap Y-Scale Map \param area Area that should be rendered in scale coordinates. - \return A QImage::Format_Indexed8 or QImage::Format_ARGB32 depending + \return A QImage::Format_Indexed8 or QImage::Format_ARGB32 depending on the color map. \sa QwtRasterData::intensity(), QwtColorMap::rgb(), @@ -168,11 +168,11 @@ QSize PlotWaterfall::rasterHint(const QwtDoubleRect &rect) const */ #if QWT_VERSION < 0x060000 QImage PlotWaterfall::renderImage(const QwtScaleMap &xMap, - const QwtScaleMap &yMap, + const QwtScaleMap &yMap, const QwtDoubleRect &area) const #else QImage PlotWaterfall::renderImage(const QwtScaleMap &xMap, - const QwtScaleMap &yMap, + const QwtScaleMap &yMap, const QRectF &area, const QSize &size) const #endif @@ -224,7 +224,7 @@ QImage PlotWaterfall::renderImage(const QwtScaleMap &xMap, xxMap.setPaintInterval(px1, px2); xxMap.setScaleInterval(sx1, sx2); yyMap.setPaintInterval(py1, py2); - yyMap.setScaleInterval(sy1, sy2); + yyMap.setScaleInterval(sy1, sy2); } PlotWaterfallImage image(rect.size(), d_data->colorMap->format()); @@ -233,7 +233,7 @@ QImage PlotWaterfall::renderImage(const QwtScaleMap &xMap, const QwtDoubleInterval intensityRange = d_data->data->range(); #else const QwtInterval intensityRange = d_data->data->interval(Qt::ZAxis); -#endif +#endif if ( !intensityRange.isValid() ) return image; @@ -294,9 +294,9 @@ QImage PlotWaterfall::renderImage(const QwtScaleMap &xMap, \param painter Painter \param xMap Maps x-values into pixel coordinates. \param yMap Maps y-values into pixel coordinates. - \param canvasRect Contents rect of the canvas in painter coordinates + \param canvasRect Contents rect of the canvas in painter coordinates - \sa setDisplayMode, renderImage, + \sa setDisplayMode, renderImage, QwtPlotRasterItem::draw, drawContourLines */ diff --git a/gr-qtgui/lib/plot_waterfall.h b/gr-qtgui/lib/plot_waterfall.h index 1613dd8de..df2537b57 100644 --- a/gr-qtgui/lib/plot_waterfall.h +++ b/gr-qtgui/lib/plot_waterfall.h @@ -18,7 +18,7 @@ class QwtColorMap; A waterfall displays threedimenional data, where the 3rd dimension ( the intensity ) is displayed using colors. The colors are calculated from the values using a color map. - + \sa QwtRasterData, QwtColorMap */ @@ -50,11 +50,11 @@ public: protected: #if QWT_VERSION < 0x060000 QImage renderImage(const QwtScaleMap &xMap, - const QwtScaleMap &yMap, + const QwtScaleMap &yMap, const QwtDoubleRect &rect) const; #else QImage renderImage(const QwtScaleMap &xMap, - const QwtScaleMap &yMap, + const QwtScaleMap &yMap, const QRectF &rect, const QSize &size=QSize(0,0)) const; #endif diff --git a/gr-qtgui/lib/qtgui_sink_c.cc b/gr-qtgui/lib/qtgui_sink_c.cc index b99a0c56a..de730a871 100644 --- a/gr-qtgui/lib/qtgui_sink_c.cc +++ b/gr-qtgui/lib/qtgui_sink_c.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -55,7 +55,7 @@ qtgui_sink_c::qtgui_sink_c (int fftsize, int wintype, gr_make_io_signature (1, -1, sizeof(gr_complex)), gr_make_io_signature (0, 0, 0)), d_fftsize(fftsize), - d_wintype((gr_firdes::win_type)(wintype)), + d_wintype((gr_firdes::win_type)(wintype)), d_center_freq(fc), d_bandwidth(bw), d_name(name), d_plotfreq(plotfreq), d_plotwaterfall(plotwaterfall), d_plottime(plottime), d_plotconst(plotconst), @@ -65,7 +65,7 @@ qtgui_sink_c::qtgui_sink_c (int fftsize, int wintype, // Perform fftshift operation; // this is usually desired when plotting - d_shift = true; + d_shift = true; d_fft = new gri_fft_complex (d_fftsize, true); @@ -110,16 +110,16 @@ qtgui_sink_c::initialize() } uint64_t maxBufferSize = 32768; - d_main_gui = new SpectrumGUIClass(maxBufferSize, d_fftsize, - d_center_freq, - -d_bandwidth/2.0, + d_main_gui = new SpectrumGUIClass(maxBufferSize, d_fftsize, + d_center_freq, + -d_bandwidth/2.0, d_bandwidth/2.0); d_main_gui->SetDisplayTitle(d_name); d_main_gui->SetFFTSize(d_fftsize); d_main_gui->SetWindowType((int)d_wintype); - d_main_gui->OpenSpectrumWindow(d_parent, + d_main_gui->OpenSpectrumWindow(d_parent, d_plotfreq, d_plotwaterfall, d_plottime, d_plotconst); @@ -152,12 +152,12 @@ qtgui_sink_c::pyqwidget() } void -qtgui_sink_c::set_frequency_range(const double centerfreq, +qtgui_sink_c::set_frequency_range(const double centerfreq, const double bandwidth) { d_center_freq = centerfreq; d_bandwidth = bandwidth; - d_main_gui->SetFrequencyRange(d_center_freq, + d_main_gui->SetFrequencyRange(d_center_freq, -d_bandwidth/2.0, d_bandwidth/2.0); } @@ -175,7 +175,7 @@ qtgui_sink_c::set_constellation_axis(double xmin, double xmax, d_main_gui->SetConstellationAxis(xmin, xmax, ymin, ymax); } -void +void qtgui_sink_c::set_constellation_pen_size(int size) { d_main_gui->SetConstellationPenSize(size); @@ -211,10 +211,10 @@ qtgui_sink_c::fft(const gr_complex *data_in, int size) d_fft->execute (); // compute the fft } -void +void qtgui_sink_c::windowreset() { - gr_firdes::win_type newwintype = (gr_firdes::win_type)d_main_gui->GetWindowType(); + gr_firdes::win_type newwintype = (gr_firdes::win_type)d_main_gui->GetWindowType(); if(d_wintype != newwintype) { d_wintype = newwintype; buildwindow(); @@ -241,11 +241,11 @@ qtgui_sink_c::fftresize() delete [] d_residbuf; d_residbuf = new gr_complex[newfftsize]; - // Set new fft size and reset buffer index - // (throws away any currently held data, but who cares?) + // Set new fft size and reset buffer index + // (throws away any currently held data, but who cares?) d_fftsize = newfftsize; d_index = 0; - + // Reset window to reflect new size buildwindow(); @@ -284,14 +284,14 @@ qtgui_sink_c::general_work (int noutput_items, // If we have enough input for one full FFT, do it if(datasize >= resid) { const gruel::high_res_timer_type currentTime = gruel::high_res_timer_now(); - + // Fill up residbuf with d_fftsize number of items memcpy(d_residbuf+d_index, &in[j], sizeof(gr_complex)*resid); d_index = 0; j += resid; fft(d_residbuf, d_fftsize); - + d_main_gui->UpdateWindow(true, d_fft->get_outbuf(), d_fftsize, NULL, 0, (float*)d_residbuf, d_fftsize, currentTime, true); @@ -302,7 +302,7 @@ qtgui_sink_c::general_work (int noutput_items, memcpy(d_residbuf+d_index, &in[j], sizeof(gr_complex)*datasize); d_index += datasize; j += datasize; - } + } } consume_each(j); diff --git a/gr-qtgui/lib/qtgui_sink_f.cc b/gr-qtgui/lib/qtgui_sink_f.cc index a435064c0..a02f89d0a 100644 --- a/gr-qtgui/lib/qtgui_sink_f.cc +++ b/gr-qtgui/lib/qtgui_sink_f.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -108,8 +108,8 @@ qtgui_sink_f::initialize() uint64_t maxBufferSize = 32768; d_main_gui = new SpectrumGUIClass(maxBufferSize, d_fftsize, - d_center_freq, - -d_bandwidth/2.0, + d_center_freq, + -d_bandwidth/2.0, d_bandwidth/2.0); d_main_gui->SetDisplayTitle(d_name); d_main_gui->SetFFTSize(d_fftsize); @@ -144,12 +144,12 @@ qtgui_sink_f::pyqwidget() } void -qtgui_sink_f::set_frequency_range(const double centerfreq, +qtgui_sink_f::set_frequency_range(const double centerfreq, const double bandwidth) { d_center_freq = centerfreq; d_bandwidth = bandwidth; - d_main_gui->SetFrequencyRange(d_center_freq, + d_main_gui->SetFrequencyRange(d_center_freq, -d_bandwidth/2.0, d_bandwidth/2.0); } @@ -167,7 +167,7 @@ qtgui_sink_f::set_constellation_axis(double xmin, double xmax, d_main_gui->SetConstellationAxis(xmin, xmax, ymin, ymax); } -void +void qtgui_sink_f::set_constellation_pen_size(int size) { d_main_gui->SetConstellationPenSize(size); @@ -200,14 +200,14 @@ qtgui_sink_f::fft(const float *data_in, int size) for (int i = 0; i < size; i++) // float to complex conversion dst[i] = data_in[i]; } - + d_fft->execute (); // compute the fft } -void +void qtgui_sink_f::windowreset() { - gr_firdes::win_type newwintype = (gr_firdes::win_type)d_main_gui->GetWindowType(); + gr_firdes::win_type newwintype = (gr_firdes::win_type)d_main_gui->GetWindowType(); if(d_wintype != newwintype) { d_wintype = newwintype; buildwindow(); @@ -234,11 +234,11 @@ qtgui_sink_f::fftresize() delete [] d_residbuf; d_residbuf = new float[newfftsize]; - // Set new fft size and reset buffer index - // (throws away any currently held data, but who cares?) + // Set new fft size and reset buffer index + // (throws away any currently held data, but who cares?) d_fftsize = newfftsize; d_index = 0; - + // Reset window to reflect new size buildwindow(); @@ -269,14 +269,14 @@ qtgui_sink_f::general_work (int noutput_items, // If we have enough input for one full FFT, do it if(datasize >= resid) { const gruel::high_res_timer_type currentTime = gruel::high_res_timer_now(); - + // Fill up residbuf with d_fftsize number of items memcpy(d_residbuf+d_index, &in[j], sizeof(float)*resid); d_index = 0; j += resid; fft(d_residbuf, d_fftsize); - + d_main_gui->UpdateWindow(true, d_fft->get_outbuf(), d_fftsize, (float*)d_residbuf, d_fftsize, NULL, 0, currentTime, true); @@ -286,7 +286,7 @@ qtgui_sink_f::general_work (int noutput_items, memcpy(d_residbuf+d_index, &in[j], sizeof(float)*datasize); d_index += datasize; j += datasize; - } + } } consume_each(j); diff --git a/gr-qtgui/lib/qtgui_time_sink_c.cc b/gr-qtgui/lib/qtgui_time_sink_c.cc index 207d4a924..574fd93ad 100644 --- a/gr-qtgui/lib/qtgui_time_sink_c.cc +++ b/gr-qtgui/lib/qtgui_time_sink_c.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -147,11 +147,11 @@ qtgui_time_sink_c::work (int noutput_items, unsigned int datasize = noutput_items - i; unsigned int resid = d_size-d_index; idx = 0; - + // If we have enough input for one full plot, do it if(datasize >= resid) { d_current_time = gruel::high_res_timer_now(); - + // Fill up residbufs with d_size number of items for(n = 0; n < d_nconnections; n+=2) { in = (const gr_complex*)input_items[idx++]; @@ -159,15 +159,15 @@ qtgui_time_sink_c::work (int noutput_items, d_residbufs[n][d_index+k] = in[j+k].real(); d_residbufs[n+1][d_index+k] = in[j+k].imag(); } - } + } // Update the plot if its time if(gruel::high_res_timer_now() - d_last_time > d_update_time) { d_last_time = d_current_time; d_qApplication->postEvent(d_main_gui, - new TimeUpdateEvent(d_residbufs, d_size)); + new TimeUpdateEvent(d_residbufs, d_size)); } - + d_index = 0; j += resid; } @@ -184,7 +184,7 @@ qtgui_time_sink_c::work (int noutput_items, } d_index += datasize; j += datasize; - } + } } return noutput_items; diff --git a/gr-qtgui/lib/qtgui_time_sink_f.cc b/gr-qtgui/lib/qtgui_time_sink_f.cc index 2fe99f43c..09fdf0a92 100644 --- a/gr-qtgui/lib/qtgui_time_sink_f.cc +++ b/gr-qtgui/lib/qtgui_time_sink_f.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -147,26 +147,26 @@ qtgui_time_sink_f::work (int noutput_items, unsigned int datasize = noutput_items - i; unsigned int resid = d_size-d_index; idx = 0; - + // If we have enough input for one full plot, do it if(datasize >= resid) { d_current_time = gruel::high_res_timer_now(); - + // Fill up residbufs with d_size number of items for(n = 0; n < d_nconnections; n++) { in = (const float*)input_items[idx++]; for(unsigned int k = 0; k < resid; k++) { d_residbufs[n][d_index+k] = in[j+k]; } - } + } // Update the plot if its time if(gruel::high_res_timer_now() - d_last_time > d_update_time) { d_last_time = d_current_time; d_qApplication->postEvent(d_main_gui, - new TimeUpdateEvent(d_residbufs, d_size)); + new TimeUpdateEvent(d_residbufs, d_size)); } - + d_index = 0; j += resid; } @@ -184,6 +184,6 @@ qtgui_time_sink_f::work (int noutput_items, j += datasize; } } - + return noutput_items; } diff --git a/gr-qtgui/lib/spectrumUpdateEvents.cc b/gr-qtgui/lib/spectrumUpdateEvents.cc index 9be2f5357..bec39747b 100644 --- a/gr-qtgui/lib/spectrumUpdateEvents.cc +++ b/gr-qtgui/lib/spectrumUpdateEvents.cc @@ -145,7 +145,7 @@ SpectrumWindowResetEvent::~SpectrumWindowResetEvent() { } -SpectrumFrequencyRangeEvent::SpectrumFrequencyRangeEvent(const double centerFreq, +SpectrumFrequencyRangeEvent::SpectrumFrequencyRangeEvent(const double centerFreq, const double startFreq, const double stopFreq) : QEvent(QEvent::Type(10010)) diff --git a/gr-qtgui/lib/spectrumUpdateEvents.h b/gr-qtgui/lib/spectrumUpdateEvents.h index 760619f88..faef0f087 100644 --- a/gr-qtgui/lib/spectrumUpdateEvents.h +++ b/gr-qtgui/lib/spectrumUpdateEvents.h @@ -95,7 +95,7 @@ class TimeUpdateEvent: public QEvent public: TimeUpdateEvent(const std::vector<double*> timeDomainPoints, const uint64_t numTimeDomainDataPoints); - + ~TimeUpdateEvent(); int which() const; diff --git a/gr-qtgui/lib/spectrumdisplayform.cc b/gr-qtgui/lib/spectrumdisplayform.cc index 9fe553557..dd9011dbd 100644 --- a/gr-qtgui/lib/spectrumdisplayform.cc +++ b/gr-qtgui/lib/spectrumdisplayform.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008-2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -41,30 +41,30 @@ SpectrumDisplayForm::SpectrumDisplayForm(QWidget* parent) _realFFTDataPoints = new double[_numRealDataPoints]; _averagedValues = new double[_numRealDataPoints]; _historyVector = new std::vector<double*>; - + _timeDomainDisplayPlot->setTitle(0, "real"); _timeDomainDisplayPlot->setTitle(1, "imag"); AvgLineEdit->setRange(0, 500); // Set range of Average box value from 0 to 500 MinHoldCheckBox_toggled( false ); MaxHoldCheckBox_toggled( false ); - + WaterfallMaximumIntensityWheel->setRange(-200, 0); WaterfallMaximumIntensityWheel->setTickCnt(50); WaterfallMinimumIntensityWheel->setRange(-200, 0); WaterfallMinimumIntensityWheel->setTickCnt(50); WaterfallMinimumIntensityWheel->setValue(-200); - + _peakFrequency = 0; _peakAmplitude = -HUGE_VAL; - + _noiseFloorAmplitude = -HUGE_VAL; - connect(_waterfallDisplayPlot, SIGNAL(UpdatedLowerIntensityLevel(const double)), + connect(_waterfallDisplayPlot, SIGNAL(UpdatedLowerIntensityLevel(const double)), _frequencyDisplayPlot, SLOT(SetLowerIntensityLevel(const double))); - connect(_waterfallDisplayPlot, SIGNAL(UpdatedUpperIntensityLevel(const double)), + connect(_waterfallDisplayPlot, SIGNAL(UpdatedUpperIntensityLevel(const double)), _frequencyDisplayPlot, SLOT(SetUpperIntensityLevel(const double))); - + _frequencyDisplayPlot->SetLowerIntensityLevel(-200); _frequencyDisplayPlot->SetUpperIntensityLevel(-200); @@ -90,13 +90,13 @@ SpectrumDisplayForm::SpectrumDisplayForm(QWidget* parent) // Connect double click signals up connect(_frequencyDisplayPlot, SIGNAL(plotPointSelected(const QPointF)), this, SLOT(onFFTPlotPointSelected(const QPointF))); - + connect(_waterfallDisplayPlot, SIGNAL(plotPointSelected(const QPointF)), this, SLOT(onWFallPlotPointSelected(const QPointF))); - + connect(_timeDomainDisplayPlot, SIGNAL(plotPointSelected(const QPointF)), this, SLOT(onTimePlotPointSelected(const QPointF))); - + connect(_constellationDisplayPlot, SIGNAL(plotPointSelected(const QPointF)), this, SLOT(onConstPlotPointSelected(const QPointF))); } @@ -122,12 +122,12 @@ SpectrumDisplayForm::~SpectrumDisplayForm() } void -SpectrumDisplayForm::setSystem( SpectrumGUIClass * newSystem, - const uint64_t numFFTDataPoints, +SpectrumDisplayForm::setSystem( SpectrumGUIClass * newSystem, + const uint64_t numFFTDataPoints, const uint64_t numTimeDomainDataPoints ) { ResizeBuffers(numFFTDataPoints, numTimeDomainDataPoints); - + if(newSystem != NULL){ _system = newSystem; _systemSpecifiedFlag = true; @@ -179,12 +179,12 @@ SpectrumDisplayForm::newFrequencyData( const SpectrumUpdateEvent* spectrumUpdate localPeakAmplitude = *realFFTDataPointsPtr; } sumMean += *realFFTDataPointsPtr; - + complexDataPointsPtr++; realFFTDataPointsPtr++; } - - // This loop takes the first half of the input data and puts it in the + + // This loop takes the first half of the input data and puts it in the // second half of the plotted data complexDataPointsPtr = complexDataPoints; for(uint64_t point = 0; point < numFFTDataPoints/2; point++){ @@ -233,18 +233,18 @@ SpectrumDisplayForm::newFrequencyData( const SpectrumUpdateEvent* spectrumUpdate if(lastOfMultipleUpdatesFlag){ int tabindex = SpectrumTypeTab->currentIndex(); if(tabindex == d_plot_fft) { - _frequencyDisplayPlot->PlotNewData(_averagedValues, numFFTDataPoints, - _noiseFloorAmplitude, _peakFrequency, + _frequencyDisplayPlot->PlotNewData(_averagedValues, numFFTDataPoints, + _noiseFloorAmplitude, _peakFrequency, _peakAmplitude, d_update_time); } if(tabindex == d_plot_time) { - _timeDomainDisplayPlot->PlotNewData(timeDomainDataPoints, + _timeDomainDisplayPlot->PlotNewData(timeDomainDataPoints, numTimeDomainDataPoints, d_update_time); } if(tabindex == d_plot_constellation) { - _constellationDisplayPlot->PlotNewData(realTimeDomainDataPoints, - imagTimeDomainDataPoints, + _constellationDisplayPlot->PlotNewData(realTimeDomainDataPoints, + imagTimeDomainDataPoints, numTimeDomainDataPoints, d_update_time); } @@ -252,12 +252,12 @@ SpectrumDisplayForm::newFrequencyData( const SpectrumUpdateEvent* spectrumUpdate // Don't update the repeated data for the waterfall if(!repeatDataFlag){ if(tabindex == d_plot_waterfall) { - _waterfallDisplayPlot->PlotNewData(_realFFTDataPoints, numFFTDataPoints, - d_update_time, dataTimestamp, + _waterfallDisplayPlot->PlotNewData(_realFFTDataPoints, numFFTDataPoints, + d_update_time, dataTimestamp, spectrumUpdateEvent->getDroppedFFTFrames()); } } - + // Tell the system the GUI has been updated if(_systemSpecifiedFlag){ _system->SetLastGUIUpdateTime(generatedTimestamp); @@ -381,12 +381,12 @@ void SpectrumDisplayForm::TabChanged(int index) { // This might be dangerous to call this with NULL - resizeEvent(NULL); + resizeEvent(NULL); } void SpectrumDisplayForm::SetFrequencyRange(const double newCenterFrequency, - const double newStartFrequency, + const double newStartFrequency, const double newStopFrequency) { double fdiff; @@ -404,7 +404,7 @@ SpectrumDisplayForm::SetFrequencyRange(const double newCenterFrequency, double units3 = std::max(floor(units10 / 3.0), 0.0); double units = pow(10, (units10-fmod(units10, 3.0))); int iunit = static_cast<int>(units3); - + _startFrequency = newStartFrequency; _stopFrequency = newStopFrequency; _centerFrequency = newCenterFrequency; @@ -491,15 +491,15 @@ SpectrumDisplayForm::ResizeBuffers( const uint64_t numFFTDataPoints, _numRealDataPoints = numFFTDataPoints; delete[] _realFFTDataPoints; delete[] _averagedValues; - + _realFFTDataPoints = new double[_numRealDataPoints]; _averagedValues = new double[_numRealDataPoints]; memset(_realFFTDataPoints, 0x0, _numRealDataPoints*sizeof(double)); - + const int historySize = _historyVector->size(); SetAverageCount(0); // Clear the existing history SetAverageCount(historySize); - + Reset(); } } @@ -622,7 +622,7 @@ SpectrumDisplayForm::WaterfallIntensityColorTypeChanged( int newType ) } QMessageBox::information(this, "Low Intensity Color Selection", "In the next window, select the low intensity color for the waterfall display", QMessageBox::Ok); lowIntensityColor = QColorDialog::getColor(lowIntensityColor, this); - + // Select the High Intensity Color highIntensityColor = _waterfallDisplayPlot->GetUserDefinedHighIntensityColor(); if(!highIntensityColor.isValid()){ @@ -631,7 +631,7 @@ SpectrumDisplayForm::WaterfallIntensityColorTypeChanged( int newType ) QMessageBox::information(this, "High Intensity Color Selection", "In the next window, select the high intensity color for the waterfall display", QMessageBox::Ok); highIntensityColor = QColorDialog::getColor(highIntensityColor, this); } - + _waterfallDisplayPlot->SetIntensityColorMapType(newType, lowIntensityColor, highIntensityColor); } diff --git a/gr-qtgui/lib/spectrumdisplayform.h b/gr-qtgui/lib/spectrumdisplayform.h index 30303a36f..63dd304d5 100644 --- a/gr-qtgui/lib/spectrumdisplayform.h +++ b/gr-qtgui/lib/spectrumdisplayform.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -44,7 +44,7 @@ class SpectrumDisplayForm : public QWidget, public Ui::SpectrumDisplayForm public: SpectrumDisplayForm(QWidget* parent = 0); ~SpectrumDisplayForm(); - + void setSystem( SpectrumGUIClass * newSystem, const uint64_t numFFTDataPoints, const uint64_t numTimeDomainDataPoints ); @@ -54,7 +54,7 @@ class SpectrumDisplayForm : public QWidget, public Ui::SpectrumDisplayForm void AverageDataReset(); void ResizeBuffers( const uint64_t numFFTDataPoints, const uint64_t numTimeDomainDataPoints ); - + public slots: void resizeEvent( QResizeEvent * e ); void customEvent( QEvent * e ); @@ -123,9 +123,9 @@ private: double _peakFrequency; double _peakAmplitude; double _stopFrequency; - + //SpectrumUpdateEvent _lastSpectrumEvent; - + // whether or not to use a particular display int d_plot_fft; int d_plot_waterfall; diff --git a/gr-qtgui/lib/timedisplayform.cc b/gr-qtgui/lib/timedisplayform.cc index cc4ac9951..c650cd3eb 100644 --- a/gr-qtgui/lib/timedisplayform.cc +++ b/gr-qtgui/lib/timedisplayform.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -67,7 +67,7 @@ TimeDisplayForm::newData( const TimeUpdateEvent* spectrumUpdateEvent) { const std::vector<double*> timeDomainDataPoints = spectrumUpdateEvent->getTimeDomainPoints(); const uint64_t numTimeDomainDataPoints = spectrumUpdateEvent->getNumTimeDomainDataPoints(); - + _timeDomainDisplayPlot->PlotNewData(timeDomainDataPoints, numTimeDomainDataPoints, d_update_time); @@ -112,7 +112,7 @@ TimeDisplayForm::onTimePlotPointSelected(const QPointF p) void TimeDisplayForm::setFrequencyRange(const double newCenterFrequency, - const double newStartFrequency, + const double newStartFrequency, const double newStopFrequency) { double fdiff = std::max(fabs(newStartFrequency), fabs(newStopFrequency)); @@ -123,7 +123,7 @@ TimeDisplayForm::setFrequencyRange(const double newCenterFrequency, double units3 = std::max(floor(units10 / 3.0), 0.0); double units = pow(10, (units10-fmod(units10, 3.0))); int iunit = static_cast<int>(units3); - + _startFrequency = newStartFrequency; _stopFrequency = newStopFrequency; diff --git a/gr-qtgui/lib/timedisplayform.h b/gr-qtgui/lib/timedisplayform.h index 1216a1ef5..dd3f62a83 100644 --- a/gr-qtgui/lib/timedisplayform.h +++ b/gr-qtgui/lib/timedisplayform.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -41,9 +41,9 @@ class TimeDisplayForm : public QWidget public: TimeDisplayForm(int nplots=1, QWidget* parent = 0); ~TimeDisplayForm(); - + void Reset(); - + public slots: void resizeEvent( QResizeEvent * e ); void customEvent( QEvent * e ); @@ -77,7 +77,7 @@ private: bool _systemSpecifiedFlag; double _startFrequency; double _stopFrequency; - + QTimer *displayTimer; double d_update_time; }; diff --git a/gr-qtgui/lib/waterfallGlobalData.cc b/gr-qtgui/lib/waterfallGlobalData.cc index 04366a297..f64ed14f1 100644 --- a/gr-qtgui/lib/waterfallGlobalData.cc +++ b/gr-qtgui/lib/waterfallGlobalData.cc @@ -9,15 +9,15 @@ WaterfallData::WaterfallData(const double minimumFrequency, const uint64_t fftPoints, const unsigned int historyExtent) #if QWT_VERSION < 0x060000 - : QwtRasterData(QwtDoubleRect(minimumFrequency /* X START */, 0 /* Y START */, - maximumFrequency - minimumFrequency /* WIDTH */, + : QwtRasterData(QwtDoubleRect(minimumFrequency /* X START */, 0 /* Y START */, + maximumFrequency - minimumFrequency /* WIDTH */, static_cast<double>(historyExtent)/* HEIGHT */)) #else : QwtRasterData() #endif { _intensityRange = QwtDoubleInterval(-200.0, 0.0); - + _fftPoints = fftPoints; _historyLength = historyExtent; @@ -46,7 +46,7 @@ void WaterfallData::Reset() void WaterfallData::Copy(const WaterfallData* rhs) { -#if QWT_VERSION < 0x060000 +#if QWT_VERSION < 0x060000 if((_fftPoints != rhs->GetNumFFTPoints()) || (boundingRect() != rhs->boundingRect()) ){ _fftPoints = rhs->GetNumFFTPoints(); @@ -66,24 +66,24 @@ void WaterfallData::Copy(const WaterfallData* rhs) SetSpectrumDataBuffer(rhs->GetSpectrumDataBuffer()); SetNumLinesToUpdate(rhs->GetNumLinesToUpdate()); -#if QWT_VERSION < 0x060000 +#if QWT_VERSION < 0x060000 setRange(rhs->range()); #else setInterval(Qt::XAxis, rhs->interval(Qt::XAxis)); setInterval(Qt::YAxis, rhs->interval(Qt::YAxis)); setInterval(Qt::ZAxis, rhs->interval(Qt::ZAxis)); -#endif +#endif } void WaterfallData::ResizeData(const double startFreq, const double stopFreq, const uint64_t fftPoints) { -#if QWT_VERSION < 0x060000 +#if QWT_VERSION < 0x060000 if((fftPoints != GetNumFFTPoints()) || (boundingRect().width() != (stopFreq - startFreq)) || (boundingRect().left() != startFreq)){ - + setBoundingRect(QwtDoubleRect(startFreq, 0, stopFreq-startFreq, boundingRect().height())); @@ -96,7 +96,7 @@ void WaterfallData::ResizeData(const double startFreq, if((fftPoints != GetNumFFTPoints()) || (interval(Qt::XAxis).width() != (stopFreq - startFreq)) || (interval(Qt::XAxis).minValue() != startFreq)){ - + setInterval(Qt::XAxis, QwtInterval(startFreq, stopFreq)); _fftPoints = fftPoints; @@ -104,13 +104,13 @@ void WaterfallData::ResizeData(const double startFreq, _spectrumData = new double[_fftPoints * _historyLength]; } #endif - + Reset(); } QwtRasterData *WaterfallData::copy() const { -#if QWT_VERSION < 0x060000 +#if QWT_VERSION < 0x060000 WaterfallData* returnData = new WaterfallData(boundingRect().left(), boundingRect().right(), _fftPoints, _historyLength); @@ -142,11 +142,11 @@ void WaterfallData::setRange(const QwtDoubleInterval& newRange) double WaterfallData::value(double x, double y) const { double returnValue = 0.0; - + #if QWT_VERSION < 0x060000 - const unsigned int intY = static_cast<unsigned int>((1.0 - (y/boundingRect().height())) * + const unsigned int intY = static_cast<unsigned int>((1.0 - (y/boundingRect().height())) * static_cast<double>(_historyLength-1)); - const unsigned int intX = static_cast<unsigned int>((((x - boundingRect().left()) / boundingRect().width()) * + const unsigned int intX = static_cast<unsigned int>((((x - boundingRect().left()) / boundingRect().width()) * static_cast<double>(_fftPoints-1)) + 0.5); #else double height = interval(Qt::YAxis).maxValue(); @@ -183,7 +183,7 @@ void WaterfallData::addFFTData(const double* fftData, heightOffset = 0; drawingDroppedFrames = static_cast<uint64_t>(_historyLength-1); } - + // Copy the old data over if any available if(heightOffset > 0){ memmove( _spectrumData, &_spectrumData[(drawingDroppedFrames+1) * _fftPoints], diff --git a/gr-qtgui/lib/waterfallGlobalData.h b/gr-qtgui/lib/waterfallGlobalData.h index 89e48da5f..928c3b175 100644 --- a/gr-qtgui/lib/waterfallGlobalData.h +++ b/gr-qtgui/lib/waterfallGlobalData.h @@ -14,12 +14,12 @@ class WaterfallData: public QwtRasterData public: WaterfallData(const double, const double, const uint64_t, const unsigned int); virtual ~WaterfallData(); - + virtual void Reset(); virtual void Copy(const WaterfallData*); - + virtual void ResizeData(const double, const double, const uint64_t); - + virtual QwtRasterData *copy() const; #if QWT_VERSION < 0x060000 @@ -28,13 +28,13 @@ public: #endif virtual double value(double x, double y) const; - + virtual uint64_t GetNumFFTPoints()const; virtual void addFFTData(const double*, const uint64_t, const int); - + virtual double* GetSpectrumDataBuffer()const; virtual void SetSpectrumDataBuffer(const double*); - + virtual int GetNumLinesToUpdate()const; virtual void SetNumLinesToUpdate(const int); virtual void IncrementNumLinesToUpdate(); diff --git a/gr-qtgui/python/.gitignore b/gr-qtgui/python/.gitignore deleted file mode 100644 index 604b402c5..000000000 --- a/gr-qtgui/python/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -/run_tests diff --git a/gr-qtgui/python/Makefile.am b/gr-qtgui/python/Makefile.am deleted file mode 100644 index f1bdf359b..000000000 --- a/gr-qtgui/python/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -# -# 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 $(top_srcdir)/Makefile.common - -TESTS = -EXTRA_DIST += run_tests.in - -if PYTHON -TESTS += run_tests -DISTCLEANFILES += run_tests - -qtguipythondir = $(grpythondir)/qtgui - -noinst_PYTHON = \ - qa_qtgui.py - -qtguipython_PYTHON = \ - __init__.py -endif diff --git a/gr-qtgui/python/__init__.py b/gr-qtgui/python/__init__.py index 236f211b1..c7024e4f7 100644 --- a/gr-qtgui/python/__init__.py +++ b/gr-qtgui/python/__init__.py @@ -1,23 +1,23 @@ # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# ''' This is the gr-qtgui package. This package includes QT-based graphical diff --git a/gr-qtgui/python/qa_qtgui.py b/gr-qtgui/python/qa_qtgui.py index 9cafd4550..562706701 100755 --- a/gr-qtgui/python/qa_qtgui.py +++ b/gr-qtgui/python/qa_qtgui.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest import qtgui_swig @@ -30,19 +30,19 @@ class test_qtgui(gr_unittest.TestCase): def tearDown (self): self.tb = None - + def test01 (self): # Test to make sure we can instantiate the sink - self.qtsnk = qtgui_swig.sink_c(1024, gr.firdes.WIN_BLACKMAN_hARRIS, + self.qtsnk = qtgui_swig.sink_c(1024, gr.firdes.WIN_BLACKMAN_hARRIS, 0, 1, "Test", True, True, True, True) def test02 (self): # Test to make sure we can instantiate the sink - self.qtsnk = qtgui_swig.sink_f(1024, gr.firdes.WIN_BLACKMAN_hARRIS, + self.qtsnk = qtgui_swig.sink_f(1024, gr.firdes.WIN_BLACKMAN_hARRIS, 0, 1, "Test", True, True, True, True) - - + + if __name__ == '__main__': gr_unittest.run(test_qtgui, "test_qtgui.xml") diff --git a/gr-qtgui/python/run_tests.in b/gr-qtgui/python/run_tests.in deleted file mode 100644 index 909194752..000000000 --- a/gr-qtgui/python/run_tests.in +++ /dev/null @@ -1,10 +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 - -@top_builddir@/run_tests.sh \ - @abs_top_srcdir@/gr-qtgui \ - @abs_top_builddir@/gr-qtgui \ - @srcdir@ diff --git a/gr-qtgui/swig/.gitignore b/gr-qtgui/swig/.gitignore deleted file mode 100644 index 26647d4c1..000000000 --- a/gr-qtgui/swig/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -Makefile -Makefile.in -/qtgui_swig.py -/python diff --git a/gr-qtgui/swig/CMakeLists.txt b/gr-qtgui/swig/CMakeLists.txt index 7a976f917..9f092f6c6 100644 --- a/gr-qtgui/swig/CMakeLists.txt +++ b/gr-qtgui/swig/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2010-2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-qtgui/swig/Makefile.am b/gr-qtgui/swig/Makefile.am deleted file mode 100644 index cda2620b5..000000000 --- a/gr-qtgui/swig/Makefile.am +++ /dev/null @@ -1,73 +0,0 @@ -# -# Copyright 2004-2006,2008-2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common -include $(top_srcdir)/Makefile.swig - -TESTS = -EXTRA_DIST += $(nobase_guile_DATA) - -AM_CPPFLAGS = \ - -I$(top_srcdir)/gr-qtgui/lib \ - -I$(top_builddir)/gr-qtgui/lib \ - $(STD_DEFINES_AND_INCLUDES) \ - $(PYTHON_CPPFLAGS) \ - $(QT_INCLUDES) \ - $(GR_QTGUI_INCLUDES) \ - $(WITH_INCLUDES) - -############################## -# SWIG interface and library - -TOP_SWIG_DOC_IFILES = \ - qtgui_swig_doc.i - -TOP_SWIG_IFILES = \ - $(TOP_SWIG_DOC_IFILES) \ - qtgui_swig.i - -BUILT_SOURCES += \ - $(TOP_SWIG_DOC_IFILES) - -EXTRA_DIST += \ - $(TOP_SWIG_DOC_IFILES) - -$(TOP_SWIG_DOC_IFILES): - `echo "" > $@` - -# Install so that they end up available as: -# import gnuradio.qtgui -# This ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio/qtgui -qtgui_swig_pythondir_category = \ - gnuradio/qtgui - -# additional libraries for linking with the SWIG-generated library -qtgui_swig_la_swig_libadd = \ - $(abs_top_builddir)/gr-qtgui/lib/libgnuradio-qtgui.la - -# additional SWIG files to be installed -qtgui_swig_swiginclude_headers = \ - qtgui_sink_c.i \ - qtgui_sink_f.i \ - qtgui_time_sink_c.i \ - qtgui_time_sink_f.i \ - $(TOP_SWIG_DOC_IFILES) diff --git a/gr-qtgui/swig/Makefile.swig.gen b/gr-qtgui/swig/Makefile.swig.gen deleted file mode 100644 index e343db374..000000000 --- a/gr-qtgui/swig/Makefile.swig.gen +++ /dev/null @@ -1,145 +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 qtgui_swig.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/qtgui_swig -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/qtgui_swig -## -## 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. - -qtgui_swig_pythondir_category ?= gnuradio/qtgui_swig -qtgui_swig_pylibdir_category ?= $(qtgui_swig_pythondir_category) -qtgui_swig_pythondir = $(pythondir)/$(qtgui_swig_pythondir_category) -qtgui_swig_pylibdir = $(pyexecdir)/$(qtgui_swig_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -qtgui_swig_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/qtgui_swig -# FIXME: determince whether these should be installed with gnuradio. -qtgui_swig_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -qtgui_swig_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 > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -qtgui_swig_swiginclude_HEADERS = \ - qtgui_swig.i \ - $(qtgui_swig_swiginclude_headers) - -if PYTHON -qtgui_swig_pylib_LTLIBRARIES = \ - _qtgui_swig.la - -_qtgui_swig_la_SOURCES = \ - python/qtgui_swig.cc \ - $(qtgui_swig_la_swig_sources) - -qtgui_swig_python_PYTHON = \ - qtgui_swig.py \ - $(qtgui_swig_python) - -_qtgui_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(qtgui_swig_la_swig_libadd) - -_qtgui_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(qtgui_swig_la_swig_ldflags) - -_qtgui_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(qtgui_swig_la_swig_cxxflags) - -python/qtgui_swig.cc: qtgui_swig.py -qtgui_swig.py: qtgui_swig.i - -# Include the python dependencies for this file --include python/qtgui_swig.d - -endif # end of if python - -if GUILE - -qtgui_swig_scmlib_LTLIBRARIES = \ - libguile-gnuradio-qtgui_swig.la -libguile_gnuradio_qtgui_swig_la_SOURCES = \ - guile/qtgui_swig.cc \ - $(qtgui_swig_la_swig_sources) -nobase_qtgui_swig_scm_DATA = \ - gnuradio/qtgui_swig.scm \ - gnuradio/qtgui_swig-primitive.scm -libguile_gnuradio_qtgui_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(qtgui_swig_la_swig_libadd) -libguile_gnuradio_qtgui_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(qtgui_swig_la_swig_ldflags) -libguile_gnuradio_qtgui_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(qtgui_swig_la_swig_cxxflags) - -guile/qtgui_swig.cc: gnuradio/qtgui_swig.scm -gnuradio/qtgui_swig.scm: qtgui_swig.i -gnuradio/qtgui_swig-primitive.scm: gnuradio/qtgui_swig.scm - -# Include the guile dependencies for this file --include guile/qtgui_swig.d - -endif # end of GUILE - - diff --git a/gr-qtgui/swig/__init__.py b/gr-qtgui/swig/__init__.py index 3986f2513..e52e326cb 100644 --- a/gr-qtgui/swig/__init__.py +++ b/gr-qtgui/swig/__init__.py @@ -1,23 +1,23 @@ # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# # The presence of this file turns this directory into a Python package diff --git a/gr-qtgui/swig/qtgui_sink_c.i b/gr-qtgui/swig/qtgui_sink_c.i index ff6241482..65e7d1c82 100644 --- a/gr-qtgui/swig/qtgui_sink_c.i +++ b/gr-qtgui/swig/qtgui_sink_c.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -50,7 +50,7 @@ private: bool plotfreq, bool plotwaterfall, bool plottime, bool plotconst, QWidget *parent); - + public: void exec_(); PyObject* pyqwidget(); diff --git a/gr-qtgui/swig/qtgui_sink_f.i b/gr-qtgui/swig/qtgui_sink_f.i index a34420461..b07eaa9ec 100644 --- a/gr-qtgui/swig/qtgui_sink_f.i +++ b/gr-qtgui/swig/qtgui_sink_f.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -27,7 +27,7 @@ %} GR_SWIG_BLOCK_MAGIC(qtgui,sink_f) - + qtgui_sink_f_sptr qtgui_make_sink_f (int fftsize, int wintype, double fc=0, double bw=0.0, const std::string &name="Display", diff --git a/gr-qtgui/swig/qtgui_swig.i b/gr-qtgui/swig/qtgui_swig.i index 6e5f6e124..0d77e22da 100644 --- a/gr-qtgui/swig/qtgui_swig.i +++ b/gr-qtgui/swig/qtgui_swig.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-qtgui/swig/qtgui_time_sink_c.i b/gr-qtgui/swig/qtgui_time_sink_c.i index e7240aa69..b78ca5386 100644 --- a/gr-qtgui/swig/qtgui_time_sink_c.i +++ b/gr-qtgui/swig/qtgui_time_sink_c.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -44,7 +44,7 @@ private: const std::string &name, int nconnections, QWidget *parent=NULL); - + public: void exec_(); PyObject* pyqwidget(); diff --git a/gr-qtgui/swig/qtgui_time_sink_f.i b/gr-qtgui/swig/qtgui_time_sink_f.i index 06af42da3..9d59f9364 100644 --- a/gr-qtgui/swig/qtgui_time_sink_f.i +++ b/gr-qtgui/swig/qtgui_time_sink_f.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -44,7 +44,7 @@ private: const std::string &name, int nconnections, QWidget *parent=NULL); - + public: void exec_(); PyObject* pyqwidget(); diff --git a/gr-run-waveform/.gitignore b/gr-run-waveform/.gitignore deleted file mode 100644 index c0589f649..000000000 --- a/gr-run-waveform/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -aclocal.m4 -autom4te.cache -depcomp -grconfig.h.in -install-sh -ltmain.sh -missing -configure -Makefile.in -compile -config/libtool.m4 -config/ltoptions.m4 -config/ltsugar.m4 -config/ltversion.m4 -config/lt~obsolete.m4 diff --git a/gr-run-waveform/AUTHORS b/gr-run-waveform/AUTHORS deleted file mode 100644 index e69de29bb..000000000 --- a/gr-run-waveform/AUTHORS +++ /dev/null diff --git a/gr-run-waveform/COPYING b/gr-run-waveform/COPYING deleted file mode 100644 index 94a9ed024..000000000 --- a/gr-run-waveform/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - 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/>. - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - <program> Copyright (C) <year> <name of author> - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -<http://www.gnu.org/licenses/>. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -<http://www.gnu.org/philosophy/why-not-lgpl.html>. diff --git a/gr-run-waveform/ChangeLog b/gr-run-waveform/ChangeLog deleted file mode 100644 index e69de29bb..000000000 --- a/gr-run-waveform/ChangeLog +++ /dev/null diff --git a/gr-run-waveform/INSTALL b/gr-run-waveform/INSTALL deleted file mode 100644 index 7d1c323be..000000000 --- a/gr-run-waveform/INSTALL +++ /dev/null @@ -1,365 +0,0 @@ -Installation Instructions -************************* - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008, 2009 Free Software Foundation, Inc. - - Copying and distribution of this file, with or without modification, -are permitted in any medium without royalty provided the copyright -notice and this notice are preserved. This file is offered as-is, -without warranty of any kind. - -Basic Installation -================== - - Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following -more-detailed instructions are generic; see the `README' file for -instructions specific to this package. Some packages provide this -`INSTALL' file but do not implement all of the features documented -below. The lack of an optional feature in a given package is not -necessarily a bug. More recommendations for GNU packages can be found -in *note Makefile Conventions: (standards)Makefile Conventions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. Caching is -disabled by default to prevent problems with accidental use of stale -cache files. - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You need `configure.ac' if -you want to change it or regenerate `configure' using a newer version -of `autoconf'. - - The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. - - Running `configure' might take a while. While running, it prints - some messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package, generally using the just-built uninstalled binaries. - - 4. Type `make install' to install the programs and any data files and - documentation. When installing into a prefix owned by root, it is - recommended that the package be configured and built as a regular - user, and only the `make install' phase executed with root - privileges. - - 5. Optionally, type `make installcheck' to repeat any self-tests, but - this time using the binaries in their final installed location. - This target does not install anything. Running this target as a - regular user, particularly if the prior `make install' required - root privileges, verifies that the installation completed - correctly. - - 6. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - - 7. Often, you can also type `make uninstall' to remove the installed - files again. In practice, not all packages have tested that - uninstallation works correctly, even though it is required by the - GNU Coding Standards. - - 8. Some packages, particularly those that use Automake, provide `make - distcheck', which can by used by developers to test that all other - targets like `make install' and `make uninstall' work correctly. - This target is generally not run by end users. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' -for details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c99 CFLAGS=-g LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you can use GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. This -is known as a "VPATH" build. - - With a non-GNU `make', it is safer to compile the package for one -architecture at a time in the source code directory. After you have -installed the package for one architecture, use `make distclean' before -reconfiguring for another architecture. - - On MacOS X 10.5 and later systems, you can create libraries and -executables that work on multiple system types--known as "fat" or -"universal" binaries--by specifying multiple `-arch' options to the -compiler but only a single `-arch' option to the preprocessor. Like -this: - - ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CPP="gcc -E" CXXCPP="g++ -E" - - This is not guaranteed to produce working output in all cases, you -may have to build one architecture at a time and combine the results -using the `lipo' tool if you have problems. - -Installation Names -================== - - By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX', where PREFIX must be an -absolute file name. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. In general, the -default for these options is expressed in terms of `${prefix}', so that -specifying just `--prefix' will affect all of the other directory -specifications that were not explicitly provided. - - The most portable way to affect installation locations is to pass the -correct locations to `configure'; however, many packages provide one or -both of the following shortcuts of passing variable assignments to the -`make install' command line to change installation locations without -having to reconfigure or recompile. - - The first method involves providing an override variable for each -affected directory. For example, `make install -prefix=/alternate/directory' will choose an alternate location for all -directory configuration variables that were expressed in terms of -`${prefix}'. Any directories that were specified during `configure', -but not in terms of `${prefix}', must each be overridden at install -time for the entire installation to be relocated. The approach of -makefile variable overrides for each directory variable is required by -the GNU Coding Standards, and ideally causes no recompilation. -However, some platforms have known limitations with the semantics of -shared libraries that end up requiring recompilation when using this -method, particularly noticeable in packages that use GNU Libtool. - - The second method involves providing the `DESTDIR' variable. For -example, `make install DESTDIR=/alternate/directory' will prepend -`/alternate/directory' before all installation names. The approach of -`DESTDIR' overrides is not required by the GNU Coding Standards, and -does not work on platforms that have drive letters. On the other hand, -it does better at avoiding recompilation issues, and works well even -when some directory options were not specified in terms of `${prefix}' -at `configure' time. - -Optional Features -================= - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - - Some packages offer the ability to configure how verbose the -execution of `make' will be. For these packages, running `./configure ---enable-silent-rules' sets the default to minimal output, which can be -overridden with `make V=1'; while running `./configure ---disable-silent-rules' sets the default to verbose, which can be -overridden with `make V=0'. - -Particular systems -================== - - On HP-UX, the default C compiler is not ANSI C compatible. If GNU -CC is not installed, it is recommended to use the following options in -order to use an ANSI C compiler: - - ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" - -and if that doesn't work, install pre-built binaries of GCC for HP-UX. - - On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot -parse its `<wchar.h>' header file. The option `-nodtk' can be used as -a workaround. If GNU CC is not installed, it is therefore recommended -to try - - ./configure CC="cc" - -and if that doesn't work, try - - ./configure CC="cc -nodtk" - - On Solaris, don't put `/usr/ucb' early in your `PATH'. This -directory contains several dysfunctional programs; working variants of -these programs are available in `/usr/bin'. So, if you need `/usr/ucb' -in your `PATH', put it _after_ `/usr/bin'. - - On Haiku, software installed for all users goes in `/boot/common', -not `/usr/local'. It is recommended to use the following options: - - ./configure --prefix=/boot/common - -Specifying the System Type -========================== - - There may be some features `configure' cannot figure out -automatically, but needs to determine by the type of machine the package -will run on. Usually, assuming the package is built to be run on the -_same_ architectures, `configure' can figure that out, but if it prints -a message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS - KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - - Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). - -Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: - - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash - -`configure' Invocation -====================== - - `configure' recognizes the following options to control how it -operates. - -`--help' -`-h' - Print a summary of all of the options to `configure', and exit. - -`--help=short' -`--help=recursive' - Print a summary of the options unique to this package's - `configure', and exit. The `short' variant lists options used - only in the top level, while the `recursive' variant lists options - also present in any nested packages. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`--prefix=DIR' - Use DIR as the installation prefix. *note Installation Names:: - for more details, including other options available for fine-tuning - the installation locations. - -`--no-create' -`-n' - Run the configure checks, but stop before creating any output - files. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/gr-run-waveform/Makefile.am b/gr-run-waveform/Makefile.am deleted file mode 100644 index 75a05294d..000000000 --- a/gr-run-waveform/Makefile.am +++ /dev/null @@ -1,136 +0,0 @@ -# -# Copyright 2004,2008,2009,2010 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. -# - -ACLOCAL_AMFLAGS = -I config -SUBDIRS = config -EXTRA_DIST = gen-xyzzy \ - guile/readline.scm \ - guile/cat.scm \ - guile/simple.scm - -# build the standalone waveform application -bin_PROGRAMS = gr-run-waveform-binary - -# Rather than build a library, we just use a variable so the same code -# can be used in test cases, as well as the run-waveform application. -SRCS = xyzzy.cc xyzzy-load.c - -# This is where the data file created by gen-xyzzy gets installed. This file -# is needed by run-waveform and the test case. -filesystemdir = $(datarootdir)/gnuradio/gr-run-waveform - -# libpath is to support xyzzy-load.cc, filesystem.dat is the data file -BUILT_SOURCES = libpath.h filesystem.dat -dist_filesystem_DATA = filesystem.dat - -# A unit test case for the XYZZY class -check_PROGRAMS = test_xyzzy test_embed -test_xyzzy_SOURCES = test_xyzzy.cc xyzzy.cc xyzzy-load.c -test_xyzzy_CPPFLAGS = $(GUILE_CFLAGS) \ - -DSRCDIR=\"$(srcdir)\" \ - -DDATAROOTDIR=\"$(datarootdir)\" -test_xyzzy_LDADD = $(GUILE_LIBS) -test_xyzzy_DEPENDENCIES = $(BUILT_SOURCES) - -test_embed_SOURCES = test_embed.cc $(SRCS) -test_embed_CPPFLAGS = $(GUILE_CFLAGS) \ - -DSRCDIR=\"$(srcdir)\" \ - -DPKGLIBDIR=\"$(pkglibdir)\" \ - -DDATAROOTDIR=\"$(datarootdir)\" \ - -DLIBDIR=\"$(libdir)\" - -test_embed_LDADD = $(GUILE_LIBS) -test_embed_DEPENDENCIES = $(BUILT_SOURCES) - -# Don't install the internal header -noinst_HEADERS = xyzzy.h - -# The standalone waveform application -gr_run_waveform_binary_SOURCES = gr-run-waveform-binary.cc $(SRCS) -gr_run_waveform_binary_CPPFLAGS = $(GUILE_CFLAGS) \ - -DSRCDIR=\"$(srcdir)\" \ - -DPKGLIBDIR=\"$(pkglibdir)\" \ - -DDATAROOTDIR=\"$(datarootdir)\" \ - -DLIBDIR=\"$(libdir)\" -# Uncommenting this force make to statically link in the guile library. -# Note that this will fail to link it you don't have libguile.a. -# run_waveform_LDFLAGS = -static -gr_run_waveform_binary_LDADD = $(GUILE_LIBS) -gr_run_waveform_binary_DEPENDENCIES = $(BUILT_SOURCES) - -DISTCLEANFILES = gr-run-waveform.tar.gz libpath.h filesystem.dat - -libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status - @echo "Generating libpath.h..." - @rm -f libpath.tmp - @echo '/* generated by Makefile */' > libpath.tmp - @echo '#define SCM_PKGDATA_DIR "$(pkgdatadir)"' >> libpath.tmp - @echo '#define SCM_LIBRARY_DIR "$(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION)"'>>libpath.tmp - @echo '#define SCM_SITE_DIR "$(pkgdatadir)/site"' >> libpath.tmp - @echo '#define SCM_BUILD_INFO { \' >> libpath.tmp - @echo ' { "srcdir", "'"`cd @srcdir@; pwd`"'" }, \' >> libpath.tmp - @echo ' { "top_srcdir", "@abs_top_srcdir@" }, \' >> libpath.tmp - @echo ' { "prefix", "@prefix@" }, \' >> libpath.tmp - @echo ' { "exec_prefix", "@exec_prefix@" }, \' >> libpath.tmp - @echo ' { "bindir", "@bindir@" }, \' >> libpath.tmp - @echo ' { "sbindir", "@sbindir@" }, \' >> libpath.tmp - @echo ' { "libexecdir", "@libexecdir@" }, \' >> libpath.tmp - @echo ' { "datadir", "@datadir@" }, \' >> libpath.tmp - @echo ' { "sysconfdir", "@sysconfdir@" }, \' >> libpath.tmp - @echo ' { "sharedstatedir", "@sharedstatedir@" }, \' >> libpath.tmp - @echo ' { "localstatedir", "@localstatedir@" }, \' >> libpath.tmp - @echo ' { "libdir", "@libdir@" }, \' >> libpath.tmp - @echo ' { "infodir", "@infodir@" }, \' >> libpath.tmp - @echo ' { "mandir", "@mandir@" }, \' >> libpath.tmp - @echo ' { "includedir", "@includedir@" }, \' >> libpath.tmp - @echo ' { "pkgdatadir", "$(datadir)/@PACKAGE@" }, \' >> libpath.tmp - @echo ' { "pkglibdir", "$(libdir)/@PACKAGE@" }, \' >> libpath.tmp - @echo ' { "pkgincludedir", "$(includedir)/@PACKAGE@" }, \' \ - >> libpath.tmp - @echo ' { "guileversion", "@GUILE_VERSION@" }, \' >> libpath.tmp - @echo ' { "libguileinterface", "@LIBGUILE_INTERFACE@" }, \' \ - >> libpath.tmp - @echo ' { "LIBS", "@GUILE_LIBS@" }, \' >> libpath.tmp - @echo ' { "CFLAGS", "@GUILE_CFLAGS@" }, \' >> libpath.tmp - @echo ' { "buildstamp", "'"`date`"'" }, \' >> libpath.tmp - @echo '}' >> libpath.tmp - @mv libpath.tmp libpath.h - -# Typical usage: -# gen-xyzzy -o filesystem.dat /usr/share/guile/1.8 /usr/local/share/guile/site -# Where /usr/share/guile points to the system guile installation and -# /usr/local/share/guile/site points to the GNU Radio installed guile files. Note -# that this requires GNU Radio to be installed before the outout will be correct. -filesystem.dat: - -$(RM) -f filesystem.dat - echo $(PYTHON) $(srcdir)/gen-xyzzy $(GUILE_INSTALL_PATH) $(datarootdir)/guile/site > filesystem.dat - $(PYTHON) $(srcdir)/gen-xyzzy $(GUILE_INSTALL_PATH) $(datarootdir)/guile/site > filesystem.dat - -CLEANFILES = filesystem.dat - - -# Create a symlink from gr-run-waveform-binary to gr-run-waveform -install-exec-local: - -$(RM) $(DESTDIR)$(bindir)/gr-run-waveform - (cd $(DESTDIR)$(bindir) && $(LN_S) gr-run-waveform-binary gr-run-waveform) - -uninstall-local: - -$(RM) $(DESTDIR)$(bindir)/gr-run-waveform diff --git a/gr-run-waveform/NEWS b/gr-run-waveform/NEWS deleted file mode 100644 index e69de29bb..000000000 --- a/gr-run-waveform/NEWS +++ /dev/null diff --git a/gr-run-waveform/README b/gr-run-waveform/README deleted file mode 100644 index e69de29bb..000000000 --- a/gr-run-waveform/README +++ /dev/null diff --git a/gr-run-waveform/bootstrap b/gr-run-waveform/bootstrap deleted file mode 100755 index 2412a7a82..000000000 --- a/gr-run-waveform/bootstrap +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -# Copyright 2001,2005,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. - - -rm -fr config.cache autom4te*.cache - -aclocal -I config -autoconf -autoheader -libtoolize --automake -c -f -automake --add-missing -c -f -Wno-portability diff --git a/gr-run-waveform/config.guess b/gr-run-waveform/config.guess deleted file mode 100755 index dc84c68ef..000000000 --- a/gr-run-waveform/config.guess +++ /dev/null @@ -1,1501 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. - -timestamp='2009-11-20' - -# This file 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 2 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. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to <config-patches@gnu.org> and include a ChangeLog -# entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to <config-patches@gnu.org>." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include <stdio.h> /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include <sys/systemcfg.h> - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include <stdlib.h> - #include <unistd.h> - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include <unistd.h> - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` - echo ${UNAME_MACHINE}-pc-isc$UNAME_REL - elif /bin/uname -X 2>/dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says <Richard.M.Bartel@ccMail.Census.GOV> - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes <hewes@openmarket.com>. - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c <<EOF -#ifdef _SEQUENT_ -# include <sys/types.h> -# include <sys/utsname.h> -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include <sys/param.h> - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include <sys/param.h> -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 <<EOF -$0: unable to guess system type - -This script, last modified $timestamp, has failed to recognize -the operating system you are using. It is advised that you -download the most up to date version of the config scripts from - - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD -and - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -If the version you run ($0) is already up to date, please -send the following data and any information you think might be -pertinent to <config-patches@gnu.org> in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/gr-run-waveform/config.sub b/gr-run-waveform/config.sub deleted file mode 100755 index 2a55a5075..000000000 --- a/gr-run-waveform/config.sub +++ /dev/null @@ -1,1705 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. - -timestamp='2009-11-20' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file 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 2 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. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to <config-patches@gnu.org>. Submit a context -# diff and a properly formatted GNU ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to <config-patches@gnu.org>." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze) - basic_machine=microblaze-xilinx - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/gr-run-waveform/config/Makefile.am b/gr-run-waveform/config/Makefile.am deleted file mode 100644 index 6eedc33b8..000000000 --- a/gr-run-waveform/config/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright 2010 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, see <http://www.gnu.org/licenses/>. -# - -EXTRA_DIST = \ - gr_guile.m4 \ - gr_lib64.m4 \ - libtool.m4 \ - ltoptions.m4 \ - ltsugar.m4 \ - ltversion.m4 \ - lt~obsolete.m4 diff --git a/gr-run-waveform/config/gr_guile.m4 b/gr-run-waveform/config/gr_guile.m4 deleted file mode 100644 index afa1f240b..000000000 --- a/gr-run-waveform/config/gr_guile.m4 +++ /dev/null @@ -1,76 +0,0 @@ -dnl -dnl Copyright 2003,2004,2005 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. -dnl - -# GUILE_DEVEL() -# -# Checks for Guile and tries to get the include path to 'Guile.h'. -# It sets the $(GUILE_CPPFLAGS), $(GUILE_LDFLAGS) and $(guiledir) output variables, -# -AC_DEFUN([GUILE_DEVEL],[ - dnl see if GUILE is installed - AC_PATH_PROG(GUILE, guile) - dnl get the config program - AC_PATH_PROG(GUILE_CONFIG, guile-config) - if test x${GUILE_CONFIG} != x; then - GUILE_CFLAGS="`${GUILE_CONFIG} compile`" - GUILE_LIBS="`${GUILE_CONFIG} link`" - GUILE_PKLIBDIR="`${GUILE_CONFIG} info pkglibdir`" - GUILE_PKDATADIR="`${GUILE_CONFIG} info pkgdatadir`/site" - GUILE_VERSION="`${GUILE_CONFIG} info guileversion`" - LIBGUILE_INTERFACE="`${GUILE_CONFIG} info libguileinterface`" - - dnl This path is used by gen-xyzzy - version="`echo ${GUILE_VERSION} | cut -d '.' -f 1-2`" - GUILE_INSTALL_PATH="`${GUILE_CONFIG} info pkgdatadir`/${version}" - else - GUILE_CFLAGS="" - GUILE_PKLIBDIR="" - GUILE_LIBS="Wl,-Bsymbolic-functions -lguile -lgmp -lcrypt" - fi - AC_SUBST(GUILE_CFLAGS) - AC_SUBST(GUILE_PKLIBDIR) - AC_SUBST(GUILE_PKDATADIR) - AC_SUBST(GUILE_LIBS) - AC_SUBST(GUILE_INSTALL_PATH) - - dnl These are used in libpath.h - AC_SUBST(GUILE_VERSION) - AC_SUBST(LIBGUILE_INTERFACE) -]) - -# GUILE_CHECK_MODULE -# -# Determines if a particular Guile module can be imported -# -# $1 - module name -# $2 - module description -# $3 - action if found -# $4 - action if not found -# $5 - test command - -AC_DEFUN([GUILE_CHECK_MODULE],[ - AC_MSG_CHECKING([for $2]) - dnl ######################################## - dnl # import and test checking - dnl ######################################## - dnl if test x${enable_guile} = xyes; then - dnl fi -]) diff --git a/gr-run-waveform/config/gr_lib64.m4 b/gr-run-waveform/config/gr_lib64.m4 deleted file mode 100644 index 751f774b4..000000000 --- a/gr-run-waveform/config/gr_lib64.m4 +++ /dev/null @@ -1,85 +0,0 @@ -dnl -dnl Copyright 2005,2008 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. -dnl - -dnl GR_LIB64() -dnl -dnl Checks to see if we're on a x86_64 or powerpc64 machine, and if so, determine -dnl if libdir should end in "64" or not. -dnl -dnl Sets gr_libdir_suffix to "" or "64" and calls AC_SUBST(gr_libdir_suffix) -dnl May append "64" to libdir. -dnl -dnl The current heuristic is: -dnl if the host_cpu isn't x86_64 or powerpc64, then "" -dnl if the host_os isn't linux, then "" -dnl if we're cross-compiling, ask the linker, by way of the selected compiler -dnl if we're x86_64 and there's a /lib64 and it's not a symlink, then "64", else "" -dnl else ask the compiler -dnl -AC_DEFUN([GR_LIB64],[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AC_PROG_CXX]) - - AC_MSG_CHECKING([gr_libdir_suffix]) - gr_libdir_suffix="" - AC_SUBST(gr_libdir_suffix) - - case "$host_os" in - linux*) is_linux=yes ;; - *) is_linux=no ;; - esac - - if test "$is_linux" = no || test "$host_cpu" != "x86_64" && test "$host_cpu" != "powerpc64"; then - gr_libdir_suffix="" - elif test "$cross_compiling" = yes; then - _GR_LIB64_ASK_COMPILER - elif test "$host_cpu" = "x86_64"; then - if test -d /lib64 && test ! -L /lib64; then - gr_libdir_suffix=64 - fi - else - _GR_LIB64_ASK_COMPILER - fi - AC_MSG_RESULT([$gr_libdir_suffix]) - - - AC_MSG_CHECKING([whether to append 64 to libdir]) - t=${libdir##*/lib} - if test "$t" != 64 && test "$gr_libdir_suffix" = "64"; then - libdir=${libdir}64 - AC_MSG_RESULT([yes. Setting libdir to $libdir]) - else - AC_MSG_RESULT([no]) - fi -]) - -dnl If we're using g++, extract the first SEARCH_DIR("...") entry from the linker script -dnl and see if it contains a suffix after the final .../lib part of the path. -dnl (This works because the linker script varies depending on whether we're generating -dnl 32-bit or 64-bit executables) -dnl -AC_DEFUN([_GR_LIB64_ASK_COMPILER],[ - if test "$ac_cv_cxx_compiler_gnu" = "yes"; - then - gr_libdir_suffix=`$CXX -Wl,--verbose 2>/dev/null | sed -n -e '/SEARCH_DIR/{s/;.*$//; s,^.*/,,; s/".*$//; s/^lib//; p}'` - fi -]) - diff --git a/gr-run-waveform/configure.ac b/gr-run-waveform/configure.ac deleted file mode 100644 index 288c7bd1d..000000000 --- a/gr-run-waveform/configure.ac +++ /dev/null @@ -1,58 +0,0 @@ -dnl -dnl Copyright 2004,2005,2007,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. -dnl - -AC_INIT -AC_PREREQ(2.57) -AC_CONFIG_AUX_DIR([.]) - -AC_CONFIG_HEADERS([grconfig.h]) -AC_CONFIG_MACRO_DIR(config) -AC_CONFIG_SRCDIR(gr-run-waveform-binary.cc) -AM_INIT_AUTOMAKE("gr-run-waveform", "0.1") - -AC_CANONICAL_BUILD -AC_CANONICAL_HOST -dnl AC_CANONICAL_TARGET - -dnl Find the the C++ compiler -AC_PROG_CXX -AM_PROG_CC_C_O -AC_PROG_LN_S - -GR_LIB64 dnl check for lib64 suffix after choosing compilers - -dnl Checks for standard header files. -AC_HEADER_STDC - -dnl Get the paths to the Guile headers and library -GUILE_DEVEL - -AC_PATH_PROG(PYTHON, python) -AC_SUBST(PYTHON) - -AC_CONFIG_FILES([\ - Makefile \ - config/Makefile \ - ]) - -AC_OUTPUT - -echo "Configured gr-run-waveform release $RELEASE for build." diff --git a/gr-run-waveform/gen-xyzzy b/gr-run-waveform/gen-xyzzy deleted file mode 100644 index 955d24798..000000000 --- a/gr-run-waveform/gen-xyzzy +++ /dev/null @@ -1,192 +0,0 @@ -#!/usr/bin/env python - -""" - usage: gen-xyzzy [-o output] directory... - - Typical usage: - gen-xyzzy -o filesystem.dat /usr/share/guile/1.8 /usr/local/share/guile/site - - Where /usr/share/guile points to the system guile installation and - /usr/local/share/guile/site points to the GNU Radio installed guile files - - - Build a single file that contains all of the *.scm files from the - guile installation and from the GR installation. I figure it's - basically a table that maps strings to strings. That is, - "/foo/bar/filename" -> "file contents". We could just mmap - it in read-only, or just read it in. Reading is more portable, - let's do that. - - File: [ header | directory | strings ] - - All integers are net-endian. - - struct header { - char magic[8]; - - uint32_t offset_to_directory; // byte offset from start of file - uint32_t size_of_directory; // bytes - uint32_t number_of_dir_entries; - - uint32_t offset_to_strings; // byte offset from start of file - uint32_t size_of_strings; // bytes - }; - - struct directory_entry { - uint32_t offset_to_name; // from start of strings - uint32_t offset_to_contents; // from start of strings - } - - Each string starts with a uint32_t length, followed by length bytes. - There is no trailing \0 in the string. Each string entry is followed - with enough padding to bring it up to a multiple of 4 bytes. - - struct string_entry { - uint32_t length; - unsigned char c[1]; // 0 is nicer, but not portable. - } -""" - - -from optparse import OptionParser -import sys -import os -import os.path -from pprint import pprint -import struct - - -def main(): - parser = OptionParser(usage="usage: %prog [options] directory...") - parser.add_option("-o", type="string", default=None, metavar="FILENAME", - help="Specify output filename [default=stdout]") - (options, args) = parser.parse_args() - - if len(args) == 0: - parser.print_help() - raise SystemExit, 1 - - if options.o: - output = open(options.o, 'wb') - else: - output = sys.stdout - - doit(output, args) - - -def doit(output, dirs): - acc = [] - for d in dirs: - acc.extend(handle_dir(d)) - - uniq = {} - for key, val in acc: - if key in uniq: - if val != uniq[key]: - sys.stderr.write("Duplicate key: %s %s %s\n" % (key, uniq[key], val)) - else: - uniq[key] = val - - t = uniq.items() - t.sort() - write_xyzzy(output, t) - - -def handle_dir(directory): - if not directory.endswith(os.sep): - directory = directory + os.sep - acc = [] - for root, dirs, files in os.walk(directory, topdown=True): - # scm_files = [f for f in files if f.endswith('.scm')] - scm_files = files - for f in scm_files: - full_name = os.path.join(root, f) - t = (full_name[len(directory):], full_name) - acc.append(t) - return acc - - -def file_length(filename): - statinfo = os.stat(filename) - return statinfo.st_size - - -# return n rounded up to a multiple of 4 -def round_up(n): - return (n + 3) & -4 - - -class string_table(object): - def __init__(self): - self._table = '' - self._padding = '\0\0\0\0' - - def add_string(self, s): - r = len(self._table) - len_s = len(s) - padding = self._padding[0:round_up(len_s) - len_s] - self._table = ''.join((self._table, struct.pack('>I', len(s)), s, padding)) - return r - - -def write_xyzzy(f, list_of_tuples): - # tuples: (name, filename) - names = [s[0] for s in list_of_tuples] - number_of_dir_entries = len(list_of_tuples) - number_of_names = number_of_dir_entries - number_of_files = number_of_dir_entries - sizeof_uint32 = 4 - - contents = {} - for name, filename in list_of_tuples: - t = open(filename, 'rb').read() - contents[name] = t - - offset_to_directory = 28 - size_of_directory = number_of_dir_entries * 8 - offset_to_strings = offset_to_directory + size_of_directory - - st = string_table() - - # Insert names in string table first to help locality - name_str_offset = {} - for name in names: - name_str_offset[name] = st.add_string(name) - - # Now add file contents - content_str_offset = {} - for name in names: - content_str_offset[name] = st.add_string(contents[name]) - - size_of_strings = len(st._table) - - if 0: - print "offset_to_directory\t", offset_to_directory - print "size_of_directory\t", size_of_directory - print "number_of_dir_entries\t", number_of_dir_entries - print "offset_to_strings\t", offset_to_strings - print "size_of_strings\t\t", size_of_strings - - magic = '-XyZzY-\0' - - # Write header - f.write(struct.pack('>8s5I', - magic, - offset_to_directory, - size_of_directory, - number_of_dir_entries, - offset_to_strings, - size_of_strings)) - - # Write directory - for name in names: - f.write(struct.pack('>2I', - name_str_offset[name], - content_str_offset[name])) - - # Write string table - f.write(st._table) - - -if __name__ == "__main__": - main() diff --git a/gr-run-waveform/gr-run-waveform-binary.cc b/gr-run-waveform/gr-run-waveform-binary.cc deleted file mode 100644 index ac81b0eaa..000000000 --- a/gr-run-waveform/gr-run-waveform-binary.cc +++ /dev/null @@ -1,100 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2010 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 <stdio.h> -#include <stdlib.h> -#include <libguile.h> - -#include "xyzzy.h" - -/* - * Load and run a waveform defined using define-waveform - * usage: gr-run-waveform filename.wfd [args...] - */ - -static bool -prepend_to_env(const char *name, const char *value) -{ - char *c_old = getenv(name); - std::string new_val; - if (c_old) - new_val = std::string(value) + std::string(":") + std::string(c_old); - else - new_val = std::string(value); - - return setenv(name, new_val.c_str(), 1) == 0; -} - -static const char *code = "\ -;;(set! %load-verbosely #t) \n\ - \n\ -(save-module-excursion \n\ - (lambda () \n\ - (set-current-module (resolve-module '(guile))) \n\ - (set! primitive-load xyzzy-primitive-load) \n\ - (set! primitive-load-path xyzzy-primitive-load-path) \n\ - (set! search-path xyzzy-search-path) \n\ - (set! %search-load-path %xyzzy-search-load-path))) \n\ - \n\ -(primitive-load-path \"gnuradio/run-waveform\") \n\ - \n\ -(define (main args) \n\ - (if (not (>= (length args) 2)) \n\ - (let ((port (current-error-port))) \n\ - (display \"usage: \" port) \n\ - (display (car args) port) \n\ - (display \" filename.wfd [args...]\n\" port) \n\ - (exit 1))) \n\ - (apply run-waveform (cdr args))) \n\ - \n\ -(main (command-line)) \n\ -"; - -static void -inner_main (void *data, int argc, char **argv) -{ - // Load pseudo filesystem - if (!xyzzy_init(0)) // use compiled-in install path - exit(1); - - // Initialize our gsubrs - scm_xyzzy_init(); - - // Override standard code with our gsubrs and and run our app - scm_c_eval_string(code); -} - -int -main(int argc, char *argv[]) -{ - // kill warnings - setenv("GUILE_WARN_DEPRECATED", "no", 1); - - // where to find our files and libraries - prepend_to_env("GUILE_LOAD_PATH", "/-xyzzy-"); - prepend_to_env("LTDL_LIBRARY_PATH", LIBDIR); - prepend_to_env("DYLD_LIBRARY_PATH", LIBDIR); - - scm_boot_guile (argc, argv, inner_main, 0); - - return 0; // never reached -} diff --git a/gr-run-waveform/guile/cat.scm b/gr-run-waveform/guile/cat.scm deleted file mode 100644 index 6a5a38acf..000000000 --- a/gr-run-waveform/guile/cat.scm +++ /dev/null @@ -1,15 +0,0 @@ -;;; This is non-idiomatic, but will exercise the port... -(define (cat input-port) - (let loop ((ch (read-char input-port))) - (if (not (eof-object? ch)) - (begin - (write-char ch (current-output-port)) - (loop (read-char input-port)))))) - -(define foo (make-gnuradio-port "ice-9/boot-9.scm")) -;;(define foo (cat (make-gnuradio-port "ice-9/boot-9.scm"))) - -;; # Then start guile and use it -;; guile> (load "/tmp/cat.scm") -;; guile> (cat (open-file "/etc/passwd" "r")) - diff --git a/gr-run-waveform/guile/readline.scm b/gr-run-waveform/guile/readline.scm deleted file mode 100644 index badfa92ae..000000000 --- a/gr-run-waveform/guile/readline.scm +++ /dev/null @@ -1,3 +0,0 @@ -(use-modules (ice-9 readline)) -(activate-readline) -(read-char) diff --git a/gr-run-waveform/guile/simple.scm b/gr-run-waveform/guile/simple.scm deleted file mode 100644 index ae8ef9b60..000000000 --- a/gr-run-waveform/guile/simple.scm +++ /dev/null @@ -1,60 +0,0 @@ -(define filename "ice-9/boot-9") - -;; System default path -(define path %load-path) -path -;; -(define path-with-xyzzy (cons "/-xyzzy-" path)) -path-with-xyzzy -;; -;; look for .scm or no extension -(define extensions '(".scm" "")) - -;; Both of these return "/usr/share/guile/1.8/ice-9/boot-9.scm" -(define expected "/usr/share/guile/1.8/ice-9/boot-9.scm") -(define result1 (search-path path filename extensions)) -(if (string=? result1 expected) - (display "PASSED: xyzzy-search-path from guile\n") - (display "FAILED: xyzzy-search-path from guile\n")) - -(define result2 (search-path path-with-xyzzy filename extensions)) -(if (string=? result2 expected) - (display "PASSED: xyzzy-search-path from guile\n") - (display "FAILED: xyzzy-search-path from guile\n")) - -;; Should return "/usr/share/guile/1.8/ice-9/boot-9.scm" -(define result3 (xyzzy-search-path path filename extensions)) -(if (string=? result3 expected) - (display "PASSED: xyzzy-search-path from guile\n") - (display "FAILED: xyzzy-search-path from guile\n")) - -;; Should return "/-xyzzy-/ice-9/boot-9.scm" -(define expected "/-xyzzy-/ice-9/boot-9.scm") -(define result4 (xyzzy-search-path path-with-xyzzy filename extensions)) -(if (string=? result4 expected) - (display "PASSED: xyzzy-search-path from guile\n") - (display "FAILED: xyzzy-search-path from guile\n")) - -;; (define result5 (primitive-load filename)) - -;; (define result6 (xyzzy-primitive-load file)) - -;; FIXME: not sure how to tell if this worked other than if the test doesn't crash -(define result7 (xyzzy-primitive-load expected)) -(define result8 (xyzzy-primitive-load-path expected)) - -;; This should return the full name, or #f if it fails. -(define result9 (xyzzy-search-load-path filename)) -(if (boolean? result9) - (display "FAILED: xyzzy-search-load-path from guile\n") - (if (string=? result9 result1) - (display "PASSES: xyzzy-search-load-path from guile\n") - (display "FAILED: xyzzy-search-load-path from guile\n"))) - -(define result10 (xyzzy-search-load-path expected)) -(if (boolean? result9) - (display "FAILED: xyzzy-search-load-path from guile\n") - (if (string=? result10 expected) - (display "PASSED: xyzzy-search-load-path from guile\n") - (display "FAILED: xyzzy-search-load-path from guile\n"))) - diff --git a/gr-run-waveform/hello.scm b/gr-run-waveform/hello.scm deleted file mode 100644 index f3bb5eac1..000000000 --- a/gr-run-waveform/hello.scm +++ /dev/null @@ -1,4 +0,0 @@ -(define hello-world - (lambda () - (display "Hello, World!") - (newline))) diff --git a/gr-run-waveform/test_embed.cc b/gr-run-waveform/test_embed.cc deleted file mode 100644 index 93c5272a7..000000000 --- a/gr-run-waveform/test_embed.cc +++ /dev/null @@ -1,89 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2010 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 <stdio.h> -#include <stdlib.h> -#include <libguile.h> - -#include "xyzzy.h" - -/* - * Test our embedded version of guile - */ - -static bool -prepend_to_env(const char *name, const char *value) -{ - char *c_old = getenv(name); - std::string new_val; - if (c_old) - new_val = std::string(value) + std::string(":") + std::string(c_old); - else - new_val = std::string(value); - - return setenv(name, new_val.c_str(), 1) == 0; -} - -static const char *code = "\ -;;(set! %load-verbosely #t) \n\ - \n\ -(save-module-excursion \n\ - (lambda () \n\ - (set-current-module (resolve-module '(guile))) \n\ - (set! primitive-load xyzzy-primitive-load) \n\ - (set! primitive-load-path xyzzy-primitive-load-path) \n\ - (set! search-path xyzzy-search-path) \n\ - (set! %search-load-path %xyzzy-search-load-path))) \n\ -"; - -static void -inner_main (void *data, int argc, char **argv) -{ - // Load pseudo filesystem - if (!xyzzy_init("./filesystem.dat")) - exit(1); - - // Initialize our gsubrs - scm_xyzzy_init(); - - // Override standard code with our gsubrs - scm_c_eval_string(code); - - // REPL - scm_shell (argc, argv); -} - -int -main(int argc, char *argv[]) -{ - // kill warnings - setenv("GUILE_WARN_DEPRECATED", "no", 1); - - // where to find our files and libraries - prepend_to_env("GUILE_LOAD_PATH", "/-xyzzy-"); - prepend_to_env("LTDL_LIBRARY_PATH", LIBDIR); - prepend_to_env("DYLD_LIBRARY_PATH", LIBDIR); - - scm_boot_guile (argc, argv, inner_main, 0); - - return 0; // never reached -} diff --git a/gr-run-waveform/test_xyzzy.cc b/gr-run-waveform/test_xyzzy.cc deleted file mode 100644 index cd4cd3283..000000000 --- a/gr-run-waveform/test_xyzzy.cc +++ /dev/null @@ -1,280 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2010 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 <cstdio> -#include <cstdlib> -#include <string> -#include <iostream> -#include <fstream> -#include <libguile.h> -#include <boost/cstdint.hpp> -#include <boost/shared_ptr.hpp> -#include <boost/shared_array.hpp> - -// Include our definitions -#include "xyzzy.h" - -using namespace std; - -boost::uint8_t hex2digit(boost::uint8_t digit); -boost::shared_array<boost::uint8_t> hex2mem(const std::string &str); - -static void -inner_main (void *data, int argc, char **argv) -{ - fprintf(stderr, "TRACE %s: %d\n", __FUNCTION__, __LINE__); - scm_xyzzy_init(); - - string srcdir = SRCDIR; - - // Lasd readline, as it makes life on he guile command lne - string file = srcdir; - file += "/guile/readline.scm"; - scm_c_primitive_load (file.c_str()); - - file = srcdir; - file += "/guile/simple.scm"; - SCM simple = scm_c_primitive_load (file.c_str()); - if (scm_is_true(scm_c_primitive_load (file.c_str()))) { - fprintf(stderr, "PASSED: loading simple.scm\n"); - } else { - fprintf(stderr, "FAILED: loading simple.scm\n" ); - } - SCM s_symbol = scm_c_lookup("result1"); - SCM s_value = scm_variable_ref(s_symbol); - if (scm_to_locale_string(s_value) == string("/usr/share/guile/1.8/ice-9/boot-9.scm")) { - fprintf(stderr, "PASSED: search-path from C\n"); - } else { - fprintf(stderr, "FAILED: search-path from C\n" ); - } - - s_symbol = scm_c_lookup("result2"); - s_value = scm_variable_ref(s_symbol); - if (scm_to_locale_string(s_value) == string("/usr/share/guile/1.8/ice-9/boot-9.scm")) { - fprintf(stderr, "PASSED: search-path path-with-xyzzy from C\n"); - } else { - fprintf(stderr, "FAILED: search-path path-with-xyzzy from C\n" ); - } - s_symbol = scm_c_lookup("result3"); - s_value = scm_variable_ref(s_symbol); - if (scm_to_locale_string(s_value) == string("/usr/share/guile/1.8/ice-9/boot-9.scm")) { - fprintf(stderr, "PASSED: xyzzy-search from C\n"); - } else { - fprintf(stderr, "FAILED: xyzzy-search from C\n" ); - } - s_symbol = scm_c_lookup("result4"); - s_value = scm_variable_ref(s_symbol); - if (scm_to_locale_string(s_value) == string("/-xyzzy-/ice-9/boot-9.scm")) { - fprintf(stderr, "PASSED: xyzzy-search-path path-with-xyzzy from C\n"); - } else { - fprintf(stderr, "FAILED: xyzzy-search-path path-with-xyzzy from C\n" ); - } - - // This test loads a scheme test case that defines a 'cat' function to - // spew the contents of the file from our fake file system. - file = srcdir; - file += "/guile/cat.scm"; - if (scm_is_true(scm_c_primitive_load (file.c_str()))) { - fprintf(stderr, "PASSED: loading cat.scm\n"); - } else { - fprintf(stderr, "FAILED: loading cat.scm\n" ); - } - // It tacky, but the test case defines the name of this input - // port as 'foo'. So make sure that's what we got... - s_symbol = scm_c_lookup("foo"); - // Get the handle to the port - s_value = scm_variable_ref(s_symbol); - SCM result = scm_input_port_p (s_value); - if (scm_is_true(result)) { - fprintf(stderr, "PASSED: make-gnuradio-port()\n"); - } else { - fprintf(stderr, "FAILED: make-gnuradio-port()\n" ); - } - - if (scm_char_ready_p (s_value)) { - fprintf(stderr, "PASSED: scm_char_ready_p()\n"); - } else { - fprintf(stderr, "FAILED: scm_char_ready_p()\n" ); - } - - char *bar[20]; - if (scm_c_read(s_value, bar, 10)) { - fprintf(stderr, "PASSED: read from port\n"); - } else { - fprintf(stderr, "FAILED: read from port\n" ); - } - - result = scm_output_port_p (s_value); - if (scm_is_true(result)) { - fprintf(stderr, "FAILED: make-gnuradio-port()\n"); - } else { - fprintf(stderr, "PASSED: make-gnuradio-port()\n" ); - } - - scm_flush_all_ports(); - scm_shell (argc, argv); -} - -int -main(int argc, char *argv[]) -{ - // Test static methods - string hello("Hello World!"); - boost::uint8_t *hi = reinterpret_cast<boost::uint8_t *>(const_cast<char *> - (hello.c_str())); - struct string_entry entry = { - 12, - hi - }; - - if (XYZZY::read_string(entry) == hello) { - cout << "PASSED: XYZZY::read_string(struct string_entry &)" << endl; - } else { - cout << "FAILED: XYZZY::read_string(struct string_entry &)" << endl; - } - - if (XYZZY::read_string(hi, hello.size()) == hello) { - cout << "PASSED: XYZZY::read_string(struct string_entry &)" << endl; - } else { - cout << "FAILED: XYZZY::read_string(struct string_entry &)" << endl; - } - - // Test other methods - XYZZY xyzzy; - - string fake_magic("-XyZzY-"); - boost::shared_array<boost::uint8_t> fake_header_data = hex2mem( - "2d 58 79 5a 7a 59 2d 00 00 00 00 1c 00 00 05 e8 00 00 00 bd 00 00 06 04 00 21 ee 58"); - boost::shared_ptr<struct header> head = xyzzy.read_header(fake_header_data.get()); - if ((head->magic == fake_magic) - && (head->offset_to_directory == 28) - && (head->size_of_directory == 1512) - && (head->number_of_dir_entries == 189) - && (head->offset_to_strings == 1540) - && (head->size_of_strings == 2223704)) { - cout << "PASSED: XYZZY::read_header()" << endl; - } else { - cout << "FAILED: XYZZY::read_header()" << endl; - } - -#if 0 - if (xyzzy.init()) { - cout << "PASSED: XYZZY::init()" << endl; - } else { - cout << "FAILED: XYZZY::init()" << endl; - } -#endif - - // Look for a file to exist, which shouldn't as we haven't loaded the data - if (xyzzy_file_exists("srfi/srfi-35.scm")) { - cout << "FAILED: xyzzy_file_exists(not yet)" << endl; - } else { - cout << "PASSED: xyzzy_file_exists(not yet)" << endl; - } - - // Initialize with the data file produced by gen-xyzzy. - string fullspec = "./filesystem.dat"; - char *name = const_cast<char *>(fullspec.c_str()); - if (xyzzy_init(name)) { - cout << "PASSED: xyzzy_init()" << endl; - } else { - cout << "FAILED: xyzzy_init()" << endl; - } - - // Does a file with name 'filename' exist in magic filesystem? - if (xyzzy_file_exists("srfi/srfi-35.scm")) { - cout << "FAILED: xyzzy_file_exists(shouldn't exist)" << endl; - } else { - cout << "PASSED: xyzzy_file_exists(shouldn't exist)" << endl; - } - - // Does a file with name 'filename' exist in magic filesystem? - if (xyzzy_file_exists("/-xyzzy-/srfi/srfi-35.scm")) { - cout << "PASSED: xyzzy_file_exists(should exist)" << endl; - } else { - cout << "FAILED: xyzzy_file_exists(should exist)" << endl; - } - - // Does a file with name 'filename' exist in magic filesystem? - if (xyzzy_file_exists("/-xyzzy-/srfi/srfi-99.scm")) { - cout << "FAILED: xyzzy_file_exists(shouldn't exist)" << endl; - } else { - cout << "PASSED: xyzzy_file_exists(shouldn't exist)" << endl; - } - - scm_boot_guile (argc, argv, inner_main, 0); -} - - -/// \brief Convert a Hex digit into it's decimal value. -/// -/// @param digit The digit as a hex value -/// -/// @return The byte as a decimal value. -boost::uint8_t -hex2digit (boost::uint8_t digit) -{ - if (digit == 0) - return 0; - - if (digit >= '0' && digit <= '9') - return digit - '0'; - if (digit >= 'a' && digit <= 'f') - return digit - 'a' + 10; - if (digit >= 'A' && digit <= 'F') - return digit - 'A' + 10; - - // shouldn't ever get this far - return -1; -} - -/// \brief Encode a Buffer from a hex string. -/// -/// @param str A hex string, ex... "00 03 05 0a" -/// -/// @return A reference to a Buffer in host endian format. This is -/// primary used only for testing to create binary data -/// from an easy to read and edit format. -boost::shared_array<boost::uint8_t> -hex2mem(const std::string &str) -{ -// GNASH_REPORT_FUNCTION; - size_t count = str.size(); - - size_t size = (count/3) + 4; - boost::uint8_t ch = 0; - - boost::shared_array<boost::uint8_t> data(new boost::uint8_t[count]); - - size_t j = 0; - for (size_t i=0; i<count; i++) { - if (str[i] == ' ') { // skip spaces. - continue; - } - ch = hex2digit(str[i]) << 4; - ch |= hex2digit(str[i+1]); - data[j++] = ch; - i++; - } - - return data; -} diff --git a/gr-run-waveform/version.sh b/gr-run-waveform/version.sh deleted file mode 100644 index 0d6cc96f0..000000000 --- a/gr-run-waveform/version.sh +++ /dev/null @@ -1,4 +0,0 @@ -MAJOR_VERSION=3 -API_COMPAT=4 -MINOR_VERSION=git -MAINT_VERSION=0 diff --git a/gr-run-waveform/xyzzy-load.c b/gr-run-waveform/xyzzy-load.c deleted file mode 100644 index 46b7376da..000000000 --- a/gr-run-waveform/xyzzy-load.c +++ /dev/null @@ -1,436 +0,0 @@ -/* Copyright (C) 1995,1996,1998,1999,2000,2001,2004,2006,2010 Free Software Foundation, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - - - -#ifdef HAVE_CONFIG_H -# include <grconfig.h> -#endif - -#include <string.h> -#include <stdio.h> - -/* libpath.h is generated whenever the Makefile is rebuilt */ -#include "libpath.h" - -#include <libguile/__scm.h> -#include <libguile/fports.h> -#include <libguile/read.h> -#include <libguile/eval.h> -#include <libguile/throw.h> -#include <libguile/alist.h> -#include <libguile/dynwind.h> -#include <libguile/root.h> -#include <libguile/strings.h> -#include <libguile/modules.h> -#include <libguile/lang.h> -#include <libguile/chars.h> -#include <libguile/tags.h> -#include <libguile/snarf.h> -#include <libguile/srfi-13.h> -#include <libguile/validate.h> -#include <libguile/load.h> -#include <libguile/fluids.h> - -// these headers where not in the original version of this file. -#include <libguile/boolean.h> -#include <libguile/pairs.h> -#include <libguile/gc.h> -#include <libguile/variable.h> - -#include <sys/types.h> -#include <sys/stat.h> - -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif /* HAVE_UNISTD_H */ - -#ifndef R_OK -#define R_OK 4 -#endif - -#include "xyzzy.h" - -// This is the magic number used when loading files -static const char *MAGIC = "-XyZzY-"; - -static SCM scm_listofnullstr; - -static SCM *scm_loc_load_hook; -static SCM *scm_loc_load_path; -static SCM *scm_loc_load_extensions; - -/* The current reader (a fluid). */ -static SCM *scm_loc_current_reader; - - -/* Utility functions for assembling C strings in a buffer. - */ - -struct stringbuf { - char *buf, *ptr; - size_t buf_len; -}; - -static void -stringbuf_free (void *data) -{ - struct stringbuf *buf = (struct stringbuf *)data; - free (buf->buf); -} - -static void -stringbuf_grow (struct stringbuf *buf) -{ - size_t ptroff = buf->ptr - buf->buf; - buf->buf_len *= 2; - buf->buf = scm_realloc (buf->buf, buf->buf_len); - buf->ptr = buf->buf + ptroff; -} - -static void -stringbuf_cat_locale_string (struct stringbuf *buf, SCM str) -{ - size_t max_len = buf->buf_len - (buf->ptr - buf->buf) - 1; - size_t len = scm_to_locale_stringbuf (str, buf->ptr, max_len); - if (len > max_len) - { - /* buffer is too small, double its size and try again. - */ - stringbuf_grow (buf); - stringbuf_cat_locale_string (buf, str); - } - else - { - /* string fits, terminate it and check for embedded '\0'. - */ - buf->ptr[len] = '\0'; - if (strlen (buf->ptr) != len) - scm_misc_error (NULL, - "string contains #\\nul character: ~S", - scm_list_1 (str)); - buf->ptr += len; - } -} - -static void -stringbuf_cat (struct stringbuf *buf, char *str) -{ - size_t max_len = buf->buf_len - (buf->ptr - buf->buf) - 1; - size_t len = strlen (str); - if (len > max_len) - { - /* buffer is too small, double its size and try again. - */ - stringbuf_grow (buf); - stringbuf_cat (buf, str); - } - else - { - /* string fits, copy it into buffer. - */ - strcpy (buf->ptr, str); - buf->ptr += len; - } -} - -/* Search PATH for a directory containing a file named FILENAME. - The file must be readable, and not a directory. - If we find one, return its full filename; otherwise, return #f. - If FILENAME is absolute, return it unchanged. - If given, EXTENSIONS is a list of strings; for each directory - in PATH, we search for FILENAME concatenated with each EXTENSION. */ -SCM_DEFINE (scm_xyzzy_search_path, "xyyzy-search-path", 2, 1, 0, - (SCM path, SCM filename, SCM extensions), - "Search @var{path} for a directory containing a file named\n" - "@var{filename}. The file must be readable, and not a directory.\n" - "If we find one, return its full filename; otherwise, return\n" - "@code{#f}. If @var{filename} is absolute, return it unchanged.\n" - "If given, @var{extensions} is a list of strings; for each\n" - "directory in @var{path}, we search for @var{filename}\n" - "concatenated with each @var{extension}.") -#define FUNC_NAME s_scm_xyzzy_search_path -{ - struct stringbuf buf; - char *filename_chars; - size_t filename_len; - SCM result = SCM_BOOL_F; - - if (SCM_UNBNDP (extensions)) - extensions = SCM_EOL; - - /* fprintf(stderr, "TRACE %s: %d %s\n", __FUNCTION__, __LINE__, scm_to_locale_string(SCM_CAR(path))); */ - - scm_dynwind_begin (0); - filename_chars = scm_to_locale_string (filename); - filename_len = strlen (filename_chars); - scm_dynwind_free (filename_chars); - - /* If FILENAME is absolute, return it unchanged. */ -#ifdef __MINGW32__ - if (((filename_len >= 1) && - (filename_chars[0] == '/' || filename_chars[0] == '\\')) || - ((filename_len >= 3) && filename_chars[1] == ':' && - ((filename_chars[0] >= 'a' && filename_chars[0] <= 'z') || - (filename_chars[0] >= 'A' && filename_chars[0] <= 'Z')) && - (filename_chars[2] == '/' || filename_chars[2] == '\\'))) -#else - if (filename_len >= 1 && filename_chars[0] == '/') -#endif - { - scm_dynwind_end (); - return filename; - } - - /* If FILENAME has an extension, don't try to add EXTENSIONS to it. */ - { - char *endp; - - for (endp = filename_chars + filename_len - 1; - endp >= filename_chars; - endp--) - { - if (*endp == '.') - { - /* This filename already has an extension, so cancel the - list of extensions. */ - extensions = SCM_EOL; - break; - } -#ifdef __MINGW32__ - else if (*endp == '/' || *endp == '\\') -#else - else if (*endp == '/') -#endif - /* This filename has no extension, so keep the current list - of extensions. */ - break; - } - } - - /* This simplifies the loop below a bit. - */ - if (scm_is_null (extensions)) - extensions = scm_listofnullstr; - - buf.buf_len = 512; - buf.buf = scm_malloc (buf.buf_len); - scm_dynwind_unwind_handler (stringbuf_free, &buf, SCM_F_WIND_EXPLICITLY); - - /* Try every path element. - */ - for (; scm_is_pair (path); path = SCM_CDR (path)) - { - SCM dir = SCM_CAR (path); - SCM exts; - size_t sans_ext_len; - - buf.ptr = buf.buf; - stringbuf_cat_locale_string (&buf, dir); - - /* Concatenate the path name and the filename. */ - -#ifdef __MINGW32__ - if ((buf.ptr > buf.buf) && (buf.ptr[-1] != '/') && (buf.ptr[-1] != '\\')) -#else - if ((buf.ptr > buf.buf) && (buf.ptr[-1] != '/')) -#endif - stringbuf_cat (&buf, "/"); - - stringbuf_cat (&buf, filename_chars); - sans_ext_len = buf.ptr - buf.buf; - - /* Try every extension. */ - for (exts = extensions; scm_is_pair (exts); exts = SCM_CDR (exts)) - { - SCM ext = SCM_CAR (exts); - struct stat mode; - - buf.ptr = buf.buf + sans_ext_len; - stringbuf_cat_locale_string (&buf, ext); - - /* If the file exists at all, we should return it. If the - file is inaccessible, then that's an error. */ - /* fprintf(stderr, "TRACE %s: %d: \"%s\"\n", __FUNCTION__, __LINE__, buf.buf); */ - - if (xyzzy_file_exists(buf.buf) - || (stat (buf.buf, &mode) == 0 - && ! (mode.st_mode & S_IFDIR))) - { - result = scm_from_locale_string (buf.buf); - goto end; - } - } - - if (!SCM_NULL_OR_NIL_P (exts)) - scm_wrong_type_arg_msg (NULL, 0, extensions, "proper list"); - } - - if (!SCM_NULL_OR_NIL_P (path)) - scm_wrong_type_arg_msg (NULL, 0, path, "proper list"); - - end: - - scm_dynwind_end (); - - return result; -} -#undef FUNC_NAME - -SCM_DEFINE (scm_xyzzy_primitive_load, "xyzzy-primitive-load", 1, 0, 0, - (SCM filename), - "Load the file named @var{filename} and evaluate its contents in\n" - "the top-level environment. The load paths are not searched;\n" - "@var{filename} must either be a full pathname or be a pathname\n" - "relative to the current directory. If the variable\n" - "@code{%load-hook} is defined, it should be bound to a procedure\n" - "that will be called before any code is loaded. See the\n" - "documentation for @code{%load-hook} later in this section.") -#define FUNC_NAME s_scm_xyzzy_primitive_load -{ - SCM hook = *scm_loc_load_hook; - SCM_VALIDATE_STRING (1, filename); - - char *ptr = scm_to_locale_string(filename); - /* fprintf(stderr, "TRACE %s: %d: %s\n", __FUNCTION__, __LINE__, ptr); */ - - if (scm_is_true (hook) && scm_is_false (scm_procedure_p (hook))) - SCM_MISC_ERROR ("value of %load-hook is neither a procedure nor #f", - SCM_EOL); - - if (!scm_is_false (hook)) - scm_call_1 (hook, filename); - - { /* scope */ - SCM port; - - if (xyzzy_file_exists(ptr)){ - /* fprintf(stderr, "TRACE: file %s is a XYZZY file system file!\n", ptr); */ - port = xyzzy_open_file(filename); - } else { - port = scm_open_file (filename, scm_from_locale_string ("r")); - } - scm_dynwind_begin (SCM_F_DYNWIND_REWINDABLE); - scm_i_dynwind_current_load_port (port); - - while (1) - { - SCM reader, form; - - /* Lookup and use the current reader to read the next expression. */ - reader = scm_fluid_ref(*scm_loc_current_reader); - if (reader == SCM_BOOL_F) - form = scm_read (port); - else - form = scm_call_1 (reader, port); - - if (SCM_EOF_OBJECT_P (form)) - break; - - scm_primitive_eval_x (form); - } - - scm_dynwind_end (); - scm_close_port (port); - } - return SCM_UNSPECIFIED; -} -#undef FUNC_NAME - -/* Search %load-path for a directory containing a file named FILENAME. - The file must be readable, and not a directory. - If we find one, return its full filename; otherwise, return #f. - If FILENAME is absolute, return it unchanged. */ -SCM_DEFINE (scm_xyzzy_sys_search_load_path, "%xyzzy-search-load-path", 1, 0, 0, - (SCM filename), - "Search @var{%load-path} for the file named @var{filename},\n" - "which must be readable by the current user. If @var{filename}\n" - "is found in the list of paths to search or is an absolute\n" - "pathname, return its full pathname. Otherwise, return\n" - "@code{#f}. Filenames may have any of the optional extensions\n" - "in the @code{%load-extensions} list; @code{%search-load-path}\n" - "will try each extension automatically.") -#define FUNC_NAME s_scm_xyzzy_sys_search_load_path -{ - SCM loadpath = scm_c_lookup("%load-path"); - SCM path = scm_variable_ref(loadpath); - SCM exts = *scm_loc_load_extensions; - SCM_VALIDATE_STRING (1, filename); - - /* fprintf(stderr, "TRACE %s: %d:\n", __FUNCTION__, __LINE__); */ - - if (scm_ilength (path) < 0) - SCM_MISC_ERROR ("%load-path is not a proper list", SCM_EOL); - if (scm_ilength (exts) < 0) - SCM_MISC_ERROR ("%load-extension list is not a proper list", SCM_EOL); - - return scm_xyzzy_search_path (path, filename, exts); -} -#undef FUNC_NAME - -SCM_DEFINE (scm_xyzzy_primitive_load_path, "xyzzy-primitive-load-path", 1, 0, 0, - (SCM filename), - "Search @var{%load-path} for the file named @var{filename} and\n" - "load it into the top-level environment. If @var{filename} is a\n" - "relative pathname and is not found in the list of search paths,\n" - "an error is signalled.") -#define FUNC_NAME s_scm_xyzzy_primitive_load_path -{ - SCM full_filename; - char *filename_chars; - size_t filename_len; - - filename_chars = scm_to_locale_string (filename); - filename_len = strlen (filename_chars); - scm_dynwind_free (filename_chars); - - full_filename = scm_xyzzy_sys_search_load_path (filename); - - /* fprintf(stderr, "TRACE %s: %d: %s\n", __FUNCTION__, __LINE__, scm_to_locale_string(full_filename)); */ - - if (scm_is_false (full_filename)) - SCM_MISC_ERROR ("Unable to find the file ~S in load path", - scm_list_1 (filename)); - - return scm_xyzzy_primitive_load (full_filename); -} -#undef FUNC_NAME - -SCM_DEFINE (scm_xyzzy_open_file, "xyzzy-open-file", 1, 0, 0, - (SCM filename), - "Return a new port which reads from @var{filename}") -#define FUNC_NAME s_scm_xyzzy_open_file -{ - return xyzzy_open_file (filename); -} -#undef FUNC_NAME - -void -scm_xyzzy_init (void) -{ - scm_listofnullstr = scm_permanent_object (scm_list_1 (scm_nullstr)); - scm_loc_load_extensions = SCM_VARIABLE_LOC(scm_c_lookup("%load-extensions")); - scm_loc_load_hook = SCM_VARIABLE_LOC (scm_c_lookup("%load-hook")); - scm_loc_current_reader = SCM_VARIABLE_LOC (scm_c_lookup("current-reader")); - - /* initialize our functions in the scheme VM */ - scm_c_define_gsubr ("xyzzy-open-file", 1, 0, 0, (SCM (*)()) scm_xyzzy_open_file); - scm_c_define_gsubr ("xyzzy-primitive-load", 1, 0, 0, (SCM (*)()) scm_xyzzy_primitive_load); - scm_c_define_gsubr ("xyzzy-primitive-load-path", 1, 0, 0, (SCM (*)()) scm_xyzzy_primitive_load_path); - scm_c_define_gsubr ("%xyzzy-search-load-path", 1, 0, 0, (SCM (*)()) scm_xyzzy_sys_search_load_path); - scm_c_define_gsubr ("xyzzy-search-path", 2, 1, 0, (SCM (*)()) scm_xyzzy_search_path); -} diff --git a/gr-run-waveform/xyzzy.cc b/gr-run-waveform/xyzzy.cc deleted file mode 100644 index a908955a0..000000000 --- a/gr-run-waveform/xyzzy.cc +++ /dev/null @@ -1,235 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2010 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 <cstdio> -#include <cstdlib> -#include <string> -#include <iostream> -#include <fstream> -#include <vector> -#include <map> -#include <libguile.h> -#include <libguile/ports.h> -#include <boost/cstdint.hpp> -#include <boost/shared_ptr.hpp> - -// Include our definitions -#include "xyzzy.h" - -using namespace std; - -typedef void* handle_t; - -XYZZY::XYZZY() -{ - // nothing to initialize -} - -XYZZY::~XYZZY() -{ - _contents.clear(); -} - -// Initialize with the data file produced by gen-xyzzy. -bool -XYZZY::init() -{ - _filespec = DATAROOTDIR; - _filespec += "/gnuradio/gr-run-waveform/"; - _filespec += "filesystem.dat"; - return init(_filespec); -}; - -bool -XYZZY::init(const std::string &file) -{ - ifstream in(file.c_str(), ios_base::binary|ios_base::in); - if (!in) { - cerr << ("gr-run-waveform: couldn't open data file: ") << file << endl; - return false; - } - - size_t length = sizeof(struct header); - char head[length]; - in.read(head, length); - - boost::shared_ptr<struct header> header = read_header(reinterpret_cast<boost::uint8_t *>(&head)); - - // Check the magic number to make sure it's the right type of file. - if (strncmp(header->magic, "-XyZzY-", 8) != 0) { - cerr << "ERROR: bad magic number" << endl; - return false; - } - - // Read in the Directory table - length = sizeof(struct directory_entry); - char dir[length]; - boost::uint32_t ssize; - for (size_t i=0; i<header->number_of_dir_entries; ++i) { - in.read(dir, length); - int store = in.tellg(); - boost::shared_ptr<struct directory_entry> entry = read_dir_entry( - reinterpret_cast<boost::uint8_t *>(dir)); - - // Get the file name - in.seekg(header->offset_to_strings + entry->offset_to_name); - string name = XYZZY::read_string(in); - // cout << name << endl; - - // Get the contents, which is one big string - in.seekg(header->offset_to_strings + entry->offset_to_contents); - string contents = XYZZY::read_string(in); - // cout << contents << endl; - in.seekg(store); - _contents[name] = contents; - } - // cout << "Loaded " << _contents.size() << " Filesystem entries" << endl; - - in.close(); - - return true; -}; - -// Does a file with name 'filename' exist in magic filesystem? -// bool file_exists(handle, const std::string &filespec); -bool -XYZZY::file_exists(const std::string &filespec) -{ - if (filespec.substr(0, 9) == "/-xyzzy-/") { - // look for prefix - std::map<std::string, std::string>::iterator it; - it = _contents.find(filespec.substr(9, filespec.size())); - if (it != _contents.end()) { - return true; - } - return false; - } - return false; -} - -string -XYZZY::read_string(boost::uint8_t *entry, size_t length) -{ - string str(reinterpret_cast<const char *>(entry), length); - - return str; -} - -string -XYZZY::read_string(struct string_entry & entry) -{ - return read_string(entry.base, entry.length); -} - -string -XYZZY::read_string(std::ifstream &stream) -{ - boost::uint32_t length; - char num[sizeof(boost::uint32_t)]; - - stream.read(reinterpret_cast<char *>(&length), sizeof(boost::uint32_t)); - boost::uint32_t len = __builtin_bswap32(length); - // All the strings are 32 bit word aligned, so we have to adjust - // how many bytes to read. - size_t padding = sizeof(boost::uint32_t) - (len % sizeof(boost::uint32_t)); - size_t newsize = (padding == 4) ? len : len + padding; - char sstr[newsize]; - - // Read the string - stream.read(sstr, newsize); - - string filespec(reinterpret_cast<const char *>(sstr), len); - return filespec; -} - -boost::shared_ptr<struct header> -XYZZY::read_header(boost::uint8_t *header) -{ - boost::shared_ptr<struct header> newhead(new struct header); - - struct header *ptr = reinterpret_cast<struct header *>(header); - - std::copy(header, header + 8, newhead->magic); - - newhead->offset_to_directory = __builtin_bswap32(ptr->offset_to_directory); - newhead->size_of_directory = __builtin_bswap32(ptr->size_of_directory); - newhead->number_of_dir_entries = __builtin_bswap32(ptr->number_of_dir_entries); - newhead->offset_to_strings = __builtin_bswap32(ptr->offset_to_strings); - newhead->size_of_strings = __builtin_bswap32(ptr->size_of_strings); - - return newhead; -} - -boost::shared_ptr<struct directory_entry> -XYZZY::read_dir_entry(boost::uint8_t *entry) -{ - boost::shared_ptr<struct directory_entry> newdir(new struct directory_entry); - struct directory_entry *ptr = reinterpret_cast<struct directory_entry *>(entry); - - newdir->offset_to_name = __builtin_bswap32(ptr->offset_to_name); - newdir->offset_to_contents = __builtin_bswap32(ptr->offset_to_contents); - - return newdir; -} - -// C linkage for guile -extern "C" { - -static XYZZY datafile; - -SCM -xyzzy_open_file(SCM filename) -#define FUNC_NAME "xyzzy-open-file" -{ - const char *c_filename = scm_to_locale_string(filename); - // fprintf(stderr, "TRACE %s: %d, %s\n", __FUNCTION__, __LINE__, c_filename); - - if (!xyzzy_file_exists(c_filename)){ - SCM_MISC_ERROR("file does not exist: ~S", scm_list_1(filename)); - } - - std::string filespec(c_filename); - std::string &contents = datafile.get_contents(filespec.substr(9, filespec.size())); - SCM port = scm_open_input_string (scm_from_locale_string (contents.c_str())); - - return port; -} -#undef FUNC_NAME - -// Initialize with the data file produced by gen-xyzzy. -int -xyzzy_init(const char *filespec) -{ - if (filespec == 0 || *filespec == 0) - return datafile.init(); - else - return datafile.init(filespec); -} - -// Does a file with name 'filename' exist in magic filesystem? -int -xyzzy_file_exists(const char *filespec) -{ - return datafile.file_exists(filespec); -} - -} // end of extern C diff --git a/gr-run-waveform/xyzzy.h b/gr-run-waveform/xyzzy.h deleted file mode 100644 index 5bce79969..000000000 --- a/gr-run-waveform/xyzzy.h +++ /dev/null @@ -1,128 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2010 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 _XYZZY_H_ -#define _XYZZY_H_ 1 - - -#include <libguile.h> - -#ifdef __cplusplus - -#include <cstdio> -#include <cstdlib> -#include <string> -#include <map> -#include <vector> -#include <iostream> -#include <fstream> -#include <boost/cstdint.hpp> -#include <boost/shared_ptr.hpp> -#include <boost/scoped_ptr.hpp> - -using namespace std; - -// - Special case filenames that start with /-xyzzy-/... and search for -// and load them using the single file. We'd stick "/-zyzzy-" first -// in the default load-path. - -// - Create a C read-only "port" that "reads" from the string in the file. -// (See guile docs on creating new kinds of ports) - -// - Override the default implementation of "primitive-load" and "%search-load-path" -// to make that happen. See load.c in the guile source code. Figure -// out how to get the override done before guile is fully -// initialized. (Guile loads ice-9/boot9.scm to start itself up. We'd -// need to redirect before then.) - -struct header { - char magic[8]; - - boost::uint32_t offset_to_directory; // byte offset from start of file - boost::uint32_t size_of_directory; // bytes - boost::uint32_t number_of_dir_entries; - - boost::uint32_t offset_to_strings; // byte offset from start of file - boost::uint32_t size_of_strings; // bytes -}; - -struct directory_entry { - boost::uint32_t offset_to_name; // from start of strings - boost::uint32_t offset_to_contents; // from start of strings -}; - -// Each string starts with a uint32_t length, followed by length bytes. -// There is no trailing \0 in the string. -struct string_entry { - boost::uint32_t length; - boost::uint8_t *base; -}; - -class XYZZY { -public: - XYZZY(); - ~XYZZY(); - - // Initialize with the data file produced by gen-xyzzy. - bool init(); - bool init(const std::string &filespec); - - // Does a file with name 'filename' exist in magic filesystem? - bool file_exists(const std::string &filespec); - - /// Parse a string data structure - static std::string read_string(boost::uint8_t *entry, size_t length); - static std::string read_string(struct string_entry &entry); - static std::string read_string(std::ifstream &stream); - - // Read the header of the datafile - boost::shared_ptr<struct header> read_header(boost::uint8_t *header); - - boost::shared_ptr<struct directory_entry> read_dir_entry(boost::uint8_t *header); - - std::string &get_contents(const std::string &filespec) { return _contents[filespec]; }; - -private: - std::string _filespec; - std::map<std::string, std::string> _contents; -}; - -// C linkage bindings for Guile -extern "C" { -#endif - -void scm_xyzzy_init (void); - -// Initialize with the data file produced by gen-xyzzy. -int xyzzy_init(const char *filename); - -// Does a file with name 'filename' exist in magic filesystem? -int xyzzy_file_exists(const char *filename); - -// Return a readonly port that accesses filename. -SCM xyzzy_open_file (SCM filename); - -#ifdef __cplusplus -} // end of extern C -#endif - -#endif // _XYZZY_H_ 1 diff --git a/gr-shd/.gitignore b/gr-shd/.gitignore deleted file mode 100644 index a37fc0c1a..000000000 --- a/gr-shd/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -/*.pc diff --git a/gr-shd/CMakeLists.txt b/gr-shd/CMakeLists.txt index a1b3b1a0b..7dad30cd8 100644 --- a/gr-shd/CMakeLists.txt +++ b/gr-shd/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-shd/Makefile.am b/gr-shd/Makefile.am deleted file mode 100644 index 2331831e0..000000000 --- a/gr-shd/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = include lib apps - -if PYTHON -SUBDIRS += swig grc -endif - -pkgconfigdir = $(libdir)/pkgconfig -dist_pkgconfig_DATA = gnuradio-shd.pc diff --git a/gr-shd/apps/.gitignore b/gr-shd/apps/.gitignore deleted file mode 100644 index 22a4e7292..000000000 --- a/gr-shd/apps/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -Makefile -Makefile.in - diff --git a/gr-shd/apps/CMakeLists.txt b/gr-shd/apps/CMakeLists.txt index 3930abb57..d36121da1 100644 --- a/gr-shd/apps/CMakeLists.txt +++ b/gr-shd/apps/CMakeLists.txt @@ -24,9 +24,9 @@ include(GrPython) ######################################################################## GR_PYTHON_INSTALL( PROGRAMS - shd_fft.py - shd_rx_cfile.py - shd_siggen.py + shd_fft + shd_rx_cfile + shd_siggen DESTINATION ${GR_RUNTIME_DIR} COMPONENT "shd_python" ) diff --git a/gr-shd/apps/Makefile.am b/gr-shd/apps/Makefile.am deleted file mode 100644 index ac50e892e..000000000 --- a/gr-shd/apps/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -EXTRA_DIST += \ - $(bin_SCRIPTS) - -ourpythondir = $(grpythondir) - -bin_SCRIPTS = \ - shd_fft.py \ - shd_rx_cfile.py \ - shd_siggen.py - diff --git a/gr-shd/apps/shd_fft.py b/gr-shd/apps/shd_fft index 46832784d..60d07e55e 100755 --- a/gr-shd/apps/shd_fft.py +++ b/gr-shd/apps/shd_fft @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gru from gnuradio import shd @@ -37,7 +37,7 @@ class app_top_block(stdgui2.std_top_block): self.frame = frame self.panel = panel - + parser = OptionParser(option_class=eng_option) parser.add_option("-a", "--address", type="string", default="type=xmini", @@ -66,7 +66,7 @@ class app_top_block(stdgui2.std_top_block): sys.exit(1) self.options = options self.show_debug_info = True - + self.src = shd.smini_source(device_addr=options.address, io_type=shd.io_type.COMPLEX_FLOAT32, num_channels=1) @@ -88,7 +88,7 @@ class app_top_block(stdgui2.std_top_block): else: self.scope = fftsink2.fft_sink_c (panel, fft_size=options.fft_size, - sample_rate=input_rate, + sample_rate=input_rate, ref_scale=options.ref_scale, ref_level=20.0, y_divs = 12, @@ -100,7 +100,7 @@ class app_top_block(stdgui2.std_top_block): self._build_gui(vbox) self._setup_events() - + # set initial values if options.gain is None: @@ -112,7 +112,7 @@ class app_top_block(stdgui2.std_top_block): # if no freq was specified, use the mid-point r = self.src.get_freq_range() options.freq = float(r.start()+r.stop())/2 - + self.set_gain(options.gain) if self.show_debug_info: @@ -137,9 +137,9 @@ class app_top_block(stdgui2.std_top_block): def _form_set_freq(kv): return self.set_freq(kv['freq']) - + vbox.Add(self.scope.win, 10, wx.EXPAND) - + # add control area at the bottom self.myform = myform = form.form() hbox = wx.BoxSizer(wx.HORIZONTAL) @@ -171,7 +171,7 @@ class app_top_block(stdgui2.std_top_block): # FIXME figure out how to have this be a subpanel that is always # created, but has its visibility controlled by foo.Show(True/False) - + def _form_set_samp_rate(kv): return self.set_samp_rate(kv['samprate']) @@ -204,7 +204,7 @@ class app_top_block(stdgui2.std_top_block): hbox.Add((5,0), 0) vbox.Add(hbox, 0, wx.EXPAND) - + def set_freq(self, target_freq): """ Set the center frequency we're interested in. @@ -244,12 +244,12 @@ class app_top_block(stdgui2.std_top_block): self.myform['fs@gbe'].set_value(input_rate) # shd set_samp_rate never fails; always falls back to closest requested. - return True + return True def _setup_events(self): if not self.options.waterfall and not self.options.oscilloscope: self.scope.win.Bind(wx.EVT_LEFT_DCLICK, self.evt_left_dclick) - + def evt_left_dclick(self, event): (ux, uy) = self.scope.win.GetXY(event) if event.CmdDown(): @@ -265,13 +265,13 @@ class app_top_block(stdgui2.std_top_block): (freq, pwr) = points[ind] target_freq = freq/self.scope.win._scale_factor print ind, freq, pwr - self.set_freq(target_freq) + self.set_freq(target_freq) else: # Re-center on clicked frequency target_freq = ux/self.scope.win._scale_factor self.set_freq(target_freq) - - + + def main (): app = stdgui2.stdapp(app_top_block, "SHD FFT", nstatus=1) app.MainLoop() diff --git a/gr-shd/apps/shd_rx_cfile.py b/gr-shd/apps/shd_rx_cfile index 007bc809f..5b4178cf7 100755 --- a/gr-shd/apps/shd_rx_cfile.py +++ b/gr-shd/apps/shd_rx_cfile @@ -1,28 +1,28 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# """ Read samples from a SHD device and write to file formatted as binary -outputs single precision complex float values or complex short values +outputs single precision complex float values or complex short values (interleaved 16 bit signed short integers). """ @@ -50,7 +50,7 @@ class rx_cfile_block(gr.top_block): io_type=shd.io_type.COMPLEX_FLOAT32, num_channels=1) self._sink = gr.file_sink(gr.sizeof_gr_complex, filename) - + # Set receiver sample rate self._src.set_samp_rate(options.samp_rate) @@ -90,7 +90,7 @@ class rx_cfile_block(gr.top_block): self.connect(self._src, self._head, self._sink) input_rate = self._src.get_samp_rate() - + if options.verbose: print "Address:", options.address print "Rx gain:", options.gain @@ -106,7 +106,7 @@ class rx_cfile_block(gr.top_block): else: print "Writing 32-bit complex floats" print "Output filename:", filename - + def get_options(): usage="%prog: [options] output_filename" parser = OptionParser(option_class=eng_option, usage=usage) @@ -133,19 +133,19 @@ def get_options(): if len(args) != 1: parser.print_help() raise SystemExit, 1 - + if options.freq is None: parser.print_help() sys.stderr.write('You must specify the frequency with -f FREQ\n'); raise SystemExit, 1 - + return (options, args[0]) if __name__ == '__main__': (options, filename) = get_options() tb = rx_cfile_block(options, filename) - + try: tb.run() except KeyboardInterrupt: diff --git a/gr-shd/apps/shd_siggen.py b/gr-shd/apps/shd_siggen index 112eeea15..9629d80d2 100755 --- a/gr-shd/apps/shd_siggen.py +++ b/gr-shd/apps/shd_siggen @@ -1,28 +1,28 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# """ Read samples from a SHD device and write to file formatted as binary -outputs single precision complex float values or complex short values +outputs single precision complex float values or complex short values (interleaved 16 bit signed short integers). """ @@ -74,14 +74,14 @@ class shd_siggen(gr.top_block): # Create head block if needed and wire it up self.connect(self._src, self._snk) input_rate = self._snk.get_samp_rate() - + if options.verbose: print "Address:", options.address print "Rx gain:", options.gain print "Rx baseband frequency:", n2s(tr.actual_rf_freq) print "Rx DDC frequency:", n2s(tr.actual_dsp_freq) print "Rx Sample Rate:", n2s(input_rate) - + def get_options(): usage="%prog: [options]" parser = OptionParser(option_class=eng_option, usage=usage) @@ -106,14 +106,14 @@ def get_options(): parser.print_help() sys.stderr.write('You must specify the frequency with -f FREQ\n'); raise SystemExit, 1 - + return (options) if __name__ == '__main__': options = get_options() tb = shd_siggen(options) - + try: tb.run() except KeyboardInterrupt: diff --git a/gr-shd/grc/.gitignore b/gr-shd/grc/.gitignore deleted file mode 100644 index 2c261c55b..000000000 --- a/gr-shd/grc/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/shd_smini*.xml -/Makefile -/Makefile.in diff --git a/gr-shd/grc/CMakeLists.txt b/gr-shd/grc/CMakeLists.txt index f35d36ba3..67a8fc13f 100644 --- a/gr-shd/grc/CMakeLists.txt +++ b/gr-shd/grc/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-shd/grc/Makefile.am b/gr-shd/grc/Makefile.am deleted file mode 100644 index c44ad1b4e..000000000 --- a/gr-shd/grc/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -grcblocksdir = $(grc_blocksdir) - -generated_shd_smini_blocks = \ - shd_smini_source.xml \ - shd_smini_sink.xml - -BUILT_SOURCES += $(generated_shd_smini_blocks) - -dist_grcblocks_DATA = \ - shd_block_tree.xml \ - $(BUILT_SOURCES) - -######################################################################## -# Rules for generating the source and sink xml wrappers -######################################################################## -EXTRA_DIST += $(srcdir)/gen_shd_smini_blocks.py - -$(generated_shd_smini_blocks): $(srcdir)/gen_shd_smini_blocks.py - @echo "generating $@..." - $(PYTHON) $< $@ diff --git a/gr-shd/include/.gitignore b/gr-shd/include/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-shd/include/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-shd/include/CMakeLists.txt b/gr-shd/include/CMakeLists.txt index c4db1fd22..34349841c 100644 --- a/gr-shd/include/CMakeLists.txt +++ b/gr-shd/include/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-shd/include/Makefile.am b/gr-shd/include/Makefile.am deleted file mode 100644 index 2cb1597df..000000000 --- a/gr-shd/include/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -grinclude_HEADERS = \ - gr_shd_api.h \ - gr_shd_smini_source.h \ - gr_shd_smini_sink.h
\ No newline at end of file diff --git a/gr-shd/include/gr_shd_api.h b/gr-shd/include/gr_shd_api.h index e6773c3f3..13b755cbd 100644 --- a/gr-shd/include/gr_shd_api.h +++ b/gr-shd/include/gr_shd_api.h @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-shd/include/gr_shd_smini_sink.h b/gr-shd/include/gr_shd_smini_sink.h index 938958687..b807e5c87 100644 --- a/gr-shd/include/gr_shd_smini_sink.h +++ b/gr-shd/include/gr_shd_smini_sink.h @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -34,30 +34,30 @@ GR_SHD_API boost::shared_ptr<shd_smini_sink> shd_make_smini_sink( size_t num_channels ); -class GR_SHD_API shd_smini_sink : virtual public gr_sync_block +class GR_SHD_API shd_smini_sink : virtual public gr_sync_block { public: - + /*! * Set the subdevice specification. * \param spec the subdev spec markup string * \param mboard the motherboard index 0 to M-1 */ virtual void set_subdev_spec(const std::string &spec, size_t mboard = 0) = 0; - + /*! * Set the sample rate for the smini device. * \param rate a new rate in Sps */ virtual void set_samp_rate(double rate) = 0; - + /*! * Get the sample rate for the smini device. * This is the actual sample rate and may differ from the rate set. * \return the actual rate in Sps */ virtual double get_samp_rate(void) = 0; - + /*! * Tune the smini device to the desired center frequency. * \param tune_request the tune request instructions @@ -86,14 +86,14 @@ class GR_SHD_API shd_smini_sink : virtual public gr_sync_block * \return the frequency in Hz */ virtual double get_center_freq(size_t chan = 0) = 0; - + /*! * Get the tunable frequency range. * \param chan the channel index 0 to N-1 * \return the frequency range in Hz */ virtual shd::freq_range_t get_freq_range(size_t chan = 0) = 0; - + /*! * Set the gain for the dboard. * \param gain the gain in dB @@ -116,7 +116,7 @@ class GR_SHD_API shd_smini_sink : virtual public gr_sync_block * \return the actual gain in dB */ virtual double get_gain(size_t chan = 0) = 0; - + /*! * Get the actual dboard gain setting of named stage. * \param name the name of the gain stage @@ -132,7 +132,7 @@ class GR_SHD_API shd_smini_sink : virtual public gr_sync_block * \return the actual gain in dB */ virtual std::vector<std::string> get_gain_names(size_t chan = 0) = 0; - + /*! * Get the settable gain range. * \param chan the channel index 0 to N-1 @@ -148,7 +148,7 @@ class GR_SHD_API shd_smini_sink : virtual public gr_sync_block */ virtual shd::gain_range_t get_gain_range(const std::string &name, size_t chan = 0) = 0; - + /*! * Set the antenna to use. * \param ant the antenna string @@ -156,21 +156,21 @@ class GR_SHD_API shd_smini_sink : virtual public gr_sync_block */ virtual void set_antenna(const std::string &ant, size_t chan = 0) = 0; - + /*! * Get the antenna in use. * \param chan the channel index 0 to N-1 * \return the antenna string */ virtual std::string get_antenna(size_t chan = 0) = 0; - + /*! * Get a list of possible antennas. * \param chan the channel index 0 to N-1 * \return a vector of antenna strings */ virtual std::vector<std::string> get_antennas(size_t chan = 0) = 0; - + /*! * Set the subdevice bandpass filter. * \param chan the channel index 0 to N-1 @@ -186,14 +186,14 @@ class GR_SHD_API shd_smini_sink : virtual public gr_sync_block */ virtual shd::sensor_value_t get_dboard_sensor(const std::string &name, size_t chan = 0) = 0; - + /*! * Get a list of possible daughterboard sensor names. * \param chan the channel index 0 to N-1 * \return a vector of sensor names */ virtual std::vector<std::string> get_dboard_sensor_names(size_t chan = 0) = 0; - + /*! * Get a motherboard sensor value. * \param name the name of the sensor @@ -224,28 +224,28 @@ class GR_SHD_API shd_smini_sink : virtual public gr_sync_block * \return the clock rate in Hz */ virtual double get_clock_rate(size_t mboard = 0) = 0; - + /*! * Set the master clock rate. * \param rate the new rate in Hz * \param mboard the motherboard index 0 to M-1 */ virtual void set_clock_rate(double rate, size_t mboard = 0) = 0; - + /*! * Get the current time registers. * \param mboard the motherboard index 0 to M-1 * \return the current smini time */ virtual shd::time_spec_t get_time_now(size_t mboard = 0) = 0; - + /*! * Get the time when the last pps pulse occured. * \param mboard the motherboard index 0 to M-1 * \return the current smini time */ virtual shd::time_spec_t get_time_last_pps(size_t mboard = 0) = 0; - + /*! * Sets the time registers immediately. * \param time_spec the new time @@ -259,19 +259,19 @@ class GR_SHD_API shd_smini_sink : virtual public gr_sync_block * \param time_spec the new time */ virtual void set_time_next_pps(const shd::time_spec_t &time_spec) = 0; - + /*! * Sync the time registers with an unknown pps edge. * \param time_spec the new time */ virtual void set_time_unknown_pps(const shd::time_spec_t &time_spec) = 0; - + /*! * Get access to the underlying shd dboard iface object. * \return the dboard_iface object */ virtual shd::xmini::dboard_iface::sptr get_dboard_iface(size_t chan = 0) = 0; - + /*! * Get access to the underlying shd device object. * \return the multi smini device object diff --git a/gr-shd/include/gr_shd_smini_source.h b/gr-shd/include/gr_shd_smini_source.h index 3e3dbf427..11c8563fe 100644 --- a/gr-shd/include/gr_shd_smini_source.h +++ b/gr-shd/include/gr_shd_smini_source.h @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -37,7 +37,7 @@ GR_SHD_API boost::shared_ptr<shd_smini_source> shd_make_smini_source( class GR_SHD_API shd_smini_source : virtual public gr_sync_block { public: - + /*! * Set the subdevice specification. * \param spec the subdev spec markup string @@ -45,7 +45,7 @@ class GR_SHD_API shd_smini_source : virtual public gr_sync_block */ virtual void set_subdev_spec(const std::string &spec, size_t mboard = 0) = 0; - + /*! * Set the sample rate for the smini device. * \param rate a new rate in Sps @@ -58,7 +58,7 @@ class GR_SHD_API shd_smini_source : virtual public gr_sync_block * \return the actual rate in Sps */ virtual double get_samp_rate(void) = 0; - + /*! * Tune the smini device to the desired center frequency. * \param tune_request the tune request instructions @@ -69,7 +69,7 @@ class GR_SHD_API shd_smini_source : virtual public gr_sync_block const shd::tune_request_t tune_request, size_t chan = 0 ) = 0; - + /*! * Tune the smini device to the desired center frequency. * This is a wrapper around set center freq so that in this case, @@ -81,28 +81,28 @@ class GR_SHD_API shd_smini_source : virtual public gr_sync_block shd::tune_result_t set_center_freq(double freq, size_t chan = 0){ return set_center_freq(shd::tune_request_t(freq), chan); } - + /*! * Get the center frequency. * \param chan the channel index 0 to N-1 * \return the frequency in Hz */ virtual double get_center_freq(size_t chan = 0) = 0; - + /*! * Get the tunable frequency range. * \param chan the channel index 0 to N-1 * \return the frequency range in Hz */ virtual shd::freq_range_t get_freq_range(size_t chan = 0) = 0; - + /*! * Set the gain for the dboard. * \param gain the gain in dB * \param chan the channel index 0 to N-1 */ virtual void set_gain(double gain, size_t chan = 0) = 0; - + /*! * Set the named gain on the dboard. * \param gain the gain in dB @@ -111,14 +111,14 @@ class GR_SHD_API shd_smini_source : virtual public gr_sync_block */ virtual void set_gain(double gain, const std::string &name, size_t chan = 0) = 0; - + /*! * Get the actual dboard gain setting. * \param chan the channel index 0 to N-1 * \return the actual gain in dB */ virtual double get_gain(size_t chan = 0) = 0; - + /*! * Get the actual dboard gain setting of named stage. * \param name the name of the gain stage @@ -127,21 +127,21 @@ class GR_SHD_API shd_smini_source : virtual public gr_sync_block */ virtual double get_gain(const std::string &name, size_t chan = 0) = 0; - + /*! * Get the actual dboard gain setting of named stage. * \param chan the channel index 0 to N-1 * \return the actual gain in dB */ virtual std::vector<std::string> get_gain_names(size_t chan = 0) = 0; - + /*! * Get the settable gain range. * \param chan the channel index 0 to N-1 * \return the gain range in dB */ virtual shd::gain_range_t get_gain_range(size_t chan = 0) = 0; - + /*! * Get the settable gain range. * \param name the name of the gain stage @@ -150,7 +150,7 @@ class GR_SHD_API shd_smini_source : virtual public gr_sync_block */ virtual shd::gain_range_t get_gain_range(const std::string &name, size_t chan = 0) = 0; - + /*! * Set the antenna to use. * \param ant the antenna string @@ -158,21 +158,21 @@ class GR_SHD_API shd_smini_source : virtual public gr_sync_block */ virtual void set_antenna(const std::string &ant, size_t chan = 0) = 0; - + /*! * Get the antenna in use. * \param chan the channel index 0 to N-1 * \return the antenna string */ virtual std::string get_antenna(size_t chan = 0) = 0; - + /*! * Get a list of possible antennas. * \param chan the channel index 0 to N-1 * \return a vector of antenna strings */ virtual std::vector<std::string> get_antennas(size_t chan = 0) = 0; - + /*! * Set the subdevice bandpass filter. * \param bandwidth the filter bandwidth in Hz @@ -180,7 +180,7 @@ class GR_SHD_API shd_smini_source : virtual public gr_sync_block */ virtual void set_bandwidth(double bandwidth, size_t chan = 0) = 0; - + /*! * Get a daughterboard sensor value. * \param name the name of the sensor @@ -189,14 +189,14 @@ class GR_SHD_API shd_smini_source : virtual public gr_sync_block */ virtual shd::sensor_value_t get_dboard_sensor(const std::string &name, size_t chan = 0) = 0; - + /*! * Get a list of possible daughterboard sensor names. * \param chan the channel index 0 to N-1 * \return a vector of sensor names */ virtual std::vector<std::string> get_dboard_sensor_names(size_t chan = 0) = 0; - + /*! * Get a motherboard sensor value. * \param name the name of the sensor @@ -205,14 +205,14 @@ class GR_SHD_API shd_smini_source : virtual public gr_sync_block */ virtual shd::sensor_value_t get_mboard_sensor(const std::string &name, size_t mboard = 0) = 0; - + /*! * Get a list of possible motherboard sensor names. * \param mboard the motherboard index 0 to M-1 * \return a vector of sensor names */ virtual std::vector<std::string> get_mboard_sensor_names(size_t mboard = 0) = 0; - + /*! * Set the clock configuration. * \param clock_config the new configuration @@ -220,14 +220,14 @@ class GR_SHD_API shd_smini_source : virtual public gr_sync_block */ virtual void set_clock_config(const shd::clock_config_t &clock_config, size_t mboard = 0) = 0; - + /*! * Get the master clock rate. * \param mboard the motherboard index 0 to M-1 * \return the clock rate in Hz */ virtual double get_clock_rate(size_t mboard = 0) = 0; - + /*! * Set the master clock rate. * \param rate the new rate in Hz @@ -242,14 +242,14 @@ class GR_SHD_API shd_smini_source : virtual public gr_sync_block * \return the current smini time */ virtual shd::time_spec_t get_time_now(size_t mboard = 0) = 0; - + /*! * Get the time when the last pps pulse occured. * \param mboard the motherboard index 0 to M-1 * \return the current smini time */ virtual shd::time_spec_t get_time_last_pps(size_t mboard = 0) = 0; - + /*! * Sets the time registers immediately. * \param time_spec the new time @@ -263,19 +263,19 @@ class GR_SHD_API shd_smini_source : virtual public gr_sync_block * \param time_spec the new time */ virtual void set_time_next_pps(const shd::time_spec_t &time_spec) = 0; - + /*! * Sync the time registers with an unknown pps edge. * \param time_spec the new time */ virtual void set_time_unknown_pps(const shd::time_spec_t &time_spec) = 0; - + /*! * Get access to the underlying shd dboard iface object. * \return the dboard_iface object */ virtual shd::xmini::dboard_iface::sptr get_dboard_iface(size_t chan = 0) = 0; - + /*! * Get access to the underlying shd device object. * \return the multi smini device object diff --git a/gr-shd/lib/.gitignore b/gr-shd/lib/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-shd/lib/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-shd/lib/CMakeLists.txt b/gr-shd/lib/CMakeLists.txt index e8528fddb..9ddf109af 100644 --- a/gr-shd/lib/CMakeLists.txt +++ b/gr-shd/lib/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-shd/lib/Makefile.am b/gr-shd/lib/Makefile.am deleted file mode 100644 index 7a887aebf..000000000 --- a/gr-shd/lib/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -AM_CPPFLAGS = \ - $(STD_DEFINES_AND_INCLUDES) \ - $(WITH_INCLUDES) \ - $(SHD_CPPFLAGS) \ - -Dgnuradio_shd_EXPORTS - -lib_LTLIBRARIES = libgnuradio-shd.la - -libgnuradio_shd_la_SOURCES = \ - gr_shd_smini_source.cc \ - gr_shd_smini_sink.cc - -libgnuradio_shd_la_LIBADD = \ - $(GNURADIO_CORE_LA) \ - $(SHD_LIBS) - -libgnuradio_shd_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) - -noinst_HEADERS = diff --git a/gr-shd/lib/gr_shd_smini_sink.cc b/gr-shd/lib/gr_shd_smini_sink.cc index c9fb222d0..658f5719e 100644 --- a/gr-shd/lib/gr_shd_smini_sink.cc +++ b/gr-shd/lib/gr_shd_smini_sink.cc @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -52,11 +52,11 @@ public: _dev->set_tx_rate(rate); _sample_rate = this->get_samp_rate(); } - + double get_samp_rate(void){ return _dev->get_tx_rate(); } - + shd::tune_result_t set_center_freq( const shd::tune_request_t tune_request, size_t chan) { @@ -67,142 +67,142 @@ public: { return _dev->get_tx_freq(chan); } - + shd::freq_range_t get_freq_range(size_t chan) { return _dev->get_tx_freq_range(chan); } - + void set_gain(double gain, size_t chan) { return _dev->set_tx_gain(gain, chan); } - + void set_gain(double gain, const std::string &name, size_t chan) { return _dev->set_tx_gain(gain, name, chan); } - + double get_gain(size_t chan){ return _dev->get_tx_gain(chan); } - + double get_gain(const std::string &name, size_t chan) { return _dev->get_tx_gain(name, chan); } - + std::vector<std::string> get_gain_names(size_t chan) { return _dev->get_tx_gain_names(chan); } - + shd::gain_range_t get_gain_range(size_t chan) { return _dev->get_tx_gain_range(chan); } - + shd::gain_range_t get_gain_range(const std::string &name, size_t chan) { return _dev->get_tx_gain_range(name, chan); } - + void set_antenna(const std::string &ant, size_t chan) { return _dev->set_tx_antenna(ant, chan); } - + std::string get_antenna(size_t chan) { return _dev->get_tx_antenna(chan); } - + std::vector<std::string> get_antennas(size_t chan) { return _dev->get_tx_antennas(chan); } - + void set_bandwidth(double bandwidth, size_t chan) { return _dev->set_tx_bandwidth(bandwidth, chan); } - + shd::sensor_value_t get_dboard_sensor(const std::string &name, size_t chan) { return _dev->get_tx_sensor(name, chan); } - + std::vector<std::string> get_dboard_sensor_names(size_t chan) { return _dev->get_tx_sensor_names(chan); } - + shd::sensor_value_t get_mboard_sensor(const std::string &name, size_t mboard) { return _dev->get_mboard_sensor(name, mboard); } - + std::vector<std::string> get_mboard_sensor_names(size_t mboard) { return _dev->get_mboard_sensor_names(mboard); } - + void set_clock_config(const shd::clock_config_t &clock_config, size_t mboard) { return _dev->set_clock_config(clock_config, mboard); } - + double get_clock_rate(size_t mboard) { return _dev->get_master_clock_rate(mboard); } - + void set_clock_rate(double rate, size_t mboard) { return _dev->set_master_clock_rate(rate, mboard); } - + shd::time_spec_t get_time_now(size_t mboard = 0) { return _dev->get_time_now(mboard); } - + shd::time_spec_t get_time_last_pps(size_t mboard) { return _dev->get_time_last_pps(mboard); } - + void set_time_now(const shd::time_spec_t &time_spec, size_t mboard) { return _dev->set_time_now(time_spec, mboard); } - + void set_time_next_pps(const shd::time_spec_t &time_spec) { return _dev->set_time_next_pps(time_spec); } - + void set_time_unknown_pps(const shd::time_spec_t &time_spec) { return _dev->set_time_unknown_pps(time_spec); } - + shd::xmini::dboard_iface::sptr get_dboard_iface(size_t chan) { return _dev->get_tx_dboard_iface(chan); } - + shd::xmini::multi_xmini::sptr get_device(void) { return _dev; } - + /******************************************************************* * Work ******************************************************************/ @@ -214,7 +214,7 @@ public: _metadata.start_of_burst = false; _metadata.end_of_burst = false; _metadata.has_time_spec = _has_time_spec; - + size_t num_sent = _dev->get_device()->send( input_items, noutput_items, _metadata, _type, shd::device::SEND_MODE_FULL_BUFF, 1.0); @@ -223,7 +223,7 @@ public: _metadata.time_spec += shd::time_spec_t(0, num_sent, _sample_rate); return num_sent; } - + //Send an empty start-of-burst packet to begin streaming. //Set at a time in the near future to avoid late packets. bool start(void) @@ -232,13 +232,13 @@ public: _metadata.end_of_burst = false; _metadata.has_time_spec = _has_time_spec; _metadata.time_spec = get_time_now() + shd::time_spec_t(0.01); - + _dev->get_device()->send( gr_vector_const_void_star(_nchan), 0, _metadata, _type, shd::device::SEND_MODE_ONE_PACKET, 1.0); return true; } - + //Send an empty end-of-burst packet to end streaming. //Ending the burst avoids an underflow error on stop. bool stop(void) @@ -246,13 +246,13 @@ public: _metadata.start_of_burst = false; _metadata.end_of_burst = true; _metadata.has_time_spec = false; - + _dev->get_device()->send( gr_vector_const_void_star(_nchan), 0, _metadata, _type, shd::device::SEND_MODE_ONE_PACKET, 1.0); return true; } - + protected: shd::xmini::multi_xmini::sptr _dev; const shd::io_type_t _type; diff --git a/gr-shd/lib/gr_shd_smini_source.cc b/gr-shd/lib/gr_shd_smini_source.cc index caf98f311..58559a623 100644 --- a/gr-shd/lib/gr_shd_smini_source.cc +++ b/gr-shd/lib/gr_shd_smini_source.cc @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -48,7 +48,7 @@ public: { _dev = shd::xmini::multi_xmini::make(device_addr); } - + void set_subdev_spec(const std::string &spec, size_t mboard) { return _dev->set_rx_subdev_spec(spec, mboard); @@ -85,7 +85,7 @@ public: return _dev->set_rx_gain(gain, chan); } - void set_gain(double gain, const std::string &name, + void set_gain(double gain, const std::string &name, size_t chan) { return _dev->set_rx_gain(gain, name, chan); @@ -100,7 +100,7 @@ public: { return _dev->get_rx_gain(name, chan); } - + std::vector<std::string> get_gain_names(size_t chan) { return _dev->get_rx_gain_names(chan); @@ -111,7 +111,7 @@ public: return _dev->get_rx_gain_range(chan); } - shd::gain_range_t get_gain_range(const std::string &name, + shd::gain_range_t get_gain_range(const std::string &name, size_t chan) { return _dev->get_rx_gain_range(name, chan); @@ -136,8 +136,8 @@ public: { return _dev->set_rx_bandwidth(bandwidth, chan); } - - shd::sensor_value_t get_dboard_sensor(const std::string &name, + + shd::sensor_value_t get_dboard_sensor(const std::string &name, size_t chan) { return _dev->get_rx_sensor(name, chan); @@ -147,18 +147,18 @@ public: { return _dev->get_rx_sensor_names(chan); } - + shd::sensor_value_t get_mboard_sensor(const std::string &name, size_t mboard) { return _dev->get_mboard_sensor(name, mboard); } - + std::vector<std::string> get_mboard_sensor_names(size_t mboard) { return _dev->get_mboard_sensor_names(mboard); } - + void set_clock_config(const shd::clock_config_t &clock_config, size_t mboard) { @@ -232,23 +232,23 @@ public: output_items, noutput_items, _metadata, _type, shd::device::RECV_MODE_ONE_PACKET, 1.0); } - + //handle possible errors conditions switch(_metadata.error_code) { case shd::rx_metadata_t::ERROR_CODE_NONE: //TODO insert tag for time stamp break; - + case shd::rx_metadata_t::ERROR_CODE_TIMEOUT: //Assume that the user called stop() on the flow graph. //However, a timeout can occur under error conditions. return WORK_DONE; - + case shd::rx_metadata_t::ERROR_CODE_OVERFLOW: //ignore overflows and try work again //TODO insert tag for overflow return work(noutput_items, input_items, output_items); - + default: std::cout << boost::format("SHD source block got error code 0x%x" ) % _metadata.error_code << std::endl; @@ -257,7 +257,7 @@ public: return num_samps; } - + bool start(void) { //setup a stream command that starts streaming slightly in the future @@ -268,7 +268,7 @@ public: _dev->issue_stream_cmd(stream_cmd); return true; } - + bool stop(void) { _dev->issue_stream_cmd(shd::stream_cmd_t::STREAM_MODE_STOP_CONTINUOUS); diff --git a/gr-shd/swig/.gitignore b/gr-shd/swig/.gitignore deleted file mode 100644 index 23ae38f9b..000000000 --- a/gr-shd/swig/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/shd_swig.cc -/shd_swig.py -/Makefile -/Makefile.in -/guile -/python -/run_guile_tests -/run_tests diff --git a/gr-shd/swig/Makefile.am b/gr-shd/swig/Makefile.am deleted file mode 100644 index 1d491956b..000000000 --- a/gr-shd/swig/Makefile.am +++ /dev/null @@ -1,96 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common -include $(top_srcdir)/Makefile.swig - -TESTS = -EXTRA_DIST += run_tests.in run_guile_tests.in $(nobase_guile_DATA) -DISTCLEANFILES += run_tests run_guile_tests - -noinst_PYTHON = qa_shd.py -noinst_GUILE = shd.test - -AM_CPPFLAGS = \ - $(STD_DEFINES_AND_INCLUDES) \ - $(PYTHON_CPPFLAGS) \ - $(SHD_CPPFLAGS) \ - $(WITH_INCLUDES) - -shd_swig_swig_args = $(SHD_CPPFLAGS) - -if GUILE -nobase_guile_DATA = \ - gnuradio/shd.scm -endif - -# ---------------------------------------------------------------- -# The SWIG library - -TOP_SWIG_DOC_IFILES = \ - shd_swig_doc.i - -TOP_SWIG_IFILES = \ - $(TOP_SWIG_DOC_IFILES) \ - shd_swig.i - -BUILT_SOURCES += \ - $(TOP_SWIG_DOC_IFILES) - -EXTRA_DIST += \ - $(TOP_SWIG_DOC_IFILES) - -$(TOP_SWIG_DOC_IFILES): - `echo "" > $@` - -# Install so that they end up available as: -# import gnuradio.shd -# This ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio/shd -shd_swig_pythondir_category = \ - gnuradio/shd - -# additional libraries for linking with the SWIG-generated library -shd_swig_la_swig_libadd = \ - $(top_builddir)/gr-shd/lib/libgnuradio-shd.la - -# additional Python files to be installed along with the SWIG-generated one -shd_swig_python = \ - __init__.py - -# additional SWIG files to be installed -shd_swig_swiginclude_headers = \ - $(TOP_SWIG_DOC_IFILES) - -shd_swig_swig_args = $(SHD_CPPFLAGS) - -## If SHD was installed, defined GR_HAVE_SHD for swigging headers -if GR_DEFINE_HAVE_SHD - shd_swig_swig_args += -DGR_HAVE_SHD -endif - -if PYTHON -TESTS += run_tests -endif - -if GUILE -TESTS += run_guile_tests -endif diff --git a/gr-shd/swig/Makefile.swig.gen b/gr-shd/swig/Makefile.swig.gen deleted file mode 100644 index ebe843bbe..000000000 --- a/gr-shd/swig/Makefile.swig.gen +++ /dev/null @@ -1,145 +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 shd_swig.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/shd_swig -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/shd_swig -## -## 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. - -shd_swig_pythondir_category ?= gnuradio/shd_swig -shd_swig_pylibdir_category ?= $(shd_swig_pythondir_category) -shd_swig_pythondir = $(pythondir)/$(shd_swig_pythondir_category) -shd_swig_pylibdir = $(pyexecdir)/$(shd_swig_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -shd_swig_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/shd_swig -# FIXME: determince whether these should be installed with gnuradio. -shd_swig_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -shd_swig_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 > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -shd_swig_swiginclude_HEADERS = \ - shd_swig.i \ - $(shd_swig_swiginclude_headers) - -if PYTHON -shd_swig_pylib_LTLIBRARIES = \ - _shd_swig.la - -_shd_swig_la_SOURCES = \ - python/shd_swig.cc \ - $(shd_swig_la_swig_sources) - -shd_swig_python_PYTHON = \ - shd_swig.py \ - $(shd_swig_python) - -_shd_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(shd_swig_la_swig_libadd) - -_shd_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(shd_swig_la_swig_ldflags) - -_shd_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(shd_swig_la_swig_cxxflags) - -python/shd_swig.cc: shd_swig.py -shd_swig.py: shd_swig.i - -# Include the python dependencies for this file --include python/shd_swig.d - -endif # end of if python - -if GUILE - -shd_swig_scmlib_LTLIBRARIES = \ - libguile-gnuradio-shd_swig.la -libguile_gnuradio_shd_swig_la_SOURCES = \ - guile/shd_swig.cc \ - $(shd_swig_la_swig_sources) -nobase_shd_swig_scm_DATA = \ - gnuradio/shd_swig.scm \ - gnuradio/shd_swig-primitive.scm -libguile_gnuradio_shd_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(shd_swig_la_swig_libadd) -libguile_gnuradio_shd_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(shd_swig_la_swig_ldflags) -libguile_gnuradio_shd_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(shd_swig_la_swig_cxxflags) - -guile/shd_swig.cc: gnuradio/shd_swig.scm -gnuradio/shd_swig.scm: shd_swig.i -gnuradio/shd_swig-primitive.scm: gnuradio/shd_swig.scm - -# Include the guile dependencies for this file --include guile/shd_swig.d - -endif # end of GUILE - - diff --git a/gr-shd/swig/__init__.py b/gr-shd/swig/__init__.py index d34eb214a..a9dea9420 100644 --- a/gr-shd/swig/__init__.py +++ b/gr-shd/swig/__init__.py @@ -1,18 +1,18 @@ # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-shd/swig/gnuradio/.gitignore b/gr-shd/swig/gnuradio/.gitignore deleted file mode 100644 index adf5c3727..000000000 --- a/gr-shd/swig/gnuradio/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -shd_swig-primitive.scm -shd_swig.scm diff --git a/gr-shd/swig/qa_shd.py b/gr-shd/swig/qa_shd.py index 538de918c..a589fee43 100755 --- a/gr-shd/swig/qa_shd.py +++ b/gr-shd/swig/qa_shd.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005,2008,2010 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 shd_swig @@ -35,6 +35,6 @@ class test_shd(gr_unittest.TestCase): """Just see if we can import the module... They may not have a SHD device connected, etc. Don't try to run anything""" pass - + if __name__ == '__main__': gr_unittest.run(test_shd, "test_shd.xml") diff --git a/gr-shd/swig/run_guile_tests.in b/gr-shd/swig/run_guile_tests.in deleted file mode 100644 index 5d08b0dd5..000000000 --- a/gr-shd/swig/run_guile_tests.in +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -. @top_builddir@/setup_guile_test_env - -# 1st argument is absolute path to hand coded guile source directory -# 2nd argument is absolute path to component C++ shared library build directory -# 3nd argument is absolute path to component SWIG build directory - -add_local_paths \ - @srcdir@ \ - @abs_builddir@ \ - @abs_builddir@ - -@GUILE@ -e main -c '(use-modules (gnuradio test-suite guile-test))' -t @srcdir@ diff --git a/gr-shd/swig/run_tests.in b/gr-shd/swig/run_tests.in deleted file mode 100644 index 580296374..000000000 --- a/gr-shd/swig/run_tests.in +++ /dev/null @@ -1,10 +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 - -@top_builddir@/run_tests.sh \ - @abs_top_srcdir@/gr-shd \ - @abs_top_builddir@/gr-shd \ - @srcdir@ diff --git a/gr-shd/swig/shd.test b/gr-shd/swig/shd.test deleted file mode 100644 index 7b118a081..000000000 --- a/gr-shd/swig/shd.test +++ /dev/null @@ -1,37 +0,0 @@ -;;; -*- Scheme -*- -;;; -;;; Copyright 2010 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, see <http://www.gnu.org/licenses/>. -;;; - -;;; If you're using Emacs's Scheme mode: -;;; (put 'with-test-prefix 'scheme-indent-function 1) - -;;; See the comments in gnuradio/test-suite/lib.scm for info on writing tests. -;;; See also the very end of the file, where the test-equal, test-eqv -;;; and test-eq macros are defined. - -(define-module (test-module) - #:use-module (oop goops) - #:use-module (gnuradio core) - #:use-module (gnuradio test-suite lib) - #:duplicates (merge-generics replace check)) - -;;; Just see if we can import the module... -;;; They may not have a SHD device attached, powered up etc. - -(use-modules (gnuradio shd)) diff --git a/gr-shd/swig/shd_swig.i b/gr-shd/swig/shd_swig.i index 4ff200ec6..9d5dae51c 100644 --- a/gr-shd/swig/shd_swig.i +++ b/gr-shd/swig/shd_swig.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -125,14 +125,4 @@ static const size_t ALL_MBOARDS = shd::xmini::multi_xmini::ALL_MBOARDS; %} static const size_t ALL_MBOARDS; -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-shd_swig" "scm_init_gnuradio_shd_swig_module") -%} - -%goops %{ -(use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif /* SWIGGUILE */ - #endif /* GR_HAVE_SHD */ diff --git a/gr-trellis/.gitignore b/gr-trellis/.gitignore deleted file mode 100644 index f3462d009..000000000 --- a/gr-trellis/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -/Makefile -/Makefile.in -/aclocal.m4 -/configure -/config.h.in -/stamp-h.in -/libtool -/config.log -/config.h -/config.cache -/config.status -/missing -/stamp-h -/stamp-h1 -/.deps -/.libs -/*.la -/*.lo -/autom4te.cache -/*.cache -/missing -/make.log -/*.pc diff --git a/gr-trellis/CMakeLists.txt b/gr-trellis/CMakeLists.txt index dc077571c..16a3e7c19 100644 --- a/gr-trellis/CMakeLists.txt +++ b/gr-trellis/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, @@ -37,6 +37,8 @@ GR_SET_GLOBAL(GR_TRELLIS_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/lib ) +SET(GR_PKG_TRELLIS_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/trellis) + ######################################################################## # Begin conditional configuration ######################################################################## @@ -97,7 +99,8 @@ add_subdirectory(doc) if(ENABLE_PYTHON) add_subdirectory(grc) add_subdirectory(src/python) - add_subdirectory(src/examples) + add_subdirectory(src/examples/python) + add_subdirectory(src/examples/grc) endif(ENABLE_PYTHON) ######################################################################## diff --git a/gr-trellis/Makefile.am b/gr-trellis/Makefile.am deleted file mode 100644 index 89d190ecf..000000000 --- a/gr-trellis/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright 2004,2006 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 grc doc - -pkgconfigdir = $(libdir)/pkgconfig -dist_pkgconfig_DATA = gnuradio-trellis.pc diff --git a/gr-trellis/README b/gr-trellis/README index e6a31de02..11b925b00 100644 --- a/gr-trellis/README +++ b/gr-trellis/README @@ -1,23 +1,23 @@ # # Copyright 2005,2006 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. -# +# The doc directory is not built by default. This is to avoid spurious diff --git a/gr-trellis/doc/.gitignore b/gr-trellis/doc/.gitignore deleted file mode 100644 index 98c25189f..000000000 --- a/gr-trellis/doc/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -/*.html diff --git a/gr-trellis/doc/CMakeLists.txt b/gr-trellis/doc/CMakeLists.txt index a45202861..568539582 100644 --- a/gr-trellis/doc/CMakeLists.txt +++ b/gr-trellis/doc/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-trellis/doc/Makefile.am b/gr-trellis/doc/Makefile.am deleted file mode 100644 index 9e6b81ac0..000000000 --- a/gr-trellis/doc/Makefile.am +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright 2004,2005,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 - -HTML_FILES = - -if HAS_XMLTO -HTML_FILES += \ - gr-trellis.html -endif - -all: $(HTML_FILES) - -EXTRA_DIST += \ - gr-trellis.xml \ - make_numbered_listing.py \ - test_tcm.py \ - test_tcm.py.xml \ - test_viterbi_equalization1.py \ - test_viterbi_equalization1.py.xml - -BUILT_XML_FILES = - -htmldocdir = $(gr_docdir)/html -htmldoc_DATA = $(HTML_FILES) - -# ---------------------------------------------------------------- - -gr-trellis.html : gr-trellis.xml - xmlto html-nochunks $(top_srcdir)/gr-trellis/doc/gr-trellis.xml - -test_tcm.py.xml : test_tcm.py make_numbered_listing.py - $(srcdir)/make_numbered_listing.py $< - -test_viterbi_equalization1.py.xml : test_viterbi_equalization1.py make_numbered_listing.py - $(srcdir)/make_numbered_listing.py $< - -clean-local: - $(RM) -fr $(HTML_FILES) *~ diff --git a/gr-trellis/doc/gr-trellis.xml b/gr-trellis/doc/gr-trellis.xml index 5f1921343..4657dab38 100644 --- a/gr-trellis/doc/gr-trellis.xml +++ b/gr-trellis/doc/gr-trellis.xml @@ -31,8 +31,8 @@ </revhistory> --> -<abstract><para>This document provides a description of the -Finite State Machine (FSM) implementation and the related +<abstract><para>This document provides a description of the +Finite State Machine (FSM) implementation and the related trellis-based encoding and decoding algorithms for GNU Radio. </para></abstract> @@ -46,21 +46,21 @@ for GNU Radio. <sect1 id="intro"><title>Introduction</title> <para> -The basic goal of the implementation is to have a generic way of -describing an FSM that is decoupled from whether it describes a -convolutional -code (CC), a trellis code (TC), an inter-symbol interference (ISI) +The basic goal of the implementation is to have a generic way of +describing an FSM that is decoupled from whether it describes a +convolutional +code (CC), a trellis code (TC), an inter-symbol interference (ISI) channel, or any other communication system that can be modeled with an FSM. To achieve this goal, we need to separate the pure FSM descrition from the -rest of the model details. For instance, in the case of a rate 2/3 TC, +rest of the model details. For instance, in the case of a rate 2/3 TC, the FSM should not involve details about the modulation used (it can be an 8-ary PAM, or 8-PSK, etc). Similarly, when attempting maximum likelihood sequence detection (MLSD)--using for instance the Viterbi algorithm (VA)-- the VA implementation should not be concerned with the channel details (such as modulations, channel type, hard or soft inputs, etc). Clearly, having generality as the primary goal implies some penalty -on the code efficiency, as compared to fully custom implementations. +on the code efficiency, as compared to fully custom implementations. </para> <para> @@ -74,11 +74,11 @@ We will now describe the implementation of the basic ingedient, the FSM. <sect1 id="fsm"><title>The FSM class</title> <para>An FSM describes the evolution of a system with inputs -x<subscript>k</subscript>, states s<subscript>k</subscript> and outputs y<subscript>k</subscript>. At time k the FSM state is s<subscript>k</subscript>. +x<subscript>k</subscript>, states s<subscript>k</subscript> and outputs y<subscript>k</subscript>. At time k the FSM state is s<subscript>k</subscript>. Upon reception of a new input symbol x<subscript>k</subscript>, it outputs an output symbol -y<subscript>k</subscript> which is a function of both x<subscript>k</subscript> and s<subscript>k</subscript>. +y<subscript>k</subscript> which is a function of both x<subscript>k</subscript> and s<subscript>k</subscript>. It will then move to a next state s<subscript>k+1</subscript>. -An FSM has a finite number of states, input and output symbols. +An FSM has a finite number of states, input and output symbols. All these are formally described as follows: </para> @@ -86,19 +86,19 @@ All these are formally described as follows: <listitem><para>The input alphabet A<subscript>I</subscript>={0,1,2,...,I-1}, with cardinality I, so that x<subscript>k</subscript> takes values in A<subscript>I</subscript>.</para></listitem> <listitem><para>The state alphabet A<subscript>S</subscript>={0,1,2,...,S-1}, with cardinality S, so that s<subscript>k</subscript> takes values in A<subscript>S</subscript>.</para></listitem> <listitem><para>The output alphabet A<subscript>O</subscript>={0,1,2,...,O-1}, with cardinality O, so that y<subscript>k</subscript> takes values in A<subscript>O</subscript></para></listitem> -<listitem><para>The "next-state" function NS: A<subscript>S</subscript> x A<subscript>I</subscript> --> A<subscript>S</subscript>, -with the meaning +<listitem><para>The "next-state" function NS: A<subscript>S</subscript> x A<subscript>I</subscript> --> A<subscript>S</subscript>, +with the meaning s<subscript>k+1</subscript> = NS(s<subscript>k</subscript>, x<subscript>k</subscript>)</para></listitem> -<listitem><para>The "output-symbol" function OS: A<subscript>S</subscript> x A<subscript>I</subscript> --> A<subscript>S</subscript>, -with the meaning +<listitem><para>The "output-symbol" function OS: A<subscript>S</subscript> x A<subscript>I</subscript> --> A<subscript>S</subscript>, +with the meaning y<subscript>k</subscript> = OS(s<subscript>k</subscript>, x<subscript>k</subscript>)</para></listitem> </itemizedlist> <para> -Thus, a complete description of the FSM is given by the +Thus, a complete description of the FSM is given by the the five-tuple (I,S,O,NS,OS). -Observe that implementation details are hidden -in how the outside world interprets these input and output +Observe that implementation details are hidden +in how the outside world interprets these input and output integer symbols. Here is an example of an FSM describing the (2,1) CC with constraint length 3 and generator polynomial matrix @@ -112,15 +112,15 @@ from Proakis-Salehi pg. 779. <para> This CC accepts 1 bit at a time, and outputs 2 bits at a time. It has a shift register storing the last two input bits. -In particular, +In particular, b<subscript>k</subscript>(0)=x<subscript>k</subscript>+ x<subscript>k-1</subscript>+x<subscript>k-2</subscript>, and b<subscript>k</subscript>(1)=x<subscript>k</subscript>+ -x<subscript>k-2</subscript>, where addition is mod-2. +x<subscript>k-2</subscript>, where addition is mod-2. We can represent the state of this system as s<subscript>k</subscript> = (x<subscript>k-1</subscript> x<subscript>k-2</subscript>)<subscript>10</subscript>. In addition we can represent its -output symbol as y<subscript>k</subscript> = (b<subscript>k</subscript>(1) b<subscript>k</subscript>(0))<subscript>10</subscript>. -Based on the above assumptions, the input alphabet A<subscript>I</subscript>={0,1}, so I=2; +output symbol as y<subscript>k</subscript> = (b<subscript>k</subscript>(1) b<subscript>k</subscript>(0))<subscript>10</subscript>. +Based on the above assumptions, the input alphabet A<subscript>I</subscript>={0,1}, so I=2; the state alphabet A<subscript>S</subscript>={0,1,2,3}, so S=4; and the output alphabet A<subscript>O</subscript>={0,1,2,3}, so O=4. The "next-state" function NS(,) is given by @@ -150,12 +150,12 @@ s<subscript>k</subscript> x<subscript>k</subscript> y<subscript>k</subscript> </para> <para> -Note that although the CC outputs 2 bits per time period, following -our approach, there is only one (quaternary) output symbol per -time period (for instance, here we use the decimal representation -of the 2-bits). Also note that the modulation used is not part of -the FSM description: it can be BPSK, OOK, BFSK, QPSK with or without Gray mapping, etc; -it is up to the rest of the program to interpret the meaning of +Note that although the CC outputs 2 bits per time period, following +our approach, there is only one (quaternary) output symbol per +time period (for instance, here we use the decimal representation +of the 2-bits). Also note that the modulation used is not part of +the FSM description: it can be BPSK, OOK, BFSK, QPSK with or without Gray mapping, etc; +it is up to the rest of the program to interpret the meaning of the symbol y<subscript>k</subscript>. </para> @@ -203,9 +203,9 @@ public: </programlisting> <para> -As can be seen, other than the trivial and the copy constructor, +As can be seen, other than the trivial and the copy constructor, there are three additional -ways to construct an FSM. +ways to construct an FSM. </para> <itemizedlist> @@ -258,10 +258,10 @@ For instance, the file containing the information for the example mentioned abov <listitem> <para> -The third way is specific to FSMs representing binary (n,k) conolutional codes. These FSMs are specified by the number of input bits k, the number of output bits n, and the generator matrix, which is a k x n matrix of integers +The third way is specific to FSMs representing binary (n,k) conolutional codes. These FSMs are specified by the number of input bits k, the number of output bits n, and the generator matrix, which is a k x n matrix of integers G = [g<subscript>i,j</subscript>]<subscript>i=1:k, j=1:n</subscript>, given as an one-dimensional STL vector. -Each integer g<subscript>i,j</subscript> is the decimal representation of the -polynomial g<subscript>i,j</subscript>(D) (e.g., g<subscript>i,j</subscript>= 6 = 110<subscript>2</subscript> is interpreted as g<subscript>i,j</subscript>(D)=1+D) describing the connections from the sequence x<subscript>i</subscript> to +Each integer g<subscript>i,j</subscript> is the decimal representation of the +polynomial g<subscript>i,j</subscript>(D) (e.g., g<subscript>i,j</subscript>= 6 = 110<subscript>2</subscript> is interpreted as g<subscript>i,j</subscript>(D)=1+D) describing the connections from the sequence x<subscript>i</subscript> to y<subscript>j</subscript> (e.g., in the above example y<subscript>j</subscript>(k) = x<subscript>i</subscript>(k) + x<subscript>i</subscript>(k-1)). </para> <programlisting> @@ -293,29 +293,29 @@ I have added other constructors as well, eg, one that constructs an FSM appropri <para> As can be seen from the above description, there are -two more variables included in the FSM class implementation, -the PS and the PI matrices. These are computed internally +two more variables included in the FSM class implementation, +the PS and the PI matrices. These are computed internally when an FSM is instantiated and their meaning is as follows. Sometimes (eg, in the traceback operation of the VA) we need -to trace the history of the state or the input sequence. +to trace the history of the state or the input sequence. To do this we would like to know for a given state s<subscript>k</subscript>, what are the possible previous states s<subscript>k-1</subscript> -and what input symbols x<subscript>k-1</subscript> will get us from -s<subscript>k-1</subscript> to s<subscript>k</subscript>. This information can be derived from NS; however we want to have it ready in a -convenient format. -In the following we assume that for any state, -the number of incoming transitions is the same as the number of -outgoing transitions, ie, equal to I. All applications of interest +and what input symbols x<subscript>k-1</subscript> will get us from +s<subscript>k-1</subscript> to s<subscript>k</subscript>. This information can be derived from NS; however we want to have it ready in a +convenient format. +In the following we assume that for any state, +the number of incoming transitions is the same as the number of +outgoing transitions, ie, equal to I. All applications of interest have FSMs satisfying this requirement. -If we arbitrarily index the incoming transitions to the current state +If we arbitrarily index the incoming transitions to the current state by "i", then as i goes from 0 to I-1, PS(s<subscript>k</subscript>,i) gives all previous states s<subscript>k-1</subscript>, and PI(s<subscript>k</subscript>,i) gives all previous inputs x<subscript>k-1</subscript>. -In other words, for any given s<subscript>k</subscript> and any index i=0,1,...I-1, starting from +In other words, for any given s<subscript>k</subscript> and any index i=0,1,...I-1, starting from s<subscript>k-1</subscript>=PS(s<subscript>k</subscript>,i) -with input +with input x<subscript>k-1</subscript>=PI(s<subscript>k</subscript>,i) -will get us to the state s<subscript>k</subscript>. +will get us to the state s<subscript>k</subscript>. More formally, for any i=0,1,...I-1 we have s<subscript>k</subscript> = NS(PS(s<subscript>k</subscript>,i),PI(s<subscript>k</subscript>,i)). @@ -330,7 +330,7 @@ when an FSM is instantiated and their meaning is as follows. TMl(i,j) is the minimum number of trellis steps required to go from state i to state j. Similarly, TMi(i,j) is the initial input required to get you from state i to state j in the minimum number of steps. As an example, if TMl(1,4)=2, it means that you need 2 steps in the trellis to get from state 1 to state 4. Further, if TMi(1,4)=0 it means that the first such step will be followed if when at state 1 the input is 0. Furthermore, suppose that NS(1,0)=2. Then, TMl(2,4) should be 1 (ie, one more step is needed when starting from state 2 and having state 4 as the final destination). Finally, TMi(2,4) will give us the second input required to complete the path from 1 to 4. -These matrices are useful when we want to implement an encoder with proper state termination. For instance, based on these matrices we can evaluate how many +These matrices are useful when we want to implement an encoder with proper state termination. For instance, based on these matrices we can evaluate how many additional input symbols (and which particular inputs) are required to be appended at the end of an input sequence so that the final state is always 0. </para> @@ -351,18 +351,18 @@ In this section we give a brief description of the basic blocks implemented that <!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --> <sect2 id="encoder"><title>Trellis Encoder</title> <para> -The <methodname>trellis.encoder_XX(FSM, ST)</methodname> block instantiates an FSM encoder corresponding to the fsm FSM and having initial state ST. The input and output is a sequence of bytes, shorts or integers. +The <methodname>trellis.encoder_XX(FSM, ST)</methodname> block instantiates an FSM encoder corresponding to the fsm FSM and having initial state ST. The input and output is a sequence of bytes, shorts or integers. </para> </sect2> <!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --> <sect2 id="decoder"><title>Viterbi Decoder</title> <para> -The <methodname>trellis.viterbi_X(FSM, K, S0, SK)</methodname> block instantiates a Viterbi decoder +The <methodname>trellis.viterbi_X(FSM, K, S0, SK)</methodname> block instantiates a Viterbi decoder for a sequence of K trellis steps generated by the given FSM and with initial and final states set to S0 and SK, respectively (S0 and/or SK are set to -1 if the corresponding states are not fixed/known at the receiver side). The output of this block is a sequence of K bytes, shorts or integers representing the estimated input (i.e., uncoded) sequence. -The input is a sequence of K x FSM.O( ) floats, where the k x K + i +The input is a sequence of K x FSM.O( ) floats, where the k x K + i float represents the cost associated with the k-th step in the trellis and the i-th FSM output. Observe that these inputs are generated externally and thus the Viterbi block is not informed of their meaning (they can be genarated as soft or hard inputs, etc); the only requirement is that they represent additive costs. @@ -372,9 +372,9 @@ Observe that these inputs are generated externally and thus the Viterbi block is <!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --> <sect2 id="metrics"><title>Metrics Calculator</title> <para> -The <methodname>trellis.metrics_X(O,D,TABLE,TYPE)</methodname> block is responsible for -transforming the channel output to the stream of metrics appropriate as -inputs to the Viterbi block described above. For each D input bytes/shorts/integers/floats/complexes it produces O output floats +The <methodname>trellis.metrics_X(O,D,TABLE,TYPE)</methodname> block is responsible for +transforming the channel output to the stream of metrics appropriate as +inputs to the Viterbi block described above. For each D input bytes/shorts/integers/floats/complexes it produces O output floats </para> @@ -384,9 +384,9 @@ The parameter TYPE dictates how these metrics are generated: <itemizedlist> <listitem><para> -TRELLIS_EUCLIDEAN: for each D-dimensional vector +TRELLIS_EUCLIDEAN: for each D-dimensional vector r<subscript>k</subscript>= -(r<subscript>k,1</subscript>,r<subscript>k,2</subscript>,...,r<subscript>k,D</subscript>) +(r<subscript>k,1</subscript>,r<subscript>k,2</subscript>,...,r<subscript>k,D</subscript>) evaluates </para> <para> @@ -400,33 +400,33 @@ where TABLE[i * D + j] = c<subscript>i,j</subscript>. <listitem><para> -TRELLIS_HARD_SYMBOL: for each D-dimensional vector +TRELLIS_HARD_SYMBOL: for each D-dimensional vector r<subscript>k</subscript>= -(r<subscript>k,1</subscript>,r<subscript>k,2</subscript>,...,r<subscript>k,D</subscript>) +(r<subscript>k,1</subscript>,r<subscript>k,2</subscript>,...,r<subscript>k,D</subscript>) evaluates </para> <para> -i<subscript>0</subscript>= argmin<subscript>i</subscript> ||r<subscript>k</subscript>-c<subscript>i</subscript>||<superscript>2</superscript> = +i<subscript>0</subscript>= argmin<subscript>i</subscript> ||r<subscript>k</subscript>-c<subscript>i</subscript>||<superscript>2</superscript> = argmin<subscript>i</subscript> sum<subscript>j=1</subscript><superscript>D</superscript> |r<subscript>k,j</subscript>-c<subscript>i,j</subscript>|<superscript>2</superscript> </para> <para> -and outputs a sequence of O floats of the form (0,...,0,1,0,...,0), where the +and outputs a sequence of O floats of the form (0,...,0,1,0,...,0), where the i<subscript>0</subscript> position is set to 1. This corresponds to generating hard inputs (based on the symbol-wise Hamming distance) to the Viterbi algorithm. </para></listitem> <listitem><para> -TRELLIS_HARD_BIT (not yet implemented): for each D-dimensional vector +TRELLIS_HARD_BIT (not yet implemented): for each D-dimensional vector r<subscript>k</subscript>= -(r<subscript>k,1</subscript>,r<subscript>k,2</subscript>,...,r<subscript>k,D</subscript>) +(r<subscript>k,1</subscript>,r<subscript>k,2</subscript>,...,r<subscript>k,D</subscript>) evaluates </para> <para> -i<subscript>0</subscript>= argmin<subscript>i</subscript> ||r<subscript>k</subscript>-c<subscript>i</subscript>||<superscript>2</superscript> = +i<subscript>0</subscript>= argmin<subscript>i</subscript> ||r<subscript>k</subscript>-c<subscript>i</subscript>||<superscript>2</superscript> = argmin<subscript>i</subscript> sum<subscript>j=1</subscript><superscript>D</superscript> (r<subscript>k,j</subscript>-c<subscript>i,j</subscript>)<superscript>2</superscript> </para> <para> -and outputs a sequence of O floats of the form (d<subscript>1</subscript>,d<subscript>2</subscript>,...,d<subscript>O</subscript>), where the +and outputs a sequence of O floats of the form (d<subscript>1</subscript>,d<subscript>2</subscript>,...,d<subscript>O</subscript>), where the d<subscript>i</subscript> is the bitwise Hamming distance between i and i<subscript>0</subscript>. This corresponds to generating hard inputs (based on the bit-wise Hamming distance) to the Viterbi algorithm. </para></listitem> @@ -444,9 +444,9 @@ d<subscript>i</subscript> is the bitwise Hamming distance between i and i<subsc <sect2 id="viterbi_combined"><title>Combined Metrics Calculator and Viterbi Decoder</title> <para> Although the separation of metric calculation and Viterbi algorithm blocks -is consistent with our goal of providing general blocks that can be easily +is consistent with our goal of providing general blocks that can be easily reused, this separation might result in large input/output buffer sizes -betwen blocks. Indeed for an FSM with a large output alphabet, the +betwen blocks. Indeed for an FSM with a large output alphabet, the output of the metric block/input of the Viterbi block is FSM.O( ) floats for each trellis step. Sometimes this results in buffer overflow even for moderate sequence lengths. @@ -471,7 +471,7 @@ the above FSM model can be used in GNU Radio. The communication system that we want to simulate consists of a source generating the -input information in packets, a CC encoding each packet separately, +input information in packets, a CC encoding each packet separately, a memoryless modulator, an additive white Gaussian noise (AWGN) channel, and the VA performing MLSD. @@ -486,14 +486,14 @@ The program is called by ./test_tcm.py fsm_fname Es/No_db repetitions </literallayout> where "fsm_fname" is the file containing the FSM specification of the -tested TCM code, "Es/No_db" is the SNR in dB, and "repetitions" +tested TCM code, "Es/No_db" is the SNR in dB, and "repetitions" are the number of packets to be transmitted and received in order to collect sufficient number of errors for an accurate estimate of the error rate. </para> <para> -The FSM is first intantiated in "main" by +The FSM is first intantiated in "main" by </para> <programlisting> 62 f=trellis.fsm(fname) # get the FSM specification from a file @@ -508,8 +508,8 @@ The FSM is first intantiated in "main" by <para> Each packet has size Kb bits (we choose Kb to be a multiple of 16 so that all bits fit nicely into shorts and can be generated by the lfsr GNU Radio). -Assuming that the FSM input has cardinality I, each input symbol consists -of bitspersymbol=log<subscript>2</subscript>( I ). The Kb/16 shorts are now +Assuming that the FSM input has cardinality I, each input symbol consists +of bitspersymbol=log<subscript>2</subscript>( I ). The Kb/16 shorts are now unpacked to K=Kb/bitspersymbol input symbols that will drive the FSM encoder. </para> @@ -561,9 +561,9 @@ different noise realizations. <para> -Let us examine now the "run_test" function. +Let us examine now the "run_test" function. First we set up the transmitter blocks. -The Kb/16 shorts are first unpacked to +The Kb/16 shorts are first unpacked to symbols consistent with the FSM input alphabet. The FSm encoder requires the FSM specification, and an initial state (which is set to 0 in this example). @@ -581,9 +581,9 @@ and an initial state (which is set to 0 in this example). <para> We now need to modulate the FSM output symbols. -The "chunks_to_symbols_sf" is essentially a memoryless mapper which -for each input symbol y_k -outputs a sequence of D numbers ci1,ci2,...,ciD representing the +The "chunks_to_symbols_sf" is essentially a memoryless mapper which +for each input symbol y_k +outputs a sequence of D numbers ci1,ci2,...,ciD representing the coordianates of the constellation symbol c_i with i=y_k. </para> <programlisting> @@ -607,16 +607,16 @@ r_k=(rk1,rk2,...,rkD). Part of the design methodology was to decouple the FSM and VA from the details of the modulation, channel, receiver front-end etc. In order for the VA to run, we only need to provide it with -a number representing a cost associated with each transition -in the trellis. Then the VA will find the sequence with -the smallest total cost through the trellis. +a number representing a cost associated with each transition +in the trellis. Then the VA will find the sequence with +the smallest total cost through the trellis. The cost associated with a transition (s_k,x_k) is only a function of the output y_k = OS(s_k,x_k), and the observation vector r_k. Thus, for each time period, k, we need to label each of the SxI transitions with such a cost. -This means that for each time period we need to evaluate -O such numbers (one for each possible output symbol y_k). -This is done +This means that for each time period we need to evaluate +O such numbers (one for each possible output symbol y_k). +This is done in "metrics_f". In particular, metrics_f is a memoryless device taking D inputs at a time and producing O outputs. The D inputs are rk1,rk2,...,rkD. @@ -627,7 +627,7 @@ if we choose to perform soft-input VA, we need to evaluate the Euclidean distance between r_k and each of c_1,c_2,...,c_M, for each of the K transmitted symbols. Other options are available as well; for instance, we can -do hard decision demodulation and feed the VA with +do hard decision demodulation and feed the VA with symbol Hamming distances, or even bit Hamming distances, etc. These are all implemented in "metrics_f". </para> @@ -638,7 +638,7 @@ These are all implemented in "metrics_f". <para> Now the VA can run once it is supplied by the initial and final states. -The initial state is known to be 0; the final state is usually +The initial state is known to be 0; the final state is usually forced to some value by padding the information sequence appropriately. In this example, we always send the the same info sequence (we only randomize noise) so we can evaluate off line the final state and then provide it to the VA (a value of -1 signifies that there is no fixed initial or final state). The VA outputs the estimates of the symbols x_k which @@ -654,7 +654,7 @@ are then packed to shorts and compared with the transmitted sequence. <para> -The function returns the number of shorts and the number of shorts in error. Observe that this way the estimated error rate refers to +The function returns the number of shorts and the number of shorts in error. Observe that this way the estimated error rate refers to 16-bit-symbol error rate. </para> <programlisting> @@ -698,7 +698,7 @@ The program is called by ./test_viterbi_equalization1.py Es/No_db repetitions </literallayout> where -"Es/No_db" is the SNR in dB, and "repetitions" +"Es/No_db" is the SNR in dB, and "repetitions" are the number of packets to be transmitted and received in order to collect sufficient number of errors for an accurate estimate of the error rate. @@ -707,7 +707,7 @@ error rate. <para> Each packet has size Kb bits. -The modulation is chosen to be 4-PAM in this example and the channel is chosen +The modulation is chosen to be 4-PAM in this example and the channel is chosen to be one of the test channels defined in fsm_utils.py </para> <programlisting> @@ -729,8 +729,8 @@ Since in this example the channel has length 5 and the modulation is 4-ary, the </para> <para> -Assuming that the FSM input has cardinality I, each input symbol consists -of bitspersymbol=log<subscript>2</subscript>( I ) bits, and thus correspond to K = Kb/bitspersymbol symbols. +Assuming that the FSM input has cardinality I, each input symbol consists +of bitspersymbol=log<subscript>2</subscript>( I ) bits, and thus correspond to K = Kb/bitspersymbol symbols. </para> <programlisting> 75 bitspersymbol = int(round(math.log(f.I())/math.log(2))) # bits per FSM input symbol @@ -740,26 +740,26 @@ of bitspersymbol=log<subscript>2</subscript>( I ) bits, and thus correspond to K <para> -The overall system with input the 4-ary input symbols +The overall system with input the 4-ary input symbols x<subscript>k</subscript>, modulated to the 4-PAM symbols s<subscript>k</subscript> and passed through the ISI channel to produce the -noise-free observations -z<subscript>k</subscript> = +noise-free observations +z<subscript>k</subscript> = sum<subscript>j=0</subscript><superscript>L-1</superscript> c<subscript>j</subscript> s<subscript>k-j</subscript> (where L is the channel length) -can be modeled as a FSM followed by a memoryless modulation. -In particular, the FSM input is the sequence +can be modeled as a FSM followed by a memoryless modulation. +In particular, the FSM input is the sequence x<subscript>k</subscript> -and its output is the "combined" symbol +and its output is the "combined" symbol y<subscript>k</subscript>= -(x<subscript>k</subscript>,x<subscript>k-1</subscript>,...,x<subscript>k-L+1</subscript>) (actually its decimal representation). +(x<subscript>k</subscript>,x<subscript>k-1</subscript>,...,x<subscript>k-L+1</subscript>) (actually its decimal representation). The memoryless modulator maps every "combined" symbol -y<subscript>k</subscript> to -z<subscript>k</subscript> = -sum<subscript>j=0</subscript><superscript>L-1</superscript> c<subscript>j</subscript> s<subscript>k-j</subscript> -Clearly this modulation is memoryless since +y<subscript>k</subscript> to +z<subscript>k</subscript> = +sum<subscript>j=0</subscript><superscript>L-1</superscript> c<subscript>j</subscript> s<subscript>k-j</subscript> +Clearly this modulation is memoryless since each z<subscript>k</subscript> depends only on y<subscript>k</subscript>; the memory inherent in the ISI is hidden in the FSM structure. -This memoryless modulator is automatically generated by a helper function in -fsm_utils.py given the channel and modulation as in line 78, and has the +This memoryless modulator is automatically generated by a helper function in +fsm_utils.py given the channel and modulation as in line 78, and has the familiar format tot_channel=(dimensionality,tot_constellation) as described in the TCM example. This is exactly what the metrics block (or the viterbi_combined block) require in order to evaluate the VA metrics from the noisy observations. </para> @@ -786,14 +786,14 @@ different data and noise realizations. <para> -Let us examine now the "run_test" function. +Let us examine now the "run_test" function. First we set up the transmitter blocks. -We generate a packet of K random symbols and add a head and a tail of L zeros, +We generate a packet of K random symbols and add a head and a tail of L zeros, L being the channel length. This is sufficient to drive the initial and final states to 0. </para> <programlisting> 14 L = len(channel) - 15 + 15 16 # TX 17 # this for loop is TOO slow in python!!! 18 packet = [0]*(K+2*L) @@ -829,7 +829,7 @@ Also note that the first L observations are irrelevant and thus can be skipped. 34 skip = gr.skiphead(gr.sizeof_float, L) # skip the first L samples since you know they are coming from the L zero symbols 35 #metrics = trellis.metrics_f(f.O(),dimensionality,tot_constellation,trellis.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi 36 #va = trellis.viterbi_s(f,K+L,0,0) # Put -1 if the Initial/Final states are not set. - 37 va = trellis.viterbi_combined_s(f,K+L,0,0,dimensionality,tot_constellation,trellis.TRELLIS_EUCLIDEAN) # using viterbi_combined_s instead of metrics_f/viterbi_s allows larger packet lengths because metrics_f is complaining for not being able to allocate large buffers. This is due to the large f.O() in this application... + 37 va = trellis.viterbi_combined_s(f,K+L,0,0,dimensionality,tot_constellation,trellis.TRELLIS_EUCLIDEAN) # using viterbi_combined_s instead of metrics_f/viterbi_s allows larger packet lengths because metrics_f is complaining for not being able to allocate large buffers. This is due to the large f.O() in this application... 38 dst = gr.vector_sink_s() </programlisting> @@ -852,7 +852,7 @@ are then compared with the transmitted sequence. <para> -The function returns the number of symbols and the number of symbols in error. Observe that this way the estimated error rate refers to +The function returns the number of symbols and the number of symbols in error. Observe that this way the estimated error rate refers to 2-bit-symbol error rate. </para> <programlisting> @@ -876,13 +876,13 @@ Soft versions of the algorithms have been implemented. Also examples of turbo equalization/decoding and of sccc can be found in the examples directory. -Recently we added gnuradio blocks for sccc and pccc encoders and +Recently we added gnuradio blocks for sccc and pccc encoders and turbo decoders. Although these can be generated by existing gr-trellis blocks (in particular, the SISO blocks, as done in some of the python examples) there is an advantage in having this functionality as a single block. To see why, think of a turbo decoder with 10 iterations. Previously we needed to concatenate 10 x 2 SISO blocks (for a sccc decoder) to emulate the passing of soft information between SISOs over 10 iterartions. With the new block however, only a single such block is needed that internally loops through 10 iterations; this results in space savings -and possibly time saving as well (since queueing at the input/ouput of the gr-blocks is avoided). +and possibly time saving as well (since queueing at the input/ouput of the gr-blocks is avoided). Still need to document them... @@ -937,8 +937,8 @@ can be implemented. <listitem> <para> -Although turbo decoding is rediculously slow in software, -we can design it in principle. One question is, whether we should +Although turbo decoding is rediculously slow in software, +we can design it in principle. One question is, whether we should use the encoder, and SISO blocks and connect them through GNU radio or we should implement turbo-decoding as a single block (issues with buffering between blocks). diff --git a/gr-trellis/doc/make_numbered_listing.py b/gr-trellis/doc/make_numbered_listing.py index 889c2d78d..c295dc876 100755 --- a/gr-trellis/doc/make_numbered_listing.py +++ b/gr-trellis/doc/make_numbered_listing.py @@ -42,4 +42,4 @@ def main (): if __name__ == '__main__': main () - + diff --git a/gr-trellis/doc/test_tcm.py b/gr-trellis/doc/test_tcm.py index 2ff1c3db8..8c046d697 100644 --- a/gr-trellis/doc/test_tcm.py +++ b/gr-trellis/doc/test_tcm.py @@ -27,17 +27,17 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): metrics = trellis.metrics_f(f.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi va = trellis.viterbi_s(f,K,0,-1) # Put -1 if the Initial/Final states are not set. fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts - dst = gr.check_lfsr_32k_s(); + dst = gr.check_lfsr_32k_s(); tb.connect (src,src_head,s2fsmi,enc,mod) tb.connect (mod,(add,0)) tb.connect (noise,(add,1)) tb.connect (add,metrics) tb.connect (metrics,va,fsmi2s,dst) - + tb.run() - - # A bit of cheating: run the program once and print the + + # A bit of cheating: run the program once and print the # final encoder state. # Then put it as the last argument in the viterbi block #print "final state = " , enc.ST() @@ -65,7 +65,7 @@ def main(args): K=Kb/bitspersymbol # packet size in trellis steps modulation = fsm_utils.psk4 # see fsm_utlis.py for available predefined modulations dimensionality = modulation[0] - constellation = modulation[1] + constellation = modulation[1] if len(constellation)/dimensionality != f.O(): sys.stderr.write ('Incompatible FSM output cardinality and modulation size.\n') sys.exit (1) @@ -75,7 +75,7 @@ def main(args): Es = Es + constellation[i]**2 Es = Es / (len(constellation)/dimensionality) N0=Es/pow(10.0,esn0_db/10.0); # noise variance - + tot_s=0 terr_s=0 for i in range(rep): diff --git a/gr-trellis/doc/test_tcm.py.xml b/gr-trellis/doc/test_tcm.py.xml index b957f682d..b5074cb2f 100644 --- a/gr-trellis/doc/test_tcm.py.xml +++ b/gr-trellis/doc/test_tcm.py.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <programlisting> 1 #!/usr/bin/env python - 2 + 2 3 from gnuradio import gr 4 from gnuradio import audio 5 from gnuradio import trellis @@ -10,46 +10,46 @@ 8 import sys 9 import random 10 import fsm_utils - 11 + 11 12 def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): 13 tb = gr.top_block () - 14 + 14 15 # TX 16 src = gr.lfsr_32k_source_s() 17 src_head = gr.head (gr.sizeof_short,Kb/16) # packet size in shorts 18 s2fsmi = gr.packed_to_unpacked_ss(bitspersymbol,gr.GR_MSB_FIRST) # unpack shorts to symbols compatible with the FSM input cardinality 19 enc = trellis.encoder_ss(f,0) # initial state = 0 20 mod = gr.chunks_to_symbols_sf(constellation,dimensionality) - 21 + 21 22 # CHANNEL 23 add = gr.add_ff() 24 noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) - 25 + 25 26 # RX 27 metrics = trellis.metrics_f(f.O(),dimensionality,constellation,trellis.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi 28 va = trellis.viterbi_s(f,K,0,-1) # Put -1 if the Initial/Final states are not set. 29 fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts - 30 dst = gr.check_lfsr_32k_s(); - 31 + 30 dst = gr.check_lfsr_32k_s(); + 31 32 tb.connect (src,src_head,s2fsmi,enc,mod) 33 tb.connect (mod,(add,0)) 34 tb.connect (noise,(add,1)) 35 tb.connect (add,metrics) 36 tb.connect (metrics,va,fsmi2s,dst) - 37 + 37 38 tb.run() - 39 - 40 # A bit of cheating: run the program once and print the + 39 + 40 # A bit of cheating: run the program once and print the 41 # final encoder state. 42 # Then put it as the last argument in the viterbi block 43 #print "final state = " , enc.ST() - 44 + 44 45 ntotal = dst.ntotal () 46 nright = dst.nright () 47 runlength = dst.runlength () 48 return (ntotal,ntotal-nright) - 49 - 50 + 49 + 50 51 def main(args): 52 nargs = len (args) 53 if nargs == 3: @@ -59,7 +59,7 @@ 57 else: 58 sys.stderr.write ('usage: test_tcm.py fsm_fname Es/No_db repetitions\n') 59 sys.exit (1) - 60 + 60 61 # system parameters 62 f=trellis.fsm(fname) # get the FSM specification from a file 63 Kb=1024*16 # packet size in bits (make it multiple of 16 so it can be packed in a short) @@ -67,7 +67,7 @@ 65 K=Kb/bitspersymbol # packet size in trellis steps 66 modulation = fsm_utils.psk4 # see fsm_utlis.py for available predefined modulations 67 dimensionality = modulation[0] - 68 constellation = modulation[1] + 68 constellation = modulation[1] 69 if len(constellation)/dimensionality != f.O(): 70 sys.stderr.write ('Incompatible FSM output cardinality and modulation size.\n') 71 sys.exit (1) @@ -77,7 +77,7 @@ 75 Es = Es + constellation[i]**2 76 Es = Es / (len(constellation)/dimensionality) 77 N0=Es/pow(10.0,esn0_db/10.0); # noise variance - 78 + 78 79 tot_s=0 80 terr_s=0 81 for i in range(rep): @@ -88,8 +88,8 @@ 86 print i,s,e,tot_s,terr_s, '%e' % ((1.0*terr_s)/tot_s) 87 # estimate of the (short) error rate 88 print tot_s,terr_s, '%e' % ((1.0*terr_s)/tot_s) - 89 - 90 + 89 + 90 91 if __name__ == '__main__': 92 main (sys.argv[1:]) </programlisting> diff --git a/gr-trellis/doc/test_viterbi_equalization1.py b/gr-trellis/doc/test_viterbi_equalization1.py index 638e83e81..5967384cf 100755 --- a/gr-trellis/doc/test_viterbi_equalization1.py +++ b/gr-trellis/doc/test_viterbi_equalization1.py @@ -29,7 +29,7 @@ def run_test (f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constel isi = gr.fir_filter_fff(1,channel) add = gr.add_ff() noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) - + # RX skip = gr.skiphead(gr.sizeof_float, L) # skip the first L samples since you know they are coming from the L zero symbols #metrics = trellis.metrics_f(f.O(),dimensionality,tot_constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi @@ -46,7 +46,7 @@ def run_test (f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constel tb.run() - data = dst.data() + data = dst.data() ntotal = len(data) - L nright=0 for i in range(ntotal): @@ -54,7 +54,7 @@ def run_test (f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constel nright=nright+1 #else: #print "Error in ", i - + return (ntotal,ntotal-nright) diff --git a/gr-trellis/doc/test_viterbi_equalization1.py.xml b/gr-trellis/doc/test_viterbi_equalization1.py.xml index a97d04d6e..27605870e 100644 --- a/gr-trellis/doc/test_viterbi_equalization1.py.xml +++ b/gr-trellis/doc/test_viterbi_equalization1.py.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <programlisting> 1 #!/usr/bin/env python - 2 + 2 3 from gnuradio import gr 4 from gnuradio import audio 5 from gnuradio import trellis @@ -10,11 +10,11 @@ 8 import sys 9 import random 10 import fsm_utils - 11 + 11 12 def run_test (f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constellation,N0,seed): 13 tb = gr.top_block () 14 L = len(channel) - 15 + 15 16 # TX 17 # this for loop is TOO slow in python!!! 18 packet = [0]*(K+2*L) @@ -26,29 +26,29 @@ 24 packet[len(packet)-i-1] = 0 25 src = gr.vector_source_s(packet,False) 26 mod = gr.chunks_to_symbols_sf(modulation[1],modulation[0]) - 27 + 27 28 # CHANNEL 29 isi = gr.fir_filter_fff(1,channel) 30 add = gr.add_ff() 31 noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) - 32 + 32 33 # RX 34 skip = gr.skiphead(gr.sizeof_float, L) # skip the first L samples since you know they are coming from the L zero symbols 35 #metrics = trellis.metrics_f(f.O(),dimensionality,tot_constellation,trellis.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi 36 #va = trellis.viterbi_s(f,K+L,0,0) # Put -1 if the Initial/Final states are not set. 37 va = trellis.viterbi_combined_s(f,K+L,0,0,dimensionality,tot_constellation,trellis.TRELLIS_EUCLIDEAN) # using viterbi_combined_s instead of metrics_f/viterbi_s allows larger packet lengths because metrics_f is complaining for not being able to allocate large buffers. This is due to the large f.O() in this application... 38 dst = gr.vector_sink_s() - 39 + 39 40 tb.connect (src,mod) 41 tb.connect (mod,isi,(add,0)) 42 tb.connect (noise,(add,1)) 43 #tb.connect (add,metrics) 44 #tb.connect (metrics,va,dst) 45 tb.connect (add,skip,va,dst) - 46 + 46 47 tb.run() - 48 - 49 data = dst.data() + 48 + 49 data = dst.data() 50 ntotal = len(data) - L 51 nright=0 52 for i in range(ntotal): @@ -56,10 +56,10 @@ 54 nright=nright+1 55 #else: 56 #print "Error in ", i - 57 + 57 58 return (ntotal,ntotal-nright) - 59 - 60 + 59 + 60 61 def main(args): 62 nargs = len (args) 63 if nargs == 2: @@ -68,7 +68,7 @@ 66 else: 67 sys.stderr.write ('usage: test_viterbi_equalization1.py Es/No_db repetitions\n') 68 sys.exit (1) - 69 + 69 70 # system parameters 71 Kb=2048 # packet size in bits 72 modulation = fsm_utils.pam4 # see fsm_utlis.py for available predefined modulations @@ -76,7 +76,7 @@ 74 f=trellis.fsm(len(modulation[1]),len(channel)) # generate the FSM automatically 75 bitspersymbol = int(round(math.log(f.I())/math.log(2))) # bits per FSM input symbol 76 K=Kb/bitspersymbol # packet size in trellis steps - 77 + 77 78 tot_channel = fsm_utils.make_isi_lookup(modulation,channel,True) # generate the lookup table (normalize energy to 1) 79 dimensionality = tot_channel[0] 80 tot_constellation = tot_channel[1] @@ -84,11 +84,11 @@ 82 if len(tot_constellation)/dimensionality != f.O(): 83 sys.stderr.write ('Incompatible FSM output cardinality and lookup table size.\n') 84 sys.exit (1) - 85 + 85 86 tot_s=0 # total number of transmitted shorts 87 terr_s=0 # total number of shorts in error 88 terr_p=0 # total number of packets in error - 89 + 89 90 for i in range(rep): 91 (s,e)=run_test(f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constellation,N0,-long(666+i)) # run experiment with different seed to get different data and noise realizations 92 tot_s=tot_s+s @@ -98,8 +98,8 @@ 96 print i+1,terr_p, '%.2e' % ((1.0*terr_p)/(i+1)),tot_s,terr_s, '%.2e' % ((1.0*terr_s)/tot_s) 97 # estimate of the (short or symbol) error rate 98 print rep,terr_p, '%.2e' % ((1.0*terr_p)/(i+1)),tot_s,terr_s, '%.2e' % ((1.0*terr_s)/tot_s) - 99 -100 + 99 +100 101 if __name__ == '__main__': 102 main (sys.argv[1:]) </programlisting> diff --git a/gr-trellis/grc/.gitignore b/gr-trellis/grc/.gitignore deleted file mode 100644 index f3462d009..000000000 --- a/gr-trellis/grc/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -/Makefile -/Makefile.in -/aclocal.m4 -/configure -/config.h.in -/stamp-h.in -/libtool -/config.log -/config.h -/config.cache -/config.status -/missing -/stamp-h -/stamp-h1 -/.deps -/.libs -/*.la -/*.lo -/autom4te.cache -/*.cache -/missing -/make.log -/*.pc diff --git a/gr-trellis/grc/Makefile.am b/gr-trellis/grc/Makefile.am deleted file mode 100644 index 518c7f055..000000000 --- a/gr-trellis/grc/Makefile.am +++ /dev/null @@ -1,39 +0,0 @@ -# -# 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. -# - -include $(top_srcdir)/Makefile.common - -grcblocksdir = $(grc_blocksdir) - -dist_grcblocks_DATA = \ - trellis_encoder_xx.xml \ - trellis_siso_combined_f.xml \ - trellis_viterbi_x.xml \ - trellis_metrics_x.xml \ - trellis_siso_f.xml \ - trellis_permutation.xml \ - trellis_viterbi_combined_xx.xml \ - trellis_sccc_encoder_xx.xml \ - trellis_sccc_decoder_x.xml \ - trellis_sccc_decoder_combined_xx.xml \ - trellis_pccc_encoder_xx.xml \ - trellis_pccc_decoder_x.xml \ - trellis_pccc_decoder_combined_xx.xml diff --git a/gr-trellis/grc/trellis_pccc_decoder_combined_xx.xml b/gr-trellis/grc/trellis_pccc_decoder_combined_xx.xml index bd5a44cde..005a88d66 100644 --- a/gr-trellis/grc/trellis_pccc_decoder_combined_xx.xml +++ b/gr-trellis/grc/trellis_pccc_decoder_combined_xx.xml @@ -12,9 +12,9 @@ <category>Error Correction/Trellis</category> <import>from gnuradio import trellis, digital</import> <make>trellis.pccc_decoder_combined_$(type)$(out_type)( - trellis.fsm($o_fsm_args), $o_init_state, $o_final_state, - trellis.fsm($i_fsm_args), $i_init_state, $i_final_state, - trellis.interleaver($interleaver), + trellis.fsm($o_fsm_args), $o_init_state, $o_final_state, + trellis.fsm($i_fsm_args), $i_init_state, $i_final_state, + trellis.interleaver($interleaver), $block_size, $iterations, $siso_type, diff --git a/gr-trellis/grc/trellis_pccc_decoder_x.xml b/gr-trellis/grc/trellis_pccc_decoder_x.xml index e6eb03f11..c79447826 100644 --- a/gr-trellis/grc/trellis_pccc_decoder_x.xml +++ b/gr-trellis/grc/trellis_pccc_decoder_x.xml @@ -1,7 +1,7 @@ <?xml version="1.0"?> <!-- ################################################### -## PCCC Decoder +## PCCC Decoder ################################################### --> @@ -12,9 +12,9 @@ <category>Error Correction/Trellis</category> <import>from gnuradio import trellis</import> <make>trellis.pccc_decoder_$(out_type)( - trellis.fsm($o_fsm_args), $o_init_state, $o_final_state, - trellis.fsm($i_fsm_args), $i_init_state, $i_final_state, - trellis.interleaver($interleaver), + trellis.fsm($o_fsm_args), $o_init_state, $o_final_state, + trellis.fsm($i_fsm_args), $i_init_state, $i_final_state, + trellis.interleaver($interleaver), $block_size, $iterations, $siso_type) diff --git a/gr-trellis/grc/trellis_permutation.xml b/gr-trellis/grc/trellis_permutation.xml index 125a78d4d..212693311 100644 --- a/gr-trellis/grc/trellis_permutation.xml +++ b/gr-trellis/grc/trellis_permutation.xml @@ -75,7 +75,7 @@ <vlen>$vlen</vlen> </source> <doc> -Interleaver size is given in blocks. -One Symbol = (in/out type) * (vector length) +Interleaver size is given in blocks. +One Symbol = (in/out type) * (vector length) </doc> </block> diff --git a/gr-trellis/grc/trellis_sccc_decoder_combined_xx.xml b/gr-trellis/grc/trellis_sccc_decoder_combined_xx.xml index 6b2bc0e38..324f06e7f 100644 --- a/gr-trellis/grc/trellis_sccc_decoder_combined_xx.xml +++ b/gr-trellis/grc/trellis_sccc_decoder_combined_xx.xml @@ -12,9 +12,9 @@ <category>Error Correction/Trellis</category> <import>from gnuradio import trellis, digital</import> <make>trellis.sccc_decoder_combined_$(type)$(out_type)( - trellis.fsm($o_fsm_args), $o_init_state, $o_final_state, - trellis.fsm($i_fsm_args), $i_init_state, $i_final_state, - trellis.interleaver($interleaver), + trellis.fsm($o_fsm_args), $o_init_state, $o_final_state, + trellis.fsm($i_fsm_args), $i_init_state, $i_final_state, + trellis.interleaver($interleaver), $block_size, $iterations, $siso_type, diff --git a/gr-trellis/grc/trellis_sccc_decoder_x.xml b/gr-trellis/grc/trellis_sccc_decoder_x.xml index 9fc24927b..4bf8d26d5 100644 --- a/gr-trellis/grc/trellis_sccc_decoder_x.xml +++ b/gr-trellis/grc/trellis_sccc_decoder_x.xml @@ -1,7 +1,7 @@ <?xml version="1.0"?> <!-- ################################################### -## SCCC Decoder +## SCCC Decoder ################################################### --> @@ -12,9 +12,9 @@ <category>Error Correction/Trellis</category> <import>from gnuradio import trellis</import> <make>trellis.sccc_decoder_$(out_type)( - trellis.fsm($o_fsm_args), $o_init_state, $o_final_state, - trellis.fsm($i_fsm_args), $i_init_state, $i_final_state, - trellis.interleaver($interleaver), + trellis.fsm($o_fsm_args), $o_init_state, $o_final_state, + trellis.fsm($i_fsm_args), $i_init_state, $i_final_state, + trellis.interleaver($interleaver), $block_size, $iterations, $siso_type) diff --git a/gr-trellis/src/.gitignore b/gr-trellis/src/.gitignore deleted file mode 100644 index bb3f27777..000000000 --- a/gr-trellis/src/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo -/howto.cc -/howto.py diff --git a/gr-trellis/src/Makefile.am b/gr-trellis/src/Makefile.am deleted file mode 100644 index 79e9d626a..000000000 --- a/gr-trellis/src/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright 2004 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -SUBDIRS = lib -if PYTHON -SUBDIRS += python examples -endif diff --git a/gr-trellis/src/examples/.gitignore b/gr-trellis/src/examples/.gitignore deleted file mode 100644 index c400497f5..000000000 --- a/gr-trellis/src/examples/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/*.pyo diff --git a/gr-trellis/src/examples/Makefile.am b/gr-trellis/src/examples/Makefile.am deleted file mode 100644 index 92aeadfad..000000000 --- a/gr-trellis/src/examples/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -# -# Copyright 2004,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 = fsm_files - -ourdatadir = $(exampledir)/trellis - -dist_ourdata_DATA = \ - README - -dist_ourdata_SCRIPTS = \ - fsm_utils.py \ - test_tcm.py \ - test_tcm_parallel.py \ - test_tcm_combined.py \ - test_sccc_hard.py \ - test_sccc_soft.py \ - test_sccc_turbo.py \ - test_viterbi_equalization1.py \ - test_viterbi_equalization.py \ - test_turbo_equalization.py \ - test_turbo_equalization1.py \ - test_turbo_equalization2.py diff --git a/gr-trellis/src/examples/fsm_files/.gitignore b/gr-trellis/src/examples/fsm_files/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-trellis/src/examples/fsm_files/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-trellis/src/examples/fsm_files/Makefile.am b/gr-trellis/src/examples/fsm_files/Makefile.am deleted file mode 100644 index c4cbb2e93..000000000 --- a/gr-trellis/src/examples/fsm_files/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -# -# Copyright 2004,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 - -ourdatadir = $(exampledir)/trellis/fsm_files - -dist_ourdata_DATA = \ - awgn1o2_128.fsm \ - awgn1o2_16.fsm \ - awgn1o2_4.fsm \ - awgn1o2_8.fsm \ - awgn2o3_16.fsm \ - awgn2o3_4.fsm \ - awgn2o3_4_msb.fsm \ - awgn2o3_4_msbG.fsm \ - awgn2o3_8.fsm \ - awgn2o4_4.fsm \ - disconnected.fsm \ - rep3.fsm \ - rep5.fsm \ - simple.fsm diff --git a/gr-trellis/src/examples/fsm_files/awgn1o2_128.fsm b/gr-trellis/src/examples/fsm_files/awgn1o2_128.fsm deleted file mode 100644 index bb79c59da..000000000 --- a/gr-trellis/src/examples/fsm_files/awgn1o2_128.fsm +++ /dev/null @@ -1,265 +0,0 @@ -2 128 4 - -0 64 -0 64 -1 65 -1 65 -2 66 -2 66 -3 67 -3 67 -4 68 -4 68 -5 69 -5 69 -6 70 -6 70 -7 71 -7 71 -8 72 -8 72 -9 73 -9 73 -10 74 -10 74 -11 75 -11 75 -12 76 -12 76 -13 77 -13 77 -14 78 -14 78 -15 79 -15 79 -16 80 -16 80 -17 81 -17 81 -18 82 -18 82 -19 83 -19 83 -20 84 -20 84 -21 85 -21 85 -22 86 -22 86 -23 87 -23 87 -24 88 -24 88 -25 89 -25 89 -26 90 -26 90 -27 91 -27 91 -28 92 -28 92 -29 93 -29 93 -30 94 -30 94 -31 95 -31 95 -32 96 -32 96 -33 97 -33 97 -34 98 -34 98 -35 99 -35 99 -36 100 -36 100 -37 101 -37 101 -38 102 -38 102 -39 103 -39 103 -40 104 -40 104 -41 105 -41 105 -42 106 -42 106 -43 107 -43 107 -44 108 -44 108 -45 109 -45 109 -46 110 -46 110 -47 111 -47 111 -48 112 -48 112 -49 113 -49 113 -50 114 -50 114 -51 115 -51 115 -52 116 -52 116 -53 117 -53 117 -54 118 -54 118 -55 119 -55 119 -56 120 -56 120 -57 121 -57 121 -58 122 -58 122 -59 123 -59 123 -60 124 -60 124 -61 125 -61 125 -62 126 -62 126 -63 127 -63 127 - -0 3 -3 0 -1 2 -2 1 -3 0 -0 3 -2 1 -1 2 -1 2 -2 1 -0 3 -3 0 -2 1 -1 2 -3 0 -0 3 -1 2 -2 1 -0 3 -3 0 -2 1 -1 2 -3 0 -0 3 -0 3 -3 0 -1 2 -2 1 -3 0 -0 3 -2 1 -1 2 -2 1 -1 2 -3 0 -0 3 -1 2 -2 1 -0 3 -3 0 -3 0 -0 3 -2 1 -1 2 -0 3 -3 0 -1 2 -2 1 -3 0 -0 3 -2 1 -1 2 -0 3 -3 0 -1 2 -2 1 -2 1 -1 2 -3 0 -0 3 -1 2 -2 1 -0 3 -3 0 -2 1 -1 2 -3 0 -0 3 -1 2 -2 1 -0 3 -3 0 -3 0 -0 3 -2 1 -1 2 -0 3 -3 0 -1 2 -2 1 -3 0 -0 3 -2 1 -1 2 -0 3 -3 0 -1 2 -2 1 -2 1 -1 2 -3 0 -0 3 -1 2 -2 1 -0 3 -3 0 -0 3 -3 0 -1 2 -2 1 -3 0 -0 3 -2 1 -1 2 -1 2 -2 1 -0 3 -3 0 -2 1 -1 2 -3 0 -0 3 -1 2 -2 1 -0 3 -3 0 -2 1 -1 2 -3 0 -0 3 -0 3 -3 0 -1 2 -2 1 -3 0 -0 3 -2 1 -1 2 - - - -GM1o2_128=[1+D+D^2+D^5+D^7 1+D^3+D^4+D^5+D^6+D^7] - =[11100101 10011111] - =[229 159] diff --git a/gr-trellis/src/examples/fsm_files/joint_16_16.fsm b/gr-trellis/src/examples/fsm_files/joint_16_16.fsm deleted file mode 100644 index 3dae314b6..000000000 --- a/gr-trellis/src/examples/fsm_files/joint_16_16.fsm +++ /dev/null @@ -1,523 +0,0 @@ -4 256 16 - -0 8 128 136 -0 8 128 136 -1 9 129 137 -1 9 129 137 -2 10 130 138 -2 10 130 138 -3 11 131 139 -3 11 131 139 -4 12 132 140 -4 12 132 140 -5 13 133 141 -5 13 133 141 -6 14 134 142 -6 14 134 142 -7 15 135 143 -7 15 135 143 -0 8 128 136 -0 8 128 136 -1 9 129 137 -1 9 129 137 -2 10 130 138 -2 10 130 138 -3 11 131 139 -3 11 131 139 -4 12 132 140 -4 12 132 140 -5 13 133 141 -5 13 133 141 -6 14 134 142 -6 14 134 142 -7 15 135 143 -7 15 135 143 -16 24 144 152 -16 24 144 152 -17 25 145 153 -17 25 145 153 -18 26 146 154 -18 26 146 154 -19 27 147 155 -19 27 147 155 -20 28 148 156 -20 28 148 156 -21 29 149 157 -21 29 149 157 -22 30 150 158 -22 30 150 158 -23 31 151 159 -23 31 151 159 -16 24 144 152 -16 24 144 152 -17 25 145 153 -17 25 145 153 -18 26 146 154 -18 26 146 154 -19 27 147 155 -19 27 147 155 -20 28 148 156 -20 28 148 156 -21 29 149 157 -21 29 149 157 -22 30 150 158 -22 30 150 158 -23 31 151 159 -23 31 151 159 -32 40 160 168 -32 40 160 168 -33 41 161 169 -33 41 161 169 -34 42 162 170 -34 42 162 170 -35 43 163 171 -35 43 163 171 -36 44 164 172 -36 44 164 172 -37 45 165 173 -37 45 165 173 -38 46 166 174 -38 46 166 174 -39 47 167 175 -39 47 167 175 -32 40 160 168 -32 40 160 168 -33 41 161 169 -33 41 161 169 -34 42 162 170 -34 42 162 170 -35 43 163 171 -35 43 163 171 -36 44 164 172 -36 44 164 172 -37 45 165 173 -37 45 165 173 -38 46 166 174 -38 46 166 174 -39 47 167 175 -39 47 167 175 -48 56 176 184 -48 56 176 184 -49 57 177 185 -49 57 177 185 -50 58 178 186 -50 58 178 186 -51 59 179 187 -51 59 179 187 -52 60 180 188 -52 60 180 188 -53 61 181 189 -53 61 181 189 -54 62 182 190 -54 62 182 190 -55 63 183 191 -55 63 183 191 -48 56 176 184 -48 56 176 184 -49 57 177 185 -49 57 177 185 -50 58 178 186 -50 58 178 186 -51 59 179 187 -51 59 179 187 -52 60 180 188 -52 60 180 188 -53 61 181 189 -53 61 181 189 -54 62 182 190 -54 62 182 190 -55 63 183 191 -55 63 183 191 -64 72 192 200 -64 72 192 200 -65 73 193 201 -65 73 193 201 -66 74 194 202 -66 74 194 202 -67 75 195 203 -67 75 195 203 -68 76 196 204 -68 76 196 204 -69 77 197 205 -69 77 197 205 -70 78 198 206 -70 78 198 206 -71 79 199 207 -71 79 199 207 -64 72 192 200 -64 72 192 200 -65 73 193 201 -65 73 193 201 -66 74 194 202 -66 74 194 202 -67 75 195 203 -67 75 195 203 -68 76 196 204 -68 76 196 204 -69 77 197 205 -69 77 197 205 -70 78 198 206 -70 78 198 206 -71 79 199 207 -71 79 199 207 -80 88 208 216 -80 88 208 216 -81 89 209 217 -81 89 209 217 -82 90 210 218 -82 90 210 218 -83 91 211 219 -83 91 211 219 -84 92 212 220 -84 92 212 220 -85 93 213 221 -85 93 213 221 -86 94 214 222 -86 94 214 222 -87 95 215 223 -87 95 215 223 -80 88 208 216 -80 88 208 216 -81 89 209 217 -81 89 209 217 -82 90 210 218 -82 90 210 218 -83 91 211 219 -83 91 211 219 -84 92 212 220 -84 92 212 220 -85 93 213 221 -85 93 213 221 -86 94 214 222 -86 94 214 222 -87 95 215 223 -87 95 215 223 -96 104 224 232 -96 104 224 232 -97 105 225 233 -97 105 225 233 -98 106 226 234 -98 106 226 234 -99 107 227 235 -99 107 227 235 -100 108 228 236 -100 108 228 236 -101 109 229 237 -101 109 229 237 -102 110 230 238 -102 110 230 238 -103 111 231 239 -103 111 231 239 -96 104 224 232 -96 104 224 232 -97 105 225 233 -97 105 225 233 -98 106 226 234 -98 106 226 234 -99 107 227 235 -99 107 227 235 -100 108 228 236 -100 108 228 236 -101 109 229 237 -101 109 229 237 -102 110 230 238 -102 110 230 238 -103 111 231 239 -103 111 231 239 -112 120 240 248 -112 120 240 248 -113 121 241 249 -113 121 241 249 -114 122 242 250 -114 122 242 250 -115 123 243 251 -115 123 243 251 -116 124 244 252 -116 124 244 252 -117 125 245 253 -117 125 245 253 -118 126 246 254 -118 126 246 254 -119 127 247 255 -119 127 247 255 -112 120 240 248 -112 120 240 248 -113 121 241 249 -113 121 241 249 -114 122 242 250 -114 122 242 250 -115 123 243 251 -115 123 243 251 -116 124 244 252 -116 124 244 252 -117 125 245 253 -117 125 245 253 -118 126 246 254 -118 126 246 254 -119 127 247 255 -119 127 247 255 - -0 3 12 15 -3 0 15 12 -1 2 13 14 -2 1 14 13 -1 2 13 14 -2 1 14 13 -0 3 12 15 -3 0 15 12 -2 1 14 13 -1 2 13 14 -3 0 15 12 -0 3 12 15 -3 0 15 12 -0 3 12 15 -2 1 14 13 -1 2 13 14 -12 15 0 3 -15 12 3 0 -13 14 1 2 -14 13 2 1 -13 14 1 2 -14 13 2 1 -12 15 0 3 -15 12 3 0 -14 13 2 1 -13 14 1 2 -15 12 3 0 -12 15 0 3 -15 12 3 0 -12 15 0 3 -14 13 2 1 -13 14 1 2 -4 7 8 11 -7 4 11 8 -5 6 9 10 -6 5 10 9 -5 6 9 10 -6 5 10 9 -4 7 8 11 -7 4 11 8 -6 5 10 9 -5 6 9 10 -7 4 11 8 -4 7 8 11 -7 4 11 8 -4 7 8 11 -6 5 10 9 -5 6 9 10 -8 11 4 7 -11 8 7 4 -9 10 5 6 -10 9 6 5 -9 10 5 6 -10 9 6 5 -8 11 4 7 -11 8 7 4 -10 9 6 5 -9 10 5 6 -11 8 7 4 -8 11 4 7 -11 8 7 4 -8 11 4 7 -10 9 6 5 -9 10 5 6 -4 7 8 11 -7 4 11 8 -5 6 9 10 -6 5 10 9 -5 6 9 10 -6 5 10 9 -4 7 8 11 -7 4 11 8 -6 5 10 9 -5 6 9 10 -7 4 11 8 -4 7 8 11 -7 4 11 8 -4 7 8 11 -6 5 10 9 -5 6 9 10 -8 11 4 7 -11 8 7 4 -9 10 5 6 -10 9 6 5 -9 10 5 6 -10 9 6 5 -8 11 4 7 -11 8 7 4 -10 9 6 5 -9 10 5 6 -11 8 7 4 -8 11 4 7 -11 8 7 4 -8 11 4 7 -10 9 6 5 -9 10 5 6 -0 3 12 15 -3 0 15 12 -1 2 13 14 -2 1 14 13 -1 2 13 14 -2 1 14 13 -0 3 12 15 -3 0 15 12 -2 1 14 13 -1 2 13 14 -3 0 15 12 -0 3 12 15 -3 0 15 12 -0 3 12 15 -2 1 14 13 -1 2 13 14 -12 15 0 3 -15 12 3 0 -13 14 1 2 -14 13 2 1 -13 14 1 2 -14 13 2 1 -12 15 0 3 -15 12 3 0 -14 13 2 1 -13 14 1 2 -15 12 3 0 -12 15 0 3 -15 12 3 0 -12 15 0 3 -14 13 2 1 -13 14 1 2 -8 11 4 7 -11 8 7 4 -9 10 5 6 -10 9 6 5 -9 10 5 6 -10 9 6 5 -8 11 4 7 -11 8 7 4 -10 9 6 5 -9 10 5 6 -11 8 7 4 -8 11 4 7 -11 8 7 4 -8 11 4 7 -10 9 6 5 -9 10 5 6 -4 7 8 11 -7 4 11 8 -5 6 9 10 -6 5 10 9 -5 6 9 10 -6 5 10 9 -4 7 8 11 -7 4 11 8 -6 5 10 9 -5 6 9 10 -7 4 11 8 -4 7 8 11 -7 4 11 8 -4 7 8 11 -6 5 10 9 -5 6 9 10 -12 15 0 3 -15 12 3 0 -13 14 1 2 -14 13 2 1 -13 14 1 2 -14 13 2 1 -12 15 0 3 -15 12 3 0 -14 13 2 1 -13 14 1 2 -15 12 3 0 -12 15 0 3 -15 12 3 0 -12 15 0 3 -14 13 2 1 -13 14 1 2 -0 3 12 15 -3 0 15 12 -1 2 13 14 -2 1 14 13 -1 2 13 14 -2 1 14 13 -0 3 12 15 -3 0 15 12 -2 1 14 13 -1 2 13 14 -3 0 15 12 -0 3 12 15 -3 0 15 12 -0 3 12 15 -2 1 14 13 -1 2 13 14 -12 15 0 3 -15 12 3 0 -13 14 1 2 -14 13 2 1 -13 14 1 2 -14 13 2 1 -12 15 0 3 -15 12 3 0 -14 13 2 1 -13 14 1 2 -15 12 3 0 -12 15 0 3 -15 12 3 0 -12 15 0 3 -14 13 2 1 -13 14 1 2 -0 3 12 15 -3 0 15 12 -1 2 13 14 -2 1 14 13 -1 2 13 14 -2 1 14 13 -0 3 12 15 -3 0 15 12 -2 1 14 13 -1 2 13 14 -3 0 15 12 -0 3 12 15 -3 0 15 12 -0 3 12 15 -2 1 14 13 -1 2 13 14 -8 11 4 7 -11 8 7 4 -9 10 5 6 -10 9 6 5 -9 10 5 6 -10 9 6 5 -8 11 4 7 -11 8 7 4 -10 9 6 5 -9 10 5 6 -11 8 7 4 -8 11 4 7 -11 8 7 4 -8 11 4 7 -10 9 6 5 -9 10 5 6 -4 7 8 11 -7 4 11 8 -5 6 9 10 -6 5 10 9 -5 6 9 10 -6 5 10 9 -4 7 8 11 -7 4 11 8 -6 5 10 9 -5 6 9 10 -7 4 11 8 -4 7 8 11 -7 4 11 8 -4 7 8 11 -6 5 10 9 -5 6 9 10 - -This is the joint trellis of two trellises described in awgn1o2_16.fsm -It is useful for application of joint decoding... -It can be generated in python as follows: -> import trellis -> f1=trellis.fsm('awgn1o2_16.fsm') -> f=trellis.fsm(f1,f1) -> f.write_fsm_txt('joint_16_16.fsm') diff --git a/gr-trellis/src/examples/fsm_files/joint_4_16.fsm b/gr-trellis/src/examples/fsm_files/joint_4_16.fsm deleted file mode 100644 index 8f2cdab81..000000000 --- a/gr-trellis/src/examples/fsm_files/joint_4_16.fsm +++ /dev/null @@ -1,141 +0,0 @@ -4 64 16 - -0 8 32 40 -0 8 32 40 -1 9 33 41 -1 9 33 41 -2 10 34 42 -2 10 34 42 -3 11 35 43 -3 11 35 43 -4 12 36 44 -4 12 36 44 -5 13 37 45 -5 13 37 45 -6 14 38 46 -6 14 38 46 -7 15 39 47 -7 15 39 47 -0 8 32 40 -0 8 32 40 -1 9 33 41 -1 9 33 41 -2 10 34 42 -2 10 34 42 -3 11 35 43 -3 11 35 43 -4 12 36 44 -4 12 36 44 -5 13 37 45 -5 13 37 45 -6 14 38 46 -6 14 38 46 -7 15 39 47 -7 15 39 47 -16 24 48 56 -16 24 48 56 -17 25 49 57 -17 25 49 57 -18 26 50 58 -18 26 50 58 -19 27 51 59 -19 27 51 59 -20 28 52 60 -20 28 52 60 -21 29 53 61 -21 29 53 61 -22 30 54 62 -22 30 54 62 -23 31 55 63 -23 31 55 63 -16 24 48 56 -16 24 48 56 -17 25 49 57 -17 25 49 57 -18 26 50 58 -18 26 50 58 -19 27 51 59 -19 27 51 59 -20 28 52 60 -20 28 52 60 -21 29 53 61 -21 29 53 61 -22 30 54 62 -22 30 54 62 -23 31 55 63 -23 31 55 63 - -0 3 12 15 -3 0 15 12 -1 2 13 14 -2 1 14 13 -1 2 13 14 -2 1 14 13 -0 3 12 15 -3 0 15 12 -2 1 14 13 -1 2 13 14 -3 0 15 12 -0 3 12 15 -3 0 15 12 -0 3 12 15 -2 1 14 13 -1 2 13 14 -12 15 0 3 -15 12 3 0 -13 14 1 2 -14 13 2 1 -13 14 1 2 -14 13 2 1 -12 15 0 3 -15 12 3 0 -14 13 2 1 -13 14 1 2 -15 12 3 0 -12 15 0 3 -15 12 3 0 -12 15 0 3 -14 13 2 1 -13 14 1 2 -4 7 8 11 -7 4 11 8 -5 6 9 10 -6 5 10 9 -5 6 9 10 -6 5 10 9 -4 7 8 11 -7 4 11 8 -6 5 10 9 -5 6 9 10 -7 4 11 8 -4 7 8 11 -7 4 11 8 -4 7 8 11 -6 5 10 9 -5 6 9 10 -8 11 4 7 -11 8 7 4 -9 10 5 6 -10 9 6 5 -9 10 5 6 -10 9 6 5 -8 11 4 7 -11 8 7 4 -10 9 6 5 -9 10 5 6 -11 8 7 4 -8 11 4 7 -11 8 7 4 -8 11 4 7 -10 9 6 5 -9 10 5 6 - -This is the joint trellis of two trellises described in awgn1o2_4.fsm and awgn1o2_16.fsm -It is useful for application of joint decoding... -It can be generated in python as follows: -> import trellis -> f1=trellis.fsm('awgn1o2_4.fsm') -> f2=trellis.fsm('awgn1o2_16.fsm') -> f=trellis.fsm(f1,f2) -> f.write_fsm_txt('joint_4_16.fsm') - diff --git a/gr-fcd/grc/Makefile.am b/gr-trellis/src/examples/grc/CMakeLists.txt index 203ebdc16..46b825d88 100644 --- a/gr-fcd/grc/Makefile.am +++ b/gr-trellis/src/examples/grc/CMakeLists.txt @@ -1,28 +1,30 @@ -# # Copyright 2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -grcblocksdir = $(grc_blocksdir) - -dist_grcblocks_DATA = \ - fcd_source_c.xml +install( + FILES + interference_cancellation.grc + pccc1.grc + pccc.grc + sccc1.grc + sccc.grc + readme.txt + DESTINATION ${GR_PKG_TRELLIS_EXAMPLES_DIR} + COMPONENT "trellis-examples" +) diff --git a/gnuradio-examples/grc/trellis/interference_cancellation.grc b/gr-trellis/src/examples/grc/interference_cancellation.grc index 7674b4bf1..7674b4bf1 100644 --- a/gnuradio-examples/grc/trellis/interference_cancellation.grc +++ b/gr-trellis/src/examples/grc/interference_cancellation.grc diff --git a/gnuradio-examples/grc/trellis/pccc.grc b/gr-trellis/src/examples/grc/pccc.grc index c3111c321..c3111c321 100644 --- a/gnuradio-examples/grc/trellis/pccc.grc +++ b/gr-trellis/src/examples/grc/pccc.grc diff --git a/gnuradio-examples/grc/trellis/pccc1.grc b/gr-trellis/src/examples/grc/pccc1.grc index 15a63707e..15a63707e 100644 --- a/gnuradio-examples/grc/trellis/pccc1.grc +++ b/gr-trellis/src/examples/grc/pccc1.grc diff --git a/gnuradio-examples/grc/trellis/readme.txt b/gr-trellis/src/examples/grc/readme.txt index 9c7363af8..a5261ac0b 100644 --- a/gnuradio-examples/grc/trellis/readme.txt +++ b/gr-trellis/src/examples/grc/readme.txt @@ -6,11 +6,11 @@ Two users are transmitting simultaneously using convolutionally encoded QPSK, ea The combined signal is observed in noise and four different receivers are considered: 1) A viterbi decoder decoding user 1 assuming user 2 is noise 2) A viterbi decoder decoding user 2 assuming user 1 is noise -3) A viterbi decoder decoding user 1 first - and then reencoding this signal, subtracting it from the observation +3) A viterbi decoder decoding user 1 first + and then reencoding this signal, subtracting it from the observation and then running a Viterbi decoder decoding user 2 -4) A viterbi decoder decoding user 2 first - and then reencoding this signal, subtracting it from the observation +4) A viterbi decoder decoding user 2 first + and then reencoding this signal, subtracting it from the observation and then running a Viterbi decoder decoding user 1 You can change the signal to noise ratio P/sigma^2 and the allocation of power to the two users, alpha. diff --git a/gnuradio-examples/grc/trellis/sccc.grc b/gr-trellis/src/examples/grc/sccc.grc index e8f656f63..e8f656f63 100644 --- a/gnuradio-examples/grc/trellis/sccc.grc +++ b/gr-trellis/src/examples/grc/sccc.grc diff --git a/gnuradio-examples/grc/trellis/sccc1.grc b/gr-trellis/src/examples/grc/sccc1.grc index 0be59d0c4..0be59d0c4 100644 --- a/gnuradio-examples/grc/trellis/sccc1.grc +++ b/gr-trellis/src/examples/grc/sccc1.grc diff --git a/gr-trellis/src/examples/CMakeLists.txt b/gr-trellis/src/examples/python/CMakeLists.txt index 0d9589908..e2c7e70ff 100644 --- a/gr-trellis/src/examples/CMakeLists.txt +++ b/gr-trellis/src/examples/python/CMakeLists.txt @@ -33,7 +33,7 @@ GR_PYTHON_INSTALL( test_turbo_equalization.py test_turbo_equalization1.py test_turbo_equalization2.py - DESTINATION ${GR_PKG_DATA_DIR}/examples/trellis + DESTINATION ${GR_PKG_TRELLIS_EXAMPLES_DIR} COMPONENT "trellis_examples" ) @@ -59,6 +59,6 @@ install( fsm_files/rep3.fsm fsm_files/rep5.fsm fsm_files/simple.fsm - DESTINATION ${GR_PKG_DATA_DIR}/examples/trellis/fsm_files + DESTINATION ${GR_PKG_TRELLIS_EXAMPLES_DIR}/fsm_files COMPONENT "trellis_examples" ) diff --git a/gr-trellis/src/examples/README b/gr-trellis/src/examples/python/README index bd28e3d61..d51f231ac 100644 --- a/gr-trellis/src/examples/README +++ b/gr-trellis/src/examples/python/README @@ -1,5 +1,5 @@ Here we have several test programs for use with the gr-trellis implementation. -Documentation can be found in +Documentation can be found in http://gnuradio.utah.edu/svn/gnuradio/trunk/gr-trellis/doc/gr-trellis.html fsm_utils.py contains several useful functions. @@ -28,8 +28,8 @@ number of packets in error estimated packet error rate number of transmitted shorts (or symbols, or bits, depending on the specific program) number of shorts (or symbols, or bits) in error -estimated short (or symbol, or bit) error rate +estimated short (or symbol, or bit) error rate -for instance, the final number 1.10e-03 is the error rate estimate by sending 1000 -packets of 1024 shorts each, using an 1/2 4-state convolutional code +for instance, the final number 1.10e-03 is the error rate estimate by sending 1000 +packets of 1024 shorts each, using an 1/2 4-state convolutional code and QPSK modulation through an AWGN with Es/N0 = 6.0 dB diff --git a/gr-trellis/src/examples/python/fsm_files/awgn1o2_128.fsm b/gr-trellis/src/examples/python/fsm_files/awgn1o2_128.fsm new file mode 100644 index 000000000..4b47007c5 --- /dev/null +++ b/gr-trellis/src/examples/python/fsm_files/awgn1o2_128.fsm @@ -0,0 +1,265 @@ +2 128 4 + +0 64 +0 64 +1 65 +1 65 +2 66 +2 66 +3 67 +3 67 +4 68 +4 68 +5 69 +5 69 +6 70 +6 70 +7 71 +7 71 +8 72 +8 72 +9 73 +9 73 +10 74 +10 74 +11 75 +11 75 +12 76 +12 76 +13 77 +13 77 +14 78 +14 78 +15 79 +15 79 +16 80 +16 80 +17 81 +17 81 +18 82 +18 82 +19 83 +19 83 +20 84 +20 84 +21 85 +21 85 +22 86 +22 86 +23 87 +23 87 +24 88 +24 88 +25 89 +25 89 +26 90 +26 90 +27 91 +27 91 +28 92 +28 92 +29 93 +29 93 +30 94 +30 94 +31 95 +31 95 +32 96 +32 96 +33 97 +33 97 +34 98 +34 98 +35 99 +35 99 +36 100 +36 100 +37 101 +37 101 +38 102 +38 102 +39 103 +39 103 +40 104 +40 104 +41 105 +41 105 +42 106 +42 106 +43 107 +43 107 +44 108 +44 108 +45 109 +45 109 +46 110 +46 110 +47 111 +47 111 +48 112 +48 112 +49 113 +49 113 +50 114 +50 114 +51 115 +51 115 +52 116 +52 116 +53 117 +53 117 +54 118 +54 118 +55 119 +55 119 +56 120 +56 120 +57 121 +57 121 +58 122 +58 122 +59 123 +59 123 +60 124 +60 124 +61 125 +61 125 +62 126 +62 126 +63 127 +63 127 + +0 3 +3 0 +1 2 +2 1 +3 0 +0 3 +2 1 +1 2 +1 2 +2 1 +0 3 +3 0 +2 1 +1 2 +3 0 +0 3 +1 2 +2 1 +0 3 +3 0 +2 1 +1 2 +3 0 +0 3 +0 3 +3 0 +1 2 +2 1 +3 0 +0 3 +2 1 +1 2 +2 1 +1 2 +3 0 +0 3 +1 2 +2 1 +0 3 +3 0 +3 0 +0 3 +2 1 +1 2 +0 3 +3 0 +1 2 +2 1 +3 0 +0 3 +2 1 +1 2 +0 3 +3 0 +1 2 +2 1 +2 1 +1 2 +3 0 +0 3 +1 2 +2 1 +0 3 +3 0 +2 1 +1 2 +3 0 +0 3 +1 2 +2 1 +0 3 +3 0 +3 0 +0 3 +2 1 +1 2 +0 3 +3 0 +1 2 +2 1 +3 0 +0 3 +2 1 +1 2 +0 3 +3 0 +1 2 +2 1 +2 1 +1 2 +3 0 +0 3 +1 2 +2 1 +0 3 +3 0 +0 3 +3 0 +1 2 +2 1 +3 0 +0 3 +2 1 +1 2 +1 2 +2 1 +0 3 +3 0 +2 1 +1 2 +3 0 +0 3 +1 2 +2 1 +0 3 +3 0 +2 1 +1 2 +3 0 +0 3 +0 3 +3 0 +1 2 +2 1 +3 0 +0 3 +2 1 +1 2 + + + +GM1o2_128=[1+D+D^2+D^5+D^7 1+D^3+D^4+D^5+D^6+D^7] + =[11100101 10011111] + =[229 159] diff --git a/gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm b/gr-trellis/src/examples/python/fsm_files/awgn1o2_16.fsm index cdab41359..cdab41359 100644 --- a/gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm +++ b/gr-trellis/src/examples/python/fsm_files/awgn1o2_16.fsm diff --git a/gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm b/gr-trellis/src/examples/python/fsm_files/awgn1o2_4.fsm index fb316b5ef..fb316b5ef 100644 --- a/gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm +++ b/gr-trellis/src/examples/python/fsm_files/awgn1o2_4.fsm diff --git a/gr-trellis/src/examples/fsm_files/awgn1o2_8.fsm b/gr-trellis/src/examples/python/fsm_files/awgn1o2_8.fsm index 604bac6c2..604bac6c2 100644 --- a/gr-trellis/src/examples/fsm_files/awgn1o2_8.fsm +++ b/gr-trellis/src/examples/python/fsm_files/awgn1o2_8.fsm diff --git a/gr-trellis/src/examples/fsm_files/awgn2o3_16.fsm b/gr-trellis/src/examples/python/fsm_files/awgn2o3_16.fsm index 9630cd9af..9630cd9af 100644 --- a/gr-trellis/src/examples/fsm_files/awgn2o3_16.fsm +++ b/gr-trellis/src/examples/python/fsm_files/awgn2o3_16.fsm diff --git a/gr-trellis/src/examples/fsm_files/awgn2o3_4.fsm b/gr-trellis/src/examples/python/fsm_files/awgn2o3_4.fsm index 3ac57be18..3ac57be18 100644 --- a/gr-trellis/src/examples/fsm_files/awgn2o3_4.fsm +++ b/gr-trellis/src/examples/python/fsm_files/awgn2o3_4.fsm diff --git a/gr-trellis/src/examples/fsm_files/awgn2o3_4_msb.fsm b/gr-trellis/src/examples/python/fsm_files/awgn2o3_4_msb.fsm index 551b71101..d834c5271 100644 --- a/gr-trellis/src/examples/fsm_files/awgn2o3_4_msb.fsm +++ b/gr-trellis/src/examples/python/fsm_files/awgn2o3_4_msb.fsm @@ -8,7 +8,7 @@ 0 5 3 6 4 1 7 2 7 2 4 1 -3 6 0 5 +3 6 0 5 This is generated by the 1/2 AWGN code (5 7) operated twice, ie, diff --git a/gr-trellis/src/examples/fsm_files/awgn2o3_4_msbG.fsm b/gr-trellis/src/examples/python/fsm_files/awgn2o3_4_msbG.fsm index 8956c53da..8956c53da 100644 --- a/gr-trellis/src/examples/fsm_files/awgn2o3_4_msbG.fsm +++ b/gr-trellis/src/examples/python/fsm_files/awgn2o3_4_msbG.fsm diff --git a/gr-trellis/src/examples/fsm_files/awgn2o3_8.fsm b/gr-trellis/src/examples/python/fsm_files/awgn2o3_8.fsm index 34deeb68c..34deeb68c 100644 --- a/gr-trellis/src/examples/fsm_files/awgn2o3_8.fsm +++ b/gr-trellis/src/examples/python/fsm_files/awgn2o3_8.fsm diff --git a/gr-trellis/src/examples/fsm_files/awgn2o4_4.fsm b/gr-trellis/src/examples/python/fsm_files/awgn2o4_4.fsm index a895be896..a895be896 100644 --- a/gr-trellis/src/examples/fsm_files/awgn2o4_4.fsm +++ b/gr-trellis/src/examples/python/fsm_files/awgn2o4_4.fsm diff --git a/gr-trellis/src/examples/fsm_files/disconnected.fsm b/gr-trellis/src/examples/python/fsm_files/disconnected.fsm index 847963e7b..847963e7b 100644 --- a/gr-trellis/src/examples/fsm_files/disconnected.fsm +++ b/gr-trellis/src/examples/python/fsm_files/disconnected.fsm diff --git a/gr-trellis/src/examples/fsm_files/irregular.fsm b/gr-trellis/src/examples/python/fsm_files/irregular.fsm index 80b82b889..80b82b889 100644 --- a/gr-trellis/src/examples/fsm_files/irregular.fsm +++ b/gr-trellis/src/examples/python/fsm_files/irregular.fsm diff --git a/gr-trellis/src/examples/python/fsm_files/joint_16_16.fsm b/gr-trellis/src/examples/python/fsm_files/joint_16_16.fsm new file mode 100644 index 000000000..293ff4e7c --- /dev/null +++ b/gr-trellis/src/examples/python/fsm_files/joint_16_16.fsm @@ -0,0 +1,523 @@ +4 256 16 + +0 8 128 136 +0 8 128 136 +1 9 129 137 +1 9 129 137 +2 10 130 138 +2 10 130 138 +3 11 131 139 +3 11 131 139 +4 12 132 140 +4 12 132 140 +5 13 133 141 +5 13 133 141 +6 14 134 142 +6 14 134 142 +7 15 135 143 +7 15 135 143 +0 8 128 136 +0 8 128 136 +1 9 129 137 +1 9 129 137 +2 10 130 138 +2 10 130 138 +3 11 131 139 +3 11 131 139 +4 12 132 140 +4 12 132 140 +5 13 133 141 +5 13 133 141 +6 14 134 142 +6 14 134 142 +7 15 135 143 +7 15 135 143 +16 24 144 152 +16 24 144 152 +17 25 145 153 +17 25 145 153 +18 26 146 154 +18 26 146 154 +19 27 147 155 +19 27 147 155 +20 28 148 156 +20 28 148 156 +21 29 149 157 +21 29 149 157 +22 30 150 158 +22 30 150 158 +23 31 151 159 +23 31 151 159 +16 24 144 152 +16 24 144 152 +17 25 145 153 +17 25 145 153 +18 26 146 154 +18 26 146 154 +19 27 147 155 +19 27 147 155 +20 28 148 156 +20 28 148 156 +21 29 149 157 +21 29 149 157 +22 30 150 158 +22 30 150 158 +23 31 151 159 +23 31 151 159 +32 40 160 168 +32 40 160 168 +33 41 161 169 +33 41 161 169 +34 42 162 170 +34 42 162 170 +35 43 163 171 +35 43 163 171 +36 44 164 172 +36 44 164 172 +37 45 165 173 +37 45 165 173 +38 46 166 174 +38 46 166 174 +39 47 167 175 +39 47 167 175 +32 40 160 168 +32 40 160 168 +33 41 161 169 +33 41 161 169 +34 42 162 170 +34 42 162 170 +35 43 163 171 +35 43 163 171 +36 44 164 172 +36 44 164 172 +37 45 165 173 +37 45 165 173 +38 46 166 174 +38 46 166 174 +39 47 167 175 +39 47 167 175 +48 56 176 184 +48 56 176 184 +49 57 177 185 +49 57 177 185 +50 58 178 186 +50 58 178 186 +51 59 179 187 +51 59 179 187 +52 60 180 188 +52 60 180 188 +53 61 181 189 +53 61 181 189 +54 62 182 190 +54 62 182 190 +55 63 183 191 +55 63 183 191 +48 56 176 184 +48 56 176 184 +49 57 177 185 +49 57 177 185 +50 58 178 186 +50 58 178 186 +51 59 179 187 +51 59 179 187 +52 60 180 188 +52 60 180 188 +53 61 181 189 +53 61 181 189 +54 62 182 190 +54 62 182 190 +55 63 183 191 +55 63 183 191 +64 72 192 200 +64 72 192 200 +65 73 193 201 +65 73 193 201 +66 74 194 202 +66 74 194 202 +67 75 195 203 +67 75 195 203 +68 76 196 204 +68 76 196 204 +69 77 197 205 +69 77 197 205 +70 78 198 206 +70 78 198 206 +71 79 199 207 +71 79 199 207 +64 72 192 200 +64 72 192 200 +65 73 193 201 +65 73 193 201 +66 74 194 202 +66 74 194 202 +67 75 195 203 +67 75 195 203 +68 76 196 204 +68 76 196 204 +69 77 197 205 +69 77 197 205 +70 78 198 206 +70 78 198 206 +71 79 199 207 +71 79 199 207 +80 88 208 216 +80 88 208 216 +81 89 209 217 +81 89 209 217 +82 90 210 218 +82 90 210 218 +83 91 211 219 +83 91 211 219 +84 92 212 220 +84 92 212 220 +85 93 213 221 +85 93 213 221 +86 94 214 222 +86 94 214 222 +87 95 215 223 +87 95 215 223 +80 88 208 216 +80 88 208 216 +81 89 209 217 +81 89 209 217 +82 90 210 218 +82 90 210 218 +83 91 211 219 +83 91 211 219 +84 92 212 220 +84 92 212 220 +85 93 213 221 +85 93 213 221 +86 94 214 222 +86 94 214 222 +87 95 215 223 +87 95 215 223 +96 104 224 232 +96 104 224 232 +97 105 225 233 +97 105 225 233 +98 106 226 234 +98 106 226 234 +99 107 227 235 +99 107 227 235 +100 108 228 236 +100 108 228 236 +101 109 229 237 +101 109 229 237 +102 110 230 238 +102 110 230 238 +103 111 231 239 +103 111 231 239 +96 104 224 232 +96 104 224 232 +97 105 225 233 +97 105 225 233 +98 106 226 234 +98 106 226 234 +99 107 227 235 +99 107 227 235 +100 108 228 236 +100 108 228 236 +101 109 229 237 +101 109 229 237 +102 110 230 238 +102 110 230 238 +103 111 231 239 +103 111 231 239 +112 120 240 248 +112 120 240 248 +113 121 241 249 +113 121 241 249 +114 122 242 250 +114 122 242 250 +115 123 243 251 +115 123 243 251 +116 124 244 252 +116 124 244 252 +117 125 245 253 +117 125 245 253 +118 126 246 254 +118 126 246 254 +119 127 247 255 +119 127 247 255 +112 120 240 248 +112 120 240 248 +113 121 241 249 +113 121 241 249 +114 122 242 250 +114 122 242 250 +115 123 243 251 +115 123 243 251 +116 124 244 252 +116 124 244 252 +117 125 245 253 +117 125 245 253 +118 126 246 254 +118 126 246 254 +119 127 247 255 +119 127 247 255 + +0 3 12 15 +3 0 15 12 +1 2 13 14 +2 1 14 13 +1 2 13 14 +2 1 14 13 +0 3 12 15 +3 0 15 12 +2 1 14 13 +1 2 13 14 +3 0 15 12 +0 3 12 15 +3 0 15 12 +0 3 12 15 +2 1 14 13 +1 2 13 14 +12 15 0 3 +15 12 3 0 +13 14 1 2 +14 13 2 1 +13 14 1 2 +14 13 2 1 +12 15 0 3 +15 12 3 0 +14 13 2 1 +13 14 1 2 +15 12 3 0 +12 15 0 3 +15 12 3 0 +12 15 0 3 +14 13 2 1 +13 14 1 2 +4 7 8 11 +7 4 11 8 +5 6 9 10 +6 5 10 9 +5 6 9 10 +6 5 10 9 +4 7 8 11 +7 4 11 8 +6 5 10 9 +5 6 9 10 +7 4 11 8 +4 7 8 11 +7 4 11 8 +4 7 8 11 +6 5 10 9 +5 6 9 10 +8 11 4 7 +11 8 7 4 +9 10 5 6 +10 9 6 5 +9 10 5 6 +10 9 6 5 +8 11 4 7 +11 8 7 4 +10 9 6 5 +9 10 5 6 +11 8 7 4 +8 11 4 7 +11 8 7 4 +8 11 4 7 +10 9 6 5 +9 10 5 6 +4 7 8 11 +7 4 11 8 +5 6 9 10 +6 5 10 9 +5 6 9 10 +6 5 10 9 +4 7 8 11 +7 4 11 8 +6 5 10 9 +5 6 9 10 +7 4 11 8 +4 7 8 11 +7 4 11 8 +4 7 8 11 +6 5 10 9 +5 6 9 10 +8 11 4 7 +11 8 7 4 +9 10 5 6 +10 9 6 5 +9 10 5 6 +10 9 6 5 +8 11 4 7 +11 8 7 4 +10 9 6 5 +9 10 5 6 +11 8 7 4 +8 11 4 7 +11 8 7 4 +8 11 4 7 +10 9 6 5 +9 10 5 6 +0 3 12 15 +3 0 15 12 +1 2 13 14 +2 1 14 13 +1 2 13 14 +2 1 14 13 +0 3 12 15 +3 0 15 12 +2 1 14 13 +1 2 13 14 +3 0 15 12 +0 3 12 15 +3 0 15 12 +0 3 12 15 +2 1 14 13 +1 2 13 14 +12 15 0 3 +15 12 3 0 +13 14 1 2 +14 13 2 1 +13 14 1 2 +14 13 2 1 +12 15 0 3 +15 12 3 0 +14 13 2 1 +13 14 1 2 +15 12 3 0 +12 15 0 3 +15 12 3 0 +12 15 0 3 +14 13 2 1 +13 14 1 2 +8 11 4 7 +11 8 7 4 +9 10 5 6 +10 9 6 5 +9 10 5 6 +10 9 6 5 +8 11 4 7 +11 8 7 4 +10 9 6 5 +9 10 5 6 +11 8 7 4 +8 11 4 7 +11 8 7 4 +8 11 4 7 +10 9 6 5 +9 10 5 6 +4 7 8 11 +7 4 11 8 +5 6 9 10 +6 5 10 9 +5 6 9 10 +6 5 10 9 +4 7 8 11 +7 4 11 8 +6 5 10 9 +5 6 9 10 +7 4 11 8 +4 7 8 11 +7 4 11 8 +4 7 8 11 +6 5 10 9 +5 6 9 10 +12 15 0 3 +15 12 3 0 +13 14 1 2 +14 13 2 1 +13 14 1 2 +14 13 2 1 +12 15 0 3 +15 12 3 0 +14 13 2 1 +13 14 1 2 +15 12 3 0 +12 15 0 3 +15 12 3 0 +12 15 0 3 +14 13 2 1 +13 14 1 2 +0 3 12 15 +3 0 15 12 +1 2 13 14 +2 1 14 13 +1 2 13 14 +2 1 14 13 +0 3 12 15 +3 0 15 12 +2 1 14 13 +1 2 13 14 +3 0 15 12 +0 3 12 15 +3 0 15 12 +0 3 12 15 +2 1 14 13 +1 2 13 14 +12 15 0 3 +15 12 3 0 +13 14 1 2 +14 13 2 1 +13 14 1 2 +14 13 2 1 +12 15 0 3 +15 12 3 0 +14 13 2 1 +13 14 1 2 +15 12 3 0 +12 15 0 3 +15 12 3 0 +12 15 0 3 +14 13 2 1 +13 14 1 2 +0 3 12 15 +3 0 15 12 +1 2 13 14 +2 1 14 13 +1 2 13 14 +2 1 14 13 +0 3 12 15 +3 0 15 12 +2 1 14 13 +1 2 13 14 +3 0 15 12 +0 3 12 15 +3 0 15 12 +0 3 12 15 +2 1 14 13 +1 2 13 14 +8 11 4 7 +11 8 7 4 +9 10 5 6 +10 9 6 5 +9 10 5 6 +10 9 6 5 +8 11 4 7 +11 8 7 4 +10 9 6 5 +9 10 5 6 +11 8 7 4 +8 11 4 7 +11 8 7 4 +8 11 4 7 +10 9 6 5 +9 10 5 6 +4 7 8 11 +7 4 11 8 +5 6 9 10 +6 5 10 9 +5 6 9 10 +6 5 10 9 +4 7 8 11 +7 4 11 8 +6 5 10 9 +5 6 9 10 +7 4 11 8 +4 7 8 11 +7 4 11 8 +4 7 8 11 +6 5 10 9 +5 6 9 10 + +This is the joint trellis of two trellises described in awgn1o2_16.fsm +It is useful for application of joint decoding... +It can be generated in python as follows: +> import trellis +> f1=trellis.fsm('awgn1o2_16.fsm') +> f=trellis.fsm(f1,f1) +> f.write_fsm_txt('joint_16_16.fsm') diff --git a/gr-trellis/src/examples/python/fsm_files/joint_4_16.fsm b/gr-trellis/src/examples/python/fsm_files/joint_4_16.fsm new file mode 100644 index 000000000..427a18207 --- /dev/null +++ b/gr-trellis/src/examples/python/fsm_files/joint_4_16.fsm @@ -0,0 +1,141 @@ +4 64 16 + +0 8 32 40 +0 8 32 40 +1 9 33 41 +1 9 33 41 +2 10 34 42 +2 10 34 42 +3 11 35 43 +3 11 35 43 +4 12 36 44 +4 12 36 44 +5 13 37 45 +5 13 37 45 +6 14 38 46 +6 14 38 46 +7 15 39 47 +7 15 39 47 +0 8 32 40 +0 8 32 40 +1 9 33 41 +1 9 33 41 +2 10 34 42 +2 10 34 42 +3 11 35 43 +3 11 35 43 +4 12 36 44 +4 12 36 44 +5 13 37 45 +5 13 37 45 +6 14 38 46 +6 14 38 46 +7 15 39 47 +7 15 39 47 +16 24 48 56 +16 24 48 56 +17 25 49 57 +17 25 49 57 +18 26 50 58 +18 26 50 58 +19 27 51 59 +19 27 51 59 +20 28 52 60 +20 28 52 60 +21 29 53 61 +21 29 53 61 +22 30 54 62 +22 30 54 62 +23 31 55 63 +23 31 55 63 +16 24 48 56 +16 24 48 56 +17 25 49 57 +17 25 49 57 +18 26 50 58 +18 26 50 58 +19 27 51 59 +19 27 51 59 +20 28 52 60 +20 28 52 60 +21 29 53 61 +21 29 53 61 +22 30 54 62 +22 30 54 62 +23 31 55 63 +23 31 55 63 + +0 3 12 15 +3 0 15 12 +1 2 13 14 +2 1 14 13 +1 2 13 14 +2 1 14 13 +0 3 12 15 +3 0 15 12 +2 1 14 13 +1 2 13 14 +3 0 15 12 +0 3 12 15 +3 0 15 12 +0 3 12 15 +2 1 14 13 +1 2 13 14 +12 15 0 3 +15 12 3 0 +13 14 1 2 +14 13 2 1 +13 14 1 2 +14 13 2 1 +12 15 0 3 +15 12 3 0 +14 13 2 1 +13 14 1 2 +15 12 3 0 +12 15 0 3 +15 12 3 0 +12 15 0 3 +14 13 2 1 +13 14 1 2 +4 7 8 11 +7 4 11 8 +5 6 9 10 +6 5 10 9 +5 6 9 10 +6 5 10 9 +4 7 8 11 +7 4 11 8 +6 5 10 9 +5 6 9 10 +7 4 11 8 +4 7 8 11 +7 4 11 8 +4 7 8 11 +6 5 10 9 +5 6 9 10 +8 11 4 7 +11 8 7 4 +9 10 5 6 +10 9 6 5 +9 10 5 6 +10 9 6 5 +8 11 4 7 +11 8 7 4 +10 9 6 5 +9 10 5 6 +11 8 7 4 +8 11 4 7 +11 8 7 4 +8 11 4 7 +10 9 6 5 +9 10 5 6 + +This is the joint trellis of two trellises described in awgn1o2_4.fsm and awgn1o2_16.fsm +It is useful for application of joint decoding... +It can be generated in python as follows: +> import trellis +> f1=trellis.fsm('awgn1o2_4.fsm') +> f2=trellis.fsm('awgn1o2_16.fsm') +> f=trellis.fsm(f1,f2) +> f.write_fsm_txt('joint_4_16.fsm') + diff --git a/gr-trellis/src/examples/fsm_files/rep3.fsm b/gr-trellis/src/examples/python/fsm_files/rep3.fsm index ef1bd1f02..ef1bd1f02 100644 --- a/gr-trellis/src/examples/fsm_files/rep3.fsm +++ b/gr-trellis/src/examples/python/fsm_files/rep3.fsm diff --git a/gr-trellis/src/examples/fsm_files/rep5.fsm b/gr-trellis/src/examples/python/fsm_files/rep5.fsm index 2aa5d77cf..2aa5d77cf 100644 --- a/gr-trellis/src/examples/fsm_files/rep5.fsm +++ b/gr-trellis/src/examples/python/fsm_files/rep5.fsm diff --git a/gr-trellis/src/examples/fsm_files/simple.fsm b/gr-trellis/src/examples/python/fsm_files/simple.fsm index f27f6b4b0..f27f6b4b0 100644 --- a/gr-trellis/src/examples/fsm_files/simple.fsm +++ b/gr-trellis/src/examples/python/fsm_files/simple.fsm diff --git a/gr-trellis/src/examples/fsm_utils.py b/gr-trellis/src/examples/python/fsm_utils.py index e9243f899..06855ea77 100755 --- a/gr-trellis/src/examples/fsm_utils.py +++ b/gr-trellis/src/examples/python/fsm_utils.py @@ -72,7 +72,7 @@ def base2dec(s,base): # to channel inputs corresponding to a channel 'channel' and a modulation # 'mod'. Optional normalization of channel to unit energy. # This table is used by the 'metrics' block to translate -# channel outputs to metrics for use with the Viterbi algorithm. +# channel outputs to metrics for use with the Viterbi algorithm. # Limitations: currently supports only one-dimensional modulations. ###################################################################### def make_isi_lookup(mod,channel,normalize): @@ -102,7 +102,7 @@ def make_isi_lookup(mod,channel,normalize): ###################################################################### # Automatically generate the signals appropriate for CPM -# decomposition. +# decomposition. # This decomposition is based on the paper by B. Rimoldi # "A decomposition approach to CPM", IEEE Trans. Info Theory, March 1988 # See also my own notes at http://www.eecs.umich.edu/~anastas/docs/cpm.pdf @@ -118,7 +118,7 @@ def make_cpm_signals(K,P,M,L,q,frac): for m in range(L): qq=qq + q[m*Q:m*Q+Q] w=math.pi*h*(M-1)*t-2*math.pi*h*(M-1)*qq+math.pi*h*(L-1)*(M-1) - + X=(M**L)*P PSI=numpy.empty((X,Q)) for x in range(X): @@ -133,9 +133,9 @@ def make_cpm_signals(K,P,M,L,q,frac): PSI = numpy.transpose(PSI) SS=numpy.exp(1j*PSI) # contains all signals as columns #print SS - - # Now we need to orthogonalize the signals + + # Now we need to orthogonalize the signals F = scipy.linalg.orth(SS) # find an orthonormal basis for SS #print numpy.dot(numpy.transpose(F.conjugate()),F) # check for orthonormality S = numpy.dot(numpy.transpose(F.conjugate()),SS) @@ -162,11 +162,11 @@ def make_cpm_signals(K,P,M,L,q,frac): #print Ff Sf = S[Esi[0:v0+1]] #print Sf - + return (f0,SS,S,F,Sf,Ff,N) #return f0 - + diff --git a/gr-trellis/src/examples/test_cpm.py b/gr-trellis/src/examples/python/test_cpm.py index 06d54b1a6..5342e57e8 100755 --- a/gr-trellis/src/examples/test_cpm.py +++ b/gr-trellis/src/examples/python/test_cpm.py @@ -82,7 +82,7 @@ def run_test(seed,blocksize): data[i]=0 for i in range(tail+1): data[-i]=0 - + ################################################## @@ -125,7 +125,7 @@ def run_test(seed,blocksize): tb.connect((gr_streams_to_stream_0, 0), (gr_skiphead_0, 0)) tb.connect((gr_skiphead_0, 0), (viterbi, 0)) tb.connect((viterbi, 0), (gr_vector_sink_x_0, 0)) - + tb.run() dataest = gr_vector_sink_x_0.data() diff --git a/gr-trellis/src/examples/test_pccc_turbo1.py b/gr-trellis/src/examples/python/test_pccc_turbo1.py index 7f1ea26ae..0655b972d 100755 --- a/gr-trellis/src/examples/test_pccc_turbo1.py +++ b/gr-trellis/src/examples/python/test_pccc_turbo1.py @@ -30,10 +30,10 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, metrics_in = trellis.metrics_f(fi.O()*fo.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for innner SISO scale = gr.multiply_const_ff(1.0/N0) dec = trellis.pccc_decoder_s(fo,0,-1,fi,0,-1,interleaver,K,IT,trellis.TRELLIS_MIN_SUM) - + fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts dst = gr.check_lfsr_32k_s() - + tb.connect (src,src_head,s2fsmi,enc,mod) #tb.connect (src,enc,mod) #tb.connect(enc,code) @@ -42,9 +42,9 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, tb.connect (add,metrics_in,scale,dec,fsmi2s,dst) tb.run() - + #print code.data() - + ntotal = dst.ntotal () nright = dst.nright () runlength = dst.runlength () @@ -100,7 +100,7 @@ def main(args): Es = Es + constellation[i]**2 Es = Es / (len(constellation)/dimensionality) N0=Es/pow(10.0,esn0_db/10.0); # calculate noise variance - + tot_s=0 # total number of transmitted shorts terr_s=0 # total number of shorts in error terr_p=0 # total number of packets in error diff --git a/gr-trellis/src/examples/test_sccc_hard.py b/gr-trellis/src/examples/python/test_sccc_hard.py index e732ac2c0..4eeb94a12 100755 --- a/gr-trellis/src/examples/test_sccc_hard.py +++ b/gr-trellis/src/examples/python/test_sccc_hard.py @@ -33,7 +33,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, va_out = trellis.viterbi_s(fo,K,0,-1) # Put -1 if the Initial/Final states are not set. fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts dst = gr.check_lfsr_32k_s() - + tb.connect (src,src_head,s2fsmi,enc_out,inter,enc_in,mod) tb.connect (mod,(add,0)) tb.connect (noise,(add,1)) @@ -41,7 +41,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, tb.connect (metrics_in,va_in,deinter,metrics_out,va_out,fsmi2s,dst) tb.run() - + ntotal = dst.ntotal () nright = dst.nright () runlength = dst.runlength () @@ -71,7 +71,7 @@ def main(args): interleaver=trellis.interleaver(K,666) # construct a random interleaver modulation = fsm_utils.psk8 # see fsm_utlis.py for available predefined modulations dimensionality = modulation[0] - constellation = modulation[1] + constellation = modulation[1] if len(constellation)/dimensionality != fi.O(): sys.stderr.write ('Incompatible FSM output cardinality and modulation size.\n') sys.exit (1) @@ -81,7 +81,7 @@ def main(args): Es = Es + constellation[i]**2 Es = Es / (len(constellation)/dimensionality) N0=Es/pow(10.0,esn0_db/10.0); # calculate noise variance - + tot_s=0 # total number of transmitted shorts terr_s=0 # total number of shorts in error terr_p=0 # total number of packets in error diff --git a/gr-trellis/src/examples/test_sccc_soft.py b/gr-trellis/src/examples/python/test_sccc_soft.py index 1c71e4ca7..10c28419a 100755 --- a/gr-trellis/src/examples/test_sccc_soft.py +++ b/gr-trellis/src/examples/python/test_sccc_soft.py @@ -36,7 +36,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, va_out = trellis.viterbi_s(fo,K,0,-1) # Put -1 if the Initial/Final states are not set. fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts dst = gr.check_lfsr_32k_s() - + tb.connect (src,src_head,s2fsmi,enc_out,inter,enc_in,mod) tb.connect (mod,(add,0)) tb.connect (noise,(add,1)) @@ -46,7 +46,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, tb.connect (siso_in,deinter,va_out,fsmi2s,dst) tb.run() - + ntotal = dst.ntotal () nright = dst.nright () runlength = dst.runlength () @@ -76,7 +76,7 @@ def main(args): interleaver=trellis.interleaver(K,666) # construct a random interleaver modulation = fsm_utils.psk8 # see fsm_utlis.py for available predefined modulations dimensionality = modulation[0] - constellation = modulation[1] + constellation = modulation[1] if len(constellation)/dimensionality != fi.O(): sys.stderr.write ('Incompatible FSM output cardinality and modulation size.\n') sys.exit (1) @@ -100,7 +100,7 @@ def main(args): print i+1,terr_p, '%.2e' % ((1.0*terr_p)/(i+1)),tot_s,terr_s, '%.2e' % ((1.0*terr_s)/tot_s) # estimate of the (short or bit) error rate print rep,terr_p, '%.2e' % ((1.0*terr_p)/(i+1)),tot_s,terr_s, '%.2e' % ((1.0*terr_s)/tot_s) - + if __name__ == '__main__': diff --git a/gr-trellis/src/examples/test_sccc_turbo.py b/gr-trellis/src/examples/python/test_sccc_turbo.py index b1007a864..762a93ba5 100755 --- a/gr-trellis/src/examples/test_sccc_turbo.py +++ b/gr-trellis/src/examples/python/test_sccc_turbo.py @@ -72,7 +72,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, #(head,tail) = make_rx(tb,fo,fi,dimensionality,constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_SUM_PRODUCT) fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts dst = gr.check_lfsr_32k_s() - + tb.connect (src,src_head,s2fsmi,enc_out,inter,enc_in,mod) tb.connect (mod,(add,0)) tb.connect (noise,(add,1)) @@ -80,9 +80,9 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, tb.connect (tail,fsmi2s,dst) tb.run() - + #print enc_out.ST(), enc_in.ST() - + ntotal = dst.ntotal () nright = dst.nright () runlength = dst.runlength () @@ -113,7 +113,7 @@ def main(args): interleaver=trellis.interleaver(K,666) # construct a random interleaver modulation = fsm_utils.psk8 # see fsm_utlis.py for available predefined modulations dimensionality = modulation[0] - constellation = modulation[1] + constellation = modulation[1] if len(constellation)/dimensionality != fi.O(): sys.stderr.write ('Incompatible FSM output cardinality and modulation size.\n') sys.exit (1) @@ -123,7 +123,7 @@ def main(args): Es = Es + constellation[i]**2 Es = Es / (len(constellation)/dimensionality) N0=Es/pow(10.0,esn0_db/10.0); # calculate noise variance - + tot_s=0 # total number of transmitted shorts terr_s=0 # total number of shorts in error terr_p=0 # total number of packets in error diff --git a/gr-trellis/src/examples/test_sccc_turbo1.py b/gr-trellis/src/examples/python/test_sccc_turbo1.py index ad2ed6bf9..187a75185 100755 --- a/gr-trellis/src/examples/test_sccc_turbo1.py +++ b/gr-trellis/src/examples/python/test_sccc_turbo1.py @@ -27,7 +27,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, dec = trellis.sccc_decoder_combined_fs(fo,0,-1,fi,0,-1,interleaver,K,IT,trellis.TRELLIS_MIN_SUM,dimensionality,constellation,digital.TRELLIS_EUCLIDEAN,1.0) fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts dst = gr.check_lfsr_32k_s() - + #tb.connect (src,src_head,s2fsmi,enc_out,inter,enc_in,mod) tb.connect (src,src_head,s2fsmi,enc,mod) tb.connect (mod,(add,0)) @@ -37,9 +37,9 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, tb.connect (add,dec,fsmi2s,dst) tb.run() - + #print enc_out.ST(), enc_in.ST() - + ntotal = dst.ntotal () nright = dst.nright () runlength = dst.runlength () @@ -70,7 +70,7 @@ def main(args): interleaver=trellis.interleaver(K,666) # construct a random interleaver modulation = fsm_utils.psk8 # see fsm_utlis.py for available predefined modulations dimensionality = modulation[0] - constellation = modulation[1] + constellation = modulation[1] if len(constellation)/dimensionality != fi.O(): sys.stderr.write ('Incompatible FSM output cardinality and modulation size.\n') sys.exit (1) @@ -80,7 +80,7 @@ def main(args): Es = Es + constellation[i]**2 Es = Es / (len(constellation)/dimensionality) N0=Es/pow(10.0,esn0_db/10.0); # calculate noise variance - + tot_s=0 # total number of transmitted shorts terr_s=0 # total number of shorts in error terr_p=0 # total number of packets in error diff --git a/gr-trellis/src/examples/test_sccc_turbo2.py b/gr-trellis/src/examples/python/test_sccc_turbo2.py index fdb92adc8..dff1ba93c 100755 --- a/gr-trellis/src/examples/test_sccc_turbo2.py +++ b/gr-trellis/src/examples/python/test_sccc_turbo2.py @@ -29,7 +29,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, dec = trellis.sccc_decoder_s(fo,0,-1,fi,0,-1,interleaver,K,IT,trellis.TRELLIS_MIN_SUM) fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts dst = gr.check_lfsr_32k_s() - + #tb.connect (src,src_head,s2fsmi,enc_out,inter,enc_in,mod) tb.connect (src,src_head,s2fsmi,enc,mod) tb.connect (mod,(add,0)) @@ -39,9 +39,9 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, tb.connect (add,metrics_in,scale,dec,fsmi2s,dst) tb.run() - + #print enc_out.ST(), enc_in.ST() - + ntotal = dst.ntotal () nright = dst.nright () runlength = dst.runlength () @@ -72,7 +72,7 @@ def main(args): interleaver=trellis.interleaver(K,666) # construct a random interleaver modulation = fsm_utils.psk8 # see fsm_utlis.py for available predefined modulations dimensionality = modulation[0] - constellation = modulation[1] + constellation = modulation[1] if len(constellation)/dimensionality != fi.O(): sys.stderr.write ('Incompatible FSM output cardinality and modulation size.\n') sys.exit (1) @@ -82,7 +82,7 @@ def main(args): Es = Es + constellation[i]**2 Es = Es / (len(constellation)/dimensionality) N0=Es/pow(10.0,esn0_db/10.0); # calculate noise variance - + tot_s=0 # total number of transmitted shorts terr_s=0 # total number of shorts in error terr_p=0 # total number of packets in error diff --git a/gr-trellis/src/examples/test_tcm.py b/gr-trellis/src/examples/python/test_tcm.py index 62fd5135e..a7d6a02d0 100755 --- a/gr-trellis/src/examples/test_tcm.py +++ b/gr-trellis/src/examples/python/test_tcm.py @@ -35,9 +35,9 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): va = trellis.viterbi_s(f,K,0,-1) # Put -1 if the Initial/Final states are not set. fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts #s2b = gr.packed_to_unpacked_ss(1,gr.GR_MSB_FIRST) # unpack shorts to bits - #dst = gr.vector_sink_s(); + #dst = gr.vector_sink_s(); dst = gr.check_lfsr_32k_s() - + tb.connect (src,src_head,s2fsmi,enc,mod) #tb.connect (src,b2s,s2fsmi,enc,mod) @@ -46,11 +46,11 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): tb.connect (add,metrics) tb.connect (metrics,va,fsmi2s,dst) #tb.connect (metrics,va,fsmi2s,s2b,dst) - + tb.run() - - # A bit of cheating: run the program once and print the + + # A bit of cheating: run the program once and print the # final encoder state.. # Then put it as the last argument in the viterbi block #print "final state = " , enc.ST() @@ -90,13 +90,13 @@ def main(): # system parameters f=trellis.fsm(fname) # get the FSM specification from a file # alternatively you can specify the fsm from its generator matrix - #f=trellis.fsm(1,2,[5,7]) + #f=trellis.fsm(1,2,[5,7]) Kb=1024*16 # packet size in bits (make it multiple of 16 so it can be packed in a short) bitspersymbol = int(round(math.log(f.I())/math.log(2))) # bits per FSM input symbol K=Kb/bitspersymbol # packet size in trellis steps modulation = fsm_utils.psk4 # see fsm_utlis.py for available predefined modulations dimensionality = modulation[0] - constellation = modulation[1] + constellation = modulation[1] if len(constellation)/dimensionality != f.O(): sys.stderr.write ('Incompatible FSM output cardinality and modulation size.\n') sys.exit (1) @@ -106,7 +106,7 @@ def main(): Es = Es + constellation[i]**2 Es = Es / (len(constellation)/dimensionality) N0=Es/pow(10.0,esn0_db/10.0); # calculate noise variance - + tot_s=0 # total number of transmitted shorts terr_s=0 # total number of shorts in error terr_p=0 # total number of packets in error diff --git a/gr-trellis/src/examples/test_tcm_bit.py b/gr-trellis/src/examples/python/test_tcm_bit.py index cc5caefbc..7f69c0e29 100755 --- a/gr-trellis/src/examples/test_tcm_bit.py +++ b/gr-trellis/src/examples/python/test_tcm_bit.py @@ -27,7 +27,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): enc = trellis.encoder_ss(f,0) # initial state = 0 mod = gr.chunks_to_symbols_sf(constellation,dimensionality) - + # CHANNEL add = gr.add_ff() noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) @@ -38,9 +38,9 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): va = trellis.viterbi_s(f,K,0,-1) # Put -1 if the Initial/Final states are not set. fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts s2b = gr.packed_to_unpacked_ss(1,gr.GR_MSB_FIRST) # unpack shorts to bits - dst = gr.vector_sink_s(); - #dst = gr.check_lfsr_32k_s(); - + dst = gr.vector_sink_s(); + #dst = gr.check_lfsr_32k_s(); + #tb.connect (src,src_head,s2fsmi,enc,mod) tb.connect (src,b2s,s2fsmi,enc,mod) @@ -49,11 +49,11 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): tb.connect (add,metrics) #tb.connect (metrics,va,fsmi2s,dst) tb.connect (metrics,va,fsmi2s,s2b,dst) - + tb.run() - - # A bit of cheating: run the program once and print the + + # A bit of cheating: run the program once and print the # final encoder state.. # Then put it as the last argument in the viterbi block #print "final state = " , enc.ST() @@ -99,7 +99,7 @@ def main(): K=Kb/bitspersymbol # packet size in trellis steps modulation = fsm_utils.psk4 # see fsm_utlis.py for available predefined modulations dimensionality = modulation[0] - constellation = modulation[1] + constellation = modulation[1] if len(constellation)/dimensionality != f.O(): sys.stderr.write ('Incompatible FSM output cardinality and modulation size.\n') sys.exit (1) @@ -109,7 +109,7 @@ def main(): Es = Es + constellation[i]**2 Es = Es / (len(constellation)/dimensionality) N0=Es/pow(10.0,esn0_db/10.0); # calculate noise variance - + tot_s=0 # total number of transmitted shorts terr_s=0 # total number of shorts in error terr_p=0 # total number of packets in error diff --git a/gr-trellis/src/examples/test_tcm_combined.py b/gr-trellis/src/examples/python/test_tcm_combined.py index 55a3043b8..d98e36e27 100755 --- a/gr-trellis/src/examples/test_tcm_combined.py +++ b/gr-trellis/src/examples/python/test_tcm_combined.py @@ -25,22 +25,22 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): add = gr.add_ff() noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) - + # RX va = trellis.viterbi_combined_fs(f,K,0,-1,dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # Put -1 if the Initial/Final states are not set. fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts - dst = gr.check_lfsr_32k_s(); - + dst = gr.check_lfsr_32k_s(); + tb.connect (src,src_head,s2fsmi,enc,mod) tb.connect (mod,(add,0)) tb.connect (noise,(add,1)) tb.connect (add,va,fsmi2s,dst) - + tb.run() - - # A bit of cheating: run the program once and print the + + # A bit of cheating: run the program once and print the # final encoder state.. # Then put it as the last argument in the viterbi block #print "final state = " , enc.ST() @@ -48,7 +48,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): ntotal = dst.ntotal () nright = dst.nright () runlength = dst.runlength () - + return (ntotal,ntotal-nright) @@ -76,7 +76,7 @@ def main(): K=Kb/bitspersymbol # packet size in trellis steps modulation = fsm_utils.psk4 # see fsm_utils.py for available predefined modulations dimensionality = modulation[0] - constellation = modulation[1] + constellation = modulation[1] if len(constellation)/dimensionality != f.O(): sys.stderr.write ('Incompatible FSM output cardinality and modulation size.\n') sys.exit (1) diff --git a/gr-trellis/src/examples/test_tcm_parallel.py b/gr-trellis/src/examples/python/test_tcm_parallel.py index 2b722c09e..0372351aa 100755 --- a/gr-trellis/src/examples/test_tcm_parallel.py +++ b/gr-trellis/src/examples/python/test_tcm_parallel.py @@ -43,11 +43,11 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed,P): tb.connect (add[i],(metrics,i)) tb.connect ((metrics,i),(va,i),(p2s,i)) tb.connect (p2s,fsmi2s,dst) - + tb.run() - - # A bit of cheating: run the program once and print the + + # A bit of cheating: run the program once and print the # final encoder state. # Then put it as the last argument in the viterbi block #print "final state = " , enc.ST() @@ -55,7 +55,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed,P): ntotal = dst.ntotal () nright = dst.nright () runlength = dst.runlength () - + return (ntotal,ntotal-nright) diff --git a/gr-trellis/src/examples/test_turbo_equalization.py b/gr-trellis/src/examples/python/test_turbo_equalization.py index 6fa6749f0..18bfb022a 100755 --- a/gr-trellis/src/examples/test_turbo_equalization.py +++ b/gr-trellis/src/examples/python/test_turbo_equalization.py @@ -44,7 +44,7 @@ def make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,typ else: tb.connect (siso_in[it],deinter[it],siso_out[it]) tb.connect (inter[it],(siso_in[it],0)) - + return (metrics_in,siso_out[IT-1]) @@ -64,25 +64,25 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,tot_constellat # CHANNEL add = gr.add_ff() noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) - + # RX - (head,tail) = make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM) + (head,tail) = make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM) fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts - dst = gr.check_lfsr_32k_s(); - + dst = gr.check_lfsr_32k_s(); + tb.connect (src,src_head,s2fsmi,enc_out,inter,enc_in,mod) tb.connect (mod,(add,0)) tb.connect (noise,(add,1)) tb.connect (add,head) tb.connect (tail,fsmi2s,dst) - + tb.run() ntotal = dst.ntotal () nright = dst.nright () runlength = dst.runlength () - #print ntotal,nright,runlength - + #print ntotal,nright,runlength + return (ntotal,ntotal-nright) diff --git a/gr-trellis/src/examples/test_turbo_equalization1.py b/gr-trellis/src/examples/python/test_turbo_equalization1.py index 15a8f6809..17ad43023 100755 --- a/gr-trellis/src/examples/test_turbo_equalization1.py +++ b/gr-trellis/src/examples/python/test_turbo_equalization1.py @@ -67,17 +67,17 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,channel,modulation,dimensiona isi = gr.fir_filter_fff(1,channel) add = gr.add_ff() noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) - + # RX - (head,tail) = make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM) - dst = gr.vector_sink_s(); - + (head,tail) = make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM) + dst = gr.vector_sink_s(); + tb.connect (src,enc_out,inter,mod) tb.connect (mod,isi,(add,0)) tb.connect (noise,(add,1)) tb.connect (add,head) tb.connect (tail,dst) - + tb.run() data = dst.data() @@ -88,7 +88,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,channel,modulation,dimensiona nright=nright+1 #else: #print "Error in ", i - + return (ntotal,ntotal-nright) diff --git a/gr-trellis/src/examples/test_turbo_equalization2.py b/gr-trellis/src/examples/python/test_turbo_equalization2.py index 7e4341cba..5a6c77e9d 100755 --- a/gr-trellis/src/examples/test_turbo_equalization2.py +++ b/gr-trellis/src/examples/python/test_turbo_equalization2.py @@ -65,17 +65,17 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,channel,modulation,dimensiona isi = gr.fir_filter_fff(1,channel) add = gr.add_ff() noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) - + # RX - (head,tail) = make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM) - dst = gr.vector_sink_s(); - + (head,tail) = make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM) + dst = gr.vector_sink_s(); + tb.connect (src,enc_out,inter,mod) tb.connect (mod,isi,(add,0)) tb.connect (noise,(add,1)) tb.connect (add,head) tb.connect (tail,dst) - + tb.run() data = dst.data() @@ -86,7 +86,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,channel,modulation,dimensiona nright=nright+1 #else: #print "Error in ", i - + return (ntotal,ntotal-nright) @@ -117,7 +117,7 @@ def main(args): tot_channel = fsm_utils.make_isi_lookup(modulation,channel,True) # generate the lookup table (normalize energy to 1) dimensionality = tot_channel[0] N0=pow(10.0,-esn0_db/10.0); # noise variance - tot_constellation =[0]*len(tot_channel[1]) + tot_constellation =[0]*len(tot_channel[1]) for i in range(len(tot_channel[1])): tot_constellation[i] = tot_channel[1][i] * math.sqrt(1.0/N0) if len(tot_constellation)/dimensionality != fi.O(): diff --git a/gr-trellis/src/examples/test_viterbi_equalization.py b/gr-trellis/src/examples/python/test_viterbi_equalization.py index d290a0d0a..9f3f7e391 100755 --- a/gr-trellis/src/examples/test_viterbi_equalization.py +++ b/gr-trellis/src/examples/python/test_viterbi_equalization.py @@ -21,26 +21,26 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,tot_constellation,N0,seed): # CHANNEL add = gr.add_ff() noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) - + # RX metrics = trellis.metrics_f(f.O(),dimensionality,tot_constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi va = trellis.viterbi_s(f,K,0,-1) # Put -1 if the Initial/Final states are not set. fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts - dst = gr.check_lfsr_32k_s(); - + dst = gr.check_lfsr_32k_s(); + tb.connect (src,src_head,s2fsmi,enc,mod) tb.connect (mod,(add,0)) tb.connect (noise,(add,1)) tb.connect (add,metrics) tb.connect (metrics,va,fsmi2s,dst) - + tb.run() ntotal = dst.ntotal () nright = dst.nright () runlength = dst.runlength () - #print ntotal,nright,runlength - + #print ntotal,nright,runlength + return (ntotal,ntotal-nright) diff --git a/gr-trellis/src/examples/test_viterbi_equalization1.py b/gr-trellis/src/examples/python/test_viterbi_equalization1.py index 41f777551..90eb4790e 100755 --- a/gr-trellis/src/examples/test_viterbi_equalization1.py +++ b/gr-trellis/src/examples/python/test_viterbi_equalization1.py @@ -28,7 +28,7 @@ def run_test (f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constel isi = gr.fir_filter_fff(1,channel) add = gr.add_ff() noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) - + # RX skip = gr.skiphead(gr.sizeof_float, L) # skip the first L samples since you know they are coming from the L zero symbols #metrics = trellis.metrics_f(f.O(),dimensionality,tot_constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi @@ -45,7 +45,7 @@ def run_test (f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constel tb.run() - data = dst.data() + data = dst.data() ntotal = len(data) - L nright=0 for i in range(ntotal): @@ -53,7 +53,7 @@ def run_test (f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constel nright=nright+1 #else: #print "Error in ", i - + return (ntotal,ntotal-nright) diff --git a/gr-trellis/src/lib/.gitignore b/gr-trellis/src/lib/.gitignore deleted file mode 100644 index 7a866aead..000000000 --- a/gr-trellis/src/lib/.gitignore +++ /dev/null @@ -1,193 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/trellis.cc -/trellis.py -/wip -/trellis_encoder_bs.cc -/trellis_metrics_c.h -/trellis_metrics_c.i -/trellis_metrics_f.cc -/trellis_viterbi_i.h -/trellis_viterbi_combined_i.h -/trellis_viterbi_i.i -/trellis_viterbi_combined_i.i -/trellis_metrics_i.h -/trellis_metrics_i.i -/trellis_encoder_bb.cc -/trellis_encoder_ss.cc -/trellis_viterbi_combined_s.h -/trellis_viterbi_s.h -/trellis_viterbi_combined_s.i -/trellis_viterbi_s.i -/trellis_metrics_s.h -/trellis_metrics_s.i -/trellis_encoder_si.h -/trellis_encoder_si.i -/trellis_metrics_i.cc -/trellis_viterbi_s.cc -/trellis_viterbi_combined_s.cc -/trellis_encoder_ss.h -/trellis_encoder_ss.i -/trellis_encoder_bi.cc -/trellis_encoder_bi.h -/trellis_encoder_bi.i -/trellis_encoder_ii.cc -/trellis_viterbi_combined_b.cc -/trellis_viterbi_b.cc -/trellis_encoder_bs.h -/trellis_encoder_bs.i -/trellis_viterbi_combined_b.h -/trellis_viterbi_b.h -/trellis_viterbi_combined_b.i -/trellis_viterbi_b.i -/trellis_encoder_si.cc -/trellis_metrics_f.h -/trellis_metrics_f.i -/trellis_encoder_ii.h -/trellis_encoder_ii.i -/trellis_metrics_c.cc -/trellis_viterbi_combined_i.cc -/trellis_viterbi_i.cc -/trellis_encoder_bb.h -/trellis_encoder_bb.i -/trellis_sccc_encoder_bb.cc -/trellis_sccc_encoder_bb.h -/trellis_sccc_encoder_bb.i -/trellis_sccc_encoder_bi.cc -/trellis_sccc_encoder_bi.h -/trellis_sccc_encoder_bi.i -/trellis_sccc_encoder_bs.cc -/trellis_sccc_encoder_bs.h -/trellis_sccc_encoder_bs.i -/trellis_sccc_encoder_ii.cc -/trellis_sccc_encoder_ii.h -/trellis_sccc_encoder_ii.i -/trellis_sccc_encoder_si.cc -/trellis_sccc_encoder_si.h -/trellis_sccc_encoder_si.i -/trellis_sccc_encoder_ss.cc -/trellis_sccc_encoder_ss.h -/trellis_sccc_encoder_ss.i -/trellis_metrics_s.cc -/trellis_viterbi_combined_fs.h -/trellis_viterbi_combined_fs.i -/trellis_viterbi_combined_fi.cc -/trellis_viterbi_combined_is.h -/trellis_viterbi_combined_is.i -/trellis_viterbi_combined_ci.h -/trellis_viterbi_combined_ci.i -/trellis_viterbi_combined_cs.cc -/trellis_viterbi_combined_is.cc -/trellis_viterbi_combined_si.h -/trellis_viterbi_combined_si.i -/trellis_viterbi_combined_ss.cc -/trellis_viterbi_combined_fb.cc -/trellis_viterbi_combined_fi.h -/trellis_viterbi_combined_fi.i -/trellis_viterbi_combined_cb.h -/trellis_viterbi_combined_cb.i -/trellis_viterbi_combined_ci.cc -/trellis_viterbi_combined_ii.cc -/trellis_viterbi_combined_ii.h -/trellis_viterbi_combined_ii.i -/trellis_viterbi_combined_sb.h -/trellis_viterbi_combined_sb.i -/trellis_viterbi_combined_si.cc -/trellis_viterbi_combined_fb.h -/trellis_viterbi_combined_fb.i -/trellis_viterbi_combined_ib.h -/trellis_viterbi_combined_ib.i -/trellis_viterbi_combined_cs.h -/trellis_viterbi_combined_cs.i -/trellis_viterbi_combined_fs.cc -/trellis_viterbi_combined_cb.cc -/trellis_viterbi_combined_ss.h -/trellis_viterbi_combined_ss.i -/trellis_viterbi_combined_ib.cc -/trellis_viterbi_combined_sb.cc -/trellis_sccc_decoder_combined_fb.h -/trellis_sccc_decoder_combined_fb.i -/trellis_sccc_decoder_combined_fb.cc -/trellis_sccc_decoder_combined_fs.h -/trellis_sccc_decoder_combined_fs.i -/trellis_sccc_decoder_combined_fs.cc -/trellis_sccc_decoder_combined_fi.h -/trellis_sccc_decoder_combined_fi.i -/trellis_sccc_decoder_combined_fi.cc -/trellis_sccc_decoder_combined_cb.h -/trellis_sccc_decoder_combined_cb.i -/trellis_sccc_decoder_combined_cb.cc -/trellis_sccc_decoder_combined_cs.h -/trellis_sccc_decoder_combined_cs.i -/trellis_sccc_decoder_combined_cs.cc -/trellis_sccc_decoder_combined_ci.h -/trellis_sccc_decoder_combined_ci.i -/trellis_sccc_decoder_combined_ci.cc -/trellis_sccc_decoder_b.h -/trellis_sccc_decoder_b.i -/trellis_sccc_decoder_b.cc -/trellis_sccc_decoder_s.h -/trellis_sccc_decoder_s.i -/trellis_sccc_decoder_s.cc -/trellis_sccc_decoder_i.h -/trellis_sccc_decoder_i.i -/trellis_sccc_decoder_i.cc -/trellis_pccc_decoder_b.h -/trellis_pccc_decoder_b.i -/trellis_pccc_decoder_b.cc -/trellis_pccc_decoder_s.h -/trellis_pccc_decoder_s.i -/trellis_pccc_decoder_s.cc -/trellis_pccc_decoder_i.h -/trellis_pccc_decoder_i.i -/trellis_pccc_decoder_i.cc -/trellis_pccc_encoder_bb.cc -/trellis_pccc_encoder_bb.h -/trellis_pccc_encoder_bb.i -/trellis_pccc_encoder_bi.cc -/trellis_pccc_encoder_bi.h -/trellis_pccc_encoder_bi.i -/trellis_pccc_encoder_bs.cc -/trellis_pccc_encoder_bs.h -/trellis_pccc_encoder_bs.i -/trellis_pccc_encoder_ii.cc -/trellis_pccc_encoder_ii.h -/trellis_pccc_encoder_ii.i -/trellis_pccc_encoder_si.cc -/trellis_pccc_encoder_si.h -/trellis_pccc_encoder_si.i -/trellis_pccc_encoder_ss.cc -/trellis_pccc_encoder_ss.h -/trellis_pccc_encoder_ss.i -/trellis_pccc_decoder_combined_cb.cc -/trellis_pccc_decoder_combined_cb.h -/trellis_pccc_decoder_combined_cb.i -/trellis_pccc_decoder_combined_ci.cc -/trellis_pccc_decoder_combined_ci.h -/trellis_pccc_decoder_combined_ci.i -/trellis_pccc_decoder_combined_cs.cc -/trellis_pccc_decoder_combined_cs.h -/trellis_pccc_decoder_combined_cs.i -/trellis_pccc_decoder_combined_fb.cc -/trellis_pccc_decoder_combined_fb.h -/trellis_pccc_decoder_combined_fb.i -/trellis_pccc_decoder_combined_fi.cc -/trellis_pccc_decoder_combined_fi.h -/trellis_pccc_decoder_combined_fi.i -/trellis_pccc_decoder_combined_fs.cc -/trellis_pccc_decoder_combined_fs.h -/trellis_pccc_decoder_combined_fs.i -/trellis_generated.i -/generate-stamp -/stamp-* -/run_guile_tests -/gnuradio -/guile -/python diff --git a/gr-trellis/src/lib/Makefile.am b/gr-trellis/src/lib/Makefile.am deleted file mode 100644 index ea28ea538..000000000 --- a/gr-trellis/src/lib/Makefile.am +++ /dev/null @@ -1,188 +0,0 @@ -# -# Copyright 2004,2005,2006,2007,2008,2009,2010 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 -include $(top_srcdir)/Makefile.swig - -TESTS = - -EXTRA_DIST += \ - run_guile_tests.in \ - trellis.test - - -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) \ - $(GR_DIGITAL_INCLUDES) \ - $(WITH_INCLUDES) - -# ---------------------------------------------------------------- -# these scripts generate trellis codes from template files - -core_generator = \ - generate_all.py \ - generate_trellis.py \ - trellis_encoder_XX.cc.t \ - trellis_encoder_XX.h.t \ - trellis_encoder_XX.i.t \ - trellis_sccc_encoder_XX.cc.t \ - trellis_sccc_encoder_XX.h.t \ - trellis_sccc_encoder_XX.i.t \ - trellis_pccc_encoder_XX.cc.t \ - trellis_pccc_encoder_XX.h.t \ - trellis_pccc_encoder_XX.i.t \ - trellis_metrics_X.cc.t \ - trellis_metrics_X.h.t \ - trellis_metrics_X.i.t \ - trellis_viterbi_combined_XX.cc.t \ - trellis_viterbi_combined_XX.h.t \ - trellis_viterbi_combined_XX.i.t \ - trellis_sccc_decoder_combined_XX.cc.t \ - trellis_sccc_decoder_combined_XX.h.t \ - trellis_sccc_decoder_combined_XX.i.t \ - trellis_sccc_decoder_X.cc.t \ - trellis_sccc_decoder_X.h.t \ - trellis_sccc_decoder_X.i.t \ - trellis_pccc_decoder_X.cc.t \ - trellis_pccc_decoder_X.h.t \ - trellis_pccc_decoder_X.i.t \ - trellis_pccc_decoder_combined_XX.cc.t \ - trellis_pccc_decoder_combined_XX.h.t \ - trellis_pccc_decoder_combined_XX.i.t \ - trellis_viterbi_X.cc.t \ - trellis_viterbi_X.h.t \ - trellis_viterbi_X.i.t - -# Source built by Python into $(builddir) -python_built_sources = \ - $(GENERATED_H) \ - $(GENERATED_I) \ - $(GENERATED_CC) \ - trellis_generated.i - -EXTRA_DIST += \ - $(core_generator) - -# These headers get installed in ${prefix}/include/gnuradio -grinclude_HEADERS = \ - trellis_api.h \ - fsm.h \ - quicksort_index.h \ - base.h \ - interleaver.h \ - calc_metric.h \ - core_algorithms.h \ - trellis_permutation.h \ - siso_type.h \ - trellis_siso_f.h \ - trellis_siso_combined_f.h \ - trellis_constellation_metrics_cf.h \ - $(GENERATED_H) - -lib_LTLIBRARIES = libgnuradio-trellis.la - -libgnuradio_trellis_la_SOURCES = \ - fsm.cc \ - quicksort_index.cc \ - base.cc \ - interleaver.cc \ - calc_metric.cc \ - core_algorithms.cc \ - trellis_permutation.cc \ - trellis_siso_f.cc \ - trellis_siso_combined_f.cc \ - trellis_constellation_metrics_cf.cc \ - $(GENERATED_CC) - -libgnuradio_trellis_la_LIBADD = \ - $(GNURADIO_CORE_LA) - -libgnuradio_trellis_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) - -trellis.py trellis.scm: trellis_generated.i - -################################# -# SWIG interface and library - -TOP_SWIG_DOC_IFILES = \ - trellis_swig_doc.i - -TOP_SWIG_IFILES = \ - $(TOP_SWIG_DOC_IFILES) \ - trellis.i - -BUILT_SOURCES += \ - $(TOP_SWIG_DOC_IFILES) - -EXTRA_DIST += \ - $(TOP_SWIG_DOC_IFILES) - -$(TOP_SWIG_DOC_IFILES): - `echo "" > $@` - -# Install so that they end up available as: -# import gnuradio.trellis -# This ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio -trellis_pythondir_category = \ - gnuradio - -# additional libraries for linking with the SWIG-generated library -trellis_la_swig_libadd = \ - libgnuradio-trellis.la - -# additional SWIG files to be installed -trellis_swiginclude_headers = \ - $(GENERATED_I) \ - fsm.i \ - interleaver.i \ - trellis_permutation.i \ - trellis_siso_f.i \ - trellis_siso_combined_f.i \ - trellis_constellation_metrics_cf.i \ - trellis_generated.i \ - $(TOP_SWIG_DOC_IFILES) - -# Do creation and inclusion of other Makefiles last - -# include the srcdir's Makefile.gen; doing this creates an implicit -# dependency between $(srcdir)/Makefile.in and $(srcdir)/Makefile.gen. -include $(srcdir)/Makefile.gen - -# common way for generating local Makefile.gen -makefile_gen_gen_command = PYTHONPATH=$(top_srcdir)/gnuradio-core/src/python srcdir=$(srcdir) do_makefile=1 do_sources=0 $(PYTHON) $(srcdir)/generate_all.py -include $(top_srcdir)/Makefile.gen.gen - -# common way for generating sources from templates when using -# BUILT_SOURCES, using parallel build protection. -gen_sources = $(python_built_sources) -gen_sources_deps = $(core_generator) -par_gen_command = PYTHONPATH=$(top_srcdir)/gnuradio-core/src/python srcdir=$(srcdir) $(PYTHON) $(srcdir)/generate_all.py -include $(top_srcdir)/Makefile.par.gen - -BUILT_SOURCES += $(python_built_sources) - -# Location of non-standard SWIG interface files -trellis_swig_args = \ - $(GR_DIGITAL_INCLUDES) - -if GUILE -TESTS += run_guile_tests -endif diff --git a/gr-trellis/src/lib/Makefile.swig.gen b/gr-trellis/src/lib/Makefile.swig.gen deleted file mode 100644 index 2d014b946..000000000 --- a/gr-trellis/src/lib/Makefile.swig.gen +++ /dev/null @@ -1,145 +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 trellis.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/trellis -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/trellis -## -## 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. - -trellis_pythondir_category ?= gnuradio/trellis -trellis_pylibdir_category ?= $(trellis_pythondir_category) -trellis_pythondir = $(pythondir)/$(trellis_pythondir_category) -trellis_pylibdir = $(pyexecdir)/$(trellis_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -trellis_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/trellis -# FIXME: determince whether these should be installed with gnuradio. -trellis_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -trellis_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 > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -trellis_swiginclude_HEADERS = \ - trellis.i \ - $(trellis_swiginclude_headers) - -if PYTHON -trellis_pylib_LTLIBRARIES = \ - _trellis.la - -_trellis_la_SOURCES = \ - python/trellis.cc \ - $(trellis_la_swig_sources) - -trellis_python_PYTHON = \ - trellis.py \ - $(trellis_python) - -_trellis_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(trellis_la_swig_libadd) - -_trellis_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(trellis_la_swig_ldflags) - -_trellis_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(trellis_la_swig_cxxflags) - -python/trellis.cc: trellis.py -trellis.py: trellis.i - -# Include the python dependencies for this file --include python/trellis.d - -endif # end of if python - -if GUILE - -trellis_scmlib_LTLIBRARIES = \ - libguile-gnuradio-trellis.la -libguile_gnuradio_trellis_la_SOURCES = \ - guile/trellis.cc \ - $(trellis_la_swig_sources) -nobase_trellis_scm_DATA = \ - gnuradio/trellis.scm \ - gnuradio/trellis-primitive.scm -libguile_gnuradio_trellis_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(trellis_la_swig_libadd) -libguile_gnuradio_trellis_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(trellis_la_swig_ldflags) -libguile_gnuradio_trellis_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(trellis_la_swig_cxxflags) - -guile/trellis.cc: gnuradio/trellis.scm -gnuradio/trellis.scm: trellis.i -gnuradio/trellis-primitive.scm: gnuradio/trellis.scm - -# Include the guile dependencies for this file --include guile/trellis.d - -endif # end of GUILE - - diff --git a/gr-trellis/src/lib/calc_metric.cc b/gr-trellis/src/lib/calc_metric.cc index 0e8f9c2d5..ce628209b 100644 --- a/gr-trellis/src/lib/calc_metric.cc +++ b/gr-trellis/src/lib/calc_metric.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -26,12 +26,12 @@ -template <class T> +template <class T> void calc_metric(int O, int D, const std::vector<T> &TABLE, const T *in, float *metric, trellis_metric_type_t type) { float minm = FLT_MAX; int minmi = 0; - + switch (type){ case TRELLIS_EUCLIDEAN: @@ -178,7 +178,7 @@ void calc_metric(int O, int D, const std::vector<float> &TABLE, const float *in, float s=in[m]-TABLE[o*D+m]; metric[o]+=s*s; } - } + } break; case TRELLIS_HARD_SYMBOL: for(int o=0;o<O;o++) { diff --git a/gr-trellis/src/lib/calc_metric.h b/gr-trellis/src/lib/calc_metric.h index fd20f8d36..7cad6160a 100644 --- a/gr-trellis/src/lib/calc_metric.h +++ b/gr-trellis/src/lib/calc_metric.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -28,7 +28,7 @@ #include <digital_metric_type.h> -template <class T> +template <class T> void calc_metric(int O, int D, const std::vector<T> &TABLE, const T *in, float *metric, trellis_metric_type_t type); /* diff --git a/gr-trellis/src/lib/core_algorithms.cc b/gr-trellis/src/lib/core_algorithms.cc index 54193c818..3ed912c08 100644 --- a/gr-trellis/src/lib/core_algorithms.cc +++ b/gr-trellis/src/lib/core_algorithms.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -42,8 +42,8 @@ float min_star(float a, float b) -template <class T> -void viterbi_algorithm(int I, int S, int O, +template <class T> +void viterbi_algorithm(int I, int S, int O, const std::vector<int> &NS, const std::vector<int> &OS, const std::vector< std::vector<int> > &PS, @@ -51,7 +51,7 @@ void viterbi_algorithm(int I, int S, int O, int K, int S0,int SK, const float *in, T *out)//, - //std::vector<int> &trace) + //std::vector<int> &trace) { std::vector<int> trace(S*K); std::vector<float> alpha(S*2); @@ -84,7 +84,7 @@ void viterbi_algorithm(int I, int S, int O, alpha[((alphai+1)%2)*S+j]=minm; if(minm<norm) norm=minm; } - for(int j=0;j<S;j++) + for(int j=0;j<S;j++) alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do not explode alphai=(alphai+1)%2; } @@ -190,7 +190,7 @@ void viterbi_algorithm_combined(int I, int S, int O, alpha[((alphai+1)%2)*S+j]=minm; if(minm<norm) norm=minm; } - for(int j=0;j<S;j++) + for(int j=0;j<S;j++) alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do not explode alphai=(alphai+1)%2; } @@ -211,7 +211,7 @@ void viterbi_algorithm_combined(int I, int S, int O, out[k]= (To) PI[st][i0]; st=PS[st][i0]; } - + delete [] metric; } @@ -415,7 +415,7 @@ void viterbi_algorithm_combined<gr_complex,int>(int I, int S, int O, //=============================================== -void siso_algorithm(int I, int S, int O, +void siso_algorithm(int I, int S, int O, const std::vector<int> &NS, const std::vector<int> &OS, const std::vector< std::vector<int> > &PS, @@ -427,7 +427,7 @@ void siso_algorithm(int I, int S, int O, const float *priori, const float *prioro, float *post//, //std::vector<float> &alpha, //std::vector<float> &beta - ) + ) { float norm,mm,minm; std::vector<float> alpha(S*(K+1)); @@ -454,7 +454,7 @@ void siso_algorithm(int I, int S, int O, alpha[(k+1)*S+j]=minm; if(minm<norm) norm=minm; } - for(int j=0;j<S;j++) + for(int j=0;j<S;j++) alpha[(k+1)*S+j]-=norm; // normalize total metrics so they do not explode } @@ -468,7 +468,7 @@ void siso_algorithm(int I, int S, int O, for(int k=K-1;k>=0;k--) { // backward recursion norm=INF; - for(int j=0;j<S;j++) { + for(int j=0;j<S;j++) { minm=INF; for(int i=0;i<I;i++) { int i0 = j*I+i; @@ -517,8 +517,8 @@ if (POSTI && POSTO) for(int n=0;n<O;n++) post[k*(I+O)+I+n]-=norm; // normalize metrics } -} -else if(POSTI) +} +else if(POSTI) { for(int k=0;k<K;k++) { // input combining norm=INF; @@ -563,7 +563,7 @@ else //=========================================================== template <class T> -void siso_algorithm_combined(int I, int S, int O, +void siso_algorithm_combined(int I, int S, int O, const std::vector<int> &NS, const std::vector<int> &OS, const std::vector< std::vector<int> > &PS, @@ -576,7 +576,7 @@ void siso_algorithm_combined(int I, int S, int O, const std::vector<T> &TABLE, trellis_metric_type_t TYPE, const float *priori, const T *observations, float *post -) +) { float norm,mm,minm; std::vector<float> alpha(S*(K+1)); @@ -605,7 +605,7 @@ void siso_algorithm_combined(int I, int S, int O, alpha[(k+1)*S+j]=minm; if(minm<norm) norm=minm; } - for(int j=0;j<S;j++) + for(int j=0;j<S;j++) alpha[(k+1)*S+j]-=norm; // normalize total metrics so they do not explode } @@ -619,7 +619,7 @@ void siso_algorithm_combined(int I, int S, int O, for(int k=K-1;k>=0;k--) { // backward recursion norm=INF; - for(int j=0;j<S;j++) { + for(int j=0;j<S;j++) { minm=INF; for(int i=0;i<I;i++) { int i0 = j*I+i; @@ -668,8 +668,8 @@ void siso_algorithm_combined(int I, int S, int O, for(int n=0;n<O;n++) post[k*(I+O)+I+n]-=norm; // normalize metrics } - } - else if(POSTI) + } + else if(POSTI) { for(int k=0;k<K;k++) { // input combining norm=INF; @@ -828,7 +828,7 @@ for(int rep=0;rep<iterations;rep++) { //oprioro[k*FSMi.I()+i]=iposti[ki*FSMi.I()+i]; //} memcpy(&(oprioro[k*FSMi.I()]),&(iposti[ki*FSMi.I()]),FSMi.I()*sizeof(float)); - } + } // run outer SISO @@ -849,10 +849,10 @@ for(int rep=0;rep<iterations;rep++) { //ipriori[ki*FSMi.I()+i]=oposto[k*FSMi.I()+i]; //} memcpy(&(ipriori[ki*FSMi.I()]),&(oposto[k*FSMi.I()]),FSMi.I()*sizeof(float)); - } + } } else // produce posti but not posto - + siso_algorithm(FSMo.I(),FSMo.S(),FSMo.O(), FSMo.NS(), FSMo.OS(), FSMo.PS(), FSMo.PI(), blocklength, @@ -861,7 +861,7 @@ for(int rep=0;rep<iterations;rep++) { p2mymin, &(opriori[0]), &(oprioro[0]), &(oposti[0]) ); - + /* viterbi_algorithm(FSMo.I(),FSMo.S(),FSMo.O(), FSMo.NS(), FSMo.OS(), FSMo.PS(), FSMo.PI(), @@ -1006,7 +1006,7 @@ void sccc_decoder( //oprioro[k*FSMi.I()+i]=iposti[ki*FSMi.I()+i]; //} memcpy(&(oprioro[k*FSMi.I()]),&(iposti[ki*FSMi.I()]),FSMi.I()*sizeof(float)); - } + } // run outer SISO @@ -1027,10 +1027,10 @@ void sccc_decoder( //ipriori[ki*FSMi.I()+i]=oposto[k*FSMi.I()+i]; //} memcpy(&(ipriori[ki*FSMi.I()]),&(oposto[k*FSMi.I()]),FSMi.I()*sizeof(float)); - } + } } else {// produce posti but not posto - + siso_algorithm(FSMo.I(),FSMo.S(),FSMo.O(), FSMo.NS(), FSMo.OS(), FSMo.PS(), FSMo.PI(), blocklength, @@ -1039,7 +1039,7 @@ void sccc_decoder( p2mymin, &(opriori[0]), &(oprioro[0]), &(oposti[0]) ); - + /* viterbi_algorithm(FSMo.I(),FSMo.S(),FSMo.O(), FSMo.NS(), FSMo.OS(), FSMo.PS(), FSMo.PI(), @@ -1120,7 +1120,7 @@ void pccc_decoder( std::vector<float> priori2(blocklength*FSM2.I(),0.0); std::vector<float> prioro2(blocklength*FSM2.O()); std::vector<float> posti2(blocklength*FSM2.I()); - + //generate prioro1,2 (metrics are not updated per iteration: this is not the best you can do...) for (int k=0;k<blocklength;k++) { //std::cout << k << std::endl; @@ -1150,7 +1150,7 @@ void pccc_decoder( p2mymin, &(priori1[0]), &(prioro1[0]), &(posti1[0]) ); - + //for(int k=0;k<blocklength;k++){ //for(int i=0;i<FSM1.I();i++) //std::cout << posti1[k*FSM1.I()+i] << ", "; @@ -1164,7 +1164,7 @@ void pccc_decoder( //oprioro[k*FSMi.I()+i]=iposti[ki*FSMi.I()+i]; //} memcpy(&(priori2[k*FSM2.I()]),&(posti1[ki*FSM1.I()]),FSM1.I()*sizeof(float)); - } + } // run SISO 2 siso_algorithm(FSM2.I(),FSM2.S(),FSM2.O(), @@ -1272,7 +1272,7 @@ void pccc_decoder_combined( calc_metric(O, D, TABLE, &(observations[k*D]), &(cprioro[k*O]),METRIC_TYPE); cprioro[k*O] *= scaling; } - + //generate prioro1,2 (metrics are not updated per iteration: this is not the best you can do...) for (int k=0;k<blocklength;k++) { //std::cout << k << std::endl; @@ -1302,7 +1302,7 @@ void pccc_decoder_combined( p2mymin, &(priori1[0]), &(prioro1[0]), &(posti1[0]) ); - + //for(int k=0;k<blocklength;k++){ //for(int i=0;i<FSM1.I();i++) //std::cout << posti1[k*FSM1.I()+i] << ", "; @@ -1316,7 +1316,7 @@ void pccc_decoder_combined( //oprioro[k*FSMi.I()+i]=iposti[ki*FSMi.I()+i]; //} memcpy(&(priori2[k*FSM2.I()]),&(posti1[ki*FSM1.I()]),FSM1.I()*sizeof(float)); - } + } // run SISO 2 siso_algorithm(FSM2.I(),FSM2.S(),FSM2.O(), diff --git a/gr-trellis/src/lib/core_algorithms.h b/gr-trellis/src/lib/core_algorithms.h index cab7086ba..a8765225b 100644 --- a/gr-trellis/src/lib/core_algorithms.h +++ b/gr-trellis/src/lib/core_algorithms.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -34,7 +34,7 @@ float min(float a, float b); float min_star(float a, float b); -template <class T> +template <class T> void viterbi_algorithm(int I, int S, int O, const std::vector<int> &NS, const std::vector<int> &OS, @@ -99,7 +99,7 @@ void sccc_decoder( float (*p2mymin)(float,float), const float *iprioro, T *data ); - + template<class Ti, class To> void sccc_decoder_combined( diff --git a/gr-trellis/src/lib/fsm.cc b/gr-trellis/src/lib/fsm.cc index 65c4b4b32..fb2b4d2c9 100644 --- a/gr-trellis/src/lib/fsm.cc +++ b/gr-trellis/src/lib/fsm.cc @@ -64,7 +64,7 @@ fsm::fsm(int I, int S, int O, const std::vector<int> &NS, const std::vector<int> d_O=O; d_NS=NS; d_OS=OS; - + generate_PS_PI(); generate_TM(); } @@ -79,11 +79,11 @@ fsm::fsm(int I, int S, int O, const std::vector<int> &NS, const std::vector<int> //# output symbol matrix (S lines, each with I integers separated by spaces) //# optional comments //###################################################################### -fsm::fsm(const char *name) +fsm::fsm(const char *name) { FILE *fsmfile; - if((fsmfile=fopen(name,"r"))==NULL) + if((fsmfile=fopen(name,"r"))==NULL) throw std::runtime_error ("fsm::fsm(const char *name): file open error\n"); //printf("file open error in fsm()\n"); @@ -91,7 +91,7 @@ fsm::fsm(const char *name) if(ferror(fsmfile) != 0) throw std::runtime_error ("fsm::fsm(const char *name): file read error\n"); } - + d_NS.resize(d_I*d_S); d_OS.resize(d_I*d_S); @@ -113,7 +113,7 @@ fsm::fsm(const char *name) } fclose(fsmfile); - + generate_PS_PI(); generate_TM(); } @@ -141,7 +141,7 @@ fsm::fsm(int k, int n, const std::vector<int> &G) max_mem=mem; } } - + //printf("max_mem_x\n"); //for(int j=0;j<max_mem_x.size();j++) printf("%d ",max_mem_x[j]); printf("\n"); @@ -155,7 +155,7 @@ fsm::fsm(int k, int n, const std::vector<int> &G) d_I=1<<k; d_S=1<<sum_max_mem; d_O=1<<n; - + // binary representation of the G matrix std::vector<std::vector<int> > Gb(k*n); for(int j=0;j<k*n;j++) { @@ -165,9 +165,9 @@ fsm::fsm(int k, int n, const std::vector<int> &G) //for(int m=0;m<Gb[j].size();m++) printf("%d ",Gb[j][m]); printf("\n"); } - // alphabet size of each shift register + // alphabet size of each shift register std::vector<int> bases_x(k); - for(int j=0;j<k ;j++) + for(int j=0;j<k ;j++) bases_x[j] = 1 << max_mem_x[j]; //printf("bases_x\n"); //for(int j=0;j<max_mem_x.size();j++) printf("%d ",max_mem_x[j]); printf("\n"); @@ -229,7 +229,7 @@ fsm::fsm(int k, int n, const std::vector<int> &G) //###################################################################### -//# Automatically generate an FSM specification describing the +//# Automatically generate an FSM specification describing the //# ISI for a channel //# of length ch_length and a modulation of size mod_size //###################################################################### @@ -243,13 +243,13 @@ fsm::fsm(int mod_size, int ch_length) d_OS.resize(d_I*d_S); for(int s=0;s<d_S;s++) { - for(int i=0;i<d_I;i++) { + for(int i=0;i<d_I;i++) { int t=i*d_S+s; d_NS[s*d_I+i] = t/d_I; d_OS[s*d_I+i] = t; } } - + generate_PS_PI(); generate_TM(); } @@ -258,8 +258,8 @@ fsm::fsm(int mod_size, int ch_length) //###################################################################### -//# Automatically generate an FSM specification describing the -//# the trellis for a CPM with h=K/P (relatively prime), +//# Automatically generate an FSM specification describing the +//# the trellis for a CPM with h=K/P (relatively prime), //# alphabet size M, and frequency pulse duration L symbols //# //# This FSM is based on the paper by B. Rimoldi @@ -303,7 +303,7 @@ fsm::fsm(int P, int M, int L) //###################################################################### -//# Automatically generate an FSM specification describing the +//# Automatically generate an FSM specification describing the //# the joint trellis of fsm1 and fsm2 //###################################################################### fsm::fsm(const fsm &FSM1, const fsm &FSM2) @@ -433,7 +433,7 @@ bool fsm::find_es(int es) { bool done = true; for(int s=0;s<d_S;s++) { - if(d_TMl[s*d_S+es] < d_S) + if(d_TMl[s*d_S+es] < d_S) continue; int minl=d_S; int mini=-1; @@ -477,7 +477,7 @@ void fsm::write_trellis_svg( std::string filename ,int number_stages) for( int stage_num = 0;stage_num < number_stages;stage_num ++){ // draw states for ( int state_num = 0;state_num < d_S ; state_num ++ ) { - trellis_fname << "<circle cx = \"" << stage_num * STAGE_STATE_OFFSETS + TRELLIS_X_OFFSET << + trellis_fname << "<circle cx = \"" << stage_num * STAGE_STATE_OFFSETS + TRELLIS_X_OFFSET << "\" cy = \"" << state_num * STAGE_STATE_OFFSETS + TRELLIS_Y_OFFSET << "\" r = \"1\"/>" << std::endl; //draw branches if(stage_num != number_stages-1){ @@ -495,7 +495,7 @@ void fsm::write_trellis_svg( std::string filename ,int number_stages) // label the stages trellis_fname << "<g font-size = \"4\" font= \"times\" fill = \"black\">" << std::endl; for( int stage_num = 0;stage_num < number_stages ;stage_num ++){ - trellis_fname << "<text x = \"" << stage_num * STAGE_STATE_OFFSETS + STAGE_LABEL_X_OFFSET << + trellis_fname << "<text x = \"" << stage_num * STAGE_STATE_OFFSETS + STAGE_LABEL_X_OFFSET << "\" y = \"" << STAGE_LABEL_Y_OFFSET << "\" >" << std::endl; trellis_fname << stage_num << std::endl; trellis_fname << "</text>" << std::endl; @@ -505,7 +505,7 @@ void fsm::write_trellis_svg( std::string filename ,int number_stages) // label the states trellis_fname << "<g font-size = \"4\" font= \"times\" fill = \"black\">" << std::endl; for( int state_num = 0;state_num < d_S ; state_num ++){ - trellis_fname << "<text y = \"" << state_num * STAGE_STATE_OFFSETS + STATE_LABEL_Y_OFFSET << + trellis_fname << "<text y = \"" << state_num * STAGE_STATE_OFFSETS + STATE_LABEL_Y_OFFSET << "\" x = \"" << STATE_LABEL_X_OFFSET << "\" >" << std::endl; trellis_fname << state_num << std::endl; trellis_fname << "</text>" << std::endl; diff --git a/gr-trellis/src/lib/fsm.h b/gr-trellis/src/lib/fsm.h index 7dc7e0d9d..47e467898 100644 --- a/gr-trellis/src/lib/fsm.h +++ b/gr-trellis/src/lib/fsm.h @@ -46,7 +46,7 @@ private: // next_state = d_NS[current_state * d_I + input_symbol] std::vector<int> d_NS; // OS means Output Symbol. - // output_symbol = d_OS[current_state * d_I + input_symbol] + // output_symbol = d_OS[current_state * d_I + input_symbol] std::vector<int> d_OS; // PS means Previous State. std::vector< std::vector<int> > d_PS; @@ -83,7 +83,7 @@ public: * \param NS A mapping from (current state, input symbol) to next state. * next_state = NS[current_state * I + input_symbol] * \param OS A mapping from (current state, input symbol) to output symbol. - * output_symbol = OS[current_state * I + input_symbol] + * output_symbol = OS[current_state * I + input_symbol] * */ fsm(int I, int S, int O, const std::vector<int> &NS, const std::vector<int> &OS); @@ -152,7 +152,7 @@ public: * \param filename filename * \param number_stages ???? * - */ + */ void write_trellis_svg(std::string filename ,int number_stages); /*! * \brief Write the FSMS to a file. diff --git a/gr-trellis/src/lib/generate_all.py b/gr-trellis/src/lib/generate_all.py index ee1966b89..78e36270c 100644 --- a/gr-trellis/src/lib/generate_all.py +++ b/gr-trellis/src/lib/generate_all.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2006,2007 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 build_utils import output_glue diff --git a/gr-trellis/src/lib/generate_trellis.py b/gr-trellis/src/lib/generate_trellis.py index 31bc44aac..60a81f77a 100644 --- a/gr-trellis/src/lib/generate_trellis.py +++ b/gr-trellis/src/lib/generate_trellis.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2006,2007 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 build_utils import expand_template, copyright, open_and_log_name from build_utils_codes import * diff --git a/gr-trellis/src/lib/interleaver.cc b/gr-trellis/src/lib/interleaver.cc index 131dcb07b..740f33ab3 100644 --- a/gr-trellis/src/lib/interleaver.cc +++ b/gr-trellis/src/lib/interleaver.cc @@ -20,7 +20,7 @@ * Boston, MA 02110-1301, USA. */ -#include <cstdlib> +#include <cstdlib> #include <cstdio> #include <iostream> #include <string> @@ -52,7 +52,7 @@ interleaver::interleaver(int K, const std::vector<int> &INTER) d_K=K; d_INTER=INTER; d_DEINTER.resize(d_K); - + // generate DEINTER table for(int i=0;i<d_K;i++) { d_DEINTER[d_INTER[i]]=i; @@ -67,14 +67,14 @@ interleaver::interleaver(int K, const std::vector<int> &INTER) //# list of space separated K integers from 0 to K-1 in appropriate order //# optional comments //###################################################################### -interleaver::interleaver(const char *name) +interleaver::interleaver(const char *name) { FILE *interleaverfile; - if((interleaverfile=fopen(name,"r"))==NULL) + if((interleaverfile=fopen(name,"r"))==NULL) throw std::runtime_error ("file open error in interleaver()"); //printf("file open error in interleaver()\n"); - + if(fscanf(interleaverfile,"%d\n",&d_K) == EOF) { if(ferror(interleaverfile) != 0) throw std::runtime_error ("interleaver::interleaver(const char *name): file read error\n"); @@ -89,7 +89,7 @@ interleaver::interleaver(const char *name) throw std::runtime_error ("interleaver::interleaver(const char *name): file read error\n"); } } - + // generate DEINTER table for(int i=0;i<d_K;i++) { d_DEINTER[d_INTER[i]]=i; @@ -105,11 +105,11 @@ interleaver::interleaver(int K, int seed) d_INTER.resize(d_K); d_DEINTER.resize(d_K); - if(seed>=0) srand((unsigned int)seed); + if(seed>=0) srand((unsigned int)seed); std::vector<int> tmp(d_K); for(int i=0;i<d_K;i++) { d_INTER[i]=i; - tmp[i] = rand(); + tmp[i] = rand(); } quicksort_index <int> (tmp,d_INTER,0,d_K-1); diff --git a/gr-trellis/src/lib/interleaver.i b/gr-trellis/src/lib/interleaver.i index 403c2d09e..bb9078b1b 100644 --- a/gr-trellis/src/lib/interleaver.i +++ b/gr-trellis/src/lib/interleaver.i @@ -1,38 +1,38 @@ -/* -*- c++ -*- */
-/*
- * Copyright 2002 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.
- */
-
-class interleaver {
-private:
- int d_K;
- std::vector<int> d_INTER;
- std::vector<int> d_DEINTER;
-public:
- interleaver();
- interleaver(const interleaver & INTERLEAVER);
- interleaver(int K, const std::vector<int> & INTER);
- interleaver(const char *name);
- interleaver(int K, int seed);
- int K () const { return d_K; }
- const std::vector<int> & INTER () const { return d_INTER; }
- const std::vector<int> & DEINTER () const { return d_DEINTER; }
- void write_interleaver_txt(std::string filename);
-};
+/* -*- c++ -*- */ +/* + * Copyright 2002 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. + */ + +class interleaver { +private: + int d_K; + std::vector<int> d_INTER; + std::vector<int> d_DEINTER; +public: + interleaver(); + interleaver(const interleaver & INTERLEAVER); + interleaver(int K, const std::vector<int> & INTER); + interleaver(const char *name); + interleaver(int K, int seed); + int K () const { return d_K; } + const std::vector<int> & INTER () const { return d_INTER; } + const std::vector<int> & DEINTER () const { return d_DEINTER; } + void write_interleaver_txt(std::string filename); +}; diff --git a/gr-trellis/src/lib/quicksort_index.cc b/gr-trellis/src/lib/quicksort_index.cc index b75896a20..cf37e862e 100644 --- a/gr-trellis/src/lib/quicksort_index.cc +++ b/gr-trellis/src/lib/quicksort_index.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-trellis/src/lib/quicksort_index.h b/gr-trellis/src/lib/quicksort_index.h index da453972e..9583955db 100644 --- a/gr-trellis/src/lib/quicksort_index.h +++ b/gr-trellis/src/lib/quicksort_index.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2007 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, diff --git a/gr-trellis/src/lib/run_guile_tests.in b/gr-trellis/src/lib/run_guile_tests.in deleted file mode 100644 index 5d08b0dd5..000000000 --- a/gr-trellis/src/lib/run_guile_tests.in +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -. @top_builddir@/setup_guile_test_env - -# 1st argument is absolute path to hand coded guile source directory -# 2nd argument is absolute path to component C++ shared library build directory -# 3nd argument is absolute path to component SWIG build directory - -add_local_paths \ - @srcdir@ \ - @abs_builddir@ \ - @abs_builddir@ - -@GUILE@ -e main -c '(use-modules (gnuradio test-suite guile-test))' -t @srcdir@ diff --git a/gr-trellis/src/lib/trellis.i b/gr-trellis/src/lib/trellis.i index 70775af41..0debf5e5d 100644 --- a/gr-trellis/src/lib/trellis.i +++ b/gr-trellis/src/lib/trellis.i @@ -56,13 +56,3 @@ //%pythoncode %{ // from gnuradio.gr import TRELLIS_EUCLIDEAN, TRELLIS_HARD_SYMBOL, TRELLIS_HARD_BIT // %} - -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-trellis" "scm_init_gnuradio_trellis_module") -%} - -%goops %{ -(use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif diff --git a/gr-trellis/src/lib/trellis.test b/gr-trellis/src/lib/trellis.test deleted file mode 100644 index d370ab18c..000000000 --- a/gr-trellis/src/lib/trellis.test +++ /dev/null @@ -1,53 +0,0 @@ -;;; -*- Scheme -*- -;;; -;;; Copyright 2010 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, see <http://www.gnu.org/licenses/>. -;;; - -;;; If you're using Emacs's Scheme mode: -;;; (put 'with-test-prefix 'scheme-indent-function 1) - -;;; See the comments in gnuradio/test-suite/lib.scm for info on writing tests. -;;; See also the very end of the file, where the test-equal, test-eqv -;;; and test-eq macros are defined. - -(define-module (test-module) - #:use-module (oop goops) - #:use-module (gnuradio core) - #:use-module (gnuradio test-suite lib) - #:duplicates (merge-generics replace check)) - - -;;; See if we can import the module... -(use-modules (gnuradio trellis)) - -;;; Now do some real testing, like that in ../python/qa_trellis.py -;;; FIXME later. Other problems to deal with. Looks like -;;; I don't understand the constructor to <fsm> - -(read-set! keywords 'prefix) - -'(with-test-prefix "test-001-fsm" - (let* ((I 2) - (S 4) - (O 4) - (NS #(0 2 0 2 1 3 1 3)) - (OS #(0 3 3 0 1 2 2 1)) - (f (make <fsm> :I I :S S :O O :NS NS :OS OS))) - (test-equal (list I S O NS OS) - (list (gr:I f) (gr:S f) (gr:O f) (gr:NS f) (gr:OS f))))) - diff --git a/gr-trellis/src/lib/trellis_constellation_metrics_cf.cc b/gr-trellis/src/lib/trellis_constellation_metrics_cf.cc index 91520e4ce..6e6aa2dd0 100644 --- a/gr-trellis/src/lib/trellis_constellation_metrics_cf.cc +++ b/gr-trellis/src/lib/trellis_constellation_metrics_cf.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -81,8 +81,8 @@ for (unsigned int m=0;m<nstreams;m++) { float *out = (float *) output_items[m]; for (unsigned int i = 0; i < noutput_items / d_O ; i++){ - d_constellation->calc_metric(&(in[i*d_D]), &(out[i*d_O]), d_TYPE); - } + d_constellation->calc_metric(&(in[i*d_D]), &(out[i*d_O]), d_TYPE); + } } consume_each (d_D * noutput_items / d_O); diff --git a/gr-trellis/src/lib/trellis_constellation_metrics_cf.h b/gr-trellis/src/lib/trellis_constellation_metrics_cf.h index 1851bb89c..2c2070522 100644 --- a/gr-trellis/src/lib/trellis_constellation_metrics_cf.h +++ b/gr-trellis/src/lib/trellis_constellation_metrics_cf.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -48,7 +48,7 @@ class TRELLIS_API trellis_constellation_metrics_cf : public gr_block gr_vector_void_star &output_items); protected: trellis_constellation_metrics_cf (digital_constellation_sptr constellation, trellis_metric_type_t TYPE); - + private: digital_constellation_sptr d_constellation; trellis_metric_type_t d_TYPE; diff --git a/gr-trellis/src/lib/trellis_encoder_XX.cc.t b/gr-trellis/src/lib/trellis_encoder_XX.cc.t index 698a0b307..dca92b08f 100644 --- a/gr-trellis/src/lib/trellis_encoder_XX.cc.t +++ b/gr-trellis/src/lib/trellis_encoder_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -30,7 +30,7 @@ #include <gr_io_signature.h> #include <iostream> -@SPTR_NAME@ +@SPTR_NAME@ trellis_make_@BASE_NAME@ (const fsm &FSM, int ST) { return gnuradio::get_initial_sptr (new @NAME@ (FSM,ST)); @@ -47,7 +47,7 @@ trellis_make_@BASE_NAME@ (const fsm &FSM, int ST) -int +int @NAME@::work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) diff --git a/gr-trellis/src/lib/trellis_encoder_XX.h.t b/gr-trellis/src/lib/trellis_encoder_XX.h.t index 4038caac9..7c4250a92 100644 --- a/gr-trellis/src/lib/trellis_encoder_XX.h.t +++ b/gr-trellis/src/lib/trellis_encoder_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -44,7 +44,7 @@ private: friend TRELLIS_API @SPTR_NAME@ trellis_make_@BASE_NAME@ (const fsm &FSM, int ST); fsm d_FSM; int d_ST; - @NAME@ (const fsm &FSM, int ST); + @NAME@ (const fsm &FSM, int ST); public: fsm FSM () const { return d_FSM; } diff --git a/gr-trellis/src/lib/trellis_metrics_X.cc.t b/gr-trellis/src/lib/trellis_metrics_X.cc.t index cd66df6fb..77eb8c81b 100644 --- a/gr-trellis/src/lib/trellis_metrics_X.cc.t +++ b/gr-trellis/src/lib/trellis_metrics_X.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -89,7 +89,7 @@ for (int m=0;m<nstreams;m++) { for (int i = 0; i < noutput_items / d_O ; i++){ calc_metric(d_O, d_D, d_TABLE,&(in[i*d_D]),&(out[i*d_O]), d_TYPE); - } + } } consume_each (d_D * noutput_items / d_O); diff --git a/gr-trellis/src/lib/trellis_metrics_X.h.t b/gr-trellis/src/lib/trellis_metrics_X.h.t index 809c27e65..ab406c51e 100644 --- a/gr-trellis/src/lib/trellis_metrics_X.h.t +++ b/gr-trellis/src/lib/trellis_metrics_X.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_X.cc.t b/gr-trellis/src/lib/trellis_pccc_decoder_X.cc.t index 34dd2eb87..d79192491 100644 --- a/gr-trellis/src/lib/trellis_pccc_decoder_X.cc.t +++ b/gr-trellis/src/lib/trellis_pccc_decoder_X.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -32,10 +32,10 @@ #include <iostream> #include "core_algorithms.h" - + static const float INF = 1.0e9; -@SPTR_NAME@ +@SPTR_NAME@ trellis_make_@BASE_NAME@ ( const fsm &FSM1, int ST10, int ST1K, const fsm &FSM2, int ST20, int ST2K, @@ -65,7 +65,7 @@ trellis_make_@BASE_NAME@ ( ) : gr_block ("@BASE_NAME@", gr_make_io_signature (1, 1, sizeof (float)), - gr_make_io_signature (1, 1, sizeof (@O_TYPE@))), + gr_make_io_signature (1, 1, sizeof (@O_TYPE@))), d_FSM1 (FSM1), d_ST10 (ST10), d_ST1K (ST1K), d_FSM2 (FSM2), d_ST20 (ST20), d_ST2K (ST2K), d_INTERLEAVER (INTERLEAVER), @@ -114,7 +114,7 @@ int d_FSM1, d_ST10, d_ST1K, d_FSM2, d_ST20, d_ST2K, d_INTERLEAVER, d_blocklength, d_repetitions, - p2min, + p2min, &(in[n*d_blocklength*d_FSM1.O()*d_FSM2.O()]),&(out[n*d_blocklength]) ); } diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_X.h.t b/gr-trellis/src/lib/trellis_pccc_decoder_X.h.t index a58a03264..e9bc94681 100644 --- a/gr-trellis/src/lib/trellis_pccc_decoder_X.h.t +++ b/gr-trellis/src/lib/trellis_pccc_decoder_X.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -41,7 +41,7 @@ TRELLIS_API @SPTR_NAME@ trellis_make_@BASE_NAME@ ( const interleaver &INTERLEAVER, int blocklength, int repetitions, - trellis_siso_type_t SISO_TYPE // perform "min-sum" or "sum-product" combining + trellis_siso_type_t SISO_TYPE // perform "min-sum" or "sum-product" combining ); @@ -77,7 +77,7 @@ class TRELLIS_API @NAME@ : public gr_block const interleaver &INTERLEAVER, int blocklength, int repetitions, - trellis_siso_type_t SISO_TYPE + trellis_siso_type_t SISO_TYPE ); public: diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.cc.t b/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.cc.t index 48f68f1fe..03e21de1f 100644 --- a/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.cc.t +++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -32,10 +32,10 @@ #include <iostream> #include "core_algorithms.h" - + static const float INF = 1.0e9; -@SPTR_NAME@ +@SPTR_NAME@ trellis_make_@BASE_NAME@ ( const fsm &FSMo, int STo0, int SToK, const fsm &FSMi, int STi0, int STiK, @@ -76,7 +76,7 @@ trellis_make_@BASE_NAME@ ( ) : gr_block ("@BASE_NAME@", gr_make_io_signature (1, 1, sizeof (@I_TYPE@)), - gr_make_io_signature (1, 1, sizeof (@O_TYPE@))), + gr_make_io_signature (1, 1, sizeof (@O_TYPE@))), d_FSMo (FSMo), d_STo0 (STo0), d_SToK (SToK), d_FSMi (FSMi), d_STi0 (STi0), d_STiK (STiK), d_INTERLEAVER (INTERLEAVER), @@ -134,9 +134,9 @@ int d_FSMo, d_STo0, d_SToK, d_FSMi, d_STi0, d_STiK, d_INTERLEAVER, d_blocklength, d_repetitions, - p2min, - d_D,d_TABLE, - d_METRIC_TYPE, + p2min, + d_D,d_TABLE, + d_METRIC_TYPE, d_scaling, &(in[n*d_blocklength*d_D]),&(out[n*d_blocklength]) ); diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.h.t b/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.h.t index ce118a3b1..6e45ea10a 100644 --- a/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.h.t +++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -42,7 +42,7 @@ TRELLIS_API @SPTR_NAME@ trellis_make_@BASE_NAME@ ( const interleaver &INTERLEAVER, int blocklength, int repetitions, - trellis_siso_type_t SISO_TYPE, // perform "min-sum" or "sum-product" combining + trellis_siso_type_t SISO_TYPE, // perform "min-sum" or "sum-product" combining int D, const std::vector<@I_TYPE@> &TABLE, trellis_metric_type_t METRIC_TYPE, @@ -90,7 +90,7 @@ class TRELLIS_API @NAME@ : public gr_block const interleaver &INTERLEAVER, int blocklength, int repetitions, - trellis_siso_type_t SISO_TYPE, + trellis_siso_type_t SISO_TYPE, int D, const std::vector<@I_TYPE@> &TABLE, trellis_metric_type_t METRIC_TYPE, diff --git a/gr-trellis/src/lib/trellis_pccc_encoder_XX.cc.t b/gr-trellis/src/lib/trellis_pccc_encoder_XX.cc.t index 40dcd4105..6cab858cd 100644 --- a/gr-trellis/src/lib/trellis_pccc_encoder_XX.cc.t +++ b/gr-trellis/src/lib/trellis_pccc_encoder_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -30,7 +30,7 @@ #include <gr_io_signature.h> #include <iostream> -@SPTR_NAME@ +@SPTR_NAME@ trellis_make_@BASE_NAME@ ( const fsm &FSM1, int ST1, const fsm &FSM2, int ST2, @@ -64,13 +64,13 @@ trellis_make_@BASE_NAME@ ( -int +int @NAME@::work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) { assert(noutput_items%d_blocklength ==0); - for (int b = 0 ; b<noutput_items/d_blocklength; b++) { + for (int b = 0 ; b<noutput_items/d_blocklength; b++) { const @I_TYPE@ *in = (const @I_TYPE@ *) input_items[0]+b*d_blocklength; @O_TYPE@ *out = (@O_TYPE@ *) output_items[0]+b*d_blocklength; diff --git a/gr-trellis/src/lib/trellis_pccc_encoder_XX.h.t b/gr-trellis/src/lib/trellis_pccc_encoder_XX.h.t index 2b6110e37..75a22b829 100644 --- a/gr-trellis/src/lib/trellis_pccc_encoder_XX.h.t +++ b/gr-trellis/src/lib/trellis_pccc_encoder_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -66,7 +66,7 @@ private: const fsm &FSM2, int ST2, const interleaver &INTERLEAVER, int blocklength - ); + ); public: fsm FSM1 () const { return d_FSM1; } diff --git a/gr-trellis/src/lib/trellis_permutation.cc b/gr-trellis/src/lib/trellis_permutation.cc index 416fc58ec..57c6d2693 100644 --- a/gr-trellis/src/lib/trellis_permutation.cc +++ b/gr-trellis/src/lib/trellis_permutation.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -29,7 +29,7 @@ #include <iostream> #include <string.h> -trellis_permutation_sptr +trellis_permutation_sptr trellis_make_permutation (int K, const std::vector<int> &TABLE, int SYMS_PER_BLOCK, size_t BYTES_PER_SYMBOL) { return gnuradio::get_initial_sptr(new trellis_permutation (K,TABLE,SYMS_PER_BLOCK,BYTES_PER_SYMBOL)); @@ -50,7 +50,7 @@ trellis_permutation::trellis_permutation (int K, const std::vector<int> &TABLE, -int +int trellis_permutation::work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) @@ -67,13 +67,13 @@ trellis_permutation::work (int noutput_items, for (int i = 0; i < noutput_items/d_SYMS_PER_BLOCK; i++){ // Index i refers to blocks. // Begining of packet (in blocks) - int i0 = d_K*(i/d_K); + int i0 = d_K*(i/d_K); // position of block within packet (in blocks) int j0 = i%d_K; // new position of block within packet (in blocks) int k0 = d_TABLE[j0]; - memcpy(&(out[i*d_SYMS_PER_BLOCK*d_BYTES_PER_SYMBOL]), - &(in[(i0+k0)*d_SYMS_PER_BLOCK*d_BYTES_PER_SYMBOL]), + memcpy(&(out[i*d_SYMS_PER_BLOCK*d_BYTES_PER_SYMBOL]), + &(in[(i0+k0)*d_SYMS_PER_BLOCK*d_BYTES_PER_SYMBOL]), d_BYTES_PER_SYMBOL*d_SYMS_PER_BLOCK); } // end per stream processing diff --git a/gr-trellis/src/lib/trellis_permutation.h b/gr-trellis/src/lib/trellis_permutation.h index 2786de29a..cc40518c2 100644 --- a/gr-trellis/src/lib/trellis_permutation.h +++ b/gr-trellis/src/lib/trellis_permutation.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -45,7 +45,7 @@ private: std::vector<int> d_TABLE; int d_SYMS_PER_BLOCK; size_t d_BYTES_PER_SYMBOL; - trellis_permutation (int K, const std::vector<int> &TABLE, int SYMS_PER_BLOCK, size_t NBYTES); + trellis_permutation (int K, const std::vector<int> &TABLE, int SYMS_PER_BLOCK, size_t NBYTES); public: int K () const { return d_K; } diff --git a/gr-trellis/src/lib/trellis_permutation.i b/gr-trellis/src/lib/trellis_permutation.i index 1433a6584..fdfaa44d3 100644 --- a/gr-trellis/src/lib/trellis_permutation.i +++ b/gr-trellis/src/lib/trellis_permutation.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -31,7 +31,7 @@ private: std::vector<int> d_TABLE; int d_SYMS_PER_BLOCK; size_t d_BYTES_PER_SYMBOL; - trellis_permutation (int K, const std::vector<int> &TABLE, int SYMS_PER_BLOCK, size_t BYTES_PER_SYMBOL); + trellis_permutation (int K, const std::vector<int> &TABLE, int SYMS_PER_BLOCK, size_t BYTES_PER_SYMBOL); public: int K () const { return d_K; } diff --git a/gr-trellis/src/lib/trellis_sccc_decoder_X.cc.t b/gr-trellis/src/lib/trellis_sccc_decoder_X.cc.t index 4a0f471fa..c9b78aa8f 100644 --- a/gr-trellis/src/lib/trellis_sccc_decoder_X.cc.t +++ b/gr-trellis/src/lib/trellis_sccc_decoder_X.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -32,10 +32,10 @@ #include <iostream> #include "core_algorithms.h" - + static const float INF = 1.0e9; -@SPTR_NAME@ +@SPTR_NAME@ trellis_make_@BASE_NAME@ ( const fsm &FSMo, int STo0, int SToK, const fsm &FSMi, int STi0, int STiK, @@ -65,7 +65,7 @@ trellis_make_@BASE_NAME@ ( ) : gr_block ("@BASE_NAME@", gr_make_io_signature (1, 1, sizeof (float)), - gr_make_io_signature (1, 1, sizeof (@O_TYPE@))), + gr_make_io_signature (1, 1, sizeof (@O_TYPE@))), d_FSMo (FSMo), d_STo0 (STo0), d_SToK (SToK), d_FSMi (FSMi), d_STi0 (STi0), d_STiK (STiK), d_INTERLEAVER (INTERLEAVER), @@ -114,7 +114,7 @@ int d_FSMo, d_STo0, d_SToK, d_FSMi, d_STi0, d_STiK, d_INTERLEAVER, d_blocklength, d_repetitions, - p2min, + p2min, &(in[n*d_blocklength*d_FSMi.O()]),&(out[n*d_blocklength]) ); } diff --git a/gr-trellis/src/lib/trellis_sccc_decoder_X.h.t b/gr-trellis/src/lib/trellis_sccc_decoder_X.h.t index 9857c6a34..d6fb72f68 100644 --- a/gr-trellis/src/lib/trellis_sccc_decoder_X.h.t +++ b/gr-trellis/src/lib/trellis_sccc_decoder_X.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -41,7 +41,7 @@ TRELLIS_API @SPTR_NAME@ trellis_make_@BASE_NAME@ ( const interleaver &INTERLEAVER, int blocklength, int repetitions, - trellis_siso_type_t SISO_TYPE // perform "min-sum" or "sum-product" combining + trellis_siso_type_t SISO_TYPE // perform "min-sum" or "sum-product" combining ); @@ -77,7 +77,7 @@ class TRELLIS_API @NAME@ : public gr_block const interleaver &INTERLEAVER, int blocklength, int repetitions, - trellis_siso_type_t SISO_TYPE + trellis_siso_type_t SISO_TYPE ); public: diff --git a/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.cc.t b/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.cc.t index 2927e3fe3..4508ca5cb 100644 --- a/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.cc.t +++ b/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -32,10 +32,10 @@ #include <iostream> #include "core_algorithms.h" - + static const float INF = 1.0e9; -@SPTR_NAME@ +@SPTR_NAME@ trellis_make_@BASE_NAME@ ( const fsm &FSMo, int STo0, int SToK, const fsm &FSMi, int STi0, int STiK, @@ -76,7 +76,7 @@ trellis_make_@BASE_NAME@ ( ) : gr_block ("@BASE_NAME@", gr_make_io_signature (1, 1, sizeof (@I_TYPE@)), - gr_make_io_signature (1, 1, sizeof (@O_TYPE@))), + gr_make_io_signature (1, 1, sizeof (@O_TYPE@))), d_FSMo (FSMo), d_STo0 (STo0), d_SToK (SToK), d_FSMi (FSMi), d_STi0 (STi0), d_STiK (STiK), d_INTERLEAVER (INTERLEAVER), @@ -134,9 +134,9 @@ int d_FSMo, d_STo0, d_SToK, d_FSMi, d_STi0, d_STiK, d_INTERLEAVER, d_blocklength, d_repetitions, - p2min, - d_D,d_TABLE, - d_METRIC_TYPE, + p2min, + d_D,d_TABLE, + d_METRIC_TYPE, d_scaling, &(in[n*d_blocklength*d_D]),&(out[n*d_blocklength]) ); diff --git a/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.h.t b/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.h.t index 5d2c2b85c..3fdc53c62 100644 --- a/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.h.t +++ b/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -42,7 +42,7 @@ TRELLIS_API @SPTR_NAME@ trellis_make_@BASE_NAME@ ( const interleaver &INTERLEAVER, int blocklength, int repetitions, - trellis_siso_type_t SISO_TYPE, // perform "min-sum" or "sum-product" combining + trellis_siso_type_t SISO_TYPE, // perform "min-sum" or "sum-product" combining int D, const std::vector<@I_TYPE@> &TABLE, trellis_metric_type_t METRIC_TYPE, @@ -90,7 +90,7 @@ class TRELLIS_API @NAME@ : public gr_block const interleaver &INTERLEAVER, int blocklength, int repetitions, - trellis_siso_type_t SISO_TYPE, + trellis_siso_type_t SISO_TYPE, int D, const std::vector<@I_TYPE@> &TABLE, trellis_metric_type_t METRIC_TYPE, diff --git a/gr-trellis/src/lib/trellis_sccc_encoder_XX.cc.t b/gr-trellis/src/lib/trellis_sccc_encoder_XX.cc.t index b1a46ca60..8054909db 100644 --- a/gr-trellis/src/lib/trellis_sccc_encoder_XX.cc.t +++ b/gr-trellis/src/lib/trellis_sccc_encoder_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -30,7 +30,7 @@ #include <gr_io_signature.h> #include <iostream> -@SPTR_NAME@ +@SPTR_NAME@ trellis_make_@BASE_NAME@ ( const fsm &FSMo, int STo, const fsm &FSMi, int STi, @@ -64,13 +64,13 @@ trellis_make_@BASE_NAME@ ( -int +int @NAME@::work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) { assert(noutput_items%d_blocklength ==0); - for (int b = 0 ; b<noutput_items/d_blocklength; b++) { + for (int b = 0 ; b<noutput_items/d_blocklength; b++) { const @I_TYPE@ *in = (const @I_TYPE@ *) input_items[0]+b*d_blocklength; @O_TYPE@ *out = (@O_TYPE@ *) output_items[0]+b*d_blocklength; diff --git a/gr-trellis/src/lib/trellis_sccc_encoder_XX.h.t b/gr-trellis/src/lib/trellis_sccc_encoder_XX.h.t index 0e8ff45a4..b16d7ffca 100644 --- a/gr-trellis/src/lib/trellis_sccc_encoder_XX.h.t +++ b/gr-trellis/src/lib/trellis_sccc_encoder_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -66,7 +66,7 @@ private: const fsm &FSMi, int STi, const interleaver &INTERLEAVER, int blocklength - ); + ); public: fsm FSMo () const { return d_FSMo; } diff --git a/gr-trellis/src/lib/trellis_siso_combined_f.cc b/gr-trellis/src/lib/trellis_siso_combined_f.cc index 2a4cfa123..d27fe4425 100644 --- a/gr-trellis/src/lib/trellis_siso_combined_f.cc +++ b/gr-trellis/src/lib/trellis_siso_combined_f.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -29,10 +29,10 @@ #include <stdexcept> #include <assert.h> #include <iostream> - + static const float INF = 1.0e9; -trellis_siso_combined_f_sptr +trellis_siso_combined_f_sptr trellis_make_siso_combined_f ( const fsm &FSM, int K, @@ -61,7 +61,7 @@ trellis_siso_combined_f::trellis_siso_combined_f ( trellis_metric_type_t TYPE) : gr_block ("siso_combined_f", gr_make_io_signature (1, -1, sizeof (float)), - gr_make_io_signature (1, -1, sizeof (float))), + gr_make_io_signature (1, -1, sizeof (float))), d_FSM (FSM), d_K (K), d_S0 (S0), @@ -76,7 +76,7 @@ trellis_siso_combined_f::trellis_siso_combined_f ( //d_beta(FSM.S()*(K+1)) { int multiple; - if (d_POSTI && d_POSTO) + if (d_POSTI && d_POSTO) multiple = d_FSM.I()+d_FSM.O(); else if(d_POSTI) multiple = d_FSM.I(); @@ -88,14 +88,14 @@ trellis_siso_combined_f::trellis_siso_combined_f ( set_output_multiple (d_K*multiple); //what is the meaning of relative rate for a block with 2 inputs? //set_relative_rate ( multiple / ((double) d_FSM.I()) ); - // it turns out that the above gives problems in the scheduler, so + // it turns out that the above gives problems in the scheduler, so // let's try (assumption O>I) //set_relative_rate ( multiple / ((double) d_FSM.O()) ); // I am tempted to automate like this if(d_FSM.I() <= d_D) set_relative_rate ( multiple / ((double) d_D) ); else - set_relative_rate ( multiple / ((double) d_FSM.I()) ); + set_relative_rate ( multiple / ((double) d_FSM.I()) ); } @@ -111,7 +111,7 @@ trellis_siso_combined_f::forecast (int noutput_items, gr_vector_int &ninput_item multiple = d_FSM.O(); else throw std::runtime_error ("Not both POSTI and POSTO can be false."); - //printf("forecast: Multiple = %d\n",multiple); + //printf("forecast: Multiple = %d\n",multiple); assert (noutput_items % (d_K*multiple) == 0); int input_required1 = d_FSM.I() * (noutput_items/multiple) ; int input_required2 = d_D * (noutput_items/multiple) ; @@ -142,7 +142,7 @@ inline float min_star(float a, float b) return (a <= b ? a : b)-log(1+exp(a <= b ? a-b : b-a)); } -void siso_algorithm_combined(int I, int S, int O, +void siso_algorithm_combined(int I, int S, int O, const std::vector<int> &NS, const std::vector<int> &OS, const std::vector< std::vector<int> > &PS, @@ -157,7 +157,7 @@ void siso_algorithm_combined(int I, int S, int O, const float *priori, const float *observations, float *post//, //std::vector<float> &alpha, //std::vector<float> &beta - ) + ) { float norm,mm,minm; std::vector<float> alpha(S*(K+1)); @@ -186,7 +186,7 @@ void siso_algorithm_combined(int I, int S, int O, alpha[(k+1)*S+j]=minm; if(minm<norm) norm=minm; } - for(int j=0;j<S;j++) + for(int j=0;j<S;j++) alpha[(k+1)*S+j]-=norm; // normalize total metrics so they do not explode } @@ -200,7 +200,7 @@ void siso_algorithm_combined(int I, int S, int O, for(int k=K-1;k>=0;k--) { // backward recursion norm=INF; - for(int j=0;j<S;j++) { + for(int j=0;j<S;j++) { minm=INF; for(int i=0;i<I;i++) { int i0 = j*I+i; @@ -249,8 +249,8 @@ void siso_algorithm_combined(int I, int S, int O, for(int n=0;n<O;n++) post[k*(I+O)+I+n]-=norm; // normalize metrics } - } - else if(POSTI) + } + else if(POSTI) { for(int k=0;k<K;k++) { // input combining norm=INF; @@ -306,7 +306,7 @@ trellis_siso_combined_f::general_work (int noutput_items, { assert (input_items.size() == 2*output_items.size()); int nstreams = output_items.size(); - //printf("general_work:Streams: %d\n",nstreams); + //printf("general_work:Streams: %d\n",nstreams); int multiple; if (d_POSTI && d_POSTO) multiple = d_FSM.I()+d_FSM.O(); @@ -319,11 +319,11 @@ trellis_siso_combined_f::general_work (int noutput_items, assert (noutput_items % (d_K*multiple) == 0); int nblocks = noutput_items / (d_K*multiple); - //printf("general_work:Blocks: %d\n",nblocks); + //printf("general_work:Blocks: %d\n",nblocks); //for(int i=0;i<ninput_items.size();i++) //printf("general_work:Input items available: %d\n",ninput_items[i]); - float (*p2min)(float, float) = NULL; + float (*p2min)(float, float) = NULL; if(d_SISO_TYPE == TRELLIS_MIN_SUM) p2min = &min; else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT) diff --git a/gr-trellis/src/lib/trellis_siso_combined_f.h b/gr-trellis/src/lib/trellis_siso_combined_f.h index 2d043df62..4b28e8de4 100644 --- a/gr-trellis/src/lib/trellis_siso_combined_f.h +++ b/gr-trellis/src/lib/trellis_siso_combined_f.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -40,7 +40,7 @@ TRELLIS_API trellis_siso_combined_f_sptr trellis_make_siso_combined_f ( int SK, // final state (put -1 if not specified) bool POSTI, // true if you want a-posteriori info about the input symbols to be mux-ed in the output bool POSTO, // true if you want a-posteriori info about the output symbols to be mux-ed in the output - trellis_siso_type_t d_SISO_TYPE, // perform "min-sum" or "sum-product" combining + trellis_siso_type_t d_SISO_TYPE, // perform "min-sum" or "sum-product" combining int D, const std::vector<float> &TABLE, trellis_metric_type_t TYPE diff --git a/gr-trellis/src/lib/trellis_siso_f.cc b/gr-trellis/src/lib/trellis_siso_f.cc index d478c13a3..ffebf1928 100644 --- a/gr-trellis/src/lib/trellis_siso_f.cc +++ b/gr-trellis/src/lib/trellis_siso_f.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -29,10 +29,10 @@ #include <stdexcept> #include <assert.h> #include <iostream> - + static const float INF = 1.0e9; -trellis_siso_f_sptr +trellis_siso_f_sptr trellis_make_siso_f ( const fsm &FSM, int K, @@ -55,7 +55,7 @@ trellis_siso_f::trellis_siso_f ( trellis_siso_type_t SISO_TYPE) : gr_block ("siso_f", gr_make_io_signature (1, -1, sizeof (float)), - gr_make_io_signature (1, -1, sizeof (float))), + gr_make_io_signature (1, -1, sizeof (float))), d_FSM (FSM), d_K (K), d_S0 (S0), @@ -67,7 +67,7 @@ trellis_siso_f::trellis_siso_f ( //d_beta(FSM.S()*(K+1)) { int multiple; - if (d_POSTI && d_POSTO) + if (d_POSTI && d_POSTO) multiple = d_FSM.I()+d_FSM.O(); else if(d_POSTI) multiple = d_FSM.I(); @@ -79,14 +79,14 @@ trellis_siso_f::trellis_siso_f ( set_output_multiple (d_K*multiple); //what is the meaning of relative rate for a block with 2 inputs? //set_relative_rate ( multiple / ((double) d_FSM.I()) ); - // it turns out that the above gives problems in the scheduler, so + // it turns out that the above gives problems in the scheduler, so // let's try (assumption O>I) //set_relative_rate ( multiple / ((double) d_FSM.O()) ); // I am tempted to automate like this if(d_FSM.I() <= d_FSM.O()) set_relative_rate ( multiple / ((double) d_FSM.O()) ); else - set_relative_rate ( multiple / ((double) d_FSM.I()) ); + set_relative_rate ( multiple / ((double) d_FSM.I()) ); } @@ -102,7 +102,7 @@ trellis_siso_f::forecast (int noutput_items, gr_vector_int &ninput_items_require multiple = d_FSM.O(); else throw std::runtime_error ("Not both POSTI and POSTO can be false."); - //printf("forecast: Multiple = %d\n",multiple); + //printf("forecast: Multiple = %d\n",multiple); assert (noutput_items % (d_K*multiple) == 0); int input_required1 = d_FSM.I() * (noutput_items/multiple) ; int input_required2 = d_FSM.O() * (noutput_items/multiple) ; @@ -131,7 +131,7 @@ inline float min_star(float a, float b) return (a <= b ? a : b)-log(1+exp(a <= b ? a-b : b-a)); } -void siso_algorithm(int I, int S, int O, +void siso_algorithm(int I, int S, int O, const std::vector<int> &NS, const std::vector<int> &OS, const std::vector< std::vector<int> > &PS, @@ -143,7 +143,7 @@ void siso_algorithm(int I, int S, int O, const float *priori, const float *prioro, float *post//, //std::vector<float> &alpha, //std::vector<float> &beta - ) + ) { float norm,mm,minm; std::vector<float> alpha(S*(K+1)); @@ -170,7 +170,7 @@ void siso_algorithm(int I, int S, int O, alpha[(k+1)*S+j]=minm; if(minm<norm) norm=minm; } - for(int j=0;j<S;j++) + for(int j=0;j<S;j++) alpha[(k+1)*S+j]-=norm; // normalize total metrics so they do not explode } @@ -184,7 +184,7 @@ void siso_algorithm(int I, int S, int O, for(int k=K-1;k>=0;k--) { // backward recursion norm=INF; - for(int j=0;j<S;j++) { + for(int j=0;j<S;j++) { minm=INF; for(int i=0;i<I;i++) { int i0 = j*I+i; @@ -233,8 +233,8 @@ if (POSTI && POSTO) for(int n=0;n<O;n++) post[k*(I+O)+I+n]-=norm; // normalize metrics } -} -else if(POSTI) +} +else if(POSTI) { for(int k=0;k<K;k++) { // input combining norm=INF; @@ -288,7 +288,7 @@ trellis_siso_f::general_work (int noutput_items, { assert (input_items.size() == 2*output_items.size()); int nstreams = output_items.size(); - //printf("general_work:Streams: %d\n",nstreams); + //printf("general_work:Streams: %d\n",nstreams); int multiple; if (d_POSTI && d_POSTO) multiple = d_FSM.I()+d_FSM.O(); @@ -301,11 +301,11 @@ trellis_siso_f::general_work (int noutput_items, assert (noutput_items % (d_K*multiple) == 0); int nblocks = noutput_items / (d_K*multiple); - //printf("general_work:Blocks: %d\n",nblocks); + //printf("general_work:Blocks: %d\n",nblocks); //for(int i=0;i<ninput_items.size();i++) //printf("general_work:Input items available: %d\n",ninput_items[i]); - float (*p2min)(float, float) = NULL; + float (*p2min)(float, float) = NULL; if(d_SISO_TYPE == TRELLIS_MIN_SUM) p2min = &min; else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT) diff --git a/gr-trellis/src/lib/trellis_siso_f.h b/gr-trellis/src/lib/trellis_siso_f.h index b3d02ad05..9341f2468 100644 --- a/gr-trellis/src/lib/trellis_siso_f.h +++ b/gr-trellis/src/lib/trellis_siso_f.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -39,7 +39,7 @@ TRELLIS_API trellis_siso_f_sptr trellis_make_siso_f ( int SK, // final state (put -1 if not specified) bool POSTI, // true if you want a-posteriori info about the input symbols to be mux-ed in the output bool POSTO, // true if you want a-posteriori info about the output symbols to be mux-ed in the output - trellis_siso_type_t d_SISO_TYPE // perform "min-sum" or "sum-product" combining + trellis_siso_type_t d_SISO_TYPE // perform "min-sum" or "sum-product" combining ); diff --git a/gr-trellis/src/lib/trellis_viterbi_X.cc.t b/gr-trellis/src/lib/trellis_viterbi_X.cc.t index 2254f6450..cadb89d57 100644 --- a/gr-trellis/src/lib/trellis_viterbi_X.cc.t +++ b/gr-trellis/src/lib/trellis_viterbi_X.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -30,10 +30,10 @@ #include <gr_io_signature.h> #include <assert.h> #include <iostream> - + static const float INF = 1.0e9; -@SPTR_NAME@ +@SPTR_NAME@ trellis_make_@BASE_NAME@ ( const fsm &FSM, int K, @@ -50,7 +50,7 @@ trellis_make_@BASE_NAME@ ( int SK) : gr_block ("@BASE_NAME@", gr_make_io_signature (1, -1, sizeof (float)), - gr_make_io_signature (1, -1, sizeof (@TYPE@))), + gr_make_io_signature (1, -1, sizeof (@TYPE@))), d_FSM (FSM), d_K (K), d_S0 (S0), @@ -89,7 +89,7 @@ void viterbi_algorithm<@O_TYPE@>(int I, int S, int O, /* Moved it to "core_algorithms.cc" */ /* -void viterbi_algorithm(int I, int S, int O, +void viterbi_algorithm(int I, int S, int O, const std::vector<int> &NS, const std::vector<int> &OS, const std::vector< std::vector<int> > &PS, @@ -97,7 +97,7 @@ void viterbi_algorithm(int I, int S, int O, int K, int S0,int SK, const float *in, @TYPE@ *out)//, - //std::vector<int> &trace) + //std::vector<int> &trace) { std::vector<int> trace(S*K); std::vector<float> alpha(S*2); @@ -130,7 +130,7 @@ void viterbi_algorithm(int I, int S, int O, alpha[((alphai+1)%2)*S+j]=minm; if(minm<norm) norm=minm; } - for(int j=0;j<S;j++) + for(int j=0;j<S;j++) alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do not explode alphai=(alphai+1)%2; } diff --git a/gr-trellis/src/lib/trellis_viterbi_X.h.t b/gr-trellis/src/lib/trellis_viterbi_X.h.t index c679649bb..c0400d341 100644 --- a/gr-trellis/src/lib/trellis_viterbi_X.h.t +++ b/gr-trellis/src/lib/trellis_viterbi_X.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -34,7 +34,7 @@ class @NAME@; typedef boost::shared_ptr<@NAME@> @SPTR_NAME@; TRELLIS_API @SPTR_NAME@ trellis_make_@BASE_NAME@ ( - const fsm &FSM, + const fsm &FSM, int K, int S0, int SK); diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_XX.cc.t b/gr-trellis/src/lib/trellis_viterbi_combined_XX.cc.t index e883a0ba7..74611ab8f 100644 --- a/gr-trellis/src/lib/trellis_viterbi_combined_XX.cc.t +++ b/gr-trellis/src/lib/trellis_viterbi_combined_XX.cc.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004,2010 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, @@ -30,10 +30,10 @@ #include <gr_io_signature.h> #include <assert.h> #include <iostream> - + static const float INF = 1.0e9; -@SPTR_NAME@ +@SPTR_NAME@ trellis_make_@BASE_NAME@ ( const fsm &FSM, int K, @@ -56,7 +56,7 @@ trellis_make_@BASE_NAME@ ( trellis_metric_type_t TYPE) : gr_block ("@BASE_NAME@", gr_make_io_signature (1, -1, sizeof (@I_TYPE@)), - gr_make_io_signature (1, -1, sizeof (@O_TYPE@))), + gr_make_io_signature (1, -1, sizeof (@O_TYPE@))), d_FSM (FSM), d_K (K), d_S0 (S0), @@ -71,7 +71,7 @@ trellis_make_@BASE_NAME@ ( } -void @NAME@::set_TABLE(const std::vector<@I_TYPE@> &table) +void @NAME@::set_TABLE(const std::vector<@I_TYPE@> &table) { d_TABLE = table; } @@ -91,7 +91,7 @@ void /* -void viterbi_algorithm_combined(int I, int S, int O, +void viterbi_algorithm_combined(int I, int S, int O, const std::vector<int> &NS, const std::vector<int> &OS, const std::vector< std::vector<int> > &PS, @@ -102,7 +102,7 @@ void viterbi_algorithm_combined(int I, int S, int O, const std::vector<@I_TYPE@> &TABLE, trellis_metric_type_t TYPE, const @I_TYPE@ *in, @O_TYPE@ *out)//, - //std::vector<int> &trace) + //std::vector<int> &trace) { std::vector<int> trace(S*K); std::vector<float> alpha(S*2); @@ -136,7 +136,7 @@ void viterbi_algorithm_combined(int I, int S, int O, alpha[((alphai+1)%2)*S+j]=minm; if(minm<norm) norm=minm; } - for(int j=0;j<S;j++) + for(int j=0;j<S;j++) alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do not explode alphai=(alphai+1)%2; } @@ -157,7 +157,7 @@ void viterbi_algorithm_combined(int I, int S, int O, out[k]= (@O_TYPE@) PI[st][i0]; st=PS[st][i0]; } - + delete [] metric; } diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_XX.h.t b/gr-trellis/src/lib/trellis_viterbi_combined_XX.h.t index 072f66158..c7e468e73 100644 --- a/gr-trellis/src/lib/trellis_viterbi_combined_XX.h.t +++ b/gr-trellis/src/lib/trellis_viterbi_combined_XX.h.t @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-trellis/src/python/.gitignore b/gr-trellis/src/python/.gitignore deleted file mode 100644 index bf03975bb..000000000 --- a/gr-trellis/src/python/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -/Makefile -/Makefile.in -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/*.pyo -/run_tests diff --git a/gr-trellis/src/python/CMakeLists.txt b/gr-trellis/src/python/CMakeLists.txt index 66ca3eb13..ae2ab9cb4 100644 --- a/gr-trellis/src/python/CMakeLists.txt +++ b/gr-trellis/src/python/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011-2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-trellis/src/python/Makefile.am b/gr-trellis/src/python/Makefile.am deleted file mode 100644 index 808ac4fb7..000000000 --- a/gr-trellis/src/python/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright 2004,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 - -EXTRA_DIST += run_tests.in \ - awgn1o2_4.fsm - - -TESTS = run_tests - - -noinst_PYTHON = \ - qa_trellis.py diff --git a/gr-trellis/src/python/qa_trellis.py b/gr-trellis/src/python/qa_trellis.py index b50679f27..fcc651ec6 100755 --- a/gr-trellis/src/python/qa_trellis.py +++ b/gr-trellis/src/python/qa_trellis.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2010 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. -# +# import math @@ -111,9 +111,9 @@ class trellis_tb(gr.top_block): # packet size in shorts src_head = gr.head (gr.sizeof_short, packet_size/16) # unpack shorts to symbols compatible with the FSM input cardinality - s2fsmi = gr.packed_to_unpacked_ss(bitspersymbol, gr.GR_MSB_FIRST) + s2fsmi = gr.packed_to_unpacked_ss(bitspersymbol, gr.GR_MSB_FIRST) # initial FSM state = 0 - enc = trellis.encoder_ss(f, 0) + enc = trellis.encoder_ss(f, 0) mod = gr.chunks_to_symbols_sc(constellation.points(), 1) # CHANNEL @@ -122,14 +122,14 @@ class trellis_tb(gr.top_block): # RX # data preprocessing to generate metrics for Viterbi - metrics = trellis.constellation_metrics_cf(constellation.base(), digital_swig.TRELLIS_EUCLIDEAN) + metrics = trellis.constellation_metrics_cf(constellation.base(), digital_swig.TRELLIS_EUCLIDEAN) # Put -1 if the Initial/Final states are not set. va = trellis.viterbi_s(f, K, 0, -1) # pack FSM input symbols to shorts - fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol, gr.GR_MSB_FIRST) + fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol, gr.GR_MSB_FIRST) # check the output self.dst = gr.check_lfsr_32k_s() - + self.connect (src, src_head, s2fsmi, enc, mod) self.connect (mod, (add, 0)) self.connect (noise, (add, 1)) diff --git a/gr-trellis/src/python/run_tests.in b/gr-trellis/src/python/run_tests.in deleted file mode 100644 index fcb078663..000000000 --- a/gr-trellis/src/python/run_tests.in +++ /dev/null @@ -1,12 +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 - -PYTHONPATH=@top_builddir@/gr-digital/swig:@top_builddir@/gr-digital/swig/.libs:@top_srcdir@/gr-digital/swig:$PYTHONPATH - -@top_builddir@/run_tests.sh \ - @abs_top_srcdir@/gr-trellis \ - @abs_top_builddir@/gr-trellis \ - @srcdir@ diff --git a/gr-uhd/.gitignore b/gr-uhd/.gitignore deleted file mode 100644 index a37fc0c1a..000000000 --- a/gr-uhd/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -/*.pc diff --git a/gr-uhd/CMakeLists.txt b/gr-uhd/CMakeLists.txt index 4f4503234..8d5c3a884 100644 --- a/gr-uhd/CMakeLists.txt +++ b/gr-uhd/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, @@ -39,6 +39,8 @@ GR_SET_GLOBAL(GR_UHD_INCLUDE_DIRS ${UHD_INCLUDE_DIRS} ) +SET(GR_PKG_UHD_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/uhd) + ######################################################################## # Begin conditional configuration ######################################################################## @@ -71,6 +73,13 @@ CPACK_COMPONENT("uhd_python" DEPENDS "core_python;uhd_runtime" ) +CPACK_COMPONENT("uhd_examples" + GROUP "UHD" + DISPLAY_NAME "Examples" + DESCRIPTION "Example programs" + DEPENDS "uhd_runtime" +) + CPACK_COMPONENT("uhd_swig" GROUP "UHD" DISPLAY_NAME "SWIG" @@ -83,12 +92,14 @@ CPACK_COMPONENT("uhd_swig" ######################################################################## add_subdirectory(include) add_subdirectory(lib) -add_subdirectory(examples) add_subdirectory(doc) +add_subdirectory(examples/c++) if(ENABLE_PYTHON) add_subdirectory(swig) add_subdirectory(grc) add_subdirectory(apps) + add_subdirectory(examples/python) + add_subdirectory(examples/grc) endif(ENABLE_PYTHON) ######################################################################## diff --git a/gr-uhd/Makefile.am b/gr-uhd/Makefile.am deleted file mode 100644 index 56829e9c4..000000000 --- a/gr-uhd/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright 2010-2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = include lib apps examples doc - -if PYTHON -SUBDIRS += swig grc -endif - -pkgconfigdir = $(libdir)/pkgconfig -dist_pkgconfig_DATA = gnuradio-uhd.pc diff --git a/gr-uhd/apps/.gitignore b/gr-uhd/apps/.gitignore deleted file mode 100644 index 22a4e7292..000000000 --- a/gr-uhd/apps/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -Makefile -Makefile.in - diff --git a/gr-uhd/apps/CMakeLists.txt b/gr-uhd/apps/CMakeLists.txt index 20ae8993f..1d68c00ac 100644 --- a/gr-uhd/apps/CMakeLists.txt +++ b/gr-uhd/apps/CMakeLists.txt @@ -23,12 +23,19 @@ include(GrPython) # Install some uhd apps ######################################################################## GR_PYTHON_INSTALL( + FILES + uhd_siggen_base.py + DESTINATION ${GR_PYTHON_DIR}/gnuradio/uhd + COMPONENT "uhd_python" +) + +GR_PYTHON_INSTALL( PROGRAMS - uhd_fft.py - uhd_rx_cfile.py - uhd_siggen.py - uhd_siggen_gui.py - uhd_rx_nogui.py + uhd_fft + uhd_rx_cfile + uhd_siggen + uhd_siggen_gui + uhd_rx_nogui DESTINATION ${GR_RUNTIME_DIR} COMPONENT "uhd_python" ) diff --git a/gr-uhd/apps/Makefile.am b/gr-uhd/apps/Makefile.am deleted file mode 100644 index c30a143c2..000000000 --- a/gr-uhd/apps/Makefile.am +++ /dev/null @@ -1,36 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -EXTRA_DIST += \ - $(bin_SCRIPTS) - -SUBDIRS = hf_explorer hf_radio - -ourpythondir = $(grpythondir) - -bin_SCRIPTS = \ - uhd_fft.py \ - uhd_rx_cfile.py \ - uhd_siggen.py \ - uhd_siggen_gui.py \ - uhd_rx_nogui.py diff --git a/gr-uhd/apps/hf_explorer/.gitignore b/gr-uhd/apps/hf_explorer/.gitignore deleted file mode 100644 index b6950912c..000000000 --- a/gr-uhd/apps/hf_explorer/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -/*.pyc diff --git a/gr-uhd/apps/hf_explorer/Makefile.am b/gr-uhd/apps/hf_explorer/Makefile.am deleted file mode 100644 index c8e7ecb25..000000000 --- a/gr-uhd/apps/hf_explorer/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright 2006,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 - -ourdatadir = $(exampledir)/hf_explorer - -dist_ourdata_DATA = \ - README \ - hfx_help - -dist_ourdata_SCRIPTS = \ - hfx.py diff --git a/gr-uhd/apps/hf_explorer/hfx.py b/gr-uhd/apps/hf_explorer/hfx.py index 687adf82b..1f08bd8ba 100755 --- a/gr-uhd/apps/hf_explorer/hfx.py +++ b/gr-uhd/apps/hf_explorer/hfx.py @@ -56,7 +56,7 @@ # | # V # (dst) -# +# #---------------------------------------------------------------------- # # Versions 2.2.1 adds loop antenna automatic tuner @@ -65,7 +65,7 @@ # added more comments. # # 2.4.1 updates usrp interface to support auto subdev -# +# # 2.8.1 changed saved file format from 8-byte complex to # 4-byte short for obvious storage space savings. @@ -93,7 +93,7 @@ ID_BUTTON_3 = wx.NewId() # AM ID_BUTTON_4 = wx.NewId() # CW ID_BUTTON_5 = wx.NewId() # Powermate controls: Upper audio freq cutoff ID_BUTTON_6 = wx.NewId() # " Lower audio freq cutoff -ID_BUTTON_7 = wx.NewId() # " Frequency +ID_BUTTON_7 = wx.NewId() # " Frequency ID_BUTTON_8 = wx.NewId() # " Volume ID_BUTTON_9 = wx.NewId() # " Time ID_BUTTON_10 = wx.NewId() # Time Seek Forwards @@ -105,7 +105,7 @@ ID_TEXT_1 = wx.NewId() # Band Center, USRP ddc Freq ID_SPIN_1 = wx.NewId() # Frequency display and control ID_SLIDER_1 = wx.NewId() # Upper audio freq cutoff ID_SLIDER_2 = wx.NewId() # Lower audio freq cutoff -ID_SLIDER_3 = wx.NewId() # Frequency +ID_SLIDER_3 = wx.NewId() # Frequency ID_SLIDER_4 = wx.NewId() # Volume ID_SLIDER_5 = wx.NewId() # Programmable Gain Amp, PGA, RF gain ID_SLIDER_6 = wx.NewId() # AM Sync carrier level @@ -118,7 +118,7 @@ class MyFrame(wx.Frame): # begin wxGlade: MyFrame.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) - + # Menu Bar self.frame_1_menubar = wx.MenuBar() self.SetMenuBar(self.frame_1_menubar) @@ -215,7 +215,7 @@ class MyFrame(wx.Frame): self.f_slider_scale = 10000 self.spin_ctrl_1.SetRange(self.f_lo,self.f_hi) self.text_ctrl_1.SetValue(str(int(self.usrp_center))) - self.slider_5.SetValue(0) + self.slider_5.SetValue(0) self.AM_mode = False self.slider_3.SetValue((self.frequency-self.f_slider_offset)/self.f_slider_scale) @@ -265,7 +265,7 @@ class MyFrame(wx.Frame): self.tb.connect((s2ss,1),s2f2) self.tb.connect(s2f1,(src_f2c,0)) self.tb.connect(s2f2,(src_f2c,1)) - + # save radio data to a file if SAVE_RADIO_TO_FILE: radio_file = gr.file_sink(gr.sizeof_short, options.radio_file) @@ -295,7 +295,7 @@ class MyFrame(wx.Frame): sample_rate=self.af_sample_rate, average=True, size=(640,240)) - # AM Sync carrier + # AM Sync carrier if AM_SYNC_DISPLAY: self.fft2 = fftsink.fft_sink_c(self.tb, self.panel_9, y_per_div=20, fft_size=512, @@ -698,10 +698,10 @@ class MyFrame(wx.Frame): if self.AM_mode: fRel = ( event.GetX() - 330. ) / 14.266666 - 7.5 else: - fRel = ( event.GetX() - 330. ) / 14.266666 + fRel = ( event.GetX() - 330. ) / 14.266666 self.fft.win.SetToolTip(wx.ToolTip(eng_notation.num_to_str(self.frequency + (fRel*1e3)))) - # Mouse clicked on fft display - change frequency + # Mouse clicked on fft display - change frequency def Click(self,event): fRel = ( event.GetX() - 330. ) / 14.266666 if self.AM_mode == False: @@ -752,7 +752,7 @@ class MyFrame(wx.Frame): dev.write_aux_dac(uhd.dboard_iface.UNIT_RX, uhd.dboard_iface.AUX_DAC_C, float(self.slider_7.GetValue())) - + # Timer events - check for web commands def OnUpdate(self): cmds = os.listdir("/var/www/cgi-bin/commands/") diff --git a/gr-uhd/apps/hf_explorer/hfx_help b/gr-uhd/apps/hf_explorer/hfx_help index 9a52dd2bb..c8fa28dbd 100644 --- a/gr-uhd/apps/hf_explorer/hfx_help +++ b/gr-uhd/apps/hf_explorer/hfx_help @@ -10,7 +10,7 @@ Default is 3.9e6 80 meter ham band. Example: - hfx.py -c 9500k + hfx.py -c 9500k starts up in the 31 meter band. @@ -49,15 +49,15 @@ usrp hardware needed. Tune about the 800kHz wide band. When playing a recorded file, time controls fast-forward and rewind are available. - + -d Decimation. Sets sample rate and bandwidth. This is the factor that the usrp sample rate, 64e6, is divided by. Default is 250 for 256kHz bandwidth - which is enough to record a ham band without + which is enough to record a ham band without eating up disk space too fast. The 64e6 sample rate limits the upper practical frequency to 32MHz. The Basic RX transformer limits the lower frequency - to about 200kHz. + to about 200kHz. Powermate Knob: @@ -145,12 +145,12 @@ amp I like is a Minicircuits ZHL-32A 29db amp but they are expensive and hard to find. Also it may help to use some filters to keep strong local signals from the ADC, or limit rf input - to the band of interest, etc. + to the band of interest, etc. Resonant outdoor antennas, like a dipole, in a low-noise (away from consumer electronics) environment are nice. Long random wires with a tuner work. I like a small indoor tuned loop made from 10ft of 1/4" copper tube, a 365pf tuning cap and a pickup loop connected - to rg-58. + to rg-58. Web Control: @@ -167,7 +167,7 @@ IF Output: - There is a provision for outputting un-demodulated complex + There is a provision for outputting un-demodulated complex through the audio out in stereo for use with Digital Radio Mondial (DRM) or using a seperate demodulation program like SDRadio (by I2PHD). diff --git a/gr-uhd/apps/hf_radio/.gitignore b/gr-uhd/apps/hf_radio/.gitignore deleted file mode 100644 index b6950912c..000000000 --- a/gr-uhd/apps/hf_radio/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -/*.pyc diff --git a/gr-uhd/apps/hf_radio/Makefile.am b/gr-uhd/apps/hf_radio/Makefile.am deleted file mode 100644 index e514076f6..000000000 --- a/gr-uhd/apps/hf_radio/Makefile.am +++ /dev/null @@ -1,39 +0,0 @@ -# -# Copyright 2006,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 - -ourdatadir = $(exampledir)/hf_radio - -dist_ourdata_DATA = \ - hfir.sci \ - radio.xml \ - input.py \ - output.py \ - README.TXT \ - ssbagc.py \ - ssbdemod.py \ - startup.py \ - ssb_taps - -dist_ourdata_SCRIPTS = \ - radio.py \ - ui.py diff --git a/gr-uhd/apps/hf_radio/README.TXT b/gr-uhd/apps/hf_radio/README.TXT index 7c7edf5e0..c5c57f847 100644 --- a/gr-uhd/apps/hf_radio/README.TXT +++ b/gr-uhd/apps/hf_radio/README.TXT @@ -1,17 +1,17 @@ # 2008-02-07 -# +# # These files have not yet been update to use the new top_block/hier_block2 # interfaces. Until someone does that, this files will no longer run. -# +# The files in this directory implement a fairly simple HF radio that works with the basic rx daughter board on the USRP. -Many thanks to the Gnu Radio folks for a great new way to waste large blocks +Many thanks to the Gnu Radio folks for a great new way to waste large blocks of time in infinitely tweaking a huge number of free parameters. -Start the receiver by running the radio.py in this directory. Or from the +Start the receiver by running the radio.py in this directory. Or from the Python prompt type "from radio import *" and you'll get the prompt back with the receiver running. You can then poke around to see what's going on. @@ -19,7 +19,7 @@ There are two spectrum displays. One is the output of the USRP and displays about 300KHz of bandwidth centered at the current tuning freq. The other displays the output spectrum of the demodulator. -The demodulator does AM demod using the complex modulus block from gr. It +The demodulator does AM demod using the complex modulus block from gr. It does SSB demod using the frequency translating fir filter as a complex hilbert transformer. The taps for this filter were generated using a program called Scilab and the Scilab program in the file hfir.sci. More details in @@ -39,7 +39,7 @@ The audio bandwidth can be similarly adjusted from about 50Hz to 10KHz. The GUI layout was produced using wxGlade. The file radio.xml is the GUI specification. It will produce a file called ui.py which is subclassed by classes defined in radio.py. The ui.py is purely generated by wxGlade -all app specific code for the GUI is in radio.py. +all app specific code for the GUI is in radio.py. Most of the actual signal processing code is built up in the other included files using the hierarchical block facilities. This organization should @@ -50,7 +50,7 @@ Known bugs weakness and other wxPython and wxGlade seem to conspire to insure that the layout can never be exactly what you have in mind. -Some of the controls don't behave as one might like. wx spin controls +Some of the controls don't behave as one might like. wx spin controls and spin boxes only support integers so it is rather a nuisance to make units come out nice. In the process of development I came up with a reasonable kluge so there is a mixture of approaches. diff --git a/gr-uhd/apps/hf_radio/hfir.sci b/gr-uhd/apps/hf_radio/hfir.sci index a2d5e2a62..64f5385d7 100644 --- a/gr-uhd/apps/hf_radio/hfir.sci +++ b/gr-uhd/apps/hf_radio/hfir.sci @@ -25,7 +25,7 @@ // This isn't as computationally efficient as using the hilbert transformer // and compensating delay but fascinating none the less. // -// This program is for the scilab language a very powerful free math +// This program is for the scilab language a very powerful free math // package similar to Matlab with infinitely better price/performace. // // compute the prototype lowpass fir diff --git a/gr-uhd/apps/hf_radio/input.py b/gr-uhd/apps/hf_radio/input.py index 2626ddfb5..78e800bb6 100644 --- a/gr-uhd/apps/hf_radio/input.py +++ b/gr-uhd/apps/hf_radio/input.py @@ -1,22 +1,22 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# # Basic USRP setup and control. # It's only ever been tried with a basic rx daughter card. @@ -24,7 +24,7 @@ # Imagine that the gnuradio boilerplate is here. # # M. Revnell 2005-Dec - + from gnuradio import gr from gnuradio import uhd @@ -33,7 +33,7 @@ class uhd_input(gr.hier_block2): gr.hier_block2.__init__(self, "uhd_input", gr.io_signature(0,0,0), gr.io_signature(1,1,gr.sizeof_gr_complex)) - + self.src = uhd.usrp_source(device_addr=address, io_type=uhd.io_type.COMPLEX_FLOAT32, num_channels=1) @@ -65,7 +65,7 @@ class uhd_input(gr.hier_block2): self.gain = gain self.src.set_gain(gain, 0) - def add_options(parser): + def add_options(parser): parser.add_option("-a", "--address", type="string", default="addr=192.168.10.2", help="Address of UHD device, [default=%default]") diff --git a/gr-uhd/apps/hf_radio/output.py b/gr-uhd/apps/hf_radio/output.py index 8ee7dc54c..70add5b84 100644 --- a/gr-uhd/apps/hf_radio/output.py +++ b/gr-uhd/apps/hf_radio/output.py @@ -1,22 +1,22 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# # Audio output with a volume control. @@ -31,7 +31,7 @@ class output( gr.hier_block2 ): gr.hier_block2.__init__(self, "output", gr.io_signature(1,1,gr.sizeof_float), gr.io_signature(0,0,0)) - + self.vol = gr.multiply_const_ff( 0.1 ) self.out = audio.sink( int(rate), device ) @@ -39,4 +39,4 @@ class output( gr.hier_block2 ): def set( self, val ): self.vol.set_k( val ) - + diff --git a/gr-uhd/apps/hf_radio/radio.py b/gr-uhd/apps/hf_radio/radio.py index 32e26c7eb..93d985067 100755 --- a/gr-uhd/apps/hf_radio/radio.py +++ b/gr-uhd/apps/hf_radio/radio.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# # GUI interactions and high level connections handled here. # @@ -107,7 +107,7 @@ class radio_frame( ui_frame ): agc_ref = self.block.agc.offs.k() self.agc_ref.SetValue( str( agc_ref ) ) self.agc_ref_s.SetValue( 5 ) - + self.fespectrum = fftsink2.fft_sink_c( self.fe_panel, fft_size=512, @@ -138,7 +138,7 @@ class radio_frame( ui_frame ): r = r + 5 self.agc_ref.SetValue( str( r ) ) self.block.agc.offs.set_k( r ) - + def agc_ref_down( self, event ): self.agc_ref_s.SetValue( 5 ) r = float( self.agc_ref.GetValue() ) @@ -184,7 +184,7 @@ class radio_frame( ui_frame ): def tune_evt( self, event ): f = self.freq_disp.GetValue() self.tune( f ) - + def tune( self, frequency ): self.freq_disp.SetValue( frequency ) self.block.tune( frequency ) @@ -247,13 +247,13 @@ class radio_frame( ui_frame ): def event_pga( self, event ): self.block.src.set_gain(self.pga.GetValue()) - + def event_vol( self, event ): self.block.out.set( self.volume.GetValue()/20.0 ) def set_usb( self, event ): self.block.demod.upper_sb() - + def set_lsb( self, event ): self.block.demod.lower_sb() @@ -310,9 +310,9 @@ def main(): thread2 = Thread( target = rssi_function ) thread2.start() - + radio_obj.MainLoop() - + if __name__ == "__main__": main() diff --git a/gr-uhd/apps/hf_radio/ssbagc.py b/gr-uhd/apps/hf_radio/ssbagc.py index 494712863..6a2e0a7cd 100644 --- a/gr-uhd/apps/hf_radio/ssbagc.py +++ b/gr-uhd/apps/hf_radio/ssbagc.py @@ -1,22 +1,22 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. - + # post detection agc processing # diff --git a/gr-uhd/apps/hf_radio/ssbdemod.py b/gr-uhd/apps/hf_radio/ssbdemod.py index 072d317a2..3c533f617 100644 --- a/gr-uhd/apps/hf_radio/ssbdemod.py +++ b/gr-uhd/apps/hf_radio/ssbdemod.py @@ -1,22 +1,22 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# # This tries to push the hilbert transform for ssb demod back into the # freq. xlating filter. @@ -45,7 +45,7 @@ class ssb_demod( gr.hier_block2 ): self.sideband = 1 self.xlate_taps = ([complex(v) for v in file('ssb_taps').readlines()]) - + self.audio_taps = gr.firdes.low_pass( 1.0, self.af_rate, @@ -69,7 +69,7 @@ class ssb_demod( gr.hier_block2 ): self.sb_sel = gr.multiply_const_ff( 1 ) self.mixer = gr.add_ff() self.am_det = gr.complex_to_mag() - + self.connect(self, self.xlate) self.connect(self.xlate, self.split) self.connect((self.split, 0), (self.sum, 0)) @@ -83,7 +83,7 @@ class ssb_demod( gr.hier_block2 ): self.connect(self.lpf, self) def upper_sb( self ): - self.xlate.set_taps([v.conjugate() for v in self.xlate_taps]) + self.xlate.set_taps([v.conjugate() for v in self.xlate_taps]) self.sb_sel.set_k( 1.0 ) self.am_sel.set_k( 0.0 ) @@ -91,7 +91,7 @@ class ssb_demod( gr.hier_block2 ): self.xlate.set_taps(self.xlate_taps) self.sb_sel.set_k( 1.0 ) self.am_sel.set_k( 0.0 ) - + def set_am( self ): taps = gr.firdes.low_pass( 1.0, self.if_rate, diff --git a/gr-uhd/apps/hf_radio/ui.py b/gr-uhd/apps/hf_radio/ui.py index 551a30415..a20ba4fab 100755 --- a/gr-uhd/apps/hf_radio/ui.py +++ b/gr-uhd/apps/hf_radio/ui.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# # -*- coding: UTF-8 -*- # generated by wxGlade 0.4 on Mon Jan 2 19:02:03 2006 diff --git a/gr-uhd/apps/uhd_fft.py b/gr-uhd/apps/uhd_fft index 2f2b0ebfa..8bb5e0d2b 100755 --- a/gr-uhd/apps/uhd_fft.py +++ b/gr-uhd/apps/uhd_fft @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gru from gnuradio import uhd @@ -44,7 +44,7 @@ class app_top_block(stdgui2.std_top_block): self.frame = frame self.panel = panel - + parser = OptionParser(option_class=eng_option) parser.add_option("-a", "--args", type="string", default="", help="UHD device address args , [default=%default]") @@ -74,8 +74,8 @@ class app_top_block(stdgui2.std_top_block): help="Set FFT update rate, [default=%default]") parser.add_option("", "--wire-format", type="string", default="sc16", help="Set wire format from USRP [default=%default]") - parser.add_option("", "--scalar", type="int", default=1024, - help="Set scalar multiplier value sc8 wire format [default=%default]") + parser.add_option("", "--stream-args", type="string", default="", + help="Set additional stream args [default=%default]") parser.add_option("", "--show-async-msg", action="store_true", default=False, help="Show asynchronous message notifications from UHD [default=%default]") (options, args) = parser.parse_args() @@ -84,11 +84,10 @@ class app_top_block(stdgui2.std_top_block): sys.exit(1) self.options = options self.show_debug_info = True - - scalar="scalar="+str(options.scalar) + self.u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args(cpu_format='fc32', - otw_format=options.wire_format, args=scalar)) + otw_format=options.wire_format, args=options.stream_args)) # Set the subdevice spec if(options.spec): @@ -100,7 +99,7 @@ class app_top_block(stdgui2.std_top_block): self.u.set_samp_rate(options.samp_rate) input_rate = self.u.get_samp_rate() - + if options.waterfall: self.scope = \ waterfallsink2.waterfall_sink_c (panel, fft_size=1024, @@ -112,7 +111,7 @@ class app_top_block(stdgui2.std_top_block): else: self.scope = fftsink2.fft_sink_c (panel, fft_size=options.fft_size, - sample_rate=input_rate, + sample_rate=input_rate, ref_scale=options.ref_scale, ref_level=20.0, y_divs = 12, @@ -126,7 +125,7 @@ class app_top_block(stdgui2.std_top_block): self._build_gui(vbox) self._setup_events() - + # set initial values if options.gain is None: @@ -138,7 +137,7 @@ class app_top_block(stdgui2.std_top_block): # if no freq was specified, use the mid-point r = self.u.get_freq_range() options.freq = float(r.start()+r.stop())/2 - + self.set_gain(options.gain) if self.show_debug_info: @@ -166,9 +165,9 @@ class app_top_block(stdgui2.std_top_block): def _form_set_freq(kv): return self.set_freq(kv['freq']) - + vbox.Add(self.scope.win, 10, wx.EXPAND) - + # add control area at the bottom self.myform = myform = form.form() hbox = wx.BoxSizer(wx.HORIZONTAL) @@ -185,11 +184,11 @@ class app_top_block(stdgui2.std_top_block): if g.stop() <= g.start(): glow = 0.0 ghigh = 1.0 - + else: glow = g.start() ghigh = g.stop() - + myform['gain'] = form.slider_field(parent=self.panel, sizer=hbox, label="Gain", weight=3, @@ -235,7 +234,7 @@ class app_top_block(stdgui2.std_top_block): # FIXME figure out how to have this be a subpanel that is always # created, but has its visibility controlled by foo.Show(True/False) - + def _form_set_samp_rate(kv): return self.set_samp_rate(kv['samprate']) @@ -266,7 +265,7 @@ class app_top_block(stdgui2.std_top_block): vbox.Add(hbox, 0, wx.EXPAND) vbox.AddSpacer(5) - + def set_freq(self, target_freq): """ Set the center frequency we're interested in. @@ -300,12 +299,12 @@ class app_top_block(stdgui2.std_top_block): self.myform['samprate'].set_value(self.u.get_samp_rate()) # uhd set_samp_rate never fails; always falls back to closest requested. - return True + return True def _setup_events(self): if not self.options.waterfall and not self.options.oscilloscope: self.scope.win.Bind(wx.EVT_LEFT_DCLICK, self.evt_left_dclick) - + def evt_left_dclick(self, event): (ux, uy) = self.scope.win.GetXY(event) if event.CmdDown(): @@ -318,17 +317,17 @@ class app_top_block(stdgui2.std_top_block): ind = int(points.shape()[0]/2) else: ind = numpy.argmax(points[:,1]) - + (freq, pwr) = points[ind] target_freq = freq/self.scope.win._scale_factor print ind, freq, pwr - self.set_freq(target_freq) + self.set_freq(target_freq) else: # Re-center on clicked frequency target_freq = ux/self.scope.win._scale_factor self.set_freq(target_freq) - - + + def main (): app = stdgui2.stdapp(app_top_block, "UHD FFT", nstatus=1) app.MainLoop() diff --git a/gr-uhd/apps/uhd_rx_cfile.py b/gr-uhd/apps/uhd_rx_cfile index 718bb80b7..fb639623e 100755 --- a/gr-uhd/apps/uhd_rx_cfile.py +++ b/gr-uhd/apps/uhd_rx_cfile @@ -1,28 +1,28 @@ #!/usr/bin/env python # # Copyright 2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# """ Read samples from a UHD device and write to file formatted as binary -outputs single precision complex float values or complex short values +outputs single precision complex float values or complex short values (interleaved 16 bit signed short integers). """ @@ -39,15 +39,14 @@ class rx_cfile_block(gr.top_block): def __init__(self, options, filename): gr.top_block.__init__(self) - scalar="scalar="+str(options.scalar) # Create a UHD device source if options.output_shorts: self._u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('sc16', - options.wire_format, args=scalar)) + options.wire_format, args=options.stream_args)) self._sink = gr.file_sink(gr.sizeof_short*2, filename) else: self._u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32', - options.wire_format, args=scalar)) + options.wire_format, args=options.stream_args)) self._sink = gr.file_sink(gr.sizeof_gr_complex, filename) # Set the subdevice spec @@ -90,7 +89,7 @@ class rx_cfile_block(gr.top_block): self.connect(self._u, self._head, self._sink) input_rate = self._u.get_samp_rate() - + if options.verbose: print "Args: ", options.args print "Rx gain:", options.gain @@ -117,7 +116,7 @@ class rx_cfile_block(gr.top_block): md = self.async_src.msg_to_async_metadata_t(msg) print "Channel: %i Time: %f Event: %i" % (md.channel, md.time_spec.get_real_secs(), md.event_code) - + def get_options(): usage="%prog: [options] output_filename" parser = OptionParser(option_class=eng_option, usage=usage) @@ -143,8 +142,8 @@ def get_options(): help="set daughterboard LO offset to OFFSET [default=hw default]") parser.add_option("", "--wire-format", type="string", default="sc16", help="set wire format from USRP [default=%default") - parser.add_option("", "--scalar", type="int", default=1024, - help="set scalar multiplier value for sc8 wire format [default=%default]") + parser.add_option("", "--stream-args", type="string", default="", + help="set stream arguments [default=%default]") parser.add_option("", "--show-async-msg", action="store_true", default=False, help="Show asynchronous message notifications from UHD [default=%default]") @@ -152,19 +151,19 @@ def get_options(): if len(args) != 1: parser.print_help() raise SystemExit, 1 - + if options.freq is None: parser.print_help() sys.stderr.write('You must specify the frequency with -f FREQ\n'); raise SystemExit, 1 - + return (options, args[0]) if __name__ == '__main__': (options, filename) = get_options() tb = rx_cfile_block(options, filename) - + try: tb.run() except KeyboardInterrupt: diff --git a/gr-uhd/apps/uhd_rx_nogui.py b/gr-uhd/apps/uhd_rx_nogui index bcb52c619..9977f55a3 100755 --- a/gr-uhd/apps/uhd_rx_nogui.py +++ b/gr-uhd/apps/uhd_rx_nogui @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2006,2007,2011,2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gru, uhd, optfir, audio, blks2 from gnuradio import eng_notation @@ -27,8 +27,8 @@ from optparse import OptionParser import sys """ -This example application demonstrates receiving and demodulating -different types of signals using the USRP. +This example application demonstrates receiving and demodulating +different types of signals using the USRP. A receive chain is built up of the following signal processing blocks: @@ -77,11 +77,11 @@ demod_params = { class uhd_src(gr.hier_block2): """ Create a UHD source object supplying complex floats. - + Selects user supplied subdevice or chooses first available one. - Calibration value is the offset from the tuned frequency to - the actual frequency. + Calibration value is the offset from the tuned frequency to + the actual frequency. """ def __init__(self, args, spec, antenna, samp_rate, gain=None, calibration=0.0): gr.hier_block2.__init__(self, "uhd_src", @@ -93,19 +93,19 @@ class uhd_src(gr.hier_block2): # Set the subdevice spec if(spec): self._src.set_subdev_spec(spec, 0) - + # Set the antenna if(antenna): self._src.set_antenna(antenna, 0) - + self._src.set_samp_rate(samp_rate) dev_rate = self._src.get_samp_rate() self._samp_rate = samp_rate - + # Resampler to get to exactly samp_rate no matter what dev_rate is self._rrate = samp_rate / dev_rate self._resamp = blks2.pfb_arb_resampler_ccf(self._rrate) - + # If no gain specified, set to midrange gain_range = self._src.get_gain_range() if gain is None: @@ -121,7 +121,7 @@ class uhd_src(gr.hier_block2): def rate(self): return self._samp_rate - + class app_top_block(gr.top_block): def __init__(self, options): gr.top_block.__init__(self) @@ -160,7 +160,7 @@ class app_top_block(gr.top_block): False) # Zero, not gate output AGC = gr.agc_cc(1.0/channel_rate, # Time constant - 1.0, # Reference power + 1.0, # Reference power 1.0, # Initial gain 1.0) # Maximum gain @@ -184,7 +184,7 @@ class app_top_block(gr.top_block): out_decim = int(out_lcm // options.output_rate) RSAMP = blks2.rational_resampler_fff(out_interp, out_decim) self.connect(tail, RSAMP) - tail = RSAMP + tail = RSAMP # Send to audio output device AUDIO = audio.sink(int(options.output_rate), @@ -201,7 +201,7 @@ class app_top_block(gr.top_block): md = self.async_src.msg_to_async_metadata_t(msg) print "Channel: %i Time: %f Event: %i" % (md.channel, md.time_spec.get_real_secs(), md.event_code) - + def main(): parser = OptionParser(option_class=eng_option) parser.add_option("-a", "--args", type="string", default="", @@ -244,7 +244,7 @@ def main(): if options.modulation is None: sys.stderr.write("Must supply a modulation type (AM, FM, WFM).\n") sys.exit(1) - + tb = app_top_block(options) try: tb.run() diff --git a/gr-uhd/apps/uhd_siggen b/gr-uhd/apps/uhd_siggen new file mode 100755 index 000000000..52fc24922 --- /dev/null +++ b/gr-uhd/apps/uhd_siggen @@ -0,0 +1,51 @@ +#!/usr/bin/env python +# +# Copyright 2008,2009,2011,2012 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +from gnuradio import gr +from gnuradio.uhd import uhd_siggen_base as uhd_siggen +import sys + +def main(): + if gr.enable_realtime_scheduling() != gr.RT_OK: + print "Note: failed to enable realtime scheduling, continuing" + + # Grab command line options and create top block + try: + (options, args) = uhd_siggen.get_options() + tb = uhd_siggen.top_block(options, args) + + except RuntimeError, e: + print e + sys.exit(1) + + tb.start() + raw_input('Press Enter to quit: ') + tb.stop() + tb.wait() + +# Make sure to create the top block (tb) within a function: +# That code in main will allow tb to go out of scope on return, +# which will call the decontructor on usrp and stop transmit. +# Whats odd is that grc works fine with tb in the __main__, +# perhaps its because the try/except clauses around tb. +if __name__ == "__main__": + main() diff --git a/gr-uhd/apps/uhd_siggen.py b/gr-uhd/apps/uhd_siggen_base.py index add8d1bf3..5fa881e42 100755..100644 --- a/gr-uhd/apps/uhd_siggen.py +++ b/gr-uhd/apps/uhd_siggen_base.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2008,2009,2011,2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# DESC_KEY = 'desc' SAMP_RATE_KEY = 'samp_rate' @@ -85,7 +85,7 @@ class top_block(gr.top_block, pubsub): self.subscribe(TYPE_KEY, self.set_waveform) #force update on pubsub keys - for key in (SAMP_RATE_KEY, GAIN_KEY, TX_FREQ_KEY, + for key in (SAMP_RATE_KEY, GAIN_KEY, TX_FREQ_KEY, AMPLITUDE_KEY, WAVEFORM_FREQ_KEY, WAVEFORM_OFFSET_KEY, WAVEFORM2_FREQ_KEY): self[key] = self[key] @@ -120,7 +120,7 @@ class top_block(gr.top_block, pubsub): dboard_serial = "no serial" subdev = self._u.get_subdev_spec() antenna = self._u.get_antenna() - + desc_key_str = "Motherboard: %s [%s]\n" % (mboard_id, mboard_serial) desc_key_str += "Daughterboard: %s [%s]\n" % (dboard_id, dboard_serial) desc_key_str += "Subdev: %s\n" % subdev @@ -172,7 +172,7 @@ class top_block(gr.top_block, pubsub): self._src2.set_sampling_freq(self[WAVEFORM_FREQ_KEY]*2*math.pi/self[SAMP_RATE_KEY]) else: return True # Waveform not yet set - + if self._verbose: print "Set sample rate to:", sr @@ -211,7 +211,7 @@ class top_block(gr.top_block, pubsub): print "Tx RF frequency: %sHz" % (n2s(tr.actual_rf_freq),) print "Tx DSP frequency: %sHz" % (n2s(tr.actual_dsp_freq),) elif self._verbose: - print "Failed to set freq." + print "Failed to set freq." return tr def set_waveform_freq(self, freq): @@ -313,7 +313,7 @@ class top_block(gr.top_block, pubsub): self._src.set_k(amplitude) else: return True # Waveform not yet set - + if self._verbose: print "Set amplitude to:", amplitude return True @@ -342,7 +342,7 @@ def get_options(): parser.add_option("--sine", dest="type", action="store_const", const=gr.GR_SIN_WAVE, help="Generate a carrier modulated by a complex sine wave", default=gr.GR_SIN_WAVE) - parser.add_option("--const", dest="type", action="store_const", const=gr.GR_CONST_WAVE, + parser.add_option("--const", dest="type", action="store_const", const=gr.GR_CONST_WAVE, help="Generate a constant carrier") parser.add_option("--offset", type="eng_float", default=0, help="Set waveform phase offset to OFFSET [default=%default]") @@ -368,10 +368,10 @@ def get_options(): # If this script is executed, the following runs. If it is imported, # the below does not run. -def main(): +def test_main(): if gr.enable_realtime_scheduling() != gr.RT_OK: print "Note: failed to enable realtime scheduling, continuing" - + # Grab command line options and create top block try: (options, args) = get_options() @@ -392,4 +392,4 @@ def main(): # Whats odd is that grc works fine with tb in the __main__, # perhaps its because the try/except clauses around tb. if __name__ == "__main__": - main() + test_main() diff --git a/gr-uhd/apps/uhd_siggen_gui.py b/gr-uhd/apps/uhd_siggen_gui index 1f6a73c2c..70929b182 100755 --- a/gr-uhd/apps/uhd_siggen_gui.py +++ b/gr-uhd/apps/uhd_siggen_gui @@ -1,30 +1,30 @@ #!/usr/bin/env python # # Copyright 2009,2011,2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# import wx from gnuradio import gr, uhd from gnuradio.gr.pubsub import pubsub from gnuradio.wxgui import gui, forms -import uhd_siggen +from gnuradio.uhd import uhd_siggen_base as uhd_siggen import sys, math class app_gui(pubsub): @@ -152,7 +152,7 @@ class app_gui(pubsub): key=uhd_siggen.TX_FREQ_KEY, ) freq_hbox.AddSpacer(10) - + forms.slider( parent=self.panel, sizer=freq_hbox, proportion=2, diff --git a/gr-uhd/doc/.gitignore b/gr-uhd/doc/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-uhd/doc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-uhd/doc/CMakeLists.txt b/gr-uhd/doc/CMakeLists.txt index da3021776..b78c50a02 100644 --- a/gr-uhd/doc/CMakeLists.txt +++ b/gr-uhd/doc/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/doc/Makefile.am b/gr-uhd/doc/Makefile.am deleted file mode 100644 index eee3ebcf6..000000000 --- a/gr-uhd/doc/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = - -dist_gr_doc_DATA = \ - README.uhd diff --git a/gr-uhd/doc/README.uhd b/gr-uhd/doc/README.uhd index ec8024c09..b0720d6d0 100644 --- a/gr-uhd/doc/README.uhd +++ b/gr-uhd/doc/README.uhd @@ -8,7 +8,7 @@ as: See the Doxygen documentation for details about the blocks available in this package. A quick listing of the details can be found in Python -after importing by using: +after importing by using: help(uhd) diff --git a/gr-uhd/doc/uhd.dox b/gr-uhd/doc/uhd.dox index 92ad7db4c..f03705fe1 100644 --- a/gr-uhd/doc/uhd.dox +++ b/gr-uhd/doc/uhd.dox @@ -66,7 +66,7 @@ To use these options to create a UHD source object: g = self.u.get_gain_range() options.gain = float(g.start()+g.stop())/2 self.u.set_gain(options.gain, 0) - + # Set the center frequency self.u.set_center_freq(options.freq, 0) diff --git a/gr-uhd/examples/.gitignore b/gr-uhd/examples/.gitignore deleted file mode 100644 index ad8a13c08..000000000 --- a/gr-uhd/examples/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/Makefile -/Makefile.in -*.dat -*.32f -*.32fc diff --git a/gr-uhd/examples/Makefile.am b/gr-uhd/examples/Makefile.am deleted file mode 100644 index a5dc177c4..000000000 --- a/gr-uhd/examples/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = - -ourdatadir = $(exampledir)/uhd - -dist_ourdata_SCRIPTS = \ - fm_tx4.py \ - fm_tx_2_daughterboards.py \ - max_power.py \ - usrp_am_mw_rcv.py \ - usrp_nbfm_ptt.py \ - usrp_nbfm_rcv.py \ - usrp_spectrum_sense.py \ - usrp_tv_rcv_nogui.py \ - usrp_tv_rcv.py \ - usrp_wfm_rcv2_nogui.py \ - usrp_wfm_rcv_fmdet.py \ - usrp_wfm_rcv_nogui.py \ - usrp_wfm_rcv_pll.py \ - usrp_wfm_rcv.py \ - usrp_wfm_rcv_sca.py \ - usrp_wxapt_rcv.py diff --git a/gr-uhd/examples/CMakeLists.txt b/gr-uhd/examples/c++/CMakeLists.txt index 91e2dfdaf..25645117c 100644 --- a/gr-uhd/examples/CMakeLists.txt +++ b/gr-uhd/examples/c++/CMakeLists.txt @@ -38,30 +38,8 @@ link_directories(${Boost_LIBRARY_DIRS}) add_executable(tags_demo tags_demo.cc) target_link_libraries(tags_demo gnuradio-uhd) -######################################################################## -# Python examples -######################################################################## -if(ENABLE_PYTHON) -GR_PYTHON_INSTALL( - PROGRAMS - fm_tx4.py - fm_tx_2_daughterboards.py - max_power.py - usrp_am_mw_rcv.py - usrp_nbfm_ptt.py - usrp_nbfm_rcv.py - usrp_spectrum_sense.py - usrp_tv_rcv_nogui.py - usrp_tv_rcv.py - usrp_wfm_rcv2_nogui.py - usrp_wfm_rcv_fmdet.py - usrp_wfm_rcv_nogui.py - usrp_wfm_rcv_pll.py - usrp_wfm_rcv.py - usrp_wfm_rcv_sca.py - usrp_wxapt_rcv.py - DESTINATION ${GR_PKG_DATA_DIR}/examples/uhd - COMPONENT "uhd_python" +INSTALL(TARGETS + tags_demo + DESTINATION ${GR_PKG_UHD_EXAMPLES_DIR} + COMPONENT "uhd_examples" ) - -endif(ENABLE_PYTHON) diff --git a/gr-uhd/examples/tag_sink_demo.h b/gr-uhd/examples/c++/tag_sink_demo.h index 7d49bd971..207cc47e6 100644 --- a/gr-uhd/examples/tag_sink_demo.h +++ b/gr-uhd/examples/c++/tag_sink_demo.h @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/examples/tag_source_demo.h b/gr-uhd/examples/c++/tag_source_demo.h index 9743c3407..7d48502b2 100644 --- a/gr-uhd/examples/tag_source_demo.h +++ b/gr-uhd/examples/c++/tag_source_demo.h @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/examples/tags_demo.cc b/gr-uhd/examples/c++/tags_demo.cc index f7442f098..cc4c93272 100644 --- a/gr-uhd/examples/tags_demo.cc +++ b/gr-uhd/examples/c++/tags_demo.cc @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-fcd/include/Makefile.am b/gr-uhd/examples/grc/CMakeLists.txt index 77dbaf5e4..06c233d45 100644 --- a/gr-fcd/include/Makefile.am +++ b/gr-uhd/examples/grc/CMakeLists.txt @@ -1,24 +1,31 @@ -# # Copyright 2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common -SUBDIRS = fcd +install( + FILES + uhd_const_wave.grc + uhd_dpsk_mod.grc + uhd_fft.grc + uhd_rx_dpsk.grc + uhd_two_tone_loopback.grc + uhd_tx_dpsk.grc + uhd_wbfm_receive.grc + DESTINATION ${GR_PKG_UHD_EXAMPLES_DIR} + COMPONENT "uhd_python" +) diff --git a/gnuradio-examples/grc/uhd/uhd_const_wave.grc b/gr-uhd/examples/grc/uhd_const_wave.grc index c64721c83..c64721c83 100644 --- a/gnuradio-examples/grc/uhd/uhd_const_wave.grc +++ b/gr-uhd/examples/grc/uhd_const_wave.grc diff --git a/gnuradio-examples/grc/uhd/uhd_dpsk_mod.grc b/gr-uhd/examples/grc/uhd_dpsk_mod.grc index 18ae9c3db..18ae9c3db 100644 --- a/gnuradio-examples/grc/uhd/uhd_dpsk_mod.grc +++ b/gr-uhd/examples/grc/uhd_dpsk_mod.grc diff --git a/gnuradio-examples/grc/uhd/uhd_fft.grc b/gr-uhd/examples/grc/uhd_fft.grc index 29c375065..29c375065 100644 --- a/gnuradio-examples/grc/uhd/uhd_fft.grc +++ b/gr-uhd/examples/grc/uhd_fft.grc diff --git a/gnuradio-examples/grc/uhd/uhd_rx_dpsk.grc b/gr-uhd/examples/grc/uhd_rx_dpsk.grc index 73848ff3c..73848ff3c 100644 --- a/gnuradio-examples/grc/uhd/uhd_rx_dpsk.grc +++ b/gr-uhd/examples/grc/uhd_rx_dpsk.grc diff --git a/gnuradio-examples/grc/uhd/uhd_two_tone_loopback.grc b/gr-uhd/examples/grc/uhd_two_tone_loopback.grc index 8bcbc0792..8bcbc0792 100644 --- a/gnuradio-examples/grc/uhd/uhd_two_tone_loopback.grc +++ b/gr-uhd/examples/grc/uhd_two_tone_loopback.grc diff --git a/gnuradio-examples/grc/uhd/uhd_tx_dpsk.grc b/gr-uhd/examples/grc/uhd_tx_dpsk.grc index 281ba8429..281ba8429 100644 --- a/gnuradio-examples/grc/uhd/uhd_tx_dpsk.grc +++ b/gr-uhd/examples/grc/uhd_tx_dpsk.grc diff --git a/gnuradio-examples/grc/uhd/uhd_wbfm_receive.grc b/gr-uhd/examples/grc/uhd_wbfm_receive.grc index 62658a2eb..62658a2eb 100644 --- a/gnuradio-examples/grc/uhd/uhd_wbfm_receive.grc +++ b/gr-uhd/examples/grc/uhd_wbfm_receive.grc diff --git a/gr-uhd/examples/python/CMakeLists.txt b/gr-uhd/examples/python/CMakeLists.txt new file mode 100644 index 000000000..7642b536b --- /dev/null +++ b/gr-uhd/examples/python/CMakeLists.txt @@ -0,0 +1,42 @@ +# Copyright 2011 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. + +include(GrPython) + +GR_PYTHON_INSTALL( + PROGRAMS + fm_tx4.py + fm_tx_2_daughterboards.py + max_power.py + usrp_am_mw_rcv.py + usrp_nbfm_ptt.py + usrp_nbfm_rcv.py + usrp_spectrum_sense.py + usrp_tv_rcv_nogui.py + usrp_tv_rcv.py + usrp_wfm_rcv2_nogui.py + usrp_wfm_rcv_fmdet.py + usrp_wfm_rcv_nogui.py + usrp_wfm_rcv_pll.py + usrp_wfm_rcv.py + usrp_wfm_rcv_sca.py + usrp_wxapt_rcv.py + DESTINATION ${GR_PKG_UHD_EXAMPLES_DIR} + COMPONENT "uhd_python" +) diff --git a/gr-uhd/examples/fm_tx4.py b/gr-uhd/examples/python/fm_tx4.py index aecb35b54..f412ffb5d 100755 --- a/gr-uhd/examples/fm_tx4.py +++ b/gr-uhd/examples/python/fm_tx4.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005-2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# """ Transmit N simultaneous narrow band FM signals. @@ -60,10 +60,10 @@ class pipeline(gr.hier_block2): sys.stderr.write(("\nError: Could not open file '%s'\n\n" % \ filename)) sys.exit(1) - + print audio_rate, if_rate fmtx = blks2.nbfm_tx (audio_rate, if_rate, max_dev=5e3, tau=75e-6) - + # Local oscillator lo = gr.sig_source_c (if_rate, # sample rate gr.GR_SIN_WAVE, # waveform type @@ -71,7 +71,7 @@ class pipeline(gr.hier_block2): 1.0, # amplitude 0) # DC Offset mixer = gr.multiply_cc () - + self.connect (src, fmtx, (mixer, 0)) self.connect (lo, (mixer, 1)) self.connect (mixer, self) @@ -107,7 +107,7 @@ class fm_tx_block(stdgui2.std_top_block): if options.nchannels < 1 or options.nchannels > MAX_CHANNELS: sys.stderr.write ("fm_tx4: nchannels out of range. Must be in [1,%d]\n" % MAX_CHANNELS) sys.exit(1) - + if options.freq is None: sys.stderr.write("fm_tx4: must specify frequency with -f FREQ\n") parser.print_help() @@ -168,7 +168,7 @@ class fm_tx_block(stdgui2.std_top_block): ref_level=40) self.connect (self.gain, post_mod) vbox.Add (post_mod.win, 1, wx.EXPAND) - + #if options.debug: # self.debugger = tx_debug_gui.tx_debug_gui(self.subdev) diff --git a/gr-uhd/examples/fm_tx_2_daughterboards.py b/gr-uhd/examples/python/fm_tx_2_daughterboards.py index c0a7112de..b5763e8e1 100755 --- a/gr-uhd/examples/fm_tx_2_daughterboards.py +++ b/gr-uhd/examples/python/fm_tx_2_daughterboards.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005-2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# """ Transmit 2 signals, one out each daughterboard. @@ -52,7 +52,7 @@ class example_signal_0(gr.hier_block2): 600, # frequency 1.0, # amplitude 0) # DC Offset - + self.connect(src, self) @@ -179,7 +179,7 @@ class my_top_block(gr.top_block): if(options.antenna): self.u.set_antenna(options.antenna, 0) self.u.set_antenna(options.antenna, 1) - + def set_freq(self, target_freq, chan): """ Set the center frequency we're interested in. @@ -199,7 +199,7 @@ class my_top_block(gr.top_block): else: print " Set Frequency Failed!" - + return False def set_gain(self, gain, chan): diff --git a/gr-uhd/examples/max_power.py b/gr-uhd/examples/python/max_power.py index a849432ee..5d23f16af 100755 --- a/gr-uhd/examples/max_power.py +++ b/gr-uhd/examples/python/max_power.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# """ Setup USRP for maximum power consumption. @@ -56,7 +56,7 @@ class build_block(gr.top_block): else: tx_nchan = 1 rx_nchan = 1 - + if tx_enable: print "\nTRANSMIT CHAIN" stream_args = uhd.stream_args('fc32', channels=range(tx_nchan)) diff --git a/gr-uhd/examples/usrp_am_mw_rcv.py b/gr-uhd/examples/python/usrp_am_mw_rcv.py index 85ffd7632..28262f2bd 100755 --- a/gr-uhd/examples/usrp_am_mw_rcv.py +++ b/gr-uhd/examples/python/usrp_am_mw_rcv.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005-2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, eng_notation, optfir from gnuradio import audio @@ -60,15 +60,15 @@ class wfm_rx_block (stdgui2.std_top_block): if len(args) != 0: parser.print_help() sys.exit(1) - + self.frame = frame self.panel = panel self.use_IF=options.use_if_freq if self.use_IF: - self.IF_freq=64000.0 + self.IF_freq=64000.0 else: self.IF_freq=0.0 - + self.vol = 0 self.state = "FREQ" self.freq = 0 @@ -89,7 +89,7 @@ class wfm_rx_block (stdgui2.std_top_block): audio_rate = 32e3 chanfilt_decim = int(usrp_rate // demod_rate) audio_decim = int(demod_rate // audio_rate) - + self.u.set_samp_rate(usrp_rate) dev_rate = self.u.get_samp_rate() @@ -97,7 +97,7 @@ class wfm_rx_block (stdgui2.std_top_block): # FIXME: make one of the follow-on filters an arb resampler rrate = usrp_rate / dev_rate self.resamp = blks2.pfb_arb_resampler_ccf(rrate) - + chan_filt_coeffs = gr.firdes.low_pass_2 (1, # gain usrp_rate, # sampling rate 8e3, # passband cutoff @@ -128,10 +128,10 @@ class wfm_rx_block (stdgui2.std_top_block): self.audio_sink = audio.sink (int (audio_rate), options.audio_output, False) # ok_to_block - + # now wire it all together self.connect (self.u, self.resamp, self.chan_filt, self.agc, - self.am_demod, self.audio_filt, + self.am_demod, self.audio_filt, self.volume_control, self.audio_sink) self._build_gui(vbox, usrp_rate, demod_rate, audio_rate) @@ -146,7 +146,7 @@ class wfm_rx_block (stdgui2.std_top_block): if options.volume is None: v = self.volume_range() options.volume = float(v[0]*3+v[1])/4.0 - + if abs(options.freq) < 1e3: options.freq *= 1e3 @@ -181,7 +181,7 @@ class wfm_rx_block (stdgui2.std_top_block): vbox.Add (self.post_filt_fft.win, 4, wx.EXPAND) if 0: - post_demod_fft = fftsink2.fft_sink_f(self.panel, title="Post Demod", + post_demod_fft = fftsink2.fft_sink_f(self.panel, title="Post Demod", fft_size=1024, sample_rate=demod_rate, y_per_div=10, ref_level=0) self.connect (self.am_demod, post_demod_fft) @@ -194,7 +194,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.connect (self.audio_filt, audio_fft) vbox.Add (audio_fft.win, 4, wx.EXPAND) - + # control area form at bottom self.myform = myform = form.form() @@ -255,7 +255,7 @@ class wfm_rx_block (stdgui2.std_top_block): elif self.rot <=-3: self.set_vol(self.vol - step) self.rot += 3 - + def on_button (self, event): if event.value == 0: # button up return @@ -265,7 +265,7 @@ class wfm_rx_block (stdgui2.std_top_block): else: self.state = "FREQ" self.update_status_bar () - + def set_vol (self, vol): g = self.volume_range() @@ -273,7 +273,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.volume_control.set_k(10**(self.vol/10)) self.myform['volume'].set_value(self.vol) self.update_status_bar () - + def set_freq(self, target_freq): """ Set the center frequency we're interested in. @@ -282,7 +282,7 @@ class wfm_rx_block (stdgui2.std_top_block): @rypte: bool """ r = self.u.set_center_freq(target_freq + self.IF_freq, 0) - + if r: self.freq = target_freq self.myform['freq'].set_value(target_freq) # update displayed value @@ -305,10 +305,10 @@ class wfm_rx_block (stdgui2.std_top_block): self.src_fft.set_baseband_freq(self.freq) except: None - + def volume_range(self): return (-40.0, 0.0, 0.5) - + if __name__ == '__main__': app = stdgui2.stdapp (wfm_rx_block, "USRP Broadcast AM MW RX") diff --git a/gr-uhd/examples/usrp_nbfm_ptt.py b/gr-uhd/examples/python/usrp_nbfm_ptt.py index 075604af3..8d26e656e 100755 --- a/gr-uhd/examples/usrp_nbfm_ptt.py +++ b/gr-uhd/examples/python/usrp_nbfm_ptt.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005,2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# import math import sys @@ -45,7 +45,7 @@ class ptt_block(stdgui2.std_top_block): self.frame = frame self.space_bar_pressed = False - + parser = OptionParser (option_class=eng_option) parser.add_option("-a", "--args", type="string", default="", help="UHD device address args [default=%default]") @@ -72,7 +72,7 @@ class ptt_block(stdgui2.std_top_block): if options.freq < 1e6: options.freq *= 1e6 - + self.txpath = transmit_path(options.args, options.spec, options.antenna, options.tx_gain, options.audio_input) @@ -103,7 +103,7 @@ class ptt_block(stdgui2.std_top_block): def set_rx_gain(self, gain): self.myform['rx_gain'].set_value(gain) # update displayed value self.rxpath.set_gain(gain) - + def set_tx_gain(self, gain): self.txpath.set_gain(gain) @@ -129,9 +129,9 @@ class ptt_block(stdgui2.std_top_block): def _form_set_freq(kv): return self.set_freq(kv['freq']) - + self.panel = panel - + # FIXME This REALLY needs to be replaced with a hand-crafted button # that sends both button down and button up events hbox = wx.BoxSizer(wx.HORIZONTAL) @@ -203,7 +203,7 @@ class ptt_block(stdgui2.std_top_block): form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Squelch", weight=3, range=self.rxpath.squelch_range(), callback=self.set_squelch) - + g = self.rxpath.u.get_gain_range() hbox.Add((5,0), 0) myform['rx_gain'] = \ @@ -221,7 +221,7 @@ class ptt_block(stdgui2.std_top_block): # FIXME figure out how to have this be a subpanel that is always # created, but has its visibility controlled by foo.Show(True/False) - + #if not(self.show_debug_info): # return @@ -268,7 +268,7 @@ class ptt_block(stdgui2.std_top_block): # if we lose the keyboard focus, turn off the transmitter self.space_bar_pressed = False self.set_transmit(False) - + # //////////////////////////////////////////////////////////////////////// # Transmit Path @@ -279,7 +279,7 @@ class transmit_path(gr.hier_block2): gr.hier_block2.__init__(self, "transmit_path", gr.io_signature(0, 0, 0), # Input signature gr.io_signature(0, 0, 0)) # Output signature - + self.u = uhd.usrp_sink(device_addr=args, stream_args=uhd.stream_args('fc32')) # Set the subdevice spec @@ -306,13 +306,13 @@ class transmit_path(gr.hier_block2): self.audio_rate, # sampling rate 3800, # low pass cutoff freq 300, # width of trans. band - gr.firdes.WIN_HANN) # filter type + gr.firdes.WIN_HANN) # filter type hpf = gr.firdes.high_pass (1, # gain self.audio_rate, # sampling rate 325, # low pass cutoff freq 50, # width of trans. band - gr.firdes.WIN_HANN) # filter type + gr.firdes.WIN_HANN) # filter type audio_taps = convolve(array(lpf),array(hpf)) self.audio_filt = gr.fir_filter_fff(1,audio_taps) @@ -391,7 +391,7 @@ class receive_path(gr.hier_block2): nfilts*dev_rate, # sampling rate 13e3, # low pass cutoff freq 4e3, # width of trans. band - gr.firdes.WIN_HANN) # filter type + gr.firdes.WIN_HANN) # filter type rrate = self.quad_rate / dev_rate self.resamp = blks2.pfb_arb_resampler_ccf(rrate, chan_coeffs, nfilts) @@ -407,7 +407,7 @@ class receive_path(gr.hier_block2): # sound card as final sink audio_sink = audio.sink (int(self.audio_rate), audio_output) - + # now wire it all together self.connect (self.u, self.resamp, self.fmrx, self.squelch, self._audio_gain, audio_sink) @@ -423,7 +423,7 @@ class receive_path(gr.hier_block2): self.set_volume((v[0]+v[1])/2) s = self.squelch_range() self.set_squelch((s[0]+s[1])/2) - + # Set the subdevice spec if(spec): self.u.set_subdev_spec(spec, 0) @@ -452,14 +452,14 @@ class receive_path(gr.hier_block2): def squelch_range(self): return self.squelch.squelch_range() - + def set_squelch(self, threshold): print "SQL =", threshold self.squelch.set_threshold(threshold) def threshold(self): return self.squelch.threshold() - + def set_freq(self, target_freq): """ Set the center frequency we're interested in. diff --git a/gr-uhd/examples/usrp_nbfm_rcv.py b/gr-uhd/examples/python/usrp_nbfm_rcv.py index 6fdf95a30..571abe8c9 100755 --- a/gr-uhd/examples/usrp_nbfm_rcv.py +++ b/gr-uhd/examples/python/usrp_nbfm_rcv.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005,2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, audio, blks2, uhd from gnuradio.eng_option import eng_option @@ -58,13 +58,13 @@ class my_top_block (stdgui2.std_top_block): if len(args) != 0: parser.print_help() sys.exit(1) - + if options.freq < 1e6: options.freq *= 1e6 - + self.frame = frame self.panel = panel - + self.state = "FREQ" self.freq = 0 self.freq_step = 25e3 @@ -72,7 +72,7 @@ class my_top_block (stdgui2.std_top_block): self.rxpath = receive_path(options.args, options.spec, options.antenna, options.gain, options.audio_output) self.connect(self.rxpath) - + self._build_gui(vbox, options.no_gui) # set initial values @@ -119,7 +119,7 @@ class my_top_block (stdgui2.std_top_block): y_per_div=20) self.connect (self.rxpath.resamp, rx_fft) vbox.Add (rx_fft.win, 4, wx.EXPAND) - + if 1 and not(no_gui): post_deemph_fft = fftsink2.fft_sink_f(self.panel, title="Post Deemph", @@ -132,7 +132,7 @@ class my_top_block (stdgui2.std_top_block): if 0: post_filt_fft = fftsink2.fft_sink_f(self.panel, - title="Post Filter", + title="Post Filter", fft_size=512, sample_rate=audio_rate, y_per_div=10, @@ -206,7 +206,7 @@ class my_top_block (stdgui2.std_top_block): elif self.rot <=-3: self.set_volume(self.rxpath.volume - step) self.rot += 3 - + def on_button (self, event): if event.value == 0: # button up return @@ -216,7 +216,7 @@ class my_top_block (stdgui2.std_top_block): else: self.state = "FREQ" self.update_status_bar () - + def set_squelch(self, threshold_in_db): self.rxpath.set_squelch(threshold_in_db) @@ -226,7 +226,7 @@ class my_top_block (stdgui2.std_top_block): self.rxpath.set_volume(vol) self.myform['volume'].set_value(self.rxpath.volume) self.update_status_bar () - + def set_freq(self, target_freq): r = self.rxpath.set_freq(target_freq) if r: @@ -252,7 +252,7 @@ class my_top_block (stdgui2.std_top_block): def volume_range(self): return (-20.0, 0.0, 0.5) - + #//////////////////////////////////////////////////////////////////////// # Receive Path @@ -289,7 +289,7 @@ class receive_path(gr.hier_block2): nfilts*dev_rate, # sampling rate 8e3, # low pass cutoff freq 2e3, # width of trans. band - gr.firdes.WIN_HANN) # filter type + gr.firdes.WIN_HANN) # filter type rrate = self.quad_rate / dev_rate self.resamp = blks2.pfb_arb_resampler_ccf(rrate, chan_coeffs, nfilts) @@ -306,7 +306,7 @@ class receive_path(gr.hier_block2): # sound card as final sink audio_sink = audio.sink (int(self.audio_rate), audio_output) - + # now wire it all together if USE_SIMPLE_SQUELCH: self.connect (self.u, self.resamp, self.squelch, self.fmrx, @@ -338,12 +338,12 @@ class receive_path(gr.hier_block2): def _update_audio_gain(self): self._audio_gain.set_k(10**(self.volume/10)) - + def squelch_range(self): r = self.squelch.squelch_range() #print "squelch_range: ", r return r - + def set_squelch(self, threshold): #print "SQL =", threshold self.squelch.set_threshold(threshold) diff --git a/gr-uhd/examples/usrp_spectrum_sense.py b/gr-uhd/examples/python/usrp_spectrum_sense.py index 355a55a98..32980adbf 100755 --- a/gr-uhd/examples/usrp_spectrum_sense.py +++ b/gr-uhd/examples/python/usrp_spectrum_sense.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005,2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, eng_notation, window from gnuradio import audio @@ -35,7 +35,7 @@ sys.stderr.write("Warning: this may have issues on some machines+Python version class ThreadClass(threading.Thread): def run(self): return - + class tune(gr.feval_dd): """ This class allows C++ code to callback into python. @@ -158,13 +158,13 @@ class my_top_block(gr.top_block): power = 0 for tap in mywindow: power += tap*tap - + c2mag = gr.complex_to_mag_squared(self.fft_size) # FIXME the log10 primitive is dog slow log = gr.nlog10_ff(10, self.fft_size, -20*math.log10(self.fft_size)-10*math.log10(power/self.fft_size)) - + # Set the freq_step to 75% of the actual data throughput. # This allows us to discard the bins on both ends of the spectrum. @@ -174,7 +174,7 @@ class my_top_block(gr.top_block): self.max_center_freq = self.min_center_freq + (nsteps * self.freq_step) self.next_freq = self.min_center_freq - + tune_delay = max(0, int(round(options.tune_delay * usrp_rate / self.fft_size))) # in fft_frames dwell_delay = max(1, int(round(options.dwell_delay * usrp_rate / self.fft_size))) # in fft_frames @@ -207,7 +207,7 @@ class my_top_block(gr.top_block): sys.exit(1) return target_freq - + def set_freq(self, target_freq): """ @@ -237,14 +237,14 @@ def main_loop(tb): print m.center_freq # FIXME do something useful with the data... - + # m.data are the mag_squared of the fft output (they are in the # standard order. I.e., bin 0 == DC.) # You'll probably want to do the equivalent of "fftshift" on them # m.raw_data is a string that contains the binary floats. # You could write this as binary to a file. - + if __name__ == '__main__': t = ThreadClass() t.start() @@ -253,6 +253,6 @@ if __name__ == '__main__': try: tb.start() main_loop(tb) - + except KeyboardInterrupt: pass diff --git a/gr-uhd/examples/usrp_tv_rcv.py b/gr-uhd/examples/python/usrp_tv_rcv.py index 700915bf8..b49a5ea71 100755 --- a/gr-uhd/examples/usrp_tv_rcv.py +++ b/gr-uhd/examples/python/usrp_tv_rcv.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005-2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# """ Realtime capture and display of analog Tv stations. @@ -95,7 +95,7 @@ class tv_rx_block (stdgui2.std_top_block): if not ((len(args) == 1) or (len(args) == 0)): parser.print_help() sys.exit(1) - + if len(args) == 1: filename = args[0] else: @@ -103,7 +103,7 @@ class tv_rx_block (stdgui2.std_top_block): self.frame = frame self.panel = panel - + self.contrast = options.contrast self.brightness = options.brightness self.state = "FREQ" @@ -136,7 +136,7 @@ class tv_rx_block (stdgui2.std_top_block): # Set the subdevice spec if(options.spec): self.u.set_subdev_spec(options.spec, 0) - + # Set the antenna if(options.antenna): self.u.set_antenna(options.antenna, 0) @@ -151,7 +151,7 @@ class tv_rx_block (stdgui2.std_top_block): self.src=self.u - self.gain = options.gain + self.gain = options.gain f2uc=gr.float_to_uchar() @@ -189,10 +189,10 @@ class tv_rx_block (stdgui2.std_top_block): print "use the following line to show the demodulated TV-signal:" print "display -depth 8 -size " +str(width)+ "x" + str(height) \ + " gray:" + options.out_filename - print "(Use the spacebar to advance to next frames)" + print "(Use the spacebar to advance to next frames)" options.repeat=False file_sink=gr.file_sink(gr.sizeof_char, options.out_filename) - self.dst =file_sink + self.dst =file_sink self.agc=gr.agc_cc(1e-7,1.0,1.0) #1e-7 self.am_demod = gr.complex_to_mag () @@ -219,7 +219,7 @@ class tv_rx_block (stdgui2.std_top_block): self.tv_sync_adv=gr.tv_sync_adv(usrp_rate, 0, False, False, 0.0, 255.0, 0.01, 1.0, 0.0, False) self.connect (self.src, self.am_demod, self.invert_and_scale, - self.tv_sync_adv, s2f, f2uc, self.dst) + self.tv_sync_adv, s2f, f2uc, self.dst) elif process_type=='do_nullsink': #self.connect (self.src, self.am_demod,self.invert_and_scale,f2uc,video_sink) @@ -229,16 +229,16 @@ class tv_rx_block (stdgui2.std_top_block): elif process_type=='do_tv_sync_corr': frame_size=width*height #int(usrp_rate/25.0) nframes=10# 32 - search_window=20*nframes + search_window=20*nframes debug=False video_alpha=0.3 #0.1 corr_alpha=0.3 - + #Note: this block is not yet in cvs tv_corr=gr.tv_correlator_ff(frame_size,nframes, search_window, - video_alpha, corr_alpha,debug) + video_alpha, corr_alpha,debug) shift=gr.add_const_ff(-0.7) - + self.connect (self.src, self.agc, self.am_demod, tv_corr, self.invert_and_scale, self.set_blacklevel, f2uc, self.dst) @@ -248,7 +248,7 @@ class tv_rx_block (stdgui2.std_top_block): self.connect(src_vertical_bars, f2uc, self.dst) self._build_gui(vbox, usrp_rate, usrp_rate, usrp_rate) - + frange = self.u.get_freq_range() if(frange.start() > self.tv_freq_max or frange.stop() < self.tv_freq_min): @@ -290,13 +290,13 @@ class tv_rx_block (stdgui2.std_top_block): vbox.Add (post_demod_fft.win, 4, wx.EXPAND) if 0: - post_filt_fft = fftsink.fft_sink_f (self, self.panel, title="Post Filter", + post_filt_fft = fftsink.fft_sink_f (self, self.panel, title="Post Filter", fft_size=512, sample_rate=audio_rate, y_per_div=10, ref_level=-40) self.connect (self.set_blacklevel, post_filt) vbox.Add (fft_win4, 4, wx.EXPAND) - + # control area form at bottom self.myform = myform = form.form() @@ -373,7 +373,7 @@ class tv_rx_block (stdgui2.std_top_block): elif self.rot <=-3: self.set_brightness(self.brightness - step) self.rot += 3 - + def on_button (self, event): if event.value == 0: # button up return @@ -385,7 +385,7 @@ class tv_rx_block (stdgui2.std_top_block): else: self.state = "FREQ" self.update_status_bar () - + def set_contrast (self, contrast): self.contrast = contrast @@ -398,7 +398,7 @@ class tv_rx_block (stdgui2.std_top_block): self.set_blacklevel.set_k(self.brightness +255.0) self.myform['brightness'].set_value(self.brightness) self.update_status_bar () - + def set_freq(self, target_freq): """ Set the center frequency we're interested in. @@ -430,13 +430,13 @@ class tv_rx_block (stdgui2.std_top_block): self.myform['gain'].set_value(gain) # update displayed value self.u.set_gain(gain) self.update_status_bar() - + def update_status_bar (self): msg = "Setting:%s Contrast:%r Brightness:%r Gain: %r" % \ (self.state, self.contrast,self.brightness,self.gain) self._set_status_msg(msg, 1) #self.src_fft.set_baseband_freq(self.freq) - + if __name__ == '__main__': app = stdgui2.stdapp (tv_rx_block, "USRP TV RX black-and-white") diff --git a/gr-uhd/examples/usrp_tv_rcv_nogui.py b/gr-uhd/examples/python/usrp_tv_rcv_nogui.py index 870e65b27..cfb36222c 100755 --- a/gr-uhd/examples/usrp_tv_rcv_nogui.py +++ b/gr-uhd/examples/python/usrp_tv_rcv_nogui.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005-2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# """ Reads from a file and generates PAL TV pictures in black and white @@ -99,7 +99,7 @@ class my_top_block(gr.top_block): parser.print_help() sys.stderr.write('You must specify the output. FILENAME or sdl \n'); sys.exit(1) - + filename = args[0] self.tv_freq_min = options.freq_min @@ -120,7 +120,7 @@ class my_top_block(gr.top_block): # file is data source, capture with usr_rx_csfile.py self.filesource = gr.file_source(gr.sizeof_short, options.in_filename, - options.repeat) + options.repeat) self.istoc = gr.interleaved_short_to_complex() self.connect(self.filesource,self.istoc) self.src=self.istoc @@ -140,7 +140,7 @@ class my_top_block(gr.top_block): # Set the antenna if(options.antenna): self.u.set_antenna(options.antenna, 0) - + self.u.set_samp_rate(input_rate) dev_rate = self.u.get_samp_rate() @@ -156,7 +156,7 @@ class my_top_block(gr.top_block): if not r: sys.stderr.write('Failed to set frequency\n') raise SystemExit, 1 - + self.agc = gr.agc_cc(1e-7,1.0,1.0) #1e-7 self.am_demod = gr.complex_to_mag () @@ -194,9 +194,9 @@ class my_top_block(gr.top_block): print "You can use the imagemagick display tool to show the resulting imagesequence" print "use the following line to show the demodulated TV-signal:" print "display -depth 8 -size " +str(width)+ "x" + str(height) + " gray:" +filename - print "(Use the spacebar to advance to next frames)" + print "(Use the spacebar to advance to next frames)" file_sink=gr.file_sink(gr.sizeof_char, filename) - self.dst =file_sink + self.dst =file_sink if options.nframes is None: self.connect(self.src, self.agc) diff --git a/gr-uhd/examples/usrp_wfm_rcv.py b/gr-uhd/examples/python/usrp_wfm_rcv.py index f6c5cf853..bbb599033 100755 --- a/gr-uhd/examples/usrp_wfm_rcv.py +++ b/gr-uhd/examples/python/usrp_wfm_rcv.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005-2007,2009,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, optfir, audio, blks2, uhd from gnuradio.eng_option import eng_option @@ -57,10 +57,10 @@ class wfm_rx_block (stdgui2.std_top_block): if len(args) != 0: parser.print_help() sys.exit(1) - + self.frame = frame self.panel = panel - + self.vol = 0 self.state = "FREQ" self.freq = 0 @@ -105,7 +105,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.audio_sink = audio.sink (int (audio_rate), options.audio_output, False) # ok_to_block - + # now wire it all together self.connect (self.u, self.chan_filt, self.guts, self.volume_control, self.audio_sink) @@ -120,7 +120,7 @@ class wfm_rx_block (stdgui2.std_top_block): if options.volume is None: g = self.volume_range() options.volume = float(g[0]+g[1])/2 - + frange = self.u.get_freq_range() if(frange.start() > self.fm_freq_max or frange.stop() < self.fm_freq_min): sys.stderr.write("Radio does not support required frequency range.\n") @@ -128,7 +128,7 @@ class wfm_rx_block (stdgui2.std_top_block): if(options.freq < self.fm_freq_min or options.freq > self.fm_freq_max): sys.stderr.write("Requested frequency is outside of required frequency range.\n") sys.exit(1) - + # set initial values @@ -155,7 +155,7 @@ class wfm_rx_block (stdgui2.std_top_block): vbox.Add (self.src_fft.win, 4, wx.EXPAND) if 1: - post_filt_fft = fftsink2.fft_sink_f(self.panel, title="Post Demod", + post_filt_fft = fftsink2.fft_sink_f(self.panel, title="Post Demod", fft_size=1024, sample_rate=usrp_rate, y_per_div=10, ref_level=0) self.connect (self.guts.fm_demod, post_filt_fft) @@ -168,7 +168,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.connect (self.guts.deemph, post_deemph_fft) vbox.Add (post_deemph_fft.win, 4, wx.EXPAND) - + # control area form at bottom self.myform = myform = form.form() @@ -195,7 +195,7 @@ class wfm_rx_block (stdgui2.std_top_block): callback=self.set_vol) hbox.Add((5,0), 1) - g = self.u.get_gain_range() + g = self.u.get_gain_range() myform['gain'] = \ form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Gain", weight=3, range=(g.start(), g.stop(), g.step()), @@ -229,7 +229,7 @@ class wfm_rx_block (stdgui2.std_top_block): elif self.rot <=-3: self.set_vol(self.vol - step) self.rot += 3 - + def on_button (self, event): if event.value == 0: # button up return @@ -239,7 +239,7 @@ class wfm_rx_block (stdgui2.std_top_block): else: self.state = "FREQ" self.update_status_bar () - + def set_vol (self, vol): g = self.volume_range() @@ -247,7 +247,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.volume_control.set_k(10**(self.vol/10)) self.myform['volume'].set_value(self.vol) self.update_status_bar () - + def set_freq(self, target_freq): """ Set the center frequency we're interested in. @@ -279,7 +279,7 @@ class wfm_rx_block (stdgui2.std_top_block): def volume_range(self): return (-20.0, 0.0, 0.5) - + if __name__ == '__main__': app = stdgui2.stdapp (wfm_rx_block, "USRP WFM RX") diff --git a/gr-uhd/examples/usrp_wfm_rcv2_nogui.py b/gr-uhd/examples/python/usrp_wfm_rcv2_nogui.py index b70334f30..f7e72ae6f 100755 --- a/gr-uhd/examples/usrp_wfm_rcv2_nogui.py +++ b/gr-uhd/examples/python/usrp_wfm_rcv2_nogui.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005-2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, optfir, audio, blks2, uhd from gnuradio.eng_option import eng_option @@ -55,13 +55,13 @@ class wfm_rx_block (gr.top_block): if len(args) != 0: parser.print_help() sys.exit(1) - + if abs(options.f1 - options.f2) > 5.5e6: print "Sorry, two stations must be within 5.5MHz of each other" raise SystemExit f = (options.f1, options.f2) - + self.vol = .1 self.state = "FREQ" @@ -130,7 +130,7 @@ class wfm_rx_block (gr.top_block): tr = uhd.tune_request(f[n], rf_freq=mid_freq, rf_freq_policy=uhd.tune_request.POLICY_MANUAL) self.u.set_center_freq(tr, n) - + # Set gain for each channel self.set_gain(options.gain, n) diff --git a/gr-uhd/examples/usrp_wfm_rcv_fmdet.py b/gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py index 9649857c0..514bd4faf 100755 --- a/gr-uhd/examples/usrp_wfm_rcv_fmdet.py +++ b/gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005-2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, optfir, audio, blks2, uhd from gnuradio.eng_option import eng_option @@ -59,10 +59,10 @@ class wfm_rx_block (stdgui2.std_top_block): if len(args) != 0: parser.print_help() sys.exit(1) - + self.frame = frame self.panel = panel - + self.vol = 0 self.state = "FREQ" self.freq = 0 @@ -112,7 +112,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.audio_sink = audio.sink (int (audio_rate), options.audio_output, False) # ok_to_block - + # now wire it all together self.connect (self.u, self.chan_filt, self.guts) self.connect((self.guts, 0), self.lchan_filt, @@ -206,7 +206,7 @@ class wfm_rx_block (stdgui2.std_top_block): if 0: - LmR_fft = fftsink2.fft_sink_f(self.panel, title="LmR", + LmR_fft = fftsink2.fft_sink_f(self.panel, title="LmR", fft_size=512, sample_rate=audio_rate, y_per_div=10, ref_level=-20) self.connect (self.guts.LmR_real,LmR_fft) @@ -216,7 +216,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.scope = scopesink2.scope_sink_f(self.panel, sample_rate=demod_rate) self.connect (self.guts.fm_demod,self.scope) vbox.Add (self.scope.win,4,wx.EXPAND) - + # control area form at bottom self.myform = myform = form.form() @@ -243,7 +243,7 @@ class wfm_rx_block (stdgui2.std_top_block): callback=self.set_vol) hbox.Add((5,0), 1) - g = self.u.get_gain_range() + g = self.u.get_gain_range() myform['gain'] = \ form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Gain", weight=3, range=(g.start(), g.stop(), g.step()), @@ -283,7 +283,7 @@ class wfm_rx_block (stdgui2.std_top_block): elif self.rot <=-3: self.set_vol(self.vol - step) self.rot += 3 - + def on_button (self, event): if event.value == 0: # button up return @@ -293,7 +293,7 @@ class wfm_rx_block (stdgui2.std_top_block): else: self.state = "FREQ" self.update_status_bar () - + def set_vol (self, vol): g = self.volume_range() @@ -308,7 +308,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.guts.stereo_carrier_pll_recovery.set_lock_threshold(squelch_threshold); except: print "FYI: This implementation of the stereo_carrier_pll_recovery has no squelch implementation yet" - + def set_freq(self, target_freq): """ @@ -317,7 +317,7 @@ class wfm_rx_block (stdgui2.std_top_block): @param target_freq: frequency in Hz @rypte: bool """ - + r = self.u.set_center_freq(target_freq) if r: @@ -330,7 +330,7 @@ class wfm_rx_block (stdgui2.std_top_block): self._set_status_msg("Failed", 0) return False - + def set_gain(self, gain): self.myform['gain'].set_value(gain) # update displayed value self.u.set_gain(gain) @@ -342,7 +342,7 @@ class wfm_rx_block (stdgui2.std_top_block): def volume_range(self): return (-20.0, 0.0, 0.5) - + if __name__ == '__main__': app = stdgui2.stdapp (wfm_rx_block, "USRP WFM RX") diff --git a/gr-uhd/examples/usrp_wfm_rcv_nogui.py b/gr-uhd/examples/python/usrp_wfm_rcv_nogui.py index f0195bcb5..7d042983e 100755 --- a/gr-uhd/examples/usrp_wfm_rcv_nogui.py +++ b/gr-uhd/examples/python/usrp_wfm_rcv_nogui.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005-2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, optfir, audio, blks2, uhd from gnuradio import eng_notation @@ -55,7 +55,7 @@ class wfm_rx_block (gr.top_block): if len(args) != 0: parser.print_help() sys.exit(1) - + self.state = "FREQ" self.freq = 0 @@ -99,7 +99,7 @@ class wfm_rx_block (gr.top_block): self.audio_sink = audio.sink(int(audio_rate), options.audio_output, False) # ok_to_block - + # now wire it all together self.connect (self.u, self.chan_filt, self.guts, self.volume_control, self.audio_sink) @@ -140,7 +140,7 @@ class wfm_rx_block (gr.top_block): @param target_freq: frequency in Hz @rypte: bool """ - + r = self.u.set_center_freq(target_freq) if r: @@ -159,14 +159,14 @@ class wfm_rx_block (gr.top_block): msg = "Freq: %s Volume:%f Setting:%s" % ( eng_notation.num_to_str(self.freq), self.vol, self.state) self._set_status_msg(msg, 1) - + def _set_status_msg(self, msg, which=0): print msg def volume_range(self): return (-20.0, 0.0, 0.5) - + if __name__ == '__main__': tb = wfm_rx_block() try: diff --git a/gr-uhd/examples/usrp_wfm_rcv_pll.py b/gr-uhd/examples/python/usrp_wfm_rcv_pll.py index b0744b00b..53b1e6fea 100755 --- a/gr-uhd/examples/usrp_wfm_rcv_pll.py +++ b/gr-uhd/examples/python/usrp_wfm_rcv_pll.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005-2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, optfir, audio, blks2, uhd from gnuradio import eng_notation @@ -59,10 +59,10 @@ class wfm_rx_block (stdgui2.std_top_block): if len(args) != 0: parser.print_help() sys.exit(1) - + self.frame = frame self.panel = panel - + self.vol = 0 self.state = "FREQ" self.freq = 0 @@ -97,7 +97,7 @@ class wfm_rx_block (stdgui2.std_top_block): 70) # stopband attenuation rrate = usrp_rate / dev_rate self.chan_filt = blks2.pfb_arb_resampler_ccf(rrate, chan_coeffs, nfilts) - + self.guts = blks2.wfm_rcv_pll (demod_rate, audio_decim) @@ -113,7 +113,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.audio_sink = audio.sink (int (audio_rate), options.audio_output, False) # ok_to_block - + # now wire it all together self.connect (self.u, self.chan_filt, self.guts) self.connect((self.guts, 0), self.lchan_filt, @@ -204,7 +204,7 @@ class wfm_rx_block (stdgui2.std_top_block): if 0: - LmR_fft = fftsink2.fft_sink_f(self.panel, title="LmR", + LmR_fft = fftsink2.fft_sink_f(self.panel, title="LmR", fft_size=512, sample_rate=audio_rate, y_per_div=10, ref_level=-20) self.connect (self.guts.LmR_real,LmR_fft) @@ -214,7 +214,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.scope = scopesink2.scope_sink_f(self.panel, sample_rate=demod_rate) self.connect (self.guts.fm_demod,self.scope) vbox.Add (self.scope.win,4,wx.EXPAND) - + # control area form at bottom self.myform = myform = form.form() @@ -241,7 +241,7 @@ class wfm_rx_block (stdgui2.std_top_block): callback=self.set_vol) hbox.Add((5,0), 1) - g = self.u.get_gain_range() + g = self.u.get_gain_range() myform['gain'] = \ form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Gain", weight=3, range=(g.start(), g.stop(), g.step()), @@ -281,7 +281,7 @@ class wfm_rx_block (stdgui2.std_top_block): elif self.rot <=-3: self.set_vol(self.vol - step) self.rot += 3 - + def on_button (self, event): if event.value == 0: # button up return @@ -291,7 +291,7 @@ class wfm_rx_block (stdgui2.std_top_block): else: self.state = "FREQ" self.update_status_bar () - + def set_vol (self, vol): g = self.volume_range() @@ -306,7 +306,7 @@ class wfm_rx_block (stdgui2.std_top_block): self.guts.stereo_carrier_pll_recovery.set_lock_threshold(squelch_threshold); except: print "FYI: This implementation of the stereo_carrier_pll_recovery has no squelch implementation yet" - + def set_freq(self, target_freq): """ Set the center frequency we're interested in. @@ -314,7 +314,7 @@ class wfm_rx_block (stdgui2.std_top_block): @param target_freq: frequency in Hz @rypte: bool """ - + r = self.u.set_center_freq(target_freq) if r: @@ -327,7 +327,7 @@ class wfm_rx_block (stdgui2.std_top_block): self._set_status_msg("Failed", 0) return False - + def set_gain(self, gain): self.myform['gain'].set_value(gain) # update displayed value self.u.set_gain(gain) @@ -339,7 +339,7 @@ class wfm_rx_block (stdgui2.std_top_block): def volume_range(self): return (-20.0, 0.0, 0.5) - + if __name__ == '__main__': app = stdgui2.stdapp (wfm_rx_block, "USRP WFM RX") diff --git a/gr-uhd/examples/usrp_wfm_rcv_sca.py b/gr-uhd/examples/python/usrp_wfm_rcv_sca.py index 224f30cf8..646fe8587 100755 --- a/gr-uhd/examples/usrp_wfm_rcv_sca.py +++ b/gr-uhd/examples/python/usrp_wfm_rcv_sca.py @@ -1,19 +1,19 @@ #!/usr/bin/env python # # Copyright 2006,2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -109,7 +109,7 @@ class wfm_rx_sca_block (stdgui2.std_top_block): # Set the antenna if(options.antenna): self.u.set_antenna(options.antenna, 0) - + usrp_rate = 320e3 demod_rate = 320e3 audio_rate = 32e3 @@ -218,7 +218,7 @@ class wfm_rx_sca_block (stdgui2.std_top_block): if not(self.set_freq(options.freq)): self._set_status_msg("Failed to set initial frequency") self.set_sca_freq(67000) # A common SCA Frequency - + def _set_status_msg(self, msg, which=0): self.frame.GetStatusBar().SetStatusText(msg, which) @@ -300,7 +300,7 @@ class wfm_rx_sca_block (stdgui2.std_top_block): callback=self.set_vol) hbox.Add((5,0), 1) - g = self.u.get_gain_range() + g = self.u.get_gain_range() myform['gain'] = \ form.quantized_slider_field(parent=self.panel, sizer=hbox, label="Gain", weight=3, range=(g.start(), g.stop(), g.step()), diff --git a/gr-uhd/examples/usrp_wxapt_rcv.py b/gr-uhd/examples/python/usrp_wxapt_rcv.py index d9b1a0188..6b57de3bc 100755 --- a/gr-uhd/examples/usrp_wxapt_rcv.py +++ b/gr-uhd/examples/python/usrp_wxapt_rcv.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005-2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, audio, blks2, uhd from gnuradio.eng_option import eng_option @@ -57,10 +57,10 @@ class wxapt_rx_block (stdgui2.std_top_block): if len(args) != 0: parser.print_help() sys.exit(1) - + self.frame = frame self.panel = panel - + self.vol = 0 self.state = "FREQ" self.freq = 0 @@ -102,7 +102,7 @@ class wxapt_rx_block (stdgui2.std_top_block): # sound card as final sink self.audio_sink = audio.sink (int (audio_rate), options.audio_output) - + # now wire it all together self.connect (self.u, self.chan_filt, self.guts, self.volume_control, self.audio_sink) @@ -157,13 +157,13 @@ class wxapt_rx_block (stdgui2.std_top_block): vbox.Add (post_deemph_fft.win, 4, wx.EXPAND) if 1: - post_filt_fft = fftsink2.fft_sink_f (self.panel, title="Post Filter", + post_filt_fft = fftsink2.fft_sink_f (self.panel, title="Post Filter", fft_size=512, sample_rate=audio_rate, y_per_div=10, ref_level=0) self.connect (self.guts.audio_filter, post_filt_fft) vbox.Add (post_filt_fft.win, 4, wx.EXPAND) - + # control area form at bottom self.myform = myform = form.form() @@ -224,7 +224,7 @@ class wxapt_rx_block (stdgui2.std_top_block): elif self.rot <=-3: self.set_vol(self.vol - step) self.rot += 3 - + def on_button (self, event): if event.value == 0: # button up return @@ -234,7 +234,7 @@ class wxapt_rx_block (stdgui2.std_top_block): else: self.state = "FREQ" self.update_status_bar () - + def set_vol (self, vol): g = self.volume_range() @@ -242,7 +242,7 @@ class wxapt_rx_block (stdgui2.std_top_block): self.volume_control.set_k(10**(self.vol/10)) self.myform['volume'].set_value(self.vol) self.update_status_bar () - + def set_freq(self, target_freq): """ Set the center frequency we're interested in. @@ -275,7 +275,7 @@ class wxapt_rx_block (stdgui2.std_top_block): def volume_range(self): return (-20.0, 0.0, 0.5) - + if __name__ == '__main__': app = stdgui2.stdapp (wxapt_rx_block, "USRP WXAPT RX") diff --git a/gr-uhd/grc/.gitignore b/gr-uhd/grc/.gitignore deleted file mode 100644 index 797c54ae7..000000000 --- a/gr-uhd/grc/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/uhd_usrp*.xml -/Makefile -/Makefile.in diff --git a/gr-uhd/grc/CMakeLists.txt b/gr-uhd/grc/CMakeLists.txt index 3297db8d7..2d8f24aa3 100644 --- a/gr-uhd/grc/CMakeLists.txt +++ b/gr-uhd/grc/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/include/.gitignore b/gr-uhd/include/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-uhd/include/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-uhd/include/CMakeLists.txt b/gr-uhd/include/CMakeLists.txt index fdd384d58..27d3d1d36 100644 --- a/gr-uhd/include/CMakeLists.txt +++ b/gr-uhd/include/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/include/Makefile.am b/gr-uhd/include/Makefile.am deleted file mode 100644 index 70b80681b..000000000 --- a/gr-uhd/include/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -grinclude_HEADERS = \ - gr_uhd_api.h \ - gr_uhd_usrp_source.h \ - gr_uhd_usrp_sink.h \ - gr_uhd_amsg_source.h diff --git a/gr-uhd/include/gr_uhd_amsg_source.h b/gr-uhd/include/gr_uhd_amsg_source.h index 3c1b59fa7..f2f21c99f 100644 --- a/gr-uhd/include/gr_uhd_amsg_source.h +++ b/gr-uhd/include/gr_uhd_amsg_source.h @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/include/gr_uhd_api.h b/gr-uhd/include/gr_uhd_api.h index d20b82c99..106acd8c7 100644 --- a/gr-uhd/include/gr_uhd_api.h +++ b/gr-uhd/include/gr_uhd_api.h @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/include/gr_uhd_usrp_sink.h b/gr-uhd/include/gr_uhd_usrp_sink.h index dffdf810f..0b05363f7 100644 --- a/gr-uhd/include/gr_uhd_usrp_sink.h +++ b/gr-uhd/include/gr_uhd_usrp_sink.h @@ -1,18 +1,18 @@ /* * Copyright 2010-2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/include/gr_uhd_usrp_source.h b/gr-uhd/include/gr_uhd_usrp_source.h index 64e9fb098..2611c5e07 100644 --- a/gr-uhd/include/gr_uhd_usrp_source.h +++ b/gr-uhd/include/gr_uhd_usrp_source.h @@ -1,18 +1,18 @@ /* * Copyright 2010-2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/lib/.gitignore b/gr-uhd/lib/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-uhd/lib/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-uhd/lib/CMakeLists.txt b/gr-uhd/lib/CMakeLists.txt index 1f44b0630..810d1446a 100644 --- a/gr-uhd/lib/CMakeLists.txt +++ b/gr-uhd/lib/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011-2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/lib/Makefile.am b/gr-uhd/lib/Makefile.am deleted file mode 100644 index 41ce79d87..000000000 --- a/gr-uhd/lib/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -# -# Copyright 2010-2012 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -AM_CPPFLAGS = \ - $(STD_DEFINES_AND_INCLUDES) \ - $(WITH_INCLUDES) \ - $(UHD_CPPFLAGS) \ - -I$(srcdir) \ - -Dgnuradio_uhd_EXPORTS - -lib_LTLIBRARIES = libgnuradio-uhd.la - -libgnuradio_uhd_la_SOURCES = \ - gr_uhd_usrp_source.cc \ - gr_uhd_usrp_sink.cc \ - gr_uhd_amsg_source.cc - -libgnuradio_uhd_la_LIBADD = \ - $(GNURADIO_CORE_LA) \ - $(UHD_LIBS) - -libgnuradio_uhd_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) - -noinst_HEADERS = gr_uhd_common.h diff --git a/gr-uhd/lib/gr_uhd_amsg_source.cc b/gr-uhd/lib/gr_uhd_amsg_source.cc index 67e402f6b..d2e2dd0bf 100644 --- a/gr-uhd/lib/gr_uhd_amsg_source.cc +++ b/gr-uhd/lib/gr_uhd_amsg_source.cc @@ -1,18 +1,18 @@ /* * Copyright 2011-2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/lib/gr_uhd_common.h b/gr-uhd/lib/gr_uhd_common.h index 940f17692..f2433b288 100644 --- a/gr-uhd/lib/gr_uhd_common.h +++ b/gr-uhd/lib/gr_uhd_common.h @@ -1,18 +1,18 @@ /* * Copyright 2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/lib/gr_uhd_usrp_sink.cc b/gr-uhd/lib/gr_uhd_usrp_sink.cc index 752817664..6c1688ea0 100644 --- a/gr-uhd/lib/gr_uhd_usrp_sink.cc +++ b/gr-uhd/lib/gr_uhd_usrp_sink.cc @@ -1,18 +1,18 @@ /* * Copyright 2010-2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/lib/gr_uhd_usrp_source.cc b/gr-uhd/lib/gr_uhd_usrp_source.cc index d06983cd3..8aa965401 100644 --- a/gr-uhd/lib/gr_uhd_usrp_source.cc +++ b/gr-uhd/lib/gr_uhd_usrp_source.cc @@ -1,18 +1,18 @@ /* * Copyright 2010-2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/swig/.gitignore b/gr-uhd/swig/.gitignore deleted file mode 100644 index 8afaca254..000000000 --- a/gr-uhd/swig/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/uhd_swig.cc -/uhd_swig.py -/Makefile -/Makefile.in -/guile -/python -/run_guile_tests -/run_tests diff --git a/gr-uhd/swig/Makefile.am b/gr-uhd/swig/Makefile.am deleted file mode 100644 index dbecd8573..000000000 --- a/gr-uhd/swig/Makefile.am +++ /dev/null @@ -1,96 +0,0 @@ -# -# Copyright 2010-2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common -include $(top_srcdir)/Makefile.swig - -TESTS = -EXTRA_DIST += run_tests.in run_guile_tests.in $(nobase_guile_DATA) -DISTCLEANFILES += run_tests run_guile_tests - -noinst_PYTHON = qa_uhd.py -noinst_GUILE = uhd.test - -AM_CPPFLAGS = \ - $(STD_DEFINES_AND_INCLUDES) \ - $(PYTHON_CPPFLAGS) \ - $(UHD_CPPFLAGS) \ - $(WITH_INCLUDES) - -uhd_swig_swig_args = $(UHD_CPPFLAGS) - -if GUILE -nobase_guile_DATA = \ - gnuradio/uhd.scm -endif - -# ---------------------------------------------------------------- -# The SWIG library - -TOP_SWIG_DOC_IFILES = \ - uhd_swig_doc.i - -TOP_SWIG_IFILES = \ - $(TOP_SWIG_DOC_IFILES) \ - uhd_swig.i - -BUILT_SOURCES += \ - $(TOP_SWIG_DOC_IFILES) - -EXTRA_DIST += \ - $(TOP_SWIG_DOC_IFILES) - -$(TOP_SWIG_DOC_IFILES): - `echo "" > $@` - -# Install so that they end up available as: -# import gnuradio.uhd -# This ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio/uhd -uhd_swig_pythondir_category = \ - gnuradio/uhd - -# additional libraries for linking with the SWIG-generated library -uhd_swig_la_swig_libadd = \ - $(top_builddir)/gr-uhd/lib/libgnuradio-uhd.la - -# additional Python files to be installed along with the SWIG-generated one -uhd_swig_python = \ - __init__.py - -# additional SWIG files to be installed -uhd_swig_swiginclude_headers = \ - $(TOP_SWIG_DOC_IFILES) - -uhd_swig_swig_args = $(UHD_CPPFLAGS) - -## If UHD was installed, defined GR_HAVE_UHD for swigging headers -if GR_DEFINE_HAVE_UHD - uhd_swig_swig_args += -DGR_HAVE_UHD -endif - -if PYTHON -TESTS += run_tests -endif - -if GUILE -TESTS += run_guile_tests -endif diff --git a/gr-uhd/swig/Makefile.swig.gen b/gr-uhd/swig/Makefile.swig.gen deleted file mode 100644 index 62adf8958..000000000 --- a/gr-uhd/swig/Makefile.swig.gen +++ /dev/null @@ -1,145 +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 uhd_swig.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/uhd_swig -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/uhd_swig -## -## 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. - -uhd_swig_pythondir_category ?= gnuradio/uhd_swig -uhd_swig_pylibdir_category ?= $(uhd_swig_pythondir_category) -uhd_swig_pythondir = $(pythondir)/$(uhd_swig_pythondir_category) -uhd_swig_pylibdir = $(pyexecdir)/$(uhd_swig_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -uhd_swig_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/uhd_swig -# FIXME: determince whether these should be installed with gnuradio. -uhd_swig_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -uhd_swig_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 > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -uhd_swig_swiginclude_HEADERS = \ - uhd_swig.i \ - $(uhd_swig_swiginclude_headers) - -if PYTHON -uhd_swig_pylib_LTLIBRARIES = \ - _uhd_swig.la - -_uhd_swig_la_SOURCES = \ - python/uhd_swig.cc \ - $(uhd_swig_la_swig_sources) - -uhd_swig_python_PYTHON = \ - uhd_swig.py \ - $(uhd_swig_python) - -_uhd_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(uhd_swig_la_swig_libadd) - -_uhd_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(uhd_swig_la_swig_ldflags) - -_uhd_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(uhd_swig_la_swig_cxxflags) - -python/uhd_swig.cc: uhd_swig.py -uhd_swig.py: uhd_swig.i - -# Include the python dependencies for this file --include python/uhd_swig.d - -endif # end of if python - -if GUILE - -uhd_swig_scmlib_LTLIBRARIES = \ - libguile-gnuradio-uhd_swig.la -libguile_gnuradio_uhd_swig_la_SOURCES = \ - guile/uhd_swig.cc \ - $(uhd_swig_la_swig_sources) -nobase_uhd_swig_scm_DATA = \ - gnuradio/uhd_swig.scm \ - gnuradio/uhd_swig-primitive.scm -libguile_gnuradio_uhd_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(uhd_swig_la_swig_libadd) -libguile_gnuradio_uhd_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(uhd_swig_la_swig_ldflags) -libguile_gnuradio_uhd_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(uhd_swig_la_swig_cxxflags) - -guile/uhd_swig.cc: gnuradio/uhd_swig.scm -gnuradio/uhd_swig.scm: uhd_swig.i -gnuradio/uhd_swig-primitive.scm: gnuradio/uhd_swig.scm - -# Include the guile dependencies for this file --include guile/uhd_swig.d - -endif # end of GUILE - - diff --git a/gr-uhd/swig/__init__.py b/gr-uhd/swig/__init__.py index b4045e77f..54a058c45 100644 --- a/gr-uhd/swig/__init__.py +++ b/gr-uhd/swig/__init__.py @@ -1,18 +1,18 @@ # # Copyright 2010-2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-uhd/swig/gnuradio/.gitignore b/gr-uhd/swig/gnuradio/.gitignore deleted file mode 100644 index 820cedd8c..000000000 --- a/gr-uhd/swig/gnuradio/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -uhd_swig-primitive.scm -uhd_swig.scm diff --git a/gr-uhd/swig/qa_uhd.py b/gr-uhd/swig/qa_uhd.py index 2973d04cd..00757369f 100755 --- a/gr-uhd/swig/qa_uhd.py +++ b/gr-uhd/swig/qa_uhd.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005,2008,2010 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 uhd_swig @@ -35,6 +35,6 @@ class test_uhd(gr_unittest.TestCase): """Just see if we can import the module... They may not have a UHD device connected, etc. Don't try to run anything""" pass - + if __name__ == '__main__': gr_unittest.run(test_uhd, "test_uhd.xml") diff --git a/gr-uhd/swig/run_guile_tests.in b/gr-uhd/swig/run_guile_tests.in deleted file mode 100644 index 5d08b0dd5..000000000 --- a/gr-uhd/swig/run_guile_tests.in +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -. @top_builddir@/setup_guile_test_env - -# 1st argument is absolute path to hand coded guile source directory -# 2nd argument is absolute path to component C++ shared library build directory -# 3nd argument is absolute path to component SWIG build directory - -add_local_paths \ - @srcdir@ \ - @abs_builddir@ \ - @abs_builddir@ - -@GUILE@ -e main -c '(use-modules (gnuradio test-suite guile-test))' -t @srcdir@ diff --git a/gr-uhd/swig/run_tests.in b/gr-uhd/swig/run_tests.in deleted file mode 100644 index 195e71316..000000000 --- a/gr-uhd/swig/run_tests.in +++ /dev/null @@ -1,10 +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 - -@top_builddir@/run_tests.sh \ - @abs_top_srcdir@/gr-uhd \ - @abs_top_builddir@/gr-uhd \ - @srcdir@ diff --git a/gr-uhd/swig/uhd.test b/gr-uhd/swig/uhd.test deleted file mode 100644 index adc51c884..000000000 --- a/gr-uhd/swig/uhd.test +++ /dev/null @@ -1,37 +0,0 @@ -;;; -*- Scheme -*- -;;; -;;; Copyright 2010 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, see <http://www.gnu.org/licenses/>. -;;; - -;;; If you're using Emacs's Scheme mode: -;;; (put 'with-test-prefix 'scheme-indent-function 1) - -;;; See the comments in gnuradio/test-suite/lib.scm for info on writing tests. -;;; See also the very end of the file, where the test-equal, test-eqv -;;; and test-eq macros are defined. - -(define-module (test-module) - #:use-module (oop goops) - #:use-module (gnuradio core) - #:use-module (gnuradio test-suite lib) - #:duplicates (merge-generics replace check)) - -;;; Just see if we can import the module... -;;; They may not have a UHD device attached, powered up etc. - -(use-modules (gnuradio uhd)) diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index 729719dcb..513c1da7e 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010-2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -133,14 +133,4 @@ std::string get_version_string(void){ %} std::string get_version_string(void); -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-uhd_swig" "scm_init_gnuradio_uhd_swig_module") -%} - -%goops %{ -(use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif /* SWIGGUILE */ - #endif /* GR_HAVE_UHD */ diff --git a/gr-utils/.gitignore b/gr-utils/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-utils/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-utils/Makefile.am b/gr-utils/Makefile.am deleted file mode 100644 index ec9cd0296..000000000 --- a/gr-utils/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -# -# Copyright 2007 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. -# - -SUBDIRS = src diff --git a/gr-utils/src/.gitignore b/gr-utils/src/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-utils/src/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-utils/src/Makefile.am b/gr-utils/src/Makefile.am deleted file mode 100644 index b2847dce9..000000000 --- a/gr-utils/src/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright 2007 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. -# - -SUBDIRS = lib -if PYTHON -SUBDIRS += python -endif diff --git a/gr-utils/src/lib/.gitignore b/gr-utils/src/lib/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-utils/src/lib/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-utils/src/lib/Makefile.am b/gr-utils/src/lib/Makefile.am deleted file mode 100644 index 67f9dad59..000000000 --- a/gr-utils/src/lib/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -# -# Copyright 2007 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. -# diff --git a/gr-utils/src/python/.gitignore b/gr-utils/src/python/.gitignore deleted file mode 100644 index b6950912c..000000000 --- a/gr-utils/src/python/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -/*.pyc diff --git a/gr-utils/src/python/CMakeLists.txt b/gr-utils/src/python/CMakeLists.txt index fba0d57a5..90caeb234 100644 --- a/gr-utils/src/python/CMakeLists.txt +++ b/gr-utils/src/python/CMakeLists.txt @@ -25,6 +25,8 @@ include(GrPython) GR_PYTHON_INSTALL( FILES plot_data.py + plot_fft_base.py + plot_psd_base.py pyqt_plot.py pyqt_filter.py DESTINATION ${GR_PYTHON_DIR}/gnuradio @@ -34,20 +36,20 @@ GR_PYTHON_INSTALL( GR_PYTHON_INSTALL( PROGRAMS create-gnuradio-out-of-tree-project - gr_plot_char.py - gr_plot_const.py - gr_plot_fft.py - gr_plot_fft_c.py - gr_plot_fft_f.py - gr_plot_psd.py - gr_plot_psd_c.py - gr_plot_psd_f.py - gr_plot_float.py - gr_plot_int.py - gr_plot_iq.py - gr_plot_short.py - gr_plot_qt.py - gr_filter_design.py + gr_plot_char + gr_plot_const + gr_plot_fft + gr_plot_fft_c + gr_plot_fft_f + gr_plot_psd + gr_plot_psd_c + gr_plot_psd_f + gr_plot_float + gr_plot_int + gr_plot_iq + gr_plot_short + gr_plot_qt + gr_filter_design DESTINATION ${GR_RUNTIME_DIR} COMPONENT "utils" ) diff --git a/gr-utils/src/python/Makefile.am b/gr-utils/src/python/Makefile.am deleted file mode 100644 index 11fb038f6..000000000 --- a/gr-utils/src/python/Makefile.am +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright 2007,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 - -EXTRA_DIST += \ - $(bin_SCRIPTS) \ - README.plot \ - pyqt_plot.ui \ - pyqt_filter.ui - -ourpythondir = $(grpythondir) - -ourpython_PYTHON = \ - plot_data.py \ - pyqt_plot.py \ - pyqt_filter.py - -bin_SCRIPTS = \ - create-gnuradio-out-of-tree-project \ - gr_plot_char.py \ - gr_plot_const.py \ - gr_plot_fft.py \ - gr_plot_fft_c.py \ - gr_plot_fft_f.py \ - gr_plot_psd.py \ - gr_plot_psd_c.py \ - gr_plot_psd_f.py \ - gr_plot_float.py \ - gr_plot_int.py \ - gr_plot_iq.py \ - gr_plot_short.py \ - gr_plot_qt.py \ - gr_filter_design.py diff --git a/gr-utils/src/python/README.plot b/gr-utils/src/python/README.plot index 0c4657ba9..60f14c669 100644 --- a/gr-utils/src/python/README.plot +++ b/gr-utils/src/python/README.plot @@ -1,40 +1,97 @@ -* gr_plot_*.py: -These are a collection of Python scripts to enable viewing and analysis of files produced by GNU Radio flow graphs. Most of them work off complex data produced by digital waveforms. +* gr_plot_*: +These are a collection of Python scripts to enable viewing and +analysis of files produced by GNU Radio flow graphs. Most of them work +off complex data produced by digital waveforms. -** gr_plot_float.py: -Takes a GNU Radio floating point binary file and displays the samples versus time. You can set the block size to specify how many points to read in at a time and the start position in the file. +** gr_plot_float: +Takes a GNU Radio floating point binary file and displays the samples +versus time. You can set the block size to specify how many points to +read in at a time and the start position in the file. -By default, the system assumes a sample rate of 1, so in time, each sample is plotted versus the sample number. To set a true time axis, set the sample rate (-R or --sample-rate) to the sample rate used when capturing the samples. +By default, the system assumes a sample rate of 1, so in time, each +sample is plotted versus the sample number. To set a true time axis, +set the sample rate (-R or --sample-rate) to the sample rate used when +capturing the samples. -** gr_plot_iq.py: -Takes a GNU Radio complex binary file and displays the I&Q data versus time. You can set the block size to specify how many points to read in at a time and the start position in the file. +** gr_plot_iq: +Takes a GNU Radio complex binary file and displays the I&Q data versus +time. You can set the block size to specify how many points to read in +at a time and the start position in the file. -By default, the system assumes a sample rate of 1, so in time, each sample is plotted versus the sample number. To set a true time axis, set the sample rate (-R or --sample-rate) to the sample rate used when capturing the samples. +By default, the system assumes a sample rate of 1, so in time, each +sample is plotted versus the sample number. To set a true time axis, +set the sample rate (-R or --sample-rate) to the sample rate used when +capturing the samples. -** gr_plot_const.py: -Takes a GNU Radio complex binary file and displays the I&Q data versus time and the constellation plot (I vs. Q). You can set the block size to specify how many points to read in at a time and the start position in the file. +** gr_plot_const: +Takes a GNU Radio complex binary file and displays the I&Q data versus +time and the constellation plot (I vs. Q). You can set the block size +to specify how many points to read in at a time and the start position +in the file. -By default, the system assumes a sample rate of 1, so in time, each sample is plotted versus the sample number. To set a true time axis, set the sample rate (-R or --sample-rate) to the sample rate used when capturing the samples. +By default, the system assumes a sample rate of 1, so in time, each +sample is plotted versus the sample number. To set a true time axis, +set the sample rate (-R or --sample-rate) to the sample rate used when +capturing the samples. -** gr_plot_fft_c.py: -Takes a GNU Radio complex binary file and displays the I&Q data versus time as well as the frequency domain (FFT) plot. The y-axis values are plotted assuming volts as the amplitude of the I&Q streams and converted into dBm in the frequency domain (the 1/N power adjustment out of the FFT is performed internally). +** gr_plot_fft_c: +Takes a GNU Radio complex binary file and displays the I&Q data versus +time as well as the frequency domain (FFT) plot. The y-axis values are +plotted assuming volts as the amplitude of the I&Q streams and +converted into dBm in the frequency domain (the 1/N power adjustment +out of the FFT is performed internally). -The script plots a certain block of data at a time, specified on the command line as -B or --block. This value defaults to 1000. The start position in the file can be set by specifying -s or --start and defaults to 0 (the start of the file). +The script plots a certain block of data at a time, specified on the +command line as -B or --block. This value defaults to 1000. The start +position in the file can be set by specifying -s or --start and +defaults to 0 (the start of the file). -By default, the system assumes a sample rate of 1, so in time, each sample is plotted versus the sample number. To set a true time and frequency axis, set the sample rate (-R or --sample-rate) to the sample rate used when capturing the samples. +By default, the system assumes a sample rate of 1, so in time, each +sample is plotted versus the sample number. To set a true time and +frequency axis, set the sample rate (-R or --sample-rate) to the +sample rate used when capturing the samples. -** gr_plot_fft_f.py: -Takes a GNU Radio floating point binary file and displays the samples versus time as well as the frequency domain (FFT) plot. The y-axis values are plotted assuming volts as the amplitude of the I&Q streams and converted into dBm in the frequency domain (the 1/N power adjustment out of the FFT is performed internally). +** gr_plot_fft_f: +Takes a GNU Radio floating point binary file and displays the samples +versus time as well as the frequency domain (FFT) plot. The y-axis +values are plotted assuming volts as the amplitude of the I&Q streams +and converted into dBm in the frequency domain (the 1/N power +adjustment out of the FFT is performed internally). -The script plots a certain block of data at a time, specified on the command line as -B or --block. This value defaults to 1000. The start position in the file can be set by specifying -s or --start and defaults to 0 (the start of the file). +The script plots a certain block of data at a time, specified on the +command line as -B or --block. This value defaults to 1000. The start +position in the file can be set by specifying -s or --start and +defaults to 0 (the start of the file). -By default, the system assumes a sample rate of 1, so in time, each sample is plotted versus the sample number. To set a true time and frequency axis, set the sample rate (-R or --sample-rate) to the sample rate used when capturing the samples. +By default, the system assumes a sample rate of 1, so in time, each +sample is plotted versus the sample number. To set a true time and +frequency axis, set the sample rate (-R or --sample-rate) to the +sample rate used when capturing the samples. + + +** gr_plot_fft: +Takes a GNU Radio binary file (the datatype is specified using the -d +option and defaults to complex64) and displays the samples versus time +as well as the frequency domain (FFT) plot. The y-axis values are +plotted assuming volts as the amplitude of the I&Q streams and +converted into dBm in the frequency domain (the 1/N power adjustment +out of the FFT is performed internally). + +The script plots a certain block of data at a time, specified on the +command line as -B or --block. This value defaults to 1000. The start +position in the file can be set by specifying -s or --start and +defaults to 0 (the start of the file). + +By default, the system assumes a sample rate of 1, so in time, each +sample is plotted versus the sample number. To set a true time and +frequency axis, set the sample rate (-R or --sample-rate) to the +sample rate used when capturing the samples. diff --git a/gr-utils/src/python/gr_filter_design.py b/gr-utils/src/python/gr_filter_design index e8703db4f..cc21ea5e7 100755 --- a/gr-utils/src/python/gr_filter_design.py +++ b/gr-utils/src/python/gr_filter_design @@ -76,9 +76,9 @@ class gr_plot_filter(QtGui.QMainWindow): "High Pass", "Root Raised Cosine", "Gaussian") self.optFilters = ("Low Pass", "Band Pass", "Complex Band Pass", "Band Notch", "High Pass") - + self.set_windowed() - + # Initialize to LPF self.gui.filterTypeWidget.setCurrentWidget(self.gui.firlpfPage) @@ -211,19 +211,19 @@ class gr_plot_filter(QtGui.QMainWindow): self.gui.filterTypeWidget.setCurrentWidget(self.gui.gausPage) self.design() - + def changed_filter_design_type(self, design): if(design == "Equiripple"): self.set_equiripple() else: self.set_windowed() - + self.design() def set_equiripple(self): # Stop sending the signal for this function self.gui.filterTypeComboBox.blockSignals(True) - + self.equiripple = True self.gui.lpfPassBandRippleLabel.setVisible(True) self.gui.lpfPassBandRippleEdit.setVisible(True) @@ -252,11 +252,11 @@ class gr_plot_filter(QtGui.QMainWindow): # Tell gui its ok to start sending this signal again self.gui.filterTypeComboBox.blockSignals(False) - + def set_windowed(self): # Stop sending the signal for this function self.gui.filterTypeComboBox.blockSignals(True) - + self.equiripple = False self.gui.lpfPassBandRippleLabel.setVisible(False) self.gui.lpfPassBandRippleEdit.setVisible(False) @@ -332,7 +332,7 @@ class gr_plot_filter(QtGui.QMainWindow): if(ret): tb = sb - pb - + taps = gr.firdes.low_pass_2(gain, fs, pb, tb, atten, wintype) params = {"fs": fs, "gain": gain, "wintype": wintype, @@ -341,7 +341,7 @@ class gr_plot_filter(QtGui.QMainWindow): return (taps, params, ret) else: return ([], [], ret) - + def design_win_bpf(self, fs, gain, wintype): ret = True pb1,r = self.gui.startofBpfPassBandEdit.text().toDouble() @@ -417,7 +417,7 @@ class gr_plot_filter(QtGui.QMainWindow): if(r): tb = pb - sb taps = gr.firdes.high_pass_2(gain, fs, pb, tb, - atten, wintype) + atten, wintype) params = {"fs": fs, "gain": gain, "wintype": wintype, "filttype": "hpf", "sbend": sb, "pbstart": pb, "atten": atten, "ntaps": len(taps)} @@ -490,7 +490,7 @@ class gr_plot_filter(QtGui.QMainWindow): return (taps, params, ret) else: return ([], [], ret) - + def design_opt_bpf(self, fs, gain): ret = True pb1,r = self.gui.startofBpfPassBandEdit.text().toDouble() @@ -631,15 +631,15 @@ class gr_plot_filter(QtGui.QMainWindow): self.update_phase_curves() if(tab == 3): self.update_group_curves() - + def get_fft(self, fs, taps, Npts): Ts = 1.0/fs fftpts = fftpack.fft(taps, Npts) - self.freq = scipy.arange(0, fs, 1.0/(Npts*Ts)) + self.freq = scipy.arange(0, fs, 1.0/(Npts*Ts)) self.fftdB = 20.0*scipy.log10(abs(fftpts)) self.fftDeg = scipy.unwrap(scipy.angle(fftpts)) self.groupDelay = -scipy.diff(self.fftDeg) - + def update_time_curves(self): ntaps = len(self.taps) if(ntaps > 0): @@ -656,17 +656,17 @@ class gr_plot_filter(QtGui.QMainWindow): 0, ntaps) self.gui.timePlot.setAxisScale(self.gui.timePlot.yLeft, ymin, ymax) - + # Set the zoomer base to unzoom to the new axis self.timeZoomer.setZoomBase() - + self.gui.timePlot.replot() - + def update_freq_curves(self): npts = len(self.fftdB) if(npts > 0): self.freqcurve.setData(self.freq, self.fftdB) - + # Reset the x-axis to the new time scale ymax = 1.5 * max(self.fftdB[0:npts/2]) ymin = 1.1 * min(self.fftdB[0:npts/2]) @@ -676,10 +676,10 @@ class gr_plot_filter(QtGui.QMainWindow): xmin, xmax) self.gui.freqPlot.setAxisScale(self.gui.freqPlot.yLeft, ymin, ymax) - + # Set the zoomer base to unzoom to the new axis self.freqZoomer.setZoomBase() - + self.gui.freqPlot.replot() @@ -687,7 +687,7 @@ class gr_plot_filter(QtGui.QMainWindow): npts = len(self.fftDeg) if(npts > 0): self.phasecurve.setData(self.freq, self.fftDeg) - + # Reset the x-axis to the new time scale ymax = 1.5 * max(self.fftDeg[0:npts/2]) ymin = 1.1 * min(self.fftDeg[0:npts/2]) @@ -697,17 +697,17 @@ class gr_plot_filter(QtGui.QMainWindow): xmin, xmax) self.gui.phasePlot.setAxisScale(self.gui.phasePlot.yLeft, ymin, ymax) - + # Set the zoomer base to unzoom to the new axis self.phaseZoomer.setZoomBase() - + self.gui.phasePlot.replot() def update_group_curves(self): npts = len(self.groupDelay) if(npts > 0): self.groupcurve.setData(self.freq, self.groupDelay) - + # Reset the x-axis to the new time scale ymax = 1.5 * max(self.groupDelay[0:npts/2]) ymin = 1.1 * min(self.groupDelay[0:npts/2]) @@ -717,10 +717,10 @@ class gr_plot_filter(QtGui.QMainWindow): xmin, xmax) self.gui.groupPlot.setAxisScale(self.gui.groupPlot.yLeft, ymin, ymax) - + # Set the zoomer base to unzoom to the new axis self.groupZoomer.setZoomBase() - + self.gui.groupPlot.replot() def action_save_dialog(self): @@ -732,7 +732,7 @@ class gr_plot_filter(QtGui.QMainWindow): ("Could not save to file: %s" % filename), "&Ok") return - + csvhandle = csv.writer(handle, delimiter=",") for k in self.params.keys(): csvhandle.writerow([k, self.params[k]]) @@ -743,7 +743,7 @@ class gr_plot_filter(QtGui.QMainWindow): filename = QtGui.QFileDialog.getOpenFileName(self, "Open CSV Filter File", ".", "") if(len(filename) == 0): return - + try: handle = open(filename, "rb") except IOError: @@ -849,9 +849,9 @@ class gr_plot_filter(QtGui.QMainWindow): self.update_freq_curves() self.update_phase_curves() self.update_group_curves() - + self.gui.nTapsEdit.setText(Qt.QString("%1").arg(self.taps.size)) - + def setup_options(): usage="%prog: [options] (input_filename)" diff --git a/gr-utils/src/python/gr_plot_char.py b/gr-utils/src/python/gr_plot_char index 87a323c9c..a2b93a63c 100755 --- a/gr-utils/src/python/gr_plot_char.py +++ b/gr-utils/src/python/gr_plot_char @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2007,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. -# +# try: import scipy @@ -40,7 +40,7 @@ def main(): help="Specify where to start in the file [default=%default]") parser.add_option("-R", "--sample-rate", type="float", default=1.0, help="Set the sampler rate of the data [default=%default]") - + (options, args) = parser.parse_args () if len(args) < 1: parser.print_help() @@ -55,4 +55,4 @@ if __name__ == "__main__": main() except KeyboardInterrupt: pass - + diff --git a/gr-utils/src/python/gr_plot_const.py b/gr-utils/src/python/gr_plot_const index 8873e5b7e..749ad035b 100755 --- a/gr-utils/src/python/gr_plot_const.py +++ b/gr-utils/src/python/gr_plot_const @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2007,2008,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# try: import scipy @@ -53,11 +53,11 @@ class draw_constellation: self.fig = figure(1, figsize=(16, 9), facecolor='w') rcParams['xtick.labelsize'] = self.axis_font_size rcParams['ytick.labelsize'] = self.axis_font_size - + self.text_file = figtext(0.10, 0.95, ("File: %s" % filename), weight="heavy", size=16) self.text_file_pos = figtext(0.10, 0.90, "File Position: ", weight="heavy", size=16) self.text_block = figtext(0.40, 0.90, ("Block Size: %d" % self.block_length), - weight="heavy", size=16) + weight="heavy", size=16) self.text_sr = figtext(0.60, 0.90, ("Sample Rate: %.2f" % self.sample_rate), weight="heavy", size=16) self.make_plots() @@ -90,7 +90,7 @@ class draw_constellation: if(len(iq) > 0): self.reals = scipy.array([r.real for r in iq]) self.imags = scipy.array([i.imag for i in iq]) - + self.time = scipy.array([i*(1/self.sample_rate) for i in range(len(self.reals))]) return True else: @@ -102,7 +102,7 @@ class draw_constellation: self.hfile.seek(self.sizeof_data*self.start, 1) r = self.get_data() - + # Subplot for real and imaginary parts of signal self.sp_iq = self.fig.add_subplot(2,1,1, position=[0.075, 0.2, 0.4, 0.6]) self.sp_iq.set_title(("I&Q"), fontsize=self.title_font_size, fontweight="bold") @@ -141,7 +141,7 @@ class draw_constellation: self.plot_const[0].set_data([self.reals, self.imags]) self.sp_const.axis([-2, 2, -2, 2]) draw() - + def zoom(self, event): newxlim = scipy.array(self.sp_iq.get_xlim()) curxlim = scipy.array(self.xlim) @@ -163,7 +163,7 @@ class draw_constellation: if(find(event.key, forward_valid_keys)): self.step_forward() - + elif(find(event.key, backward_valid_keys)): self.step_backward() @@ -195,16 +195,16 @@ class draw_constellation: r = self.get_data() if(r): self.update_plots() - - + + def mouse_button_callback(self, event): x, y = event.xdata, event.ydata - + if x is not None and y is not None: if(event.inaxes == self.sp_iq): self.indx = searchsorted(self.time, [x]) self.set_trace(self.indx) - + def set_trace(self, indx): self.plot_iq[2].set_data(self.time[indx], self.reals[indx]) @@ -212,13 +212,13 @@ class draw_constellation: self.plot_const[1].set_data(self.reals[indx], self.imags[indx]) draw() - + def find(item_in, list_search): try: return list_search.index(item_in) != None except ValueError: return False - + def main(): usage="%prog: [options] input_filename" @@ -231,7 +231,7 @@ def main(): help="Specify where to start in the file [default=%default]") parser.add_option("-R", "--sample-rate", type="float", default=1.0, help="Set the sampler rate of the data [default=%default]") - + (options, args) = parser.parse_args () if len(args) != 1: parser.print_help() @@ -245,6 +245,6 @@ if __name__ == "__main__": main() except KeyboardInterrupt: pass - + diff --git a/gr-utils/src/python/gr_plot_fft b/gr-utils/src/python/gr_plot_fft new file mode 100644 index 000000000..434348164 --- /dev/null +++ b/gr-utils/src/python/gr_plot_fft @@ -0,0 +1,42 @@ +#!/usr/bin/env python +# +# Copyright 2012 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +from gnuradio.plot_fft_base import plot_fft_base + +# This is a wrapper program for plot_fft_base. It handles any data +# type and defaults to complex64. + +def main(): + parser = plot_fft_base.setup_options() + (options, args) = parser.parse_args () + if len(args) != 1: + parser.print_help() + raise SystemExit, 1 + filename = args[0] + + dc = plot_fft_base(options.data_type, filename, options) + +if __name__ == "__main__": + try: + main() + except KeyboardInterrupt: + pass diff --git a/gr-utils/src/python/gr_plot_fft_f.py b/gr-utils/src/python/gr_plot_fft_c index f50358f01..43e808d95 100755 --- a/gr-utils/src/python/gr_plot_fft_f.py +++ b/gr-utils/src/python/gr_plot_fft_c @@ -1,44 +1,46 @@ #!/usr/bin/env python # # Copyright 2007,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. -# +# + +from gnuradio.plot_fft_base import plot_fft_base -import gr_plot_fft +# This is a wrapper program for plot_fft_base specifically for complex data def main(): - parser = gr_plot_fft.setup_options() + parser = plot_fft_base.setup_options() parser.remove_option("--data-type") - + (options, args) = parser.parse_args () if len(args) != 1: parser.print_help() raise SystemExit, 1 filename = args[0] - dc = gr_plot_fft.gr_plot_fft("float32", filename, options) + dc = plot_fft_base("complex64", filename, options) if __name__ == "__main__": try: main() except KeyboardInterrupt: pass - + diff --git a/gr-utils/src/python/gr_plot_fft_c.py b/gr-utils/src/python/gr_plot_fft_f index de59b36c9..dee9b17de 100755 --- a/gr-utils/src/python/gr_plot_fft_c.py +++ b/gr-utils/src/python/gr_plot_fft_f @@ -1,44 +1,46 @@ #!/usr/bin/env python # # Copyright 2007,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. -# +# + +from gnuradio.plot_fft_base import plot_fft_base -import gr_plot_fft +# This is a wrapper program for plot_fft_base specifically for float data def main(): - parser = gr_plot_fft.setup_options() + parser = plot_fft_base.setup_options() parser.remove_option("--data-type") - + (options, args) = parser.parse_args () if len(args) != 1: parser.print_help() raise SystemExit, 1 filename = args[0] - dc = gr_plot_fft.gr_plot_fft("complex64", filename, options) + dc = plot_fft_base("float32", filename, options) if __name__ == "__main__": try: main() except KeyboardInterrupt: pass - + diff --git a/gr-utils/src/python/gr_plot_float.py b/gr-utils/src/python/gr_plot_float index e5c22a315..22806e48a 100755 --- a/gr-utils/src/python/gr_plot_float.py +++ b/gr-utils/src/python/gr_plot_float @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2007,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. -# +# try: import scipy @@ -40,7 +40,7 @@ def main(): help="Specify where to start in the file [default=%default]") parser.add_option("-R", "--sample-rate", type="float", default=1.0, help="Set the sampler rate of the data [default=%default]") - + (options, args) = parser.parse_args () if len(args) < 1: parser.print_help() @@ -55,4 +55,4 @@ if __name__ == "__main__": main() except KeyboardInterrupt: pass - + diff --git a/gr-utils/src/python/gr_plot_int.py b/gr-utils/src/python/gr_plot_int index b44d4360a..355ddf018 100755 --- a/gr-utils/src/python/gr_plot_int.py +++ b/gr-utils/src/python/gr_plot_int @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2007,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. -# +# try: import scipy @@ -40,7 +40,7 @@ def main(): help="Specify where to start in the file [default=%default]") parser.add_option("-R", "--sample-rate", type="float", default=1.0, help="Set the sampler rate of the data [default=%default]") - + (options, args) = parser.parse_args () if len(args) < 1: parser.print_help() @@ -55,4 +55,4 @@ if __name__ == "__main__": main() except KeyboardInterrupt: pass - + diff --git a/gr-utils/src/python/gr_plot_iq.py b/gr-utils/src/python/gr_plot_iq index 316e60a75..bf8077b6b 100755 --- a/gr-utils/src/python/gr_plot_iq.py +++ b/gr-utils/src/python/gr_plot_iq @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2007,2008,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# try: import scipy @@ -53,7 +53,7 @@ class draw_iq: self.fig = figure(1, figsize=(16, 9), facecolor='w') rcParams['xtick.labelsize'] = self.axis_font_size rcParams['ytick.labelsize'] = self.axis_font_size - + self.text_file = figtext(0.10, 0.94, ("File: %s" % filename), weight="heavy", size=self.text_size) self.text_file_pos = figtext(0.10, 0.88, "File Position: ", weight="heavy", size=self.text_size) self.text_block = figtext(0.40, 0.88, ("Block Size: %d" % self.block_length), @@ -86,13 +86,13 @@ class draw_iq: self.reals = scipy.array([r.real for r in self.iq]) self.imags = scipy.array([i.imag for i in self.iq]) self.time = scipy.array([i*(1/self.sample_rate) for i in range(len(self.reals))]) - + def make_plots(self): # if specified on the command-line, set file pointer self.hfile.seek(self.sizeof_data*self.start, 1) self.get_data() - + # Subplot for real and imaginary parts of signal self.sp_iq = self.fig.add_subplot(2,1,1, position=[0.075, 0.14, 0.85, 0.67]) self.sp_iq.set_title(("I&Q"), fontsize=self.title_font_size, fontweight="bold") @@ -111,14 +111,14 @@ class draw_iq: 1.5*max([self.reals.max(), self.imags.max()])]) self.sp_iq.set_xlim(self.time.min(), self.time.max()) draw() - + def click(self, event): forward_valid_keys = [" ", "down", "right"] backward_valid_keys = ["up", "left"] if(find(event.key, forward_valid_keys)): self.step_forward() - + elif(find(event.key, backward_valid_keys)): self.step_backward() @@ -140,14 +140,14 @@ class draw_iq: self.hfile.seek(-self.hfile.tell(),1) self.get_data() self.update_plots() - + def find(item_in, list_search): try: return list_search.index(item_in) != None except ValueError: return False - + def main(): usage="%prog: [options] input_filename" description = "Takes a GNU Radio complex binary file and displays the I&Q data versus time. You can set the block size to specify how many points to read in at a time and the start position in the file. By default, the system assumes a sample rate of 1, so in time, each sample is plotted versus the sample number. To set a true time axis, set the sample rate (-R or --sample-rate) to the sample rate used when capturing the samples." @@ -159,7 +159,7 @@ def main(): help="Specify where to start in the file [default=%default]") parser.add_option("-R", "--sample-rate", type="float", default=1.0, help="Set the sampler rate of the data [default=%default]") - + (options, args) = parser.parse_args () if len(args) != 1: parser.print_help() @@ -173,6 +173,6 @@ if __name__ == "__main__": main() except KeyboardInterrupt: pass - + diff --git a/gr-utils/src/python/gr_plot_psd b/gr-utils/src/python/gr_plot_psd new file mode 100644 index 000000000..059ca6b64 --- /dev/null +++ b/gr-utils/src/python/gr_plot_psd @@ -0,0 +1,42 @@ +#!/usr/bin/env python +# +# Copyright 2012 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +from gnuradio.plot_psd_base import plot_psd_base + +# This is a wrapper program for plot_psd_base. It handles any data +# type and defaults to complex64. + +def main(): + parser = plot_psd_base.setup_options() + (options, args) = parser.parse_args () + if len(args) != 1: + parser.print_help() + raise SystemExit, 1 + filename = args[0] + + dc = plot_psd_base(options.data_type, filename, options) + +if __name__ == "__main__": + try: + main() + except KeyboardInterrupt: + pass diff --git a/gr-utils/src/python/gr_plot_psd_c.py b/gr-utils/src/python/gr_plot_psd_c index 1edc04c2b..fff2bff0f 100755 --- a/gr-utils/src/python/gr_plot_psd_c.py +++ b/gr-utils/src/python/gr_plot_psd_c @@ -1,32 +1,32 @@ #!/usr/bin/env python # # 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. -# +# from optparse import OptionParser -import gr_plot_psd +from gnuradio.plot_psd_base import plot_psd_base -# This is a wrapper program for gr_plot_psd specifically for complex data +# This is a wrapper program for plot_psd_base specifically for complex data def main(): - parser = gr_plot_psd.setup_options() + parser = plot_psd_base.setup_options() parser.remove_option("--data-type") (options, args) = parser.parse_args () @@ -35,13 +35,13 @@ def main(): raise SystemExit, 1 filename = args[0] - dc = gr_plot_psd.gr_plot_psd("complex64", filename, options) + dc = plot_psd_base("complex64", filename, options) if __name__ == "__main__": try: main() except KeyboardInterrupt: pass - + diff --git a/gr-utils/src/python/gr_plot_psd_f.py b/gr-utils/src/python/gr_plot_psd_f index bad6788c3..ec6799479 100755 --- a/gr-utils/src/python/gr_plot_psd_f.py +++ b/gr-utils/src/python/gr_plot_psd_f @@ -1,32 +1,32 @@ #!/usr/bin/env python # # 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. -# +# from optparse import OptionParser -import gr_plot_psd +from gnuradio.plot_psd_base import plot_psd_base # This is a wrapper program for gr_plot_psd specifically for floating point data def main(): - parser = gr_plot_psd.setup_options() + parser = plot_psd_base.setup_options() parser.remove_option("--data-type") (options, args) = parser.parse_args () @@ -35,13 +35,13 @@ def main(): raise SystemExit, 1 filename = args[0] - dc = gr_plot_psd.gr_plot_psd("float32", filename, options) + dc = plot_psd_base("float32", filename, options) if __name__ == "__main__": try: main() except KeyboardInterrupt: pass - + diff --git a/gr-utils/src/python/gr_plot_qt.py b/gr-utils/src/python/gr_plot_qt index f3dc472f5..153359f0c 100755 --- a/gr-utils/src/python/gr_plot_qt.py +++ b/gr-utils/src/python/gr_plot_qt @@ -28,7 +28,7 @@ except ImportError: try: # FIXME: reenable this before committing #from gnuradio.pyqt_plot import Ui_MainWindow - from pyqt_plot import Ui_MainWindow + from gnuradio.pyqt_plot import Ui_MainWindow except ImportError: print "Could not import from pyqt_plot. Please build with \"pyuic4 pyqt_plot.ui -o pyqt_plot.py\"" raise SystemExit, 1 @@ -55,12 +55,12 @@ class SpectrogramData(Qwt.QwtRasterData): def rasterHint(self, rect): return Qt.QSize(self.sp.shape[0], self.sp.shape[1]) - + def copy(self): return self def range(self): - + return Qwt.QwtDoubleInterval(self.sp.min(), self.sp.max()) def value(self, x, y): @@ -77,7 +77,7 @@ class gr_plot_qt(QtGui.QMainWindow): QtGui.QWidget.__init__(self, parent) self.gui = Ui_MainWindow() self.gui.setupUi(self) - + self.filename = None self.block_length = options.block_length self.start = options.start @@ -127,8 +127,8 @@ class gr_plot_qt(QtGui.QMainWindow): self.connect(self.gui.colorComboBox, Qt.SIGNAL("activated (const QString&)"), self.colorComboBoxEdit) - - + + # Set up line style combo box self.line_styles = {"None" : Qwt.QwtSymbol.NoSymbol, "Circle" : Qwt.QwtSymbol.Ellipse, @@ -290,7 +290,7 @@ class gr_plot_qt(QtGui.QMainWindow): def reload_file(self): if(self.filename): self.initialize(self.filename) - + def initialize(self, filename): self.filename = filename self.hfile = open(filename, "r") @@ -308,7 +308,7 @@ class gr_plot_qt(QtGui.QMainWindow): self.init_data_input() self.get_data(self.cur_start, self.cur_stop) self.get_psd() - self.get_specgram() + self.get_specgram() self.gui.plotHBar.setSliderPosition(0) self.gui.plotHBar.setMaximum(self.signal_size-self.block_length) @@ -322,7 +322,7 @@ class gr_plot_qt(QtGui.QMainWindow): self.signal_size = self.hfile.tell()/self.sizeof_data #print "Sizeof File: ", self.signal_size self.hfile.seek(0, os.SEEK_SET) - + def get_data(self, start, end): if(end > start): self.hfile.seek(start*self.sizeof_data, os.SEEK_SET) @@ -365,7 +365,7 @@ class gr_plot_qt(QtGui.QMainWindow): noverlap=self.specfftsize/4.0, window=winpoints, scale_by_freq=False) - + self.iq_spec = 10.0*scipy.log10(abs(iq_spec)) self.spec_f = f self.spec_t = t @@ -379,7 +379,7 @@ class gr_plot_qt(QtGui.QMainWindow): self.specfftsize = fftSize.toInt()[0] self.get_specgram() self.update_specgram_curves() - + def colorComboBoxEdit(self, colorSelection): colorstr = str(colorSelection.toAscii()) color_func = self.color_modes[colorstr] @@ -443,7 +443,7 @@ class gr_plot_qt(QtGui.QMainWindow): tend = self.cur_stop / self.sample_rate self.gui.fileTimeStartLineEdit.setText(Qt.QString("%1").arg(tstart)) self.gui.fileTimeStopLineEdit.setText(Qt.QString("%1").arg(tend)) - + self.get_data(self.cur_start, self.cur_stop) self.update_time_curves() @@ -456,7 +456,7 @@ class gr_plot_qt(QtGui.QMainWindow): self.set_file_pos_box(self.cur_start, self.cur_stop) except AttributeError: pass - + def file_time_changed(self): tstart = self.gui.fileTimeStartLineEdit.text().toDouble() @@ -548,16 +548,16 @@ class gr_plot_qt(QtGui.QMainWindow): # Set the zoomer base to unzoom to the new axis self.timeZoomer.setZoomBase() - + self.gui.timePlot.replot() - + def update_psd_curves(self): self.psdcurve.setData(self.freq, self.iq_psd) self.gui.freqPlot.setAxisScale(self.gui.freqPlot.xBottom, min(self.freq), max(self.freq)) - + # Set the zoomer base to unzoom to the new axis self.freqZoomer.setZoomBase() @@ -579,10 +579,10 @@ class gr_plot_qt(QtGui.QMainWindow): self.gui.specPlot.setAxisScale(self.gui.specPlot.yLeft, min(self.spec_t), max(self.spec_t)) - self.gui.specPlot.setAxisScale(self.gui.specPlot.yRight, + self.gui.specPlot.setAxisScale(self.gui.specPlot.yRight, self.iq_spec.min(), self.iq_spec.max()) - + # Set the zoomer base to unzoom to the new axis self.specZoomer.setZoomBase() @@ -604,7 +604,7 @@ class gr_plot_qt(QtGui.QMainWindow): self.rcurve.setSymbol(self.rsym) self.icurve.setSymbol(self.isym) self.gui.timePlot.replot() - + def color_black_on_white(self): blue = QtGui.qRgb(0x00, 0x00, 0xFF) red = QtGui.qRgb(0xFF, 0x00, 0x00) @@ -636,7 +636,7 @@ class gr_plot_qt(QtGui.QMainWindow): whiteBrush = Qt.QBrush(Qt.QColor("white")) whiteBrush = Qt.QBrush(Qt.QColor(white)) redBrush = Qt.QBrush(Qt.QColor(red)) - + self.gui.timePlot.setCanvasBackground(QtGui.QColor("black")) self.gui.freqPlot.setCanvasBackground(QtGui.QColor("black")) self.timeZoomer.setTrackerPen(Qt.QPen(whiteBrush, self.pen_width)) @@ -658,7 +658,7 @@ class gr_plot_qt(QtGui.QMainWindow): whiteBrush = Qt.QBrush(Qt.QColor("white")) greenBrush = Qt.QBrush(Qt.QColor(green)) redBrush = Qt.QBrush(Qt.QColor(red)) - + self.gui.timePlot.setCanvasBackground(QtGui.QColor("black")) self.gui.freqPlot.setCanvasBackground(QtGui.QColor("black")) self.timeZoomer.setTrackerPen(Qt.QPen(whiteBrush, self.pen_width)) @@ -679,7 +679,7 @@ class gr_plot_qt(QtGui.QMainWindow): whiteBrush = Qt.QBrush(Qt.QColor("white")) blueBrush = Qt.QBrush(Qt.QColor(blue)) redBrush = Qt.QBrush(Qt.QColor(red)) - + self.gui.timePlot.setCanvasBackground(QtGui.QColor("black")) self.gui.freqPlot.setCanvasBackground(QtGui.QColor("black")) self.timeZoomer.setTrackerPen(Qt.QPen(whiteBrush, self.pen_width)) diff --git a/gr-utils/src/python/gr_plot_short.py b/gr-utils/src/python/gr_plot_short index 3466e0b7d..702a2a94a 100755 --- a/gr-utils/src/python/gr_plot_short.py +++ b/gr-utils/src/python/gr_plot_short @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2007,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. -# +# try: import scipy @@ -40,7 +40,7 @@ def main(): help="Specify where to start in the file [default=%default]") parser.add_option("-R", "--sample-rate", type="float", default=1.0, help="Set the sampler rate of the data [default=%default]") - + (options, args) = parser.parse_args () if len(args) < 1: parser.print_help() @@ -55,4 +55,4 @@ if __name__ == "__main__": main() except KeyboardInterrupt: pass - + diff --git a/gr-utils/src/python/plot_data.py b/gr-utils/src/python/plot_data.py index 15012e589..242ca2a4b 100644 --- a/gr-utils/src/python/plot_data.py +++ b/gr-utils/src/python/plot_data.py @@ -1,23 +1,23 @@ # # Copyright 2007,2008,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# try: import scipy @@ -57,7 +57,7 @@ class plot_data: self.fig = figure(1, figsize=(16, 9), facecolor='w') rcParams['xtick.labelsize'] = self.axis_font_size rcParams['ytick.labelsize'] = self.axis_font_size - + self.text_file_pos = figtext(0.10, 0.88, "File Position: ", weight="heavy", size=self.text_size) self.text_block = figtext(0.40, 0.88, ("Block Size: %d" % self.block_length), weight="heavy", size=self.text_size) @@ -78,7 +78,7 @@ class plot_data: self.manager = get_current_fig_manager() connect('key_press_event', self.click) show() - + def get_data(self, hfile): self.text_file_pos.set_text("File Position: %d" % (hfile.tell()//self.sizeof_data)) try: @@ -88,7 +88,7 @@ class plot_data: else: self.f = scipy.array(f) self.time = scipy.array([i*(1/self.sample_rate) for i in range(len(self.f))]) - + def make_plots(self): self.sp_f = self.fig.add_subplot(2,1,1, position=[0.075, 0.2, 0.875, 0.6]) self.sp_f.set_title(("Amplitude"), fontsize=self.title_font_size, fontweight="bold") @@ -104,7 +104,7 @@ class plot_data: hf.seek(self.sizeof_data*self.start, 1) self.get_data(hf) - + # Subplot for real and imaginary parts of signal self.plot_f += plot(self.time, self.f, 'o-') maxval = max(maxval, self.f.max()) @@ -126,16 +126,16 @@ class plot_data: minval = min(minval, self.f.min()) self.sp_f.set_ylim([1.5*minval, 1.5*maxval]) - + draw() - + def click(self, event): forward_valid_keys = [" ", "down", "right"] backward_valid_keys = ["up", "left"] if(find(event.key, forward_valid_keys)): self.step_forward() - + elif(find(event.key, backward_valid_keys)): self.step_backward() @@ -156,7 +156,7 @@ class plot_data: else: hf.seek(-hf.tell(),1) self.update_plots() - + def find(item_in, list_search): try: diff --git a/gr-utils/src/python/gr_plot_fft.py b/gr-utils/src/python/plot_fft_base.py index ba3901e03..4afdc3a36 100755 --- a/gr-utils/src/python/gr_plot_fft.py +++ b/gr-utils/src/python/plot_fft_base.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2007,2008,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# try: import scipy @@ -35,7 +35,7 @@ except ImportError: from optparse import OptionParser -class gr_plot_fft: +class plot_fft_base: def __init__(self, datatype, filename, options): self.hfile = open(filename, "r") self.block_length = options.block @@ -54,7 +54,7 @@ class gr_plot_fft: self.fig = figure(1, figsize=(16, 12), facecolor='w') rcParams['xtick.labelsize'] = self.axis_font_size rcParams['ytick.labelsize'] = self.axis_font_size - + self.text_file = figtext(0.10, 0.94, ("File: %s" % filename), weight="heavy", size=self.text_size) self.text_file_pos = figtext(0.10, 0.88, "File Position: ", weight="heavy", size=self.text_size) self.text_block = figtext(0.35, 0.88, ("Block Size: %d" % self.block_length), @@ -77,7 +77,7 @@ class gr_plot_fft: connect('draw_event', self.zoom) connect('key_press_event', self.click) show() - + def get_data(self): self.position = self.hfile.tell()/self.sizeof_data self.text_file_pos.set_text("File Position: %d" % (self.position)) @@ -87,7 +87,7 @@ class gr_plot_fft: print "End of File" else: self.iq_fft = self.dofft(self.iq) - + tstep = 1.0 / self.sample_rate #self.time = scipy.array([tstep*(self.position + i) for i in xrange(len(self.iq))]) self.time = scipy.array([tstep*(i) for i in xrange(len(self.iq))]) @@ -96,7 +96,7 @@ class gr_plot_fft: def dofft(self, iq): N = len(iq) - iq_fft = fftpack.fftshift(scipy.fft(iq)) # fft and shift axis + iq_fft = scipy.fftpack.fftshift(scipy.fft(iq)) # fft and shift axis iq_fft = 20*scipy.log10(abs((iq_fft+1e-15)/N)) # convert to decibels, adjust power # adding 1e-15 (-300 dB) to protect against value errors if an item in iq_fft is 0 return iq_fft @@ -107,7 +107,7 @@ class gr_plot_fft: Fn = 0.5 * sample_rate freq = scipy.array([-Fn + i*Fs for i in xrange(N)]) return freq - + def make_plots(self): # if specified on the command-line, set file pointer self.hfile.seek(self.sizeof_data*self.start, 1) @@ -125,7 +125,7 @@ class gr_plot_fft: self.sp_fft.set_ylabel("Power Spectrum (dBm)", fontsize=self.label_font_size, fontweight="bold") self.get_data() - + self.plot_iq = self.sp_iq.plot([], 'bo-') # make plot for reals self.plot_iq += self.sp_iq.plot([], 'ro-') # make plot for imags self.draw_time() # draw the plot @@ -155,7 +155,7 @@ class gr_plot_fft: self.xlim = self.sp_iq.get_xlim() draw() - + def zoom(self, event): newxlim = scipy.array(self.sp_iq.get_xlim()) curxlim = scipy.array(self.xlim) @@ -168,10 +168,10 @@ class gr_plot_fft: iq = self.iq[xmin : xmax] time = self.time[xmin : xmax] - + iq_fft = self.dofft(iq) freq = self.calc_freq(time, self.sample_rate) - + self.plot_fft[0].set_data(freq, iq_fft) self.sp_fft.axis([freq.min(), freq.max(), iq_fft.min()-10, iq_fft.max()+10]) @@ -184,7 +184,7 @@ class gr_plot_fft: if(find(event.key, forward_valid_keys)): self.step_forward() - + elif(find(event.key, backward_valid_keys)): self.step_backward() @@ -206,43 +206,44 @@ class gr_plot_fft: self.hfile.seek(-self.hfile.tell(),1) self.get_data() self.update_plots() - + + @staticmethod + def setup_options(): + usage="%prog: [options] input_filename" + description = "Takes a GNU Radio complex binary file and displays the I&Q data versus time as well as the frequency domain (FFT) plot. The y-axis values are plotted assuming volts as the amplitude of the I&Q streams and converted into dBm in the frequency domain (the 1/N power adjustment out of the FFT is performed internally). The script plots a certain block of data at a time, specified on the command line as -B or --block. This value defaults to 1000. The start position in the file can be set by specifying -s or --start and defaults to 0 (the start of the file). By default, the system assumes a sample rate of 1, so in time, each sample is plotted versus the sample number. To set a true time and frequency axis, set the sample rate (-R or --sample-rate) to the sample rate used when capturing the samples." + + parser = OptionParser(conflict_handler="resolve", usage=usage, description=description) + parser.add_option("-d", "--data-type", type="string", default="complex64", + help="Specify the data type (complex64, float32, (u)int32, (u)int16, (u)int8) [default=%default]") + parser.add_option("-B", "--block", type="int", default=1000, + help="Specify the block size [default=%default]") + parser.add_option("-s", "--start", type="int", default=0, + help="Specify where to start in the file [default=%default]") + parser.add_option("-R", "--sample-rate", type="float", default=1.0, + help="Set the sampler rate of the data [default=%default]") + return parser + def find(item_in, list_search): try: return list_search.index(item_in) != None except ValueError: return False -def setup_options(): - usage="%prog: [options] input_filename" - description = "Takes a GNU Radio complex binary file and displays the I&Q data versus time as well as the frequency domain (FFT) plot. The y-axis values are plotted assuming volts as the amplitude of the I&Q streams and converted into dBm in the frequency domain (the 1/N power adjustment out of the FFT is performed internally). The script plots a certain block of data at a time, specified on the command line as -B or --block. This value defaults to 1000. The start position in the file can be set by specifying -s or --start and defaults to 0 (the start of the file). By default, the system assumes a sample rate of 1, so in time, each sample is plotted versus the sample number. To set a true time and frequency axis, set the sample rate (-R or --sample-rate) to the sample rate used when capturing the samples." - - parser = OptionParser(conflict_handler="resolve", usage=usage, description=description) - parser.add_option("-d", "--data-type", type="string", default="complex64", - help="Specify the data type (complex64, float32, (u)int32, (u)int16, (u)int8) [default=%default]") - parser.add_option("-B", "--block", type="int", default=1000, - help="Specify the block size [default=%default]") - parser.add_option("-s", "--start", type="int", default=0, - help="Specify where to start in the file [default=%default]") - parser.add_option("-R", "--sample-rate", type="float", default=1.0, - help="Set the sampler rate of the data [default=%default]") - return parser - def main(): - parser = setup_options() + parser = plot_fft_base.setup_options() (options, args) = parser.parse_args () if len(args) != 1: parser.print_help() raise SystemExit, 1 filename = args[0] - dc = gr_plot_fft(options.data_type, filename, options) + dc = plot_fft_base(options.data_type, filename, options) if __name__ == "__main__": try: main() except KeyboardInterrupt: pass - + diff --git a/gr-utils/src/python/gr_plot_psd.py b/gr-utils/src/python/plot_psd_base.py index 3dab0535a..fe3c9e12b 100755 --- a/gr-utils/src/python/gr_plot_psd.py +++ b/gr-utils/src/python/plot_psd_base.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2007,2008,2010,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# try: import scipy @@ -37,7 +37,7 @@ from optparse import OptionParser from scipy import log10 from gnuradio.eng_option import eng_option -class gr_plot_psd: +class plot_psd_base: def __init__(self, datatype, filename, options): self.hfile = open(filename, "r") self.block_length = options.block @@ -60,7 +60,7 @@ class gr_plot_psd: self.fig = figure(1, figsize=(16, 12), facecolor='w') rcParams['xtick.labelsize'] = self.axis_font_size rcParams['ytick.labelsize'] = self.axis_font_size - + self.text_file = figtext(0.10, 0.95, ("File: %s" % filename), weight="heavy", size=self.text_size) self.text_file_pos = figtext(0.10, 0.92, "File Position: ", @@ -85,7 +85,7 @@ class gr_plot_psd: connect('draw_event', self.zoom) connect('key_press_event', self.click) show() - + def get_data(self): self.position = self.hfile.tell()/self.sizeof_data self.text_file_pos.set_text("File Position: %d" % self.position) @@ -101,13 +101,13 @@ class gr_plot_psd: tstep = 1.0 / self.sample_rate #self.time = scipy.array([tstep*(self.position + i) for i in xrange(len(self.iq))]) self.time = scipy.array([tstep*(i) for i in xrange(len(self.iq))]) - + self.iq_psd, self.freq = self.dopsd(self.iq) return True else: print "End of File" return False - + def dopsd(self, iq): ''' Need to do this here and plot later so we can do the fftshift ''' overlap = self.psdfftsize/4 @@ -125,7 +125,7 @@ class gr_plot_psd: iqdims = [[0.075, 0.2, 0.4, 0.6], [0.075, 0.55, 0.4, 0.3]] psddims = [[0.575, 0.2, 0.4, 0.6], [0.575, 0.55, 0.4, 0.3]] specdims = [0.2, 0.125, 0.6, 0.3] - + # Subplot for real and imaginary parts of signal self.sp_iq = self.fig.add_subplot(2,2,1, position=iqdims[self.dospec]) self.sp_iq.set_title(("I&Q"), fontsize=self.title_font_size, fontweight="bold") @@ -139,7 +139,7 @@ class gr_plot_psd: self.sp_psd.set_ylabel("Power Spectrum (dBm)", fontsize=self.label_font_size, fontweight="bold") r = self.get_data() - + self.plot_iq = self.sp_iq.plot([], 'bo-') # make plot for reals self.plot_iq += self.sp_iq.plot([], 'ro-') # make plot for imags self.draw_time(self.time, self.iq) # draw the plot @@ -156,7 +156,7 @@ class gr_plot_psd: self.sp_spec.set_ylabel("Frequency (Hz)", fontsize=self.label_font_size, fontweight="bold") self.draw_spec(self.time, self.iq) - + draw() def draw_time(self, t, iq): @@ -189,9 +189,9 @@ class gr_plot_psd: self.draw_spec(self.time, self.iq) self.xlim = scipy.array(self.sp_iq.get_xlim()) # so zoom doesn't get called - + draw() - + def zoom(self, event): newxlim = scipy.array(self.sp_iq.get_xlim()) curxlim = scipy.array(self.xlim) @@ -205,7 +205,7 @@ class gr_plot_psd: time = scipy.array(self.time[xmin : xmax]) iq_psd, freq = self.dopsd(iq) - + self.draw_psd(freq, iq_psd) self.xlim = scipy.array(self.sp_iq.get_xlim()) @@ -217,7 +217,7 @@ class gr_plot_psd: if(find(event.key, forward_valid_keys)): self.step_forward() - + elif(find(event.key, backward_valid_keys)): self.step_backward() @@ -241,51 +241,52 @@ class gr_plot_psd: r = self.get_data() if(r): self.update_plots() - + + @staticmethod + def setup_options(): + usage="%prog: [options] input_filename" + description = "Takes a GNU Radio binary file (with specified data type using --data-type) and displays the I&Q data versus time as well as the power spectral density (PSD) plot. The y-axis values are plotted assuming volts as the amplitude of the I&Q streams and converted into dBm in the frequency domain (the 1/N power adjustment out of the FFT is performed internally). The script plots a certain block of data at a time, specified on the command line as -B or --block. The start position in the file can be set by specifying -s or --start and defaults to 0 (the start of the file). By default, the system assumes a sample rate of 1, so in time, each sample is plotted versus the sample number. To set a true time and frequency axis, set the sample rate (-R or --sample-rate) to the sample rate used when capturing the samples. Finally, the size of the FFT to use for the PSD and spectrogram plots can be set independently with --psd-size and --spec-size, respectively. The spectrogram plot does not display by default and is turned on with -S or --enable-spec." + + parser = OptionParser(option_class=eng_option, conflict_handler="resolve", + usage=usage, description=description) + parser.add_option("-d", "--data-type", type="string", default="complex64", + help="Specify the data type (complex64, float32, (u)int32, (u)int16, (u)int8) [default=%default]") + parser.add_option("-B", "--block", type="int", default=8192, + help="Specify the block size [default=%default]") + parser.add_option("-s", "--start", type="int", default=0, + help="Specify where to start in the file [default=%default]") + parser.add_option("-R", "--sample-rate", type="eng_float", default=1.0, + help="Set the sampler rate of the data [default=%default]") + parser.add_option("", "--psd-size", type="int", default=1024, + help="Set the size of the PSD FFT [default=%default]") + parser.add_option("", "--spec-size", type="int", default=256, + help="Set the size of the spectrogram FFT [default=%default]") + parser.add_option("-S", "--enable-spec", action="store_true", default=False, + help="Turn on plotting the spectrogram [default=%default]") + + return parser + def find(item_in, list_search): try: return list_search.index(item_in) != None except ValueError: return False -def setup_options(): - usage="%prog: [options] input_filename" - description = "Takes a GNU Radio binary file (with specified data type using --data-type) and displays the I&Q data versus time as well as the power spectral density (PSD) plot. The y-axis values are plotted assuming volts as the amplitude of the I&Q streams and converted into dBm in the frequency domain (the 1/N power adjustment out of the FFT is performed internally). The script plots a certain block of data at a time, specified on the command line as -B or --block. The start position in the file can be set by specifying -s or --start and defaults to 0 (the start of the file). By default, the system assumes a sample rate of 1, so in time, each sample is plotted versus the sample number. To set a true time and frequency axis, set the sample rate (-R or --sample-rate) to the sample rate used when capturing the samples. Finally, the size of the FFT to use for the PSD and spectrogram plots can be set independently with --psd-size and --spec-size, respectively. The spectrogram plot does not display by default and is turned on with -S or --enable-spec." - - parser = OptionParser(option_class=eng_option, conflict_handler="resolve", - usage=usage, description=description) - parser.add_option("-d", "--data-type", type="string", default="complex64", - help="Specify the data type (complex64, float32, (u)int32, (u)int16, (u)int8) [default=%default]") - parser.add_option("-B", "--block", type="int", default=8192, - help="Specify the block size [default=%default]") - parser.add_option("-s", "--start", type="int", default=0, - help="Specify where to start in the file [default=%default]") - parser.add_option("-R", "--sample-rate", type="eng_float", default=1.0, - help="Set the sampler rate of the data [default=%default]") - parser.add_option("", "--psd-size", type="int", default=1024, - help="Set the size of the PSD FFT [default=%default]") - parser.add_option("", "--spec-size", type="int", default=256, - help="Set the size of the spectrogram FFT [default=%default]") - parser.add_option("-S", "--enable-spec", action="store_true", default=False, - help="Turn on plotting the spectrogram [default=%default]") - - return parser - def main(): - parser = setup_options() + parser = plot_psd_base.setup_options() (options, args) = parser.parse_args () if len(args) != 1: parser.print_help() raise SystemExit, 1 filename = args[0] - dc = gr_plot_psd(options.data_type, filename, options) + dc = plot_psd_base(options.data_type, filename, options) if __name__ == "__main__": try: main() except KeyboardInterrupt: pass - + diff --git a/gr-video-sdl/.gitignore b/gr-video-sdl/.gitignore deleted file mode 100644 index 53edad32f..000000000 --- a/gr-video-sdl/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -/*.cache -/*.la -/*.lo -/*.pc -/.deps -/.la -/.libs -/.lo -/Makefile -/Makefile.in -/aclocal.m4 -/autom4te.cache -/config.cache -/config.h -/config.h.in -/config.log -/config.status -/configure -/depcomp -/install-sh -/libtool -/ltmain.sh -/make.log -/missing -/missing -/mkinstalldirs -/py-compile -/stamp-h -/stamp-h.in -/stamp-h1 -/stamp-h1.in -/stamp-h2.in diff --git a/gr-video-sdl/CMakeLists.txt b/gr-video-sdl/CMakeLists.txt index 6b1d7f79e..57ffde894 100644 --- a/gr-video-sdl/CMakeLists.txt +++ b/gr-video-sdl/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-video-sdl/Makefile.am b/gr-video-sdl/Makefile.am deleted file mode 100644 index 75efb3b60..000000000 --- a/gr-video-sdl/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright 2006 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 -dist_pkgconfig_DATA = gnuradio-video-sdl.pc diff --git a/gr-video-sdl/src/.gitignore b/gr-video-sdl/src/.gitignore deleted file mode 100644 index f128bd77b..000000000 --- a/gr-video-sdl/src/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/video_sdl.cc -/video_sdl.py -/run_tests -/gnuradio -/guile -/python diff --git a/gr-video-sdl/src/CMakeLists.txt b/gr-video-sdl/src/CMakeLists.txt index 0c2069112..c21c9a9c8 100644 --- a/gr-video-sdl/src/CMakeLists.txt +++ b/gr-video-sdl/src/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011-2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-video-sdl/src/Makefile.am b/gr-video-sdl/src/Makefile.am deleted file mode 100644 index 3a0d4f34b..000000000 --- a/gr-video-sdl/src/Makefile.am +++ /dev/null @@ -1,88 +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 -include $(top_srcdir)/Makefile.swig - -TESTS = -EXTRA_DIST += run_tests.in -DISTCLEANFILES += run_tests - -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(SDL_CFLAGS) \ - $(WITH_INCLUDES) - -noinst_PYTHON = \ - qa_video_sdl.py - -grinclude_HEADERS = \ - video_sdl_api.h \ - video_sdl_sink_uc.h \ - video_sdl_sink_s.h - -lib_LTLIBRARIES = libgnuradio-video-sdl.la - -libgnuradio_video_sdl_la_SOURCES = \ - video_sdl_sink_uc.cc \ - video_sdl_sink_s.cc - -libgnuradio_video_sdl_la_LIBADD = \ - $(SDL_LIBS) \ - $(GNURADIO_CORE_LA) - -libgnuradio_video_sdl_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) - - -################################# -# SWIG interfaces and libraries - -TOP_SWIG_DOC_IFILES = \ - video_sdl_swig_doc.i - -TOP_SWIG_IFILES = \ - $(TOP_SWIG_DOC_IFILES) \ - video_sdl.i - -BUILT_SOURCES += \ - $(TOP_SWIG_DOC_IFILES) - -EXTRA_DIST += \ - $(TOP_SWIG_DOC_IFILES) - -$(TOP_SWIG_DOC_IFILES): - `echo "" > $@` - -# Install so that they end up available as: -# import gnuradio.video_sdl -# This ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio -video_sdl_pythondir_category = \ - gnuradio - -# additional libraries for linking with the SWIG-generated library -video_sdl_la_swig_libadd = \ - libgnuradio-video-sdl.la - -video_sdl_swiginclude_headers = \ - $(TOP_SWIG_DOC_IFILES) - -if PYTHON -TESTS += run_tests -endif diff --git a/gr-video-sdl/src/Makefile.swig.gen b/gr-video-sdl/src/Makefile.swig.gen deleted file mode 100644 index ac66bc9a2..000000000 --- a/gr-video-sdl/src/Makefile.swig.gen +++ /dev/null @@ -1,145 +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 video_sdl.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/video_sdl -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/video_sdl -## -## 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. - -video_sdl_pythondir_category ?= gnuradio/video_sdl -video_sdl_pylibdir_category ?= $(video_sdl_pythondir_category) -video_sdl_pythondir = $(pythondir)/$(video_sdl_pythondir_category) -video_sdl_pylibdir = $(pyexecdir)/$(video_sdl_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -video_sdl_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/video_sdl -# FIXME: determince whether these should be installed with gnuradio. -video_sdl_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -video_sdl_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 > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -video_sdl_swiginclude_HEADERS = \ - video_sdl.i \ - $(video_sdl_swiginclude_headers) - -if PYTHON -video_sdl_pylib_LTLIBRARIES = \ - _video_sdl.la - -_video_sdl_la_SOURCES = \ - python/video_sdl.cc \ - $(video_sdl_la_swig_sources) - -video_sdl_python_PYTHON = \ - video_sdl.py \ - $(video_sdl_python) - -_video_sdl_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(video_sdl_la_swig_libadd) - -_video_sdl_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(video_sdl_la_swig_ldflags) - -_video_sdl_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(video_sdl_la_swig_cxxflags) - -python/video_sdl.cc: video_sdl.py -video_sdl.py: video_sdl.i - -# Include the python dependencies for this file --include python/video_sdl.d - -endif # end of if python - -if GUILE - -video_sdl_scmlib_LTLIBRARIES = \ - libguile-gnuradio-video_sdl.la -libguile_gnuradio_video_sdl_la_SOURCES = \ - guile/video_sdl.cc \ - $(video_sdl_la_swig_sources) -nobase_video_sdl_scm_DATA = \ - gnuradio/video_sdl.scm \ - gnuradio/video_sdl-primitive.scm -libguile_gnuradio_video_sdl_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(video_sdl_la_swig_libadd) -libguile_gnuradio_video_sdl_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(video_sdl_la_swig_ldflags) -libguile_gnuradio_video_sdl_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(video_sdl_la_swig_cxxflags) - -guile/video_sdl.cc: gnuradio/video_sdl.scm -gnuradio/video_sdl.scm: video_sdl.i -gnuradio/video_sdl-primitive.scm: gnuradio/video_sdl.scm - -# Include the guile dependencies for this file --include guile/video_sdl.d - -endif # end of GUILE - - diff --git a/gr-video-sdl/src/qa_video_sdl.py b/gr-video-sdl/src/qa_video_sdl.py index 8f82a60b1..9008d1513 100755 --- a/gr-video-sdl/src/qa_video_sdl.py +++ b/gr-video-sdl/src/qa_video_sdl.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2006,2010 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 video_sdl @@ -35,6 +35,6 @@ class test_video_sdl (gr_unittest.TestCase): """Just see if we can import the module... They may not have video drivers, etc. Don't try to run anything""" pass - + if __name__ == '__main__': gr_unittest.run(test_video_sdl, "test_video_sdl.xml") diff --git a/gr-video-sdl/src/run_tests.in b/gr-video-sdl/src/run_tests.in deleted file mode 100644 index a0b6ff7e1..000000000 --- a/gr-video-sdl/src/run_tests.in +++ /dev/null @@ -1,10 +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 - -@top_builddir@/run_tests.sh \ - @abs_top_srcdir@/gr-video-sdl \ - @abs_top_builddir@/gr-video-sdl \ - @srcdir@ diff --git a/gr-video-sdl/src/video_sdl.i b/gr-video-sdl/src/video_sdl.i index 010851d10..c06ad6c2e 100644 --- a/gr-video-sdl/src/video_sdl.i +++ b/gr-video-sdl/src/video_sdl.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,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, @@ -63,13 +63,3 @@ class video_sdl_sink_s : public gr_sync_block { public: ~video_sdl_sink_s (); }; - -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-video_sdl" "scm_init_gnuradio_video_sdl_module") -%} - -%goops %{ -(use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif diff --git a/gr-video-sdl/src/video_sdl_sink_s.cc b/gr-video-sdl/src/video_sdl_sink_s.cc index 2be3ff072..d9232043a 100644 --- a/gr-video-sdl/src/video_sdl_sink_s.cc +++ b/gr-video-sdl/src/video_sdl_sink_s.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, @@ -50,21 +50,21 @@ video_sdl_sink_s::video_sdl_sink_s (double framerate,int width, int height,unsig d_height (height), d_dst_width(dst_width), d_dst_height(dst_height), - d_format(format), + d_format(format), d_current_line(0), d_screen(NULL), d_image(NULL), d_avg_delay(0.0), d_wanted_ticks(0) { - if(framerate<=0.0) + if(framerate<=0.0) d_wanted_frametime_ms=0;//Go as fast as possible else d_wanted_frametime_ms=(int)(1000.0/framerate); if(dst_width<0) d_dst_width=d_width; if(dst_height<0) d_dst_height=d_height; if(0==format) d_format=IMGFMT_YV12; - + atexit(SDL_Quit);//check if this is the way to do this if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) { std::cerr << "video_sdl_sink_s: Couldn't initialize SDL:" << SDL_GetError() << " \n SDL_Init(SDL_INIT_VIDEO) failed\n"; @@ -104,9 +104,9 @@ video_sdl_sink_s::video_sdl_sink_s (double framerate,int width, int height,unsig std::cerr << "SDL: Couldn't lock YUV overlay: \n"<< SDL_GetError() <<"\n"; throw std::runtime_error ("video_sdl_sink_s"); } - memset(d_image->pixels[0], 128, d_image->pitches[0]*d_height); - memset(d_image->pixels[1], 128, d_image->pitches[1]*d_height/2); - memset(d_image->pixels[2], 128, d_image->pitches[2]*d_height/2); + memset(d_image->pixels[0], 128, d_image->pitches[0]*d_height); + memset(d_image->pixels[1], 128, d_image->pitches[1]*d_height/2); + memset(d_image->pixels[2], 128, d_image->pitches[2]*d_height/2); SDL_UnlockYUVOverlay( d_image ); } @@ -241,7 +241,7 @@ video_sdl_sink_s::work (int noutput_items, if ( SDL_LockYUVOverlay( d_image ) ) { return 0; - } + } switch (input_items.size ()){ case 3: // first channel=Y, second channel is U , third channel is V src_pixels_0 = (short *) input_items[0]; @@ -253,7 +253,7 @@ video_sdl_sink_s::work (int noutput_items, noutput_items_produced+=copy_plane_to_surface (0,d_chunk_size, src_pixels_0); src_pixels_0 += d_chunk_size; src_pixels_1 += d_chunk_size; - src_pixels_2 += d_chunk_size; + src_pixels_2 += d_chunk_size; } break; case 2: @@ -266,7 +266,7 @@ video_sdl_sink_s::work (int noutput_items, copy_plane_to_surface (12,d_chunk_size/2, src_pixels_1); noutput_items_produced+=copy_plane_to_surface (0,d_chunk_size, src_pixels_0); src_pixels_0 += d_chunk_size; - src_pixels_1 += d_chunk_size; + src_pixels_1 += d_chunk_size; } } else { @@ -277,7 +277,7 @@ video_sdl_sink_s::work (int noutput_items, copy_plane_to_surface (1222,d_chunk_size/2, src_pixels_1); noutput_items_produced+=copy_plane_to_surface (0,d_chunk_size, src_pixels_0); src_pixels_0 += d_chunk_size; - src_pixels_1 += d_chunk_size; + src_pixels_1 += d_chunk_size; } } break; diff --git a/gr-video-sdl/src/video_sdl_sink_s.h b/gr-video-sdl/src/video_sdl_sink_s.h index 2ec15e36d..64f5b5a6c 100644 --- a/gr-video-sdl/src/video_sdl_sink_s.h +++ b/gr-video-sdl/src/video_sdl_sink_s.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -82,7 +82,7 @@ class VIDEO_SDL_API video_sdl_sink_s : public gr_sync_block { public: ~video_sdl_sink_s (); - + int work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); diff --git a/gr-video-sdl/src/video_sdl_sink_uc.cc b/gr-video-sdl/src/video_sdl_sink_uc.cc index 58e4830e4..360df1109 100644 --- a/gr-video-sdl/src/video_sdl_sink_uc.cc +++ b/gr-video-sdl/src/video_sdl_sink_uc.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2010 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, @@ -50,21 +50,21 @@ video_sdl_sink_uc::video_sdl_sink_uc (double framerate,int width, int height,uns d_height (height), d_dst_width(dst_width), d_dst_height(dst_height), - d_format(format), + d_format(format), d_current_line(0), d_screen(NULL), d_image(NULL), d_avg_delay(0.0), d_wanted_ticks(0) { - if(framerate<=0.0) + if(framerate<=0.0) d_wanted_frametime_ms=0;//Go as fast as possible else d_wanted_frametime_ms=(int)(1000.0/framerate); if(dst_width<0) d_dst_width=d_width; if(dst_height<0) d_dst_height=d_height; if(0==format) d_format=IMGFMT_YV12; - + atexit(SDL_Quit);//check if this is the way to do this if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) { std::cerr << "video_sdl_sink_uc: Couldn't initialize SDL:" << SDL_GetError() << " \n SDL_Init(SDL_INIT_VIDEO) failed\n"; @@ -104,9 +104,9 @@ video_sdl_sink_uc::video_sdl_sink_uc (double framerate,int width, int height,uns std::cerr << "SDL: Couldn't lock YUV overlay: \n"<< SDL_GetError() <<"\n"; throw std::runtime_error ("video_sdl_sink_uc"); } - memset(d_image->pixels[0], 128, d_image->pitches[0]*d_height); - memset(d_image->pixels[1], 128, d_image->pitches[1]*d_height/2); - memset(d_image->pixels[2], 128, d_image->pitches[2]*d_height/2); + memset(d_image->pixels[0], 128, d_image->pitches[0]*d_height); + memset(d_image->pixels[1], 128, d_image->pitches[1]*d_height/2); + memset(d_image->pixels[2], 128, d_image->pitches[2]*d_height/2); SDL_UnlockYUVOverlay( d_image ); } @@ -135,15 +135,15 @@ video_sdl_sink_uc::copy_line_pixel_interleaved(unsigned char *dst_pixels_u,unsig void video_sdl_sink_uc::copy_line_line_interleaved(unsigned char *dst_pixels_u,unsigned char *dst_pixels_v,const unsigned char * src_pixels,int src_width) { - memcpy(dst_pixels_u, src_pixels, src_width); - memcpy(dst_pixels_v, src_pixels+src_width, src_width); + memcpy(dst_pixels_u, src_pixels, src_width); + memcpy(dst_pixels_v, src_pixels+src_width, src_width); return; } void video_sdl_sink_uc::copy_line_single_plane(unsigned char *dst_pixels,const unsigned char * src_pixels,int src_width) { - memcpy(dst_pixels, src_pixels, src_width); + memcpy(dst_pixels, src_pixels, src_width); return; } @@ -231,7 +231,7 @@ video_sdl_sink_uc::work (int noutput_items, if ( SDL_LockYUVOverlay( d_image ) ) { return 0; - } + } switch (input_items.size ()){ case 3: // first channel=Y, second channel is U , third channel is V src_pixels_0 = (unsigned char *) input_items[0]; @@ -243,7 +243,7 @@ video_sdl_sink_uc::work (int noutput_items, noutput_items_produced+=copy_plane_to_surface (0,d_chunk_size, src_pixels_0); src_pixels_0 += d_chunk_size; src_pixels_1 += d_chunk_size; - src_pixels_2 += d_chunk_size; + src_pixels_2 += d_chunk_size; } break; case 2: @@ -256,7 +256,7 @@ video_sdl_sink_uc::work (int noutput_items, copy_plane_to_surface (12,d_chunk_size/2, src_pixels_1); noutput_items_produced+=copy_plane_to_surface (0,d_chunk_size, src_pixels_0); src_pixels_0 += d_chunk_size; - src_pixels_1 += d_chunk_size; + src_pixels_1 += d_chunk_size; } } else { @@ -267,7 +267,7 @@ video_sdl_sink_uc::work (int noutput_items, copy_plane_to_surface (1222,d_chunk_size/2, src_pixels_1); noutput_items_produced+=copy_plane_to_surface (0,d_chunk_size, src_pixels_0); src_pixels_0 += d_chunk_size; - src_pixels_1 += d_chunk_size; + src_pixels_1 += d_chunk_size; } } break; diff --git a/gr-video-sdl/src/video_sdl_sink_uc.h b/gr-video-sdl/src/video_sdl_sink_uc.h index 435ddaa8f..6c071cf9d 100644 --- a/gr-video-sdl/src/video_sdl_sink_uc.h +++ b/gr-video-sdl/src/video_sdl_sink_uc.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -82,7 +82,7 @@ class VIDEO_SDL_API video_sdl_sink_uc : public gr_sync_block { public: ~video_sdl_sink_uc (); - + int work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); diff --git a/gr-vocoder/.gitignore b/gr-vocoder/.gitignore deleted file mode 100644 index a37fc0c1a..000000000 --- a/gr-vocoder/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -/*.pc diff --git a/gr-vocoder/CMakeLists.txt b/gr-vocoder/CMakeLists.txt index e800cff00..235054db6 100644 --- a/gr-vocoder/CMakeLists.txt +++ b/gr-vocoder/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, @@ -35,6 +35,8 @@ GR_SET_GLOBAL(GR_VOCODER_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include ) +SET(GR_PKG_VOCODER_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/vocoder) + ######################################################################## # Begin conditional configuration ######################################################################## diff --git a/gr-vocoder/Makefile.am b/gr-vocoder/Makefile.am deleted file mode 100644 index c280358a8..000000000 --- a/gr-vocoder/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = include lib python swig grc apps examples doc - -if PYTHON -SUBDIRS += python swig -endif - -pkgconfigdir = $(libdir)/pkgconfig -dist_pkgconfig_DATA = gnuradio-vocoder.pc diff --git a/gr-vocoder/apps/.gitignore b/gr-vocoder/apps/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-vocoder/apps/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-vocoder/apps/Makefile.am b/gr-vocoder/apps/Makefile.am deleted file mode 100644 index b1c7b44d5..000000000 --- a/gr-vocoder/apps/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = diff --git a/gr-vocoder/doc/.gitignore b/gr-vocoder/doc/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-vocoder/doc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-vocoder/doc/CMakeLists.txt b/gr-vocoder/doc/CMakeLists.txt index bd610a372..570c504e3 100644 --- a/gr-vocoder/doc/CMakeLists.txt +++ b/gr-vocoder/doc/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-vocoder/doc/Makefile.am b/gr-vocoder/doc/Makefile.am deleted file mode 100644 index a277264fe..000000000 --- a/gr-vocoder/doc/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = - -dist_gr_doc_DATA = \ - README.vocoder diff --git a/gr-vocoder/doc/README.vocoder b/gr-vocoder/doc/README.vocoder index 912d664ad..2737063cc 100644 --- a/gr-vocoder/doc/README.vocoder +++ b/gr-vocoder/doc/README.vocoder @@ -7,6 +7,6 @@ as: See the Doxygen documentation for details about the blocks available in this package. A quick listing of the details can be found in Python -after importing by using: +after importing by using: help(vocoder) diff --git a/gr-vocoder/examples/.gitignore b/gr-vocoder/examples/.gitignore deleted file mode 100644 index 0a864cc38..000000000 --- a/gr-vocoder/examples/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in - diff --git a/gr-vocoder/examples/CMakeLists.txt b/gr-vocoder/examples/CMakeLists.txt index 76a757826..769ddf602 100644 --- a/gr-vocoder/examples/CMakeLists.txt +++ b/gr-vocoder/examples/CMakeLists.txt @@ -32,6 +32,6 @@ GR_PYTHON_INSTALL( g723_40_audio_loopback.py gsm_audio_loopback.py ulaw_audio_loopback.py - DESTINATION ${GR_PKG_DATA_DIR}/examples/vocoder + DESTINATION ${GR_PKG_VOCODER_EXAMPLES_DIR} COMPONENT "vocoder_examples" ) diff --git a/gr-vocoder/examples/Makefile.am b/gr-vocoder/examples/Makefile.am deleted file mode 100644 index 32176cf23..000000000 --- a/gr-vocoder/examples/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -ourdatadir = $(exampledir)/vocoder - -dist_ourdata_SCRIPTS = \ - alaw_audio_loopback.py \ - codec2_audio_loopback.py \ - cvsd_audio_loopback.py \ - g721_audio_loopback.py \ - g723_24_audio_loopback.py \ - g723_40_audio_loopback.py \ - gsm_audio_loopback.py \ - ulaw_audio_loopback.py diff --git a/gr-vocoder/examples/alaw_audio_loopback.py b/gr-vocoder/examples/alaw_audio_loopback.py index 8fdd64d44..ad686244b 100755 --- a/gr-vocoder/examples/alaw_audio_loopback.py +++ b/gr-vocoder/examples/alaw_audio_loopback.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr from gnuradio import audio diff --git a/gr-vocoder/examples/codec2_audio_loopback.py b/gr-vocoder/examples/codec2_audio_loopback.py index 54b453f8a..f5da9c217 100755 --- a/gr-vocoder/examples/codec2_audio_loopback.py +++ b/gr-vocoder/examples/codec2_audio_loopback.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005,2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr from gnuradio import audio diff --git a/gr-vocoder/examples/cvsd_audio_loopback.py b/gr-vocoder/examples/cvsd_audio_loopback.py index 7f2a00dbf..f101fecb4 100755 --- a/gr-vocoder/examples/cvsd_audio_loopback.py +++ b/gr-vocoder/examples/cvsd_audio_loopback.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, blks2 from gnuradio import audio @@ -27,7 +27,7 @@ from gnuradio import vocoder def build_graph(): sample_rate = 8000 scale_factor = 32000 - + tb = gr.top_block() src = audio.source(sample_rate, "plughw:0,0") src_scale = gr.multiply_const_ff(scale_factor) @@ -57,7 +57,7 @@ def build_graph(): tb.conect(s2f, gr.file_sink(gr.sizeof_float, "s2f.dat")) tb.conect(decim, gr.file_sink(gr.sizeof_float, "decim.dat")) tb.conect(sink_scale, gr.file_sink(gr.sizeof_float, "sink_scale.dat")) - + return tb if __name__ == '__main__': diff --git a/gr-vocoder/examples/g721_audio_loopback.py b/gr-vocoder/examples/g721_audio_loopback.py index 8b5bc8f33..339ea79ad 100755 --- a/gr-vocoder/examples/g721_audio_loopback.py +++ b/gr-vocoder/examples/g721_audio_loopback.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr from gnuradio import audio diff --git a/gr-vocoder/examples/g723_24_audio_loopback.py b/gr-vocoder/examples/g723_24_audio_loopback.py index f125282dc..34d9ddd5d 100755 --- a/gr-vocoder/examples/g723_24_audio_loopback.py +++ b/gr-vocoder/examples/g723_24_audio_loopback.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr from gnuradio import audio diff --git a/gr-vocoder/examples/g723_40_audio_loopback.py b/gr-vocoder/examples/g723_40_audio_loopback.py index cd2ea5ff1..c636d82d1 100755 --- a/gr-vocoder/examples/g723_40_audio_loopback.py +++ b/gr-vocoder/examples/g723_40_audio_loopback.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr from gnuradio import audio diff --git a/gr-vocoder/examples/gsm_audio_loopback.py b/gr-vocoder/examples/gsm_audio_loopback.py index f4e96f471..ba0fcb847 100755 --- a/gr-vocoder/examples/gsm_audio_loopback.py +++ b/gr-vocoder/examples/gsm_audio_loopback.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005,2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr from gnuradio import audio diff --git a/gr-vocoder/examples/ulaw_audio_loopback.py b/gr-vocoder/examples/ulaw_audio_loopback.py index afe0921fa..e7a96d367 100755 --- a/gr-vocoder/examples/ulaw_audio_loopback.py +++ b/gr-vocoder/examples/ulaw_audio_loopback.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr from gnuradio import audio diff --git a/gr-vocoder/grc/.gitignore b/gr-vocoder/grc/.gitignore deleted file mode 100644 index d2e2e9ce8..000000000 --- a/gr-vocoder/grc/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -/Makefile -/Makefile.in -/.libs -/.deps -/gnuradio -/guile -/python diff --git a/gr-vocoder/grc/Makefile.am b/gr-vocoder/grc/Makefile.am deleted file mode 100644 index f25cb9ce6..000000000 --- a/gr-vocoder/grc/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright 2011-2012 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -grcblocksdir = $(grc_blocksdir) - -dist_grcblocks_DATA = \ - vocoder_alaw_decode_bs.xml \ - vocoder_alaw_encode_sb.xml \ - vocoder_block_tree.xml \ - vocoder_codec2_decode_ps.xml \ - vocoder_codec2_encode_sp.xml \ - vocoder_cvsd_decode_bs.xml \ - vocoder_cvsd_decode.xml \ - vocoder_cvsd_encode_sb.xml \ - vocoder_cvsd_encode.xml \ - vocoder_g721_decode_bs.xml \ - vocoder_g721_encode_sb.xml \ - vocoder_g723_24_decode_bs.xml \ - vocoder_g723_24_encode_sb.xml \ - vocoder_g723_40_decode_bs.xml \ - vocoder_g723_40_encode_sb.xml \ - vocoder_gsm_fr_decode_ps.xml \ - vocoder_gsm_fr_encode_sp.xml \ - vocoder_ulaw_decode_bs.xml \ - vocoder_ulaw_encode_sb.xml diff --git a/gr-vocoder/grc/vocoder_block_tree.xml b/gr-vocoder/grc/vocoder_block_tree.xml index 1766b4e26..ed3338d44 100644 --- a/gr-vocoder/grc/vocoder_block_tree.xml +++ b/gr-vocoder/grc/vocoder_block_tree.xml @@ -2,19 +2,19 @@ <!-- Copyright 2011 Free Software Foundation, Inc. - + This file is part of GNU Radio - + GNU Radio is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. - + GNU Radio is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with GNU Radio; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-vocoder/include/.gitignore b/gr-vocoder/include/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-vocoder/include/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-vocoder/include/CMakeLists.txt b/gr-vocoder/include/CMakeLists.txt index 23099f59e..719e99355 100644 --- a/gr-vocoder/include/CMakeLists.txt +++ b/gr-vocoder/include/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-vocoder/include/Makefile.am b/gr-vocoder/include/Makefile.am deleted file mode 100644 index b579333a3..000000000 --- a/gr-vocoder/include/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -# C/C++ headers get installed in ${prefix}/include/gnuradio -grinclude_HEADERS = \ - vocoder_api.h \ - vocoder_alaw_decode_bs.h \ - vocoder_alaw_encode_sb.h \ - vocoder_codec2_decode_ps.h \ - vocoder_codec2_encode_sp.h \ - vocoder_cvsd_decode_bs.h \ - vocoder_cvsd_encode_sb.h \ - vocoder_g721_decode_bs.h \ - vocoder_g721_encode_sb.h \ - vocoder_g723_24_decode_bs.h \ - vocoder_g723_24_encode_sb.h \ - vocoder_g723_40_decode_bs.h \ - vocoder_g723_40_encode_sb.h \ - vocoder_gsm_fr_decode_ps.h \ - vocoder_gsm_fr_encode_sp.h \ - vocoder_ulaw_decode_bs.h \ - vocoder_ulaw_encode_sb.h diff --git a/gr-vocoder/include/vocoder_alaw_decode_bs.h b/gr-vocoder/include/vocoder_alaw_decode_bs.h index f20dfefdb..083be2100 100644 --- a/gr-vocoder/include/vocoder_alaw_decode_bs.h +++ b/gr-vocoder/include/vocoder_alaw_decode_bs.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -33,7 +33,7 @@ typedef boost::shared_ptr<vocoder_alaw_decode_bs> vocoder_alaw_decode_bs_sptr; VOCODER_API vocoder_alaw_decode_bs_sptr vocoder_make_alaw_decode_bs(); /*! - * \brief This block performs alaw audio decoding. + * \brief This block performs alaw audio decoding. * * \ingroup vocoder_blk */ diff --git a/gr-vocoder/include/vocoder_alaw_encode_sb.h b/gr-vocoder/include/vocoder_alaw_encode_sb.h index c00080fb7..c2609a95c 100644 --- a/gr-vocoder/include/vocoder_alaw_encode_sb.h +++ b/gr-vocoder/include/vocoder_alaw_encode_sb.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -33,7 +33,7 @@ typedef boost::shared_ptr<vocoder_alaw_encode_sb> vocoder_alaw_encode_sb_sptr; VOCODER_API vocoder_alaw_encode_sb_sptr vocoder_make_alaw_encode_sb(); /*! - * \brief This block performs g.711 alaw audio encoding. + * \brief This block performs g.711 alaw audio encoding. * * \ingroup vocoder_blk */ diff --git a/gr-vocoder/include/vocoder_codec2_decode_ps.h b/gr-vocoder/include/vocoder_codec2_decode_ps.h index 7e7ea2d5c..9ceef7921 100644 --- a/gr-vocoder/include/vocoder_codec2_decode_ps.h +++ b/gr-vocoder/include/vocoder_codec2_decode_ps.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-vocoder/include/vocoder_codec2_encode_sp.h b/gr-vocoder/include/vocoder_codec2_encode_sp.h index 8d8588daf..c24aca1c4 100644 --- a/gr-vocoder/include/vocoder_codec2_encode_sp.h +++ b/gr-vocoder/include/vocoder_codec2_encode_sp.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gr-vocoder/include/vocoder_cvsd_decode_bs.h b/gr-vocoder/include/vocoder_cvsd_decode_bs.h index 2ad2f096f..ebafeeb4e 100644 --- a/gr-vocoder/include/vocoder_cvsd_decode_bs.h +++ b/gr-vocoder/include/vocoder_cvsd_decode_bs.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -128,11 +128,11 @@ private: //! \brief Rounding function specific to CVSD //! \return the input value rounded to the nearest integer int cvsd_round(double input); - + //! \brief A power function specific to CVSD data formats //! \return (radix)^power, where radix and power are short integers unsigned int cvsd_pow (short radix, short power); - + //! \brief Sums number of 1's in the input //! \return the number of 1s in the four bytes of an input unsigned integer unsigned char cvsd_bitwise_sum (unsigned int input); diff --git a/gr-vocoder/include/vocoder_cvsd_encode_sb.h b/gr-vocoder/include/vocoder_cvsd_encode_sb.h index b36edaf8b..876fd96de 100644 --- a/gr-vocoder/include/vocoder_cvsd_encode_sb.h +++ b/gr-vocoder/include/vocoder_cvsd_encode_sb.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007 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, @@ -125,16 +125,16 @@ private: vocoder_cvsd_encode_sb(short min_step, short max_step, double step_decay, double accum_decay, int K, int J, short pos_accum_max, short neg_accum_max); - + //! Member functions required by the encoder/decoder //! \brief Rounding function specific to CVSD //! \return the input value rounded to the nearest integer int cvsd_round(double input); - + //! \brief A power function specific to CVSD data formats //! \return (radix)^power, where radix and power are short integers unsigned int cvsd_pow (short radix, short power); - + //! \brief Sums number of 1's in the input //! \return the number of 1s in the four bytes of an input unsigned integer unsigned char cvsd_bitwise_sum (unsigned int input); @@ -147,7 +147,7 @@ private: int d_K; //!< \brief Size of shift register; the number of output bits remembered in shift register int d_J; //!< \brief Number of bits in the shift register that are equal; size of run of 1s, 0s - + short d_pos_accum_max; short d_neg_accum_max; diff --git a/gr-vocoder/include/vocoder_g721_decode_bs.h b/gr-vocoder/include/vocoder_g721_decode_bs.h index 1ac7b993a..61a386ffc 100644 --- a/gr-vocoder/include/vocoder_g721_decode_bs.h +++ b/gr-vocoder/include/vocoder_g721_decode_bs.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -33,7 +33,7 @@ typedef boost::shared_ptr<vocoder_g721_decode_bs> vocoder_g721_decode_bs_sptr; VOCODER_API vocoder_g721_decode_bs_sptr vocoder_make_g721_decode_bs(); /*! - * \brief This block performs g721 audio decoding. + * \brief This block performs g721 audio decoding. * * \ingroup vocoder_blk */ diff --git a/gr-vocoder/include/vocoder_g721_encode_sb.h b/gr-vocoder/include/vocoder_g721_encode_sb.h index a154537d0..694da92d6 100644 --- a/gr-vocoder/include/vocoder_g721_encode_sb.h +++ b/gr-vocoder/include/vocoder_g721_encode_sb.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -33,7 +33,7 @@ typedef boost::shared_ptr<vocoder_g721_encode_sb> vocoder_g721_encode_sb_sptr; VOCODER_API vocoder_g721_encode_sb_sptr vocoder_make_g721_encode_sb(); /*! - * \brief This block performs g721 audio encoding. + * \brief This block performs g721 audio encoding. * * \ingroup vocoder_blk */ diff --git a/gr-vocoder/include/vocoder_g723_24_decode_bs.h b/gr-vocoder/include/vocoder_g723_24_decode_bs.h index 80cdbddd4..6c0f09838 100644 --- a/gr-vocoder/include/vocoder_g723_24_decode_bs.h +++ b/gr-vocoder/include/vocoder_g723_24_decode_bs.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -33,7 +33,7 @@ typedef boost::shared_ptr<vocoder_g723_24_decode_bs> vocoder_g723_24_decode_bs_s VOCODER_API vocoder_g723_24_decode_bs_sptr vocoder_make_g723_24_decode_bs(); /*! - * \brief This block performs g723_24 audio decoding. + * \brief This block performs g723_24 audio decoding. * * \ingroup vocoder_blk */ diff --git a/gr-vocoder/include/vocoder_g723_24_encode_sb.h b/gr-vocoder/include/vocoder_g723_24_encode_sb.h index d290e0971..105897583 100644 --- a/gr-vocoder/include/vocoder_g723_24_encode_sb.h +++ b/gr-vocoder/include/vocoder_g723_24_encode_sb.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -33,7 +33,7 @@ typedef boost::shared_ptr<vocoder_g723_24_encode_sb> vocoder_g723_24_encode_sb_s VOCODER_API vocoder_g723_24_encode_sb_sptr vocoder_make_g723_24_encode_sb(); /*! - * \brief This block performs g723_24 audio encoding. + * \brief This block performs g723_24 audio encoding. * * \ingroup vocoder_blk */ diff --git a/gr-vocoder/include/vocoder_g723_40_decode_bs.h b/gr-vocoder/include/vocoder_g723_40_decode_bs.h index 87a2f6892..ce320a526 100644 --- a/gr-vocoder/include/vocoder_g723_40_decode_bs.h +++ b/gr-vocoder/include/vocoder_g723_40_decode_bs.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -33,7 +33,7 @@ typedef boost::shared_ptr<vocoder_g723_40_decode_bs> vocoder_g723_40_decode_bs_s VOCODER_API vocoder_g723_40_decode_bs_sptr vocoder_make_g723_40_decode_bs(); /*! - * \brief This block performs g723_40 audio decoding. + * \brief This block performs g723_40 audio decoding. * * \ingroup vocoder_blk */ diff --git a/gr-vocoder/include/vocoder_g723_40_encode_sb.h b/gr-vocoder/include/vocoder_g723_40_encode_sb.h index 6ac0f6d05..eb732e73e 100644 --- a/gr-vocoder/include/vocoder_g723_40_encode_sb.h +++ b/gr-vocoder/include/vocoder_g723_40_encode_sb.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -33,7 +33,7 @@ typedef boost::shared_ptr<vocoder_g723_40_encode_sb> vocoder_g723_40_encode_sb_s VOCODER_API vocoder_g723_40_encode_sb_sptr vocoder_make_g723_40_encode_sb(); /*! - * \brief This block performs g723_40 audio encoding. + * \brief This block performs g723_40 audio encoding. * * \ingroup vocoder_blk */ diff --git a/gr-vocoder/include/vocoder_gsm_fr_decode_ps.h b/gr-vocoder/include/vocoder_gsm_fr_decode_ps.h index 748ff5f0f..3af249436 100644 --- a/gr-vocoder/include/vocoder_gsm_fr_decode_ps.h +++ b/gr-vocoder/include/vocoder_gsm_fr_decode_ps.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-vocoder/include/vocoder_gsm_fr_encode_sp.h b/gr-vocoder/include/vocoder_gsm_fr_encode_sp.h index 18f78f525..2b65b5b44 100644 --- a/gr-vocoder/include/vocoder_gsm_fr_encode_sp.h +++ b/gr-vocoder/include/vocoder_gsm_fr_encode_sp.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-vocoder/include/vocoder_ulaw_decode_bs.h b/gr-vocoder/include/vocoder_ulaw_decode_bs.h index f69358168..e25e9cdcf 100644 --- a/gr-vocoder/include/vocoder_ulaw_decode_bs.h +++ b/gr-vocoder/include/vocoder_ulaw_decode_bs.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -33,7 +33,7 @@ typedef boost::shared_ptr<vocoder_ulaw_decode_bs> vocoder_ulaw_decode_bs_sptr; VOCODER_API vocoder_ulaw_decode_bs_sptr vocoder_make_ulaw_decode_bs(); /*! - * \brief This block performs ulaw audio decoding. + * \brief This block performs ulaw audio decoding. * * \ingroup vocoder_blk */ diff --git a/gr-vocoder/include/vocoder_ulaw_encode_sb.h b/gr-vocoder/include/vocoder_ulaw_encode_sb.h index a1c2af05b..702017d42 100644 --- a/gr-vocoder/include/vocoder_ulaw_encode_sb.h +++ b/gr-vocoder/include/vocoder_ulaw_encode_sb.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -33,7 +33,7 @@ typedef boost::shared_ptr<vocoder_ulaw_encode_sb> vocoder_ulaw_encode_sb_sptr; VOCODER_API vocoder_ulaw_encode_sb_sptr vocoder_make_ulaw_encode_sb(); /*! - * \brief This block performs g.711 ulaw audio encoding. + * \brief This block performs g.711 ulaw audio encoding. * * \ingroup vocoder_blk */ diff --git a/gr-vocoder/lib/.gitignore b/gr-vocoder/lib/.gitignore deleted file mode 100644 index d2e2e9ce8..000000000 --- a/gr-vocoder/lib/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -/Makefile -/Makefile.in -/.libs -/.deps -/gnuradio -/guile -/python diff --git a/gr-vocoder/lib/Makefile.am b/gr-vocoder/lib/Makefile.am deleted file mode 100644 index 158347ffe..000000000 --- a/gr-vocoder/lib/Makefile.am +++ /dev/null @@ -1,55 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = codec2 g7xx gsm . - -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES) \ - -I$(top_srcdir)/gr-vocoder/include - -lib_LTLIBRARIES = libgnuradio-vocoder.la - -libgnuradio_vocoder_la_SOURCES = \ - vocoder_alaw_decode_bs.cc \ - vocoder_alaw_encode_sb.cc \ - vocoder_codec2_decode_ps.cc \ - vocoder_codec2_encode_sp.cc \ - vocoder_cvsd_decode_bs.cc \ - vocoder_cvsd_encode_sb.cc \ - vocoder_g721_decode_bs.cc \ - vocoder_g721_encode_sb.cc \ - vocoder_g723_24_decode_bs.cc \ - vocoder_g723_24_encode_sb.cc \ - vocoder_g723_40_decode_bs.cc \ - vocoder_g723_40_encode_sb.cc \ - vocoder_gsm_fr_decode_ps.cc \ - vocoder_gsm_fr_encode_sp.cc \ - vocoder_ulaw_decode_bs.cc \ - vocoder_ulaw_encode_sb.cc - -libgnuradio_vocoder_la_LIBADD = \ - $(GNURADIO_CORE_LA) \ - codec2/libcodec2.la \ - g7xx/libg7xx.la \ - gsm/libgsm.la - -libgnuradio_vocoder_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) diff --git a/gr-vocoder/lib/codec2/.gitignore b/gr-vocoder/lib/codec2/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-vocoder/lib/codec2/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-vocoder/lib/codec2/CMakeLists.txt b/gr-vocoder/lib/codec2/CMakeLists.txt index c9839bd96..95e9d256b 100644 --- a/gr-vocoder/lib/codec2/CMakeLists.txt +++ b/gr-vocoder/lib/codec2/CMakeLists.txt @@ -80,7 +80,7 @@ set(CODEBOOKSDVQ ${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp2.txt ${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp3.txt ${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp4.txt - ${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp5.txt + ${CMAKE_CURRENT_SOURCE_DIR}/codebook/dlsp5.txt ) add_custom_command( diff --git a/gr-vocoder/lib/codec2/Makefile.am b/gr-vocoder/lib/codec2/Makefile.am deleted file mode 100644 index ae2094eff..000000000 --- a/gr-vocoder/lib/codec2/Makefile.am +++ /dev/null @@ -1,125 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -AM_CFLAGS = -fPIC -O3 - -# Helper program to create codebook source -noinst_PROGRAMS = generate_codebook -generate_codebook_LDFLAGS = -lm - -# lsp quantisers -CODEBOOKS= \ - $(srcdir)/codebook/lsp1.txt \ - $(srcdir)/codebook/lsp2.txt \ - $(srcdir)/codebook/lsp3.txt \ - $(srcdir)/codebook/lsp4.txt \ - $(srcdir)/codebook/lsp5.txt \ - $(srcdir)/codebook/lsp6.txt \ - $(srcdir)/codebook/lsp7.txt \ - $(srcdir)/codebook/lsp8.txt \ - $(srcdir)/codebook/lsp9.txt \ - $(srcdir)/codebook/lsp10.txt - -# lspd quantisers -CODEBOOKSD= \ - $(srcdir)/codebook/dlsp1.txt \ - $(srcdir)/codebook/dlsp2.txt \ - $(srcdir)/codebook/dlsp3.txt \ - $(srcdir)/codebook/dlsp4.txt \ - $(srcdir)/codebook/dlsp5.txt \ - $(srcdir)/codebook/dlsp6.txt \ - $(srcdir)/codebook/dlsp7.txt \ - $(srcdir)/codebook/dlsp8.txt \ - $(srcdir)/codebook/dlsp9.txt \ - $(srcdir)/codebook/dlsp10.txt - -# lspd VQ quantisers -CODEBOOKSDVQ= \ - $(srcdir)/codebook/dlsp1.txt \ - $(srcdir)/codebook/dlsp2.txt \ - $(srcdir)/codebook/dlsp3.txt \ - $(srcdir)/codebook/dlsp4.txt \ - $(srcdir)/codebook/dlsp5.txt - -# Generate codebook sources from text files -GENERATED_C = \ - codebook.c \ - codebookd.c \ - codebookdvq.c - -BUILT_SOURCES += $(GENERATED_C) - -codebook.c: $(builddir)/generate_codebook $(CODEBOOKS) - $(builddir)/generate_codebook lsp_cb $(CODEBOOKS) > codebook.c - -codebookd.c: $(builddir)/generate_codebook $(CODEBOOKSD) - $(builddir)/generate_codebook lsp_cbd $(CODEBOOKSD) > codebookd.c - -codebookdvq.c: $(builddir)/generate_codebook $(CODEBOOKSDVQ) - $(builddir)/generate_codebook lsp_cbdvq $(CODEBOOKSDVQ) > codebookdvq.c - -# Convenience library for linking into blocks -noinst_LTLIBRARIES = libcodec2.la - -libcodec2_la_CFLAGS = $(AM_CFLAGS) - -libcodec2_la_SOURCES = \ - dump.c \ - lpc.c \ - nlp.c \ - postfilter.c \ - sine.c \ - codec2.c \ - fft.c \ - kiss_fft.c \ - interp.c \ - lsp.c \ - phase.c \ - quantise.c \ - pack.c \ - $(GENERATED_C) - -# Evil inclusion of glottal.c by phase.c -EXTRA_DIST += glottal.c - -# Headers used locally but not installed in system -noinst_HEADERS = \ - codec2.h \ - codec2_internal.h \ - defines.h \ - kiss_fft.h\ - _kiss_fft_guts.h \ - fft.h \ - interp.h \ - lsp.h \ - phase.h \ - quantise.h \ - comp.h \ - dump.h \ - lpc.h \ - nlp.h \ - postfilter.h \ - sine.h - -EXTRA_DIST += $(CODEBOOKS) $(CODEBOOKSD) $(CODEBOOKSDVQ) - diff --git a/gr-vocoder/lib/codec2/_kiss_fft_guts.h b/gr-vocoder/lib/codec2/_kiss_fft_guts.h index ba6614440..f008a7b50 100644 --- a/gr-vocoder/lib/codec2/_kiss_fft_guts.h +++ b/gr-vocoder/lib/codec2/_kiss_fft_guts.h @@ -20,7 +20,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #include <limits.h> #define MAXFACTORS 32 -/* e.g. an fft of length 128 has 4 factors +/* e.g. an fft of length 128 has 4 factors as far as kissfft is concerned 4*4*4*2 */ @@ -48,7 +48,7 @@ struct kiss_fft_state{ #define SAMP_MAX 2147483647 #else # define FRACBITS 15 -# define SAMPPROD int32_t +# define SAMPPROD int32_t #define SAMP_MAX 32767 #endif @@ -152,12 +152,12 @@ struct kiss_fft_state{ #ifdef KISS_FFT_USE_ALLOCA // define this to allow use of alloca instead of malloc for temporary buffers -// Temporary buffers are used in two case: +// Temporary buffers are used in two case: // 1. FFT sizes that have "bad" factors. i.e. not 2,3 and 5 // 2. "in-place" FFTs. Notice the quotes, since kissfft does not really do an in-place transform. #include <alloca.h> #define KISS_FFT_TMP_ALLOC(nbytes) alloca(nbytes) -#define KISS_FFT_TMP_FREE(ptr) +#define KISS_FFT_TMP_FREE(ptr) #else #define KISS_FFT_TMP_ALLOC(nbytes) KISS_FFT_MALLOC(nbytes) #define KISS_FFT_TMP_FREE(ptr) KISS_FFT_FREE(ptr) diff --git a/gr-vocoder/lib/codec2/c2dec.c b/gr-vocoder/lib/codec2/c2dec.c index b866d04d6..3123e96fb 100644 --- a/gr-vocoder/lib/codec2/c2dec.c +++ b/gr-vocoder/lib/codec2/c2dec.c @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) //buffering to occur if (fout == stdout) fflush(stdout); if (fin == stdin) fflush(stdin); - + } codec2_destroy(codec2); diff --git a/gr-vocoder/lib/codec2/c2demo.c b/gr-vocoder/lib/codec2/c2demo.c index efa8d6449..b9e17a78e 100644 --- a/gr-vocoder/lib/codec2/c2demo.c +++ b/gr-vocoder/lib/codec2/c2demo.c @@ -52,7 +52,7 @@ int main(int argc, char *argv[]) printf("usage: %s InputRawSpeechFile OutputRawSpeechFile\n", argv[0]); exit(1); } - + if ( (fin = fopen(argv[1],"rb")) == NULL ) { fprintf(stderr, "Error opening input speech file: %s: %s.\n", argv[1], strerror(errno)); @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) codec2 = codec2_create(); - while(fread(buf, sizeof(short), CODEC2_SAMPLES_PER_FRAME, fin) == + while(fread(buf, sizeof(short), CODEC2_SAMPLES_PER_FRAME, fin) == CODEC2_SAMPLES_PER_FRAME) { codec2_encode(codec2, bits, buf); codec2_decode(codec2, buf, bits); diff --git a/gr-vocoder/lib/codec2/c2enc.c b/gr-vocoder/lib/codec2/c2enc.c index 4d1d019df..0e5b26cfd 100644 --- a/gr-vocoder/lib/codec2/c2enc.c +++ b/gr-vocoder/lib/codec2/c2enc.c @@ -47,7 +47,7 @@ int main(int argc, char *argv[]) printf("usage: %s InputRawspeechFile OutputBitFile\n", argv[0]); exit(1); } - + if (strcmp(argv[1], "-") == 0) fin = stdin; else if ( (fin = fopen(argv[1],"rb")) == NULL ) { fprintf(stderr, "Error opening input bit file: %s: %s.\n", diff --git a/gr-vocoder/lib/codec2/c2sim.c b/gr-vocoder/lib/codec2/c2sim.c index bb49c7899..e335078b6 100644 --- a/gr-vocoder/lib/codec2/c2sim.c +++ b/gr-vocoder/lib/codec2/c2sim.c @@ -4,8 +4,8 @@ AUTHOR......: David Rowe DATE CREATED: 20/8/2010 - Codec2 simulation. Combines encoder and decoder and allows switching in - out various algorithms and quantisation steps. + Codec2 simulation. Combines encoder and decoder and allows switching in + out various algorithms and quantisation steps. \*---------------------------------------------------------------------------*/ @@ -45,13 +45,13 @@ #include "interp.h" /*---------------------------------------------------------------------------*\ - - switch_present() - - Searches the command line arguments for a "switch". If the switch is - found, returns the command line argument where it ws found, else returns - NULL. - + + switch_present() + + Searches the command line arguments for a "switch". If the switch is + found, returns the command line argument where it ws found, else returns + NULL. + \*---------------------------------------------------------------------------*/ int switch_present(sw,argc,argv) @@ -71,9 +71,9 @@ register char *argv[]; /* array of command line arguments in string form */ void synth_one_frame(short buf[], MODEL *model, float Sn_[], float Pn[]); /*---------------------------------------------------------------------------*\ - - MAIN - + + MAIN + \*---------------------------------------------------------------------------*/ int main(int argc, char *argv[]) @@ -103,10 +103,10 @@ int main(int argc, char *argv[]) int lsp, lspd, lspdvq, lsp_quantiser; float ak[LPC_MAX]; COMP Sw_[FFT_ENC]; - COMP Ew[FFT_ENC]; - + COMP Ew[FFT_ENC]; + int dump; - + int phase0; float ex_phase[MAX_AMP+1]; @@ -129,7 +129,7 @@ int main(int argc, char *argv[]) float AresdB_prev[MAX_AMP]; for(i=0; i<MAX_AMP; i++) - AresdB_prev[i] = 0.0; + AresdB_prev[i] = 0.0; for(i=0; i<M; i++) Sn[i] = 1.0; @@ -201,12 +201,12 @@ int main(int argc, char *argv[]) if ((order < 4) || (order > 20)) { fprintf(stderr, "Error in lpc order: %d\n", order); exit(1); - } + } } dump = switch_present("--dump",argc,argv); #ifdef DUMP - if (dump) + if (dump) dump_on(argv[dump+1]); #endif @@ -264,7 +264,7 @@ int main(int argc, char *argv[]) //Sn[i+M-N] = hpf((float)buf[i], hpf_states); Sn[i+M-N] = (float)buf[i]; } - + /* Estimate pitch */ nlp(nlp_states,Sn,N,M,P_MIN,P_MAX,&pitch,Sw,&prev_Wo); @@ -272,10 +272,10 @@ int main(int argc, char *argv[]) /* estimate model parameters */ - dft_speech(Sw, Sn, w); + dft_speech(Sw, Sn, w); two_stage_pitch_refinement(&model, Sw); estimate_amplitudes(&model, Sw, W); -#ifdef DUMP +#ifdef DUMP dump_Sn(Sn); dump_Sw(Sw); dump_model(&model); #endif @@ -284,7 +284,7 @@ int main(int argc, char *argv[]) if (phase0) { float Wn[M]; /* windowed speech samples */ float Rk[LPC_MAX+1]; /* autocorrelation coeffs */ - + #ifdef DUMP dump_phase(&model.phi[0], model.L); #endif @@ -299,7 +299,7 @@ int main(int argc, char *argv[]) #ifdef DUMP dump_ak(ak, LPC_ORD); #endif - + /* determine voicing */ snr = est_voicing_mbe(&model, Sw, W, Sw_, Ew, prev_Wo); @@ -313,7 +313,7 @@ int main(int argc, char *argv[]) for(i=0; i<MAX_AMP; i++) model.phi[i] = 0; - + if (hand_voicing) { fscanf(fvoicing,"%d\n",&model.voiced); } @@ -350,7 +350,7 @@ int main(int argc, char *argv[]) e = decode_energy(encode_energy(e)); model.Wo = decode_Wo(encode_Wo(model.Wo)); - aks_to_M2(ak, order, &model, e, &snr, 1); + aks_to_M2(ak, order, &model, e, &snr, 1); apply_lpc_correction(&model); sum_snr += snr; #ifdef DUMP @@ -371,7 +371,7 @@ int main(int argc, char *argv[]) /* option decimation to 20ms rate, which enables interpolation routine to synthesise in between frame */ - + if (decimate) { if (!phase0) { printf("needs --phase0 to resample phase for interpolated Wo\n"); @@ -395,17 +395,17 @@ int main(int argc, char *argv[]) prev_lsps, prev_e, lsps, e, ak_interp); apply_lpc_correction(&interp_model); #endif - + if (phase0) phase_synth_zero_order(&interp_model, ak_interp, ex_phase, - order); + order); if (postfilt) postfilter(&interp_model, &bg_est); synth_one_frame(buf, &interp_model, Sn_, Pn); if (fout != NULL) fwrite(buf,sizeof(short),N,fout); if (phase0) - phase_synth_zero_order(&model, ak, ex_phase, order); + phase_synth_zero_order(&model, ak, ex_phase, order); if (postfilt) postfilter(&model, &bg_est); synth_one_frame(buf, &model, Sn_, Pn); @@ -422,7 +422,7 @@ int main(int argc, char *argv[]) } else { if (phase0) - phase_synth_zero_order(&model, ak, ex_phase, order); + phase_synth_zero_order(&model, ak, ex_phase, order); if (postfilt) postfilter(&model, &bg_est); synth_one_frame(buf, &model, Sn_, Pn); diff --git a/gr-vocoder/lib/codec2/codebook/lsp8910.txt b/gr-vocoder/lib/codec2/codebook/lsp8910.txt index 93cfdd81d..759136bfe 100644 --- a/gr-vocoder/lib/codec2/codebook/lsp8910.txt +++ b/gr-vocoder/lib/codec2/codebook/lsp8910.txt @@ -1,65 +1,65 @@ 3 64 -2.048073 2.534502 2.645915 -2.019670 2.269744 2.605462 -1.961101 2.329646 2.562857 -1.968573 2.532712 2.616918 -2.183480 2.514381 2.629582 -2.259379 2.516615 2.620410 -2.172791 2.462460 2.567064 -2.097666 2.303933 2.421685 -2.052990 2.353242 2.546992 -2.043642 2.232362 2.499262 -2.106151 2.393131 2.488401 -2.099167 2.437862 2.558655 -2.013877 2.422875 2.530071 -2.033848 2.483776 2.584598 -2.114474 2.516856 2.602372 -2.229214 2.584056 2.678855 -2.131151 2.584299 2.674845 -1.472721 2.477091 2.630241 -2.010907 2.598415 2.682989 -2.353653 2.524066 2.619773 -2.419897 2.623938 2.699605 -2.319080 2.602148 2.689044 -1.860342 2.503881 2.616576 -1.910517 2.386693 2.610126 -1.748689 2.371809 2.496542 -1.618495 2.403425 2.554956 -1.844073 2.437026 2.533443 -1.924810 2.388543 2.502698 -1.937227 2.258363 2.501697 -1.687554 2.209123 2.545239 -1.851950 2.278628 2.565632 -1.868154 2.330150 2.444883 -1.874180 2.213118 2.351940 -1.757311 2.030626 2.433836 -1.650306 2.152371 2.243421 -1.612794 1.884686 2.339313 -1.745431 2.278895 2.389449 -1.590923 2.304155 2.408510 -1.475982 2.275548 2.509897 -1.508695 2.045463 2.455520 -1.872054 2.061777 2.246202 -1.983947 2.159155 2.445535 -1.745180 2.483765 2.593698 -1.900116 2.079600 2.407479 -1.841672 2.167042 2.486827 -1.932912 2.148464 2.569850 -2.134174 2.363673 2.584252 -2.106094 2.450645 2.638417 -1.954135 2.460313 2.666512 -1.907634 2.573801 2.674025 -1.625579 2.539569 2.656363 -1.785866 2.572616 2.676082 -1.798447 2.376454 2.624298 -2.020033 2.397244 2.619868 -1.946581 2.468791 2.564185 -2.008920 2.342400 2.469132 -1.983846 2.271044 2.395408 -1.988039 2.154150 2.317920 -2.077197 2.216622 2.389101 -2.117255 2.283907 2.512242 -2.177233 2.334622 2.458268 -2.214655 2.425510 2.620013 -2.199931 2.390272 2.520731 -2.271755 2.448682 2.552649 +2.048073 2.534502 2.645915 +2.019670 2.269744 2.605462 +1.961101 2.329646 2.562857 +1.968573 2.532712 2.616918 +2.183480 2.514381 2.629582 +2.259379 2.516615 2.620410 +2.172791 2.462460 2.567064 +2.097666 2.303933 2.421685 +2.052990 2.353242 2.546992 +2.043642 2.232362 2.499262 +2.106151 2.393131 2.488401 +2.099167 2.437862 2.558655 +2.013877 2.422875 2.530071 +2.033848 2.483776 2.584598 +2.114474 2.516856 2.602372 +2.229214 2.584056 2.678855 +2.131151 2.584299 2.674845 +1.472721 2.477091 2.630241 +2.010907 2.598415 2.682989 +2.353653 2.524066 2.619773 +2.419897 2.623938 2.699605 +2.319080 2.602148 2.689044 +1.860342 2.503881 2.616576 +1.910517 2.386693 2.610126 +1.748689 2.371809 2.496542 +1.618495 2.403425 2.554956 +1.844073 2.437026 2.533443 +1.924810 2.388543 2.502698 +1.937227 2.258363 2.501697 +1.687554 2.209123 2.545239 +1.851950 2.278628 2.565632 +1.868154 2.330150 2.444883 +1.874180 2.213118 2.351940 +1.757311 2.030626 2.433836 +1.650306 2.152371 2.243421 +1.612794 1.884686 2.339313 +1.745431 2.278895 2.389449 +1.590923 2.304155 2.408510 +1.475982 2.275548 2.509897 +1.508695 2.045463 2.455520 +1.872054 2.061777 2.246202 +1.983947 2.159155 2.445535 +1.745180 2.483765 2.593698 +1.900116 2.079600 2.407479 +1.841672 2.167042 2.486827 +1.932912 2.148464 2.569850 +2.134174 2.363673 2.584252 +2.106094 2.450645 2.638417 +1.954135 2.460313 2.666512 +1.907634 2.573801 2.674025 +1.625579 2.539569 2.656363 +1.785866 2.572616 2.676082 +1.798447 2.376454 2.624298 +2.020033 2.397244 2.619868 +1.946581 2.468791 2.564185 +2.008920 2.342400 2.469132 +1.983846 2.271044 2.395408 +1.988039 2.154150 2.317920 +2.077197 2.216622 2.389101 +2.117255 2.283907 2.512242 +2.177233 2.334622 2.458268 +2.214655 2.425510 2.620013 +2.199931 2.390272 2.520731 +2.271755 2.448682 2.552649 diff --git a/gr-vocoder/lib/codec2/codec2.c b/gr-vocoder/lib/codec2/codec2.c index 92708ee32..93ea9208c 100644 --- a/gr-vocoder/lib/codec2/codec2.c +++ b/gr-vocoder/lib/codec2/codec2.c @@ -4,7 +4,7 @@ AUTHOR......: David Rowe DATE CREATED: 21/8/2010 - Codec2 fully quantised encoder and decoder functions. If you want use + Codec2 fully quantised encoder and decoder functions. If you want use codec2, the codec2_xxx functions are for you. \*---------------------------------------------------------------------------*/ @@ -45,16 +45,16 @@ #include "codec2_internal.h" /*---------------------------------------------------------------------------*\ - + FUNCTIONS \*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*\ - - FUNCTION....: codec2_create - AUTHOR......: David Rowe - DATE CREATED: 21/8/2010 + + FUNCTION....: codec2_create + AUTHOR......: David Rowe + DATE CREATED: 21/8/2010 Create and initialise an instance of the codec. Returns a pointer to the codec states or NULL on failure. One set of states is @@ -106,10 +106,10 @@ void *codec2_create() } /*---------------------------------------------------------------------------*\ - - FUNCTION....: codec2_create - AUTHOR......: David Rowe - DATE CREATED: 21/8/2010 + + FUNCTION....: codec2_create + AUTHOR......: David Rowe + DATE CREATED: 21/8/2010 Destroy an instance of the codec. @@ -118,7 +118,7 @@ void *codec2_create() void codec2_destroy(void *codec2_state) { CODEC2 *c2; - + assert(codec2_state != NULL); c2 = (CODEC2*)codec2_state; nlp_destroy(c2->nlp); @@ -126,12 +126,12 @@ void codec2_destroy(void *codec2_state) } /*---------------------------------------------------------------------------*\ - - FUNCTION....: codec2_encode - AUTHOR......: David Rowe - DATE CREATED: 21/8/2010 - Encodes 160 speech samples (20ms of speech) into 51 bits. + FUNCTION....: codec2_encode + AUTHOR......: David Rowe + DATE CREATED: 21/8/2010 + + Encodes 160 speech samples (20ms of speech) into 51 bits. The codec2 algorithm actually operates internally on 10ms (80 sample) frames, so we run the encoding algorithm twice. On the @@ -148,7 +148,7 @@ void codec2_destroy(void *codec2_state) Wo (fundamental frequnecy) 7 Voicing (10ms update) 2 TOTAL 51 - + \*---------------------------------------------------------------------------*/ void codec2_encode(void *codec2_state, unsigned char * bits, short speech[]) @@ -174,13 +174,13 @@ void codec2_encode(void *codec2_state, unsigned char * bits, short speech[]) analyse_one_frame(c2, &model, &speech[N]); voiced2 = model.voiced; - + Wo_index = encode_Wo(model.Wo); - encode_amplitudes(lsp_indexes, + encode_amplitudes(lsp_indexes, &energy_index, - &model, - c2->Sn, - c2->w); + &model, + c2->Sn, + c2->w); memset(bits, '\0', ((CODEC2_BITS_PER_FRAME + 7) / 8)); pack(bits, &nbit, Wo_index, WO_BITS); for(i=0; i<LPC_ORD; i++) { @@ -189,15 +189,15 @@ void codec2_encode(void *codec2_state, unsigned char * bits, short speech[]) pack(bits, &nbit, energy_index, E_BITS); pack(bits, &nbit, voiced1, 1); pack(bits, &nbit, voiced2, 1); - + assert(nbit == CODEC2_BITS_PER_FRAME); } /*---------------------------------------------------------------------------*\ - - FUNCTION....: codec2_decode - AUTHOR......: David Rowe - DATE CREATED: 21/8/2010 + + FUNCTION....: codec2_decode + AUTHOR......: David Rowe + DATE CREATED: 21/8/2010 Decodes frames of 51 bits into 160 samples (20ms) of speech. @@ -239,7 +239,7 @@ void codec2_decode(void *codec2_state, short speech[], model.Wo = decode_Wo(Wo_index); model.L = PI/model.Wo; memset(&model.A, 0, (model.L+1)*sizeof(model.A[0])); - decode_amplitudes(&model, + decode_amplitudes(&model, ak, lsp_indexes, energy_index, @@ -270,10 +270,10 @@ void codec2_decode(void *codec2_state, short speech[], } /*---------------------------------------------------------------------------*\ - - FUNCTION....: synthesise_one_frame() - AUTHOR......: David Rowe - DATE CREATED: 23/8/2010 + + FUNCTION....: synthesise_one_frame() + AUTHOR......: David Rowe + DATE CREATED: 23/8/2010 Synthesise 80 speech samples (10ms) from model parameters. @@ -299,14 +299,14 @@ void synthesise_one_frame(CODEC2 *c2, short speech[], MODEL *model, float ak[]) } /*---------------------------------------------------------------------------*\ - - FUNCTION....: analyse_one_frame() - AUTHOR......: David Rowe - DATE CREATED: 23/8/2010 + + FUNCTION....: analyse_one_frame() + AUTHOR......: David Rowe + DATE CREATED: 23/8/2010 Extract sinusoidal model parameters from 80 speech samples (10ms of speech). - + \*---------------------------------------------------------------------------*/ void analyse_one_frame(CODEC2 *c2, MODEL *model, short speech[]) diff --git a/gr-vocoder/lib/codec2/codec2.h b/gr-vocoder/lib/codec2/codec2.h index 946dedca5..88e68814f 100644 --- a/gr-vocoder/lib/codec2/codec2.h +++ b/gr-vocoder/lib/codec2/codec2.h @@ -4,7 +4,7 @@ AUTHOR......: David Rowe DATE CREATED: 21/8/2010 - Codec2 fully quantised encoder and decoder functions. If you want use + Codec2 fully quantised encoder and decoder functions. If you want use codec2, these are the functions you need to call. \*---------------------------------------------------------------------------*/ diff --git a/gr-vocoder/lib/codec2/codec2_internal.h b/gr-vocoder/lib/codec2/codec2_internal.h index 3943ac29d..3aa5300b1 100644 --- a/gr-vocoder/lib/codec2/codec2_internal.h +++ b/gr-vocoder/lib/codec2/codec2_internal.h @@ -30,7 +30,7 @@ #define __CODEC2_INTERNAL__ /*---------------------------------------------------------------------------*\ - + STATES \*---------------------------------------------------------------------------*/ @@ -52,7 +52,7 @@ typedef struct { } CODEC2; /*---------------------------------------------------------------------------*\ - + FUNCTION HEADERS \*---------------------------------------------------------------------------*/ diff --git a/gr-vocoder/lib/codec2/comp.h b/gr-vocoder/lib/codec2/comp.h index cedcab37f..ffc20c163 100644 --- a/gr-vocoder/lib/codec2/comp.h +++ b/gr-vocoder/lib/codec2/comp.h @@ -1,11 +1,11 @@ /*---------------------------------------------------------------------------*\ - + FILE........: comp.h - AUTHOR......: David Rowe + AUTHOR......: David Rowe DATE CREATED: 24/08/09 - + Complex number definition. - + \*---------------------------------------------------------------------------*/ /* diff --git a/gr-vocoder/lib/codec2/defines.h b/gr-vocoder/lib/codec2/defines.h index 2dcd527d3..75064fae1 100644 --- a/gr-vocoder/lib/codec2/defines.h +++ b/gr-vocoder/lib/codec2/defines.h @@ -1,11 +1,11 @@ /*---------------------------------------------------------------------------*\ - FILE........: defines.h - AUTHOR......: David Rowe - DATE CREATED: 23/4/93 - - Defines and structures used throughout the codec. - + FILE........: defines.h + AUTHOR......: David Rowe + DATE CREATED: 23/4/93 + + Defines and structures used throughout the codec. + \*---------------------------------------------------------------------------*/ /* @@ -29,9 +29,9 @@ #define __DEFINES__ /*---------------------------------------------------------------------------*\ - - DEFINES - + + DEFINES + \*---------------------------------------------------------------------------*/ /* General defines */ @@ -58,9 +58,9 @@ #define P_MAX 160 /* maximum pitch */ /*---------------------------------------------------------------------------*\ - - TYPEDEFS - + + TYPEDEFS + \*---------------------------------------------------------------------------*/ /* Structure to hold model parameters for one frame */ diff --git a/gr-vocoder/lib/codec2/dump.c b/gr-vocoder/lib/codec2/dump.c index 73a378e23..1dc34c858 100644 --- a/gr-vocoder/lib/codec2/dump.c +++ b/gr-vocoder/lib/codec2/dump.c @@ -1,9 +1,9 @@ /*---------------------------------------------------------------------------*\ - + FILE........: dump.c - AUTHOR......: David Rowe - DATE CREATED: 25/8/09 - + AUTHOR......: David Rowe + DATE CREATED: 25/8/09 + Routines to dump data to text files for Octave analysis. \*---------------------------------------------------------------------------*/ @@ -123,10 +123,10 @@ void dump_Sn(float Sn[]) { for(i=0; i<M/2; i++) fprintf(fsn,"%f\t",Sn[i]); - fprintf(fsn,"\n"); + fprintf(fsn,"\n"); for(i=M/2; i<M; i++) fprintf(fsn,"%f\t",Sn[i]); - fprintf(fsn,"\n"); + fprintf(fsn,"\n"); } void dump_Sw(COMP Sw[]) { @@ -144,7 +144,7 @@ void dump_Sw(COMP Sw[]) { for(i=0; i<FFT_ENC/2; i++) fprintf(fsw,"%f\t", 10.0*log10(Sw[i].real*Sw[i].real + Sw[i].imag*Sw[i].imag)); - fprintf(fsw,"\n"); + fprintf(fsw,"\n"); } void dump_Sw_(COMP Sw_[]) { @@ -162,7 +162,7 @@ void dump_Sw_(COMP Sw_[]) { for(i=0; i<FFT_ENC/2; i++) fprintf(fsw_,"%f\t", 10.0*log10(Sw_[i].real*Sw_[i].real + Sw_[i].imag*Sw_[i].imag)); - fprintf(fsw_,"\n"); + fprintf(fsw_,"\n"); } void dump_Ew(COMP Ew[]) { @@ -180,7 +180,7 @@ void dump_Ew(COMP Ew[]) { for(i=0; i<FFT_ENC/2; i++) fprintf(few,"%f\t", 10.0*log10(Ew[i].real*Ew[i].real + Ew[i].imag*Ew[i].imag)); - fprintf(few,"\n"); + fprintf(few,"\n"); } void dump_model(MODEL *model) { @@ -195,13 +195,13 @@ void dump_model(MODEL *model) { assert(fmodel != NULL); } - fprintf(fmodel,"%f\t%d\t", model->Wo, model->L); + fprintf(fmodel,"%f\t%d\t", model->Wo, model->L); for(l=1; l<=model->L; l++) fprintf(fmodel,"%f\t",model->A[l]); for(l=model->L+1; l<MAX_AMP; l++) fprintf(fmodel,"0.0\t"); fprintf(fmodel,"%d\t",model->voiced); - fprintf(fmodel,"\n"); + fprintf(fmodel,"\n"); } void dump_quantised_model(MODEL *model) { @@ -216,12 +216,12 @@ void dump_quantised_model(MODEL *model) { assert(fqmodel != NULL); } - fprintf(fqmodel,"%f\t%d\t", model->Wo, model->L); + fprintf(fqmodel,"%f\t%d\t", model->Wo, model->L); for(l=1; l<=model->L; l++) fprintf(fqmodel,"%f\t",model->A[l]); for(l=model->L+1; l<MAX_AMP; l++) fprintf(fqmodel,"0.0\t"); - fprintf(fqmodel,"\n"); + fprintf(fqmodel,"\n"); } void dump_resample(float w[], float A[], int n) { @@ -241,7 +241,7 @@ void dump_resample(float w[], float A[], int n) { fprintf(fres,"%f\t",w[l]); for(l=0; l<n; l++) fprintf(fres,"%f\t",A[l]); - fprintf(fres,"\n"); + fprintf(fres,"\n"); } void dump_phase(float phase[], int L) { @@ -260,7 +260,7 @@ void dump_phase(float phase[], int L) { fprintf(fphase,"%f\t",phase[l]); for(l=L+1; l<MAX_AMP; l++) fprintf(fphase,"%f\t",0.0); - fprintf(fphase,"\n"); + fprintf(fphase,"\n"); } void dump_phase_(float phase_[], int L) { @@ -279,7 +279,7 @@ void dump_phase_(float phase_[], int L) { fprintf(fphase_,"%f\t",phase_[l]); for(l=L+1; l<MAX_AMP; l++) fprintf(fphase_,"%f\t",0.0); - fprintf(fphase_,"\n"); + fprintf(fphase_,"\n"); } void dump_snr(float snr) { @@ -310,7 +310,7 @@ void dump_Pw(COMP Pw[]) { for(i=0; i<FFT_DEC/2; i++) fprintf(fpw,"%f\t",Pw[i].real); - fprintf(fpw,"\n"); + fprintf(fpw,"\n"); } void dump_lsp(float lsp[]) { @@ -327,7 +327,7 @@ void dump_lsp(float lsp[]) { for(i=0; i<10; i++) fprintf(flsp,"%f\t",lsp[i]); - fprintf(flsp,"\n"); + fprintf(flsp,"\n"); } void dump_ak(float ak[], int order) { @@ -344,7 +344,7 @@ void dump_ak(float ak[], int order) { for(i=0; i<=order; i++) fprintf(fak,"%f\t",ak[i]); - fprintf(fak,"\n"); + fprintf(fak,"\n"); } void dump_Fw(COMP Fw[]) { @@ -361,7 +361,7 @@ void dump_Fw(COMP Fw[]) { for(i=0; i<256; i++) fprintf(ffw,"%f\t",Fw[i].real); - fprintf(ffw,"\n"); + fprintf(ffw,"\n"); } void dump_e(float e_hz[]) { @@ -378,10 +378,10 @@ void dump_e(float e_hz[]) { for(i=0; i<500/2; i++) fprintf(fe,"%f\t",e_hz[i]); - fprintf(fe,"\n"); + fprintf(fe,"\n"); for(i=500/2; i<500; i++) fprintf(fe,"%f\t",e_hz[i]); - fprintf(fe,"\n"); + fprintf(fe,"\n"); } void dump_sq(float sq[]) { @@ -398,10 +398,10 @@ void dump_sq(float sq[]) { for(i=0; i<M/2; i++) fprintf(fsq,"%f\t",sq[i]); - fprintf(fsq,"\n"); + fprintf(fsq,"\n"); for(i=M/2; i<M; i++) fprintf(fsq,"%f\t",sq[i]); - fprintf(fsq,"\n"); + fprintf(fsq,"\n"); } void dump_dec(COMP Fw[]) { @@ -418,7 +418,7 @@ void dump_dec(COMP Fw[]) { for(i=0; i<320/5; i++) fprintf(fdec,"%f\t",Fw[i].real); - fprintf(fdec,"\n"); + fprintf(fdec,"\n"); } void dump_bg(float e, float bg_est, float percent_uv) { @@ -432,7 +432,7 @@ void dump_bg(float e, float bg_est, float percent_uv) { assert(fbg != NULL); } - fprintf(fbg,"%f\t%f\t%f\n", e, bg_est, percent_uv); + fprintf(fbg,"%f\t%f\t%f\n", e, bg_est, percent_uv); } void dump_E(float E) { @@ -463,7 +463,7 @@ void dump_Rk(float Rk[]) { for(i=0; i<P_MAX; i++) fprintf(frk,"%f\t",Rk[i]); - fprintf(frk,"\n"); + fprintf(frk,"\n"); } #endif diff --git a/gr-vocoder/lib/codec2/dump.h b/gr-vocoder/lib/codec2/dump.h index eeddd3406..4b92d009d 100644 --- a/gr-vocoder/lib/codec2/dump.h +++ b/gr-vocoder/lib/codec2/dump.h @@ -1,9 +1,9 @@ /*---------------------------------------------------------------------------*\ - + FILE........: dump.h - AUTHOR......: David Rowe - DATE CREATED: 25/8/09 - + AUTHOR......: David Rowe + DATE CREATED: 25/8/09 + Routines to dump data to text files for Octave analysis. \*---------------------------------------------------------------------------*/ diff --git a/gr-vocoder/lib/codec2/fft.c b/gr-vocoder/lib/codec2/fft.c index a3027e4cd..19f3141a8 100644 --- a/gr-vocoder/lib/codec2/fft.c +++ b/gr-vocoder/lib/codec2/fft.c @@ -1,11 +1,11 @@ /*---------------------------------------------------------------------------*\ - - FILE........: fft.c - AUTHOR......: Bruce Robertson - DATE CREATED: 20/11/2010 - - Bridging function to the kiss_fft package. - + + FILE........: fft.c + AUTHOR......: Bruce Robertson + DATE CREATED: 20/11/2010 + + Bridging function to the kiss_fft package. + \*---------------------------------------------------------------------------*/ /* @@ -29,9 +29,9 @@ #include "kiss_fft.h" /*---------------------------------------------------------------------------*\ - - GLOBALS - + + GLOBALS + \*---------------------------------------------------------------------------*/ kiss_fft_cpx *fin; @@ -40,10 +40,10 @@ kiss_fft_cfg cfg_forward; kiss_fft_cfg cfg_reverse; /*---------------------------------------------------------------------------*\ - - initialize_fft(int n) - - Initialisation function for kiss_fft. This assumes that all calls to fft() + + initialize_fft(int n) + + Initialisation function for kiss_fft. This assumes that all calls to fft() use the same datatypes and are one arrays of the same size. \*---------------------------------------------------------------------------*/ @@ -62,8 +62,8 @@ initialize_fft (int n) } /*---------------------------------------------------------------------------*\ - - fft(float x[], int n, int isign) + + fft(float x[], int n, int isign) Function that calls kiss_fft with the signature of four1 from NRC. \*---------------------------------------------------------------------------*/ diff --git a/gr-vocoder/lib/codec2/fft.h b/gr-vocoder/lib/codec2/fft.h index 84c6737bd..d5f83045e 100644 --- a/gr-vocoder/lib/codec2/fft.h +++ b/gr-vocoder/lib/codec2/fft.h @@ -1,5 +1,5 @@ /*---------------------------------------------------------------------------*\ - + FILE........: fft.h AUTHOR......: Bruce Robertson DATE CREATED: 29/11/2010 diff --git a/gr-vocoder/lib/codec2/fq20.sh b/gr-vocoder/lib/codec2/fq20.sh index b83784b43..9ccf739dc 100755 --- a/gr-vocoder/lib/codec2/fq20.sh +++ b/gr-vocoder/lib/codec2/fq20.sh @@ -1,7 +1,7 @@ #!/bin/sh # fq20.shsh # David Rowe 27 July 2010 -# +# # Decode a file with fully quantised codec at 20ms frame rate ../src/sinedec ../raw/$1.raw $1.mdl -o $1_phase0_lsp_20_EWo2.raw --phase 0 --lpc 10 --lsp --postfilter --dec diff --git a/gr-vocoder/lib/codec2/generate_codebook.c b/gr-vocoder/lib/codec2/generate_codebook.c index 0bea80d85..705f29d38 100644 --- a/gr-vocoder/lib/codec2/generate_codebook.c +++ b/gr-vocoder/lib/codec2/generate_codebook.c @@ -1,9 +1,9 @@ /*---------------------------------------------------------------------------*\ - + FILE........: generate_codebook.c - AUTHOR......: Bruce Perens - DATE CREATED: 29 Sep 2010 - + AUTHOR......: Bruce Perens + DATE CREATED: 29 Sep 2010 + Generate header files containing LSP quantisers, runs at compile time. \*---------------------------------------------------------------------------*/ @@ -92,7 +92,7 @@ get_float(FILE * in, const char * name, char * * cursor, char * buffer, while ( (c = *s) != '\0' && !isdigit(c) && c != '-' && c != '.' ) s++; - + /* Comments start with "#" and continue to the end of the line. */ if ( c != '\0' && c != '#' ) { char * end = 0; diff --git a/gr-vocoder/lib/codec2/globals.c b/gr-vocoder/lib/codec2/globals.c index f2182f79a..da2faf722 100644 --- a/gr-vocoder/lib/codec2/globals.c +++ b/gr-vocoder/lib/codec2/globals.c @@ -1,11 +1,11 @@ /*---------------------------------------------------------------------------*\ - + FILE........: globals.c - AUTHOR......: David Rowe - DATE CREATED: 11/5/94 - - Globals for sinusoidal speech coder. - + AUTHOR......: David Rowe + DATE CREATED: 11/5/94 + + Globals for sinusoidal speech coder. + \*---------------------------------------------------------------------------*/ /* diff --git a/gr-vocoder/lib/codec2/globals.h b/gr-vocoder/lib/codec2/globals.h index cef720344..d01e7b4e9 100644 --- a/gr-vocoder/lib/codec2/globals.h +++ b/gr-vocoder/lib/codec2/globals.h @@ -1,11 +1,11 @@ /*---------------------------------------------------------------------------*\ - + FILE........: globals.h AUTHOR......: David Rowe - DATE CREATED: 1/11/94 - - Globals for sinusoidal speech coder. - + DATE CREATED: 1/11/94 + + Globals for sinusoidal speech coder. + \*---------------------------------------------------------------------------*/ /* diff --git a/gr-vocoder/lib/codec2/interp.c b/gr-vocoder/lib/codec2/interp.c index 257c4a81c..64372b050 100644 --- a/gr-vocoder/lib/codec2/interp.c +++ b/gr-vocoder/lib/codec2/interp.c @@ -41,10 +41,10 @@ float sample_log_amp(MODEL *model, float w); /*---------------------------------------------------------------------------*\ - FUNCTION....: interp() - AUTHOR......: David Rowe - DATE CREATED: 22/8/10 - + FUNCTION....: interp() + AUTHOR......: David Rowe + DATE CREATED: 22/8/10 + Given two frames decribed by model parameters 20ms apart, determines the model parameters of the 10ms frame between them. Assumes voicing is available for middle (interpolated) frame. Outputs are @@ -58,7 +58,7 @@ float sample_log_amp(MODEL *model, float w); When this function is used (--dec mode) bg noise appears to be amplitude modulated, and gets louder. The interp_lsp() function below seems to do a better job. - + \*---------------------------------------------------------------------------*/ void interpolate( @@ -97,13 +97,13 @@ void interpolate( /*---------------------------------------------------------------------------*\ FUNCTION....: sample_log_amp() - AUTHOR......: David Rowe - DATE CREATED: 22/8/10 - + AUTHOR......: David Rowe + DATE CREATED: 22/8/10 + Samples the amplitude envelope at an arbitrary frequency w. Uses linear interpolation in the log domain to sample between harmonic amplitudes. - + \*---------------------------------------------------------------------------*/ float sample_log_amp(MODEL *model, float w) @@ -125,9 +125,9 @@ float sample_log_amp(MODEL *model, float w) log_amp = (1.0-f)*log10(model->A[model->L] + 1E-6); } else { - log_amp = (1.0-f)*log10(model->A[m] + 1E-6) + + log_amp = (1.0-f)*log10(model->A[m] + 1E-6) + f*log10(model->A[m+1] + 1E-6); - //printf("m=%d A[m] %f A[m+1] %f x %f %f %f\n", m, model->A[m], + //printf("m=%d A[m] %f A[m+1] %f x %f %f %f\n", m, model->A[m], // model->A[m+1], pow(10.0, log_amp), // (1-f), f); } @@ -138,13 +138,13 @@ float sample_log_amp(MODEL *model, float w) /*---------------------------------------------------------------------------*\ FUNCTION....: sample_log_amp_quad() - AUTHOR......: David Rowe - DATE CREATED: 9 March 2011 - + AUTHOR......: David Rowe + DATE CREATED: 9 March 2011 + Samples the amplitude envelope at an arbitrary frequency w. Uses quadratic interpolation in the log domain to sample between harmonic amplitudes. - + y(x) = ax*x + bx + c We assume three points are x=-1, x=0, x=1, which we map to m-1,m,m+1 @@ -172,7 +172,7 @@ float sample_log_amp_quad(MODEL *model, float w) log_amp = a*x*x + b*x + c; //printf("m=%d A[m-1] %f A[m] %f A[m+1] %f w %f x %f log_amp %f\n", m, - // model->A[m-1], + // model->A[m-1], // model->A[m], model->A[m+1], w, x, pow(10.0, log_amp)); return log_amp; } @@ -180,14 +180,14 @@ float sample_log_amp_quad(MODEL *model, float w) /*---------------------------------------------------------------------------*\ FUNCTION....: sample_log_amp_quad_nl() - AUTHOR......: David Rowe + AUTHOR......: David Rowe DATE CREATED: 10 March 2011 - + Samples the amplitude envelope at an arbitrary frequency w. Uses quadratic interpolation in the log domain to sample between harmonic amplitudes. This version can handle non-linear steps along a freq axis defined by arbitrary steps. - + y(x) = ax*x + bx + c We assume three points are (x_1,y_1), (0,y0) and (x1,y1). @@ -215,9 +215,9 @@ float sample_log_amp_quad_nl( for (i=0; i<np; i++) if (fabs(w[i] - w_sample) < best_dist) { best_dist = fabs(w[i] - w_sample); - m = i; + m = i; } - + /* stay one point away from edge of array */ if (m < 1) m = 1; @@ -234,13 +234,13 @@ float sample_log_amp_quad_nl( a = (y_1*x1 - y1*x_1 + c*x_1 - c*x1)/(x_1*x_1*x1 - x1*x1*x_1); b = (y1 -a*x1*x1 - c)/x1; x = w_sample - w[m]; - + //printf("%f %f %f\n", w[0], w[1], w[2]); //printf("%f %f %f %f %f %f\n", x_1, y_1, 0.0, y0, x1, y1); log_amp = a*x*x + b*x + c; //printf("a %f b %f c %f\n", a, b, c); //printf("m=%d A[m-1] %f A[m] %f A[m+1] %f w_sample %f w[m] %f x %f log_amp %f\n", m, - // A[m-1], + // A[m-1], // A[m], A[m+1], w_sample, w[m], x, log_amp); //exit(0); return log_amp; @@ -254,20 +254,20 @@ float fres[] = {100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, /*---------------------------------------------------------------------------*\ FUNCTION....: resample_amp_nl() - AUTHOR......: David Rowe + AUTHOR......: David Rowe DATE CREATED: 7 March 2011 - - Converts the current model with L {Am} samples spaced Wo apart to + + Converts the current model with L {Am} samples spaced Wo apart to RES_POINTS samples spaced Wo/RES_POINTS apart. Then subtracts from the previous frames samples to get the delta. \*---------------------------------------------------------------------------*/ -void resample_amp_fixed(MODEL *model, +void resample_amp_fixed(MODEL *model, float w[], float A[], float wres[], float Ares[], - float AresdB_prev[], - float AresdB[], + float AresdB_prev[], + float AresdB[], float deltat[]) { int i; @@ -280,7 +280,7 @@ void resample_amp_fixed(MODEL *model, for(i=0; i<RES_POINTS; i++) { wres[i] = fres[i]*PI/4000.0; } - + for(i=0; i<RES_POINTS; i++) { Ares[i] = pow(10.0,sample_log_amp_quad_nl(w, A, model->L, wres[i])); } @@ -297,13 +297,13 @@ void resample_amp_fixed(MODEL *model, /*---------------------------------------------------------------------------*\ FUNCTION....: resample_amp_nl() - AUTHOR......: David Rowe + AUTHOR......: David Rowe DATE CREATED: 7 March 2011 - + Converts the current model with L {Am} samples spaced Wo apart to M samples spaced Wo/M apart. Then converts back to L {Am} samples. used to prototype constant rate Amplitude encoding ideas. - + Returns the SNR in dB. \*---------------------------------------------------------------------------*/ @@ -346,7 +346,7 @@ float resample_amp_nl(MODEL *model, int m, float AresdB_prev[]) #endif signal = noise = 0.0; - + for(i=1; i<model->L; i++) { new_A = pow(10.0,sample_log_amp_quad_nl(wres, Ares, RES_POINTS, model->Wo*i)); signal += pow(model->A[i], 2.0); @@ -364,13 +364,13 @@ float resample_amp_nl(MODEL *model, int m, float AresdB_prev[]) /*---------------------------------------------------------------------------*\ FUNCTION....: resample_amp() - AUTHOR......: David Rowe + AUTHOR......: David Rowe DATE CREATED: 10 March 2011 - + Converts the current model with L {Am} samples spaced Wo apart to M samples with a non-linear spacing. Then converts back to L {Am} samples. used to prototype constant rate Amplitude encoding ideas. - + Returns the SNR in dB. \*---------------------------------------------------------------------------*/ @@ -394,7 +394,7 @@ float resample_amp(MODEL *model, int m) //dump_resample(&model_m); signal = noise = 0.0; - + for(i=1; i<model->L/4; i++) { new_A = pow(10,sample_log_amp_quad(&model_m, i*model->Wo)); signal += pow(model->A[i], 2.0); @@ -411,10 +411,10 @@ float resample_amp(MODEL *model, int m) /*---------------------------------------------------------------------------*\ - FUNCTION....: interp_lsp() - AUTHOR......: David Rowe + FUNCTION....: interp_lsp() + AUTHOR......: David Rowe DATE CREATED: 10 Nov 2010 - + Given two frames decribed by model parameters 20ms apart, determines the model parameters of the 10ms frame between them. Assumes voicing is available for middle (interpolated) frame. Outputs are @@ -422,7 +422,7 @@ float resample_amp(MODEL *model, int m) This version uses interpolation of LSPs, seems to do a better job with bg noise. - + \*---------------------------------------------------------------------------*/ void interpolate_lsp( @@ -469,5 +469,5 @@ void interpolate_lsp( /* convert back to amplitudes */ lsp_to_lpc(lsps, ak_interp, LPC_ORD); - aks_to_M2(ak_interp, LPC_ORD, interp, e, &snr, 0); + aks_to_M2(ak_interp, LPC_ORD, interp, e, &snr, 0); } diff --git a/gr-vocoder/lib/codec2/interp.h b/gr-vocoder/lib/codec2/interp.h index d41eac3f8..d50972614 100644 --- a/gr-vocoder/lib/codec2/interp.h +++ b/gr-vocoder/lib/codec2/interp.h @@ -31,7 +31,7 @@ #define RES_POINTS 20 void interpolate(MODEL *interp, MODEL *prev, MODEL *next); -void interpolate_lsp(MODEL *interp, MODEL *prev, MODEL *next, +void interpolate_lsp(MODEL *interp, MODEL *prev, MODEL *next, float *prev_lsps, float prev_e, float *next_lsps, float next_e, float *ak_interp); diff --git a/gr-vocoder/lib/codec2/kiss_fft.c b/gr-vocoder/lib/codec2/kiss_fft.c index 465d6c97a..17b4e7211 100644 --- a/gr-vocoder/lib/codec2/kiss_fft.c +++ b/gr-vocoder/lib/codec2/kiss_fft.c @@ -250,7 +250,7 @@ void kf_work( const kiss_fft_cpx * Fout_end = Fout + p*m; #ifdef _OPENMP - // use openmp extensions at the + // use openmp extensions at the // top-level (not recursive) if (fstride==1 && p<=5) { @@ -258,15 +258,15 @@ void kf_work( // execute the p different work units in different threads # pragma omp parallel for - for (k=0;k<p;++k) + for (k=0;k<p;++k) kf_work( Fout +k*m, f+ fstride*in_stride*k,fstride*p,in_stride,factors,st); // all threads have joined by this point switch (p) { case 2: kf_bfly2(Fout,fstride,st,m); break; - case 3: kf_bfly3(Fout,fstride,st,m); break; + case 3: kf_bfly3(Fout,fstride,st,m); break; case 4: kf_bfly4(Fout,fstride,st,m); break; - case 5: kf_bfly5(Fout,fstride,st,m); break; + case 5: kf_bfly5(Fout,fstride,st,m); break; default: kf_bfly_generic(Fout,fstride,st,m,p); break; } return; @@ -282,7 +282,7 @@ void kf_work( do{ // recursive call: // DFT of size m*p performed by doing - // p instances of smaller DFTs of size m, + // p instances of smaller DFTs of size m, // each one takes a decimated version of the input kf_work( Fout , f, fstride*p, in_stride, factors,st); f += fstride*in_stride; @@ -291,21 +291,21 @@ void kf_work( Fout=Fout_beg; - // recombine the p smaller DFTs + // recombine the p smaller DFTs switch (p) { case 2: kf_bfly2(Fout,fstride,st,m); break; - case 3: kf_bfly3(Fout,fstride,st,m); break; + case 3: kf_bfly3(Fout,fstride,st,m); break; case 4: kf_bfly4(Fout,fstride,st,m); break; - case 5: kf_bfly5(Fout,fstride,st,m); break; + case 5: kf_bfly5(Fout,fstride,st,m); break; default: kf_bfly_generic(Fout,fstride,st,m,p); break; } } /* facbuf is populated by p1,m1,p2,m2, ... - where + where p[i] * m[i] = m[i-1] m0 = n */ -static +static void kf_factor(int n,int * facbuf) { int p=4; diff --git a/gr-vocoder/lib/codec2/kiss_fft.h b/gr-vocoder/lib/codec2/kiss_fft.h index 64c50f4aa..c01722cad 100644 --- a/gr-vocoder/lib/codec2/kiss_fft.h +++ b/gr-vocoder/lib/codec2/kiss_fft.h @@ -28,17 +28,17 @@ extern "C" { # define kiss_fft_scalar __m128 #define KISS_FFT_MALLOC(nbytes) _mm_malloc(nbytes,16) #define KISS_FFT_FREE _mm_free -#else +#else #define KISS_FFT_MALLOC malloc #define KISS_FFT_FREE free -#endif +#endif #ifdef FIXED_POINT -#include <sys/types.h> +#include <sys/types.h> # if (FIXED_POINT == 32) # define kiss_fft_scalar int32_t -# else +# else # define kiss_fft_scalar int16_t # endif #else @@ -55,9 +55,9 @@ typedef struct { typedef struct kiss_fft_state* kiss_fft_cfg; -/* +/* * kiss_fft_alloc - * + * * Initialize a FFT (or IFFT) algorithm's cfg/state buffer. * * typical usage: kiss_fft_cfg mycfg=kiss_fft_alloc(1024,0,NULL,NULL); @@ -67,18 +67,18 @@ typedef struct kiss_fft_state* kiss_fft_cfg; * * If lenmem is NULL, then kiss_fft_alloc will allocate a cfg buffer using malloc. * The returned value should be free()d when done to avoid memory leaks. - * + * * The state can be placed in a user supplied buffer 'mem': * If lenmem is not NULL and mem is not NULL and *lenmem is large enough, * then the function places the cfg in mem and the size used in *lenmem * and returns mem. - * + * * If lenmem is not NULL and ( mem is NULL or *lenmem is not large enough), - * then the function returns NULL and places the minimum cfg + * then the function returns NULL and places the minimum cfg * buffer size in *lenmem. * */ -kiss_fft_cfg kiss_fft_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem); +kiss_fft_cfg kiss_fft_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem); /* * kiss_fft(cfg,in_out_buf) @@ -97,16 +97,16 @@ void kiss_fft(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout); * */ void kiss_fft_stride(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int fin_stride); -/* If kiss_fft_alloc allocated a buffer, it is one contiguous +/* If kiss_fft_alloc allocated a buffer, it is one contiguous buffer and can be simply free()d when no longer needed*/ #define kiss_fft_free free /* - Cleans up some memory that gets managed internally. Not necessary to call, but it might clean up + Cleans up some memory that gets managed internally. Not necessary to call, but it might clean up your compiler output to call this before you exit. */ void kiss_fft_cleanup(void); - + /* * Returns the smallest integer k, such that k>=n and k has only "fast" factors (2,3,5) @@ -118,7 +118,7 @@ int kiss_fft_next_fast_size(int n); (kiss_fft_next_fast_size( ((n)+1)>>1)<<1) #ifdef __cplusplus -} +} #endif #endif diff --git a/gr-vocoder/lib/codec2/lpc.c b/gr-vocoder/lib/codec2/lpc.c index ba8011377..1784f75ca 100644 --- a/gr-vocoder/lib/codec2/lpc.c +++ b/gr-vocoder/lib/codec2/lpc.c @@ -1,11 +1,11 @@ /*---------------------------------------------------------------------------*\ - - FILE........: lpc.c - AUTHOR......: David Rowe - DATE CREATED: 30/9/90 - - Linear Prediction functions written in C. - + + FILE........: lpc.c + AUTHOR......: David Rowe + DATE CREATED: 30/9/90 + + Linear Prediction functions written in C. + \*---------------------------------------------------------------------------*/ /* @@ -34,11 +34,11 @@ #include "lpc.h" /*---------------------------------------------------------------------------*\ - - hanning_window() - - Hanning windows a frame of speech samples. - + + hanning_window() + + Hanning windows a frame of speech samples. + \*---------------------------------------------------------------------------*/ void hanning_window( @@ -54,12 +54,12 @@ void hanning_window( } /*---------------------------------------------------------------------------*\ - - autocorrelate() - - Finds the first P autocorrelation values of an array of windowed speech - samples Sn[]. - + + autocorrelate() + + Finds the first P autocorrelation values of an array of windowed speech + samples Sn[]. + \*---------------------------------------------------------------------------*/ void autocorrelate( @@ -79,12 +79,12 @@ void autocorrelate( } /*---------------------------------------------------------------------------*\ - - autocorrelate_freq() - + + autocorrelate_freq() + Finds the first P autocorrelation values from an array of frequency domain - power samples. - + power samples. + \*---------------------------------------------------------------------------*/ void autocorrelate_freq( @@ -106,18 +106,18 @@ void autocorrelate_freq( } /*---------------------------------------------------------------------------*\ - - levinson_durbin() - - Given P+1 autocorrelation coefficients, finds P Linear Prediction Coeff. + + levinson_durbin() + + Given P+1 autocorrelation coefficients, finds P Linear Prediction Coeff. (LPCs) where P is the order of the LPC all-pole model. The Levinson-Durbin - algorithm is used, and is described in: - - J. Makhoul - "Linear prediction, a tutorial review" - Proceedings of the IEEE - Vol-63, No. 4, April 1975 - + algorithm is used, and is described in: + + J. Makhoul + "Linear prediction, a tutorial review" + Proceedings of the IEEE + Vol-63, No. 4, April 1975 + \*---------------------------------------------------------------------------*/ void levinson_durbin( @@ -152,18 +152,18 @@ void levinson_durbin( for(i=1; i<=order; i++) lpcs[i] = a[order][i]; - lpcs[0] = 1.0; + lpcs[0] = 1.0; } /*---------------------------------------------------------------------------*\ - - inverse_filter() - + + inverse_filter() + Inverse Filter, A(z). Produces an array of residual samples from an array - of input samples and linear prediction coefficients. - + of input samples and linear prediction coefficients. + The filter memory is stored in the first order samples of the input array. - + \*---------------------------------------------------------------------------*/ void inverse_filter( @@ -180,26 +180,26 @@ void inverse_filter( res[i] = 0.0; for(j=0; j<=order; j++) res[i] += Sn[i-j]*a[j]; - } + } } /*---------------------------------------------------------------------------*\ - - synthesis_filter() - - C version of the Speech Synthesis Filter, 1/A(z). Given an array of + + synthesis_filter() + + C version of the Speech Synthesis Filter, 1/A(z). Given an array of residual or excitation samples, and the the LP filter coefficients, this function will produce an array of speech samples. This filter structure is - IIR. - - The synthesis filter has memory as well, this is treated in the same way - as the memory for the inverse filter (see inverse_filter() notes above). - The difference is that the memory for the synthesis filter is stored in + IIR. + + The synthesis filter has memory as well, this is treated in the same way + as the memory for the inverse filter (see inverse_filter() notes above). + The difference is that the memory for the synthesis filter is stored in the output array, wheras the memory of the inverse filter is stored in the - input array. - - Note: the calling function must update the filter memory. - + input array. + + Note: the calling function must update the filter memory. + \*---------------------------------------------------------------------------*/ void synthesis_filter( @@ -222,12 +222,12 @@ void synthesis_filter( } /*---------------------------------------------------------------------------*\ - - find_aks() - - This function takes a frame of samples, and determines the linear - prediction coefficients for that frame of samples. - + + find_aks() + + This function takes a frame of samples, and determines the linear + prediction coefficients for that frame of samples. + \*---------------------------------------------------------------------------*/ void find_aks( @@ -257,11 +257,11 @@ void find_aks( } /*---------------------------------------------------------------------------*\ - - weight() - - Weights a vector of LPCs. - + + weight() + + Weights a vector of LPCs. + \*---------------------------------------------------------------------------*/ void weight( @@ -272,8 +272,8 @@ void weight( ) { int i; - + for(i=1; i<=order; i++) akw[i] = ak[i]*pow(gamma,(float)i); } - + diff --git a/gr-vocoder/lib/codec2/lpc.h b/gr-vocoder/lib/codec2/lpc.h index ead05e1ba..9125189d1 100644 --- a/gr-vocoder/lib/codec2/lpc.h +++ b/gr-vocoder/lib/codec2/lpc.h @@ -1,11 +1,11 @@ /*---------------------------------------------------------------------------*\ - - FILE........: lpc.h - AUTHOR......: David Rowe - DATE CREATED: 24/8/09 - - Linear Prediction functions written in C. - + + FILE........: lpc.h + AUTHOR......: David Rowe + DATE CREATED: 24/8/09 + + Linear Prediction functions written in C. + \*---------------------------------------------------------------------------*/ /* diff --git a/gr-vocoder/lib/codec2/lsp.c b/gr-vocoder/lib/codec2/lsp.c index 47001c1ef..b57507bb4 100644 --- a/gr-vocoder/lib/codec2/lsp.c +++ b/gr-vocoder/lib/codec2/lsp.c @@ -153,7 +153,7 @@ int lpc_to_lsp (float *a, int lpcrdr, float *freq, int nb, float delta) float Q[LSP_MAX_ORDER + 1]; float P[LSP_MAX_ORDER + 1]; - flag = 1; + flag = 1; m = lpcrdr/2; /* order of P'(z) & Q'(z) polynimials */ /* Allocate memory space for polynomials */ @@ -274,7 +274,7 @@ void lsp_to_lpc(float *lsp, float *ak, int lpcrdr) int m = lpcrdr/2; float freq[LSP_MAX_ORDER]; float Wp[(LSP_MAX_ORDER * 4) + 2]; - + /* convert from radians to the x=cos(w) domain */ for(i=0; i<lpcrdr; i++) diff --git a/gr-vocoder/lib/codec2/nlp.c b/gr-vocoder/lib/codec2/nlp.c index 42ae90919..0d5e530ce 100644 --- a/gr-vocoder/lib/codec2/nlp.c +++ b/gr-vocoder/lib/codec2/nlp.c @@ -1,11 +1,11 @@ /*---------------------------------------------------------------------------*\ - - FILE........: nlp.c - AUTHOR......: David Rowe - DATE CREATED: 23/3/93 - - Non Linear Pitch (NLP) estimation functions. - + + FILE........: nlp.c + AUTHOR......: David Rowe + DATE CREATED: 23/3/93 + + Non Linear Pitch (NLP) estimation functions. + \*---------------------------------------------------------------------------*/ /* @@ -35,9 +35,9 @@ #include <stdlib.h> /*---------------------------------------------------------------------------*\ - - DEFINES - + + DEFINES + \*---------------------------------------------------------------------------*/ #define PMAX_M 600 /* maximum NLP analysis window size */ @@ -52,9 +52,9 @@ #define NLP_NTAP 48 /* Decimation LPF order */ /*---------------------------------------------------------------------------*\ - - GLOBALS - + + GLOBALS + \*---------------------------------------------------------------------------*/ /* 48 tap 600Hz low pass FIR filter coefficients */ @@ -117,14 +117,14 @@ typedef struct { } NLP; float post_process_mbe(COMP Fw[], int pmin, int pmax, float gmax); -float post_process_sub_multiples(COMP Fw[], +float post_process_sub_multiples(COMP Fw[], int pmin, int pmax, float gmax, int gmax_bin, float *prev_Wo); /*---------------------------------------------------------------------------*\ - - nlp_create() - + + nlp_create() + Initialisation function for NLP pitch estimator. \*---------------------------------------------------------------------------*/ @@ -149,9 +149,9 @@ void *nlp_create() } /*---------------------------------------------------------------------------*\ - + nlp_destory() - + Initialisation function for NLP pitch estimator. \*---------------------------------------------------------------------------*/ @@ -163,9 +163,9 @@ void nlp_destroy(void *nlp_state) } /*---------------------------------------------------------------------------*\ - - nlp() - + + nlp() + Determines the pitch in samples using the Non Linear Pitch (NLP) algorithm [1]. Returns the fundamental in Hz. Note that the actual pitch estimate is for the centre of the M sample Sn[] vector, not @@ -189,11 +189,11 @@ void nlp_destroy(void *nlp_state) References: [1] http://www.itr.unisa.edu.au/~steven/thesis/dgr.pdf Chapter 4 - + \*---------------------------------------------------------------------------*/ float nlp( - void *nlp_state, + void *nlp_state, float Sn[], /* input speech vector */ int n, /* frames shift (no. new samples in Sn[]) */ int m, /* analysis window size */ @@ -271,7 +271,7 @@ float nlp( } } - best_f0 = post_process_sub_multiples(Fw, pmin, pmax, gmax, gmax_bin, + best_f0 = post_process_sub_multiples(Fw, pmin, pmax, gmax, gmax_bin, prev_Wo); /* Shift samples in buffer to make room for new samples */ @@ -282,13 +282,13 @@ float nlp( /* return pitch and F0 estimate */ *pitch = (float)SAMPLE_RATE/best_f0; - return(best_f0); + return(best_f0); } /*---------------------------------------------------------------------------*\ - - post_process_sub_multiples() - + + post_process_sub_multiples() + Given the global maximma of Fw[] we search interger submultiples for local maxima. If local maxima exist and they are above an experimentally derived threshold (OK a magic number I pulled out of @@ -306,7 +306,7 @@ float nlp( \*---------------------------------------------------------------------------*/ -float post_process_sub_multiples(COMP Fw[], +float post_process_sub_multiples(COMP Fw[], int pmin, int pmax, float gmax, int gmax_bin, float *prev_Wo) { @@ -361,4 +361,4 @@ float post_process_sub_multiples(COMP Fw[], return best_f0; } - + diff --git a/gr-vocoder/lib/codec2/nlp.h b/gr-vocoder/lib/codec2/nlp.h index 88a3733dc..5e11f1186 100644 --- a/gr-vocoder/lib/codec2/nlp.h +++ b/gr-vocoder/lib/codec2/nlp.h @@ -1,11 +1,11 @@ /*---------------------------------------------------------------------------*\ - - FILE........: nlp.c - AUTHOR......: David Rowe - DATE CREATED: 23/3/93 - - Non Linear Pitch (NLP) estimation functions. - + + FILE........: nlp.c + AUTHOR......: David Rowe + DATE CREATED: 23/3/93 + + Non Linear Pitch (NLP) estimation functions. + \*---------------------------------------------------------------------------*/ /* @@ -32,7 +32,7 @@ void *nlp_create(); void nlp_destroy(void *nlp_state); -float nlp(void *nlp_state, float Sn[], int n, int m, int pmin, int pmax, +float nlp(void *nlp_state, float Sn[], int n, int m, int pmin, int pmax, float *pitch, COMP Sw[], float *prev_Wo); float test_candidate_mbe(COMP Sw[], float f0, COMP Sw_[]); diff --git a/gr-vocoder/lib/codec2/pack.c b/gr-vocoder/lib/codec2/pack.c index 31551dfc4..e04c9378c 100644 --- a/gr-vocoder/lib/codec2/pack.c +++ b/gr-vocoder/lib/codec2/pack.c @@ -65,7 +65,7 @@ pack( bitArray[wordIndex] |= ((unsigned char)((field >> (fieldWidth - sliceWidth)) << (bitsLeft - sliceWidth))); - + *bitIndex = bI + sliceWidth; fieldWidth -= sliceWidth; } while ( fieldWidth != 0 ); @@ -91,7 +91,7 @@ unpack( bitsLeft < fieldWidth ? bitsLeft : fieldWidth; field |= (((bitArray[bI >> ShiftRight] >> (bitsLeft - sliceWidth)) & ((1 << sliceWidth) - 1)) << (fieldWidth - sliceWidth)); - + *bitIndex = bI + sliceWidth; fieldWidth -= sliceWidth; } while ( fieldWidth != 0 ); diff --git a/gr-vocoder/lib/codec2/phase.c b/gr-vocoder/lib/codec2/phase.c index 0e1a14a60..69cc6697f 100644 --- a/gr-vocoder/lib/codec2/phase.c +++ b/gr-vocoder/lib/codec2/phase.c @@ -1,11 +1,11 @@ /*---------------------------------------------------------------------------*\ - - FILE........: phase.c - AUTHOR......: David Rowe - DATE CREATED: 1/2/09 - + + FILE........: phase.c + AUTHOR......: David Rowe + DATE CREATED: 1/2/09 + Functions for modelling and synthesising phase. - + \*---------------------------------------------------------------------------*/ /* @@ -22,7 +22,7 @@ License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not,see <http://www.gnu.org/licenses/>. + along with this program; if not,see <http://www.gnu.org/licenses/>. */ #include "defines.h" @@ -101,14 +101,14 @@ void aks_to_H( phase_synth_zero_order() - Synthesises phases based on SNR and a rule based approach. No phase + Synthesises phases based on SNR and a rule based approach. No phase parameters are required apart from the SNR (which can be reduced to a 1 bit V/UV decision per frame). The phase of each harmonic is modelled as the phase of a LPC synthesis filter excited by an impulse. Unlike the first order model the position of the impulse is not transmitted, so we create - an excitation pulse train using a rule based approach. + an excitation pulse train using a rule based approach. Consider a pulse train with a pulse starting time n=0, with pulses repeated at a rate of Wo, the fundamental frequency. A pulse train @@ -149,10 +149,10 @@ void aks_to_H( This E[m] then gets passed through the LPC synthesis filter to determine the final harmonic phase. - + Comparing to speech synthesised using original phases: - - Through headphones speech synthesised with this model is not as + - Through headphones speech synthesised with this model is not as good. Through a loudspeaker it is very close to original phases. - If there are voicing errors, the speech can sound clicky or @@ -207,21 +207,21 @@ void phase_synth_zero_order( G = 1.0; aks_to_H(model, aks, G, H, order); - /* + /* Update excitation fundamental phase track, this sets the position of each pitch pulse during voiced speech. After much experiment I found that using just this frame's Wo improved quality for UV sounds compared to interpolating two frames Wo like this: - + ex_phase[0] += (*prev_Wo+mode->Wo)*N/2; */ - + ex_phase[0] += (model->Wo)*N; ex_phase[0] -= TWO_PI*floor(ex_phase[0]/TWO_PI + 0.5); r = TWO_PI/GLOTTAL_FFT_SIZE; for(m=1; m<=model->L; m++) { - + /* generate excitation */ if (model->voiced) { @@ -254,7 +254,7 @@ void phase_synth_zero_order( A_[m].imag = H[m].imag*Ex[m].real + H[m].real*Ex[m].imag; /* modify sinusoidal phase */ - + new_phi = atan2(A_[m].imag, A_[m].real+1E-12); model->phi[m] = new_phi; } diff --git a/gr-vocoder/lib/codec2/phase.h b/gr-vocoder/lib/codec2/phase.h index 833bc7cdc..4f1a62089 100644 --- a/gr-vocoder/lib/codec2/phase.h +++ b/gr-vocoder/lib/codec2/phase.h @@ -1,11 +1,11 @@ /*---------------------------------------------------------------------------*\ - - FILE........: phase.h - AUTHOR......: David Rowe - DATE CREATED: 1/2/09 - + + FILE........: phase.h + AUTHOR......: David Rowe + DATE CREATED: 1/2/09 + Functions for modelling phase. - + \*---------------------------------------------------------------------------*/ /* @@ -28,7 +28,7 @@ #ifndef __PHASE__ #define __PHASE__ -void phase_synth_zero_order(MODEL *model, float aks[], float *ex_phase, +void phase_synth_zero_order(MODEL *model, float aks[], float *ex_phase, int order); #endif diff --git a/gr-vocoder/lib/codec2/postfilter.c b/gr-vocoder/lib/codec2/postfilter.c index 6e17eeb87..05d77c845 100644 --- a/gr-vocoder/lib/codec2/postfilter.c +++ b/gr-vocoder/lib/codec2/postfilter.c @@ -1,13 +1,13 @@ /*---------------------------------------------------------------------------*\ - + FILE........: postfilter.c - AUTHOR......: David Rowe + AUTHOR......: David Rowe DATE CREATED: 13/09/09 - + Postfilter to improve sound quality for speech with high levels of background noise. Unlike mixed-excitation models requires no bits to be transmitted to handle background noise. - + \*---------------------------------------------------------------------------*/ /* @@ -71,7 +71,7 @@ This idea is rather experimental. Some potential problems that may happen: - + 1/ If someone says "aaaaaaaahhhhhhhhh" will background estimator track up to speech level? This would be a bad thing. @@ -88,13 +88,13 @@ 5/ Not sure what happens during long periods of voiced speech e.g. "sshhhhhhh" - + \*---------------------------------------------------------------------------*/ void postfilter( MODEL *model, float *bg_est -) +) { int m, uv; float e; diff --git a/gr-vocoder/lib/codec2/postfilter.h b/gr-vocoder/lib/codec2/postfilter.h index bf080b1b6..156714e54 100644 --- a/gr-vocoder/lib/codec2/postfilter.h +++ b/gr-vocoder/lib/codec2/postfilter.h @@ -1,11 +1,11 @@ /*---------------------------------------------------------------------------*\ - + FILE........: postfilter.h - AUTHOR......: David Rowe + AUTHOR......: David Rowe DATE CREATED: 13/09/09 - + Postfilter header file. - + \*---------------------------------------------------------------------------*/ /* diff --git a/gr-vocoder/lib/codec2/quantise.c b/gr-vocoder/lib/codec2/quantise.c index ff8d156b5..c09803099 100644 --- a/gr-vocoder/lib/codec2/quantise.c +++ b/gr-vocoder/lib/codec2/quantise.c @@ -1,11 +1,11 @@ /*---------------------------------------------------------------------------*\ - + FILE........: quantise.c - AUTHOR......: David Rowe - DATE CREATED: 31/5/92 - - Quantisation functions for the sinusoidal coder. - + AUTHOR......: David Rowe + DATE CREATED: 31/5/92 + + Quantisation functions for the sinusoidal coder. + \*---------------------------------------------------------------------------*/ /* @@ -41,16 +41,16 @@ #define LSP_DELTA1 0.01 /* grid spacing for LSP root searches */ /*---------------------------------------------------------------------------*\ - + FUNCTION HEADERS \*---------------------------------------------------------------------------*/ -float speech_to_uq_lsps(float lsp[], float ak[], float Sn[], float w[], +float speech_to_uq_lsps(float lsp[], float ak[], float Sn[], float w[], int order); /*---------------------------------------------------------------------------*\ - + FUNCTIONS \*---------------------------------------------------------------------------*/ @@ -61,7 +61,7 @@ int lsp_bits(int i) { #if VECTOR_QUANTISATION /*---------------------------------------------------------------------------*\ - + quantise_uniform Simulates uniform quantising of a float. @@ -146,7 +146,7 @@ long quantise(const float * cb, float vec[], float w[], int k, int m, float *se) } /*---------------------------------------------------------------------------*\ - + lspd_quantise Scalar lsp difference quantiser. @@ -154,10 +154,10 @@ long quantise(const float * cb, float vec[], float w[], int k, int m, float *se) \*---------------------------------------------------------------------------*/ void lspd_quantise( - float lsp[], + float lsp[], float lsp_[], int order -) +) { int i,k,m; float lsp_hz[LPC_MAX]; @@ -183,8 +183,8 @@ void lspd_quantise( wt[0] = 1.0; for(i=0; i<order; i++) { - if (i) - dlsp[i] = lsp_hz[i] - lsp__hz[i-1]; + if (i) + dlsp[i] = lsp_hz[i] - lsp__hz[i-1]; else dlsp[0] = lsp_hz[0]; @@ -194,14 +194,14 @@ void lspd_quantise( indexes[i] = quantise(cb, &dlsp[i], wt, k, m, &se); dlsp_[i] = cb[indexes[i]*k]; - if (i) + if (i) lsp__hz[i] = lsp__hz[i-1] + dlsp_[i]; else lsp__hz[0] = dlsp_[0]; } for(; i<order; i++) lsp__hz[i] = lsp__hz[i-1] + dlsp[i]; - + /* convert back to radians */ for(i=0; i<order; i++) @@ -209,7 +209,7 @@ void lspd_quantise( } /*---------------------------------------------------------------------------*\ - + lspd_vq_quantise Vector lsp difference quantiser. @@ -217,10 +217,10 @@ void lspd_quantise( \*---------------------------------------------------------------------------*/ void lspdvq_quantise( - float lsp[], + float lsp[], float lsp_[], int order -) +) { int i,k,m,ncb, nlsp; float dlsp[LPC_MAX]; @@ -243,8 +243,8 @@ void lspdvq_quantise( /* scalar quantise dLSPs 1,2,3,4,5 */ for(i=0; i<5; i++) { - if (i) - dlsp[i] = (lsp[i] - lsp_[i-1])*4000.0/PI; + if (i) + dlsp[i] = (lsp[i] - lsp_[i-1])*4000.0/PI; else dlsp[0] = lsp[0]*4000.0/PI; @@ -253,8 +253,8 @@ void lspdvq_quantise( cb = lsp_cbdvq[i].cb; index = quantise(cb, &dlsp[i], wt, k, m, &se); dlsp_[i] = cb[index*k]*PI/4000.0; - - if (i) + + if (i) lsp_[i] = lsp_[i-1] + dlsp_[i]; else lsp_[0] = dlsp_[0]; @@ -330,7 +330,7 @@ void force_min_lsp_dist(float lsp[], int lpc_order) } /*---------------------------------------------------------------------------*\ - + lpc_model_amplitudes Derive a LPC model for amplitude samples then estimate amplitude samples @@ -342,7 +342,7 @@ void force_min_lsp_dist(float lsp[], int lpc_order) float lpc_model_amplitudes( float Sn[], /* Input frame of speech samples */ - float w[], + float w[], MODEL *model, /* sinusoidal model parameters */ int order, /* LPC model order */ int lsp_quant, /* optional LSP quantisation if non-zero */ @@ -353,7 +353,7 @@ float lpc_model_amplitudes( float R[LPC_MAX+1]; float E; int i,j; - float snr; + float snr; float lsp[LPC_MAX]; float lsp_hz[LPC_MAX]; float lsp_[LPC_MAX]; @@ -368,11 +368,11 @@ float lpc_model_amplitudes( Wn[i] = Sn[i]*w[i]; autocorrelate(Wn,R,M,order); levinson_durbin(R,ak,order); - + E = 0.0; for(i=0; i<=order; i++) E += ak[i]*R[i]; - + for(i=0; i<order; i++) wt[i] = 1.0; @@ -386,7 +386,7 @@ float lpc_model_amplitudes( for(i=0; i<order; i++) lsp_hz[i] = (4000.0/PI)*lsp[i]; - + /* simple uniform scalar quantisers */ for(i=0; i<10; i++) { @@ -396,7 +396,7 @@ float lpc_model_amplitudes( index = quantise(cb, &lsp_hz[i], wt, k, m, &se); lsp_hz[i] = cb[index*k]; } - + /* experiment: simulating uniform quantisation error for(i=0; i<order; i++) lsp[i] += PI*(12.5/4000.0)*(1.0 - 2.0*(float)rand()/RAND_MAX); @@ -428,7 +428,7 @@ float lpc_model_amplitudes( lsp[i] = lsp[i-1] + PI*(75.0/4000.0); } - for(j=0; j<order; j++) + for(j=0; j<order; j++) lsp_[j] = lsp[j]; lsp_to_lpc(lsp_, ak, order); @@ -455,13 +455,13 @@ float lpc_model_amplitudes( } /*---------------------------------------------------------------------------*\ - - aks_to_M2() - - Transforms the linear prediction coefficients to spectral amplitude - samples. This function determines A(m) from the average energy per - band using an FFT. - + + aks_to_M2() + + Transforms the linear prediction coefficients to spectral amplitude + samples. This function determines A(m) from the average energy per + band using an FFT. + \*---------------------------------------------------------------------------*/ void aks_to_M2( @@ -487,7 +487,7 @@ void aks_to_M2( for(i=0; i<FFT_DEC; i++) { Pw[i].real = 0.0; - Pw[i].imag = 0.0; + Pw[i].imag = 0.0; } for(i=0; i<=order; i++) @@ -499,7 +499,7 @@ void aks_to_M2( for(i=0; i<FFT_DEC/2; i++) Pw[i].real = E/(Pw[i].real*Pw[i].real + Pw[i].imag*Pw[i].imag); #ifdef DUMP - if (dump) + if (dump) dump_Pw(Pw); #endif @@ -523,10 +523,10 @@ void aks_to_M2( } /*---------------------------------------------------------------------------*\ - - FUNCTION....: encode_Wo() - AUTHOR......: David Rowe - DATE CREATED: 22/8/2010 + + FUNCTION....: encode_Wo() + AUTHOR......: David Rowe + DATE CREATED: 22/8/2010 Encodes Wo using a WO_LEVELS quantiser. @@ -548,10 +548,10 @@ int encode_Wo(float Wo) } /*---------------------------------------------------------------------------*\ - - FUNCTION....: decode_Wo() - AUTHOR......: David Rowe - DATE CREATED: 22/8/2010 + + FUNCTION....: decode_Wo() + AUTHOR......: David Rowe + DATE CREATED: 22/8/2010 Decodes Wo using a WO_LEVELS quantiser. @@ -571,10 +571,10 @@ float decode_Wo(int index) } /*---------------------------------------------------------------------------*\ - - FUNCTION....: speech_to_uq_lsps() - AUTHOR......: David Rowe - DATE CREATED: 22/8/2010 + + FUNCTION....: speech_to_uq_lsps() + AUTHOR......: David Rowe + DATE CREATED: 22/8/2010 Analyse a windowed frame of time domain speech to determine LPCs which are the converted to LSPs for quantisation and transmission @@ -584,7 +584,7 @@ float decode_Wo(int index) float speech_to_uq_lsps(float lsp[], float ak[], - float Sn[], + float Sn[], float w[], int order ) @@ -598,19 +598,19 @@ float speech_to_uq_lsps(float lsp[], Wn[i] = Sn[i]*w[i]; autocorrelate(Wn, R, M, order); levinson_durbin(R, ak, order); - + E = 0.0; for(i=0; i<=order; i++) E += ak[i]*R[i]; - + roots = lpc_to_lsp(ak, order, lsp, 5, LSP_DELTA1); if (roots != order) { /* for some reason LSP roots could not be found */ /* some alpha testers are reporting this condition */ fprintf(stderr, "LSP roots not found!\nroots = %d\n", roots); for(i=0; i<=order; i++) - fprintf(stderr, "a[%d] = %f\n", i, ak[i]); - + fprintf(stderr, "a[%d] = %f\n", i, ak[i]); + /* some benign LSP values we can use instead */ for(i=0; i<order; i++) lsp[i] = (PI/order)*(float)i; @@ -620,10 +620,10 @@ float speech_to_uq_lsps(float lsp[], } /*---------------------------------------------------------------------------*\ - - FUNCTION....: encode_lsps() - AUTHOR......: David Rowe - DATE CREATED: 22/8/2010 + + FUNCTION....: encode_lsps() + AUTHOR......: David Rowe + DATE CREATED: 22/8/2010 From a vector of unquantised (floating point) LSPs finds the quantised LSP indexes. @@ -643,7 +643,7 @@ void encode_lsps(int indexes[], float lsp[], int order) for(i=0; i<order; i++) lsp_hz[i] = (4000.0/PI)*lsp[i]; - + /* simple uniform scalar quantisers */ wt[0] = 1.0; @@ -656,10 +656,10 @@ void encode_lsps(int indexes[], float lsp[], int order) } /*---------------------------------------------------------------------------*\ - - FUNCTION....: decode_lsps() - AUTHOR......: David Rowe - DATE CREATED: 22/8/2010 + + FUNCTION....: decode_lsps() + AUTHOR......: David Rowe + DATE CREATED: 22/8/2010 From a vector of quantised LSP indexes, returns the quantised (floating point) LSPs. @@ -685,10 +685,10 @@ void decode_lsps(float lsp[], int indexes[], int order) } /*---------------------------------------------------------------------------*\ - - FUNCTION....: bw_expand_lsps() - AUTHOR......: David Rowe - DATE CREATED: 22/8/2010 + + FUNCTION....: bw_expand_lsps() + AUTHOR......: David Rowe + DATE CREATED: 22/8/2010 Applies Bandwidth Expansion (BW) to a vector of LSPs. Prevents any two LSPs getting too close together after quantisation. We know @@ -724,10 +724,10 @@ void bw_expand_lsps(float lsp[], } /*---------------------------------------------------------------------------*\ - - FUNCTION....: apply_lpc_correction() - AUTHOR......: David Rowe - DATE CREATED: 22/8/2010 + + FUNCTION....: apply_lpc_correction() + AUTHOR......: David Rowe + DATE CREATED: 22/8/2010 Apply first harmonic LPC correction at decoder. This helps improve low pitch males after LPC modelling, like hts1a and morig. @@ -742,10 +742,10 @@ void apply_lpc_correction(MODEL *model) } /*---------------------------------------------------------------------------*\ - - FUNCTION....: encode_energy() - AUTHOR......: David Rowe - DATE CREATED: 22/8/2010 + + FUNCTION....: encode_energy() + AUTHOR......: David Rowe + DATE CREATED: 22/8/2010 Encodes LPC energy using an E_LEVELS quantiser. @@ -768,10 +768,10 @@ int encode_energy(float e) } /*---------------------------------------------------------------------------*\ - - FUNCTION....: decode_energy() - AUTHOR......: David Rowe - DATE CREATED: 22/8/2010 + + FUNCTION....: decode_energy() + AUTHOR......: David Rowe + DATE CREATED: 22/8/2010 Decodes energy using a WO_BITS quantiser. @@ -792,10 +792,10 @@ float decode_energy(int index) } /*---------------------------------------------------------------------------*\ - - FUNCTION....: encode_amplitudes() - AUTHOR......: David Rowe - DATE CREATED: 22/8/2010 + + FUNCTION....: encode_amplitudes() + AUTHOR......: David Rowe + DATE CREATED: 22/8/2010 Time domain LPC is used model the amplitudes which are then converted to LSPs and quantised. So we don't actually encode the @@ -804,10 +804,10 @@ float decode_energy(int index) \*---------------------------------------------------------------------------*/ -void encode_amplitudes(int lsp_indexes[], +void encode_amplitudes(int lsp_indexes[], int *energy_index, - MODEL *model, - float Sn[], + MODEL *model, + float Sn[], float w[]) { float lsps[LPC_ORD]; @@ -820,19 +820,19 @@ void encode_amplitudes(int lsp_indexes[], } /*---------------------------------------------------------------------------*\ - - FUNCTION....: decode_amplitudes() - AUTHOR......: David Rowe - DATE CREATED: 22/8/2010 + + FUNCTION....: decode_amplitudes() + AUTHOR......: David Rowe + DATE CREATED: 22/8/2010 Given the amplitude quantiser indexes recovers the harmonic amplitudes. \*---------------------------------------------------------------------------*/ -float decode_amplitudes(MODEL *model, +float decode_amplitudes(MODEL *model, float ak[], - int lsp_indexes[], + int lsp_indexes[], int energy_index, float lsps[], float *e @@ -844,7 +844,7 @@ float decode_amplitudes(MODEL *model, bw_expand_lsps(lsps, LPC_ORD); lsp_to_lpc(lsps, ak, LPC_ORD); *e = decode_energy(energy_index); - aks_to_M2(ak, LPC_ORD, model, *e, &snr, 1); + aks_to_M2(ak, LPC_ORD, model, *e, &snr, 1); apply_lpc_correction(model); return snr; diff --git a/gr-vocoder/lib/codec2/quantise.h b/gr-vocoder/lib/codec2/quantise.h index 90a3661ff..42b05f43b 100644 --- a/gr-vocoder/lib/codec2/quantise.h +++ b/gr-vocoder/lib/codec2/quantise.h @@ -1,11 +1,11 @@ /*---------------------------------------------------------------------------*\ - + FILE........: quantise.h - AUTHOR......: David Rowe - DATE CREATED: 31/5/92 - - Quantisation functions for the sinusoidal coder. - + AUTHOR......: David Rowe + DATE CREATED: 31/5/92 + + Quantisation functions for the sinusoidal coder. + \*---------------------------------------------------------------------------*/ /* @@ -36,7 +36,7 @@ void quantise_init(); float lpc_model_amplitudes(float Sn[], float w[], MODEL *model, int order, int lsp,float ak[]); -void aks_to_M2(float ak[], int order, MODEL *model, float E, float *snr, +void aks_to_M2(float ak[], int order, MODEL *model, float E, float *snr, int dump); int encode_Wo(float Wo); @@ -45,15 +45,15 @@ float decode_Wo(int index); void encode_lsps(int indexes[], float lsp[], int order); void decode_lsps(float lsp[], int indexes[], int order); void lspd_quantise(float lsp[], float lsp_[], int order); -void lspdvq_quantise(float lsp[], float lsp_[], int order); +void lspdvq_quantise(float lsp[], float lsp_[], int order); int encode_energy(float e); float decode_energy(int index); -void encode_amplitudes(int lsp_indexes[], +void encode_amplitudes(int lsp_indexes[], int *energy_index, - MODEL *model, - float Sn[], + MODEL *model, + float Sn[], float w[]); float decode_amplitudes(MODEL *model, @@ -71,7 +71,7 @@ int lsp_bits(int i); void apply_lpc_correction(MODEL *model); float speech_to_uq_lsps(float lsp[], float ak[], - float Sn[], + float Sn[], float w[], int order ); diff --git a/gr-vocoder/lib/codec2/sine.c b/gr-vocoder/lib/codec2/sine.c index 45cc9de71..b30f9abad 100644 --- a/gr-vocoder/lib/codec2/sine.c +++ b/gr-vocoder/lib/codec2/sine.c @@ -1,11 +1,11 @@ /*---------------------------------------------------------------------------*\ - + FILE........: sine.c - AUTHOR......: David Rowe + AUTHOR......: David Rowe DATE CREATED: 19/8/2010 - + Sinusoidal analysis and synthesis functions. - + \*---------------------------------------------------------------------------*/ /* @@ -26,9 +26,9 @@ */ /*---------------------------------------------------------------------------*\ - - INCLUDES - + + INCLUDES + \*---------------------------------------------------------------------------*/ #include <stdlib.h> @@ -42,25 +42,25 @@ #define HPF_BETA 0.125 /*---------------------------------------------------------------------------*\ - - HEADERS - + + HEADERS + \*---------------------------------------------------------------------------*/ -void hs_pitch_refinement(MODEL *model, COMP Sw[], float pmin, float pmax, +void hs_pitch_refinement(MODEL *model, COMP Sw[], float pmin, float pmax, float pstep); /*---------------------------------------------------------------------------*\ - - FUNCTIONS - + + FUNCTIONS + \*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*\ - - FUNCTION....: make_analysis_window - AUTHOR......: David Rowe - DATE CREATED: 11/5/94 + + FUNCTION....: make_analysis_window + AUTHOR......: David Rowe + DATE CREATED: 11/5/94 Init function that generates the time domain analysis window and it's DFT. @@ -72,15 +72,15 @@ void make_analysis_window(float w[],COMP W[]) COMP temp; int i,j; - /* + /* Generate Hamming window centered on M-sample pitch analysis window - + 0 M/2 M-1 |-------------|-------------| |-------|-------| NW samples - All our analysis/synthsis is centred on the M/2 sample. + All our analysis/synthsis is centred on the M/2 sample. */ m = 0.0; @@ -92,7 +92,7 @@ void make_analysis_window(float w[],COMP W[]) } for(i=M/2+NW/2; i<M; i++) w[i] = 0.0; - + /* Normalise - makes freq domain amplitude estimation straight forward */ @@ -101,7 +101,7 @@ void make_analysis_window(float w[],COMP W[]) w[i] *= m; } - /* + /* Generate DFT of analysis window, used for later processing. Note we modulo FFT_ENC shift the time domain window w[], this makes the imaginary part of the DFT W[] equal to zero as the shifted w[] is @@ -112,13 +112,13 @@ void make_analysis_window(float w[],COMP W[]) |-------------------------| ----\ /---- - \ / + \ / \ / <- shifted version of window w[n] \ / \ / ------- - |---------| |---------| + |---------| |---------| NW/2 NW/2 */ @@ -133,8 +133,8 @@ void make_analysis_window(float w[],COMP W[]) fft(&W[0].real,FFT_ENC,-1); /* "Numerical Recipes in C" FFT */ - /* - Re-arrange W[] to be symmetrical about FFT_ENC/2. Makes later + /* + Re-arrange W[] to be symmetrical about FFT_ENC/2. Makes later analysis convenient. Before: @@ -142,21 +142,21 @@ void make_analysis_window(float w[],COMP W[]) 0 FFT_ENC-1 |----------|---------| - __ _ - \ / - \_______________/ + __ _ + \ / + \_______________/ After: 0 FFT_ENC-1 |----------|---------| - ___ - / \ - ________/ \_______ + ___ + / \ + ________/ \_______ */ - - + + for(i=0; i<FFT_ENC/2; i++) { temp.real = W[i].real; temp.imag = W[i].imag; @@ -169,15 +169,15 @@ void make_analysis_window(float w[],COMP W[]) } /*---------------------------------------------------------------------------*\ - - FUNCTION....: hpf - AUTHOR......: David Rowe + + FUNCTION....: hpf + AUTHOR......: David Rowe DATE CREATED: 16 Nov 2010 High pass filter with a -3dB point of about 160Hz. y(n) = -HPF_BETA*y(n-1) + x(n) - x(n-1) - + \*---------------------------------------------------------------------------*/ float hpf(float x, float states[]) @@ -189,10 +189,10 @@ float hpf(float x, float states[]) } /*---------------------------------------------------------------------------*\ - - FUNCTION....: dft_speech - AUTHOR......: David Rowe - DATE CREATED: 27/5/94 + + FUNCTION....: dft_speech + AUTHOR......: David Rowe + DATE CREATED: 27/5/94 Finds the DFT of the current speech input speech frame. @@ -201,7 +201,7 @@ float hpf(float x, float states[]) void dft_speech(COMP Sw[], float Sn[], float w[]) { int i; - + for(i=0; i<FFT_ENC; i++) { Sw[i].real = 0.0; Sw[i].imag = 0.0; @@ -209,7 +209,7 @@ void dft_speech(COMP Sw[], float Sn[], float w[]) /* Centre analysis window on time axis, we need to arrange input to FFT this way to make FFT phases correct */ - + /* move 2nd half to start of FFT input vector */ for(i=0; i<NW/2; i++) @@ -224,10 +224,10 @@ void dft_speech(COMP Sw[], float Sn[], float w[]) } /*---------------------------------------------------------------------------*\ - - FUNCTION....: two_stage_pitch_refinement + + FUNCTION....: two_stage_pitch_refinement AUTHOR......: David Rowe - DATE CREATED: 27/5/94 + DATE CREATED: 27/5/94 Refines the current pitch estimate using the harmonic sum pitch estimation technique. @@ -236,7 +236,7 @@ void dft_speech(COMP Sw[], float Sn[], float w[]) void two_stage_pitch_refinement(MODEL *model, COMP Sw[]) { - float pmin,pmax,pstep; /* pitch refinment minimum, maximum and step */ + float pmin,pmax,pstep; /* pitch refinment minimum, maximum and step */ /* Coarse refinement */ @@ -244,16 +244,16 @@ void two_stage_pitch_refinement(MODEL *model, COMP Sw[]) pmin = TWO_PI/model->Wo - 5; pstep = 1.0; hs_pitch_refinement(model,Sw,pmin,pmax,pstep); - + /* Fine refinement */ - + pmax = TWO_PI/model->Wo + 1; pmin = TWO_PI/model->Wo - 1; pstep = 0.25; hs_pitch_refinement(model,Sw,pmin,pmax,pstep); - + /* Limit range */ - + if (model->Wo < TWO_PI/P_MAX) model->Wo = TWO_PI/P_MAX; if (model->Wo > TWO_PI/P_MIN) @@ -263,20 +263,20 @@ void two_stage_pitch_refinement(MODEL *model, COMP Sw[]) } /*---------------------------------------------------------------------------*\ - - FUNCTION....: hs_pitch_refinement - AUTHOR......: David Rowe - DATE CREATED: 27/5/94 - - Harmonic sum pitch refinement function. - - pmin pitch search range minimum - pmax pitch search range maximum - step pitch search step size - model current pitch estimate in model.Wo - - model refined pitch estimate in model.Wo - + + FUNCTION....: hs_pitch_refinement + AUTHOR......: David Rowe + DATE CREATED: 27/5/94 + + Harmonic sum pitch refinement function. + + pmin pitch search range minimum + pmax pitch search range maximum + step pitch search step size + model current pitch estimate in model.Wo + + model refined pitch estimate in model.Wo + \*---------------------------------------------------------------------------*/ void hs_pitch_refinement(MODEL *model, COMP Sw[], float pmin, float pmax, float pstep) @@ -289,14 +289,14 @@ void hs_pitch_refinement(MODEL *model, COMP Sw[], float pmin, float pmax, float float Em; /* mamimum energy */ float r; /* number of rads/bin */ float p; /* current pitch */ - + /* Initialisation */ - + model->L = PI/model->Wo; /* use initial pitch est. for L */ Wom = model->Wo; Em = 0.0; r = TWO_PI/FFT_ENC; - + /* Determine harmonic sum for a range of Wo values */ for(p=pmin; p<=pmax; p+=pstep) { @@ -308,10 +308,10 @@ void hs_pitch_refinement(MODEL *model, COMP Sw[], float pmin, float pmax, float for(m=1; m<=model->L; m++) { b = floor(m*Wo/r + 0.5); E += Sw[b].real*Sw[b].real + Sw[b].imag*Sw[b].imag; - } + } /* Compare to see if this is a maximum */ - + if (E > Em) { Em = E; Wom = Wo; @@ -322,13 +322,13 @@ void hs_pitch_refinement(MODEL *model, COMP Sw[], float pmin, float pmax, float } /*---------------------------------------------------------------------------*\ - - FUNCTION....: estimate_amplitudes - AUTHOR......: David Rowe - DATE CREATED: 27/5/94 - - Estimates the complex amplitudes of the harmonics. - + + FUNCTION....: estimate_amplitudes + AUTHOR......: David Rowe + DATE CREATED: 27/5/94 + + Estimates the complex amplitudes of the harmonics. + \*---------------------------------------------------------------------------*/ void estimate_amplitudes(MODEL *model, COMP Sw[], COMP W[]) @@ -369,14 +369,14 @@ void estimate_amplitudes(MODEL *model, COMP Sw[], COMP W[]) } /*---------------------------------------------------------------------------*\ - - est_voicing_mbe() - + + est_voicing_mbe() + Returns the error of the MBE cost function for a fiven F0. Note: I think a lot of the operations below can be simplified as W[].imag = 0 and has been normalised such that den always equals 1. - + \*---------------------------------------------------------------------------*/ float est_voicing_mbe( @@ -393,7 +393,7 @@ float est_voicing_mbe( int offset; /* centers Hw[] about current harmonic */ float den; /* denominator of Am expression */ float error; /* accumulated error between original and synthesised */ - float Wo; + float Wo; float sig, snr; float elow, ehigh, eratio; float dF0, sixty; @@ -445,16 +445,16 @@ float est_voicing_mbe( error += Ew[m].imag*Ew[m].imag; } } - + snr = 10.0*log10(sig/error); if (snr > V_THRESH) model->voiced = 1; else model->voiced = 0; - + /* post processing, helps clean up some voicing errors ------------------*/ - /* + /* Determine the ratio of low freancy to high frequency energy, voiced speech tends to be dominated by low frequency energy, unvoiced by high frequency. This measure can be used to @@ -488,7 +488,7 @@ float est_voicing_mbe( /* If pitch is jumping about it's likely this is UV */ dF0 = (model->Wo - prev_Wo)*FS/TWO_PI; - if (fabs(dF0) > 15.0) + if (fabs(dF0) > 15.0) model->voiced = 0; /* A common source of Type 2 errors is the pitch estimator @@ -507,10 +507,10 @@ float est_voicing_mbe( } /*---------------------------------------------------------------------------*\ - - FUNCTION....: make_synthesis_window - AUTHOR......: David Rowe - DATE CREATED: 11/5/94 + + FUNCTION....: make_synthesis_window + AUTHOR......: David Rowe + DATE CREATED: 11/5/94 Init function that generates the trapezoidal (Parzen) sythesis window. @@ -539,15 +539,15 @@ void make_synthesis_window(float Pn[]) } /*---------------------------------------------------------------------------*\ - - FUNCTION....: synthesise - AUTHOR......: David Rowe - DATE CREATED: 20/2/95 - + + FUNCTION....: synthesise + AUTHOR......: David Rowe + DATE CREATED: 20/2/95 + Synthesise a speech signal in the frequency domain from the sinusodal model parameters. Uses overlap-add with a trapezoidal window to smoothly interpolate betwen frames. - + \*---------------------------------------------------------------------------*/ void synthesise( @@ -579,7 +579,7 @@ void synthesise( gives better results for synthesis frames greater than 10ms. Inverse FFT synthesis using a 512 pt FFT works well for 10ms window. I think (but am not sure) that the problem is realted to the quantisation of - the harmonic frequencies to the FFT bin size, e.g. there is a + the harmonic frequencies to the FFT bin size, e.g. there is a 8000/512 Hz step between FFT bins. For some reason this makes the speech from longer frame > 10ms sound poor. The effect can also be seen when synthesising test signals like single sine waves, some @@ -619,7 +619,7 @@ void synthesise( } for(i=N-1,j=0; i<2*N; i++,j++) Sw_[j].real += 2.0*model->A[l]*cos(j*model->Wo*l + model->phi[l]); - } + } #endif /* Overlap add to previous samples */ diff --git a/gr-vocoder/lib/codec2/sine.h b/gr-vocoder/lib/codec2/sine.h index ae578bf70..f223e2afc 100644 --- a/gr-vocoder/lib/codec2/sine.h +++ b/gr-vocoder/lib/codec2/sine.h @@ -1,11 +1,11 @@ /*---------------------------------------------------------------------------*\ - + FILE........: sine.h - AUTHOR......: David Rowe + AUTHOR......: David Rowe DATE CREATED: 1/11/94 - + Header file for sinusoidal analysis and synthesis functions. - + \*---------------------------------------------------------------------------*/ /* @@ -36,7 +36,7 @@ float hpf(float x, float states[]); void dft_speech(COMP Sw[], float Sn[], float w[]); void two_stage_pitch_refinement(MODEL *model, COMP Sw[]); void estimate_amplitudes(MODEL *model, COMP Sw[], COMP W[]); -float est_voicing_mbe(MODEL *model, COMP Sw[], COMP W[], COMP Sw_[],COMP Ew[], +float est_voicing_mbe(MODEL *model, COMP Sw[], COMP W[], COMP Sw_[],COMP Ew[], float prev_Wo); void make_synthesis_window(float Pn[]); void synthesise(float Sn_[], MODEL *model, float Pn[], int shift); diff --git a/gr-vocoder/lib/g7xx/.gitignore b/gr-vocoder/lib/g7xx/.gitignore deleted file mode 100644 index a02b6ff73..000000000 --- a/gr-vocoder/lib/g7xx/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo diff --git a/gr-vocoder/lib/g7xx/Makefile.am b/gr-vocoder/lib/g7xx/Makefile.am deleted file mode 100644 index 929fd23ba..000000000 --- a/gr-vocoder/lib/g7xx/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright 2001,2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -noinst_LTLIBRARIES = libg7xx.la -libg7xx_la_SOURCES = g711.c g72x.c g721.c g723_24.c g723_40.c g72x.h - -EXTRA_DIST += encode.c decode.c diff --git a/gr-vocoder/lib/g7xx/g72x.h b/gr-vocoder/lib/g7xx/g72x.h index 33807171a..9d906cae7 100644 --- a/gr-vocoder/lib/g7xx/g72x.h +++ b/gr-vocoder/lib/g7xx/g72x.h @@ -103,36 +103,36 @@ extern int g723_40_decoder( extern int quantize( - int d, - int y, - short *table, + int d, + int y, + short *table, int size); extern int reconstruct(int,int,int);void extern update( - int code_size, - int y, - int wi, - int fi, - int dq, - int sr, - int dqsez, + int code_size, + int y, + int wi, + int fi, + int dq, + int sr, + int dqsez, struct g72x_state *state_ptr); extern int tandem_adjust_alaw( - int sr, - int se, - int y, - int i, + int sr, + int se, + int y, + int i, int sign, short *qtab); extern int tandem_adjust_ulaw( - int sr, - int se, - int y, - int i, + int sr, + int se, + int y, + int i, int sign, short *qtab); diff --git a/gr-vocoder/lib/gsm/.gitignore b/gr-vocoder/lib/gsm/.gitignore deleted file mode 100644 index a02b6ff73..000000000 --- a/gr-vocoder/lib/gsm/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo diff --git a/gr-vocoder/lib/gsm/Makefile.am b/gr-vocoder/lib/gsm/Makefile.am deleted file mode 100644 index d0872ff39..000000000 --- a/gr-vocoder/lib/gsm/Makefile.am +++ /dev/null @@ -1,76 +0,0 @@ -# -# Copyright 2005,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. -# - -include $(top_srcdir)/Makefile.common - -# Machine- or installation dependent flags you should configure to port - -SASR = -DSASR -######### Define SASR if >> is a signed arithmetic shift (-1 >> 1 == -1) - -MULHACK = -DUSE_FLOAT_MUL -######### Define this if your host multiplies floats faster than integers, -######### e.g. on a SPARCstation. - -FAST = -DFAST -######### Define together with USE_FLOAT_MUL to enable the GSM library's -######### approximation option for incorrect, but good-enough results. - -# LTP_CUT = -DLTP_CUT -LTP_CUT = -######### Define to enable the GSM library's long-term correlation -######### approximation option---faster, but worse; works for -######### both integer and floating point multiplications. -######### This flag is still in the experimental stage. - -OPTIONS = $(SASR) $(MULHACK) $(FAST) $(LTP_CUT) - -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) -DNeedFunctionPrototypes=1 \ - $(OPTIONS) $(WITH_INCLUDES) - -noinst_LTLIBRARIES = libgsm.la - -libgsm_la_SOURCES = \ - add.c \ - code.c \ - debug.c \ - decode.c \ - gsm_create.c \ - gsm_decode.c \ - gsm_destroy.c \ - gsm_encode.c \ - gsm_explode.c \ - gsm_implode.c \ - gsm_option.c \ - gsm_print.c \ - long_term.c \ - lpc.c \ - preprocess.c \ - rpe.c \ - short_term.c \ - table.c - -noinst_HEADERS = \ - config.h \ - gsm.h \ - private.h \ - proto.h \ - unproto.h diff --git a/gr-vocoder/lib/gsm/README.gsm b/gr-vocoder/lib/gsm/README.gsm index cb6af85cf..10470e04e 100644 --- a/gr-vocoder/lib/gsm/README.gsm +++ b/gr-vocoder/lib/gsm/README.gsm @@ -17,7 +17,7 @@ rate, i.e. a frame rate of 50 Hz) into 260 bits; for compatibility with typical UNIX applications, our implementation turns frames of 160 16-bit linear samples into 33-byte frames (1650 Bytes/s). The quality of the algorithm is good enough for reliable speaker -recognition; even music often survives transcoding in recognizable +recognition; even music often survives transcoding in recognizable form (given the bandwidth limitations of 8 kHz sampling rate). The interfaces offered are a front end modelled after compress(1), and diff --git a/gr-vocoder/lib/gsm/add.c b/gr-vocoder/lib/gsm/add.c index 21ccfabe7..4118107b1 100644 --- a/gr-vocoder/lib/gsm/add.c +++ b/gr-vocoder/lib/gsm/add.c @@ -88,7 +88,7 @@ longword gsm_L_sub P2((a,b), longword a, longword b) } else if (b <= 0) return a - b; else { - /* a<0, b>0 */ + /* a<0, b>0 */ ulongword A = (ulongword)-(a + 1) + b; return A >= MAX_LONGWORD ? MIN_LONGWORD : -(longword)A - 1; @@ -120,7 +120,7 @@ word gsm_norm P1((a), longword a ) * variable L_var1 for positive values on the interval * * with minimum of - * minimum of 1073741824 (01000000000000000000000000000000) and + * minimum of 1073741824 (01000000000000000000000000000000) and * maximum of 2147483647 (01111111111111111111111111111111) * * @@ -141,7 +141,7 @@ word gsm_norm P1((a), longword a ) a = ~a; } - return a & 0xffff0000 + return a & 0xffff0000 ? ( a & 0xff000000 ? -1 + bitoff[ 0xFF & (a >> 24) ] : 7 + bitoff[ 0xFF & (a >> 16) ] ) @@ -194,7 +194,7 @@ word gsm_asr P2((a,n), word a, int n) # endif } -/* +/* * (From p. 46, end of section 4.2.5) * * NOTE: The following lines gives [sic] one correct implementation diff --git a/gr-vocoder/lib/gsm/code.c b/gr-vocoder/lib/gsm/code.c index 19af507b7..68ea05226 100644 --- a/gr-vocoder/lib/gsm/code.c +++ b/gr-vocoder/lib/gsm/code.c @@ -21,8 +21,8 @@ #include "proto.h" #include <string.h> -/* - * 4.2 FIXED POINT IMPLEMENTATION OF THE RPE-LTP CODER +/* + * 4.2 FIXED POINT IMPLEMENTATION OF THE RPE-LTP CODER */ void Gsm_Coder P8((S,s,LARc,Nc,bc,Mc,xmaxc,xMc), @@ -35,7 +35,7 @@ void Gsm_Coder P8((S,s,LARc,Nc,bc,Mc,xmaxc,xMc), * The RPE-LTD coder works on a frame by frame basis. The length of * the frame is equal to 160 samples. Some computations are done * once per frame to produce at the output of the coder the - * LARc[1..8] parameters which are the coded LAR coefficients and + * LARc[1..8] parameters which are the coded LAR coefficients and * also to realize the inverse filtering operation for the entire * frame (160 samples of signal d[0..159]). These parts produce at * the output of the coder: diff --git a/gr-vocoder/lib/gsm/debug.c b/gr-vocoder/lib/gsm/debug.c index e05210428..58d1dbcac 100644 --- a/gr-vocoder/lib/gsm/debug.c +++ b/gr-vocoder/lib/gsm/debug.c @@ -18,7 +18,7 @@ #include <stdio.h> #include "proto.h" -void gsm_debug_words P4( (name, from, to, ptr), +void gsm_debug_words P4( (name, from, to, ptr), char * name, int from, int to, diff --git a/gr-vocoder/lib/gsm/gsm.h b/gr-vocoder/lib/gsm/gsm.h index 990e42af5..a6d5e4705 100644 --- a/gr-vocoder/lib/gsm/gsm.h +++ b/gr-vocoder/lib/gsm/gsm.h @@ -57,7 +57,7 @@ typedef gsm_byte gsm_frame[33]; /* 33 * 8 bits */ #define GSM_SAMPLES_PER_FRAME 160 extern gsm gsm_create GSM_P((void)); -extern void gsm_destroy GSM_P((gsm)); +extern void gsm_destroy GSM_P((gsm)); extern int gsm_print GSM_P((FILE *, gsm, gsm_byte *)); extern int gsm_option GSM_P((gsm, int, int *)); diff --git a/gr-vocoder/lib/gsm/gsm_decode.c b/gr-vocoder/lib/gsm/gsm_decode.c index 7318ba2d4..7ebf35dd0 100644 --- a/gr-vocoder/lib/gsm/gsm_decode.c +++ b/gr-vocoder/lib/gsm/gsm_decode.c @@ -206,7 +206,7 @@ int gsm_decode P3((s, c, target), gsm s, gsm_byte * c, gsm_signal * target) xmaxc[2] = sr & 0x3f; sr >>= 6; xmc[26] = sr & 0x7; sr >>= 3; xmc[27] = sr & 0x7; sr >>= 3; - sr |= (uword)*c++ << 1; + sr |= (uword)*c++ << 1; xmc[28] = sr & 0x7; sr >>= 3; xmc[29] = sr & 0x7; sr >>= 3; xmc[30] = sr & 0x7; sr >>= 3; @@ -223,7 +223,7 @@ int gsm_decode P3((s, c, target), gsm s, gsm_byte * c, gsm_signal * target) xmc[38] = sr & 0x7; sr >>= 3; sr = *c++; Nc[3] = sr & 0x7f; sr >>= 7; - sr |= (uword)*c++ << 1; + sr |= (uword)*c++ << 1; bc[3] = sr & 0x3; sr >>= 2; Mc[3] = sr & 0x3; sr >>= 2; sr |= (uword)*c++ << 5; diff --git a/gr-vocoder/lib/gsm/gsm_explode.c b/gr-vocoder/lib/gsm/gsm_explode.c index a906fc2ed..744ded5af 100644 --- a/gr-vocoder/lib/gsm/gsm_explode.c +++ b/gr-vocoder/lib/gsm/gsm_explode.c @@ -228,7 +228,7 @@ int gsm_explode P3((s, c, target), gsm s, gsm_byte * c, gsm_signal * target) #define xmc (target + 46 - 26) xmc[26] = sr & 0x7; sr >>= 3; xmc[27] = sr & 0x7; sr >>= 3; - sr |= (uword)*c++ << 1; + sr |= (uword)*c++ << 1; xmc[28] = sr & 0x7; sr >>= 3; xmc[29] = sr & 0x7; sr >>= 3; xmc[30] = sr & 0x7; sr >>= 3; @@ -245,7 +245,7 @@ int gsm_explode P3((s, c, target), gsm s, gsm_byte * c, gsm_signal * target) xmc[38] = sr & 0x7; sr >>= 3; sr = *c++; Nc[3] = sr & 0x7f; sr >>= 7; - sr |= (uword)*c++ << 1; + sr |= (uword)*c++ << 1; bc[3] = sr & 0x3; sr >>= 2; Mc[3] = sr & 0x3; sr >>= 2; sr |= (uword)*c++ << 5; @@ -273,7 +273,7 @@ int gsm_explode P3((s, c, target), gsm s, gsm_byte * c, gsm_signal * target) xmc[51] = sr & 0x7; sr >>= 3; } } - else + else #endif { /* GSM_MAGIC = (*c >> 4) & 0xF; */ diff --git a/gr-vocoder/lib/gsm/gsm_implode.c b/gr-vocoder/lib/gsm/gsm_implode.c index 453b8cf39..08ebf5853 100644 --- a/gr-vocoder/lib/gsm/gsm_implode.c +++ b/gr-vocoder/lib/gsm/gsm_implode.c @@ -316,7 +316,7 @@ void gsm_implode P3((s, source, c), gsm s, gsm_signal * source, gsm_byte * c) #define xmc (source + 46 - 26) xmc[26] = sr & 0x7; sr >>= 3; xmc[27] = sr & 0x7; sr >>= 3; - sr |= (uword)*c++ << 1; + sr |= (uword)*c++ << 1; xmc[28] = sr & 0x7; sr >>= 3; xmc[29] = sr & 0x7; sr >>= 3; xmc[30] = sr & 0x7; sr >>= 3; @@ -333,7 +333,7 @@ void gsm_implode P3((s, source, c), gsm s, gsm_signal * source, gsm_byte * c) xmc[38] = sr & 0x7; sr >>= 3; sr = *c++; Nc[3] = sr & 0x7f; sr >>= 7; - sr |= (uword)*c++ << 1; + sr |= (uword)*c++ << 1; bc[3] = sr & 0x3; sr >>= 2; Mc[3] = sr & 0x3; sr >>= 2; sr |= (uword)*c++ << 5; @@ -361,7 +361,7 @@ void gsm_implode P3((s, source, c), gsm s, gsm_signal * source, gsm_byte * c) } } else -#endif +#endif { *c++ = ((GSM_MAGIC & 0xF) << 4) /* 1 */ diff --git a/gr-vocoder/lib/gsm/gsm_option.c b/gr-vocoder/lib/gsm/gsm_option.c index 280780132..303170a9c 100644 --- a/gr-vocoder/lib/gsm/gsm_option.c +++ b/gr-vocoder/lib/gsm/gsm_option.c @@ -56,7 +56,7 @@ int gsm_option P3((r, opt, val), gsm r, int opt, int * val) case GSM_OPT_WAV49: -#ifdef WAV49 +#ifdef WAV49 result = r->wav_fmt; if (val) r->wav_fmt = !!*val; #endif diff --git a/gr-vocoder/lib/gsm/long_term.c b/gr-vocoder/lib/gsm/long_term.c index fd67bda19..7dd9631e0 100644 --- a/gr-vocoder/lib/gsm/long_term.c +++ b/gr-vocoder/lib/gsm/long_term.c @@ -330,7 +330,7 @@ static void Cut_Calculation_of_the_LTP_parameters P5((st, d,dp,bc_out,Nc_out), else scal = 6 - temp; assert(scal >= 0); - ltp_cut = (longword)SASR(dmax, scal) * st->ltp_cut / 100; + ltp_cut = (longword)SASR(dmax, scal) * st->ltp_cut / 100; /* Initialization of a working array wt @@ -362,7 +362,7 @@ static void Cut_Calculation_of_the_LTP_parameters P5((st, d,dp,bc_out,Nc_out), register float a = lp[-8], b = lp[-7], c = lp[-6], d = lp[-5], e = lp[-4], f = lp[-3], g = lp[-2], h = lp[-1]; - register float E; + register float E; register float S0 = 0, S1 = 0, S2 = 0, S3 = 0, S4 = 0, S5 = 0, S6 = 0, S7 = 0, S8 = 0; @@ -528,7 +528,7 @@ static void Calculation_of_the_LTP_parameters P4((d,dp,bc_out,Nc_out), register float a = lp[-8], b = lp[-7], c = lp[-6], d = lp[-5], e = lp[-4], f = lp[-3], g = lp[-2], h = lp[-1]; - register float E; + register float E; register float S0 = 0, S1 = 0, S2 = 0, S3 = 0, S4 = 0, S5 = 0, S6 = 0, S7 = 0, S8 = 0; @@ -742,7 +742,7 @@ static void Fast_Calculation_of_the_LTP_parameters P4((d,dp,bc_out,Nc_out), register float a = lp[-8], b = lp[-7], c = lp[-6], d = lp[-5], e = lp[-4], f = lp[-3], g = lp[-2], h = lp[-1]; - register float E; + register float E; register float S0 = 0, S1 = 0, S2 = 0, S3 = 0, S4 = 0, S5 = 0, S6 = 0, S7 = 0, S8 = 0; @@ -860,7 +860,7 @@ static void Long_term_analysis_filtering P6((bc,Nc,dp,d,dpp,e), case 0: STEP( 3277 ); break; case 1: STEP( 11469 ); break; case 2: STEP( 21299 ); break; - case 3: STEP( 32767 ); break; + case 3: STEP( 32767 ); break; } } @@ -881,7 +881,7 @@ void Gsm_Long_Term_Predictor P7((S,d,dp,e,dpp,Nc,bc), /* 4x for 160 samples */ assert( dpp); assert( Nc ); assert( bc ); #if defined(FAST) && defined(USE_FLOAT_MUL) - if (S->fast) + if (S->fast) #if defined (LTP_CUT) if (S->ltp_cut) Cut_Fast_Calculation_of_the_LTP_parameters(S, @@ -889,7 +889,7 @@ void Gsm_Long_Term_Predictor P7((S,d,dp,e,dpp,Nc,bc), /* 4x for 160 samples */ else #endif /* LTP_CUT */ Fast_Calculation_of_the_LTP_parameters(d, dp, bc, Nc ); - else + else #endif /* FAST & USE_FLOAT_MUL */ #ifdef LTP_CUT if (S->ltp_cut) @@ -930,7 +930,7 @@ void Gsm_Long_Term_Synthesis_Filtering P5((S,Ncr,bcr,erp,drp), */ brp = gsm_QLB[ bcr ]; - /* Computation of the reconstructed short term residual + /* Computation of the reconstructed short term residual * signal drp[0..39] */ assert(brp != MIN_WORD); diff --git a/gr-vocoder/lib/gsm/lpc.c b/gr-vocoder/lib/gsm/lpc.c index ac2b8a9eb..bc1695c41 100644 --- a/gr-vocoder/lib/gsm/lpc.c +++ b/gr-vocoder/lib/gsm/lpc.c @@ -69,7 +69,7 @@ static void Autocorrelation P2((s, L_ACF), float_s[k] = (float) \ (s[k] = GSM_MULT_R(s[k], 16384 >> (n-1)));\ break; -# else +# else # define SCALE(n) \ case n: for (k = 0; k <= 159; k++) \ s[k] = GSM_MULT_R( s[k], 16384 >> (n-1) );\ @@ -133,13 +133,13 @@ static void Autocorrelation P2((s, L_ACF), STEP(5); STEP(6); STEP(7); STEP(8); } - for (k = 9; k--; L_ACF[k] <<= 1) ; + for (k = 9; k--; L_ACF[k] <<= 1) ; } /* Rescaling of the array s[0..159] */ if (scalauto > 0) { - assert(scalauto <= 4); + assert(scalauto <= 4); for (k = 160; k--; *s++ <<= scalauto) ; } } @@ -224,7 +224,7 @@ static void Reflection_coefficients P2( (L_ACF, r), assert(*r >= 0); if (P[1] > 0) *r = -*r; /* r[n] = sub(0, r[n]) */ assert (*r != MIN_WORD); - if (n == 8) return; + if (n == 8) return; /* Schur recursion */ @@ -294,7 +294,7 @@ static void Quantization_and_coding P1((LAR), /* This procedure needs four tables; the following equations * give the optimum scaling for the constants: - * + * * A[0..7] = integer( real_A[0..7] * 1024 ) * B[0..7] = integer( real_B[0..7] * 512 ) * MAC[0..7] = maximum of the LARc[0..7] diff --git a/gr-vocoder/lib/gsm/preprocess.c b/gr-vocoder/lib/gsm/preprocess.c index 1e1bbf8b0..abc47c72b 100644 --- a/gr-vocoder/lib/gsm/preprocess.c +++ b/gr-vocoder/lib/gsm/preprocess.c @@ -15,7 +15,7 @@ #include "proto.h" /* 4.2.0 .. 4.2.3 PREPROCESSING SECTION - * + * * After A-law to linear conversion (or directly from the * Ato D converter) the following scaling is assumed for * input to the RPE-LTP algorithm: @@ -26,7 +26,7 @@ * Where S is the sign bit, v a valid bit, and * a "don't care" bit. * The original signal is called sop[..] * - * out: 0.1................... 12 + * out: 0.1................... 12 * S.S.v.v.v.v.v.v.v.v.v.v.v.v.0.0 */ @@ -66,7 +66,7 @@ void Gsm_Preprocess P3((S, s, so), /* 4.2.2 Offset compensation - * + * * This part implements a high-pass filter and requires extended * arithmetic precision for the recursive part of this filter. * The input of this procedure is the array so[0...159] and the diff --git a/gr-vocoder/lib/gsm/private.h b/gr-vocoder/lib/gsm/private.h index 6b538cc27..ca42cd537 100644 --- a/gr-vocoder/lib/gsm/private.h +++ b/gr-vocoder/lib/gsm/private.h @@ -82,10 +82,10 @@ extern longword gsm_L_asr P((longword a, int n)); extern word gsm_asr P((word a, int n)); /* - * Inlined functions from add.h + * Inlined functions from add.h */ -/* +/* * #define GSM_MULT_R(a, b) (* word a, word b, !(a == b == MIN_WORD) *) \ * (0x0FFFF & SASR(((longword)(a) * (longword)(b) + 16384), 15)) */ @@ -170,10 +170,10 @@ extern void Gsm_Preprocess P(( extern void Gsm_Encoding P(( struct gsm_state * S, - word * e, - word * ep, + word * e, + word * ep, word * xmaxc, - word * Mc, + word * Mc, word * xMc)); extern void Gsm_Short_Term_Analysis_Filter P(( diff --git a/gr-vocoder/lib/gsm/proto.h b/gr-vocoder/lib/gsm/proto.h index 87cf05e8a..ea60abfe7 100644 --- a/gr-vocoder/lib/gsm/proto.h +++ b/gr-vocoder/lib/gsm/proto.h @@ -40,7 +40,7 @@ # define P1(x, a) (a) # define P2(x, a, b) (a, b) # define P3(x, a, b, c) (a, b, c) -# define P4(x, a, b, c, d) (a, b, c, d) +# define P4(x, a, b, c, d) (a, b, c, d) # define P5(x, a, b, c, d, e) (a, b, c, d, e) # define P6(x, a, b, c, d, e, f) (a, b, c, d, e, f) # define P7(x, a, b, c, d, e, f, g) (a, b, c, d, e, f, g) diff --git a/gr-vocoder/lib/gsm/rpe.c b/gr-vocoder/lib/gsm/rpe.c index 8a6b81fae..bdc78910e 100644 --- a/gr-vocoder/lib/gsm/rpe.c +++ b/gr-vocoder/lib/gsm/rpe.c @@ -27,7 +27,7 @@ static void Weighting_filter P2((e, x), * The coefficients of the weighting filter are stored in a table * (see table 4.4). The following scaling is used: * - * H[0..10] = integer( real_H[ 0..10] * 8192 ); + * H[0..10] = integer( real_H[ 0..10] * 8192 ); */ { /* word wt[ 50 ]; */ @@ -48,7 +48,7 @@ static void Weighting_filter P2((e, x), e -= 5; /* Compute the signal x[0..39] - */ + */ for (k = 0; k <= 39; k++) { L_result = 8192 >> 1; @@ -63,7 +63,7 @@ static void Weighting_filter P2((e, x), #define STEP( i, H ) (e[ k + i ] * (longword)H) /* Every one of these multiplications is done twice -- - * but I don't see an elegant way to optimize this. + * but I don't see an elegant way to optimize this. * Do you? */ @@ -81,16 +81,16 @@ static void Weighting_filter P2((e, x), L_result += STEP( 10, -134 ) ; #else L_result += - STEP( 0, -134 ) - + STEP( 1, -374 ) + STEP( 0, -134 ) + + STEP( 1, -374 ) /* + STEP( 2, 0 ) */ - + STEP( 3, 2054 ) - + STEP( 4, 5741 ) - + STEP( 5, 8192 ) - + STEP( 6, 5741 ) - + STEP( 7, 2054 ) + + STEP( 3, 2054 ) + + STEP( 4, 5741 ) + + STEP( 5, 8192 ) + + STEP( 6, 5741 ) + + STEP( 7, 2054 ) /* + STEP( 8, 0 ) */ - + STEP( 9, -374 ) + + STEP( 9, -374 ) + STEP(10, -134 ) ; #endif @@ -114,7 +114,7 @@ static void Weighting_filter P2((e, x), /* 4.2.14 */ static void RPE_grid_selection P3((x,xM,Mc_out), - word * x, /* [0..39] IN */ + word * x, /* [0..39] IN */ word * xM, /* [0..12] OUT */ word * Mc_out /* OUT */ ) @@ -147,7 +147,7 @@ static void RPE_grid_selection P3((x,xM,Mc_out), * L_temp = GSM_L_MULT( temp1, temp1 ); * L_result = GSM_L_ADD( L_temp, L_result ); * } - * + * * if (L_result > EM) { * Mc = m; * EM = L_result; @@ -310,7 +310,7 @@ static void APCM_quantization P5((xM,xMc,mant_out,exp_out,xmaxc_out), * can be calculated by using the exponent and the mantissa part of * xmaxc (logarithmic table). * So, this method avoids any division and uses only a scaling - * of the RPE samples by a function of the exponent. A direct + * of the RPE samples by a function of the exponent. A direct * multiplication by the inverse of the mantissa (NRFAC[0..7] * found in table 4.5) gives the 3 bit coded version xMc[0..12] * of the RPE samples. @@ -321,7 +321,7 @@ static void APCM_quantization P5((xM,xMc,mant_out,exp_out,xmaxc_out), */ assert( exp <= 4096 && exp >= -4096); - assert( mant >= 0 && mant <= 7 ); + assert( mant >= 0 && mant <= 7 ); temp1 = 6 - exp; /* normalization by the exponent */ temp2 = gsm_NRFAC[ mant ]; /* inverse mantissa */ @@ -351,7 +351,7 @@ static void APCM_inverse_quantization P4((xMc,mant,exp,xMp), word mant, word exp, register word * xMp) /* [0..12] OUT */ -/* +/* * This part is for decoding the RPE sequence of coded xMc[0..12] * samples to obtain the xMp[0..12] array. Table 4.6 is used to get * the mantissa of xmaxc (FAC[0..7]). @@ -361,7 +361,7 @@ static void APCM_inverse_quantization P4((xMc,mant,exp,xMp), word temp, temp1, temp2, temp3; longword ltmp; - assert( mant >= 0 && mant <= 7 ); + assert( mant >= 0 && mant <= 7 ); temp1 = gsm_FAC[ mant ]; /* see 4.2-15 for mant */ temp2 = gsm_sub( 6, exp ); /* see 4.2-15 for exp */ @@ -438,7 +438,7 @@ void Gsm_Update_of_reconstructed_short_time_residual_signal P3((dpp, ep, dp), { int k; - for (k = 0; k <= 79; k++) + for (k = 0; k <= 79; k++) dp[ -120 + k ] = dp[ -80 + k ]; for (k = 0; k <= 39; k++) diff --git a/gr-vocoder/lib/gsm/short_term.c b/gr-vocoder/lib/gsm/short_term.c index 4f5fd7be7..68aabe5bb 100644 --- a/gr-vocoder/lib/gsm/short_term.c +++ b/gr-vocoder/lib/gsm/short_term.c @@ -73,7 +73,7 @@ static void Decoding_of_the_coded_Log_Area_Ratios P2((LARc,LARpp), } /* 4.2.9 */ -/* Computation of the quantized reflection coefficients +/* Computation of the quantized reflection coefficients */ /* 4.2.9.1 Interpolation of the LARpp[1..8] to get the LARp[1..8] diff --git a/gr-vocoder/lib/gsm/table.c b/gr-vocoder/lib/gsm/table.c index 16a04118c..d8366931e 100644 --- a/gr-vocoder/lib/gsm/table.c +++ b/gr-vocoder/lib/gsm/table.c @@ -51,7 +51,7 @@ word gsm_QLB[4] = { 3277, 11469, 21299, 32767 }; word gsm_H[11] = {-134, -374, 0, 2054, 5741, 8192, 5741, 2054, 0, -374, -134 }; -/* Table 4.5 Normalized inverse mantissa used to compute xM/xmax +/* Table 4.5 Normalized inverse mantissa used to compute xM/xmax */ /* i 0 1 2 3 4 5 6 7 */ word gsm_NRFAC[8] = { 29128, 26215, 23832, 21846, 20165, 18725, 17476, 16384 }; diff --git a/gr-vocoder/lib/vocoder_alaw_decode_bs.cc b/gr-vocoder/lib/vocoder_alaw_decode_bs.cc index 7ffdddd81..33c119e05 100644 --- a/gr-vocoder/lib/vocoder_alaw_decode_bs.cc +++ b/gr-vocoder/lib/vocoder_alaw_decode_bs.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -50,7 +50,7 @@ vocoder_alaw_decode_bs::~vocoder_alaw_decode_bs() -int +int vocoder_alaw_decode_bs::work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) @@ -60,6 +60,6 @@ vocoder_alaw_decode_bs::work(int noutput_items, for(int i = 0; i < noutput_items; i++) out[i] = alaw2linear(in[i]); - + return noutput_items; } diff --git a/gr-vocoder/lib/vocoder_alaw_encode_sb.cc b/gr-vocoder/lib/vocoder_alaw_encode_sb.cc index e4d975271..ebb953c34 100644 --- a/gr-vocoder/lib/vocoder_alaw_encode_sb.cc +++ b/gr-vocoder/lib/vocoder_alaw_encode_sb.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -48,14 +48,14 @@ vocoder_alaw_encode_sb::~vocoder_alaw_encode_sb() { } -int +int vocoder_alaw_encode_sb::work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) { const short *in = (const short *)input_items[0]; unsigned char *out = (unsigned char *)output_items[0]; - + for(int i = 0; i < noutput_items; i++) out[i] = linear2alaw(in[i]); diff --git a/gr-vocoder/lib/vocoder_codec2_decode_ps.cc b/gr-vocoder/lib/vocoder_codec2_decode_ps.cc index b1feb1aaf..8e95c75dd 100644 --- a/gr-vocoder/lib/vocoder_codec2_decode_ps.cc +++ b/gr-vocoder/lib/vocoder_codec2_decode_ps.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-vocoder/lib/vocoder_codec2_encode_sp.cc b/gr-vocoder/lib/vocoder_codec2_encode_sp.cc index 1f22e38b2..da1c59c43 100644 --- a/gr-vocoder/lib/vocoder_codec2_encode_sp.cc +++ b/gr-vocoder/lib/vocoder_codec2_encode_sp.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-vocoder/lib/vocoder_cvsd_decode_bs.cc b/gr-vocoder/lib/vocoder_cvsd_decode_bs.cc index baf99f041..8202ec36c 100644 --- a/gr-vocoder/lib/vocoder_cvsd_decode_bs.cc +++ b/gr-vocoder/lib/vocoder_cvsd_decode_bs.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -37,7 +37,7 @@ * Create a new instance of vocoder_cvsd_decode_bs and return * a boost shared_ptr. This is effectively the public constructor. */ -vocoder_cvsd_decode_bs_sptr +vocoder_cvsd_decode_bs_sptr vocoder_make_cvsd_decode_bs (short min_step, short max_step, double step_decay, double accum_decay, int K, int J, short pos_accum_max, short neg_accum_max) @@ -47,7 +47,7 @@ vocoder_make_cvsd_decode_bs (short min_step, short max_step, double step_decay, pos_accum_max, neg_accum_max)); } -vocoder_cvsd_decode_bs::vocoder_cvsd_decode_bs (short min_step, short max_step, double step_decay, +vocoder_cvsd_decode_bs::vocoder_cvsd_decode_bs (short min_step, short max_step, double step_decay, double accum_decay, int K, int J, short pos_accum_max, short neg_accum_max) : gr_sync_interpolator ("vocoder_cvsd_decode_bs", @@ -55,14 +55,14 @@ vocoder_cvsd_decode_bs::vocoder_cvsd_decode_bs (short min_step, short max_step, gr_make_io_signature (1, 1, sizeof (short)), 8), d_min_step (min_step), d_max_step(max_step), d_step_decay(step_decay), - d_accum_decay(accum_decay), d_K(K), d_J(J), + d_accum_decay(accum_decay), d_K(K), d_J(J), d_pos_accum_max(pos_accum_max), d_neg_accum_max(neg_accum_max), - d_accum(0), - d_loop_counter(1), + d_accum(0), + d_loop_counter(1), d_runner(0), d_runner_mask(0), d_stepsize(min_step) - + { assert(d_K <= 32); assert(d_J <= d_K); @@ -78,7 +78,7 @@ unsigned char vocoder_cvsd_decode_bs::cvsd_bitwise_sum (unsigned int input) { unsigned int temp=input; unsigned char bits=0; - + while(temp) { temp=temp&(temp-1); bits++; @@ -91,7 +91,7 @@ int vocoder_cvsd_decode_bs::cvsd_round (double input) double temp; temp=input+0.5; temp=floor(temp); - + return (int)temp; } @@ -100,18 +100,18 @@ unsigned int vocoder_cvsd_decode_bs::cvsd_pow (short radix, short power) double d_radix = (double) radix; int i_power = (int) power; double output; - + output=pow(d_radix,i_power); - return ( (unsigned int) cvsd_round(output)); + return ( (unsigned int) cvsd_round(output)); } -int +int vocoder_cvsd_decode_bs::work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) { - + const unsigned char *in = (const unsigned char *) input_items[0]; short *out = (short *) output_items[0]; @@ -122,28 +122,28 @@ vocoder_cvsd_decode_bs::work (int noutput_items, unsigned int mask=0; // 4 bytes, 0 .. 4,294,967,295 unsigned char input_byte=0; // 1 bytes unsigned char input_bit=0; // 1 byte, 0 .. 255 - + // Loop through each input data point for(i = 0; i < noutput_items/8.0; i++) { input_byte = in[i]; // Initiliaze bit counter - bit_count=0; - + bit_count=0; + while(bit_count<8) { // Compute the Appropriate Mask mask=cvsd_pow(2,7-bit_count); - + // Pull off the corresponding bit input_bit = input_byte & mask; - + // Update the bit counter bit_count++; - + // Update runner with the next input bit // Runner is a shift-register; shift left, add on newest output bit d_runner = (d_runner<<1) | ((unsigned int) input_bit); - + // Run this only if you have >= J bits in your shift register if (d_loop_counter>=d_J) { // Update Step Size @@ -157,7 +157,7 @@ vocoder_cvsd_decode_bs::work (int noutput_items, d_stepsize = std::max( (short) cvsd_round(d_stepsize*d_step_decay), d_min_step); } } - + // Update Accum (i.e. the reference value) if (input_bit) { d_accum=d_accum+d_stepsize; @@ -165,10 +165,10 @@ vocoder_cvsd_decode_bs::work (int noutput_items, else { d_accum=d_accum-d_stepsize; } - + // Multiply by Accum_Decay d_accum=(cvsd_round(d_accum*d_accum_decay)); - + // Check for overflow if (d_accum >=((int) d_pos_accum_max)) { d_accum=(int)d_pos_accum_max; @@ -176,18 +176,18 @@ vocoder_cvsd_decode_bs::work (int noutput_items, else if (d_accum <=((int) d_neg_accum_max)) { d_accum=(int)d_neg_accum_max; } - + // Find the output short to write to the file output_short=((short) d_accum); - + if (d_loop_counter <= d_K) { d_loop_counter++; } - + *(out++) = output_short; - } // while () - + } // while () + } // for() - + return noutput_items; } diff --git a/gr-vocoder/lib/vocoder_cvsd_encode_sb.cc b/gr-vocoder/lib/vocoder_cvsd_encode_sb.cc index 71cf6df8c..e15882c22 100644 --- a/gr-vocoder/lib/vocoder_cvsd_encode_sb.cc +++ b/gr-vocoder/lib/vocoder_cvsd_encode_sb.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -37,7 +37,7 @@ * Create a new instance of vocoder_cvsd_encode_sb and return * a boost shared_ptr. This is effectively the public constructor. */ -vocoder_cvsd_encode_sb_sptr +vocoder_cvsd_encode_sb_sptr vocoder_make_cvsd_encode_sb (short min_step, short max_step, double step_decay, double accum_decay, int K, int J, short pos_accum_max, short neg_accum_max) @@ -47,7 +47,7 @@ vocoder_make_cvsd_encode_sb (short min_step, short max_step, double step_decay, pos_accum_max, neg_accum_max)); } -vocoder_cvsd_encode_sb::vocoder_cvsd_encode_sb (short min_step, short max_step, double step_decay, +vocoder_cvsd_encode_sb::vocoder_cvsd_encode_sb (short min_step, short max_step, double step_decay, double accum_decay, int K, int J, short pos_accum_max, short neg_accum_max) : gr_sync_decimator ("vocoder_cvsd_encode_sb", @@ -55,10 +55,10 @@ vocoder_cvsd_encode_sb::vocoder_cvsd_encode_sb (short min_step, short max_step, gr_make_io_signature (1, 1, sizeof (unsigned char)), 8), d_min_step (min_step), d_max_step(max_step), d_step_decay(step_decay), - d_accum_decay(accum_decay), d_K(K), d_J(J), + d_accum_decay(accum_decay), d_K(K), d_J(J), d_pos_accum_max(pos_accum_max), d_neg_accum_max(neg_accum_max), - d_accum(0), - d_loop_counter(1), + d_accum(0), + d_loop_counter(1), d_runner(0), d_stepsize(min_step) @@ -77,7 +77,7 @@ unsigned char vocoder_cvsd_encode_sb::cvsd_bitwise_sum (unsigned int input) { unsigned int temp=input; unsigned char bits=0; - + while(temp) { temp=temp&(temp-1); bits++; @@ -90,7 +90,7 @@ int vocoder_cvsd_encode_sb::cvsd_round (double input) double temp; temp=input+0.5; temp=floor(temp); - + return (int)temp; } @@ -101,10 +101,10 @@ unsigned int vocoder_cvsd_encode_sb::cvsd_pow (short radix, short power) double output; output=pow(d_radix,i_power); - return ( (unsigned int) cvsd_round(output)); + return ( (unsigned int) cvsd_round(output)); } -int +int vocoder_cvsd_encode_sb::work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) @@ -117,7 +117,7 @@ vocoder_cvsd_encode_sb::work (int noutput_items, unsigned char output_byte=0; // 1 bytes 0.255 unsigned char bit_count=0; // 1 byte, 0 .. 255 unsigned int mask=0; // 4 bytes, 0 .. 4,294,967,295 - + // Loop through each input data point for(i = 0; i < noutput_items*8; i++) { if((int)in[i] >= d_accum) { // Note: sign((data(n)-accum)) @@ -126,7 +126,7 @@ vocoder_cvsd_encode_sb::work (int noutput_items, else { output_bit=0; } - + // Update Accum (i.e. the reference value) if (output_bit) { d_accum=d_accum+d_stepsize; @@ -147,7 +147,7 @@ vocoder_cvsd_encode_sb::work (int noutput_items, else if(d_accum <= ((int) d_neg_accum_max)) { d_accum = (int) d_neg_accum_max; } - + // Update runner with the last output bit // Update Step Size if (d_loop_counter >= d_J) { // Run this only if you have >= J bits in your shift register @@ -158,10 +158,10 @@ vocoder_cvsd_encode_sb::work (int noutput_items, } else { // No runs of 1s and 0s - d_stepsize = std::max( (short)cvsd_round(d_stepsize*d_step_decay), d_min_step); + d_stepsize = std::max( (short)cvsd_round(d_stepsize*d_step_decay), d_min_step); } } - + // Runner is a shift-register; shift left, add on newest output bit d_runner = (d_runner<<1) | ((unsigned int) output_bit); @@ -169,7 +169,7 @@ vocoder_cvsd_encode_sb::work (int noutput_items, // If you have put in 8 bits, output it as a byte output_byte = (output_byte<<1) | output_bit; bit_count++; - + if (d_loop_counter <= d_K) { d_loop_counter++; } @@ -178,7 +178,7 @@ vocoder_cvsd_encode_sb::work (int noutput_items, if (bit_count==8) { // Read in short from the file *(out++) = output_byte; - + // Reset the bit_count bit_count=0; output_byte=0; diff --git a/gr-vocoder/lib/vocoder_g721_decode_bs.cc b/gr-vocoder/lib/vocoder_g721_decode_bs.cc index 2abee8d14..d5b737d1c 100644 --- a/gr-vocoder/lib/vocoder_g721_decode_bs.cc +++ b/gr-vocoder/lib/vocoder_g721_decode_bs.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -66,7 +66,7 @@ vocoder_g721_decode_bs_impl::~vocoder_g721_decode_bs_impl() { } -int +int vocoder_g721_decode_bs_impl::work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) @@ -76,6 +76,6 @@ vocoder_g721_decode_bs_impl::work(int noutput_items, for(int i = 0; i < noutput_items; i++) out[i] = g721_decoder(in[i], AUDIO_ENCODING_LINEAR, &d_state); - + return noutput_items; } diff --git a/gr-vocoder/lib/vocoder_g721_encode_sb.cc b/gr-vocoder/lib/vocoder_g721_encode_sb.cc index 667e983dc..1e33613a5 100644 --- a/gr-vocoder/lib/vocoder_g721_encode_sb.cc +++ b/gr-vocoder/lib/vocoder_g721_encode_sb.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -66,7 +66,7 @@ vocoder_g721_encode_sb_impl::~vocoder_g721_encode_sb_impl() { } -int +int vocoder_g721_encode_sb_impl::work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) @@ -76,6 +76,6 @@ vocoder_g721_encode_sb_impl::work(int noutput_items, for(int i = 0; i < noutput_items; i++) out[i] = g721_encoder(in[i], AUDIO_ENCODING_LINEAR, &d_state); - + return noutput_items; } diff --git a/gr-vocoder/lib/vocoder_g723_24_decode_bs.cc b/gr-vocoder/lib/vocoder_g723_24_decode_bs.cc index 2ea036c58..0bedfe4ca 100644 --- a/gr-vocoder/lib/vocoder_g723_24_decode_bs.cc +++ b/gr-vocoder/lib/vocoder_g723_24_decode_bs.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -66,7 +66,7 @@ vocoder_g723_24_decode_bs_impl::~vocoder_g723_24_decode_bs_impl() { } -int +int vocoder_g723_24_decode_bs_impl::work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) @@ -76,6 +76,6 @@ vocoder_g723_24_decode_bs_impl::work(int noutput_items, for(int i = 0; i < noutput_items; i++) out[i] = g723_24_decoder(in[i], AUDIO_ENCODING_LINEAR, &d_state); - + return noutput_items; } diff --git a/gr-vocoder/lib/vocoder_g723_24_encode_sb.cc b/gr-vocoder/lib/vocoder_g723_24_encode_sb.cc index 7e6914223..1b61de79f 100644 --- a/gr-vocoder/lib/vocoder_g723_24_encode_sb.cc +++ b/gr-vocoder/lib/vocoder_g723_24_encode_sb.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -66,7 +66,7 @@ vocoder_g723_24_encode_sb_impl::~vocoder_g723_24_encode_sb_impl() { } -int +int vocoder_g723_24_encode_sb_impl::work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) @@ -76,6 +76,6 @@ vocoder_g723_24_encode_sb_impl::work(int noutput_items, for(int i = 0; i < noutput_items; i++) out[i] = g723_24_encoder(in[i], AUDIO_ENCODING_LINEAR, &d_state); - + return noutput_items; } diff --git a/gr-vocoder/lib/vocoder_g723_40_decode_bs.cc b/gr-vocoder/lib/vocoder_g723_40_decode_bs.cc index 38fd0fb5e..cdc152896 100644 --- a/gr-vocoder/lib/vocoder_g723_40_decode_bs.cc +++ b/gr-vocoder/lib/vocoder_g723_40_decode_bs.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -66,7 +66,7 @@ vocoder_g723_40_decode_bs_impl::~vocoder_g723_40_decode_bs_impl() { } -int +int vocoder_g723_40_decode_bs_impl::work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) @@ -76,6 +76,6 @@ vocoder_g723_40_decode_bs_impl::work(int noutput_items, for(int i = 0; i < noutput_items; i++) out[i] = g723_40_decoder(in[i], AUDIO_ENCODING_LINEAR, &d_state); - + return noutput_items; } diff --git a/gr-vocoder/lib/vocoder_g723_40_encode_sb.cc b/gr-vocoder/lib/vocoder_g723_40_encode_sb.cc index 1089306e7..083aaf97a 100644 --- a/gr-vocoder/lib/vocoder_g723_40_encode_sb.cc +++ b/gr-vocoder/lib/vocoder_g723_40_encode_sb.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -66,7 +66,7 @@ vocoder_g723_40_encode_sb_impl::~vocoder_g723_40_encode_sb_impl() { } -int +int vocoder_g723_40_encode_sb_impl::work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) @@ -76,6 +76,6 @@ vocoder_g723_40_encode_sb_impl::work(int noutput_items, for(int i = 0; i < noutput_items; i++) out[i] = g723_40_encoder(in[i], AUDIO_ENCODING_LINEAR, &d_state); - + return noutput_items; } diff --git a/gr-vocoder/lib/vocoder_gsm_fr_decode_ps.cc b/gr-vocoder/lib/vocoder_gsm_fr_decode_ps.cc index 986e0814e..146ddf63c 100644 --- a/gr-vocoder/lib/vocoder_gsm_fr_decode_ps.cc +++ b/gr-vocoder/lib/vocoder_gsm_fr_decode_ps.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 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, diff --git a/gr-vocoder/lib/vocoder_gsm_fr_encode_sp.cc b/gr-vocoder/lib/vocoder_gsm_fr_encode_sp.cc index 7a69b856d..5abb3a457 100644 --- a/gr-vocoder/lib/vocoder_gsm_fr_encode_sp.cc +++ b/gr-vocoder/lib/vocoder_gsm_fr_encode_sp.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2010 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, diff --git a/gr-vocoder/lib/vocoder_ulaw_decode_bs.cc b/gr-vocoder/lib/vocoder_ulaw_decode_bs.cc index 3ade9d3f0..5abec77f8 100644 --- a/gr-vocoder/lib/vocoder_ulaw_decode_bs.cc +++ b/gr-vocoder/lib/vocoder_ulaw_decode_bs.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -50,7 +50,7 @@ vocoder_ulaw_decode_bs::~vocoder_ulaw_decode_bs() -int +int vocoder_ulaw_decode_bs::work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) @@ -60,6 +60,6 @@ vocoder_ulaw_decode_bs::work(int noutput_items, for(int i = 0; i < noutput_items; i++) out[i] = ulaw2linear(in[i]); - + return noutput_items; } diff --git a/gr-vocoder/lib/vocoder_ulaw_encode_sb.cc b/gr-vocoder/lib/vocoder_ulaw_encode_sb.cc index 19c53d72c..3fabd7ad8 100644 --- a/gr-vocoder/lib/vocoder_ulaw_encode_sb.cc +++ b/gr-vocoder/lib/vocoder_ulaw_encode_sb.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -48,14 +48,14 @@ vocoder_ulaw_encode_sb::~vocoder_ulaw_encode_sb() { } -int +int vocoder_ulaw_encode_sb::work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) { const short *in = (const short *)input_items[0]; unsigned char *out = (unsigned char *)output_items[0]; - + for(int i = 0; i < noutput_items; i++) out[i] = linear2ulaw(in[i]); diff --git a/gr-vocoder/python/.gitignore b/gr-vocoder/python/.gitignore deleted file mode 100644 index bf03975bb..000000000 --- a/gr-vocoder/python/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -/Makefile -/Makefile.in -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/*.pyo -/run_tests diff --git a/gr-vocoder/python/Makefile.am b/gr-vocoder/python/Makefile.am deleted file mode 100644 index 4b6146ca7..000000000 --- a/gr-vocoder/python/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -vocoderdir = $(grpythondir)/vocoder - -TESTS = run_tests - -noinst_PYTHON = \ - qa_alaw_vocoder.py \ - qa_codec2_vocoder.py \ - qa_cvsd_vocoder.py \ - qa_g721_vocoder.py \ - qa_g723_24_vocoder.py \ - qa_g723_40_vocoder.py \ - qa_gsm_full_rate.py \ - qa_ulaw_vocoder.py - -vocoder_PYTHON = \ - __init__.py \ - cvsd.py - -EXTRA_DIST += run_tests.in diff --git a/gr-vocoder/python/__init__.py b/gr-vocoder/python/__init__.py index c5477b2be..ba5862f8d 100644 --- a/gr-vocoder/python/__init__.py +++ b/gr-vocoder/python/__init__.py @@ -1,23 +1,23 @@ # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# ''' This is the gr-vocoder package. This package includes the various diff --git a/gr-vocoder/python/cvsd.py b/gr-vocoder/python/cvsd.py index 27b06ddeb..e9b3ee305 100644 --- a/gr-vocoder/python/cvsd.py +++ b/gr-vocoder/python/cvsd.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2007,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr import vocoder_swig @@ -32,7 +32,7 @@ class cvsd_encode_fb(gr.hier_block2): The incoming sampling rate can be anything, though, of course, the higher the sampling rate and the higher the interpolation rate are, the better the sound quality. ''' - + def __init__(self, resample=8, bw=0.5): ''' When using the CVSD vocoder, appropriate sampling rates are from 8k to 64k with resampling rates diff --git a/gr-vocoder/python/qa_alaw_vocoder.py b/gr-vocoder/python/qa_alaw_vocoder.py index b7b937138..07d0feb58 100755 --- a/gr-vocoder/python/qa_alaw_vocoder.py +++ b/gr-vocoder/python/qa_alaw_vocoder.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest from vocoder_swig import * @@ -27,7 +27,7 @@ class test_alaw_vocoder (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block() - + def tearDown (self): self.tb = None diff --git a/gr-vocoder/python/qa_codec2_vocoder.py b/gr-vocoder/python/qa_codec2_vocoder.py index 699bb7dda..2f707b311 100755 --- a/gr-vocoder/python/qa_codec2_vocoder.py +++ b/gr-vocoder/python/qa_codec2_vocoder.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest from vocoder_swig import * @@ -27,13 +27,13 @@ class test_codec2_vocoder (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block() - + def tearDown (self): self.tb = None def test001_module_load (self): raw_enc = codec2_encode_sp(); raw_dec = codec2_decode_ps(); - + if __name__ == '__main__': gr_unittest.run(test_codec2_vocoder, "test_codec2_vocoder.xml") diff --git a/gr-vocoder/python/qa_cvsd_vocoder.py b/gr-vocoder/python/qa_cvsd_vocoder.py index 53045e4a9..573e6a130 100755 --- a/gr-vocoder/python/qa_cvsd_vocoder.py +++ b/gr-vocoder/python/qa_cvsd_vocoder.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2007,2010,2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest from vocoder_swig import * @@ -28,7 +28,7 @@ class test_cvsd_vocoder (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block() - + def tearDown (self): self.tb = None @@ -98,26 +98,26 @@ class test_cvsd_vocoder (gr_unittest.TestCase): src = gr.sig_source_f(sample_rate, gr.GR_SIN_WAVE, 200, 1, 0) head = gr.head(gr.sizeof_float, 100) src_scale = gr.multiply_const_ff(scale_factor) - + interp = blks2.rational_resampler_fff(8, 1) f2s = gr.float_to_short () - + enc = cvsd_vocoder.encode_sb() dec = cvsd_vocoder.decode_bs() - + s2f = gr.short_to_float () decim = blks2.rational_resampler_fff(1, 8) - + sink_scale = gr.multiply_const_ff(1.0/scale_factor) sink = gr.vector_sink_f() - + self.tb.connect(src, src_scale, interp, f2s, enc) self.tb.connect(enc, dec, s2f, decim, sink_scale, head, sink) self.tb.run() print sink.data() - + self.assertFloatTuplesAlmostEqual (expected_data, sink.data(), 5) """ - + if __name__ == '__main__': gr_unittest.run(test_cvsd_vocoder, "test_cvsd_vocoder.xml") diff --git a/gr-vocoder/python/qa_g721_vocoder.py b/gr-vocoder/python/qa_g721_vocoder.py index 79cc944f3..26fcea789 100755 --- a/gr-vocoder/python/qa_g721_vocoder.py +++ b/gr-vocoder/python/qa_g721_vocoder.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest from vocoder_swig import * @@ -27,7 +27,7 @@ class test_g721_vocoder (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block() - + def tearDown (self): self.tb = None diff --git a/gr-vocoder/python/qa_g723_24_vocoder.py b/gr-vocoder/python/qa_g723_24_vocoder.py index ccf215f46..be95a8d94 100755 --- a/gr-vocoder/python/qa_g723_24_vocoder.py +++ b/gr-vocoder/python/qa_g723_24_vocoder.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest from vocoder_swig import * @@ -27,7 +27,7 @@ class test_g723_24_vocoder (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block() - + def tearDown (self): self.tb = None diff --git a/gr-vocoder/python/qa_g723_40_vocoder.py b/gr-vocoder/python/qa_g723_40_vocoder.py index 9e6a52339..abbb4079a 100755 --- a/gr-vocoder/python/qa_g723_40_vocoder.py +++ b/gr-vocoder/python/qa_g723_40_vocoder.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest from vocoder_swig import * @@ -27,7 +27,7 @@ class test_g723_40_vocoder (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block() - + def tearDown (self): self.tb = None diff --git a/gr-vocoder/python/qa_gsm_full_rate.py b/gr-vocoder/python/qa_gsm_full_rate.py index f9125905c..2e551e193 100755 --- a/gr-vocoder/python/qa_gsm_full_rate.py +++ b/gr-vocoder/python/qa_gsm_full_rate.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007,2010 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 vocoder_swig diff --git a/gr-vocoder/python/qa_ulaw_vocoder.py b/gr-vocoder/python/qa_ulaw_vocoder.py index 0e201638c..2bc638567 100755 --- a/gr-vocoder/python/qa_ulaw_vocoder.py +++ b/gr-vocoder/python/qa_ulaw_vocoder.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gr_unittest from vocoder_swig import * @@ -27,7 +27,7 @@ class test_ulaw_vocoder (gr_unittest.TestCase): def setUp (self): self.tb = gr.top_block() - + def tearDown (self): self.tb = None diff --git a/gr-vocoder/python/run_tests.in b/gr-vocoder/python/run_tests.in deleted file mode 100644 index e0c61a6b4..000000000 --- a/gr-vocoder/python/run_tests.in +++ /dev/null @@ -1,10 +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 - -@top_builddir@/run_tests.sh \ - @abs_top_srcdir@/gr-vocoder \ - @abs_top_builddir@/gr-vocoder \ - @srcdir@ diff --git a/gr-vocoder/swig/.gitignore b/gr-vocoder/swig/.gitignore deleted file mode 100644 index 6a0410b79..000000000 --- a/gr-vocoder/swig/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -/run_guile_tests diff --git a/gr-vocoder/swig/Makefile.am b/gr-vocoder/swig/Makefile.am deleted file mode 100644 index 465097a8d..000000000 --- a/gr-vocoder/swig/Makefile.am +++ /dev/null @@ -1,97 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common -include $(top_srcdir)/Makefile.swig - -TESTS = -EXTRA_DIST += $(nobase_guile_DATA) - -AM_CPPFLAGS = \ - -I$(abs_top_srcdir)/gr-vocoder/include \ - $(STD_DEFINES_AND_INCLUDES) \ - $(PYTHON_CPPFLAGS) \ - $(WITH_INCLUDES) - -if GUILE -nobase_guile_DATA = \ - gnuradio/vocoder_swig.scm -endif - -noinst_GUILE = vocoder.test - - -############################## -# SWIG interface and library - -TOP_SWIG_DOC_IFILES = \ - vocoder_swig_doc.i - -TOP_SWIG_IFILES = \ - $(TOP_SWIG_DOC_IFILES) \ - vocoder_swig.i - -BUILT_SOURCES += \ - $(TOP_SWIG_DOC_IFILES) - -EXTRA_DIST += \ - $(TOP_SWIG_DOC_IFILES) - -$(TOP_SWIG_DOC_IFILES): - `echo "" > $@` - -# Install so that they end up available as: -# import gnuradio.vocoder -# This ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio/vocoder -vocoder_swig_pythondir_category = \ - gnuradio/vocoder - -# additional libraries for linking with the SWIG-generated library -vocoder_swig_la_swig_libadd = \ - $(abs_top_builddir)/gr-vocoder/lib/libgnuradio-vocoder.la - -# additional SWIG files to be installed -vocoder_swig_swiginclude_headers = \ - vocoder_alaw_decode_bs.i \ - vocoder_alaw_encode_sb.i \ - vocoder_codec2_decode_ps.i \ - vocoder_codec2_encode_sp.i \ - vocoder_cvsd_decode_bs.i \ - vocoder_cvsd_encode_sb.i \ - vocoder_g721_decode_bs.i \ - vocoder_g721_encode_sb.i \ - vocoder_g723_24_decode_bs.i \ - vocoder_g723_24_encode_sb.i \ - vocoder_g723_40_decode_bs.i \ - vocoder_g723_40_encode_sb.i \ - vocoder_gsm_fr_encode_sp.i \ - vocoder_gsm_fr_decode_ps.i \ - vocoder_ulaw_decode_bs.i \ - vocoder_ulaw_encode_sb.i \ - $(TOP_SWIG_DOC_IFILE) - -vocoder_swig_swig_args = \ - -I$(abs_top_builddir)/gr-vocoder/lib - -if GUILE -TESTS += run_guile_tests -endif diff --git a/gr-vocoder/swig/Makefile.swig.gen b/gr-vocoder/swig/Makefile.swig.gen deleted file mode 100644 index b0d0504a8..000000000 --- a/gr-vocoder/swig/Makefile.swig.gen +++ /dev/null @@ -1,145 +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 vocoder_swig.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/vocoder_swig -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/vocoder_swig -## -## 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. - -vocoder_swig_pythondir_category ?= gnuradio/vocoder_swig -vocoder_swig_pylibdir_category ?= $(vocoder_swig_pythondir_category) -vocoder_swig_pythondir = $(pythondir)/$(vocoder_swig_pythondir_category) -vocoder_swig_pylibdir = $(pyexecdir)/$(vocoder_swig_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -vocoder_swig_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/vocoder_swig -# FIXME: determince whether these should be installed with gnuradio. -vocoder_swig_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -vocoder_swig_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 > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -vocoder_swig_swiginclude_HEADERS = \ - vocoder_swig.i \ - $(vocoder_swig_swiginclude_headers) - -if PYTHON -vocoder_swig_pylib_LTLIBRARIES = \ - _vocoder_swig.la - -_vocoder_swig_la_SOURCES = \ - python/vocoder_swig.cc \ - $(vocoder_swig_la_swig_sources) - -vocoder_swig_python_PYTHON = \ - vocoder_swig.py \ - $(vocoder_swig_python) - -_vocoder_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(vocoder_swig_la_swig_libadd) - -_vocoder_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(vocoder_swig_la_swig_ldflags) - -_vocoder_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(vocoder_swig_la_swig_cxxflags) - -python/vocoder_swig.cc: vocoder_swig.py -vocoder_swig.py: vocoder_swig.i - -# Include the python dependencies for this file --include python/vocoder_swig.d - -endif # end of if python - -if GUILE - -vocoder_swig_scmlib_LTLIBRARIES = \ - libguile-gnuradio-vocoder_swig.la -libguile_gnuradio_vocoder_swig_la_SOURCES = \ - guile/vocoder_swig.cc \ - $(vocoder_swig_la_swig_sources) -nobase_vocoder_swig_scm_DATA = \ - gnuradio/vocoder_swig.scm \ - gnuradio/vocoder_swig-primitive.scm -libguile_gnuradio_vocoder_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(vocoder_swig_la_swig_libadd) -libguile_gnuradio_vocoder_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(vocoder_swig_la_swig_ldflags) -libguile_gnuradio_vocoder_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(vocoder_swig_la_swig_cxxflags) - -guile/vocoder_swig.cc: gnuradio/vocoder_swig.scm -gnuradio/vocoder_swig.scm: vocoder_swig.i -gnuradio/vocoder_swig-primitive.scm: gnuradio/vocoder_swig.scm - -# Include the guile dependencies for this file --include guile/vocoder_swig.d - -endif # end of GUILE - - diff --git a/gr-vocoder/swig/run_guile_tests.in b/gr-vocoder/swig/run_guile_tests.in deleted file mode 100644 index 5d08b0dd5..000000000 --- a/gr-vocoder/swig/run_guile_tests.in +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -. @top_builddir@/setup_guile_test_env - -# 1st argument is absolute path to hand coded guile source directory -# 2nd argument is absolute path to component C++ shared library build directory -# 3nd argument is absolute path to component SWIG build directory - -add_local_paths \ - @srcdir@ \ - @abs_builddir@ \ - @abs_builddir@ - -@GUILE@ -e main -c '(use-modules (gnuradio test-suite guile-test))' -t @srcdir@ diff --git a/gr-vocoder/swig/vocoder_alaw_decode_bs.i b/gr-vocoder/swig/vocoder_alaw_decode_bs.i index f789c454f..6c51f5edd 100644 --- a/gr-vocoder/swig/vocoder_alaw_decode_bs.i +++ b/gr-vocoder/swig/vocoder_alaw_decode_bs.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-vocoder/swig/vocoder_alaw_encode_sb.i b/gr-vocoder/swig/vocoder_alaw_encode_sb.i index 9fe537d55..0769829a0 100644 --- a/gr-vocoder/swig/vocoder_alaw_encode_sb.i +++ b/gr-vocoder/swig/vocoder_alaw_encode_sb.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-vocoder/swig/vocoder_codec2_decode_ps.i b/gr-vocoder/swig/vocoder_codec2_decode_ps.i index e53cb078a..a2035febe 100644 --- a/gr-vocoder/swig/vocoder_codec2_decode_ps.i +++ b/gr-vocoder/swig/vocoder_codec2_decode_ps.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-vocoder/swig/vocoder_codec2_encode_sp.i b/gr-vocoder/swig/vocoder_codec2_encode_sp.i index 84f26954d..07acfdfa4 100644 --- a/gr-vocoder/swig/vocoder_codec2_encode_sp.i +++ b/gr-vocoder/swig/vocoder_codec2_encode_sp.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-vocoder/swig/vocoder_cvsd_decode_bs.i b/gr-vocoder/swig/vocoder_cvsd_decode_bs.i index e990f5440..ff2c89e5d 100644 --- a/gr-vocoder/swig/vocoder_cvsd_decode_bs.i +++ b/gr-vocoder/swig/vocoder_cvsd_decode_bs.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2009,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-vocoder/swig/vocoder_cvsd_encode_sb.i b/gr-vocoder/swig/vocoder_cvsd_encode_sb.i index 5db7b3a48..e0a7db5df 100644 --- a/gr-vocoder/swig/vocoder_cvsd_encode_sb.i +++ b/gr-vocoder/swig/vocoder_cvsd_encode_sb.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,2009,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-vocoder/swig/vocoder_g721_decode_bs.i b/gr-vocoder/swig/vocoder_g721_decode_bs.i index 47e7d2861..beefd375e 100644 --- a/gr-vocoder/swig/vocoder_g721_decode_bs.i +++ b/gr-vocoder/swig/vocoder_g721_decode_bs.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-vocoder/swig/vocoder_g721_encode_sb.i b/gr-vocoder/swig/vocoder_g721_encode_sb.i index 0675087a0..38c231e8d 100644 --- a/gr-vocoder/swig/vocoder_g721_encode_sb.i +++ b/gr-vocoder/swig/vocoder_g721_encode_sb.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-vocoder/swig/vocoder_g723_24_decode_bs.i b/gr-vocoder/swig/vocoder_g723_24_decode_bs.i index 41548059f..33f6e88b9 100644 --- a/gr-vocoder/swig/vocoder_g723_24_decode_bs.i +++ b/gr-vocoder/swig/vocoder_g723_24_decode_bs.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-vocoder/swig/vocoder_g723_24_encode_sb.i b/gr-vocoder/swig/vocoder_g723_24_encode_sb.i index 7165a8a82..a362554ab 100644 --- a/gr-vocoder/swig/vocoder_g723_24_encode_sb.i +++ b/gr-vocoder/swig/vocoder_g723_24_encode_sb.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-vocoder/swig/vocoder_g723_40_decode_bs.i b/gr-vocoder/swig/vocoder_g723_40_decode_bs.i index d9ec9d6c9..a23b1c0e4 100644 --- a/gr-vocoder/swig/vocoder_g723_40_decode_bs.i +++ b/gr-vocoder/swig/vocoder_g723_40_decode_bs.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-vocoder/swig/vocoder_g723_40_encode_sb.i b/gr-vocoder/swig/vocoder_g723_40_encode_sb.i index 839ae46cf..8fd438c66 100644 --- a/gr-vocoder/swig/vocoder_g723_40_encode_sb.i +++ b/gr-vocoder/swig/vocoder_g723_40_encode_sb.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-vocoder/swig/vocoder_gsm_fr_decode_ps.i b/gr-vocoder/swig/vocoder_gsm_fr_decode_ps.i index 8e96689f6..3ad4e45fa 100644 --- a/gr-vocoder/swig/vocoder_gsm_fr_decode_ps.i +++ b/gr-vocoder/swig/vocoder_gsm_fr_decode_ps.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -28,7 +28,7 @@ GR_SWIG_BLOCK_MAGIC(vocoder,gsm_fr_decode_ps); vocoder_gsm_fr_decode_ps_sptr vocoder_make_gsm_fr_decode_ps(); -class vocoder_gsm_fr_decode_ps : public gr_sync_interpolator +class vocoder_gsm_fr_decode_ps : public gr_sync_interpolator { public: ~vocoder_gsm_fr_decode_ps(); diff --git a/gr-vocoder/swig/vocoder_gsm_fr_encode_sp.i b/gr-vocoder/swig/vocoder_gsm_fr_encode_sp.i index 8216336a9..348f8d15d 100644 --- a/gr-vocoder/swig/vocoder_gsm_fr_encode_sp.i +++ b/gr-vocoder/swig/vocoder_gsm_fr_encode_sp.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -28,7 +28,7 @@ GR_SWIG_BLOCK_MAGIC(vocoder,gsm_fr_encode_sp); vocoder_gsm_fr_encode_sp_sptr vocoder_make_gsm_fr_encode_sp(); -class vocoder_gsm_fr_encode_sp : public gr_sync_decimator +class vocoder_gsm_fr_encode_sp : public gr_sync_decimator { public: ~vocoder_gsm_fr_encode_sp(); diff --git a/gr-vocoder/swig/vocoder_swig.i b/gr-vocoder/swig/vocoder_swig.i index 931494307..524e035ce 100644 --- a/gr-vocoder/swig/vocoder_swig.i +++ b/gr-vocoder/swig/vocoder_swig.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -41,13 +41,3 @@ %include "vocoder_gsm_fr_encode_sp.i" %include "vocoder_ulaw_decode_bs.i" %include "vocoder_ulaw_encode_sb.i" - -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-vocoder" "scm_init_gnuradio_gsm_vocoder_module") -%} - -%goops %{ -(use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif diff --git a/gr-vocoder/swig/vocoder_ulaw_decode_bs.i b/gr-vocoder/swig/vocoder_ulaw_decode_bs.i index 5e8e8c9ae..23363ca5c 100644 --- a/gr-vocoder/swig/vocoder_ulaw_decode_bs.i +++ b/gr-vocoder/swig/vocoder_ulaw_decode_bs.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-vocoder/swig/vocoder_ulaw_encode_sb.i b/gr-vocoder/swig/vocoder_ulaw_encode_sb.i index 1665df480..393b8ff3f 100644 --- a/gr-vocoder/swig/vocoder_ulaw_encode_sb.i +++ b/gr-vocoder/swig/vocoder_ulaw_encode_sb.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-wavelet/CMakeLists.txt b/gr-wavelet/CMakeLists.txt new file mode 100644 index 000000000..555c326d1 --- /dev/null +++ b/gr-wavelet/CMakeLists.txt @@ -0,0 +1,109 @@ +# Copyright 2012 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. + +######################################################################## +# Setup dependencies +######################################################################## +include(GrBoost) + +find_package(GSL) + +######################################################################## +# Register component +######################################################################## +include(GrComponent) + +GR_REGISTER_COMPONENT("gr-wavelet" ENABLE_GR_WAVELET + Boost_FOUND + ENABLE_GR_CORE + GSL_FOUND +) + +GR_SET_GLOBAL(GR_WAVELET_INCLUDE_DIRS + ${CMAKE_CURRENT_SOURCE_DIR}/lib + ${CMAKE_CURRENT_SOURCE_DIR}/include/wavelet +) + +######################################################################## +# Begin conditional configuration +######################################################################## +if(ENABLE_GR_WAVELET) + +######################################################################## +# Setup CPack components +######################################################################## +include(GrPackage) +CPACK_SET(CPACK_COMPONENT_GROUP_WAVELET_DESCRIPTION "GNU Radio Wavelet Blocks") + +CPACK_COMPONENT("wavelet_runtime" + GROUP "WAVELET" + DISPLAY_NAME "Runtime" + DESCRIPTION "Runtime" + DEPENDS "core_runtime" +) + +CPACK_COMPONENT("wavelet_devel" + GROUP "WAVELET" + DISPLAY_NAME "Development" + DESCRIPTION "C++ headers, package config, import libraries" + DEPENDS "core_devel" +) + +CPACK_COMPONENT("wavelet_python" + GROUP "WAVELET" + DISPLAY_NAME "Python" + DESCRIPTION "Python modules for runtime; GRC xml files" + DEPENDS "core_python;wavelet_runtime" +) + +CPACK_COMPONENT("wavelet_swig" + GROUP "WAVELET" + DISPLAY_NAME "SWIG" + DESCRIPTION "SWIG development .i files" + DEPENDS "core_swig;wavelet_python;wavelet_devel" +) + +######################################################################## +# Add subdirectories +######################################################################## +add_subdirectory(include/wavelet) +add_subdirectory(lib) +if(ENABLE_PYTHON) + add_subdirectory(swig) + add_subdirectory(python) +# add_subdirectory(grc) +endif(ENABLE_PYTHON) +#add_subdirectory(examples) +#add_subdirectory(doc) + +######################################################################## +# Create Pkg Config File +######################################################################## +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-wavelet.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-wavelet.pc +@ONLY) + +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-wavelet.pc + DESTINATION ${GR_LIBRARY_DIR}/pkgconfig + COMPONENT "wavelet_devel" +) + +endif(ENABLE_GR_WAVELET) diff --git a/gr-wavelet/gnuradio-wavelet.pc.in b/gr-wavelet/gnuradio-wavelet.pc.in new file mode 100644 index 000000000..998ae9056 --- /dev/null +++ b/gr-wavelet/gnuradio-wavelet.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: gnuradio-wavelet +Description: Wavelet signal processing blocks for GNU Radio +Requires: gnuradio-core +Version: @LIBVER@ +Libs: -L${libdir} -lgnuradio-wavelet +Cflags: -I${includedir} diff --git a/gruel/src/scheme/gnuradio/CMakeLists.txt b/gr-wavelet/include/wavelet/CMakeLists.txt index 4ff4f7feb..a37a3b0cd 100644 --- a/gruel/src/scheme/gnuradio/CMakeLists.txt +++ b/gr-wavelet/include/wavelet/CMakeLists.txt @@ -1,26 +1,31 @@ -# Copyright 2010 Free Software Foundation, Inc. -# +# Copyright 2011 Free Software Foundation, Inc. +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. ######################################################################## - +# Install header files +######################################################################## install(FILES - pmt-serial-tags.scm - pmt-serialize.scm - macros-etc.scm -DESTINATION ${GR_PKG_DATA_DIR} COMPONENT "gruel_swig") + wavelet_api.h + wavelet_squash_ff.h + wavelet_wavelet_ff.h + wavelet_wvps_ff.h + DESTINATION ${GR_INCLUDE_DIR}/gnuradio + COMPONENT "wavelet_devel" +) + diff --git a/gnuradio-core/src/lib/general/gr_probe_mpsk_snr_c.i b/gr-wavelet/include/wavelet/wavelet_api.h index 37a86b23d..68b2c04d7 100644 --- a/gnuradio-core/src/lib/general/gr_probe_mpsk_snr_c.i +++ b/gr-wavelet/include/wavelet/wavelet_api.h @@ -1,39 +1,33 @@ -/* -*- c++ -*- */ /* - * Copyright 2008 Free Software Foundation, Inc. - * + * Copyright 2012 Free Software Foundation, Inc. + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ -GR_SWIG_BLOCK_MAGIC(gr,probe_mpsk_snr_c); +#ifndef INCLUDED_WAVELET_API_H +#define INCLUDED_WAVELET_API_H -gr_probe_mpsk_snr_c_sptr -gr_make_probe_mpsk_snr_c(double alpha = 0.0001); +#include <gruel/attributes.h> -class gr_probe_mpsk_snr_c : public gr_sync_block -{ -private: - void gr_probe_mpsk_snr_c(double alpha); +#ifdef gnuradio_wavelet_EXPORTS +# define WAVELET_API __GR_ATTR_EXPORT +#else +# define WAVELET_API __GR_ATTR_IMPORT +#endif -public: - double signal_mean(); - double noise_variance(); - double snr(); - - void set_alpha (double alpha); -}; +#endif /* INCLUDED_WAVELET_API_H */ diff --git a/gr-wavelet/include/wavelet/wavelet_squash_ff.h b/gr-wavelet/include/wavelet/wavelet_squash_ff.h new file mode 100644 index 000000000..582496916 --- /dev/null +++ b/gr-wavelet/include/wavelet/wavelet_squash_ff.h @@ -0,0 +1,45 @@ +/* -*- c++ -*- */ +/* + * Copyright 2008,2012 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +#ifndef INCLUDED_WAVELET_SQUASH_FF_H +#define INCLUDED_WAVELET_SQUASH_FF_H + +#include <wavelet_api.h> +#include <gr_sync_block.h> + +/*! + * \brief implements cheap resampling of spectrum directly from + * spectral points, using gsl interpolation + * \ingroup misc + */ +class wavelet_squash_ff; +typedef boost::shared_ptr<wavelet_squash_ff> wavelet_squash_ff_sptr; + +WAVELET_API wavelet_squash_ff_sptr wavelet_make_squash_ff(const std::vector<float> &igrid, + const std::vector<float> &ogrid); + +class WAVELET_API wavelet_squash_ff : virtual public gr_sync_block +{ + // No public API methods visible +}; + +#endif diff --git a/gr-howto-write-a-block/lib/qa_howto.cc b/gr-wavelet/include/wavelet/wavelet_wavelet_ff.h index f1411a388..7d60dbdad 100644 --- a/gr-howto-write-a-block/lib/qa_howto.cc +++ b/gr-wavelet/include/wavelet/wavelet_wavelet_ff.h @@ -1,41 +1,46 @@ +/* -*- c++ -*- */ /* - * Copyright 2009 Free Software Foundation, Inc. - * + * Copyright 2008,2012 Free Software Foundation, Inc. + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ +#ifndef INCLUDED_WAVELET_WAVELET_FF_H +#define INCLUDED_WAVELET_WAVELET_FF_H -/* - * This class gathers together all the test cases for the example - * directory into a single test suite. As you create new test cases, - * add them here. - */ +#include <wavelet_api.h> +#include <gr_sync_block.h> -#include <qa_howto.h> -#include <qa_howto_square_ff.h> -#include <qa_howto_square2_ff.h> +class wavelet_wavelet_ff; +typedef boost::shared_ptr<wavelet_wavelet_ff> wavelet_wavelet_ff_sptr; -CppUnit::TestSuite * -qa_howto::suite() -{ - CppUnit::TestSuite *s = new CppUnit::TestSuite("howto"); +WAVELET_API wavelet_wavelet_ff_sptr +wavelet_make_wavelet_ff(int size = 1024, + int order = 20, + bool forward = true); - s->addTest(qa_howto_square_ff::suite()); - s->addTest(qa_howto_square2_ff::suite()); +/*! + * \brief compute wavelet transform using gsl routines + * \ingroup wavelet_blk + */ + +class WAVELET_API wavelet_wavelet_ff : virtual public gr_sync_block +{ + // No public API methods visible +}; - return s; -} +#endif /* INCLUDED_WAVELET_WAVELET_FF_H */ diff --git a/gr-howto-write-a-block/lib/test_all.cc b/gr-wavelet/include/wavelet/wavelet_wvps_ff.h index c12958691..4e2889b52 100644 --- a/gr-howto-write-a-block/lib/test_all.cc +++ b/gr-wavelet/include/wavelet/wavelet_wvps_ff.h @@ -1,42 +1,44 @@ /* -*- c++ -*- */ /* - * Copyright 2009,2010,2011 Free Software Foundation, Inc. - * + * Copyright 2008,2012 Free Software Foundation, Inc. + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ -#include <cppunit/TextTestRunner.h> -#include <cppunit/XmlOutputter.h> +#ifndef INCLUDED_WAVELET_WVPS_FF_H +#define INCLUDED_WAVELET_WVPS_FF_H -#include <gr_unittests.h> -#include <qa_howto.h> +#include <wavelet_api.h> +#include <gr_sync_decimator.h> -int -main (int argc, char **argv) -{ - CppUnit::TextTestRunner runner; - std::ofstream xmlfile(get_unittest_path("gr_howto_write_a_block.xml").c_str()); - CppUnit::XmlOutputter *xmlout = new CppUnit::XmlOutputter(&runner.result(), xmlfile); +class wavelet_wvps_ff; +typedef boost::shared_ptr<wavelet_wvps_ff> wavelet_wvps_ff_sptr; + +WAVELET_API wavelet_wvps_ff_sptr +wavelet_make_wvps_ff(int ilen); - runner.addTest(qa_howto::suite ()); - runner.setOutputter(xmlout); - - bool was_successful = runner.run("", false); +/*! + * \brief computes the Wavelet Power Spectrum from a set of wavelet coefficients + * \ingroup wavelet_blk + */ +class WAVELET_API wavelet_wvps_ff : virtual public gr_sync_block +{ + // No public API methods visible +}; - return was_successful ? 0 : 1; -} +#endif /* INCLUDED_WAVELET_WVPS_FF_H */ diff --git a/gr-wavelet/lib/CMakeLists.txt b/gr-wavelet/lib/CMakeLists.txt new file mode 100644 index 000000000..f0d9068b7 --- /dev/null +++ b/gr-wavelet/lib/CMakeLists.txt @@ -0,0 +1,57 @@ +# Copyright 2012 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. + +######################################################################## +# Setup the include and linker paths +######################################################################## +include_directories( + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GR_WAVELET_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} +) + +include_directories(${WAVELET_INCLUDE_DIRS}) +link_directories(${WAVELET_LIBRARY_DIRS}) + +include_directories(${Boost_INCLUDE_DIRS}) +link_directories(${Boost_LIBRARY_DIRS}) + +include_directories(${GSL_INCLUDE_DIRS}) +link_directories(${GSL_LIBRARY_DIRS}) + +######################################################################## +# Setup library +######################################################################## +list(APPEND gr_wavelet_sources + wavelet_squash_ff_impl.cc + wavelet_wavelet_ff_impl.cc + wavelet_wvps_ff_impl.cc +) + +list(APPEND wavelet_libs + gnuradio-core + ${Boost_LIBRARIES} + ${WAVELET_LIBRARIES} + ${GSL_LIBRARIES} +) + +add_library(gnuradio-wavelet SHARED ${gr_wavelet_sources}) +target_link_libraries(gnuradio-wavelet ${wavelet_libs}) +GR_LIBRARY_FOO(gnuradio-wavelet RUNTIME_COMPONENT "wavelet_runtime" DEVEL_COMPONENT "wavelet_devel") diff --git a/gnuradio-core/src/lib/general/gr_squash_ff.cc b/gr-wavelet/lib/wavelet_squash_ff_impl.cc index 479204fdb..89494a9c3 100644 --- a/gnuradio-core/src/lib/general/gr_squash_ff.cc +++ b/gr-wavelet/lib/wavelet_squash_ff_impl.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* - * Copyright 2008,2010 Free Software Foundation, Inc. - * + * Copyright 2008,2010,2012 Free Software Foundation, Inc. + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -25,21 +25,21 @@ #endif #include <stdexcept> -#include <gr_squash_ff.h> +#include <wavelet_squash_ff_impl.h> #include <gr_io_signature.h> // expect input vector of igrid.size y-values, // produce output vector of ogrid.size y-values -gr_squash_ff_sptr -gr_make_squash_ff(const std::vector<float> &igrid, - const std::vector<float> &ogrid) +wavelet_squash_ff_sptr +wavelet_make_squash_ff(const std::vector<float> &igrid, + const std::vector<float> &ogrid) { - return gnuradio::get_initial_sptr(new gr_squash_ff(igrid, ogrid)); + return gnuradio::get_initial_sptr(new wavelet_squash_ff_impl(igrid, ogrid)); } -gr_squash_ff::gr_squash_ff(const std::vector<float> &igrid, - const std::vector<float> &ogrid) +wavelet_squash_ff_impl::wavelet_squash_ff_impl(const std::vector<float> &igrid, + const std::vector<float> &ogrid) : gr_sync_block("squash_ff", gr_make_io_signature(1, 1, sizeof(float) * igrid.size()), gr_make_io_signature(1, 1, sizeof(float) * ogrid.size())) @@ -58,7 +58,7 @@ gr_squash_ff::gr_squash_ff(const std::vector<float> &igrid, d_spline = gsl_spline_alloc(gsl_interp_cspline, d_inum); // FIXME check w/ Frank } -gr_squash_ff::~gr_squash_ff() +wavelet_squash_ff_impl::~wavelet_squash_ff_impl() { free((char *) d_igrid); free((char *) d_iwork); @@ -68,9 +68,9 @@ gr_squash_ff::~gr_squash_ff() } int -gr_squash_ff::work(int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) +wavelet_squash_ff_impl::work(int noutput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items) { const float *in = (const float *) input_items[0]; float *out = (float *) output_items[0]; @@ -81,7 +81,7 @@ gr_squash_ff::work(int noutput_items, d_iwork[i] = in[i]; gsl_spline_init(d_spline, d_igrid, d_iwork, d_inum); - + for (unsigned int i = 0; i < d_onum; i++) out[i] = gsl_spline_eval(d_spline, d_ogrid[i], d_accel); diff --git a/gnuradio-core/src/lib/general/gr_squash_ff.h b/gr-wavelet/lib/wavelet_squash_ff_impl.h index f7fea1648..dac50ddf2 100644 --- a/gnuradio-core/src/lib/general/gr_squash_ff.h +++ b/gr-wavelet/lib/wavelet_squash_ff_impl.h @@ -1,50 +1,36 @@ /* -*- c++ -*- */ /* - * Copyright 2008 Free Software Foundation, Inc. - * + * Copyright 2008,2012 Free Software Foundation, Inc. + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ -#ifndef INCLUDED_GR_SQUASH_FF_H_ -# define INCLUDED_GR_SQUASH_FF_H_ +#ifndef INCLUDED_WAVELET_SQUASH_FF_IMPL_H +#define INCLUDED_WAVELET_SQUASH_FF_IMPL_H -#include <gr_core_api.h> -#include <gr_sync_block.h> +#include <wavelet_api.h> +#include <wavelet_squash_ff.h> #include <gsl/gsl_errno.h> #include <gsl/gsl_interp.h> #include <gsl/gsl_spline.h> -/*! - * \brief implements cheap resampling of spectrum directly from - * spectral points, using gsl interpolation - * \ingroup misc - */ - -class gr_squash_ff; -typedef boost::shared_ptr<gr_squash_ff> gr_squash_ff_sptr; - -GR_CORE_API gr_squash_ff_sptr gr_make_squash_ff(const std::vector<float> &igrid, - const std::vector<float> &ogrid); -class GR_CORE_API gr_squash_ff : public gr_sync_block +class WAVELET_API wavelet_squash_ff_impl : public wavelet_squash_ff { - friend GR_CORE_API gr_squash_ff_sptr gr_make_squash_ff(const std::vector<float> &igrid, - const std::vector<float> &ogrid); - size_t d_inum; size_t d_onum; double *d_igrid; @@ -53,16 +39,20 @@ class GR_CORE_API gr_squash_ff : public gr_sync_block gsl_interp_accel *d_accel; gsl_spline *d_spline; - - gr_squash_ff(const std::vector<float> &igrid, - const std::vector<float> &ogrid); + + wavelet_squash_ff_impl(const std::vector<float> &igrid, + const std::vector<float> &ogrid); + + friend WAVELET_API wavelet_squash_ff_sptr + wavelet_make_squash_ff(const std::vector<float> &igrid, + const std::vector<float> &ogrid); public: - ~gr_squash_ff(); + ~wavelet_squash_ff_impl(); int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); }; -#endif +#endif /* INCLUDED_WAVELET_WAVELET_FF_IMPL_H */ diff --git a/gnuradio-core/src/lib/general/gr_wavelet_ff.cc b/gr-wavelet/lib/wavelet_wavelet_ff_impl.cc index f77c96e99..ccc1a6d8f 100644 --- a/gnuradio-core/src/lib/general/gr_wavelet_ff.cc +++ b/gr-wavelet/lib/wavelet_wavelet_ff_impl.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* - * Copyright 2008,2010 Free Software Foundation, Inc. - * + * Copyright 2008,2010,2012 Free Software Foundation, Inc. + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the tewavelet 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, @@ -25,7 +25,7 @@ #endif #include <stdexcept> -#include <gr_wavelet_ff.h> +#include <wavelet_wavelet_ff_impl.h> #include <gr_io_signature.h> #include <stdio.h> @@ -33,19 +33,15 @@ // NB in this version, only Daubechies wavelets // order is wavelet length, even, 2...20 -gr_wavelet_ff_sptr -gr_make_wavelet_ff(int size, - int order, - bool forward) +wavelet_wavelet_ff_sptr +wavelet_make_wavelet_ff(int size, + int order, + bool forward) { - return gnuradio::get_initial_sptr(new gr_wavelet_ff(size, - order, - forward)); + return gnuradio::get_initial_sptr(new wavelet_wavelet_ff_impl(size, order, forward)); } -gr_wavelet_ff::gr_wavelet_ff(int size, - int order, - bool forward) +wavelet_wavelet_ff_impl::wavelet_wavelet_ff_impl(int size, int order, bool forward) : gr_sync_block("wavelet_ff", gr_make_io_signature(1, 1, size * sizeof(float)), gr_make_io_signature(1, 1, size * sizeof(float))), @@ -64,7 +60,7 @@ gr_wavelet_ff::gr_wavelet_ff(int size, throw std::runtime_error("can't allocate wavelet double conversion temp"); } -gr_wavelet_ff::~gr_wavelet_ff() +wavelet_wavelet_ff_impl::~wavelet_wavelet_ff_impl() { gsl_wavelet_free(d_wavelet); gsl_wavelet_workspace_free(d_workspace); @@ -72,9 +68,9 @@ gr_wavelet_ff::~gr_wavelet_ff() } int -gr_wavelet_ff::work(int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) +wavelet_wavelet_ff_impl::work(int noutput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items) { const float *in = (const float *) input_items[0]; float *out = (float *) output_items[0]; @@ -82,7 +78,7 @@ gr_wavelet_ff::work(int noutput_items, for (int count = 0; count < noutput_items; count++) { for (int i = 0; i < d_size; i++) d_temp[i] = in[i]; - + if (d_forward) gsl_wavelet_transform_forward(d_wavelet, d_temp, @@ -95,7 +91,7 @@ gr_wavelet_ff::work(int noutput_items, 1, d_size, d_workspace); - + for (int i = 0; i < d_size; i++) out[i] = d_temp[i]; diff --git a/gnuradio-core/src/lib/general/gr_wavelet_ff.h b/gr-wavelet/lib/wavelet_wavelet_ff_impl.h index 107a50fe2..dc33a4184 100644 --- a/gnuradio-core/src/lib/general/gr_wavelet_ff.h +++ b/gr-wavelet/lib/wavelet_wavelet_ff_impl.h @@ -1,48 +1,32 @@ /* -*- c++ -*- */ /* - * Copyright 2005 Free Software Foundation, Inc. - * + * Copyright 2008,2012 Free Software Foundation, Inc. + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ -#ifndef INCLUDED_GR_WAVELET_FF_H -#define INCLUDED_GR_WAVELET_FF_H - -#include <gr_core_api.h> -#include <iostream> -#include <gr_sync_block.h> +#ifndef INCLUDED_WAVELET_WAVELET_FF_IMPL_H +#define INCLUDED_WAVELET_WAVELET_FF_IMPL_H +#include <wavelet_wavelet_ff.h> #include <gsl/gsl_errno.h> #include <gsl/gsl_wavelet.h> -class gr_wavelet_ff; -typedef boost::shared_ptr<gr_wavelet_ff> gr_wavelet_ff_sptr; - -GR_CORE_API gr_wavelet_ff_sptr -gr_make_wavelet_ff(int size = 1024, - int order = 20, - bool forward = true); - -/*! - * \brief compute wavelet transform using gsl routines - * \ingroup wavelet_blk - */ - -class GR_CORE_API gr_wavelet_ff : public gr_sync_block +class WAVELET_API wavelet_wavelet_ff_impl : public wavelet_wavelet_ff { int d_size; int d_order; @@ -51,21 +35,21 @@ class GR_CORE_API gr_wavelet_ff : public gr_sync_block gsl_wavelet_workspace *d_workspace; double *d_temp; - friend GR_CORE_API gr_wavelet_ff_sptr - gr_make_wavelet_ff(int size, - int order, - bool forward); + friend WAVELET_API wavelet_wavelet_ff_sptr + wavelet_make_wavelet_ff(int size, + int order, + bool forward); - gr_wavelet_ff(int size, - int order, - bool forward); + wavelet_wavelet_ff_impl(int size, + int order, + bool forward); public: - ~gr_wavelet_ff(); + ~wavelet_wavelet_ff_impl(); - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); + int work(int noutput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); }; -#endif /* INCLUDED_GR_WAVELET_FF_H */ +#endif /* INCLUDED_WAVELET_WAVELET_FF_IMPL_H */ diff --git a/gnuradio-core/src/lib/general/gr_wvps_ff.cc b/gr-wavelet/lib/wavelet_wvps_ff_impl.cc index 8a8dc56ac..b86859b0a 100644 --- a/gnuradio-core/src/lib/general/gr_wvps_ff.cc +++ b/gr-wavelet/lib/wavelet_wvps_ff_impl.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* - * Copyright 2004,2010 Free Software Foundation, Inc. - * + * Copyright 2004,2010,2012 Free Software Foundation, Inc. + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -24,7 +24,7 @@ #include "config.h" #endif -#include <gr_wvps_ff.h> +#include <wavelet_wvps_ff_impl.h> #include <gr_io_signature.h> #include <string.h> @@ -36,13 +36,13 @@ ceil_log2(int k) return m; } -gr_wvps_ff_sptr -gr_make_wvps_ff(int ilen) +wavelet_wvps_ff_sptr +wavelet_make_wvps_ff(int ilen) { - return gnuradio::get_initial_sptr(new gr_wvps_ff(ilen)); + return gnuradio::get_initial_sptr(new wavelet_wvps_ff_impl(ilen)); } -gr_wvps_ff::gr_wvps_ff(int ilen) +wavelet_wvps_ff_impl::wavelet_wvps_ff_impl(int ilen) : gr_sync_block("wvps_ff", gr_make_io_signature(1, 1, sizeof(float) * ilen), gr_make_io_signature(1, 1, sizeof(float) * ceil_log2(ilen))), @@ -53,9 +53,9 @@ gr_wvps_ff::gr_wvps_ff(int ilen) // input vector assumed to be output from gsl wavelet computation int -gr_wvps_ff::work(int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) +wavelet_wvps_ff_impl::work(int noutput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items) { const float *in = (const float *) input_items[0]; float *out = (float *) output_items[0]; @@ -69,22 +69,22 @@ gr_wvps_ff::work(int noutput_items, out[i] = 0.0; } else { - + // get power normalization from 0-th wavelet coefficient float scl = 1.0/(in[0]*in[0]); int k = 1; - + // sum powers over sequences of bins, // sequence lengths in increasing powers of 2 - + for (int e = 0; e < d_olen; e++) { int m = 01<<e; float sum = 0.0; - + for (int l = 0; l < m; l++) sum += (in[k+l]*in[k+l]); - + out[e] = scl*sum; k += m; } diff --git a/gnuradio-core/src/lib/general/gr_wvps_ff.h b/gr-wavelet/lib/wavelet_wvps_ff_impl.h index 7c8f26066..553469fde 100644 --- a/gnuradio-core/src/lib/general/gr_wvps_ff.h +++ b/gr-wavelet/lib/wavelet_wvps_ff_impl.h @@ -1,58 +1,44 @@ /* -*- c++ -*- */ /* - * Copyright 2008 Free Software Foundation, Inc. - * + * Copyright 2008,2012 Free Software Foundation, Inc. + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ -#ifndef INCLUDED_GR_WVPS_FF_H -#define INCLUDED_GR_WVPS_FF_H +#ifndef INCLUDED_WAVELET_WVPS_FF_IMPL_H +#define INCLUDED_WAVELET_WVPS_FF_IMPL_H -#include <gr_core_api.h> -#include <gr_sync_decimator.h> +#include <wavelet_wvps_ff.h> -class gr_wvps_ff; -typedef boost::shared_ptr<gr_wvps_ff> gr_wvps_ff_sptr; - -GR_CORE_API gr_wvps_ff_sptr -gr_make_wvps_ff(int ilen); - - -/*! - * \brief computes the Wavelet Power Spectrum from a set of wavelet coefficients - * \ingroup wavelet_blk - */ -class GR_CORE_API gr_wvps_ff : public gr_sync_block +class WAVELET_API wavelet_wvps_ff_impl : public wavelet_wvps_ff { - friend GR_CORE_API gr_wvps_ff_sptr - gr_make_wvps_ff(int ilen); - int d_ilen; int d_olen; - protected: - gr_wvps_ff(int ilen); + friend WAVELET_API wavelet_wvps_ff_sptr + wavelet_make_wvps_ff(int ilen); + + wavelet_wvps_ff_impl(int ilen); public: int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); - }; -#endif /* INCLUDED_GR_WVPS_FF_H */ +#endif /* INCLUDED_WAVELET_WVPS_FF_IMPL_H */ diff --git a/gr-wavelet/python/CMakeLists.txt b/gr-wavelet/python/CMakeLists.txt new file mode 100644 index 000000000..650299672 --- /dev/null +++ b/gr-wavelet/python/CMakeLists.txt @@ -0,0 +1,47 @@ +# Copyright 2012 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. + +######################################################################## +include(GrPython) + +GR_PYTHON_INSTALL( + FILES + __init__.py + DESTINATION ${GR_PYTHON_DIR}/gnuradio/wavelet + COMPONENT "wavelet_python" +) + +######################################################################## +# Handle the unit tests +######################################################################## +if(ENABLE_TESTING) +include(GrTest) +file(GLOB py_qa_test_files "qa_*.py") +foreach(py_qa_test_file ${py_qa_test_files}) + get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE) + set(GR_TEST_PYTHON_DIRS + ${CMAKE_BINARY_DIR}/gnuradio-core/src/python + ${CMAKE_BINARY_DIR}/gnuradio-core/src/lib/swig + ${CMAKE_BINARY_DIR}/gr-wavelet/python + ${CMAKE_BINARY_DIR}/gr-wavelet/swig + ) + set(GR_TEST_TARGET_DEPS gruel gnuradio-core gnuradio-wavelet) + GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${py_qa_test_file}) +endforeach(py_qa_test_file) +endif(ENABLE_TESTING) diff --git a/gr-audio/include/Makefile.am b/gr-wavelet/python/__init__.py index a4db27d08..77e2ac7c2 100644 --- a/gr-audio/include/Makefile.am +++ b/gr-wavelet/python/__init__.py @@ -1,27 +1,28 @@ # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. # -include $(top_srcdir)/Makefile.common +''' +This is the gr-wavelet package. This package provides GNU Radio +processing blocks for wavelet transforms. +''' + +from wavelet_swig import * -grinclude_HEADERS = \ - gr_audio_api.h \ - gr_audio_source.h \ - gr_audio_sink.h diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_classify.py b/gr-wavelet/python/qa_classify.py index ac5b53b57..5701bce8c 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_classify.py +++ b/gr-wavelet/python/qa_classify.py @@ -1,31 +1,31 @@ #!/usr/bin/env python # # Copyright 2008,2010 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. -# +# import numpy from gnuradio import gr, gr_unittest import copy #import pygsl.wavelet as wavelet # FIXME: pygsl not checked for in config import math - +import wavelet_swig def sqr(x): return x*x @@ -99,14 +99,14 @@ class test_classify(gr_unittest.TestCase): sum += w * w sum /= float(len(trg_data)) assert sum < 1e-6 - + def test_003_(self): src_grid = (0.0, 1.0, 2.0, 3.0, 4.0) trg_grid = copy.deepcopy(src_grid) src_data = (0.0, 1.0, 0.0, 1.0, 0.0) src = gr.vector_source_f(src_data, False, len(src_grid)) - sq = gr.squash_ff(src_grid, trg_grid) + sq = wavelet_swig.squash_ff(src_grid, trg_grid) dst = gr.vector_sink_f(len(trg_grid)) self.tb.connect(src, sq) self.tb.connect(sq, dst) @@ -132,7 +132,7 @@ class test_classify(gr_unittest.TestCase): # d = w.transform_inverse(c, ws) # # src = gr.vector_source_f(b, False, n) -# wv = gr.wavelet_ff(n, o, True) +# wv = wavelet_swig.wavelet_ff(n, o, True) # # dst = gr.vector_sink_f(n) # self.tb.connect(src, wv) @@ -161,7 +161,7 @@ class test_classify(gr_unittest.TestCase): k += 01<<e src = gr.vector_source_f(src_data, False, len(src_data)) - kon = gr.wvps_ff(len(src_data)) + kon = wavelet_swig.wvps_ff(len(src_data)) dst = gr.vector_sink_f(int(math.ceil(math.log(len(src_data), 2)))) self.tb.connect(src, kon) diff --git a/gr-uhd/grc/Makefile.am b/gr-wavelet/swig/CMakeLists.txt index 42a35b1c1..82d083dea 100644 --- a/gr-uhd/grc/Makefile.am +++ b/gr-wavelet/swig/CMakeLists.txt @@ -1,44 +1,51 @@ +# Copyright 2012 Free Software Foundation, Inc. # -# Copyright 2010-2011 Free Software Foundation, Inc. -# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# -include $(top_srcdir)/Makefile.common +######################################################################## +# Setup swig generation +######################################################################## +include(GrPython) +include(GrSwig) -grcblocksdir = $(grc_blocksdir) +set(GR_SWIG_INCLUDE_DIRS + ${GR_WAVELET_INCLUDE_DIRS} + ${GNURADIO_CORE_SWIG_INCLUDE_DIRS} + ${GSL_INCLUDE_DIRS} +) -generated_uhd_usrp_blocks = \ - uhd_usrp_source.xml \ - uhd_usrp_sink.xml +set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/wavelet_swig_doc.i) +set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../lib) -BUILT_SOURCES += $(generated_uhd_usrp_blocks) +set(GR_SWIG_LIBRARIES gnuradio-wavelet ${GSL_LDFLAGS}) -dist_grcblocks_DATA = \ - uhd_block_tree.xml \ - uhd_amsg_source.xml \ - $(BUILT_SOURCES) +GR_SWIG_MAKE(wavelet_swig wavelet_swig.i) -######################################################################## -# Rules for generating the source and sink xml wrappers -######################################################################## -EXTRA_DIST += $(srcdir)/gen_uhd_usrp_blocks.py +GR_SWIG_INSTALL( + TARGETS wavelet_swig + DESTINATION ${GR_PYTHON_DIR}/gnuradio/wavelet + COMPONENT "wavelet_python" +) -$(generated_uhd_usrp_blocks): $(srcdir)/gen_uhd_usrp_blocks.py - @echo "generating $@..." - $(PYTHON) $< $@ +install( + FILES + wavelet_swig.i + ${CMAKE_CURRENT_BINARY_DIR}/wavelet_swig_doc.i + DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig + COMPONENT "wavelet_swig" +) diff --git a/gr-wavelet/swig/wavelet_swig.i b/gr-wavelet/swig/wavelet_swig.i new file mode 100644 index 000000000..b04efc508 --- /dev/null +++ b/gr-wavelet/swig/wavelet_swig.i @@ -0,0 +1,48 @@ +/* -*- c++ -*- */ +/* + * Copyright 2012 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +#define WAVELET_API + +%include "gnuradio.i" + +//load generated python docstrings +%include "wavelet_swig_doc.i" + +%{ +#include "wavelet_squash_ff.h" +#include "wavelet_wavelet_ff.h" +#include "wavelet_wvps_ff.h" +%} + +%include "wavelet_squash_ff.h" +%include "wavelet_wavelet_ff.h" +%include "wavelet_wvps_ff.h" + +GR_SWIG_BLOCK_MAGIC(wavelet,squash_ff); +wavelet_squash_ff_sptr wavelet_make_squash_ff(const std::vector<float> &igrid, + const std::vector<float> &ogrid); + +GR_SWIG_BLOCK_MAGIC(wavelet,wavelet_ff); +wavelet_wavelet_ff_sptr wavelet_make_wavelet_ff(int size, int order, bool forward); + +GR_SWIG_BLOCK_MAGIC(wavelet,wvps_ff); +wavelet_wvps_ff_sptr wavelet_make_wvps_ff(int ilen); diff --git a/gr-wxgui/.gitignore b/gr-wxgui/.gitignore deleted file mode 100644 index cdcf41b15..000000000 --- a/gr-wxgui/.gitignore +++ /dev/null @@ -1,30 +0,0 @@ -/*.cache -/*.la -/*.lo -/*.pc -/.deps -/.la -/.libs -/.lo -/Makefile -/Makefile.in -/aclocal.m4 -/autom4te.cache -/config.cache -/config.h -/config.h.in -/config.log -/config.status -/configure -/depcomp -/install-sh -/libtool -/ltmain.sh -/make.log -/missing -/missing -/mkinstalldirs -/py-compile -/stamp-h -/stamp-h.in -/stamp-h1 diff --git a/gr-wxgui/CMakeLists.txt b/gr-wxgui/CMakeLists.txt index 7afae785a..0fc26dee1 100644 --- a/gr-wxgui/CMakeLists.txt +++ b/gr-wxgui/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-wxgui/Makefile.am b/gr-wxgui/Makefile.am deleted file mode 100644 index cfc7a429c..000000000 --- a/gr-wxgui/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -# -# Copyright 2004,2006,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. -# - -include $(top_srcdir)/Makefile.common - -EXTRA_DIST += \ - gr-wxgui.pc.in \ - README \ - README.gl - -if PYTHON -SUBDIRS = src grc - -etcdir = $(gr_prefsdir) -dist_etc_DATA = gr-wxgui.conf - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = gr-wxgui.pc -endif diff --git a/gr-wxgui/grc/.gitignore b/gr-wxgui/grc/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gr-wxgui/grc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gr-wxgui/grc/CMakeLists.txt b/gr-wxgui/grc/CMakeLists.txt index 49e3da3b1..51c5647e5 100644 --- a/gr-wxgui/grc/CMakeLists.txt +++ b/gr-wxgui/grc/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gr-wxgui/grc/Makefile.am b/gr-wxgui/grc/Makefile.am deleted file mode 100644 index d8c7b3471..000000000 --- a/gr-wxgui/grc/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -grcblocksdir = $(grc_blocksdir) -dist_grcblocks_DATA = \ - notebook.xml \ - variable_check_box.xml \ - variable_chooser.xml \ - variable_slider.xml \ - variable_static_text.xml \ - variable_text_box.xml \ - wxgui_constellationsink2.xml \ - wxgui_fftsink2.xml \ - wxgui_histosink2.xml \ - wxgui_numbersink2.xml \ - wxgui_scopesink2.xml \ - wxgui_termsink.xml \ - wxgui_waterfallsink2.xml - -#The wxgui module contains a top_block + wxgui frame. -wxgui_pythondir = $(pythondir)/grc_gnuradio/wxgui -wxgui_python_PYTHON = \ - __init__.py \ - panel.py \ - top_block_gui.py diff --git a/gr-wxgui/src/.gitignore b/gr-wxgui/src/.gitignore deleted file mode 100644 index f9c5da0db..000000000 --- a/gr-wxgui/src/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/Makefile -/Makefile.in -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/*.pyo diff --git a/gr-wxgui/src/Makefile.am b/gr-wxgui/src/Makefile.am deleted file mode 100644 index b6207ff05..000000000 --- a/gr-wxgui/src/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright 2004 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = python diff --git a/gr-wxgui/src/python/.gitignore b/gr-wxgui/src/python/.gitignore deleted file mode 100644 index f9c5da0db..000000000 --- a/gr-wxgui/src/python/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/Makefile -/Makefile.in -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/*.pyo diff --git a/gr-wxgui/src/python/Makefile.am b/gr-wxgui/src/python/Makefile.am deleted file mode 100644 index 2382d599c..000000000 --- a/gr-wxgui/src/python/Makefile.am +++ /dev/null @@ -1,69 +0,0 @@ -# -# Copyright 2004,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. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = plotter - -# Install this stuff so that it ends up as the gnuradio.wxgui module -# This usually ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio/wxgui - -ourpythondir = $(grpythondir)/wxgui -ourlibdir = $(grpyexecdir)/wxgui - -ourpython_PYTHON = \ - __init__.py \ - common.py \ - constants.py \ - constsink_gl.py \ - const_window.py \ - form.py \ - fftsink2.py \ - fftsink_nongl.py \ - fftsink_gl.py \ - fft_window.py \ - gui.py \ - histosink_gl.py \ - histo_window.py \ - numbersink2.py \ - number_window.py \ - plot.py \ - powermate.py \ - pubsub.py \ - scopesink2.py \ - scopesink_nongl.py \ - scopesink_gl.py \ - scope_window.py \ - termsink.py \ - waterfallsink2.py \ - waterfallsink_nongl.py \ - waterfallsink_gl.py \ - waterfall_window.py \ - slider.py \ - stdgui2.py - -formspythondir = $(grpythondir)/wxgui/forms - -formspython_PYTHON = \ - forms/__init__.py \ - forms/forms.py \ - forms/converters.py diff --git a/gr-wxgui/src/python/__init__.py b/gr-wxgui/src/python/__init__.py index a1cfeb223..68f8f4b5e 100644 --- a/gr-wxgui/src/python/__init__.py +++ b/gr-wxgui/src/python/__init__.py @@ -1,23 +1,23 @@ # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# ''' This is the gr-wxgui package. This package provides a GUI interface diff --git a/gr-wxgui/src/python/common.py b/gr-wxgui/src/python/common.py index 3641ae644..1410d29df 100644 --- a/gr-wxgui/src/python/common.py +++ b/gr-wxgui/src/python/common.py @@ -121,7 +121,7 @@ def _register_access_method(destination, controller, key): def set(value): controller[key] = value setattr(destination, 'set_'+key, set) def get(): return controller[key] - setattr(destination, 'get_'+key, get) + setattr(destination, 'get_'+key, get) def register_access_methods(destination, controller): """ diff --git a/gr-wxgui/src/python/fft_window.py b/gr-wxgui/src/python/fft_window.py index f4f485f4b..99c1cf6e1 100644 --- a/gr-wxgui/src/python/fft_window.py +++ b/gr-wxgui/src/python/fft_window.py @@ -127,7 +127,7 @@ class control_panel(wx.Panel): parent.subscribe(USE_PERSISTENCE_KEY, widget.ShowItems) #allways show initially, so room is reserved for them widget.ShowItems(True) # (parent[USE_PERSISTENCE_KEY]) - + parent.subscribe(USE_PERSISTENCE_KEY, self._update_layout) #trace menu @@ -201,7 +201,7 @@ class control_panel(wx.Panel): # Just ignore the key value we get # we only need to now that the visability or size of something has changed self.parent.Layout() - #self.parent.Fit() + #self.parent.Fit() ################################################## # FFT window with plotter and control panel diff --git a/gr-wxgui/src/python/fftsink_gl.py b/gr-wxgui/src/python/fftsink_gl.py index 6cfaeff60..6b268f6cb 100644 --- a/gr-wxgui/src/python/fftsink_gl.py +++ b/gr-wxgui/src/python/fftsink_gl.py @@ -63,14 +63,14 @@ class _fft_sink_base(gr.hier_block2, common.wxgui_hb): #ensure avg alpha if avg_alpha is None: avg_alpha = 2.0/fft_rate #ensure analog alpha - if persist_alpha is None: + if persist_alpha is None: actual_fft_rate=float(sample_rate/fft_size)/float(max(1,int(float((sample_rate/fft_size)/fft_rate)))) #print "requested_fft_rate ",fft_rate #print "actual_fft_rate ",actual_fft_rate analog_cutoff_freq=0.5 # Hertz #calculate alpha from wanted cutoff freq persist_alpha = 1.0 - math.exp(-2.0*math.pi*analog_cutoff_freq/actual_fft_rate) - + #init gr.hier_block2.__init__( self, diff --git a/gr-wxgui/src/python/fftsink_nongl.py b/gr-wxgui/src/python/fftsink_nongl.py index 508b4e772..c756d8a3b 100644 --- a/gr-wxgui/src/python/fftsink_nongl.py +++ b/gr-wxgui/src/python/fftsink_nongl.py @@ -1,31 +1,31 @@ #!/usr/bin/env python # # Copyright 2003,2004,2005,2006,2007,2009,2010 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, gru, window from gnuradio.wxgui import stdgui2 import wx import plot import numpy -import math +import math DIV_LEVELS = (1, 2, 5, 10, 20) @@ -33,7 +33,7 @@ default_fftsink_size = (640,240) default_fft_rate = gr.prefs().get_long('wxgui', 'fft_rate', 15) class fft_sink_base(object): - def __init__(self, input_is_real=False, baseband_freq=0, y_per_div=10, + def __init__(self, input_is_real=False, baseband_freq=0, y_per_div=10, y_divs=8, ref_level=50, sample_rate=1, fft_size=512, fft_rate=default_fft_rate, @@ -73,7 +73,7 @@ class fft_sink_base(object): else: self.avg.set_taps(1.0) self.win.peak_vals = None - + def set_peak_hold(self, enable): self.peak_hold = enable self.win.set_peak_hold(enable) @@ -98,7 +98,7 @@ class fft_sink_base(object): def _set_n(self): self.one_in_n.set_n(max(1, int(self.sample_rate/self.fft_size/self.fft_rate))) - + class fft_sink_f(gr.hier_block2, fft_sink_base): def __init__(self, parent, baseband_freq=0, ref_scale=2.0, @@ -116,17 +116,17 @@ class fft_sink_f(gr.hier_block2, fft_sink_base): fft_rate=fft_rate, average=average, avg_alpha=avg_alpha, title=title, peak_hold=peak_hold,use_persistence=use_persistence,persist_alpha=persist_alpha) - + self.s2p = gr.stream_to_vector(gr.sizeof_float, self.fft_size) self.one_in_n = gr.keep_one_in_n(gr.sizeof_float * self.fft_size, max(1, int(self.sample_rate/self.fft_size/self.fft_rate))) - + mywindow = window.blackmanharris(self.fft_size) self.fft = gr.fft_vfc(self.fft_size, True, mywindow) power = 0 for tap in mywindow: power += tap*tap - + self.c2mag = gr.complex_to_mag(self.fft_size) self.avg = gr.single_pole_iir_filter_ff(1.0, self.fft_size) @@ -135,7 +135,7 @@ class fft_sink_f(gr.hier_block2, fft_sink_base): -10*math.log10(self.fft_size) # Adjust for number of bins -10*math.log10(power/self.fft_size) # Adjust for windowing loss -20*math.log10(ref_scale/2)) # Adjust for reference scale - + self.sink = gr.message_sink(gr.sizeof_float * self.fft_size, self.msgq, True) self.connect(self, self.s2p, self.one_in_n, self.fft, self.c2mag, self.avg, self.log, self.sink) @@ -165,13 +165,13 @@ class fft_sink_c(gr.hier_block2, fft_sink_base): self.s2p = gr.stream_to_vector(gr.sizeof_gr_complex, self.fft_size) self.one_in_n = gr.keep_one_in_n(gr.sizeof_gr_complex * self.fft_size, max(1, int(self.sample_rate/self.fft_size/self.fft_rate))) - + mywindow = window.blackmanharris(self.fft_size) self.fft = gr.fft_vcc(self.fft_size, True, mywindow) power = 0 for tap in mywindow: power += tap*tap - + self.c2mag = gr.complex_to_mag(self.fft_size) self.avg = gr.single_pole_iir_filter_ff(1.0, self.fft_size) @@ -180,7 +180,7 @@ class fft_sink_c(gr.hier_block2, fft_sink_base): -10*math.log10(self.fft_size) # Adjust for number of bins -10*math.log10(power/self.fft_size) # Adjust for windowing loss -20*math.log10(ref_scale/2)) # Adjust for reference scale - + self.sink = gr.message_sink(gr.sizeof_float * self.fft_size, self.msgq, True) self.connect(self, self.s2p, self.one_in_n, self.fft, self.c2mag, self.avg, self.log, self.sink) @@ -203,7 +203,7 @@ class DataEvent(wx.PyEvent): self.SetEventType (myDATA_EVENT) self.data = data - def Clone (self): + def Clone (self): self.__class__ (self.GetId()) @@ -231,20 +231,20 @@ class input_watcher (gru.msgq_runner): del de class control_panel(wx.Panel): - - class LabelText(wx.StaticText): + + class LabelText(wx.StaticText): def __init__(self, window, label): wx.StaticText.__init__(self, window, -1, label) font = self.GetFont() font.SetWeight(wx.FONTWEIGHT_BOLD) font.SetUnderlined(True) self.SetFont(font) - + def __init__(self, parent): self.parent = parent - wx.Panel.__init__(self, parent, -1, style=wx.SIMPLE_BORDER) + wx.Panel.__init__(self, parent, -1, style=wx.SIMPLE_BORDER) control_box = wx.BoxSizer(wx.VERTICAL) - + #checkboxes for average and peak hold control_box.AddStretchSpacer() control_box.Add(self.LabelText(self, 'Options'), 0, wx.ALIGN_CENTER) @@ -255,9 +255,9 @@ class control_panel(wx.Panel): self.use_persistence_check_box.Bind(wx.EVT_CHECKBOX, parent.on_use_persistence) control_box.Add(self.use_persistence_check_box, 0, wx.EXPAND) self.peak_hold_check_box = wx.CheckBox(parent=self, style=wx.CHK_2STATE, label="Peak Hold") - self.peak_hold_check_box.Bind(wx.EVT_CHECKBOX, parent.on_peak_hold) + self.peak_hold_check_box.Bind(wx.EVT_CHECKBOX, parent.on_peak_hold) control_box.Add(self.peak_hold_check_box, 0, wx.EXPAND) - + #radio buttons for div size control_box.AddStretchSpacer() control_box.Add(self.LabelText(self, 'Set dB/div'), 0, wx.ALIGN_CENTER) @@ -269,12 +269,12 @@ class control_panel(wx.Panel): self.radio_buttons.append(radio_button) radio_box.Add(radio_button, 0, wx.ALIGN_LEFT) control_box.Add(radio_box, 0, wx.EXPAND) - + #ref lvl buttons control_box.AddStretchSpacer() control_box.Add(self.LabelText(self, 'Adj Ref Lvl'), 0, wx.ALIGN_CENTER) control_box.AddSpacer(2) - button_box = wx.BoxSizer(wx.HORIZONTAL) + button_box = wx.BoxSizer(wx.HORIZONTAL) self.ref_plus_button = wx.Button(self, -1, '+', style=wx.BU_EXACTFIT) self.ref_plus_button.Bind(wx.EVT_BUTTON, parent.on_incr_ref_level) button_box.Add(self.ref_plus_button, 0, wx.ALIGN_CENTER) @@ -287,7 +287,7 @@ class control_panel(wx.Panel): self.SetSizerAndFit(control_box) #update self.update() - + def update(self): """ Read the state of the fft plot settings and update the control panel. @@ -296,14 +296,14 @@ class control_panel(wx.Panel): self.average_check_box.SetValue(self.parent.fftsink.average) self.use_persistence_check_box.SetValue(self.parent.fftsink.use_persistence) self.peak_hold_check_box.SetValue(self.parent.fftsink.peak_hold) - #update radio buttons + #update radio buttons try: index = list(DIV_LEVELS).index(self.parent.fftsink.y_per_div) self.radio_buttons[index].SetValue(True) except: pass - + def on_radio_button_change(self, evt): - selected_radio_button = filter(lambda rb: rb.GetValue(), self.radio_buttons)[0] + selected_radio_button = filter(lambda rb: rb.GetValue(), self.radio_buttons)[0] index = self.radio_buttons.index(selected_radio_button) self.parent.fftsink.set_y_per_div(DIV_LEVELS[index]) @@ -311,41 +311,41 @@ class fft_window (wx.Panel): def __init__ (self, fftsink, parent, id = -1, pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_FRAME_STYLE, name = ""): - + self.fftsink = fftsink - #init panel and plot - wx.Panel.__init__(self, parent, -1) - self.plot = plot.PlotCanvas(self, id, pos, size, style, name) + #init panel and plot + wx.Panel.__init__(self, parent, -1) + self.plot = plot.PlotCanvas(self, id, pos, size, style, name) #setup the box with plot and controls self.control_panel = control_panel(self) main_box = wx.BoxSizer (wx.HORIZONTAL) main_box.Add (self.plot, 1, wx.EXPAND) main_box.Add (self.control_panel, 0, wx.EXPAND) self.SetSizerAndFit(main_box) - + self.peak_hold = False self.peak_vals = None self.use_persistence=False self.persist_alpha=0.2 - + self.plot.SetEnableGrid (True) # self.SetEnableZoom (True) # self.SetBackgroundColour ('black') - + self.build_popup_menu() self.set_baseband_freq(self.fftsink.baseband_freq) - + EVT_DATA_EVENT (self, self.set_data) wx.EVT_CLOSE (self, self.on_close_window) self.plot.Bind(wx.EVT_RIGHT_UP, self.on_right_click) self.plot.Bind(wx.EVT_MOTION, self.evt_motion) - + self.input_watcher = input_watcher(fftsink.msgq, fftsink.fft_size, self) def set_scale(self, freq): - x = max(abs(self.fftsink.sample_rate), abs(self.fftsink.baseband_freq)) + x = max(abs(self.fftsink.sample_rate), abs(self.fftsink.baseband_freq)) if x >= 1e9: self._scale_factor = 1e-9 self._units = "GHz" @@ -364,7 +364,7 @@ class fft_window (wx.Panel): self.peak_vals = None self.set_scale(baseband_freq) self.fftsink.set_baseband_freq(baseband_freq) - + def on_close_window (self, event): print "fft_window:on_close_window" self.keep_running = False @@ -381,7 +381,7 @@ class fft_window (wx.Panel): self.peak_vals = numpy.maximum(dB, self.peak_vals) if self.fftsink.input_is_real: # only plot 1/2 the points - x_vals = ((numpy.arange (L/2) * (self.fftsink.sample_rate + x_vals = ((numpy.arange (L/2) * (self.fftsink.sample_rate * self._scale_factor / L)) + self.fftsink.baseband_freq * self._scale_factor) self._points = numpy.zeros((len(x_vals), 2), numpy.float64) @@ -415,7 +415,7 @@ class fft_window (wx.Panel): ymax = self.fftsink.ref_level ymin = self.fftsink.ref_level - self.fftsink.y_per_div * self.fftsink.y_divs y_range = ymin, ymax - self.plot.Draw (graphics, xAxis=x_range, yAxis=y_range, step=self.fftsink.y_per_div) + self.plot.Draw (graphics, xAxis=x_range, yAxis=y_range, step=self.fftsink.y_per_div) def set_use_persistence(self, enable): self.use_persistence = enable @@ -489,7 +489,7 @@ class fft_window (wx.Panel): def evt_motion(self, event): if not hasattr(self, "_points"): return # Got here before first window data update - + # Clip to plotted values (ux, uy) = self.plot.GetXY(event) # Scaled position x_vals = numpy.array(self._points[:,0]) @@ -510,7 +510,7 @@ class fft_window (wx.Panel): tip.Enable(True) tip.SetDelay(0) self.SetToolTip(tip) - + def build_popup_menu(self): self.id_incr_ref_level = wx.NewId() self.id_decr_ref_level = wx.NewId() @@ -524,7 +524,7 @@ class fft_window (wx.Panel): self.id_average = wx.NewId() self.id_use_persistence = wx.NewId() self.id_peak_hold = wx.NewId() - + self.plot.Bind(wx.EVT_MENU, self.on_average, id=self.id_average) self.plot.Bind(wx.EVT_MENU, self.on_use_persistence, id=self.id_use_persistence) self.plot.Bind(wx.EVT_MENU, self.on_peak_hold, id=self.id_peak_hold) @@ -537,7 +537,7 @@ class fft_window (wx.Panel): self.plot.Bind(wx.EVT_MENU, self.on_y_per_div, id=self.id_y_per_div_5) self.plot.Bind(wx.EVT_MENU, self.on_y_per_div, id=self.id_y_per_div_10) self.plot.Bind(wx.EVT_MENU, self.on_y_per_div, id=self.id_y_per_div_20) - + # make a menu menu = wx.Menu() self.popup_menu = menu diff --git a/gr-wxgui/src/python/form.py b/gr-wxgui/src/python/form.py index b55b04d73..0442e49c8 100644 --- a/gr-wxgui/src/python/form.py +++ b/gr-wxgui/src/python/form.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005 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. -# +# import wx from gnuradio import eng_notation @@ -32,7 +32,7 @@ def button_with_callback(parent, label, callback): btn = wx.Button(parent, new_id, label) wx.EVT_BUTTON(parent, new_id, lambda evt: callback()) return btn - + # ---------------------------------------------------------------- # Format converters @@ -128,7 +128,7 @@ class field(object): sizer.Add(label_widget, 0, wx.EXPAND) sizer.Add(widget, weight, wx.EXPAND) return widget - + def _error_msg(self): prefix = '' if self.label: @@ -223,7 +223,7 @@ class quantized_slider_field(field): self.max = range[1] self.step_size = float(range[2]) nsteps = int((self.max-self.min)/self.step_size) - + new_id = wx.NewId() w = wx.Slider(parent, new_id, 0, 0, nsteps, size=wx.Size(250, -1), style=wx.SL_HORIZONTAL) @@ -272,7 +272,7 @@ class radiobox_field(field): style=wx.RA_SPECIFY_ROWS | wx.RA_HORIZONTAL else: style=wx.RA_SPECIFY_COLS | wx.RA_HORIZONTAL - + w = wx.RadioBox(parent, new_id, label=label, style=style, majorDimension=major_dimension, choices=choices) self.f = self._pair_with_label(w, parent=parent, sizer=sizer, label=None, weight=weight) @@ -301,7 +301,7 @@ class form(dict): """ vals = [f.get_value_with_check() for f in self.values()] return [t[1] for t in vals if t[1] is not None] - + def get_key_vals(self): d = {} for (key, f) in self.items(): @@ -310,7 +310,7 @@ class form(dict): def _nop(*args): pass - + def check_input_and_call(self, callback, status_handler=_nop): """ Return a function that checks the form for errors, and then if it's OK, @@ -352,7 +352,7 @@ class demo_app_flow_graph (stdgui2.std_top_block): return True self.form = form() - + self.form['static1'] = \ static_text_field(parent=panel, sizer=vbox, label="Static Text", @@ -382,7 +382,7 @@ class demo_app_flow_graph (stdgui2.std_top_block): def _set_status_msg(self, msg): self.frame.GetStatusBar().SetStatusText(msg, 0) - + def main (): app = stdgui2.stdapp(demo_app_flow_graph, "wxgui form demo", nstatus=1) app.MainLoop () diff --git a/gr-wxgui/src/python/forms/.gitignore b/gr-wxgui/src/python/forms/.gitignore deleted file mode 100644 index a74b07aee..000000000 --- a/gr-wxgui/src/python/forms/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/*.pyc diff --git a/gr-wxgui/src/python/forms/__init__.py b/gr-wxgui/src/python/forms/__init__.py index 3f9f4c735..3068b18fe 100644 --- a/gr-wxgui/src/python/forms/__init__.py +++ b/gr-wxgui/src/python/forms/__init__.py @@ -21,7 +21,7 @@ """ The following classes will be available through gnuradio.wxgui.forms: -""" +""" ######################################################################## # External Converters diff --git a/gr-wxgui/src/python/forms/forms.py b/gr-wxgui/src/python/forms/forms.py index 19b30ffb0..f1d0038ab 100644 --- a/gr-wxgui/src/python/forms/forms.py +++ b/gr-wxgui/src/python/forms/forms.py @@ -29,7 +29,7 @@ The forms follow a layered model: * translation layer * translates the between the external and internal layers * handles parsing errors between layers - * external layer + * external layer * provided external access to the user * set_value, get_value, and optional callback * set and get through optional pubsub and key @@ -511,9 +511,9 @@ from gnuradio.wxgui import gui class app_gui (object): def __init__(self, frame, panel, vbox, top_block, options, args): - + def callback(v): print v - + radio_buttons( sizer=vbox, parent=panel, @@ -525,7 +525,7 @@ class app_gui (object): callback=callback, #major_dimension = 2, ) - + radio_buttons( sizer=vbox, parent=panel, @@ -537,7 +537,7 @@ class app_gui (object): callback=callback, #major_dimension = 2, ) - + radio_buttons( sizer=vbox, parent=panel, @@ -548,7 +548,7 @@ class app_gui (object): callback=callback, #major_dimension = 2, ) - + button( sizer=vbox, parent=panel, @@ -559,8 +559,8 @@ class app_gui (object): callback=callback, #width=100, ) - - + + drop_down( sizer=vbox, parent=panel, @@ -584,7 +584,7 @@ class app_gui (object): callback=callback, width=200, ) - + static_text( sizer=vbox, parent=panel, @@ -593,7 +593,7 @@ class app_gui (object): width=-1, bold=True, ) - + slider( sizer=vbox, parent=panel, @@ -601,7 +601,7 @@ class app_gui (object): label='slider', callback=callback, ) - + log_slider( sizer=vbox, parent=panel, @@ -609,7 +609,7 @@ class app_gui (object): label='slider', callback=callback, ) - + slider( sizer=vbox, parent=panel, @@ -619,7 +619,7 @@ class app_gui (object): style=wx.SL_VERTICAL, length=30, ) - + toggle_button( sizer=vbox, parent=panel, @@ -627,7 +627,7 @@ class app_gui (object): label='toggle it', callback=callback, ) - + single_button( sizer=vbox, parent=panel, diff --git a/gr-wxgui/src/python/gui.py b/gr-wxgui/src/python/gui.py index 2f59af593..ccc773eab 100644 --- a/gr-wxgui/src/python/gui.py +++ b/gr-wxgui/src/python/gui.py @@ -1,23 +1,23 @@ # # 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. -# +# import wx from gnuradio import gr @@ -47,7 +47,7 @@ class top_panel(wx.Panel): p = wx.Panel(self) p.SetSize((640,480)) vbox.Add(p, 1, wx.EXPAND) - + self.SetSizer(vbox) self.SetAutoLayout(True) vbox.Fit(self) @@ -62,7 +62,7 @@ class top_panel(wx.Panel): # Top-level window frame with menu and status bars. # class top_frame(wx.Frame): - def __init__ (self, top_block, gui, options, args, + def __init__ (self, top_block, gui, options, args, title, nstatus, start, realtime): wx.Frame.__init__(self, None, -1, title) @@ -109,11 +109,11 @@ class top_frame(wx.Frame): # -# Top-level wxPython application object. User creates or subclasses this +# Top-level wxPython application object. User creates or subclasses this # in their GUI script. # class app(wx.App): - def __init__ (self, top_block=None, gui=None, options=None, args=None, + def __init__ (self, top_block=None, gui=None, options=None, args=None, title="GNU Radio", nstatus=1, start=False, realtime=False): self.top_block = top_block self.gui = gui diff --git a/gr-wxgui/src/python/plot.py b/gr-wxgui/src/python/plot.py index e0bc4ca60..041a2a7a5 100644 --- a/gr-wxgui/src/python/plot.py +++ b/gr-wxgui/src/python/plot.py @@ -27,13 +27,13 @@ # # Oct 15, 2004 Gordon Williams (g_will@cyberus.ca) # - Imported modules given leading underscore to name. -# - Added Cursor Line Tracking and User Point Labels. +# - Added Cursor Line Tracking and User Point Labels. # - Demo for Cursor Line Tracking and Point Labels. # - Size of plot preview frame adjusted to show page better. # - Added helper functions PositionUserToScreen and PositionScreenToUser in PlotCanvas. # - Added functions GetClosestPoints (all curves) and GetClosestPoint (only closest curve) # can be in either user coords or screen coords. -# +# # May 27, 2007 Johnathan Corgan (jcorgan@corganenterprises.com) # - Converted from numarray to numpy # @@ -45,8 +45,8 @@ This is a simple light weight plotting module that can be used with Boa or easily integrated into your own wxPython application. The emphasis is on small size and fast plotting for large data sets. It has a reasonable number of features to do line and scatter graphs -easily as well as simple bar graphs. It is not as sophisticated or -as powerful as SciPy Plt or Chaco. Both of these are great packages +easily as well as simple bar graphs. It is not as sophisticated or +as powerful as SciPy Plt or Chaco. Both of these are great packages but consume huge amounts of computer resources for simple plots. They can be found at http://scipy.com @@ -69,7 +69,7 @@ Major Additions Gordon Williams Feb. 2003 (g_will@cyberus.ca) -Doc strings and lots of comments -Optimizations for large number of points -Legends - + Did a lot of work here to speed markers up. Only a factor of 4 improvement though. Lines are much faster than markers, especially filled markers. Stay away from circles and triangles unless you @@ -128,11 +128,11 @@ class PolyPoints: self.scaled = self.points self.attributes = {} self.attributes.update(self._attributes) - for name, value in attr.items(): + for name, value in attr.items(): if name not in self._attributes.keys(): raise KeyError, "Style attribute incorrect. Should be one of %s" % self._attributes.keys() self.attributes[name] = value - + def boundingBox(self): if len(self.points) == 0: # no curves to draw @@ -154,7 +154,7 @@ class PolyPoints: self.currentScale= scale self.currentShift= shift # else unchanged use the current scaling - + def getLegend(self): return self.attributes['legend'] @@ -177,13 +177,13 @@ class PolyPoints: pntIndex = _numpy.argmin(d) dist = d[pntIndex] return [pntIndex, self.points[pntIndex], self.scaled[pntIndex], dist] - - + + class PolyLine(PolyPoints): """Class to define line type and style - All methods except __init__ are private. """ - + _attributes = {'colour': 'black', 'width': 1, 'style': wx.SOLID, @@ -224,7 +224,7 @@ class PolyMarker(PolyPoints): """Class to define marker type and style - All methods except __init__ are private. """ - + _attributes = {'colour': 'black', 'width': 1, 'size': 2, @@ -245,7 +245,7 @@ class PolyMarker(PolyPoints): 'fillstyle'= wx.SOLID, - wx.Brush fill style (use wx.TRANSPARENT for no fill) 'marker'= 'circle' - Marker shape 'legend'= '' - Marker Legend to display - + Marker Shapes: - 'circle' - 'dot' @@ -255,7 +255,7 @@ class PolyMarker(PolyPoints): - 'cross' - 'plus' """ - + PolyPoints.__init__(self, points, attr) def draw(self, dc, printerScale, coord= None): @@ -315,7 +315,7 @@ class PolyMarker(PolyPoints): poly.shape= (len(coords),3,2) poly += shape dc.DrawPolygonList(poly.astype(_numpy.int32)) - + def _cross(self, dc, coords, size=1): fact= 2.5*size for f in [[-fact,-fact,fact,fact],[-fact,fact,fact,-fact]]: @@ -370,7 +370,7 @@ class PlotGraphics: def setYLabel(self, yLabel= ''): """Set the Y axis label on the graph""" self.yLabel= yLabel - + def setTitle(self, title= ''): """Set the title at the top of graph""" self.title= title @@ -401,14 +401,14 @@ class PlotGraphics: oSymExt = o.getSymExtent(printerScale) symExt = _numpy.maximum(symExt, oSymExt) return symExt - + def getLegendNames(self): """Returns list of legend names""" lst = [None]*len(self) for i in range(len(self)): lst[i]= self.objects[i].getLegend() return lst - + def __len__(self): return len(self.objects) @@ -432,12 +432,12 @@ class PlotCanvas(wx.Window): self.decim_counter=0 """Constucts a window, which can be a child of a frame, dialog or any other non-control window""" - + wx.Window.__init__(self, parent, id, pos, size, style, name) self.border = (1,1) self.SetBackgroundColour("white") - + # Create some mouse events for zooming self.Bind(wx.EVT_LEFT_DOWN, self.OnMouseLeftDown) self.Bind(wx.EVT_LEFT_UP, self.OnMouseLeftUp) @@ -466,7 +466,7 @@ class PlotCanvas(wx.Window): self._zoomCorner2= _numpy.array([0.0, 0.0]) # left mouse up corner self._zoomEnabled= False self._hasDragged= False - + # Drawing Variables self.last_draw = None self._pointScale= 1 @@ -476,7 +476,7 @@ class PlotCanvas(wx.Window): self._gridEnabled= False self._legendEnabled= False self._xUseScopeTicks= False - + # Fonts self._fontCache = {} self._fontSizeAxis= 10 @@ -504,13 +504,13 @@ class PlotCanvas(wx.Window): def set_persist_alpha(self, persist_alpha): self.alpha = persist_alpha - + # SaveFile def SaveFile(self, fileName= ''): """Saves the file to the type specified in the extension. If no file name is specified a dialog box is provided. Returns True if sucessful, otherwise False. - + .bmp Save a Windows bitmap file. .xbm Save an X bitmap file. .xpm Save an XPM bitmap file. @@ -519,7 +519,7 @@ class PlotCanvas(wx.Window): """ if _string.lower(fileName[-3:]) not in ['bmp','xbm','xpm','png','jpg']: dlg1 = wx.FileDialog( - self, + self, "Choose a file with extension bmp, gif, xbm, xpm, png, or jpg", ".", "", "BMP files (*.bmp)|*.bmp|XBM files (*.xbm)|*.xbm|XPM file (*.xpm)|*.xpm|PNG files (*.png)|*.png|JPG files (*.jpg)|*.jpg", wx.SAVE|wx.OVERWRITE_PROMPT @@ -576,7 +576,7 @@ class PlotCanvas(wx.Window): self.print_data=data.GetPrintData() # updates print_data finally: dlg.Destroy() - + def Printout(self, paper=None): """Print current plot.""" if paper != None: @@ -614,11 +614,11 @@ class PlotCanvas(wx.Window): def SetFontSizeAxis(self, point= 10): """Set the tick and axis label font size (default is 10 point)""" self._fontSizeAxis= point - + def GetFontSizeAxis(self): """Get current tick and axis label font size in points""" return self._fontSizeAxis - + def SetFontSizeTitle(self, point= 15): """Set Title font size (default is 15 point)""" self._fontSizeTitle= point @@ -626,11 +626,11 @@ class PlotCanvas(wx.Window): def GetFontSizeTitle(self): """Get current Title font size in points""" return self._fontSizeTitle - + def SetFontSizeLegend(self, point= 7): """Set Legend font size (default is 7 point)""" self._fontSizeLegend= point - + def GetFontSizeLegend(self): """Get current Legend font size in points""" return self._fontSizeLegend @@ -660,7 +660,7 @@ class PlotCanvas(wx.Window): """Set True to enable legend.""" if value not in [True,False]: raise TypeError, "Value should be True or False" - self._legendEnabled= value + self._legendEnabled= value self.Redraw() def GetEnableLegend(self): @@ -671,7 +671,7 @@ class PlotCanvas(wx.Window): """Set True to enable pointLabel.""" if value not in [True,False]: raise TypeError, "Value should be True or False" - self._pointLabelEnabled= value + self._pointLabelEnabled= value self.Redraw() #will erase existing pointLabel if present self.last_PointLabel = None @@ -694,8 +694,8 @@ class PlotCanvas(wx.Window): self.last_PointLabel = None #reset pointLabel if self.last_draw is not None: self.Draw(self.last_draw[0]) - - def ScrollRight(self, units): + + def ScrollRight(self, units): """Move view right number of axis units.""" self.last_PointLabel = None #reset pointLabel if self.last_draw is not None: @@ -710,7 +710,7 @@ class PlotCanvas(wx.Window): graphics, xAxis, yAxis= self.last_draw yAxis= (yAxis[0]+units, yAxis[1]+units) self.Draw(graphics,xAxis,yAxis) - + def GetXY(self,event): """Takes a mouse event and returns the XY user axis values.""" x,y= self.PositionScreenToUser(event.GetPosition()) @@ -721,13 +721,13 @@ class PlotCanvas(wx.Window): userPos= _numpy.array(pntXY) x,y= userPos * self._pointScale + self._pointShift return x,y - + def PositionScreenToUser(self, pntXY): """Converts Screen position to User Coordinates""" screenPos= _numpy.array(pntXY) x,y= (screenPos-self._pointShift)/self._pointScale return x,y - + def SetXSpec(self, type= 'auto'): """xSpec- defines x axis type. Can be 'none', 'min' or 'auto' where: @@ -736,7 +736,7 @@ class PlotCanvas(wx.Window): 'auto' - rounds axis range to sensible values """ self._xSpec= type - + def SetYSpec(self, type= 'auto'): """ySpec- defines x axis type. Can be 'none', 'min' or 'auto' where: @@ -749,11 +749,11 @@ class PlotCanvas(wx.Window): def GetXSpec(self): """Returns current XSpec for axis""" return self._xSpec - + def GetYSpec(self): """Returns current YSpec for axis""" return self._ySpec - + def GetXMaxRange(self): """Returns (minX, maxX) x-axis range for displayed graph""" graphics= self.last_draw[0] @@ -771,15 +771,15 @@ class PlotCanvas(wx.Window): def GetXCurrentRange(self): """Returns (minX, maxX) x-axis for currently displayed portion of graph""" return self.last_draw[1] - + def GetYCurrentRange(self): """Returns (minY, maxY) y-axis for currently displayed portion of graph""" return self.last_draw[2] - + def SetXUseScopeTicks(self, v=False): """Always 10 divisions, no labels""" self._xUseScopeTicks = v - + def GetXUseScopeTicks(self): return self._xUseScopeTicks @@ -788,7 +788,7 @@ class PlotCanvas(wx.Window): graphics- instance of PlotGraphics with list of PolyXXX objects xAxis - tuple with (min, max) axis range to view yAxis - same as xAxis - dc - drawing context - doesn't have to be specified. + dc - drawing context - doesn't have to be specified. If it's not, the offscreen buffer is used """ # check Axis is either tuple or none @@ -796,7 +796,7 @@ class PlotCanvas(wx.Window): raise TypeError, "xAxis should be None or (minX,maxX)" if type(yAxis) not in [type(None),tuple]: raise TypeError, "yAxis should be None or (minY,maxY)" - + # check case for axis = (a,b) where a==b caused by improper zooms if xAxis != None: if xAxis[0] == xAxis[1]: @@ -804,22 +804,22 @@ class PlotCanvas(wx.Window): if yAxis != None: if yAxis[0] == yAxis[1]: return - + if dc == None: - # sets new dc and clears it + # sets new dc and clears it if self.use_persistence: dc = wx.MemoryDC() dc.SelectObject(self._Buffer) dc.Clear() else: dc = wx.BufferedDC(wx.ClientDC(self), self._Buffer) - dc.Clear() - + dc.Clear() + dc.BeginDrawing() # dc.Clear() - - + + # set font size for every thing but title and legend dc.SetFont(self._getFont(self._fontSizeAxis)) @@ -847,7 +847,7 @@ class PlotCanvas(wx.Window): dc.SetBrush(wx.Brush( wx.BLACK, wx.SOLID ) ) #wx.SOLID wx.TRANSPARENT ) ) #dc.SetLogicalFunction(wx.INVERT) #wx.XOR wx.INVERT dc.DrawRectangle( ptx,pty, rectWidth,rectHeight) - #dc.SetBrush(wx.Brush( wx.WHITE, wx.SOLID ) ) + #dc.SetBrush(wx.Brush( wx.WHITE, wx.SOLID ) ) #dc.SetLogicalFunction(wx.COPY) # Get ticks and textExtents for axis if required @@ -908,13 +908,13 @@ class PlotCanvas(wx.Window): self._pointScale= scale # make available for mouse events self._pointShift= shift - #dc.SetLogicalFunction(wx.INVERT) #wx.XOR wx.INVERT + #dc.SetLogicalFunction(wx.INVERT) #wx.XOR wx.INVERT self._drawAxes(dc, p1, p2, scale, shift, xticks, yticks) - #dc.SetLogicalFunction(wx.COPY) - + #dc.SetLogicalFunction(wx.COPY) + graphics.scaleAndShift(scale, shift) graphics.setPrinterScale(self.printerScale) # thicken up lines and markers if printing - + # set clipping area so drawing does not occur outside axis box ptx,pty,rectWidth,rectHeight= self._point2ClientCoord(p1, p2) dc.SetClippingRegion(ptx,pty,rectWidth,rectHeight) @@ -946,7 +946,7 @@ class PlotCanvas(wx.Window): self._Buffer2array +=self._Bufferarray.astype(_numpy.uint32)*alpha_int self._Buffer2array /=256 - ##copy back to image buffer + ##copy back to image buffer self._Buffer2.CopyFromBuffer(self._Buffer2array.astype(_numpy.uint8)) #, format=wx.BitmapBufferFormat_RGB, stride=-1) #draw to the screen @@ -958,7 +958,7 @@ class PlotCanvas(wx.Window): dc2.DrawBitmap(self._Buffer2, 0, 0, False) #dc2.DrawBitmap(self._Buffer, 0, 0, False) dc2.EndDrawing() - + def Redraw(self, dc= None): """Redraw the existing plot.""" if self.last_draw is not None: @@ -986,13 +986,13 @@ class PlotCanvas(wx.Window): xAxis = ( x - w/2, x + w/2 ) yAxis = ( y - h/2, y + h/2 ) self.Draw(graphics, xAxis, yAxis) - + def GetClosestPoints(self, pntXY, pointScaled= True): """Returns list with [curveNumber, legend, index of closest point, pointXY, scaledXY, distance] list for each curve. Returns [] if no curves are being plotted. - + x, y in user coords if pointScaled == True based on screen coords if pointScaled == False based on user coords @@ -1016,7 +1016,7 @@ class PlotCanvas(wx.Window): [curveNumber, legend, index of closest point, pointXY, scaledXY, distance] list for only the closest curve. Returns [] if no curves are being plotted. - + x, y in user coords if pointScaled == True based on screen coords if pointScaled == False based on user coords @@ -1042,7 +1042,7 @@ class PlotCanvas(wx.Window): you specify. This function can be called from parent window with onClick, - onMotion events etc. + onMotion events etc. """ if self.last_PointLabel != None: #compare pointXY @@ -1088,7 +1088,7 @@ class PlotCanvas(wx.Window): def OnMouseDoubleClick(self,event): if self._zoomEnabled: self.Reset() - + def OnMouseRightDown(self,event): if self._zoomEnabled: X,Y = self.GetXY(event) @@ -1113,13 +1113,13 @@ class PlotCanvas(wx.Window): # a file, or whatever. self._Buffer = wx.EmptyBitmap(Size[0],Size[1],24) - + if True: #self.use_persistence: #self._Bufferarray = _numpy.zeros((Size[0], Size[1],3), dtype=_numpy.uint8) self._Bufferarray = _numpy.zeros((Size[0]* Size[1]*3), dtype=_numpy.uint8) # Make new second offscreen bitmap: this bitmap will always have the - # last drawing in it, so it can be used to do display time dependent processing + # last drawing in it, so it can be used to do display time dependent processing # like averaging (IIR) or show differences between updates self._Buffer2 = wx.EmptyBitmap(Size[0],Size[1],24) # now the extra buffers for the IIR processing @@ -1144,24 +1144,24 @@ class PlotCanvas(wx.Window): self._drawPointLabel(self.last_PointLabel) #erase old self.last_PointLabel = None - + # Private Methods ************************************************** def _setSize(self, width=None, height=None): """DC width and height.""" if width == None: (self.width,self.height) = self.GetClientSize() else: - self.width, self.height= width,height + self.width, self.height= width,height self.plotbox_size = 0.97*_numpy.array([self.width, self.height]) xo = 0.5*(self.width-self.plotbox_size[0]) yo = self.height-0.5*(self.height-self.plotbox_size[1]) self.plotbox_origin = _numpy.array([xo, yo]) - + def _setPrinterScale(self, scale): """Used to thicken lines and increase marker size for print out.""" # line thickness on printer is very thin at 600 dot/in. Markers small self.printerScale= scale - + def _printDraw(self, printDC): """Used for printing.""" if self.last_draw != None: @@ -1183,7 +1183,7 @@ class PlotCanvas(wx.Window): dc = wx.ClientDC( self ) #this will erase if called twice dc.Blit(0, 0, width, height, dcs, 0, 0, wx.EQUIV) #(NOT src) XOR dst - + def _drawLegend(self,dc,graphics,rhsW,topH,legendBoxWH, legendSymExt, legendTextExt): """Draws legend symbols and text""" @@ -1222,7 +1222,7 @@ class PlotCanvas(wx.Window): xLabelWH= dc.GetTextExtent(xLabel) yLabelWH= dc.GetTextExtent(yLabel) return titleWH, xLabelWH, yLabelWH - + def _legendWH(self, dc, graphics): """Returns the size in screen units for legend box""" if self._legendEnabled != True: @@ -1236,7 +1236,7 @@ class PlotCanvas(wx.Window): txtExt= dc.GetTextExtent(txtList[0]) for txt in graphics.getLegendNames()[1:]: txtExt= _numpy.maximum(txtExt,dc.GetTextExtent(txt)) - maxW= symExt[0]+txtExt[0] + maxW= symExt[0]+txtExt[0] maxH= max(symExt[1],txtExt[1]) # padding .1 for lhs of legend box and space between lines maxW= maxW* 1.1 @@ -1250,7 +1250,7 @@ class PlotCanvas(wx.Window): ptx,pty,rectWidth,rectHeight= self._point2ClientCoord(corner1, corner2) # draw rectangle dc = wx.ClientDC( self ) - dc.BeginDrawing() + dc.BeginDrawing() dc.SetPen(wx.Pen(wx.BLACK)) dc.SetBrush(wx.Brush( wx.WHITE, wx.TRANSPARENT ) ) dc.SetLogicalFunction(wx.INVERT) @@ -1285,8 +1285,8 @@ class PlotCanvas(wx.Window): plr= _numpy.maximum(pt1,pt2) # Lower right corner rectWidth, rectHeight= plr-pul ptx,pty= pul - return ptx, pty, rectWidth, rectHeight - + return ptx, pty, rectWidth, rectHeight + def _axisInterval(self, spec, lower, upper): """Returns sensible axis range for given spec""" if spec == 'none' or spec == 'min': @@ -1320,10 +1320,10 @@ class PlotCanvas(wx.Window): raise ValueError, str(spec) + ': illegal axis specification' def _drawAxes(self, dc, p1, p2, scale, shift, xticks, yticks): - + penWidth= self.printerScale # increases thickness for printing only dc.SetPen(wx.Pen(wx.NamedColour('BLACK'), penWidth)) - + # set length of tick marks--long ones make grid if self._gridEnabled: x,y,width,height= self._point2ClientCoord(p1,p2) @@ -1332,7 +1332,7 @@ class PlotCanvas(wx.Window): else: yTickLength= 3 * self.printerScale # lengthens lines for printing xTickLength= 3 * self.printerScale - + if self._xSpec is not 'none': lower, upper = p1[0],p2[0] text = 1 @@ -1377,7 +1377,7 @@ class PlotCanvas(wx.Window): factor = f grid = factor * 10.**power if power > 4 or power < -4: - format = '%+7.1e' + format = '%+7.1e' elif power >= 0: digits = max(1, int(power)) format = '%' + `digits`+'.0f' @@ -1441,14 +1441,14 @@ class PlotPrintout(wx.Printout): dcSize= dc.GetSize() # DC size pageSize= self.GetPageSizePixels() # page size in terms of pixcels clientDcSize= self.graph.GetClientSize() - + # find what the margins are (mm) margLeftSize,margTopSize= self.graph.pageSetupData.GetMarginTopLeft() margRightSize, margBottomSize= self.graph.pageSetupData.GetMarginBottomRight() # calculate offset and scale for dc pixLeft= margLeftSize*PPIPrinter[0]/25.4 # mm*(dots/in)/(mm/in) - pixRight= margRightSize*PPIPrinter[0]/25.4 + pixRight= margRightSize*PPIPrinter[0]/25.4 pixTop= margTopSize*PPIPrinter[1]/25.4 pixBottom= margBottomSize*PPIPrinter[1]/25.4 @@ -1463,10 +1463,10 @@ class PlotPrintout(wx.Printout): pixTop *= ratioH plotAreaW *= ratioW plotAreaH *= ratioH - + # rescale plot to page or preview plot area self.graph._setSize(plotAreaW,plotAreaH) - + # Set offset and scale dc.SetDeviceOrigin(pixLeft,pixTop) @@ -1511,7 +1511,7 @@ def _draw1Objects(): markers2 = PolyMarker([(0., 0.), (pi/4., 1.), (pi/2, 0.), (3.*pi/4., -1)], legend='Cross Legend', colour='blue', marker='cross') - + return PlotGraphics([markers1, lines, markers2],"Graph Title", "X Axis", "Y Axis") def _draw2Objects(): @@ -1593,16 +1593,16 @@ class TestFrame(wx.Frame): menu = wx.Menu() menu.Append(200, 'Page Setup...', 'Setup the printer page') self.Bind(wx.EVT_MENU, self.OnFilePageSetup, id=200) - + menu.Append(201, 'Print Preview...', 'Show the current plot on page') self.Bind(wx.EVT_MENU, self.OnFilePrintPreview, id=201) - + menu.Append(202, 'Print...', 'Print the current plot') self.Bind(wx.EVT_MENU, self.OnFilePrint, id=202) - + menu.Append(203, 'Save Plot...', 'Save current plot') self.Bind(wx.EVT_MENU, self.OnSaveFile, id=203) - + menu.Append(205, 'E&xit', 'Enough of this already!') self.Bind(wx.EVT_MENU, self.OnFileExit, id=205) self.mainmenu.Append(menu, '&File') @@ -1620,25 +1620,25 @@ class TestFrame(wx.Frame): self.Bind(wx.EVT_MENU,self.OnPlotDraw5, id=210) menu.Append(260, 'Draw6', 'Draw plots6') self.Bind(wx.EVT_MENU,self.OnPlotDraw6, id=260) - + menu.Append(211, '&Redraw', 'Redraw plots') self.Bind(wx.EVT_MENU,self.OnPlotRedraw, id=211) menu.Append(212, '&Clear', 'Clear canvas') self.Bind(wx.EVT_MENU,self.OnPlotClear, id=212) menu.Append(213, '&Scale', 'Scale canvas') - self.Bind(wx.EVT_MENU,self.OnPlotScale, id=213) + self.Bind(wx.EVT_MENU,self.OnPlotScale, id=213) menu.Append(214, 'Enable &Zoom', 'Enable Mouse Zoom', kind=wx.ITEM_CHECK) - self.Bind(wx.EVT_MENU,self.OnEnableZoom, id=214) + self.Bind(wx.EVT_MENU,self.OnEnableZoom, id=214) menu.Append(215, 'Enable &Grid', 'Turn on Grid', kind=wx.ITEM_CHECK) self.Bind(wx.EVT_MENU,self.OnEnableGrid, id=215) menu.Append(220, 'Enable &Legend', 'Turn on Legend', kind=wx.ITEM_CHECK) self.Bind(wx.EVT_MENU,self.OnEnableLegend, id=220) menu.Append(222, 'Enable &Point Label', 'Show Closest Point', kind=wx.ITEM_CHECK) self.Bind(wx.EVT_MENU,self.OnEnablePointLabel, id=222) - + menu.Append(225, 'Scroll Up 1', 'Move View Up 1 Unit') - self.Bind(wx.EVT_MENU,self.OnScrUp, id=225) + self.Bind(wx.EVT_MENU,self.OnScrUp, id=225) menu.Append(230, 'Scroll Rt 2', 'Move View Right 2 Units') self.Bind(wx.EVT_MENU,self.OnScrRt, id=230) menu.Append(235, '&Plot Reset', 'Reset to original plot') @@ -1655,7 +1655,7 @@ class TestFrame(wx.Frame): # A status bar to tell people what's happening self.CreateStatusBar(1) - + self.client = PlotCanvas(self) #define the function for drawing pointLabels self.client.SetPointLabelFunc(self.DrawPointLabel) @@ -1678,7 +1678,7 @@ class TestFrame(wx.Frame): # ---------- dc.SetPen(wx.Pen(wx.BLACK)) dc.SetBrush(wx.Brush( wx.BLACK, wx.SOLID ) ) - + sx, sy = mDataDict["scaledXY"] #scaled x,y of closest point dc.DrawRectangle( sx-5,sy-5, 10, 10) #10by10 square centered on point px,py = mDataDict["pointXY"] @@ -1703,7 +1703,7 @@ class TestFrame(wx.Frame): dlst= self.client.GetClosetPoint( self.client.GetXY(event), pointScaled= True) if dlst != []: #returns [] if none curveNum, legend, pIndex, pointXY, scaledXY, distance = dlst - #make up dictionary to pass to my user function (see DrawPointLabel) + #make up dictionary to pass to my user function (see DrawPointLabel) mDataDict= {"curveNum":curveNum, "legend":legend, "pIndex":pIndex,\ "pointXY":pointXY, "scaledXY":scaledXY} #pass dict to update the pointLabel @@ -1712,13 +1712,13 @@ class TestFrame(wx.Frame): def OnFilePageSetup(self, event): self.client.PageSetup() - + def OnFilePrintPreview(self, event): self.client.PrintPreview() - + def OnFilePrint(self, event): self.client.Printout() - + def OnSaveFile(self, event): self.client.SaveFile() @@ -1728,11 +1728,11 @@ class TestFrame(wx.Frame): def OnPlotDraw1(self, event): self.resetDefaults() self.client.Draw(_draw1Objects()) - + def OnPlotDraw2(self, event): self.resetDefaults() self.client.Draw(_draw2Objects()) - + def OnPlotDraw3(self, event): self.resetDefaults() self.client.SetFont(wx.Font(10,wx.SCRIPT,wx.NORMAL,wx.NORMAL)) @@ -1747,7 +1747,7 @@ class TestFrame(wx.Frame): drawObj= _draw4Objects() self.client.Draw(drawObj) ## # profile -## start = _time.clock() +## start = _time.clock() ## for x in range(10): ## self.client.Draw(drawObj) ## print "10 plots of Draw4 took: %f sec."%(_time.clock() - start) @@ -1775,7 +1775,7 @@ class TestFrame(wx.Frame): def OnPlotClear(self,event): self.client.Clear() - + def OnPlotScale(self, event): if self.client.last_draw != None: graphics, xAxis, yAxis= self.client.last_draw @@ -1783,10 +1783,10 @@ class TestFrame(wx.Frame): def OnEnableZoom(self, event): self.client.SetEnableZoom(event.IsChecked()) - + def OnEnableGrid(self, event): self.client.SetEnableGrid(event.IsChecked()) - + def OnEnableLegend(self, event): self.client.SetEnableLegend(event.IsChecked()) @@ -1795,7 +1795,7 @@ class TestFrame(wx.Frame): def OnScrUp(self, event): self.client.ScrollUp(1) - + def OnScrRt(self,event): self.client.ScrollRight(2) @@ -1814,7 +1814,7 @@ class TestFrame(wx.Frame): self.client.SetFontSizeLegend(7) self.client.SetXSpec('auto') self.client.SetYSpec('auto') - + def __test(): diff --git a/gr-wxgui/src/python/plotter/.gitignore b/gr-wxgui/src/python/plotter/.gitignore deleted file mode 100644 index b6950912c..000000000 --- a/gr-wxgui/src/python/plotter/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -/*.pyc diff --git a/gr-wxgui/src/python/plotter/Makefile.am b/gr-wxgui/src/python/plotter/Makefile.am deleted file mode 100644 index d00f0a425..000000000 --- a/gr-wxgui/src/python/plotter/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -# -# Copyright 2004,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. -# - -include $(top_srcdir)/Makefile.common - -# Install this stuff so that it ends up as the gnuradio.wxgui module -# This usually ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gnuradio/wxgui - -ourpythondir = $(grpythondir)/wxgui/plotter -ourlibdir = $(grpyexecdir)/wxgui/plotter - -ourpython_PYTHON = \ - __init__.py \ - bar_plotter.py \ - channel_plotter.py \ - common.py \ - gltext.py \ - grid_plotter_base.py \ - plotter_base.py \ - waterfall_plotter.py - diff --git a/gr-wxgui/src/python/plotter/common.py b/gr-wxgui/src/python/plotter/common.py index 4c50cd787..6775b7057 100644 --- a/gr-wxgui/src/python/plotter/common.py +++ b/gr-wxgui/src/python/plotter/common.py @@ -115,7 +115,7 @@ class point_label_thread(threading.Thread, mutex): def run(self): last_ts = time.time() last_coor = coor = None - try: + try: while True: time.sleep(1.0/30.0) self.lock() diff --git a/gr-wxgui/src/python/plotter/gltext.py b/gr-wxgui/src/python/plotter/gltext.py index 1b3c047dc..0b6e3f55b 100644 --- a/gr-wxgui/src/python/plotter/gltext.py +++ b/gr-wxgui/src/python/plotter/gltext.py @@ -1,503 +1,503 @@ -#!/usr/bin/env python
-# -*- coding: utf-8
-#
-# Provides some text display functions for wx + ogl
-# Copyright (C) 2007 Christian Brugger, Stefan Hacker
-#
-# 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 2 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.
-
-import wx
-from OpenGL.GL import *
-
-"""
-Optimize with psyco if possible, this gains us about 50% speed when
-creating our textures in trade for about 4MBytes of additional memory usage for
-psyco. If you don't like loosing the memory you have to turn the lines following
-"enable psyco" into a comment while uncommenting the line after "Disable psyco".
-"""
-#Try to enable psyco
-try:
- import psyco
- psyco_optimized = False
-except ImportError:
- psyco = None
-
-#Disable psyco
-#psyco = None
-
-class TextElement(object):
- """
- A simple class for using system Fonts to display
- text in an OpenGL scene
- """
- def __init__(self,
- text = '',
- font = None,
- foreground = wx.BLACK,
- centered = False):
- """
- text (String) - Text
- font (wx.Font) - Font to draw with (None = System default)
- foreground (wx.Color) - Color of the text
- or (wx.Bitmap)- Bitmap to overlay the text with
- centered (bool) - Center the text
-
- Initializes the TextElement
- """
- # save given variables
- self._text = text
- self._lines = text.split('\n')
- self._font = font
- self._foreground = foreground
- self._centered = centered
-
- # init own variables
- self._owner_cnt = 0 #refcounter
- self._texture = None #OpenGL texture ID
- self._text_size = None #x/y size tuple of the text
- self._texture_size= None #x/y Texture size tuple
-
- # create Texture
- self.createTexture()
-
-
- #---Internal helpers
-
- def _getUpper2Base(self, value):
- """
- Returns the lowest value with the power of
- 2 greater than 'value' (2^n>value)
- """
- base2 = 1
- while base2 < value:
- base2 *= 2
- return base2
-
- #---Functions
-
- def draw_text(self, position = wx.Point(0,0), scale = 1.0, rotation = 0):
- """
- position (wx.Point) - x/y Position to draw in scene
- scale (float) - Scale
- rotation (int) - Rotation in degree
-
- Draws the text to the scene
- """
- #Enable necessary functions
- glColor(1,1,1,1)
- glEnable(GL_TEXTURE_2D)
- glEnable(GL_ALPHA_TEST) #Enable alpha test
- glAlphaFunc(GL_GREATER, 0)
- glEnable(GL_BLEND) #Enable blending
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
- #Bind texture
- glBindTexture(GL_TEXTURE_2D, self._texture)
-
- ow, oh = self._text_size
- w , h = self._texture_size
- #Perform transformations
- glPushMatrix()
- glTranslated(position.x, position.y, 0)
- glRotate(-rotation, 0, 0, 1)
- glScaled(scale, scale, scale)
- if self._centered:
- glTranslate(-w/2, -oh/2, 0)
- #Draw vertices
- glBegin(GL_QUADS)
- glTexCoord2f(0,0); glVertex2f(0,0)
- glTexCoord2f(0,1); glVertex2f(0,h)
- glTexCoord2f(1,1); glVertex2f(w,h)
- glTexCoord2f(1,0); glVertex2f(w,0)
- glEnd()
- glPopMatrix()
-
- #Disable features
- glDisable(GL_BLEND)
- glDisable(GL_ALPHA_TEST)
- glDisable(GL_TEXTURE_2D)
-
- def createTexture(self):
- """
- Creates a texture from the settings saved in TextElement, to be able to use normal
- system fonts conviently a wx.MemoryDC is used to draw on a wx.Bitmap. As wxwidgets
- device contexts don't support alpha at all it is necessary to apply a little hack
- to preserve antialiasing without sticking to a fixed background color:
-
- We draw the bmp in b/w mode so we can use its data as a alpha channel for a solid
- color bitmap which after GL_ALPHA_TEST and GL_BLEND will show a nicely antialiased
- text on any surface.
-
- To access the raw pixel data the bmp gets converted to a wx.Image. Now we just have
- to merge our foreground color with the alpha data we just created and push it all
- into a OpenGL texture and we are DONE *inhalesdelpy*
-
- DRAWBACK of the whole conversion thing is a really long time for creating the
- texture. If you see any optimizations that could save time PLEASE CREATE A PATCH!!!
- """
- # get a memory dc
- dc = wx.MemoryDC()
-
- # set our font
- dc.SetFont(self._font)
-
- # Approximate extend to next power of 2 and create our bitmap
- # REMARK: You wouldn't believe how much fucking speed this little
- # sucker gains compared to sizes not of the power of 2. It's like
- # 500ms --> 0.5ms (on my ATI-GPU powered Notebook). On Sams nvidia
- # machine there don't seem to occur any losses...bad drivers?
- ow, oh = dc.GetMultiLineTextExtent(self._text)[:2]
- w, h = self._getUpper2Base(ow), self._getUpper2Base(oh)
-
- self._text_size = wx.Size(ow,oh)
- self._texture_size = wx.Size(w,h)
- bmp = wx.EmptyBitmap(w,h)
-
-
- #Draw in b/w mode to bmp so we can use it as alpha channel
- dc.SelectObject(bmp)
- dc.SetBackground(wx.BLACK_BRUSH)
- dc.Clear()
- dc.SetTextForeground(wx.WHITE)
- x,y = 0,0
- centered = self.centered
- for line in self._lines:
- if not line: line = ' '
- tw, th = dc.GetTextExtent(line)
- if centered:
- x = int(round((w-tw)/2))
- dc.DrawText(line, x, y)
- x = 0
- y += th
- #Release the dc
- dc.SelectObject(wx.NullBitmap)
- del dc
-
- #Generate a correct RGBA data string from our bmp
- """
- NOTE: You could also use wx.AlphaPixelData to access the pixel data
- in 'bmp' directly, but the iterator given by it is much slower than
- first converting to an image and using wx.Image.GetData().
- """
- img = wx.ImageFromBitmap(bmp)
- alpha = img.GetData()
-
- if isinstance(self._foreground, wx.Colour):
- """
- If we have a static color...
- """
- r,g,b = self._foreground.Get()
- color = "%c%c%c" % (chr(r), chr(g), chr(b))
-
- data = ''
- for i in xrange(0, len(alpha)-1, 3):
- data += color + alpha[i]
-
- elif isinstance(self._foreground, wx.Bitmap):
- """
- If we have a bitmap...
- """
- bg_img = wx.ImageFromBitmap(self._foreground)
- bg = bg_img.GetData()
- bg_width = self._foreground.GetWidth()
- bg_height = self._foreground.GetHeight()
-
- data = ''
-
- for y in xrange(0, h):
- for x in xrange(0, w):
- if (y > (bg_height-1)) or (x > (bg_width-1)):
- color = "%c%c%c" % (chr(0),chr(0),chr(0))
- else:
- pos = (x+y*bg_width) * 3
- color = bg[pos:pos+3]
- data += color + alpha[(x+y*w)*3]
-
-
- # now convert it to ogl texture
- self._texture = glGenTextures(1)
- glBindTexture(GL_TEXTURE_2D, self._texture)
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR)
-
- glPixelStorei(GL_UNPACK_ROW_LENGTH, 0)
- glPixelStorei(GL_UNPACK_ALIGNMENT, 2)
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, data)
-
- def deleteTexture(self):
- """
- Deletes the OpenGL texture object
- """
- if self._texture:
- if glIsTexture(self._texture):
- glDeleteTextures(self._texture)
- else:
- self._texture = None
-
- def bind(self):
- """
- Increase refcount
- """
- self._owner_cnt += 1
-
- def release(self):
- """
- Decrease refcount
- """
- self._owner_cnt -= 1
-
- def isBound(self):
- """
- Return refcount
- """
- return self._owner_cnt
-
- def __del__(self):
- """
- Destructor
- """
- self.deleteTexture()
-
- #---Getters/Setters
-
- def getText(self): return self._text
- def getFont(self): return self._font
- def getForeground(self): return self._foreground
- def getCentered(self): return self._centered
- def getTexture(self): return self._texture
- def getTexture_size(self): return self._texture_size
-
- def getOwner_cnt(self): return self._owner_cnt
- def setOwner_cnt(self, value):
- self._owner_cnt = value
-
- #---Properties
-
- text = property(getText, None, None, "Text of the object")
- font = property(getFont, None, None, "Font of the object")
- foreground = property(getForeground, None, None, "Color of the text")
- centered = property(getCentered, None, None, "Is text centered")
- owner_cnt = property(getOwner_cnt, setOwner_cnt, None, "Owner count")
- texture = property(getTexture, None, None, "Used texture")
- texture_size = property(getTexture_size, None, None, "Size of the used texture")
-
-
-class Text(object):
- """
- A simple class for using System Fonts to display text in
- an OpenGL scene. The Text adds a global Cache of already
- created text elements to TextElement's base functionality
- so you can save some memory and increase speed
- """
- _texts = [] #Global cache for TextElements
-
- def __init__(self,
- text = 'Text',
- font = None,
- font_size = 8,
- foreground = wx.BLACK,
- centered = False,
- bold = False):
- """
- text (string) - displayed text
- font (wx.Font) - if None, system default font will be used with font_size
- font_size (int) - font size in points
- foreground (wx.Color) - Color of the text
- or (wx.Bitmap) - Bitmap to overlay the text with
- centered (bool) - should the text drawn centered towards position?
-
- Initializes the text object
- """
- #Init/save variables
- self._aloc_text = None
- self._text = text
- self._font_size = font_size
- self._foreground= foreground
- self._centered = centered
-
- #Check if we are offered a font
- if not font:
- #if not use the system default
- self._font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
- else:
- #save it
- self._font = font
-
- if bold: self._font.SetWeight(wx.FONTWEIGHT_BOLD)
-
- #Bind us to our texture
- self._initText()
-
- #---Internal helpers
-
- def _initText(self):
- """
- Initializes/Reinitializes the Text object by binding it
- to a TextElement suitable for its current settings
- """
- #Check if we already bound to a texture
- if self._aloc_text:
- #if so release it
- self._aloc_text.release()
- if not self._aloc_text.isBound():
- self._texts.remove(self._aloc_text)
- self._aloc_text = None
-
- #Adjust our font
- self._font.SetPointSize(self._font_size)
-
- #Search for existing element in our global buffer
- for element in self._texts:
- if element.text == self._text and\
- element.font == self._font and\
- element.foreground == self._foreground and\
- element.centered == self._centered:
- # We already exist in global buffer ;-)
- element.bind()
- self._aloc_text = element
- break
-
- if not self._aloc_text:
- # We are not in the global buffer, let's create ourselves
- aloc_text = self._aloc_text = TextElement(self._text,
- self._font,
- self._foreground,
- self._centered)
- aloc_text.bind()
- self._texts.append(aloc_text)
-
- def __del__(self):
- """
- Destructor
- """
- aloc_text = self._aloc_text
- aloc_text.release()
- if not aloc_text.isBound():
- self._texts.remove(aloc_text)
-
- #---Functions
-
- def draw_text(self, position = wx.Point(0,0), scale = 1.0, rotation = 0):
- """
- position (wx.Point) - x/y Position to draw in scene
- scale (float) - Scale
- rotation (int) - Rotation in degree
-
- Draws the text to the scene
- """
-
- self._aloc_text.draw_text(position, scale, rotation)
-
- #---Setter/Getter
-
- def getText(self): return self._text
- def setText(self, value, reinit = True):
- """
- value (bool) - New Text
- reinit (bool) - Create a new texture
-
- Sets a new text
- """
- self._text = value
- if reinit:
- self._initText()
-
- def getFont(self): return self._font
- def setFont(self, value, reinit = True):
- """
- value (bool) - New Font
- reinit (bool) - Create a new texture
-
- Sets a new font
- """
- self._font = value
- if reinit:
- self._initText()
-
- def getFont_size(self): return self._font_size
- def setFont_size(self, value, reinit = True):
- """
- value (bool) - New font size
- reinit (bool) - Create a new texture
-
- Sets a new font size
- """
- self._font_size = value
- if reinit:
- self._initText()
-
- def getForeground(self): return self._foreground
- def setForeground(self, value, reinit = True):
- """
- value (bool) - New centered value
- reinit (bool) - Create a new texture
-
- Sets a new value for 'centered'
- """
- self._foreground = value
- if reinit:
- self._initText()
-
- def getCentered(self): return self._centered
- def setCentered(self, value, reinit = True):
- """
- value (bool) - New centered value
- reinit (bool) - Create a new texture
-
- Sets a new value for 'centered'
- """
- self._centered = value
- if reinit:
- self._initText()
-
- def get_size(self):
- """
- Returns a text size tuple
- """
- return self._aloc_text._text_size
-
- def getTexture_size(self):
- """
- Returns a texture size tuple
- """
- return self._aloc_text.texture_size
-
- def getTextElement(self):
- """
- Returns the text element bound to the Text class
- """
- return self._aloc_text
-
- def getTexture(self):
- """
- Returns the texture of the bound TextElement
- """
- return self._aloc_text.texture
-
-
- #---Properties
-
- text = property(getText, setText, None, "Text of the object")
- font = property(getFont, setFont, None, "Font of the object")
- font_size = property(getFont_size, setFont_size, None, "Font size")
- foreground = property(getForeground, setForeground, None, "Color/Overlay bitmap of the text")
- centered = property(getCentered, setCentered, None, "Display the text centered")
- texture_size = property(getTexture_size, None, None, "Size of the used texture")
- texture = property(getTexture, None, None, "Texture of bound TextElement")
- text_element = property(getTextElement,None , None, "TextElement bound to this class")
-
-#Optimize critical functions
-if psyco and not psyco_optimized:
- psyco.bind(TextElement.createTexture)
- psyco_optimized = True
+#!/usr/bin/env python +# -*- coding: utf-8 +# +# Provides some text display functions for wx + ogl +# Copyright (C) 2007 Christian Brugger, Stefan Hacker +# +# 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 2 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. + +import wx +from OpenGL.GL import * + +""" +Optimize with psyco if possible, this gains us about 50% speed when +creating our textures in trade for about 4MBytes of additional memory usage for +psyco. If you don't like loosing the memory you have to turn the lines following +"enable psyco" into a comment while uncommenting the line after "Disable psyco". +""" +#Try to enable psyco +try: + import psyco + psyco_optimized = False +except ImportError: + psyco = None + +#Disable psyco +#psyco = None + +class TextElement(object): + """ + A simple class for using system Fonts to display + text in an OpenGL scene + """ + def __init__(self, + text = '', + font = None, + foreground = wx.BLACK, + centered = False): + """ + text (String) - Text + font (wx.Font) - Font to draw with (None = System default) + foreground (wx.Color) - Color of the text + or (wx.Bitmap)- Bitmap to overlay the text with + centered (bool) - Center the text + + Initializes the TextElement + """ + # save given variables + self._text = text + self._lines = text.split('\n') + self._font = font + self._foreground = foreground + self._centered = centered + + # init own variables + self._owner_cnt = 0 #refcounter + self._texture = None #OpenGL texture ID + self._text_size = None #x/y size tuple of the text + self._texture_size= None #x/y Texture size tuple + + # create Texture + self.createTexture() + + + #---Internal helpers + + def _getUpper2Base(self, value): + """ + Returns the lowest value with the power of + 2 greater than 'value' (2^n>value) + """ + base2 = 1 + while base2 < value: + base2 *= 2 + return base2 + + #---Functions + + def draw_text(self, position = wx.Point(0,0), scale = 1.0, rotation = 0): + """ + position (wx.Point) - x/y Position to draw in scene + scale (float) - Scale + rotation (int) - Rotation in degree + + Draws the text to the scene + """ + #Enable necessary functions + glColor(1,1,1,1) + glEnable(GL_TEXTURE_2D) + glEnable(GL_ALPHA_TEST) #Enable alpha test + glAlphaFunc(GL_GREATER, 0) + glEnable(GL_BLEND) #Enable blending + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) + #Bind texture + glBindTexture(GL_TEXTURE_2D, self._texture) + + ow, oh = self._text_size + w , h = self._texture_size + #Perform transformations + glPushMatrix() + glTranslated(position.x, position.y, 0) + glRotate(-rotation, 0, 0, 1) + glScaled(scale, scale, scale) + if self._centered: + glTranslate(-w/2, -oh/2, 0) + #Draw vertices + glBegin(GL_QUADS) + glTexCoord2f(0,0); glVertex2f(0,0) + glTexCoord2f(0,1); glVertex2f(0,h) + glTexCoord2f(1,1); glVertex2f(w,h) + glTexCoord2f(1,0); glVertex2f(w,0) + glEnd() + glPopMatrix() + + #Disable features + glDisable(GL_BLEND) + glDisable(GL_ALPHA_TEST) + glDisable(GL_TEXTURE_2D) + + def createTexture(self): + """ + Creates a texture from the settings saved in TextElement, to be able to use normal + system fonts conviently a wx.MemoryDC is used to draw on a wx.Bitmap. As wxwidgets + device contexts don't support alpha at all it is necessary to apply a little hack + to preserve antialiasing without sticking to a fixed background color: + + We draw the bmp in b/w mode so we can use its data as a alpha channel for a solid + color bitmap which after GL_ALPHA_TEST and GL_BLEND will show a nicely antialiased + text on any surface. + + To access the raw pixel data the bmp gets converted to a wx.Image. Now we just have + to merge our foreground color with the alpha data we just created and push it all + into a OpenGL texture and we are DONE *inhalesdelpy* + + DRAWBACK of the whole conversion thing is a really long time for creating the + texture. If you see any optimizations that could save time PLEASE CREATE A PATCH!!! + """ + # get a memory dc + dc = wx.MemoryDC() + + # set our font + dc.SetFont(self._font) + + # Approximate extend to next power of 2 and create our bitmap + # REMARK: You wouldn't believe how much fucking speed this little + # sucker gains compared to sizes not of the power of 2. It's like + # 500ms --> 0.5ms (on my ATI-GPU powered Notebook). On Sams nvidia + # machine there don't seem to occur any losses...bad drivers? + ow, oh = dc.GetMultiLineTextExtent(self._text)[:2] + w, h = self._getUpper2Base(ow), self._getUpper2Base(oh) + + self._text_size = wx.Size(ow,oh) + self._texture_size = wx.Size(w,h) + bmp = wx.EmptyBitmap(w,h) + + + #Draw in b/w mode to bmp so we can use it as alpha channel + dc.SelectObject(bmp) + dc.SetBackground(wx.BLACK_BRUSH) + dc.Clear() + dc.SetTextForeground(wx.WHITE) + x,y = 0,0 + centered = self.centered + for line in self._lines: + if not line: line = ' ' + tw, th = dc.GetTextExtent(line) + if centered: + x = int(round((w-tw)/2)) + dc.DrawText(line, x, y) + x = 0 + y += th + #Release the dc + dc.SelectObject(wx.NullBitmap) + del dc + + #Generate a correct RGBA data string from our bmp + """ + NOTE: You could also use wx.AlphaPixelData to access the pixel data + in 'bmp' directly, but the iterator given by it is much slower than + first converting to an image and using wx.Image.GetData(). + """ + img = wx.ImageFromBitmap(bmp) + alpha = img.GetData() + + if isinstance(self._foreground, wx.Colour): + """ + If we have a static color... + """ + r,g,b = self._foreground.Get() + color = "%c%c%c" % (chr(r), chr(g), chr(b)) + + data = '' + for i in xrange(0, len(alpha)-1, 3): + data += color + alpha[i] + + elif isinstance(self._foreground, wx.Bitmap): + """ + If we have a bitmap... + """ + bg_img = wx.ImageFromBitmap(self._foreground) + bg = bg_img.GetData() + bg_width = self._foreground.GetWidth() + bg_height = self._foreground.GetHeight() + + data = '' + + for y in xrange(0, h): + for x in xrange(0, w): + if (y > (bg_height-1)) or (x > (bg_width-1)): + color = "%c%c%c" % (chr(0),chr(0),chr(0)) + else: + pos = (x+y*bg_width) * 3 + color = bg[pos:pos+3] + data += color + alpha[(x+y*w)*3] + + + # now convert it to ogl texture + self._texture = glGenTextures(1) + glBindTexture(GL_TEXTURE_2D, self._texture) + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR) + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR) + + glPixelStorei(GL_UNPACK_ROW_LENGTH, 0) + glPixelStorei(GL_UNPACK_ALIGNMENT, 2) + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, data) + + def deleteTexture(self): + """ + Deletes the OpenGL texture object + """ + if self._texture: + if glIsTexture(self._texture): + glDeleteTextures(self._texture) + else: + self._texture = None + + def bind(self): + """ + Increase refcount + """ + self._owner_cnt += 1 + + def release(self): + """ + Decrease refcount + """ + self._owner_cnt -= 1 + + def isBound(self): + """ + Return refcount + """ + return self._owner_cnt + + def __del__(self): + """ + Destructor + """ + self.deleteTexture() + + #---Getters/Setters + + def getText(self): return self._text + def getFont(self): return self._font + def getForeground(self): return self._foreground + def getCentered(self): return self._centered + def getTexture(self): return self._texture + def getTexture_size(self): return self._texture_size + + def getOwner_cnt(self): return self._owner_cnt + def setOwner_cnt(self, value): + self._owner_cnt = value + + #---Properties + + text = property(getText, None, None, "Text of the object") + font = property(getFont, None, None, "Font of the object") + foreground = property(getForeground, None, None, "Color of the text") + centered = property(getCentered, None, None, "Is text centered") + owner_cnt = property(getOwner_cnt, setOwner_cnt, None, "Owner count") + texture = property(getTexture, None, None, "Used texture") + texture_size = property(getTexture_size, None, None, "Size of the used texture") + + +class Text(object): + """ + A simple class for using System Fonts to display text in + an OpenGL scene. The Text adds a global Cache of already + created text elements to TextElement's base functionality + so you can save some memory and increase speed + """ + _texts = [] #Global cache for TextElements + + def __init__(self, + text = 'Text', + font = None, + font_size = 8, + foreground = wx.BLACK, + centered = False, + bold = False): + """ + text (string) - displayed text + font (wx.Font) - if None, system default font will be used with font_size + font_size (int) - font size in points + foreground (wx.Color) - Color of the text + or (wx.Bitmap) - Bitmap to overlay the text with + centered (bool) - should the text drawn centered towards position? + + Initializes the text object + """ + #Init/save variables + self._aloc_text = None + self._text = text + self._font_size = font_size + self._foreground= foreground + self._centered = centered + + #Check if we are offered a font + if not font: + #if not use the system default + self._font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT) + else: + #save it + self._font = font + + if bold: self._font.SetWeight(wx.FONTWEIGHT_BOLD) + + #Bind us to our texture + self._initText() + + #---Internal helpers + + def _initText(self): + """ + Initializes/Reinitializes the Text object by binding it + to a TextElement suitable for its current settings + """ + #Check if we already bound to a texture + if self._aloc_text: + #if so release it + self._aloc_text.release() + if not self._aloc_text.isBound(): + self._texts.remove(self._aloc_text) + self._aloc_text = None + + #Adjust our font + self._font.SetPointSize(self._font_size) + + #Search for existing element in our global buffer + for element in self._texts: + if element.text == self._text and\ + element.font == self._font and\ + element.foreground == self._foreground and\ + element.centered == self._centered: + # We already exist in global buffer ;-) + element.bind() + self._aloc_text = element + break + + if not self._aloc_text: + # We are not in the global buffer, let's create ourselves + aloc_text = self._aloc_text = TextElement(self._text, + self._font, + self._foreground, + self._centered) + aloc_text.bind() + self._texts.append(aloc_text) + + def __del__(self): + """ + Destructor + """ + aloc_text = self._aloc_text + aloc_text.release() + if not aloc_text.isBound(): + self._texts.remove(aloc_text) + + #---Functions + + def draw_text(self, position = wx.Point(0,0), scale = 1.0, rotation = 0): + """ + position (wx.Point) - x/y Position to draw in scene + scale (float) - Scale + rotation (int) - Rotation in degree + + Draws the text to the scene + """ + + self._aloc_text.draw_text(position, scale, rotation) + + #---Setter/Getter + + def getText(self): return self._text + def setText(self, value, reinit = True): + """ + value (bool) - New Text + reinit (bool) - Create a new texture + + Sets a new text + """ + self._text = value + if reinit: + self._initText() + + def getFont(self): return self._font + def setFont(self, value, reinit = True): + """ + value (bool) - New Font + reinit (bool) - Create a new texture + + Sets a new font + """ + self._font = value + if reinit: + self._initText() + + def getFont_size(self): return self._font_size + def setFont_size(self, value, reinit = True): + """ + value (bool) - New font size + reinit (bool) - Create a new texture + + Sets a new font size + """ + self._font_size = value + if reinit: + self._initText() + + def getForeground(self): return self._foreground + def setForeground(self, value, reinit = True): + """ + value (bool) - New centered value + reinit (bool) - Create a new texture + + Sets a new value for 'centered' + """ + self._foreground = value + if reinit: + self._initText() + + def getCentered(self): return self._centered + def setCentered(self, value, reinit = True): + """ + value (bool) - New centered value + reinit (bool) - Create a new texture + + Sets a new value for 'centered' + """ + self._centered = value + if reinit: + self._initText() + + def get_size(self): + """ + Returns a text size tuple + """ + return self._aloc_text._text_size + + def getTexture_size(self): + """ + Returns a texture size tuple + """ + return self._aloc_text.texture_size + + def getTextElement(self): + """ + Returns the text element bound to the Text class + """ + return self._aloc_text + + def getTexture(self): + """ + Returns the texture of the bound TextElement + """ + return self._aloc_text.texture + + + #---Properties + + text = property(getText, setText, None, "Text of the object") + font = property(getFont, setFont, None, "Font of the object") + font_size = property(getFont_size, setFont_size, None, "Font size") + foreground = property(getForeground, setForeground, None, "Color/Overlay bitmap of the text") + centered = property(getCentered, setCentered, None, "Display the text centered") + texture_size = property(getTexture_size, None, None, "Size of the used texture") + texture = property(getTexture, None, None, "Texture of bound TextElement") + text_element = property(getTextElement,None , None, "TextElement bound to this class") + +#Optimize critical functions +if psyco and not psyco_optimized: + psyco.bind(TextElement.createTexture) + psyco_optimized = True diff --git a/gr-wxgui/src/python/plotter/grid_plotter_base.py b/gr-wxgui/src/python/plotter/grid_plotter_base.py index a9bd02731..5eaa76bc0 100644 --- a/gr-wxgui/src/python/plotter/grid_plotter_base.py +++ b/gr-wxgui/src/python/plotter/grid_plotter_base.py @@ -78,7 +78,7 @@ class grid_plotter_base(plotter_base): def set_point_label_coordinate(self, coor): """ Set the point label coordinate. - @param coor the coordinate x, y tuple or None + @param coor the coordinate x, y tuple or None """ self.lock() self._point_label_coordinate = coor diff --git a/gr-wxgui/src/python/plotter/plotter_base.py b/gr-wxgui/src/python/plotter/plotter_base.py index b856215e9..5af580339 100644 --- a/gr-wxgui/src/python/plotter/plotter_base.py +++ b/gr-wxgui/src/python/plotter/plotter_base.py @@ -101,7 +101,7 @@ class plotter_base(wx.glcanvas.GLCanvas, common.mutex): self.Bind(wx.EVT_ERASE_BACKGROUND, lambda e: None) def set_use_persistence(self,enable): - self.use_persistence=enable + self.use_persistence=enable self.clear_accum=True def set_persist_alpha(self,analog_alpha): diff --git a/gr-wxgui/src/python/plotter/waterfall_plotter.py b/gr-wxgui/src/python/plotter/waterfall_plotter.py index 0af64b826..f2456241c 100644 --- a/gr-wxgui/src/python/plotter/waterfall_plotter.py +++ b/gr-wxgui/src/python/plotter/waterfall_plotter.py @@ -204,7 +204,7 @@ class waterfall_plotter(grid_plotter_base): Create the texture to fit the fft_size X num_lines. @param flag the set/unset or update flag """ - if flag is not None: + if flag is not None: self._resize_texture_flag = flag return if not self._resize_texture_flag: return diff --git a/gr-wxgui/src/python/powermate.py b/gr-wxgui/src/python/powermate.py index 7f54dff33..7c324c5d9 100644 --- a/gr-wxgui/src/python/powermate.py +++ b/gr-wxgui/src/python/powermate.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2005 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. -# +# """ Handler for Griffin PowerMate, Contour ShuttlePro & ShuttleXpress USB knobs @@ -184,7 +184,7 @@ class powermate(threading.Thread): self.setDaemon (1) self.keep_running = True self.start () - + def __del__(self): self.keep_running = False if self.handle >= 0: @@ -227,7 +227,7 @@ class powermate(threading.Thread): except exceptions.OSError: return False - + def set_event_receiver(self, obj): self.event_receiver = obj @@ -239,7 +239,7 @@ class powermate(threading.Thread): """ if self.id != ID_POWERMATE: return False - + static_brightness &= 0xff; if pulse_speed < 0: pulse_speed = 0 @@ -269,14 +269,14 @@ class powermate(threading.Thread): raw_input_event = struct.unpack(input_event_struct,s) sec, usec, type, code, val = self.mapper(raw_input_event) - + if self.event_receiver is None: continue - + if type == IET_SYN: # ignore pass elif type == IET_MSC: # ignore (seems to be PowerMate reporting led brightness) - pass + pass elif type == IET_REL and code == IEC_REL_DIAL: #print "Dial: %d" % (val,) wx.PostEvent(self.event_receiver, PMRotateEvent(val)) @@ -346,13 +346,13 @@ class _contour_remapper(object): if type == IET_KEY: # remap keys so that all 3 gadgets have buttons 0 to 4 in common - return (sec, usec, type, + return (sec, usec, type, (IEC_BTN_5, IEC_BTN_6, IEC_BTN_7, IEC_BTN_8, IEC_BTN_0, IEC_BTN_1, IEC_BTN_2, IEC_BTN_3, IEC_BTN_4, IEC_BTN_9, IEC_BTN_10, IEC_BTN_11, IEC_BTN_12, IEC_BTN_13, IEC_BTN_14)[code - IEC_BTN_0], val) - + return event # ------------------------------------------------------------------------ @@ -374,9 +374,9 @@ class PMButtonEvent(wx.PyEvent): self.button = button self.value = value - def Clone (self): + def Clone (self): self.__class__(self.GetId()) - + class PMRotateEvent(wx.PyEvent): def __init__(self, delta): @@ -384,7 +384,7 @@ class PMRotateEvent(wx.PyEvent): self.SetEventType (grEVT_POWERMATE_ROTATE) self.delta = delta - def Clone (self): + def Clone (self): self.__class__(self.GetId()) @@ -394,9 +394,9 @@ class PMShuttleEvent(wx.PyEvent): self.SetEventType (grEVT_POWERMATE_SHUTTLE) self.position = position - def Clone (self): + def Clone (self): self.__class__(self.GetId()) - + # ------------------------------------------------------------------------ # Example usage # ------------------------------------------------------------------------ @@ -411,14 +411,14 @@ if __name__ == '__main__': EVT_POWERMATE_SHUTTLE(self, self.on_shuttle) self.brightness = 128 self.pulse_speed = 0 - + try: self.pm = powermate(self) except: sys.stderr.write("Unable to find PowerMate or Contour Shuttle\n") sys.exit(1) - self.pm.set_led_state(self.brightness, self.pulse_speed) + self.pm.set_led_state(self.brightness, self.pulse_speed) def on_button(self, evt): @@ -431,11 +431,11 @@ if __name__ == '__main__': new = max(0, min(255, self.brightness + evt.delta)) if new != self.brightness: self.brightness = new - self.pm.set_led_state(self.brightness, self.pulse_speed) - + self.pm.set_led_state(self.brightness, self.pulse_speed) + def on_shuttle(self, evt): print "Shuttle %d" % (evt.position,) - + class App(wx.App): def OnInit(self): title='PowerMate Demo' diff --git a/gr-wxgui/src/python/scope_window.py b/gr-wxgui/src/python/scope_window.py index 89a808cec..dc90a6045 100644 --- a/gr-wxgui/src/python/scope_window.py +++ b/gr-wxgui/src/python/scope_window.py @@ -120,7 +120,7 @@ class control_panel(wx.Panel): parent.subscribe(USE_PERSISTENCE_KEY, widget.ShowItems) #allways show initially, so room is reserved for them widget.ShowItems(True) # (parent[USE_PERSISTENCE_KEY]) - + parent.subscribe(USE_PERSISTENCE_KEY, self._update_layout) ################################################## @@ -406,7 +406,7 @@ class control_panel(wx.Panel): # Just ignore the key value we get # we only need to now that the visability or size of something has changed self.parent.Layout() - #self.parent.Fit() + #self.parent.Fit() ################################################## # Scope window with plotter and control panel @@ -477,12 +477,12 @@ class scope_window(wx.Panel, pubsub.pubsub): self[TRIGGER_LEVEL_KEY] = 0 self[TRIGGER_CHANNEL_KEY] = 0 self[TRIGGER_MODE_KEY] = trig_mode - + self[TRIGGER_SLOPE_KEY] = gr.gr_TRIG_SLOPE_POS self[T_FRAC_OFF_KEY] = 0.5 self[USE_PERSISTENCE_KEY] = use_persistence self[PERSIST_ALPHA_KEY] = persist_alpha - + if self[TRIGGER_MODE_KEY] == gr.gr_TRIG_MODE_STRIPCHART: self[T_FRAC_OFF_KEY] = 0.0 diff --git a/gr-wxgui/src/python/scopesink_gl.py b/gr-wxgui/src/python/scopesink_gl.py index 5ae897400..e6ff532e7 100644 --- a/gr-wxgui/src/python/scopesink_gl.py +++ b/gr-wxgui/src/python/scopesink_gl.py @@ -84,7 +84,7 @@ class _scope_sink_base(gr.hier_block2, common.wxgui_hb): **kwargs #do not end with a comma ): #ensure analog alpha - if persist_alpha is None: + if persist_alpha is None: actual_frame_rate=float(frame_rate) analog_cutoff_freq=0.5 # Hertz #calculate alpha from wanted cutoff freq @@ -157,11 +157,11 @@ class _scope_sink_base(gr.hier_block2, common.wxgui_hb): ) else: for i in range(num_inputs): - c2f = gr.complex_to_float() + c2f = gr.complex_to_float() self.wxgui_connect((self, i), c2f) for j in range(2): self.connect( - (c2f, j), + (c2f, j), ac_couple_block(self.controller, common.index_key(AC_COUPLE_KEY, 2*i+j), SAMPLE_RATE_KEY), (scope, 2*i+j), ) @@ -187,7 +187,7 @@ class test_top_block (stdgui2.std_top_block): default_input_rate = 1e6 if len(argv) > 1: - input_rate = int(argv[1]) + input_rate = int(argv[1]) else: input_rate = default_input_rate @@ -202,12 +202,12 @@ class test_top_block (stdgui2.std_top_block): t_scale = .00003*default_input_rate/input_rate # old behavior print "input rate %s v_scale %s t_scale %s" % (input_rate,v_scale,t_scale) - + # Generate a complex sinusoid ampl=1.0e3 self.src0 = gr.sig_source_c (input_rate, gr.GR_SIN_WAVE, 25.1e3*input_rate/default_input_rate, ampl) - self.noise =gr.sig_source_c (input_rate, gr.GR_SIN_WAVE, 11.1*25.1e3*input_rate/default_input_rate, ampl/10) + self.noise =gr.sig_source_c (input_rate, gr.GR_SIN_WAVE, 11.1*25.1e3*input_rate/default_input_rate, ampl/10) #self.noise =gr.noise_source_c(gr.GR_GAUSSIAN, ampl/10) self.combine=gr.add_cc() @@ -223,7 +223,7 @@ class test_top_block (stdgui2.std_top_block): # self.connect("src0 throttle scope") self.connect(self.src0,(self.combine,0)) self.connect(self.noise,(self.combine,1)) - self.connect(self.combine, self.thr, scope) + self.connect(self.combine, self.thr, scope) def main (): app = stdgui2.stdapp (test_top_block, "O'Scope Test App") diff --git a/gr-wxgui/src/python/scopesink_nongl.py b/gr-wxgui/src/python/scopesink_nongl.py index bf2c50917..d45e79906 100644 --- a/gr-wxgui/src/python/scopesink_nongl.py +++ b/gr-wxgui/src/python/scopesink_nongl.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2003,2004,2006,2007 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, gru, eng_notation from gnuradio.wxgui import stdgui2 @@ -42,7 +42,7 @@ class scope_sink_f(gr.hier_block2): msgq = gr.msg_queue(2) # message queue that holds at most 2 messages self.guts = gr.oscope_sink_f(sample_rate, msgq) - for i in range(num_inputs): + for i in range(num_inputs): self.connect((self, i), (self.guts, i)) self.win = scope_window(win_info (msgq, sample_rate, frame_decim, @@ -63,16 +63,16 @@ class scope_sink_c(gr.hier_block2): msgq = gr.msg_queue(2) # message queue that holds at most 2 messages self.guts = gr.oscope_sink_f(sample_rate, msgq) - for i in range(num_inputs): - c2f = gr.complex_to_float() + for i in range(num_inputs): + c2f = gr.complex_to_float() self.connect((self, i), c2f) self.connect((c2f, 0), (self.guts, 2*i+0)) self.connect((c2f, 1), (self.guts, 2*i+1)) - + self.win = scope_window(win_info(msgq, sample_rate, frame_decim, v_scale, t_scale, self.guts, title), parent) self.win.info.xy = xy_mode - + def set_sample_rate(self, sample_rate): self.guts.set_sample_rate(sample_rate) self.win.info.set_sample_rate(sample_rate) @@ -132,7 +132,7 @@ v_scale_list = [ # counts / div, LARGER gains are SMALLER /div, appear EARLIER 1.0e+4 # 10000 /div, USRP full scale is -/+ 32767 ] - + wxDATA_EVENT = wx.NewEventType() def EVT_DATA_EVENT(win, func): @@ -144,12 +144,12 @@ class DataEvent(wx.PyEvent): self.SetEventType (wxDATA_EVENT) self.data = data - def Clone (self): + def Clone (self): self.__class__ (self.GetId()) class win_info (object): - __slots__ = ['msgq', 'sample_rate', 'frame_decim', 'v_scale', + __slots__ = ['msgq', 'sample_rate', 'frame_decim', 'v_scale', 'scopesink', 'title', 'time_scale_cursor', 'v_scale_cursor', 'marker', 'xy', 'autorange', 'running'] @@ -178,7 +178,7 @@ class win_info (object): def set_sample_rate(self, sample_rate): self.sample_rate = sample_rate - + def get_sample_rate (self): return self.sample_rate @@ -202,31 +202,31 @@ class input_watcher (gru.msgq_runner): def handle_msg(self, msg): if self.iscan == 0: # only display at frame_decim self.iscan = self.frame_decim - + nchan = int(msg.arg1()) # number of channels of data in msg nsamples = int(msg.arg2()) # number of samples in each channel - + s = msg.to_string() # get the body of the msg as a string - + bytes_per_chan = nsamples * gr.sizeof_float - + records = [] for ch in range (nchan): - + start = ch * bytes_per_chan chan_data = s[start:start+bytes_per_chan] rec = numpy.fromstring (chan_data, numpy.float32) records.append (rec) - + # print "nrecords = %d, reclen = %d" % (len (records),nsamples) - + de = DataEvent (records) wx.PostEvent (self.event_receiver, de) records = [] del de self.iscan -= 1 - + class scope_window (wx.Panel): @@ -248,7 +248,7 @@ class scope_window (wx.Panel): self.SetAutoLayout (True) self.sizer.Fit (self) self.set_autorange(self.info.autorange) - + # second row of control buttons etc. appears BELOW control_box def make_control2_box (self): @@ -339,14 +339,14 @@ class scope_window (wx.Panel): ctrlbox.Add (self.xy_choice, 0, wx.ALIGN_CENTER) return ctrlbox - + _marker_choices = ['line', 'plus', 'dot'] def update_timebase_label (self): time_per_div = self.info.get_time_per_div () s = ' ' + eng_notation.num_to_str (time_per_div) + 's/div' self.time_base_label.SetLabel (s) - + def decr_timebase (self, evt): self.info.time_scale_cursor.prev () self.update_timebase_label () @@ -359,7 +359,7 @@ class scope_window (wx.Panel): volts_per_div = self.info.get_volts_per_div () s = ' ' + eng_notation.num_to_str (volts_per_div) + '/div' # Not V/div self.v_scale_label.SetLabel (s) - + def decr_v_scale (self, evt): self.info.v_scale_cursor.prev () self.update_v_scale_label () @@ -367,7 +367,7 @@ class scope_window (wx.Panel): def incr_v_scale (self, evt): self.info.v_scale_cursor.next () self.update_v_scale_label () - + def marker_choice_event (self, evt): s = evt.GetString () self.set_marker (s) @@ -388,13 +388,13 @@ class scope_window (wx.Panel): self.autorange_checkbox.SetValue(False) self.inc_v_button.Enable(True) self.dec_v_button.Enable(True) - + def autorange_checkbox_event(self, evt): if evt.Checked(): self.set_autorange(True) else: self.set_autorange(False) - + def set_marker (self, s): self.info.set_marker (s) # set info for drawing routines i = self.marker_choice.FindString (s) @@ -409,7 +409,7 @@ class scope_window (wx.Panel): def set_format_plus (self): self.set_marker ('plus') - + def xy_choice_event (self, evt): s = evt.GetString () self.info.xy = s == 'X:Y' @@ -430,19 +430,19 @@ class scope_window (wx.Panel): sink.set_trigger_mode (gr.gr_TRIG_MODE_FREE) else: assert 0, "Bad trig_mode_choice string" - + def set_trig_level50 (self, evt): self.info.scopesink.set_trigger_level_auto () def run_stop (self, evt): self.info.running = not self.info.running - + class graph_window (plot.PlotCanvas): channel_colors = ['BLUE', 'RED', 'CYAN', 'MAGENTA', 'GREEN', 'YELLOW'] - + def __init__ (self, info, parent, id = -1, pos = wx.DefaultPosition, size = (640, 240), style = wx.DEFAULT_FRAME_STYLE, name = ""): @@ -453,7 +453,7 @@ class graph_window (plot.PlotCanvas): self.SetEnableZoom (True) self.SetEnableLegend(True) # self.SetBackgroundColour ('black') - + self.info = info; self.y_range = None self.x_range = None @@ -468,11 +468,11 @@ class graph_window (plot.PlotCanvas): def channel_color (self, ch): return self.channel_colors[ch % len(self.channel_colors)] - + def format_data (self, evt): if not self.info.running: return - + if self.info.xy: self.format_xy_data (evt) return @@ -545,7 +545,7 @@ class graph_window (plot.PlotCanvas): points = numpy.zeros ((len(records[0]), 2), numpy.float32) points[:,0] = records[0] points[:,1] = records[1] - + self.SetXUseScopeTicks (False) m = info.get_marker () @@ -607,7 +607,7 @@ class test_top_block (stdgui2.std_top_block): stdgui2.std_top_block.__init__ (self, frame, panel, vbox, argv) if len(argv) > 1: - frame_decim = int(argv[1]) + frame_decim = int(argv[1]) else: frame_decim = 1 @@ -622,7 +622,7 @@ class test_top_block (stdgui2.std_top_block): t_scale = None # old behavior print "frame decim %s v_scale %s t_scale %s" % (frame_decim,v_scale,t_scale) - + input_rate = 1e6 # Generate a complex sinusoid @@ -639,7 +639,7 @@ class test_top_block (stdgui2.std_top_block): # Ultimately this will be # self.connect("src0 throttle scope") - self.connect(self.src0, self.thr, scope) + self.connect(self.src0, self.thr, scope) def main (): app = stdgui2.stdapp (test_top_block, "O'Scope Test App") diff --git a/gr-wxgui/src/python/stdgui2.py b/gr-wxgui/src/python/stdgui2.py index f397fd01e..71436d72c 100644 --- a/gr-wxgui/src/python/stdgui2.py +++ b/gr-wxgui/src/python/stdgui2.py @@ -1,23 +1,23 @@ # # Copyright 2004 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# '''A simple wx gui for GNU Radio applications''' @@ -74,7 +74,7 @@ class stdframe (wx.Frame): def top_block (self): return self.panel.top_block - + class stdpanel (wx.Panel): def __init__ (self, parent, frame, top_block_maker, max_nouts=None): @@ -91,7 +91,7 @@ class stdpanel (wx.Panel): if(max_nouts is not None): self.top_block.start (max_nouts) else: - self.top_block.start () + self.top_block.start () class std_top_block (gr.top_block): def __init__ (self, parent, panel, vbox, argv): diff --git a/gr-wxgui/src/python/waterfall_window.py b/gr-wxgui/src/python/waterfall_window.py index 6536ada10..c78244f04 100644 --- a/gr-wxgui/src/python/waterfall_window.py +++ b/gr-wxgui/src/python/waterfall_window.py @@ -159,7 +159,7 @@ class control_panel(wx.Panel): self.parent[FRAME_RATE_KEY] *= 0.75 if self.parent[FRAME_RATE_KEY] < 1.0: self.parent[FRAME_RATE_KEY] = 1.0 - + if self.parent[FRAME_RATE_KEY] == old_rate: self.parent[DECIMATION_KEY] += 1 def _on_decr_time_scale(self, event): @@ -268,7 +268,7 @@ class waterfall_window(wx.Panel, pubsub.pubsub): #plot the fft self.plotter.set_samples( samples=samples, - minimum=self[REF_LEVEL_KEY] - self[DYNAMIC_RANGE_KEY], + minimum=self[REF_LEVEL_KEY] - self[DYNAMIC_RANGE_KEY], maximum=self[REF_LEVEL_KEY], ) #update the plotter diff --git a/gr-wxgui/src/python/waterfallsink_nongl.py b/gr-wxgui/src/python/waterfallsink_nongl.py index 3c25a9d9f..213415c82 100644 --- a/gr-wxgui/src/python/waterfallsink_nongl.py +++ b/gr-wxgui/src/python/waterfallsink_nongl.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2003,2004,2005,2007,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. -# +# from gnuradio import gr, gru, window from gnuradio.wxgui import stdgui2 @@ -26,7 +26,7 @@ import wx import gnuradio.wxgui.plot as plot import numpy import os -import math +import math default_fftsink_size = (640,240) default_fft_rate = gr.prefs().get_long('wxgui', 'fft_rate', 15) @@ -70,7 +70,7 @@ class waterfall_sink_base(object): def _set_n(self): self.one_in_n.set_n(max(1, int(self.sample_rate/self.fft_size/self.fft_rate))) - + class waterfall_sink_f(gr.hier_block2, waterfall_sink_base): def __init__(self, parent, baseband_freq=0, y_per_div=10, ref_level=50, sample_rate=1, fft_size=512, @@ -85,11 +85,11 @@ class waterfall_sink_f(gr.hier_block2, waterfall_sink_base): sample_rate=sample_rate, fft_size=fft_size, fft_rate=fft_rate, average=average, avg_alpha=avg_alpha, title=title) - + self.s2p = gr.serial_to_parallel(gr.sizeof_float, self.fft_size) self.one_in_n = gr.keep_one_in_n(gr.sizeof_float * self.fft_size, max(1, int(self.sample_rate/self.fft_size/self.fft_rate))) - + mywindow = window.blackmanharris(self.fft_size) self.fft = gr.fft_vfc(self.fft_size, True, mywindow) self.c2mag = gr.complex_to_mag(self.fft_size) @@ -105,7 +105,7 @@ class waterfall_sink_f(gr.hier_block2, waterfall_sink_base): class waterfall_sink_c(gr.hier_block2, waterfall_sink_base): def __init__(self, parent, baseband_freq=0, y_per_div=10, ref_level=50, sample_rate=1, fft_size=512, - fft_rate=default_fft_rate, average=False, avg_alpha=None, + fft_rate=default_fft_rate, average=False, avg_alpha=None, title='', size=default_fftsink_size, **kwargs): gr.hier_block2.__init__(self, "waterfall_sink_f", @@ -120,7 +120,7 @@ class waterfall_sink_c(gr.hier_block2, waterfall_sink_base): self.s2p = gr.serial_to_parallel(gr.sizeof_gr_complex, self.fft_size) self.one_in_n = gr.keep_one_in_n(gr.sizeof_gr_complex * self.fft_size, max(1, int(self.sample_rate/self.fft_size/self.fft_rate))) - + mywindow = window.blackmanharris(self.fft_size) self.fft = gr.fft_vcc(self.fft_size, True, mywindow) self.c2mag = gr.complex_to_mag(self.fft_size) @@ -145,9 +145,9 @@ class DataEvent(wx.PyEvent): self.SetEventType (myDATA_EVENT) self.data = data - def Clone (self): + def Clone (self): self.__class__ (self.GetId()) - + class input_watcher (gru.msgq_runner): def __init__ (self, msgq, fft_size, event_receiver, **kwds): self.fft_size = fft_size @@ -181,7 +181,7 @@ class waterfall_window (wx.Panel): self.bm = wx.EmptyBitmap(self.fftsink.fft_size, 300, -1) self.scale_factor = 5.0 # FIXME should autoscale, or set this - + dc1 = wx.MemoryDC() dc1.SelectObject(self.bm) dc1.Clear() @@ -191,9 +191,9 @@ class waterfall_window (wx.Panel): wx.EVT_PAINT( self, self.OnPaint ) wx.EVT_CLOSE (self, self.on_close_window) EVT_DATA_EVENT (self, self.set_data) - + self.build_popup_menu() - + wx.EVT_CLOSE (self, self.on_close_window) self.Bind(wx.EVT_RIGHT_UP, self.on_right_click) @@ -213,14 +213,14 @@ class waterfall_window (wx.Panel): r.extend(range(0,255,4)) r.extend(self.const_list(255,64)) r.extend(range(255,128,-4)) - + g = [] g.extend(self.const_list(0,32)) g.extend(range(0,255,4)) g.extend(self.const_list(255,64)) g.extend(range(255,0,-4)) g.extend(self.const_list(0,32)) - + b = range(128,255,4) b.extend(self.const_list(255,64)) b.extend(range(255,0,-4)) @@ -234,7 +234,7 @@ class waterfall_window (wx.Panel): colour = wx.Colour(r[i], g[i], b[i]) pens.append( wx.Pen(colour, 2, wx.SOLID)) return pens - + def OnPaint(self, event): dc = wx.PaintDC(self) self.DoDrawing(dc) @@ -243,7 +243,7 @@ class waterfall_window (wx.Panel): if dc is None: dc = wx.ClientDC(self) dc.DrawBitmap(self.bm, 0, 0, False ) - + def const_list(self,const,len): a = [const] @@ -285,18 +285,18 @@ class waterfall_window (wx.Panel): value = int(dB[x_pos] * scale_factor) value = min(255, max(0, value)) dc1.SetPen(self.pens[value]) - dc1.DrawRectangle(x_pos*p_width, 0, p_width, 2) + dc1.DrawRectangle(x_pos*p_width, 0, p_width, 2) else: # complex fft for x_pos in range(0, d_max): # positive freqs value = int(dB[x_pos] * scale_factor) value = min(255, max(0, value)) dc1.SetPen(self.pens[value]) - dc1.DrawRectangle(x_pos*p_width + d_max, 0, p_width, 2) + dc1.DrawRectangle(x_pos*p_width + d_max, 0, p_width, 2) for x_pos in range(0 , d_max): # negative freqs value = int(dB[x_pos+d_max] * scale_factor) value = min(255, max(0, value)) dc1.SetPen(self.pens[value]) - dc1.DrawRectangle(x_pos*p_width, 0, p_width, 2) + dc1.DrawRectangle(x_pos*p_width, 0, p_width, 2) del dc1 self.DoDrawing (None) diff --git a/grc/.gitignore b/grc/.gitignore deleted file mode 100644 index 8e70007d6..000000000 --- a/grc/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/grc.conf -/Makefile -/Makefile.in diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt index 997aa56b1..f54aa4f80 100644 --- a/grc/CMakeLists.txt +++ b/grc/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, @@ -121,5 +121,6 @@ add_subdirectory(grc_gnuradio) add_subdirectory(gui) add_subdirectory(python) add_subdirectory(scripts) +add_subdirectory(examples) endif(ENABLE_GRC) diff --git a/grc/Makefile.am b/grc/Makefile.am deleted file mode 100644 index addefcf36..000000000 --- a/grc/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright 2008-2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -if PYTHON -SUBDIRS = \ - base \ - blocks \ - freedesktop \ - grc_gnuradio \ - gui \ - python \ - scripts - -ourpythondir = $(pkgpythondir)/grc -ourpython_PYTHON = __init__.py - -etcdir = $(gr_prefsdir) -dist_etc_DATA = grc.conf - -EXTRA_DIST += $(srcdir)/grc.conf.in - -BUILT_SOURCES += grc.conf - -grc.conf: $(srcdir)/grc.conf.in Makefile - sed \ - -e 's|@blocksdir[@]|$(grc_blocksdir)|g' \ - $< > $@ - -endif diff --git a/grc/base/.gitignore b/grc/base/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/grc/base/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/grc/base/CMakeLists.txt b/grc/base/CMakeLists.txt index c6d6a09eb..1087e842a 100644 --- a/grc/base/CMakeLists.txt +++ b/grc/base/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/grc/base/Makefile.am b/grc/base/Makefile.am deleted file mode 100644 index 6a95e33b9..000000000 --- a/grc/base/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -# -# 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 $(top_srcdir)/Makefile.common - -ourpythondir = $(pkgpythondir)/grc/base -ourpython_PYTHON = \ - odict.py \ - ParseXML.py \ - Block.py \ - Connection.py \ - Constants.py \ - Element.py \ - FlowGraph.py \ - Param.py \ - Platform.py \ - Port.py \ - __init__.py - -ourdatadir = $(pkgpythondir)/grc/base -dist_ourdata_DATA = \ - block_tree.dtd \ - flow_graph.dtd diff --git a/grc/base/Platform.py b/grc/base/Platform.py index a66c28ab9..94d0077ea 100644 --- a/grc/base/Platform.py +++ b/grc/base/Platform.py @@ -87,7 +87,7 @@ class Platform(_Element): else: self._blocks[key] = block self._blocks_n[key] = n - except ParseXML.XMLSyntaxError, e: + except ParseXML.XMLSyntaxError, e: try: #try to add the xml file as a block tree ParseXML.validate_dtd(xml_file, BLOCK_TREE_DTD) self._block_tree_files.append(xml_file) diff --git a/grc/base/block_tree.dtd b/grc/base/block_tree.dtd index be1524a38..7d4a13ccc 100644 --- a/grc/base/block_tree.dtd +++ b/grc/base/block_tree.dtd @@ -1,4 +1,4 @@ -<!-- +<!-- Copyright 2008 Free Software Foundation, Inc. This file is part of GNU Radio @@ -14,10 +14,10 @@ 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 +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA --> <!-- - block_tree.dtd + block_tree.dtd Josh Blum The document type definition for a block tree category listing. --> diff --git a/grc/base/flow_graph.dtd b/grc/base/flow_graph.dtd index 904147b37..74f48f10a 100644 --- a/grc/base/flow_graph.dtd +++ b/grc/base/flow_graph.dtd @@ -1,4 +1,4 @@ -<!-- +<!-- Copyright 2008 Free Software Foundation, Inc. This file is part of GNU Radio @@ -14,10 +14,10 @@ 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 +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA --> <!-- - flow_graph.dtd + flow_graph.dtd Josh Blum The document type definition for flow graph xml files. --> diff --git a/grc/blocks/.gitignore b/grc/blocks/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/grc/blocks/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/grc/blocks/CMakeLists.txt b/grc/blocks/CMakeLists.txt index ad31b0975..fce4a1907 100644 --- a/grc/blocks/CMakeLists.txt +++ b/grc/blocks/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/grc/blocks/Makefile.am b/grc/blocks/Makefile.am deleted file mode 100644 index 37f493ce5..000000000 --- a/grc/blocks/Makefile.am +++ /dev/null @@ -1,200 +0,0 @@ -# -# Copyright 2008-2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -ourdatadir = $(grc_blocksdir) -dist_ourdata_DATA = \ - block_tree.xml \ - band_pass_filter.xml \ - band_reject_filter.xml \ - blks2_am_demod_cf.xml \ - blks2_analysis_filterbank.xml \ - blks2_error_rate.xml \ - blks2_fm_deemph.xml \ - blks2_fm_demod_cf.xml \ - blks2_fm_preemph.xml \ - blks2_logpwrfft_x.xml \ - blks2_nbfm_rx.xml \ - blks2_nbfm_tx.xml \ - blks2_packet_decoder.xml \ - blks2_packet_encoder.xml \ - blks2_pfb_arb_resampler.xml \ - blks2_pfb_channelizer.xml \ - blks2_rational_resampler_xxx.xml \ - blks2_selector.xml \ - blks2_standard_squelch.xml \ - blks2_stream_to_vector_decimator.xml \ - blks2_synthesis_filterbank.xml \ - blks2_tcp_sink.xml \ - blks2_tcp_source.xml \ - blks2_valve.xml \ - blks2_wfm_rcv.xml \ - blks2_wfm_rcv_pll.xml \ - blks2_wfm_tx.xml \ - const_source_x.xml \ - gr_add_const_vxx.xml \ - gr_add_xx.xml \ - gr_additive_scrambler_bb.xml \ - gr_agc2_xx.xml \ - gr_agc_xx.xml \ - gr_and_xx.xml \ - gr_and_const_xx.xml \ - gr_argmax_xx.xml \ - gr_channel_model.xml \ - gr_char_to_float.xml \ - gr_char_to_short.xml \ - gr_chunks_to_symbols.xml \ - gr_complex_to_arg.xml \ - gr_complex_to_float.xml \ - gr_complex_to_imag.xml \ - gr_complex_to_interleaved_short.xml \ - gr_complex_to_mag.xml \ - gr_complex_to_mag_squared.xml \ - gr_complex_to_real.xml \ - gr_conjugate_cc.xml \ - gr_copy.xml \ - gr_cpfsk_bc.xml \ - gr_ctcss_squelch_ff.xml \ - gr_dc_blocker.xml \ - gr_decode_ccsds_27_fb.xml \ - gr_deinterleave.xml \ - gr_delay.xml \ - gr_descrambler_bb.xml \ - gr_diff_decoder_bb.xml \ - gr_diff_encoder_bb.xml \ - gr_diff_phasor_cc.xml \ - gr_divide_xx.xml \ - gr_dpll_bb.xml \ - gr_encode_ccsds_27_bb.xml \ - gr_feedforward_agc_cc.xml \ - gr_fft_filter_xxx.xml \ - gr_fft_vxx.xml \ - gr_file_sink.xml \ - gr_file_source.xml \ - gr_filter_delay_fc.xml \ - gr_fir_filter_xxx.xml \ - gr_float_to_char.xml \ - gr_float_to_complex.xml \ - gr_float_to_int.xml \ - gr_float_to_short.xml \ - gr_float_to_uchar.xml \ - gr_fractional_interpolator_xx.xml \ - gr_freq_xlating_fir_filter_xxx.xml \ - gr_frequency_modulator_fc.xml \ - gr_glfsr_source_x.xml \ - gr_goertzel_fc.xml \ - gr_head.xml \ - gr_hilbert_fc.xml \ - gr_iir_filter_ffd.xml \ - gr_int_to_float.xml \ - gr_integrate_xx.xml \ - gr_interleave.xml \ - gr_interleaved_short_to_complex.xml \ - gr_interp_fir_filter_xxx.xml \ - gr_iqcomp_cc.xml \ - gr_keep_one_in_n.xml \ - gr_kludge_copy.xml \ - gr_map_bb.xml \ - gr_max_xx.xml \ - gr_message_sink.xml \ - gr_message_source.xml \ - gr_moving_average_xx.xml \ - gr_mpsk_sync_cc.xml \ - gr_multiply_const_vxx.xml \ - gr_multiply_xx.xml \ - gr_mute_xx.xml \ - gr_nlog10_ff.xml \ - gr_noise_source_x.xml \ - gr_nop.xml \ - gr_not_xx.xml \ - gr_null_sink.xml \ - gr_null_source.xml \ - gr_or_xx.xml \ - gr_packed_to_unpacked_xx.xml \ - gr_peak_detector2_fb.xml \ - gr_peak_detector_xb.xml \ - gr_pfb_clock_sync.xml \ - gr_pfb_synthesis_filterbank.xml \ - gr_phase_modulator_fc.xml \ - gr_pll_carriertracking_cc.xml \ - gr_pll_freqdet_cf.xml \ - gr_pll_refout_cc.xml \ - gr_pn_correlator_cc.xml \ - gr_probe_avg_mag_sqrd_x.xml \ - gr_probe_density_b.xml \ - gr_probe_mpsk_snr_c.xml \ - gr_probe_signal_f.xml \ - gr_pwr_squelch_xx.xml \ - gr_quadrature_demod_cf.xml \ - gr_rational_resampler_base_xxx.xml \ - gr_repeat.xml \ - gr_rms_xx.xml \ - gr_sample_and_hold_xx.xml \ - gr_scrambler_bb.xml \ - gr_short_to_float.xml \ - gr_short_to_char.xml \ - gr_sig_source_x.xml \ - gr_simple_correlator.xml \ - gr_simple_framer.xml \ - gr_simple_squelch_cc.xml \ - gr_single_pole_iir_filter_xx.xml \ - gr_skiphead.xml \ - gr_stream_mux.xml \ - gr_stream_to_streams.xml \ - gr_stream_to_vector.xml \ - gr_streams_to_stream.xml \ - gr_streams_to_vector.xml \ - gr_burst_tagger.xml \ - gr_sub_xx.xml \ - gr_threshold_ff.xml \ - gr_throttle.xml \ - gr_transcendental.xml \ - gr_uchar_to_float.xml \ - gr_udp_sink.xml \ - gr_udp_source.xml \ - gr_unpack_k_bits_bb.xml \ - gr_unpacked_to_packed_xx.xml \ - gr_vco_f.xml \ - gr_vector_sink_x.xml \ - gr_vector_source_x.xml \ - gr_vector_to_stream.xml \ - gr_vector_to_streams.xml \ - gr_wavfile_sink.xml \ - gr_wavfile_source.xml \ - gr_xor_xx.xml \ - high_pass_filter.xml \ - import.xml \ - low_pass_filter.xml \ - note.xml \ - options.xml \ - pad_sink.xml \ - pad_source.xml \ - parameter.xml \ - random_source_x.xml \ - root_raised_cosine_filter.xml \ - variable.xml \ - variable_config.xml \ - variable_function_probe.xml \ - virtual_sink.xml \ - virtual_source.xml \ - xmlrpc_client.xml \ - xmlrpc_server.xml diff --git a/grc/blocks/blks2_pfb_arb_resampler.xml b/grc/blocks/blks2_pfb_arb_resampler.xml index b4e09791f..b58e70f1c 100644 --- a/grc/blocks/blks2_pfb_arb_resampler.xml +++ b/grc/blocks/blks2_pfb_arb_resampler.xml @@ -14,7 +14,7 @@ $taps, $size, )</make> - <!-- Set taps not implemented yet + <!-- Set taps not implemented yet <callback>set_taps($taps)</callback> --> <callback>set_rate($rate)</callback> diff --git a/grc/blocks/blks2_pfb_channelizer.xml b/grc/blocks/blks2_pfb_channelizer.xml index aee9dd512..5a93c0866 100644 --- a/grc/blocks/blks2_pfb_channelizer.xml +++ b/grc/blocks/blks2_pfb_channelizer.xml @@ -14,10 +14,13 @@ $taps, $osr, $atten) +self.$(id).set_channel_map($ch_map) </make> - <!-- Set taps not implemented yet + <!-- Set taps not implemented yet <callback>set_taps($taps)</callback> --> + <callback>set_channel_map($ch_map)</callback> + <param> <name>Channels</name> <key>nchans</key> @@ -41,6 +44,12 @@ <value>100</value> <type>real</type> </param> + <param> + <name>Channel Map</name> + <key>ch_map</key> + <value>[]</value> + <type>int_vector</type> + </param> <sink> <name>in</name> <type>complex</type> diff --git a/grc/blocks/block_tree.xml b/grc/blocks/block_tree.xml index 42187585e..18bc050ba 100644 --- a/grc/blocks/block_tree.xml +++ b/grc/blocks/block_tree.xml @@ -174,7 +174,7 @@ <!-- Polyphase filters --> <block>blks2_pfb_arb_resampler_ccf</block> <block>blks2_pfb_channelizer_ccf</block> - <block>gr_pfb_synthesis_filterbank_ccf</block> + <block>gr_pfb_synthesizer_ccf</block> <!-- Other filters --> <block>gr_single_pole_iir_filter_xx</block> <block>gr_hilbert_fc</block> @@ -231,7 +231,6 @@ <name>Probes</name> <block>gr_probe_avg_mag_sqrd_x</block> <block>gr_probe_density_b</block> - <block>gr_probe_mpsk_snr_c</block> <block>gr_probe_signal_f</block> </cat> <cat> diff --git a/grc/blocks/gr_pfb_synthesis_filterbank.xml b/grc/blocks/gr_pfb_synthesizer.xml index a8b944c6a..49e5cb032 100644 --- a/grc/blocks/gr_pfb_synthesis_filterbank.xml +++ b/grc/blocks/gr_pfb_synthesizer.xml @@ -5,14 +5,16 @@ ################################################### --> <block> - <name>Polyphase Synthesis Filterbank</name> - <key>gr_pfb_synthesis_filterbank_ccf</key> + <name>Polyphase Synthesizer</name> + <key>gr_pfb_synthesizer_ccf</key> <import>from gnuradio import gr</import> <import>from gnuradio.gr import firdes</import> - <make>gr.pfb_synthesis_filterbank_ccf( - $numchans, $taps) + <make>gr.pfb_synthesizer_ccf( + $numchans, $taps, $twox) +self.$(id).set_channel_map($ch_map) </make> <callback>set_taps($taps)</callback> + <callback>set_channel_map($ch_map)</callback> <param> <name>Channels</name> @@ -31,6 +33,18 @@ <key>taps</key> <type>real_vector</type> </param> + <param> + <name>2x Sample Rate</name> + <key>twox</key> + <value>False</value> + <type>bool</type> + </param> + <param> + <name>Channel Map</name> + <key>ch_map</key> + <value>[]</value> + <type>int_vector</type> + </param> <sink> <name>in</name> <type>complex</type> diff --git a/grc/blocks/gr_probe_mpsk_snr_c.xml b/grc/blocks/gr_probe_mpsk_snr_c.xml deleted file mode 100644 index 5687e867d..000000000 --- a/grc/blocks/gr_probe_mpsk_snr_c.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Probe MPSK SNR -################################################### - --> -<block> - <name>Probe MPSK SNR</name> - <key>gr_probe_mpsk_snr_c</key> - <import>from gnuradio import gr</import> - <make>gr.probe_mpsk_snr_c($alpha)</make> - <callback>set_alpha($alpha)</callback> - <param> - <name>Alpha</name> - <key>alpha</key> - <value>1</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <doc> -Available functions to probe: signal_mean(), noise_variance() - -Use with the function probe block. - </doc> -</block> diff --git a/gr-audio/Makefile.am b/grc/examples/CMakeLists.txt index da4106c23..a218dbe50 100644 --- a/gr-audio/Makefile.am +++ b/grc/examples/CMakeLists.txt @@ -1,31 +1,37 @@ -# # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = include lib examples doc -if PYTHON -SUBDIRS += grc swig -endif +# SIMPLE +install( + FILES + simple/variable_config.grc + DESTINATION ${GR_PKG_DATA_DIR}/examples/grc/simple + COMPONENT "grc" +) -pkgconfigdir = $(libdir)/pkgconfig -dist_pkgconfig_DATA = gnuradio-audio.pc +# XMLRPC +install( + FILES + xmlrpc/readme.txt + xmlrpc/xmlrpc_client.grc + xmlrpc/xmlrpc_client_script.py + xmlrpc/xmlrpc_server.grc + DESTINATION ${GR_PKG_DATA_DIR}/examples/grc/xmlrpc + COMPONENT "grc" +) diff --git a/gnuradio-examples/grc/simple/variable_config.grc b/grc/examples/simple/variable_config.grc index 95c287cce..95c287cce 100644 --- a/gnuradio-examples/grc/simple/variable_config.grc +++ b/grc/examples/simple/variable_config.grc diff --git a/gnuradio-examples/grc/xmlrpc/readme.txt b/grc/examples/xmlrpc/readme.txt index c1f87c1cb..056ad1e82 100644 --- a/gnuradio-examples/grc/xmlrpc/readme.txt +++ b/grc/examples/xmlrpc/readme.txt @@ -2,12 +2,12 @@ # XMLRPC example ################################################## -XMLRPC allows software to make remote function calls over http. +XMLRPC allows software to make remote function calls over http. In the case of GRC, one can use XMLRPC to modify variables in a running flow graph. See http://www.xmlrpc.com/ --- Server Example --- -Place an "XMLRPC Server" block inside of any flow graph. +Place an "XMLRPC Server" block inside of any flow graph. The server will provide set functions for every variable in the flow graph. If a variable is called "freq", the server will provide a function set_freq(new_freq). Run the server example and experiment with the example client script. diff --git a/gnuradio-examples/grc/xmlrpc/xmlrpc_client.grc b/grc/examples/xmlrpc/xmlrpc_client.grc index 3bb4e7ed3..3bb4e7ed3 100644 --- a/gnuradio-examples/grc/xmlrpc/xmlrpc_client.grc +++ b/grc/examples/xmlrpc/xmlrpc_client.grc diff --git a/gnuradio-examples/grc/xmlrpc/xmlrpc_client_script.py b/grc/examples/xmlrpc/xmlrpc_client_script.py index 956fa07fb..8f00fa55d 100644 --- a/gnuradio-examples/grc/xmlrpc/xmlrpc_client_script.py +++ b/grc/examples/xmlrpc/xmlrpc_client_script.py @@ -13,7 +13,7 @@ for i in range(10): new_freq = random.uniform(0, 5000) new_ampl = random.uniform(0, 2) new_offset = random.uniform(-1, 1) - #set new values + #set new values time.sleep(1) s.set_freq(new_freq) time.sleep(1) diff --git a/gnuradio-examples/grc/xmlrpc/xmlrpc_server.grc b/grc/examples/xmlrpc/xmlrpc_server.grc index dc539ef1b..dc539ef1b 100644 --- a/gnuradio-examples/grc/xmlrpc/xmlrpc_server.grc +++ b/grc/examples/xmlrpc/xmlrpc_server.grc diff --git a/grc/freedesktop/.gitignore b/grc/freedesktop/.gitignore deleted file mode 100644 index ff07a101f..000000000 --- a/grc/freedesktop/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/grc_setup_freedesktop -/Makefile -/Makefile.in diff --git a/grc/freedesktop/CMakeLists.txt b/grc/freedesktop/CMakeLists.txt index 492b0f7d8..d95fe04ac 100644 --- a/grc/freedesktop/CMakeLists.txt +++ b/grc/freedesktop/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011-2012 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/grc/freedesktop/Makefile.am b/grc/freedesktop/Makefile.am deleted file mode 100644 index f89a344f7..000000000 --- a/grc/freedesktop/Makefile.am +++ /dev/null @@ -1,55 +0,0 @@ -# -# Copyright 2008-2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -ourdatadir = $(pkgdatadir)/grc/freedesktop -dist_ourdata_DATA = \ - grc-icon-256.png \ - grc-icon-128.png \ - grc-icon-64.png \ - grc-icon-48.png \ - grc-icon-32.png \ - gnuradio-grc.xml \ - gnuradio-grc.desktop - -pkglibexecdir = $(libexecdir)/$(PACKAGE) -dist_pkglibexec_SCRIPTS = grc_setup_freedesktop - -grc_setup_freedesktop: $(srcdir)/grc_setup_freedesktop.in Makefile - sed -e 's|@SRCDIR[@]|$(ourdatadir)|g' $< > $@ - -EXTRA_DIST += $(srcdir)/grc_setup_freedesktop.in -BUILT_SOURCES += grc_setup_freedesktop - -if XDG_UTILS -install-data-hook: - @printf "\n*** GRC Post-Install Message ***\ - \nTo install icons, mime type, and menu items\ - \nfor a freedesktop.org system (Gnome/KDE/Xfce):\ - \n >>> sudo $(pkglibexecdir)/grc_setup_freedesktop install\n\n" - -uninstall-hook: - @printf "\n*** GRC Post-Uninstall Message ***\ - \nTo uninstall icons, mime type, and menu items\ - \nfor a freedesktop.org system (Gnome/KDE/Xfce):\ - \n >>> sudo $(pkglibexecdir)/grc_setup_freedesktop uninstall\n\n" -endif diff --git a/grc/grc_gnuradio/.gitignore b/grc/grc_gnuradio/.gitignore deleted file mode 100644 index 908cf90b8..000000000 --- a/grc/grc_gnuradio/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -/Constants.py diff --git a/grc/grc_gnuradio/Makefile.am b/grc/grc_gnuradio/Makefile.am deleted file mode 100644 index af1d86be9..000000000 --- a/grc/grc_gnuradio/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -# -# Copyright 2008-2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -grc_gnuradio_prefix = $(pythondir)/grc_gnuradio - -root_pythondir = $(grc_gnuradio_prefix) -root_python_PYTHON = __init__.py - -blks2_pythondir = $(grc_gnuradio_prefix)/blks2 -blks2_python_PYTHON = \ - blks2/__init__.py \ - blks2/error_rate.py \ - blks2/packet.py \ - blks2/selector.py \ - blks2/tcp.py diff --git a/grc/gui/.gitignore b/grc/gui/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/grc/gui/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py index 15785f2ee..476c82b4f 100644 --- a/grc/gui/ActionHandler.py +++ b/grc/gui/ActionHandler.py @@ -18,7 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA """ import os -import signal +import signal from Constants import IMAGE_FILE_EXTENSION import Actions import pygtk diff --git a/grc/gui/BlockTreeWindow.py b/grc/gui/BlockTreeWindow.py index c12120eaf..0175c8bec 100644 --- a/grc/gui/BlockTreeWindow.py +++ b/grc/gui/BlockTreeWindow.py @@ -67,7 +67,7 @@ class BlockTreeWindow(gtk.VBox): #setup the search self.treeview.set_enable_search(True) self.treeview.set_search_equal_func(self._handle_search) - #try to enable the tooltips (available in pygtk 2.12 and above) + #try to enable the tooltips (available in pygtk 2.12 and above) try: self.treeview.set_tooltip_column(DOC_INDEX) except: pass #setup drag and drop diff --git a/grc/gui/Makefile.am b/grc/gui/Makefile.am deleted file mode 100644 index a73b6855d..000000000 --- a/grc/gui/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -# -# 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 $(top_srcdir)/Makefile.common - -ourpythondir = $(pkgpythondir)/grc/gui -ourpython_PYTHON = \ - Block.py \ - Colors.py \ - Constants.py \ - Connection.py \ - Element.py \ - FlowGraph.py \ - Param.py \ - Platform.py \ - Port.py \ - Utils.py \ - ActionHandler.py \ - Actions.py \ - Bars.py \ - BlockTreeWindow.py \ - Dialogs.py \ - DrawingArea.py \ - FileDialogs.py \ - MainWindow.py \ - Messages.py \ - NotebookPage.py \ - PropsDialog.py \ - Preferences.py \ - StateCache.py \ - __init__.py diff --git a/grc/python/.gitignore b/grc/python/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/grc/python/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/grc/python/CMakeLists.txt b/grc/python/CMakeLists.txt index 0871c7bd1..4832dd897 100644 --- a/grc/python/CMakeLists.txt +++ b/grc/python/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/grc/python/Makefile.am b/grc/python/Makefile.am deleted file mode 100644 index eb35b6fc1..000000000 --- a/grc/python/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -# -# 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 $(top_srcdir)/Makefile.common - -ourpythondir = $(pkgpythondir)/grc/python -ourpython_PYTHON = \ - convert_hier.py \ - expr_utils.py \ - extract_docs.py \ - Block.py \ - Connection.py \ - Constants.py \ - FlowGraph.py \ - Generator.py \ - Param.py \ - Platform.py \ - Port.py \ - __init__.py - -ourdatadir = $(pkgpythondir)/grc/python -dist_ourdata_DATA = \ - block.dtd \ - default_flow_graph.grc \ - flow_graph.tmpl diff --git a/grc/python/Param.py b/grc/python/Param.py index 2a7258dc7..2caca4802 100644 --- a/grc/python/Param.py +++ b/grc/python/Param.py @@ -335,7 +335,7 @@ class Param(_Param, _GUIParam): # Stream ID Type ######################### elif t == 'stream_id': - #get a list of all stream ids used in the virtual sinks + #get a list of all stream ids used in the virtual sinks ids = [param.get_value() for param in filter( lambda p: p.get_parent().is_virtual_sink(), self.get_all_params(t), diff --git a/grc/python/Port.py b/grc/python/Port.py index c2bfd9ccc..d0ef51b48 100644 --- a/grc/python/Port.py +++ b/grc/python/Port.py @@ -1,5 +1,5 @@ """ -Copyright 2008-2011 Free Software Foundation, Inc. +Copyright 2008-2012 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion is free software; you can redistribute it and/or @@ -24,7 +24,7 @@ import Constants def _get_source_from_virtual_sink_port(vsp): """ Resolve the source port that is connected to the given virtual sink port. - Use the get source from virtual source to recursively resolve subsequent ports. + Use the get source from virtual source to recursively resolve subsequent ports. """ try: return _get_source_from_virtual_source_port( vsp.get_enabled_connections()[0].get_source()) @@ -50,6 +50,35 @@ def _get_source_from_virtual_source_port(vsp, traversed=[]): ) except: raise Exception, 'Could not resolve source for virtual source port %s'%vsp +def _get_sink_from_virtual_source_port(vsp): + """ + Resolve the sink port that is connected to the given virtual source port. + Use the get sink from virtual sink to recursively resolve subsequent ports. + """ + try: return _get_sink_from_virtual_sink_port( + vsp.get_enabled_connections()[0].get_sink()) # Could have many connections, but use first + except: raise Exception, 'Could not resolve source for virtual source port %s'%vsp + +def _get_sink_from_virtual_sink_port(vsp, traversed=[]): + """ + Recursively resolve sink ports over the virtual connections. + Keep track of traversed sinks to avoid recursive loops. + """ + if not vsp.get_parent().is_virtual_sink(): return vsp + if vsp in traversed: raise Exception, 'Loop found when resolving virtual sink %s'%vsp + try: return _get_sink_from_virtual_sink_port( + _get_sink_from_virtual_source_port( + filter(#get all virtual source with a matching stream id + lambda vs: vs.get_param('stream_id').get_value() == vsp.get_parent().get_param('stream_id').get_value(), + filter(#get all enabled blocks that are also virtual sinks + lambda b: b.is_virtual_source(), + vsp.get_parent().get_parent().get_enabled_blocks(), + ), + )[0].get_sources()[0] + ), traversed + [vsp], + ) + except: raise Exception, 'Could not resolve source for virtual sink port %s'%vsp + class Port(_Port, _GUIPort): def __init__(self, block, n, dir): @@ -81,6 +110,8 @@ class Port(_Port, _GUIPort): def get_types(self): return Constants.TYPE_TO_SIZEOF.keys() + def is_type_empty(self): return not self._n['type'] + def validate(self): _Port.validate(self) if not self.get_enabled_connections() and not self.get_optional(): @@ -99,18 +130,30 @@ class Port(_Port, _GUIPort): Handle the port cloning for virtual blocks. """ _Port.rewrite(self) - if self.get_parent().is_virtual_sink() or self.get_parent().is_virtual_source(): + if self.is_type_empty(): try: #clone type and vlen - source = self.resolve_virtual_source() + source = self.resolve_empty_type() self._type = str(source.get_type()) self._vlen = str(source.get_vlen()) except: #reset type and vlen self._type = '' self._vlen = '' - def resolve_virtual_source(self): - if self.get_parent().is_virtual_sink(): return _get_source_from_virtual_sink_port(self) - if self.get_parent().is_virtual_source(): return _get_source_from_virtual_source_port(self) + def resolve_empty_type(self): + if self.is_sink(): + try: + src = _get_source_from_virtual_sink_port(self) + if not src.is_type_empty(): return src + except: pass + sink = _get_sink_from_virtual_sink_port(self) + if not sink.is_type_empty(): return sink + if self.is_source(): + try: + src = _get_source_from_virtual_source_port(self) + if not src.is_type_empty(): return src + except: pass + sink = _get_sink_from_virtual_source_port(self) + if not sink.is_type_empty(): return sink def get_vlen(self): """ diff --git a/grc/scripts/.gitignore b/grc/scripts/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/grc/scripts/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/grc/scripts/CMakeLists.txt b/grc/scripts/CMakeLists.txt index b8d5330f6..e90589230 100644 --- a/grc/scripts/CMakeLists.txt +++ b/grc/scripts/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/grc/scripts/Makefile.am b/grc/scripts/Makefile.am deleted file mode 100644 index 84e2759dc..000000000 --- a/grc/scripts/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright 2008-2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -dist_bin_SCRIPTS = gnuradio-companion diff --git a/grc/todo.txt b/grc/todo.txt index ccfaad72a..1205b3ff6 100644 --- a/grc/todo.txt +++ b/grc/todo.txt @@ -12,7 +12,7 @@ * packet mod: whitening offset * wx min window size in options block * gr_adaptive_fir_ccf -* ofdm +* ofdm * gr_ofdm_bpsk_demapper * gr_ofdm_demapper_vcb * gr_ofdm_frame_sink diff --git a/gruel/.gitignore b/gruel/.gitignore deleted file mode 100644 index ede973f11..000000000 --- a/gruel/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -/gruel.pc diff --git a/gruel/CMakeLists.txt b/gruel/CMakeLists.txt index 5fdc2b218..3e8c5166e 100644 --- a/gruel/CMakeLists.txt +++ b/gruel/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2010-2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, @@ -81,7 +81,6 @@ CPACK_COMPONENT("gruel_swig" # Add subdirectories ######################################################################## add_subdirectory(src/include/gruel) -add_subdirectory(src/scheme/gnuradio) add_subdirectory(src/lib) if(ENABLE_PYTHON) add_subdirectory(src/swig) diff --git a/gruel/Makefile.am b/gruel/Makefile.am deleted file mode 100644 index c43e461f2..000000000 --- a/gruel/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -# -# Copyright 2008,2010 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 - -EXTRA_DIST += \ - gruel.pc.in - -SUBDIRS = src - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = gruel.pc diff --git a/gruel/README b/gruel/README index 647dc843b..90dc4eeb4 100644 --- a/gruel/README +++ b/gruel/README @@ -1,23 +1,23 @@ # # 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. -# +# The GNU Radio Utility Etcetera Library, a collection of low-level routines to avoid dependencies on the full GNU Radio core or other libraries. diff --git a/gruel/gruel.pc.in b/gruel/gruel.pc.in index 504c4d949..7f3f821fe 100644 --- a/gruel/gruel.pc.in +++ b/gruel/gruel.pc.in @@ -5,7 +5,7 @@ includedir=@includedir@ Name: gruel Description: The GNU Radio Utility Etcetera Library -Requires: +Requires: Version: @LIBVER@ Libs: -L${libdir} -lgruel Cflags: -I${includedir} diff --git a/gruel/src/.gitignore b/gruel/src/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gruel/src/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gruel/src/Makefile.am b/gruel/src/Makefile.am deleted file mode 100644 index 93b17d6db..000000000 --- a/gruel/src/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -# -# 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. -# - -SUBDIRS = lib include scheme - -if PYTHON - -SUBDIRS += . swig python - -endif - diff --git a/gruel/src/include/.gitignore b/gruel/src/include/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/gruel/src/include/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/gruel/src/include/Makefile.am b/gruel/src/include/Makefile.am deleted file mode 100644 index 7a178810a..000000000 --- a/gruel/src/include/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -# -# 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. -# - -SUBDIRS = gruel diff --git a/gruel/src/include/gruel/.gitignore b/gruel/src/include/gruel/.gitignore deleted file mode 100644 index bbe96391c..000000000 --- a/gruel/src/include/gruel/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/Makefile -/Makefile.in -/inet.h -/pmt_serial_tags.h diff --git a/gruel/src/include/gruel/CMakeLists.txt b/gruel/src/include/gruel/CMakeLists.txt index 9db810cae..9818f1c09 100644 --- a/gruel/src/include/gruel/CMakeLists.txt +++ b/gruel/src/include/gruel/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2010-2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gruel/src/include/gruel/Makefile.am b/gruel/src/include/gruel/Makefile.am deleted file mode 100644 index fce739f08..000000000 --- a/gruel/src/include/gruel/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright 2008-2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -EXTRA_DIST += inet.h.in - -gruelincludedir = $(prefix)/include/gruel - -gruelinclude_HEADERS = \ - api.h \ - attributes.h \ - high_res_timer.h \ - inet.h \ - msg_accepter.h \ - msg_accepter_msgq.h \ - msg_queue.h \ - msg_passing.h \ - pmt.h \ - pmt_pool.h \ - pmt_serial_tags.h \ - pmt_sugar.h \ - realtime.h \ - sys_pri.h \ - thread_body_wrapper.h \ - thread_group.h \ - thread.h diff --git a/gruel/src/include/gruel/high_res_timer.h b/gruel/src/include/gruel/high_res_timer.h index 63841f612..a885520b6 100644 --- a/gruel/src/include/gruel/high_res_timer.h +++ b/gruel/src/include/gruel/high_res_timer.h @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/gruel/src/include/gruel/inet.h.in b/gruel/src/include/gruel/inet.h.in index 8545aeea9..74f14bd92 100644 --- a/gruel/src/include/gruel/inet.h.in +++ b/gruel/src/include/gruel/inet.h.in @@ -47,7 +47,7 @@ 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 */ +#endif /* missing htonll or ntohll */ #if @GR_HAVE_ARPA_INET@ /* GR_HAVE_ARPA_INET */ #include <arpa/inet.h> diff --git a/gruel/src/include/gruel/msg_accepter.h b/gruel/src/include/gruel/msg_accepter.h index 3dfc8bcf8..2dc1a6859 100644 --- a/gruel/src/include/gruel/msg_accepter.h +++ b/gruel/src/include/gruel/msg_accepter.h @@ -1,19 +1,19 @@ /* -*- 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. diff --git a/gruel/src/include/gruel/msg_accepter_msgq.h b/gruel/src/include/gruel/msg_accepter_msgq.h index 22a1855cf..6b9bcf4db 100644 --- a/gruel/src/include/gruel/msg_accepter_msgq.h +++ b/gruel/src/include/gruel/msg_accepter_msgq.h @@ -1,19 +1,19 @@ /* -*- 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. @@ -35,7 +35,7 @@ namespace gruel { { protected: msg_queue_sptr d_msg_queue; - + public: msg_accepter_msgq(msg_queue_sptr msgq); ~msg_accepter_msgq(); diff --git a/gruel/src/include/gruel/msg_passing.h b/gruel/src/include/gruel/msg_passing.h index 51268967a..0cc0cd111 100644 --- a/gruel/src/include/gruel/msg_passing.h +++ b/gruel/src/include/gruel/msg_passing.h @@ -1,19 +1,19 @@ /* -*- 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. diff --git a/gruel/src/include/gruel/msg_queue.h b/gruel/src/include/gruel/msg_queue.h index 8608842da..f038ca325 100644 --- a/gruel/src/include/gruel/msg_queue.h +++ b/gruel/src/include/gruel/msg_queue.h @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -63,22 +63,22 @@ namespace gruel { * Block if no message is available. */ pmt::pmt_t delete_head(); - + /*! * \brief If there's a message in the q, delete it and return it. * If no message is available, return pmt_t(). */ pmt::pmt_t delete_head_nowait(); - + //! Delete all messages from the queue void flush(); //! is the queue empty? bool empty_p() const { return d_msgs.empty(); } - + //! is the queue full? bool full_p() const { return d_limit != 0 && count() >= d_limit; } - + //! return number of messages in queue unsigned int count() const { return d_msgs.size(); } diff --git a/gruel/src/include/gruel/pmt.h b/gruel/src/include/gruel/pmt.h index f904d37e1..92af1eba6 100644 --- a/gruel/src/include/gruel/pmt.h +++ b/gruel/src/include/gruel/pmt.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2009,2010 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, @@ -52,7 +52,7 @@ namespace pmt { * \brief base class of all pmt types */ class pmt_base; - + /*! * \brief typedef for shared pointer (transparent reference counting). * See http://www.boost.org/libs/smart_ptr/smart_ptr.htm @@ -109,7 +109,7 @@ GRUEL_API bool pmt_is_false(pmt_t obj); //! Return \#f is val is false, else return \#t. GRUEL_API pmt_t pmt_from_bool(bool val); -//! Return true if val is PMT_T, return false when val is PMT_F, +//! Return true if val is PMT_T, return false when val is PMT_F, // else raise wrong_type exception. GRUEL_API bool pmt_to_bool(pmt_t val); @@ -384,7 +384,7 @@ GRUEL_API size_t pmt_blob_length(pmt_t blob); */ //! true if \p x is any kind of uniform numeric vector -GRUEL_API bool pmt_is_uniform_vector(pmt_t x); +GRUEL_API bool pmt_is_uniform_vector(pmt_t x); GRUEL_API bool pmt_is_u8vector(pmt_t x); GRUEL_API bool pmt_is_s8vector(pmt_t x); @@ -584,7 +584,7 @@ GRUEL_API bool pmt_eqv(const pmt_t& x, const pmt_t& y); /*! * pmt_equal recursively compares the contents of pairs and vectors, - * applying pmt_eqv on other objects such as numbers and symbols. + * applying pmt_eqv on other objects such as numbers and symbols. * pmt_equal may fail to terminate if its arguments are circular data * structures. */ diff --git a/gruel/src/include/gruel/pmt_pool.h b/gruel/src/include/gruel/pmt_pool.h index 2b227ce6a..93c5290ad 100644 --- a/gruel/src/include/gruel/pmt_pool.h +++ b/gruel/src/include/gruel/pmt_pool.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,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. @@ -39,11 +39,11 @@ class GRUEL_API pmt_pool { struct GRUEL_API item { struct item *d_next; }; - + typedef boost::unique_lock<boost::mutex> scoped_lock; mutable boost::mutex d_mutex; boost::condition_variable d_cond; - + size_t d_itemsize; size_t d_alignment; size_t d_allocation_size; diff --git a/gruel/src/include/gruel/pmt_sugar.h b/gruel/src/include/gruel/pmt_sugar.h index 92bcb5fe5..1d2b38ff1 100644 --- a/gruel/src/include/gruel/pmt_sugar.h +++ b/gruel/src/include/gruel/pmt_sugar.h @@ -1,19 +1,19 @@ /* -*- 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. @@ -59,7 +59,7 @@ namespace pmt { mp(double x){ return pmt_from_double(x); } - + //! Make pmt complex static inline pmt_t mp(std::complex<double> z) diff --git a/gruel/src/include/gruel/realtime.h b/gruel/src/include/gruel/realtime.h index 87f2b0f74..13673ecb3 100644 --- a/gruel/src/include/gruel/realtime.h +++ b/gruel/src/include/gruel/realtime.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,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, @@ -86,7 +86,7 @@ namespace gruel { * it's possible to hang the system. */ - // NOTE: If you change this, you need to change the code in + // NOTE: If you change this, you need to change the code in // gnuradio-core/src/lib/runtime/gr_realtime.i, see note there. rt_status_t GRUEL_API enable_realtime_scheduling(rt_sched_param = rt_sched_param()); diff --git a/gruel/src/include/gruel/sys_pri.h b/gruel/src/include/gruel/sys_pri.h index a29b051bf..c0751e52c 100644 --- a/gruel/src/include/gruel/sys_pri.h +++ b/gruel/src/include/gruel/sys_pri.h @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/gruel/src/include/gruel/thread.h b/gruel/src/include/gruel/thread.h index c6031d88d..63143c8b4 100644 --- a/gruel/src/include/gruel/thread.h +++ b/gruel/src/include/gruel/thread.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2009,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/gruel/src/include/gruel/thread_body_wrapper.h b/gruel/src/include/gruel/thread_body_wrapper.h index ae0feda08..e09a43e68 100644 --- a/gruel/src/include/gruel/thread_body_wrapper.h +++ b/gruel/src/include/gruel/thread_body_wrapper.h @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -26,7 +26,7 @@ #include <exception> #include <iostream> -namespace gruel +namespace gruel { GRUEL_API void mask_signals(); diff --git a/gruel/src/include/gruel/thread_group.h b/gruel/src/include/gruel/thread_group.h index e1658dd1f..1b8a0a4bf 100644 --- a/gruel/src/include/gruel/thread_group.h +++ b/gruel/src/include/gruel/thread_group.h @@ -4,7 +4,7 @@ * Copyright (C) 2007 Anthony Williams * Copyright 2008,2009 Free Software Foundation, Inc. * - * Distributed under the Boost Software License, Version 1.0. (See accompanying + * Distributed under the Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ diff --git a/gruel/src/lib/.gitignore b/gruel/src/lib/.gitignore deleted file mode 100644 index 165e179d6..000000000 --- a/gruel/src/lib/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/Makefile -/Makefile.in -/.libs -/.deps -test_gruel diff --git a/gruel/src/lib/CMakeLists.txt b/gruel/src/lib/CMakeLists.txt index a6aa1d992..cd7b7abf4 100644 --- a/gruel/src/lib/CMakeLists.txt +++ b/gruel/src/lib/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2010-2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gruel/src/lib/Makefile.am b/gruel/src/lib/Makefile.am deleted file mode 100644 index 773f3aefd..000000000 --- a/gruel/src/lib/Makefile.am +++ /dev/null @@ -1,68 +0,0 @@ -# -# Copyright 2008,2009,2010,2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = pmt msg - -AM_CPPFLAGS = $(DEFINES) $(GRUEL_INCLUDES) $(BOOST_CPPFLAGS) \ - $(CPPUNIT_INCLUDES) $(WITH_INCLUDES) - -TESTS = test_gruel - -noinst_PROGRAMS = test_gruel - - -lib_LTLIBRARIES = libgruel.la - -# magic flags -libgruel_la_LDFLAGS = $(NO_UNDEFINED) $(BOOST_LDFLAGS) $(LTVERSIONFLAGS) - -# ---------------------------------------------------------------- - -PMT_LIB = pmt/libpmt.la -MSG_LIB = msg/libmsg.la - -# These are the source files that go into the gruel shared library -libgruel_la_SOURCES = \ - realtime.cc \ - sys_pri.cc \ - thread_body_wrapper.cc \ - thread_group.cc - -libgruel_la_LIBADD = \ - $(BOOST_THREAD_LIB) \ - $(BOOST_SYSTEM_LIB) \ - $(BOOST_FILESYSTEM_LIB) \ - $(PMT_LIB) \ - $(MSG_LIB) \ - -lstdc++ - - -# ---------------------------------------------------------------- - -test_gruel_SOURCES = test_gruel.cc -test_gruel_LDADD = \ - $(BOOST_THREAD_LIB) \ - $(BOOST_SYSTEM_LIB) \ - $(BOOST_FILESYSTEM_LIB) \ - pmt/libpmt-qa.la libgruel.la - diff --git a/gruel/src/lib/msg/.gitignore b/gruel/src/lib/msg/.gitignore deleted file mode 100644 index c026fd667..000000000 --- a/gruel/src/lib/msg/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/Makefile -/Makefile.in -/.deps -/.libs diff --git a/gruel/src/lib/msg/CMakeLists.txt b/gruel/src/lib/msg/CMakeLists.txt index 116d2c67f..74010af7e 100644 --- a/gruel/src/lib/msg/CMakeLists.txt +++ b/gruel/src/lib/msg/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2010 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, diff --git a/gruel/src/lib/msg/Makefile.am b/gruel/src/lib/msg/Makefile.am deleted file mode 100644 index 9dbaf10f5..000000000 --- a/gruel/src/lib/msg/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright 2009,2010 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 - -AM_CPPFLAGS = $(DEFINES) $(GRUEL_INCLUDES) \ - $(BOOST_CPPFLAGS) $(WITH_INCLUDES) - -noinst_LTLIBRARIES = libmsg.la - -libmsg_la_SOURCES = \ - msg_accepter.cc \ - msg_accepter_msgq.cc \ - msg_queue.cc - diff --git a/gruel/src/lib/msg/msg_accepter.cc b/gruel/src/lib/msg/msg_accepter.cc index 64878f737..5acd98aa2 100644 --- a/gruel/src/lib/msg/msg_accepter.cc +++ b/gruel/src/lib/msg/msg_accepter.cc @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gruel/src/lib/msg/msg_accepter_msgq.cc b/gruel/src/lib/msg/msg_accepter_msgq.cc index 64fe501d1..2ae3537b8 100644 --- a/gruel/src/lib/msg/msg_accepter_msgq.cc +++ b/gruel/src/lib/msg/msg_accepter_msgq.cc @@ -1,19 +1,19 @@ /* -*- 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. diff --git a/gruel/src/lib/msg/msg_queue.cc b/gruel/src/lib/msg/msg_queue.cc index 8d15f08c5..a0b120e40 100644 --- a/gruel/src/lib/msg/msg_queue.cc +++ b/gruel/src/lib/msg/msg_queue.cc @@ -1,19 +1,19 @@ /* -*- 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -36,12 +36,12 @@ namespace gruel { { return msg_queue_sptr(new msg_queue(limit)); } - + msg_queue::msg_queue(unsigned int limit) : d_limit(limit) { } - + msg_queue::~msg_queue() { flush(); @@ -83,7 +83,7 @@ namespace gruel { if (empty_p()) return pmt_t(); - + pmt_t m(d_msgs.front()); d_msgs.pop_front(); diff --git a/gruel/src/lib/pmt/.gitignore b/gruel/src/lib/pmt/.gitignore deleted file mode 100644 index 035c0316b..000000000 --- a/gruel/src/lib/pmt/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/Makefile -/Makefile.in -/.libs -/.deps -/test_pmt -/qa_pmt_unv.cc -/qa_pmt_unv.h -/pmt_unv_int.h -/pmt_unv.cc -/stamp-sources-generate diff --git a/gruel/src/lib/pmt/CMakeLists.txt b/gruel/src/lib/pmt/CMakeLists.txt index a708fa7ad..dc70f03d7 100644 --- a/gruel/src/lib/pmt/CMakeLists.txt +++ b/gruel/src/lib/pmt/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2010 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, @@ -26,9 +26,6 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) ######################################################################## # Generate serial tags header file ######################################################################## -get_filename_component(SCHEME_DIR - ${CMAKE_CURRENT_SOURCE_DIR}/../../scheme/gnuradio ABSOLUTE -) get_filename_component(PMT_SERIAL_TAGS_H ${CMAKE_CURRENT_BINARY_DIR}/../../include/gruel/pmt_serial_tags.h ABSOLUTE @@ -36,11 +33,11 @@ get_filename_component(PMT_SERIAL_TAGS_H add_custom_command( OUTPUT ${PMT_SERIAL_TAGS_H} - DEPENDS ${SCHEME_DIR}/gen-serial-tags.py - DEPENDS ${SCHEME_DIR}/pmt-serial-tags.scm + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gen-serial-tags.py + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/pmt-serial-tags.scm COMMAND ${PYTHON_EXECUTABLE} - ${SCHEME_DIR}/gen-serial-tags.py - ${SCHEME_DIR}/pmt-serial-tags.scm + ${CMAKE_CURRENT_SOURCE_DIR}/gen-serial-tags.py + ${CMAKE_CURRENT_SOURCE_DIR}/pmt-serial-tags.scm ${PMT_SERIAL_TAGS_H} ) diff --git a/gruel/src/lib/pmt/Makefile.am b/gruel/src/lib/pmt/Makefile.am deleted file mode 100644 index 0c8e12dc3..000000000 --- a/gruel/src/lib/pmt/Makefile.am +++ /dev/null @@ -1,105 +0,0 @@ -# -# Copyright 2008,2009,2010,2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -AM_CPPFLAGS = $(DEFINES) $(GRUEL_INCLUDES) $(BOOST_CPPFLAGS) \ - $(CPPUNIT_INCLUDES) $(WITH_INCLUDES) - -noinst_LTLIBRARIES = libpmt.la - -# ---------------------------------------------------------------- -# these scripts generate code - -code_generator = \ - generate_unv.py \ - unv_template.h.t \ - unv_template.cc.t \ - unv_qa_template.cc.t - -GENERATED_H = \ - pmt_unv_int.h \ - qa_pmt_unv.h - -GENERATED_CC = \ - pmt_unv.cc \ - qa_pmt_unv.cc - -python_built_sources = $(GENERATED_H) $(GENERATED_CC) - -PMT_SERIAL_TAGS_H = $(abs_top_builddir)/gruel/src/include/gruel/pmt_serial_tags.h -BUILT_SOURCES = $(python_built_sources) $(PMT_SERIAL_TAGS_H) - -EXTRA_DIST += $(code_generator) - -# ---------------------------------------------------------------- - -libpmt_la_SOURCES = \ - pmt.cc \ - pmt_io.cc \ - pmt_pool.cc \ - pmt_serialize.cc \ - pmt_unv.cc - -libpmt_la_LIBADD = \ - $(BOOST_THREAD_LIB) \ - -lstdc++ - -libpmt_la_LDFLAGS = \ - $(BOOST_LDFLAGS) - -noinst_HEADERS = \ - $(GENERATED_H) \ - pmt_int.h \ - qa_pmt.h \ - qa_pmt_prims.h - -# Build the qa code into its own library - -noinst_LTLIBRARIES += libpmt-qa.la - -libpmt_qa_la_SOURCES = \ - qa_pmt.cc \ - qa_pmt_prims.cc \ - qa_pmt_unv.cc - -# magic flags -libpmt_qa_la_LDFLAGS = $(NO_UNDEFINED) -avoid version - -libpmt_qa_la_LIBADD = \ - libpmt.la \ - $(CPPUNIT_LIBS) \ - -lstdc++ - - -# Do creation and inclusion of other Makefiles last - -# common way for generating sources from templates when using -# BUILT_SOURCES, using parallel build protection. -gen_sources = $(python_built_sources) -gen_sources_deps = $(core_generator) -par_gen_command = PYTHONPATH=$(top_srcdir)/gruel/src/lib/pmt srcdir=$(srcdir) $(PYTHON) $(srcdir)/generate_unv.py -include $(top_srcdir)/Makefile.par.gen - -# Rule to create the build header file using python -# Doesn't need parallel protections because there is a single target -$(PMT_SERIAL_TAGS_H): $(top_srcdir)/gruel/src/scheme/gnuradio/gen-serial-tags.py $(top_srcdir)/gruel/src/scheme/gnuradio/pmt-serial-tags.scm - $(PYTHON) $^ $@ diff --git a/gruel/src/scheme/gnuradio/gen-serial-tags.py b/gruel/src/lib/pmt/gen-serial-tags.py index 18e927beb..18e927beb 100644 --- a/gruel/src/scheme/gnuradio/gen-serial-tags.py +++ b/gruel/src/lib/pmt/gen-serial-tags.py diff --git a/gruel/src/lib/pmt/generate_unv.py b/gruel/src/lib/pmt/generate_unv.py index 02aace250..42b57e245 100755 --- a/gruel/src/lib/pmt/generate_unv.py +++ b/gruel/src/lib/pmt/generate_unv.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2006,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. -# +# """ Generate code for uniform numeric vectors @@ -46,19 +46,19 @@ header = """\ /* -*- c++ -*- */ /* * Copyright 2006,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, @@ -118,7 +118,7 @@ def do_substitution (d, input, out_file): key = match_obj.group (1) # print key return d[key] - + out = re.sub (r"@([a-zA-Z0-9_]+)@", repl, input) out_file.write (out) @@ -164,7 +164,7 @@ class qa_pmt_unv : public CppUnit::TestCase { CPPUNIT_TEST_SUITE_END(); private: -''') +''') for tag, typ in unv_types: output.write(' void test_%svector();\n' % (tag,)) output.write('};\n') @@ -178,7 +178,7 @@ def generate_qa_cc(): for tag, typ in unv_types: d = { 'TAG' : tag, 'TYPE' : typ } do_substitution(d, template, output) - + def main(): generate_h() diff --git a/gruel/src/scheme/gnuradio/pmt-serial-tags.scm b/gruel/src/lib/pmt/pmt-serial-tags.scm index 646a751ea..ca25a43a8 100644 --- a/gruel/src/scheme/gnuradio/pmt-serial-tags.scm +++ b/gruel/src/lib/pmt/pmt-serial-tags.scm @@ -1,19 +1,19 @@ ;;; -*-scheme-*- ;;; ;;; Copyright 2007 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 (define 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. diff --git a/gruel/src/lib/pmt/pmt.cc b/gruel/src/lib/pmt/pmt.cc index c100611be..9b1e14e75 100644 --- a/gruel/src/lib/pmt/pmt.cc +++ b/gruel/src/lib/pmt/pmt.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2009,2010 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, @@ -235,13 +235,13 @@ hash_string(const std::string &s) return h; } -bool +bool pmt_is_symbol(const pmt_t& obj) { return obj->is_symbol(); } -pmt_t +pmt_t pmt_string_to_symbol(const std::string &name) { unsigned hash = hash_string(name) % SYMBOL_HASH_TABLE_SIZE; @@ -356,7 +356,7 @@ pmt_to_uint64(pmt_t x) pmt_real::pmt_real(double value) : d_value(value) {} -bool +bool pmt_is_real(pmt_t x) { return x->is_real(); @@ -385,7 +385,7 @@ pmt_to_double(pmt_t x) pmt_complex::pmt_complex(std::complex<double> value) : d_value(value) {} -bool +bool pmt_is_complex(pmt_t x) { return x->is_complex(); @@ -441,7 +441,7 @@ pmt_car(const pmt_t& pair) pmt_pair* p = dynamic_cast<pmt_pair*>(pair.get()); if ( p ) return p->car(); - + throw pmt_wrong_type("pmt_car", pair); } @@ -451,7 +451,7 @@ pmt_cdr(const pmt_t& pair) pmt_pair* p = dynamic_cast<pmt_pair*>(pair.get()); if ( p ) return p->cdr(); - + throw pmt_wrong_type("pmt_cdr", pair); } @@ -772,7 +772,7 @@ pmt_uniform_vector_writable_elements(pmt_t vector, size_t &len) * This is an a-list implementation. * * When we need better performance for large dictionaries, consider implementing - * persistent Red-Black trees as described in "Purely Functional Data Structures", + * persistent Red-Black trees as described in "Purely Functional Data Structures", * Chris Okasaki, 1998, section 3.3. */ @@ -808,7 +808,7 @@ pmt_dict_delete(const pmt_t &dict, const pmt_t &key) if (pmt_eqv(pmt_caar(dict), key)) return pmt_cdr(dict); - + return pmt_cons(pmt_car(dict), pmt_dict_delete(pmt_cdr(dict), key)); } @@ -893,7 +893,7 @@ pmt_any_set(pmt_t obj, const boost::any &any) // msg_accepter -- built from "any" //////////////////////////////////////////////////////////////////////////// -bool +bool pmt_is_msg_accepter(const pmt_t &obj) { if (!pmt_is_any(obj)) @@ -1228,7 +1228,7 @@ pmt_nthcdr(size_t n, pmt_t list) { if (!(pmt_is_pair(list) || pmt_is_null(list))) throw pmt_wrong_type("pmt_nthcdr", list); - + while (n > 0){ if (pmt_is_pair(list)){ list = pmt_cdr(list); @@ -1365,7 +1365,7 @@ pmt_cadddr(pmt_t pair) { return pmt_car(pmt_cdr(pmt_cdr(pmt_cdr(pair)))); } - + bool pmt_is_eof_object(pmt_t obj) { diff --git a/gruel/src/lib/pmt/pmt_int.h b/gruel/src/lib/pmt/pmt_int.h index 745dbc666..bd2b5fe5a 100644 --- a/gruel/src/lib/pmt/pmt_int.h +++ b/gruel/src/lib/pmt/pmt_int.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2009,2010 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, @@ -101,7 +101,7 @@ class pmt_symbol : public pmt_base { std::string d_name; pmt_t d_next; - + public: pmt_symbol(const std::string &name); //~pmt_symbol(){} diff --git a/gruel/src/lib/pmt/pmt_io.cc b/gruel/src/lib/pmt/pmt_io.cc index 1214ff588..4bac4a0ec 100644 --- a/gruel/src/lib/pmt/pmt_io.cc +++ b/gruel/src/lib/pmt/pmt_io.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,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. @@ -127,7 +127,7 @@ std::ostream& operator<<(std::ostream &os, pmt_t obj) return os; } -std::string +std::string pmt_write_string(pmt_t obj) { std::ostringstream s; @@ -150,7 +150,7 @@ pmt_serialize(pmt_t obj, std::ostream &sink) /*! * \brief Create obj from portable byte-serial representation */ -pmt_t +pmt_t pmt_deserialize(std::istream &source) { throw pmt_notimplemented("notimplemented: pmt_deserialize", PMT_NIL); @@ -159,7 +159,7 @@ pmt_deserialize(std::istream &source) } /* namespace pmt */ -void +void pmt::pmt_print(pmt_t v) { std::cout << pmt_write_string(v) << std::endl; diff --git a/gruel/src/lib/pmt/pmt_pool.cc b/gruel/src/lib/pmt/pmt_pool.cc index 731d28ca7..63a681abf 100644 --- a/gruel/src/lib/pmt/pmt_pool.cc +++ b/gruel/src/lib/pmt/pmt_pool.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,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. diff --git a/gruel/src/lib/pmt/pmt_serialize.cc b/gruel/src/lib/pmt/pmt_serialize.cc index 184a31e6b..de9644c3c 100644 --- a/gruel/src/lib/pmt/pmt_serialize.cc +++ b/gruel/src/lib/pmt/pmt_serialize.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2007,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. @@ -216,7 +216,7 @@ deserialize_untagged_f64(double *ip, std::streambuf &sb) *ip = iu.id; return t != std::streambuf::traits_type::eof(); } - + /* * Write portable byte-serial representation of \p obj to \p sb @@ -227,7 +227,7 @@ bool pmt_serialize(pmt_t obj, std::streambuf &sb) { bool ok = true; - + tail_recursion: if (pmt_is_bool(obj)){ @@ -236,7 +236,7 @@ pmt_serialize(pmt_t obj, std::streambuf &sb) else return serialize_untagged_u8(PST_FALSE, sb); } - + if (pmt_is_null(obj)) return serialize_untagged_u8(PST_NULL, sb); @@ -294,10 +294,10 @@ pmt_serialize(pmt_t obj, std::streambuf &sb) if (pmt_is_uniform_vector(obj)) throw pmt_notimplemented("pmt_serialize (uniform-vector)", obj); - + if (pmt_is_dict(obj)) throw pmt_notimplemented("pmt_serialize (dict)", obj); - + throw pmt_notimplemented("pmt_serialize (?)", obj); } @@ -325,7 +325,7 @@ pmt_deserialize(std::streambuf &sb) switch (tag){ case PST_TRUE: return PMT_T; - + case PST_FALSE: return PMT_F; @@ -369,7 +369,7 @@ pmt_deserialize(std::streambuf &sb) case PST_COMMENT: throw pmt_notimplemented("pmt_deserialize: tag value = ", pmt_from_long(tag)); - + default: throw pmt_exception("pmt_deserialize: malformed input stream, tag value = ", pmt_from_long(tag)); diff --git a/gruel/src/lib/pmt/qa_pmt.cc b/gruel/src/lib/pmt/qa_pmt.cc index 250befafa..27c617e74 100644 --- a/gruel/src/lib/pmt/qa_pmt.cc +++ b/gruel/src/lib/pmt/qa_pmt.cc @@ -1,18 +1,18 @@ /* * Copyright 2006 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, @@ -35,6 +35,6 @@ qa_pmt::suite () s->addTest (qa_pmt_prims::suite ()); s->addTest (qa_pmt_unv::suite ()); - + return s; } diff --git a/gruel/src/lib/pmt/qa_pmt.h b/gruel/src/lib/pmt/qa_pmt.h index 424c1065b..3de5872c7 100644 --- a/gruel/src/lib/pmt/qa_pmt.h +++ b/gruel/src/lib/pmt/qa_pmt.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gruel/src/lib/pmt/qa_pmt_prims.cc b/gruel/src/lib/pmt/qa_pmt_prims.cc index 7dec30d56..6212b8ea4 100644 --- a/gruel/src/lib/pmt/qa_pmt_prims.cc +++ b/gruel/src/lib/pmt/qa_pmt_prims.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2009,2010 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, @@ -173,7 +173,7 @@ qa_pmt_prims::test_pairs() CPPUNIT_ASSERT_EQUAL(s3, pmt_car(c1)); CPPUNIT_ASSERT_EQUAL((size_t)1, pmt_length(c3)); CPPUNIT_ASSERT_EQUAL((size_t)2, pmt_length(c2)); - + CPPUNIT_ASSERT_THROW(pmt_cdr(PMT_NIL), pmt_wrong_type); CPPUNIT_ASSERT_THROW(pmt_car(PMT_NIL), pmt_wrong_type); CPPUNIT_ASSERT_THROW(pmt_set_car(s1, PMT_NIL), pmt_wrong_type); @@ -282,7 +282,7 @@ qa_pmt_prims::test_tuples() //std::cout << v << std::endl; //std::cout << t2 << std::endl; - + t = pmt_make_tuple(s[0], s[1], s[2]); pmt_t list0 = pmt_list3(s[0], s[1], s[2]); CPPUNIT_ASSERT_EQUAL(size_t(3), pmt_length(list0)); @@ -346,11 +346,11 @@ qa_pmt_prims::test_misc() pmt_t p0 = pmt_cons(k0, v0); pmt_t p1 = pmt_cons(k1, v1); pmt_t p2 = pmt_cons(k2, v2); - + pmt_t alist = pmt_cons(p0, pmt_cons(p1, pmt_cons(p2, PMT_NIL))); CPPUNIT_ASSERT(pmt_eq(p1, pmt_assv(k1, alist))); CPPUNIT_ASSERT(pmt_eq(PMT_F, pmt_assv(k3, alist))); - + pmt_t keys = pmt_cons(k0, pmt_cons(k1, pmt_cons(k2, PMT_NIL))); pmt_t vals = pmt_cons(v0, pmt_cons(v1, pmt_cons(v2, PMT_NIL))); CPPUNIT_ASSERT(pmt_equal(keys, pmt_map(pmt_car, alist))); @@ -372,7 +372,7 @@ qa_pmt_prims::test_dict() pmt_t v2 = mp("v2"); pmt_t v3 = mp("v3"); pmt_t not_found = pmt_cons(PMT_NIL, PMT_NIL); - + CPPUNIT_ASSERT(!pmt_dict_has_key(dict, k0)); dict = pmt_dict_add(dict, k0, v0); CPPUNIT_ASSERT(pmt_dict_has_key(dict, k0)); diff --git a/gruel/src/lib/pmt/qa_pmt_prims.h b/gruel/src/lib/pmt/qa_pmt_prims.h index cc1409ee6..a407509b2 100644 --- a/gruel/src/lib/pmt/qa_pmt_prims.h +++ b/gruel/src/lib/pmt/qa_pmt_prims.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gruel/src/lib/pmt/unv_template.cc.t b/gruel/src/lib/pmt/unv_template.cc.t index 148965c09..566168c3d 100644 --- a/gruel/src/lib/pmt/unv_template.cc.t +++ b/gruel/src/lib/pmt/unv_template.cc.t @@ -33,7 +33,7 @@ pmt_@TAG@vector::ref(size_t k) const return d_v[k]; } -void +void pmt_@TAG@vector::set(size_t k, @TYPE@ x) { if (k >= length()) diff --git a/gruel/src/lib/realtime.cc b/gruel/src/lib/realtime.cc index 96351f812..e01c6c53d 100644 --- a/gruel/src/lib/realtime.cc +++ b/gruel/src/lib/realtime.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2007,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, @@ -90,7 +90,7 @@ namespace gruel { return RT_OTHER_ERROR; } } - + //printf("SCHED_FIFO enabled with priority = %d\n", pri); return RT_OK; } @@ -125,7 +125,7 @@ namespace gruel { return RT_OTHER_ERROR; } } - + //printf("SCHED_FIFO enabled with priority = %d\n", pri); return RT_OK; } diff --git a/gruel/src/lib/sys_pri.cc b/gruel/src/lib/sys_pri.cc index dc0164d70..c8a505341 100644 --- a/gruel/src/lib/sys_pri.cc +++ b/gruel/src/lib/sys_pri.cc @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/gruel/src/lib/test_gruel.cc b/gruel/src/lib/test_gruel.cc index 7ef3520e6..f32e3f341 100644 --- a/gruel/src/lib/test_gruel.cc +++ b/gruel/src/lib/test_gruel.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2009,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -32,7 +32,7 @@ #include <boost/filesystem/path.hpp> namespace fs = boost::filesystem; -int +int main(int argc, char **argv) { fs::path path = fs::current_path() / ".unittests"; @@ -45,7 +45,7 @@ main(int argc, char **argv) runner.addTest(qa_pmt::suite ()); runner.setOutputter(xmlout); - + bool was_successful = runner.run("", false); return was_successful ? 0 : 1; diff --git a/gruel/src/lib/thread_body_wrapper.cc b/gruel/src/lib/thread_body_wrapper.cc index 86c4edb5b..019eaa342 100644 --- a/gruel/src/lib/thread_body_wrapper.cc +++ b/gruel/src/lib/thread_body_wrapper.cc @@ -1,19 +1,19 @@ /* -*- 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -37,7 +37,7 @@ namespace gruel { sigset_t new_set; int r; - sigemptyset(&new_set); + sigemptyset(&new_set); sigaddset(&new_set, SIGHUP); // block these... sigaddset(&new_set, SIGINT); sigaddset(&new_set, SIGPIPE); diff --git a/gruel/src/lib/thread_group.cc b/gruel/src/lib/thread_group.cc index fa78567ec..9e8ded4df 100644 --- a/gruel/src/lib/thread_group.cc +++ b/gruel/src/lib/thread_group.cc @@ -4,7 +4,7 @@ * Copyright (C) 2007 Anthony Williams * Copyright 2008 Free Software Foundation, Inc. * - * Distributed under the Boost Software License, Version 1.0. (See accompanying + * Distributed under the Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ diff --git a/gruel/src/python/.gitignore b/gruel/src/python/.gitignore deleted file mode 100644 index 604b402c5..000000000 --- a/gruel/src/python/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/Makefile -/Makefile.in -/run_tests diff --git a/gruel/src/python/Makefile.am b/gruel/src/python/Makefile.am deleted file mode 100644 index 80cb04b24..000000000 --- a/gruel/src/python/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -TESTS = -EXTRA_DIST += run_tests.in - -if PYTHON -TESTS += run_tests - -grueldir = $(pythondir)/gruel - -noinst_PYTHON = \ - qa_pmt.py - -gruel_PYTHON = \ - __init__.py - -gruelpmtdir = $(pythondir)/gruel/pmt - -gruelpmt_PYTHON = pmt/__init__.py - -endif - diff --git a/gruel/src/python/__init__.py b/gruel/src/python/__init__.py index 082ea26f2..976b2ed1e 100644 --- a/gruel/src/python/__init__.py +++ b/gruel/src/python/__init__.py @@ -1,23 +1,23 @@ # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# # The presence of this file turns this directory into a Python package diff --git a/gruel/src/python/pmt/__init__.py b/gruel/src/python/pmt/__init__.py index 2c4d33b59..0862af0eb 100644 --- a/gruel/src/python/pmt/__init__.py +++ b/gruel/src/python/pmt/__init__.py @@ -1,23 +1,23 @@ # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# # The presence of this file turns this directory into a Python package diff --git a/gruel/src/python/qa_pmt.py b/gruel/src/python/qa_pmt.py index 00cdb064e..1ef4fed15 100755 --- a/gruel/src/python/qa_pmt.py +++ b/gruel/src/python/qa_pmt.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# import unittest import pmt_swig diff --git a/gruel/src/python/run_tests.in b/gruel/src/python/run_tests.in deleted file mode 100644 index ff399bcc6..000000000 --- a/gruel/src/python/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@/gruel/src/lib/:@abs_top_builddir@/gruel/src/swig/.libs:$DYLD_LIBRARY_PATH -export DYLD_LIBRARY_PATH - -# For Win32 -PATH=@abs_top_builddir@/gruel/:@abs_top_builddir@/gruel/.libs:$PATH - -@top_builddir@/run_tests.sh \ - @abs_top_srcdir@/gruel/src \ - @abs_top_builddir@/gruel/src \ - @srcdir@ diff --git a/gruel/src/scheme/.gitignore b/gruel/src/scheme/.gitignore deleted file mode 100644 index a02b6ff73..000000000 --- a/gruel/src/scheme/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo diff --git a/gruel/src/scheme/Makefile.am b/gruel/src/scheme/Makefile.am deleted file mode 100644 index 4980063d7..000000000 --- a/gruel/src/scheme/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -# -# Copyright 2007 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. -# - -SUBDIRS = gnuradio diff --git a/gruel/src/scheme/gnuradio/.gitignore b/gruel/src/scheme/gnuradio/.gitignore deleted file mode 100644 index a02b6ff73..000000000 --- a/gruel/src/scheme/gnuradio/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/Makefile -/Makefile.in -/.la -/.lo -/.deps -/.libs -/*.la -/*.lo diff --git a/gruel/src/scheme/gnuradio/Makefile.am b/gruel/src/scheme/gnuradio/Makefile.am deleted file mode 100644 index e7b6bf744..000000000 --- a/gruel/src/scheme/gnuradio/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright 2007,2009,2010,2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - -include $(top_srcdir)/Makefile.common - -#pkgdatadir = $(datadir)/gnuradio - -EXTRA_DIST += \ - gen-serial-tags.py - -# really scheme source files FIXME wrong location -dist_pkgdata_DATA = \ - pmt-serial-tags.scm \ - pmt-serialize.scm \ - macros-etc.scm - diff --git a/gruel/src/scheme/gnuradio/macros-etc.scm b/gruel/src/scheme/gnuradio/macros-etc.scm deleted file mode 100644 index ac2a4a342..000000000 --- a/gruel/src/scheme/gnuradio/macros-etc.scm +++ /dev/null @@ -1,50 +0,0 @@ -;;; -*- scheme -*- -;;; -;;; Copyright 2007 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. -;;; - -(define-module (gnuradio macros-etc) - :export (atom? when unless for-each-in-file)) - -(define (atom? obj) - (not (pair? obj))) - -(defmacro when (pred . body) - `(if ,pred (begin ,@body) #f)) - -(defmacro unless (pred . body) - `(if (not ,pred) (begin ,@body) #f)) - - -(define (for-each-in-file file f) - (let ((port (if (port? file) - file - (open-input-file file)))) - (letrec - ((loop - (lambda (port form) - (cond ((eof-object? form) - (when (not (eq? port file)) - (close-input-port port)) - #t) - (else - (f form) - (set! form #f) ; for GC - (loop port (read port))))))) - (loop port (read port))))) diff --git a/gruel/src/scheme/gnuradio/pmt-serialize.scm b/gruel/src/scheme/gnuradio/pmt-serialize.scm deleted file mode 100644 index c1d32d75b..000000000 --- a/gruel/src/scheme/gnuradio/pmt-serialize.scm +++ /dev/null @@ -1,48 +0,0 @@ -;;; -;;; Copyright 2007 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. -;;; - -;;; An implementation of pmt_serialize in scheme. -;;; Currently handles only symbols and pairs. They're all we need for now. - -(define-module (gnuradio pmt-serialize) - :export (pmt-serialize)) - -(load-from-path "gnuradio/pmt-serial-tags") - -(define (pmt-serialize obj put-byte) - (define (put-u16 x) - (put-byte (logand (ash x -8) #xff)) - (put-byte (logand x #xff))) - - (cond ((null? obj) - (put-byte pst-null)) - ((symbol? obj) - (let* ((sym-as-bytes (map char->integer (string->list (symbol->string obj)))) - (len (length sym-as-bytes))) - (put-byte pst-symbol) - (put-u16 len) - (for-each put-byte sym-as-bytes))) - - ((pair? obj) - (put-byte pst-pair) - (pmt-serialize (car obj) put-byte) - (pmt-serialize (cdr obj) put-byte)) - (else - (throw 'not-implemented "pmt-serialize" obj)))) diff --git a/gruel/src/swig/.gitignore b/gruel/src/swig/.gitignore deleted file mode 100644 index f99fdb19b..000000000 --- a/gruel/src/swig/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/Makefile -/Makefile.in -/python -/pmt_swig.py diff --git a/gruel/src/swig/Makefile.am b/gruel/src/swig/Makefile.am deleted file mode 100644 index ce0a32513..000000000 --- a/gruel/src/swig/Makefile.am +++ /dev/null @@ -1,67 +0,0 @@ -# -# Copyright 2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common -include $(top_srcdir)/Makefile.swig - -TESTS = - -AM_CPPFLAGS = \ - -I$(top_srcdir)/gruel/src/lib \ - $(STD_DEFINES_AND_INCLUDES) \ - $(PYTHON_CPPFLAGS) \ - $(WITH_INCLUDES) - -############################## -# SWIG interface and library -TOP_SWIG_IFILES = \ - pmt_swig_doc.i \ - pmt_swig.i - -TOP_SWIG_DOC_IFILES = \ - pmt_swig_doc.i - -BUILT_SOURCES += \ - $(TOP_SWIG_DOC_IFILES) - -EXTRA_DIST += \ - $(TOP_SWIG_DOC_IFILES) - -$(TOP_SWIG_DOC_IFILES): - `echo "" > $@` - -# Install so that they end up available as: -# import gruel.pmt -# This ends up at: -# ${prefix}/lib/python${python_version}/site-packages/gruel/pmt -pmt_swig_pythondir_category = \ - gruel/pmt - -# additional libraries for linking with the SWIG-generated library -pmt_swig_la_swig_libadd = \ - $(abs_top_builddir)/gruel/src/lib/pmt/libpmt.la - -# additional SWIG files to be installed -pmt_swig_swiginclude_headers = \ - gruel_common.i \ - gr_intrusive_ptr.i \ - $(TOP_SWIG_DOC_IFILES) - diff --git a/gruel/src/swig/Makefile.swig.gen b/gruel/src/swig/Makefile.swig.gen deleted file mode 100644 index 0abba0299..000000000 --- a/gruel/src/swig/Makefile.swig.gen +++ /dev/null @@ -1,145 +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 pmt_swig.i - -## Default install locations for these files: -## -## Default location for the Python directory is: -## ${prefix}/lib/python${python_version}/site-packages/[category]/pmt_swig -## Default location for the Python exec directory is: -## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/pmt_swig -## -## 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. - -pmt_swig_pythondir_category ?= gnuradio/pmt_swig -pmt_swig_pylibdir_category ?= $(pmt_swig_pythondir_category) -pmt_swig_pythondir = $(pythondir)/$(pmt_swig_pythondir_category) -pmt_swig_pylibdir = $(pyexecdir)/$(pmt_swig_pylibdir_category) - -# The .so libraries for the guile modules get installed whereever guile -# is installed, usually /usr/lib/guile/gnuradio/ -# FIXME: determince whether these should be installed with gnuradio. -pmt_swig_scmlibdir = $(libdir) - -# The scm files for the guile modules get installed where ever guile -# is installed, usually /usr/share/guile/site/pmt_swig -# FIXME: determince whether these should be installed with gnuradio. -pmt_swig_scmdir = $(guiledir) - -## SWIG headers are always installed into the same directory. - -pmt_swig_swigincludedir = $(gruelswigincludedir) - -## 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 > - -## Other cleaned files: dependency files generated by SWIG or this Makefile - -MOSTLYCLEANFILES += $(DEPDIR)/*.S* - -## Various SWIG variables. These can be overloaded in the including -## Makefile.am by setting the variable value there, then including -## Makefile.swig . - -pmt_swig_swiginclude_HEADERS = \ - pmt_swig.i \ - $(pmt_swig_swiginclude_headers) - -if PYTHON -pmt_swig_pylib_LTLIBRARIES = \ - _pmt_swig.la - -_pmt_swig_la_SOURCES = \ - python/pmt_swig.cc \ - $(pmt_swig_la_swig_sources) - -pmt_swig_python_PYTHON = \ - pmt_swig.py \ - $(pmt_swig_python) - -_pmt_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(pmt_swig_la_swig_libadd) - -_pmt_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(pmt_swig_la_swig_ldflags) - -_pmt_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(pmt_swig_la_swig_cxxflags) - -python/pmt_swig.cc: pmt_swig.py -pmt_swig.py: pmt_swig.i - -# Include the python dependencies for this file --include python/pmt_swig.d - -endif # end of if python - -if GUILE - -pmt_swig_scmlib_LTLIBRARIES = \ - libguile-gnuradio-pmt_swig.la -libguile_gnuradio_pmt_swig_la_SOURCES = \ - guile/pmt_swig.cc \ - $(pmt_swig_la_swig_sources) -nobase_pmt_swig_scm_DATA = \ - gnuradio/pmt_swig.scm \ - gnuradio/pmt_swig-primitive.scm -libguile_gnuradio_pmt_swig_la_LIBADD = \ - $(STD_SWIG_LA_LIB_ADD) \ - $(pmt_swig_la_swig_libadd) -libguile_gnuradio_pmt_swig_la_LDFLAGS = \ - $(STD_SWIG_LA_LD_FLAGS) \ - $(pmt_swig_la_swig_ldflags) -libguile_gnuradio_pmt_swig_la_CXXFLAGS = \ - $(STD_SWIG_CXX_FLAGS) \ - -I$(top_builddir) \ - $(pmt_swig_la_swig_cxxflags) - -guile/pmt_swig.cc: gnuradio/pmt_swig.scm -gnuradio/pmt_swig.scm: pmt_swig.i -gnuradio/pmt_swig-primitive.scm: gnuradio/pmt_swig.scm - -# Include the guile dependencies for this file --include guile/pmt_swig.d - -endif # end of GUILE - - diff --git a/gruel/src/swig/gr_intrusive_ptr.i b/gruel/src/swig/gr_intrusive_ptr.i index eef5bc84d..40c438d00 100644 --- a/gruel/src/swig/gr_intrusive_ptr.i +++ b/gruel/src/swig/gr_intrusive_ptr.i @@ -1,4 +1,4 @@ -// This file was borrowed from the SWIG project to allow use to +// This file was borrowed from the SWIG project to allow use to // wrap PMTs that use intrusive pointers. This is only necessary // to support backwards compatability with older distributions of // Linux that do not natively support a new enough version of SWIG. @@ -10,7 +10,7 @@ // #define SWIG_SHARED_PTR_NAMESPACE std // #define SWIG_SHARED_PTR_SUBNAMESPACE tr1 // #define SWIG_INTRUSIVE_PTR_NAMESPACE boost -// #define SWIG_INTRUSIVE_PTR_SUBNAMESPACE +// #define SWIG_INTRUSIVE_PTR_SUBNAMESPACE #if !defined(SWIG_INTRUSIVE_PTR_NAMESPACE) # define SWIG_INTRUSIVE_PTR_NAMESPACE boost @@ -36,7 +36,7 @@ namespace SWIG_INTRUSIVE_PTR_NAMESPACE { %fragment("SWIG_intrusive_deleter", "header") { template<class T> struct SWIG_intrusive_deleter { void operator()(T *p) { - if (p) + if (p) intrusive_ptr_release(p); } }; diff --git a/gruel/src/swig/gruel_common.i b/gruel/src/swig/gruel_common.i index e4261cbfa..3a4d841d6 100644 --- a/gruel/src/swig/gruel_common.i +++ b/gruel/src/swig/gruel_common.i @@ -1,18 +1,18 @@ /* * Copyright 2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, diff --git a/gruel/src/swig/pmt_swig.i b/gruel/src/swig/pmt_swig.i index 954501863..45cfceadc 100644 --- a/gruel/src/swig/pmt_swig.i +++ b/gruel/src/swig/pmt_swig.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2011-2012 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -77,7 +77,7 @@ bool pmt_is_false(pmt_t obj); //! Return \#f is val is false, else return \#t. pmt_t pmt_from_bool(bool val); -//! Return true if val is PMT_T, return false when val is PMT_F, +//! Return true if val is PMT_T, return false when val is PMT_F, // else raise wrong_type exception. bool pmt_to_bool(pmt_t val); @@ -352,7 +352,7 @@ size_t pmt_blob_length(pmt_t blob); */ //! true if \p x is any kind of uniform numeric vector -bool pmt_is_uniform_vector(pmt_t x); +bool pmt_is_uniform_vector(pmt_t x); bool pmt_is_u8vector(pmt_t x); bool pmt_is_s8vector(pmt_t x); @@ -550,7 +550,7 @@ bool pmt_eqv(const pmt_t& x, const pmt_t& y); /*! * pmt_equal recursively compares the contents of pairs and vectors, - * applying pmt_eqv on other objects such as numbers and symbols. + * applying pmt_eqv on other objects such as numbers and symbols. * pmt_equal may fail to terminate if its arguments are circular data * structures. */ diff --git a/run_tests.sh.in b/run_tests.sh.in deleted file mode 100644 index 1cb8e170a..000000000 --- a/run_tests.sh.in +++ /dev/null @@ -1,159 +0,0 @@ -#!/bin/sh - -# First argument is absolute path to top of component source directory -# Second argument is absolute path to top of component build directory -# Third argument is component source directory for qa tests - -# Absolute path to the top of the source directory -abs_top_srcdir=@abs_top_srcdir@ - -# Absolute path to the top of the build directory -abs_top_builddir=@abs_top_builddir@ - -# current QA srcdir -export srcdir=$3 - -# Where to find my C++ and swig generated shared libraries -mylibdir=$2/src:$2/src/.libs:$2/src/lib:$2/src/lib/.libs:$2/lib:$2/lib/.libs:$2/swig:$2/swig/.libs - -# Where to find my swig generated python module -mysrcdir=$1/src:$1/src/lib - -# Where to find my hand written python modules -mypydir=$1/src:$1/src/python:$1/python - -# Where to find core's swig generated shared libraries, -# and hand generated swig glue -grswigdir=@gnuradio_core_SWIGDIRPATH@ - -# Where to find core's python modules -grpydir=@gnuradio_core_PYDIRPATH@ - -# Construct search path for python modules, if each exists -for dir in $grswigdir $grpydir -do - if [ "$dir" != "" ] - then - if [ "$PYTHONPATH" = "" ] - then - PYTHONPATH="$dir" - else - PYTHONPATH="$dir:$PYTHONPATH" - fi - fi -done - -# Where to find pre-installed python modules -withpydirs=@with_PYDIRPATH@ - -# Add the 'with' dirs to the end of the python search path, if it exists -if [ "$withpydirs" != "" ] -then - PYTHONPATH="$PYTHONPATH:$withpydirs" -fi - -# Add the "my" dirs to the absolute front of the python search path -PYTHONPATH="$mylibdir:$mysrcdir:$mypydir:$PYTHONPATH" -export PYTHONPATH - -# Where to find gruel library files -grueldir=@gruel_LIBDIRPATH@ - -# Where to find gnuradio core's library files -grcoredir=@gnuradio_core_LIBDIRPATH@ - -# Construct search path for python modules -# Check each one to make sure it's not "" before adding -grlibdir="" -for dir in $grcoredir $grueldir -do - if [ "$dir" != "" ] - then - if [ "$grlibdir" = "" ] - then - grlibdir="$dir" - else - grlibdir="$dir:$grlibdir" - fi - fi -done - -# Add 'mylibdir' to the start of the library load path, to get local -# (to this component) created libraries - -# Where to find pre-installed libraries -withlibdirs=@with_LIBDIRPATH@ - -case "@host_os@" in - darwin*) - # Special Code for executing on Darwin / Mac OS X only - if [ "$DYLD_LIBRARY_PATH" = "" ] - then - DYLD_LIBRARY_PATH=$mylibdir - else - DYLD_LIBRARY_PATH=$mylibdir:$DYLD_LIBRARY_PATH - fi - # DYLD_LIBRARY_PATH will not be empty now - # Add the grlibdir paths to the front of any library load variable - if [ "$grlibdir" != "" ] - then - DYLD_LIBRARY_PATH=$grlibdir:$DYLD_LIBRARY_PATH - fi - # Add the withdirs paths to the end of any library load variable - if [ "$withlibdirs" != "" ] - then - DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$withlibdirs - fi - export DYLD_LIBRARY_PATH - ;; - cygwin*|win*|mingw*) - # Special Code for executing on Win32 variants only - if [ "$PATH" = "" ] - then - PATH=$mylibdir - else - PATH=$mylibdir:$PATH - fi - # PATH will not be empty now - # Add the grlibdir paths to the front of any library load variable - if [ "$grlibdir" != "" ] - then - PATH=$grlibdir:$PATH - fi - # Add the withdirs paths to the end of any library load variable - if [ "$withlibdirs" != "" ] - then - PATH=$PATH:$withlibdirs - fi - export PATH - ;; -esac - -# Don't load user or system prefs -GR_DONT_LOAD_PREFS=1 -export GR_DONT_LOAD_PREFS - -# Run everything that matches qa_*.py and return the final result. - -ok=yes -for file in $3/qa_*.py -do - # echo $file - @PYTHON@ $file - r=$? - if [ $r -ne 0 ] - then - if [ $r -ge 128 ] # killed by a signal - then - exit $r - fi - ok=no - fi -done - -if [ $ok = yes ] -then - exit 0 -else - exit 1 -fi diff --git a/setup_guile_test_env.in b/setup_guile_test_env.in deleted file mode 100644 index 1a73d337d..000000000 --- a/setup_guile_test_env.in +++ /dev/null @@ -1,152 +0,0 @@ -# -# Copyright 2010 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, see <http://www.gnu.org/licenses/>. -# - -# This is sourced by run_guile_tests to establish the environment -# variables required to run the tests in the build tree. - -# add_local_paths is the only "public" function in this file - -# 1st argument is absolute path to hand coded guile source directory -# 2nd argument is absolute path to component C++ shared library build directory -# 3nd argument is absolute path to component SWIG build directory - -add_local_paths() { - if [ $# -ne 3 ] - then - echo "$0: requires 3 args" 1>&2 - exit 1 - fi - - # Add local dirs to the front - prepend_to_guile_load_path "$1" - prepend_to_libpath "$2/.libs" - [ "$2" != "$3" ] && prepend_to_libpath "$3/.libs" - prepend_to_guile_load_path "$3" - - # Add withdirs to the end - append_to_guile_load_path "@with_GUILE_LOAD_PATH@" - append_to_libpath "@with_LIBDIRPATH@" -} - -# ------------------------------------------------------------------------ - -abs_top_srcdir=@abs_top_srcdir@ -abs_top_builddir=@abs_top_builddir@ - -# usage: prepend <path-varname> <dir> -prepend() { - if [ $# -ne 2 ] - then - echo "$0: prepend needs 2 args" 1>&2 - exit 1 - fi - local path="$1" dir="$2" contents="" - eval "contents=\$$path" - if [ "$dir" != "" ] - then - if [ "$contents" = "" ] - then - eval "$path=\"$dir\"" - else - eval "$path=\"$dir:$contents\"" - fi - fi - #echo end-of-prepend: $path=${!path} -} - -# usage: append <path-varname> <dir> -append() { - if [ $# -ne 2 ] - then - echo "$0: append needs 2 args" 1>&2 - exit 1 - fi - local path="$1" dir="$2" contents="" - eval "contents=\$$path" - if [ "$dir" != "" ] - then - if [ "$contents" = "" ] - then - eval "$path=\"$dir\"" - else - eval "$path=\"$contents:$dir\"" - fi - fi - #echo end-of-append: $path=${!path} -} - -prepend_to_guile_load_path() { - prepend GUILE_LOAD_PATH "$1" - export GUILE_LOAD_PATH -} - -append_to_guile_load_path() { - append GUILE_LOAD_PATH "$1" - export GUILE_LOAD_PATH -} - -prepend_to_libpath() { - prepend LTDL_LIBRARY_PATH "$1" - export LTDL_LIBRARY_PATH - case "@host_os@" in - darwin*) - prepend DYLD_LIBRARY_PATH "$1" - export DYLD_LIBRARY_PATH - ;; - cygwin*|win*|mingw*) - prepend PATH "$1" - export PATH - ;; - esac -} - -append_to_libpath() { - append LTDL_LIBRARY_PATH "$1" - export LTDL_LIBRARY_PATH - case "@host_os@" in - darwin*) - append DYLD_LIBRARY_PATH "$1" - export DYLD_LIBRARY_PATH - ;; - cygwin*|win*|mingw*) - append PATH "$1" - export PATH - ;; - esac -} - -# ------------------------------------------------------------------------ -# Everybody gets gruel and gnuradio-core for free. -# FIXME Eventually this should be gruel and gnuradio-runtime. -# ------------------------------------------------------------------------ - -# Where to search for not yet installed C++ shared libraries -prepend_to_libpath $abs_top_builddir/gruel/src/lib/.libs -prepend_to_libpath $abs_top_builddir/gnuradio-core/src/lib/.libs -prepend_to_libpath $abs_top_builddir/gnuradio-core/src/guile/.libs - -# Where to search for not yet installed swig generated guile libs -prepend_to_libpath $abs_top_builddir/gnuradio-core/src/lib/swig/.libs - -# Where to seach for guile code. -prepend_to_guile_load_path $abs_top_srcdir/gnuradio-core/src/guile -prepend_to_guile_load_path $abs_top_builddir/gnuradio-core/src/lib/swig - - -export GUILE_WARN_DEPRECATED=no diff --git a/version.sh b/version.sh deleted file mode 100644 index 8cc77fff0..000000000 --- a/version.sh +++ /dev/null @@ -1,4 +0,0 @@ -MAJOR_VERSION=3 -API_COMPAT=5 -MINOR_VERSION=3 -MAINT_VERSION=0 diff --git a/volk/.gitignore b/volk/.gitignore deleted file mode 100644 index dcd421895..000000000 --- a/volk/.gitignore +++ /dev/null @@ -1,43 +0,0 @@ -.* -*.o -*.a -*.ko -*.so -*.la -*.lo -*.py[oc] -*.gz -*.exe -*.patch -*~ -\#*# -.deps -.libs -TAGS -*-stamp -!.gitattributes -!.gitignore -make.log -/configure -/Makefile.in -/config.log -/config.h -/ltmain.sh -/Makefile -/config.status -/stamp-h1 -/stamp-h2 -/config.h.in -/autom4te.cache -/libtool -/missing -/aclocal.m4 -/install-sh -/depcomp -/py-compile -/compile -/build -/run_tests.sh -/volk.pc -/volk_config.h -/volk_config.h.in diff --git a/volk/AUTHORS b/volk/AUTHORS deleted file mode 100644 index e69de29bb..000000000 --- a/volk/AUTHORS +++ /dev/null diff --git a/volk/COPYING b/volk/COPYING deleted file mode 100644 index 94a9ed024..000000000 --- a/volk/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - 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/>. - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - <program> Copyright (C) <year> <name of author> - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -<http://www.gnu.org/licenses/>. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -<http://www.gnu.org/philosophy/why-not-lgpl.html>. diff --git a/volk/ChangeLog b/volk/ChangeLog deleted file mode 100644 index e69de29bb..000000000 --- a/volk/ChangeLog +++ /dev/null diff --git a/volk/INSTALL b/volk/INSTALL deleted file mode 100644 index 23e5f25d0..000000000 --- a/volk/INSTALL +++ /dev/null @@ -1,236 +0,0 @@ -Installation Instructions -************************* - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free -Software Foundation, Inc. - -This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. - -Basic Installation -================== - -These are generic installation instructions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is -disabled by default to prevent problems with accidental use of stale -cache files.) - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - -You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. - -Installation Names -================== - -By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - -Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - -There may be some features `configure' cannot figure out automatically, -but needs to determine by the type of machine the package will run on. -Usually, assuming the package is built to be run on the _same_ -architectures, `configure' can figure that out, but if it prints a -message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - -If you want to set default values for `configure' scripts to share, you -can create a site shell script called `config.site' that gives default -values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - -Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). Here is a another example: - - /bin/bash ./configure CONFIG_SHELL=/bin/bash - -Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent -configuration-related scripts to be executed by `/bin/bash'. - -`configure' Invocation -====================== - -`configure' recognizes the following options to control how it operates. - -`--help' -`-h' - Print a summary of the options to `configure', and exit. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/volk/Makefile.am b/volk/Makefile.am deleted file mode 100644 index 829c37b78..000000000 --- a/volk/Makefile.am +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright 2004,2008,2010 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. -# - -ACLOCAL_AMFLAGS = -I config - -include $(top_srcdir)/Makefile.common - -EXTRA_DIST = bootstrap configure config.h.in -SUBDIRS = config -if LV_HAVE_ORC -SUBDIRS += orc -endif -SUBDIRS += include lib - -#if USE_PYTHON -#SUBDIRS += python -#endif - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = volk.pc - -distclean-local: - -rm -rf autom4te.cache - -rm -f config.* - -rm -f depcomp - -rm -f install-sh - -rm -f ltmain.sh - -rm -f py-compile - -rm -f missing - -rm -f volk_config.h.in - -rm -f aclocal.m4 - -rm -f Makefile.in - -rm -f config/lt* - -rm -f config/libtool* - -rm -f apps/Makefile.in - -rm -f config/Makefile.in - -rm -f data/Makefile.in - -rm -f doc/Makefile.in - -rm -f include/Makefile.in - -rm -f lib/Makefile.in - -rm -f python/Makefile.in - -rm -f configure - -rm -f orc/Makefile.in - -rm -f orc/*.c - -rm -rf gen/config - -rm -rf gen/include - -rm -rf gen/lib diff --git a/volk/Makefile.common b/volk/Makefile.common deleted file mode 100644 index b9949cb33..000000000 --- a/volk/Makefile.common +++ /dev/null @@ -1,51 +0,0 @@ -# -*- Makefile -*- -# -# Copyright 2010,2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -#define gendir for files generated during bootstrap -top_gendir = $(top_srcdir)/gen - -ourincludedir = $(includedir)/volk - -# swig includes -ourswigincludedir = $(ourincludedir)/swig - -# Install this stuff in the appropriate subdirectory -# This usually ends up at: -# ${prefix}/lib/python${python_version}/site-packages/libvolk - -ourpythondir = $(pythondir)/volk -ourpyexecdir = $(pyexecdir)/volk - - -# swig flags -SWIGPYTHONFLAGS = -fvirtual -python -modern -SWIGGRFLAGS = -I$(GNURADIO_CORE_INCLUDEDIR)/swig -I$(GNURADIO_CORE_INCLUDEDIR) - -# standard defins and includes -STD_DEFINES_AND_INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/lib \ - $(BOOST_CPPFLAGS) $(GNURADIO_CORE_CPPFLAGS) - -# Don't assume that make predefines $(RM), because BSD make does -# not. We define it now in configure.ac using AM_PATH_PROG, but now -# here have to add a -f to be like GNU make. -RM=$(RM_PROG) -f - diff --git a/volk/NEWS b/volk/NEWS deleted file mode 100644 index e69de29bb..000000000 --- a/volk/NEWS +++ /dev/null diff --git a/volk/README b/volk/README deleted file mode 100644 index c21b99220..000000000 --- a/volk/README +++ /dev/null @@ -1 +0,0 @@ -Follow the install instructions. After ./configure, read LIBVECTOR_MANUAL.
\ No newline at end of file diff --git a/volk/apps/Makefile.am b/volk/apps/Makefile.am deleted file mode 100644 index 5e9bc254f..000000000 --- a/volk/apps/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# -# 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 this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - -include $(top_srcdir)/Makefile.common - -# C++ stuff here - -if PYTHON -# python stuff here -endif diff --git a/volk/apps/volk_profile.cc b/volk/apps/volk_profile.cc index bd36d6dc7..76b9f4031 100644 --- a/volk/apps/volk_profile.cc +++ b/volk/apps/volk_profile.cc @@ -13,7 +13,7 @@ extern "C" { int main(int argc, char *argv[]) { std::vector<std::string> results; - + //VOLK_PROFILE(volk_16i_x5_add_quad_16i_x4_a, 1e-4, 2046, 10000, &results); //VOLK_PROFILE(volk_16i_branch_4_state_8_a, 1e-4, 2046, 10000, &results); VOLK_PROFILE(volk_16ic_s32f_deinterleave_real_32f_a, 1e-5, 32768.0, 204600, 10000, &results); @@ -143,7 +143,7 @@ int main(int argc, char *argv[]) { #this file is generated by volk_profile.\n\ #the function name is followed by the preferred architecture.\n\ "; - + BOOST_FOREACH(std::string result, results) { config << result << std::endl; } diff --git a/volk/bootstrap b/volk/bootstrap deleted file mode 100755 index 838f03aa2..000000000 --- a/volk/bootstrap +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -# Copyright 2001,2005,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. -rm -fr config.cache autom4te*.cache - -#alternative to -B that wont break on python 2.5 -PYTHONDONTWRITEBYTECODE=1 -export PYTHONDONTWRITEBYTECODE -python gen/volk_register.py - -mv gen/lib/Makefile.am lib/ - -aclocal -I config -I gen/config -autoconf -autoheader -libtoolize --automake -automake --add-missing -Wno-portability -Wno-override -Wnone - diff --git a/volk/cmake/FindORC.cmake b/volk/cmake/FindORC.cmake index 1c4c417ad..a5f35c465 100644 --- a/volk/cmake/FindORC.cmake +++ b/volk/cmake/FindORC.cmake @@ -8,16 +8,16 @@ FIND_PROGRAM(ORCC_EXECUTABLE orcc HINTS ${PC_ORC_TOOLSDIR} PATHS ${ORC_ROOT}/bin ${CMAKE_INSTALL_PREFIX}/bin) -FIND_PATH(ORC_INCLUDE_DIR NAMES orc/orc.h +FIND_PATH(ORC_INCLUDE_DIR NAMES orc/orc.h HINTS ${PC_ORC_INCLUDEDIR} PATHS ${ORC_ROOT}/include/orc-0.4 ${CMAKE_INSTALL_PREFIX}/include/orc-0.4) -FIND_PATH(ORC_LIBRARY_DIR NAMES ${CMAKE_SHARED_LIBRARY_PREFIX}orc-0.4${CMAKE_SHARED_LIBRARY_SUFFIX} +FIND_PATH(ORC_LIBRARY_DIR NAMES ${CMAKE_SHARED_LIBRARY_PREFIX}orc-0.4${CMAKE_SHARED_LIBRARY_SUFFIX} HINTS ${PC_ORC_LIBDIR} PATHS ${ORC_ROOT}/lib${LIB_SUFFIX} ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) -FIND_LIBRARY(ORC_LIB orc-0.4 +FIND_LIBRARY(ORC_LIB orc-0.4 HINTS ${PC_ORC_LIBRARY_DIRS} PATHS ${ORC_ROOT}/lib${LIB_SUFFIX} ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) diff --git a/volk/config.guess b/volk/config.guess deleted file mode 100644 index b02565c7b..000000000 --- a/volk/config.guess +++ /dev/null @@ -1,1517 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. - -timestamp='2011-06-03' - -# This file 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 2 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. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to <config-patches@gnu.org> and include a ChangeLog -# entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to <config-patches@gnu.org>." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include <stdio.h> /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include <sys/systemcfg.h> - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include <stdlib.h> - #include <unistd.h> - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include <unistd.h> - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf - fi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` - echo ${UNAME_MACHINE}-pc-isc$UNAME_REL - elif /bin/uname -X 2>/dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says <Richard.M.Bartel@ccMail.Census.GOV> - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes <hewes@openmarket.com>. - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NEO-?:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c <<EOF -#ifdef _SEQUENT_ -# include <sys/types.h> -# include <sys/utsname.h> -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include <sys/param.h> - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include <sys/param.h> -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 <<EOF -$0: unable to guess system type - -This script, last modified $timestamp, has failed to recognize -the operating system you are using. It is advised that you -download the most up to date version of the config scripts from - - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD -and - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -If the version you run ($0) is already up to date, please -send the following data and any information you think might be -pertinent to <config-patches@gnu.org> in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/volk/config.sub b/volk/config.sub deleted file mode 100644 index f9fcdc879..000000000 --- a/volk/config.sub +++ /dev/null @@ -1,1756 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. - -timestamp='2011-06-03' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file 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 2 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. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to <config-patches@gnu.org>. Submit a context -# diff and a properly formatted GNU ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to <config-patches@gnu.org>." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 \ - | ns16k | ns32k \ - | open8 \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pyramid \ - | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | we32k \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - strongarm | thumb | xscale) - basic_machine=arm-unknown - ;; - - xscaleeb) - basic_machine=armeb-unknown - ;; - - xscaleel) - basic_machine=armel-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pyramid-* \ - | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze) - basic_machine=microblaze-xilinx - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc | ppcbe) basic_machine=powerpc-unknown - ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - strongarm-* | thumb-*) - basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tile*) - basic_machine=$basic_machine-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - xscale-* | xscalee[bl]-*) - basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -nacl*) - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - tic54x-*) - os=-coff - ;; - tic55x-*) - os=-coff - ;; - tic6x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/volk/config/.gitignore b/volk/config/.gitignore deleted file mode 100644 index 6330cd1b6..000000000 --- a/volk/config/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -*.cache -/*.la -/*.lo -/*.pc -/.deps -/.la -/.libs -/.lo -/Makefile -/Makefile.in -/libtool.m4 -/ltoptions.m4 -/ltsugar.m4 -/ltversion.m4 -/lt~obsolete.m4 -/lv_set_simd_flags.m4 diff --git a/volk/config/Makefile.am b/volk/config/Makefile.am deleted file mode 100644 index d4786f83a..000000000 --- a/volk/config/Makefile.am +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright 2001 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 - -# Install m4 macros in this directory -m4datadir = $(datadir)/aclocal - -# List your m4 macros here -m4macros = \ - acx_pthread.m4 \ - ax_boost_base.m4 \ - ax_boost_unit_test_framework.m4 \ - bnv_have_qt.m4 \ - gr_lib64.m4 \ - gr_libgnuradio_core_extra_ldflags.m4 \ - gr_no_undefined.m4 \ - gr_omnithread.m4 \ - gr_pwin32.m4 \ - gr_set_md_cpu.m4 \ - lv_configure.m4 \ - gr_sysv_shm.m4 \ - lf_cc.m4 \ - lf_cxx.m4 \ - lf_warnings.m4 \ - lf_x11.m4 \ - $(top_gendir)/config/lv_set_simd_flags.m4 \ - mkstemp.m4 \ - onceonly.m4 \ - pkg.m4 \ - orc.m4 \ - gcc_version_workaround.m4 - - - - -# Don't install m4 macros anymore -# m4data_DATA = $(m4macros) - -EXTRA_DIST = $(m4macros) diff --git a/volk/config/acx_pthread.m4 b/volk/config/acx_pthread.m4 deleted file mode 100644 index eb09f5acc..000000000 --- a/volk/config/acx_pthread.m4 +++ /dev/null @@ -1,275 +0,0 @@ -# =========================================================================== -# http://autoconf-archive.cryp.to/acx_pthread.html -# =========================================================================== -# -# SYNOPSIS -# -# ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -# -# DESCRIPTION -# -# This macro figures out how to build C programs using POSIX threads. It -# sets the PTHREAD_LIBS output variable to the threads library and linker -# flags, and the PTHREAD_CFLAGS output variable to any special C compiler -# flags that are needed. (The user can also force certain compiler -# flags/libs to be tested by setting these environment variables.) -# -# Also sets PTHREAD_CC to any special C compiler that is needed for -# multi-threaded programs (defaults to the value of CC otherwise). (This -# is necessary on AIX to use the special cc_r compiler alias.) -# -# NOTE: You are assumed to not only compile your program with these flags, -# but also link it with them as well. e.g. you should link with -# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS -# -# If you are only building threads programs, you may wish to use these -# variables in your default LIBS, CFLAGS, and CC: -# -# LIBS="$PTHREAD_LIBS $LIBS" -# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -# CC="$PTHREAD_CC" -# -# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant -# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name -# (e.g. PTHREAD_CREATE_UNDETACHED on AIX). -# -# ACTION-IF-FOUND is a list of shell commands to run if a threads library -# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it -# is not found. If ACTION-IF-FOUND is not specified, the default action -# will define HAVE_PTHREAD. -# -# Please let the authors know if this macro fails on any platform, or if -# you have any other suggestions or comments. This macro was based on work -# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help -# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by -# Alejandro Forero Cuervo to the autoconf macro repository. We are also -# grateful for the helpful feedback of numerous users. -# -# LAST MODIFICATION -# -# 2008-04-12 -# -# COPYLEFT -# -# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu> -# -# 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/>. -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Macro Archive. When you make and -# distribute a modified version of the Autoconf Macro, you may extend this -# special exception to the GPL to apply to your modified version as well. - -AC_DEFUN([ACX_PTHREAD], [ -AC_REQUIRE([AC_CANONICAL_HOST]) -AC_LANG_SAVE -AC_LANG_C -acx_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) - AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) - AC_MSG_RESULT($acx_pthread_ok) - if test x"$acx_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. - -acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# ... -mt is also the pthreads flag for HP/aCC -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) - -case "${host_cpu}-${host_os}" in - *solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - - acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" - ;; -esac - -if test x"$acx_pthread_ok" = xno; then -for flag in $acx_pthread_flags; do - - case $flag in - none) - AC_MSG_CHECKING([whether pthreads work without any flags]) - ;; - - -*) - AC_MSG_CHECKING([whether pthreads work with $flag]) - PTHREAD_CFLAGS="$flag" - ;; - - pthread-config) - AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no) - if test x"$acx_pthread_config" = xno; then continue; fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - AC_MSG_CHECKING([for the pthreads library -l$flag]) - PTHREAD_LIBS="-l$flag" - ;; - esac - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - AC_TRY_LINK([#include <pthread.h>], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [acx_pthread_ok=yes]) - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - AC_MSG_RESULT($acx_pthread_ok) - if test "x$acx_pthread_ok" = xyes; then - break; - fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - -# Various other checks: -if test "x$acx_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - AC_MSG_CHECKING([for joinable pthread attribute]) - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;], - [attr_name=$attr; break]) - done - AC_MSG_RESULT($attr_name) - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, - [Define to necessary symbol if this constant - uses a non-standard name on your system.]) - fi - - AC_MSG_CHECKING([if more special flags are required for pthreads]) - flag=no - case "${host_cpu}-${host_os}" in - *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; - *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; - esac - AC_MSG_RESULT(${flag}) - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - # More AIX lossage: must compile with xlc_r or cc_r - if test x"$GCC" != xyes; then - AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC}) - else - PTHREAD_CC=$CC - fi -else - PTHREAD_CC="$CC" -fi - -AC_SUBST(PTHREAD_LIBS) -AC_SUBST(PTHREAD_CFLAGS) -AC_SUBST(PTHREAD_CC) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$acx_pthread_ok" = xyes; then - ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) - : -else - acx_pthread_ok=no - $2 -fi -AC_LANG_RESTORE -])dnl ACX_PTHREAD diff --git a/volk/config/ax_boost_base.m4 b/volk/config/ax_boost_base.m4 deleted file mode 100644 index f2a7f6e83..000000000 --- a/volk/config/ax_boost_base.m4 +++ /dev/null @@ -1,334 +0,0 @@ -# =========================================================================== -# http://autoconf-archive.cryp.to/ax_boost_base.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_BOOST_BASE([MINIMUM-VERSION]) -# -# DESCRIPTION -# -# Test for the Boost C++ libraries of a particular version (or newer) -# -# If no path to the installed boost library is given the macro searchs -# under /usr, /usr/local, /opt and /opt/local and evaluates the -# $BOOST_ROOT environment variable. Further documentation is available at -# <http://randspringer.de/boost/index.html>. -# -# This macro calls: -# -# AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS) -# -# And sets: -# -# HAVE_BOOST -# -# LAST MODIFICATION -# -# 2008-04-12 -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_BASE], -[ -AC_REQUIRE([GR_LIB64]) -AC_ARG_WITH([boost], - AS_HELP_STRING([--with-boost@<:@=DIR@:>@], - [use boost (default is yes) - it is possible to specify the root directory for boost (optional)]), - [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ac_boost_path="" - else - want_boost="yes" - ac_boost_path="$withval" - fi - ], - [want_boost="yes"]) - - -AC_ARG_WITH([boost-libdir], - AS_HELP_STRING([--with-boost-libdir=LIB_DIR], - [Force given directory for boost libraries. Note that this - will overwrite library path detection, so use this parameter - only if default library detection fails and you know exactly - where your boost libraries are located.]), - [ - if test -d $withval - then - ac_boost_lib_path="$withval" - else - AC_MSG_ERROR(--with-boost-libdir expected directory name) - fi - ], - [ac_boost_lib_path=""] -) - -if test "x$want_boost" = "xyes"; then - boost_lib_version_req=ifelse([$1], ,1.20.0,$1) - boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'` - boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'` - boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'` - boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` - if test "x$boost_lib_version_req_sub_minor" = "x" ; then - boost_lib_version_req_sub_minor="0" - fi - WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor` - AC_MSG_CHECKING(for boost >= $boost_lib_version_req) - succeeded=no - - dnl first we check the system location for boost libraries - dnl this location ist chosen if boost libraries are installed with the --layout=system option - dnl or if you install boost with RPM - if test "$ac_boost_path" != ""; then - dnl Look first where we think they ought to be, accounting for a possible "64" suffix on lib. - dnl If that directory doesn't exist, fall back to the default behavior - if test -d "$ac_boost_path/lib${gr_libdir_suffix}"; then - BOOST_LDFLAGS="-L$ac_boost_path/lib${gr_libdir_suffix}" - else - BOOST_LDFLAGS="-L$ac_boost_path/lib" - fi - BOOST_CPPFLAGS="-I$ac_boost_path/include" - else - for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do - if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then - dnl Look first where we think they ought to be, accounting for a possible "64" suffix on lib. - dnl If that directory doesn't exist, fall back to the default behavior - if test -d "$ac_boost_path_tmp/lib${gr_libdir_suffix}"; then - BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib${gr_libdir_suffix}" - else - BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib" - fi - BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include" - break; - fi - done - fi - - dnl overwrite ld flags if we have required special directory with - dnl --with-boost-libdir parameter - if test "$ac_boost_lib_path" != ""; then - BOOST_LDFLAGS="-L$ac_boost_lib_path" - fi - - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - @%:@include <boost/version.hpp> - ]], [[ - #if BOOST_VERSION >= $WANT_BOOST_VERSION - // Everything is okay - #else - # error Boost version is too old - #endif - ]])],[AC_MSG_RESULT(yes) - succeeded=yes - found_system=yes - ], - []) - AC_LANG_POP([C++]) - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - - - dnl if we found no boost with system layout we search for boost libraries - dnl built and installed without the --layout=system option - if test "$succeeded" != "yes"; then - _version=0 - - if test "$ac_boost_path" != ""; then - path_list="$ac_boost_path" - else - path_list="/usr /usr/local /opt /opt/local" - fi - for ac_boost_path in $path_list ; do - if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then - for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do - _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's,/include/boost-,,; s,_,.,'` - V_CHECK=`expr $_version_tmp \> $_version` - if test "$V_CHECK" = "1" ; then - _version=$_version_tmp - best_path=$ac_boost_path - fi - done - fi - done - - VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` - BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" - - if test "$ac_boost_lib_path" = ""; then - dnl Look first where we think they ought to be, accounting for a possible "64" suffix on lib. - dnl If that directory doesn't exist, fall back to the default behavior - if test -d "$best_path/lib${gr_libdir_suffix}"; then - BOOST_LDFLAGS="-L$best_path/lib${gr_libdir_suffix}" - else - BOOST_LDFLAGS="-L$best_path/lib" - fi - fi - - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - @%:@include <boost/version.hpp> - ]], [[ - #if BOOST_VERSION >= $WANT_BOOST_VERSION - // Everything is okay - #else - # error Boost version is too old - #endif - ]])],[AC_MSG_RESULT(yes) - succeeded=yes - found_system=yes - ], - []) - AC_LANG_POP([C++]) - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - fi - - if test "$succeeded" != "yes" ; then - AC_MSG_RESULT([no]) - if test "$_version" = "0" ; then - AC_MSG_ERROR([[we could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). -If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>.]]) - else - AC_MSG_ERROR([your boost libraries seem to old (version $_version).]) - fi - else - AC_SUBST(BOOST_CPPFLAGS) - AC_SUBST(BOOST_LDFLAGS) - AC_DEFINE(HAVE_BOOST,1,[Define if the Boost headers are available]) - fi -fi -]) - -dnl -dnl Macros used by the boost items that need libraries. -dnl - -dnl $1 is unit name. E.g., boost_thread -AC_DEFUN([_AX_BOOST_CHECK_LIB],[ - _AX_BOOST_CHECK_LIB_($1,HAVE_[]m4_toupper($1),m4_toupper($1)_LIB) -]) - -dnl $1 is unit name. E.g., boost_thread -dnl $2 is AC_DEFINE name. E.g., HAVE_BOOST_THREAD -dnl $3 is lib var name. E.g., BOOST_THREAD_LIB -AC_DEFUN([_AX_BOOST_CHECK_LIB_],[ - AC_LANG_PUSH([C++]) - AC_DEFINE($2,1,[Define if the $1 library is available]) - BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` - - dnl See if we can find a usable library - link_ok="no" - if test "$ax_boost_user_lib" != ""; then - dnl use what the user supplied - for ax_lib in $ax_boost_user_lib $1-${ax_boost_user_lib}; do - AC_CHECK_LIB($ax_lib, exit, - [$3="-l$ax_lib"; AC_SUBST($3) link_ok="yes"; break]) - done - else - dnl Look in BOOSTLIBDIR for possible candidates - head=$BOOSTLIBDIR/lib[]$1 - for f in ${head}*.so* ${head}*.a* ${head}*.dll* ${head}*.dylib; do - dnl echo 1: $f - case $f in - *\**) continue;; - esac - f=`echo $f | sed -e 's,.*/,,' -e 's,^lib,,'` - dnl echo 2: $f - f=`echo $f | sed -e 's,\($1.*\)\.so.*$,\1,' -e 's,\($1.*\)\.a.*$,\1,' -e 's,\($1.*\)\.dll.*$,\1,' -e 's,\($1.*\)\.dylib.*$,\1,'` - dnl echo 3: $f - - ax_lib=$f - AC_CHECK_LIB($ax_lib, exit, - [$3="-l$ax_lib"; AC_SUBST($3) link_ok="yes"; break]) - done - fi - - if test "$link_ok" != "yes"; then - AC_MSG_ERROR([Could not link against lib[$1]!]) - fi - AC_LANG_POP([C++]) -]) - - -dnl $1 is unit name. E.g., boost_thread -AC_DEFUN([_AX_BOOST_WITH],[ - _AX_BOOST_WITH_([$1], [m4_bpatsubst($1,_,-)]) -]) - -dnl $1 is unit name. E.g., boost_thread -dnl $2 is hyphenated unit name. E.g., boost-thread -AC_DEFUN([_AX_BOOST_WITH_],[ - AC_ARG_WITH([$2], - AC_HELP_STRING([--with-$2@<:@=special-lib@:>@], - [Use the m4_substr($1,6) library from boost. It is possible to specify a certain - library to the linker. E.g., --with-$2=$1-gcc41-mt-1_35]), - [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ax_boost_user_lib="" - else - want_boost="yes" - ax_boost_user_lib="$withval" - fi - ], - [want_boost="yes"]) -]) - -dnl $1 is unit name. E.g., boost_thread -dnl $2 is AC_LANG_PROGRAM argument 1 -dnl $3 is AC_LANG_PROGRAM argument 2 -dnl $4 is cv variable name. E.g., ax_cv_boost_thread -AC_DEFUN([_AX_BOOST_CHECK_],[ - _AX_BOOST_WITH([$1]) - if test "$want_boost" = "yes"; then - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_PROG_CXX]) - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - AC_CACHE_CHECK([whether the boost::m4_substr([$1],6) includes are available], [$4], - [AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$2],[$3])], [[$4]=yes], [[$4]=no]) - AC_LANG_POP([C++]) - ]) - if test "$[$4]" = "yes"; then - _AX_BOOST_CHECK_LIB([$1]) - fi - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - fi -]) - -dnl $1 is unit name. E.g., boost_thread -dnl $2 is AC_LANG_PROGRAM argument 1 -dnl $3 is AC_LANG_PROGRAM argument 2 -AC_DEFUN([_AX_BOOST_CHECK],[ - _AX_BOOST_CHECK_([$1], [$2], [$3], [ax_cv_$1]) -]) diff --git a/volk/config/ax_boost_unit_test_framework.m4 b/volk/config/ax_boost_unit_test_framework.m4 deleted file mode 100644 index 73affccfd..000000000 --- a/volk/config/ax_boost_unit_test_framework.m4 +++ /dev/null @@ -1,36 +0,0 @@ -# -# SYNOPSIS -# -# AX_BOOST_UNIT_TEST_FRAMEWORK -# -# DESCRIPTION -# -# Test for Unit_Test_Framework library from the Boost C++ libraries. The -# macro requires a preceding call to AX_BOOST_BASE. -# -# This macro calls: -# -# AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB) -# -# And sets: -# -# HAVE_BOOST_UNIT_TEST_FRAMEWORK -# -# COPYLEFT -# -# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> -# Copyright (c) 2008 Free Software Foundation, Inc. -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -AC_DEFUN([AX_BOOST_UNIT_TEST_FRAMEWORK], -[ - AC_REQUIRE([AX_BOOST_BASE]) - _AX_BOOST_CHECK([boost_unit_test_framework], - [@%:@include <boost/test/unit_test.hpp>], - [using boost::unit_test::test_suite; - test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" ); - return 0;]) -]) diff --git a/volk/config/bnv_have_qt.m4 b/volk/config/bnv_have_qt.m4 deleted file mode 100644 index 1469bfbfd..000000000 --- a/volk/config/bnv_have_qt.m4 +++ /dev/null @@ -1,404 +0,0 @@ -dnl Available from the GNU Autoconf Macro Archive at: -dnl http://www.gnu.org/software/ac-archive/htmldoc/bnv_have_qt.html -dnl -AC_DEFUN([BNV_HAVE_QT], -[ - dnl THANKS! This code includes bug fixes by: - dnl Tim McClarren. - - AC_REQUIRE([AC_PROG_CXX]) - AC_REQUIRE([AC_PATH_X]) - AC_REQUIRE([AC_PATH_XTRA]) - - AC_MSG_CHECKING(for Qt) - - AC_ARG_WITH([Qt-dir], - [ --with-Qt-dir=DIR DIR is equal to \$QTDIR if you have followed the - installation instructions of Trolltech. Header - files are in DIR/include, binary utilities are - in DIR/bin and the library is in DIR/lib]) - AC_ARG_WITH([Qt-include-dir], - [ --with-Qt-include-dir=DIR - Qt header files are in DIR]) - AC_ARG_WITH([Qt-bin-dir], - [ --with-Qt-bin-dir=DIR Qt utilities such as moc and uic are in DIR]) - AC_ARG_WITH([Qt-lib-dir], - [ --with-Qt-lib-dir=DIR The Qt library is in DIR]) - AC_ARG_WITH([Qt-lib], - [ --with-Qt-lib=LIB Use -lLIB to link with the Qt library]) - if test x"$with_Qt_dir" = x"no" || - test x"$with_Qt_include-dir" = x"no" || - test x"$with_Qt_bin_dir" = x"no" || - test x"$with_Qt_lib_dir" = x"no" || - test x"$with_Qt_lib" = x"no"; then - # user disabled Qt. Leave cache alone. - have_qt="User disabled Qt." - else - # "yes" is a bogus option - if test x"$with_Qt_dir" = xyes; then - with_Qt_dir= - fi - if test x"$with_Qt_include_dir" = xyes; then - with_Qt_include_dir= - fi - if test x"$with_Qt_bin_dir" = xyes; then - with_Qt_bin_dir= - fi - if test x"$with_Qt_lib_dir" = xyes; then - with_Qt_lib_dir= - fi - if test x"$with_Qt_lib" = xyes; then - with_Qt_lib= - fi - # No Qt unless we discover otherwise - have_qt=no - # Check whether we are requested to link with a specific version - if test x"$with_Qt_lib" != x; then - bnv_qt_lib="$with_Qt_lib" - fi - # Check whether we were supplied with an answer already - if test x"$with_Qt_dir" != x; then - have_qt=yes - bnv_qt_dir="$with_Qt_dir" - bnv_qt_include_dir="$with_Qt_dir/include" - bnv_qt_bin_dir="$with_Qt_dir/bin" - bnv_qt_lib_dir="$with_Qt_dir/lib" - # Only search for the lib if the user did not define one already - if test x"$bnv_qt_lib" = x; then - bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p | - sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`" - fi - bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" - else - # Use cached value or do search, starting with suggestions from - # the command line - AC_CACHE_VAL(bnv_cv_have_qt, - [ - # We are not given a solution and there is no cached value. - bnv_qt_dir=NO - bnv_qt_include_dir=NO - bnv_qt_lib_dir=NO - if test x"$bnv_qt_lib" = x; then - bnv_qt_lib=NO - fi - BNV_PATH_QT_DIRECT - if test "$bnv_qt_dir" = NO || - test "$bnv_qt_include_dir" = NO || - test "$bnv_qt_lib_dir" = NO || - test "$bnv_qt_lib" = NO; then - # Problem with finding complete Qt. Cache the known absence of Qt. - bnv_cv_have_qt="have_qt=no" - else - # Record where we found Qt for the cache. - bnv_cv_have_qt="have_qt=yes \ - bnv_qt_dir=$bnv_qt_dir \ - bnv_qt_include_dir=$bnv_qt_include_dir \ - bnv_qt_bin_dir=$bnv_qt_bin_dir \ - bnv_qt_LIBS=\"$bnv_qt_LIBS\"" - fi - ])dnl - eval "$bnv_cv_have_qt" - fi # all $bnv_qt_* are set - fi # $have_qt reflects the system status - if test x"$have_qt" = xyes; then - QT_CXXFLAGS="-I$bnv_qt_include_dir" - QT_DIR="$bnv_qt_dir" - QT_LIBS="$bnv_qt_LIBS" - # If bnv_qt_dir is defined, utilities are expected to be in the - # bin subdirectory - if test x"$bnv_qt_dir" != x; then - if test -x "$bnv_qt_dir/bin/uic"; then - QT_UIC="$bnv_qt_dir/bin/uic" - else - # Old versions of Qt don't have uic - QT_UIC= - fi - QT_MOC="$bnv_qt_dir/bin/moc" - else - # Or maybe we are told where to look for the utilities - if test x"$bnv_qt_bin_dir" != x; then - if test -x "$bnv_qt_bin_dir/uic"; then - QT_UIC="$bnv_qt_bin_dir/uic" - else - # Old versions of Qt don't have uic - QT_UIC= - fi - QT_MOC="$bnv_qt_bin_dir/moc" - else - # Last possibility is that they are in $PATH - QT_UIC="`which uic`" - QT_MOC="`which moc`" - fi - fi - # All variables are defined, report the result - AC_MSG_RESULT([$have_qt: - QT_CXXFLAGS=$QT_CXXFLAGS - QT_DIR=$QT_DIR - QT_LIBS=$QT_LIBS - QT_UIC=$QT_UIC - QT_MOC=$QT_MOC]) - else - # Qt was not found - QT_CXXFLAGS= - QT_DIR= - QT_LIBS= - QT_UIC= - QT_MOC= - AC_MSG_RESULT($have_qt) - fi - AC_SUBST(QT_CXXFLAGS) - AC_SUBST(QT_DIR) - AC_SUBST(QT_LIBS) - AC_SUBST(QT_UIC) - AC_SUBST(QT_MOC) - - #### Being paranoid: - if test x"$have_qt" = xyes; then - AC_MSG_CHECKING(correct functioning of Qt installation) - AC_CACHE_VAL(bnv_cv_qt_test_result, - [ - cat > bnv_qt_test.h << EOF -#include <qobject.h> -class Test : public QObject -{ -Q_OBJECT -public: - Test() {} - ~Test() {} -public slots: - void receive() {} -signals: - void send(); -}; -EOF - - cat > bnv_qt_main.$ac_ext << EOF -#include "bnv_qt_test.h" -#include <qapplication.h> -int main( int argc, char **argv ) -{ - QApplication app( argc, argv ); - Test t; - QObject::connect( &t, SIGNAL(send()), &t, SLOT(receive()) ); -} -EOF - - bnv_cv_qt_test_result="failure" - bnv_try_1="$QT_MOC bnv_qt_test.h -o moc_bnv_qt_test.$ac_ext >/dev/null 2>bnv_qt_test_1.out" - AC_TRY_EVAL(bnv_try_1) - bnv_err_1=`grep -v '^ *+' bnv_qt_test_1.out | grep -v "^bnv_qt_test.h\$"` - if test x"$bnv_err_1" != x; then - echo "$bnv_err_1" >&AC_FD_CC - echo "configure: could not run $QT_MOC on:" >&AC_FD_CC - cat bnv_qt_test.h >&AC_FD_CC - else - bnv_try_2="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o moc_bnv_qt_test.o moc_bnv_qt_test.$ac_ext >/dev/null 2>bnv_qt_test_2.out" - AC_TRY_EVAL(bnv_try_2) - bnv_err_2=`grep -v '^ *+' bnv_qt_test_2.out | grep -v "^bnv_qt_test.{$ac_ext}\$"` - if test x"$bnv_err_2" != x; then - echo "$bnv_err_2" >&AC_FD_CC - echo "configure: could not compile:" >&AC_FD_CC - cat bnv_qt_test.$ac_ext >&AC_FD_CC - else - bnv_try_3="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o bnv_qt_main.o bnv_qt_main.$ac_ext >/dev/null 2>bnv_qt_test_3.out" - AC_TRY_EVAL(bnv_try_3) - bnv_err_3=`grep -v '^ *+' bnv_qt_test_3.out | grep -v "^bnv_qt_main.{$ac_ext}\$"` - if test x"$bnv_err_3" != x; then - echo "$bnv_err_3" >&AC_FD_CC - echo "configure: could not compile:" >&AC_FD_CC - cat bnv_qt_main.$ac_ext >&AC_FD_CC - else - bnv_try_4="$CXX $QT_LIBS $LIBS -o bnv_qt_main bnv_qt_main.o moc_bnv_qt_test.o >/dev/null 2>bnv_qt_test_4.out" - AC_TRY_EVAL(bnv_try_4) - bnv_err_4=`grep -v '^ *+' bnv_qt_test_4.out` - if test x"$bnv_err_4" != x; then - echo "$bnv_err_4" >&AC_FD_CC - else - bnv_cv_qt_test_result="success" - fi - fi - fi - fi - ])dnl AC_CACHE_VAL bnv_cv_qt_test_result - AC_MSG_RESULT([$bnv_cv_qt_test_result]); - if test x"$bnv_cv_qt_test_result" = "xfailure"; then - # working Qt was not found - QT_CXXFLAGS= - QT_DIR= - QT_LIBS= - QT_UIC= - QT_MOC= - have_qt=no - AC_MSG_WARN([Failed to find matching components of a complete - Qt installation. Try using more options, - see ./configure --help.]) - fi - - rm -f bnv_qt_test.h moc_bnv_qt_test.$ac_ext moc_bnv_qt_test.o \ - bnv_qt_main.$ac_ext bnv_qt_main.o bnv_qt_main \ - bnv_qt_test_1.out bnv_qt_test_2.out bnv_qt_test_3.out bnv_qt_test_4.out - fi -]) - -dnl Internal subroutine of BNV_HAVE_QT -dnl Set bnv_qt_dir bnv_qt_include_dir bnv_qt_bin_dir bnv_qt_lib_dir bnv_qt_lib -dnl Copyright 2001 Bastiaan N. Veelo <Bastiaan.N.Veelo@immtek.ntnu.no> -AC_DEFUN([BNV_PATH_QT_DIRECT], -[ - ## Binary utilities ## - if test x"$with_Qt_bin_dir" != x; then - bnv_qt_bin_dir=$with_Qt_bin_dir - fi - ## Look for header files ## - if test x"$with_Qt_include_dir" != x; then - bnv_qt_include_dir="$with_Qt_include_dir" - else - # The following header file is expected to define QT_VERSION. - qt_direct_test_header=qglobal.h - # Look for the header file in a standard set of common directories. - bnv_include_path_list=" - /usr/include - `ls -dr /usr/include/qt* 2>/dev/null` - `ls -dr /usr/lib/qt*/include 2>/dev/null` - `ls -dr /usr/local/qt*/include 2>/dev/null` - `ls -dr /opt/qt*/include 2>/dev/null` - " - for bnv_dir in $bnv_include_path_list; do - if test -r "$bnv_dir/$qt_direct_test_header"; then - bnv_dirs="$bnv_dirs $bnv_dir" - fi - done - # Now look for the newest in this list - bnv_prev_ver=0 - for bnv_dir in $bnv_dirs; do - bnv_this_ver=`egrep -w '#define QT_VERSION' $bnv_dir/$qt_direct_test_header | sed s/'#define QT_VERSION'//` - if expr $bnv_this_ver '>' $bnv_prev_ver > /dev/null; then - bnv_qt_include_dir=$bnv_dir - bnv_prev_ver=$bnv_this_ver - fi - done - fi dnl Found header files. - - # Are these headers located in a traditional Trolltech installation? - # That would be $bnv_qt_include_dir stripped from its last element: - bnv_possible_qt_dir=`dirname $bnv_qt_include_dir` - if test -x $bnv_possible_qt_dir/bin/moc && - ls $bnv_possible_qt_dir/lib/libqt* > /dev/null; then - # Then the rest is a piece of cake - bnv_qt_dir=$bnv_possible_qt_dir - bnv_qt_bin_dir="$bnv_qt_dir/bin" - bnv_qt_lib_dir="$bnv_qt_dir/lib" - # Only look for lib if the user did not supply it already - if test x"$bnv_qt_lib" = xNO; then - bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p | - sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`" - fi - bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" - else - # There is no valid definition for $QTDIR as Trolltech likes to see it - bnv_qt_dir= - ## Look for Qt library ## - if test x"$with_Qt_lib_dir" != x; then - bnv_qt_lib_dir="$with_Qt_lib_dir" - # Only look for lib if the user did not supply it already - if test x"$bnv_qt_lib" = xNO; then - bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p | - sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`" - fi - bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" - else - # Normally, when there is no traditional Trolltech installation, - # the library is installed in a place where the linker finds it - # automatically. - # If the user did not define the library name, try with qt - if test x"$bnv_qt_lib" = xNO; then - bnv_qt_lib=qt - fi - qt_direct_test_header=qapplication.h - qt_direct_test_main=" - int argc; - char ** argv; - QApplication app(argc,argv); - " - # See if we find the library without any special options. - # Don't add top $LIBS permanently yet - bnv_save_LIBS="$LIBS" - LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" - bnv_qt_LIBS="$LIBS" - bnv_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="-I$bnv_qt_include_dir" - AC_TRY_LINK([#include <$qt_direct_test_header>], - $qt_direct_test_main, - [ - # Success. - # We can link with no special library directory. - bnv_qt_lib_dir= - ], [ - # That did not work. Try the multi-threaded version - echo "Non-critical error, please neglect the above." >&AC_FD_CC - bnv_qt_lib=qt-mt - LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" - AC_TRY_LINK([#include <$qt_direct_test_header>], - $qt_direct_test_main, - [ - # Success. - # We can link with no special library directory. - bnv_qt_lib_dir= - ], [ - # That did not work. Try the OpenGL version - echo "Non-critical error, please neglect the above." >&AC_FD_CC - bnv_qt_lib=qt-gl - LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" - AC_TRY_LINK([#include <$qt_direct_test_header>], - $qt_direct_test_main, - [ - # Succes. - # We can link with no special library directory. - bnv_qt_lib_dir= - ], [ - # That did not work. Maybe a library version I don't know about? - echo "Non-critical error, please neglect the above." >&AC_FD_CC - # Look for some Qt lib in a standard set of common directories. - bnv_dir_list=" - `echo $bnv_qt_includes | sed ss/includess` - /lib - /usr/lib - /usr/local/lib - /opt/lib - `ls -dr /usr/lib/qt* 2>/dev/null` - `ls -dr /usr/local/qt* 2>/dev/null` - `ls -dr /opt/qt* 2>/dev/null` - " - for bnv_dir in $bnv_dir_list; do - if ls $bnv_dir/libqt*; then - # Gamble that it's the first one... - bnv_qt_lib="`ls $bnv_dir/libqt* | sed -n 1p | - sed s@$bnv_dir/lib@@ | sed s/[.].*//`" - bnv_qt_lib_dir="$bnv_dir" - break - fi - done - # Try with that one - LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" - AC_TRY_LINK([#include <$qt_direct_test_header>], - $qt_direct_test_main, - [ - # Succes. - # We can link with no special library directory. - bnv_qt_lib_dir= - ], [ - # Leave bnv_qt_lib_dir defined - ]) - ]) - ]) - ]) - if test x"$bnv_qt_lib_dir" != x; then - bnv_qt_LIBS="-l$bnv_qt_lib_dir $LIBS" - else - bnv_qt_LIBS="$LIBS" - fi - LIBS="$bnv_save_LIBS" - CXXFLAGS="$bnv_save_CXXFLAGS" - fi dnl $with_Qt_lib_dir was not given - fi dnl Done setting up for non-traditional Trolltech installation -]) diff --git a/volk/config/gcc_version_workaround.m4 b/volk/config/gcc_version_workaround.m4 deleted file mode 100755 index 3cd8a0cc7..000000000 --- a/volk/config/gcc_version_workaround.m4 +++ /dev/null @@ -1,53 +0,0 @@ -AC_DEFUN([LV_GCC_VERSION_WORKAROUND], -[ - case "${host_os}" in - *cygwin*) - ;; - *) - AC_REQUIRE([LF_CONFIGURE_CXX]) - - cxx_version=`$CXX --version` - - cxx_major_version=`echo $cxx_version | sed 's/[[^)]]*) \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\1/'` - cxx_minor_version=`echo $cxx_version | sed 's/g++ [[^)]]*) \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\2/'` - cxx_micro_version=`echo $cxx_version | sed 's/g++ [[^)]]*) \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\3/'` - - if test ["$cxx_minor_version" -lt "3"] -o ["$cxx_major_version" -lt "4"]; then - cxx_proper_version="$cxx_major_version.$cxx_minor_version.$cxx_micro_version" - - - my_arch=`uname -m` - - if test "${my_arch}" = i686; then - my_arch="${my_arch} i586 i486 i386" - fi - if test "${my_arch}" = i586; then - my_arch = "${my_arch} i686 i386 i486" - fi - if test "${my_arch}" = i486; then - my_arch = "${my_arch} i686 i386 i586" - fi - if test "${my_arch}" = i386; then - my_arch = "${my_arch} i686 i586 i486" - fi - - for i in $my_arch - do - if test -n "`ls /usr/include/c++/$cxx_proper_version | grep $i`"; then - mystery_dir=`ls /usr/include/c++/$cxx_proper_version | grep $i` - echo `ls /usr/include/c++/$cxx_proper_version | grep $i` - fi - done - echo "${mystery_dir}" - - LV_CXXFLAGS="${LV_CXXFLAGS} -nostdinc++ -I/usr/include/c++/$cxx_proper_version -I/usr/include/c++/$cxx_proper_version/$mystery_dir" - - CXXFLAGS="${CXXFLAGS} -nostdinc++ -I/usr/include/c++/$cxx_proper_version -I/usr/include/c++/$cxx_proper_version/$mystery_dir" - - - - fi - - esac - - ])
\ No newline at end of file diff --git a/volk/config/gr_lib64.m4 b/volk/config/gr_lib64.m4 deleted file mode 100644 index 751f774b4..000000000 --- a/volk/config/gr_lib64.m4 +++ /dev/null @@ -1,85 +0,0 @@ -dnl -dnl Copyright 2005,2008 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. -dnl - -dnl GR_LIB64() -dnl -dnl Checks to see if we're on a x86_64 or powerpc64 machine, and if so, determine -dnl if libdir should end in "64" or not. -dnl -dnl Sets gr_libdir_suffix to "" or "64" and calls AC_SUBST(gr_libdir_suffix) -dnl May append "64" to libdir. -dnl -dnl The current heuristic is: -dnl if the host_cpu isn't x86_64 or powerpc64, then "" -dnl if the host_os isn't linux, then "" -dnl if we're cross-compiling, ask the linker, by way of the selected compiler -dnl if we're x86_64 and there's a /lib64 and it's not a symlink, then "64", else "" -dnl else ask the compiler -dnl -AC_DEFUN([GR_LIB64],[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AC_PROG_CXX]) - - AC_MSG_CHECKING([gr_libdir_suffix]) - gr_libdir_suffix="" - AC_SUBST(gr_libdir_suffix) - - case "$host_os" in - linux*) is_linux=yes ;; - *) is_linux=no ;; - esac - - if test "$is_linux" = no || test "$host_cpu" != "x86_64" && test "$host_cpu" != "powerpc64"; then - gr_libdir_suffix="" - elif test "$cross_compiling" = yes; then - _GR_LIB64_ASK_COMPILER - elif test "$host_cpu" = "x86_64"; then - if test -d /lib64 && test ! -L /lib64; then - gr_libdir_suffix=64 - fi - else - _GR_LIB64_ASK_COMPILER - fi - AC_MSG_RESULT([$gr_libdir_suffix]) - - - AC_MSG_CHECKING([whether to append 64 to libdir]) - t=${libdir##*/lib} - if test "$t" != 64 && test "$gr_libdir_suffix" = "64"; then - libdir=${libdir}64 - AC_MSG_RESULT([yes. Setting libdir to $libdir]) - else - AC_MSG_RESULT([no]) - fi -]) - -dnl If we're using g++, extract the first SEARCH_DIR("...") entry from the linker script -dnl and see if it contains a suffix after the final .../lib part of the path. -dnl (This works because the linker script varies depending on whether we're generating -dnl 32-bit or 64-bit executables) -dnl -AC_DEFUN([_GR_LIB64_ASK_COMPILER],[ - if test "$ac_cv_cxx_compiler_gnu" = "yes"; - then - gr_libdir_suffix=`$CXX -Wl,--verbose 2>/dev/null | sed -n -e '/SEARCH_DIR/{s/;.*$//; s,^.*/,,; s/".*$//; s/^lib//; p}'` - fi -]) - diff --git a/volk/config/gr_libgnuradio_core_extra_ldflags.m4 b/volk/config/gr_libgnuradio_core_extra_ldflags.m4 deleted file mode 100644 index 43f872c04..000000000 --- a/volk/config/gr_libgnuradio_core_extra_ldflags.m4 +++ /dev/null @@ -1,40 +0,0 @@ -# Check for (MinGW)win32 extra ld options. -*- Autoconf -*- - -# Copyright 2003,2004,2005 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. - -dnl -AC_DEFUN([GR_LIBGNURADIO_CORE_EXTRA_LDFLAGS], [ -AC_REQUIRE([AC_PROG_LD]) -# on Mingw32 extra LDFLAGS are required to ease global variable linking -LIBGNURADIO_CORE_EXTRA_LDFLAGS="" - -AC_MSG_CHECKING([whether $LD accepts --enable-runtime-pseudo-reloc]) -if ${LD} --enable-runtime-pseudo-reloc --version >/dev/null 2>&1 -then - # libtool requires the quotes - LIBGNURADIO_CORE_EXTRA_LDFLAGS="\"-Wl,--enable-runtime-pseudo-reloc\"" - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -AC_SUBST(LIBGNURADIO_CORE_EXTRA_LDFLAGS) - -]) diff --git a/volk/config/gr_no_undefined.m4 b/volk/config/gr_no_undefined.m4 deleted file mode 100644 index c8d745d5f..000000000 --- a/volk/config/gr_no_undefined.m4 +++ /dev/null @@ -1,44 +0,0 @@ -dnl -dnl Copyright 2005 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. -dnl - -# GR_NO_UNDEFINED() -# -# Detemine whether we need to use the -no-undefined linker flag -# when building shared libraries. -# Sets NO_UNDEFINED to "" or "-no-undefined" -# -# As far as I can tell, we need -no-undefined only when building -# windows DLLs. This occurs when using MinGW and Cygwin. -# -# For now, we stub this out. - -AC_DEFUN([GR_NO_UNDEFINED],[ - AC_REQUIRE([AC_CANONICAL_HOST]) - no_undefined="" - case "${host_os}" in - *mingw* | *cygwin*) - - # on MinGW/Cygwin extra LDFLAGS are required - no_undefined="-no-undefined" - ;; - esac - AC_SUBST(NO_UNDEFINED,[$no_undefined]) -]) diff --git a/volk/config/gr_omnithread.m4 b/volk/config/gr_omnithread.m4 deleted file mode 100644 index 054f07824..000000000 --- a/volk/config/gr_omnithread.m4 +++ /dev/null @@ -1,52 +0,0 @@ -# Check for Omnithread (pthread/NT) thread support. -*- Autoconf -*- - -# Copyright 2003,2007 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, 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, Boston, MA -# 02110-1301, USA. - -AC_DEFUN([GR_OMNITHREAD], -[ - # Check first for POSIX - ACX_PTHREAD( - [ AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]) - ot_posix="yes" - DEFINES="$DEFINES -DOMNITHREAD_POSIX=1" - ],[ - # If no POSIX support found, then check for NT threads - AC_MSG_CHECKING([for NT threads]) - - AC_LINK_IFELSE([ - #include <windows.h> - #include <winbase.h> - int main() { InitializeCriticalSection(NULL); return 0; } - ], - [ - ot_nt="yes" - DEFINES="$DEFINES -DOMNITHREAD_NT=1" - ], - [AC_MSG_FAILURE([GNU Radio requires POSIX threads. pthreads not found.])] - ) - AC_MSG_RESULT(yes) - ]) - AM_CONDITIONAL(OMNITHREAD_POSIX, test "x$ot_posix" = xyes) - AM_CONDITIONAL(OMNITHREAD_NT, test "x$ot_nt" = xyes) - - save_LIBS="$LIBS" - AC_SEARCH_LIBS([clock_gettime], [rt], [PTHREAD_LIBS="$PTHREAD_LIBS $LIBS"]) - AC_CHECK_FUNCS([clock_gettime gettimeofday nanosleep]) - LIBS="$save_LIBS" -]) - diff --git a/volk/config/gr_pwin32.m4 b/volk/config/gr_pwin32.m4 deleted file mode 100644 index b55bc64b1..000000000 --- a/volk/config/gr_pwin32.m4 +++ /dev/null @@ -1,135 +0,0 @@ -# Check for (mingw)win32 POSIX replacements. -*- Autoconf -*- - -# Copyright 2003,2004,2005,2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. - - -AC_DEFUN([GR_PWIN32], -[ -AC_REQUIRE([AC_HEADER_TIME]) -AC_CHECK_HEADERS([sys/types.h fcntl.h io.h]) -AC_CHECK_HEADERS([windows.h]) -AC_CHECK_HEADERS([winioctl.h winbase.h], [], [], [ - #if HAVE_WINDOWS_H - #include <windows.h> - #endif -]) - -AC_CHECK_FUNCS([getopt usleep gettimeofday nanosleep rand srand random srandom sleep sigaction]) -AC_CHECK_TYPES([struct timezone, struct timespec, ssize_t],[],[],[ - #if HAVE_SYS_TYPES_H - # include <sys/types.h> - #endif - #if TIME_WITH_SYS_TIME - # include <sys/time.h> - # include <time.h> - #else - # if HAVE_SYS_TIME_H - # include <sys/time.h> - # else - # include <time.h> - # endif - #endif -]) - -dnl Checks for replacements -AC_REPLACE_FUNCS([getopt usleep gettimeofday]) - - -AC_MSG_CHECKING(for Sleep) -AC_TRY_LINK([ #include <windows.h> - #include <winbase.h> - ], [ Sleep(0); ], - [AC_DEFINE(HAVE_SSLEEP,1,[Define to 1 if you have win32 Sleep]) - AC_MSG_RESULT(yes)], - AC_MSG_RESULT(no) - ) - -AH_BOTTOM( -[ -/* Define missing prototypes, implemented in replacement lib */ -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef HAVE_GETOPT -int getopt (int argc, char * const argv[], const char * optstring); -extern char * optarg; -extern int optind, opterr, optopt; -#endif - -#ifndef HAVE_USLEEP -int usleep(unsigned long usec); /* SUSv2 */ -#endif - -#ifndef HAVE_NANOSLEEP -#ifndef HAVE_STRUCT_TIMESPEC -#if HAVE_SYS_TYPES_H -# include <sys/types.h> /* need time_t */ -#endif -struct timespec { - time_t tv_sec; - long tv_nsec; -}; -#endif -static inline int nanosleep(const struct timespec *req, struct timespec *rem) { return usleep(req->tv_sec*1000000+req->tv_nsec/1000); } -#endif - -#if defined(HAVE_SSLEEP) && !defined(HAVE_SLEEP) -#ifdef HAVE_WINBASE_H -#include <windows.h> -#include <winbase.h> -#endif -/* TODO: what about SleepEx? */ -static inline unsigned int sleep (unsigned int nb_sec) { Sleep(nb_sec*1000); return 0; } -#endif - -#ifndef HAVE_GETTIMEOFDAY -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> -#endif -#ifndef HAVE_STRUCT_TIMEZONE -struct timezone { - int tz_minuteswest; - int tz_dsttime; -}; -#endif -int gettimeofday(struct timeval *tv, struct timezone *tz); -#endif - -#if !defined(HAVE_RANDOM) && defined(HAVE_RAND) -#include <stdlib.h> -static inline long int random (void) { return rand(); } -#endif - -#if !defined(HAVE_SRANDOM) && defined(HAVE_SRAND) -static inline void srandom (unsigned int seed) { srand(seed); } -#endif - -#ifndef HAVE_SSIZE_T -typedef size_t ssize_t; -#endif - -#ifdef __cplusplus -} -#endif -]) - - -]) diff --git a/volk/config/gr_set_md_cpu.m4 b/volk/config/gr_set_md_cpu.m4 deleted file mode 100644 index 56fd83bac..000000000 --- a/volk/config/gr_set_md_cpu.m4 +++ /dev/null @@ -1,63 +0,0 @@ -dnl -dnl Copyright 2003,2008 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. -dnl - -AC_DEFUN([_TRY_ADD_ALTIVEC], -[ - LF_CHECK_CC_FLAG([-mabi=altivec -maltivec]) - LF_CHECK_CXX_FLAG([-mabi=altivec -maltivec]) -]) - -AC_DEFUN([GR_SET_MD_CPU],[ - AC_REQUIRE([AC_CANONICAL_HOST]) - 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"]) - - 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 ;; - powerpc*) MD_CPU=powerpc ;; - *) MD_CPU=generic ;; - esac - - AC_ARG_ENABLE(altivec, - AC_HELP_STRING([--enable-altivec],[enable altivec on PowerPC (yes)]), - [ if test $MD_CPU = powerpc; then - case "$enableval" in - (no) MD_CPU=generic ;; - (yes) _TRY_ADD_ALTIVEC ;; - (*) AC_MSG_ERROR([Invalid argument ($enableval) to --enable-altivec]) ;; - esac - fi], - [ if test $MD_CPU = powerpc; then _TRY_ADD_ALTIVEC fi]) - - - AC_MSG_CHECKING([for machine dependent speedups]) - AC_MSG_RESULT($MD_CPU) - AC_SUBST(MD_CPU) - AC_SUBST(MD_SUBCPU) - - AM_CONDITIONAL(MD_CPU_x86, test "$MD_CPU" = "x86") - AM_CONDITIONAL(MD_SUBCPU_x86_64, test "$MD_SUBCPU" = "x86_64") - AM_CONDITIONAL(MD_CPU_powerpc, test "$MD_CPU" = "powerpc") - AM_CONDITIONAL(MD_CPU_generic, test "$MD_CPU" = "generic") -]) diff --git a/volk/config/gr_sysv_shm.m4 b/volk/config/gr_sysv_shm.m4 deleted file mode 100644 index db5c8351e..000000000 --- a/volk/config/gr_sysv_shm.m4 +++ /dev/null @@ -1,36 +0,0 @@ -# Check for IPC System V shm support. -*- Autoconf -*- - -# Copyright 2003 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, 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, Boston, MA -# 02110-1301, USA. - -AC_DEFUN([GR_SYSV_SHM], -[ - AC_LANG_SAVE - AC_LANG_C - - AC_CHECK_HEADERS([sys/ipc.h sys/shm.h]) - - save_LIBS="$LIBS" - AC_SEARCH_LIBS(shmat, [cygipc ipc], - [ IPC_LIBS="$LIBS" ], - [ AC_MSG_WARN([SystemV IPC support not found. ]) ] - ) - LIBS="$save_LIBS" - - AC_LANG_RESTORE - AC_SUBST(IPC_LIBS) -]) diff --git a/volk/config/lf_cc.m4 b/volk/config/lf_cc.m4 deleted file mode 100644 index b75e1a4c5..000000000 --- a/volk/config/lf_cc.m4 +++ /dev/null @@ -1,41 +0,0 @@ -dnl Autoconf support for C++ -dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> -dnl -dnl This program 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 of the License, or -dnl (at your option) any later version. -dnl -dnl This program 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 this program; if not, write to the Free Software -dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA. -dnl -dnl As a special exception to the GNU General Public License, if you -dnl distribute this file as part of a program that contains a configuration -dnl script generated by Autoconf, you may include it under the same -dnl distribution terms that you use for the rest of that program. - -# ------------------------------------------------------------------------- -# Use this macro to configure your C compiler -# When called the macro does the following things: -# 1. It finds an appropriate C compiler. -# If you passed the flag --with-cc=foo then it uses that -# particular compiler -# 2. Check whether the compiler works. -# 3. Checks whether the compiler accepts the -g -# ------------------------------------------------------------------------- - -AC_DEFUN([LF_CONFIGURE_CC],[ - dnl Sing the song - AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([AC_PROG_CPP])dnl - AC_REQUIRE([AC_AIX])dnl - AC_REQUIRE([AC_ISC_POSIX])dnl - AC_REQUIRE([AC_HEADER_STDC])dnl -]) - diff --git a/volk/config/lf_cxx.m4 b/volk/config/lf_cxx.m4 deleted file mode 100644 index 7cce5f8a4..000000000 --- a/volk/config/lf_cxx.m4 +++ /dev/null @@ -1,50 +0,0 @@ -dnl Autoconf support for C++ -dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> -dnl -dnl This program 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 of the License, or -dnl (at your option) any later version. -dnl -dnl This program 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 this program; if not, write to the Free Software -dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA. -dnl -dnl As a special exception to the GNU General Public License, if you -dnl distribute this file as part of a program that contains a configuration -dnl script generated by Autoconf, you may include it under the same -dnl distribution terms that you use for the rest of that program. - -# ----------------------------------------------------------------- -# This macro should be called to configure your C++ compiler. -# When called, the macro does the following things: -# 1. It finds an appropriate C++ compiler -# If you passed the flag --with-cxx=foo, then it uses that -# particular compiler -# 2. Checks whether the compiler accepts the -g -# ------------------------------------------------------------------ - -AC_DEFUN([LF_CONFIGURE_CXX],[ - AC_REQUIRE([AC_PROG_CXX])dnl - AC_REQUIRE([AC_PROG_CXXCPP])dnl - LF_CXX_PORTABILITY -]) - -# ----------------------------------------------------------------------- -# This macro tests the C++ compiler for various portability problem. -# ----------------------------------------------------------------------- - - -AC_DEFUN([LF_CXX_PORTABILITY],[ - - dnl - dnl Check for common C++ portability problems - dnl - -]) - diff --git a/volk/config/lf_warnings.m4 b/volk/config/lf_warnings.m4 deleted file mode 100644 index 0ef7b2b37..000000000 --- a/volk/config/lf_warnings.m4 +++ /dev/null @@ -1,123 +0,0 @@ -dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> -dnl Copyright (C) 2009 Free Software Foundation, Inc. -dnl -dnl This program 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 of the License, or -dnl (at your option) any later version. -dnl -dnl This program 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 this program; if not, write to the Free Software -dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA. -dnl -dnl As a special exception to the GNU General Public License, if you -dnl distribute this file as part of a program that contains a configuration -dnl script generated by Autoconf, you may include it under the same -dnl distribution terms that you use for the rest of that program. - -# -------------------------------------------------------------------------- -# Check whether the C++ compiler accepts a certain flag -# If it does it adds the flag to lf_CXXFLAGS -# If it does not then it returns an error to lf_ok -# Usage: -# LF_CHECK_CXX_FLAG(-flag1 -flag2 -flag3 ...) -# ------------------------------------------------------------------------- - -AC_DEFUN([LF_CHECK_CXX_FLAG],[ - echo "#include <stdio.h> -int main(int argc, char **argv){return 0;}" > conftest.cc - for i in $1 - do - AC_MSG_CHECKING([whether $CXX accepts $i]) - if test -z "`${CXX} $i -c conftest.cc 2>&1`" - then - lf_CXXFLAGS="${lf_CXXFLAGS} $i" - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi - done - rm -f conftest.cc conftest.o - AC_SUBST(lf_CXXFLAGS) -]) - -# -------------------------------------------------------------------------- -# Check whether the C compiler accepts a certain flag -# If it does it adds the flag to lf_CFLAGS -# If it does not then it returns an error to lf_ok -# Usage: -# LF_CHECK_CC_FLAG(-flag1 -flag2 -flag3 ...) -# ------------------------------------------------------------------------- - -AC_DEFUN([LF_CHECK_CC_FLAG],[ - echo "#include <stdio.h> -int main(int argc, char **argv){return 0;}" > conftest.c - for i in $1 - do - AC_MSG_CHECKING([whether $CC accepts $i]) - if test -z "`${CC} $i -c conftest.c 2>&1`" - then - lf_CFLAGS="${lf_CFLAGS} $i" - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi - done - rm -f conftest.c conftest.o - AC_SUBST(lf_CFLAGS) -]) - -# -------------------------------------------------------------------------- -# Check whether the Fortran compiler accepts a certain flag -# If it does it adds the flag to lf_FFLAGS -# If it does not then it returns an error to lf_ok -# Usage: -# LF_CHECK_F77_FLAG(-flag1 -flag2 -flag3 ...) -# ------------------------------------------------------------------------- - -AC_DEFUN([LF_CHECK_F77_FLAG],[ - cat << EOF > conftest.f -c....:++++++++++++++++++++++++ - PROGRAM MAIN - PRINT*,'Hello World!' - END -EOF - for i in $1 - do - AC_MSG_CHECKING([whether $F77 accepts $i]) - if test -z "`${F77} $i -c conftest.f 2>&1`" - then - lf_FFLAGS="${lf_FFLAGS} $i" - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi - done - rm -f conftest.f conftest.o - AC_SUBST(lf_FFLAGS) -]) - -# ---------------------------------------------------------------------- -# Enable compiler warnings. -# Call this command AFTER you have configured ALL your compilers. -# ---------------------------------------------------------------------- - -AC_DEFUN([LF_SET_WARNINGS],[ - dnl Warnings for the two main compilers - dnl add -Wextra when you're got time to fix a bunch of them ;-) - cc_warning_flags="-Wall -Werror-implicit-function-declaration -Wno-uninitialized" - cxx_warning_flags="-Wall -Woverloaded-virtual -Wno-uninitialized" - if test -n "${CC}" - then - LF_CHECK_CC_FLAG($cc_warning_flags) - fi - if test -n "${CXX}" - then - LF_CHECK_CXX_FLAG($cxx_warning_flags) - fi -]) diff --git a/volk/config/lf_x11.m4 b/volk/config/lf_x11.m4 deleted file mode 100644 index 460cd605f..000000000 --- a/volk/config/lf_x11.m4 +++ /dev/null @@ -1,39 +0,0 @@ -dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> -dnl -dnl This program 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 of the License, or -dnl (at your option) any later version. -dnl -dnl This program 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 this program; if not, write to the Free Software -dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA. -dnl -dnl As a special exception to the GNU General Public License, if you -dnl distribute this file as part of a program that contains a configuration -dnl script generated by Autoconf, you may include it under the same -dnl distribution terms that you use for the rest of that program. - - -#----------------------------------------------------------------------- -# This macro searches for Xlib and when it finds it it adds the -# appropriate flags to CXXFLAGS and export the link sequence to -# the variable XLIB. -# In your configure.in file add: -# LF_PATH_XLIB -# In your Makefile.am add -# program_LDADD = .... $(XLIB) -#------------------------------------------------------------------------ - -AC_DEFUN([LF_PATH_XLIB],[ - AC_PATH_XTRA - CXXFLAGS="$CXXFLAGS $X_CFLAGS" - XLIB="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" - AC_SUBST(XLIB) -]) - diff --git a/volk/config/lv_configure.m4 b/volk/config/lv_configure.m4 deleted file mode 100644 index 358fba030..000000000 --- a/volk/config/lv_configure.m4 +++ /dev/null @@ -1,114 +0,0 @@ -dnl -dnl Copyright 2010 Free Software Foundation, Inc. -dnl -dnl This program 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 of the License, or -dnl (at your option) any later version. -dnl -dnl This program 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 this program. If not, see <http://www.gnu.org/licenses/>. -dnl - -dnl LV_CONFIGURE -dnl -dnl Handles the bulk of the configure.ac work for an out-of-tree build -dnl -dnl You must invoke: -dnl -dnl AC_INIT(package_name,version) -dnl AC_PREREQ(2.57) -dnl AC_CONFIG_AUX_DIR([.]) -dnl -dnl in configure.ac before LV_CONFIGURE -dnl -dnl -dnl N.B., this is an m4_define because if it were an AC_DEFUN it would -dnl get called too late to be useful. - -m4_define([LV_CONFIGURE], -[ - #AC_CANONICAL_BUILD - #AC_CANONICAL_HOST - #AC_CANONICAL_TARGET - - LF_CONFIGURE_CC - LF_CONFIGURE_CXX - GR_LIB64 dnl check for lib64 suffix after choosing compilers - - LV_GCC_VERSION_WORKAROUND - dnl add ${prefix}/lib${gr_libdir_suffix}/pkgconfig to the head of the PKG_CONFIG_PATH - if test x${PKG_CONFIG_PATH} = x; then - PKG_CONFIG_PATH=${prefix}/lib${gr_libdir_suffix}/pkgconfig - else - PKG_CONFIG_PATH=${prefix}/lib${gr_libdir_suffix}/pkgconfig:${PKG_CONFIG_PATH} - fi - export PKG_CONFIG_PATH - - LF_SET_WARNINGS -dnl GR_SET_GPROF -dnl GR_SET_PROF - AM_PROG_AS - AC_PROG_LN_S - AC_PROG_MAKE_SET - AC_PROG_INSTALL - AC_PATH_PROG([RM_PROG], [rm]) - - AC_LIBTOOL_WIN32_DLL - AC_ENABLE_SHARED dnl do build shared libraries... important for qa - AC_DISABLE_STATIC dnl don't build static libraries... important for qa - m4_ifdef([LT_INIT],[LT_INIT],[AC_PROG_LIBTOOL]) - dnl GR_FORTRAN - - GR_NO_UNDEFINED dnl do we need the -no-undefined linker flag -dnl GR_SCRIPTING dnl Locate python, SWIG, etc - -dnl AC_ARG_WITH([python], -dnl AC_HELP_STRING([--with-python], [Should we use python? [[default=yes]]]), -dnl [case "$with_python" in -dnl (no | yes) ;; -dnl (*) AC_MSG_ERROR([Invalid argument ($with_python) to --with-python]) ;; -dnl esac], -dnl [with_python=yes]) - -dnl AM_CONDITIONAL([USE_PYTHON], [test "$with_python" = yes]) - - - dnl Set the c++ compiler that we use for the build system when cross compiling - if test "x$CXX_FOR_BUILD" = x - then - CXX_FOR_BUILD=${CXX} - fi - AC_SUBST(CXX_FOR_BUILD) - - dnl Checks for header files. - AC_HEADER_STDC - - dnl Checks for typedefs, structures, and compiler characteristics. - AC_C_CONST - AC_C_INLINE - AC_TYPE_SIZE_T - AC_HEADER_TIME - AC_C_BIGENDIAN - - dnl Check for Mingw support - GR_PWIN32 - dnl GR_LIBGNURADIO_CORE_EXTRA_LDFLAGS - - dnl Check for liborc - ORC_CHECK - - dnl Following causes test for -lboost_unit_test_framework to fail on Cygwin - dnl LDFLAGS="$LDFLAGS $LIBGNURADIO_CORE_EXTRA_LDFLAGS" - - AC_CHECK_PROG([XMLTO],[xmlto],[yes],[]) - AM_CONDITIONAL([HAS_XMLTO], [test x$XMLTO = xyes]) - -dnl PKG_CHECK_MODULES(GNURADIO_CORE, gnuradio-core >= 3) -dnl LIBS="$LIBS $GNURADIO_CORE_LIBS" -]) diff --git a/volk/config/mkstemp.m4 b/volk/config/mkstemp.m4 deleted file mode 100644 index 2d1fbee9b..000000000 --- a/volk/config/mkstemp.m4 +++ /dev/null @@ -1,78 +0,0 @@ -#serial 4 - -# On some hosts (e.g., HP-UX 10.20, SunOS 4.1.4, Solaris 2.5.1), mkstemp has a -# silly limit that it can create no more than 26 files from a given template. -# Other systems lack mkstemp altogether. -# On OSF1/Tru64 V4.0F, the system-provided mkstemp function can create -# only 32 files per process. -# On systems like the above, arrange to use the replacement function. -AC_DEFUN([UTILS_FUNC_MKSTEMP], -[dnl - AC_REPLACE_FUNCS(mkstemp) - if test $ac_cv_func_mkstemp = no; then - utils_cv_func_mkstemp_limitations=yes - else - AC_CACHE_CHECK([for mkstemp limitations], - utils_cv_func_mkstemp_limitations, - [ - AC_TRY_RUN([ -# include <stdlib.h> - int main () - { - int i; - for (i = 0; i < 70; i++) - { - char template[] = "conftestXXXXXX"; - int fd = mkstemp (template); - if (fd == -1) - exit (1); - close (fd); - } - exit (0); - } - ], - utils_cv_func_mkstemp_limitations=no, - utils_cv_func_mkstemp_limitations=yes, - utils_cv_func_mkstemp_limitations=yes - ) - ] - ) - fi - - if test $utils_cv_func_mkstemp_limitations = yes; then - AC_LIBOBJ(mkstemp) - AC_LIBOBJ(tempname) - AC_DEFINE(mkstemp, rpl_mkstemp, - [Define to rpl_mkstemp if the replacement function should be used.]) - gl_PREREQ_MKSTEMP - jm_PREREQ_TEMPNAME - fi -]) - -# Prerequisites of lib/mkstemp.c. -AC_DEFUN([gl_PREREQ_MKSTEMP], -[ - AH_BOTTOM( - [ - #ifndef HAVE_MKSTEMP - #ifdef __cplusplus - extern "C" { - #endif - int rpl_mkstemp (char *templ); - #ifdef __cplusplus - } - #endif - #endif - ]) -]) - -# Prerequisites of lib/tempname.c. -AC_DEFUN([jm_PREREQ_TEMPNAME], -[ - AC_REQUIRE([AC_HEADER_STAT]) - AC_CHECK_HEADERS_ONCE(fcntl.h sys/time.h unistd.h) - AC_CHECK_HEADERS(stdint.h) - AC_CHECK_FUNCS(__secure_getenv gettimeofday lstat) - AC_CHECK_DECLS_ONCE(getenv) - # AC_REQUIRE([jm_AC_TYPE_UINTMAX_T]) -]) diff --git a/volk/config/onceonly.m4 b/volk/config/onceonly.m4 deleted file mode 100644 index f6fec37cb..000000000 --- a/volk/config/onceonly.m4 +++ /dev/null @@ -1,63 +0,0 @@ -# onceonly.m4 serial 3 -dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. -dnl This file is free software, distributed under the terms of the GNU -dnl General Public License. As a special exception to the GNU General -dnl Public License, this file may be distributed as part of a program -dnl that contains a configuration script generated by Autoconf, under -dnl the same distribution terms as the rest of that program. - -dnl This file defines some "once only" variants of standard autoconf macros. -dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS -dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS -dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS -dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC -dnl The advantage is that the check for each of the headers/functions/decls -dnl will be put only once into the 'configure' file. It keeps the size of -dnl the 'configure' file down, and avoids redundant output when 'configure' -dnl is run. -dnl The drawback is that the checks cannot be conditionalized. If you write -dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi -dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to -dnl empty, and the check will be inserted before the body of the AC_DEFUNed -dnl function. - -dnl Autoconf version 2.57 or newer is recommended. -AC_PREREQ(2.54) - -# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of -# AC_CHECK_HEADERS(HEADER1 HEADER2 ...). -AC_DEFUN([AC_CHECK_HEADERS_ONCE], [ - : - AC_FOREACH([gl_HEADER_NAME], [$1], [ - AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(defn([gl_HEADER_NAME]), - [-./], [___])), [ - AC_CHECK_HEADERS(gl_HEADER_NAME) - ]) - AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME, - [-./], [___]))) - ]) -]) - -# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of -# AC_CHECK_FUNCS(FUNC1 FUNC2 ...). -AC_DEFUN([AC_CHECK_FUNCS_ONCE], [ - : - AC_FOREACH([gl_FUNC_NAME], [$1], [ - AC_DEFUN([gl_CHECK_FUNC_]defn([gl_FUNC_NAME]), [ - AC_CHECK_FUNCS(defn([gl_FUNC_NAME])) - ]) - AC_REQUIRE([gl_CHECK_FUNC_]defn([gl_FUNC_NAME])) - ]) -]) - -# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of -# AC_CHECK_DECLS(DECL1, DECL2, ...). -AC_DEFUN([AC_CHECK_DECLS_ONCE], [ - : - AC_FOREACH([gl_DECL_NAME], [$1], [ - AC_DEFUN([gl_CHECK_DECL_]defn([gl_DECL_NAME]), [ - AC_CHECK_DECLS(defn([gl_DECL_NAME])) - ]) - AC_REQUIRE([gl_CHECK_DECL_]defn([gl_DECL_NAME])) - ]) -]) diff --git a/volk/config/orc.m4 b/volk/config/orc.m4 deleted file mode 100644 index e332939d3..000000000 --- a/volk/config/orc.m4 +++ /dev/null @@ -1,63 +0,0 @@ -dnl pkg-config-based checks for Orc - -dnl specific: -dnl ORC_CHECK([REQUIRED_VERSION]) - -AC_DEFUN([ORC_CHECK], -[ - ORC_REQ=ifelse([$1], , "0.4.12", [$1]) - - if test "x$enable_orc" != "xno" ; then - PKG_CHECK_MODULES(ORC, orc-0.4 >= $ORC_REQ, [ - AC_DEFINE(LV_HAVE_ORC, 1, [Use Orc]) - if test "x$ORCC" = "x" ; then - ORCC=`$PKG_CONFIG --variable=orcc orc-0.4` - fi - AC_SUBST(ORCC) - ORCC_FLAGS="--compat $ORC_REQ" - ORC_LDFLAGS=`$PKG_CONFIG --libs orc-0.4` - ORC_CFLAGS=`$PKG_CONFIG --cflags orc-0.4` - AC_SUBST(ORCC_FLAGS) - AC_SUBST(ORC_LDFLAGS) - AC_SUBST(ORC_CFLAGS) - LV_HAVE_ORC=yes - LV_HAVE_ORCC=yes - LV_ORC_PKGCONFIG="-lvolk_orc" - if test "x$cross_compiling" = "xyes" ; then - LV_HAVE_ORCC=no - fi - ], [ - if test "x$enable_orc" = "xyes" ; then - AC_MSG_ERROR([--enable-orc specified, but Orc >= $ORC_REQ not found]) - fi - AC_DEFINE(DISABLE_ORC, 1, [Disable Orc]) - LV_HAVE_ORC=no - LV_HAVE_ORCC=no - LV_ORC_PKGCONFIG="" - ]) - else - AC_DEFINE(DISABLE_ORC, 1, [Disable Orc]) - LV_HAVE_ORC=no - LV_HAVE_ORCC=no - LV_ORC_PKGCONFIG="" - fi - AM_CONDITIONAL(LV_HAVE_ORC, [test "x$LV_HAVE_ORC" = "xyes"]) - AM_CONDITIONAL(LV_HAVE_ORCC, [test "x$LV_HAVE_ORCC" = "xyes"]) - AC_SUBST(LV_ORC_PKGCONFIG) -])) - -AC_DEFUN([ORC_OUTPUT], -[ - if test "$LV_HAVE_ORC" = yes ; then - printf "configure: *** Orc acceleration enabled.\n" - else - if test "x$enable_orc" = "xno" ; then - printf "configure: *** Orc acceleration disabled by --disable-orc.\n" - else - printf "configure: *** Orc acceleration disabled. Requires Orc >= $ORC_REQ, which was\n" - printf " not found.\n" - fi - fi - printf "\n" -]) - diff --git a/volk/config/pkg.m4 b/volk/config/pkg.m4 deleted file mode 100644 index 2d4d96109..000000000 --- a/volk/config/pkg.m4 +++ /dev/null @@ -1,201 +0,0 @@ -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# -# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. -# Copyright © 2008 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 2 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- -AC_DEFUN([PKG_PROG_PKG_CONFIG], -[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_default([$1], [0.18]) - AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi - -fi[]dnl -])# PKG_PROG_PKG_CONFIG - -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# -# Similar to PKG_CHECK_MODULES, make sure that the first instance of -# this or PKG_CHECK_MODULES is called, or make sure to call -# PKG_CHECK_EXISTS manually -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_EXISTS], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -if test -n "$PKG_CONFIG" && \ - AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_ifval([$2], [$2], [:]) -m4_ifvaln([$3], [else - $3])dnl -fi]) - - -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- -m4_define([_PKG_CONFIG], -[if test -n "$PKG_CONFIG"; then - if test -n "$$1"; then - pkg_cv_[]$1="$$1" - else - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - fi -else - pkg_failed=untried -fi[]dnl -])# _PKG_CONFIG - -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- -AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi[]dnl -])# _PKG_SHORT_ERRORS_SUPPORTED - - -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) -# -# E.g., -# PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) -# defines: -# -# GSTUFF_LIBS -# GSTUFF_CFLAGS -# GSTUFF_INCLUDEDIR -# GSTUFF_CPPFLAGS # the -I, -D and -U's out of CFLAGS -# -# see pkg-config man page also defines GSTUFF_PKG_ERRORS on error -# -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -# -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_MODULES],[ -AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl - -AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl -AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl -AC_ARG_VAR([$1][_INCLUDEDIR], [includedir for $1, overriding pkg-config])dnl - -pkg_failed=no -AC_MSG_CHECKING([for $1]) - -_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) - -if test x$cross_compiling = xyes -then - dnl _PKG_CONFIG([$1][_LIBS], [libs-only-l --static], [$2]) - _PKG_CONFIG([$1][_LIBS], [libs --static], [$2]) - dnl prune out any -L/lib or -L/usr/lib since they're pointing to the wrong filesystem root - _pkg_tmp= - for flag in [$]pkg_cv_[$1][_LIBS]; do - case $flag in - (-L/lib* | -L/usr/lib* ) ;; # ignore - (*) _pkg_tmp="$_pkg_tmp $flag" ;; - esac - done - pkg_cv_[$1][_LIBS]="$_pkg_tmp" -else - _PKG_CONFIG([$1][_LIBS], [libs --static], [$2]) -fi - -_PKG_CONFIG([$1][_INCLUDEDIR], [variable=includedir], [$2]) - - -m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS -and $1[]_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details.]) - -if test $pkg_failed = yes; then - _PKG_SHORT_ERRORS_SUPPORTED - if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` - else - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` - fi - # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - - ifelse([$4], , [AC_MSG_ERROR(dnl -[Package requirements ($2) were not met: - -$$1_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -_PKG_TEXT -])], - [AC_MSG_RESULT([no]) - $4]) -elif test $pkg_failed = untried; then - ifelse([$4], , [AC_MSG_FAILURE(dnl -[The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -_PKG_TEXT - -To get pkg-config, see <http://pkg-config.freedesktop.org/>.])], - [$4]) -else - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS - $1[]_INCLUDEDIR=$pkg_cv_[]$1[]_INCLUDEDIR - - $1[]_CPPFLAGS="" - for flag in $$1[]_CFLAGS; do - case $flag in - -I* | -D* | -U*) $1[]_CPPFLAGS="$$1[]_CPPFLAGS $flag" ;; - esac - done - pkg_cv_[]$1[]_CPPFLAGS=$$1[]_CPPFLAGS - AC_SUBST($1[]_CPPFLAGS) - - AC_MSG_RESULT([yes]) - ifelse([$3], , :, [$3]) -fi[]dnl -])# PKG_CHECK_MODULES diff --git a/volk/configure.ac b/volk/configure.ac deleted file mode 100644 index fa3a90c7f..000000000 --- a/volk/configure.ac +++ /dev/null @@ -1,80 +0,0 @@ -dnl -dnl Copyright 2010,2011 Free Software Foundation, Inc. -dnl -dnl This program 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 of the License, or -dnl (at your option) any later version. -dnl -dnl This program 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 this program. If not, see <http://www.gnu.org/licenses/>. -dnl - -AC_INIT -AC_PREREQ(2.57) -AC_CONFIG_AUX_DIR([.]) -AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(volk,0.1) - -dnl This is kind of non-standard, but it sure shortens up this file :-) - -m4_include([config/lv_configure.m4]) - -LV_CONFIGURE - -dnl Check for any libraries you need -dnl AC_CHECK_LIBRARY - -dnl Check for header files you need -dnl AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/ioctl.h sys/time.h unistd.h) -dnl AC_CHECK_HEADERS(sys/mman.h) - -dnl Checks for library functions. -dnl AC_CHECK_FUNCS([]) - -dnl We pick up the boost cppflags, cxxflags and thread lib via GNURADIO_CORE -dnl -dnl If you need additional boost libraries, you'll need to -dnl uncomment AX_BOOST_BASE, plus some of the following: -dnl -dnl calls AC_SUBST(BOOST_CPPFLAGS), AC_SUBST(BOOST_LDFLAGS) and defines HAVE_BOOST -AX_BOOST_BASE([1.35]) -dnl -dnl All the rest of these call AC_SUBST(BOOST_<foo>_LIB) and define HAVE_BOOST_<foo> -dnl -dnl AX_BOOST_DATE_TIME -dnl AX_BOOST_FILESYSTEM -dnl AX_BOOST_IOSTREAMS -dnl AX_BOOST_PROGRAM_OPTIONS -dnl AX_BOOST_REGEX -dnl AX_BOOST_SERIALIZATION -dnl AX_BOOST_SIGNALS -dnl AX_BOOST_SYSTEM -dnl AX_BOOST_TEST_EXEC_MONITOR -AX_BOOST_UNIT_TEST_FRAMEWORK -dnl AX_BOOST_WSERIALIZATION - -LV_SET_SIMD_FLAGS - -AC_CONFIG_FILES([\ - Makefile \ - config/Makefile \ - include/Makefile \ - include/volk/Makefile \ - lib/Makefile \ - orc/Makefile \ - volk.pc \ - ]) - -AC_OUTPUT - -echo "" -echo "The following architectures will be built:" -echo " $BUILT_ARCHS" -echo "" - diff --git a/volk/data/Makefile.am b/volk/data/Makefile.am deleted file mode 100644 index d0ef08bc9..000000000 --- a/volk/data/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -# -# 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 this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - -include $(top_srcdir)/Makefile.common - -# List your data files here. Please keep it under ~ 100KB. -# -# EXTRA_DIST = \ -# foo.dat \ -# bar.dat \ -# baz.dat - -EXTRA_DIST = diff --git a/volk/doc/Makefile.am b/volk/doc/Makefile.am deleted file mode 100644 index cddd72435..000000000 --- a/volk/doc/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -# -# 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 this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - -include $(top_srcdir)/Makefile.common - -# List your doc files here -# -# EXTRA_DIST = \ -# on-the-meaning-of-life \ -# whatever-doesnt-make-you-stronger-kills-you -# - -EXTRA_DIST = - -# and/or run doxygen, xmlto, etc diff --git a/volk/gen/.gitignore b/volk/gen/.gitignore deleted file mode 100644 index a1c468f93..000000000 --- a/volk/gen/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/config -/include -/lib diff --git a/volk/gen/archs.xml b/volk/gen/archs.xml index 53db3e577..59cc81cc5 100644 --- a/volk/gen/archs.xml +++ b/volk/gen/archs.xml @@ -19,7 +19,7 @@ <flag>m32</flag> <overrule>MD_SUBCPU</overrule> <overrule_val>x86_64</overrule_val> -</arch> +</arch> <arch name="64" type="x86"> <op>0x80000001</op> diff --git a/volk/gen/make_c.py b/volk/gen/make_c.py index 0f9bcde34..233cb85c2 100644 --- a/volk/gen/make_c.py +++ b/volk/gen/make_c.py @@ -48,7 +48,7 @@ struct volk_machine *get_machine(void) { extern struct volk_machine *volk_machines[]; extern unsigned int n_volk_machines; static struct volk_machine *machine = NULL; - + if(machine != NULL) return machine; else { unsigned int max_score = 0; @@ -71,7 +71,7 @@ unsigned int volk_get_alignment(void) { } """ - + for i in range(len(functions)): tempstring += "void get_" + functions[i] + replace_arch.sub("", arched_arglist[i]) + "\n" tempstring += " %s = get_machine()->%s_archs[volk_rank_archs(get_machine()->%s_indices, get_machine()->%s_arch_defs, get_machine()->%s_n_archs, get_machine()->%s_name, volk_get_lvarch())];\n" % (functions[i], functions[i], functions[i], functions[i], functions[i], functions[i]) diff --git a/volk/gen/make_config_fixed.py b/volk/gen/make_config_fixed.py index 3fd1bdf0a..96f20b6b2 100644 --- a/volk/gen/make_config_fixed.py +++ b/volk/gen/make_config_fixed.py @@ -18,4 +18,4 @@ def make_config_fixed(dom) : return tempstring; - + diff --git a/volk/gen/make_cpuid_c.py b/volk/gen/make_cpuid_c.py index c6bb5059e..a8939fb90 100644 --- a/volk/gen/make_cpuid_c.py +++ b/volk/gen/make_cpuid_c.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from xml.dom import minidom @@ -86,7 +86,7 @@ static inline unsigned int xgetbv(void) { def make_cpuid_c(dom) : tempstring = HEADER_TEMPL; - + for domarch in dom: if str(domarch.attributes["type"].value) == "x86": if "no_test" in domarch.attributes.keys(): @@ -126,9 +126,9 @@ int i_can_has_%s () { return 0; #endif } - + """ % (arch) - + elif op == "1": tempstring = tempstring + """\ int i_can_has_%s () { @@ -167,7 +167,7 @@ int i_can_has_%s () { } """ % (arch, val, reg, op, shift, val) - + elif str(domarch.attributes["type"].value) == "powerpc": arch = str(domarch.attributes["name"].value); tempstring = tempstring + """\ @@ -201,7 +201,7 @@ int i_can_has_%s () { unsigned int found_neon = 0; auxvec_f = fopen("/proc/self/auxv", "rb"); if(!auxvec_f) return 0; - + //so auxv is basically 32b of ID and 32b of value //so it goes like this while(!found_neon && auxvec_f) { @@ -209,7 +209,7 @@ int i_can_has_%s () { if((auxvec[0] == AT_HWCAP) && (auxvec[1] & HWCAP_NEON)) found_neon = 1; } - + fclose(auxvec_f); return found_neon; @@ -219,7 +219,7 @@ int i_can_has_%s () { } """ % (arch) - + elif str(domarch.attributes["type"].value) == "all": arch = str(domarch.attributes["name"].value); tempstring = tempstring + """\ @@ -236,7 +236,7 @@ int i_can_has_%s () { } """ % (arch) - + tempstring = tempstring + "void volk_cpu_init() {\n"; for domarch in dom: arch = str(domarch.attributes["name"].value); @@ -254,9 +254,9 @@ int i_can_has_%s () { return tempstring; - - - - - + + + + + diff --git a/volk/gen/make_cpuid_h.py b/volk/gen/make_cpuid_h.py index 4fe5c4e07..1aa783781 100644 --- a/volk/gen/make_cpuid_h.py +++ b/volk/gen/make_cpuid_h.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from xml.dom import minidom @@ -44,5 +44,5 @@ def make_cpuid_h(dom) : tempstring = tempstring + "\n"; tempstring = tempstring + "__VOLK_DECL_END\n"; tempstring = tempstring + "#endif /*INCLUDED_VOLK_CPU_H*/\n" - + return tempstring; diff --git a/volk/gen/make_each_machine_c.py b/volk/gen/make_each_machine_c.py index a3f6203ba..535578859 100644 --- a/volk/gen/make_each_machine_c.py +++ b/volk/gen/make_each_machine_c.py @@ -59,7 +59,7 @@ def make_each_machine_c(machine_name, archs, functions, fcountlist, taglist, ali """ for arch in archs: tempstring += "#define LV_HAVE_" + arch.swapcase() + " 1\n" - + tempstring += """ #include <volk/volk_common.h> #include "volk_machines.h" diff --git a/volk/gen/make_environment_init_c.py b/volk/gen/make_environment_init_c.py index 263d5bcd1..6186162ee 100644 --- a/volk/gen/make_environment_init_c.py +++ b/volk/gen/make_environment_init_c.py @@ -14,7 +14,7 @@ def make_environment_init_c(dom) : tempstring = tempstring + "#endif\n" tempstring = tempstring + '\n\n'; tempstring = tempstring + "void volk_environment_init(){\n" - + for domarch in dom: arch = str(domarch.attributes["name"].value); envs = domarch.getElementsByTagName("environment"); @@ -22,11 +22,11 @@ def make_environment_init_c(dom) : cmd = str(env.firstChild.data); tempstring = tempstring + "#ifdef LV_HAVE_" + arch.swapcase() + "\n"; tempstring = tempstring + " " + cmd + "\n"; - tempstring = tempstring + "#endif\n" - + tempstring = tempstring + "#endif\n" + tempstring = tempstring + "}\n"; return tempstring; - - + + diff --git a/volk/gen/make_environment_init_h.py b/volk/gen/make_environment_init_h.py index 655d73f54..0b0f35d61 100644 --- a/volk/gen/make_environment_init_h.py +++ b/volk/gen/make_environment_init_h.py @@ -12,7 +12,7 @@ def make_environment_init_h() : tempstring = tempstring + "__VOLK_DECL_END\n"; tempstring = tempstring + "#endif\n" return tempstring; - - + + diff --git a/volk/gen/make_h.py b/volk/gen/make_h.py index 354e57258..cf8987c39 100644 --- a/volk/gen/make_h.py +++ b/volk/gen/make_h.py @@ -35,4 +35,4 @@ VOLK_API unsigned int volk_get_alignment(void); tempstring = tempstring + "#endif /*INCLUDED_VOLK_RUNTIME*/\n"; return tempstring; - + diff --git a/volk/gen/make_machines_c.py b/volk/gen/make_machines_c.py index a7ab63d6e..f19da4ae4 100644 --- a/volk/gen/make_machines_c.py +++ b/volk/gen/make_machines_c.py @@ -33,7 +33,7 @@ struct volk_machine *volk_machines[] = { tempstring += "&volk_machine_" + machine tempstring += "," tempstring += "\n#endif\n" - + tempstring += r""" }; unsigned int n_volk_machines = sizeof(volk_machines)/sizeof(*volk_machines); diff --git a/volk/gen/make_machines_h.py b/volk/gen/make_machines_h.py index a48caa89c..d2374120b 100644 --- a/volk/gen/make_machines_h.py +++ b/volk/gen/make_machines_h.py @@ -41,15 +41,15 @@ struct volk_machine { tempstring += " const int %s_arch_defs[%d];\n"%(function, len(archs)) tempstring += " const %s %s_archs[%d];\n"%(replace_volk.sub("p", function), function, len(archs)) tempstring += " const int %s_n_archs;\n"%function - + tempstring += r"""}; - + """ for machine in machines: tempstring += """#if LV_MACHINE_""" + machine.swapcase() + "\n" tempstring += "extern struct volk_machine volk_machine_" + machine + ";\n" tempstring += """#endif\n""" - + tempstring += r""" __VOLK_DECL_END diff --git a/volk/gen/make_makefile_am.py b/volk/gen/make_makefile_am.py index 0dc088a80..880ce4094 100644 --- a/volk/gen/make_makefile_am.py +++ b/volk/gen/make_makefile_am.py @@ -21,7 +21,7 @@ def make_makefile_am(dom, machines, archflags_dict): tempstring = r""" # This file is automatically generated by make_makefile_am.py. # Do not edit this file. - + include $(top_srcdir)/Makefile.common AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) \ @@ -55,17 +55,17 @@ volk_orc_CFLAGS = -DLV_HAVE_ORC=1 volk_orc_LDFLAGS = $(ORC_LDFLAGS) -lorc-0.4 volk_orc_LIBADD = ../orc/libvolk_orc.la else -volk_orc_CFLAGS = +volk_orc_CFLAGS = volk_orc_LDFLAGS = -volk_orc_LIBADD = +volk_orc_LIBADD = endif libvolk_la_CPPFLAGS = $(AM_CPPFLAGS) $(volk_orc_CFLAGS) libvolk_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0 $(volk_orc_LDFLAGS) libvolk_la_LIBADD = $(volk_orc_LIBADD) -noinst_LTLIBRARIES = - +noinst_LTLIBRARIES = + """ #here be dragons @@ -76,7 +76,7 @@ noinst_LTLIBRARIES = for arch in machines[machine_name]: if archflags_dict[arch] != "none": tempstring += "-" + archflags_dict[arch] + " " - + tempstring += "\nnoinst_LTLIBRARIES += libvolk_" + machine_name + ".la " tempstring += "\nlibvolk_la_LIBADD += libvolk_" + machine_name + ".la\n" tempstring += "libvolk_la_CPPFLAGS += -DLV_MACHINE_" + machine_name.swapcase() + " \n" diff --git a/volk/gen/make_proccpu_sim.py b/volk/gen/make_proccpu_sim.py index 029dacfcc..e2c8123e5 100644 --- a/volk/gen/make_proccpu_sim.py +++ b/volk/gen/make_proccpu_sim.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. -# +# # This file is part of GNU Radio -# +# # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. -# +# # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -# +# from xml.dom import minidom @@ -35,7 +35,7 @@ def make_proccpu_sim(dom) : tempstring = tempstring + " }\n"; tempstring = tempstring + "}\n"; tempstring = tempstring + "\n\n"; - + tempstring = tempstring + "int main() {\n"; tempstring = tempstring + " volk_cpu_init();\n"; tempstring = tempstring + " char buf[2048];\n"; diff --git a/volk/gen/make_set_simd.py b/volk/gen/make_set_simd.py index 5a848e59e..8334487d7 100644 --- a/volk/gen/make_set_simd.py +++ b/volk/gen/make_set_simd.py @@ -43,17 +43,17 @@ def make_set_simd(dom, machines) : tempstring = tempstring + " indLV_ARCH=no\n"; tempstring = tempstring + " AC_ARG_WITH(lv_arch,\n"; tempstring = tempstring + " AC_HELP_STRING([--with-lv_arch=ARCH],[set volk hardware speedups as space separated string with elements from the following list("; - + for domarch in dom: arch = str(domarch.attributes["name"].value); tempstring = tempstring + arch + ", " tempstring = tempstring[0:len(tempstring) - 2]; - + tempstring = tempstring + ")]),\n"; tempstring = tempstring + " [cf_with_lv_arch=\"$withval\"],\n"; tempstring = tempstring + " [cf_with_lv_arch=\"\"])\n"; if str(domarch.attributes["type"].value) == "all": - arch = str(domarch.attributes["name"].value); + arch = str(domarch.attributes["name"].value); tempstring = tempstring + " AC_DEFINE(LV_MAKE_" + arch.swapcase() + ", 1, [always set "+ arch + "!])\n"; tempstring = tempstring + " ADDONS=\"\"\n"; tempstring = tempstring + " BUILT_ARCHS=\"\"\n"; @@ -67,7 +67,7 @@ def make_set_simd(dom, machines) : tempstring = tempstring[0:-1] + "\"\n"; tempstring = tempstring + " OVERRULE_FLAG=\"yes\"\n"; tempstring = tempstring + " fi\n"; - + tempstring = tempstring +'\ndnl init LV_MAKE_XXX and then try to add archs\n'; for domarch in dom: if str(domarch.attributes["type"].value) != "all": @@ -118,9 +118,9 @@ def make_set_simd(dom, machines) : tempstring = tempstring + " if test -n \"" + overrule + "\" && test \"$" + overrule + "\" == \"" + overrule_val + "\" && test \"$OVERRULE_FLAG\" == \"yes\" && test \"$indLV_ARCH\" == \"yes\"; then\n" tempstring = tempstring + " indLV_ARCH=no\n" tempstring = tempstring + " fi\n" - - tempstring = tempstring + " if test \"$indCC\" == \"yes\" && test \"$indCXX\" == \"yes\" && test \"$indLV_ARCH\" == \"yes\"; then\n" - + + tempstring = tempstring + " if test \"$indCC\" == \"yes\" && test \"$indCXX\" == \"yes\" && test \"$indLV_ARCH\" == \"yes\"; then\n" + #tempstring = tempstring + " ADDONS=\"${ADDONS} -" + flag + "\"\n"; tempstring = tempstring + " BUILT_ARCHS=\"${BUILT_ARCHS} " + arch + "\"\n"; tempstring = tempstring + " LV_MAKE_" + arch.swapcase() + "=yes\n"; @@ -138,17 +138,17 @@ def make_set_simd(dom, machines) : tempstring = tempstring + " if test -n \"" + overrule + "\" && test \"$" + overrule + "\" == \"" + overrule_val + "\" && test \"$OVERRULE_FLAG\" == \"yes\" && test \"$indLV_ARCH\" == \"yes\"; then\n" tempstring = tempstring + " indLV_ARCH=no\n" tempstring = tempstring + " fi\n" - tempstring = tempstring + " if test \"$indLV_ARCH\" == \"yes\"; then\n" + tempstring = tempstring + " if test \"$indLV_ARCH\" == \"yes\"; then\n" tempstring = tempstring + " LV_MAKE_" + arch.swapcase() + "=yes\n"; tempstring = tempstring + " BUILT_ARCHS=\"${BUILT_ARCHS} " + arch + "\"\n"; tempstring = tempstring + " fi\n" tempstring = tempstring + " indLV_ARCH=no\n" - + for domarch in dom: arch = str(domarch.attributes["name"].value); tempstring = tempstring + " AM_CONDITIONAL(LV_MAKE_" + arch.swapcase() + ", test \"$LV_MAKE_" + arch.swapcase() + "\" == \"yes\")\n"; - + tempstring += "\n" #now we can define the machines we're compiling for machine_name in machines: @@ -156,11 +156,11 @@ def make_set_simd(dom, machines) : marchlist = machines[machine_name] for march in marchlist: tempstring += "test \"$LV_MAKE_" + march.swapcase() + "\" == \"yes\" && " - + tempstring += "test true)\n" #just so we don't have to detect the last one in the group, i know tempstring = tempstring + " LV_CXXFLAGS=\"${LV_CXXFLAGS} ${ADDONS}\"\n" tempstring = tempstring + "])\n" - + return tempstring; - + diff --git a/volk/gen/make_typedefs.py b/volk/gen/make_typedefs.py index 8f9f2b55e..09221d2ef 100644 --- a/volk/gen/make_typedefs.py +++ b/volk/gen/make_typedefs.py @@ -15,7 +15,7 @@ def make_typedefs(funclist, retlist, my_argtypelist) : tempstring = tempstring + '\n'; - for i in range(len(funclist)): + for i in range(len(funclist)): tempstring = tempstring + "typedef " + retlist[i] +" (*" + replace_volk.sub("p", funclist[i]) + ")(" + my_argtypelist[i] + ");\n"; tempstring = tempstring + "#endif /*INCLUDED_VOLK_TYPEDEFS*/\n"; diff --git a/volk/gen/volk_register.py b/volk/gen/volk_register.py index 0774ece29..3a237c5ca 100644 --- a/volk/gen/volk_register.py +++ b/volk/gen/volk_register.py @@ -62,7 +62,7 @@ for line in hdr_files: subdtype = re.search("[0-9]+[A-z]+", dtype); if subdtype: datatypes.append(subdtype.group(0)); - + datatypes = set(datatypes); @@ -71,7 +71,7 @@ for line in hdr_files: if dt in line: subline = re.search("(volk_" + dt +"_.*(a|u).*\.h)", line); if subline: - + subsubline = re.search(".+(?=\.h)", subline.group(0)); functions.append(subsubline.group(0)); @@ -80,13 +80,13 @@ afile = minidom.parse(os.path.join(srcdir, "gen/archs.xml")) filearchs = afile.getElementsByTagName("arch"); for filearch in filearchs: archs.append(str(filearch.attributes["name"].value)); - + for arch in archs: a_var = re.search("^\$", arch); if a_var: archs.remove(arch); - -#strip out mutex archs + +#strip out mutex archs archflags_dict = {} for filearch in filearchs: @@ -177,22 +177,22 @@ for func in functions: tag = re.search("\w+", tag.group(0)); if tag: tags.append(tag.group(0)); - - + + if begun_name == 0: retline = re.search(".+(?=" + func + ")", line); if retline: ret = retline.group(0); - - - - + + + + subline = re.search(func + ".*", line); if subline: subsubline = re.search("\(.*?\)", subline.group(0)); if subsubline: args = subsubline.group(0); - + else: begun_name = 1; subsubline = re.search("\(.*", subline.group(0)); @@ -214,25 +214,25 @@ for func in functions: if subline: args = subline.group(0); begun_name = 0; - else: + else: subline = re.search("\(.*", line); if subline: args = subline.group(0); begun_paren = 1; - + replace = re.compile("static "); ret = replace.sub("", ret); replace = re.compile("inline "); ret = replace.sub("", ret); replace = re.compile("\)"); arched_args = replace.sub(", const char* arch) {", args); - + remove = re.compile('\)|\(|{'); rargs = remove.sub("", args); sargs = rargs.split(','); - - - + + + margs = []; atypes = []; for arg in sargs: @@ -241,7 +241,7 @@ for func in functions: replace = re.compile(" " + temp[-1]); atypes.append(replace.sub("", arg)); - + my_args = "" arg_types = "" for arg in range(0, len(margs) - 1): @@ -255,7 +255,7 @@ for func in functions: this_type = leading_space_remove.sub("", atypes[-1]); arg_types = arg_types + this_type; my_argtypelist.append(arg_types); - + if(ret[-1] != ' '): ret = ret + ' '; @@ -263,7 +263,7 @@ for func in functions: my_arglist.append(my_args) #!!!!!!!!!!!!!!!!! retlist.append(ret); fcountlist.append(fcount); - taglist.append(tags); + taglist.append(tags); outfile_cpu_h.write(make_cpuid_h(filearchs)); diff --git a/volk/include/.gitignore b/volk/include/.gitignore deleted file mode 100644 index 378f771f5..000000000 --- a/volk/include/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/*.cache -/*.la -/*.lo -/*.pc -/.deps -/.la -/.libs -/.lo -/Makefile -/Makefile.in diff --git a/volk/include/Makefile.am b/volk/include/Makefile.am deleted file mode 100644 index 375d1a7d5..000000000 --- a/volk/include/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -# -# 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 this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - -include $(top_srcdir)/Makefile.common - -SUBDIRS = volk diff --git a/volk/include/volk/.gitignore b/volk/include/volk/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/volk/include/volk/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/volk/include/volk/Makefile.am b/volk/include/volk/Makefile.am deleted file mode 100644 index a01ddf193..000000000 --- a/volk/include/volk/Makefile.am +++ /dev/null @@ -1,140 +0,0 @@ -# -# Copyright 2010,2011 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - -include $(top_srcdir)/Makefile.common - -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) \ - $(LV_CXXFLAGS) $(WITH_INCLUDES) - -volkincludedir = $(prefix)/include/volk - -volkinclude_HEADERS = \ - volk_complex.h \ - volk_common.h \ - volk_prefs.h \ - $(top_gendir)/include/volk/volk_config_fixed.h \ - $(top_gendir)/include/volk/volk_typedefs.h \ - $(top_gendir)/include/volk/volk.h \ - $(top_gendir)/include/volk/volk_cpu.h \ - volk_16i_x5_add_quad_16i_x4_a.h \ - volk_16i_branch_4_state_8_a.h \ - volk_16ic_deinterleave_16i_x2_a.h \ - volk_16ic_s32f_deinterleave_32f_x2_a.h \ - volk_16ic_deinterleave_real_16i_a.h \ - volk_16ic_s32f_deinterleave_real_32f_a.h \ - volk_16ic_deinterleave_real_8i_a.h \ - volk_16ic_magnitude_16i_a.h \ - volk_16ic_s32f_magnitude_32f_a.h \ - volk_16i_s32f_convert_32f_a.h \ - volk_16i_s32f_convert_32f_u.h \ - volk_16i_convert_8i_a.h \ - volk_16i_convert_8i_u.h \ - volk_16i_max_star_16i_a.h \ - volk_16i_max_star_horizontal_16i_a.h \ - volk_16i_permute_and_scalar_add_a.h \ - volk_16i_x4_quad_max_star_16i_a.h \ - volk_16u_byteswap_a.h \ - volk_32f_accumulator_s32f_a.h \ - volk_32f_x2_add_32f_a.h \ - volk_32f_x2_add_32f_u.h \ - volk_32f_s32f_multiply_32f_a.h \ - volk_32f_s32f_multiply_32f_u.h \ - volk_32fc_32f_multiply_32fc_a.h \ - volk_32fc_s32fc_multiply_32fc_a.h \ - volk_32fc_s32fc_multiply_32fc_u.h \ - volk_32fc_x2_multiply_conjugate_32fc_a.h \ - volk_32fc_x2_multiply_conjugate_32fc_u.h \ - volk_32fc_s32f_power_32fc_a.h \ - volk_32f_s32f_calc_spectral_noise_floor_32f_a.h \ - volk_32fc_s32f_atan2_32f_a.h \ - volk_32fc_x2_conjugate_dot_prod_32fc_a.h \ - volk_32fc_x2_conjugate_dot_prod_32fc_u.h \ - volk_32fc_deinterleave_32f_x2_a.h \ - volk_32fc_deinterleave_64f_x2_a.h \ - volk_32fc_s32f_deinterleave_real_16i_a.h \ - volk_32fc_deinterleave_real_32f_a.h \ - volk_32fc_deinterleave_imag_32f_a.h \ - volk_32fc_deinterleave_real_64f_a.h \ - volk_32fc_x2_dot_prod_32fc_a.h \ - volk_32fc_x2_dot_prod_32fc_u.h \ - volk_32fc_index_max_16u_a.h \ - volk_32fc_s32f_magnitude_16i_a.h \ - volk_32fc_magnitude_32f_a.h \ - volk_32fc_magnitude_32f_u.h \ - volk_32fc_magnitude_squared_32f_a.h \ - volk_32fc_magnitude_squared_32f_u.h \ - volk_32fc_x2_multiply_32fc_a.h \ - volk_32fc_x2_multiply_32fc_u.h \ - volk_32f_s32f_convert_16i_a.h \ - volk_32f_s32f_convert_16i_u.h \ - volk_32f_s32f_convert_32i_a.h \ - volk_32f_s32f_convert_32i_u.h \ - volk_32f_convert_64f_a.h \ - volk_32f_convert_64f_u.h \ - volk_32f_s32f_convert_8i_a.h \ - volk_32f_s32f_convert_8i_u.h \ - volk_32fc_s32f_x2_power_spectral_density_32f_a.h \ - volk_32fc_s32f_power_spectrum_32f_a.h \ - volk_32fc_x2_square_dist_32f_a.h \ - volk_32fc_x2_s32f_square_dist_scalar_mult_32f_a.h \ - volk_32f_x2_divide_32f_a.h \ - volk_32f_x2_dot_prod_32f_a.h \ - volk_32f_x2_dot_prod_32f_u.h \ - volk_32f_s32f_32f_fm_detect_32f_a.h \ - volk_32f_index_max_16u_a.h \ - volk_32f_x2_s32f_interleave_16ic_a.h \ - volk_32f_x2_interleave_32fc_a.h \ - volk_32f_x2_max_32f_a.h \ - volk_32f_x2_min_32f_a.h \ - volk_32f_x2_multiply_32f_a.h \ - volk_32f_x2_multiply_32f_u.h \ - volk_32f_s32f_normalize_a.h \ - volk_32f_s32f_power_32f_a.h \ - volk_32f_sqrt_32f_a.h \ - volk_32f_s32f_stddev_32f_a.h \ - volk_32f_stddev_and_mean_32f_x2_a.h \ - volk_32f_x2_subtract_32f_a.h \ - volk_32f_x3_sum_of_poly_32f_a.h \ - volk_32i_x2_and_32i_a.h \ - volk_32i_s32f_convert_32f_a.h \ - volk_32i_s32f_convert_32f_u.h \ - volk_32i_x2_or_32i_a.h \ - volk_32u_byteswap_a.h \ - volk_32u_popcnt_a.h \ - volk_64f_convert_32f_a.h \ - volk_64f_convert_32f_u.h \ - volk_64f_x2_max_64f_a.h \ - volk_64f_x2_min_64f_a.h \ - volk_64u_byteswap_a.h \ - volk_64u_popcnt_a.h \ - volk_8ic_deinterleave_16i_x2_a.h \ - volk_8ic_s32f_deinterleave_32f_x2_a.h \ - volk_8ic_deinterleave_real_16i_a.h \ - volk_8ic_s32f_deinterleave_real_32f_a.h \ - volk_8ic_deinterleave_real_8i_a.h \ - volk_8ic_x2_multiply_conjugate_16ic_a.h \ - volk_8ic_x2_s32f_multiply_conjugate_32fc_a.h \ - volk_8i_convert_16i_a.h \ - volk_8i_convert_16i_u.h \ - volk_8i_s32f_convert_32f_a.h \ - volk_8i_s32f_convert_32f_u.h \ - volk_32fc_conjugate_32fc_a.h \ - volk_32fc_conjugate_32fc_u.h - diff --git a/volk/include/volk/volk_16i_branch_4_state_8_a.h b/volk/include/volk/volk_16i_branch_4_state_8_a.h index 0424e66e9..6338fbdd1 100644 --- a/volk/include/volk/volk_16i_branch_4_state_8_a.h +++ b/volk/include/volk/volk_16i_branch_4_state_8_a.h @@ -3,7 +3,7 @@ #include<inttypes.h> -#include<stdio.h> +#include<stdio.h> @@ -15,32 +15,32 @@ #include<tmmintrin.h> static inline void volk_16i_branch_4_state_8_a_ssse3(short* target, short* src0, char** permuters, short* cntl2, short* cntl3, short* scalars) { - - + + __m128i xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm8, xmm9, xmm10, xmm11; __m128i *p_target, *p_src0, *p_cntl2, *p_cntl3, *p_scalars; - - + + p_target = (__m128i*)target; p_src0 = (__m128i*)src0; p_cntl2 = (__m128i*)cntl2; p_cntl3 = (__m128i*)cntl3; p_scalars = (__m128i*)scalars; - + int i = 0; - + int bound = 1; - - + + xmm0 = _mm_load_si128(p_scalars); - + xmm1 = _mm_shufflelo_epi16(xmm0, 0); xmm2 = _mm_shufflelo_epi16(xmm0, 0x55); xmm3 = _mm_shufflelo_epi16(xmm0, 0xaa); xmm4 = _mm_shufflelo_epi16(xmm0, 0xff); - + xmm1 = _mm_shuffle_epi32(xmm1, 0x00); xmm2 = _mm_shuffle_epi32(xmm2, 0x00); xmm3 = _mm_shuffle_epi32(xmm3, 0x00); @@ -52,40 +52,40 @@ static inline void volk_16i_branch_4_state_8_a_ssse3(short* target, short* src xmm10 = _mm_load_si128((__m128i*)permuters[3]); for(; i < bound; ++i) { - + xmm5 = _mm_load_si128(p_src0); - - - - - - - + + + + + + + xmm0 = _mm_shuffle_epi8(xmm5, xmm0); xmm6 = _mm_shuffle_epi8(xmm5, xmm6); xmm8 = _mm_shuffle_epi8(xmm5, xmm8); xmm10 = _mm_shuffle_epi8(xmm5, xmm10); - + p_src0 += 4; - - + + xmm5 = _mm_add_epi16(xmm1, xmm2); - + xmm6 = _mm_add_epi16(xmm2, xmm6); xmm8 = _mm_add_epi16(xmm1, xmm8); - - + + xmm7 = _mm_load_si128(p_cntl2); xmm9 = _mm_load_si128(p_cntl3); - + xmm0 = _mm_add_epi16(xmm5, xmm0); - - + + xmm7 = _mm_and_si128(xmm7, xmm3); xmm9 = _mm_and_si128(xmm9, xmm4); - + xmm5 = _mm_load_si128(&p_cntl2[1]); xmm11 = _mm_load_si128(&p_cntl3[1]); @@ -95,96 +95,96 @@ static inline void volk_16i_branch_4_state_8_a_ssse3(short* target, short* src xmm11 = _mm_and_si128(xmm11, xmm4); xmm0 = _mm_add_epi16(xmm0, xmm7); - - - + + + xmm7 = _mm_load_si128(&p_cntl2[2]); xmm9 = _mm_load_si128(&p_cntl3[2]); - + xmm5 = _mm_add_epi16(xmm5, xmm11); - + xmm7 = _mm_and_si128(xmm7, xmm3); xmm9 = _mm_and_si128(xmm9, xmm4); - + xmm6 = _mm_add_epi16(xmm6, xmm5); - - + + xmm5 = _mm_load_si128(&p_cntl2[3]); xmm11 = _mm_load_si128(&p_cntl3[3]); - + xmm7 = _mm_add_epi16(xmm7, xmm9); - + xmm5 = _mm_and_si128(xmm5, xmm3); xmm11 = _mm_and_si128(xmm11, xmm4); - + xmm8 = _mm_add_epi16(xmm8, xmm7); - + xmm5 = _mm_add_epi16(xmm5, xmm11); - + _mm_store_si128(p_target, xmm0); _mm_store_si128(&p_target[1], xmm6); xmm10 = _mm_add_epi16(xmm5, xmm10); - + _mm_store_si128(&p_target[2], xmm8); - + _mm_store_si128(&p_target[3], xmm10); - - p_target += 3; + + p_target += 3; } } - - + + #endif /*LV_HAVE_SSEs*/ #ifdef LV_HAVE_GENERIC static inline void volk_16i_branch_4_state_8_a_generic(short* target, short* src0, char** permuters, short* cntl2, short* cntl3, short* scalars) { int i = 0; - + int bound = 4; - + for(; i < bound; ++i) { - target[i* 8] = src0[((char)permuters[i][0])/2] + target[i* 8] = src0[((char)permuters[i][0])/2] + ((i + 1)%2 * scalars[0]) + (((i >> 1)^1) * scalars[1]) + (cntl2[i * 8] & scalars[2]) + (cntl3[i * 8] & scalars[3]); - target[i* 8 + 1] = src0[((char)permuters[i][1 * 2])/2] + target[i* 8 + 1] = src0[((char)permuters[i][1 * 2])/2] + ((i + 1)%2 * scalars[0]) + (((i >> 1)^1) * scalars[1]) + (cntl2[i * 8 + 1] & scalars[2]) + (cntl3[i * 8 + 1] & scalars[3]); - target[i* 8 + 2] = src0[((char)permuters[i][2 * 2])/2] + target[i* 8 + 2] = src0[((char)permuters[i][2 * 2])/2] + ((i + 1)%2 * scalars[0]) + (((i >> 1)^1) * scalars[1]) + (cntl2[i * 8 + 2] & scalars[2]) + (cntl3[i * 8 + 2] & scalars[3]); - target[i* 8 + 3] = src0[((char)permuters[i][3 * 2])/2] + target[i* 8 + 3] = src0[((char)permuters[i][3 * 2])/2] + ((i + 1)%2 * scalars[0]) + (((i >> 1)^1) * scalars[1]) + (cntl2[i * 8 + 3] & scalars[2]) + (cntl3[i * 8 + 3] & scalars[3]); - target[i* 8 + 4] = src0[((char)permuters[i][4 * 2])/2] + target[i* 8 + 4] = src0[((char)permuters[i][4 * 2])/2] + ((i + 1)%2 * scalars[0]) + (((i >> 1)^1) * scalars[1]) + (cntl2[i * 8 + 4] & scalars[2]) + (cntl3[i * 8 + 4] & scalars[3]); - target[i* 8 + 5] = src0[((char)permuters[i][5 * 2])/2] + target[i* 8 + 5] = src0[((char)permuters[i][5 * 2])/2] + ((i + 1)%2 * scalars[0]) + (((i >> 1)^1) * scalars[1]) + (cntl2[i * 8 + 5] & scalars[2]) + (cntl3[i * 8 + 5] & scalars[3]); - target[i* 8 + 6] = src0[((char)permuters[i][6 * 2])/2] + target[i* 8 + 6] = src0[((char)permuters[i][6 * 2])/2] + ((i + 1)%2 * scalars[0]) + (((i >> 1)^1) * scalars[1]) + (cntl2[i * 8 + 6] & scalars[2]) + (cntl3[i * 8 + 6] & scalars[3]); - target[i* 8 + 7] = src0[((char)permuters[i][7 * 2])/2] + target[i* 8 + 7] = src0[((char)permuters[i][7 * 2])/2] + ((i + 1)%2 * scalars[0]) + (((i >> 1)^1) * scalars[1]) + (cntl2[i * 8 + 7] & scalars[2]) + (cntl3[i * 8 + 7] & scalars[3]); - + } } diff --git a/volk/include/volk/volk_16i_convert_8i_a.h b/volk/include/volk/volk_16i_convert_8i_a.h index 8046035c7..84548c8c5 100644 --- a/volk/include/volk/volk_16i_convert_8i_a.h +++ b/volk/include/volk/volk_16i_convert_8i_a.h @@ -15,7 +15,7 @@ static inline void volk_16i_convert_8i_a_sse2(int8_t* outputVector, const int16_t* inputVector, unsigned int num_points){ unsigned int number = 0; const unsigned int sixteenthPoints = num_points / 16; - + int8_t* outputVectorPtr = outputVector; int16_t* inputPtr = (int16_t*)inputVector; __m128i inputVal1; @@ -30,7 +30,7 @@ static inline void volk_16i_convert_8i_a_sse2(int8_t* outputVector, const int16_ inputVal1 = _mm_srai_epi16(inputVal1, 8); inputVal2 = _mm_srai_epi16(inputVal2, 8); - + ret = _mm_packs_epi16(inputVal1, inputVal2); _mm_store_si128((__m128i*)outputVectorPtr, ret); diff --git a/volk/include/volk/volk_16i_convert_8i_u.h b/volk/include/volk/volk_16i_convert_8i_u.h index df1084fe0..80608a141 100644 --- a/volk/include/volk/volk_16i_convert_8i_u.h +++ b/volk/include/volk/volk_16i_convert_8i_u.h @@ -16,7 +16,7 @@ static inline void volk_16i_convert_8i_u_sse2(int8_t* outputVector, const int16_t* inputVector, unsigned int num_points){ unsigned int number = 0; const unsigned int sixteenthPoints = num_points / 16; - + int8_t* outputVectorPtr = outputVector; int16_t* inputPtr = (int16_t*)inputVector; __m128i inputVal1; @@ -31,7 +31,7 @@ static inline void volk_16i_convert_8i_u_sse2(int8_t* outputVector, const int16_ inputVal1 = _mm_srai_epi16(inputVal1, 8); inputVal2 = _mm_srai_epi16(inputVal2, 8); - + ret = _mm_packs_epi16(inputVal1, inputVal2); _mm_storeu_si128((__m128i*)outputVectorPtr, ret); diff --git a/volk/include/volk/volk_16i_max_star_16i_a.h b/volk/include/volk/volk_16i_max_star_16i_a.h index 28197ddef..edfff8a82 100644 --- a/volk/include/volk/volk_16i_max_star_16i_a.h +++ b/volk/include/volk/volk_16i_max_star_16i_a.h @@ -3,7 +3,7 @@ #include<inttypes.h> -#include<stdio.h> +#include<stdio.h> #ifdef LV_HAVE_SSSE3 @@ -15,82 +15,82 @@ static inline void volk_16i_max_star_16i_a_ssse3(short* target, short* src0, unsigned int num_bytes) { - + short candidate = src0[0]; short cands[8]; __m128i xmm0, xmm1, xmm3, xmm4, xmm5, xmm6; - + __m128i *p_src0; - + p_src0 = (__m128i*)src0; int bound = num_bytes >> 4; int leftovers = (num_bytes >> 1) & 7; - + int i = 0; - - + + xmm1 = _mm_setzero_si128(); xmm0 = _mm_setzero_si128(); //_mm_insert_epi16(xmm0, candidate, 0); - - xmm0 = _mm_shuffle_epi8(xmm0, xmm1); - + xmm0 = _mm_shuffle_epi8(xmm0, xmm1); + + for(i = 0; i < bound; ++i) { xmm1 = _mm_load_si128(p_src0); p_src0 += 1; //xmm2 = _mm_sub_epi16(xmm1, xmm0); - - - - - + + + + + xmm3 = _mm_cmpgt_epi16(xmm0, xmm1); xmm4 = _mm_cmpeq_epi16(xmm0, xmm1); xmm5 = _mm_cmpgt_epi16(xmm1, xmm0); xmm6 = _mm_xor_si128(xmm4, xmm5); - + xmm3 = _mm_and_si128(xmm3, xmm0); xmm4 = _mm_and_si128(xmm6, xmm1); - + xmm0 = _mm_add_epi16(xmm3, xmm4); - - + + } - + _mm_store_si128((__m128i*)cands, xmm0); - + for(i = 0; i < 8; ++i) { candidate = ((short)(candidate - cands[i]) > 0) ? candidate : cands[i]; } - - - + + + for(i = 0; i < leftovers; ++i) { - + candidate = ((short)(candidate - src0[(bound << 3) + i]) > 0) ? candidate : src0[(bound << 3) + i]; } target[0] = candidate; - - - - -} - + + + + +} + #endif /*LV_HAVE_SSSE3*/ #ifdef LV_HAVE_GENERIC static inline void volk_16i_max_star_16i_a_generic(short* target, short* src0, unsigned int num_bytes) { - + int i = 0; - + int bound = num_bytes >> 1; short candidate = src0[0]; @@ -98,7 +98,7 @@ static inline void volk_16i_max_star_16i_a_generic(short* target, short* src0, u candidate = ((short)(candidate - src0[i]) > 0) ? candidate : src0[i]; } target[0] = candidate; - + } diff --git a/volk/include/volk/volk_16i_max_star_horizontal_16i_a.h b/volk/include/volk/volk_16i_max_star_horizontal_16i_a.h index a10a62350..c1c908425 100644 --- a/volk/include/volk/volk_16i_max_star_horizontal_16i_a.h +++ b/volk/include/volk/volk_16i_max_star_horizontal_16i_a.h @@ -4,7 +4,7 @@ #include <volk/volk_common.h> #include<inttypes.h> -#include<stdio.h> +#include<stdio.h> #ifdef LV_HAVE_SSSE3 @@ -20,107 +20,107 @@ static inline void volk_16i_max_star_horizontal_16i_a_ssse3(int16_t* target, in const static uint8_t andmask0[16] = {0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; const static uint8_t andmask1[16] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02}; - - + + __m128i xmm0, xmm1, xmm2, xmm3, xmm4; __m128i xmm5, xmm6, xmm7, xmm8; - + xmm4 = _mm_load_si128((__m128i*)shufmask0); xmm5 = _mm_load_si128((__m128i*)shufmask1); xmm6 = _mm_load_si128((__m128i*)andmask0); xmm7 = _mm_load_si128((__m128i*)andmask1); - + __m128i *p_target, *p_src0; - + p_target = (__m128i*)target; p_src0 = (__m128i*)src0; int bound = num_bytes >> 5; int intermediate = (num_bytes >> 4) & 1; int leftovers = (num_bytes >> 1) & 7; - + int i = 0; - - + + for(i = 0; i < bound; ++i) { - + xmm0 = _mm_load_si128(p_src0); xmm1 = _mm_load_si128(&p_src0[1]); - - + + xmm2 = _mm_xor_si128(xmm2, xmm2); p_src0 += 2; - + xmm3 = _mm_hsub_epi16(xmm0, xmm1); - - xmm2 = _mm_cmpgt_epi16(xmm2, xmm3); + + xmm2 = _mm_cmpgt_epi16(xmm2, xmm3); xmm8 = _mm_and_si128(xmm2, xmm6); xmm3 = _mm_and_si128(xmm2, xmm7); - + xmm8 = _mm_add_epi8(xmm8, xmm4); xmm3 = _mm_add_epi8(xmm3, xmm5); xmm0 = _mm_shuffle_epi8(xmm0, xmm8); xmm1 = _mm_shuffle_epi8(xmm1, xmm3); - - + + xmm3 = _mm_add_epi16(xmm0, xmm1); - + _mm_store_si128(p_target, xmm3); - + p_target += 1; - + } for(i = 0; i < intermediate; ++i) { - + xmm0 = _mm_load_si128(p_src0); - - + + xmm2 = _mm_xor_si128(xmm2, xmm2); p_src0 += 1; - + xmm3 = _mm_hsub_epi16(xmm0, xmm1); xmm2 = _mm_cmpgt_epi16(xmm2, xmm3); xmm8 = _mm_and_si128(xmm2, xmm6); - + xmm3 = _mm_add_epi8(xmm8, xmm4); - + xmm0 = _mm_shuffle_epi8(xmm0, xmm3); - + _mm_storel_pd((double*)p_target, bit128_p(&xmm0)->double_vec); - + p_target = (__m128i*)((int8_t*)p_target + 8); } - - for(i = (bound << 4) + (intermediate << 3); i < (bound << 4) + (intermediate << 3) + leftovers ; i += 2) { + + for(i = (bound << 4) + (intermediate << 3); i < (bound << 4) + (intermediate << 3) + leftovers ; i += 2) { target[i>>1] = ((int16_t)(src0[i] - src0[i + 1]) > 0) ? src0[i] : src0[i + 1]; } - -} - + +} + #endif /*LV_HAVE_SSSE3*/ #ifdef LV_HAVE_GENERIC static inline void volk_16i_max_star_horizontal_16i_a_generic(int16_t* target, int16_t* src0, unsigned int num_bytes) { - + int i = 0; - + int bound = num_bytes >> 1; - + for(i = 0; i < bound; i += 2) { target[i >> 1] = ((int16_t) (src0[i] - src0[i + 1]) > 0) ? src0[i] : src0[i+1]; } - + } diff --git a/volk/include/volk/volk_16i_permute_and_scalar_add_a.h b/volk/include/volk/volk_16i_permute_and_scalar_add_a.h index de36cee80..47e3cbf9c 100644 --- a/volk/include/volk/volk_16i_permute_and_scalar_add_a.h +++ b/volk/include/volk/volk_16i_permute_and_scalar_add_a.h @@ -3,7 +3,7 @@ #include<inttypes.h> -#include<stdio.h> +#include<stdio.h> @@ -14,33 +14,33 @@ #include<emmintrin.h> static inline void volk_16i_permute_and_scalar_add_a_sse2(short* target, short* src0, short* permute_indexes, short* cntl0, short* cntl1, short* cntl2, short* cntl3, short* scalars, unsigned int num_bytes) { - + __m128i xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7; __m128i *p_target, *p_cntl0, *p_cntl1, *p_cntl2, *p_cntl3, *p_scalars; short* p_permute_indexes = permute_indexes; - + p_target = (__m128i*)target; p_cntl0 = (__m128i*)cntl0; p_cntl1 = (__m128i*)cntl1; p_cntl2 = (__m128i*)cntl2; p_cntl3 = (__m128i*)cntl3; p_scalars = (__m128i*)scalars; - + int i = 0; - + int bound = (num_bytes >> 4); int leftovers = (num_bytes >> 1) & 7; - + xmm0 = _mm_load_si128(p_scalars); - + xmm1 = _mm_shufflelo_epi16(xmm0, 0); xmm2 = _mm_shufflelo_epi16(xmm0, 0x55); xmm3 = _mm_shufflelo_epi16(xmm0, 0xaa); xmm4 = _mm_shufflelo_epi16(xmm0, 0xff); - + xmm1 = _mm_shuffle_epi32(xmm1, 0x00); xmm2 = _mm_shuffle_epi32(xmm2, 0x00); xmm3 = _mm_shuffle_epi32(xmm3, 0x00); @@ -64,49 +64,49 @@ static inline void volk_16i_permute_and_scalar_add_a_sse2(short* target, short xmm0 = _mm_add_epi16(xmm0, xmm5); xmm6 = _mm_add_epi16(xmm6, xmm7); - + p_permute_indexes += 8; - + xmm0 = _mm_add_epi16(xmm0, xmm6); - + xmm5 = _mm_load_si128(p_cntl0); xmm6 = _mm_load_si128(p_cntl1); xmm7 = _mm_load_si128(p_cntl2); - + xmm5 = _mm_and_si128(xmm5, xmm1); xmm6 = _mm_and_si128(xmm6, xmm2); xmm7 = _mm_and_si128(xmm7, xmm3); - + xmm0 = _mm_add_epi16(xmm0, xmm5); - + xmm5 = _mm_load_si128(p_cntl3); - + xmm6 = _mm_add_epi16(xmm6, xmm7); p_cntl0 += 1; - + xmm5 = _mm_and_si128(xmm5, xmm4); - + xmm0 = _mm_add_epi16(xmm0, xmm6); - + p_cntl1 += 1; p_cntl2 += 1; - - xmm0 = _mm_add_epi16(xmm0, xmm5); - + + xmm0 = _mm_add_epi16(xmm0, xmm5); + p_cntl3 += 1; _mm_store_si128(p_target, xmm0); - + p_target += 1; } - - - - + + + + for(i = bound * 8; i < (bound * 8) + leftovers; ++i) { - target[i] = src0[permute_indexes[i]] + target[i] = src0[permute_indexes[i]] + (cntl0[i] & scalars[0]) + (cntl1[i] & scalars[1]) + (cntl2[i] & scalars[2]) @@ -118,18 +118,18 @@ static inline void volk_16i_permute_and_scalar_add_a_sse2(short* target, short #ifdef LV_HAVE_GENERIC static inline void volk_16i_permute_and_scalar_add_a_generic(short* target, short* src0, short* permute_indexes, short* cntl0, short* cntl1, short* cntl2, short* cntl3, short* scalars, unsigned int num_bytes) { - + int i = 0; - + int bound = num_bytes >> 1; for(i = 0; i < bound; ++i) { - target[i] = src0[permute_indexes[i]] + target[i] = src0[permute_indexes[i]] + (cntl0[i] & scalars[0]) + (cntl1[i] & scalars[1]) + (cntl2[i] & scalars[2]) + (cntl3[i] & scalars[3]); - + } } diff --git a/volk/include/volk/volk_16i_s32f_convert_32f_a.h b/volk/include/volk/volk_16i_s32f_convert_32f_a.h index 0555fdf00..7108ff659 100644 --- a/volk/include/volk/volk_16i_s32f_convert_32f_a.h +++ b/volk/include/volk/volk_16i_s32f_convert_32f_a.h @@ -17,7 +17,7 @@ static inline void volk_16i_s32f_convert_32f_a_sse4_1(float* outputVector, const int16_t* inputVector, const float scalar, unsigned int num_points){ unsigned int number = 0; const unsigned int eighthPoints = num_points / 8; - + float* outputVectorPtr = outputVector; __m128 invScalar = _mm_set_ps1(1.0/scalar); int16_t* inputPtr = (int16_t*)inputVector; @@ -36,7 +36,7 @@ static inline void volk_16i_s32f_convert_32f_a_sse4_1(float* outputVector, const // Convert the lower 4 values into 32 bit words inputVal = _mm_cvtepi16_epi32(inputVal); inputVal2 = _mm_cvtepi16_epi32(inputVal2); - + ret = _mm_cvtepi32_ps(inputVal); ret = _mm_mul_ps(ret, invScalar); _mm_storeu_ps(outputVectorPtr, ret); @@ -71,7 +71,7 @@ static inline void volk_16i_s32f_convert_32f_a_sse4_1(float* outputVector, const static inline void volk_16i_s32f_convert_32f_a_sse(float* outputVector, const int16_t* inputVector, const float scalar, unsigned int num_points){ unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; - + float* outputVectorPtr = outputVector; __m128 invScalar = _mm_set_ps1(1.0/scalar); int16_t* inputPtr = (int16_t*)inputVector; @@ -79,7 +79,7 @@ static inline void volk_16i_s32f_convert_32f_a_sse(float* outputVector, const in for(;number < quarterPoints; number++){ ret = _mm_set_ps((float)(inputPtr[3]), (float)(inputPtr[2]), (float)(inputPtr[1]), (float)(inputPtr[0])); - + ret = _mm_mul_ps(ret, invScalar); _mm_storeu_ps(outputVectorPtr, ret); diff --git a/volk/include/volk/volk_16i_s32f_convert_32f_u.h b/volk/include/volk/volk_16i_s32f_convert_32f_u.h index d34acc091..4ce8e8f35 100644 --- a/volk/include/volk/volk_16i_s32f_convert_32f_u.h +++ b/volk/include/volk/volk_16i_s32f_convert_32f_u.h @@ -18,7 +18,7 @@ static inline void volk_16i_s32f_convert_32f_u_sse4_1(float* outputVector, const int16_t* inputVector, const float scalar, unsigned int num_points){ unsigned int number = 0; const unsigned int eighthPoints = num_points / 8; - + float* outputVectorPtr = outputVector; __m128 invScalar = _mm_set_ps1(1.0/scalar); int16_t* inputPtr = (int16_t*)inputVector; @@ -37,7 +37,7 @@ static inline void volk_16i_s32f_convert_32f_u_sse4_1(float* outputVector, const // Convert the lower 4 values into 32 bit words inputVal = _mm_cvtepi16_epi32(inputVal); inputVal2 = _mm_cvtepi16_epi32(inputVal2); - + ret = _mm_cvtepi32_ps(inputVal); ret = _mm_mul_ps(ret, invScalar); _mm_storeu_ps(outputVectorPtr, ret); @@ -73,7 +73,7 @@ static inline void volk_16i_s32f_convert_32f_u_sse4_1(float* outputVector, const static inline void volk_16i_s32f_convert_32f_u_sse(float* outputVector, const int16_t* inputVector, const float scalar, unsigned int num_points){ unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; - + float* outputVectorPtr = outputVector; __m128 invScalar = _mm_set_ps1(1.0/scalar); int16_t* inputPtr = (int16_t*)inputVector; @@ -81,7 +81,7 @@ static inline void volk_16i_s32f_convert_32f_u_sse(float* outputVector, const in for(;number < quarterPoints; number++){ ret = _mm_set_ps((float)(inputPtr[3]), (float)(inputPtr[2]), (float)(inputPtr[1]), (float)(inputPtr[0])); - + ret = _mm_mul_ps(ret, invScalar); _mm_storeu_ps(outputVectorPtr, ret); diff --git a/volk/include/volk/volk_16i_x4_quad_max_star_16i_a.h b/volk/include/volk/volk_16i_x4_quad_max_star_16i_a.h index 2688aff04..0d8498553 100644 --- a/volk/include/volk/volk_16i_x4_quad_max_star_16i_a.h +++ b/volk/include/volk/volk_16i_x4_quad_max_star_16i_a.h @@ -3,7 +3,7 @@ #include<inttypes.h> -#include<stdio.h> +#include<stdio.h> @@ -14,7 +14,7 @@ #include<emmintrin.h> static inline void volk_16i_x4_quad_max_star_16i_a_sse2(short* target, short* src0, short* src1, short* src2, short* src3, unsigned int num_bytes) { - + @@ -23,41 +23,41 @@ static inline void volk_16i_x4_quad_max_star_16i_a_sse2(short* target, short* s int bound = (num_bytes >> 4); int bound_copy = bound; int leftovers = (num_bytes >> 1) & 7; - + __m128i *p_target, *p_src0, *p_src1, *p_src2, *p_src3; p_target = (__m128i*) target; p_src0 = (__m128i*)src0; p_src1 = (__m128i*)src1; p_src2 = (__m128i*)src2; p_src3 = (__m128i*)src3; - - + + __m128i xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm8; while(bound_copy > 0) { - + xmm1 = _mm_load_si128(p_src0); xmm2 = _mm_load_si128(p_src1); xmm3 = _mm_load_si128(p_src2); xmm4 = _mm_load_si128(p_src3); - + xmm5 = _mm_setzero_si128(); xmm6 = _mm_setzero_si128(); xmm7 = xmm1; xmm8 = xmm3; - - + + xmm1 = _mm_sub_epi16(xmm2, xmm1); - + xmm3 = _mm_sub_epi16(xmm4, xmm3); xmm5 = _mm_cmpgt_epi16(xmm1, xmm5); xmm6 = _mm_cmpgt_epi16(xmm3, xmm6); - + xmm2 = _mm_and_si128(xmm5, xmm2); xmm4 = _mm_and_si128(xmm6, xmm4); @@ -67,7 +67,7 @@ static inline void volk_16i_x4_quad_max_star_16i_a_sse2(short* target, short* s xmm5 = _mm_add_epi16(xmm2, xmm5); xmm6 = _mm_add_epi16(xmm4, xmm6); - + xmm1 = _mm_xor_si128(xmm1, xmm1); xmm2 = xmm5; xmm5 = _mm_sub_epi16(xmm6, xmm5); @@ -76,23 +76,23 @@ static inline void volk_16i_x4_quad_max_star_16i_a_sse2(short* target, short* s xmm1 = _mm_cmpgt_epi16(xmm5, xmm1); p_src1 += 1; - + xmm6 = _mm_and_si128(xmm1, xmm6); - + xmm1 = _mm_andnot_si128(xmm1, xmm2); p_src2 += 1; - + xmm1 = _mm_add_epi16(xmm6, xmm1); p_src3 += 1; - + _mm_store_si128(p_target, xmm1); p_target += 1; - + } - + /*asm volatile ( @@ -111,25 +111,25 @@ static inline void volk_16i_x4_quad_max_star_16i_a_sse2(short* target, short* s "movaps %%xmm3, %%xmm8\n\t" "psubw %%xmm2, %%xmm1\n\t" "psubw %%xmm4, %%xmm3\n\t" - + "pcmpgtw %%xmm1, %%xmm5\n\t" "pcmpgtw %%xmm3, %%xmm6\n\t" - + "pand %%xmm5, %%xmm2\n\t" "pand %%xmm6, %%xmm4\n\t" "pandn %%xmm7, %%xmm5\n\t" "pandn %%xmm8, %%xmm6\n\t" - + "paddw %%xmm2, %%xmm5\n\t" "paddw %%xmm4, %%xmm6\n\t" "pxor %%xmm1, %%xmm1\n\t" "movaps %%xmm5, %%xmm2\n\t" - + "psubw %%xmm6, %%xmm5\n\t" "add $16, %[src0]\n\t" "add $-1, %[bound]\n\t" - + "pcmpgtw %%xmm5, %%xmm1\n\t" "add $16, %[src1]\n\t" @@ -144,13 +144,13 @@ static inline void volk_16i_x4_quad_max_star_16i_a_sse2(short* target, short* s "movaps %%xmm1, (%[target])\n\t" "addw $16, %[target]\n\t" "jmp volk_16i_x4_quad_max_star_16i_a_sse2_L1\n\t" - + "volk_16i_x4_quad_max_star_16i_a_sse2_END:\n\t" : :[bound]"r"(bound), [src0]"r"(src0), [src1]"r"(src1), [src2]"r"(src2), [src3]"r"(src3), [target]"r"(target) : ); - */ + */ short temp0 = 0; short temp1 = 0; @@ -169,11 +169,11 @@ static inline void volk_16i_x4_quad_max_star_16i_a_sse2(short* target, short* s #ifdef LV_HAVE_GENERIC static inline void volk_16i_x4_quad_max_star_16i_a_generic(short* target, short* src0, short* src1, short* src2, short* src3, unsigned int num_bytes) { - + int i = 0; - + int bound = num_bytes >> 1; - + short temp0 = 0; short temp1 = 0; for(i = 0; i < bound; ++i) { diff --git a/volk/include/volk/volk_16i_x5_add_quad_16i_x4_a.h b/volk/include/volk/volk_16i_x5_add_quad_16i_x4_a.h index e4c9f17ed..5560b92d9 100644 --- a/volk/include/volk/volk_16i_x5_add_quad_16i_x4_a.h +++ b/volk/include/volk/volk_16i_x5_add_quad_16i_x4_a.h @@ -3,7 +3,7 @@ #include<inttypes.h> -#include<stdio.h> +#include<stdio.h> @@ -14,7 +14,7 @@ #include<emmintrin.h> static inline void volk_16i_x5_add_quad_16i_x4_a_sse2(short* target0, short* target1, short* target2, short* target3, short* src0, short* src1, short* src2, short* src3, short* src4, unsigned int num_bytes) { - + __m128i xmm0, xmm1, xmm2, xmm3, xmm4; __m128i *p_target0, *p_target1, *p_target2, *p_target3, *p_src0, *p_src1, *p_src2, *p_src3, *p_src4; p_target0 = (__m128i*)target0; @@ -39,16 +39,16 @@ static inline void volk_16i_x5_add_quad_16i_x4_a_sse2(short* target0, short* ta xmm2 = _mm_load_si128(p_src2); xmm3 = _mm_load_si128(p_src3); xmm4 = _mm_load_si128(p_src4); - + p_src0 += 1; p_src1 += 1; - + xmm1 = _mm_add_epi16(xmm0, xmm1); xmm2 = _mm_add_epi16(xmm0, xmm2); xmm3 = _mm_add_epi16(xmm0, xmm3); xmm4 = _mm_add_epi16(xmm0, xmm4); - - + + p_src2 += 1; p_src3 += 1; p_src4 += 1; @@ -57,7 +57,7 @@ static inline void volk_16i_x5_add_quad_16i_x4_a_sse2(short* target0, short* ta _mm_store_si128(p_target1, xmm2); _mm_store_si128(p_target2, xmm3); _mm_store_si128(p_target3, xmm4); - + p_target0 += 1; p_target1 += 1; p_target2 += 1; @@ -97,9 +97,9 @@ static inline void volk_16i_x5_add_quad_16i_x4_a_sse2(short* target0, short* ta :[bound]"r"(bound), [src0]"r"(src0), [src1]"r"(src1), [src2]"r"(src2), [src3]"r"(src3), [src4]"r"(src4), [target0]"r"(target0), [target1]"r"(target1), [target2]"r"(target2), [target3]"r"(target3) :"xmm1", "xmm2", "xmm3", "xmm4", "xmm5" ); - + */ - + for(i = bound * 8; i < (bound * 8) + leftovers; ++i) { target0[i] = src0[i] + src1[i]; @@ -114,9 +114,9 @@ static inline void volk_16i_x5_add_quad_16i_x4_a_sse2(short* target0, short* ta #ifdef LV_HAVE_GENERIC static inline void volk_16i_x5_add_quad_16i_x4_a_generic(short* target0, short* target1, short* target2, short* target3, short* src0, short* src1, short* src2, short* src3, short* src4, unsigned int num_bytes) { - + int i = 0; - + int bound = num_bytes >> 1; for(i = 0; i < bound; ++i) { diff --git a/volk/include/volk/volk_16ic_deinterleave_16i_x2_a.h b/volk/include/volk/volk_16ic_deinterleave_16i_x2_a.h index cdd60235e..f8aa30874 100644 --- a/volk/include/volk/volk_16ic_deinterleave_16i_x2_a.h +++ b/volk/include/volk/volk_16ic_deinterleave_16i_x2_a.h @@ -71,7 +71,7 @@ static inline void volk_16ic_deinterleave_16i_x2_a_sse2(int16_t* iBuffer, int16_ __m128i highMask = _mm_set_epi32(0xFFFFFFFF, 0xFFFFFFFF, 0x0, 0x0); unsigned int eighthPoints = num_points / 8; - + for(number = 0; number < eighthPoints; number++){ complexVal1 = _mm_load_si128((__m128i*)complexVectorPtr); complexVectorPtr += 8; complexVal2 = _mm_load_si128((__m128i*)complexVectorPtr); complexVectorPtr += 8; diff --git a/volk/include/volk/volk_16ic_deinterleave_real_16i_a.h b/volk/include/volk/volk_16ic_deinterleave_real_16i_a.h index 2b99e068e..bac1f2e4b 100644 --- a/volk/include/volk/volk_16ic_deinterleave_real_16i_a.h +++ b/volk/include/volk/volk_16ic_deinterleave_real_16i_a.h @@ -64,7 +64,7 @@ static inline void volk_16ic_deinterleave_real_16i_a_sse2(int16_t* iBuffer, cons __m128i highMask = _mm_set_epi32(0xFFFFFFFF, 0xFFFFFFFF, 0x0, 0x0); unsigned int eighthPoints = num_points / 8; - + for(number = 0; number < eighthPoints; number++){ complexVal1 = _mm_load_si128((__m128i*)complexVectorPtr); complexVectorPtr += 8; complexVal2 = _mm_load_si128((__m128i*)complexVectorPtr); complexVectorPtr += 8; diff --git a/volk/include/volk/volk_16ic_magnitude_16i_a.h b/volk/include/volk/volk_16ic_magnitude_16i_a.h index a6951e967..317075e85 100644 --- a/volk/include/volk/volk_16ic_magnitude_16i_a.h +++ b/volk/include/volk/volk_16ic_magnitude_16i_a.h @@ -17,7 +17,7 @@ static inline void volk_16ic_magnitude_16i_a_sse3(int16_t* magnitudeVector, const lv_16sc_t* complexVector, unsigned int num_points){ unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; - + const int16_t* complexVectorPtr = (const int16_t*)complexVector; int16_t* magnitudeVectorPtr = magnitudeVector; @@ -35,7 +35,7 @@ static inline void volk_16ic_magnitude_16i_a_sse3(int16_t* magnitudeVector, cons inputFloatBuffer[1] = (float)(complexVectorPtr[1]); inputFloatBuffer[2] = (float)(complexVectorPtr[2]); inputFloatBuffer[3] = (float)(complexVectorPtr[3]); - + inputFloatBuffer[4] = (float)(complexVectorPtr[4]); inputFloatBuffer[5] = (float)(complexVectorPtr[5]); inputFloatBuffer[6] = (float)(complexVectorPtr[6]); @@ -106,7 +106,7 @@ static inline void volk_16ic_magnitude_16i_a_sse(int16_t* magnitudeVector, const inputFloatBuffer[1] = (float)(complexVectorPtr[1]); inputFloatBuffer[2] = (float)(complexVectorPtr[2]); inputFloatBuffer[3] = (float)(complexVectorPtr[3]); - + cplxValue1 = _mm_load_ps(inputFloatBuffer); complexVectorPtr += 4; diff --git a/volk/include/volk/volk_16ic_s32f_deinterleave_32f_x2_a.h b/volk/include/volk/volk_16ic_s32f_deinterleave_32f_x2_a.h index e73d405e0..1300395ff 100644 --- a/volk/include/volk/volk_16ic_s32f_deinterleave_32f_x2_a.h +++ b/volk/include/volk/volk_16ic_s32f_deinterleave_32f_x2_a.h @@ -20,7 +20,7 @@ static inline void volk_16ic_s32f_deinterleave_32f_x2_a_sse(float* iBuffer, floa float* qBufferPtr = qBuffer; uint64_t number = 0; - const uint64_t quarterPoints = num_points / 4; + const uint64_t quarterPoints = num_points / 4; __m128 cplxValue1, cplxValue2, iValue, qValue; __m128 invScalar = _mm_set_ps1(1.0/scalar); @@ -29,12 +29,12 @@ static inline void volk_16ic_s32f_deinterleave_32f_x2_a_sse(float* iBuffer, floa __VOLK_ATTR_ALIGNED(16) float floatBuffer[8]; for(;number < quarterPoints; number++){ - + floatBuffer[0] = (float)(complexVectorPtr[0]); floatBuffer[1] = (float)(complexVectorPtr[1]); floatBuffer[2] = (float)(complexVectorPtr[2]); floatBuffer[3] = (float)(complexVectorPtr[3]); - + floatBuffer[4] = (float)(complexVectorPtr[4]); floatBuffer[5] = (float)(complexVectorPtr[5]); floatBuffer[6] = (float)(complexVectorPtr[6]); diff --git a/volk/include/volk/volk_16ic_s32f_deinterleave_real_32f_a.h b/volk/include/volk/volk_16ic_s32f_deinterleave_real_32f_a.h index 1630cb0ed..5e2d82b94 100644 --- a/volk/include/volk/volk_16ic_s32f_deinterleave_real_32f_a.h +++ b/volk/include/volk/volk_16ic_s32f_deinterleave_real_32f_a.h @@ -18,7 +18,7 @@ static inline void volk_16ic_s32f_deinterleave_real_32f_a_sse4_1(float* iBuffer, float* iBufferPtr = iBuffer; unsigned int number = 0; - const unsigned int quarterPoints = num_points / 4; + const unsigned int quarterPoints = num_points / 4; __m128 iFloatValue; @@ -49,7 +49,7 @@ static inline void volk_16ic_s32f_deinterleave_real_32f_a_sse4_1(float* iBuffer, *iBufferPtr++ = ((float)(*sixteenTComplexVectorPtr++)) * iScalar; sixteenTComplexVectorPtr++; } - + } #endif /* LV_HAVE_SSE4_1 */ @@ -66,7 +66,7 @@ static inline void volk_16ic_s32f_deinterleave_real_32f_a_sse(float* iBuffer, co float* iBufferPtr = iBuffer; unsigned int number = 0; - const unsigned int quarterPoints = num_points / 4; + const unsigned int quarterPoints = num_points / 4; __m128 iValue; const float iScalar = 1.0/scalar; @@ -77,7 +77,7 @@ static inline void volk_16ic_s32f_deinterleave_real_32f_a_sse(float* iBuffer, co for(;number < quarterPoints; number++){ floatBuffer[0] = (float)(*complexVectorPtr); complexVectorPtr += 2; - floatBuffer[1] = (float)(*complexVectorPtr); complexVectorPtr += 2; + floatBuffer[1] = (float)(*complexVectorPtr); complexVectorPtr += 2; floatBuffer[2] = (float)(*complexVectorPtr); complexVectorPtr += 2; floatBuffer[3] = (float)(*complexVectorPtr); complexVectorPtr += 2; @@ -96,7 +96,7 @@ static inline void volk_16ic_s32f_deinterleave_real_32f_a_sse(float* iBuffer, co *iBufferPtr++ = ((float)(*complexVectorPtr++)) * iScalar; complexVectorPtr++; } - + } #endif /* LV_HAVE_SSE */ diff --git a/volk/include/volk/volk_16ic_s32f_magnitude_32f_a.h b/volk/include/volk/volk_16ic_s32f_magnitude_32f_a.h index 35406e2cb..d20eea1a7 100644 --- a/volk/include/volk/volk_16ic_s32f_magnitude_32f_a.h +++ b/volk/include/volk/volk_16ic_s32f_magnitude_32f_a.h @@ -18,7 +18,7 @@ static inline void volk_16ic_s32f_magnitude_32f_a_sse3(float* magnitudeVector, const lv_16sc_t* complexVector, const float scalar, unsigned int num_points){ unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; - + const int16_t* complexVectorPtr = (const int16_t*)complexVector; float* magnitudeVectorPtr = magnitudeVector; @@ -34,7 +34,7 @@ static inline void volk_16ic_s32f_magnitude_32f_a_sse3(float* magnitudeVector, c inputFloatBuffer[1] = (float)(complexVectorPtr[1]); inputFloatBuffer[2] = (float)(complexVectorPtr[2]); inputFloatBuffer[3] = (float)(complexVectorPtr[3]); - + inputFloatBuffer[4] = (float)(complexVectorPtr[4]); inputFloatBuffer[5] = (float)(complexVectorPtr[5]); inputFloatBuffer[6] = (float)(complexVectorPtr[6]); @@ -56,7 +56,7 @@ static inline void volk_16ic_s32f_magnitude_32f_a_sse3(float* magnitudeVector, c result = _mm_sqrt_ps(result); // Square root the values _mm_store_ps(magnitudeVectorPtr, result); - + magnitudeVectorPtr += 4; } @@ -99,7 +99,7 @@ static inline void volk_16ic_s32f_magnitude_32f_a_sse(float* magnitudeVector, co inputFloatBuffer[1] = (float)(complexVectorPtr[1]); inputFloatBuffer[2] = (float)(complexVectorPtr[2]); inputFloatBuffer[3] = (float)(complexVectorPtr[3]); - + inputFloatBuffer[4] = (float)(complexVectorPtr[4]); inputFloatBuffer[5] = (float)(complexVectorPtr[5]); inputFloatBuffer[6] = (float)(complexVectorPtr[6]); @@ -107,7 +107,7 @@ static inline void volk_16ic_s32f_magnitude_32f_a_sse(float* magnitudeVector, co cplxValue1 = _mm_load_ps(&inputFloatBuffer[0]); cplxValue2 = _mm_load_ps(&inputFloatBuffer[4]); - + re = _mm_shuffle_ps(cplxValue1, cplxValue2, 0x88); im = _mm_shuffle_ps(cplxValue1, cplxValue2, 0xdd); @@ -124,7 +124,7 @@ static inline void volk_16ic_s32f_magnitude_32f_a_sse(float* magnitudeVector, co result = _mm_sqrt_ps(result); // Square root the values _mm_store_ps(magnitudeVectorPtr, result); - + magnitudeVectorPtr += 4; } @@ -138,7 +138,7 @@ static inline void volk_16ic_s32f_magnitude_32f_a_sse(float* magnitudeVector, co } } - + #endif /* LV_HAVE_SSE */ #ifdef LV_HAVE_GENERIC diff --git a/volk/include/volk/volk_16u_byteswap_a.h b/volk/include/volk/volk_16u_byteswap_a.h index 75c7ef0f3..fc3eb5fa7 100644 --- a/volk/include/volk/volk_16u_byteswap_a.h +++ b/volk/include/volk/volk_16u_byteswap_a.h @@ -31,9 +31,9 @@ static inline void volk_16u_byteswap_a_sse2(uint16_t* intsToSwap, unsigned int n inputPtr += 8; } - + // Byteswap any remaining points: - number = eighthPoints*8; + number = eighthPoints*8; for(; number < num_points; number++){ uint16_t outputVal = *inputPtr; outputVal = (((outputVal >> 8) & 0xff) | ((outputVal << 8) & 0xff00)); diff --git a/volk/include/volk/volk_32f_accumulator_s32f_a.h b/volk/include/volk/volk_32f_accumulator_s32f_a.h index 7ce0d1c80..78364d0a0 100644 --- a/volk/include/volk/volk_32f_accumulator_s32f_a.h +++ b/volk/include/volk/volk_32f_accumulator_s32f_a.h @@ -20,13 +20,13 @@ static inline void volk_32f_accumulator_s32f_a_sse(float* result, const float* i const float* aPtr = inputBuffer; __VOLK_ATTR_ALIGNED(16) float tempBuffer[4]; - + __m128 accumulator = _mm_setzero_ps(); __m128 aVal = _mm_setzero_ps(); for(;number < quarterPoints; number++){ aVal = _mm_load_ps(aPtr); - accumulator = _mm_add_ps(accumulator, aVal); + accumulator = _mm_add_ps(accumulator, aVal); aPtr += 4; } _mm_store_ps(tempBuffer,accumulator); // Store the results back into the C container @@ -34,7 +34,7 @@ static inline void volk_32f_accumulator_s32f_a_sse(float* result, const float* i returnValue += tempBuffer[1]; returnValue += tempBuffer[2]; returnValue += tempBuffer[3]; - + number = quarterPoints * 4; for(;number < num_points; number++){ returnValue += (*aPtr++); diff --git a/volk/include/volk/volk_32f_convert_64f_a.h b/volk/include/volk/volk_32f_convert_64f_a.h index dda646409..2c469ac42 100644 --- a/volk/include/volk/volk_32f_convert_64f_a.h +++ b/volk/include/volk/volk_32f_convert_64f_a.h @@ -16,7 +16,7 @@ static inline void volk_32f_convert_64f_a_sse2(double* outputVector, const float unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; - + const float* inputVectorPtr = (const float*)inputVector; double* outputVectorPtr = outputVector; __m128d ret; @@ -24,7 +24,7 @@ static inline void volk_32f_convert_64f_a_sse2(double* outputVector, const float for(;number < quarterPoints; number++){ inputVal = _mm_load_ps(inputVectorPtr); inputVectorPtr += 4; - + ret = _mm_cvtps_pd(inputVal); _mm_store_pd(outputVectorPtr, ret); @@ -38,7 +38,7 @@ static inline void volk_32f_convert_64f_a_sse2(double* outputVector, const float outputVectorPtr += 2; } - number = quarterPoints * 4; + number = quarterPoints * 4; for(; number < num_points; number++){ outputVector[number] = (double)(inputVector[number]); } diff --git a/volk/include/volk/volk_32f_convert_64f_u.h b/volk/include/volk/volk_32f_convert_64f_u.h index 387baa3b9..10d8a4f6c 100644 --- a/volk/include/volk/volk_32f_convert_64f_u.h +++ b/volk/include/volk/volk_32f_convert_64f_u.h @@ -16,7 +16,7 @@ static inline void volk_32f_convert_64f_u_sse2(double* outputVector, const float unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; - + const float* inputVectorPtr = (const float*)inputVector; double* outputVectorPtr = outputVector; __m128d ret; @@ -24,7 +24,7 @@ static inline void volk_32f_convert_64f_u_sse2(double* outputVector, const float for(;number < quarterPoints; number++){ inputVal = _mm_loadu_ps(inputVectorPtr); inputVectorPtr += 4; - + ret = _mm_cvtps_pd(inputVal); _mm_storeu_pd(outputVectorPtr, ret); @@ -38,7 +38,7 @@ static inline void volk_32f_convert_64f_u_sse2(double* outputVector, const float outputVectorPtr += 2; } - number = quarterPoints * 4; + number = quarterPoints * 4; for(; number < num_points; number++){ outputVector[number] = (double)(inputVector[number]); } diff --git a/volk/include/volk/volk_32f_index_max_16u_a.h b/volk/include/volk/volk_32f_index_max_16u_a.h index 0c43a5081..b9ca1dd3e 100644 --- a/volk/include/volk/volk_32f_index_max_16u_a.h +++ b/volk/include/volk/volk_32f_index_max_16u_a.h @@ -52,7 +52,7 @@ static inline void volk_32f_index_max_16u_a_sse4_1(unsigned int* target, const f } number = quarterPoints * 4; - for(;number < num_points; number++){ + for(;number < num_points; number++){ if(src0[number] > max){ index = number; max = src0[number]; @@ -111,7 +111,7 @@ static inline void volk_32f_index_max_16u_a_sse(unsigned int* target, const floa } number = quarterPoints * 4; - for(;number < num_points; number++){ + for(;number < num_points; number++){ if(src0[number] > max){ index = number; max = src0[number]; @@ -128,11 +128,11 @@ static inline void volk_32f_index_max_16u_a_generic(unsigned int* target, const if(num_points > 0){ float max = src0[0]; unsigned int index = 0; - - unsigned int i = 1; - + + unsigned int i = 1; + for(; i < num_points; ++i) { - + if(src0[i] > max){ index = i; max = src0[i]; diff --git a/volk/include/volk/volk_32f_s32f_32f_fm_detect_32f_a.h b/volk/include/volk/volk_32f_s32f_32f_fm_detect_32f_a.h index b25df75a1..43713f8b5 100644 --- a/volk/include/volk/volk_32f_s32f_32f_fm_detect_32f_a.h +++ b/volk/include/volk/volk_32f_s32f_32f_fm_detect_32f_a.h @@ -46,7 +46,7 @@ static inline void volk_32f_s32f_32f_fm_detect_32f_a_sse(float* outputVector, co inPtr++; outPtr++; } - + for (; number < quarterPoints; number++) { // Load data next3old1 = _mm_loadu_ps((float*) (inPtr-1)); @@ -65,7 +65,7 @@ static inline void volk_32f_s32f_32f_fm_detect_32f_a_sse(float* outputVector, co _mm_store_ps(outPtr,next3old1); // Store the results back into the output outPtr += 4; } - + for (number = (4 > (quarterPoints*4) ? 4 : (4 * quarterPoints)); number < num_points; number++) { *outPtr = *(inPtr) - *(inPtr-1); if (*outPtr > bound) *outPtr -= 2*bound; @@ -73,7 +73,7 @@ static inline void volk_32f_s32f_32f_fm_detect_32f_a_sse(float* outputVector, co inPtr++; outPtr++; } - + *saveValue = inputVector[num_points-1]; } #endif /* LV_HAVE_SSE */ @@ -94,14 +94,14 @@ static inline void volk_32f_s32f_32f_fm_detect_32f_a_generic(float* outputVector unsigned int number = 0; float* outPtr = outputVector; const float* inPtr = inputVector; - + // Do the first 1 by hand since we're going in from the saveValue: *outPtr = *inPtr - *saveValue; if (*outPtr > bound) *outPtr -= 2*bound; if (*outPtr < -bound) *outPtr += 2*bound; inPtr++; outPtr++; - + for (number = 1; number < num_points; number++) { *outPtr = *(inPtr) - *(inPtr-1); if (*outPtr > bound) *outPtr -= 2*bound; @@ -109,7 +109,7 @@ static inline void volk_32f_s32f_32f_fm_detect_32f_a_generic(float* outputVector inPtr++; outPtr++; } - + *saveValue = inputVector[num_points-1]; } #endif /* LV_HAVE_GENERIC */ diff --git a/volk/include/volk/volk_32f_s32f_calc_spectral_noise_floor_32f_a.h b/volk/include/volk/volk_32f_s32f_calc_spectral_noise_floor_32f_a.h index b1902a8c0..db61e359d 100644 --- a/volk/include/volk/volk_32f_s32f_calc_spectral_noise_floor_32f_a.h +++ b/volk/include/volk/volk_32f_s32f_calc_spectral_noise_floor_32f_a.h @@ -23,7 +23,7 @@ static inline void volk_32f_s32f_calc_spectral_noise_floor_32f_a_sse(float* nois const float* dataPointsPtr = realDataPoints; __VOLK_ATTR_ALIGNED(16) float avgPointsVector[4]; - + __m128 dataPointsVal; __m128 avgPointsVal = _mm_setzero_ps(); // Calculate the sum (for mean) for all points @@ -73,11 +73,11 @@ static inline void volk_32f_s32f_calc_spectral_noise_floor_32f_a_sse(float* nois // Mask off the items that exceed the mean amplitude and add the avg Points that do not exceed the mean amplitude avgPointsVal = _mm_add_ps(avgPointsVal, _mm_and_ps(compareMask, dataPointsVal)); - + // Count the number of bins which do not exceed the mean amplitude vValidBinCount = _mm_add_ps(vValidBinCount, _mm_and_ps(compareMask, vOnesVector)); } - + // Calculate the mean from the remaining data points _mm_store_ps(avgPointsVector, avgPointsVal); @@ -104,7 +104,7 @@ static inline void volk_32f_s32f_calc_spectral_noise_floor_32f_a_sse(float* nois validBinCount += 1.0; } } - + float localNoiseFloorAmplitude = 0; if(validBinCount > 0.0){ localNoiseFloorAmplitude = sumMean / validBinCount; diff --git a/volk/include/volk/volk_32f_s32f_convert_16i_a.h b/volk/include/volk/volk_32f_s32f_convert_16i_a.h index a24959678..9df4946f2 100644 --- a/volk/include/volk/volk_32f_s32f_convert_16i_a.h +++ b/volk/include/volk/volk_32f_s32f_convert_16i_a.h @@ -19,7 +19,7 @@ static inline void volk_32f_s32f_convert_16i_a_sse2(int16_t* outputVector, const unsigned int number = 0; const unsigned int eighthPoints = num_points / 8; - + const float* inputVectorPtr = (const float*)inputVector; int16_t* outputVectorPtr = outputVector; @@ -51,7 +51,7 @@ static inline void volk_32f_s32f_convert_16i_a_sse2(int16_t* outputVector, const outputVectorPtr += 8; } - number = eighthPoints * 8; + number = eighthPoints * 8; for(; number < num_points; number++){ r = inputVector[number] * scalar; if(r > max_val) @@ -76,7 +76,7 @@ static inline void volk_32f_s32f_convert_16i_a_sse(int16_t* outputVector, const unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; - + const float* inputVectorPtr = (const float*)inputVector; int16_t* outputVectorPtr = outputVector; @@ -105,7 +105,7 @@ static inline void volk_32f_s32f_convert_16i_a_sse(int16_t* outputVector, const *outputVectorPtr++ = (int16_t)rintf(outputFloatBuffer[3]); } - number = quarterPoints * 4; + number = quarterPoints * 4; for(; number < num_points; number++){ r = inputVector[number] * scalar; if(r > max_val) diff --git a/volk/include/volk/volk_32f_s32f_convert_16i_u.h b/volk/include/volk/volk_32f_s32f_convert_16i_u.h index f58158041..56e42c9bd 100644 --- a/volk/include/volk/volk_32f_s32f_convert_16i_u.h +++ b/volk/include/volk/volk_32f_s32f_convert_16i_u.h @@ -19,7 +19,7 @@ static inline void volk_32f_s32f_convert_16i_u_sse2(int16_t* outputVector, const unsigned int number = 0; const unsigned int eighthPoints = num_points / 8; - + const float* inputVectorPtr = (const float*)inputVector; int16_t* outputVectorPtr = outputVector; @@ -51,7 +51,7 @@ static inline void volk_32f_s32f_convert_16i_u_sse2(int16_t* outputVector, const outputVectorPtr += 8; } - number = eighthPoints * 8; + number = eighthPoints * 8; for(; number < num_points; number++){ r = inputVector[number] * scalar; if(r > max_val) @@ -77,7 +77,7 @@ static inline void volk_32f_s32f_convert_16i_u_sse(int16_t* outputVector, const unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; - + const float* inputVectorPtr = (const float*)inputVector; int16_t* outputVectorPtr = outputVector; @@ -106,7 +106,7 @@ static inline void volk_32f_s32f_convert_16i_u_sse(int16_t* outputVector, const *outputVectorPtr++ = (int16_t)rintf(outputFloatBuffer[3]); } - number = quarterPoints * 4; + number = quarterPoints * 4; for(; number < num_points; number++){ r = inputVector[number] * scalar; if(r > max_val) diff --git a/volk/include/volk/volk_32f_s32f_convert_32i_a.h b/volk/include/volk/volk_32f_s32f_convert_32i_a.h index 15fa282fb..38e6b2e74 100644 --- a/volk/include/volk/volk_32f_s32f_convert_32i_a.h +++ b/volk/include/volk/volk_32f_s32f_convert_32i_a.h @@ -18,7 +18,7 @@ static inline void volk_32f_s32f_convert_32i_a_avx(int32_t* outputVector, const unsigned int number = 0; const unsigned int eighthPoints = num_points / 8; - + const float* inputVectorPtr = (const float*)inputVector; int32_t* outputVectorPtr = outputVector; @@ -42,7 +42,7 @@ static inline void volk_32f_s32f_convert_32i_a_avx(int32_t* outputVector, const outputVectorPtr += 8; } - number = eighthPoints * 8; + number = eighthPoints * 8; for(; number < num_points; number++){ r = inputVector[number] * scalar; if(r > max_val) @@ -67,7 +67,7 @@ static inline void volk_32f_s32f_convert_32i_a_sse2(int32_t* outputVector, const unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; - + const float* inputVectorPtr = (const float*)inputVector; int32_t* outputVectorPtr = outputVector; @@ -91,7 +91,7 @@ static inline void volk_32f_s32f_convert_32i_a_sse2(int32_t* outputVector, const outputVectorPtr += 4; } - number = quarterPoints * 4; + number = quarterPoints * 4; for(; number < num_points; number++){ r = inputVector[number] * scalar; if(r > max_val) @@ -116,7 +116,7 @@ static inline void volk_32f_s32f_convert_32i_a_sse(int32_t* outputVector, const unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; - + const float* inputVectorPtr = (const float*)inputVector; int32_t* outputVectorPtr = outputVector; @@ -144,7 +144,7 @@ static inline void volk_32f_s32f_convert_32i_a_sse(int32_t* outputVector, const *outputVectorPtr++ = (int32_t)(outputFloatBuffer[3]); } - number = quarterPoints * 4; + number = quarterPoints * 4; for(; number < num_points; number++){ r = inputVector[number] * scalar; if(r > max_val) diff --git a/volk/include/volk/volk_32f_s32f_convert_32i_u.h b/volk/include/volk/volk_32f_s32f_convert_32i_u.h index d203546c6..ee15edb46 100644 --- a/volk/include/volk/volk_32f_s32f_convert_32i_u.h +++ b/volk/include/volk/volk_32f_s32f_convert_32i_u.h @@ -18,7 +18,7 @@ static inline void volk_32f_s32f_convert_32i_u_sse2(int32_t* outputVector, const unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; - + const float* inputVectorPtr = (const float*)inputVector; int32_t* outputVectorPtr = outputVector; @@ -42,7 +42,7 @@ static inline void volk_32f_s32f_convert_32i_u_sse2(int32_t* outputVector, const outputVectorPtr += 4; } - number = quarterPoints * 4; + number = quarterPoints * 4; for(; number < num_points; number++){ r = inputVector[number] * scalar; if(r > max_val) @@ -68,7 +68,7 @@ static inline void volk_32f_s32f_convert_32i_u_sse(int32_t* outputVector, const unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; - + const float* inputVectorPtr = (const float*)inputVector; int32_t* outputVectorPtr = outputVector; @@ -96,7 +96,7 @@ static inline void volk_32f_s32f_convert_32i_u_sse(int32_t* outputVector, const *outputVectorPtr++ = (int32_t)(outputFloatBuffer[3]); } - number = quarterPoints * 4; + number = quarterPoints * 4; for(; number < num_points; number++){ r = inputVector[number] * scalar; if(r > max_val) diff --git a/volk/include/volk/volk_32f_s32f_convert_8i_a.h b/volk/include/volk/volk_32f_s32f_convert_8i_a.h index 05172171c..800017d5d 100644 --- a/volk/include/volk/volk_32f_s32f_convert_8i_a.h +++ b/volk/include/volk/volk_32f_s32f_convert_8i_a.h @@ -18,7 +18,7 @@ static inline void volk_32f_s32f_convert_8i_a_sse2(int8_t* outputVector, const f unsigned int number = 0; const unsigned int sixteenthPoints = num_points / 16; - + const float* inputVectorPtr = (const float*)inputVector; int8_t* outputVectorPtr = outputVector; @@ -47,7 +47,7 @@ static inline void volk_32f_s32f_convert_8i_a_sse2(int8_t* outputVector, const f intInputVal2 = _mm_cvtps_epi32(inputVal2); intInputVal3 = _mm_cvtps_epi32(inputVal3); intInputVal4 = _mm_cvtps_epi32(inputVal4); - + intInputVal1 = _mm_packs_epi32(intInputVal1, intInputVal2); intInputVal3 = _mm_packs_epi32(intInputVal3, intInputVal4); @@ -57,7 +57,7 @@ static inline void volk_32f_s32f_convert_8i_a_sse2(int8_t* outputVector, const f outputVectorPtr += 16; } - number = sixteenthPoints * 16; + number = sixteenthPoints * 16; for(; number < num_points; number++){ r = inputVector[number] * scalar; if(r > max_val) @@ -82,7 +82,7 @@ static inline void volk_32f_s32f_convert_8i_a_sse(int8_t* outputVector, const fl unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; - + const float* inputVectorPtr = (const float*)inputVector; float min_val = -128; @@ -110,7 +110,7 @@ static inline void volk_32f_s32f_convert_8i_a_sse(int8_t* outputVector, const fl *outputVectorPtr++ = (int8_t)(outputFloatBuffer[3]); } - number = quarterPoints * 4; + number = quarterPoints * 4; for(; number < num_points; number++){ r = inputVector[number] * scalar; if(r > max_val) diff --git a/volk/include/volk/volk_32f_s32f_convert_8i_u.h b/volk/include/volk/volk_32f_s32f_convert_8i_u.h index 12991e9c1..870e9419b 100644 --- a/volk/include/volk/volk_32f_s32f_convert_8i_u.h +++ b/volk/include/volk/volk_32f_s32f_convert_8i_u.h @@ -18,7 +18,7 @@ static inline void volk_32f_s32f_convert_8i_u_sse2(int8_t* outputVector, const f unsigned int number = 0; const unsigned int sixteenthPoints = num_points / 16; - + const float* inputVectorPtr = (const float*)inputVector; int8_t* outputVectorPtr = outputVector; @@ -47,7 +47,7 @@ static inline void volk_32f_s32f_convert_8i_u_sse2(int8_t* outputVector, const f intInputVal2 = _mm_cvtps_epi32(inputVal2); intInputVal3 = _mm_cvtps_epi32(inputVal3); intInputVal4 = _mm_cvtps_epi32(inputVal4); - + intInputVal1 = _mm_packs_epi32(intInputVal1, intInputVal2); intInputVal3 = _mm_packs_epi32(intInputVal3, intInputVal4); @@ -57,7 +57,7 @@ static inline void volk_32f_s32f_convert_8i_u_sse2(int8_t* outputVector, const f outputVectorPtr += 16; } - number = sixteenthPoints * 16; + number = sixteenthPoints * 16; for(; number < num_points; number++){ r = inputVector[number] * scalar; if(r > max_val) @@ -83,7 +83,7 @@ static inline void volk_32f_s32f_convert_8i_u_sse(int8_t* outputVector, const fl unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; - + const float* inputVectorPtr = (const float*)inputVector; int8_t* outputVectorPtr = outputVector; @@ -111,7 +111,7 @@ static inline void volk_32f_s32f_convert_8i_u_sse(int8_t* outputVector, const fl *outputVectorPtr++ = (int8_t)(outputFloatBuffer[3]); } - number = quarterPoints * 4; + number = quarterPoints * 4; for(; number < num_points; number++){ r = inputVector[number] * scalar; if(r > max_val) diff --git a/volk/include/volk/volk_32f_s32f_multiply_32f_a.h b/volk/include/volk/volk_32f_s32f_multiply_32f_a.h index d1c6f3f65..99b8e68c5 100644 --- a/volk/include/volk/volk_32f_s32f_multiply_32f_a.h +++ b/volk/include/volk/volk_32f_s32f_multiply_32f_a.h @@ -23,11 +23,11 @@ static inline void volk_32f_s32f_multiply_32f_a_sse(float* cVector, const float* __m128 aVal, bVal, cVal; bVal = _mm_set_ps1(scalar); for(;number < quarterPoints; number++){ - - aVal = _mm_load_ps(aPtr); - - cVal = _mm_mul_ps(aVal, bVal); - + + aVal = _mm_load_ps(aPtr); + + cVal = _mm_mul_ps(aVal, bVal); + _mm_store_ps(cPtr,cVal); // Store the results back into the C container aPtr += 4; @@ -60,11 +60,11 @@ static inline void volk_32f_s32f_multiply_32f_a_avx(float* cVector, const float* __m256 aVal, bVal, cVal; bVal = _mm256_set1_ps(scalar); for(;number < eighthPoints; number++){ - - aVal = _mm256_load_ps(aPtr); - - cVal = _mm256_mul_ps(aVal, bVal); - + + aVal = _mm256_load_ps(aPtr); + + cVal = _mm256_mul_ps(aVal, bVal); + _mm256_store_ps(cPtr,cVal); // Store the results back into the C container aPtr += 8; diff --git a/volk/include/volk/volk_32f_s32f_multiply_32f_u.h b/volk/include/volk/volk_32f_s32f_multiply_32f_u.h index 0e700060f..b3fae9b05 100644 --- a/volk/include/volk/volk_32f_s32f_multiply_32f_u.h +++ b/volk/include/volk/volk_32f_s32f_multiply_32f_u.h @@ -23,11 +23,11 @@ static inline void volk_32f_s32f_multiply_32f_u_sse(float* cVector, const float* __m128 aVal, bVal, cVal; bVal = _mm_set_ps1(scalar); for(;number < quarterPoints; number++){ - - aVal = _mm_loadu_ps(aPtr); - - cVal = _mm_mul_ps(aVal, bVal); - + + aVal = _mm_loadu_ps(aPtr); + + cVal = _mm_mul_ps(aVal, bVal); + _mm_storeu_ps(cPtr,cVal); // Store the results back into the C container aPtr += 4; @@ -60,11 +60,11 @@ static inline void volk_32f_s32f_multiply_32f_u_avx(float* cVector, const float* __m256 aVal, bVal, cVal; bVal = _mm256_set1_ps(scalar); for(;number < eighthPoints; number++){ - - aVal = _mm256_loadu_ps(aPtr); - - cVal = _mm256_mul_ps(aVal, bVal); - + + aVal = _mm256_loadu_ps(aPtr); + + cVal = _mm256_mul_ps(aVal, bVal); + _mm256_storeu_ps(cPtr,cVal); // Store the results back into the C container aPtr += 8; diff --git a/volk/include/volk/volk_32f_s32f_power_32f_a.h b/volk/include/volk/volk_32f_s32f_power_32f_a.h index 09c905961..633ad14b0 100644 --- a/volk/include/volk/volk_32f_s32f_power_32f_a.h +++ b/volk/include/volk/volk_32f_s32f_power_32f_a.h @@ -21,7 +21,7 @@ */ static inline void volk_32f_s32f_power_32f_a_sse4_1(float* cVector, const float* aVector, const float power, unsigned int num_points){ unsigned int number = 0; - + float* cPtr = cVector; const float* aPtr = aVector; @@ -33,22 +33,22 @@ static inline void volk_32f_s32f_power_32f_a_sse4_1(float* cVector, const float* __m128 negatedValues; __m128 negativeOneToPower = _mm_set_ps1(powf(-1, power)); __m128 onesMask = _mm_set_ps1(1); - + __m128 aVal, cVal; for(;number < quarterPoints; number++){ - + aVal = _mm_load_ps(aPtr); signMask = _mm_cmplt_ps(aVal, zeroValue); negatedValues = _mm_sub_ps(zeroValue, aVal); aVal = _mm_blendv_ps(aVal, negatedValues, signMask); - + // powf4 doesn't support negative values in the base, so we mask them off and then apply the negative after cVal = powf4(aVal, vPower); // Takes each input value to the specified power cVal = _mm_mul_ps( _mm_blendv_ps(onesMask, negativeOneToPower, signMask), cVal); _mm_store_ps(cPtr,cVal); // Store the results back into the C container - + aPtr += 4; cPtr += 4; } @@ -78,7 +78,7 @@ static inline void volk_32f_s32f_power_32f_a_sse4_1(float* cVector, const float* */ static inline void volk_32f_s32f_power_32f_a_sse(float* cVector, const float* aVector, const float power, unsigned int num_points){ unsigned int number = 0; - + float* cPtr = cVector; const float* aPtr = aVector; @@ -90,22 +90,22 @@ static inline void volk_32f_s32f_power_32f_a_sse(float* cVector, const float* aV __m128 negatedValues; __m128 negativeOneToPower = _mm_set_ps1(powf(-1, power)); __m128 onesMask = _mm_set_ps1(1); - + __m128 aVal, cVal; for(;number < quarterPoints; number++){ - + aVal = _mm_load_ps(aPtr); signMask = _mm_cmplt_ps(aVal, zeroValue); negatedValues = _mm_sub_ps(zeroValue, aVal); aVal = _mm_or_ps(_mm_andnot_ps(signMask, aVal), _mm_and_ps(signMask, negatedValues) ); - + // powf4 doesn't support negative values in the base, so we mask them off and then apply the negative after cVal = powf4(aVal, vPower); // Takes each input value to the specified power cVal = _mm_mul_ps( _mm_or_ps( _mm_andnot_ps(signMask, onesMask), _mm_and_ps(signMask, negativeOneToPower) ), cVal); _mm_store_ps(cPtr,cVal); // Store the results back into the C container - + aPtr += 4; cPtr += 4; } diff --git a/volk/include/volk/volk_32f_s32f_stddev_32f_a.h b/volk/include/volk/volk_32f_s32f_stddev_32f_a.h index 75fe0cb2e..98401b2d4 100644 --- a/volk/include/volk/volk_32f_s32f_stddev_32f_a.h +++ b/volk/include/volk/volk_32f_s32f_stddev_32f_a.h @@ -29,7 +29,7 @@ static inline void volk_32f_s32f_stddev_32f_a_sse4_1(float* stddev, const float* __m128 aVal1, aVal2, aVal3, aVal4; __m128 cVal1, cVal2, cVal3, cVal4; for(;number < sixteenthPoints; number++) { - aVal1 = _mm_load_ps(aPtr); aPtr += 4; + aVal1 = _mm_load_ps(aPtr); aPtr += 4; cVal1 = _mm_dp_ps(aVal1, aVal1, 0xF1); aVal2 = _mm_load_ps(aPtr); aPtr += 4; @@ -47,12 +47,12 @@ static inline void volk_32f_s32f_stddev_32f_a_sse4_1(float* stddev, const float* squareAccumulator = _mm_add_ps(squareAccumulator, cVal1); // squareAccumulator += x^2 } - _mm_store_ps(squareBuffer,squareAccumulator); // Store the results back into the C container + _mm_store_ps(squareBuffer,squareAccumulator); // Store the results back into the C container returnValue = squareBuffer[0]; returnValue += squareBuffer[1]; returnValue += squareBuffer[2]; returnValue += squareBuffer[3]; - + number = sixteenthPoints * 16; for(;number < num_points; number++){ returnValue += (*aPtr) * (*aPtr); @@ -93,12 +93,12 @@ static inline void volk_32f_s32f_stddev_32f_a_sse(float* stddev, const float* in squareAccumulator = _mm_add_ps(squareAccumulator, aVal); aPtr += 4; } - _mm_store_ps(squareBuffer,squareAccumulator); // Store the results back into the C container + _mm_store_ps(squareBuffer,squareAccumulator); // Store the results back into the C container returnValue = squareBuffer[0]; returnValue += squareBuffer[1]; returnValue += squareBuffer[2]; returnValue += squareBuffer[3]; - + number = quarterPoints * 4; for(;number < num_points; number++){ returnValue += (*aPtr) * (*aPtr); @@ -125,7 +125,7 @@ static inline void volk_32f_s32f_stddev_32f_a_generic(float* stddev, const float if(num_points > 0){ const float* aPtr = inputBuffer; unsigned int number = 0; - + for(number = 0; number < num_points; number++){ returnValue += (*aPtr) * (*aPtr); aPtr++; diff --git a/volk/include/volk/volk_32f_sqrt_32f_a.h b/volk/include/volk/volk_32f_sqrt_32f_a.h index e44c73cfd..d9b16fc0f 100644 --- a/volk/include/volk/volk_32f_sqrt_32f_a.h +++ b/volk/include/volk/volk_32f_sqrt_32f_a.h @@ -22,11 +22,11 @@ static inline void volk_32f_sqrt_32f_a_sse(float* cVector, const float* aVector, __m128 aVal, cVal; for(;number < quarterPoints; number++){ - - aVal = _mm_load_ps(aPtr); - - cVal = _mm_sqrt_ps(aVal); - + + aVal = _mm_load_ps(aPtr); + + cVal = _mm_sqrt_ps(aVal); + _mm_store_ps(cPtr,cVal); // Store the results back into the C container aPtr += 4; diff --git a/volk/include/volk/volk_32f_stddev_and_mean_32f_x2_a.h b/volk/include/volk/volk_32f_stddev_and_mean_32f_x2_a.h index 20ff676d8..7de32f7b1 100644 --- a/volk/include/volk/volk_32f_stddev_and_mean_32f_x2_a.h +++ b/volk/include/volk/volk_32f_stddev_and_mean_32f_x2_a.h @@ -31,7 +31,7 @@ static inline void volk_32f_stddev_and_mean_32f_x2_a_sse4_1(float* stddev, float __m128 aVal1, aVal2, aVal3, aVal4; __m128 cVal1, cVal2, cVal3, cVal4; for(;number < sixteenthPoints; number++) { - aVal1 = _mm_load_ps(aPtr); aPtr += 4; + aVal1 = _mm_load_ps(aPtr); aPtr += 4; cVal1 = _mm_dp_ps(aVal1, aVal1, 0xF1); accumulator = _mm_add_ps(accumulator, aVal1); // accumulator += x @@ -54,7 +54,7 @@ static inline void volk_32f_stddev_and_mean_32f_x2_a_sse4_1(float* stddev, float squareAccumulator = _mm_add_ps(squareAccumulator, cVal1); // squareAccumulator += x^2 } _mm_store_ps(meanBuffer,accumulator); // Store the results back into the C container - _mm_store_ps(squareBuffer,squareAccumulator); // Store the results back into the C container + _mm_store_ps(squareBuffer,squareAccumulator); // Store the results back into the C container newMean = meanBuffer[0]; newMean += meanBuffer[1]; newMean += meanBuffer[2]; @@ -63,7 +63,7 @@ static inline void volk_32f_stddev_and_mean_32f_x2_a_sse4_1(float* stddev, float returnValue += squareBuffer[1]; returnValue += squareBuffer[2]; returnValue += squareBuffer[3]; - + number = sixteenthPoints * 16; for(;number < num_points; number++){ returnValue += (*aPtr) * (*aPtr); @@ -110,7 +110,7 @@ static inline void volk_32f_stddev_and_mean_32f_x2_a_sse(float* stddev, float* m aPtr += 4; } _mm_store_ps(meanBuffer,accumulator); // Store the results back into the C container - _mm_store_ps(squareBuffer,squareAccumulator); // Store the results back into the C container + _mm_store_ps(squareBuffer,squareAccumulator); // Store the results back into the C container newMean = meanBuffer[0]; newMean += meanBuffer[1]; newMean += meanBuffer[2]; @@ -119,7 +119,7 @@ static inline void volk_32f_stddev_and_mean_32f_x2_a_sse(float* stddev, float* m returnValue += squareBuffer[1]; returnValue += squareBuffer[2]; returnValue += squareBuffer[3]; - + number = quarterPoints * 4; for(;number < num_points; number++){ returnValue += (*aPtr) * (*aPtr); @@ -149,7 +149,7 @@ static inline void volk_32f_stddev_and_mean_32f_x2_a_generic(float* stddev, floa if(num_points > 0){ const float* aPtr = inputBuffer; unsigned int number = 0; - + for(number = 0; number < num_points; number++){ returnValue += (*aPtr) * (*aPtr); newMean += *aPtr++; diff --git a/volk/include/volk/volk_32f_x2_add_32f_a.h b/volk/include/volk/volk_32f_x2_add_32f_a.h index 3bc83653b..51e63e54d 100644 --- a/volk/include/volk/volk_32f_x2_add_32f_a.h +++ b/volk/include/volk/volk_32f_x2_add_32f_a.h @@ -23,12 +23,12 @@ static inline void volk_32f_x2_add_32f_a_sse(float* cVector, const float* aVecto __m128 aVal, bVal, cVal; for(;number < quarterPoints; number++){ - - aVal = _mm_load_ps(aPtr); + + aVal = _mm_load_ps(aPtr); bVal = _mm_load_ps(bPtr); - - cVal = _mm_add_ps(aVal, bVal); - + + cVal = _mm_add_ps(aVal, bVal); + _mm_store_ps(cPtr,cVal); // Store the results back into the C container aPtr += 4; diff --git a/volk/include/volk/volk_32f_x2_add_32f_u.h b/volk/include/volk/volk_32f_x2_add_32f_u.h index e360a7958..52e8286bc 100644 --- a/volk/include/volk/volk_32f_x2_add_32f_u.h +++ b/volk/include/volk/volk_32f_x2_add_32f_u.h @@ -23,12 +23,12 @@ static inline void volk_32f_x2_add_32f_u_sse(float* cVector, const float* aVecto __m128 aVal, bVal, cVal; for(;number < quarterPoints; number++){ - - aVal = _mm_loadu_ps(aPtr); + + aVal = _mm_loadu_ps(aPtr); bVal = _mm_loadu_ps(bPtr); - - cVal = _mm_add_ps(aVal, bVal); - + + cVal = _mm_add_ps(aVal, bVal); + _mm_storeu_ps(cPtr,cVal); // Store the results back into the C container aPtr += 4; diff --git a/volk/include/volk/volk_32f_x2_divide_32f_a.h b/volk/include/volk/volk_32f_x2_divide_32f_a.h index 52ddfae87..7b60fb22e 100644 --- a/volk/include/volk/volk_32f_x2_divide_32f_a.h +++ b/volk/include/volk/volk_32f_x2_divide_32f_a.h @@ -23,12 +23,12 @@ static inline void volk_32f_x2_divide_32f_a_sse(float* cVector, const float* aVe __m128 aVal, bVal, cVal; for(;number < quarterPoints; number++){ - - aVal = _mm_load_ps(aPtr); + + aVal = _mm_load_ps(aPtr); bVal = _mm_load_ps(bPtr); - - cVal = _mm_div_ps(aVal, bVal); - + + cVal = _mm_div_ps(aVal, bVal); + _mm_store_ps(cPtr,cVal); // Store the results back into the C container aPtr += 4; diff --git a/volk/include/volk/volk_32f_x2_dot_prod_32f_a.h b/volk/include/volk/volk_32f_x2_dot_prod_32f_a.h index 0c58f2ecf..448b2fdc0 100644 --- a/volk/include/volk/volk_32f_x2_dot_prod_32f_a.h +++ b/volk/include/volk/volk_32f_x2_dot_prod_32f_a.h @@ -18,7 +18,7 @@ static inline void volk_32f_x2_dot_prod_32f_a_generic(float * result, const floa for(number = 0; number < num_points; number++){ dotProduct += ((*aPtr++) * (*bPtr++)); } - + *result = dotProduct; } @@ -29,7 +29,7 @@ static inline void volk_32f_x2_dot_prod_32f_a_generic(float * result, const floa static inline void volk_32f_x2_dot_prod_32f_a_sse( float* result, const float* input, const float* taps, unsigned int num_points) { - + unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; @@ -42,11 +42,11 @@ static inline void volk_32f_x2_dot_prod_32f_a_sse( float* result, const float* __m128 dotProdVal = _mm_setzero_ps(); for(;number < quarterPoints; number++){ - - aVal = _mm_load_ps(aPtr); + + aVal = _mm_load_ps(aPtr); bVal = _mm_load_ps(bPtr); - - cVal = _mm_mul_ps(aVal, bVal); + + cVal = _mm_mul_ps(aVal, bVal); dotProdVal = _mm_add_ps(cVal, dotProdVal); @@ -69,10 +69,10 @@ static inline void volk_32f_x2_dot_prod_32f_a_sse( float* result, const float* } *result = dotProduct; - + } -#endif /*LV_HAVE_SSE*/ +#endif /*LV_HAVE_SSE*/ #ifdef LV_HAVE_SSE3 @@ -91,11 +91,11 @@ static inline void volk_32f_x2_dot_prod_32f_a_sse3(float * result, const float * __m128 dotProdVal = _mm_setzero_ps(); for(;number < quarterPoints; number++){ - - aVal = _mm_load_ps(aPtr); + + aVal = _mm_load_ps(aPtr); bVal = _mm_load_ps(bPtr); - - cVal = _mm_mul_ps(aVal, bVal); + + cVal = _mm_mul_ps(aVal, bVal); dotProdVal = _mm_hadd_ps(dotProdVal, cVal); @@ -117,7 +117,7 @@ static inline void volk_32f_x2_dot_prod_32f_a_sse3(float * result, const float * } *result = dotProduct; -} +} #endif /*LV_HAVE_SSE3*/ @@ -140,7 +140,7 @@ static inline void volk_32f_x2_dot_prod_32f_a_sse4_1(float * result, const float __m128 dotProdVal = _mm_setzero_ps(); - for(;number < sixteenthPoints; number++){ + for(;number < sixteenthPoints; number++){ aVal1 = _mm_load_ps(aPtr); aPtr += 4; aVal2 = _mm_load_ps(aPtr); aPtr += 4; @@ -151,7 +151,7 @@ static inline void volk_32f_x2_dot_prod_32f_a_sse4_1(float * result, const float bVal2 = _mm_load_ps(bPtr); bPtr += 4; bVal3 = _mm_load_ps(bPtr); bPtr += 4; bVal4 = _mm_load_ps(bPtr); bPtr += 4; - + cVal1 = _mm_dp_ps(aVal1, bVal1, 0xF1); cVal2 = _mm_dp_ps(aVal2, bVal2, 0xF2); cVal3 = _mm_dp_ps(aVal3, bVal3, 0xF4); @@ -178,7 +178,7 @@ static inline void volk_32f_x2_dot_prod_32f_a_sse4_1(float * result, const float } *result = dotProduct; -} +} #endif /*LV_HAVE_SSE4_1*/ diff --git a/volk/include/volk/volk_32f_x2_dot_prod_32f_u.h b/volk/include/volk/volk_32f_x2_dot_prod_32f_u.h index 7f47122ff..3b7284b57 100644 --- a/volk/include/volk/volk_32f_x2_dot_prod_32f_u.h +++ b/volk/include/volk/volk_32f_x2_dot_prod_32f_u.h @@ -17,7 +17,7 @@ static inline void volk_32f_x2_dot_prod_32f_u_generic(float * result, const floa for(number = 0; number < num_points; number++){ dotProduct += ((*aPtr++) * (*bPtr++)); } - + *result = dotProduct; } @@ -28,7 +28,7 @@ static inline void volk_32f_x2_dot_prod_32f_u_generic(float * result, const floa static inline void volk_32f_x2_dot_prod_32f_u_sse( float* result, const float* input, const float* taps, unsigned int num_points) { - + unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; @@ -41,11 +41,11 @@ static inline void volk_32f_x2_dot_prod_32f_u_sse( float* result, const float* __m128 dotProdVal = _mm_setzero_ps(); for(;number < quarterPoints; number++){ - - aVal = _mm_loadu_ps(aPtr); + + aVal = _mm_loadu_ps(aPtr); bVal = _mm_loadu_ps(bPtr); - - cVal = _mm_mul_ps(aVal, bVal); + + cVal = _mm_mul_ps(aVal, bVal); dotProdVal = _mm_add_ps(cVal, dotProdVal); @@ -68,10 +68,10 @@ static inline void volk_32f_x2_dot_prod_32f_u_sse( float* result, const float* } *result = dotProduct; - + } -#endif /*LV_HAVE_SSE*/ +#endif /*LV_HAVE_SSE*/ #ifdef LV_HAVE_SSE3 @@ -90,11 +90,11 @@ static inline void volk_32f_x2_dot_prod_32f_u_sse3(float * result, const float * __m128 dotProdVal = _mm_setzero_ps(); for(;number < quarterPoints; number++){ - - aVal = _mm_loadu_ps(aPtr); + + aVal = _mm_loadu_ps(aPtr); bVal = _mm_loadu_ps(bPtr); - - cVal = _mm_mul_ps(aVal, bVal); + + cVal = _mm_mul_ps(aVal, bVal); dotProdVal = _mm_hadd_ps(dotProdVal, cVal); @@ -116,7 +116,7 @@ static inline void volk_32f_x2_dot_prod_32f_u_sse3(float * result, const float * } *result = dotProduct; -} +} #endif /*LV_HAVE_SSE3*/ @@ -140,7 +140,7 @@ static inline void volk_32f_x2_dot_prod_32f_u_sse4_1(float * result, const float __m128 dotProdVal = _mm_setzero_ps(); for(;number < sixteenthPoints; number++){ - + aVal1 = _mm_loadu_ps(aPtr); aPtr += 4; aVal2 = _mm_loadu_ps(aPtr); aPtr += 4; aVal3 = _mm_loadu_ps(aPtr); aPtr += 4; @@ -150,7 +150,7 @@ static inline void volk_32f_x2_dot_prod_32f_u_sse4_1(float * result, const float bVal2 = _mm_loadu_ps(bPtr); bPtr += 4; bVal3 = _mm_loadu_ps(bPtr); bPtr += 4; bVal4 = _mm_loadu_ps(bPtr); bPtr += 4; - + cVal1 = _mm_dp_ps(aVal1, bVal1, 0xF1); cVal2 = _mm_dp_ps(aVal2, bVal2, 0xF2); cVal3 = _mm_dp_ps(aVal3, bVal3, 0xF4); @@ -177,7 +177,7 @@ static inline void volk_32f_x2_dot_prod_32f_u_sse4_1(float * result, const float } *result = dotProduct; -} +} #endif /*LV_HAVE_SSE4_1*/ diff --git a/volk/include/volk/volk_32f_x2_interleave_32fc_a.h b/volk/include/volk/volk_32f_x2_interleave_32fc_a.h index 1d4d2dbbd..52d80b6bb 100644 --- a/volk/include/volk/volk_32f_x2_interleave_32fc_a.h +++ b/volk/include/volk/volk_32f_x2_interleave_32fc_a.h @@ -20,7 +20,7 @@ static inline void volk_32f_x2_interleave_32fc_a_sse(lv_32fc_t* complexVector, c const float* qBufferPtr = qBuffer; const uint64_t quarterPoints = num_points / 4; - + __m128 iValue, qValue, cplxValue; for(;number < quarterPoints; number++){ iValue = _mm_load_ps(iBufferPtr); diff --git a/volk/include/volk/volk_32f_x2_max_32f_a.h b/volk/include/volk/volk_32f_x2_max_32f_a.h index 7948c458d..79f2d04b5 100644 --- a/volk/include/volk/volk_32f_x2_max_32f_a.h +++ b/volk/include/volk/volk_32f_x2_max_32f_a.h @@ -23,12 +23,12 @@ static inline void volk_32f_x2_max_32f_a_sse(float* cVector, const float* aVecto __m128 aVal, bVal, cVal; for(;number < quarterPoints; number++){ - - aVal = _mm_load_ps(aPtr); + + aVal = _mm_load_ps(aPtr); bVal = _mm_load_ps(bPtr); - - cVal = _mm_max_ps(aVal, bVal); - + + cVal = _mm_max_ps(aVal, bVal); + _mm_store_ps(cPtr,cVal); // Store the results back into the C container aPtr += 4; diff --git a/volk/include/volk/volk_32f_x2_min_32f_a.h b/volk/include/volk/volk_32f_x2_min_32f_a.h index d77134868..42cac0833 100644 --- a/volk/include/volk/volk_32f_x2_min_32f_a.h +++ b/volk/include/volk/volk_32f_x2_min_32f_a.h @@ -23,12 +23,12 @@ static inline void volk_32f_x2_min_32f_a_sse(float* cVector, const float* aVecto __m128 aVal, bVal, cVal; for(;number < quarterPoints; number++){ - - aVal = _mm_load_ps(aPtr); + + aVal = _mm_load_ps(aPtr); bVal = _mm_load_ps(bPtr); - - cVal = _mm_min_ps(aVal, bVal); - + + cVal = _mm_min_ps(aVal, bVal); + _mm_store_ps(cPtr,cVal); // Store the results back into the C container aPtr += 4; diff --git a/volk/include/volk/volk_32f_x2_multiply_32f_a.h b/volk/include/volk/volk_32f_x2_multiply_32f_a.h index fae9a652f..340e05165 100644 --- a/volk/include/volk/volk_32f_x2_multiply_32f_a.h +++ b/volk/include/volk/volk_32f_x2_multiply_32f_a.h @@ -23,12 +23,12 @@ static inline void volk_32f_x2_multiply_32f_a_sse(float* cVector, const float* a __m128 aVal, bVal, cVal; for(;number < quarterPoints; number++){ - - aVal = _mm_load_ps(aPtr); + + aVal = _mm_load_ps(aPtr); bVal = _mm_load_ps(bPtr); - - cVal = _mm_mul_ps(aVal, bVal); - + + cVal = _mm_mul_ps(aVal, bVal); + _mm_store_ps(cPtr,cVal); // Store the results back into the C container aPtr += 4; @@ -62,12 +62,12 @@ static inline void volk_32f_x2_multiply_32f_a_avx(float* cVector, const float* a __m256 aVal, bVal, cVal; for(;number < eighthPoints; number++){ - - aVal = _mm256_load_ps(aPtr); + + aVal = _mm256_load_ps(aPtr); bVal = _mm256_load_ps(bPtr); - - cVal = _mm256_mul_ps(aVal, bVal); - + + cVal = _mm256_mul_ps(aVal, bVal); + _mm256_store_ps(cPtr,cVal); // Store the results back into the C container aPtr += 8; diff --git a/volk/include/volk/volk_32f_x2_multiply_32f_u.h b/volk/include/volk/volk_32f_x2_multiply_32f_u.h index 6c3ce5d83..bfb896d60 100644 --- a/volk/include/volk/volk_32f_x2_multiply_32f_u.h +++ b/volk/include/volk/volk_32f_x2_multiply_32f_u.h @@ -23,12 +23,12 @@ static inline void volk_32f_x2_multiply_32f_u_sse(float* cVector, const float* a __m128 aVal, bVal, cVal; for(;number < quarterPoints; number++){ - - aVal = _mm_loadu_ps(aPtr); + + aVal = _mm_loadu_ps(aPtr); bVal = _mm_loadu_ps(bPtr); - - cVal = _mm_mul_ps(aVal, bVal); - + + cVal = _mm_mul_ps(aVal, bVal); + _mm_storeu_ps(cPtr,cVal); // Store the results back into the C container aPtr += 4; @@ -62,12 +62,12 @@ static inline void volk_32f_x2_multiply_32f_u_avx(float* cVector, const float* a __m256 aVal, bVal, cVal; for(;number < eighthPoints; number++){ - - aVal = _mm256_loadu_ps(aPtr); + + aVal = _mm256_loadu_ps(aPtr); bVal = _mm256_loadu_ps(bPtr); - - cVal = _mm256_mul_ps(aVal, bVal); - + + cVal = _mm256_mul_ps(aVal, bVal); + _mm256_storeu_ps(cPtr,cVal); // Store the results back into the C container aPtr += 8; diff --git a/volk/include/volk/volk_32f_x2_s32f_interleave_16ic_a.h b/volk/include/volk/volk_32f_x2_s32f_interleave_16ic_a.h index cc02c3678..10fc267dc 100644 --- a/volk/include/volk/volk_32f_x2_s32f_interleave_16ic_a.h +++ b/volk/include/volk/volk_32f_x2_s32f_interleave_16ic_a.h @@ -23,7 +23,7 @@ static inline void volk_32f_x2_s32f_interleave_16ic_a_sse2(lv_16sc_t* complexVec __m128 vScalar = _mm_set_ps1(scalar); const unsigned int quarterPoints = num_points / 4; - + __m128 iValue, qValue, cplxValue1, cplxValue2; __m128i intValue1, intValue2; @@ -59,7 +59,7 @@ static inline void volk_32f_x2_s32f_interleave_16ic_a_sse2(lv_16sc_t* complexVec *complexVectorPtr++ = (int16_t)(*iBufferPtr++ * scalar); *complexVectorPtr++ = (int16_t)(*qBufferPtr++ * scalar); } - + } #endif /* LV_HAVE_SSE2 */ @@ -81,7 +81,7 @@ static inline void volk_32f_x2_s32f_interleave_16ic_a_sse(lv_16sc_t* complexVect __m128 vScalar = _mm_set_ps1(scalar); const unsigned int quarterPoints = num_points / 4; - + __m128 iValue, qValue, cplxValue; int16_t* complexVectorPtr = (int16_t*)complexVector; @@ -106,9 +106,9 @@ static inline void volk_32f_x2_s32f_interleave_16ic_a_sse(lv_16sc_t* complexVect // Interleaves the upper two values in the i and q variables into one buffer cplxValue = _mm_unpackhi_ps(iValue, qValue); cplxValue = _mm_mul_ps(cplxValue, vScalar); - + _mm_store_ps(floatBuffer, cplxValue); - + *complexVectorPtr++ = (int16_t)(floatBuffer[0]); *complexVectorPtr++ = (int16_t)(floatBuffer[1]); *complexVectorPtr++ = (int16_t)(floatBuffer[2]); @@ -124,7 +124,7 @@ static inline void volk_32f_x2_s32f_interleave_16ic_a_sse(lv_16sc_t* complexVect *complexVectorPtr++ = (int16_t)(*iBufferPtr++ * scalar); *complexVectorPtr++ = (int16_t)(*qBufferPtr++ * scalar); } - + } #endif /* LV_HAVE_SSE */ diff --git a/volk/include/volk/volk_32f_x2_subtract_32f_a.h b/volk/include/volk/volk_32f_x2_subtract_32f_a.h index 16cad008a..e2b8be797 100644 --- a/volk/include/volk/volk_32f_x2_subtract_32f_a.h +++ b/volk/include/volk/volk_32f_x2_subtract_32f_a.h @@ -23,12 +23,12 @@ static inline void volk_32f_x2_subtract_32f_a_sse(float* cVector, const float* a __m128 aVal, bVal, cVal; for(;number < quarterPoints; number++){ - - aVal = _mm_load_ps(aPtr); + + aVal = _mm_load_ps(aPtr); bVal = _mm_load_ps(bPtr); - - cVal = _mm_sub_ps(aVal, bVal); - + + cVal = _mm_sub_ps(aVal, bVal); + _mm_store_ps(cPtr,cVal); // Store the results back into the C container aPtr += 4; diff --git a/volk/include/volk/volk_32f_x3_sum_of_poly_32f_a.h b/volk/include/volk/volk_32f_x3_sum_of_poly_32f_a.h index 153bb3a25..3c530628c 100644 --- a/volk/include/volk/volk_32f_x3_sum_of_poly_32f_a.h +++ b/volk/include/volk/volk_32f_x3_sum_of_poly_32f_a.h @@ -14,33 +14,33 @@ #include<pmmintrin.h> static inline void volk_32f_x3_sum_of_poly_32f_a_sse3(float* target, float* src0, float* center_point_array, float* cutoff, unsigned int num_bytes) { - - + + float result = 0.0; float fst = 0.0; float sq = 0.0; float thrd = 0.0; float frth = 0.0; //float fith = 0.0; - - - + + + __m128 xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm8, xmm9, xmm10;// xmm11, xmm12; xmm9 = _mm_setzero_ps(); xmm1 = _mm_setzero_ps(); - + xmm0 = _mm_load1_ps(¢er_point_array[0]); xmm6 = _mm_load1_ps(¢er_point_array[1]); xmm7 = _mm_load1_ps(¢er_point_array[2]); xmm8 = _mm_load1_ps(¢er_point_array[3]); //xmm11 = _mm_load1_ps(¢er_point_array[4]); xmm10 = _mm_load1_ps(cutoff); - + int bound = num_bytes >> 4; int leftovers = (num_bytes >> 2) & 3; int i = 0; - + for(; i < bound; ++i) { xmm2 = _mm_load_ps(src0); xmm2 = _mm_max_ps(xmm10, xmm2); @@ -57,23 +57,23 @@ static inline void volk_32f_x3_sum_of_poly_32f_a_sse3(float* target, float* src0 xmm2 = _mm_add_ps(xmm2, xmm3); xmm3 = _mm_add_ps(xmm4, xmm5); - + src0 += 4; - + xmm9 = _mm_add_ps(xmm2, xmm9); - + xmm1 = _mm_add_ps(xmm3, xmm1); //xmm9 = _mm_add_ps(xmm12, xmm9); } - + xmm2 = _mm_hadd_ps(xmm9, xmm1); xmm3 = _mm_hadd_ps(xmm2, xmm2); xmm4 = _mm_hadd_ps(xmm3, xmm3); _mm_store_ss(&result, xmm4); - - + + for(i = 0; i < leftovers; ++i) { fst = src0[i]; @@ -82,11 +82,11 @@ static inline void volk_32f_x3_sum_of_poly_32f_a_sse3(float* target, float* src0 thrd = fst * sq; frth = sq * sq; //fith = sq * thrd; - - result += (center_point_array[0] * fst + - center_point_array[1] * sq + - center_point_array[2] * thrd + - center_point_array[3] * frth);// + + + result += (center_point_array[0] * fst + + center_point_array[1] * sq + + center_point_array[2] * thrd + + center_point_array[3] * frth);// + //center_point_array[4] * fith); } @@ -94,7 +94,7 @@ static inline void volk_32f_x3_sum_of_poly_32f_a_sse3(float* target, float* src0 target[0] = result; } - + #endif /*LV_HAVE_SSE3*/ @@ -103,45 +103,45 @@ static inline void volk_32f_x3_sum_of_poly_32f_a_sse3(float* target, float* src0 static inline void volk_32f_x3_sum_of_poly_32f_a_generic(float* target, float* src0, float* center_point_array, float* cutoff, unsigned int num_bytes) { - + float result = 0.0; float fst = 0.0; float sq = 0.0; float thrd = 0.0; float frth = 0.0; //float fith = 0.0; - - unsigned int i = 0; - + + unsigned int i = 0; + for(; i < num_bytes >> 2; ++i) { fst = src0[i]; fst = MAX(fst, *cutoff); - + sq = fst * fst; thrd = fst * sq; frth = sq * sq; //fith = sq * thrd; - - result += (center_point_array[0] * fst + - center_point_array[1] * sq + - center_point_array[2] * thrd + + + result += (center_point_array[0] * fst + + center_point_array[1] * sq + + center_point_array[2] * thrd + center_point_array[3] * frth); //+ //center_point_array[4] * fith); - /*printf("%f12...%d\n", (center_point_array[0] * fst + - center_point_array[1] * sq + - center_point_array[2] * thrd + + /*printf("%f12...%d\n", (center_point_array[0] * fst + + center_point_array[1] * sq + + center_point_array[2] * thrd + center_point_array[3] * frth) + - //center_point_array[4] * fith) + + //center_point_array[4] * fith) + (center_point_array[4]), i); */ } result += ((float)(num_bytes >> 2)) * (center_point_array[4]);//(center_point_array[5]); - - + + *target = result; } diff --git a/volk/include/volk/volk_32fc_32f_multiply_32fc_a.h b/volk/include/volk/volk_32fc_32f_multiply_32fc_a.h index b7350b9fa..28d584bf2 100644 --- a/volk/include/volk/volk_32fc_32f_multiply_32fc_a.h +++ b/volk/include/volk/volk_32fc_32f_multiply_32fc_a.h @@ -23,11 +23,11 @@ static inline void volk_32fc_32f_multiply_32fc_a_sse(lv_32fc_t* cVector, const l __m128 aVal1, aVal2, bVal, bVal1, bVal2, cVal; for(;number < quarterPoints; number++){ - + aVal1 = _mm_load_ps((const float*)aPtr); aPtr += 2; - - aVal2 = _mm_load_ps((const float*)aPtr); + + aVal2 = _mm_load_ps((const float*)aPtr); aPtr += 2; bVal = _mm_load_ps(bPtr); @@ -36,13 +36,13 @@ static inline void volk_32fc_32f_multiply_32fc_a_sse(lv_32fc_t* cVector, const l bVal1 = _mm_shuffle_ps(bVal, bVal, _MM_SHUFFLE(1,1,0,0)); bVal2 = _mm_shuffle_ps(bVal, bVal, _MM_SHUFFLE(3,3,2,2)); - cVal = _mm_mul_ps(aVal1, bVal1); - + cVal = _mm_mul_ps(aVal1, bVal1); + _mm_store_ps((float*)cPtr,cVal); // Store the results back into the C container cPtr += 2; - cVal = _mm_mul_ps(aVal2, bVal2); - + cVal = _mm_mul_ps(aVal2, bVal2); + _mm_store_ps((float*)cPtr,cVal); // Store the results back into the C container cPtr += 2; @@ -69,7 +69,7 @@ static inline void volk_32fc_32f_multiply_32fc_a_generic(lv_32fc_t* cVector, con const lv_32fc_t* aPtr = aVector; const float* bPtr= bVector; unsigned int number = 0; - + for(number = 0; number < num_points; number++){ *cPtr++ = (*aPtr++) * (*bPtr++); } diff --git a/volk/include/volk/volk_32fc_conjugate_32fc_a.h b/volk/include/volk/volk_32fc_conjugate_32fc_a.h index 1518af9be..919280d51 100644 --- a/volk/include/volk/volk_32fc_conjugate_32fc_a.h +++ b/volk/include/volk/volk_32fc_conjugate_32fc_a.h @@ -25,11 +25,11 @@ static inline void volk_32fc_conjugate_32fc_a_sse3(lv_32fc_t* cVector, const lv_ __m128 conjugator = _mm_setr_ps(0, -0.f, 0, -0.f); for(;number < halfPoints; number++){ - + x = _mm_load_ps((float*)a); // Load the complex data as ar,ai,br,bi x = _mm_xor_ps(x, conjugator); // conjugate register - + _mm_store_ps((float*)c,x); // Store the results back into the C container a += 2; diff --git a/volk/include/volk/volk_32fc_conjugate_32fc_u.h b/volk/include/volk/volk_32fc_conjugate_32fc_u.h index b26fe0789..e0d79ea7b 100644 --- a/volk/include/volk/volk_32fc_conjugate_32fc_u.h +++ b/volk/include/volk/volk_32fc_conjugate_32fc_u.h @@ -21,13 +21,13 @@ static inline void volk_32fc_conjugate_32fc_u_sse3(lv_32fc_t* cVector, const lv_ __m128 x; lv_32fc_t* c = cVector; const lv_32fc_t* a = aVector; - + __m128 conjugator = _mm_setr_ps(0, -0.f, 0, -0.f); for(;number < halfPoints; number++){ - + x = _mm_loadu_ps((float*)a); // Load the complex data as ar,ai,br,bi - + x = _mm_xor_ps(x, conjugator); // conjugate register _mm_storeu_ps((float*)c,x); // Store the results back into the C container diff --git a/volk/include/volk/volk_32fc_deinterleave_32f_x2_a.h b/volk/include/volk/volk_32fc_deinterleave_32f_x2_a.h index 9de036ef4..4106f3851 100644 --- a/volk/include/volk/volk_32fc_deinterleave_32f_x2_a.h +++ b/volk/include/volk/volk_32fc_deinterleave_32f_x2_a.h @@ -19,10 +19,10 @@ static inline void volk_32fc_deinterleave_32f_x2_a_sse(float* iBuffer, float* qB float* qBufferPtr = qBuffer; unsigned int number = 0; - const unsigned int quarterPoints = num_points / 4; + const unsigned int quarterPoints = num_points / 4; __m128 cplxValue1, cplxValue2, iValue, qValue; for(;number < quarterPoints; number++){ - + cplxValue1 = _mm_load_ps(complexVectorPtr); complexVectorPtr += 4; diff --git a/volk/include/volk/volk_32fc_deinterleave_64f_x2_a.h b/volk/include/volk/volk_32fc_deinterleave_64f_x2_a.h index 29c369d9a..77566e671 100644 --- a/volk/include/volk/volk_32fc_deinterleave_64f_x2_a.h +++ b/volk/include/volk/volk_32fc_deinterleave_64f_x2_a.h @@ -20,23 +20,23 @@ static inline void volk_32fc_deinterleave_64f_x2_a_sse2(double* iBuffer, double* double* iBufferPtr = iBuffer; double* qBufferPtr = qBuffer; - const unsigned int halfPoints = num_points / 2; + const unsigned int halfPoints = num_points / 2; __m128 cplxValue, fVal; __m128d dVal; for(;number < halfPoints; number++){ - + cplxValue = _mm_load_ps(complexVectorPtr); complexVectorPtr += 4; // Arrange in i1i2i1i2 format fVal = _mm_shuffle_ps(cplxValue, cplxValue, _MM_SHUFFLE(2,0,2,0)); - dVal = _mm_cvtps_pd(fVal); + dVal = _mm_cvtps_pd(fVal); _mm_store_pd(iBufferPtr, dVal); // Arrange in q1q2q1q2 format fVal = _mm_shuffle_ps(cplxValue, cplxValue, _MM_SHUFFLE(3,1,3,1)); - dVal = _mm_cvtps_pd(fVal); + dVal = _mm_cvtps_pd(fVal); _mm_store_pd(qBufferPtr, dVal); iBufferPtr += 2; diff --git a/volk/include/volk/volk_32fc_deinterleave_imag_32f_a.h b/volk/include/volk/volk_32fc_deinterleave_imag_32f_a.h index adc4112b9..c88809beb 100644 --- a/volk/include/volk/volk_32fc_deinterleave_imag_32f_a.h +++ b/volk/include/volk/volk_32fc_deinterleave_imag_32f_a.h @@ -21,7 +21,7 @@ static inline void volk_32fc_deinterleave_imag_32f_a_sse(float* qBuffer, const l __m128 cplxValue1, cplxValue2, iValue; for(;number < quarterPoints; number++){ - + cplxValue1 = _mm_load_ps(complexVectorPtr); complexVectorPtr += 4; diff --git a/volk/include/volk/volk_32fc_deinterleave_real_32f_a.h b/volk/include/volk/volk_32fc_deinterleave_real_32f_a.h index a1d0fd5d1..0d6c6b7af 100644 --- a/volk/include/volk/volk_32fc_deinterleave_real_32f_a.h +++ b/volk/include/volk/volk_32fc_deinterleave_real_32f_a.h @@ -21,7 +21,7 @@ static inline void volk_32fc_deinterleave_real_32f_a_sse(float* iBuffer, const l __m128 cplxValue1, cplxValue2, iValue; for(;number < quarterPoints; number++){ - + cplxValue1 = _mm_load_ps(complexVectorPtr); complexVectorPtr += 4; diff --git a/volk/include/volk/volk_32fc_deinterleave_real_64f_a.h b/volk/include/volk/volk_32fc_deinterleave_real_64f_a.h index 70a3b1971..1e346baca 100644 --- a/volk/include/volk/volk_32fc_deinterleave_real_64f_a.h +++ b/volk/include/volk/volk_32fc_deinterleave_real_64f_a.h @@ -18,17 +18,17 @@ static inline void volk_32fc_deinterleave_real_64f_a_sse2(double* iBuffer, const const float* complexVectorPtr = (float*)complexVector; double* iBufferPtr = iBuffer; - const unsigned int halfPoints = num_points / 2; + const unsigned int halfPoints = num_points / 2; __m128 cplxValue, fVal; __m128d dVal; for(;number < halfPoints; number++){ - + cplxValue = _mm_load_ps(complexVectorPtr); complexVectorPtr += 4; // Arrange in i1i2i1i2 format fVal = _mm_shuffle_ps(cplxValue, cplxValue, _MM_SHUFFLE(2,0,2,0)); - dVal = _mm_cvtps_pd(fVal); + dVal = _mm_cvtps_pd(fVal); _mm_store_pd(iBufferPtr, dVal); iBufferPtr += 2; diff --git a/volk/include/volk/volk_32fc_index_max_16u_a.h b/volk/include/volk/volk_32fc_index_max_16u_a.h index 125a34582..842a6a042 100644 --- a/volk/include/volk/volk_32fc_index_max_16u_a.h +++ b/volk/include/volk/volk_32fc_index_max_16u_a.h @@ -12,16 +12,16 @@ static inline void volk_32fc_index_max_16u_a_sse3(unsigned int* target, lv_32fc_t* src0, unsigned int num_bytes) { - - - + + + union bit128 holderf; union bit128 holderi; float sq_dist = 0.0; - + union bit128 xmm5, xmm4; __m128 xmm1, xmm2, xmm3; __m128i xmm8, xmm11, xmm12, xmmfive, xmmfour, xmm9, holder0, holder1, xmm10; @@ -30,63 +30,63 @@ static inline void volk_32fc_index_max_16u_a_sse3(unsigned int* target, lv_32fc_ xmm4.int_vec = xmmfour = _mm_setzero_si128(); holderf.int_vec = holder0 = _mm_setzero_si128(); holderi.int_vec = holder1 = _mm_setzero_si128(); - - + + int bound = num_bytes >> 5; int leftovers0 = (num_bytes >> 4) & 1; int leftovers1 = (num_bytes >> 3) & 1; int i = 0; - - + + xmm8 = _mm_set_epi32(3, 2, 1, 0);//remember the crazy reverse order! xmm9 = xmm8 = _mm_setzero_si128(); xmm10 = _mm_set_epi32(4, 4, 4, 4); xmm3 = _mm_setzero_ps(); ; - + //printf("%f, %f, %f, %f\n", ((float*)&xmm10)[0], ((float*)&xmm10)[1], ((float*)&xmm10)[2], ((float*)&xmm10)[3]); - + for(; i < bound; ++i) { - + xmm1 = _mm_load_ps((float*)src0); xmm2 = _mm_load_ps((float*)&src0[2]); - + src0 += 4; - - + + xmm1 = _mm_mul_ps(xmm1, xmm1); xmm2 = _mm_mul_ps(xmm2, xmm2); - - + + xmm1 = _mm_hadd_ps(xmm1, xmm2); xmm3 = _mm_max_ps(xmm1, xmm3); - + xmm4.float_vec = _mm_cmplt_ps(xmm1, xmm3); xmm5.float_vec = _mm_cmpeq_ps(xmm1, xmm3); - - - + + + xmm11 = _mm_and_si128(xmm8, xmm5.int_vec); xmm12 = _mm_and_si128(xmm9, xmm4.int_vec); - + xmm9 = _mm_add_epi32(xmm11, xmm12); - xmm8 = _mm_add_epi32(xmm8, xmm10); + xmm8 = _mm_add_epi32(xmm8, xmm10); + - //printf("%f, %f, %f, %f\n", ((float*)&xmm3)[0], ((float*)&xmm3)[1], ((float*)&xmm3)[2], ((float*)&xmm3)[3]); //printf("%u, %u, %u, %u\n", ((uint32_t*)&xmm10)[0], ((uint32_t*)&xmm10)[1], ((uint32_t*)&xmm10)[2], ((uint32_t*)&xmm10)[3]); } - - + + for(i = 0; i < leftovers0; ++i) { xmm2 = _mm_load_ps((float*)src0); - + xmm1 = _mm_movelh_ps(bit128_p(&xmm8)->float_vec, bit128_p(&xmm8)->float_vec); xmm8 = bit128_p(&xmm1)->int_vec; @@ -99,63 +99,63 @@ static inline void volk_32fc_index_max_16u_a_sse3(unsigned int* target, lv_32fc_ xmm3 = _mm_max_ps(xmm1, xmm3); xmm10 = _mm_set_epi32(2, 2, 2, 2);//load1_ps((float*)&init[2]); - - + + xmm4.float_vec = _mm_cmplt_ps(xmm1, xmm3); xmm5.float_vec = _mm_cmpeq_ps(xmm1, xmm3); - - - + + + xmm11 = _mm_and_si128(xmm8, xmm5.int_vec); xmm12 = _mm_and_si128(xmm9, xmm4.int_vec); - + xmm9 = _mm_add_epi32(xmm11, xmm12); - xmm8 = _mm_add_epi32(xmm8, xmm10); + xmm8 = _mm_add_epi32(xmm8, xmm10); //printf("egads%u, %u, %u, %u\n", ((uint32_t*)&xmm9)[0], ((uint32_t*)&xmm9)[1], ((uint32_t*)&xmm9)[2], ((uint32_t*)&xmm9)[3]); } - - - + + + for(i = 0; i < leftovers1; ++i) { //printf("%u, %u, %u, %u\n", ((uint32_t*)&xmm9)[0], ((uint32_t*)&xmm9)[1], ((uint32_t*)&xmm9)[2], ((uint32_t*)&xmm9)[3]); - + sq_dist = lv_creal(src0[0]) * lv_creal(src0[0]) + lv_cimag(src0[0]) * lv_cimag(src0[0]); - + xmm2 = _mm_load1_ps(&sq_dist); xmm1 = xmm3; - + xmm3 = _mm_max_ss(xmm3, xmm2); - - + + xmm4.float_vec = _mm_cmplt_ps(xmm1, xmm3); xmm5.float_vec = _mm_cmpeq_ps(xmm1, xmm3); - - - xmm8 = _mm_shuffle_epi32(xmm8, 0x00); - + + + xmm8 = _mm_shuffle_epi32(xmm8, 0x00); + xmm11 = _mm_and_si128(xmm8, xmm4.int_vec); xmm12 = _mm_and_si128(xmm9, xmm5.int_vec); - + xmm9 = _mm_add_epi32(xmm11, xmm12); } - + //printf("%f, %f, %f, %f\n", ((float*)&xmm3)[0], ((float*)&xmm3)[1], ((float*)&xmm3)[2], ((float*)&xmm3)[3]); //printf("%u, %u, %u, %u\n", ((uint32_t*)&xmm9)[0], ((uint32_t*)&xmm9)[1], ((uint32_t*)&xmm9)[2], ((uint32_t*)&xmm9)[3]); _mm_store_ps((float*)&(holderf.f), xmm3); _mm_store_si128(&(holderi.int_vec), xmm9); - + target[0] = holderi.i[0]; - sq_dist = holderf.f[0]; + sq_dist = holderf.f[0]; target[0] = (holderf.f[1] > sq_dist) ? holderi.i[1] : target[0]; sq_dist = (holderf.f[1] > sq_dist) ? holderf.f[1] : sq_dist; target[0] = (holderf.f[2] > sq_dist) ? holderi.i[2] : target[0]; @@ -163,27 +163,27 @@ static inline void volk_32fc_index_max_16u_a_sse3(unsigned int* target, lv_32fc_ target[0] = (holderf.f[3] > sq_dist) ? holderi.i[3] : target[0]; sq_dist = (holderf.f[3] > sq_dist) ? holderf.f[3] : sq_dist; - - + + /* float placeholder = 0.0; - uint32_t temp0, temp1; + uint32_t temp0, temp1; unsigned int g0 = (((float*)&xmm3)[0] > ((float*)&xmm3)[1]); unsigned int l0 = g0 ^ 1; unsigned int g1 = (((float*)&xmm3)[1] > ((float*)&xmm3)[2]); unsigned int l1 = g1 ^ 1; - + temp0 = g0 * ((uint32_t*)&xmm9)[0] + l0 * ((uint32_t*)&xmm9)[1]; temp1 = g0 * ((uint32_t*)&xmm9)[2] + l0 * ((uint32_t*)&xmm9)[3]; - sq_dist = g0 * ((float*)&xmm3)[0] + l0 * ((float*)&xmm3)[1]; + sq_dist = g0 * ((float*)&xmm3)[0] + l0 * ((float*)&xmm3)[1]; placeholder = g0 * ((float*)&xmm3)[2] + l0 * ((float*)&xmm3)[3]; - + g0 = (sq_dist > placeholder); l0 = g0 ^ 1; target[0] = g0 * temp0 + l0 * temp1; */ - + } #endif /*LV_HAVE_SSE3*/ @@ -193,20 +193,20 @@ static inline void volk_32fc_index_max_16u_a_generic(unsigned int* target, lv_32 float sq_dist = 0.0; float max = 0.0; unsigned int index = 0; - - unsigned int i = 0; - + + unsigned int i = 0; + for(; i < num_bytes >> 3; ++i) { sq_dist = lv_creal(src0[i]) * lv_creal(src0[i]) + lv_cimag(src0[i]) * lv_cimag(src0[i]); - + index = sq_dist > max ? i : index; max = sq_dist > max ? sq_dist : max; - - + + } target[0] = index; - + } #endif /*LV_HAVE_GENERIC*/ diff --git a/volk/include/volk/volk_32fc_magnitude_32f_a.h b/volk/include/volk/volk_32fc_magnitude_32f_a.h index f18e9bc0b..efb84a904 100644 --- a/volk/include/volk/volk_32fc_magnitude_32f_a.h +++ b/volk/include/volk/volk_32fc_magnitude_32f_a.h @@ -59,7 +59,7 @@ static inline void volk_32fc_magnitude_32f_a_sse3(float* magnitudeVector, const static inline void volk_32fc_magnitude_32f_a_sse(float* magnitudeVector, const lv_32fc_t* complexVector, unsigned int num_points){ unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; - + const float* complexVectorPtr = (float*)complexVector; float* magnitudeVectorPtr = magnitudeVector; diff --git a/volk/include/volk/volk_32fc_magnitude_32f_u.h b/volk/include/volk/volk_32fc_magnitude_32f_u.h index ed1cedef9..c8b3f0a08 100644 --- a/volk/include/volk/volk_32fc_magnitude_32f_u.h +++ b/volk/include/volk/volk_32fc_magnitude_32f_u.h @@ -59,7 +59,7 @@ static inline void volk_32fc_magnitude_32f_u_sse3(float* magnitudeVector, const static inline void volk_32fc_magnitude_32f_u_sse(float* magnitudeVector, const lv_32fc_t* complexVector, unsigned int num_points){ unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; - + const float* complexVectorPtr = (float*)complexVector; float* magnitudeVectorPtr = magnitudeVector; diff --git a/volk/include/volk/volk_32fc_magnitude_squared_32f_a.h b/volk/include/volk/volk_32fc_magnitude_squared_32f_a.h index 00bdefbb5..d3ac9717a 100644 --- a/volk/include/volk/volk_32fc_magnitude_squared_32f_a.h +++ b/volk/include/volk/volk_32fc_magnitude_squared_32f_a.h @@ -57,7 +57,7 @@ static inline void volk_32fc_magnitude_squared_32f_a_sse3(float* magnitudeVector static inline void volk_32fc_magnitude_squared_32f_a_sse(float* magnitudeVector, const lv_32fc_t* complexVector, unsigned int num_points){ unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; - + const float* complexVectorPtr = (float*)complexVector; float* magnitudeVectorPtr = magnitudeVector; diff --git a/volk/include/volk/volk_32fc_magnitude_squared_32f_u.h b/volk/include/volk/volk_32fc_magnitude_squared_32f_u.h index 6eb4a523a..53a4e68eb 100644 --- a/volk/include/volk/volk_32fc_magnitude_squared_32f_u.h +++ b/volk/include/volk/volk_32fc_magnitude_squared_32f_u.h @@ -57,7 +57,7 @@ static inline void volk_32fc_magnitude_squared_32f_u_sse3(float* magnitudeVector static inline void volk_32fc_magnitude_squared_32f_u_sse(float* magnitudeVector, const lv_32fc_t* complexVector, unsigned int num_points){ unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; - + const float* complexVectorPtr = (float*)complexVector; float* magnitudeVectorPtr = magnitudeVector; diff --git a/volk/include/volk/volk_32fc_s32f_atan2_32f_a.h b/volk/include/volk/volk_32fc_s32f_atan2_32f_a.h index 7bd001aa0..d86bd63c1 100644 --- a/volk/include/volk/volk_32fc_s32f_atan2_32f_a.h +++ b/volk/include/volk/volk_32fc_s32f_atan2_32f_a.h @@ -27,14 +27,14 @@ static inline void volk_32fc_s32f_atan2_32f_a_sse4_1(float* outputVector, const const float invNormalizeFactor = 1.0 / normalizeFactor; #ifdef LV_HAVE_LIB_SIMDMATH - const unsigned int quarterPoints = num_points / 4; + const unsigned int quarterPoints = num_points / 4; __m128 testVector = _mm_set_ps1(2*M_PI); __m128 correctVector = _mm_set_ps1(M_PI); __m128 vNormalizeFactor = _mm_set_ps1(invNormalizeFactor); __m128 phase; __m128 complex1, complex2, iValue, qValue; __m128 keepMask; - + for (; number < quarterPoints; number++) { // Load IQ data: complex1 = _mm_load_ps(complexVectorPtr); @@ -42,15 +42,15 @@ static inline void volk_32fc_s32f_atan2_32f_a_sse4_1(float* outputVector, const complex2 = _mm_load_ps(complexVectorPtr); complexVectorPtr += 4; // Deinterleave IQ data: - iValue = _mm_shuffle_ps(complex1, complex2, _MM_SHUFFLE(2,0,2,0)); - qValue = _mm_shuffle_ps(complex1, complex2, _MM_SHUFFLE(3,1,3,1)); + iValue = _mm_shuffle_ps(complex1, complex2, _MM_SHUFFLE(2,0,2,0)); + qValue = _mm_shuffle_ps(complex1, complex2, _MM_SHUFFLE(3,1,3,1)); // Arctan to get phase: phase = atan2f4(qValue, iValue); // When Q = 0 and I < 0, atan2f4 sucks and returns 2pi vice pi. // Compare to 2pi: keepMask = _mm_cmpneq_ps(phase,testVector); phase = _mm_blendv_ps(correctVector, phase, keepMask); - // done with above correction. + // done with above correction. phase = _mm_mul_ps(phase, vNormalizeFactor); _mm_store_ps((float*)outPtr, phase); outPtr += 4; @@ -89,7 +89,7 @@ static inline void volk_32fc_s32f_atan2_32f_a_sse(float* outputVector, const lv const float invNormalizeFactor = 1.0 / normalizeFactor; #ifdef LV_HAVE_LIB_SIMDMATH - const unsigned int quarterPoints = num_points / 4; + const unsigned int quarterPoints = num_points / 4; __m128 testVector = _mm_set_ps1(2*M_PI); __m128 correctVector = _mm_set_ps1(M_PI); __m128 vNormalizeFactor = _mm_set_ps1(invNormalizeFactor); @@ -97,7 +97,7 @@ static inline void volk_32fc_s32f_atan2_32f_a_sse(float* outputVector, const lv __m128 complex1, complex2, iValue, qValue; __m128 mask; __m128 keepMask; - + for (; number < quarterPoints; number++) { // Load IQ data: complex1 = _mm_load_ps(complexVectorPtr); @@ -105,8 +105,8 @@ static inline void volk_32fc_s32f_atan2_32f_a_sse(float* outputVector, const lv complex2 = _mm_load_ps(complexVectorPtr); complexVectorPtr += 4; // Deinterleave IQ data: - iValue = _mm_shuffle_ps(complex1, complex2, _MM_SHUFFLE(2,0,2,0)); - qValue = _mm_shuffle_ps(complex1, complex2, _MM_SHUFFLE(3,1,3,1)); + iValue = _mm_shuffle_ps(complex1, complex2, _MM_SHUFFLE(2,0,2,0)); + qValue = _mm_shuffle_ps(complex1, complex2, _MM_SHUFFLE(3,1,3,1)); // Arctan to get phase: phase = atan2f4(qValue, iValue); // When Q = 0 and I < 0, atan2f4 sucks and returns 2pi vice pi. @@ -115,7 +115,7 @@ static inline void volk_32fc_s32f_atan2_32f_a_sse(float* outputVector, const lv phase = _mm_and_ps(phase, keepMask); mask = _mm_andnot_ps(keepMask, correctVector); phase = _mm_or_ps(phase, mask); - // done with above correction. + // done with above correction. phase = _mm_mul_ps(phase, vNormalizeFactor); _mm_store_ps((float*)outPtr, phase); outPtr += 4; diff --git a/volk/include/volk/volk_32fc_s32f_power_32fc_a.h b/volk/include/volk/volk_32fc_s32f_power_32fc_a.h index 588b532b4..3106edbef 100644 --- a/volk/include/volk/volk_32fc_s32f_power_32fc_a.h +++ b/volk/include/volk/volk_32fc_s32f_power_32fc_a.h @@ -28,55 +28,55 @@ static inline lv_32fc_t __volk_s32fc_s32f_power_s32fc_a(const lv_32fc_t exp, con */ static inline void volk_32fc_s32f_power_32fc_a_sse(lv_32fc_t* cVector, const lv_32fc_t* aVector, const float power, unsigned int num_points){ unsigned int number = 0; - + lv_32fc_t* cPtr = cVector; const lv_32fc_t* aPtr = aVector; #ifdef LV_HAVE_LIB_SIMDMATH const unsigned int quarterPoints = num_points / 4; __m128 vPower = _mm_set_ps1(power); - + __m128 cplxValue1, cplxValue2, magnitude, phase, iValue, qValue; for(;number < quarterPoints; number++){ - - cplxValue1 = _mm_load_ps((float*)aPtr); + + cplxValue1 = _mm_load_ps((float*)aPtr); aPtr += 2; - - cplxValue2 = _mm_load_ps((float*)aPtr); + + cplxValue2 = _mm_load_ps((float*)aPtr); aPtr += 2; - + // Convert to polar coordinates - + // Arrange in i1i2i3i4 format iValue = _mm_shuffle_ps(cplxValue1, cplxValue2, _MM_SHUFFLE(2,0,2,0)); // Arrange in q1q2q3q4 format qValue = _mm_shuffle_ps(cplxValue1, cplxValue2, _MM_SHUFFLE(3,1,3,1)); - + phase = atan2f4(qValue, iValue); // Calculate the Phase - + magnitude = _mm_sqrt_ps(_mm_add_ps(_mm_mul_ps(iValue, iValue), _mm_mul_ps(qValue, qValue))); // Calculate the magnitude by square rooting the added I2 and Q2 values - + // Now calculate the power of the polar coordinate data magnitude = powf4(magnitude, vPower); // Take the magnitude to the specified power - + phase = _mm_mul_ps(phase, vPower); // Multiply the phase by the specified power - + // Convert back to cartesian coordinates iValue = _mm_mul_ps( cosf4(phase), magnitude); // Multiply the cos of the phase by the magnitude qValue = _mm_mul_ps( sinf4(phase), magnitude); // Multiply the sin of the phase by the magnitude - + cplxValue1 = _mm_unpacklo_ps(iValue, qValue); // Interleave the lower two i & q values cplxValue2 = _mm_unpackhi_ps(iValue, qValue); // Interleave the upper two i & q values - + _mm_store_ps((float*)cPtr,cplxValue1); // Store the results back into the C container - + cPtr += 2; - + _mm_store_ps((float*)cPtr,cplxValue2); // Store the results back into the C container - + cPtr += 2; } - + number = quarterPoints * 4; #endif /* LV_HAVE_LIB_SIMDMATH */ diff --git a/volk/include/volk/volk_32fc_s32f_power_spectrum_32f_a.h b/volk/include/volk/volk_32fc_s32f_power_spectrum_32f_a.h index 8d1959dae..30a77dbc1 100644 --- a/volk/include/volk/volk_32fc_s32f_power_spectrum_32f_a.h +++ b/volk/include/volk/volk_32fc_s32f_power_spectrum_32f_a.h @@ -34,7 +34,7 @@ static inline void volk_32fc_s32f_power_spectrum_32f_a_sse3(float* logPowerOutpu __m128 input1, input2; const uint64_t quarterPoints = num_points / 4; for(;number < quarterPoints; number++){ - // Load the complex values + // Load the complex values input1 =_mm_load_ps(inputPtr); inputPtr += 4; input2 =_mm_load_ps(inputPtr); @@ -43,30 +43,30 @@ static inline void volk_32fc_s32f_power_spectrum_32f_a_sse3(float* logPowerOutpu // Apply the normalization factor input1 = _mm_mul_ps(input1, invNormalizationFactor); input2 = _mm_mul_ps(input2, invNormalizationFactor); - + // Multiply each value by itself // (r1*r1), (i1*i1), (r2*r2), (i2*i2) input1 = _mm_mul_ps(input1, input1); // (r3*r3), (i3*i3), (r4*r4), (i4*i4) input2 = _mm_mul_ps(input2, input2); - + // Horizontal add, to add (r*r) + (i*i) for each complex value // (r1*r1)+(i1*i1), (r2*r2) + (i2*i2), (r3*r3)+(i3*i3), (r4*r4)+(i4*i4) power = _mm_hadd_ps(input1, input2); - + // Calculate the natural log power power = logf4(power); - + // Convert to log10 and multiply by 10.0 power = _mm_mul_ps(power, magScalar); - + // Store the floating point results _mm_store_ps(destPtr, power); - + destPtr += 4; } - - number = quarterPoints*4; + + number = quarterPoints*4; #endif /* LV_HAVE_LIB_SIMDMATH */ // Calculate the FFT for any remaining points @@ -81,10 +81,10 @@ static inline void volk_32fc_s32f_power_spectrum_32f_a_sse3(float* logPowerOutpu const float imag = *inputPtr++ * iNormalizationFactor; *destPtr = 10.0*log10f(((real * real) + (imag * imag)) + 1e-20); - + destPtr++; } - + } #endif /* LV_HAVE_SSE3 */ @@ -114,7 +114,7 @@ static inline void volk_32fc_s32f_power_spectrum_32f_a_generic(float* logPowerOu *realFFTDataPointsPtr = 10.0*log10f(((real * real) + (imag * imag)) + 1e-20); - + realFFTDataPointsPtr++; } } diff --git a/volk/include/volk/volk_32fc_s32f_x2_power_spectral_density_32f_a.h b/volk/include/volk/volk_32fc_s32f_x2_power_spectral_density_32f_a.h index fc635f171..27f755351 100644 --- a/volk/include/volk/volk_32fc_s32f_x2_power_spectral_density_32f_a.h +++ b/volk/include/volk/volk_32fc_s32f_x2_power_spectral_density_32f_a.h @@ -32,19 +32,19 @@ static inline void volk_32fc_s32f_x2_power_spectral_density_32f_a_sse3(float* lo magScalar = _mm_div_ps(magScalar, logf4(magScalar)); __m128 invRBW = _mm_set_ps1(iRBW); - + __m128 invNormalizationFactor = _mm_set_ps1(iNormalizationFactor); __m128 power; __m128 input1, input2; const uint64_t quarterPoints = num_points / 4; for(;number < quarterPoints; number++){ - // Load the complex values + // Load the complex values input1 =_mm_load_ps(inputPtr); inputPtr += 4; input2 =_mm_load_ps(inputPtr); inputPtr += 4; - + // Apply the normalization factor input1 = _mm_mul_ps(input1, invNormalizationFactor); input2 = _mm_mul_ps(input2, invNormalizationFactor); @@ -54,7 +54,7 @@ static inline void volk_32fc_s32f_x2_power_spectral_density_32f_a_sse3(float* lo input1 = _mm_mul_ps(input1, input1); // (r3*r3), (i3*i3), (r4*r4), (i4*i4) input2 = _mm_mul_ps(input2, input2); - + // Horizontal add, to add (r*r) + (i*i) for each complex value // (r1*r1)+(i1*i1), (r2*r2) + (i2*i2), (r3*r3)+(i3*i3), (r4*r4)+(i4*i4) power = _mm_hadd_ps(input1, input2); @@ -64,17 +64,17 @@ static inline void volk_32fc_s32f_x2_power_spectral_density_32f_a_sse3(float* lo // Calculate the natural log power power = logf4(power); - + // Convert to log10 and multiply by 10.0 power = _mm_mul_ps(power, magScalar); - + // Store the floating point results _mm_store_ps(destPtr, power); - + destPtr += 4; } - - number = quarterPoints*4; + + number = quarterPoints*4; #endif /* LV_HAVE_LIB_SIMDMATH */ // Calculate the FFT for any remaining points for(; number < num_points; number++){ @@ -83,14 +83,14 @@ static inline void volk_32fc_s32f_x2_power_spectral_density_32f_a_sse3(float* lo // 10 * log10 (v^2 / (2 * 50.0 * .001)) = 10 * log10( v^2 * 10) // 75 ohm load assumption // 10 * log10 (v^2 / (2 * 75.0 * .001)) = 10 * log10( v^2 * 15) - + const float real = *inputPtr++ * iNormalizationFactor; const float imag = *inputPtr++ * iNormalizationFactor; *destPtr = 10.0*log10f((((real * real) + (imag * imag)) + 1e-20) * iRBW); destPtr++; } - + } #endif /* LV_HAVE_SSE3 */ @@ -122,7 +122,7 @@ static inline void volk_32fc_s32f_x2_power_spectral_density_32f_a_generic(float* const float imag = *inputPtr++ * iNormalizationFactor; *realFFTDataPointsPtr = 10.0*log10f((((real * real) + (imag * imag)) + 1e-20) * invRBW); - + realFFTDataPointsPtr++; } } diff --git a/volk/include/volk/volk_32fc_s32fc_multiply_32fc_a.h b/volk/include/volk/volk_32fc_s32fc_multiply_32fc_a.h index 534dc2a25..f206c5e87 100644 --- a/volk/include/volk/volk_32fc_s32fc_multiply_32fc_a.h +++ b/volk/include/volk/volk_32fc_s32fc_multiply_32fc_a.h @@ -28,17 +28,17 @@ static inline void volk_32fc_s32fc_multiply_32fc_a_sse3(lv_32fc_t* cVector, cons yh = _mm_set_ps1(lv_cimag(scalar)); for(;number < halfPoints; number++){ - + x = _mm_load_ps((float*)a); // Load the ar + ai, br + bi as ar,ai,br,bi - + tmp1 = _mm_mul_ps(x,yl); // tmp1 = ar*cr,ai*cr,br*dr,bi*dr - + x = _mm_shuffle_ps(x,x,0xB1); // Re-arrange x to be ai,ar,bi,br - + tmp2 = _mm_mul_ps(x,yh); // tmp2 = ai*ci,ar*ci,bi*di,br*di - + z = _mm_addsub_ps(tmp1,tmp2); // ar*cr-ai*ci, ai*cr+ar*ci, br*dr-bi*di, bi*dr+br*di - + _mm_store_ps((float*)c,z); // Store the results back into the C container a += 2; diff --git a/volk/include/volk/volk_32fc_s32fc_multiply_32fc_u.h b/volk/include/volk/volk_32fc_s32fc_multiply_32fc_u.h index 218c450f8..5c7d15b02 100644 --- a/volk/include/volk/volk_32fc_s32fc_multiply_32fc_u.h +++ b/volk/include/volk/volk_32fc_s32fc_multiply_32fc_u.h @@ -28,17 +28,17 @@ static inline void volk_32fc_s32fc_multiply_32fc_u_sse3(lv_32fc_t* cVector, cons yh = _mm_set_ps1(lv_cimag(scalar)); for(;number < halfPoints; number++){ - + x = _mm_loadu_ps((float*)a); // Load the ar + ai, br + bi as ar,ai,br,bi - + tmp1 = _mm_mul_ps(x,yl); // tmp1 = ar*cr,ai*cr,br*dr,bi*dr - + x = _mm_shuffle_ps(x,x,0xB1); // Re-arrange x to be ai,ar,bi,br - + tmp2 = _mm_mul_ps(x,yh); // tmp2 = ai*ci,ar*ci,bi*di,br*di - + z = _mm_addsub_ps(tmp1,tmp2); // ar*cr-ai*ci, ai*cr+ar*ci, br*dr-bi*di, bi*dr+br*di - + _mm_storeu_ps((float*)c,z); // Store the results back into the C container a += 2; diff --git a/volk/include/volk/volk_32fc_x2_conjugate_dot_prod_32fc_a.h b/volk/include/volk/volk_32fc_x2_conjugate_dot_prod_32fc_a.h index 655075528..e3dedf2fc 100644 --- a/volk/include/volk/volk_32fc_x2_conjugate_dot_prod_32fc_a.h +++ b/volk/include/volk/volk_32fc_x2_conjugate_dot_prod_32fc_a.h @@ -10,40 +10,40 @@ static inline void volk_32fc_x2_conjugate_dot_prod_32fc_a_generic(lv_32fc_t* result, const lv_32fc_t* input, const lv_32fc_t* taps, unsigned int num_bytes) { - + float * res = (float*) result; float * in = (float*) input; float * tp = (float*) taps; unsigned int n_2_ccomplex_blocks = num_bytes >> 4; unsigned int isodd = (num_bytes >> 3) &1; - - - + + + float sum0[2] = {0,0}; float sum1[2] = {0,0}; unsigned int i = 0; - + for(i = 0; i < n_2_ccomplex_blocks; ++i) { - + sum0[0] += in[0] * tp[0] + in[1] * tp[1]; sum0[1] += (-in[0] * tp[1]) + in[1] * tp[0]; sum1[0] += in[2] * tp[2] + in[3] * tp[3]; sum1[1] += (-in[2] * tp[3]) + in[3] * tp[2]; - - + + in += 4; tp += 4; } - - + + res[0] = sum0[0] + sum1[0]; res[1] = sum0[1] + sum1[1]; - - - + + + for(i = 0; i < isodd; ++i) { @@ -64,13 +64,13 @@ static inline void volk_32fc_x2_conjugate_dot_prod_32fc_a_generic(lv_32fc_t* res static inline void volk_32fc_x2_conjugate_dot_prod_32fc_a_sse(lv_32fc_t* result, const lv_32fc_t* input, const lv_32fc_t* taps, unsigned int num_bytes) { - + __VOLK_ATTR_ALIGNED(16) static const uint32_t conjugator[4]= {0x00000000, 0x80000000, 0x00000000, 0x80000000}; - - asm volatile + + asm volatile ( "# ccomplex_conjugate_dotprod_generic (float* result, const float *input,\n\t" "# const float *taps, unsigned num_bytes)\n\t" @@ -187,32 +187,32 @@ static inline void volk_32fc_x2_conjugate_dot_prod_32fc_a_sse(lv_32fc_t* result, :[rsi] "r" (input), [rdx] "r" (taps), "c" (num_bytes), [rdi] "r" (result), [conjugator] "r" (conjugator) :"rax", "r8", "r9", "r10" ); - - + + int getem = num_bytes % 16; - - + + for(; getem > 0; getem -= 8) { - - + + *result += (input[(num_bytes >> 3) - 1] * lv_conj(taps[(num_bytes >> 3) - 1])); - + } return; -} +} #endif #if LV_HAVE_SSE && LV_HAVE_32 static inline void volk_32fc_x2_conjugate_dot_prod_32fc_a_sse_32(lv_32fc_t* result, const lv_32fc_t* input, const lv_32fc_t* taps, unsigned int num_bytes) { - + __VOLK_ATTR_ALIGNED(16) static const uint32_t conjugator[4]= {0x00000000, 0x80000000, 0x00000000, 0x80000000}; int bound = num_bytes >> 4; int leftovers = num_bytes % 16; - - asm volatile + + asm volatile ( " #pushl %%ebp\n\t" " #movl %%esp, %%ebp\n\t" @@ -226,7 +226,7 @@ static inline void volk_32fc_x2_conjugate_dot_prod_32fc_a_sse_32(lv_32fc_t* resu " movaps 0(%[edx]), %%xmm2\n\t" " movl %[ecx], (%[out])\n\t" " shrl $5, %[ecx] # ecx = n_2_ccomplex_blocks / 2\n\t" - + " xorps %%xmm1, %%xmm2\n\t" " jmp .%=L1_test\n\t" " # 4 taps / loop\n\t" @@ -317,28 +317,28 @@ static inline void volk_32fc_x2_conjugate_dot_prod_32fc_a_sse_32(lv_32fc_t* resu : [eax] "r" (input), [edx] "r" (taps), [ecx] "r" (num_bytes), [out] "r" (result), [conjugator] "r" (conjugator) ); - - - + + + printf("%d, %d\n", leftovers, bound); - + for(; leftovers > 0; leftovers -= 8) { - - + + *result += (input[(bound << 1)] * lv_conj(taps[(bound << 1)])); - + } - + return; - - - - - + + + + + } -#endif /*LV_HAVE_SSE*/ +#endif /*LV_HAVE_SSE*/ diff --git a/volk/include/volk/volk_32fc_x2_conjugate_dot_prod_32fc_u.h b/volk/include/volk/volk_32fc_x2_conjugate_dot_prod_32fc_u.h index 3ae7208a8..e7493413f 100644 --- a/volk/include/volk/volk_32fc_x2_conjugate_dot_prod_32fc_u.h +++ b/volk/include/volk/volk_32fc_x2_conjugate_dot_prod_32fc_u.h @@ -9,39 +9,39 @@ static inline void volk_32fc_x2_conjugate_dot_prod_32fc_u_generic(lv_32fc_t* result, const lv_32fc_t* input, const lv_32fc_t* taps, unsigned int num_bytes) { - + float * res = (float*) result; float * in = (float*) input; float * tp = (float*) taps; unsigned int n_2_ccomplex_blocks = num_bytes >> 4; unsigned int isodd = (num_bytes >> 3) &1; - - - + + + float sum0[2] = {0,0}; float sum1[2] = {0,0}; unsigned int i = 0; - + for(i = 0; i < n_2_ccomplex_blocks; ++i) { - + sum0[0] += in[0] * tp[0] + in[1] * tp[1]; sum0[1] += (-in[0] * tp[1]) + in[1] * tp[0]; sum1[0] += in[2] * tp[2] + in[3] * tp[3]; sum1[1] += (-in[2] * tp[3]) + in[3] * tp[2]; - - + + in += 4; tp += 4; } - - + + res[0] = sum0[0] + sum1[0]; res[1] = sum0[1] + sum1[1]; - - - + + + for(i = 0; i < isodd; ++i) { @@ -73,7 +73,7 @@ static inline void volk_32fc_x2_conjugate_dot_prod_32fc_u_sse3(lv_32fc_t* result uint32_t intRep[4]; __m128 vec; } halfMask; - + union NegMask { int intRep[4]; __m128 vec; @@ -85,13 +85,13 @@ static inline void volk_32fc_x2_conjugate_dot_prod_32fc_u_sse3(lv_32fc_t* result __m128 in1, in2, Rv, fehg, Iv, Rs, Ivm, Is; __m128 zv = {0,0,0,0}; - + halfMask.intRep[0] = halfMask.intRep[1] = 0xFFFFFFFF; halfMask.intRep[2] = halfMask.intRep[3] = 0x00000000; negMask.intRep[0] = negMask.intRep[2] = 0x80000000; negMask.intRep[1] = negMask.intRep[3] = 0; - + // main loop while(num_bytes >= 4*sizeof(float)){ diff --git a/volk/include/volk/volk_32fc_x2_dot_prod_32fc_a.h b/volk/include/volk/volk_32fc_x2_dot_prod_32fc_a.h index cde9240cc..cb2ac4c67 100644 --- a/volk/include/volk/volk_32fc_x2_dot_prod_32fc_a.h +++ b/volk/include/volk/volk_32fc_x2_dot_prod_32fc_a.h @@ -7,44 +7,44 @@ #include <string.h> -#ifdef LV_HAVE_GENERIC +#ifdef LV_HAVE_GENERIC static inline void volk_32fc_x2_dot_prod_32fc_a_generic(lv_32fc_t* result, const lv_32fc_t* input, const lv_32fc_t* taps, unsigned int num_bytes) { - + float * res = (float*) result; float * in = (float*) input; float * tp = (float*) taps; unsigned int n_2_ccomplex_blocks = num_bytes >> 4; unsigned int isodd = (num_bytes >> 3) &1; - - - + + + float sum0[2] = {0,0}; float sum1[2] = {0,0}; unsigned int i = 0; - + for(i = 0; i < n_2_ccomplex_blocks; ++i) { - + sum0[0] += in[0] * tp[0] - in[1] * tp[1]; sum0[1] += in[0] * tp[1] + in[1] * tp[0]; sum1[0] += in[2] * tp[2] - in[3] * tp[3]; sum1[1] += in[2] * tp[3] + in[3] * tp[2]; - - + + in += 4; tp += 4; } - + res[0] = sum0[0] + sum1[0]; res[1] = sum0[1] + sum1[1]; - - - + + + for(i = 0; i < isodd; ++i) { @@ -61,9 +61,9 @@ static inline void volk_32fc_x2_dot_prod_32fc_a_generic(lv_32fc_t* result, const static inline void volk_32fc_x2_dot_prod_32fc_a_sse_64(lv_32fc_t* result, const lv_32fc_t* input, const lv_32fc_t* taps, unsigned int num_bytes) { - - asm + + asm ( "# ccomplex_dotprod_generic (float* result, const float *input,\n\t" "# const float *taps, unsigned num_bytes)\n\t" @@ -175,20 +175,20 @@ static inline void volk_32fc_x2_dot_prod_32fc_a_sse_64(lv_32fc_t* result, const :[rsi] "r" (input), [rdx] "r" (taps), "c" (num_bytes), [rdi] "r" (result) :"rax", "r8", "r9", "r10" ); - - + + int getem = num_bytes % 16; - - + + for(; getem > 0; getem -= 8) { - - + + *result += (input[(num_bytes >> 3) - 1] * taps[(num_bytes >> 3) - 1]); - + } return; - + } #endif @@ -200,7 +200,7 @@ static inline void volk_32fc_x2_dot_prod_32fc_a_sse_32(lv_32fc_t* result, const volk_32fc_x2_dot_prod_32fc_a_generic(result, input, taps, num_bytes); #if 0 - asm volatile + asm volatile ( " #pushl %%ebp\n\t" " #movl %%esp, %%ebp\n\t" @@ -299,28 +299,28 @@ static inline void volk_32fc_x2_dot_prod_32fc_a_sse_32(lv_32fc_t* result, const : "eax", "ecx", "edx" ); - + int getem = num_bytes % 16; - + for(; getem > 0; getem -= 8) { - - + + *result += (input[(num_bytes >> 3) - 1] * taps[(num_bytes >> 3) - 1]); - + } - + return; -#endif +#endif } -#endif /*LV_HAVE_SSE*/ +#endif /*LV_HAVE_SSE*/ #ifdef LV_HAVE_SSE3 #include <pmmintrin.h> static inline void volk_32fc_x2_dot_prod_32fc_a_sse3(lv_32fc_t* result, const lv_32fc_t* input, const lv_32fc_t* taps, unsigned int num_bytes) { - + lv_32fc_t dotProduct; memset(&dotProduct, 0x0, 2*sizeof(float)); @@ -336,19 +336,19 @@ static inline void volk_32fc_x2_dot_prod_32fc_a_sse3(lv_32fc_t* result, const lv dotProdVal = _mm_setzero_ps(); for(;number < halfPoints; number++){ - + x = _mm_load_ps((float*)a); // Load the ar + ai, br + bi as ar,ai,br,bi y = _mm_load_ps((float*)b); // Load the cr + ci, dr + di as cr,ci,dr,di - + yl = _mm_moveldup_ps(y); // Load yl with cr,cr,dr,dr yh = _mm_movehdup_ps(y); // Load yh with ci,ci,di,di - + tmp1 = _mm_mul_ps(x,yl); // tmp1 = ar*cr,ai*cr,br*dr,bi*dr - + x = _mm_shuffle_ps(x,x,0xB1); // Re-arrange x to be ai,ar,bi,br - + tmp2 = _mm_mul_ps(x,yh); // tmp2 = ai*ci,ar*ci,bi*di,br*di - + z = _mm_addsub_ps(tmp1,tmp2); // ar*cr-ai*ci, ai*cr+ar*ci, br*dr-bi*di, bi*dr+br*di dotProdVal = _mm_add_ps(dotProdVal, z); // Add the complex multiplication results together @@ -368,7 +368,7 @@ static inline void volk_32fc_x2_dot_prod_32fc_a_sse3(lv_32fc_t* result, const lv } *result = dotProduct; -} +} #endif /*LV_HAVE_SSE3*/ @@ -379,7 +379,7 @@ static inline void volk_32fc_x2_dot_prod_32fc_a_sse3(lv_32fc_t* result, const lv static inline void volk_32fc_x2_dot_prod_32fc_a_sse4_1(lv_32fc_t* result, const lv_32fc_t* input, const lv_32fc_t* taps, unsigned int num_bytes) { volk_32fc_x2_dot_prod_32fc_a_sse3(result, input, taps, num_bytes); // SSE3 version runs twice as fast as the SSE4.1 version, so turning off SSE4 version for now - /* + /* __m128 xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, real0, real1, im0, im1; float *p_input, *p_taps; __m64 *p_result; @@ -391,7 +391,7 @@ static inline void volk_32fc_x2_dot_prod_32fc_a_sse4_1(lv_32fc_t* result, const static const __m128i neg = {0x000000000000000080000000}; int i = 0; - + int bound = (num_bytes >> 5); int leftovers = (num_bytes & 24) >> 3; @@ -399,27 +399,27 @@ static inline void volk_32fc_x2_dot_prod_32fc_a_sse4_1(lv_32fc_t* result, const real1 = _mm_sub_ps(real1, real1); im0 = _mm_sub_ps(im0, im0); im1 = _mm_sub_ps(im1, im1); - + for(; i < bound; ++i) { - - + + xmm0 = _mm_load_ps(p_input); xmm1 = _mm_load_ps(p_taps); - + p_input += 4; p_taps += 4; - + xmm2 = _mm_load_ps(p_input); xmm3 = _mm_load_ps(p_taps); - + p_input += 4; p_taps += 4; - + xmm4 = _mm_unpackhi_ps(xmm0, xmm2); xmm5 = _mm_unpackhi_ps(xmm1, xmm3); xmm0 = _mm_unpacklo_ps(xmm0, xmm2); xmm2 = _mm_unpacklo_ps(xmm1, xmm3); - + //imaginary vector from input xmm1 = _mm_unpackhi_ps(xmm0, xmm4); //real vector from input @@ -428,39 +428,39 @@ static inline void volk_32fc_x2_dot_prod_32fc_a_sse4_1(lv_32fc_t* result, const xmm0 = _mm_unpackhi_ps(xmm2, xmm5); //real vector from taps xmm2 = _mm_unpacklo_ps(xmm2, xmm5); - + xmm4 = _mm_dp_ps(xmm3, xmm2, 0xf1); xmm5 = _mm_dp_ps(xmm1, xmm0, 0xf1); - + xmm6 = _mm_dp_ps(xmm3, xmm0, 0xf2); xmm7 = _mm_dp_ps(xmm1, xmm2, 0xf2); - + real0 = _mm_add_ps(xmm4, real0); real1 = _mm_add_ps(xmm5, real1); im0 = _mm_add_ps(xmm6, im0); im1 = _mm_add_ps(xmm7, im1); - + } - - + + real1 = _mm_xor_ps(real1, (__m128)neg); - - + + im0 = _mm_add_ps(im0, im1); real0 = _mm_add_ps(real0, real1); - + im0 = _mm_add_ps(im0, real0); - + _mm_storel_pi(p_result, im0); - + for(i = bound * 4; i < (bound * 4) + leftovers; ++i) { - + *result += input[i] * taps[i]; } */ -} +} #endif /*LV_HAVE_SSE4_1*/ diff --git a/volk/include/volk/volk_32fc_x2_multiply_32fc_a.h b/volk/include/volk/volk_32fc_x2_multiply_32fc_a.h index aec8bd716..f79ddb59b 100644 --- a/volk/include/volk/volk_32fc_x2_multiply_32fc_a.h +++ b/volk/include/volk/volk_32fc_x2_multiply_32fc_a.h @@ -24,21 +24,21 @@ static inline void volk_32fc_x2_multiply_32fc_a_sse3(lv_32fc_t* cVector, const l const lv_32fc_t* a = aVector; const lv_32fc_t* b = bVector; for(;number < halfPoints; number++){ - + x = _mm_load_ps((float*)a); // Load the ar + ai, br + bi as ar,ai,br,bi y = _mm_load_ps((float*)b); // Load the cr + ci, dr + di as cr,ci,dr,di - + yl = _mm_moveldup_ps(y); // Load yl with cr,cr,dr,dr yh = _mm_movehdup_ps(y); // Load yh with ci,ci,di,di - + tmp1 = _mm_mul_ps(x,yl); // tmp1 = ar*cr,ai*cr,br*dr,bi*dr - + x = _mm_shuffle_ps(x,x,0xB1); // Re-arrange x to be ai,ar,bi,br - + tmp2 = _mm_mul_ps(x,yh); // tmp2 = ai*ci,ar*ci,bi*di,br*di - + z = _mm_addsub_ps(tmp1,tmp2); // ar*cr-ai*ci, ai*cr+ar*ci, br*dr-bi*di, bi*dr+br*di - + _mm_store_ps((float*)c,z); // Store the results back into the C container a += 2; diff --git a/volk/include/volk/volk_32fc_x2_multiply_32fc_u.h b/volk/include/volk/volk_32fc_x2_multiply_32fc_u.h index 729c1a4ad..a998d6184 100644 --- a/volk/include/volk/volk_32fc_x2_multiply_32fc_u.h +++ b/volk/include/volk/volk_32fc_x2_multiply_32fc_u.h @@ -25,21 +25,21 @@ static inline void volk_32fc_x2_multiply_32fc_u_sse3(lv_32fc_t* cVector, const l const lv_32fc_t* b = bVector; for(;number < halfPoints; number++){ - + x = _mm_loadu_ps((float*)a); // Load the ar + ai, br + bi as ar,ai,br,bi y = _mm_loadu_ps((float*)b); // Load the cr + ci, dr + di as cr,ci,dr,di - + yl = _mm_moveldup_ps(y); // Load yl with cr,cr,dr,dr yh = _mm_movehdup_ps(y); // Load yh with ci,ci,di,di - + tmp1 = _mm_mul_ps(x,yl); // tmp1 = ar*cr,ai*cr,br*dr,bi*dr - + x = _mm_shuffle_ps(x,x,0xB1); // Re-arrange x to be ai,ar,bi,br - + tmp2 = _mm_mul_ps(x,yh); // tmp2 = ai*ci,ar*ci,bi*di,br*di - + z = _mm_addsub_ps(tmp1,tmp2); // ar*cr-ai*ci, ai*cr+ar*ci, br*dr-bi*di, bi*dr+br*di - + _mm_storeu_ps((float*)c,z); // Store the results back into the C container a += 2; diff --git a/volk/include/volk/volk_32fc_x2_multiply_conjugate_32fc_a.h b/volk/include/volk/volk_32fc_x2_multiply_conjugate_32fc_a.h index 2a1bcbce0..2755192e9 100644 --- a/volk/include/volk/volk_32fc_x2_multiply_conjugate_32fc_a.h +++ b/volk/include/volk/volk_32fc_x2_multiply_conjugate_32fc_a.h @@ -27,23 +27,23 @@ static inline void volk_32fc_x2_multiply_conjugate_32fc_a_sse3(lv_32fc_t* cVecto __m128 conjugator = _mm_setr_ps(0, -0.f, 0, -0.f); for(;number < halfPoints; number++){ - + x = _mm_load_ps((float*)a); // Load the ar + ai, br + bi as ar,ai,br,bi y = _mm_load_ps((float*)b); // Load the cr + ci, dr + di as cr,ci,dr,di y = _mm_xor_ps(y, conjugator); // conjugate y - + yl = _mm_moveldup_ps(y); // Load yl with cr,cr,dr,dr yh = _mm_movehdup_ps(y); // Load yh with ci,ci,di,di - + tmp1 = _mm_mul_ps(x,yl); // tmp1 = ar*cr,ai*cr,br*dr,bi*dr - + x = _mm_shuffle_ps(x,x,0xB1); // Re-arrange x to be ai,ar,bi,br - + tmp2 = _mm_mul_ps(x,yh); // tmp2 = ai*ci,ar*ci,bi*di,br*di - + z = _mm_addsub_ps(tmp1,tmp2); // ar*cr-ai*ci, ai*cr+ar*ci, br*dr-bi*di, bi*dr+br*di - + _mm_store_ps((float*)c,z); // Store the results back into the C container a += 2; diff --git a/volk/include/volk/volk_32fc_x2_multiply_conjugate_32fc_u.h b/volk/include/volk/volk_32fc_x2_multiply_conjugate_32fc_u.h index 92f6a051e..09dcd635b 100644 --- a/volk/include/volk/volk_32fc_x2_multiply_conjugate_32fc_u.h +++ b/volk/include/volk/volk_32fc_x2_multiply_conjugate_32fc_u.h @@ -27,23 +27,23 @@ static inline void volk_32fc_x2_multiply_conjugate_32fc_u_sse3(lv_32fc_t* cVecto __m128 conjugator = _mm_setr_ps(0, -0.f, 0, -0.f); for(;number < halfPoints; number++){ - + x = _mm_loadu_ps((float*)a); // Load the ar + ai, br + bi as ar,ai,br,bi y = _mm_loadu_ps((float*)b); // Load the cr + ci, dr + di as cr,ci,dr,di y = _mm_xor_ps(y, conjugator); // conjugate y - + yl = _mm_moveldup_ps(y); // Load yl with cr,cr,dr,dr yh = _mm_movehdup_ps(y); // Load yh with ci,ci,di,di - + tmp1 = _mm_mul_ps(x,yl); // tmp1 = ar*cr,ai*cr,br*dr,bi*dr - + x = _mm_shuffle_ps(x,x,0xB1); // Re-arrange x to be ai,ar,bi,br - + tmp2 = _mm_mul_ps(x,yh); // tmp2 = ai*ci,ar*ci,bi*di,br*di - + z = _mm_addsub_ps(tmp1,tmp2); // ar*cr-ai*ci, ai*cr+ar*ci, br*dr-bi*di, bi*dr+br*di - + _mm_storeu_ps((float*)c,z); // Store the results back into the C container a += 2; diff --git a/volk/include/volk/volk_32fc_x2_s32f_square_dist_scalar_mult_32f_a.h b/volk/include/volk/volk_32fc_x2_s32f_square_dist_scalar_mult_32f_a.h index 2d5f36b27..75eb9173d 100644 --- a/volk/include/volk/volk_32fc_x2_s32f_square_dist_scalar_mult_32f_a.h +++ b/volk/include/volk/volk_32fc_x2_s32f_square_dist_scalar_mult_32f_a.h @@ -11,7 +11,7 @@ #include<pmmintrin.h> static inline void volk_32fc_x2_s32f_square_dist_scalar_mult_32f_a_sse3(float* target, lv_32fc_t* src0, lv_32fc_t* points, float scalar, unsigned int num_bytes) { - + __m128 xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm8; @@ -23,31 +23,31 @@ static inline void volk_32fc_x2_s32f_square_dist_scalar_mult_32f_a_sse3(float* t int leftovers0 = (num_bytes >> 4) & 1; int leftovers1 = (num_bytes >> 3) & 1; int i = 0; - - - + + + xmm1 = _mm_setzero_ps(); - xmm1 = _mm_loadl_pi(xmm1, (__m64*)src0); + xmm1 = _mm_loadl_pi(xmm1, (__m64*)src0); xmm2 = _mm_load_ps((float*)&points[0]); xmm8 = _mm_load1_ps(&scalar); xmm1 = _mm_movelh_ps(xmm1, xmm1); xmm3 = _mm_load_ps((float*)&points[2]); - - + + for(; i < bound - 1; ++i) { - + xmm4 = _mm_sub_ps(xmm1, xmm2); xmm5 = _mm_sub_ps(xmm1, xmm3); points += 4; xmm6 = _mm_mul_ps(xmm4, xmm4); xmm7 = _mm_mul_ps(xmm5, xmm5); - + xmm2 = _mm_load_ps((float*)&points[0]); - + xmm4 = _mm_hadd_ps(xmm6, xmm7); xmm3 = _mm_load_ps((float*)&points[2]); - + xmm4 = _mm_mul_ps(xmm4, xmm8); _mm_store_ps(target, xmm4); @@ -55,46 +55,46 @@ static inline void volk_32fc_x2_s32f_square_dist_scalar_mult_32f_a_sse3(float* t target += 4; } - + xmm4 = _mm_sub_ps(xmm1, xmm2); xmm5 = _mm_sub_ps(xmm1, xmm3); - - + + points += 4; xmm6 = _mm_mul_ps(xmm4, xmm4); xmm7 = _mm_mul_ps(xmm5, xmm5); - + xmm4 = _mm_hadd_ps(xmm6, xmm7); - + xmm4 = _mm_mul_ps(xmm4, xmm8); - + _mm_store_ps(target, xmm4); - + target += 4; - + for(i = 0; i < leftovers0; ++i) { - + xmm2 = _mm_load_ps((float*)&points[0]); - + xmm4 = _mm_sub_ps(xmm1, xmm2); - + points += 2; - + xmm6 = _mm_mul_ps(xmm4, xmm4); xmm4 = _mm_hadd_ps(xmm6, xmm6); xmm4 = _mm_mul_ps(xmm4, xmm8); - + _mm_storeh_pi((__m64*)target, xmm4); target += 2; } for(i = 0; i < leftovers1; ++i) { - + diff = src0[0] - points[0]; sq_dist = scalar * (lv_creal(diff) * lv_creal(diff) + lv_cimag(diff) * lv_cimag(diff)); @@ -109,13 +109,13 @@ static inline void volk_32fc_x2_s32f_square_dist_scalar_mult_32f_a_sse3(float* t static inline void volk_32fc_x2_s32f_square_dist_scalar_mult_32f_a_generic(float* target, lv_32fc_t* src0, lv_32fc_t* points, float scalar, unsigned int num_bytes) { lv_32fc_t diff; float sq_dist; - unsigned int i = 0; - + unsigned int i = 0; + for(; i < num_bytes >> 3; ++i) { diff = src0[0] - points[i]; sq_dist = scalar * (lv_creal(diff) * lv_creal(diff) + lv_cimag(diff) * lv_cimag(diff)); - + target[i] = sq_dist; } } diff --git a/volk/include/volk/volk_32fc_x2_square_dist_32f_a.h b/volk/include/volk/volk_32fc_x2_square_dist_32f_a.h index 6a4a08ca5..b819eaffd 100644 --- a/volk/include/volk/volk_32fc_x2_square_dist_32f_a.h +++ b/volk/include/volk/volk_32fc_x2_square_dist_32f_a.h @@ -10,7 +10,7 @@ #include<pmmintrin.h> static inline void volk_32fc_x2_square_dist_32f_a_sse3(float* target, lv_32fc_t* src0, lv_32fc_t* points, unsigned int num_bytes) { - + __m128 xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7; @@ -22,11 +22,11 @@ static inline void volk_32fc_x2_square_dist_32f_a_sse3(float* target, lv_32fc_t* int i = 0; xmm1 = _mm_setzero_ps(); - xmm1 = _mm_loadl_pi(xmm1, (__m64*)src0); + xmm1 = _mm_loadl_pi(xmm1, (__m64*)src0); xmm2 = _mm_load_ps((float*)&points[0]); xmm1 = _mm_movelh_ps(xmm1, xmm1); xmm3 = _mm_load_ps((float*)&points[2]); - + for(; i < bound - 1; ++i) { xmm4 = _mm_sub_ps(xmm1, xmm2); @@ -34,9 +34,9 @@ static inline void volk_32fc_x2_square_dist_32f_a_sse3(float* target, lv_32fc_t* points += 4; xmm6 = _mm_mul_ps(xmm4, xmm4); xmm7 = _mm_mul_ps(xmm5, xmm5); - + xmm2 = _mm_load_ps((float*)&points[0]); - + xmm4 = _mm_hadd_ps(xmm6, xmm7); xmm3 = _mm_load_ps((float*)&points[2]); @@ -46,41 +46,41 @@ static inline void volk_32fc_x2_square_dist_32f_a_sse3(float* target, lv_32fc_t* target += 4; } - + xmm4 = _mm_sub_ps(xmm1, xmm2); xmm5 = _mm_sub_ps(xmm1, xmm3); - - + + points += 4; xmm6 = _mm_mul_ps(xmm4, xmm4); xmm7 = _mm_mul_ps(xmm5, xmm5); - + xmm4 = _mm_hadd_ps(xmm6, xmm7); - + _mm_store_ps(target, xmm4); - + target += 4; for(i = 0; i < leftovers0; ++i) { - + xmm2 = _mm_load_ps((float*)&points[0]); - + xmm4 = _mm_sub_ps(xmm1, xmm2); - + points += 2; - + xmm6 = _mm_mul_ps(xmm4, xmm4); xmm4 = _mm_hadd_ps(xmm6, xmm6); - + _mm_storeh_pi((__m64*)target, xmm4); target += 2; } for(i = 0; i < leftovers1; ++i) { - + diff = src0[0] - points[0]; sq_dist = lv_creal(diff) * lv_creal(diff) + lv_cimag(diff) * lv_cimag(diff); @@ -95,13 +95,13 @@ static inline void volk_32fc_x2_square_dist_32f_a_sse3(float* target, lv_32fc_t* static inline void volk_32fc_x2_square_dist_32f_a_generic(float* target, lv_32fc_t* src0, lv_32fc_t* points, unsigned int num_bytes) { lv_32fc_t diff; float sq_dist; - unsigned int i = 0; - + unsigned int i = 0; + for(; i < num_bytes >> 3; ++i) { diff = src0[0] - points[i]; sq_dist = lv_creal(diff) * lv_creal(diff) + lv_cimag(diff) * lv_cimag(diff); - + target[i] = sq_dist; } } diff --git a/volk/include/volk/volk_32i_s32f_convert_32f_a.h b/volk/include/volk/volk_32i_s32f_convert_32f_a.h index 558142869..8f4123d71 100644 --- a/volk/include/volk/volk_32i_s32f_convert_32f_a.h +++ b/volk/include/volk/volk_32i_s32f_convert_32f_a.h @@ -17,7 +17,7 @@ static inline void volk_32i_s32f_convert_32f_a_sse2(float* outputVector, const int32_t* inputVector, const float scalar, unsigned int num_points){ unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; - + float* outputVectorPtr = outputVector; const float iScalar = 1.0 / scalar; __m128 invScalar = _mm_set_ps1(iScalar); diff --git a/volk/include/volk/volk_32i_s32f_convert_32f_u.h b/volk/include/volk/volk_32i_s32f_convert_32f_u.h index d8afd218c..b3a8ab201 100644 --- a/volk/include/volk/volk_32i_s32f_convert_32f_u.h +++ b/volk/include/volk/volk_32i_s32f_convert_32f_u.h @@ -18,7 +18,7 @@ static inline void volk_32i_s32f_convert_32f_u_sse2(float* outputVector, const int32_t* inputVector, const float scalar, unsigned int num_points){ unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; - + float* outputVectorPtr = outputVector; const float iScalar = 1.0 / scalar; __m128 invScalar = _mm_set_ps1(iScalar); diff --git a/volk/include/volk/volk_32i_x2_and_32i_a.h b/volk/include/volk/volk_32i_x2_and_32i_a.h index dcd63d98e..e5330847b 100644 --- a/volk/include/volk/volk_32i_x2_and_32i_a.h +++ b/volk/include/volk/volk_32i_x2_and_32i_a.h @@ -23,12 +23,12 @@ static inline void volk_32i_x2_and_32i_a_sse(int32_t* cVector, const int32_t* aV __m128 aVal, bVal, cVal; for(;number < quarterPoints; number++){ - - aVal = _mm_load_ps(aPtr); + + aVal = _mm_load_ps(aPtr); bVal = _mm_load_ps(bPtr); - - cVal = _mm_and_ps(aVal, bVal); - + + cVal = _mm_and_ps(aVal, bVal); + _mm_store_ps(cPtr,cVal); // Store the results back into the C container aPtr += 4; diff --git a/volk/include/volk/volk_32i_x2_or_32i_a.h b/volk/include/volk/volk_32i_x2_or_32i_a.h index 243e8178c..24045894c 100644 --- a/volk/include/volk/volk_32i_x2_or_32i_a.h +++ b/volk/include/volk/volk_32i_x2_or_32i_a.h @@ -23,12 +23,12 @@ static inline void volk_32i_x2_or_32i_a_sse(int32_t* cVector, const int32_t* aVe __m128 aVal, bVal, cVal; for(;number < quarterPoints; number++){ - - aVal = _mm_load_ps(aPtr); + + aVal = _mm_load_ps(aPtr); bVal = _mm_load_ps(bPtr); - - cVal = _mm_or_ps(aVal, bVal); - + + cVal = _mm_or_ps(aVal, bVal); + _mm_store_ps(cPtr,cVal); // Store the results back into the C container aPtr += 4; diff --git a/volk/include/volk/volk_32u_byteswap_a.h b/volk/include/volk/volk_32u_byteswap_a.h index b88848096..71ae027d3 100644 --- a/volk/include/volk/volk_32u_byteswap_a.h +++ b/volk/include/volk/volk_32u_byteswap_a.h @@ -39,9 +39,9 @@ static inline void volk_32u_byteswap_a_sse2(uint32_t* intsToSwap, unsigned int n _mm_store_si128((__m128i*)inputPtr, output); inputPtr += 4; } - + // Byteswap any remaining points: - number = quarterPoints*4; + number = quarterPoints*4; for(; number < num_points; number++){ uint32_t outputVal = *inputPtr; outputVal = (((outputVal >> 24) & 0xff) | ((outputVal >> 8) & 0x0000ff00) | ((outputVal << 8) & 0x00ff0000) | ((outputVal << 24) & 0xff000000)); @@ -64,7 +64,7 @@ static inline void volk_32u_byteswap_a_generic(uint32_t* intsToSwap, unsigned in for(point = 0; point < num_points; point++){ uint32_t output = *inputPtr; output = (((output >> 24) & 0xff) | ((output >> 8) & 0x0000ff00) | ((output << 8) & 0x00ff0000) | ((output << 24) & 0xff000000)); - + *inputPtr = output; inputPtr++; } diff --git a/volk/include/volk/volk_64f_convert_32f_a.h b/volk/include/volk/volk_64f_convert_32f_a.h index 2126e4f95..11d51702b 100644 --- a/volk/include/volk/volk_64f_convert_32f_a.h +++ b/volk/include/volk/volk_64f_convert_32f_a.h @@ -16,7 +16,7 @@ static inline void volk_64f_convert_32f_a_sse2(float* outputVector, const double unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; - + const double* inputVectorPtr = (const double*)inputVector; float* outputVectorPtr = outputVector; __m128 ret, ret2; @@ -25,7 +25,7 @@ static inline void volk_64f_convert_32f_a_sse2(float* outputVector, const double for(;number < quarterPoints; number++){ inputVal1 = _mm_load_pd(inputVectorPtr); inputVectorPtr += 2; inputVal2 = _mm_load_pd(inputVectorPtr); inputVectorPtr += 2; - + ret = _mm_cvtpd_ps(inputVal1); ret2 = _mm_cvtpd_ps(inputVal2); @@ -35,7 +35,7 @@ static inline void volk_64f_convert_32f_a_sse2(float* outputVector, const double outputVectorPtr += 4; } - number = quarterPoints * 4; + number = quarterPoints * 4; for(; number < num_points; number++){ outputVector[number] = (float)(inputVector[number]); } diff --git a/volk/include/volk/volk_64f_convert_32f_u.h b/volk/include/volk/volk_64f_convert_32f_u.h index 5c323230a..31dc5b5fe 100644 --- a/volk/include/volk/volk_64f_convert_32f_u.h +++ b/volk/include/volk/volk_64f_convert_32f_u.h @@ -16,7 +16,7 @@ static inline void volk_64f_convert_32f_u_sse2(float* outputVector, const double unsigned int number = 0; const unsigned int quarterPoints = num_points / 4; - + const double* inputVectorPtr = (const double*)inputVector; float* outputVectorPtr = outputVector; __m128 ret, ret2; @@ -25,7 +25,7 @@ static inline void volk_64f_convert_32f_u_sse2(float* outputVector, const double for(;number < quarterPoints; number++){ inputVal1 = _mm_loadu_pd(inputVectorPtr); inputVectorPtr += 2; inputVal2 = _mm_loadu_pd(inputVectorPtr); inputVectorPtr += 2; - + ret = _mm_cvtpd_ps(inputVal1); ret2 = _mm_cvtpd_ps(inputVal2); @@ -35,7 +35,7 @@ static inline void volk_64f_convert_32f_u_sse2(float* outputVector, const double outputVectorPtr += 4; } - number = quarterPoints * 4; + number = quarterPoints * 4; for(; number < num_points; number++){ outputVector[number] = (float)(inputVector[number]); } diff --git a/volk/include/volk/volk_64f_x2_max_64f_a.h b/volk/include/volk/volk_64f_x2_max_64f_a.h index 61a704c52..33aae6d10 100644 --- a/volk/include/volk/volk_64f_x2_max_64f_a.h +++ b/volk/include/volk/volk_64f_x2_max_64f_a.h @@ -23,12 +23,12 @@ static inline void volk_64f_x2_max_64f_a_sse2(double* cVector, const double* aVe __m128d aVal, bVal, cVal; for(;number < halfPoints; number++){ - - aVal = _mm_load_pd(aPtr); + + aVal = _mm_load_pd(aPtr); bVal = _mm_load_pd(bPtr); - - cVal = _mm_max_pd(aVal, bVal); - + + cVal = _mm_max_pd(aVal, bVal); + _mm_store_pd(cPtr,cVal); // Store the results back into the C container aPtr += 2; diff --git a/volk/include/volk/volk_64f_x2_min_64f_a.h b/volk/include/volk/volk_64f_x2_min_64f_a.h index 148b72c59..25d8b4c98 100644 --- a/volk/include/volk/volk_64f_x2_min_64f_a.h +++ b/volk/include/volk/volk_64f_x2_min_64f_a.h @@ -23,12 +23,12 @@ static inline void volk_64f_x2_min_64f_a_sse2(double* cVector, const double* aVe __m128d aVal, bVal, cVal; for(;number < halfPoints; number++){ - - aVal = _mm_load_pd(aPtr); + + aVal = _mm_load_pd(aPtr); bVal = _mm_load_pd(bPtr); - - cVal = _mm_min_pd(aVal, bVal); - + + cVal = _mm_min_pd(aVal, bVal); + _mm_store_pd(cPtr,cVal); // Store the results back into the C container aPtr += 2; diff --git a/volk/include/volk/volk_64u_byteswap_a.h b/volk/include/volk/volk_64u_byteswap_a.h index d4fc74a6e..3d1d87623 100644 --- a/volk/include/volk/volk_64u_byteswap_a.h +++ b/volk/include/volk/volk_64u_byteswap_a.h @@ -34,7 +34,7 @@ static inline void volk_64u_byteswap_a_sse2(uint64_t* intsToSwap, unsigned int n output = _mm_or_si128(output, byte2); byte3 = _mm_and_si128(byte3, byte3mask); output = _mm_or_si128(output, byte3); - + // Reorder the two words output = _mm_shuffle_epi32(output, _MM_SHUFFLE(2, 3, 0, 1)); @@ -42,17 +42,17 @@ static inline void volk_64u_byteswap_a_sse2(uint64_t* intsToSwap, unsigned int n _mm_store_si128((__m128i*)inputPtr, output); inputPtr += 4; } - + // Byteswap any remaining points: - number = halfPoints*2; + number = halfPoints*2; for(; number < num_points; number++){ uint32_t output1 = *inputPtr; uint32_t output2 = inputPtr[1]; - + output1 = (((output1 >> 24) & 0xff) | ((output1 >> 8) & 0x0000ff00) | ((output1 << 8) & 0x00ff0000) | ((output1 << 24) & 0xff000000)); - + output2 = (((output2 >> 24) & 0xff) | ((output2 >> 8) & 0x0000ff00) | ((output2 << 8) & 0x00ff0000) | ((output2 << 24) & 0xff000000)); - + *inputPtr++ = output2; *inputPtr++ = output1; } @@ -71,11 +71,11 @@ static inline void volk_64u_byteswap_a_generic(uint64_t* intsToSwap, unsigned in for(point = 0; point < num_points; point++){ uint32_t output1 = *inputPtr; uint32_t output2 = inputPtr[1]; - + output1 = (((output1 >> 24) & 0xff) | ((output1 >> 8) & 0x0000ff00) | ((output1 << 8) & 0x00ff0000) | ((output1 << 24) & 0xff000000)); - + output2 = (((output2 >> 24) & 0xff) | ((output2 >> 8) & 0x0000ff00) | ((output2 << 8) & 0x00ff0000) | ((output2 << 24) & 0xff000000)); - + *inputPtr++ = output2; *inputPtr++ = output1; } diff --git a/volk/include/volk/volk_64u_popcnt_a.h b/volk/include/volk/volk_64u_popcnt_a.h index 4683f1e38..7d7359ccf 100644 --- a/volk/include/volk/volk_64u_popcnt_a.h +++ b/volk/include/volk/volk_64u_popcnt_a.h @@ -11,7 +11,7 @@ static inline void volk_64u_popcnt_a_generic(uint64_t* ret, const uint64_t value) { //const uint32_t* valueVector = (const uint32_t*)&value; - + // This is faster than a lookup table //uint32_t retVal = valueVector[0]; uint32_t retVal = (uint32_t)(value && 0x00000000FFFFFFFF); diff --git a/volk/include/volk/volk_8i_s32f_convert_32f_a.h b/volk/include/volk/volk_8i_s32f_convert_32f_a.h index 7f2623ac6..02a7f356e 100644 --- a/volk/include/volk/volk_8i_s32f_convert_32f_a.h +++ b/volk/include/volk/volk_8i_s32f_convert_32f_a.h @@ -17,7 +17,7 @@ static inline void volk_8i_s32f_convert_32f_a_sse4_1(float* outputVector, const int8_t* inputVector, const float scalar, unsigned int num_points){ unsigned int number = 0; const unsigned int sixteenthPoints = num_points / 16; - + float* outputVectorPtr = outputVector; const float iScalar = 1.0 / scalar; __m128 invScalar = _mm_set_ps1(iScalar); diff --git a/volk/include/volk/volk_8i_s32f_convert_32f_u.h b/volk/include/volk/volk_8i_s32f_convert_32f_u.h index 3cd6bb67c..8bb2c0d1a 100644 --- a/volk/include/volk/volk_8i_s32f_convert_32f_u.h +++ b/volk/include/volk/volk_8i_s32f_convert_32f_u.h @@ -18,7 +18,7 @@ static inline void volk_8i_s32f_convert_32f_u_sse4_1(float* outputVector, const int8_t* inputVector, const float scalar, unsigned int num_points){ unsigned int number = 0; const unsigned int sixteenthPoints = num_points / 16; - + float* outputVectorPtr = outputVector; const float iScalar = 1.0 / scalar; __m128 invScalar = _mm_set_ps1( iScalar ); diff --git a/volk/include/volk/volk_8ic_s32f_deinterleave_32f_x2_a.h b/volk/include/volk/volk_8ic_s32f_deinterleave_32f_x2_a.h index b723c6f8b..d82da59fb 100644 --- a/volk/include/volk/volk_8ic_s32f_deinterleave_32f_x2_a.h +++ b/volk/include/volk/volk_8ic_s32f_deinterleave_32f_x2_a.h @@ -20,7 +20,7 @@ static inline void volk_8ic_s32f_deinterleave_32f_x2_a_sse4_1(float* iBuffer, fl float* qBufferPtr = qBuffer; unsigned int number = 0; - const unsigned int eighthPoints = num_points / 8; + const unsigned int eighthPoints = num_points / 8; __m128 iFloatValue, qFloatValue; const float iScalar= 1.0 / scalar; @@ -71,7 +71,7 @@ static inline void volk_8ic_s32f_deinterleave_32f_x2_a_sse4_1(float* iBuffer, fl *iBufferPtr++ = (float)(*complexVectorPtr++) * iScalar; *qBufferPtr++ = (float)(*complexVectorPtr++) * iScalar; } - + } #endif /* LV_HAVE_SSE4_1 */ @@ -90,7 +90,7 @@ static inline void volk_8ic_s32f_deinterleave_32f_x2_a_sse(float* iBuffer, float float* qBufferPtr = qBuffer; unsigned int number = 0; - const unsigned int quarterPoints = num_points / 4; + const unsigned int quarterPoints = num_points / 4; __m128 cplxValue1, cplxValue2, iValue, qValue; __m128 invScalar = _mm_set_ps1(1.0/scalar); @@ -103,7 +103,7 @@ static inline void volk_8ic_s32f_deinterleave_32f_x2_a_sse(float* iBuffer, float floatBuffer[1] = (float)(complexVectorPtr[1]); floatBuffer[2] = (float)(complexVectorPtr[2]); floatBuffer[3] = (float)(complexVectorPtr[3]); - + floatBuffer[4] = (float)(complexVectorPtr[4]); floatBuffer[5] = (float)(complexVectorPtr[5]); floatBuffer[6] = (float)(complexVectorPtr[6]); diff --git a/volk/include/volk/volk_8ic_s32f_deinterleave_real_32f_a.h b/volk/include/volk/volk_8ic_s32f_deinterleave_real_32f_a.h index 74073f5a6..b2c15d3a3 100644 --- a/volk/include/volk/volk_8ic_s32f_deinterleave_real_32f_a.h +++ b/volk/include/volk/volk_8ic_s32f_deinterleave_real_32f_a.h @@ -18,7 +18,7 @@ static inline void volk_8ic_s32f_deinterleave_real_32f_a_sse4_1(float* iBuffer, float* iBufferPtr = iBuffer; unsigned int number = 0; - const unsigned int eighthPoints = num_points / 8; + const unsigned int eighthPoints = num_points / 8; __m128 iFloatValue; const float iScalar= 1.0 / scalar; @@ -57,7 +57,7 @@ static inline void volk_8ic_s32f_deinterleave_real_32f_a_sse4_1(float* iBuffer, *iBufferPtr++ = (float)(*complexVectorPtr++) * iScalar; complexVectorPtr++; } - + } #endif /* LV_HAVE_SSE4_1 */ @@ -75,7 +75,7 @@ static inline void volk_8ic_s32f_deinterleave_real_32f_a_sse(float* iBuffer, con float* iBufferPtr = iBuffer; unsigned int number = 0; - const unsigned int quarterPoints = num_points / 4; + const unsigned int quarterPoints = num_points / 4; __m128 iValue; const float iScalar= 1.0 / scalar; @@ -88,7 +88,7 @@ static inline void volk_8ic_s32f_deinterleave_real_32f_a_sse(float* iBuffer, con floatBuffer[0] = (float)(*complexVectorPtr); complexVectorPtr += 2; floatBuffer[1] = (float)(*complexVectorPtr); complexVectorPtr += 2; floatBuffer[2] = (float)(*complexVectorPtr); complexVectorPtr += 2; - floatBuffer[3] = (float)(*complexVectorPtr); complexVectorPtr += 2; + floatBuffer[3] = (float)(*complexVectorPtr); complexVectorPtr += 2; iValue = _mm_load_ps(floatBuffer); @@ -104,7 +104,7 @@ static inline void volk_8ic_s32f_deinterleave_real_32f_a_sse(float* iBuffer, con *iBufferPtr++ = (float)(*complexVectorPtr++) * iScalar; complexVectorPtr++; } - + } #endif /* LV_HAVE_SSE */ diff --git a/volk/include/volk/volk_8ic_x2_multiply_conjugate_16ic_a.h b/volk/include/volk/volk_8ic_x2_multiply_conjugate_16ic_a.h index 0c280eb6e..f85fdb999 100644 --- a/volk/include/volk/volk_8ic_x2_multiply_conjugate_16ic_a.h +++ b/volk/include/volk/volk_8ic_x2_multiply_conjugate_16ic_a.h @@ -23,15 +23,15 @@ static inline void volk_8ic_x2_multiply_conjugate_16ic_a_sse4_1(lv_16sc_t* cVect const lv_8sc_t* a = aVector; const lv_8sc_t* b = bVector; __m128i conjugateSign = _mm_set_epi16(-1, 1, -1, 1, -1, 1, -1, 1); - + for(;number < quarterPoints; number++){ // Convert into 8 bit values into 16 bit values x = _mm_cvtepi8_epi16(_mm_loadl_epi64((__m128i*)a)); y = _mm_cvtepi8_epi16(_mm_loadl_epi64((__m128i*)b)); - + // Calculate the ar*cr - ai*(-ci) portions realz = _mm_madd_epi16(x,y); - + // Calculate the complex conjugate of the cr + ci j values y = _mm_sign_epi16(y, conjugateSign); @@ -47,7 +47,7 @@ static inline void volk_8ic_x2_multiply_conjugate_16ic_a_sse4_1(lv_16sc_t* cVect b += 4; c += 4; } - + number = quarterPoints * 4; int16_t* c16Ptr = (int16_t*)&cVector[number]; int8_t* a8Ptr = (int8_t*)&aVector[number]; diff --git a/volk/include/volk/volk_8ic_x2_s32f_multiply_conjugate_32fc_a.h b/volk/include/volk/volk_8ic_x2_s32f_multiply_conjugate_32fc_a.h index a2c2b04f6..4b16171ce 100644 --- a/volk/include/volk/volk_8ic_x2_s32f_multiply_conjugate_32fc_a.h +++ b/volk/include/volk/volk_8ic_x2_s32f_multiply_conjugate_32fc_a.h @@ -80,7 +80,7 @@ static inline void volk_8ic_x2_s32f_multiply_conjugate_32fc_a_sse4_1(lv_32fc_t* float bImag = (float)*b8Ptr++; lv_32fc_t bVal = lv_cmake( bReal, -bImag ); lv_32fc_t temp = aVal * bVal; - + *cFloatPtr++ = lv_creal(temp) / scalar; *cFloatPtr++ = lv_cimag(temp) / scalar; } @@ -109,7 +109,7 @@ static inline void volk_8ic_x2_s32f_multiply_conjugate_32fc_a_generic(lv_32fc_t* float bImag = (float)*b8Ptr++; lv_32fc_t bVal = lv_cmake( bReal, -bImag ); lv_32fc_t temp = aVal * bVal; - + *cPtr++ = (lv_creal(temp) * invScalar); *cPtr++ = (lv_cimag(temp) * invScalar); } diff --git a/volk/lib/.gitignore b/volk/lib/.gitignore deleted file mode 100644 index 28ec6ddaa..000000000 --- a/volk/lib/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/Makefile -/Makefile.in -/Makefile.am -/testqa diff --git a/volk/lib/gcc_x86_cpuid.h b/volk/lib/gcc_x86_cpuid.h index 2345ed213..af2e7f2b4 100644 --- a/volk/lib/gcc_x86_cpuid.h +++ b/volk/lib/gcc_x86_cpuid.h @@ -5,16 +5,16 @@ * 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. - * + * * This file 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. - * + * * Under Section 7 of GPL version 3, you are granted additional * permissions described in the GCC Runtime Library Exception, version * 3.1, as published by the Free Software Foundation. - * + * * You should have received a copy of the GNU General Public License and * a copy of the GCC Runtime Library Exception along with this program; * see the files COPYING3 and COPYING.RUNTIME respectively. If not, see diff --git a/volk/lib/qa_16s_add_quad_aligned16.cc b/volk/lib/qa_16s_add_quad_aligned16.cc index 5d5eb7e18..8da43b972 100644 --- a/volk/lib/qa_16s_add_quad_aligned16.cc +++ b/volk/lib/qa_16s_add_quad_aligned16.cc @@ -16,7 +16,7 @@ void qa_16s_add_quad_aligned16::t1() { void qa_16s_add_quad_aligned16::t1() { - + volk_environment_init(); clock_t start, end; double total; @@ -27,7 +27,7 @@ void qa_16s_add_quad_aligned16::t1() { __VOLK_ATTR_ALIGNED(16) short input2[vlen]; __VOLK_ATTR_ALIGNED(16) short input3[vlen]; __VOLK_ATTR_ALIGNED(16) short input4[vlen]; - + __VOLK_ATTR_ALIGNED(16) short output0[vlen]; __VOLK_ATTR_ALIGNED(16) short output1[vlen]; __VOLK_ATTR_ALIGNED(16) short output2[vlen]; @@ -48,13 +48,13 @@ void qa_16s_add_quad_aligned16::t1() { short minus3 = ((short) (rand() - (RAND_MAX/2))) >> 2; short plus4 = ((short) (rand() - (RAND_MAX/2))) >> 2; short minus4 = ((short) (rand() - (RAND_MAX/2))) >> 2; - + input0[i] = plus0 - minus0; input1[i] = plus1 - minus1; input2[i] = plus2 - minus2; input3[i] = plus3 - minus3; input4[i] = plus4 - minus4; - + } printf("16s_add_quad_aligned\n"); @@ -76,7 +76,7 @@ void qa_16s_add_quad_aligned16::t1() { //printf("inputs: %d, %d\n", input0[i*2], input0[i*2 + 1]); //printf("generic... %d, ssse3... %d\n", output0[i], output1[i]); } - + for(int i = 0; i < vlen; ++i) { //printf("%d...%d\n", output0[i], output01[i]); CPPUNIT_ASSERT_EQUAL(output0[i], output01[i]); diff --git a/volk/lib/qa_16s_branch_4_state_8_aligned16.cc b/volk/lib/qa_16s_branch_4_state_8_aligned16.cc index 2e6e6a1a0..5a58569a1 100644 --- a/volk/lib/qa_16s_branch_4_state_8_aligned16.cc +++ b/volk/lib/qa_16s_branch_4_state_8_aligned16.cc @@ -22,17 +22,17 @@ void qa_16s_branch_4_state_8_aligned16::t1() { static char permute2[16]__attribute__((aligned(16))) = {0x02, 0x03, 0x06, 0x07, 0x08, 0x09, 0x0c, 0x0d, 0x00, 0x01, 0x04, 0x05, 0x0a, 0x0b, 0x0e, 0x0f}; static char permute3[16]__attribute__((aligned(16))) = {0x00, 0x01, 0x04, 0x05, 0x0a, 0x0b, 0x0e, 0x0f, 0x02, 0x03, 0x06, 0x07, 0x08, 0x09, 0x0c, 0x0d}; static char* permuters[4] = {permute0, permute1, permute2, permute3}; - + unsigned int num_bytes = vlen << 1; volk_environment_init(); clock_t start, end; double total; - + __VOLK_ATTR_ALIGNED(16) short target[vlen]; __VOLK_ATTR_ALIGNED(16) short target2[vlen]; __VOLK_ATTR_ALIGNED(16) short target3[vlen]; - + __VOLK_ATTR_ALIGNED(16) short src0[vlen]; __VOLK_ATTR_ALIGNED(16) short permute_indexes[vlen] = { 7, 5, 2, 0, 6, 4, 3, 1, 6, 4, 3, 1, 7, 5, 2, 0, 1, 3, 4, 6, 0, 2, 5, 7, 0, 2, 5, 7, 1, 3, 4, 6 }; @@ -45,29 +45,29 @@ void qa_16s_branch_4_state_8_aligned16::t1() { __VOLK_ATTR_ALIGNED(16) short cntl3[vlen] = { 0xffff, 0xffff, 0x0000, 0x0000, 0xffff, 0xffff, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0x0000, 0x0000, 0xffff, 0xffff, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0x0000, 0x0000, 0xffff, 0xffff }; __VOLK_ATTR_ALIGNED(16) short scalars[4] = {1, 2, 3, 4}; - - + + for(int i = 0; i < vlen; ++i) { src0[i] = i; - + } - + printf("16s_branch_4_state_8_aligned\n"); - - + + start = clock(); for(int i = 0; i < num_iters; ++i) { volk_16s_permute_and_scalar_add_aligned16_manual(target, src0, permute_indexes, cntl0, cntl1, cntl2, cntl3, scalars, num_bytes, "sse2"); } end = clock(); - + total = (double)(end-start)/(double)CLOCKS_PER_SEC; printf("permute_and_scalar_add_time: %f\n", total); - - + + start = clock(); for(int i = 0; i < num_iters; ++i) { @@ -78,25 +78,25 @@ void qa_16s_branch_4_state_8_aligned16::t1() { total = (double)(end-start)/(double)CLOCKS_PER_SEC; printf("branch_4_state_8_time, ssse3: %f\n", total); - + start = clock(); for(int i = 0; i < num_iters; ++i) { volk_16s_branch_4_state_8_aligned16_manual(target3, src0, permuters, cntl2, cntl3, scalars, "generic"); } end = clock(); - + total = (double)(end-start)/(double)CLOCKS_PER_SEC; printf("permute_and_scalar_add_time, generic: %f\n", total); - - - + + + for(int i = 0; i < vlen; ++i) { printf("psa... %d, b4s8... %d\n", target[i], target3[i]); } - + for(int i = 0; i < vlen; ++i) { - + CPPUNIT_ASSERT(target[i] == target2[i]); CPPUNIT_ASSERT(target[i] == target3[i]); } diff --git a/volk/lib/qa_16s_permute_and_scalar_add_aligned16.cc b/volk/lib/qa_16s_permute_and_scalar_add_aligned16.cc index 3cd4e906d..dadd2c580 100644 --- a/volk/lib/qa_16s_permute_and_scalar_add_aligned16.cc +++ b/volk/lib/qa_16s_permute_and_scalar_add_aligned16.cc @@ -16,13 +16,13 @@ void qa_16s_permute_and_scalar_add_aligned16::t1() { void qa_16s_permute_and_scalar_add_aligned16::t1() { const int vlen = 64; - + unsigned int num_bytes = vlen << 1; volk_environment_init(); clock_t start, end; double total; - + __VOLK_ATTR_ALIGNED(16) short target[vlen]; __VOLK_ATTR_ALIGNED(16) short target2[vlen]; __VOLK_ATTR_ALIGNED(16) short src0[vlen]; @@ -43,7 +43,7 @@ void qa_16s_permute_and_scalar_add_aligned16::t1() { } printf("16s_permute_and_scalar_add_aligned\n"); - + start = clock(); for(int i = 0; i < 100000; ++i) { volk_16s_permute_and_scalar_add_aligned16_manual(target, src0, permute_indexes, cntl0, cntl1, cntl2, cntl3, scalars, num_bytes, "generic"); @@ -53,24 +53,24 @@ void qa_16s_permute_and_scalar_add_aligned16::t1() { total = (double)(end-start)/(double)CLOCKS_PER_SEC; printf("generic_time: %f\n", total); - + start = clock(); for(int i = 0; i < 100000; ++i) { volk_16s_permute_and_scalar_add_aligned16_manual(target2, src0, permute_indexes, cntl0, cntl1, cntl2, cntl3, scalars, num_bytes, "sse2"); } end = clock(); - + total = (double)(end-start)/(double)CLOCKS_PER_SEC; printf("sse2_time: %f\n", total); - - + + for(int i = 0; i < vlen; ++i) { //printf("generic... %d, sse2... %d\n", target[i], target2[i]); } - + for(int i = 0; i < vlen; ++i) { - + CPPUNIT_ASSERT(target[i] == target2[i]); } } diff --git a/volk/lib/qa_16s_quad_max_star_aligned16.cc b/volk/lib/qa_16s_quad_max_star_aligned16.cc index 192a69e35..2a5dec44a 100644 --- a/volk/lib/qa_16s_quad_max_star_aligned16.cc +++ b/volk/lib/qa_16s_quad_max_star_aligned16.cc @@ -16,7 +16,7 @@ void qa_16s_quad_max_star_aligned16::t1() { void qa_16s_quad_max_star_aligned16::t1() { const int vlen = 34; - + __VOLK_ATTR_ALIGNED(16) short input0[vlen]; __VOLK_ATTR_ALIGNED(16) short input1[vlen]; __VOLK_ATTR_ALIGNED(16) short input2[vlen]; @@ -50,9 +50,9 @@ void qa_16s_quad_max_star_aligned16::t1() { for(int i = 0; i < vlen; ++i) { printf("generic... %d, sse2... %d, inputs: %d, %d, %d, %d\n", output0[i], output1[i], input0[i], input1[i], input2[i], input3[i]); } - + for(int i = 0; i < vlen; ++i) { - + CPPUNIT_ASSERT_EQUAL(output0[i], output1[i]); } } diff --git a/volk/lib/qa_32f_fm_detect_aligned16.cc b/volk/lib/qa_32f_fm_detect_aligned16.cc index a2e7a85be..4e792ec6c 100644 --- a/volk/lib/qa_32f_fm_detect_aligned16.cc +++ b/volk/lib/qa_32f_fm_detect_aligned16.cc @@ -15,18 +15,18 @@ void qa_32f_fm_detect_aligned16::t1() { #else void qa_32f_fm_detect_aligned16::t1() { - + volk_environment_init(); clock_t start, end; double total; const int vlen = 3201; const int ITERS = 10000; __VOLK_ATTR_ALIGNED(16) float input0[vlen]; - + __VOLK_ATTR_ALIGNED(16) float output0[vlen]; __VOLK_ATTR_ALIGNED(16) float output01[vlen]; - for(int i = 0; i < vlen; ++i) { + for(int i = 0; i < vlen; ++i) { input0[i] = ((float) (rand() - (RAND_MAX/2))) / static_cast<float>((RAND_MAX/2)); } printf("32f_fm_detect_aligned\n"); @@ -51,7 +51,7 @@ void qa_32f_fm_detect_aligned16::t1() { //printf("inputs: %d, %d\n", input0[i*2], input0[i*2 + 1]); //printf("generic... %d, ssse3... %d\n", output0[i], output1[i]); } - + for(int i = 0; i < vlen; ++i) { //printf("%d...%d\n", output0[i], output01[i]); CPPUNIT_ASSERT_DOUBLES_EQUAL(output0[i], output01[i], fabs(output0[i]) * 1e-4); diff --git a/volk/lib/qa_32f_index_max_aligned16.cc b/volk/lib/qa_32f_index_max_aligned16.cc index a1c3d4cd1..2df206726 100644 --- a/volk/lib/qa_32f_index_max_aligned16.cc +++ b/volk/lib/qa_32f_index_max_aligned16.cc @@ -34,12 +34,12 @@ void qa_32f_index_max_aligned16::t1(){ void qa_32f_index_max_aligned16::t1(){ - + const int vlen = VEC_LEN; - + volk_runtime_init(); - + volk_environment_init(); int ret; @@ -47,8 +47,8 @@ void qa_32f_index_max_aligned16::t1(){ unsigned int* target_sse; unsigned int* target_generic; float* src0 ; - - + + unsigned int i_target_sse4_1; target_sse4_1 = &i_target_sse4_1; unsigned int i_target_sse; @@ -57,20 +57,20 @@ void qa_32f_index_max_aligned16::t1(){ target_generic = &i_target_generic; ret = posix_memalign((void**)&src0, 16, vlen *sizeof(float)); - + random_floats((float*)src0, vlen); - + printf("32f_index_max_aligned16\n"); clock_t start, end; double total; - - + + start = clock(); for(int k = 0; k < NUM_ITERS; ++k) { volk_32f_index_max_aligned16_manual(target_generic, src0, vlen, "generic"); } - end = clock(); + end = clock(); total = (double)(end-start)/(double)CLOCKS_PER_SEC; printf("generic time: %f\n", total); @@ -78,25 +78,25 @@ void qa_32f_index_max_aligned16::t1(){ for(int k = 0; k < NUM_ITERS; ++k) { volk_32f_index_max_aligned16_manual(target_sse, src0, vlen, "sse2"); } - - end = clock(); + + end = clock(); total = (double)(end-start)/(double)CLOCKS_PER_SEC; printf("sse time: %f\n", total); - + start = clock(); for(int k = 0; k < NUM_ITERS; ++k) { get_volk_runtime()->volk_32f_index_max_aligned16(target_sse4_1, src0, vlen); } - - end = clock(); + + end = clock(); total = (double)(end-start)/(double)CLOCKS_PER_SEC; printf("sse4.1 time: %f\n", total); - - + + printf("generic: %u, sse: %u, sse4.1: %u\n", target_generic[0], target_sse[0], target_sse4_1[0]); CPPUNIT_ASSERT_EQUAL(target_generic[0], target_sse[0]); CPPUNIT_ASSERT_EQUAL(target_generic[0], target_sse4_1[0]); - + free(src0); } diff --git a/volk/lib/qa_32fc_index_max_aligned16.cc b/volk/lib/qa_32fc_index_max_aligned16.cc index 4d83f1639..3859bcb52 100644 --- a/volk/lib/qa_32fc_index_max_aligned16.cc +++ b/volk/lib/qa_32fc_index_max_aligned16.cc @@ -33,36 +33,36 @@ void qa_32fc_index_max_aligned16::t1(){ void qa_32fc_index_max_aligned16::t1(){ - + const int vlen = VEC_LEN; - + volk_environment_init(); int ret; - + unsigned int* target; unsigned int* target_generic; std::complex<float>* src0 ; - - + + unsigned int i_target; target = &i_target; unsigned int i_target_generic; target_generic = &i_target_generic; ret = posix_memalign((void**)&src0, 16, vlen << 3); - + random_floats((float*)src0, vlen * 2); - + printf("32fc_index_max_aligned16\n"); clock_t start, end; double total; - - + + start = clock(); for(int k = 0; k < NUM_ITERS; ++k) { volk_32fc_index_max_aligned16_manual(target_generic, src0, vlen << 3, "generic"); } - end = clock(); + end = clock(); total = (double)(end-start)/(double)CLOCKS_PER_SEC; printf("generic time: %f\n", total); @@ -70,19 +70,19 @@ void qa_32fc_index_max_aligned16::t1(){ for(int k = 0; k < NUM_ITERS; ++k) { volk_32fc_index_max_aligned16_manual(target, src0, vlen << 3, "sse3"); } - - end = clock(); + + end = clock(); total = (double)(end-start)/(double)CLOCKS_PER_SEC; printf("sse3 time: %f\n", total); - - - + + + printf("generic: %u, sse3: %u\n", target_generic[0], target[0]); CPPUNIT_ASSERT_DOUBLES_EQUAL(target_generic[0], target[0], 1.1); - - + + free(src0); } diff --git a/volk/lib/qa_32fc_power_spectral_density_32f_aligned16.cc b/volk/lib/qa_32fc_power_spectral_density_32f_aligned16.cc index 981bb19e6..daca31d9c 100644 --- a/volk/lib/qa_32fc_power_spectral_density_32f_aligned16.cc +++ b/volk/lib/qa_32fc_power_spectral_density_32f_aligned16.cc @@ -15,14 +15,14 @@ void qa_32fc_power_spectral_density_32f_aligned16::t1() { #else void qa_32fc_power_spectral_density_32f_aligned16::t1() { - + volk_environment_init(); clock_t start, end; double total; const int vlen = 3201; const int ITERS = 10000; __VOLK_ATTR_ALIGNED(16) std::complex<float> input0[vlen]; - + __VOLK_ATTR_ALIGNED(16) float output_generic[vlen]; __VOLK_ATTR_ALIGNED(16) float output_sse3[vlen]; @@ -30,7 +30,7 @@ void qa_32fc_power_spectral_density_32f_aligned16::t1() { const float rbw = 1.7; float* inputLoad = (float*)input0; - for(int i = 0; i < 2*vlen; ++i) { + for(int i = 0; i < 2*vlen; ++i) { inputLoad[i] = (((float) (rand() - (RAND_MAX/2))) / static_cast<float>((RAND_MAX/2))); } printf("32fc_power_spectral_density_32f_aligned\n"); @@ -54,7 +54,7 @@ void qa_32fc_power_spectral_density_32f_aligned16::t1() { //printf("inputs: %d, %d\n", input0[i*2], input0[i*2 + 1]); //printf("generic... %d, ssse3... %d\n", output0[i], output1[i]); } - + for(int i = 0; i < vlen; ++i) { //printf("%d...%d\n", output0[i], output01[i]); CPPUNIT_ASSERT_DOUBLES_EQUAL(output_generic[i], output_sse3[i], fabs(output_generic[i]*1e-4)); diff --git a/volk/lib/qa_32fc_x2_conjugate_dot_prod_32fc_u.cc b/volk/lib/qa_32fc_x2_conjugate_dot_prod_32fc_u.cc index fefdf06ee..b825c20e4 100644 --- a/volk/lib/qa_32fc_x2_conjugate_dot_prod_32fc_u.cc +++ b/volk/lib/qa_32fc_x2_conjugate_dot_prod_32fc_u.cc @@ -7,7 +7,7 @@ #define assertcomplexEqual(expected, actual, delta) \ CPPUNIT_ASSERT_DOUBLES_EQUAL (std::real(expected), std::real(actual), fabs(std::real(expected)) * delta); \ - CPPUNIT_ASSERT_DOUBLES_EQUAL (std::imag(expected), std::imag(actual), fabs(std::imag(expected))* delta); + CPPUNIT_ASSERT_DOUBLES_EQUAL (std::imag(expected), std::imag(actual), fabs(std::imag(expected))* delta); #define ERR_DELTA (1e-4) @@ -35,7 +35,7 @@ void qa_32fc_x2_conjugate_dot_prod_32fc_u::t1() { std::complex<float>* input; std::complex<float>* taps; - + std::complex<float>* result_generic; std::complex<float>* result; @@ -43,19 +43,19 @@ void qa_32fc_x2_conjugate_dot_prod_32fc_u::t1() { ret = posix_memalign((void**)&taps, 16, vlen << 3); ret = posix_memalign((void**)&result_generic, 16, 8); ret = posix_memalign((void**)&result, 16, 8); - + result_generic[0] = std::complex<float>(0,0); result[0] = std::complex<float>(0,0); random_floats((float*)input, vlen * 2); random_floats((float*)taps, vlen * 2); - - + + volk_32fc_x2_conjugate_dot_prod_32fc_u_manual(result_generic, input, taps, vlen * 8, "generic"); - + volk_32fc_x2_conjugate_dot_prod_32fc_u_manual(result, input, taps, vlen * 8, "sse"); printf("32fc_x2_conjugate_dot_prod_32fc_u\n"); @@ -67,7 +67,7 @@ void qa_32fc_x2_conjugate_dot_prod_32fc_u::t1() { free(taps); free(result_generic); free(result); - + } @@ -87,13 +87,13 @@ random_floats (float *buf, unsigned n) void qa_32fc_x2_conjugate_dot_prod_32fc_u::t1() { const int vlen = 789743; - + volk_environment_init(); int ret; std::complex<float>* input; std::complex<float>* taps; - + std::complex<float>* result_generic; std::complex<float>* result; @@ -101,19 +101,19 @@ void qa_32fc_x2_conjugate_dot_prod_32fc_u::t1() { ret = posix_memalign((void**)&taps, 16, vlen << 3); ret = posix_memalign((void**)&result_generic, 16, 8); ret = posix_memalign((void**)&result, 16, 8); - + result_generic[0] = std::complex<float>(0,0); result[0] = std::complex<float>(0,0); random_floats((float*)input, vlen * 2); random_floats((float*)taps, vlen * 2); - - + + volk_32fc_x2_conjugate_dot_prod_32fc_u_manual(result_generic, input, taps, vlen * 8, "generic"); - + volk_32fc_x2_conjugate_dot_prod_32fc_u_manual(result, input, taps, vlen * 8, "sse_32"); printf("32fc_x2_conjugate_dot_prod_32fc_u\n"); @@ -125,7 +125,7 @@ void qa_32fc_x2_conjugate_dot_prod_32fc_u::t1() { free(taps); free(result_generic); free(result); - + } diff --git a/volk/lib/qa_32u_popcnt_aligned16.cc b/volk/lib/qa_32u_popcnt_aligned16.cc index c880260f2..5559d933d 100644 --- a/volk/lib/qa_32u_popcnt_aligned16.cc +++ b/volk/lib/qa_32u_popcnt_aligned16.cc @@ -16,8 +16,8 @@ void qa_32u_popcnt_aligned16::t1() { #else void qa_32u_popcnt_aligned16::t1() { - - + + volk_runtime_init(); volk_environment_init(); @@ -26,7 +26,7 @@ void qa_32u_popcnt_aligned16::t1() { const int ITERS = 10000000; __VOLK_ATTR_ALIGNED(16) uint32_t input0; - + __VOLK_ATTR_ALIGNED(16) uint32_t output0; __VOLK_ATTR_ALIGNED(16) uint32_t output01; @@ -55,7 +55,7 @@ void qa_32u_popcnt_aligned16::t1() { total = (double)(end-start)/(double)CLOCKS_PER_SEC; printf("sse4.2_time: %f\n", total); - + CPPUNIT_ASSERT_EQUAL(output0, output01); } diff --git a/volk/lib/qa_64u_popcnt_aligned16.cc b/volk/lib/qa_64u_popcnt_aligned16.cc index 6be4e50ea..391601f22 100644 --- a/volk/lib/qa_64u_popcnt_aligned16.cc +++ b/volk/lib/qa_64u_popcnt_aligned16.cc @@ -16,8 +16,8 @@ void qa_64u_popcnt_aligned16::t1() { #else void qa_64u_popcnt_aligned16::t1() { - - + + volk_runtime_init(); volk_environment_init(); @@ -26,7 +26,7 @@ void qa_64u_popcnt_aligned16::t1() { const int ITERS = 10000000; __VOLK_ATTR_ALIGNED(16) uint64_t input0; - + __VOLK_ATTR_ALIGNED(16) uint64_t output0; __VOLK_ATTR_ALIGNED(16) uint64_t output01; @@ -55,7 +55,7 @@ void qa_64u_popcnt_aligned16::t1() { total = (double)(end-start)/(double)CLOCKS_PER_SEC; printf("sse4.2_time: %f\n", total); - + CPPUNIT_ASSERT_EQUAL(output0, output01); } diff --git a/volk/lib/qa_utils.cc b/volk/lib/qa_utils.cc index bb37801c9..c15979b3f 100644 --- a/volk/lib/qa_utils.cc +++ b/volk/lib/qa_utils.cc @@ -46,7 +46,7 @@ void load_random_data(void *data, volk_type_t type, unsigned int n) { case 4: if(type.is_signed) ((int32_t *)data)[i] = (int32_t) scaled_rand; else ((uint32_t *)data)[i] = (uint32_t) scaled_rand; - break; + break; case 2: if(type.is_signed) ((int16_t *)data)[i] = (int16_t) scaled_rand; else ((uint16_t *)data)[i] = (uint16_t) scaled_rand; @@ -69,7 +69,7 @@ static std::vector<std::string> get_arch_list(struct volk_func_desc desc) { //if(!(archs[i+1] & volk_get_lvarch())) continue; //this arch isn't available on this pc archlist.push_back(std::string(desc.indices[i])); } - + return archlist; } @@ -81,15 +81,15 @@ volk_type_t volk_type_from_string(std::string name) { type.is_signed = false; type.size = 0; type.str = name; - + if(name.size() < 2) throw std::string("name too short to be a datatype"); - + //is it a scalar? - if(name[0] == 's') { + if(name[0] == 's') { type.is_scalar = true; name = name.substr(1, name.size()-1); } - + //get the data size size_t last_size_pos = name.find_last_of("0123456789"); if(last_size_pos < 0) throw std::string("no size spec in type ").append(name); @@ -98,7 +98,7 @@ volk_type_t volk_type_from_string(std::string name) { assert(((size % 8) == 0) && (size <= 64) && (size != 0)); type.size = size/8; //in bytes - + for(size_t i=last_size_pos+1; i < name.size(); i++) { switch (name[i]) { case 'f': @@ -117,19 +117,19 @@ volk_type_t volk_type_from_string(std::string name) { throw; } } - + return type; } -static void get_signatures_from_name(std::vector<volk_type_t> &inputsig, - std::vector<volk_type_t> &outputsig, +static void get_signatures_from_name(std::vector<volk_type_t> &inputsig, + std::vector<volk_type_t> &outputsig, std::string name) { boost::char_separator<char> sep("_"); boost::tokenizer<boost::char_separator<char> > tok(name, sep); std::vector<std::string> toked; tok.assign(name); toked.assign(tok.begin(), tok.end()); - + assert(toked[0] == "volk"); toked.erase(toked.begin()); @@ -143,7 +143,7 @@ static void get_signatures_from_name(std::vector<volk_type_t> &inputsig, try { type = volk_type_from_string(token); if(side == SIDE_NAME) side = SIDE_OUTPUT; //if this is the first one after the name... - + if(side == SIDE_INPUT) inputsig.push_back(type); else outputsig.push_back(type); } catch (...){ @@ -160,7 +160,7 @@ static void get_signatures_from_name(std::vector<volk_type_t> &inputsig, side = SIDE_NAME; fn_name.append("_"); fn_name.append(token); - } + } else if(side == SIDE_OUTPUT) { if(token != toked.back()) throw; //the last token in the name is the alignment } @@ -223,7 +223,7 @@ bool fcompare(t *in1, t *in2, unsigned int vlen, float tol) { } } } - + return fail; } @@ -239,7 +239,7 @@ bool icompare(t *in1, t *in2, unsigned int vlen, unsigned int tol) { } } } - + return fail; } @@ -264,10 +264,10 @@ bool run_volk_tests(struct volk_func_desc desc, std::vector<std::string> *best_arch_vector = 0 ) { std::cout << "RUN_VOLK_TESTS: " << name << std::endl; - + //first let's get a list of available architectures for the test std::vector<std::string> arch_list = get_arch_list(desc); - + if(arch_list.size() < 2) { std::cout << "no architectures to test" << std::endl; return false; @@ -279,7 +279,7 @@ bool run_volk_tests(struct volk_func_desc desc, //now we have to get a function signature by parsing the name std::vector<volk_type_t> inputsig, outputsig; get_signatures_from_name(inputsig, outputsig, name); - + //pull the input scalars into their own vector std::vector<volk_type_t> inputsc; for(size_t i=0; i<inputsig.size(); i++) { @@ -299,7 +299,7 @@ bool run_volk_tests(struct volk_func_desc desc, for(size_t i=0; i<inbuffs.size(); i++) { load_random_data(inbuffs[i], inputsig[i], vlen); } - + //ok let's make a vector of vector of void buffers, which holds the input/output vectors for each arch std::vector<std::vector<void *> > test_data; for(size_t i=0; i<arch_list.size(); i++) { @@ -312,7 +312,7 @@ bool run_volk_tests(struct volk_func_desc desc, } test_data.push_back(arch_buffs); } - + std::vector<volk_type_t> both_sigs; both_sigs.insert(both_sigs.end(), outputsig.begin(), outputsig.end()); both_sigs.insert(both_sigs.end(), inputsig.begin(), inputsig.end()); @@ -326,7 +326,7 @@ bool run_volk_tests(struct volk_func_desc desc, switch(both_sigs.size()) { case 1: if(inputsc.size() == 0) { - run_cast_test1((volk_fn_1arg)(manual_func), test_data[i], vlen, iter, arch_list[i]); + run_cast_test1((volk_fn_1arg)(manual_func), test_data[i], vlen, iter, arch_list[i]); } else if(inputsc.size() == 1 && inputsc[0].is_float) { if(inputsc[0].is_complex) { run_cast_test1_s32fc((volk_fn_1arg_s32fc)(manual_func), test_data[i], scalar, vlen, iter, arch_list[i]); @@ -364,23 +364,23 @@ bool run_volk_tests(struct volk_func_desc desc, throw "no function handler for this signature"; break; } - + end = clock(); double arch_time = (double)(end-start)/(double)CLOCKS_PER_SEC; std::cout << arch_list[i] << " completed in " << arch_time << "s" << std::endl; profile_times.push_back(arch_time); } - + //and now compare each output to the generic output //first we have to know which output is the generic one, they aren't in order... size_t generic_offset=0; - for(size_t i=0; i<arch_list.size(); i++) + for(size_t i=0; i<arch_list.size(); i++) if(arch_list[i] == "generic") generic_offset=i; //now compare //if(outputsig.size() == 0) outputsig = inputsig; //a hack, i know - + bool fail = false; bool fail_global = false; std::vector<bool> arch_results; @@ -438,7 +438,7 @@ bool run_volk_tests(struct volk_func_desc desc, } arch_results.push_back(!fail); } - + double best_time = std::numeric_limits<double>::max(); std::string best_arch = "generic"; for(size_t i=0; i < arch_list.size(); i++) { @@ -447,7 +447,7 @@ bool run_volk_tests(struct volk_func_desc desc, best_arch = arch_list[i]; } } - + std::cout << "Best arch: " << best_arch << std::endl; if(best_arch_vector) { best_arch_vector->push_back(name + std::string(" ") + best_arch); diff --git a/volk/lib/volk_prefs.c b/volk/lib/volk_prefs.c index 7e705bed4..5e5c9dfff 100644 --- a/volk/lib/volk_prefs.c +++ b/volk/lib/volk_prefs.c @@ -26,7 +26,7 @@ int load_preferences(struct volk_arch_pref **prefs) { char path[512], line[512], function[128], arch[32]; int n_arch_prefs = 0; struct volk_arch_pref *t_pref; - + //get the config path get_config_path(path); if (path == NULL) return n_arch_prefs; //no prefs found diff --git a/volk/lib/volk_rank_archs.c b/volk/lib/volk_rank_archs.c index 4baa078bc..865d60955 100644 --- a/volk/lib/volk_rank_archs.c +++ b/volk/lib/volk_rank_archs.c @@ -26,14 +26,14 @@ unsigned int volk_rank_archs(const char *indices[], const int* arch_defs, unsign n_arch_prefs = load_preferences(&volk_arch_prefs); prefs_loaded = 1; } - + //now look for the function name in the prefs list for(i=0; i < n_arch_prefs; i++) { if(!strncmp(name, volk_arch_prefs[i].name, 128)) { //found it return get_index(indices, n_archs, volk_arch_prefs[i].arch); } } - + for(i=1; i < n_archs; ++i) { if((arch_defs[i]&(!arch)) == 0) { best_val = (arch_defs[i] > arch_defs[best_val + 1]) ? i-1 : best_val; diff --git a/volk/libvector_replace.sh b/volk/libvector_replace.sh index 4c7e33e1b..e1940c00f 100755 --- a/volk/libvector_replace.sh +++ b/volk/libvector_replace.sh @@ -2,8 +2,8 @@ cd $1 files=`ls` -for file in $files -do +for file in $files +do sed 's/libvector/volk/g' < $file > tempfile sed 's/LIBVECTOR/VOLK/g' < tempfile > $file done diff --git a/volk/msvc/inttypes.h b/volk/msvc/inttypes.h index 1c2baa82e..0a1b60fc1 100644 --- a/volk/msvc/inttypes.h +++ b/volk/msvc/inttypes.h @@ -1,32 +1,32 @@ // ISO C9x compliant inttypes.h for Microsoft Visual Studio -// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 -// +// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 +// // Copyright (c) 2006 Alexander Chemeris -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: -// +// // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. -// +// // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. -// +// // 3. The name of the author may be used to endorse or promote products // derived from this software without specific prior written permission. -// +// // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// 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. -// +// /////////////////////////////////////////////////////////////////////////////// #ifndef _MSC_VER // [ diff --git a/volk/msvc/stdint.h b/volk/msvc/stdint.h index ab6d37e11..108bc8982 100644 --- a/volk/msvc/stdint.h +++ b/volk/msvc/stdint.h @@ -1,32 +1,32 @@ // ISO C9x compliant stdint.h for Microsoft Visual Studio -// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 -// +// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 +// // Copyright (c) 2006-2008 Alexander Chemeris -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: -// +// // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. -// +// // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. -// +// // 3. The name of the author may be used to endorse or promote products // derived from this software without specific prior written permission. -// +// // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// 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. -// +// /////////////////////////////////////////////////////////////////////////////// #ifndef _MSC_VER // [ diff --git a/volk/orc/.gitignore b/volk/orc/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/volk/orc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/volk/orc/Makefile.am b/volk/orc/Makefile.am deleted file mode 100644 index fddcae372..000000000 --- a/volk/orc/Makefile.am +++ /dev/null @@ -1,57 +0,0 @@ -# -# 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 this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(ORC_CFLAGS) - -include $(top_srcdir)/Makefile.common -noinst_LTLIBRARIES = libvolk_orc.la -libvolk_orc_la_LDFLAGS = $(ORC_LDFLAGS) - -libvolk_orc_la_SOURCES = \ -volk_8i_convert_16i_a_orc_impl.orc \ -volk_8i_s32f_convert_32f_a_orc_impl.orc \ -volk_16u_byteswap_a_orc_impl.orc \ -volk_32i_x2_and_32i_a_orc_impl.orc \ -volk_32i_x2_or_32i_a_orc_impl.orc \ -volk_32f_x2_add_32f_a_orc_impl.orc \ -volk_32f_x2_subtract_32f_a_orc_impl.orc \ -volk_32f_x2_divide_32f_a_orc_impl.orc \ -volk_32f_x2_multiply_32f_a_orc_impl.orc \ -volk_32fc_x2_multiply_32fc_a_orc_impl.orc \ -volk_32fc_32f_multiply_32fc_a_orc_impl.orc \ -volk_32f_sqrt_32f_a_orc_impl.orc \ -volk_32f_x2_max_32f_a_orc_impl.orc \ -volk_32f_x2_min_32f_a_orc_impl.orc \ -volk_32f_s32f_normalize_a_orc_impl.orc \ -volk_32fc_magnitude_32f_a_orc_impl.orc \ -volk_32fc_s32f_magnitude_16i_a_orc_impl.orc \ -volk_16ic_magnitude_16i_a_orc_impl.orc \ -volk_16ic_deinterleave_16i_x2_a_orc_impl.orc \ -volk_16i_s32f_deinterleave_32f_x2_a_orc_impl.orc \ -volk_16ic_deinterleave_real_8i_a_orc_impl.orc \ -volk_32fc_s32fc_multiply_32fc_a_orc_impl.orc \ -volk_32f_s32f_multiply_32f_a_orc_impl.orc - - - -my_ORCC_FLAGS = --implementation $(ORCC_FLAGS) - -.orc.c: - $(ORCC) $(my_ORCC_FLAGS) -o $@ $< diff --git a/volk/python/Makefile.am b/volk/python/Makefile.am deleted file mode 100644 index 8519a102a..000000000 --- a/volk/python/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -# -# Copyright 2010 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 $(top_srcdir)/Makefile.common - -AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) -SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(SWIGGRFLAGS) - -BUILT_SOURCES = $(swig_built_sources) - -MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc - -# Don't distribute the output of swig -dist-hook: - @for file in $(swig_built_sources); do echo $(RM) $(distdir)/$$file; done - @for file in $(swig_built_sources); do $(RM) $(distdir)/$$file; done - - -# Set the install location of any python scripts to /volk -volkpythondir = $(pythondir)/volk - -volkpython_PYTHON = \ - __init__.py diff --git a/volk/python/__init__.py b/volk/python/__init__.py index 7239e7e23..7c9c4a0c6 100644 --- a/volk/python/__init__.py +++ b/volk/python/__init__.py @@ -1,18 +1,18 @@ # # Copyright 2010 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. @@ -31,7 +31,7 @@ except ImportError: from DLFCN import RTLD_GLOBAL as _RTLD_GLOBAL except ImportError: pass - + if _RTLD_GLOBAL != 0: _dlopenflags = sys.getdlopenflags() sys.setdlopenflags(_dlopenflags|_RTLD_GLOBAL) diff --git a/volk/python/qa_square.py b/volk/python/qa_square.py index 53f0433ca..c74bc25ef 100755 --- a/volk/python/qa_square.py +++ b/volk/python/qa_square.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2010 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 volk_swig as volk @@ -42,6 +42,6 @@ class qa_volk(gr_unittest.TestCase): self.tb.run() result_data = dst.data() self.assertFloatTuplesAlmostEqual(expected_result, result_data, 6) - + if __name__ == '__main__': gr_unittest.main() diff --git a/volk/python/run_tests.in b/volk/python/run_tests.in deleted file mode 100644 index 895a849bd..000000000 --- a/volk/python/run_tests.in +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh - -# All this strange PYTHONPATH manipulation is required to run our -# tests using our just built shared library and swig-generated python -# code prior to installation. - -# build tree == src tree unless you're doing a VPATH build. -# If you don't know what a VPATH build is, you're not doing one. Relax... - -prefix=@prefix@ -exec_prefix=@exec_prefix@ - -# Where to look in the build tree for our shared library -libbld=@abs_top_builddir@/python -# Where to look in the src tree for swig generated python code -libsrc=@abs_top_builddir@/python -# Where to look in the src tree for hand written python code -py=@abs_top_srcdir@/python - -# Where to look for installed GNU Radio python modules -# FIXME this is wrong on a distcheck. We really need to ask gnuradio-core -# where it put its python files. -installed_pythondir=@pythondir@ -installed_pyexecdir=@pyexecdir@ - -PYTHONPATH="$libbld:$libbld/.libs:$libsrc:$py:$installed_pythondir:$installed_pyexecdir:$PYTHONPATH" -#PYTHONPATH="$libbld:$libbld/.libs:$libsrc:$py:$installed_pythondir:$installed_pyexecdir" - -export PYTHONPATH - -# -# This is the simple part... -# Run everything that matches qa_*.py and return the final result. -# - -ok=yes -for file in @srcdir@/qa_*.py -do - if ! $file - then - ok=no - fi -done - -if [ $ok = yes ] -then - exit 0 -else - exit 1 -fi diff --git a/volk/python/volk.i b/volk/python/volk.i index ea3a037ba..d678a9120 100644 --- a/volk/python/volk.i +++ b/volk/python/volk.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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. diff --git a/volk/python/volk_square_ff.i b/volk/python/volk_square_ff.i index 1d485bd7e..5456c81fd 100644 --- a/volk/python/volk_square_ff.i +++ b/volk/python/volk_square_ff.i @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2010 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. diff --git a/volk/spu_lib/gc_spu_macs.h b/volk/spu_lib/gc_spu_macs.h index 8e3e3f2a6..e86dce3f5 100644 --- a/volk/spu_lib/gc_spu_macs.h +++ b/volk/spu_lib/gc_spu_macs.h @@ -1,19 +1,19 @@ /* -*- asm -*- */ /* * 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -279,7 +279,7 @@ name: iluh _gc_t0, 4*(s)*0x0101 + 0x0001; \ iohl _gc_t0, 4*(s)*0x0101 + 0x0203; \ shufb rt, ra, ra, _gc_t0; - + // replicate double from slot s [0,1] #define VSPLTD(rt, ra, s) \ /* sp is always 16-byte aligned */ \ @@ -301,13 +301,13 @@ name: #define MIN_SELB(rt, ra, rb, rc) selb rt, ra, rb, rc; #define MAX_SELB(rt, ra, rb, rc) selb rt, rb, ra, rc; - + // words #define MIN(rt, ra, rb) \ cgt _gc_t0, ra, rb; \ MIN_SELB(rt, ra, rb, _gc_t0) - + #define MAX(rt, ra, rb) \ cgt _gc_t0, ra, rb; \ MAX_SELB(rt, ra, rb, _gc_t0) @@ -315,17 +315,17 @@ name: #define UMIN(rt, ra, rb) \ clgt _gc_t0, ra, rb; \ MIN_SELB(rt, ra, rb, _gc_t0) - + #define UMAX(rt, ra, rb) \ clgt _gc_t0, ra, rb; \ MAX_SELB(rt, ra, rb, _gc_t0) // bytes - + #define MINB(rt, ra, rb) \ cgtb _gc_t0, ra, rb; \ MIN_SELB(rt, ra, rb, _gc_t0) - + #define MAXB(rt, ra, rb) \ cgtb _gc_t0, ra, rb; \ MAX_SELB(rt, ra, rb, _gc_t0) @@ -333,17 +333,17 @@ name: #define UMINB(rt, ra, rb) \ clgtb _gc_t0, ra, rb; \ MIN_SELB(rt, ra, rb, _gc_t0) - + #define UMAXB(rt, ra, rb) \ clgtb _gc_t0, ra, rb; \ MAX_SELB(rt, ra, rb, _gc_t0) // halfwords - + #define MINH(rt, ra, rb) \ cgth _gc_t0, ra, rb; \ MIN_SELB(rt, ra, rb, _gc_t0) - + #define MAXH(rt, ra, rb) \ cgth _gc_t0, ra, rb; \ MAX_SELB(rt, ra, rb, _gc_t0) @@ -351,17 +351,17 @@ name: #define UMINH(rt, ra, rb) \ clgth _gc_t0, ra, rb; \ MIN_SELB(rt, ra, rb, _gc_t0) - + #define UMAXH(rt, ra, rb) \ clgth _gc_t0, ra, rb; \ MAX_SELB(rt, ra, rb, _gc_t0) // floats - + #define FMIN(rt, ra, rb) \ fcgt _gc_t0, ra, rb; \ MIN_SELB(rt, ra, rb, _gc_t0) - + #define FMAX(rt, ra, rb) \ fcgt _gc_t0, ra, rb; \ MAX_SELB(rt, ra, rb, _gc_t0) @@ -370,7 +370,7 @@ name: #define FMINMAG(rt, ra, rb) \ fcmgt _gc_t0, ra, rb; \ MIN_SELB(rt, ra, rb, _gc_t0) - + // Ignoring the sign, select the values with the maximum magnitude #define FMAXMAG(rt, ra, rb) \ fcmgt _gc_t0, ra, rb; \ diff --git a/volk/spu_lib/spu_16s_cmpgt_unaligned.c b/volk/spu_lib/spu_16s_cmpgt_unaligned.c index 765cacd9a..8811e6801 100644 --- a/volk/spu_lib/spu_16s_cmpgt_unaligned.c +++ b/volk/spu_lib/spu_16s_cmpgt_unaligned.c @@ -4,14 +4,14 @@ void* libvector_16s_cmpgt_unaligned(void* target, void* src, signed short val, u //loop iterator i int i = 0; void* retval = target; - + //put the target and source addresses into qwords vector unsigned int address_counter_tgt = {(unsigned int)target, 0, 0, 0}; vector unsigned int address_counter_src = {(unsigned int)src, 0, 0 ,0}; - + //create shuffle masks - + //shuffle mask building blocks: //all from the first vector vector unsigned char oneup = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, @@ -19,9 +19,9 @@ void* libvector_16s_cmpgt_unaligned(void* target, void* src, signed short val, u //all from the second vector vector unsigned char second_oneup = {0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f}; - - + + //gamma: second half of the second, first half of the first, break at (unsigned int)src%16 vector unsigned char src_cmp = spu_splats((unsigned char)((unsigned int)src%16)); vector unsigned char gt_res = spu_cmpgt(oneup, src_cmp); @@ -29,16 +29,16 @@ void* libvector_16s_cmpgt_unaligned(void* target, void* src, signed short val, u vector unsigned char cmp_res = spu_or(gt_res, eq_res); vector unsigned char sixteen_uchar = spu_splats((unsigned char)16); vector unsigned char phase_change = spu_and(sixteen_uchar, cmp_res); - vector unsigned int shuffle_mask_gamma = spu_add((vector unsigned int)phase_change, + vector unsigned int shuffle_mask_gamma = spu_add((vector unsigned int)phase_change, (vector unsigned int)oneup); shuffle_mask_gamma = spu_rlqwbyte(shuffle_mask_gamma, (unsigned int)src%16); - - + + vector unsigned char tgt_second = spu_rlqwbyte(second_oneup, -((unsigned int)target%16)); vector unsigned char tgt_first = spu_rlqwbyte(oneup, -((unsigned int)target%16)); - + //alpha: first half of first, second half of second, break at (unsigned int)target%16 src_cmp = spu_splats((unsigned char)((unsigned int)target%16)); gt_res = spu_cmpgt(oneup, src_cmp); @@ -47,13 +47,13 @@ void* libvector_16s_cmpgt_unaligned(void* target, void* src, signed short val, u phase_change = spu_and(sixteen_uchar, cmp_res); vector unsigned int shuffle_mask_alpha = spu_add((vector unsigned int)phase_change, (vector unsigned int)oneup); - + //delta: first half of first, first half of second, break at (unsigned int)target%16 vector unsigned char shuffle_mask_delta = spu_shuffle(oneup, tgt_second, (vector unsigned char)shuffle_mask_alpha); //epsilon: second half of second, second half of first, break at (unsigned int)target%16 vector unsigned char shuffle_mask_epsilon = spu_shuffle(tgt_second, oneup, (vector unsigned char)shuffle_mask_alpha); //zeta: second half of second, first half of first, break at 16 - (unsigned int)target%16 - vector unsigned int shuffle_mask_zeta = spu_rlqwbyte(shuffle_mask_alpha, (unsigned int)target%16); + vector unsigned int shuffle_mask_zeta = spu_rlqwbyte(shuffle_mask_alpha, (unsigned int)target%16); //beta: first half of first, second half of second, break at num_bytes%16 src_cmp = spu_splats((unsigned char)(num_bytes%16)); @@ -63,17 +63,17 @@ void* libvector_16s_cmpgt_unaligned(void* target, void* src, signed short val, u phase_change = spu_and(sixteen_uchar, cmp_res); vector unsigned int shuffle_mask_beta = spu_add((vector unsigned int)phase_change, (vector unsigned int)oneup); - - - - + + + + qword src_past; qword src_present; qword tgt_past; qword tgt_present; - + qword in_temp; qword out_temp0; qword out_temp1; @@ -85,53 +85,53 @@ void* libvector_16s_cmpgt_unaligned(void* target, void* src, signed short val, u vector unsigned short compare; vector unsigned short ones = {1, 1, 1, 1, 1, 1, 1, 1}; vector unsigned short after_and; - + for(i = 0; i < num_bytes/16; ++i) { - + src_present = si_lqd((qword)address_counter_src, 16); tgt_present = si_lqd((qword)address_counter_tgt, 16); - + in_temp = spu_shuffle(src_present, src_past, (vector unsigned char)shuffle_mask_gamma); compare = spu_cmpgt((vector signed short) in_temp, vec_val); after_and = spu_and(compare, ones); - - + + out_temp0 = spu_shuffle(tgt_past, (qword)after_and, shuffle_mask_delta); out_temp1 = spu_shuffle(tgt_present, (qword)after_and, shuffle_mask_epsilon); si_stqd(out_temp0, (qword)address_counter_tgt, 0); si_stqd(out_temp1, (qword)address_counter_tgt, 16); - + tgt_past = out_temp1; src_past = src_present; address_counter_src = spu_add(address_counter_src, 16); address_counter_tgt = spu_add(address_counter_tgt, 16); - + } - + src_present = si_lqd((qword)address_counter_src, 16); tgt_present = si_lqd((qword)address_counter_tgt, 16); - - + + in_temp = spu_shuffle(src_present, src_past,(vector unsigned char) shuffle_mask_gamma); - + compare = spu_cmpgt((vector signed short) in_temp, vec_val); after_and = spu_and(compare, ones); - + qword target_temp = spu_shuffle(tgt_present, tgt_past, (vector unsigned char) shuffle_mask_zeta); qword meld = spu_shuffle((qword)after_and, target_temp, (vector unsigned char)shuffle_mask_beta); - - + + out_temp0 = spu_shuffle(tgt_past, meld, shuffle_mask_delta); out_temp1 = spu_shuffle(tgt_present, meld, shuffle_mask_epsilon); - + si_stqd(out_temp0, (qword)address_counter_tgt, 0); si_stqd(out_temp1, (qword)address_counter_tgt, 16); - + return retval; } @@ -156,5 +156,5 @@ int main(){ } printf("\n"); } -*/ +*/ diff --git a/volk/spu_lib/spu_16s_vector_subtract_unaligned.c b/volk/spu_lib/spu_16s_vector_subtract_unaligned.c index a3ce6c2fe..ea110c8d2 100644 --- a/volk/spu_lib/spu_16s_vector_subtract_unaligned.c +++ b/volk/spu_lib/spu_16s_vector_subtract_unaligned.c @@ -4,15 +4,15 @@ void* libvector_16s_vector_subtract_unaligned(void* target, void* src0, void* s //loop iterator i int i = 0; void* retval = target; - + //put the target and source addresses into qwords vector unsigned int address_counter_tgt = {(unsigned int)target, 0, 0, 0}; vector unsigned int address_counter_src0 = {(unsigned int)src0, 0, 0 ,0}; vector unsigned int address_counter_src1 = {(unsigned int)src1, 0, 0, 0}; - + //create shuffle masks - + //shuffle mask building blocks: //all from the first vector vector unsigned char oneup = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, @@ -20,9 +20,9 @@ void* libvector_16s_vector_subtract_unaligned(void* target, void* src0, void* s //all from the second vector vector unsigned char second_oneup = {0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f}; - - + + //gamma: second half of the second, first half of the first, break at (unsigned int)src0%16 vector unsigned char src_cmp = spu_splats((unsigned char)((unsigned int)src0%16)); vector unsigned char gt_res = spu_cmpgt(oneup, src_cmp); @@ -30,7 +30,7 @@ void* libvector_16s_vector_subtract_unaligned(void* target, void* src0, void* s vector unsigned char cmp_res = spu_or(gt_res, eq_res); vector unsigned char sixteen_uchar = spu_splats((unsigned char)16); vector unsigned char phase_change = spu_and(sixteen_uchar, cmp_res); - vector unsigned int shuffle_mask_gamma = spu_add((vector unsigned int)phase_change, + vector unsigned int shuffle_mask_gamma = spu_add((vector unsigned int)phase_change, (vector unsigned int)oneup); shuffle_mask_gamma = spu_rlqwbyte(shuffle_mask_gamma, (unsigned int)src0%16); @@ -41,17 +41,17 @@ void* libvector_16s_vector_subtract_unaligned(void* target, void* src0, void* s cmp_res = spu_or(gt_res, eq_res); sixteen_uchar = spu_splats((unsigned char)16); phase_change = spu_and(sixteen_uchar, cmp_res); - vector unsigned int shuffle_mask_eta = spu_add((vector unsigned int)phase_change, + vector unsigned int shuffle_mask_eta = spu_add((vector unsigned int)phase_change, (vector unsigned int)oneup); shuffle_mask_eta = spu_rlqwbyte(shuffle_mask_eta, (unsigned int)src1%16); - - - + + + vector unsigned char tgt_second = spu_rlqwbyte(second_oneup, -((unsigned int)target%16)); vector unsigned char tgt_first = spu_rlqwbyte(oneup, -((unsigned int)target%16)); - + //alpha: first half of first, second half of second, break at (unsigned int)target%16 src_cmp = spu_splats((unsigned char)((unsigned int)target%16)); gt_res = spu_cmpgt(oneup, src_cmp); @@ -60,13 +60,13 @@ void* libvector_16s_vector_subtract_unaligned(void* target, void* src0, void* s phase_change = spu_and(sixteen_uchar, cmp_res); vector unsigned int shuffle_mask_alpha = spu_add((vector unsigned int)phase_change, (vector unsigned int)oneup); - + //delta: first half of first, first half of second, break at (unsigned int)target%16 vector unsigned char shuffle_mask_delta = spu_shuffle(oneup, tgt_second, (vector unsigned char)shuffle_mask_alpha); //epsilon: second half of second, second half of first, break at (unsigned int)target%16 vector unsigned char shuffle_mask_epsilon = spu_shuffle(tgt_second, oneup, (vector unsigned char)shuffle_mask_alpha); //zeta: second half of second, first half of first, break at 16 - (unsigned int)target%16 - vector unsigned int shuffle_mask_zeta = spu_rlqwbyte(shuffle_mask_alpha, (unsigned int)target%16); + vector unsigned int shuffle_mask_zeta = spu_rlqwbyte(shuffle_mask_alpha, (unsigned int)target%16); //beta: first half of first, second half of second, break at num_bytes%16 src_cmp = spu_splats((unsigned char)(num_bytes%16)); @@ -76,19 +76,19 @@ void* libvector_16s_vector_subtract_unaligned(void* target, void* src0, void* s phase_change = spu_and(sixteen_uchar, cmp_res); vector unsigned int shuffle_mask_beta = spu_add((vector unsigned int)phase_change, (vector unsigned int)oneup); - - - - + + + + qword src0_past; qword src0_present; qword src1_past; qword src1_present; qword tgt_past; qword tgt_present; - + qword in_temp0; qword in_temp1; qword out_temp0; @@ -99,54 +99,54 @@ void* libvector_16s_vector_subtract_unaligned(void* target, void* src0, void* s src0_past = si_lqd((qword)address_counter_src0, 0); src1_past = si_lqd((qword)address_counter_src1, 0); tgt_past = si_lqd((qword)address_counter_tgt, 0); - + for(i = 0; i < num_bytes/16; ++i) { - + src0_present = si_lqd((qword)address_counter_src0, 16); src1_present = si_lqd((qword)address_counter_src1, 16); tgt_present = si_lqd((qword)address_counter_tgt, 16); - + in_temp0 = spu_shuffle(src0_present, src0_past, (vector unsigned char)shuffle_mask_gamma); in_temp1 = spu_shuffle(src1_present, src1_past, (vector unsigned char)shuffle_mask_eta); - + sum = spu_sub((vector signed short)in_temp0, (vector signed short)in_temp1); - + out_temp0 = spu_shuffle(tgt_past, (qword)sum, shuffle_mask_delta); out_temp1 = spu_shuffle(tgt_present, (qword)sum, shuffle_mask_epsilon); - + si_stqd(out_temp0, (qword)address_counter_tgt, 0); si_stqd(out_temp1, (qword)address_counter_tgt, 16); - + tgt_past = out_temp1; src0_past = src0_present; src1_past = src1_present; address_counter_src0 = spu_add(address_counter_src0, 16); address_counter_src1 = spu_add(address_counter_src1, 16); address_counter_tgt = spu_add(address_counter_tgt, 16); - - + + } - + src0_present = si_lqd((qword)address_counter_src0, 16); src1_present = si_lqd((qword)address_counter_src1, 16); tgt_present = si_lqd((qword)address_counter_tgt, 16); - - + + in_temp0 = spu_shuffle(src0_present, src0_past, (vector unsigned char) shuffle_mask_gamma); in_temp1 = spu_shuffle(src1_present, src1_past, (vector unsigned char) shuffle_mask_eta); sum = spu_sub((vector signed short)in_temp0, (vector signed short)in_temp1); qword target_temp = spu_shuffle(tgt_present, tgt_past, (vector unsigned char) shuffle_mask_zeta); qword meld = spu_shuffle((qword)sum, target_temp, (vector unsigned char)shuffle_mask_beta); - - + + out_temp0 = spu_shuffle(tgt_past, meld, shuffle_mask_delta); out_temp1 = spu_shuffle(tgt_present, meld, shuffle_mask_epsilon); - + si_stqd(out_temp0, (qword)address_counter_tgt, 0); si_stqd(out_temp1, (qword)address_counter_tgt, 16); - + return retval; } diff --git a/volk/spu_lib/spu_16s_vector_sum_unaligned.c b/volk/spu_lib/spu_16s_vector_sum_unaligned.c index 5a1cb9aaf..0097b4f56 100644 --- a/volk/spu_lib/spu_16s_vector_sum_unaligned.c +++ b/volk/spu_lib/spu_16s_vector_sum_unaligned.c @@ -4,15 +4,15 @@ void* libvector_16s_vector_sum_unaligned(void* target, void* src0, void* src1, //loop iterator i int i = 0; void* retval = target; - + //put the target and source addresses into qwords vector unsigned int address_counter_tgt = {(unsigned int)target, 0, 0, 0}; vector unsigned int address_counter_src0 = {(unsigned int)src0, 0, 0 ,0}; vector unsigned int address_counter_src1 = {(unsigned int)src1, 0, 0, 0}; - + //create shuffle masks - + //shuffle mask building blocks: //all from the first vector vector unsigned char oneup = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, @@ -20,9 +20,9 @@ void* libvector_16s_vector_sum_unaligned(void* target, void* src0, void* src1, //all from the second vector vector unsigned char second_oneup = {0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f}; - - + + //gamma: second half of the second, first half of the first, break at (unsigned int)src0%16 vector unsigned char src_cmp = spu_splats((unsigned char)((unsigned int)src0%16)); vector unsigned char gt_res = spu_cmpgt(oneup, src_cmp); @@ -30,7 +30,7 @@ void* libvector_16s_vector_sum_unaligned(void* target, void* src0, void* src1, vector unsigned char cmp_res = spu_or(gt_res, eq_res); vector unsigned char sixteen_uchar = spu_splats((unsigned char)16); vector unsigned char phase_change = spu_and(sixteen_uchar, cmp_res); - vector unsigned int shuffle_mask_gamma = spu_add((vector unsigned int)phase_change, + vector unsigned int shuffle_mask_gamma = spu_add((vector unsigned int)phase_change, (vector unsigned int)oneup); shuffle_mask_gamma = spu_rlqwbyte(shuffle_mask_gamma, (unsigned int)src0%16); @@ -41,17 +41,17 @@ void* libvector_16s_vector_sum_unaligned(void* target, void* src0, void* src1, cmp_res = spu_or(gt_res, eq_res); sixteen_uchar = spu_splats((unsigned char)16); phase_change = spu_and(sixteen_uchar, cmp_res); - vector unsigned int shuffle_mask_eta = spu_add((vector unsigned int)phase_change, + vector unsigned int shuffle_mask_eta = spu_add((vector unsigned int)phase_change, (vector unsigned int)oneup); shuffle_mask_eta = spu_rlqwbyte(shuffle_mask_eta, (unsigned int)src1%16); - - - + + + vector unsigned char tgt_second = spu_rlqwbyte(second_oneup, -((unsigned int)target%16)); vector unsigned char tgt_first = spu_rlqwbyte(oneup, -((unsigned int)target%16)); - + //alpha: first half of first, second half of second, break at (unsigned int)target%16 src_cmp = spu_splats((unsigned char)((unsigned int)target%16)); gt_res = spu_cmpgt(oneup, src_cmp); @@ -60,13 +60,13 @@ void* libvector_16s_vector_sum_unaligned(void* target, void* src0, void* src1, phase_change = spu_and(sixteen_uchar, cmp_res); vector unsigned int shuffle_mask_alpha = spu_add((vector unsigned int)phase_change, (vector unsigned int)oneup); - + //delta: first half of first, first half of second, break at (unsigned int)target%16 vector unsigned char shuffle_mask_delta = spu_shuffle(oneup, tgt_second, (vector unsigned char)shuffle_mask_alpha); //epsilon: second half of second, second half of first, break at (unsigned int)target%16 vector unsigned char shuffle_mask_epsilon = spu_shuffle(tgt_second, oneup, (vector unsigned char)shuffle_mask_alpha); //zeta: second half of second, first half of first, break at 16 - (unsigned int)target%16 - vector unsigned int shuffle_mask_zeta = spu_rlqwbyte(shuffle_mask_alpha, (unsigned int)target%16); + vector unsigned int shuffle_mask_zeta = spu_rlqwbyte(shuffle_mask_alpha, (unsigned int)target%16); //beta: first half of first, second half of second, break at num_bytes%16 src_cmp = spu_splats((unsigned char)(num_bytes%16)); @@ -76,19 +76,19 @@ void* libvector_16s_vector_sum_unaligned(void* target, void* src0, void* src1, phase_change = spu_and(sixteen_uchar, cmp_res); vector unsigned int shuffle_mask_beta = spu_add((vector unsigned int)phase_change, (vector unsigned int)oneup); - - - - + + + + qword src0_past; qword src0_present; qword src1_past; qword src1_present; qword tgt_past; qword tgt_present; - + qword in_temp0; qword in_temp1; qword out_temp0; @@ -99,54 +99,54 @@ void* libvector_16s_vector_sum_unaligned(void* target, void* src0, void* src1, src0_past = si_lqd((qword)address_counter_src0, 0); src1_past = si_lqd((qword)address_counter_src1, 0); tgt_past = si_lqd((qword)address_counter_tgt, 0); - + for(i = 0; i < num_bytes/16; ++i) { - + src0_present = si_lqd((qword)address_counter_src0, 16); src1_present = si_lqd((qword)address_counter_src1, 16); tgt_present = si_lqd((qword)address_counter_tgt, 16); - + in_temp0 = spu_shuffle(src0_present, src0_past, (vector unsigned char)shuffle_mask_gamma); in_temp1 = spu_shuffle(src1_present, src1_past, (vector unsigned char)shuffle_mask_eta); - + sum = spu_add((vector signed int)in_temp0, (vector signed int)in_temp1); - + out_temp0 = spu_shuffle(tgt_past, (qword)sum, shuffle_mask_delta); out_temp1 = spu_shuffle(tgt_present, (qword)sum, shuffle_mask_epsilon); - + si_stqd(out_temp0, (qword)address_counter_tgt, 0); si_stqd(out_temp1, (qword)address_counter_tgt, 16); - + tgt_past = out_temp1; src0_past = src0_present; src1_past = src1_present; address_counter_src0 = spu_add(address_counter_src0, 16); address_counter_src1 = spu_add(address_counter_src1, 16); address_counter_tgt = spu_add(address_counter_tgt, 16); - - + + } - + src0_present = si_lqd((qword)address_counter_src0, 16); src1_present = si_lqd((qword)address_counter_src1, 16); tgt_present = si_lqd((qword)address_counter_tgt, 16); - - + + in_temp0 = spu_shuffle(src0_present, src0_past, (vector unsigned char) shuffle_mask_gamma); in_temp1 = spu_shuffle(src1_present, src1_past, (vector unsigned char) shuffle_mask_eta); sum = spu_add((vector signed int)in_temp0, (vector signed int)in_temp1); qword target_temp = spu_shuffle(tgt_present, tgt_past, (vector unsigned char) shuffle_mask_zeta); qword meld = spu_shuffle((qword)sum, target_temp, (vector unsigned char)shuffle_mask_beta); - - + + out_temp0 = spu_shuffle(tgt_past, meld, shuffle_mask_delta); out_temp1 = spu_shuffle(tgt_present, meld, shuffle_mask_epsilon); - + si_stqd(out_temp0, (qword)address_counter_tgt, 0); si_stqd(out_temp1, (qword)address_counter_tgt, 16); - + return retval; } diff --git a/volk/spu_lib/spu_32fc_pointwise_multiply_unaligned.c b/volk/spu_lib/spu_32fc_pointwise_multiply_unaligned.c index 58fd4aa0c..d1c960488 100644 --- a/volk/spu_lib/spu_32fc_pointwise_multiply_unaligned.c +++ b/volk/spu_lib/spu_32fc_pointwise_multiply_unaligned.c @@ -7,15 +7,15 @@ void* libvector_pointwise_multiply_32fc_unaligned(void* target, void* src0, voi //loop iterator i int i = 0; void* retval = target; - + //put the target and source addresses into qwords vector unsigned int address_counter_tgt = {(unsigned int)target, 0, 0, 0}; vector unsigned int address_counter_src0 = {(unsigned int)src0, 0, 0 ,0}; vector unsigned int address_counter_src1 = {(unsigned int)src1, 0, 0, 0}; - + //create shuffle masks - + //shuffle mask building blocks: //all from the first vector vector unsigned char oneup = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, @@ -23,9 +23,9 @@ void* libvector_pointwise_multiply_32fc_unaligned(void* target, void* src0, voi //all from the second vector vector unsigned char second_oneup = {0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f}; - - + + //gamma: second half of the second, first half of the first, break at (unsigned int)src0%16 vector unsigned char src_cmp = spu_splats((unsigned char)((unsigned int)src0%16)); vector unsigned char gt_res = spu_cmpgt(oneup, src_cmp); @@ -33,7 +33,7 @@ void* libvector_pointwise_multiply_32fc_unaligned(void* target, void* src0, voi vector unsigned char cmp_res = spu_or(gt_res, eq_res); vector unsigned char sixteen_uchar = spu_splats((unsigned char)16); vector unsigned char phase_change = spu_and(sixteen_uchar, cmp_res); - vector unsigned int shuffle_mask_gamma = spu_add((vector unsigned int)phase_change, + vector unsigned int shuffle_mask_gamma = spu_add((vector unsigned int)phase_change, (vector unsigned int)oneup); shuffle_mask_gamma = spu_rlqwbyte(shuffle_mask_gamma, (unsigned int)src0%16); @@ -44,17 +44,17 @@ void* libvector_pointwise_multiply_32fc_unaligned(void* target, void* src0, voi cmp_res = spu_or(gt_res, eq_res); sixteen_uchar = spu_splats((unsigned char)16); phase_change = spu_and(sixteen_uchar, cmp_res); - vector unsigned int shuffle_mask_eta = spu_add((vector unsigned int)phase_change, + vector unsigned int shuffle_mask_eta = spu_add((vector unsigned int)phase_change, (vector unsigned int)oneup); shuffle_mask_eta = spu_rlqwbyte(shuffle_mask_eta, (unsigned int)src1%16); - - - + + + vector unsigned char tgt_second = spu_rlqwbyte(second_oneup, -((unsigned int)target%16)); vector unsigned char tgt_first = spu_rlqwbyte(oneup, -((unsigned int)target%16)); - + //alpha: first half of first, second half of second, break at (unsigned int)target%16 src_cmp = spu_splats((unsigned char)((unsigned int)target%16)); gt_res = spu_cmpgt(oneup, src_cmp); @@ -63,13 +63,13 @@ void* libvector_pointwise_multiply_32fc_unaligned(void* target, void* src0, voi phase_change = spu_and(sixteen_uchar, cmp_res); vector unsigned int shuffle_mask_alpha = spu_add((vector unsigned int)phase_change, (vector unsigned int)oneup); - + //delta: first half of first, first half of second, break at (unsigned int)target%16 vector unsigned char shuffle_mask_delta = spu_shuffle(oneup, tgt_second, (vector unsigned char)shuffle_mask_alpha); //epsilon: second half of second, second half of first, break at (unsigned int)target%16 vector unsigned char shuffle_mask_epsilon = spu_shuffle(tgt_second, oneup, (vector unsigned char)shuffle_mask_alpha); //zeta: second half of second, first half of first, break at 16 - (unsigned int)target%16 - vector unsigned int shuffle_mask_zeta = spu_rlqwbyte(shuffle_mask_alpha, (unsigned int)target%16); + vector unsigned int shuffle_mask_zeta = spu_rlqwbyte(shuffle_mask_alpha, (unsigned int)target%16); //beta: first half of first, second half of second, break at num_bytes%16 src_cmp = spu_splats((unsigned char)(num_bytes%16)); @@ -79,19 +79,19 @@ void* libvector_pointwise_multiply_32fc_unaligned(void* target, void* src0, voi phase_change = spu_and(sixteen_uchar, cmp_res); vector unsigned int shuffle_mask_beta = spu_add((vector unsigned int)phase_change, (vector unsigned int)oneup); - - - - + + + + qword src0_past; qword src0_present; qword src1_past; qword src1_present; qword tgt_past; qword tgt_present; - + qword in_temp0; qword in_temp1; qword out_temp0; @@ -101,7 +101,7 @@ void* libvector_pointwise_multiply_32fc_unaligned(void* target, void* src0, voi src0_past = si_lqd((qword)address_counter_src0, 0); src1_past = si_lqd((qword)address_counter_src1, 0); tgt_past = si_lqd((qword)address_counter_tgt, 0); - + vector unsigned char shuffle_mask_complexprod0 = {0x04, 0x05, 0x06, 0x07, 0x00, 0x01, 0x02, 0x03, 0x0c, 0x0d, 0x0e, 0x0f, 0x08, 0x09, 0x0a, 0x0b}; vector unsigned char shuffle_mask_complexprod1 = {0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13, @@ -110,7 +110,7 @@ void* libvector_pointwise_multiply_32fc_unaligned(void* target, void* src0, voi 0x0c, 0x0d, 0x0e, 0x0f, 0x1c, 0x1d, 0x1e, 0x1f}; vector unsigned char sign_changer = {0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00}; - + vector float prod0; qword shuf0; vector float prod1; @@ -118,54 +118,54 @@ void* libvector_pointwise_multiply_32fc_unaligned(void* target, void* src0, voi qword summand0; qword summand1; vector float sum; - + for(i = 0; i < num_bytes/16; ++i) { - + src0_present = si_lqd((qword)address_counter_src0, 16); src1_present = si_lqd((qword)address_counter_src1, 16); tgt_present = si_lqd((qword)address_counter_tgt, 16); - + in_temp0 = spu_shuffle(src0_present, src0_past, (vector unsigned char)shuffle_mask_gamma); in_temp1 = spu_shuffle(src1_present, src1_past, (vector unsigned char)shuffle_mask_eta); - + prod0 = spu_mul((vector float)in_temp0, (vector float)in_temp1); shuf0 = spu_shuffle((qword)in_temp1, (qword)in_temp1, shuffle_mask_complexprod0); prod1 = spu_mul((vector float)in_temp0, (vector float)shuf0); sign_change = spu_xor(prod0, (vector float)sign_changer); - + summand0 = spu_shuffle((qword)sign_change, (qword)prod1, shuffle_mask_complexprod1); - + summand1 = spu_shuffle((qword)sign_change, (qword)prod1, shuffle_mask_complexprod2); - + sum = spu_add((vector float)summand0, (vector float)summand1); - + out_temp0 = spu_shuffle(tgt_past, (qword)sum, shuffle_mask_delta); out_temp1 = spu_shuffle(tgt_present, (qword)sum, shuffle_mask_epsilon); - + si_stqd(out_temp0, (qword)address_counter_tgt, 0); si_stqd(out_temp1, (qword)address_counter_tgt, 16); - + tgt_past = out_temp1; src0_past = src0_present; src1_past = src1_present; address_counter_src0 = spu_add(address_counter_src0, 16); address_counter_src1 = spu_add(address_counter_src1, 16); address_counter_tgt = spu_add(address_counter_tgt, 16); - - + + } - + src0_present = si_lqd((qword)address_counter_src0, 16); src1_present = si_lqd((qword)address_counter_src1, 16); tgt_present = si_lqd((qword)address_counter_tgt, 16); - - + + in_temp0 = spu_shuffle(src0_present, src0_past, (vector unsigned char) shuffle_mask_gamma); in_temp1 = spu_shuffle(src1_present, src1_past, (vector unsigned char) shuffle_mask_eta); - - + + prod0 = spu_mul((vector float)in_temp0, (vector float)in_temp1); shuf0 = spu_shuffle((qword)in_temp1, (qword)in_temp1, shuffle_mask_complexprod0); prod1 = spu_mul(prod0, (vector float)shuf0); @@ -173,20 +173,20 @@ void* libvector_pointwise_multiply_32fc_unaligned(void* target, void* src0, voi summand0 = spu_shuffle((qword)sign_change, (qword)prod1, shuffle_mask_complexprod1); summand1 = spu_shuffle((qword)sign_change, (qword)prod1, shuffle_mask_complexprod2); sum = spu_add((vector float)summand0, (vector float)summand1); - - - + + + qword target_temp = spu_shuffle(tgt_present, tgt_past, (vector unsigned char) shuffle_mask_zeta); qword meld = spu_shuffle((qword)sum, target_temp, (vector unsigned char)shuffle_mask_beta); - - - + + + out_temp0 = spu_shuffle(tgt_past, meld, shuffle_mask_delta); out_temp1 = spu_shuffle(tgt_present, meld, shuffle_mask_epsilon); - + si_stqd(out_temp0, (qword)address_counter_tgt, 0); si_stqd(out_temp1, (qword)address_counter_tgt, 16); - + return retval; } @@ -209,14 +209,14 @@ int main(){ vector_product_complex(res, pooh, bear, 48*sizeof(float)); - + for(i = 0; i < 48; ++i) { printf("%f, ", res[i]); } printf("\n"); - + } */ diff --git a/volk/spu_lib/spu_memcpy_unaligned.c b/volk/spu_lib/spu_memcpy_unaligned.c index 2a0dabcd7..0f15b5d80 100644 --- a/volk/spu_lib/spu_memcpy_unaligned.c +++ b/volk/spu_lib/spu_memcpy_unaligned.c @@ -5,14 +5,14 @@ void* libvector_memcpy_unaligned(void* target, void* src, unsigned int num_bytes //loop iterator i int i = 0; void* retval = target; - + //put the target and source addresses into qwords vector unsigned int address_counter_tgt = {(unsigned int)target, 0, 0, 0}; vector unsigned int address_counter_src = {(unsigned int)src, 0, 0 ,0}; - + //create shuffle masks - + //shuffle mask building blocks: //all from the first vector vector unsigned char oneup = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, @@ -20,9 +20,9 @@ void* libvector_memcpy_unaligned(void* target, void* src, unsigned int num_bytes //all from the second vector vector unsigned char second_oneup = {0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f}; - - + + //gamma: second half of the second, first half of the first, break at (unsigned int)src%16 vector unsigned char src_cmp = spu_splats((unsigned char)((unsigned int)src%16)); vector unsigned char gt_res = spu_cmpgt(oneup, src_cmp); @@ -30,16 +30,16 @@ void* libvector_memcpy_unaligned(void* target, void* src, unsigned int num_bytes vector unsigned char cmp_res = spu_or(gt_res, eq_res); vector unsigned char sixteen_uchar = spu_splats((unsigned char)16); vector unsigned char phase_change = spu_and(sixteen_uchar, cmp_res); - vector unsigned int shuffle_mask_gamma = spu_add((vector unsigned int)phase_change, + vector unsigned int shuffle_mask_gamma = spu_add((vector unsigned int)phase_change, (vector unsigned int)oneup); shuffle_mask_gamma = spu_rlqwbyte(shuffle_mask_gamma, (unsigned int)src%16); - - + + vector unsigned char tgt_second = spu_rlqwbyte(second_oneup, -((unsigned int)target%16)); vector unsigned char tgt_first = spu_rlqwbyte(oneup, -((unsigned int)target%16)); - + //alpha: first half of first, second half of second, break at (unsigned int)target%16 src_cmp = spu_splats((unsigned char)((unsigned int)target%16)); gt_res = spu_cmpgt(oneup, src_cmp); @@ -48,13 +48,13 @@ void* libvector_memcpy_unaligned(void* target, void* src, unsigned int num_bytes phase_change = spu_and(sixteen_uchar, cmp_res); vector unsigned int shuffle_mask_alpha = spu_add((vector unsigned int)phase_change, (vector unsigned int)oneup); - + //delta: first half of first, first half of second, break at (unsigned int)target%16 vector unsigned char shuffle_mask_delta = spu_shuffle(oneup, tgt_second, (vector unsigned char)shuffle_mask_alpha); //epsilon: second half of second, second half of first, break at (unsigned int)target%16 vector unsigned char shuffle_mask_epsilon = spu_shuffle(tgt_second, oneup, (vector unsigned char)shuffle_mask_alpha); //zeta: second half of second, first half of first, break at 16 - (unsigned int)target%16 - vector unsigned int shuffle_mask_zeta = spu_rlqwbyte(shuffle_mask_alpha, (unsigned int)target%16); + vector unsigned int shuffle_mask_zeta = spu_rlqwbyte(shuffle_mask_alpha, (unsigned int)target%16); //beta: first half of first, second half of second, break at num_bytes%16 src_cmp = spu_splats((unsigned char)(num_bytes%16)); @@ -64,61 +64,61 @@ void* libvector_memcpy_unaligned(void* target, void* src, unsigned int num_bytes phase_change = spu_and(sixteen_uchar, cmp_res); vector unsigned int shuffle_mask_beta = spu_add((vector unsigned int)phase_change, (vector unsigned int)oneup); - - - - + + + + qword src_past; qword src_present; qword tgt_past; qword tgt_present; - + qword in_temp; qword out_temp0; qword out_temp1; src_past = si_lqd((qword)address_counter_src, 0); tgt_past = si_lqd((qword)address_counter_tgt, 0); - + for(i = 0; i < num_bytes/16; ++i) { - + src_present = si_lqd((qword)address_counter_src, 16); tgt_present = si_lqd((qword)address_counter_tgt, 16); - + in_temp = spu_shuffle(src_present, src_past, (vector unsigned char)shuffle_mask_gamma); - + out_temp0 = spu_shuffle(tgt_past, in_temp, shuffle_mask_delta); out_temp1 = spu_shuffle(tgt_present, in_temp, shuffle_mask_epsilon); si_stqd(out_temp0, (qword)address_counter_tgt, 0); si_stqd(out_temp1, (qword)address_counter_tgt, 16); - + tgt_past = out_temp1; src_past = src_present; address_counter_src = spu_add(address_counter_src, 16); address_counter_tgt = spu_add(address_counter_tgt, 16); - + } - + src_present = si_lqd((qword)address_counter_src, 16); tgt_present = si_lqd((qword)address_counter_tgt, 16); - - + + in_temp = spu_shuffle(src_present, src_past,(vector unsigned char) shuffle_mask_gamma); qword target_temp = spu_shuffle(tgt_present, tgt_past, (vector unsigned char) shuffle_mask_zeta); qword meld = spu_shuffle(in_temp, target_temp, (vector unsigned char)shuffle_mask_beta); - - + + out_temp0 = spu_shuffle(tgt_past, meld, shuffle_mask_delta); out_temp1 = spu_shuffle(tgt_present, meld, shuffle_mask_epsilon); - + si_stqd(out_temp0, (qword)address_counter_tgt, 0); si_stqd(out_temp1, (qword)address_counter_tgt, 16); - + return retval; } @@ -133,9 +133,9 @@ void* mcpy(void* target, void* src, size_t num_bytes){ //put the target and source addresses into qwords vector unsigned int address_counter_tgt = {(unsigned int)target, 0, 0, 0}; vector unsigned int address_counter_src = {(unsigned int)src, 0, 0 ,0}; - + //create shuffle masks - + //shuffle mask building blocks: //all from the first vector vector unsigned char oneup = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, @@ -143,9 +143,9 @@ void* mcpy(void* target, void* src, size_t num_bytes){ //all from the second vector vector unsigned char second_oneup = {0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f}; - - + + //gamma: second half of the second, first half of the first, break at src%16 vector unsigned char src_cmp = spu_splats((unsigned char)(src%16)); vector unsigned char gt_res = spu_cmpgt(oneup, src_cmp); @@ -153,16 +153,16 @@ void* mcpy(void* target, void* src, size_t num_bytes){ vector unsigned char cmp_res = spu_or(gt_res, eq_res); vector unsigned char sixteen_uchar = spu_splats((unsigned char)16); vector unsigned char phase_change = spu_and(sixteen_uchar, cmp_res); - vector unsigned int shuffle_mask_gamma = spu_add((vector unsigned int)phase_change, + vector unsigned int shuffle_mask_gamma = spu_add((vector unsigned int)phase_change, (vector unsigned int)oneup); shuffle_mask_gamma = spu_rlqwbyte(shuffle_mask_gamma, src%16); - - + + vector unsigned char tgt_second = spu_rlqwbyte(second_oneup, -(target%16)); vector unsigned char tgt_first = spu_rlqwbyte(oneup, -(target%16)); - + //alpha: first half of first, second half of second, break at target%16 src_cmp = spu_splats((unsigned char)(target%16)); gt_res = spu_cmpgt(oneup, src_cmp); @@ -171,13 +171,13 @@ void* mcpy(void* target, void* src, size_t num_bytes){ phase_change = spu_and(sixteen_uchar, cmp_res); vector unsigned int shuffle_mask_alpha = spu_add((vector unsigned int)phase_change, (vector unsigned int)oneup); - + //delta: first half of first, first half of second, break at target%16 vector unsigned char shuffle_mask_delta = spu_shuffle(oneup, tgt_second, (vector unsigned char)shuffle_mask_alpha); //epsilon: second half of second, second half of first, break at target%16 vector unsigned char shuffle_mask_epsilon = spu_shuffle(tgt_second, oneup, (vector unsigned char)shuffle_mask_alpha); //zeta: second half of second, first half of first, break at 16 - target%16 - vector unsigned int shuffle_mask_zeta = spu_rlqwbyte(shuffle_mask_alpha, target%16); + vector unsigned int shuffle_mask_zeta = spu_rlqwbyte(shuffle_mask_alpha, target%16); //beta: first half of first, second half of second, break at num_bytes%16 src_cmp = spu_splats((unsigned char)(num_bytes%16)); @@ -187,10 +187,10 @@ void* mcpy(void* target, void* src, size_t num_bytes){ phase_change = spu_and(sixteen_uchar, cmp_res); vector unsigned int shuffle_mask_beta = spu_add((vector unsigned int)phase_change, (vector unsigned int)oneup); - - + + printf("num_bytesmod16 %d\n", num_bytes%16); - printf("beta %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n", + printf("beta %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n", spu_extract((vector unsigned char) shuffle_mask_beta, 0), spu_extract((vector unsigned char) shuffle_mask_beta, 1), spu_extract((vector unsigned char) shuffle_mask_beta, 2), @@ -207,64 +207,64 @@ void* mcpy(void* target, void* src, size_t num_bytes){ spu_extract((vector unsigned char) shuffle_mask_beta, 13), spu_extract((vector unsigned char) shuffle_mask_beta, 14), spu_extract((vector unsigned char) shuffle_mask_beta, 15)); - - - - + + + + qword src_past; qword src_present; qword tgt_past; qword tgt_present; - + qword in_temp; qword out_temp0; qword out_temp1; src_past = si_lqd((qword)address_counter_src, 0); tgt_past = si_lqd((qword)address_counter_tgt, 0); - + for(i = 0; i < num_bytes/16; ++i) { - + src_present = si_lqd((qword)address_counter_src, 16); tgt_present = si_lqd((qword)address_counter_tgt, 16); - + in_temp = spu_shuffle(src_present, src_past, (vector unsigned char)shuffle_mask_gamma); - + out_temp0 = spu_shuffle(tgt_past, in_temp, shuffle_mask_delta); out_temp1 = spu_shuffle(tgt_present, in_temp, shuffle_mask_epsilon); si_stqd(out_temp0, (qword)address_counter_tgt, 0); si_stqd(out_temp1, (qword)address_counter_tgt, 16); - + tgt_past = out_temp1; src_past = src_present; address_counter_src = spu_add(address_counter_src, 16); address_counter_tgt = spu_add(address_counter_tgt, 16); - + } - + src_present = si_lqd((qword)address_counter_src, 16); tgt_present = si_lqd((qword)address_counter_tgt, 16); - - + + in_temp = spu_shuffle(src_present, src_past,(vector unsigned char) shuffle_mask_gamma); qword target_temp = spu_shuffle(tgt_present, tgt_past, (vector unsigned char) shuffle_mask_zeta); qword meld = spu_shuffle(in_temp, target_temp, (vector unsigned char)shuffle_mask_beta); - - + + out_temp0 = spu_shuffle(tgt_past, meld, shuffle_mask_delta); out_temp1 = spu_shuffle(tgt_present, meld, shuffle_mask_epsilon); - + si_stqd(out_temp0, (qword)address_counter_tgt, 0); si_stqd(out_temp1, (qword)address_counter_tgt, 16); return retval; - + } */ /* @@ -286,5 +286,5 @@ int main(){ } printf("\n"); } - + */ diff --git a/volk/spu_lib/spu_memset_unaligned.S b/volk/spu_lib/spu_memset_unaligned.S index a655c4c52..c260a125c 100644 --- a/volk/spu_lib/spu_memset_unaligned.S +++ b/volk/spu_lib/spu_memset_unaligned.S @@ -1,19 +1,19 @@ /* -*- asm -*- */ /* * 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 this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -33,11 +33,11 @@ * size_t i; * for (i = 0; i < n; i++) * p[i] = c; - * + * * return pv; * } */ - + #define p_arg arg1 // we're going to clobber arg1 w/ the return value #define c arg2 // the constant we're writing #define n arg3 // how many bytes to write @@ -50,16 +50,16 @@ #define an r18 // aligned n (n rounded down to mod 16 boundary) #define next_p r19 #define cond1 r20 -#define cond2 r21 +#define cond2 r21 #define m r22 #define r r23 - + PROC_ENTRY(libvector_memset_unaligned) - + // Hint the return from do_head, in case we go that way. // There's pretty much nothing to can do to hint the branch to it. hbrr do_head_br, head_complete - + MR(p, p_arg) // leaves p, the return value, in the correct reg (r3) BRZ_RETURN(n) @@ -69,11 +69,11 @@ head_complete: /* - * preconditions: + * preconditions: * p%16 == 0, n > 0 */ hbrr middle_loop_br, middle_loop - + ROUND_DOWN(an, n, 16) // an is "aligned n" MODULO(n, n, 16) // what's left over in the last quad brz an, do_tail // no whole quad words; skip to tail @@ -96,20 +96,20 @@ middle_loop: stqd c, 4*16(p) stqd c, 5*16(p) stqd c, 6*16(p) - + MR(p, next_p) stqd c, 7*16-128(next_p) or cond2, n, an middle_loop_br: brnz cond1, middle_loop - + /* - * if an and n are both zero, return now + * if an and n are both zero, return now */ BRZ_RETURN(cond2) /* - * otherwise handle last of full quad words + * otherwise handle last of full quad words * * 0 <= an < 128, p%16 == 0 */ @@ -119,18 +119,18 @@ middle2: */ brz an, do_tail hbrr middle2_loop_br, middle2_loop - + .p2align 3 -middle2_loop: +middle2_loop: ai next_p, p, 16 stqd c, 0(p) ai an, an, -16 LMR(p, next_p) middle2_loop_br: brnz an, middle2_loop - + /* We're done with the full quadwords. */ - + /* * Handle the final partial quadword. * We'll be modifying only the left hand portion of the quad. @@ -146,7 +146,7 @@ do_tail: shlqby mask, mask, t1 selb t0, old, c, mask stqd t0, 0(p) -do_tail_ret: +do_tail_ret: RETURN() /* @@ -176,7 +176,7 @@ do_head: MR(t1, p) sf t0, m, r // t0 = r - m a p, p, m // p += m - rotqby mask, mask, t0 // rotate 0's to the right place + rotqby mask, mask, t0 // rotate 0's to the right place sf n, m, n // n -= m selb t0, c, old, mask // merge stqd t0, 0(t1) diff --git a/vrt/README b/vrt/README deleted file mode 100644 index 97719d412..000000000 --- a/vrt/README +++ /dev/null @@ -1,10 +0,0 @@ -The vrt code has been temporarily moved to Eric's Out-of-Tree repository, -pending the "Grand Build System Reorganization". - -To grab the code and build it: - - $ git clone git://gnuradio.org/eb-oot - - $ cd eb-oot/vrt - $ ./bootstrap && ./configure - $ make && make check && make install |