summaryrefslogtreecommitdiff
path: root/gr-blocks/include
diff options
context:
space:
mode:
Diffstat (limited to 'gr-blocks/include')
-rw-r--r--gr-blocks/include/blocks/CMakeLists.txt95
-rw-r--r--gr-blocks/include/blocks/add_XX.h.t53
-rw-r--r--gr-blocks/include/blocks/add_const_XX.h.t65
-rw-r--r--gr-blocks/include/blocks/add_const_vXX.h.t66
-rw-r--r--gr-blocks/include/blocks/add_ff.h50
-rw-r--r--gr-blocks/include/blocks/api.h33
-rw-r--r--gr-blocks/include/blocks/char_to_float.h62
-rw-r--r--gr-blocks/include/blocks/char_to_short.h51
-rw-r--r--gr-blocks/include/blocks/divide_XX.h.t53
-rw-r--r--gr-blocks/include/blocks/multiply_XX.h.t53
-rw-r--r--gr-blocks/include/blocks/multiply_cc.h50
-rw-r--r--gr-blocks/include/blocks/multiply_const_XX.h.t66
-rw-r--r--gr-blocks/include/blocks/multiply_const_cc.h66
-rw-r--r--gr-blocks/include/blocks/multiply_const_ff.h66
-rw-r--r--gr-blocks/include/blocks/multiply_const_vXX.h.t66
-rw-r--r--gr-blocks/include/blocks/multiply_ff.h50
-rw-r--r--gr-blocks/include/blocks/sub_XX.h.t53
17 files changed, 998 insertions, 0 deletions
diff --git a/gr-blocks/include/blocks/CMakeLists.txt b/gr-blocks/include/blocks/CMakeLists.txt
new file mode 100644
index 000000000..7f29e5a7b
--- /dev/null
+++ b/gr-blocks/include/blocks/CMakeLists.txt
@@ -0,0 +1,95 @@
+# Copyright 2012 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+
+########################################################################
+# generate helper scripts to expand templated files
+########################################################################
+include(GrPython)
+
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+#!${PYTHON_EXECUTABLE}
+
+import sys, os, re
+sys.path.append('${GR_CORE_PYTHONPATH}')
+os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+
+if __name__ == '__main__':
+ import build_utils
+ root, inp = sys.argv[1:3]
+ for sig in sys.argv[3:]:
+ name = re.sub ('X+', sig, root)
+ d = build_utils.standard_dict(name, sig, 'blocks')
+ build_utils.expand_template(d, inp)
+
+")
+
+macro(expand_h root)
+ #make a list of all the generated files
+ unset(expanded_files_h)
+ foreach(sig ${ARGN})
+ string(REGEX REPLACE "X+" ${sig} name ${root})
+ list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
+ endforeach(sig)
+
+ #create a command to generate the files
+ add_custom_command(
+ OUTPUT ${expanded_files_h}
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t
+ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+ ${root} ${root}.h.t ${ARGN}
+ )
+
+ #install rules for the generated h files
+ list(APPEND generated_includes ${expanded_files_h})
+endmacro(expand_h)
+
+########################################################################
+# Invoke macro to generate various sources
+########################################################################
+expand_h(add_XX ss ii cc)
+expand_h(add_const_XX ss ii ff cc)
+expand_h(add_const_vXX ss ii ff cc)
+expand_h(divide_XX ss ii ff cc)
+expand_h(multiply_XX ss ii)
+expand_h(multiply_const_XX ss ii)
+expand_h(multiply_const_vXX ss ii ff cc)
+expand_h(sub_XX ss ii ff cc)
+
+add_custom_target(blocks_generated_includes DEPENDS
+ ${generated_includes}
+)
+
+########################################################################
+# Install header files
+########################################################################
+install(FILES
+ ${generated_includes}
+ api.h
+ add_ff.h
+ char_to_float.h
+ char_to_short.h
+ multiply_cc.h
+ multiply_ff.h
+ multiply_const_cc.h
+ multiply_const_ff.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/blocks
+ COMPONENT "blocks_devel"
+)
diff --git a/gr-blocks/include/blocks/add_XX.h.t b/gr-blocks/include/blocks/add_XX.h.t
new file mode 100644
index 000000000..607b82066
--- /dev/null
+++ b/gr-blocks/include/blocks/add_XX.h.t
@@ -0,0 +1,53 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2009,2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <blocks/api.h>
+#include <gr_sync_block.h>
+
+namespace gr {
+ namespace blocks {
+
+ /*!
+ * \brief output = sum (input_0, input_1, ...)
+ * \ingroup math_blk
+ *
+ * Add across all input streams.
+ */
+ class BLOCKS_API @NAME@ : virtual public gr_sync_block
+ {
+ public:
+
+ // gr::blocks::@NAME@::sptr
+ typedef boost::shared_ptr<@NAME@> sptr;
+
+ static sptr make(size_t vlen=1);
+ };
+
+ } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/blocks/add_const_XX.h.t b/gr-blocks/include/blocks/add_const_XX.h.t
new file mode 100644
index 000000000..df968feac
--- /dev/null
+++ b/gr-blocks/include/blocks/add_const_XX.h.t
@@ -0,0 +1,65 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <blocks/api.h>
+#include <gr_sync_block.h>
+
+namespace gr {
+ namespace blocks {
+
+ /*!
+ * \brief output = input + constant
+ * \ingroup math_blk
+ */
+ class BLOCKS_API @NAME@ : virtual public gr_sync_block
+ {
+ public:
+
+ // gr::blocks::@NAME@::sptr
+ typedef boost::shared_ptr<@NAME@> sptr;
+
+ /*!
+ * \brief Create an instance of @NAME@
+ * \param k additive constant
+ */
+ static sptr make(@O_TYPE@ k);
+
+ /*!
+ * \brief Return additive constant
+ */
+ virtual @O_TYPE@ k() const = 0;
+
+ /*!
+ * \brief Set additive constant
+ */
+ virtual void set_k(@O_TYPE@ k) = 0;
+ };
+
+ }
+}
+
+#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/blocks/add_const_vXX.h.t b/gr-blocks/include/blocks/add_const_vXX.h.t
new file mode 100644
index 000000000..c4cd49fa4
--- /dev/null
+++ b/gr-blocks/include/blocks/add_const_vXX.h.t
@@ -0,0 +1,66 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2006,2010,2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <blocks/api.h>
+#include <gr_sync_block.h>
+
+namespace gr {
+ namespace blocks {
+
+ /*!
+ * \brief output = input + constant vector
+ * \ingroup math_blk
+ */
+ class BLOCKS_API @NAME@ : virtual public gr_sync_block
+ {
+
+ public:
+
+ // gr::blocks::@NAME@::sptr
+ typedef boost::shared_ptr<@NAME@> sptr;
+
+ /*!
+ * \brief Create an instance of @NAME@
+ * \param k additive constant vector
+ */
+ static sptr make(std::vector<@O_TYPE@> k);
+
+ /*!
+ * \brief Return additive constant vector
+ */
+ virtual std::vector<@O_TYPE@> k() const = 0;
+
+ /*!
+ * \brief Set additive constant vector
+ */
+ virtual void set_k(std::vector<@O_TYPE@> k) = 0;
+ };
+
+ } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/blocks/add_ff.h b/gr-blocks/include/blocks/add_ff.h
new file mode 100644
index 000000000..1e7350c1b
--- /dev/null
+++ b/gr-blocks/include/blocks/add_ff.h
@@ -0,0 +1,50 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_BLOCKS_ADD_FF_H
+#define INCLUDED_BLOCKS_ADD_FF_H
+
+#include <blocks/api.h>
+#include <gr_sync_block.h>
+
+namespace gr {
+ namespace blocks {
+
+ class BLOCKS_API add_ff : virtual public gr_sync_block
+ {
+ public:
+
+ // gr::blocks::add_ff::sptr
+ typedef boost::shared_ptr<add_ff> sptr;
+
+ /*!
+ * \brief Add streams of float values
+ * \param vlen Vector length
+ * \ingroup math_blk
+ */
+ static sptr make(size_t vlen=1);
+ };
+
+ } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* INCLUDED_BLOCKS_ADD_FF_H */
diff --git a/gr-blocks/include/blocks/api.h b/gr-blocks/include/blocks/api.h
new file mode 100644
index 000000000..45fbc0d21
--- /dev/null
+++ b/gr-blocks/include/blocks/api.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_BLOCKS_API_H
+#define INCLUDED_BLOCKS_API_H
+
+#include <gruel/attributes.h>
+
+#ifdef gnuradio_blocks_EXPORTS
+# define BLOCKS_API __GR_ATTR_EXPORT
+#else
+# define BLOCKS_API __GR_ATTR_IMPORT
+#endif
+
+#endif /* INCLUDED_BLOCKS_API_H */
diff --git a/gr-blocks/include/blocks/char_to_float.h b/gr-blocks/include/blocks/char_to_float.h
new file mode 100644
index 000000000..92a2dbf80
--- /dev/null
+++ b/gr-blocks/include/blocks/char_to_float.h
@@ -0,0 +1,62 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2005,2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_BLOCKS_CHAR_TO_FLOAT_H
+#define INCLUDED_BLOCKS_CHAR_TO_FLOAT_H
+
+#include <blocks/api.h>
+#include <gr_sync_block.h>
+
+namespace gr {
+ namespace blocks {
+
+ /*!
+ * \brief Convert stream of chars to a stream of float
+ * \ingroup converter_blk
+ *
+ * \param vlen vector length of data streams.
+ * \param scale a scalar divider to change the output signal scale.
+ */
+ class BLOCKS_API char_to_float : virtual public gr_sync_block
+ {
+ public:
+
+ // gr::blocks::char_to_float_ff::sptr
+ typedef boost::shared_ptr<char_to_float> sptr;
+
+ static sptr make(size_t vlen=1, float scale=1.0);
+
+ /*!
+ * Get the scalar divider value.
+ */
+ virtual float scale() const = 0;
+
+ /*!
+ * Set the scalar divider value.
+ */
+ virtual void set_scale(float scale) = 0;
+ };
+
+ } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* INCLUDED_BLOCKS_CHAR_TO_FLOAT_H */
diff --git a/gr-blocks/include/blocks/char_to_short.h b/gr-blocks/include/blocks/char_to_short.h
new file mode 100644
index 000000000..e2bb3a859
--- /dev/null
+++ b/gr-blocks/include/blocks/char_to_short.h
@@ -0,0 +1,51 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2005,2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_BLOCKS_CHAR_TO_SHORT_H
+#define INCLUDED_BLOCKS_CHAR_TO_SHORT_H
+
+#include <blocks/api.h>
+#include <gr_sync_block.h>
+
+namespace gr {
+ namespace blocks {
+
+ /*!
+ * \brief Convert stream of chars to a stream of short
+ * \ingroup converter_blk
+ *
+ * \param vlen vector length of data streams.
+ */
+ class BLOCKS_API char_to_short : virtual public gr_sync_block
+ {
+ public:
+
+ // gr::blocks::char_to_short_ff::sptr
+ typedef boost::shared_ptr<char_to_short> sptr;
+
+ static sptr make(size_t vlen=1);
+ };
+
+ } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* INCLUDED_BLOCKS_CHAR_TO_SHORT_H */
diff --git a/gr-blocks/include/blocks/divide_XX.h.t b/gr-blocks/include/blocks/divide_XX.h.t
new file mode 100644
index 000000000..9a382e4a0
--- /dev/null
+++ b/gr-blocks/include/blocks/divide_XX.h.t
@@ -0,0 +1,53 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2009,2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <blocks/api.h>
+#include <gr_sync_block.h>
+
+namespace gr {
+ namespace blocks {
+
+ /*!
+ * \brief output = input_0 / input_1 / input_x ...)
+ * \ingroup math_blk
+ *
+ * Divide across all input streams.
+ */
+ class BLOCKS_API @NAME@ : virtual public gr_sync_block
+ {
+ public:
+
+ // gr::blocks::@NAME@::sptr
+ typedef boost::shared_ptr<@NAME@> sptr;
+
+ static sptr make(size_t vlen=1);
+ };
+
+ } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/blocks/multiply_XX.h.t b/gr-blocks/include/blocks/multiply_XX.h.t
new file mode 100644
index 000000000..47ed3746c
--- /dev/null
+++ b/gr-blocks/include/blocks/multiply_XX.h.t
@@ -0,0 +1,53 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004, 2009, 2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <blocks/api.h>
+#include <gr_sync_block.h>
+
+namespace gr {
+ namespace blocks {
+
+ /*!
+ * \brief output = prod (input_0, input_1, ...)
+ * \ingroup math_blk
+ *
+ * Multiply across all input streams.
+ */
+ class BLOCKS_API @NAME@ : virtual public gr_sync_block
+ {
+ public:
+
+ // gr::blocks::@NAME@::sptr
+ typedef boost::shared_ptr<@NAME@> sptr;
+
+ static sptr make(size_t vlen=1);
+ };
+
+ } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/blocks/multiply_cc.h b/gr-blocks/include/blocks/multiply_cc.h
new file mode 100644
index 000000000..559fcda57
--- /dev/null
+++ b/gr-blocks/include/blocks/multiply_cc.h
@@ -0,0 +1,50 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_GR_MULTIPLY_CC_H
+#define INCLUDED_GR_MULTIPLY_CC_H
+
+#include <blocks/api.h>
+#include <gr_sync_block.h>
+
+namespace gr {
+ namespace blocks {
+
+ class BLOCKS_API multiply_cc : virtual public gr_sync_block
+ {
+ public:
+
+ // gr::blocks::multiply_cc::sptr
+ typedef boost::shared_ptr<multiply_cc> sptr;
+
+ /*!
+ * \brief Multiply streams of complex values
+ * \param vlen Vector length
+ * \ingroup math_blk
+ */
+ static sptr make(size_t vlen=1);
+ };
+
+ } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* INCLUDED_BLOCKS_MULTIPLY_CC_H */
diff --git a/gr-blocks/include/blocks/multiply_const_XX.h.t b/gr-blocks/include/blocks/multiply_const_XX.h.t
new file mode 100644
index 000000000..a7cd3a858
--- /dev/null
+++ b/gr-blocks/include/blocks/multiply_const_XX.h.t
@@ -0,0 +1,66 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <blocks/api.h>
+#include <gr_sync_block.h>
+
+namespace gr {
+ namespace blocks {
+
+ /*!
+ * \brief output = input * constant
+ * \ingroup math_blk
+ */
+ class BLOCKS_API @NAME@ : virtual public gr_sync_block
+ {
+
+ public:
+
+ // gr::blocks::@NAME@::sptr
+ typedef boost::shared_ptr<@NAME@> sptr;
+
+ /*!
+ * \brief Create an instance of @NAME@
+ * \param k multiplicative constant
+ */
+ static sptr make(@O_TYPE@ k);
+
+ /*!
+ * \brief Return multiplicative constant
+ */
+ virtual @O_TYPE@ k() const = 0;
+
+ /*!
+ * \brief Set multiplicative constant
+ */
+ virtual void set_k(@O_TYPE@ k) = 0;
+ };
+
+ } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* @GUARD_NAME */
diff --git a/gr-blocks/include/blocks/multiply_const_cc.h b/gr-blocks/include/blocks/multiply_const_cc.h
new file mode 100644
index 000000000..032a765a4
--- /dev/null
+++ b/gr-blocks/include/blocks/multiply_const_cc.h
@@ -0,0 +1,66 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef INCLUDED_MULTIPLY_CONST_CC_H
+#define INCLUDED_MULTIPLY_CONST_CC_H
+
+#include <blocks/api.h>
+#include <gr_sync_block.h>
+
+namespace gr {
+ namespace blocks {
+
+ /*!
+ * \brief output = input * complex constant
+ * \ingroup math_blk
+ */
+ class BLOCKS_API multiply_const_cc : virtual public gr_sync_block
+ {
+
+ public:
+
+ // gr::blocks::multiply_const_cc::sptr
+ typedef boost::shared_ptr<multiply_const_cc> sptr;
+
+ /*!
+ * \brief Create an instance of multiply_const_cc
+ * \param k complex multiplicative constant
+ */
+ static sptr make(gr_complex k, size_t vlen=1);
+
+ /*!
+ * \brief Return complex multiplicative constant
+ */
+ virtual gr_complex k() const = 0;
+
+ /*!
+ * \brief Set complex multiplicative constant
+ */
+ virtual void set_k(gr_complex k) = 0;
+ };
+
+ } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* INCLUDED_MULTIPLY_CONST_CC_H */
diff --git a/gr-blocks/include/blocks/multiply_const_ff.h b/gr-blocks/include/blocks/multiply_const_ff.h
new file mode 100644
index 000000000..e755f59bf
--- /dev/null
+++ b/gr-blocks/include/blocks/multiply_const_ff.h
@@ -0,0 +1,66 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef INCLUDED_MULTIPLY_CONST_FF_H
+#define INCLUDED_MULTIPLY_CONST_FF_H
+
+#include <blocks/api.h>
+#include <gr_sync_block.h>
+
+namespace gr {
+ namespace blocks {
+
+ /*!
+ * \brief output = input * real constant
+ * \ingroup math_blk
+ */
+ class BLOCKS_API multiply_const_ff : virtual public gr_sync_block
+ {
+
+ public:
+
+ // gr::blocks::multiply_const_ff::sptr
+ typedef boost::shared_ptr<multiply_const_ff> sptr;
+
+ /*!
+ * \brief Create an instance of multiply_const_ff
+ * \param k real multiplicative constant
+ */
+ static sptr make(float k, size_t vlen=1);
+
+ /*!
+ * \brief Return real multiplicative constant
+ */
+ virtual float k() const = 0;
+
+ /*!
+ * \brief Set real multiplicative constant
+ */
+ virtual void set_k(float k) = 0;
+ };
+
+ } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* INCLUDED_MULTIPLY_CONST_FF_H */
diff --git a/gr-blocks/include/blocks/multiply_const_vXX.h.t b/gr-blocks/include/blocks/multiply_const_vXX.h.t
new file mode 100644
index 000000000..4cd479f00
--- /dev/null
+++ b/gr-blocks/include/blocks/multiply_const_vXX.h.t
@@ -0,0 +1,66 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2006,2010,2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <blocks/api.h>
+#include <gr_sync_block.h>
+
+namespace gr {
+ namespace blocks {
+
+ /*!
+ * \brief output = input * constant vector (element-wise)
+ * \ingroup math_blk
+ */
+ class BLOCKS_API @NAME@ : virtual public gr_sync_block
+ {
+
+ public:
+
+ // gr::blocks::@NAME@::sptr
+ typedef boost::shared_ptr<@NAME@> sptr;
+
+ /*!
+ * \brief Create an instance of @NAME@
+ * \param k multiplicative constant vector
+ */
+ static sptr make(std::vector<@O_TYPE@> k);
+
+ /*!
+ * \brief Return multiplicative constant vector
+ */
+ virtual std::vector<@O_TYPE@> k() const = 0;
+
+ /*!
+ * \brief Set multiplicative constant vector
+ */
+ virtual void set_k(std::vector<@O_TYPE@> k) = 0;
+ };
+
+ } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* @GUARD_NAME@ */
diff --git a/gr-blocks/include/blocks/multiply_ff.h b/gr-blocks/include/blocks/multiply_ff.h
new file mode 100644
index 000000000..683b540bb
--- /dev/null
+++ b/gr-blocks/include/blocks/multiply_ff.h
@@ -0,0 +1,50 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_GR_MULTIPLY_FF_H
+#define INCLUDED_GR_MULTIPLY_FF_H
+
+#include <blocks/api.h>
+#include <gr_sync_block.h>
+
+namespace gr {
+ namespace blocks {
+
+ class BLOCKS_API multiply_ff : virtual public gr_sync_block
+ {
+ public:
+
+ // gr::blocks::multiply_ff::sptr
+ typedef boost::shared_ptr<multiply_ff> sptr;
+
+ /*!
+ * \brief Multiply streams of float values
+ * \param vlen Vector length
+ * \ingroup math_blk
+ */
+ static sptr make(size_t vlen=1);
+ };
+
+ } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* INCLUDED_BLOCKS_MULTIPLY_FF_H */
diff --git a/gr-blocks/include/blocks/sub_XX.h.t b/gr-blocks/include/blocks/sub_XX.h.t
new file mode 100644
index 000000000..8202ac54b
--- /dev/null
+++ b/gr-blocks/include/blocks/sub_XX.h.t
@@ -0,0 +1,53 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2009,2012 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <blocks/api.h>
+#include <gr_sync_block.h>
+
+namespace gr {
+ namespace blocks {
+
+ /*!
+ * \brief output = input_0 - input_1 - ...)
+ * \ingroup math_blk
+ *
+ * Subtract across all input streams.
+ */
+ class BLOCKS_API @NAME@ : virtual public gr_sync_block
+ {
+ public:
+
+ // gr::blocks::@NAME@::sptr
+ typedef boost::shared_ptr<@NAME@> sptr;
+
+ static sptr make(size_t vlen=1);
+ };
+
+ } /* namespace blocks */
+} /* namespace gr */
+
+#endif /* @GUARD_NAME@ */