SWIG compilation speedup! Fixes ticket:9.
authoreb <eb@221aa14e-8319-0410-a670-987f0aec2ac5>
Sat, 13 Jan 2007 04:14:56 +0000 (04:14 +0000)
committereb <eb@221aa14e-8319-0410-a670-987f0aec2ac5>
Sat, 13 Jan 2007 04:14:56 +0000 (04:14 +0000)
Merged -r4203:4254 from eb/swig-split into trunk.

This refactors gnuradio_swig_python.{cc,py} into 5 separate .so's
These correspond to the runtime, general, filter and io directories,
and also includes a new directory, gengen.  gengen contains that part
of general that was machine generated.  This split is arbitrary, but
was useful for getting size of the swig generated glue code for
general down to about 2MB.

In addition, the swig glue is now compiled with -g1 -O1 instead of
-g -O2.  With this change all the swig code now compiles in about 60%
of the time that it used to take.

git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@4255 221aa14e-8319-0410-a670-987f0aec2ac5

159 files changed:
Makefile.common
config/grc_gnuradio_core.m4
configure.ac
gnuradio-core/src/lib/Makefile.am
gnuradio-core/src/lib/general/Makefile.am
gnuradio-core/src/lib/general/general.i
gnuradio-core/src/lib/general/generate_all.py [deleted file]
gnuradio-core/src/lib/general/generate_common.py [deleted file]
gnuradio-core/src/lib/general/gr_add_XX.cc.t [deleted file]
gnuradio-core/src/lib/general/gr_add_XX.h.t [deleted file]
gnuradio-core/src/lib/general/gr_add_XX.i.t [deleted file]
gnuradio-core/src/lib/general/gr_add_const_XX.cc.t [deleted file]
gnuradio-core/src/lib/general/gr_add_const_XX.h.t [deleted file]
gnuradio-core/src/lib/general/gr_add_const_XX.i.t [deleted file]
gnuradio-core/src/lib/general/gr_add_const_vXX.cc.t [deleted file]
gnuradio-core/src/lib/general/gr_add_const_vXX.h.t [deleted file]
gnuradio-core/src/lib/general/gr_add_const_vXX.i.t [deleted file]
gnuradio-core/src/lib/general/gr_add_vXX.cc.t [deleted file]
gnuradio-core/src/lib/general/gr_add_vXX.h.t [deleted file]
gnuradio-core/src/lib/general/gr_add_vXX.i.t [deleted file]
gnuradio-core/src/lib/general/gr_chunks_to_symbols_XX.cc.t [deleted file]
gnuradio-core/src/lib/general/gr_chunks_to_symbols_XX.h.t [deleted file]
gnuradio-core/src/lib/general/gr_chunks_to_symbols_XX.i.t [deleted file]
gnuradio-core/src/lib/general/gr_divide_XX.cc.t [deleted file]
gnuradio-core/src/lib/general/gr_divide_XX.h.t [deleted file]
gnuradio-core/src/lib/general/gr_divide_XX.i.t [deleted file]
gnuradio-core/src/lib/general/gr_endianness.h [deleted file]
gnuradio-core/src/lib/general/gr_endianness.i [deleted file]
gnuradio-core/src/lib/general/gr_multiply_XX.cc.t [deleted file]
gnuradio-core/src/lib/general/gr_multiply_XX.h.t [deleted file]
gnuradio-core/src/lib/general/gr_multiply_XX.i.t [deleted file]
gnuradio-core/src/lib/general/gr_multiply_const_XX.cc.t [deleted file]
gnuradio-core/src/lib/general/gr_multiply_const_XX.h.t [deleted file]
gnuradio-core/src/lib/general/gr_multiply_const_XX.i.t [deleted file]
gnuradio-core/src/lib/general/gr_multiply_const_vXX.cc.t [deleted file]
gnuradio-core/src/lib/general/gr_multiply_const_vXX.h.t [deleted file]
gnuradio-core/src/lib/general/gr_multiply_const_vXX.i.t [deleted file]
gnuradio-core/src/lib/general/gr_multiply_vXX.cc.t [deleted file]
gnuradio-core/src/lib/general/gr_multiply_vXX.h.t [deleted file]
gnuradio-core/src/lib/general/gr_multiply_vXX.i.t [deleted file]
gnuradio-core/src/lib/general/gr_mute_XX.cc.t [deleted file]
gnuradio-core/src/lib/general/gr_mute_XX.h.t [deleted file]
gnuradio-core/src/lib/general/gr_mute_XX.i.t [deleted file]
gnuradio-core/src/lib/general/gr_noise_source_X.cc.t [deleted file]
gnuradio-core/src/lib/general/gr_noise_source_X.h.t [deleted file]
gnuradio-core/src/lib/general/gr_noise_source_X.i.t [deleted file]
gnuradio-core/src/lib/general/gr_packed_to_unpacked_XX.cc.t [deleted file]
gnuradio-core/src/lib/general/gr_packed_to_unpacked_XX.h.t [deleted file]
gnuradio-core/src/lib/general/gr_packed_to_unpacked_XX.i.t [deleted file]
gnuradio-core/src/lib/general/gr_sig_source_X.cc.t [deleted file]
gnuradio-core/src/lib/general/gr_sig_source_X.h.t [deleted file]
gnuradio-core/src/lib/general/gr_sig_source_X.i.t [deleted file]
gnuradio-core/src/lib/general/gr_sig_source_waveform.h [deleted file]
gnuradio-core/src/lib/general/gr_sub_XX.cc.t [deleted file]
gnuradio-core/src/lib/general/gr_sub_XX.h.t [deleted file]
gnuradio-core/src/lib/general/gr_sub_XX.i.t [deleted file]
gnuradio-core/src/lib/general/gr_sync_block.cc [deleted file]
gnuradio-core/src/lib/general/gr_sync_block.h [deleted file]
gnuradio-core/src/lib/general/gr_sync_block.i [deleted file]
gnuradio-core/src/lib/general/gr_sync_decimator.cc [deleted file]
gnuradio-core/src/lib/general/gr_sync_decimator.h [deleted file]
gnuradio-core/src/lib/general/gr_sync_decimator.i [deleted file]
gnuradio-core/src/lib/general/gr_sync_interpolator.cc [deleted file]
gnuradio-core/src/lib/general/gr_sync_interpolator.h [deleted file]
gnuradio-core/src/lib/general/gr_sync_interpolator.i [deleted file]
gnuradio-core/src/lib/general/gr_unpacked_to_packed_XX.cc.t [deleted file]
gnuradio-core/src/lib/general/gr_unpacked_to_packed_XX.h.t [deleted file]
gnuradio-core/src/lib/general/gr_unpacked_to_packed_XX.i.t [deleted file]
gnuradio-core/src/lib/general/gr_vector_sink_X.cc.t [deleted file]
gnuradio-core/src/lib/general/gr_vector_sink_X.h.t [deleted file]
gnuradio-core/src/lib/general/gr_vector_sink_X.i.t [deleted file]
gnuradio-core/src/lib/general/gr_vector_source_X.cc.t [deleted file]
gnuradio-core/src/lib/general/gr_vector_source_X.h.t [deleted file]
gnuradio-core/src/lib/general/gr_vector_source_X.i.t [deleted file]
gnuradio-core/src/lib/gengen/Makefile.am [new file with mode: 0644]
gnuradio-core/src/lib/gengen/Makefile.gen [new file with mode: 0644]
gnuradio-core/src/lib/gengen/generate_all.py [new file with mode: 0755]
gnuradio-core/src/lib/gengen/generate_common.py [new file with mode: 0755]
gnuradio-core/src/lib/gengen/gengen.i [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gengen_generated.i [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_add_XX.cc.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_add_XX.h.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_add_XX.i.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_add_const_XX.cc.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_add_const_XX.h.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_add_const_XX.i.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_add_const_vXX.cc.t [new file with mode: 0755]
gnuradio-core/src/lib/gengen/gr_add_const_vXX.h.t [new file with mode: 0755]
gnuradio-core/src/lib/gengen/gr_add_const_vXX.i.t [new file with mode: 0755]
gnuradio-core/src/lib/gengen/gr_add_vXX.cc.t [new file with mode: 0755]
gnuradio-core/src/lib/gengen/gr_add_vXX.h.t [new file with mode: 0755]
gnuradio-core/src/lib/gengen/gr_add_vXX.i.t [new file with mode: 0755]
gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_XX.cc.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_XX.h.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_XX.i.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_divide_XX.cc.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_divide_XX.h.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_divide_XX.i.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_endianness.h [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_endianness.i [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_multiply_XX.cc.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_multiply_XX.h.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_multiply_XX.i.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_multiply_const_XX.cc.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_multiply_const_XX.h.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_multiply_const_XX.i.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_multiply_const_vXX.cc.t [new file with mode: 0755]
gnuradio-core/src/lib/gengen/gr_multiply_const_vXX.h.t [new file with mode: 0755]
gnuradio-core/src/lib/gengen/gr_multiply_const_vXX.i.t [new file with mode: 0755]
gnuradio-core/src/lib/gengen/gr_multiply_vXX.cc.t [new file with mode: 0755]
gnuradio-core/src/lib/gengen/gr_multiply_vXX.h.t [new file with mode: 0755]
gnuradio-core/src/lib/gengen/gr_multiply_vXX.i.t [new file with mode: 0755]
gnuradio-core/src/lib/gengen/gr_mute_XX.cc.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_mute_XX.h.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_mute_XX.i.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_noise_source_X.cc.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_noise_source_X.h.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_noise_source_X.i.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_XX.cc.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_XX.h.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_XX.i.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_sig_source_X.cc.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_sig_source_X.h.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_sig_source_X.i.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_sig_source_waveform.h [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_sub_XX.cc.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_sub_XX.h.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_sub_XX.i.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_XX.cc.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_XX.h.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_XX.i.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_vector_sink_X.cc.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_vector_sink_X.h.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_vector_sink_X.i.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_vector_source_X.cc.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_vector_source_X.h.t [new file with mode: 0644]
gnuradio-core/src/lib/gengen/gr_vector_source_X.i.t [new file with mode: 0644]
gnuradio-core/src/lib/runtime/Makefile.am
gnuradio-core/src/lib/runtime/gr_sync_block.cc [new file with mode: 0644]
gnuradio-core/src/lib/runtime/gr_sync_block.h [new file with mode: 0644]
gnuradio-core/src/lib/runtime/gr_sync_block.i [new file with mode: 0644]
gnuradio-core/src/lib/runtime/gr_sync_decimator.cc [new file with mode: 0644]
gnuradio-core/src/lib/runtime/gr_sync_decimator.h [new file with mode: 0644]
gnuradio-core/src/lib/runtime/gr_sync_decimator.i [new file with mode: 0644]
gnuradio-core/src/lib/runtime/gr_sync_interpolator.cc [new file with mode: 0644]
gnuradio-core/src/lib/runtime/gr_sync_interpolator.h [new file with mode: 0644]
gnuradio-core/src/lib/runtime/gr_sync_interpolator.i [new file with mode: 0644]
gnuradio-core/src/lib/runtime/runtime.i
gnuradio-core/src/lib/swig/Makefile.am
gnuradio-core/src/lib/swig/gnuradio.i
gnuradio-core/src/lib/swig/gnuradio_swig_python.py [new file with mode: 0644]
gnuradio-core/src/lib/swig/sw_filter.i [new file with mode: 0644]
gnuradio-core/src/lib/swig/sw_general.i [new file with mode: 0644]
gnuradio-core/src/lib/swig/sw_gengen.i [new file with mode: 0644]
gnuradio-core/src/lib/swig/sw_io.i [new file with mode: 0644]
gnuradio-examples/python/usrp/Makefile.am
gr-error-correcting-codes/src/lib/libecc/Makefile.am
gr-error-correcting-codes/src/lib/libecc/mld/Makefile.am
run_tests.sh.in

index 31bf0839cc709b075626f822a4f20761902d1d89..e7d928682c435d4b9ec5ea821ce906da367176c3 100644 (file)
@@ -20,6 +20,8 @@
 # Boston, MA 02110-1301, USA.
 # 
 
+AM_CXXFLAGS = @autoconf_default_CXXFLAGS@
+
 # includes
 grincludedir   = $(includedir)/gnuradio
 
@@ -41,6 +43,8 @@ SWIGPYTHONFLAGS = -fvirtual -python -modern
 GNURADIO_INCLUDES = -I$(top_srcdir)/gnuradio-core/src/lib/runtime \
                    -I$(top_srcdir)/gnuradio-core/src/lib/general \
                    -I$(top_builddir)/gnuradio-core/src/lib/general \
+                   -I$(top_srcdir)/gnuradio-core/src/lib/gengen \
+                   -I$(top_builddir)/gnuradio-core/src/lib/gengen \
                    -I$(top_srcdir)/gnuradio-core/src/lib/filter \
                    -I$(top_builddir)/gnuradio-core/src/lib/filter \
                    -I$(top_srcdir)/gnuradio-core/src/lib/reed-solomon \
index 53997c6d3bd7c6dc85a16dd2af58b2cf78b5fcc6..da91f61ee127a42053649b62754a1c8660310549 100644 (file)
@@ -34,6 +34,7 @@ AC_DEFUN([GRC_GNURADIO_CORE],[
         gnuradio-core/src/lib/g72x/Makefile \
         gnuradio-core/src/lib/general/Makefile \
         gnuradio-core/src/lib/general/gr_prefix.cc \
+        gnuradio-core/src/lib/gengen/Makefile \
         gnuradio-core/src/lib/io/Makefile \
         gnuradio-core/src/lib/missing/Makefile \
         gnuradio-core/src/lib/omnithread/Makefile \
@@ -58,7 +59,13 @@ AC_DEFUN([GRC_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])
 
-        dnl kludge up initial swig dependency file
-        AC_CONFIG_COMMANDS([swig_deps], [touch gnuradio-core/src/lib/swig/gnuradio_swig_python.d])
+        dnl kludge up initial swig dependency files
+        AC_CONFIG_COMMANDS([swig_deps],        [
+               touch gnuradio-core/src/lib/swig/gnuradio_swig_py_runtime.d
+               touch gnuradio-core/src/lib/swig/gnuradio_swig_py_general.d
+               touch gnuradio-core/src/lib/swig/gnuradio_swig_py_gengen.d
+               touch gnuradio-core/src/lib/swig/gnuradio_swig_py_filter.d
+               touch gnuradio-core/src/lib/swig/gnuradio_swig_py_io.d
+               ])
     ])
 ])
index 04d16205f0fb5504d44cc2263241a16a5bb84c9a..ceea98c04a9b8172d355ef4bd05ce5ba55ce676a 100644 (file)
@@ -1,4 +1,4 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+dnl Copyright 2001,2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -25,9 +25,34 @@ AC_CANONICAL_TARGET([])
 AM_INIT_AUTOMAKE(gnuradio,3.0svn)
 AC_CONFIG_SRCDIR([gnuradio-core/src/lib/runtime/gr_vmcircbuf.cc])
 
+dnl Remember if the user explicity set CXXFLAGS
+if test -n "${CXXFLAGS}"; then
+  user_set_cxxflags=yes
+fi
+
 GR_X86_64              dnl check for lib64 suffix
 LF_CONFIGURE_CC
 LF_CONFIGURE_CXX
+
+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
+    swig_CXXFLAGS="-g1 -O1"
+  fi
+fi
+AC_SUBST(autoconf_default_CXXFLAGS)
+AC_SUBST(swig_CXXFLAGS)
+
+
 LF_SET_WARNINGS
 GR_SET_GPROF
 GR_SET_PROF
index 05461a05c1c80f8127fdeb49d932e4bbdfbc5139..96a8917006ad61a9167c670ffba3c08103009f3e 100644 (file)
@@ -24,7 +24,7 @@ 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 general g72x reed-solomon omnithread io . swig
+SUBDIRS = missing runtime filter general gengen g72x reed-solomon omnithread io . swig
 
 # generate libgnuradio-core.la from the convenience libraries in subdirs
 
@@ -41,6 +41,7 @@ libgnuradio_core_la_LIBADD  =                 \
        filter/libfilter.la             \
        g72x/libccitt.la                \
        general/libgeneral.la           \
+       gengen/libgengen.la             \
        io/libio.la                     \
        missing/libmissing.la           \
        omnithread/libomnithread.la     \
index c68c28216ebde706a14e3ffb14a233370ef0f7f5..30f6ba1dbc509dc93f24efb4f1c594a840a5a75b 100644 (file)
@@ -25,86 +25,15 @@ INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES)
 
 noinst_LTLIBRARIES = libgeneral.la libgeneral-qa.la
 
-# ----------------------------------------------------------------
-# these scripts generate code
-
-CODE_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_vXX.cc.t                 \
-       gr_add_vXX.h.t                  \
-       gr_add_vXX.i.t                  \
-       gr_add_const_vXX.cc.t           \
-       gr_add_const_vXX.h.t            \
-       gr_add_const_vXX.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_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_vXX.cc.t            \
-       gr_multiply_vXX.h.t             \
-       gr_multiply_vXX.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_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            
-
-# include $(srcdir)/Makefile.gen
-include Makefile.gen
-
-
-$(GENERATED_H) $(GENERATED_I) $(GENERATED_CC): $(CODE_GENERATOR)
-       PYTHONPATH=$(top_srcdir)/gnuradio-core/src/python srcdir=$(srcdir) $(srcdir)/generate_all.py
-
-
-BUILT_SOURCES = $(GENERATED_H) $(GENERATED_I) $(GENERATED_CC)
+BUILT_SOURCES = 
 
 # ----------------------------------------------------------------
 
 EXTRA_DIST =                           \
-       $(CODE_GENERATOR)               \
        gen_sine_table.py               \
        gr_prefix.cc.in                 
 
 libgeneral_la_SOURCES =                \
-       $(GENERATED_CC)                 \
        gr_agc_cc.cc                    \
        gr_agc_ff.cc                    \
        gr_agc2_cc.cc                   \
@@ -192,9 +121,6 @@ libgeneral_la_SOURCES =             \
        gr_stream_to_vector.cc          \
        gr_streams_to_stream.cc         \
        gr_streams_to_vector.cc         \
-       gr_sync_block.cc                \
-       gr_sync_decimator.cc            \
-       gr_sync_interpolator.cc         \
         gr_test.cc                      \
        gr_threshold_ff.cc              \
        gr_throttle.cc                  \
@@ -226,7 +152,6 @@ libgeneral_qa_la_SOURCES =          \
 
 
 grinclude_HEADERS =                    \
-       $(GENERATED_H)                  \
        gr_agc_cc.h                     \
        gr_agc_ff.h                     \
        gr_agc2_cc.h                    \
@@ -255,7 +180,6 @@ grinclude_HEADERS =                         \
        gr_diff_encoder_bb.h            \
        gr_deinterleave.h               \
        gr_diff_phasor_cc.h             \
-       gr_endianness.h                 \
        gr_expj.h                       \
        gr_fake_channel_coder_pp.h      \
        gr_feedforward_agc_cc.h         \
@@ -310,7 +234,6 @@ grinclude_HEADERS =                         \
        gr_rms_cf.h                     \
        gr_rms_ff.h                     \
        gr_short_to_float.h             \
-       gr_sig_source_waveform.h        \
        gr_simple_correlator.h          \
        gr_simple_framer.h              \
        gr_simple_framer_sync.h         \
@@ -322,9 +245,6 @@ grinclude_HEADERS =                         \
        gr_stream_to_vector.h           \
        gr_streams_to_stream.h          \
        gr_streams_to_vector.h          \
-       gr_sync_block.h                 \
-       gr_sync_decimator.h             \
-       gr_sync_interpolator.h          \
         gr_test_types.h                        \
         gr_test.h                      \
        gr_threshold_ff.h               \
@@ -365,9 +285,7 @@ noinst_HEADERS =                    \
        sine_table.h                    
 
 swiginclude_HEADERS =                  \
-       $(GENERATED_I)                  \
        general.i                       \
-       general_generated.i             \
        gr_agc_cc.i                     \
        gr_agc_ff.i                     \
        gr_agc2_cc.i                    \
@@ -394,7 +312,6 @@ swiginclude_HEADERS =                       \
        gr_diff_encoder_bb.i            \
        gr_diff_phasor_cc.i             \
        gr_deinterleave.i               \
-       gr_endianness.i                 \
        gr_fake_channel_coder_pp.i      \
        gr_feedforward_agc_cc.i         \
        gr_feval.i                      \
@@ -448,9 +365,6 @@ swiginclude_HEADERS =                       \
        gr_stream_to_vector.i           \
        gr_streams_to_stream.i          \
        gr_streams_to_vector.i          \
-       gr_sync_block.i                 \
-       gr_sync_decimator.i             \
-       gr_sync_interpolator.i          \
         gr_test.i                      \
        gr_threshold_ff.i               \
        gr_throttle.i                   \
index 01cadcc0dd3486f1929f27293a4ffa8c6f68c969..1bf75299835ef7f3fced74d05d86ce1241594991 100644 (file)
 
 %{
 
-#include <gr_sync_block.h>
-#include <gr_sync_decimator.h>
-#include <gr_sync_interpolator.h>
 #include <gr_nop.h>
 #include <gr_null_sink.h>
 #include <gr_null_source.h>
 #include <gr_head.h>
 #include <gr_skiphead.h>
-#include <gr_sig_source_waveform.h>
+#include <gr_noise_type.h>
 #include <gr_quadrature_demod_cf.h>
 #include <gr_remez.h>
 #include <gr_float_to_complex.h>
 #include <gr_bin_statistics_f.h>
 %}
 
-%include "gr_sync_block.i"
-%include "gr_sync_decimator.i"
-%include "gr_sync_interpolator.i"
 %include "gr_nop.i"
 %include "gr_null_sink.i"
 %include "gr_null_source.i"
 %include "gr_head.i"
 %include "gr_skiphead.i"
-%include "gr_sig_source_waveform.h"
 %include "gr_noise_type.h"
 %include "gr_quadrature_demod_cf.i"
 %include "gr_remez.i"
 %include "gr_ctcss_squelch_ff.i"
 %include "gr_feedforward_agc_cc.i"
 %include "gr_bin_statistics_f.i"
-
-%include "general_generated.i"
diff --git a/gnuradio-core/src/lib/general/generate_all.py b/gnuradio-core/src/lib/general/generate_all.py
deleted file mode 100755 (executable)
index ccb0ab6..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/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 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., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-# 
-
-from build_utils import output_glue
-
-import generate_common
-
-def generate_all ():
-    generate_common.generate ()
-    output_glue ('general')
-
-
-if __name__ == '__main__':
-    generate_all ()
diff --git a/gnuradio-core/src/lib/general/generate_common.py b/gnuradio-core/src/lib/general/generate_common.py
deleted file mode 100755 (executable)
index 5abb15c..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/usr/bin/env python
-#
-# 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 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., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-# 
-
-from build_utils import expand_template, standard_dict
-from build_utils_codes import *
-
-import re
-
-
-# sources and sinks
-ss_signatures = ['s', 'i', 'f', 'c']
-
-ss_roots = [
-    'gr_vector_source_X',
-    'gr_vector_sink_X',
-    'gr_noise_source_X',
-    'gr_sig_source_X'
-    ]
-
-# regular blocks
-reg_signatures = ['ss', 'ii', 'ff', 'cc']
-
-reg_roots = [
-    'gr_add_const_XX',
-    'gr_multiply_const_XX',
-    'gr_add_XX',
-    'gr_sub_XX',
-    'gr_multiply_XX',
-    'gr_divide_XX',
-    'gr_mute_XX',
-    'gr_add_vXX',
-    'gr_multiply_vXX',
-    'gr_add_const_vXX',
-    'gr_multiply_const_vXX'
-    ]
-
-# other blocks
-others = (
-    ('gr_chunks_to_symbols_XX',     ('bf', 'bc', 'sf', 'sc', 'if', 'ic')),
-    ('gr_unpacked_to_packed_XX',    ('bb','ss','ii')),
-    ('gr_packed_to_unpacked_XX',    ('bb','ss','ii'))
-    )
-
-
-def expand_h_cc_i (root, sig):
-    # root looks like 'gr_vector_sink_X'
-    name = re.sub ('X+', sig, root)
-    d = standard_dict (name, sig)
-    expand_template (d, root + '.h.t')
-    expand_template (d, root + '.cc.t')
-    expand_template (d, root + '.i.t')
-
-
-def generate ():
-    expand_h_cc_i ('gr_add_const_XX', 'sf')     # for MC4020
-    expand_h_cc_i ('gr_vector_sink_X', 'b')
-    expand_h_cc_i ('gr_vector_source_X', 'b')
-    for r in ss_roots:
-        for s in ss_signatures:
-            expand_h_cc_i (r, s)
-    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)
-
-
-
-if __name__ == '__main__':
-    generate ()
-
-    
diff --git a/gnuradio-core/src/lib/general/gr_add_XX.cc.t b/gnuradio-core/src/lib/general/gr_add_XX.cc.t
deleted file mode 100644 (file)
index 5b8da60..0000000
+++ /dev/null
@@ -1,62 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME@.h>
-#include <gr_io_signature.h>
-
-@SPTR_NAME@
-gr_make_@BASE_NAME@ ()
-{
-  return @SPTR_NAME@ (new @NAME@ ());
-}
-
-@NAME@::@NAME@ ()
-  : gr_sync_block ("@BASE_NAME@",
-                  gr_make_io_signature (1, -1, sizeof (@I_TYPE@)),
-                  gr_make_io_signature (1,  1, sizeof (@O_TYPE@)))
-{
-}
-
-int
-@NAME@::work (int noutput_items,
-                  gr_vector_const_void_star &input_items,
-                  gr_vector_void_star &output_items)
-{
-  @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
-
-  int ninputs = input_items.size ();
-
-  for (int i = 0; i < noutput_items; i++){
-    @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
-    for (int j = 1; j < ninputs; j++)
-      acc += ((@I_TYPE@ *) input_items[j])[i];
-
-    *optr++ = (@O_TYPE@) acc;
-  }
-  return noutput_items;
-}
diff --git a/gnuradio-core/src/lib/general/gr_add_XX.h.t b/gnuradio-core/src/lib/general/gr_add_XX.h.t
deleted file mode 100644 (file)
index e031b1d..0000000
+++ /dev/null
@@ -1,54 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gr_sync_block.h>
-
-class @NAME@;
-typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ ();
-
-/*!
- * \brief output = sum (input_0, input_1, ...)
- * \ingroup block
- *
- * Add across all input streams.
- */
-class @NAME@ : public gr_sync_block
-{
-  friend @SPTR_NAME@ gr_make_@BASE_NAME@ ();
-
-  @NAME@ ();
-
- 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_add_XX.i.t b/gnuradio-core/src/lib/general/gr_add_XX.i.t
deleted file mode 100644 (file)
index ed19609..0000000
+++ /dev/null
@@ -1,33 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@)
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ ();
-
-class @NAME@ : public gr_sync_block
-{
- private:
-  @NAME@ ();
-};
diff --git a/gnuradio-core/src/lib/general/gr_add_const_XX.cc.t b/gnuradio-core/src/lib/general/gr_add_const_XX.cc.t
deleted file mode 100644 (file)
index 573614f..0000000
+++ /dev/null
@@ -1,72 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME@.h>
-#include <gr_io_signature.h>
-
-@SPTR_NAME@
-gr_make_@BASE_NAME@ (@O_TYPE@ k)
-{
-  return @SPTR_NAME@ (new @NAME@ (k));
-}
-
-@NAME@::@NAME@ (@O_TYPE@ k)
-  : gr_sync_block ("@BASE_NAME@",
-                  gr_make_io_signature (1, 1, sizeof (@I_TYPE@)),
-                  gr_make_io_signature (1, 1, sizeof (@O_TYPE@))),
-    d_k (k)
-{
-}
-
-int
-@NAME@::work (int noutput_items,
-                  gr_vector_const_void_star &input_items,
-                  gr_vector_void_star &output_items)
-{
-  @I_TYPE@ *iptr = (@I_TYPE@ *) input_items[0];
-  @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
-
-  int  size = noutput_items;
-
-  while (size >= 8){
-    *optr++ = *iptr++ + d_k;
-    *optr++ = *iptr++ + d_k;
-    *optr++ = *iptr++ + d_k;
-    *optr++ = *iptr++ + d_k;
-    *optr++ = *iptr++ + d_k;
-    *optr++ = *iptr++ + d_k;
-    *optr++ = *iptr++ + d_k;
-    *optr++ = *iptr++ + d_k;
-    size -= 8;
-  }
-
-  while (size-- > 0)
-    *optr++ = *iptr++ + d_k;
-  
-  return noutput_items;
-}
diff --git a/gnuradio-core/src/lib/general/gr_add_const_XX.h.t b/gnuradio-core/src/lib/general/gr_add_const_XX.h.t
deleted file mode 100644 (file)
index 4ddb33e..0000000
+++ /dev/null
@@ -1,55 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gr_sync_block.h>
-
-class @NAME@;
-typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ (@O_TYPE@ k);
-
-/*!
- * \brief output = input + constant
- * \ingroup block
- */
-class @NAME@ : public gr_sync_block
-{
-  friend @SPTR_NAME@ gr_make_@BASE_NAME@ (@O_TYPE@ k);
-
-  @O_TYPE@     d_k;            // the constant
-  @NAME@ (@O_TYPE@ k);
-
- public:
-  @O_TYPE@ k () const { return d_k; }
-  void set_k (@O_TYPE@ k) { d_k = k; }
-
-  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_add_const_XX.i.t b/gnuradio-core/src/lib/general/gr_add_const_XX.i.t
deleted file mode 100644 (file)
index 1902610..0000000
+++ /dev/null
@@ -1,37 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@)
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ (@TYPE@ k);
-
-class @NAME@ : public gr_sync_block
-{
- private:
-  @NAME@ (@TYPE@ k);
-
- public:
-  @TYPE@ k () const { return d_k; }
-  void set_k (@TYPE@ k) { d_k = k; }
-};
diff --git a/gnuradio-core/src/lib/general/gr_add_const_vXX.cc.t b/gnuradio-core/src/lib/general/gr_add_const_vXX.cc.t
deleted file mode 100755 (executable)
index eba855c..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- 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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME@.h>
-#include <gr_io_signature.h>
-
-@SPTR_NAME@
-gr_make_@BASE_NAME@ (const std::vector<@I_TYPE@> k)
-{
-  return @SPTR_NAME@ (new @NAME@ (k));
-}
-
-@NAME@::@NAME@ (const std::vector<@I_TYPE@> k)
-  : gr_sync_block ("@BASE_NAME@",
-                  gr_make_io_signature (1, 1, sizeof(@I_TYPE@)*k.size()),
-                  gr_make_io_signature (1, 1, sizeof(@O_TYPE@)*k.size()))
-{
-  d_k = k;
-}
-
-int
-@NAME@::work (int noutput_items,
-                  gr_vector_const_void_star &input_items,
-                  gr_vector_void_star &output_items)
-{
-  @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/general/gr_add_const_vXX.h.t b/gnuradio-core/src/lib/general/gr_add_const_vXX.h.t
deleted file mode 100755 (executable)
index c3bb187..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- 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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gr_sync_block.h>
-
-class @NAME@;
-typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ (const std::vector<@I_TYPE@> k);
-
-/*!
- * \brief output vector = input vector + constant vector
- * \ingroup block
- */
-class @NAME@ : public gr_sync_block
-{
-  friend @SPTR_NAME@ gr_make_@BASE_NAME@ (const std::vector<@I_TYPE@> k);
-
-  std::vector<@I_TYPE@> d_k; // the constant
-  @NAME@ (const std::vector<@I_TYPE@> k);
-
- public:
-  const std::vector<@I_TYPE@> k () const { return d_k; }
-  void set_k (const std::vector<@I_TYPE@> k) { d_k = k; }
-
-  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_add_const_vXX.i.t b/gnuradio-core/src/lib/general/gr_add_const_vXX.i.t
deleted file mode 100755 (executable)
index ae52a4e..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- 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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@)
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ (const std::vector<@I_TYPE@> k);
-
-class @NAME@ : public gr_sync_block
-{
- private:
-  @NAME@ (const std::vector<@I_TYPE@> k);
-
- public:
-  std::vector<@I_TYPE@> k () const { return d_k; }
-  void set_k (const std::vector<@I_TYPE@> k) { d_k = k; }
-};
diff --git a/gnuradio-core/src/lib/general/gr_add_vXX.cc.t b/gnuradio-core/src/lib/general/gr_add_vXX.cc.t
deleted file mode 100755 (executable)
index dadf81b..0000000
+++ /dev/null
@@ -1,65 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME@.h>
-#include <gr_io_signature.h>
-
-@SPTR_NAME@
-gr_make_@BASE_NAME@ (size_t nitems_per_block)
-{
-  return @SPTR_NAME@ (new @NAME@ (nitems_per_block));
-}
-
-@NAME@::@NAME@ (size_t nitems_per_block)
-  : gr_sync_block ("@BASE_NAME@",
-                  gr_make_io_signature (1, -1, sizeof (@I_TYPE@)*nitems_per_block),
-                  gr_make_io_signature (1,  1, sizeof (@O_TYPE@)*nitems_per_block))
-{
-}
-
-int
-@NAME@::work (int noutput_items,
-                  gr_vector_const_void_star &input_items,
-                  gr_vector_void_star &output_items)
-{
-  @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
-
-  int ninputs = input_items.size ();
-  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++){
-      @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i*nitems_per_block+j];
-      for (int k = 1; k < ninputs; k++)
-        acc += ((@I_TYPE@ *) input_items[k])[i*nitems_per_block+j];
-
-      *optr++ = (@O_TYPE@) acc;
-    }
-  }
-  return noutput_items;
-}
diff --git a/gnuradio-core/src/lib/general/gr_add_vXX.h.t b/gnuradio-core/src/lib/general/gr_add_vXX.h.t
deleted file mode 100755 (executable)
index 546041e..0000000
+++ /dev/null
@@ -1,54 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gr_sync_block.h>
-
-class @NAME@;
-typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ (size_t nitems_per_block);
-
-/*!
- * \brief output = sum (input_0, input_1, ...)
- * \ingroup block
- *
- * Add across all input vectors.
- */
-class @NAME@ : public gr_sync_block
-{
-  friend @SPTR_NAME@ gr_make_@BASE_NAME@ (size_t nitems_per_block);
-
-  @NAME@ (size_t nitems_per_block);
-
- 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_add_vXX.i.t b/gnuradio-core/src/lib/general/gr_add_vXX.i.t
deleted file mode 100755 (executable)
index bcae7b7..0000000
+++ /dev/null
@@ -1,33 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@)
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ (size_t nitems_per_block);
-
-class @NAME@ : public gr_sync_block
-{
- private:
-  @NAME@ (size_t nitems_per_block);
-};
diff --git a/gnuradio-core/src/lib/general/gr_chunks_to_symbols_XX.cc.t b/gnuradio-core/src/lib/general/gr_chunks_to_symbols_XX.cc.t
deleted file mode 100644 (file)
index ec73f67..0000000
+++ /dev/null
@@ -1,73 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME@.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <iostream>
-
-@SPTR_NAME@
-gr_make_@BASE_NAME@ (const std::vector<@O_TYPE@> &symbol_table, const int D)
-{
-  return @SPTR_NAME@ (new @NAME@ (symbol_table,D));
-}
-
-@NAME@::@NAME@ (const std::vector<@O_TYPE@> &symbol_table, const int D)
-  : gr_sync_interpolator ("@BASE_NAME@",
-                         gr_make_io_signature (1, -1, sizeof (@I_TYPE@)),
-                         gr_make_io_signature (1, -1, sizeof (@O_TYPE@)),
-                         D),
-  d_D (D),
-  d_symbol_table (symbol_table)
-{
-}
-
-int
-@NAME@::work (int noutput_items,
-                       gr_vector_const_void_star &input_items,
-                       gr_vector_void_star &output_items)
-{
-  assert (noutput_items % d_D == 0);
-  assert (input_items.size() == output_items.size());
-  int nstreams = input_items.size();
-
-  for (int m=0;m<nstreams;m++) {
-    const @I_TYPE@ *in = (@I_TYPE@ *) input_items[m];
-    @O_TYPE@ *out = (@O_TYPE@ *) output_items[m];
-
-    // per stream processing
-    for (int i = 0; i < noutput_items / d_D; i++){
-      assert (((unsigned int)in[i]*d_D+d_D) <= d_symbol_table.size());
-      memcpy(out, &d_symbol_table[(unsigned int)in[i]*d_D], d_D*sizeof(@O_TYPE@));
-      out+=d_D;
-    }
-    // end of per stream processing
-
-  }
-  return noutput_items;
-}
diff --git a/gnuradio-core/src/lib/general/gr_chunks_to_symbols_XX.h.t b/gnuradio-core/src/lib/general/gr_chunks_to_symbols_XX.h.t
deleted file mode 100644 (file)
index 2c51537..0000000
+++ /dev/null
@@ -1,72 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gr_sync_interpolator.h>
-
-class @NAME@;
-typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ (const std::vector<@O_TYPE@> &symbol_table, const int D = 1);
-
-/*!
- * \brief Map a stream of symbol indexes (unpacked bytes or shorts) to stream of float or complex onstellation points.in \p D dimensions (\p D = 1 by default)
- * \ingroup block
- *
- * input: stream of @I_TYPE@; output: stream of @O_TYPE@
- *
- * 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 
- * from a stream of bytes or shorts into arbitrary float
- * or complex symbols.
- *
- * \sa gr_packed_to_unpacked_bb, gr_unpacked_to_packed_bb,
- * \sa gr_packed_to_unpacked_ss, gr_unpacked_to_packed_ss,
- * \sa gr_chunks_to_symbols_bf, gr_chunks_to_symbols_bc.
- * \sa gr_chunks_to_symbols_sf, gr_chunks_to_symbols_sc.
- */
-
-class @NAME@ : public gr_sync_interpolator
-{
-  friend @SPTR_NAME@ gr_make_@BASE_NAME@ (const std::vector<@O_TYPE@> &symbol_table, const int D);
-
-  int d_D;
-  std::vector<@O_TYPE@> d_symbol_table;
-  @NAME@ (const std::vector<@O_TYPE@> &symbol_table, const int D = 1);
-
- public:
-  int D () const { return d_D; }
-  std::vector<@O_TYPE@> symbol_table () const { return d_symbol_table; }
-  int work (int noutput_items,
-           gr_vector_const_void_star &input_items,
-           gr_vector_void_star &output_items);
-
-  bool check_topology(int ninputs, int noutputs) { return ninputs == noutputs; }
-};
-
-#endif
diff --git a/gnuradio-core/src/lib/general/gr_chunks_to_symbols_XX.i.t b/gnuradio-core/src/lib/general/gr_chunks_to_symbols_XX.i.t
deleted file mode 100644 (file)
index 075f17d..0000000
+++ /dev/null
@@ -1,37 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@);
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ (const std::vector<@O_TYPE@> &symbol_table, const int D = 1);
-
-class @NAME@ : public gr_sync_interpolator
-{
-private:
-  @NAME@ (const std::vector<@O_TYPE@> &symbol_table, const int D = 1);
-
-public:
-  int D () const { return d_D; }
-  std::vector<@O_TYPE@> symbol_table () const { return d_symbol_table; }
-};
diff --git a/gnuradio-core/src/lib/general/gr_divide_XX.cc.t b/gnuradio-core/src/lib/general/gr_divide_XX.cc.t
deleted file mode 100644 (file)
index b66de15..0000000
+++ /dev/null
@@ -1,71 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME@.h>
-#include <gr_io_signature.h>
-
-@SPTR_NAME@
-gr_make_@BASE_NAME@ ()
-{
-  return @SPTR_NAME@ (new @NAME@ ());
-}
-
-@NAME@::@NAME@ ()
-  : gr_sync_block ("@BASE_NAME@",
-                  gr_make_io_signature (1, -1, sizeof (@I_TYPE@)),
-                  gr_make_io_signature (1,  1, sizeof (@O_TYPE@)))
-{
-}
-
-int
-@NAME@::work (int noutput_items,
-                  gr_vector_const_void_star &input_items,
-                  gr_vector_void_star &output_items)
-{
-  @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
-
-  int ninputs = input_items.size ();
-
-  if (ninputs == 1){           // compute reciprocal
-    for (int i = 0; i < noutput_items; i++)
-      *optr++ = (@O_TYPE@) ((@O_TYPE@) 1 /
-                           ((@I_TYPE@ *) input_items[0])[i]);
-  }
-
-  else {
-    for (int i = 0; i < noutput_items; i++){
-      @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
-      for (int j = 1; j < ninputs; j++)
-       acc /= ((@I_TYPE@ *) input_items[j])[i];
-
-      *optr++ = (@O_TYPE@) acc;
-    }
-  }
-
-  return noutput_items;
-}
diff --git a/gnuradio-core/src/lib/general/gr_divide_XX.h.t b/gnuradio-core/src/lib/general/gr_divide_XX.h.t
deleted file mode 100644 (file)
index 5960d32..0000000
+++ /dev/null
@@ -1,54 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gr_sync_block.h>
-
-class @NAME@;
-typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ ();
-
-/*!
- * \brief output = input_0 / input_1 / input_x ...)
- * \ingroup block
- *
- * Divide across all input streams.
- */
-class @NAME@ : public gr_sync_block
-{
-  friend @SPTR_NAME@ gr_make_@BASE_NAME@ ();
-
-  @NAME@ ();
-
- 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_divide_XX.i.t b/gnuradio-core/src/lib/general/gr_divide_XX.i.t
deleted file mode 100644 (file)
index ed19609..0000000
+++ /dev/null
@@ -1,33 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@)
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ ();
-
-class @NAME@ : public gr_sync_block
-{
- private:
-  @NAME@ ();
-};
diff --git a/gnuradio-core/src/lib/general/gr_endianness.h b/gnuradio-core/src/lib/general/gr_endianness.h
deleted file mode 100644 (file)
index e6ceb43..0000000
+++ /dev/null
@@ -1,27 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-#ifndef INCLUDED_GR_ENDIANNESS_H
-#define INCLUDED_GR_ENDIANNESS_H
-
-typedef enum {GR_MSB_FIRST, GR_LSB_FIRST} gr_endianness_t;
-
-#endif /* INCLUDED_GR_ENDIANNESS_H */
diff --git a/gnuradio-core/src/lib/general/gr_endianness.i b/gnuradio-core/src/lib/general/gr_endianness.i
deleted file mode 100644 (file)
index 8ae57d1..0000000
+++ /dev/null
@@ -1,23 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-%include <gr_endianness.h>
diff --git a/gnuradio-core/src/lib/general/gr_multiply_XX.cc.t b/gnuradio-core/src/lib/general/gr_multiply_XX.cc.t
deleted file mode 100644 (file)
index a6c01b1..0000000
+++ /dev/null
@@ -1,62 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME@.h>
-#include <gr_io_signature.h>
-
-@SPTR_NAME@
-gr_make_@BASE_NAME@ ()
-{
-  return @SPTR_NAME@ (new @NAME@ ());
-}
-
-@NAME@::@NAME@ ()
-  : gr_sync_block ("@BASE_NAME@",
-                  gr_make_io_signature (1, -1, sizeof (@I_TYPE@)),
-                  gr_make_io_signature (1,  1, sizeof (@O_TYPE@)))
-{
-}
-
-int
-@NAME@::work (int noutput_items,
-                  gr_vector_const_void_star &input_items,
-                  gr_vector_void_star &output_items)
-{
-  @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
-
-  int ninputs = input_items.size ();
-
-  for (int i = 0; i < noutput_items; i++){
-    @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
-    for (int j = 1; j < ninputs; j++)
-      acc *= ((@I_TYPE@ *) input_items[j])[i];
-
-    *optr++ = (@O_TYPE@) acc;
-  }
-  return noutput_items;
-}
diff --git a/gnuradio-core/src/lib/general/gr_multiply_XX.h.t b/gnuradio-core/src/lib/general/gr_multiply_XX.h.t
deleted file mode 100644 (file)
index 6605727..0000000
+++ /dev/null
@@ -1,54 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gr_sync_block.h>
-
-class @NAME@;
-typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ ();
-
-/*!
- * \brief output = prod (input_0, input_1, ...)
- * \ingroup block
- *
- * Multiply across all input streams.
- */
-class @NAME@ : public gr_sync_block
-{
-  friend @SPTR_NAME@ gr_make_@BASE_NAME@ ();
-
-  @NAME@ ();
-
- 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_multiply_XX.i.t b/gnuradio-core/src/lib/general/gr_multiply_XX.i.t
deleted file mode 100644 (file)
index ed19609..0000000
+++ /dev/null
@@ -1,33 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@)
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ ();
-
-class @NAME@ : public gr_sync_block
-{
- private:
-  @NAME@ ();
-};
diff --git a/gnuradio-core/src/lib/general/gr_multiply_const_XX.cc.t b/gnuradio-core/src/lib/general/gr_multiply_const_XX.cc.t
deleted file mode 100644 (file)
index 6c42ce0..0000000
+++ /dev/null
@@ -1,72 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME@.h>
-#include <gr_io_signature.h>
-
-@SPTR_NAME@
-gr_make_@BASE_NAME@ (@O_TYPE@ k)
-{
-  return @SPTR_NAME@ (new @NAME@ (k));
-}
-
-@NAME@::@NAME@ (@O_TYPE@ k)
-  : gr_sync_block ("@BASE_NAME@",
-                  gr_make_io_signature (1, 1, sizeof (@I_TYPE@)),
-                  gr_make_io_signature (1, 1, sizeof (@O_TYPE@))),
-    d_k (k)
-{
-}
-
-int
-@NAME@::work (int noutput_items,
-                  gr_vector_const_void_star &input_items,
-                  gr_vector_void_star &output_items)
-{
-  @I_TYPE@ *iptr = (@I_TYPE@ *) input_items[0];
-  @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
-
-  int  size = noutput_items;
-
-  while (size >= 8){
-    *optr++ = *iptr++ * d_k;
-    *optr++ = *iptr++ * d_k;
-    *optr++ = *iptr++ * d_k;
-    *optr++ = *iptr++ * d_k;
-    *optr++ = *iptr++ * d_k;
-    *optr++ = *iptr++ * d_k;
-    *optr++ = *iptr++ * d_k;
-    *optr++ = *iptr++ * d_k;
-    size -= 8;
-  }
-
-  while (size-- > 0)
-    *optr++ = *iptr++ * d_k;
-  
-  return noutput_items;
-}
diff --git a/gnuradio-core/src/lib/general/gr_multiply_const_XX.h.t b/gnuradio-core/src/lib/general/gr_multiply_const_XX.h.t
deleted file mode 100644 (file)
index a15d4b0..0000000
+++ /dev/null
@@ -1,55 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gr_sync_block.h>
-
-class @NAME@;
-typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ (@O_TYPE@ k);
-
-/*!
- * \brief output = input * constant
- * \ingroup block
- */
-class @NAME@ : public gr_sync_block
-{
-  friend @SPTR_NAME@ gr_make_@BASE_NAME@ (@O_TYPE@ k);
-
-  @O_TYPE@     d_k;            // the constant
-  @NAME@ (@O_TYPE@ k);
-
- public:
-  @O_TYPE@ k () const { return d_k; }
-  void set_k (@O_TYPE@ k) { d_k = k; }
-
-  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_multiply_const_XX.i.t b/gnuradio-core/src/lib/general/gr_multiply_const_XX.i.t
deleted file mode 100644 (file)
index 1902610..0000000
+++ /dev/null
@@ -1,37 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@)
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ (@TYPE@ k);
-
-class @NAME@ : public gr_sync_block
-{
- private:
-  @NAME@ (@TYPE@ k);
-
- public:
-  @TYPE@ k () const { return d_k; }
-  void set_k (@TYPE@ k) { d_k = k; }
-};
diff --git a/gnuradio-core/src/lib/general/gr_multiply_const_vXX.cc.t b/gnuradio-core/src/lib/general/gr_multiply_const_vXX.cc.t
deleted file mode 100755 (executable)
index e9033d7..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- 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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME@.h>
-#include <gr_io_signature.h>
-
-@SPTR_NAME@
-gr_make_@BASE_NAME@ (const std::vector<@I_TYPE@> k)
-{
-  return @SPTR_NAME@ (new @NAME@ (k));
-}
-
-@NAME@::@NAME@ (const std::vector<@I_TYPE@> k)
-  : gr_sync_block ("@BASE_NAME@",
-                  gr_make_io_signature (1, 1, sizeof(@I_TYPE@)*k.size()),
-                  gr_make_io_signature (1, 1, sizeof(@O_TYPE@)*k.size()))
-{
-  d_k = k;
-}
-
-int
-@NAME@::work (int noutput_items,
-                  gr_vector_const_void_star &input_items,
-                  gr_vector_void_star &output_items)
-{
-  @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/general/gr_multiply_const_vXX.h.t b/gnuradio-core/src/lib/general/gr_multiply_const_vXX.h.t
deleted file mode 100755 (executable)
index feecffc..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- 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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gr_sync_block.h>
-
-class @NAME@;
-typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ (const std::vector<@I_TYPE@> k);
-
-/*!
- * \brief output vector = input vector * constant vector (element-wise)
- * \ingroup block
- */
-class @NAME@ : public gr_sync_block
-{
-  friend @SPTR_NAME@ gr_make_@BASE_NAME@ (const std::vector<@I_TYPE@> k);
-
-  std::vector<@I_TYPE@> d_k; // the constant
-  @NAME@ (const std::vector<@I_TYPE@> k);
-
- public:
-  const std::vector<@I_TYPE@> k () const { return d_k; }
-  void set_k (const std::vector<@I_TYPE@> k) { d_k = k; }
-
-  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_multiply_const_vXX.i.t b/gnuradio-core/src/lib/general/gr_multiply_const_vXX.i.t
deleted file mode 100755 (executable)
index ae52a4e..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- 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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@)
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ (const std::vector<@I_TYPE@> k);
-
-class @NAME@ : public gr_sync_block
-{
- private:
-  @NAME@ (const std::vector<@I_TYPE@> k);
-
- public:
-  std::vector<@I_TYPE@> k () const { return d_k; }
-  void set_k (const std::vector<@I_TYPE@> k) { d_k = k; }
-};
diff --git a/gnuradio-core/src/lib/general/gr_multiply_vXX.cc.t b/gnuradio-core/src/lib/general/gr_multiply_vXX.cc.t
deleted file mode 100755 (executable)
index 1df4880..0000000
+++ /dev/null
@@ -1,65 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME@.h>
-#include <gr_io_signature.h>
-
-@SPTR_NAME@
-gr_make_@BASE_NAME@ (size_t nitems_per_block)
-{
-  return @SPTR_NAME@ (new @NAME@ (nitems_per_block));
-}
-
-@NAME@::@NAME@ (size_t nitems_per_block)
-  : gr_sync_block ("@BASE_NAME@",
-                  gr_make_io_signature (1, -1, sizeof (@I_TYPE@)*nitems_per_block),
-                  gr_make_io_signature (1,  1, sizeof (@O_TYPE@)*nitems_per_block))
-{
-}
-
-int
-@NAME@::work (int noutput_items,
-                  gr_vector_const_void_star &input_items,
-                  gr_vector_void_star &output_items)
-{
-  @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
-
-  int ninputs = input_items.size ();
-  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++){
-      @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i*nitems_per_block+j];
-      for (int k = 1; k < ninputs; k++)
-        acc *= ((@I_TYPE@ *) input_items[k])[i*nitems_per_block+j];
-
-      *optr++ = (@O_TYPE@) acc;
-    }
-  }
-  return noutput_items;
-}
diff --git a/gnuradio-core/src/lib/general/gr_multiply_vXX.h.t b/gnuradio-core/src/lib/general/gr_multiply_vXX.h.t
deleted file mode 100755 (executable)
index 107adc5..0000000
+++ /dev/null
@@ -1,54 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gr_sync_block.h>
-
-class @NAME@;
-typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ (size_t nitems_per_block);
-
-/*!
- * \brief output = prod (input_0, input_1, ...)
- * \ingroup block
- *
- * Element-wise multiply across all input vectors.
- */
-class @NAME@ : public gr_sync_block
-{
-  friend @SPTR_NAME@ gr_make_@BASE_NAME@ (size_t nitems_per_block);
-
-  @NAME@ (size_t nitems_per_block);
-
- 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_multiply_vXX.i.t b/gnuradio-core/src/lib/general/gr_multiply_vXX.i.t
deleted file mode 100755 (executable)
index bcae7b7..0000000
+++ /dev/null
@@ -1,33 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@)
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ (size_t nitems_per_block);
-
-class @NAME@ : public gr_sync_block
-{
- private:
-  @NAME@ (size_t nitems_per_block);
-};
diff --git a/gnuradio-core/src/lib/general/gr_mute_XX.cc.t b/gnuradio-core/src/lib/general/gr_mute_XX.cc.t
deleted file mode 100644 (file)
index 45f8cb5..0000000
+++ /dev/null
@@ -1,79 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME@.h>
-#include <gr_io_signature.h>
-#include <string.h>
-
-
-@SPTR_NAME@
-gr_make_@BASE_NAME@ (bool mute)
-{
-  return @SPTR_NAME@ (new @NAME@ (mute));
-}
-
-@NAME@::@NAME@ (bool mute)
-  : gr_sync_block ("@BASE_NAME@",
-                  gr_make_io_signature (1, 1, sizeof (@I_TYPE@)),
-                  gr_make_io_signature (1, 1, sizeof (@O_TYPE@))),
-    d_mute (mute)
-{
-}
-
-int
-@NAME@::work (int noutput_items,
-                  gr_vector_const_void_star &input_items,
-                  gr_vector_void_star &output_items)
-{
-  @I_TYPE@ *iptr = (@I_TYPE@ *) input_items[0];
-  @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
-
-  int  size = noutput_items;
-
-  if (d_mute){
-    memset (optr, 0, noutput_items * sizeof(@O_TYPE@));
-  }
-  else {
-    while (size >= 8){
-      *optr++ = *iptr++;
-      *optr++ = *iptr++;
-      *optr++ = *iptr++;
-      *optr++ = *iptr++;
-      *optr++ = *iptr++;
-      *optr++ = *iptr++;
-      *optr++ = *iptr++;
-      *optr++ = *iptr++;
-      size -= 8;
-    }
-
-    while (size-- > 0)
-      *optr++ = *iptr++;
-  }
-  
-  return noutput_items;
-}
diff --git a/gnuradio-core/src/lib/general/gr_mute_XX.h.t b/gnuradio-core/src/lib/general/gr_mute_XX.h.t
deleted file mode 100644 (file)
index bedce71..0000000
+++ /dev/null
@@ -1,55 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gr_sync_block.h>
-
-class @NAME@;
-typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ (bool mute=false);
-
-/*!
- * \brief output = input or zero if muted.
- * \ingroup block
- */
-class @NAME@ : public gr_sync_block
-{
-  friend @SPTR_NAME@ gr_make_@BASE_NAME@ (bool mute);
-
-  bool         d_mute;
-  @NAME@ (bool mute);
-
- public:
-  bool mute () const { return d_mute; }
-  void set_mute (bool mute) { d_mute = mute; }
-
-  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_mute_XX.i.t b/gnuradio-core/src/lib/general/gr_mute_XX.i.t
deleted file mode 100644 (file)
index 559d999..0000000
+++ /dev/null
@@ -1,37 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@)
-
-@SPTR_NAME@ gr_make_@BASE_NAME@(bool mute=false);
-
-class @NAME@ : public gr_sync_block
-{
- private:
-  @NAME@ (bool mute);
-
- public:
-  bool mute () const { return d_mute; }
-  void set_mute (bool mute) { d_mute = mute; }
-};
diff --git a/gnuradio-core/src/lib/general/gr_noise_source_X.cc.t b/gnuradio-core/src/lib/general/gr_noise_source_X.cc.t
deleted file mode 100644 (file)
index 1fec1e5..0000000
+++ /dev/null
@@ -1,99 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <@NAME@.h>
-#include <gr_io_signature.h>
-#include <stdexcept>
-
-
-@NAME@_sptr 
-gr_make_@BASE_NAME@ (gr_noise_type_t type, float ampl, long seed)
-{
-  return @NAME@_sptr (new @NAME@ (type, ampl, seed));
-}
-
-
-@NAME@::@NAME@ (gr_noise_type_t type, float ampl, long seed)
-  : gr_sync_block ("@BASE_NAME@",
-                  gr_make_io_signature (0, 0, 0),
-                  gr_make_io_signature (1, 1, sizeof (@TYPE@))),
-    d_type (type),
-    d_ampl (ampl),
-    d_rng (seed)
-{
-}
-
-int
-@NAME@::work (int noutput_items,
-                  gr_vector_const_void_star &input_items,
-                  gr_vector_void_star &output_items)
-{
-  @TYPE@ *out = (@TYPE@ *) output_items[0];
-  
-  switch (d_type){
-#if @IS_COMPLEX@       // complex?
-
-  case GR_UNIFORM:
-    for (int i = 0; i < noutput_items; i++)
-      out[i] = gr_complex (d_ampl * ((d_rng.ran1 () * 2.0) - 1.0),
-                          d_ampl * ((d_rng.ran1 () * 2.0) - 1.0));
-    break;
-
-  case GR_GAUSSIAN:
-    for (int i = 0; i < noutput_items; i++)
-      out[i] = d_ampl * d_rng.rayleigh_complex ();
-    break;
-
-#else                  // nope...
-
-  case GR_UNIFORM:
-    for (int i = 0; i < noutput_items; i++)
-      out[i] = (@TYPE@)(d_ampl * ((d_rng.ran1 () * 2.0) - 1.0));
-    break;
-
-  case GR_GAUSSIAN:
-    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");
-  }
-
-  return noutput_items;
-}
diff --git a/gnuradio-core/src/lib/general/gr_noise_source_X.h.t b/gnuradio-core/src/lib/general/gr_noise_source_X.h.t
deleted file mode 100644 (file)
index 2071e0e..0000000
+++ /dev/null
@@ -1,63 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gr_sync_block.h>
-#include <gr_noise_type.h>
-#include <gr_random.h>
-
-
-class @NAME@;
-typedef boost::shared_ptr<@NAME@> @NAME@_sptr;
-
-@NAME@_sptr 
-gr_make_@BASE_NAME@ (gr_noise_type_t type, float ampl, long seed = 3021);
-
-/*!
- * \brief random number source
- * \ingroup source
- */
-class @NAME@ : public gr_sync_block {
-  friend @NAME@_sptr 
-  gr_make_@BASE_NAME@ (gr_noise_type_t type, float ampl, long seed);
-
-  gr_noise_type_t      d_type;
-  float                        d_ampl;
-  gr_random            d_rng;
-
-  @NAME@ (gr_noise_type_t type, float ampl, long seed = 3021);
-
- public:
-  void set_type (gr_noise_type_t type) { d_type = type; }
-  void set_amplitude (float ampl) { d_ampl = ampl; }
-
-  virtual 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_noise_source_X.i.t b/gnuradio-core/src/lib/general/gr_noise_source_X.i.t
deleted file mode 100644 (file)
index 0aa1427..0000000
+++ /dev/null
@@ -1,37 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@);
-
-@NAME@_sptr 
-gr_make_@BASE_NAME@ (gr_noise_type_t type, float ampl, long seed = 3021);
-
-class @NAME@ : public gr_block {
- private:
-  @NAME@ (gr_noise_type_t type, float ampl, long seed = 3021);
-
- public:
-  void set_type (gr_noise_type_t type) { d_type = type; }
-  void set_amplitude (float ampl) { d_ampl = ampl; }
-};
diff --git a/gnuradio-core/src/lib/general/gr_packed_to_unpacked_XX.cc.t b/gnuradio-core/src/lib/general/gr_packed_to_unpacked_XX.cc.t
deleted file mode 100644 (file)
index 388def8..0000000
+++ /dev/null
@@ -1,137 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME@.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <gr_log2_const.h>
-
-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@ 
-gr_make_@BASE_NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness)
-{
-  return @SPTR_NAME@ 
-    (new @NAME@ (bits_per_chunk,endianness));
-}
-
-@NAME@::@NAME@ (unsigned int bits_per_chunk, 
-                                                   gr_endianness_t endianness)
-  : gr_block ("@BASE_NAME@",
-             gr_make_io_signature (1, -1, sizeof (@I_TYPE@)),
-             gr_make_io_signature (1, -1, sizeof (@O_TYPE@))),
-    d_bits_per_chunk(bits_per_chunk),d_endianness(endianness),d_index(0)
-{
-  assert (bits_per_chunk <= BITS_PER_TYPE);
-  assert (bits_per_chunk > 0);
-
-  set_relative_rate ((1.0 * BITS_PER_TYPE) / bits_per_chunk);
-}
-
-void
-@NAME@::forecast(int noutput_items, gr_vector_int &ninput_items_required)
-{
-
-  int input_required = (int) ceil((d_index + noutput_items * d_bits_per_chunk) / (1.0 * BITS_PER_TYPE));
-  unsigned ninputs = ninput_items_required.size();
-  for (unsigned int i = 0; i < ninputs; i++) {
-    ninput_items_required[i] = input_required;
-    //printf("Forecast wants %d needs %d\n",noutput_items,ninput_items_required[i]);
-  }
-}
-
-unsigned int
-get_bit_le (const @I_TYPE@ *in_vector,unsigned int bit_addr)
-{
-  @I_TYPE@ x = in_vector[bit_addr>>LOG2_L_TYPE];
-  return (x>>(bit_addr&(BITS_PER_TYPE-1)))&1;
-}
-
-unsigned int
-get_bit_be (const @I_TYPE@ *in_vector,unsigned int bit_addr)
-{
-  @I_TYPE@ x = in_vector[bit_addr>>LOG2_L_TYPE];
-  return (x>>((BITS_PER_TYPE-1)-(bit_addr&(BITS_PER_TYPE-1))))&1;
-}
-
-int
-@NAME@::general_work (int noutput_items,
-                                       gr_vector_int &ninput_items,
-                                       gr_vector_const_void_star &input_items,
-                                       gr_vector_void_star &output_items)
-{
-  unsigned int index_tmp = d_index;
-
-  assert (input_items.size() == output_items.size());
-  int nstreams = input_items.size();
-
-  for (int m=0; m < nstreams; m++){
-    const @I_TYPE@ *in = (@I_TYPE@ *) input_items[m];
-    @O_TYPE@ *out = (@O_TYPE@ *) output_items[m];
-    index_tmp = d_index;
-
-    // per stream processing
-
-    switch (d_endianness){
-
-    case GR_MSB_FIRST:
-      for (int i = 0; i < noutput_items; i++){
-       //printf("here msb %d\n",i);
-       @O_TYPE@ x = 0;
-       for(unsigned int j=0; j<d_bits_per_chunk; j++, index_tmp++)
-         x = (x<<1) | get_bit_be(in, index_tmp);
-       out[i] = x;
-      }
-      break;
-
-    case GR_LSB_FIRST:
-      for (int i = 0; i < noutput_items; i++){
-       //printf("here lsb %d\n",i);
-       @O_TYPE@ x = 0;
-       for(unsigned int j=0; j<d_bits_per_chunk; j++, index_tmp++)
-         x = (x<<1) | get_bit_le(in, index_tmp);
-       out[i] = x;
-      }
-      break;
-
-    default:
-      assert(0);
-    }
-
-    //printf("almost got to end\n");
-    assert(ninput_items[m] >= (int) ((d_index+(BITS_PER_TYPE-1))>>LOG2_L_TYPE));
-  }
-
-  d_index = index_tmp;
-  consume_each (d_index >> LOG2_L_TYPE);
-  d_index = d_index & (BITS_PER_TYPE-1);
-  //printf("got to end\n");
-  return noutput_items;
-}
diff --git a/gnuradio-core/src/lib/general/gr_packed_to_unpacked_XX.h.t b/gnuradio-core/src/lib/general/gr_packed_to_unpacked_XX.h.t
deleted file mode 100644 (file)
index f7aaa68..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- 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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gr_block.h>
-#include <gr_endianness.h>
-
-class @NAME@;
-typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
-
-@SPTR_NAME@ 
-gr_make_@BASE_NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness);
-
-/*!
- * \brief Convert a stream of packed bytes or shorts to stream of unpacked bytes or shorts.
- * \ingroup block
- *
- * input: stream of @I_TYPE@; output: stream of @O_TYPE@
- *
- * This is the inverse of gr_unpacked_to_packed_XX.
- *
- * 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.  
- * 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 
- * arbitrary float or complex symbols.
- *
- * \sa gr_packed_to_unpacked_bb, gr_unpacked_to_packed_bb,
- * \sa gr_packed_to_unpacked_ss, gr_unpacked_to_packed_ss,
- * \sa gr_chunks_to_symbols_bf, gr_chunks_to_symbols_bc.
- * \sa gr_chunks_to_symbols_sf, gr_chunks_to_symbols_sc.
- */
-
-class @NAME@ : public gr_block
-{
-  friend @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);
-
-  unsigned int    d_bits_per_chunk;
-  gr_endianness_t d_endianness;
-  unsigned int    d_index;
-
- public:
-  void forecast(int noutput_items, gr_vector_int &ninput_items_required);
-  int general_work (int noutput_items,
-                   gr_vector_int &ninput_items,
-                   gr_vector_const_void_star &input_items,
-                   gr_vector_void_star &output_items);
-
-  bool check_topology(int ninputs, int noutputs) { return ninputs == noutputs; }
-
-};
-
-#endif
diff --git a/gnuradio-core/src/lib/general/gr_packed_to_unpacked_XX.i.t b/gnuradio-core/src/lib/general/gr_packed_to_unpacked_XX.i.t
deleted file mode 100644 (file)
index 0d5d754..0000000
+++ /dev/null
@@ -1,33 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@);
-
-@SPTR_NAME@ 
-gr_make_@BASE_NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness);
-
-class @NAME@ : public gr_block
-{
-  @NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness);
-};
diff --git a/gnuradio-core/src/lib/general/gr_sig_source_X.cc.t b/gnuradio-core/src/lib/general/gr_sig_source_X.cc.t
deleted file mode 100644 (file)
index 8a09c77..0000000
+++ /dev/null
@@ -1,149 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <@NAME@.h>
-#include <algorithm>
-#include <gr_io_signature.h>
-#include <stdexcept>
-#include <gr_complex.h>
-
-
-@NAME@::@NAME@ (double sampling_freq, gr_waveform_t waveform,
-               double frequency, double ampl, @TYPE@ offset)
-  : gr_sync_block ("@BASE_NAME@",
-                  gr_make_io_signature (0, 0, 0),
-                  gr_make_io_signature (1, 1, sizeof (@TYPE@))),
-    d_sampling_freq (sampling_freq), d_waveform (waveform), d_frequency (frequency),
-    d_ampl (ampl), d_offset (offset)
-{
-  d_nco.set_freq (2 * M_PI * d_frequency / d_sampling_freq);
-}
-
-@NAME@_sptr
-gr_make_@BASE_NAME@ (double sampling_freq, gr_waveform_t waveform,
-                    double frequency, double ampl, @TYPE@ offset)
-{
-  return @NAME@_sptr (new @NAME@ (sampling_freq, waveform, frequency, ampl, offset));
-}
-
-int
-@NAME@::work (int noutput_items,
-                   gr_vector_const_void_star &input_items,
-                   gr_vector_void_star &output_items)
-{
-  @TYPE@ *optr = (@TYPE@ *) output_items[0];
-  @TYPE@ t;
-
-  switch (d_waveform){
-
-#if @IS_COMPLEX@       // complex?
-
-  case GR_CONST_WAVE:
-    t = (gr_complex) d_ampl + d_offset;
-    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);
-    if (d_offset == gr_complex(0,0))
-      break;
-
-    for (int i = 0; i < noutput_items; i++){
-      optr[i] += d_offset;
-    }
-    break;
-
-#else                  // nope...
-
-  case GR_CONST_WAVE:
-    t = (@TYPE@) d_ampl + d_offset;
-    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)
-      break;
-
-    for (int i = 0; i < noutput_items; i++){
-      optr[i] += d_offset;
-    }
-    break;
-
-  case GR_COS_WAVE:
-    d_nco.cos (optr, noutput_items, d_ampl);
-    if (d_offset == 0)
-      break;
-
-    for (int i = 0; i < noutput_items; i++){
-      optr[i] += d_offset;
-    }
-    break;
-#endif
-
-  default:
-    throw std::runtime_error ("gr_sig_source: invalid waveform");
-  }
-
-  return noutput_items;
-}
-
-void
-@NAME@::set_sampling_freq (double sampling_freq)
-{
-  d_sampling_freq = sampling_freq;
-  d_nco.set_freq (2 * M_PI * d_frequency / d_sampling_freq);
-}
-
-void
-@NAME@::set_waveform (gr_waveform_t waveform)
-{
-  d_waveform = waveform;
-}
-
-void
-@NAME@::set_frequency (double frequency)
-{
-  d_frequency = frequency;
-  d_nco.set_freq (2 * M_PI * d_frequency / d_sampling_freq);
-}
-
-void
-@NAME@::set_amplitude (double ampl)
-{
-  d_ampl = ampl;
-}
-
-void
-@NAME@::set_offset (@TYPE@ offset)
-{
-  d_offset = offset;
-}
-
diff --git a/gnuradio-core/src/lib/general/gr_sig_source_X.h.t b/gnuradio-core/src/lib/general/gr_sig_source_X.h.t
deleted file mode 100644 (file)
index ccd18b7..0000000
+++ /dev/null
@@ -1,81 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gr_sync_block.h>
-#include <gr_sig_source_waveform.h>
-#include <gr_fxpt_nco.h>
-
-class @NAME@;
-typedef boost::shared_ptr<@NAME@> @NAME@_sptr;
-
-/*!
- * \brief signal generator with @TYPE@ output.
- * \ingroup source
- */
-
-class @NAME@ : public gr_sync_block {
-  friend @NAME@_sptr 
-  gr_make_@BASE_NAME@ (double sampling_freq, gr_waveform_t waveform,
-                      double frequency, double ampl, @TYPE@ offset);
-
-  double               d_sampling_freq;
-  gr_waveform_t                d_waveform;
-  double               d_frequency;
-  double               d_ampl;
-  @TYPE@               d_offset;
-  gr_fxpt_nco          d_nco;
-
-
-  @NAME@ (double sampling_freq, gr_waveform_t waveform,
-         double wave_freq, double ampl, @TYPE@ offset);
-
- public:
-  virtual int work (int noutput_items,
-                   gr_vector_const_void_star &input_items,
-                   gr_vector_void_star &output_items);
-
-  // ACCESSORS
-  double sampling_freq () const { return d_sampling_freq; }
-  gr_waveform_t waveform () const { return d_waveform; }
-  double frequency () const { return d_frequency; }
-  double amplitude () const { return d_ampl; }
-  @TYPE@ offset () const { return d_offset; }
-
-  // MANIPULATORS
-  void set_sampling_freq (double sampling_freq);
-  void set_waveform (gr_waveform_t waveform);
-  void set_frequency (double frequency);
-  void set_amplitude (double ampl);
-  void set_offset (@TYPE@ offset);
-};
-
-@NAME@_sptr
-gr_make_@BASE_NAME@ (double sampling_freq, gr_waveform_t waveform,
-                    double wave_freq, double ampl, @TYPE@ offset = 0);
-
-
-#endif
diff --git a/gnuradio-core/src/lib/general/gr_sig_source_X.i.t b/gnuradio-core/src/lib/general/gr_sig_source_X.i.t
deleted file mode 100644 (file)
index 8c65c31..0000000
+++ /dev/null
@@ -1,52 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@);
-
-@NAME@_sptr
-gr_make_@BASE_NAME@ (double sampling_freq, gr_waveform_t waveform,
-                    double wave_freq, double ampl, @TYPE@ offset = 0);
-
-
-class @NAME@ : public gr_sync_block {
- private:
-  @NAME@ (double sampling_freq, gr_waveform_t waveform,
-         double wave_freq, double ampl, @TYPE@ offset);
-
- public:
-
-  // ACCESSORS
-  double sampling_freq () const { return d_sampling_freq; }
-  gr_waveform_t waveform () const { return d_waveform; }
-  double frequency () const { return d_frequency; }
-  double amplitude () const { return d_ampl; }
-  @TYPE@ offset () const { return d_offset; }
-
-  // MANIPULATORS
-  void set_sampling_freq (double sampling_freq);
-  void set_waveform (gr_waveform_t waveform);
-  void set_frequency (double frequency);
-  void set_amplitude (double ampl);
-  void set_offset (@TYPE@ offset);
-};
diff --git a/gnuradio-core/src/lib/general/gr_sig_source_waveform.h b/gnuradio-core/src/lib/general/gr_sig_source_waveform.h
deleted file mode 100644 (file)
index 669437a..0000000
+++ /dev/null
@@ -1,29 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-#ifndef INCLUDED_GR_SIG_SOURCE_WAVEFORM_H
-#define INCLUDED_GR_SIG_SOURCE_WAVEFORM_H
-
-typedef enum {
-  GR_CONST_WAVE = 100, GR_SIN_WAVE, GR_COS_WAVE
-} gr_waveform_t;
-
-#endif /* INCLUDED_GR_SIG_SOURCE_WAVEFORM_H */
diff --git a/gnuradio-core/src/lib/general/gr_sub_XX.cc.t b/gnuradio-core/src/lib/general/gr_sub_XX.cc.t
deleted file mode 100644 (file)
index 6c38ff4..0000000
+++ /dev/null
@@ -1,70 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME@.h>
-#include <gr_io_signature.h>
-
-@SPTR_NAME@
-gr_make_@BASE_NAME@ ()
-{
-  return @SPTR_NAME@ (new @NAME@ ());
-}
-
-@NAME@::@NAME@ ()
-  : gr_sync_block ("@BASE_NAME@",
-                  gr_make_io_signature (1, -1, sizeof (@I_TYPE@)),
-                  gr_make_io_signature (1,  1, sizeof (@O_TYPE@)))
-{
-}
-
-int
-@NAME@::work (int noutput_items,
-                  gr_vector_const_void_star &input_items,
-                  gr_vector_void_star &output_items)
-{
-  @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
-
-  int ninputs = input_items.size ();
-
-  if (ninputs == 1){           // negate
-    for (int i = 0; i < noutput_items; i++)
-      *optr++ = (@O_TYPE@) -((@I_TYPE@ *) input_items[0])[i];
-  }
-
-  else {
-    for (int i = 0; i < noutput_items; i++){
-      @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
-      for (int j = 1; j < ninputs; j++)
-       acc -= ((@I_TYPE@ *) input_items[j])[i];
-
-      *optr++ = (@O_TYPE@) acc;
-    }
-  }
-
-  return noutput_items;
-}
diff --git a/gnuradio-core/src/lib/general/gr_sub_XX.h.t b/gnuradio-core/src/lib/general/gr_sub_XX.h.t
deleted file mode 100644 (file)
index 99a4aa6..0000000
+++ /dev/null
@@ -1,54 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gr_sync_block.h>
-
-class @NAME@;
-typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ ();
-
-/*!
- * \brief output = input_0 -  input_1 - ...)
- * \ingroup block
- *
- * Subtract across all input streams.
- */
-class @NAME@ : public gr_sync_block
-{
-  friend @SPTR_NAME@ gr_make_@BASE_NAME@ ();
-
-  @NAME@ ();
-
- 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_sub_XX.i.t b/gnuradio-core/src/lib/general/gr_sub_XX.i.t
deleted file mode 100644 (file)
index ed19609..0000000
+++ /dev/null
@@ -1,33 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@)
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ ();
-
-class @NAME@ : public gr_sync_block
-{
- private:
-  @NAME@ ();
-};
diff --git a/gnuradio-core/src/lib/general/gr_sync_block.cc b/gnuradio-core/src/lib/general/gr_sync_block.cc
deleted file mode 100644 (file)
index ac2e90b..0000000
+++ /dev/null
@@ -1,68 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gr_sync_block.h>
-
-gr_sync_block::gr_sync_block (const std::string &name,
-                             gr_io_signature_sptr input_signature,
-                             gr_io_signature_sptr output_signature)
-  : gr_block(name, input_signature, output_signature)
-{
-  set_fixed_rate(true);
-}
-
-
-void
-gr_sync_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] = fixed_rate_noutput_to_ninput (noutput_items);
-}
-
-int
-gr_sync_block::fixed_rate_noutput_to_ninput(int noutput_items)
-{
-  return noutput_items + history() - 1;
-}
-
-int
-gr_sync_block::fixed_rate_ninput_to_noutput(int ninput_items)
-{
-  return std::max(0, ninput_items - (int)history() + 1);
-}
-
-int
-gr_sync_block::general_work (int noutput_items,
-                            gr_vector_int &ninput_items,
-                            gr_vector_const_void_star &input_items,
-                            gr_vector_void_star &output_items)
-{
-  int  r = work (noutput_items, input_items, output_items);
-  if (r > 0)
-    consume_each (r);
-  return r;
-}
diff --git a/gnuradio-core/src/lib/general/gr_sync_block.h b/gnuradio-core/src/lib/general/gr_sync_block.h
deleted file mode 100644 (file)
index 7607cd1..0000000
+++ /dev/null
@@ -1,65 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_GR_SYNC_BLOCK_H
-#define INCLUDED_GR_SYNC_BLOCK_H
-
-#include <gr_block.h>
-
-/*!
- * \brief synchronous 1:1 input to output with history
- * \ingroup block
- *
- * Override work to provide the signal processing implementation.
- */
-class gr_sync_block : public gr_block
-{
- protected:
-
-  gr_sync_block (const std::string &name,
-                gr_io_signature_sptr input_signature,
-                gr_io_signature_sptr output_signature);
-
- public:
-
-  /*!
-   * \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;
-  
-
-  // gr_sync_block overrides these to assist work
-  void forecast (int noutput_items, gr_vector_int &ninput_items_required);
-  int  general_work (int noutput_items,
-                    gr_vector_int &ninput_items,
-                    gr_vector_const_void_star &input_items,
-                    gr_vector_void_star &output_items);
-
-  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/general/gr_sync_block.i b/gnuradio-core/src/lib/general/gr_sync_block.i
deleted file mode 100644 (file)
index 2bfcd2b..0000000
+++ /dev/null
@@ -1,29 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-class gr_sync_block : public gr_block
-{
- protected:
-
-  gr_sync_block (const std::string &name,
-                gr_io_signature_sptr input_signature,
-                gr_io_signature_sptr output_signature);
-};
diff --git a/gnuradio-core/src/lib/general/gr_sync_decimator.cc b/gnuradio-core/src/lib/general/gr_sync_decimator.cc
deleted file mode 100644 (file)
index 1526cf8..0000000
+++ /dev/null
@@ -1,69 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gr_sync_decimator.h>
-
-gr_sync_decimator::gr_sync_decimator (const std::string &name,
-                                     gr_io_signature_sptr input_signature,
-                                     gr_io_signature_sptr output_signature,
-                                     unsigned decimation)
-  : gr_sync_block (name, input_signature, output_signature)
-{
-  set_decimation (decimation);
-}
-
-void
-gr_sync_decimator::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] = fixed_rate_noutput_to_ninput(noutput_items);
-}
-
-int
-gr_sync_decimator::fixed_rate_noutput_to_ninput(int noutput_items)
-{
-  return noutput_items * decimation() + history() - 1;
-}
-
-int
-gr_sync_decimator::fixed_rate_ninput_to_noutput(int ninput_items)
-{
-  return std::max(0, ninput_items - (int)history() + 1) / decimation();
-}
-
-int
-gr_sync_decimator::general_work (int noutput_items,
-                                gr_vector_int &ninput_items,
-                                gr_vector_const_void_star &input_items,
-                                gr_vector_void_star &output_items)
-{
-  int  r = work (noutput_items, input_items, output_items);
-  if (r > 0)
-    consume_each (r * decimation ());
-  return r;
-}
-
diff --git a/gnuradio-core/src/lib/general/gr_sync_decimator.h b/gnuradio-core/src/lib/general/gr_sync_decimator.h
deleted file mode 100644 (file)
index d6ee14d..0000000
+++ /dev/null
@@ -1,68 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_GR_SYNC_DECIMATOR_H
-#define INCLUDED_GR_SYNC_DECIMATOR_H
-
-#include <gr_sync_block.h>
-
-/*!
- * \brief synchronous N:1 input to output with history
- * \ingroup block
- *
- * Override work to provide the signal processing implementation.
- */
-class gr_sync_decimator : public gr_sync_block
-{
- private:
-  unsigned     d_decimation;
-
- protected:
-
-  gr_sync_decimator (const std::string &name,
-                    gr_io_signature_sptr input_signature,
-                    gr_io_signature_sptr output_signature,
-                    unsigned decimation);
- public:
-
-  unsigned decimation () const { return d_decimation; }
-  void set_decimation (unsigned decimation)
-  {
-    d_decimation = decimation;
-    set_relative_rate (1.0 / decimation);
-  }
-
-  // gr_sync_decimator overrides these to assist work
-  void forecast (int noutput_items, gr_vector_int &ninput_items_required);
-  int  general_work (int noutput_items,
-                    gr_vector_int &ninput_items,
-                    gr_vector_const_void_star &input_items,
-                    gr_vector_void_star &output_items);
-
-  // derived classes should override work
-
-  int fixed_rate_ninput_to_noutput(int ninput);
-  int fixed_rate_noutput_to_ninput(int noutput);
-};
-
-
-#endif /* INCLUDED_GR_SYNC_DECIMATOR_H */
diff --git a/gnuradio-core/src/lib/general/gr_sync_decimator.i b/gnuradio-core/src/lib/general/gr_sync_decimator.i
deleted file mode 100644 (file)
index 167e843..0000000
+++ /dev/null
@@ -1,31 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-class gr_sync_decimator : public gr_sync_block
-{
- protected:
-
-  gr_sync_decimator (const std::string &name,
-                    gr_io_signature_sptr input_signature,
-                    gr_io_signature_sptr output_signature,
-                    unsigned decimation);
-};
diff --git a/gnuradio-core/src/lib/general/gr_sync_interpolator.cc b/gnuradio-core/src/lib/general/gr_sync_interpolator.cc
deleted file mode 100644 (file)
index 0a88cc7..0000000
+++ /dev/null
@@ -1,70 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gr_sync_interpolator.h>
-
-gr_sync_interpolator::gr_sync_interpolator (const std::string &name,
-                                           gr_io_signature_sptr input_signature,
-                                           gr_io_signature_sptr output_signature,
-                                           unsigned interpolation)
-  : gr_sync_block (name, input_signature, output_signature)
-{
-  set_interpolation (interpolation);
-}
-
-void
-gr_sync_interpolator::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] = fixed_rate_noutput_to_ninput(noutput_items);
-}
-
-int
-gr_sync_interpolator::fixed_rate_noutput_to_ninput(int noutput_items)
-{
-  return noutput_items / interpolation() + history() - 1;
-}
-
-int
-gr_sync_interpolator::fixed_rate_ninput_to_noutout(int ninput_items)
-{
-  return std::max(0, ninput_items - (int)history() + 1) * interpolation();
-}
-
-int
-gr_sync_interpolator::general_work (int noutput_items,
-                                   gr_vector_int &ninput_items,
-                                   gr_vector_const_void_star &input_items,
-                                   gr_vector_void_star &output_items)
-{
-  int  r = work (noutput_items, input_items, output_items);
-  if (r > 0)
-    consume_each (r / interpolation ());
-  return r;
-}
-
-
diff --git a/gnuradio-core/src/lib/general/gr_sync_interpolator.h b/gnuradio-core/src/lib/general/gr_sync_interpolator.h
deleted file mode 100644 (file)
index 5151b7f..0000000
+++ /dev/null
@@ -1,68 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_GR_SYNC_INTERPOLATOR_H
-#define INCLUDED_GR_SYNC_INTERPOLATOR_H
-
-#include <gr_sync_block.h>
-
-/*!
- * \brief synchronous 1:N input to output with history
- * \ingroup block
- *
- * Override work to provide the signal processing implementation.
- */
-class gr_sync_interpolator : public gr_sync_block
-{
- private:
-  unsigned     d_interpolation;
-
- protected:
-  gr_sync_interpolator (const std::string &name,
-                       gr_io_signature_sptr input_signature,
-                       gr_io_signature_sptr output_signature,
-                       unsigned interpolation);
- public:
-
-  unsigned interpolation () const { return d_interpolation; }
-  void set_interpolation (unsigned interpolation)
-  {
-    d_interpolation = interpolation;
-    set_relative_rate (1.0 * interpolation);
-    set_output_multiple (interpolation);
-  }
-
-  // gr_sync_interpolator overrides these to assist work
-  void forecast (int noutput_items, gr_vector_int &ninput_items_required);
-  int  general_work (int noutput_items,
-                    gr_vector_int &ninput_items,
-                    gr_vector_const_void_star &input_items,
-                    gr_vector_void_star &output_items);
-
-  // derived classes should override work
-
-  int fixed_rate_ninput_to_noutout(int ninput);
-  int fixed_rate_noutput_to_ninput(int noutput);
-};
-
-
-#endif /* INCLUDED_GR_SYNC_INTERPOLATOR_H */
diff --git a/gnuradio-core/src/lib/general/gr_sync_interpolator.i b/gnuradio-core/src/lib/general/gr_sync_interpolator.i
deleted file mode 100644 (file)
index 5c42dfd..0000000
+++ /dev/null
@@ -1,31 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-class gr_sync_interpolator : public gr_sync_block
-{
- protected:
-
-  gr_sync_interpolator (const std::string &name,
-                       gr_io_signature_sptr input_signature,
-                       gr_io_signature_sptr output_signature,
-                       unsigned interpolation);
-};
diff --git a/gnuradio-core/src/lib/general/gr_unpacked_to_packed_XX.cc.t b/gnuradio-core/src/lib/general/gr_unpacked_to_packed_XX.cc.t
deleted file mode 100644 (file)
index 7db6037..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-/* -*- 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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <@NAME@.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-
-static const unsigned int BITS_PER_TYPE = sizeof(@O_TYPE@) * 8;
-
-
-@SPTR_NAME@ 
-gr_make_@BASE_NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness)
-{
-  return @SPTR_NAME@ 
-    (new @NAME@ (bits_per_chunk,endianness));
-}
-
-@NAME@::@NAME@ (unsigned int bits_per_chunk, 
-                                                   gr_endianness_t endianness)
-  : gr_block ("@BASE_NAME@",
-             gr_make_io_signature (1, -1, sizeof (@I_TYPE@)),
-             gr_make_io_signature (1, -1, sizeof (@O_TYPE@))),
-    d_bits_per_chunk(bits_per_chunk),d_endianness(endianness),d_index(0)
-{
-  assert (bits_per_chunk <= BITS_PER_TYPE);
-  assert (bits_per_chunk > 0);
-
-  set_relative_rate (bits_per_chunk/(1.0 * BITS_PER_TYPE));
-}
-
-void
-@NAME@::forecast(int noutput_items, gr_vector_int &ninput_items_required)
-{
-  int input_required = (int) ceil( (d_index+noutput_items * 1.0 * BITS_PER_TYPE)/d_bits_per_chunk);
-  unsigned ninputs = ninput_items_required.size();
-  for (unsigned int i = 0; i < ninputs; i++) {
-    ninput_items_required[i] = input_required;
-  }
-}
-
-unsigned int
-get_bit_be1 (const @I_TYPE@ *in_vector,unsigned int bit_addr, unsigned int bits_per_chunk) {
-  unsigned int byte_addr = (int)bit_addr/bits_per_chunk;
-  @I_TYPE@ x = in_vector[byte_addr];
-  unsigned int residue = bit_addr - byte_addr * bits_per_chunk;
-  //printf("Bit addr %d  byte addr %d  residue %d  val  %d\n",bit_addr,byte_addr,residue,(x>>(bits_per_chunk-1-residue))&1);
-  return (x >> (bits_per_chunk-1-residue))&1;
-}
-
-int
-@NAME@::general_work (int noutput_items,
-                                       gr_vector_int &ninput_items,
-                                       gr_vector_const_void_star &input_items,
-                                       gr_vector_void_star &output_items)
-{
-  unsigned int index_tmp = d_index;
-
-  assert (input_items.size() == output_items.size());
-  int nstreams = input_items.size();
-
-  for (int m=0; m< nstreams; m++) {
-    const @I_TYPE@ *in = (@I_TYPE@ *) input_items[m];
-    @O_TYPE@ *out = (@O_TYPE@ *) output_items[m];
-    index_tmp=d_index;
-
-    // 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:
-      for(int i=0;i<noutput_items;i++) {
-       @O_TYPE@ tmp=0;
-       for(unsigned int j=0; j<BITS_PER_TYPE; j++) {
-         tmp = (tmp<<1) | get_bit_be1(in,index_tmp,d_bits_per_chunk);
-         index_tmp++;
-       }
-       out[i] = tmp;
-      }
-      break;
-
-    case GR_LSB_FIRST:
-      for(int i=0;i<noutput_items;i++) {
-       unsigned long tmp=0;
-       for(unsigned int j=0; j<BITS_PER_TYPE; j++) {
-         tmp = (tmp>>1)| (get_bit_be1(in,index_tmp,d_bits_per_chunk)<<(BITS_PER_TYPE-1));
-         index_tmp++;
-       }
-       out[i] = tmp;
-      }
-      break;
-      
-    default:
-      assert(0);
-    }
-  }
-
-  d_index = index_tmp;
-  consume_each ((int)(d_index/d_bits_per_chunk));
-  d_index = d_index%d_bits_per_chunk;
-
-  return noutput_items;
-}
diff --git a/gnuradio-core/src/lib/general/gr_unpacked_to_packed_XX.h.t b/gnuradio-core/src/lib/general/gr_unpacked_to_packed_XX.h.t
deleted file mode 100644 (file)
index 04965d9..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- 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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gr_block.h>
-#include <gr_endianness.h>
-
-class @NAME@;
-typedef boost::shared_ptr<@NAME@> @NAME@_sptr;
-
-@SPTR_NAME@ 
-gr_make_@BASE_NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness);
-
-/*!
- * \brief Convert a stream of unpacked bytes or shorts into a stream of packed bytes or shorts.
- * \ingroup block
- *
- * input: stream of @I_TYPE@; output: stream of @O_TYPE@
- *
- * This is the inverse of gr_packed_to_unpacked_XX.
- *
- * The low \p bits_per_chunk bits are extracted from each input byte or short.
- * These bits are then packed densely into the output bytes or shorts, such that
- * all 8 or 16 bits of the output bytes or shorts are filled with valid input bits.
- * 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 arbitrary float
- * or complex symbols.
- *
- * \sa gr_packed_to_unpacked_bb, gr_unpacked_to_packed_bb,
- * \sa gr_packed_to_unpacked_ss, gr_unpacked_to_packed_ss,
- * \sa gr_chunks_to_symbols_bf, gr_chunks_to_symbols_bc.
- * \sa gr_chunks_to_symbols_sf, gr_chunks_to_symbols_sc.
- */
-class @NAME@ : public gr_block
-{
-  friend @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);
-
-  unsigned int    d_bits_per_chunk;
-  gr_endianness_t d_endianness;
-  unsigned int    d_index;
-
- public:
-  void forecast(int noutput_items, gr_vector_int &ninput_items_required);
-  int general_work (int noutput_items,
-                   gr_vector_int &ninput_items,
-                   gr_vector_const_void_star &input_items,
-                   gr_vector_void_star &output_items);
-
-  bool check_topology(int ninputs, int noutputs) { return ninputs == noutputs; }
-};
-
-#endif
diff --git a/gnuradio-core/src/lib/general/gr_unpacked_to_packed_XX.i.t b/gnuradio-core/src/lib/general/gr_unpacked_to_packed_XX.i.t
deleted file mode 100644 (file)
index 715678e..0000000
+++ /dev/null
@@ -1,33 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@);
-
-@SPTR_NAME@
-gr_make_@BASE_NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness);
-
-class @NAME@ : public gr_block
-{
-  @NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness);
-};
diff --git a/gnuradio-core/src/lib/general/gr_vector_sink_X.cc.t b/gnuradio-core/src/lib/general/gr_vector_sink_X.cc.t
deleted file mode 100644 (file)
index f063971..0000000
+++ /dev/null
@@ -1,63 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <@NAME@.h>
-#include <algorithm>
-#include <gr_io_signature.h>
-
-
-@NAME@::@NAME@ ()
-  : gr_sync_block ("@BASE_NAME@",
-              gr_make_io_signature (1, 1, sizeof (@TYPE@)),
-              gr_make_io_signature (0, 0, 0))
-{
-}
-
-int
-@NAME@::work (int noutput_items,
-                   gr_vector_const_void_star &input_items,
-                   gr_vector_void_star &output_items)
-{
-  @TYPE@ *iptr = (@TYPE@ *) input_items[0];
-  for (int i = 0; i < noutput_items; i++)
-    d_data.push_back (iptr[i]);
-
-  return noutput_items;
-}
-
-
-@NAME@_sptr
-gr_make_@BASE_NAME@ ()
-{
-  return @NAME@_sptr (new @NAME@ ());
-}
-
-std::vector<@TYPE@>
-@NAME@::data () const
-{
-  return d_data;
-}
diff --git a/gnuradio-core/src/lib/general/gr_vector_sink_X.h.t b/gnuradio-core/src/lib/general/gr_vector_sink_X.h.t
deleted file mode 100644 (file)
index 43232b5..0000000
+++ /dev/null
@@ -1,55 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gr_sync_block.h>
-
-class @NAME@;
-typedef boost::shared_ptr<@NAME@> @NAME@_sptr;
-
-@NAME@_sptr
-gr_make_@BASE_NAME@ ();
-
-
-/*!
- * \brief @TYPE@ sink that writes to a vector
- * \ingroup sink
- */
-
-class @NAME@ : public gr_sync_block {
-  friend @NAME@_sptr gr_make_@BASE_NAME@ ();
-  std::vector<@TYPE@>  d_data;
-  @NAME@ ();
-
- public:
-  virtual int work (int noutput_items,
-                   gr_vector_const_void_star &input_items,
-                   gr_vector_void_star &output_items);
-
-  std::vector<@TYPE@> data () const;
-};
-
-#endif
diff --git a/gnuradio-core/src/lib/general/gr_vector_sink_X.i.t b/gnuradio-core/src/lib/general/gr_vector_sink_X.i.t
deleted file mode 100644 (file)
index 3dc0f51..0000000
+++ /dev/null
@@ -1,37 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-
-GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@);
-
-@SPTR_NAME@ gr_make_@BASE_NAME@ ();
-
-class @NAME@ : public gr_sync_block {
- private:
-  @NAME@ ();
-
- public:
-  std::vector<@TYPE@> data () const;
-};
-
diff --git a/gnuradio-core/src/lib/general/gr_vector_source_X.cc.t b/gnuradio-core/src/lib/general/gr_vector_source_X.cc.t
deleted file mode 100644 (file)
index 97bb727..0000000
+++ /dev/null
@@ -1,85 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <@NAME@.h>
-#include <algorithm>
-#include <gr_io_signature.h>
-
-
-@NAME@::@NAME@ (const std::vector<@TYPE@> &data, bool repeat)
-  : gr_sync_block ("@BASE_NAME@",
-              gr_make_io_signature (0, 0, 0),
-              gr_make_io_signature (1, 1, sizeof (@TYPE@))),
-    d_data (data),
-    d_repeat (repeat),
-    d_offset (0)
-{
-}
-
-int
-@NAME@::work (int noutput_items,
-                   gr_vector_const_void_star &input_items,
-                   gr_vector_void_star &output_items)
-{
-  @TYPE@ *optr = (@TYPE@ *) output_items[0];
-
-  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; i++){
-      optr[i] = d_data[offset++];
-      if (offset >= size)
-       offset = 0;
-    }
-    d_offset = offset;
-    return noutput_items;
-  }
-
-  else {
-    if (d_offset >= d_data.size ())
-      return -1;                       // Done!
-
-    unsigned n = std::min ((unsigned) d_data.size () - d_offset,
-                          (unsigned) noutput_items);
-    for (unsigned i = 0; i < n; i++)
-      optr[i] = d_data[d_offset + i];
-
-    d_offset += n;
-    return n;
-  }
-}
-
-@NAME@_sptr
-gr_make_@BASE_NAME@ (const std::vector<@TYPE@> &data, bool repeat)
-{
-  return @NAME@_sptr (new @NAME@ (data, repeat));
-}
-
diff --git a/gnuradio-core/src/lib/general/gr_vector_source_X.h.t b/gnuradio-core/src/lib/general/gr_vector_source_X.h.t
deleted file mode 100644 (file)
index ee53869..0000000
+++ /dev/null
@@ -1,57 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-#ifndef @GUARD_NAME@
-#define @GUARD_NAME@
-
-#include <gr_sync_block.h>
-
-class @NAME@;
-typedef boost::shared_ptr<@NAME@> @NAME@_sptr;
-
-/*!
- * \brief source of @TYPE@'s that gets its data from a vector
- * \ingroup source
- */
-
-class @NAME@ : public gr_sync_block {
-  friend @NAME@_sptr 
-  gr_make_@BASE_NAME@ (const std::vector<@TYPE@> &data, bool repeat = false);
-
-  std::vector<@TYPE@>  d_data;
-  bool                 d_repeat;
-  unsigned int         d_offset;
-
-  @NAME@ (const std::vector<@TYPE@> &data, bool repeat);
-
- public:
-  virtual int work (int noutput_items,
-                   gr_vector_const_void_star &input_items,
-                   gr_vector_void_star &output_items);
-};
-
-@NAME@_sptr
-gr_make_@BASE_NAME@ (const std::vector<@TYPE@> &data, bool repeat);
-
-#endif
diff --git a/gnuradio-core/src/lib/general/gr_vector_source_X.i.t b/gnuradio-core/src/lib/general/gr_vector_source_X.i.t
deleted file mode 100644 (file)
index 17aaf1e..0000000
+++ /dev/null
@@ -1,33 +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 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., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-// @WARNING@
-
-GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@);
-
-@NAME@_sptr
-gr_make_@BASE_NAME@ (const std::vector<@TYPE@> &data, bool repeat = false);
-
-class @NAME@ : public gr_sync_block {
- private:
-  @NAME@ (const std::vector<@TYPE@> &data);
-};
diff --git a/gnuradio-core/src/lib/gengen/Makefile.am b/gnuradio-core/src/lib/gengen/Makefile.am
new file mode 100644 (file)
index 0000000..d507463
--- /dev/null
@@ -0,0 +1,123 @@
+#
+# Copyright 2001,2002,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 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., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+# 
+
+include $(top_srcdir)/Makefile.common
+
+INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(CPPUNIT_INCLUDES)
+
+#noinst_LTLIBRARIES = libgengen.la libgengen-qa.la
+noinst_LTLIBRARIES = libgengen.la
+
+# ----------------------------------------------------------------
+# these scripts generate code
+
+CODE_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_vXX.cc.t                 \
+       gr_add_vXX.h.t                  \
+       gr_add_vXX.i.t                  \
+       gr_add_const_vXX.cc.t           \
+       gr_add_const_vXX.h.t            \
+       gr_add_const_vXX.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_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_vXX.cc.t            \
+       gr_multiply_vXX.h.t             \
+       gr_multiply_vXX.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_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            
+
+# include $(srcdir)/Makefile.gen
+include Makefile.gen
+
+
+$(GENERATED_H) $(GENERATED_I) $(GENERATED_CC): $(CODE_GENERATOR)
+       PYTHONPATH=$(top_srcdir)/gnuradio-core/src/python srcdir=$(srcdir) $(srcdir)/generate_all.py
+
+
+BUILT_SOURCES = $(GENERATED_H) $(GENERATED_I) $(GENERATED_CC)
+
+# ----------------------------------------------------------------
+
+EXTRA_DIST =                           \
+       $(CODE_GENERATOR)               
+
+libgengen_la_SOURCES =                         \
+       $(GENERATED_CC)                 
+
+#libgengen_qa_la_SOURCES =             
+
+grinclude_HEADERS =                    \
+       $(GENERATED_H)                  \
+       gr_endianness.h                 \
+       gr_sig_source_waveform.h        
+
+noinst_HEADERS =                       
+
+swiginclude_HEADERS =                  \
+       $(GENERATED_I)                  \
+       gr_endianness.i                 \
+       gengen.i                        \
+       gengen_generated.i              
+
+CLEANFILES = $(BUILT_SOURCES) *.pyc
diff --git a/gnuradio-core/src/lib/gengen/Makefile.gen b/gnuradio-core/src/lib/gengen/Makefile.gen
new file mode 100644 (file)
index 0000000..f0c477e
--- /dev/null
@@ -0,0 +1,234 @@
+#
+# This file is machine generated.  All edits will be overwritten
+#
+GENERATED_H = \
+       gr_add_cc.h \
+       gr_add_const_cc.h \
+       gr_add_const_ff.h \
+       gr_add_const_ii.h \
+       gr_add_const_sf.h \
+       gr_add_const_ss.h \
+       gr_add_const_vcc.h \
+       gr_add_const_vff.h \
+       gr_add_const_vii.h \
+       gr_add_const_vss.h \
+       gr_add_ff.h \
+       gr_add_ii.h \
+       gr_add_ss.h \
+       gr_add_vcc.h \
+       gr_add_vff.h \
+       gr_add_vii.h \
+       gr_add_vss.h \
+       gr_chunks_to_symbols_bc.h \
+       gr_chunks_to_symbols_bf.h \
+       gr_chunks_to_symbols_ic.h \
+       gr_chunks_to_symbols_if.h \
+       gr_chunks_to_symbols_sc.h \
+       gr_chunks_to_symbols_sf.h \
+       gr_divide_cc.h \
+       gr_divide_ff.h \
+       gr_divide_ii.h \
+       gr_divide_ss.h \
+       gr_multiply_cc.h \
+       gr_multiply_const_cc.h \
+       gr_multiply_const_ff.h \
+       gr_multiply_const_ii.h \
+       gr_multiply_const_ss.h \
+       gr_multiply_const_vcc.h \
+       gr_multiply_const_vff.h \
+       gr_multiply_const_vii.h \
+       gr_multiply_const_vss.h \
+       gr_multiply_ff.h \
+       gr_multiply_ii.h \
+       gr_multiply_ss.h \
+       gr_multiply_vcc.h \
+       gr_multiply_vff.h \
+       gr_multiply_vii.h \
+       gr_multiply_vss.h \
+       gr_mute_cc.h \
+       gr_mute_ff.h \
+       gr_mute_ii.h \
+       gr_mute_ss.h \
+       gr_noise_source_c.h \
+       gr_noise_source_f.h \
+       gr_noise_source_i.h \
+       gr_noise_source_s.h \
+       gr_packed_to_unpacked_bb.h \
+       gr_packed_to_unpacked_ii.h \
+       gr_packed_to_unpacked_ss.h \
+       gr_sig_source_c.h \
+       gr_sig_source_f.h \
+       gr_sig_source_i.h \
+       gr_sig_source_s.h \
+       gr_sub_cc.h \
+       gr_sub_ff.h \
+       gr_sub_ii.h \
+       gr_sub_ss.h \
+       gr_unpacked_to_packed_bb.h \
+       gr_unpacked_to_packed_ii.h \
+       gr_unpacked_to_packed_ss.h \
+       gr_vector_sink_b.h \
+       gr_vector_sink_c.h \
+       gr_vector_sink_f.h \
+       gr_vector_sink_i.h \
+       gr_vector_sink_s.h \
+       gr_vector_source_b.h \
+       gr_vector_source_c.h \
+       gr_vector_source_f.h \
+       gr_vector_source_i.h \
+       gr_vector_source_s.h
+
+GENERATED_I = \
+       gr_add_cc.i \
+       gr_add_const_cc.i \
+       gr_add_const_ff.i \
+       gr_add_const_ii.i \
+       gr_add_const_sf.i \
+       gr_add_const_ss.i \
+       gr_add_const_vcc.i \
+       gr_add_const_vff.i \
+       gr_add_const_vii.i \
+       gr_add_const_vss.i \
+       gr_add_ff.i \
+       gr_add_ii.i \
+       gr_add_ss.i \
+       gr_add_vcc.i \
+       gr_add_vff.i \
+       gr_add_vii.i \
+       gr_add_vss.i \
+       gr_chunks_to_symbols_bc.i \
+       gr_chunks_to_symbols_bf.i \
+       gr_chunks_to_symbols_ic.i \
+       gr_chunks_to_symbols_if.i \
+       gr_chunks_to_symbols_sc.i \
+       gr_chunks_to_symbols_sf.i \
+       gr_divide_cc.i \
+       gr_divide_ff.i \
+       gr_divide_ii.i \
+       gr_divide_ss.i \
+       gr_multiply_cc.i \
+       gr_multiply_const_cc.i \
+       gr_multiply_const_ff.i \
+       gr_multiply_const_ii.i \
+       gr_multiply_const_ss.i \
+       gr_multiply_const_vcc.i \
+       gr_multiply_const_vff.i \
+       gr_multiply_const_vii.i \
+       gr_multiply_const_vss.i \
+       gr_multiply_ff.i \
+       gr_multiply_ii.i \
+       gr_multiply_ss.i \
+       gr_multiply_vcc.i \
+       gr_multiply_vff.i \
+       gr_multiply_vii.i \
+       gr_multiply_vss.i \
+       gr_mute_cc.i \
+       gr_mute_ff.i \
+       gr_mute_ii.i \
+       gr_mute_ss.i \
+       gr_noise_source_c.i \
+       gr_noise_source_f.i \
+       gr_noise_source_i.i \
+       gr_noise_source_s.i \
+       gr_packed_to_unpacked_bb.i \
+       gr_packed_to_unpacked_ii.i \
+       gr_packed_to_unpacked_ss.i \
+       gr_sig_source_c.i \
+       gr_sig_source_f.i \
+       gr_sig_source_i.i \
+       gr_sig_source_s.i \
+       gr_sub_cc.i \
+       gr_sub_ff.i \
+       gr_sub_ii.i \
+       gr_sub_ss.i \
+       gr_unpacked_to_packed_bb.i \
+       gr_unpacked_to_packed_ii.i \
+       gr_unpacked_to_packed_ss.i \
+       gr_vector_sink_b.i \
+       gr_vector_sink_c.i \
+       gr_vector_sink_f.i \
+       gr_vector_sink_i.i \
+       gr_vector_sink_s.i \
+       gr_vector_source_b.i \
+       gr_vector_source_c.i \
+       gr_vector_source_f.i \
+       gr_vector_source_i.i \
+       gr_vector_source_s.i
+
+GENERATED_CC = \
+       gr_add_cc.cc \
+       gr_add_const_cc.cc \
+       gr_add_const_ff.cc \
+       gr_add_const_ii.cc \
+       gr_add_const_sf.cc \
+       gr_add_const_ss.cc \
+       gr_add_const_vcc.cc \
+       gr_add_const_vff.cc \
+       gr_add_const_vii.cc \
+       gr_add_const_vss.cc \
+       gr_add_ff.cc \
+       gr_add_ii.cc \
+       gr_add_ss.cc \
+       gr_add_vcc.cc \
+       gr_add_vff.cc \
+       gr_add_vii.cc \
+       gr_add_vss.cc \
+       gr_chunks_to_symbols_bc.cc \
+       gr_chunks_to_symbols_bf.cc \
+       gr_chunks_to_symbols_ic.cc \
+       gr_chunks_to_symbols_if.cc \
+       gr_chunks_to_symbols_sc.cc \
+       gr_chunks_to_symbols_sf.cc \
+       gr_divide_cc.cc \
+       gr_divide_ff.cc \
+       gr_divide_ii.cc \
+       gr_divide_ss.cc \
+       gr_multiply_cc.cc \
+       gr_multiply_const_cc.cc \
+       gr_multiply_const_ff.cc \
+       gr_multiply_const_ii.cc \
+       gr_multiply_const_ss.cc \
+       gr_multiply_const_vcc.cc \
+       gr_multiply_const_vff.cc \
+       gr_multiply_const_vii.cc \
+       gr_multiply_const_vss.cc \
+       gr_multiply_ff.cc \
+       gr_multiply_ii.cc \
+       gr_multiply_ss.cc \
+       gr_multiply_vcc.cc \
+       gr_multiply_vff.cc \
+       gr_multiply_vii.cc \
+       gr_multiply_vss.cc \
+       gr_mute_cc.cc \
+       gr_mute_ff.cc \
+       gr_mute_ii.cc \
+       gr_mute_ss.cc \
+       gr_noise_source_c.cc \
+       gr_noise_source_f.cc \
+       gr_noise_source_i.cc \
+       gr_noise_source_s.cc \
+       gr_packed_to_unpacked_bb.cc \
+       gr_packed_to_unpacked_ii.cc \
+       gr_packed_to_unpacked_ss.cc \
+       gr_sig_source_c.cc \
+       gr_sig_source_f.cc \
+       gr_sig_source_i.cc \
+       gr_sig_source_s.cc \
+       gr_sub_cc.cc \
+       gr_sub_ff.cc \
+       gr_sub_ii.cc \
+       gr_sub_ss.cc \
+       gr_unpacked_to_packed_bb.cc \
+       gr_unpacked_to_packed_ii.cc \
+       gr_unpacked_to_packed_ss.cc \
+       gr_vector_sink_b.cc \
+       gr_vector_sink_c.cc \
+       gr_vector_sink_f.cc \
+       gr_vector_sink_i.cc \
+       gr_vector_sink_s.cc \
+       gr_vector_source_b.cc \
+       gr_vector_source_c.cc \
+       gr_vector_source_f.cc \
+       gr_vector_source_i.cc \
+       gr_vector_source_s.cc
+
diff --git a/gnuradio-core/src/lib/gengen/generate_all.py b/gnuradio-core/src/lib/gengen/generate_all.py
new file mode 100755 (executable)
index 0000000..191924c
--- /dev/null
@@ -0,0 +1,33 @@
+#!/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 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., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+# 
+
+from build_utils import output_glue
+
+import generate_common
+
+def generate_all ():
+    generate_common.generate ()
+    output_glue ('gengen')
+
+
+if __name__ == '__main__':
+    generate_all ()
diff --git a/gnuradio-core/src/lib/gengen/generate_common.py b/gnuradio-core/src/lib/gengen/generate_common.py
new file mode 100755 (executable)
index 0000000..5abb15c
--- /dev/null
@@ -0,0 +1,93 @@
+#!/usr/bin/env python
+#
+# 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 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., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+# 
+
+from build_utils import expand_template, standard_dict
+from build_utils_codes import *
+
+import re
+
+
+# sources and sinks
+ss_signatures = ['s', 'i', 'f', 'c']
+
+ss_roots = [
+    'gr_vector_source_X',
+    'gr_vector_sink_X',
+    'gr_noise_source_X',
+    'gr_sig_source_X'
+    ]
+
+# regular blocks
+reg_signatures = ['ss', 'ii', 'ff', 'cc']
+
+reg_roots = [
+    'gr_add_const_XX',
+    'gr_multiply_const_XX',
+    'gr_add_XX',
+    'gr_sub_XX',
+    'gr_multiply_XX',
+    'gr_divide_XX',
+    'gr_mute_XX',
+    'gr_add_vXX',
+    'gr_multiply_vXX',
+    'gr_add_const_vXX',
+    'gr_multiply_const_vXX'
+    ]
+
+# other blocks
+others = (
+    ('gr_chunks_to_symbols_XX',     ('bf', 'bc', 'sf', 'sc', 'if', 'ic')),
+    ('gr_unpacked_to_packed_XX',    ('bb','ss','ii')),
+    ('gr_packed_to_unpacked_XX',    ('bb','ss','ii'))
+    )
+
+
+def expand_h_cc_i (root, sig):
+    # root looks like 'gr_vector_sink_X'
+    name = re.sub ('X+', sig, root)
+    d = standard_dict (name, sig)
+    expand_template (d, root + '.h.t')
+    expand_template (d, root + '.cc.t')
+    expand_template (d, root + '.i.t')
+
+
+def generate ():
+    expand_h_cc_i ('gr_add_const_XX', 'sf')     # for MC4020
+    expand_h_cc_i ('gr_vector_sink_X', 'b')
+    expand_h_cc_i ('gr_vector_source_X', 'b')
+    for r in ss_roots:
+        for s in ss_signatures:
+            expand_h_cc_i (r, s)
+    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)
+
+
+
+if __name__ == '__main__':
+    generate ()
+
+    
diff --git a/gnuradio-core/src/lib/gengen/gengen.i b/gnuradio-core/src/lib/gengen/gengen.i
new file mode 100644 (file)
index 0000000..4047e43
--- /dev/null
@@ -0,0 +1,9 @@
+%{
+#include "gr_endianness.h"
+#include "gr_sig_source_waveform.h"
+%}
+
+%include "gr_endianness.i"
+%include "gr_sig_source_waveform.h"
+
+%include "gengen_generated.i"
diff --git a/gnuradio-core/src/lib/gengen/gengen_generated.i b/gnuradio-core/src/lib/gengen/gengen_generated.i
new file mode 100644 (file)
index 0000000..a41f30a
--- /dev/null
@@ -0,0 +1,156 @@
+//
+// This file is machine generated.  All edits will be overwritten
+//
+%{
+#include <gr_add_cc.h>
+#include <gr_add_const_cc.h>
+#include <gr_add_const_ff.h>
+#include <gr_add_const_ii.h>
+#include <gr_add_const_sf.h>
+#include <gr_add_const_ss.h>
+#include <gr_add_const_vcc.h>
+#include <gr_add_const_vff.h>
+#include <gr_add_const_vii.h>
+#include <gr_add_const_vss.h>
+#include <gr_add_ff.h>
+#include <gr_add_ii.h>
+#include <gr_add_ss.h>
+#include <gr_add_vcc.h>
+#include <gr_add_vff.h>
+#include <gr_add_vii.h>
+#include <gr_add_vss.h>
+#include <gr_chunks_to_symbols_bc.h>
+#include <gr_chunks_to_symbols_bf.h>
+#include <gr_chunks_to_symbols_ic.h>
+#include <gr_chunks_to_symbols_if.h>
+#include <gr_chunks_to_symbols_sc.h>
+#include <gr_chunks_to_symbols_sf.h>
+#include <gr_divide_cc.h>
+#include <gr_divide_ff.h>
+#include <gr_divide_ii.h>
+#include <gr_divide_ss.h>
+#include <gr_multiply_cc.h>
+#include <gr_multiply_const_cc.h>
+#include <gr_multiply_const_ff.h>
+#include <gr_multiply_const_ii.h>
+#include <gr_multiply_const_ss.h>
+#include <gr_multiply_const_vcc.h>
+#include <gr_multiply_const_vff.h>
+#include <gr_multiply_const_vii.h>
+#include <gr_multiply_const_vss.h>
+#include <gr_multiply_ff.h>
+#include <gr_multiply_ii.h>
+#include <gr_multiply_ss.h>
+#include <gr_multiply_vcc.h>
+#include <gr_multiply_vff.h>
+#include <gr_multiply_vii.h>
+#include <gr_multiply_vss.h>
+#include <gr_mute_cc.h>
+#include <gr_mute_ff.h>
+#include <gr_mute_ii.h>
+#include <gr_mute_ss.h>
+#include <gr_noise_source_c.h>
+#include <gr_noise_source_f.h>
+#include <gr_noise_source_i.h>
+#include <gr_noise_source_s.h>
+#include <gr_packed_to_unpacked_bb.h>
+#include <gr_packed_to_unpacked_ii.h>
+#include <gr_packed_to_unpacked_ss.h>
+#include <gr_sig_source_c.h>
+#include <gr_sig_source_f.h>
+#include <gr_sig_source_i.h>
+#include <gr_sig_source_s.h>
+#include <gr_sub_cc.h>
+#include <gr_sub_ff.h>
+#include <gr_sub_ii.h>
+#include <gr_sub_ss.h>
+#include <gr_unpacked_to_packed_bb.h>
+#include <gr_unpacked_to_packed_ii.h>
+#include <gr_unpacked_to_packed_ss.h>
+#include <gr_vector_sink_b.h>
+#include <gr_vector_sink_c.h>
+#include <gr_vector_sink_f.h>
+#include <gr_vector_sink_i.h>
+#include <gr_vector_sink_s.h>
+#include <gr_vector_source_b.h>
+#include <gr_vector_source_c.h>
+#include <gr_vector_source_f.h>
+#include <gr_vector_source_i.h>
+#include <gr_vector_source_s.h>
+%}
+
+%include <gr_add_cc.i>
+%include <gr_add_const_cc.i>
+%include <gr_add_const_ff.i>
+%include <gr_add_const_ii.i>
+%include <gr_add_const_sf.i>
+%include <gr_add_const_ss.i>
+%include <gr_add_const_vcc.i>
+%include <gr_add_const_vff.i>
+%include <gr_add_const_vii.i>
+%include <gr_add_const_vss.i>
+%include <gr_add_ff.i>
+%include <gr_add_ii.i>
+%include <gr_add_ss.i>
+%include <gr_add_vcc.i>
+%include <gr_add_vff.i>
+%include <gr_add_vii.i>
+%include <gr_add_vss.i>
+%include <gr_chunks_to_symbols_bc.i>
+%include <gr_chunks_to_symbols_bf.i>
+%include <gr_chunks_to_symbols_ic.i>
+%include <gr_chunks_to_symbols_if.i>
+%include <gr_chunks_to_symbols_sc.i>
+%include <gr_chunks_to_symbols_sf.i>
+%include <gr_divide_cc.i>
+%include <gr_divide_ff.i>
+%include <gr_divide_ii.i>
+%include <gr_divide_ss.i>
+%include <gr_multiply_cc.i>
+%include <gr_multiply_const_cc.i>
+%include <gr_multiply_const_ff.i>
+%include <gr_multiply_const_ii.i>
+%include <gr_multiply_const_ss.i>
+%include <gr_multiply_const_vcc.i>
+%include <gr_multiply_const_vff.i>
+%include <gr_multiply_const_vii.i>
+%include <gr_multiply_const_vss.i>
+%include <gr_multiply_ff.i>
+%include <gr_multiply_ii.i>
+%include <gr_multiply_ss.i>
+%include <gr_multiply_vcc.i>
+%include <gr_multiply_vff.i>
+%include <gr_multiply_vii.i>
+%include <gr_multiply_vss.i>
+%include <gr_mute_cc.i>
+%include <gr_mute_ff.i>
+%include <gr_mute_ii.i>
+%include <gr_mute_ss.i>
+%include <gr_noise_source_c.i>
+%include <gr_noise_source_f.i>
+%include <gr_noise_source_i.i>
+%include <gr_noise_source_s.i>
+%include <gr_packed_to_unpacked_bb.i>
+%include <gr_packed_to_unpacked_ii.i>
+%include <gr_packed_to_unpacked_ss.i>
+%include <gr_sig_source_c.i>
+%include <gr_sig_source_f.i>
+%include <gr_sig_source_i.i>
+%include <gr_sig_source_s.i>
+%include <gr_sub_cc.i>
+%include <gr_sub_ff.i>
+%include <gr_sub_ii.i>
+%include <gr_sub_ss.i>
+%include <gr_unpacked_to_packed_bb.i>
+%include <gr_unpacked_to_packed_ii.i>
+%include <gr_unpacked_to_packed_ss.i>
+%include <gr_vector_sink_b.i>
+%include <gr_vector_sink_c.i>
+%include <gr_vector_sink_f.i>
+%include <gr_vector_sink_i.i>
+%include <gr_vector_sink_s.i>
+%include <gr_vector_source_b.i>
+%include <gr_vector_source_c.i>
+%include <gr_vector_source_f.i>
+%include <gr_vector_source_i.i>
+%include <gr_vector_source_s.i>
diff --git a/gnuradio-core/src/lib/gengen/gr_add_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_add_XX.cc.t
new file mode 100644 (file)
index 0000000..5b8da60
--- /dev/null
@@ -0,0 +1,62 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <@NAME@.h>
+#include <gr_io_signature.h>
+
+@SPTR_NAME@
+gr_make_@BASE_NAME@ ()
+{
+  return @SPTR_NAME@ (new @NAME@ ());
+}
+
+@NAME@::@NAME@ ()
+  : gr_sync_block ("@BASE_NAME@",
+                  gr_make_io_signature (1, -1, sizeof (@I_TYPE@)),
+                  gr_make_io_signature (1,  1, sizeof (@O_TYPE@)))
+{
+}
+
+int
+@NAME@::work (int noutput_items,
+                  gr_vector_const_void_star &input_items,
+                  gr_vector_void_star &output_items)
+{
+  @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
+
+  int ninputs = input_items.size ();
+
+  for (int i = 0; i < noutput_items; i++){
+    @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
+    for (int j = 1; j < ninputs; j++)
+      acc += ((@I_TYPE@ *) input_items[j])[i];
+
+    *optr++ = (@O_TYPE@) acc;
+  }
+  return noutput_items;
+}
diff --git a/gnuradio-core/src/lib/gengen/gr_add_XX.h.t b/gnuradio-core/src/lib/gengen/gr_add_XX.h.t
new file mode 100644 (file)
index 0000000..e031b1d
--- /dev/null
@@ -0,0 +1,54 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <gr_sync_block.h>
+
+class @NAME@;
+typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ ();
+
+/*!
+ * \brief output = sum (input_0, input_1, ...)
+ * \ingroup block
+ *
+ * Add across all input streams.
+ */
+class @NAME@ : public gr_sync_block
+{
+  friend @SPTR_NAME@ gr_make_@BASE_NAME@ ();
+
+  @NAME@ ();
+
+ 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/gengen/gr_add_XX.i.t b/gnuradio-core/src/lib/gengen/gr_add_XX.i.t
new file mode 100644 (file)
index 0000000..ed19609
--- /dev/null
@@ -0,0 +1,33 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@)
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ ();
+
+class @NAME@ : public gr_sync_block
+{
+ private:
+  @NAME@ ();
+};
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
new file mode 100644 (file)
index 0000000..573614f
--- /dev/null
@@ -0,0 +1,72 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <@NAME@.h>
+#include <gr_io_signature.h>
+
+@SPTR_NAME@
+gr_make_@BASE_NAME@ (@O_TYPE@ k)
+{
+  return @SPTR_NAME@ (new @NAME@ (k));
+}
+
+@NAME@::@NAME@ (@O_TYPE@ k)
+  : gr_sync_block ("@BASE_NAME@",
+                  gr_make_io_signature (1, 1, sizeof (@I_TYPE@)),
+                  gr_make_io_signature (1, 1, sizeof (@O_TYPE@))),
+    d_k (k)
+{
+}
+
+int
+@NAME@::work (int noutput_items,
+                  gr_vector_const_void_star &input_items,
+                  gr_vector_void_star &output_items)
+{
+  @I_TYPE@ *iptr = (@I_TYPE@ *) input_items[0];
+  @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
+
+  int  size = noutput_items;
+
+  while (size >= 8){
+    *optr++ = *iptr++ + d_k;
+    *optr++ = *iptr++ + d_k;
+    *optr++ = *iptr++ + d_k;
+    *optr++ = *iptr++ + d_k;
+    *optr++ = *iptr++ + d_k;
+    *optr++ = *iptr++ + d_k;
+    *optr++ = *iptr++ + d_k;
+    *optr++ = *iptr++ + d_k;
+    size -= 8;
+  }
+
+  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
new file mode 100644 (file)
index 0000000..4ddb33e
--- /dev/null
@@ -0,0 +1,55 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <gr_sync_block.h>
+
+class @NAME@;
+typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ (@O_TYPE@ k);
+
+/*!
+ * \brief output = input + constant
+ * \ingroup block
+ */
+class @NAME@ : public gr_sync_block
+{
+  friend @SPTR_NAME@ gr_make_@BASE_NAME@ (@O_TYPE@ k);
+
+  @O_TYPE@     d_k;            // the constant
+  @NAME@ (@O_TYPE@ k);
+
+ public:
+  @O_TYPE@ k () const { return d_k; }
+  void set_k (@O_TYPE@ k) { d_k = k; }
+
+  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/gengen/gr_add_const_XX.i.t b/gnuradio-core/src/lib/gengen/gr_add_const_XX.i.t
new file mode 100644 (file)
index 0000000..1902610
--- /dev/null
@@ -0,0 +1,37 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@)
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ (@TYPE@ k);
+
+class @NAME@ : public gr_sync_block
+{
+ private:
+  @NAME@ (@TYPE@ k);
+
+ public:
+  @TYPE@ k () const { return d_k; }
+  void set_k (@TYPE@ k) { d_k = k; }
+};
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
new file mode 100755 (executable)
index 0000000..eba855c
--- /dev/null
@@ -0,0 +1,61 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <@NAME@.h>
+#include <gr_io_signature.h>
+
+@SPTR_NAME@
+gr_make_@BASE_NAME@ (const std::vector<@I_TYPE@> k)
+{
+  return @SPTR_NAME@ (new @NAME@ (k));
+}
+
+@NAME@::@NAME@ (const std::vector<@I_TYPE@> k)
+  : gr_sync_block ("@BASE_NAME@",
+                  gr_make_io_signature (1, 1, sizeof(@I_TYPE@)*k.size()),
+                  gr_make_io_signature (1, 1, sizeof(@O_TYPE@)*k.size()))
+{
+  d_k = k;
+}
+
+int
+@NAME@::work (int noutput_items,
+                  gr_vector_const_void_star &input_items,
+                  gr_vector_void_star &output_items)
+{
+  @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
new file mode 100755 (executable)
index 0000000..c3bb187
--- /dev/null
@@ -0,0 +1,55 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <gr_sync_block.h>
+
+class @NAME@;
+typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ (const std::vector<@I_TYPE@> k);
+
+/*!
+ * \brief output vector = input vector + constant vector
+ * \ingroup block
+ */
+class @NAME@ : public gr_sync_block
+{
+  friend @SPTR_NAME@ gr_make_@BASE_NAME@ (const std::vector<@I_TYPE@> k);
+
+  std::vector<@I_TYPE@> d_k; // the constant
+  @NAME@ (const std::vector<@I_TYPE@> k);
+
+ public:
+  const std::vector<@I_TYPE@> k () const { return d_k; }
+  void set_k (const std::vector<@I_TYPE@> k) { d_k = k; }
+
+  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/gengen/gr_add_const_vXX.i.t b/gnuradio-core/src/lib/gengen/gr_add_const_vXX.i.t
new file mode 100755 (executable)
index 0000000..ae52a4e
--- /dev/null
@@ -0,0 +1,37 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@)
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ (const std::vector<@I_TYPE@> k);
+
+class @NAME@ : public gr_sync_block
+{
+ private:
+  @NAME@ (const std::vector<@I_TYPE@> k);
+
+ public:
+  std::vector<@I_TYPE@> k () const { return d_k; }
+  void set_k (const std::vector<@I_TYPE@> k) { d_k = k; }
+};
diff --git a/gnuradio-core/src/lib/gengen/gr_add_vXX.cc.t b/gnuradio-core/src/lib/gengen/gr_add_vXX.cc.t
new file mode 100755 (executable)
index 0000000..dadf81b
--- /dev/null
@@ -0,0 +1,65 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <@NAME@.h>
+#include <gr_io_signature.h>
+
+@SPTR_NAME@
+gr_make_@BASE_NAME@ (size_t nitems_per_block)
+{
+  return @SPTR_NAME@ (new @NAME@ (nitems_per_block));
+}
+
+@NAME@::@NAME@ (size_t nitems_per_block)
+  : gr_sync_block ("@BASE_NAME@",
+                  gr_make_io_signature (1, -1, sizeof (@I_TYPE@)*nitems_per_block),
+                  gr_make_io_signature (1,  1, sizeof (@O_TYPE@)*nitems_per_block))
+{
+}
+
+int
+@NAME@::work (int noutput_items,
+                  gr_vector_const_void_star &input_items,
+                  gr_vector_void_star &output_items)
+{
+  @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
+
+  int ninputs = input_items.size ();
+  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++){
+      @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i*nitems_per_block+j];
+      for (int k = 1; k < ninputs; k++)
+        acc += ((@I_TYPE@ *) input_items[k])[i*nitems_per_block+j];
+
+      *optr++ = (@O_TYPE@) acc;
+    }
+  }
+  return noutput_items;
+}
diff --git a/gnuradio-core/src/lib/gengen/gr_add_vXX.h.t b/gnuradio-core/src/lib/gengen/gr_add_vXX.h.t
new file mode 100755 (executable)
index 0000000..546041e
--- /dev/null
@@ -0,0 +1,54 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <gr_sync_block.h>
+
+class @NAME@;
+typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ (size_t nitems_per_block);
+
+/*!
+ * \brief output = sum (input_0, input_1, ...)
+ * \ingroup block
+ *
+ * Add across all input vectors.
+ */
+class @NAME@ : public gr_sync_block
+{
+  friend @SPTR_NAME@ gr_make_@BASE_NAME@ (size_t nitems_per_block);
+
+  @NAME@ (size_t nitems_per_block);
+
+ 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/gengen/gr_add_vXX.i.t b/gnuradio-core/src/lib/gengen/gr_add_vXX.i.t
new file mode 100755 (executable)
index 0000000..bcae7b7
--- /dev/null
@@ -0,0 +1,33 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@)
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ (size_t nitems_per_block);
+
+class @NAME@ : public gr_sync_block
+{
+ private:
+  @NAME@ (size_t nitems_per_block);
+};
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
new file mode 100644 (file)
index 0000000..ec73f67
--- /dev/null
@@ -0,0 +1,73 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <@NAME@.h>
+#include <gr_io_signature.h>
+#include <assert.h>
+#include <iostream>
+
+@SPTR_NAME@
+gr_make_@BASE_NAME@ (const std::vector<@O_TYPE@> &symbol_table, const int D)
+{
+  return @SPTR_NAME@ (new @NAME@ (symbol_table,D));
+}
+
+@NAME@::@NAME@ (const std::vector<@O_TYPE@> &symbol_table, const int D)
+  : gr_sync_interpolator ("@BASE_NAME@",
+                         gr_make_io_signature (1, -1, sizeof (@I_TYPE@)),
+                         gr_make_io_signature (1, -1, sizeof (@O_TYPE@)),
+                         D),
+  d_D (D),
+  d_symbol_table (symbol_table)
+{
+}
+
+int
+@NAME@::work (int noutput_items,
+                       gr_vector_const_void_star &input_items,
+                       gr_vector_void_star &output_items)
+{
+  assert (noutput_items % d_D == 0);
+  assert (input_items.size() == output_items.size());
+  int nstreams = input_items.size();
+
+  for (int m=0;m<nstreams;m++) {
+    const @I_TYPE@ *in = (@I_TYPE@ *) input_items[m];
+    @O_TYPE@ *out = (@O_TYPE@ *) output_items[m];
+
+    // per stream processing
+    for (int i = 0; i < noutput_items / d_D; i++){
+      assert (((unsigned int)in[i]*d_D+d_D) <= d_symbol_table.size());
+      memcpy(out, &d_symbol_table[(unsigned int)in[i]*d_D], d_D*sizeof(@O_TYPE@));
+      out+=d_D;
+    }
+    // end of per stream processing
+
+  }
+  return noutput_items;
+}
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
new file mode 100644 (file)
index 0000000..2c51537
--- /dev/null
@@ -0,0 +1,72 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <gr_sync_interpolator.h>
+
+class @NAME@;
+typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ (const std::vector<@O_TYPE@> &symbol_table, const int D = 1);
+
+/*!
+ * \brief Map a stream of symbol indexes (unpacked bytes or shorts) to stream of float or complex onstellation points.in \p D dimensions (\p D = 1 by default)
+ * \ingroup block
+ *
+ * input: stream of @I_TYPE@; output: stream of @O_TYPE@
+ *
+ * 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 
+ * from a stream of bytes or shorts into arbitrary float
+ * or complex symbols.
+ *
+ * \sa gr_packed_to_unpacked_bb, gr_unpacked_to_packed_bb,
+ * \sa gr_packed_to_unpacked_ss, gr_unpacked_to_packed_ss,
+ * \sa gr_chunks_to_symbols_bf, gr_chunks_to_symbols_bc.
+ * \sa gr_chunks_to_symbols_sf, gr_chunks_to_symbols_sc.
+ */
+
+class @NAME@ : public gr_sync_interpolator
+{
+  friend @SPTR_NAME@ gr_make_@BASE_NAME@ (const std::vector<@O_TYPE@> &symbol_table, const int D);
+
+  int d_D;
+  std::vector<@O_TYPE@> d_symbol_table;
+  @NAME@ (const std::vector<@O_TYPE@> &symbol_table, const int D = 1);
+
+ public:
+  int D () const { return d_D; }
+  std::vector<@O_TYPE@> symbol_table () const { return d_symbol_table; }
+  int work (int noutput_items,
+           gr_vector_const_void_star &input_items,
+           gr_vector_void_star &output_items);
+
+  bool check_topology(int ninputs, int noutputs) { return ninputs == noutputs; }
+};
+
+#endif
diff --git a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_XX.i.t b/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_XX.i.t
new file mode 100644 (file)
index 0000000..075f17d
--- /dev/null
@@ -0,0 +1,37 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@);
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ (const std::vector<@O_TYPE@> &symbol_table, const int D = 1);
+
+class @NAME@ : public gr_sync_interpolator
+{
+private:
+  @NAME@ (const std::vector<@O_TYPE@> &symbol_table, const int D = 1);
+
+public:
+  int D () const { return d_D; }
+  std::vector<@O_TYPE@> symbol_table () const { return d_symbol_table; }
+};
diff --git a/gnuradio-core/src/lib/gengen/gr_divide_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_divide_XX.cc.t
new file mode 100644 (file)
index 0000000..b66de15
--- /dev/null
@@ -0,0 +1,71 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <@NAME@.h>
+#include <gr_io_signature.h>
+
+@SPTR_NAME@
+gr_make_@BASE_NAME@ ()
+{
+  return @SPTR_NAME@ (new @NAME@ ());
+}
+
+@NAME@::@NAME@ ()
+  : gr_sync_block ("@BASE_NAME@",
+                  gr_make_io_signature (1, -1, sizeof (@I_TYPE@)),
+                  gr_make_io_signature (1,  1, sizeof (@O_TYPE@)))
+{
+}
+
+int
+@NAME@::work (int noutput_items,
+                  gr_vector_const_void_star &input_items,
+                  gr_vector_void_star &output_items)
+{
+  @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
+
+  int ninputs = input_items.size ();
+
+  if (ninputs == 1){           // compute reciprocal
+    for (int i = 0; i < noutput_items; i++)
+      *optr++ = (@O_TYPE@) ((@O_TYPE@) 1 /
+                           ((@I_TYPE@ *) input_items[0])[i]);
+  }
+
+  else {
+    for (int i = 0; i < noutput_items; i++){
+      @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
+      for (int j = 1; j < ninputs; j++)
+       acc /= ((@I_TYPE@ *) input_items[j])[i];
+
+      *optr++ = (@O_TYPE@) acc;
+    }
+  }
+
+  return noutput_items;
+}
diff --git a/gnuradio-core/src/lib/gengen/gr_divide_XX.h.t b/gnuradio-core/src/lib/gengen/gr_divide_XX.h.t
new file mode 100644 (file)
index 0000000..5960d32
--- /dev/null
@@ -0,0 +1,54 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <gr_sync_block.h>
+
+class @NAME@;
+typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ ();
+
+/*!
+ * \brief output = input_0 / input_1 / input_x ...)
+ * \ingroup block
+ *
+ * Divide across all input streams.
+ */
+class @NAME@ : public gr_sync_block
+{
+  friend @SPTR_NAME@ gr_make_@BASE_NAME@ ();
+
+  @NAME@ ();
+
+ 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/gengen/gr_divide_XX.i.t b/gnuradio-core/src/lib/gengen/gr_divide_XX.i.t
new file mode 100644 (file)
index 0000000..ed19609
--- /dev/null
@@ -0,0 +1,33 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@)
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ ();
+
+class @NAME@ : public gr_sync_block
+{
+ private:
+  @NAME@ ();
+};
diff --git a/gnuradio-core/src/lib/gengen/gr_endianness.h b/gnuradio-core/src/lib/gengen/gr_endianness.h
new file mode 100644 (file)
index 0000000..e6ceb43
--- /dev/null
@@ -0,0 +1,27 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+#ifndef INCLUDED_GR_ENDIANNESS_H
+#define INCLUDED_GR_ENDIANNESS_H
+
+typedef enum {GR_MSB_FIRST, GR_LSB_FIRST} gr_endianness_t;
+
+#endif /* INCLUDED_GR_ENDIANNESS_H */
diff --git a/gnuradio-core/src/lib/gengen/gr_endianness.i b/gnuradio-core/src/lib/gengen/gr_endianness.i
new file mode 100644 (file)
index 0000000..8ae57d1
--- /dev/null
@@ -0,0 +1,23 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+%include <gr_endianness.h>
diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_multiply_XX.cc.t
new file mode 100644 (file)
index 0000000..a6c01b1
--- /dev/null
@@ -0,0 +1,62 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <@NAME@.h>
+#include <gr_io_signature.h>
+
+@SPTR_NAME@
+gr_make_@BASE_NAME@ ()
+{
+  return @SPTR_NAME@ (new @NAME@ ());
+}
+
+@NAME@::@NAME@ ()
+  : gr_sync_block ("@BASE_NAME@",
+                  gr_make_io_signature (1, -1, sizeof (@I_TYPE@)),
+                  gr_make_io_signature (1,  1, sizeof (@O_TYPE@)))
+{
+}
+
+int
+@NAME@::work (int noutput_items,
+                  gr_vector_const_void_star &input_items,
+                  gr_vector_void_star &output_items)
+{
+  @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
+
+  int ninputs = input_items.size ();
+
+  for (int i = 0; i < noutput_items; i++){
+    @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
+    for (int j = 1; j < ninputs; j++)
+      acc *= ((@I_TYPE@ *) input_items[j])[i];
+
+    *optr++ = (@O_TYPE@) acc;
+  }
+  return noutput_items;
+}
diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_XX.h.t b/gnuradio-core/src/lib/gengen/gr_multiply_XX.h.t
new file mode 100644 (file)
index 0000000..6605727
--- /dev/null
@@ -0,0 +1,54 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <gr_sync_block.h>
+
+class @NAME@;
+typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ ();
+
+/*!
+ * \brief output = prod (input_0, input_1, ...)
+ * \ingroup block
+ *
+ * Multiply across all input streams.
+ */
+class @NAME@ : public gr_sync_block
+{
+  friend @SPTR_NAME@ gr_make_@BASE_NAME@ ();
+
+  @NAME@ ();
+
+ 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/gengen/gr_multiply_XX.i.t b/gnuradio-core/src/lib/gengen/gr_multiply_XX.i.t
new file mode 100644 (file)
index 0000000..ed19609
--- /dev/null
@@ -0,0 +1,33 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@)
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ ();
+
+class @NAME@ : public gr_sync_block
+{
+ private:
+  @NAME@ ();
+};
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
new file mode 100644 (file)
index 0000000..6c42ce0
--- /dev/null
@@ -0,0 +1,72 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <@NAME@.h>
+#include <gr_io_signature.h>
+
+@SPTR_NAME@
+gr_make_@BASE_NAME@ (@O_TYPE@ k)
+{
+  return @SPTR_NAME@ (new @NAME@ (k));
+}
+
+@NAME@::@NAME@ (@O_TYPE@ k)
+  : gr_sync_block ("@BASE_NAME@",
+                  gr_make_io_signature (1, 1, sizeof (@I_TYPE@)),
+                  gr_make_io_signature (1, 1, sizeof (@O_TYPE@))),
+    d_k (k)
+{
+}
+
+int
+@NAME@::work (int noutput_items,
+                  gr_vector_const_void_star &input_items,
+                  gr_vector_void_star &output_items)
+{
+  @I_TYPE@ *iptr = (@I_TYPE@ *) input_items[0];
+  @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
+
+  int  size = noutput_items;
+
+  while (size >= 8){
+    *optr++ = *iptr++ * d_k;
+    *optr++ = *iptr++ * d_k;
+    *optr++ = *iptr++ * d_k;
+    *optr++ = *iptr++ * d_k;
+    *optr++ = *iptr++ * d_k;
+    *optr++ = *iptr++ * d_k;
+    *optr++ = *iptr++ * d_k;
+    *optr++ = *iptr++ * d_k;
+    size -= 8;
+  }
+
+  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
new file mode 100644 (file)
index 0000000..a15d4b0
--- /dev/null
@@ -0,0 +1,55 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <gr_sync_block.h>
+
+class @NAME@;
+typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ (@O_TYPE@ k);
+
+/*!
+ * \brief output = input * constant
+ * \ingroup block
+ */
+class @NAME@ : public gr_sync_block
+{
+  friend @SPTR_NAME@ gr_make_@BASE_NAME@ (@O_TYPE@ k);
+
+  @O_TYPE@     d_k;            // the constant
+  @NAME@ (@O_TYPE@ k);
+
+ public:
+  @O_TYPE@ k () const { return d_k; }
+  void set_k (@O_TYPE@ k) { d_k = k; }
+
+  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/gengen/gr_multiply_const_XX.i.t b/gnuradio-core/src/lib/gengen/gr_multiply_const_XX.i.t
new file mode 100644 (file)
index 0000000..1902610
--- /dev/null
@@ -0,0 +1,37 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@)
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ (@TYPE@ k);
+
+class @NAME@ : public gr_sync_block
+{
+ private:
+  @NAME@ (@TYPE@ k);
+
+ public:
+  @TYPE@ k () const { return d_k; }
+  void set_k (@TYPE@ k) { d_k = k; }
+};
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
new file mode 100755 (executable)
index 0000000..e9033d7
--- /dev/null
@@ -0,0 +1,61 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <@NAME@.h>
+#include <gr_io_signature.h>
+
+@SPTR_NAME@
+gr_make_@BASE_NAME@ (const std::vector<@I_TYPE@> k)
+{
+  return @SPTR_NAME@ (new @NAME@ (k));
+}
+
+@NAME@::@NAME@ (const std::vector<@I_TYPE@> k)
+  : gr_sync_block ("@BASE_NAME@",
+                  gr_make_io_signature (1, 1, sizeof(@I_TYPE@)*k.size()),
+                  gr_make_io_signature (1, 1, sizeof(@O_TYPE@)*k.size()))
+{
+  d_k = k;
+}
+
+int
+@NAME@::work (int noutput_items,
+                  gr_vector_const_void_star &input_items,
+                  gr_vector_void_star &output_items)
+{
+  @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
new file mode 100755 (executable)
index 0000000..feecffc
--- /dev/null
@@ -0,0 +1,55 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <gr_sync_block.h>
+
+class @NAME@;
+typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ (const std::vector<@I_TYPE@> k);
+
+/*!
+ * \brief output vector = input vector * constant vector (element-wise)
+ * \ingroup block
+ */
+class @NAME@ : public gr_sync_block
+{
+  friend @SPTR_NAME@ gr_make_@BASE_NAME@ (const std::vector<@I_TYPE@> k);
+
+  std::vector<@I_TYPE@> d_k; // the constant
+  @NAME@ (const std::vector<@I_TYPE@> k);
+
+ public:
+  const std::vector<@I_TYPE@> k () const { return d_k; }
+  void set_k (const std::vector<@I_TYPE@> k) { d_k = k; }
+
+  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/gengen/gr_multiply_const_vXX.i.t b/gnuradio-core/src/lib/gengen/gr_multiply_const_vXX.i.t
new file mode 100755 (executable)
index 0000000..ae52a4e
--- /dev/null
@@ -0,0 +1,37 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@)
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ (const std::vector<@I_TYPE@> k);
+
+class @NAME@ : public gr_sync_block
+{
+ private:
+  @NAME@ (const std::vector<@I_TYPE@> k);
+
+ public:
+  std::vector<@I_TYPE@> k () const { return d_k; }
+  void set_k (const std::vector<@I_TYPE@> k) { d_k = k; }
+};
diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_vXX.cc.t b/gnuradio-core/src/lib/gengen/gr_multiply_vXX.cc.t
new file mode 100755 (executable)
index 0000000..1df4880
--- /dev/null
@@ -0,0 +1,65 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <@NAME@.h>
+#include <gr_io_signature.h>
+
+@SPTR_NAME@
+gr_make_@BASE_NAME@ (size_t nitems_per_block)
+{
+  return @SPTR_NAME@ (new @NAME@ (nitems_per_block));
+}
+
+@NAME@::@NAME@ (size_t nitems_per_block)
+  : gr_sync_block ("@BASE_NAME@",
+                  gr_make_io_signature (1, -1, sizeof (@I_TYPE@)*nitems_per_block),
+                  gr_make_io_signature (1,  1, sizeof (@O_TYPE@)*nitems_per_block))
+{
+}
+
+int
+@NAME@::work (int noutput_items,
+                  gr_vector_const_void_star &input_items,
+                  gr_vector_void_star &output_items)
+{
+  @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
+
+  int ninputs = input_items.size ();
+  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++){
+      @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i*nitems_per_block+j];
+      for (int k = 1; k < ninputs; k++)
+        acc *= ((@I_TYPE@ *) input_items[k])[i*nitems_per_block+j];
+
+      *optr++ = (@O_TYPE@) acc;
+    }
+  }
+  return noutput_items;
+}
diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_vXX.h.t b/gnuradio-core/src/lib/gengen/gr_multiply_vXX.h.t
new file mode 100755 (executable)
index 0000000..107adc5
--- /dev/null
@@ -0,0 +1,54 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <gr_sync_block.h>
+
+class @NAME@;
+typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ (size_t nitems_per_block);
+
+/*!
+ * \brief output = prod (input_0, input_1, ...)
+ * \ingroup block
+ *
+ * Element-wise multiply across all input vectors.
+ */
+class @NAME@ : public gr_sync_block
+{
+  friend @SPTR_NAME@ gr_make_@BASE_NAME@ (size_t nitems_per_block);
+
+  @NAME@ (size_t nitems_per_block);
+
+ 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/gengen/gr_multiply_vXX.i.t b/gnuradio-core/src/lib/gengen/gr_multiply_vXX.i.t
new file mode 100755 (executable)
index 0000000..bcae7b7
--- /dev/null
@@ -0,0 +1,33 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@)
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ (size_t nitems_per_block);
+
+class @NAME@ : public gr_sync_block
+{
+ private:
+  @NAME@ (size_t nitems_per_block);
+};
diff --git a/gnuradio-core/src/lib/gengen/gr_mute_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_mute_XX.cc.t
new file mode 100644 (file)
index 0000000..45f8cb5
--- /dev/null
@@ -0,0 +1,79 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <@NAME@.h>
+#include <gr_io_signature.h>
+#include <string.h>
+
+
+@SPTR_NAME@
+gr_make_@BASE_NAME@ (bool mute)
+{
+  return @SPTR_NAME@ (new @NAME@ (mute));
+}
+
+@NAME@::@NAME@ (bool mute)
+  : gr_sync_block ("@BASE_NAME@",
+                  gr_make_io_signature (1, 1, sizeof (@I_TYPE@)),
+                  gr_make_io_signature (1, 1, sizeof (@O_TYPE@))),
+    d_mute (mute)
+{
+}
+
+int
+@NAME@::work (int noutput_items,
+                  gr_vector_const_void_star &input_items,
+                  gr_vector_void_star &output_items)
+{
+  @I_TYPE@ *iptr = (@I_TYPE@ *) input_items[0];
+  @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
+
+  int  size = noutput_items;
+
+  if (d_mute){
+    memset (optr, 0, noutput_items * sizeof(@O_TYPE@));
+  }
+  else {
+    while (size >= 8){
+      *optr++ = *iptr++;
+      *optr++ = *iptr++;
+      *optr++ = *iptr++;
+      *optr++ = *iptr++;
+      *optr++ = *iptr++;
+      *optr++ = *iptr++;
+      *optr++ = *iptr++;
+      *optr++ = *iptr++;
+      size -= 8;
+    }
+
+    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
new file mode 100644 (file)
index 0000000..bedce71
--- /dev/null
@@ -0,0 +1,55 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <gr_sync_block.h>
+
+class @NAME@;
+typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ (bool mute=false);
+
+/*!
+ * \brief output = input or zero if muted.
+ * \ingroup block
+ */
+class @NAME@ : public gr_sync_block
+{
+  friend @SPTR_NAME@ gr_make_@BASE_NAME@ (bool mute);
+
+  bool         d_mute;
+  @NAME@ (bool mute);
+
+ public:
+  bool mute () const { return d_mute; }
+  void set_mute (bool mute) { d_mute = mute; }
+
+  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/gengen/gr_mute_XX.i.t b/gnuradio-core/src/lib/gengen/gr_mute_XX.i.t
new file mode 100644 (file)
index 0000000..559d999
--- /dev/null
@@ -0,0 +1,37 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@)
+
+@SPTR_NAME@ gr_make_@BASE_NAME@(bool mute=false);
+
+class @NAME@ : public gr_sync_block
+{
+ private:
+  @NAME@ (bool mute);
+
+ public:
+  bool mute () const { return d_mute; }
+  void set_mute (bool mute) { d_mute = mute; }
+};
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
new file mode 100644 (file)
index 0000000..1fec1e5
--- /dev/null
@@ -0,0 +1,99 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <@NAME@.h>
+#include <gr_io_signature.h>
+#include <stdexcept>
+
+
+@NAME@_sptr 
+gr_make_@BASE_NAME@ (gr_noise_type_t type, float ampl, long seed)
+{
+  return @NAME@_sptr (new @NAME@ (type, ampl, seed));
+}
+
+
+@NAME@::@NAME@ (gr_noise_type_t type, float ampl, long seed)
+  : gr_sync_block ("@BASE_NAME@",
+                  gr_make_io_signature (0, 0, 0),
+                  gr_make_io_signature (1, 1, sizeof (@TYPE@))),
+    d_type (type),
+    d_ampl (ampl),
+    d_rng (seed)
+{
+}
+
+int
+@NAME@::work (int noutput_items,
+                  gr_vector_const_void_star &input_items,
+                  gr_vector_void_star &output_items)
+{
+  @TYPE@ *out = (@TYPE@ *) output_items[0];
+  
+  switch (d_type){
+#if @IS_COMPLEX@       // complex?
+
+  case GR_UNIFORM:
+    for (int i = 0; i < noutput_items; i++)
+      out[i] = gr_complex (d_ampl * ((d_rng.ran1 () * 2.0) - 1.0),
+                          d_ampl * ((d_rng.ran1 () * 2.0) - 1.0));
+    break;
+
+  case GR_GAUSSIAN:
+    for (int i = 0; i < noutput_items; i++)
+      out[i] = d_ampl * d_rng.rayleigh_complex ();
+    break;
+
+#else                  // nope...
+
+  case GR_UNIFORM:
+    for (int i = 0; i < noutput_items; i++)
+      out[i] = (@TYPE@)(d_ampl * ((d_rng.ran1 () * 2.0) - 1.0));
+    break;
+
+  case GR_GAUSSIAN:
+    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");
+  }
+
+  return noutput_items;
+}
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
new file mode 100644 (file)
index 0000000..2071e0e
--- /dev/null
@@ -0,0 +1,63 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <gr_sync_block.h>
+#include <gr_noise_type.h>
+#include <gr_random.h>
+
+
+class @NAME@;
+typedef boost::shared_ptr<@NAME@> @NAME@_sptr;
+
+@NAME@_sptr 
+gr_make_@BASE_NAME@ (gr_noise_type_t type, float ampl, long seed = 3021);
+
+/*!
+ * \brief random number source
+ * \ingroup source
+ */
+class @NAME@ : public gr_sync_block {
+  friend @NAME@_sptr 
+  gr_make_@BASE_NAME@ (gr_noise_type_t type, float ampl, long seed);
+
+  gr_noise_type_t      d_type;
+  float                        d_ampl;
+  gr_random            d_rng;
+
+  @NAME@ (gr_noise_type_t type, float ampl, long seed = 3021);
+
+ public:
+  void set_type (gr_noise_type_t type) { d_type = type; }
+  void set_amplitude (float ampl) { d_ampl = ampl; }
+
+  virtual 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/gengen/gr_noise_source_X.i.t b/gnuradio-core/src/lib/gengen/gr_noise_source_X.i.t
new file mode 100644 (file)
index 0000000..0aa1427
--- /dev/null
@@ -0,0 +1,37 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@);
+
+@NAME@_sptr 
+gr_make_@BASE_NAME@ (gr_noise_type_t type, float ampl, long seed = 3021);
+
+class @NAME@ : public gr_block {
+ private:
+  @NAME@ (gr_noise_type_t type, float ampl, long seed = 3021);
+
+ public:
+  void set_type (gr_noise_type_t type) { d_type = type; }
+  void set_amplitude (float ampl) { d_ampl = ampl; }
+};
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
new file mode 100644 (file)
index 0000000..388def8
--- /dev/null
@@ -0,0 +1,137 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <@NAME@.h>
+#include <gr_io_signature.h>
+#include <assert.h>
+#include <gr_log2_const.h>
+
+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@ 
+gr_make_@BASE_NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness)
+{
+  return @SPTR_NAME@ 
+    (new @NAME@ (bits_per_chunk,endianness));
+}
+
+@NAME@::@NAME@ (unsigned int bits_per_chunk, 
+                                                   gr_endianness_t endianness)
+  : gr_block ("@BASE_NAME@",
+             gr_make_io_signature (1, -1, sizeof (@I_TYPE@)),
+             gr_make_io_signature (1, -1, sizeof (@O_TYPE@))),
+    d_bits_per_chunk(bits_per_chunk),d_endianness(endianness),d_index(0)
+{
+  assert (bits_per_chunk <= BITS_PER_TYPE);
+  assert (bits_per_chunk > 0);
+
+  set_relative_rate ((1.0 * BITS_PER_TYPE) / bits_per_chunk);
+}
+
+void
+@NAME@::forecast(int noutput_items, gr_vector_int &ninput_items_required)
+{
+
+  int input_required = (int) ceil((d_index + noutput_items * d_bits_per_chunk) / (1.0 * BITS_PER_TYPE));
+  unsigned ninputs = ninput_items_required.size();
+  for (unsigned int i = 0; i < ninputs; i++) {
+    ninput_items_required[i] = input_required;
+    //printf("Forecast wants %d needs %d\n",noutput_items,ninput_items_required[i]);
+  }
+}
+
+unsigned int
+get_bit_le (const @I_TYPE@ *in_vector,unsigned int bit_addr)
+{
+  @I_TYPE@ x = in_vector[bit_addr>>LOG2_L_TYPE];
+  return (x>>(bit_addr&(BITS_PER_TYPE-1)))&1;
+}
+
+unsigned int
+get_bit_be (const @I_TYPE@ *in_vector,unsigned int bit_addr)
+{
+  @I_TYPE@ x = in_vector[bit_addr>>LOG2_L_TYPE];
+  return (x>>((BITS_PER_TYPE-1)-(bit_addr&(BITS_PER_TYPE-1))))&1;
+}
+
+int
+@NAME@::general_work (int noutput_items,
+                                       gr_vector_int &ninput_items,
+                                       gr_vector_const_void_star &input_items,
+                                       gr_vector_void_star &output_items)
+{
+  unsigned int index_tmp = d_index;
+
+  assert (input_items.size() == output_items.size());
+  int nstreams = input_items.size();
+
+  for (int m=0; m < nstreams; m++){
+    const @I_TYPE@ *in = (@I_TYPE@ *) input_items[m];
+    @O_TYPE@ *out = (@O_TYPE@ *) output_items[m];
+    index_tmp = d_index;
+
+    // per stream processing
+
+    switch (d_endianness){
+
+    case GR_MSB_FIRST:
+      for (int i = 0; i < noutput_items; i++){
+       //printf("here msb %d\n",i);
+       @O_TYPE@ x = 0;
+       for(unsigned int j=0; j<d_bits_per_chunk; j++, index_tmp++)
+         x = (x<<1) | get_bit_be(in, index_tmp);
+       out[i] = x;
+      }
+      break;
+
+    case GR_LSB_FIRST:
+      for (int i = 0; i < noutput_items; i++){
+       //printf("here lsb %d\n",i);
+       @O_TYPE@ x = 0;
+       for(unsigned int j=0; j<d_bits_per_chunk; j++, index_tmp++)
+         x = (x<<1) | get_bit_le(in, index_tmp);
+       out[i] = x;
+      }
+      break;
+
+    default:
+      assert(0);
+    }
+
+    //printf("almost got to end\n");
+    assert(ninput_items[m] >= (int) ((d_index+(BITS_PER_TYPE-1))>>LOG2_L_TYPE));
+  }
+
+  d_index = index_tmp;
+  consume_each (d_index >> LOG2_L_TYPE);
+  d_index = d_index & (BITS_PER_TYPE-1);
+  //printf("got to end\n");
+  return noutput_items;
+}
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
new file mode 100644 (file)
index 0000000..f7aaa68
--- /dev/null
@@ -0,0 +1,84 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <gr_block.h>
+#include <gr_endianness.h>
+
+class @NAME@;
+typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
+
+@SPTR_NAME@ 
+gr_make_@BASE_NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness);
+
+/*!
+ * \brief Convert a stream of packed bytes or shorts to stream of unpacked bytes or shorts.
+ * \ingroup block
+ *
+ * input: stream of @I_TYPE@; output: stream of @O_TYPE@
+ *
+ * This is the inverse of gr_unpacked_to_packed_XX.
+ *
+ * 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.  
+ * 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 
+ * arbitrary float or complex symbols.
+ *
+ * \sa gr_packed_to_unpacked_bb, gr_unpacked_to_packed_bb,
+ * \sa gr_packed_to_unpacked_ss, gr_unpacked_to_packed_ss,
+ * \sa gr_chunks_to_symbols_bf, gr_chunks_to_symbols_bc.
+ * \sa gr_chunks_to_symbols_sf, gr_chunks_to_symbols_sc.
+ */
+
+class @NAME@ : public gr_block
+{
+  friend @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);
+
+  unsigned int    d_bits_per_chunk;
+  gr_endianness_t d_endianness;
+  unsigned int    d_index;
+
+ public:
+  void forecast(int noutput_items, gr_vector_int &ninput_items_required);
+  int general_work (int noutput_items,
+                   gr_vector_int &ninput_items,
+                   gr_vector_const_void_star &input_items,
+                   gr_vector_void_star &output_items);
+
+  bool check_topology(int ninputs, int noutputs) { return ninputs == noutputs; }
+
+};
+
+#endif
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
new file mode 100644 (file)
index 0000000..0d5d754
--- /dev/null
@@ -0,0 +1,33 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@);
+
+@SPTR_NAME@ 
+gr_make_@BASE_NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness);
+
+class @NAME@ : public gr_block
+{
+  @NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness);
+};
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
new file mode 100644 (file)
index 0000000..8a09c77
--- /dev/null
@@ -0,0 +1,149 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <@NAME@.h>
+#include <algorithm>
+#include <gr_io_signature.h>
+#include <stdexcept>
+#include <gr_complex.h>
+
+
+@NAME@::@NAME@ (double sampling_freq, gr_waveform_t waveform,
+               double frequency, double ampl, @TYPE@ offset)
+  : gr_sync_block ("@BASE_NAME@",
+                  gr_make_io_signature (0, 0, 0),
+                  gr_make_io_signature (1, 1, sizeof (@TYPE@))),
+    d_sampling_freq (sampling_freq), d_waveform (waveform), d_frequency (frequency),
+    d_ampl (ampl), d_offset (offset)
+{
+  d_nco.set_freq (2 * M_PI * d_frequency / d_sampling_freq);
+}
+
+@NAME@_sptr
+gr_make_@BASE_NAME@ (double sampling_freq, gr_waveform_t waveform,
+                    double frequency, double ampl, @TYPE@ offset)
+{
+  return @NAME@_sptr (new @NAME@ (sampling_freq, waveform, frequency, ampl, offset));
+}
+
+int
+@NAME@::work (int noutput_items,
+                   gr_vector_const_void_star &input_items,
+                   gr_vector_void_star &output_items)
+{
+  @TYPE@ *optr = (@TYPE@ *) output_items[0];
+  @TYPE@ t;
+
+  switch (d_waveform){
+
+#if @IS_COMPLEX@       // complex?
+
+  case GR_CONST_WAVE:
+    t = (gr_complex) d_ampl + d_offset;
+    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);
+    if (d_offset == gr_complex(0,0))
+      break;
+
+    for (int i = 0; i < noutput_items; i++){
+      optr[i] += d_offset;
+    }
+    break;
+
+#else                  // nope...
+
+  case GR_CONST_WAVE:
+    t = (@TYPE@) d_ampl + d_offset;
+    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)
+      break;
+
+    for (int i = 0; i < noutput_items; i++){
+      optr[i] += d_offset;
+    }
+    break;
+
+  case GR_COS_WAVE:
+    d_nco.cos (optr, noutput_items, d_ampl);
+    if (d_offset == 0)
+      break;
+
+    for (int i = 0; i < noutput_items; i++){
+      optr[i] += d_offset;
+    }
+    break;
+#endif
+
+  default:
+    throw std::runtime_error ("gr_sig_source: invalid waveform");
+  }
+
+  return noutput_items;
+}
+
+void
+@NAME@::set_sampling_freq (double sampling_freq)
+{
+  d_sampling_freq = sampling_freq;
+  d_nco.set_freq (2 * M_PI * d_frequency / d_sampling_freq);
+}
+
+void
+@NAME@::set_waveform (gr_waveform_t waveform)
+{
+  d_waveform = waveform;
+}
+
+void
+@NAME@::set_frequency (double frequency)
+{
+  d_frequency = frequency;
+  d_nco.set_freq (2 * M_PI * d_frequency / d_sampling_freq);
+}
+
+void
+@NAME@::set_amplitude (double ampl)
+{
+  d_ampl = ampl;
+}
+
+void
+@NAME@::set_offset (@TYPE@ offset)
+{
+  d_offset = offset;
+}
+
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
new file mode 100644 (file)
index 0000000..ccd18b7
--- /dev/null
@@ -0,0 +1,81 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <gr_sync_block.h>
+#include <gr_sig_source_waveform.h>
+#include <gr_fxpt_nco.h>
+
+class @NAME@;
+typedef boost::shared_ptr<@NAME@> @NAME@_sptr;
+
+/*!
+ * \brief signal generator with @TYPE@ output.
+ * \ingroup source
+ */
+
+class @NAME@ : public gr_sync_block {
+  friend @NAME@_sptr 
+  gr_make_@BASE_NAME@ (double sampling_freq, gr_waveform_t waveform,
+                      double frequency, double ampl, @TYPE@ offset);
+
+  double               d_sampling_freq;
+  gr_waveform_t                d_waveform;
+  double               d_frequency;
+  double               d_ampl;
+  @TYPE@               d_offset;
+  gr_fxpt_nco          d_nco;
+
+
+  @NAME@ (double sampling_freq, gr_waveform_t waveform,
+         double wave_freq, double ampl, @TYPE@ offset);
+
+ public:
+  virtual int work (int noutput_items,
+                   gr_vector_const_void_star &input_items,
+                   gr_vector_void_star &output_items);
+
+  // ACCESSORS
+  double sampling_freq () const { return d_sampling_freq; }
+  gr_waveform_t waveform () const { return d_waveform; }
+  double frequency () const { return d_frequency; }
+  double amplitude () const { return d_ampl; }
+  @TYPE@ offset () const { return d_offset; }
+
+  // MANIPULATORS
+  void set_sampling_freq (double sampling_freq);
+  void set_waveform (gr_waveform_t waveform);
+  void set_frequency (double frequency);
+  void set_amplitude (double ampl);
+  void set_offset (@TYPE@ offset);
+};
+
+@NAME@_sptr
+gr_make_@BASE_NAME@ (double sampling_freq, gr_waveform_t waveform,
+                    double wave_freq, double ampl, @TYPE@ offset = 0);
+
+
+#endif
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
new file mode 100644 (file)
index 0000000..8c65c31
--- /dev/null
@@ -0,0 +1,52 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@);
+
+@NAME@_sptr
+gr_make_@BASE_NAME@ (double sampling_freq, gr_waveform_t waveform,
+                    double wave_freq, double ampl, @TYPE@ offset = 0);
+
+
+class @NAME@ : public gr_sync_block {
+ private:
+  @NAME@ (double sampling_freq, gr_waveform_t waveform,
+         double wave_freq, double ampl, @TYPE@ offset);
+
+ public:
+
+  // ACCESSORS
+  double sampling_freq () const { return d_sampling_freq; }
+  gr_waveform_t waveform () const { return d_waveform; }
+  double frequency () const { return d_frequency; }
+  double amplitude () const { return d_ampl; }
+  @TYPE@ offset () const { return d_offset; }
+
+  // MANIPULATORS
+  void set_sampling_freq (double sampling_freq);
+  void set_waveform (gr_waveform_t waveform);
+  void set_frequency (double frequency);
+  void set_amplitude (double ampl);
+  void set_offset (@TYPE@ offset);
+};
diff --git a/gnuradio-core/src/lib/gengen/gr_sig_source_waveform.h b/gnuradio-core/src/lib/gengen/gr_sig_source_waveform.h
new file mode 100644 (file)
index 0000000..669437a
--- /dev/null
@@ -0,0 +1,29 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+#ifndef INCLUDED_GR_SIG_SOURCE_WAVEFORM_H
+#define INCLUDED_GR_SIG_SOURCE_WAVEFORM_H
+
+typedef enum {
+  GR_CONST_WAVE = 100, GR_SIN_WAVE, GR_COS_WAVE
+} gr_waveform_t;
+
+#endif /* INCLUDED_GR_SIG_SOURCE_WAVEFORM_H */
diff --git a/gnuradio-core/src/lib/gengen/gr_sub_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_sub_XX.cc.t
new file mode 100644 (file)
index 0000000..6c38ff4
--- /dev/null
@@ -0,0 +1,70 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <@NAME@.h>
+#include <gr_io_signature.h>
+
+@SPTR_NAME@
+gr_make_@BASE_NAME@ ()
+{
+  return @SPTR_NAME@ (new @NAME@ ());
+}
+
+@NAME@::@NAME@ ()
+  : gr_sync_block ("@BASE_NAME@",
+                  gr_make_io_signature (1, -1, sizeof (@I_TYPE@)),
+                  gr_make_io_signature (1,  1, sizeof (@O_TYPE@)))
+{
+}
+
+int
+@NAME@::work (int noutput_items,
+                  gr_vector_const_void_star &input_items,
+                  gr_vector_void_star &output_items)
+{
+  @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
+
+  int ninputs = input_items.size ();
+
+  if (ninputs == 1){           // negate
+    for (int i = 0; i < noutput_items; i++)
+      *optr++ = (@O_TYPE@) -((@I_TYPE@ *) input_items[0])[i];
+  }
+
+  else {
+    for (int i = 0; i < noutput_items; i++){
+      @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
+      for (int j = 1; j < ninputs; j++)
+       acc -= ((@I_TYPE@ *) input_items[j])[i];
+
+      *optr++ = (@O_TYPE@) acc;
+    }
+  }
+
+  return noutput_items;
+}
diff --git a/gnuradio-core/src/lib/gengen/gr_sub_XX.h.t b/gnuradio-core/src/lib/gengen/gr_sub_XX.h.t
new file mode 100644 (file)
index 0000000..99a4aa6
--- /dev/null
@@ -0,0 +1,54 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <gr_sync_block.h>
+
+class @NAME@;
+typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ ();
+
+/*!
+ * \brief output = input_0 -  input_1 - ...)
+ * \ingroup block
+ *
+ * Subtract across all input streams.
+ */
+class @NAME@ : public gr_sync_block
+{
+  friend @SPTR_NAME@ gr_make_@BASE_NAME@ ();
+
+  @NAME@ ();
+
+ 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/gengen/gr_sub_XX.i.t b/gnuradio-core/src/lib/gengen/gr_sub_XX.i.t
new file mode 100644 (file)
index 0000000..ed19609
--- /dev/null
@@ -0,0 +1,33 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@)
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ ();
+
+class @NAME@ : public gr_sync_block
+{
+ private:
+  @NAME@ ();
+};
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
new file mode 100644 (file)
index 0000000..7db6037
--- /dev/null
@@ -0,0 +1,129 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <@NAME@.h>
+#include <gr_io_signature.h>
+#include <assert.h>
+
+static const unsigned int BITS_PER_TYPE = sizeof(@O_TYPE@) * 8;
+
+
+@SPTR_NAME@ 
+gr_make_@BASE_NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness)
+{
+  return @SPTR_NAME@ 
+    (new @NAME@ (bits_per_chunk,endianness));
+}
+
+@NAME@::@NAME@ (unsigned int bits_per_chunk, 
+                                                   gr_endianness_t endianness)
+  : gr_block ("@BASE_NAME@",
+             gr_make_io_signature (1, -1, sizeof (@I_TYPE@)),
+             gr_make_io_signature (1, -1, sizeof (@O_TYPE@))),
+    d_bits_per_chunk(bits_per_chunk),d_endianness(endianness),d_index(0)
+{
+  assert (bits_per_chunk <= BITS_PER_TYPE);
+  assert (bits_per_chunk > 0);
+
+  set_relative_rate (bits_per_chunk/(1.0 * BITS_PER_TYPE));
+}
+
+void
+@NAME@::forecast(int noutput_items, gr_vector_int &ninput_items_required)
+{
+  int input_required = (int) ceil( (d_index+noutput_items * 1.0 * BITS_PER_TYPE)/d_bits_per_chunk);
+  unsigned ninputs = ninput_items_required.size();
+  for (unsigned int i = 0; i < ninputs; i++) {
+    ninput_items_required[i] = input_required;
+  }
+}
+
+unsigned int
+get_bit_be1 (const @I_TYPE@ *in_vector,unsigned int bit_addr, unsigned int bits_per_chunk) {
+  unsigned int byte_addr = (int)bit_addr/bits_per_chunk;
+  @I_TYPE@ x = in_vector[byte_addr];
+  unsigned int residue = bit_addr - byte_addr * bits_per_chunk;
+  //printf("Bit addr %d  byte addr %d  residue %d  val  %d\n",bit_addr,byte_addr,residue,(x>>(bits_per_chunk-1-residue))&1);
+  return (x >> (bits_per_chunk-1-residue))&1;
+}
+
+int
+@NAME@::general_work (int noutput_items,
+                                       gr_vector_int &ninput_items,
+                                       gr_vector_const_void_star &input_items,
+                                       gr_vector_void_star &output_items)
+{
+  unsigned int index_tmp = d_index;
+
+  assert (input_items.size() == output_items.size());
+  int nstreams = input_items.size();
+
+  for (int m=0; m< nstreams; m++) {
+    const @I_TYPE@ *in = (@I_TYPE@ *) input_items[m];
+    @O_TYPE@ *out = (@O_TYPE@ *) output_items[m];
+    index_tmp=d_index;
+
+    // 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:
+      for(int i=0;i<noutput_items;i++) {
+       @O_TYPE@ tmp=0;
+       for(unsigned int j=0; j<BITS_PER_TYPE; j++) {
+         tmp = (tmp<<1) | get_bit_be1(in,index_tmp,d_bits_per_chunk);
+         index_tmp++;
+       }
+       out[i] = tmp;
+      }
+      break;
+
+    case GR_LSB_FIRST:
+      for(int i=0;i<noutput_items;i++) {
+       unsigned long tmp=0;
+       for(unsigned int j=0; j<BITS_PER_TYPE; j++) {
+         tmp = (tmp>>1)| (get_bit_be1(in,index_tmp,d_bits_per_chunk)<<(BITS_PER_TYPE-1));
+         index_tmp++;
+       }
+       out[i] = tmp;
+      }
+      break;
+      
+    default:
+      assert(0);
+    }
+  }
+
+  d_index = index_tmp;
+  consume_each ((int)(d_index/d_bits_per_chunk));
+  d_index = d_index%d_bits_per_chunk;
+
+  return noutput_items;
+}
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
new file mode 100644 (file)
index 0000000..04965d9
--- /dev/null
@@ -0,0 +1,81 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <gr_block.h>
+#include <gr_endianness.h>
+
+class @NAME@;
+typedef boost::shared_ptr<@NAME@> @NAME@_sptr;
+
+@SPTR_NAME@ 
+gr_make_@BASE_NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness);
+
+/*!
+ * \brief Convert a stream of unpacked bytes or shorts into a stream of packed bytes or shorts.
+ * \ingroup block
+ *
+ * input: stream of @I_TYPE@; output: stream of @O_TYPE@
+ *
+ * This is the inverse of gr_packed_to_unpacked_XX.
+ *
+ * The low \p bits_per_chunk bits are extracted from each input byte or short.
+ * These bits are then packed densely into the output bytes or shorts, such that
+ * all 8 or 16 bits of the output bytes or shorts are filled with valid input bits.
+ * 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 arbitrary float
+ * or complex symbols.
+ *
+ * \sa gr_packed_to_unpacked_bb, gr_unpacked_to_packed_bb,
+ * \sa gr_packed_to_unpacked_ss, gr_unpacked_to_packed_ss,
+ * \sa gr_chunks_to_symbols_bf, gr_chunks_to_symbols_bc.
+ * \sa gr_chunks_to_symbols_sf, gr_chunks_to_symbols_sc.
+ */
+class @NAME@ : public gr_block
+{
+  friend @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);
+
+  unsigned int    d_bits_per_chunk;
+  gr_endianness_t d_endianness;
+  unsigned int    d_index;
+
+ public:
+  void forecast(int noutput_items, gr_vector_int &ninput_items_required);
+  int general_work (int noutput_items,
+                   gr_vector_int &ninput_items,
+                   gr_vector_const_void_star &input_items,
+                   gr_vector_void_star &output_items);
+
+  bool check_topology(int ninputs, int noutputs) { return ninputs == noutputs; }
+};
+
+#endif
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
new file mode 100644 (file)
index 0000000..715678e
--- /dev/null
@@ -0,0 +1,33 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@);
+
+@SPTR_NAME@
+gr_make_@BASE_NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness);
+
+class @NAME@ : public gr_block
+{
+  @NAME@ (unsigned int bits_per_chunk, gr_endianness_t endianness);
+};
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
new file mode 100644 (file)
index 0000000..f063971
--- /dev/null
@@ -0,0 +1,63 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <@NAME@.h>
+#include <algorithm>
+#include <gr_io_signature.h>
+
+
+@NAME@::@NAME@ ()
+  : gr_sync_block ("@BASE_NAME@",
+              gr_make_io_signature (1, 1, sizeof (@TYPE@)),
+              gr_make_io_signature (0, 0, 0))
+{
+}
+
+int
+@NAME@::work (int noutput_items,
+                   gr_vector_const_void_star &input_items,
+                   gr_vector_void_star &output_items)
+{
+  @TYPE@ *iptr = (@TYPE@ *) input_items[0];
+  for (int i = 0; i < noutput_items; i++)
+    d_data.push_back (iptr[i]);
+
+  return noutput_items;
+}
+
+
+@NAME@_sptr
+gr_make_@BASE_NAME@ ()
+{
+  return @NAME@_sptr (new @NAME@ ());
+}
+
+std::vector<@TYPE@>
+@NAME@::data () const
+{
+  return d_data;
+}
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
new file mode 100644 (file)
index 0000000..43232b5
--- /dev/null
@@ -0,0 +1,55 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <gr_sync_block.h>
+
+class @NAME@;
+typedef boost::shared_ptr<@NAME@> @NAME@_sptr;
+
+@NAME@_sptr
+gr_make_@BASE_NAME@ ();
+
+
+/*!
+ * \brief @TYPE@ sink that writes to a vector
+ * \ingroup sink
+ */
+
+class @NAME@ : public gr_sync_block {
+  friend @NAME@_sptr gr_make_@BASE_NAME@ ();
+  std::vector<@TYPE@>  d_data;
+  @NAME@ ();
+
+ public:
+  virtual int work (int noutput_items,
+                   gr_vector_const_void_star &input_items,
+                   gr_vector_void_star &output_items);
+
+  std::vector<@TYPE@> data () const;
+};
+
+#endif
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
new file mode 100644 (file)
index 0000000..3dc0f51
--- /dev/null
@@ -0,0 +1,37 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+
+GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@);
+
+@SPTR_NAME@ gr_make_@BASE_NAME@ ();
+
+class @NAME@ : public gr_sync_block {
+ private:
+  @NAME@ ();
+
+ public:
+  std::vector<@TYPE@> data () const;
+};
+
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
new file mode 100644 (file)
index 0000000..97bb727
--- /dev/null
@@ -0,0 +1,85 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <@NAME@.h>
+#include <algorithm>
+#include <gr_io_signature.h>
+
+
+@NAME@::@NAME@ (const std::vector<@TYPE@> &data, bool repeat)
+  : gr_sync_block ("@BASE_NAME@",
+              gr_make_io_signature (0, 0, 0),
+              gr_make_io_signature (1, 1, sizeof (@TYPE@))),
+    d_data (data),
+    d_repeat (repeat),
+    d_offset (0)
+{
+}
+
+int
+@NAME@::work (int noutput_items,
+                   gr_vector_const_void_star &input_items,
+                   gr_vector_void_star &output_items)
+{
+  @TYPE@ *optr = (@TYPE@ *) output_items[0];
+
+  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; i++){
+      optr[i] = d_data[offset++];
+      if (offset >= size)
+       offset = 0;
+    }
+    d_offset = offset;
+    return noutput_items;
+  }
+
+  else {
+    if (d_offset >= d_data.size ())
+      return -1;                       // Done!
+
+    unsigned n = std::min ((unsigned) d_data.size () - d_offset,
+                          (unsigned) noutput_items);
+    for (unsigned i = 0; i < n; i++)
+      optr[i] = d_data[d_offset + i];
+
+    d_offset += n;
+    return n;
+  }
+}
+
+@NAME@_sptr
+gr_make_@BASE_NAME@ (const std::vector<@TYPE@> &data, bool repeat)
+{
+  return @NAME@_sptr (new @NAME@ (data, repeat));
+}
+
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
new file mode 100644 (file)
index 0000000..ee53869
--- /dev/null
@@ -0,0 +1,57 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <gr_sync_block.h>
+
+class @NAME@;
+typedef boost::shared_ptr<@NAME@> @NAME@_sptr;
+
+/*!
+ * \brief source of @TYPE@'s that gets its data from a vector
+ * \ingroup source
+ */
+
+class @NAME@ : public gr_sync_block {
+  friend @NAME@_sptr 
+  gr_make_@BASE_NAME@ (const std::vector<@TYPE@> &data, bool repeat = false);
+
+  std::vector<@TYPE@>  d_data;
+  bool                 d_repeat;
+  unsigned int         d_offset;
+
+  @NAME@ (const std::vector<@TYPE@> &data, bool repeat);
+
+ public:
+  virtual int work (int noutput_items,
+                   gr_vector_const_void_star &input_items,
+                   gr_vector_void_star &output_items);
+};
+
+@NAME@_sptr
+gr_make_@BASE_NAME@ (const std::vector<@TYPE@> &data, bool repeat);
+
+#endif
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
new file mode 100644 (file)
index 0000000..17aaf1e
--- /dev/null
@@ -0,0 +1,33 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@);
+
+@NAME@_sptr
+gr_make_@BASE_NAME@ (const std::vector<@TYPE@> &data, bool repeat = false);
+
+class @NAME@ : public gr_sync_block {
+ private:
+  @NAME@ (const std::vector<@TYPE@> &data);
+};
index 47ae07a6ba35877a10b6726515a34ad685479696..91d3c144be4d2f790c70abcb131c2868ce7a4617 100644 (file)
@@ -51,6 +51,9 @@ libruntime_la_SOURCES =                       \
        gr_runtime.cc                           \
        gr_runtime_impl.cc                      \
        gr_single_threaded_scheduler.cc         \
+       gr_sync_block.cc                        \
+       gr_sync_decimator.cc                    \
+       gr_sync_interpolator.cc                 \
        gr_tmp_path.cc                          \
        gr_vmcircbuf.cc                         \
        gr_vmcircbuf_mmap_shm_open.cc           \
@@ -92,6 +95,9 @@ grinclude_HEADERS =                           \
        gr_runtime_types.h                      \
        gr_select_handler.h                     \
        gr_single_threaded_scheduler.h          \
+       gr_sync_block.h                         \
+       gr_sync_decimator.h                     \
+       gr_sync_interpolator.h                  \
        gr_timer.h                              \
        gr_tmp_path.h                           \
        gr_types.h                              \
@@ -125,5 +131,8 @@ swiginclude_HEADERS =                       \
        gr_runtime.i                    \
        gr_simple_flowgraph.i           \
        gr_single_threaded_scheduler.i  \
+       gr_sync_block.i                 \
+       gr_sync_decimator.i             \
+       gr_sync_interpolator.i          \
        gr_swig_block_magic.i           \
        runtime.i
diff --git a/gnuradio-core/src/lib/runtime/gr_sync_block.cc b/gnuradio-core/src/lib/runtime/gr_sync_block.cc
new file mode 100644 (file)
index 0000000..ac2e90b
--- /dev/null
@@ -0,0 +1,68 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gr_sync_block.h>
+
+gr_sync_block::gr_sync_block (const std::string &name,
+                             gr_io_signature_sptr input_signature,
+                             gr_io_signature_sptr output_signature)
+  : gr_block(name, input_signature, output_signature)
+{
+  set_fixed_rate(true);
+}
+
+
+void
+gr_sync_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] = fixed_rate_noutput_to_ninput (noutput_items);
+}
+
+int
+gr_sync_block::fixed_rate_noutput_to_ninput(int noutput_items)
+{
+  return noutput_items + history() - 1;
+}
+
+int
+gr_sync_block::fixed_rate_ninput_to_noutput(int ninput_items)
+{
+  return std::max(0, ninput_items - (int)history() + 1);
+}
+
+int
+gr_sync_block::general_work (int noutput_items,
+                            gr_vector_int &ninput_items,
+                            gr_vector_const_void_star &input_items,
+                            gr_vector_void_star &output_items)
+{
+  int  r = work (noutput_items, input_items, output_items);
+  if (r > 0)
+    consume_each (r);
+  return r;
+}
diff --git a/gnuradio-core/src/lib/runtime/gr_sync_block.h b/gnuradio-core/src/lib/runtime/gr_sync_block.h
new file mode 100644 (file)
index 0000000..7607cd1
--- /dev/null
@@ -0,0 +1,65 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_GR_SYNC_BLOCK_H
+#define INCLUDED_GR_SYNC_BLOCK_H
+
+#include <gr_block.h>
+
+/*!
+ * \brief synchronous 1:1 input to output with history
+ * \ingroup block
+ *
+ * Override work to provide the signal processing implementation.
+ */
+class gr_sync_block : public gr_block
+{
+ protected:
+
+  gr_sync_block (const std::string &name,
+                gr_io_signature_sptr input_signature,
+                gr_io_signature_sptr output_signature);
+
+ public:
+
+  /*!
+   * \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;
+  
+
+  // gr_sync_block overrides these to assist work
+  void forecast (int noutput_items, gr_vector_int &ninput_items_required);
+  int  general_work (int noutput_items,
+                    gr_vector_int &ninput_items,
+                    gr_vector_const_void_star &input_items,
+                    gr_vector_void_star &output_items);
+
+  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
new file mode 100644 (file)
index 0000000..2bfcd2b
--- /dev/null
@@ -0,0 +1,29 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+class gr_sync_block : public gr_block
+{
+ protected:
+
+  gr_sync_block (const std::string &name,
+                gr_io_signature_sptr input_signature,
+                gr_io_signature_sptr output_signature);
+};
diff --git a/gnuradio-core/src/lib/runtime/gr_sync_decimator.cc b/gnuradio-core/src/lib/runtime/gr_sync_decimator.cc
new file mode 100644 (file)
index 0000000..1526cf8
--- /dev/null
@@ -0,0 +1,69 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gr_sync_decimator.h>
+
+gr_sync_decimator::gr_sync_decimator (const std::string &name,
+                                     gr_io_signature_sptr input_signature,
+                                     gr_io_signature_sptr output_signature,
+                                     unsigned decimation)
+  : gr_sync_block (name, input_signature, output_signature)
+{
+  set_decimation (decimation);
+}
+
+void
+gr_sync_decimator::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] = fixed_rate_noutput_to_ninput(noutput_items);
+}
+
+int
+gr_sync_decimator::fixed_rate_noutput_to_ninput(int noutput_items)
+{
+  return noutput_items * decimation() + history() - 1;
+}
+
+int
+gr_sync_decimator::fixed_rate_ninput_to_noutput(int ninput_items)
+{
+  return std::max(0, ninput_items - (int)history() + 1) / decimation();
+}
+
+int
+gr_sync_decimator::general_work (int noutput_items,
+                                gr_vector_int &ninput_items,
+                                gr_vector_const_void_star &input_items,
+                                gr_vector_void_star &output_items)
+{
+  int  r = work (noutput_items, input_items, output_items);
+  if (r > 0)
+    consume_each (r * decimation ());
+  return r;
+}
+
diff --git a/gnuradio-core/src/lib/runtime/gr_sync_decimator.h b/gnuradio-core/src/lib/runtime/gr_sync_decimator.h
new file mode 100644 (file)
index 0000000..d6ee14d
--- /dev/null
@@ -0,0 +1,68 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_GR_SYNC_DECIMATOR_H
+#define INCLUDED_GR_SYNC_DECIMATOR_H
+
+#include <gr_sync_block.h>
+
+/*!
+ * \brief synchronous N:1 input to output with history
+ * \ingroup block
+ *
+ * Override work to provide the signal processing implementation.
+ */
+class gr_sync_decimator : public gr_sync_block
+{
+ private:
+  unsigned     d_decimation;
+
+ protected:
+
+  gr_sync_decimator (const std::string &name,
+                    gr_io_signature_sptr input_signature,
+                    gr_io_signature_sptr output_signature,
+                    unsigned decimation);
+ public:
+
+  unsigned decimation () const { return d_decimation; }
+  void set_decimation (unsigned decimation)
+  {
+    d_decimation = decimation;
+    set_relative_rate (1.0 / decimation);
+  }
+
+  // gr_sync_decimator overrides these to assist work
+  void forecast (int noutput_items, gr_vector_int &ninput_items_required);
+  int  general_work (int noutput_items,
+                    gr_vector_int &ninput_items,
+                    gr_vector_const_void_star &input_items,
+                    gr_vector_void_star &output_items);
+
+  // derived classes should override work
+
+  int fixed_rate_ninput_to_noutput(int ninput);
+  int fixed_rate_noutput_to_ninput(int noutput);
+};
+
+
+#endif /* INCLUDED_GR_SYNC_DECIMATOR_H */
diff --git a/gnuradio-core/src/lib/runtime/gr_sync_decimator.i b/gnuradio-core/src/lib/runtime/gr_sync_decimator.i
new file mode 100644 (file)
index 0000000..167e843
--- /dev/null
@@ -0,0 +1,31 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+class gr_sync_decimator : public gr_sync_block
+{
+ protected:
+
+  gr_sync_decimator (const std::string &name,
+                    gr_io_signature_sptr input_signature,
+                    gr_io_signature_sptr output_signature,
+                    unsigned decimation);
+};
diff --git a/gnuradio-core/src/lib/runtime/gr_sync_interpolator.cc b/gnuradio-core/src/lib/runtime/gr_sync_interpolator.cc
new file mode 100644 (file)
index 0000000..0a88cc7
--- /dev/null
@@ -0,0 +1,70 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gr_sync_interpolator.h>
+
+gr_sync_interpolator::gr_sync_interpolator (const std::string &name,
+                                           gr_io_signature_sptr input_signature,
+                                           gr_io_signature_sptr output_signature,
+                                           unsigned interpolation)
+  : gr_sync_block (name, input_signature, output_signature)
+{
+  set_interpolation (interpolation);
+}
+
+void
+gr_sync_interpolator::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] = fixed_rate_noutput_to_ninput(noutput_items);
+}
+
+int
+gr_sync_interpolator::fixed_rate_noutput_to_ninput(int noutput_items)
+{
+  return noutput_items / interpolation() + history() - 1;
+}
+
+int
+gr_sync_interpolator::fixed_rate_ninput_to_noutout(int ninput_items)
+{
+  return std::max(0, ninput_items - (int)history() + 1) * interpolation();
+}
+
+int
+gr_sync_interpolator::general_work (int noutput_items,
+                                   gr_vector_int &ninput_items,
+                                   gr_vector_const_void_star &input_items,
+                                   gr_vector_void_star &output_items)
+{
+  int  r = work (noutput_items, input_items, output_items);
+  if (r > 0)
+    consume_each (r / interpolation ());
+  return r;
+}
+
+
diff --git a/gnuradio-core/src/lib/runtime/gr_sync_interpolator.h b/gnuradio-core/src/lib/runtime/gr_sync_interpolator.h
new file mode 100644 (file)
index 0000000..5151b7f
--- /dev/null
@@ -0,0 +1,68 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_GR_SYNC_INTERPOLATOR_H
+#define INCLUDED_GR_SYNC_INTERPOLATOR_H
+
+#include <gr_sync_block.h>
+
+/*!
+ * \brief synchronous 1:N input to output with history
+ * \ingroup block
+ *
+ * Override work to provide the signal processing implementation.
+ */
+class gr_sync_interpolator : public gr_sync_block
+{
+ private:
+  unsigned     d_interpolation;
+
+ protected:
+  gr_sync_interpolator (const std::string &name,
+                       gr_io_signature_sptr input_signature,
+                       gr_io_signature_sptr output_signature,
+                       unsigned interpolation);
+ public:
+
+  unsigned interpolation () const { return d_interpolation; }
+  void set_interpolation (unsigned interpolation)
+  {
+    d_interpolation = interpolation;
+    set_relative_rate (1.0 * interpolation);
+    set_output_multiple (interpolation);
+  }
+
+  // gr_sync_interpolator overrides these to assist work
+  void forecast (int noutput_items, gr_vector_int &ninput_items_required);
+  int  general_work (int noutput_items,
+                    gr_vector_int &ninput_items,
+                    gr_vector_const_void_star &input_items,
+                    gr_vector_void_star &output_items);
+
+  // derived classes should override work
+
+  int fixed_rate_ninput_to_noutout(int ninput);
+  int fixed_rate_noutput_to_ninput(int noutput);
+};
+
+
+#endif /* INCLUDED_GR_SYNC_INTERPOLATOR_H */
diff --git a/gnuradio-core/src/lib/runtime/gr_sync_interpolator.i b/gnuradio-core/src/lib/runtime/gr_sync_interpolator.i
new file mode 100644 (file)
index 0000000..5c42dfd
--- /dev/null
@@ -0,0 +1,31 @@
+/* -*- 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 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., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+class gr_sync_interpolator : public gr_sync_block
+{
+ protected:
+
+  gr_sync_interpolator (const std::string &name,
+                       gr_io_signature_sptr input_signature,
+                       gr_io_signature_sptr output_signature,
+                       unsigned interpolation);
+};
index 8e6c01f9a18fb46ddd5f830fde1cad498eab0111..cab33863060fecbe5b549277afcd9e5c01d4f95f 100644 (file)
@@ -36,6 +36,9 @@
 #include <gr_dispatcher.h>
 #include <gr_error_handler.h>
 #include <gr_realtime.h>
+#include <gr_sync_block.h>
+#include <gr_sync_decimator.h>
+#include <gr_sync_interpolator.h>
 %}
 
 %include <gr_io_signature.i>
@@ -54,3 +57,6 @@
 %include <gr_error_handler.i>
 %include <gr_realtime.i>
 %include <gr_runtime.i>
+%include <gr_sync_block.i>
+%include <gr_sync_decimator.i>
+%include <gr_sync_interpolator.i>
index 590b07b856508113c90ad18df6ff2a71885df32f..6bb2ca819bc07c38ef71a91ce20f10895d9ae876 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright 2001,2003,2004,2005 Free Software Foundation, Inc.
+# Copyright 2001,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -37,62 +37,238 @@ EXTRA_DIST = gen-swig-bug-fix
 
 LOCAL_IFILES =                         \
        gnuradio.i                      \
-       shared_ptr.i                                    
+       shared_ptr.i                    \
+       sw_general.i                    \
+       sw_gengen.i                     \
+       sw_filter.i                     \
+       sw_io.i                         
+
 
 ALL_IFILES =                           \
        $(LOCAL_IFILES)                 
 
 
+
+
+# ----------------------------------------------------------------
+# We've split the previously monstrous gnuradio_swig_python into
+# 5 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!
+
 BUILT_SOURCES =                                \
-       gnuradio_swig_python.cc         \
-       gnuradio_swig_python.py         \
-       gnuradio_swig_python.h          \
+       gnuradio_swig_py_runtime.cc     \
+       gnuradio_swig_py_runtime.py     \
+       gnuradio_swig_py_runtime.h      \
+       gnuradio_swig_py_general.cc     \
+       gnuradio_swig_py_general.py     \
+       gnuradio_swig_py_general.h      \
+       gnuradio_swig_py_gengen.cc      \
+       gnuradio_swig_py_gengen.py      \
+       gnuradio_swig_py_gengen.h       \
+       gnuradio_swig_py_filter.cc      \
+       gnuradio_swig_py_filter.py      \
+       gnuradio_swig_py_filter.h       \
+       gnuradio_swig_py_io.cc          \
+       gnuradio_swig_py_io.py          \
+       gnuradio_swig_py_io.h           \
        gnuradio_swig_bug_workaround.h  
 
+
+SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(INCLUDES)
+
+# ----------------------------------------------------------------
+# We break this up into 5 libraries...
+
+grgrlib_LTLIBRARIES =                          \
+       _gnuradio_swig_py_runtime.la            \
+       _gnuradio_swig_py_general.la            \
+       _gnuradio_swig_py_gengen.la             \
+       _gnuradio_swig_py_filter.la             \
+       _gnuradio_swig_py_io.la                 
+
+
 grgrpython_PYTHON =                    \
-       gnuradio_swig_python.py         
+       gnuradio_swig_python.py         \
+       gnuradio_swig_py_runtime.py     \
+       gnuradio_swig_py_general.py     \
+       gnuradio_swig_py_gengen.py      \
+       gnuradio_swig_py_filter.py      \
+       gnuradio_swig_py_io.py          
 
 
-SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(INCLUDES)
+# This results in the code being compiled with -O1 instead of -g -O2
+
+_gnuradio_swig_py_runtime_la_CXXFLAGS = @swig_CXXFLAGS@
+_gnuradio_swig_py_general_la_CXXFLAGS = @swig_CXXFLAGS@
+_gnuradio_swig_py_gengen_la_CXXFLAGS  = @swig_CXXFLAGS@
+_gnuradio_swig_py_filter_la_CXXFLAGS  = @swig_CXXFLAGS@
+_gnuradio_swig_py_io_la_CXXFLAGS      = @swig_CXXFLAGS@
 
 
 # ----------------------------------------------------------------
-# _gnuradio_swig_python contains all the glue that implements
-# the gnuradio.gr python package
+# Part 1: gnuradio.i -> gnuradio_swig_py_runtime
+#
+# We continue to call this gnuradio.i to avoid having to touch
+# lots of code in other modules
 
-grgrlib_LTLIBRARIES =                                  \
-       _gnuradio_swig_python.la
+_gnuradio_swig_py_runtime_la_SOURCES =                 \
+       gnuradio_swig_py_runtime.cc             
 
-_gnuradio_swig_python_la_SOURCES =                     \
-       gnuradio_swig_python.cc         
 
+_gnuradio_swig_py_runtime_la_LIBADD  =                 \
+       $(top_builddir)/gnuradio-core/src/lib/libgnuradio-core.la       \
+       $(PYTHON_LDFLAGS)                       \
+       -lstdc++
+
+_gnuradio_swig_py_runtime_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
 
-_gnuradio_swig_python_la_LIBADD  =                     \
+
+# KLUDGE: Force runtime include of gnuradio_swig_py_runtime.d dependency file.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
+@am__include@ @am__quote@./gnuradio_swig_py_runtime.d@am__quote@
+
+gnuradio_swig_py_runtime.py gnuradio_swig_py_runtime.h: gnuradio_swig_py_runtime.cc
+
+gnuradio_swig_py_runtime.cc : gnuradio.i
+       if $(SWIG) $(SWIGPYTHONARGS) -MMD -MF gnuradio_swig_py_runtime.Td -module gnuradio_swig_py_runtime -o gnuradio_swig_py_runtime.cc gnuradio.i ;\
+       then if test $(host_os) = mingw32; \
+            then sed 's,\\\\,/,g' <gnuradio_swig_py_runtime.Td >gnuradio_swig_py_runtime.d; rm -f gnuradio_swig_py_runtime.Td; \
+            else mv -f gnuradio_swig_py_runtime.Td gnuradio_swig_py_runtime.d; fi \
+       else rm -f gnuradio_swig_py_runtime.Td; exit 1; fi 
+
+
+# ----------------------------------------------------------------
+# Part 2: sw_general.i -> gnuradio_swig_py_general
+#
+
+_gnuradio_swig_py_general_la_SOURCES =                 \
+       gnuradio_swig_py_general.cc             
+
+
+_gnuradio_swig_py_general_la_LIBADD  =                 \
        $(top_builddir)/gnuradio-core/src/lib/libgnuradio-core.la       \
-       $(PYTHON_LDFLAGS)                               \
+       $(PYTHON_LDFLAGS)                       \
        -lstdc++
 
-_gnuradio_swig_python_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+_gnuradio_swig_py_general_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
 
 
-# KLUDGE: Force runtime include of gnuradio_swig_python.d dependency file.
+# KLUDGE: Force general include of gnuradio_swig_py_general.d dependency file.
 # This is not guaranteed to be portable, but will probably work.
 # If it works, we have accurate dependencies for our swig stuff, which is good.
-@am__include@ @am__quote@./gnuradio_swig_python.d@am__quote@
+@am__include@ @am__quote@./gnuradio_swig_py_general.d@am__quote@
 
-gnuradio_swig_python.py gnuradio_swig_python.h: gnuradio_swig_python.cc
+gnuradio_swig_py_general.py gnuradio_swig_py_general.h: gnuradio_swig_py_general.cc
 
-gnuradio_swig_python.cc : gnuradio.i
-       if $(SWIG) $(SWIGPYTHONARGS) -MMD -MF gnuradio_swig_python.Td -module gnuradio_swig_python -o gnuradio_swig_python.cc gnuradio.i ;\
+gnuradio_swig_py_general.cc : sw_general.i
+       if $(SWIG) $(SWIGPYTHONARGS) -MMD -MF gnuradio_swig_py_general.Td -module gnuradio_swig_py_general -o gnuradio_swig_py_general.cc sw_general.i ;\
        then if test $(host_os) = mingw32; \
-            then sed 's,\\\\,/,g' <gnuradio_swig_python.Td >gnuradio_swig_python.d; rm -f gnuradio_swig_python.Td; \
-            else mv -f gnuradio_swig_python.Td gnuradio_swig_python.d; fi \
-       else rm -f gnuradio_swig_python.Td; exit 1; fi 
+            then sed 's,\\\\,/,g' <gnuradio_swig_py_general.Td >gnuradio_swig_py_general.d; rm -f gnuradio_swig_py_general.Td; \
+            else mv -f gnuradio_swig_py_general.Td gnuradio_swig_py_general.d; fi \
+       else rm -f gnuradio_swig_py_general.Td; exit 1; fi 
+
+
+# ----------------------------------------------------------------
+# Part 3: sw_gengen.i -> gnuradio_swig_py_gengen
+#
+
+_gnuradio_swig_py_gengen_la_SOURCES =          \
+       gnuradio_swig_py_gengen.cc              
+
+
+_gnuradio_swig_py_gengen_la_LIBADD  =          \
+       $(top_builddir)/gnuradio-core/src/lib/libgnuradio-core.la       \
+       $(PYTHON_LDFLAGS)                       \
+       -lstdc++
+
+_gnuradio_swig_py_gengen_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
 
 
-gnuradio_swig_bug_workaround.h : gnuradio_swig_python.cc $(srcdir)/gen-swig-bug-fix
-       $(srcdir)/gen-swig-bug-fix gnuradio_swig_python.cc $@
+# KLUDGE: Force gengen include of gnuradio_swig_py_gengen.d dependency file.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
+@am__include@ @am__quote@./gnuradio_swig_py_gengen.d@am__quote@
+
+gnuradio_swig_py_gengen.py gnuradio_swig_py_gengen.h: gnuradio_swig_py_gengen.cc
+
+gnuradio_swig_py_gengen.cc : sw_gengen.i
+       if $(SWIG) $(SWIGPYTHONARGS) -MMD -MF gnuradio_swig_py_gengen.Td -module gnuradio_swig_py_gengen -o gnuradio_swig_py_gengen.cc sw_gengen.i ;\
+       then if test $(host_os) = mingw32; \
+            then sed 's,\\\\,/,g' <gnuradio_swig_py_gengen.Td >gnuradio_swig_py_gengen.d; rm -f gnuradio_swig_py_gengen.Td; \
+            else mv -f gnuradio_swig_py_gengen.Td gnuradio_swig_py_gengen.d; fi \
+       else rm -f gnuradio_swig_py_gengen.Td; exit 1; fi 
+
+
+# ----------------------------------------------------------------
+# Part 4: sw_filter.i -> gnuradio_swig_py_filter
+#
+
+_gnuradio_swig_py_filter_la_SOURCES =          \
+       gnuradio_swig_py_filter.cc              
+
+
+_gnuradio_swig_py_filter_la_LIBADD  =          \
+       $(top_builddir)/gnuradio-core/src/lib/libgnuradio-core.la       \
+       $(PYTHON_LDFLAGS)                       \
+       -lstdc++
+
+_gnuradio_swig_py_filter_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+
+
+# KLUDGE: Force filter include of gnuradio_swig_py_filter.d dependency file.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
+@am__include@ @am__quote@./gnuradio_swig_py_filter.d@am__quote@
+
+gnuradio_swig_py_filter.py gnuradio_swig_py_filter.h: gnuradio_swig_py_filter.cc
+
+gnuradio_swig_py_filter.cc : sw_filter.i
+       if $(SWIG) $(SWIGPYTHONARGS) -MMD -MF gnuradio_swig_py_filter.Td -module gnuradio_swig_py_filter -o gnuradio_swig_py_filter.cc sw_filter.i ;\
+       then if test $(host_os) = mingw32; \
+            then sed 's,\\\\,/,g' <gnuradio_swig_py_filter.Td >gnuradio_swig_py_filter.d; rm -f gnuradio_swig_py_filter.Td; \
+            else mv -f gnuradio_swig_py_filter.Td gnuradio_swig_py_filter.d; fi \
+       else rm -f gnuradio_swig_py_filter.Td; exit 1; fi 
+
+
+# ----------------------------------------------------------------
+# Part 5: sw_io.i -> gnuradio_swig_py_io
+#
+
+_gnuradio_swig_py_io_la_SOURCES =              \
+       gnuradio_swig_py_io.cc          
+
+
+_gnuradio_swig_py_io_la_LIBADD  =              \
+       $(top_builddir)/gnuradio-core/src/lib/libgnuradio-core.la       \
+       $(PYTHON_LDFLAGS)                       \
+       -lstdc++
+
+_gnuradio_swig_py_io_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
+
+
+# KLUDGE: Force io include of gnuradio_swig_py_io.d dependency file.
+# This is not guaranteed to be portable, but will probably work.
+# If it works, we have accurate dependencies for our swig stuff, which is good.
+@am__include@ @am__quote@./gnuradio_swig_py_io.d@am__quote@
+
+gnuradio_swig_py_io.py gnuradio_swig_py_io.h: gnuradio_swig_py_io.cc
+
+gnuradio_swig_py_io.cc : sw_io.i
+       if $(SWIG) $(SWIGPYTHONARGS) -MMD -MF gnuradio_swig_py_io.Td -module gnuradio_swig_py_io -o gnuradio_swig_py_io.cc sw_io.i ;\
+       then if test $(host_os) = mingw32; \
+            then sed 's,\\\\,/,g' <gnuradio_swig_py_io.Td >gnuradio_swig_py_io.d; rm -f gnuradio_swig_py_io.Td; \
+            else mv -f gnuradio_swig_py_io.Td gnuradio_swig_py_io.d; fi \
+       else rm -f gnuradio_swig_py_io.Td; exit 1; fi 
+
+
+# ----------------------------------------------------------------
+# FIXME As of swig 1.3.31, this still seems to be required...
 
+gnuradio_swig_bug_workaround.h : gnuradio_swig_py_runtime.cc $(srcdir)/gen-swig-bug-fix
+       $(srcdir)/gen-swig-bug-fix gnuradio_swig_py_runtime.cc $@
 
 # ----------------------------------------------------------------
 
@@ -111,4 +287,9 @@ swiginclude_HEADERS =                               \
 MOSTLYCLEANFILES = \
        $(BUILT_SOURCES) *~ *.pyc 
 
-DISTCLEANFILES = gnuradio_swig_python.d
+DISTCLEANFILES =                       \
+       gnuradio_swig_py_runtime.d      \
+       gnuradio_swig_py_general.d      \
+       gnuradio_swig_py_gengen.d       \
+       gnuradio_swig_py_filter.d       \
+       gnuradio_swig_py_io.d           
index 5475e173454a5498a64b51180ea804db534b471c..706ba8a666339f95a746d402d3d5d40946c83d70 100644 (file)
@@ -27,8 +27,7 @@
 
 
 #ifndef SWIGIMPORTED
-// we set the module name on the command line (not any more)
-%module(directors="1") gnuradio_swig_python
+%module(directors="1") gnuradio_swig_py_runtime
 #endif
 
 ////////////////////////////////////////////////////////////////////////
@@ -75,9 +74,9 @@ namespace std {
 ////////////////////////////////////////////////////////////////////////
 
 %include <runtime.i>
-%include <general.i>
-%include <filter.i>
-%include <io.i>
+ // %include <general.i>
+ // %include <filter.i>
+ // %include <io.i>
 
 // %include <atsc.i>
 
diff --git a/gnuradio-core/src/lib/swig/gnuradio_swig_python.py b/gnuradio-core/src/lib/swig/gnuradio_swig_python.py
new file mode 100644 (file)
index 0000000..2bac094
--- /dev/null
@@ -0,0 +1,27 @@
+#
+# 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 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 this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+
+# This file implements the old gnuradio_swig_python namespace
+
+from gnuradio_swig_py_runtime import *
+from gnuradio_swig_py_general import *
+from gnuradio_swig_py_gengen import *
+from gnuradio_swig_py_filter import *
+from gnuradio_swig_py_io import *
diff --git a/gnuradio-core/src/lib/swig/sw_filter.i b/gnuradio-core/src/lib/swig/sw_filter.i
new file mode 100644 (file)
index 0000000..336f9c6
--- /dev/null
@@ -0,0 +1,36 @@
+/* -*- 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 Filter 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 Filter Public License for more details.
+ * 
+ * You should have received a copy of the GNU Filter 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 SWIGIMPORTED
+%module(directors="1") gnuradio_swig_py_filter
+#endif
+
+
+%feature("autodoc", "1");              // generate python docstrings
+
+%include "exception.i"
+%import "gnuradio.i"                           // the common stuff
+
+%{
+#include "gnuradio_swig_bug_workaround.h"      // mandatory bug fix
+%}
+
+%include "filter.i"
diff --git a/gnuradio-core/src/lib/swig/sw_general.i b/gnuradio-core/src/lib/swig/sw_general.i
new file mode 100644 (file)
index 0000000..06b164d
--- /dev/null
@@ -0,0 +1,36 @@
+/* -*- 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 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 this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef SWIGIMPORTED
+%module(directors="1") gnuradio_swig_py_general
+#endif
+
+
+%feature("autodoc", "1");              // generate python docstrings
+
+%include "exception.i"
+%import "gnuradio.i"                           // the common stuff
+
+%{
+#include "gnuradio_swig_bug_workaround.h"      // mandatory bug fix
+%}
+
+%include "general.i"
diff --git a/gnuradio-core/src/lib/swig/sw_gengen.i b/gnuradio-core/src/lib/swig/sw_gengen.i
new file mode 100644 (file)
index 0000000..a88b45d
--- /dev/null
@@ -0,0 +1,36 @@
+/* -*- 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 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 this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef SWIGIMPORTED
+%module(directors="1") gnuradio_swig_py_gengen
+#endif
+
+
+%feature("autodoc", "1");              // generate python docstrings
+
+%include "exception.i"
+%import "gnuradio.i"                           // the common stuff
+
+%{
+#include "gnuradio_swig_bug_workaround.h"      // mandatory bug fix
+%}
+
+%include "gengen.i"
diff --git a/gnuradio-core/src/lib/swig/sw_io.i b/gnuradio-core/src/lib/swig/sw_io.i
new file mode 100644 (file)
index 0000000..1733e67
--- /dev/null
@@ -0,0 +1,36 @@
+/* -*- 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 Io 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 Io Public License for more details.
+ * 
+ * You should have received a copy of the GNU Io 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 SWIGIMPORTED
+%module(directors="1") gnuradio_swig_py_io
+#endif
+
+
+%feature("autodoc", "1");              // generate python docstrings
+
+%include "exception.i"
+%import "gnuradio.i"                           // the common stuff
+
+%{
+#include "gnuradio_swig_bug_workaround.h"      // mandatory bug fix
+%}
+
+%include "io.i"
index 5a8a346a1878b93dce48aecb5a455e0686b27e6c..1b7f8133ead8bc2137ec6bfa6ea70f2e4778b7f0 100644 (file)
@@ -44,6 +44,7 @@ EXTRA_DIST =                                  \
        usrp_rx_cfile.py                        \
        usrp_rx_nogui.py                        \
        usrp_siggen.py                          \
+       usrp_spectrum_sense.py                  \
        usrp_tv_rcv_nogui.py                    \
        usrp_tv_rcv.py                          \
        usrp_wfm_rcv2_nogui.py                  \
index 7b1348da3aa1fb816f7b2b070fa29c6e18d2a04c..3c44464d3ef24100c9f0c8fcd7fe105a490316e1 100644 (file)
@@ -54,5 +54,3 @@ libecc_la_LIBADD =            \
        -lstdc++
 
 MOSTLYCLEANFILES = *.loT *~
-
-CONFIG_CLEAN_FILES = *.in
index 85b9724e31ed7159e6a116ca6e7be6f2261a838a..3420d5581aa3fdb0bcfb933e68c08071b71c7284 100644 (file)
@@ -33,4 +33,3 @@ noinst_HEADERS =      \
 
 MOSTLYCLEANFILES = *.loT *~
 
-CONFIG_CLEAN_FILES = *.in
index 39b35d87eab611e61f672e2ef3b7c3d4545fdcf0..4e7d69e47d0299eec8c09e7a491e7ce5f7a04036 100644 (file)
@@ -17,6 +17,9 @@ mypydir=$1/src:$1/src/python
 grswigdir=@abs_top_builddir@/gnuradio-core/src/lib/swig
 grswigdir=$grswigdir:$grswigdir/.libs
 
+# Where to find core's hand generated swig glue
+grswigsrcdir=@abs_top_srcdir@/gnuradio-core/src/lib/swig
+
 # Where to find core's python modules
 grpydir=@abs_top_srcdir@/gnuradio-core/src/python
 
@@ -25,7 +28,7 @@ grlibdir=@abs_top_builddir@/gnuradio-core/src/lib
 grlibdir=$grlibdir:$grlibdir/.libs
 
 # Construct search path for python modules
-PYTHONPATH="$mylibdir:$mysrcdir:$mypydir:$grswigdir:$grpydir:$PYTHONPATH"
+PYTHONPATH="$mylibdir:$mysrcdir:$mypydir:$grswigdir:$grswigsrcdir:$grpydir:$PYTHONPATH"
 export PYTHONPATH
 
 # For OS/X