diff options
Diffstat (limited to 'gr-blocks')
38 files changed, 1460 insertions, 324 deletions
diff --git a/gr-blocks/CMakeLists.txt b/gr-blocks/CMakeLists.txt index 685f5736fb..539592419a 100644 --- a/gr-blocks/CMakeLists.txt +++ b/gr-blocks/CMakeLists.txt @@ -28,6 +28,7 @@ include(GrBoost) include(GrComponent) GR_REGISTER_COMPONENT("gr-blocks" ENABLE_GR_BLOCKS Boost_FOUND + ENABLE_VOLK ENABLE_GNURADIO_RUNTIME ) @@ -36,6 +37,7 @@ GR_SET_GLOBAL(GR_BLOCKS_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_BINARY_DIR}/lib ${CMAKE_CURRENT_BINARY_DIR}/include + ${VOLK_INCLUDE_DIRS} ) ######################################################################## diff --git a/gr-blocks/grc/blocks_block_tree.xml b/gr-blocks/grc/blocks_block_tree.xml index cb9ad639c6..ef2703f695 100644 --- a/gr-blocks/grc/blocks_block_tree.xml +++ b/gr-blocks/grc/blocks_block_tree.xml @@ -93,6 +93,7 @@ <block>blocks_add_xx</block> <block>blocks_add_const_vxx</block> <block>blocks_divide_xx</block> + <block>blocks_exponentiate_const_cci</block> <block>blocks_multiply_xx</block> <block>blocks_multiply_const_xx</block> <block>blocks_multiply_const_vxx</block> @@ -193,6 +194,7 @@ <name>Stream Tag Tools</name> <block>blocks_tag_debug</block> <block>blocks_tag_gate</block> + <block>blocks_tag_share</block> <block>blocks_tagged_file_sink</block> <block>blocks_tagged_stream_mux</block> <block>blocks_tagged_stream_align</block> diff --git a/gr-blocks/grc/blocks_exponentiate_const_cci.xml b/gr-blocks/grc/blocks_exponentiate_const_cci.xml new file mode 100644 index 0000000000..3c9e9b9625 --- /dev/null +++ b/gr-blocks/grc/blocks_exponentiate_const_cci.xml @@ -0,0 +1,45 @@ +<?xml version="1.0"?> +<block> + <name>Exponentiate Const Int</name> + <key>blocks_exponentiate_const_cci</key> + <import>from gnuradio import blocks</import> + <make>blocks.exponentiate_const_cci($exponent, $vlen)</make> + <callback>set_exponent($exponent)</callback> + + <param> + <name>Num Ports</name> + <key>num_ports</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + </param> + <param> + <name>Exponent</name> + <key>exponent</key> + <value>1</value> + <type>int</type> + </param> + + <check>$num_ports > 0</check> + <check>$vlen > 0</check> + <check>$exponent > 0</check> + + <sink> + <name>in</name> + <type>complex</type> + <vlen>$vlen</vlen> + <nports>$num_ports</nports> + </sink> + + <source> + <name>out</name> + <type>complex</type> + <vlen>$vlen</vlen> + <nports>$num_ports</nports> + </source> +</block> diff --git a/gr-blocks/grc/blocks_file_source.xml b/gr-blocks/grc/blocks_file_source.xml index 7ac573f2da..1f09e95168 100644 --- a/gr-blocks/grc/blocks_file_source.xml +++ b/gr-blocks/grc/blocks_file_source.xml @@ -8,8 +8,11 @@ <name>File Source</name> <key>blocks_file_source</key> <import>from gnuradio import blocks</import> - <make>blocks.file_source($type.size*$vlen, $file, $repeat)</make> + <import>import pmt</import> + <make>blocks.file_source($type.size*$vlen, $file, $repeat) +self.$(id).set_begin_tag($begin_tag)</make> <callback>open($file, $repeat)</callback> + <callback>self.$(id).set_begin_tag($begin_tag)</callback> <param> <name>File</name> <key>file</key> @@ -66,6 +69,13 @@ <value>1</value> <type>int</type> </param> + + <param> + <name>Add begin tag</name> + <key>begin_tag</key> + <value>pmt.PMT_NIL</value> + <type>raw</type> + </param> <check>$vlen > 0</check> <source> <name>out</name> diff --git a/gr-blocks/grc/blocks_tag_gate.xml b/gr-blocks/grc/blocks_tag_gate.xml index 5c748f27cf..0cf6dc42ed 100644 --- a/gr-blocks/grc/blocks_tag_gate.xml +++ b/gr-blocks/grc/blocks_tag_gate.xml @@ -3,7 +3,10 @@ <name>Tag Gate</name> <key>blocks_tag_gate</key> <import>from gnuradio import blocks</import> - <make>blocks.tag_gate($type.size * $vlen, $propagate_tags)</make> + <make>blocks.tag_gate($type.size * $vlen, $propagate_tags) +self.$(id).set_single_key($single_key)</make> + <callback>self.$(id).set_single_key($single_key)</callback> + <param> <name>Item Type</name> <key>type</key> @@ -41,7 +44,7 @@ <type>int</type> </param> <param> - <name>Propagate_tags</name> + <name>Propagate Tags</name> <key>propagate_tags</key> <value>False</value> <type>enum</type> @@ -54,6 +57,13 @@ <key>False</key> </option> </param> + + <param> + <name>Single Key</name> + <key>single_key</key> + <value>""</value> + <type>string</type> + </param> <check>$vlen > 0</check> <sink> <name>in</name> diff --git a/gr-blocks/grc/blocks_tag_share.xml b/gr-blocks/grc/blocks_tag_share.xml new file mode 100644 index 0000000000..21827d0591 --- /dev/null +++ b/gr-blocks/grc/blocks_tag_share.xml @@ -0,0 +1,96 @@ +<?xml version="1.0"?> +<block> + <name>Tag Share</name> + <key>blocks_tag_share</key> + <import>from gnuradio import blocks</import> + <make>blocks.tag_share($io_type.size, $share_type.size, $vlen)</make> + + <param> + <name>IO Type</name> + <key>io_type</key> + <type>enum</type> + <hide>part</hide> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Share Type</name> + <key>share_type</key> + <type>enum</type> + <hide>part</hide> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>Vec Length</name> + <key>vlen</key> + <value>1</value> + <type>int</type> + <hide>part</hide> + </param> + + <check>$vlen > 0</check> + + <sink> + <name>in</name> + <type>$io_type</type> + <vlen>$vlen</vlen> + </sink> + <sink> + <name>share</name> + <type>$share_type</type> + <vlen>$vlen</vlen> + </sink> + + <source> + <name>out</name> + <type>$io_type</type> + <vlen>$vlen</vlen> + </source> +</block> diff --git a/gr-blocks/include/gnuradio/blocks/CMakeLists.txt b/gr-blocks/include/gnuradio/blocks/CMakeLists.txt index 6b3eca69d3..60734714af 100644 --- a/gr-blocks/include/gnuradio/blocks/CMakeLists.txt +++ b/gr-blocks/include/gnuradio/blocks/CMakeLists.txt @@ -99,6 +99,7 @@ install(FILES deinterleave.h delay.h endian_swap.h + exponentiate_const_cci.h file_descriptor_sink.h file_descriptor_source.h file_sink.h @@ -168,6 +169,7 @@ install(FILES sub_ff.h tag_debug.h tag_gate.h + tag_share.h tagged_file_sink.h tagged_stream_align.h tagged_stream_mux.h diff --git a/gr-blocks/include/gnuradio/blocks/exponentiate_const_cci.h b/gr-blocks/include/gnuradio/blocks/exponentiate_const_cci.h new file mode 100644 index 0000000000..0d96c645cf --- /dev/null +++ b/gr-blocks/include/gnuradio/blocks/exponentiate_const_cci.h @@ -0,0 +1,66 @@ +/* -*- c++ -*- */ +/* + * Copyright 2017 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along 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_EXPONENTIATE_CONST_CCI_H +#define INCLUDED_BLOCKS_EXPONENTIATE_CONST_CCI_H + +#include <gnuradio/blocks/api.h> +#include <gnuradio/sync_block.h> + +namespace gr { + namespace blocks { + + /*! + * \brief Exponentiates a complex stream with an integer exponent + * \ingroup blocks + * + * \details + * This block raises a complex stream to an integer exponent. The exponent + * must be at least 1. There is a callback function so the exponent can be + * changed at runtime. + * + * NOTE: The algorithm uses iterative multiplication to achieve exponentiation, + * hence it is O(exponent). Therefore, this block could be inefficient for large + * exponents. + */ + class BLOCKS_API exponentiate_const_cci : virtual public gr::sync_block + { + public: + typedef boost::shared_ptr<exponentiate_const_cci> sptr; + + /* + * \param exponent Exponent the input stream is raised to, which must be an integer. + * The algorithm uses iterative multiplication to achieve exponentiation, hence it is + * O(exponent). Therefore, this block could be inefficient for large exponents. + * \param vlen Vector length of input/output stream + */ + static sptr make(int exponent, size_t vlen = 1); + + virtual void set_exponent(int exponent) = 0; + }; + + } // namespace blocks +} // namespace gr + +#endif /* INCLUDED_BLOCKS_EXPONENTIATE_CONST_CCI_H */ + diff --git a/gr-blocks/include/gnuradio/blocks/file_source.h b/gr-blocks/include/gnuradio/blocks/file_source.h index 5682853a35..c8138339fd 100644 --- a/gr-blocks/include/gnuradio/blocks/file_source.h +++ b/gr-blocks/include/gnuradio/blocks/file_source.h @@ -77,6 +77,11 @@ namespace gr { * \brief Close the file handle. */ virtual void close() = 0; + + /*! + * \brief Add a stream tag to the first sample of the file if true + */ + virtual void set_begin_tag(pmt::pmt_t val) = 0; }; } /* namespace blocks */ diff --git a/gr-blocks/include/gnuradio/blocks/tag_gate.h b/gr-blocks/include/gnuradio/blocks/tag_gate.h index 5363301192..644b5cf75a 100644 --- a/gr-blocks/include/gnuradio/blocks/tag_gate.h +++ b/gr-blocks/include/gnuradio/blocks/tag_gate.h @@ -47,6 +47,21 @@ namespace gr { * \param propagate_tags Set this to true to allow tags to pass through this block. */ static sptr make(size_t item_size, bool propagate_tags=false); + + /*! + * \brief Only gate stream tags with one specific key instead of all keys + * + * \details + * If set to "", all tags will be affected by the gate. + * If set to "foo", all tags with key different from "foo" will pass + * through. + */ + virtual void set_single_key(const std::string &single_key)=0; + + /*! + * \brief Get the current single key. + */ + virtual std::string single_key() const = 0; }; } // namespace blocks diff --git a/gr-blocks/include/gnuradio/blocks/tag_share.h b/gr-blocks/include/gnuradio/blocks/tag_share.h new file mode 100644 index 0000000000..476076c6f5 --- /dev/null +++ b/gr-blocks/include/gnuradio/blocks/tag_share.h @@ -0,0 +1,67 @@ +/* -*- c++ -*- */ +/* + * Copyright 2017 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along 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_TAG_SHARE_H +#define INCLUDED_BLOCKS_TAG_SHARE_H + +#include <gnuradio/blocks/api.h> +#include <gnuradio/sync_block.h> + +namespace gr { + namespace blocks { + + /*! + * \brief Adds tags from Input 1 onto Input 0's stream. + * \ingroup blocks + * + * \details + * This block utilizes the GNU Radio runtime's tag propagation policy + * to transfer or share Input 1's tags to Input 0's stream. This is + * useful when a signal is detected via a correlate_access_code_bb or + * a threshold crossing from a complex_to_mag_squared block. The tag from + * that detection is on the alternate stream, either bytes or floats. + * Often there is further signal processing that should be done on the + * complex stream. This block allows the detection tags to be added to + * the complex stream to trigger downstream processing without the need of + * redundant trigger inputs on all subsequent blocks. + */ + class BLOCKS_API tag_share : virtual public gr::sync_block + { + public: + typedef boost::shared_ptr<tag_share> sptr; + + /*! + * \param sizeof_io_item The size of the Input 0/Output 0 stream type. Input 0 + * stream items will be directly copied to Output 0. + * \param sizeof_share_item The size of the Input 1 (tag share) stream type. This + * stream type does not have to match the input/output stream type. Tags from + * Input 1's items will be combined with Input 0's item tags and outputted on + * Output 0. + * \param vlen The vector size of the input and output stream items + */ + static sptr make(size_t sizeof_io_item, size_t sizeof_share_item, size_t vlen = 1); + }; + + } // namespace blocks +} // namespace gr + +#endif /* INCLUDED_BLOCKS_TAG_SHARE_H */ diff --git a/gr-blocks/lib/CMakeLists.txt b/gr-blocks/lib/CMakeLists.txt index 1d69f27a1d..e6eabd8f99 100644 --- a/gr-blocks/lib/CMakeLists.txt +++ b/gr-blocks/lib/CMakeLists.txt @@ -65,7 +65,6 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/../include ${GR_BLOCKS_INCLUDE_DIRS} ${GNURADIO_RUNTIME_INCLUDE_DIRS} - ${VOLK_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ) @@ -116,6 +115,7 @@ list(APPEND gr_blocks_sources divide_ff_impl.cc delay_impl.cc endian_swap_impl.cc + exponentiate_const_cci_impl.cc file_descriptor_sink_impl.cc file_descriptor_source_impl.cc file_sink_impl.cc @@ -190,6 +190,7 @@ list(APPEND gr_blocks_sources streams_to_vector_impl.cc stretch_ff_impl.cc sub_ff_impl.cc + tag_share_impl.cc tagged_file_sink_impl.cc tagged_stream_to_pdu_impl.cc tagged_stream_multiply_length_impl.cc @@ -251,8 +252,6 @@ list(APPEND blocks_libs gnuradio-runtime ${VOLK_LIBRARIES} ${Boost_LIBRARIES} - ${BLOCKS_LIBRARIES} - ${LOG4CPP_LIBRARIES} ) add_library(gnuradio-blocks SHARED ${gr_blocks_sources}) @@ -329,7 +328,6 @@ if(ENABLE_TESTING) gnuradio-blocks ${Boost_LIBRARIES} ${CPPUNIT_LIBRARIES} - ${LOG4CPP_LIBRARIES} ) GR_ADD_TEST(test_gr_blocks test-gr-blocks) diff --git a/gr-blocks/lib/exponentiate_const_cci_impl.cc b/gr-blocks/lib/exponentiate_const_cci_impl.cc new file mode 100644 index 0000000000..c46930febb --- /dev/null +++ b/gr-blocks/lib/exponentiate_const_cci_impl.cc @@ -0,0 +1,102 @@ +/* -*- c++ -*- */ +/* + * Copyright 2017 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along 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 <gnuradio/io_signature.h> +#include "exponentiate_const_cci_impl.h" +#include <volk/volk.h> + +namespace gr { + namespace blocks { + + exponentiate_const_cci::sptr + exponentiate_const_cci::make(int exponent, size_t vlen) + { + return gnuradio::get_initial_sptr + (new exponentiate_const_cci_impl(exponent, vlen)); + } + + /* + * The private constructor + */ + exponentiate_const_cci_impl::exponentiate_const_cci_impl(int exponent, size_t vlen) + : gr::sync_block("exponentiate_const_cci", + gr::io_signature::make(1, -1, sizeof(gr_complex)*vlen), + gr::io_signature::make(1, -1, sizeof(gr_complex)*vlen)), + d_exponent(exponent), + d_vlen(vlen) + { + const int alignment_multiple = volk_get_alignment()/sizeof(gr_complex); + set_alignment(std::max(1, alignment_multiple)); + } + + /* + * Our virtual destructor. + */ + exponentiate_const_cci_impl::~exponentiate_const_cci_impl() + { + } + + bool + exponentiate_const_cci_impl::check_topology(int ninputs, int noutputs) + { + return ninputs == noutputs; + } + + void + exponentiate_const_cci_impl::set_exponent(int exponent) { + gr::thread::scoped_lock guard(d_setlock); + d_exponent = exponent; + } + + int + exponentiate_const_cci_impl::work(int noutput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items) + { + gr::thread::scoped_lock guard(d_setlock); + + for(unsigned int i = 0; i < input_items.size(); i++) { + const gr_complex *in = (const gr_complex *) input_items[i]; + gr_complex *out = (gr_complex *) output_items[i]; + + if(d_exponent > 1) { + volk_32fc_x2_multiply_32fc(out, in, in, noutput_items*d_vlen); + for(int j = 2; j < d_exponent; j++) { + volk_32fc_x2_multiply_32fc(out, out, in, noutput_items*d_vlen); + } + } + else { + memcpy(out, in, sizeof(gr_complex)*noutput_items*d_vlen); + } + } + + // Tell runtime system how many output items we produced. + return noutput_items; + } + + } /* namespace blocks */ +} /* namespace gr */ + diff --git a/gr-blocks/lib/exponentiate_const_cci_impl.h b/gr-blocks/lib/exponentiate_const_cci_impl.h new file mode 100644 index 0000000000..c89fe57646 --- /dev/null +++ b/gr-blocks/lib/exponentiate_const_cci_impl.h @@ -0,0 +1,53 @@ +/* -*- c++ -*- */ +/* + * Copyright 2017 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along 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_EXPONENTIATE_CONST_CCI_IMPL_H +#define INCLUDED_BLOCKS_EXPONENTIATE_CONST_CCI_IMPL_H + +#include <gnuradio/blocks/exponentiate_const_cci.h> + +namespace gr { + namespace blocks { + + class exponentiate_const_cci_impl : public exponentiate_const_cci + { + private: + int d_exponent; + int d_vlen; + + public: + exponentiate_const_cci_impl(int exponent, size_t vlen); + ~exponentiate_const_cci_impl(); + bool check_topology(int ninputs, int noutputs); + void set_exponent(int exponent); + + // Where all the action really happens + int work(int noutput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); + }; + + } // namespace blocks +} // namespace gr + +#endif /* INCLUDED_BLOCKS_EXPONENTIATE_CONST_CCI_IMPL_H */ + diff --git a/gr-blocks/lib/file_source_impl.cc b/gr-blocks/lib/file_source_impl.cc index cc57a905ed..c077c74fd9 100644 --- a/gr-blocks/lib/file_source_impl.cc +++ b/gr-blocks/lib/file_source_impl.cc @@ -64,10 +64,15 @@ namespace gr { io_signature::make(0, 0, 0), io_signature::make(1, 1, itemsize)), d_itemsize(itemsize), d_fp(0), d_new_fp(0), d_repeat(repeat), - d_updated(false) + d_updated(false), d_file_begin(true), d_repeat_cnt(0), + d_add_begin_tag(pmt::PMT_NIL) { open(filename, repeat); do_update(); + + std::stringstream str; + str << name() << unique_id(); + _id = pmt::string_to_symbol(str.str()); } file_source_impl::~file_source_impl() @@ -149,9 +154,16 @@ namespace gr { d_fp = d_new_fp; // install new file pointer d_new_fp = 0; d_updated = false; + d_file_begin = true; } } + void + file_source_impl::set_begin_tag(pmt::pmt_t val) + { + d_add_begin_tag = val; + } + int file_source_impl::work(int noutput_items, gr_vector_const_void_star &input_items, @@ -166,7 +178,14 @@ namespace gr { throw std::runtime_error("work with file not open"); gr::thread::scoped_lock lock(fp_mutex); // hold for the rest of this function + while(size) { + // Add stream tag whenever the file starts again + if (d_file_begin && d_add_begin_tag != pmt::PMT_NIL) { + add_item_tag(0, nitems_written(0) + noutput_items - size, d_add_begin_tag, pmt::from_long(d_repeat_cnt), _id); + d_file_begin = false; + } + i = fread(o, d_itemsize, size, (FILE*)d_fp); size -= i; @@ -188,6 +207,10 @@ namespace gr { fprintf(stderr, "[%s] fseek failed\n", __FILE__); exit(-1); } + if (d_add_begin_tag != pmt::PMT_NIL) { + d_file_begin = true; + d_repeat_cnt++; + } } if(size > 0) { // EOF or error diff --git a/gr-blocks/lib/file_source_impl.h b/gr-blocks/lib/file_source_impl.h index 80232a1dbe..19f393fc1d 100644 --- a/gr-blocks/lib/file_source_impl.h +++ b/gr-blocks/lib/file_source_impl.h @@ -37,7 +37,12 @@ namespace gr { FILE *d_new_fp; bool d_repeat; bool d_updated; + bool d_file_begin; + long d_repeat_cnt; + pmt::pmt_t d_add_begin_tag; + boost::mutex fp_mutex; + pmt::pmt_t _id; void do_update(); @@ -52,6 +57,8 @@ namespace gr { int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); + + void set_begin_tag(pmt::pmt_t val); }; } /* namespace blocks */ diff --git a/gr-blocks/lib/tag_gate_impl.cc b/gr-blocks/lib/tag_gate_impl.cc index 643ec6748f..ad55c8af9a 100644 --- a/gr-blocks/lib/tag_gate_impl.cc +++ b/gr-blocks/lib/tag_gate_impl.cc @@ -41,11 +41,13 @@ namespace gr { gr::io_signature::make(1, 1, item_size), gr::io_signature::make(1, 1, item_size)), d_item_size(item_size), - d_propagate_tags(propagate_tags) + d_propagate_tags(propagate_tags), + d_single_key_set(false) { if (!d_propagate_tags) { set_tag_propagation_policy(TPP_DONT); } + d_single_key = pmt::PMT_NIL; } tag_gate_impl::~tag_gate_impl() @@ -54,10 +56,34 @@ namespace gr { void tag_gate_impl::set_propagation(bool propagate_tags) { + d_propagate_tags = propagate_tags; + if (propagate_tags) { - set_tag_propagation_policy(TPP_ALL_TO_ALL); + set_tag_propagation_policy(TPP_ALL_TO_ALL); } else { - set_tag_propagation_policy(TPP_DONT); + set_tag_propagation_policy(TPP_DONT); + } + } + + void tag_gate_impl::set_single_key(const std::string &single_key) + { + if(single_key == "") { + d_single_key = pmt::PMT_NIL; + d_single_key_set = false; + } + else { + d_single_key = pmt::intern(single_key); + d_single_key_set = true; + } + } + + std::string tag_gate_impl::single_key() const + { + if(pmt::equal(d_single_key, pmt::PMT_NIL)) { + return ""; + } + else { + return pmt::symbol_to_string(d_single_key); } } @@ -68,9 +94,18 @@ namespace gr { { const unsigned char *in = (const unsigned char *) input_items[0]; unsigned char *out = (unsigned char *) output_items[0]; + std::vector<tag_t> tags; memcpy((void *) out, (void *) in, d_item_size * noutput_items); + if (d_single_key_set && (!d_propagate_tags)) { + get_tags_in_range(tags, 0, nitems_read(0), nitems_read(0) + noutput_items); + for (unsigned int i=0; i < tags.size(); i++) { + if (!pmt::equal(tags[i].key, d_single_key)) + add_item_tag(0, tags[i].offset, tags[i].key, tags[i].value, tags[i].srcid); + } + } + return noutput_items; } diff --git a/gr-blocks/lib/tag_gate_impl.h b/gr-blocks/lib/tag_gate_impl.h index 4983ba10b4..129fb78cb8 100644 --- a/gr-blocks/lib/tag_gate_impl.h +++ b/gr-blocks/lib/tag_gate_impl.h @@ -33,6 +33,9 @@ namespace gr { private: size_t d_item_size; bool d_propagate_tags; + bool d_single_key_set; + + pmt::pmt_t d_single_key; public: tag_gate_impl(size_t item_size, bool propagate_tags); @@ -43,6 +46,9 @@ namespace gr { int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); + + void set_single_key(const std::string &single_key); + std::string single_key() const; }; } // namespace blocks diff --git a/gr-blocks/lib/tag_share_impl.cc b/gr-blocks/lib/tag_share_impl.cc new file mode 100644 index 0000000000..26a54dbf8c --- /dev/null +++ b/gr-blocks/lib/tag_share_impl.cc @@ -0,0 +1,79 @@ +/* -*- c++ -*- */ +/* + * Copyright 2017 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along 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 <gnuradio/io_signature.h> +#include "tag_share_impl.h" + +namespace gr { + namespace blocks { + + tag_share::sptr + tag_share::make(size_t sizeof_io_item, size_t sizeof_share_item, size_t vlen) + { + return gnuradio::get_initial_sptr + (new tag_share_impl(sizeof_io_item, sizeof_share_item, vlen)); + } + + /* + * The private constructor + */ + tag_share_impl::tag_share_impl(size_t sizeof_io_item, size_t sizeof_share_item, size_t vlen) + : gr::sync_block("tag_share", + gr::io_signature::make2(2, 2, sizeof_io_item*vlen, sizeof_share_item*vlen), + gr::io_signature::make(1, 1, sizeof_io_item*vlen)), + d_sizeof_io_item(sizeof_io_item), + d_vlen(vlen) + { + // This is the entire premise of the block -- to have the GNU Radio runtime + // propagate all the tags from Input 0 and Input 1 to Output 0. + set_tag_propagation_policy(TPP_ALL_TO_ALL); + } + + /* + * Our virtual destructor. + */ + tag_share_impl::~tag_share_impl() + { + } + + int + tag_share_impl::work(int noutput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items) + { + const void *in = (const void *) input_items[0]; + void *out = (void *) output_items[0]; + + // Input 0 passes through to Output 0 + memcpy(out, in, d_sizeof_io_item*d_vlen*noutput_items); + + // Tell runtime system how many output items we produced. + return noutput_items; + } + + } /* namespace blocks */ +} /* namespace gr */ + diff --git a/gr-blocks/lib/tag_share_impl.h b/gr-blocks/lib/tag_share_impl.h new file mode 100644 index 0000000000..e5df8e3a0c --- /dev/null +++ b/gr-blocks/lib/tag_share_impl.h @@ -0,0 +1,51 @@ +/* -*- c++ -*- */ +/* + * Copyright 2017 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along 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_TAG_SHARE_IMPL_H +#define INCLUDED_BLOCKS_TAG_SHARE_IMPL_H + +#include <gnuradio/blocks/tag_share.h> + +namespace gr { + namespace blocks { + + class tag_share_impl : public tag_share + { + private: + size_t d_sizeof_io_item; + size_t d_vlen; + + public: + tag_share_impl(size_t sizeof_io_item, size_t sizeof_share_item, size_t vlen); + ~tag_share_impl(); + + // Where all the action really happens + int work(int noutput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); + }; + + } // namespace blocks +} // namespace gr + +#endif /* INCLUDED_BLOCKS_TAG_SHARE_IMPL_H */ + diff --git a/gr-blocks/python/blocks/qa_exponentiate_const_cci.py b/gr-blocks/python/blocks/qa_exponentiate_const_cci.py new file mode 100644 index 0000000000..0c4b65eb68 --- /dev/null +++ b/gr-blocks/python/blocks/qa_exponentiate_const_cci.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# Copyright 2017 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +from gnuradio import gr, gr_unittest +from gnuradio import blocks +import pmt + +class qa_exponentiate_const_cci(gr_unittest.TestCase): + + def setUp(self): + self.tb = gr.top_block() + + def tearDown(self): + self.tb = None + + def test_001_t(self): + for exponent in range(1,10): + in_data = (1+1j, -1, 4-1j, -3-7j) + out_data = (in_data[0]**exponent, in_data[1]**exponent, in_data[2]**exponent, in_data[3]**exponent) + + # Test streaming input + source = blocks.vector_source_c(in_data, False, 1) + exponentiate_const_cci = blocks.exponentiate_const_cci(exponent) + sink = blocks.vector_sink_c(1) + + self.tb.connect(source, exponentiate_const_cci, sink) + self.tb.run() + + self.assertAlmostEqual(sink.data(), out_data) + + # Test vector input + for vlen in [2, 4]: + source = blocks.vector_source_c(in_data, False, 1) + s2v = blocks.stream_to_vector(gr.sizeof_gr_complex, vlen) + exponentiate_const_cci = blocks.exponentiate_const_cci(exponent, vlen) + v2s = blocks.vector_to_stream(gr.sizeof_gr_complex, vlen) + sink = blocks.vector_sink_c(1) + + self.tb.connect(source, s2v, exponentiate_const_cci, v2s, sink) + self.tb.run() + + self.assertAlmostEqual(sink.data(), out_data) + + +if __name__ == '__main__': + gr_unittest.run(qa_exponentiate_const_cci, 'qa_exponentiate_const_cci.xml') diff --git a/gr-blocks/python/blocks/qa_file_source_sink.py b/gr-blocks/python/blocks/qa_file_source_sink.py index da1a07b347..32910cb4bc 100644 --- a/gr-blocks/python/blocks/qa_file_source_sink.py +++ b/gr-blocks/python/blocks/qa_file_source_sink.py @@ -23,6 +23,7 @@ from gnuradio import gr, gr_unittest, blocks import os import tempfile +import pmt class test_file_source_sink(gr_unittest.TestCase): @@ -55,6 +56,7 @@ class test_file_source_sink(gr_unittest.TestCase): result_data = snk2.data() self.assertFloatTuplesAlmostEqual(expected_result, result_data) + self.assertEqual(len(snk2.tags()), 0) def test_descriptor_001(self): src_data = range(1000) @@ -86,6 +88,7 @@ class test_file_source_sink(gr_unittest.TestCase): result_data = snk2.data() self.assertFloatTuplesAlmostEqual(expected_result, result_data) + self.assertEqual(len(snk2.tags()), 0) def test_file_source_can_seek_after_open(self): src_data = range(1000) @@ -101,6 +104,65 @@ class test_file_source_sink(gr_unittest.TestCase): source = blocks.file_source(gr.sizeof_float, temp.name) self.assertTrue(source.seek(0, os.SEEK_SET)) + def test_begin_tag(self): + src_data = range(1000) + expected_result = range(1000) + + snk2 = blocks.vector_sink_f() + + with tempfile.NamedTemporaryFile() as temp: + src = blocks.vector_source_f(src_data) + snk = blocks.file_sink(gr.sizeof_float, temp.name) + snk.set_unbuffered(True) + + src2 = blocks.file_source(gr.sizeof_float, temp.name) + src2.set_begin_tag(pmt.string_to_symbol("file_begin")) + + self.tb.connect(src, snk) + self.tb.run() + + self.tb.disconnect(src, snk) + self.tb.connect(src2, snk2) + self.tb.run() + + result_data = snk2.data() + self.assertFloatTuplesAlmostEqual(expected_result, result_data) + self.assertEqual(len(snk2.tags()), 1) + + def test_begin_tag_repeat(self): + src_data = range(1000) + expected_result = range(1000) + expected_result.extend(range(1000)) + + snk2 = blocks.vector_sink_f() + + with tempfile.NamedTemporaryFile() as temp: + src = blocks.vector_source_f(src_data) + snk = blocks.file_sink(gr.sizeof_float, temp.name) + snk.set_unbuffered(True) + + src2 = blocks.file_source(gr.sizeof_float, temp.name, True) + src2.set_begin_tag(pmt.string_to_symbol("file_begin")) + hd = blocks.head(gr.sizeof_float, 2000) + + self.tb.connect(src, snk) + self.tb.run() + + self.tb.disconnect(src, snk) + self.tb.connect(src2, hd, snk2) + self.tb.run() + + result_data = snk2.data() + self.assertFloatTuplesAlmostEqual(expected_result, result_data) + tags = snk2.tags() + self.assertEqual(len(tags), 2) + self.assertEqual(str(tags[0].key), "file_begin") + self.assertEqual(str(tags[0].value), "0") + self.assertEqual(tags[0].offset, 0) + self.assertEqual(str(tags[1].key), "file_begin") + self.assertEqual(str(tags[1].value), "1") + self.assertEqual(tags[1].offset, 1000) + if __name__ == '__main__': gr_unittest.run(test_file_source_sink, "test_file_source_sink.xml") diff --git a/gr-blocks/python/blocks/qa_tag_gate.py b/gr-blocks/python/blocks/qa_tag_gate.py index acb2c68a82..7ae676562e 100755 --- a/gr-blocks/python/blocks/qa_tag_gate.py +++ b/gr-blocks/python/blocks/qa_tag_gate.py @@ -40,9 +40,84 @@ class qa_tag_gate (gr_unittest.TestCase): src = blocks.vector_source_f(range(20), False, 1, (tag,)) gate = blocks.tag_gate(gr.sizeof_float, False) sink = blocks.vector_sink_f() + self.tb.connect(src, gate, sink) self.tb.run () self.assertEqual(len(sink.tags()), 0) + def test_002_t (self): + tags = [] + tags.append(gr.tag_t()) + tags[0].key = pmt.string_to_symbol('key') + tags[0].value = pmt.from_long(42) + tags[0].offset = 0 + tags.append(gr.tag_t()) + tags[1].key = pmt.string_to_symbol('key') + tags[1].value = pmt.from_long(42) + tags[1].offset = 5 + tags.append(gr.tag_t()) + tags[2].key = pmt.string_to_symbol('secondkey') + tags[2].value = pmt.from_long(42) + tags[2].offset = 6 + src = blocks.vector_source_f(range(20), False, 1, tags) + gate = blocks.tag_gate(gr.sizeof_float, False) + gate.set_single_key("key") + self.assertEqual(gate.single_key(),"key") + sink = blocks.vector_sink_f() + self.tb.connect(src, gate, sink) + self.tb.run () + self.assertEqual(len(sink.tags()), 1) + + def test_003_t (self): + tags = [] + tags.append(gr.tag_t()) + tags[0].key = pmt.string_to_symbol('key') + tags[0].value = pmt.from_long(42) + tags[0].offset = 0 + tags.append(gr.tag_t()) + tags[1].key = pmt.string_to_symbol('key') + tags[1].value = pmt.from_long(42) + tags[1].offset = 5 + tags.append(gr.tag_t()) + tags[2].key = pmt.string_to_symbol('secondkey') + tags[2].value = pmt.from_long(42) + tags[2].offset = 6 + src = blocks.vector_source_f(range(20), False, 1, tags) + gate = blocks.tag_gate(gr.sizeof_float, True) + gate.set_single_key("key") + sink = blocks.vector_sink_f() + self.tb.connect(src, gate, sink) + self.tb.run () + self.assertEqual(len(sink.tags()), 3) + + def test_004_t (self): + tags = [] + tags.append(gr.tag_t()) + tags[0].key = pmt.string_to_symbol('key') + tags[0].value = pmt.from_long(42) + tags[0].offset = 0 + tags.append(gr.tag_t()) + tags[1].key = pmt.string_to_symbol('key') + tags[1].value = pmt.from_long(42) + tags[1].offset = 5 + tags.append(gr.tag_t()) + tags[2].key = pmt.string_to_symbol('secondkey') + tags[2].value = pmt.from_long(42) + tags[2].offset = 6 + src = blocks.vector_source_f(range(20), False, 1, tags) + gate = blocks.tag_gate(gr.sizeof_float, True) + sink = blocks.vector_sink_f() + self.tb.connect(src, gate, sink) + self.tb.run () + self.assertEqual(len(sink.tags()), 3) + + def test_005_t (self): + gate = blocks.tag_gate(gr.sizeof_float, True) + self.assertEqual(gate.single_key(), "") + gate.set_single_key("the_key") + self.assertEqual(gate.single_key(), "the_key") + gate.set_single_key("") + self.assertEqual(gate.single_key(), "") + if __name__ == '__main__': gr_unittest.run(qa_tag_gate, "qa_tag_gate.xml") diff --git a/gr-blocks/python/blocks/qa_tag_share.py b/gr-blocks/python/blocks/qa_tag_share.py new file mode 100755 index 0000000000..3fff02ff66 --- /dev/null +++ b/gr-blocks/python/blocks/qa_tag_share.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# Copyright 2017 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +from gnuradio import gr, gr_unittest +from gnuradio import blocks +import pmt + +class qa_tag_share(gr_unittest.TestCase): + + def setUp(self): + self.tb = gr.top_block() + + def tearDown(self): + self.tb = None + + def test_001_t(self): + # Constants + tag_key = 'in1_tag' + tag_value = 0 + tag_offset = 0 + in0_value = 1.0+1.0j + in1_value = 2.717 + in0_data = (in0_value,)*10 + in1_data = (in1_value,)*10 + sink_data = in0_data + + tag = gr.tag_t() + tag.key = pmt.to_pmt(tag_key) + tag.value = pmt.to_pmt(tag_value) + tag.offset = tag_offset + + # Only tag Input 1 of the share block and see if it transfers + # to Output 0. Also verify that Input 0 stream is propagated to + # Output 0. + in0 = blocks.vector_source_c(in0_data, False, 1) + in1 = blocks.vector_source_f(in1_data, False, 1, (tag,)) + tag_share = blocks.tag_share(gr.sizeof_gr_complex, gr.sizeof_float) + sink = blocks.vector_sink_c(1) + + self.tb.connect(in0, (tag_share,0)) + self.tb.connect(in1, (tag_share,1)) + self.tb.connect(tag_share, sink) + self.tb.run() + + self.assertEqual(len(sink.tags()), 1) + self.assertEqual(pmt.to_python(sink.tags()[0].key), tag_key) + self.assertEqual(pmt.to_python(sink.tags()[0].value), tag_value) + self.assertEqual(sink.tags()[0].offset, tag_offset) + self.assertEqual(sink.data(), sink_data) + + +if __name__ == '__main__': + gr_unittest.run(qa_tag_share, 'qa_tag_share.xml') diff --git a/gr-blocks/swig/CMakeLists.txt b/gr-blocks/swig/CMakeLists.txt index c128a9b26c..d64c347919 100644 --- a/gr-blocks/swig/CMakeLists.txt +++ b/gr-blocks/swig/CMakeLists.txt @@ -52,6 +52,11 @@ set(GR_SWIG_BLOCK_IFILES blocks_swig3 blocks_swig4 blocks_swig5 + blocks_swig6 + blocks_swig7 + blocks_swig8 + blocks_swig9 + blocks_swig10 ) foreach(swigfile ${GR_SWIG_BLOCK_IFILES}) diff --git a/gr-blocks/swig/blocks_swig.py.in b/gr-blocks/swig/blocks_swig.py.in index a0bd574c18..7682f17d83 100644 --- a/gr-blocks/swig/blocks_swig.py.in +++ b/gr-blocks/swig/blocks_swig.py.in @@ -25,3 +25,8 @@ from blocks_swig2 import * from blocks_swig3 import * from blocks_swig4 import * from blocks_swig5 import * +from blocks_swig6 import * +from blocks_swig7 import * +from blocks_swig8 import * +from blocks_swig9 import * +from blocks_swig10 import * diff --git a/gr-blocks/swig/blocks_swig0.i b/gr-blocks/swig/blocks_swig0.i index 37b8ef6b0b..66e6ca10f8 100644 --- a/gr-blocks/swig/blocks_swig0.i +++ b/gr-blocks/swig/blocks_swig0.i @@ -24,6 +24,7 @@ %include "gnuradio.i" +//load generated python docstrings %include "blocks_swig0_doc.i" %{ diff --git a/gr-blocks/swig/blocks_swig1.i b/gr-blocks/swig/blocks_swig1.i index 24483fcf91..cbff920d02 100644 --- a/gr-blocks/swig/blocks_swig1.i +++ b/gr-blocks/swig/blocks_swig1.i @@ -24,24 +24,10 @@ %include "gnuradio.i" +//load generated python docstrings %include "blocks_swig1_doc.i" %{ -#include "gnuradio/blocks/skiphead.h" -#include "gnuradio/blocks/stream_mux.h" -#include "gnuradio/blocks/stream_to_streams.h" -#include "gnuradio/blocks/stream_to_tagged_stream.h" -#include "gnuradio/blocks/stream_to_vector.h" -#include "gnuradio/blocks/streams_to_stream.h" -#include "gnuradio/blocks/streams_to_vector.h" -#include "gnuradio/blocks/tag_debug.h" -#include "gnuradio/blocks/tagged_file_sink.h" -#include "gnuradio/blocks/tsb_vector_sink_b.h" -#include "gnuradio/blocks/tsb_vector_sink_c.h" -#include "gnuradio/blocks/tsb_vector_sink_f.h" -#include "gnuradio/blocks/tsb_vector_sink_i.h" -#include "gnuradio/blocks/tsb_vector_sink_s.h" -#include "gnuradio/blocks/throttle.h" #include "gnuradio/blocks/vector_map.h" #include "gnuradio/blocks/vector_to_stream.h" #include "gnuradio/blocks/vector_to_streams.h" @@ -64,21 +50,6 @@ #include "gnuradio/blocks/wavfile_source.h" %} -%include "gnuradio/blocks/skiphead.h" -%include "gnuradio/blocks/stream_mux.h" -%include "gnuradio/blocks/stream_to_streams.h" -%include "gnuradio/blocks/stream_to_tagged_stream.h" -%include "gnuradio/blocks/stream_to_vector.h" -%include "gnuradio/blocks/streams_to_stream.h" -%include "gnuradio/blocks/streams_to_vector.h" -%include "gnuradio/blocks/tag_debug.h" -%include "gnuradio/blocks/tagged_file_sink.h" -%include "gnuradio/blocks/tsb_vector_sink_b.h" -%include "gnuradio/blocks/tsb_vector_sink_c.h" -%include "gnuradio/blocks/tsb_vector_sink_f.h" -%include "gnuradio/blocks/tsb_vector_sink_i.h" -%include "gnuradio/blocks/tsb_vector_sink_s.h" -%include "gnuradio/blocks/throttle.h" %include "gnuradio/blocks/vector_map.h" %include "gnuradio/blocks/vector_to_stream.h" %include "gnuradio/blocks/vector_to_streams.h" @@ -100,21 +71,6 @@ %include "gnuradio/blocks/wavfile_sink.h" %include "gnuradio/blocks/wavfile_source.h" -GR_SWIG_BLOCK_MAGIC2(blocks, skiphead); -GR_SWIG_BLOCK_MAGIC2(blocks, stream_mux); -GR_SWIG_BLOCK_MAGIC2(blocks, stream_to_streams); -GR_SWIG_BLOCK_MAGIC2(blocks, stream_to_tagged_stream); -GR_SWIG_BLOCK_MAGIC2(blocks, stream_to_vector); -GR_SWIG_BLOCK_MAGIC2(blocks, streams_to_stream); -GR_SWIG_BLOCK_MAGIC2(blocks, streams_to_vector); -GR_SWIG_BLOCK_MAGIC2(blocks, tag_debug); -GR_SWIG_BLOCK_MAGIC2(blocks, tagged_file_sink); -GR_SWIG_BLOCK_MAGIC2(blocks, tsb_vector_sink_b); -GR_SWIG_BLOCK_MAGIC2(blocks, tsb_vector_sink_c); -GR_SWIG_BLOCK_MAGIC2(blocks, tsb_vector_sink_f); -GR_SWIG_BLOCK_MAGIC2(blocks, tsb_vector_sink_i); -GR_SWIG_BLOCK_MAGIC2(blocks, tsb_vector_sink_s); -GR_SWIG_BLOCK_MAGIC2(blocks, throttle); GR_SWIG_BLOCK_MAGIC2(blocks, vector_map); GR_SWIG_BLOCK_MAGIC2(blocks, vector_to_stream); GR_SWIG_BLOCK_MAGIC2(blocks, vector_to_streams); diff --git a/gr-blocks/swig/blocks_swig10.i b/gr-blocks/swig/blocks_swig10.i new file mode 100644 index 0000000000..5872b17cf3 --- /dev/null +++ b/gr-blocks/swig/blocks_swig10.i @@ -0,0 +1,90 @@ +/* -*- c++ -*- */ +/* + * Copyright 2017 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +#define BLOCKS_API + +%include "gnuradio.i" + +//load generated python docstrings +%include "blocks_swig10_doc.i" + +%{ +#include "gnuradio/blocks/min_ff.h" +#include "gnuradio/blocks/min_ii.h" +#include "gnuradio/blocks/min_ss.h" +#include "gnuradio/blocks/moving_average_cc.h" +#include "gnuradio/blocks/moving_average_ff.h" +#include "gnuradio/blocks/moving_average_ii.h" +#include "gnuradio/blocks/moving_average_ss.h" +#include "gnuradio/blocks/nlog10_ff.h" +#include "gnuradio/blocks/not_bb.h" +#include "gnuradio/blocks/not_ss.h" +#include "gnuradio/blocks/not_ii.h" +#include "gnuradio/blocks/or_bb.h" +#include "gnuradio/blocks/or_ss.h" +#include "gnuradio/blocks/or_ii.h" +#include "gnuradio/blocks/patterned_interleaver.h" +#include "gnuradio/blocks/pack_k_bits_bb.h" +#include "gnuradio/blocks/packed_to_unpacked_bb.h" +#include "gnuradio/blocks/packed_to_unpacked_ss.h" +#include "gnuradio/blocks/packed_to_unpacked_ii.h" +%} + +%include "gnuradio/blocks/min_ff.h" +%include "gnuradio/blocks/min_ii.h" +%include "gnuradio/blocks/min_ss.h" +%include "gnuradio/blocks/moving_average_cc.h" +%include "gnuradio/blocks/moving_average_ff.h" +%include "gnuradio/blocks/moving_average_ii.h" +%include "gnuradio/blocks/moving_average_ss.h" +%include "gnuradio/blocks/nlog10_ff.h" +%include "gnuradio/blocks/not_bb.h" +%include "gnuradio/blocks/not_ss.h" +%include "gnuradio/blocks/not_ii.h" +%include "gnuradio/blocks/or_bb.h" +%include "gnuradio/blocks/or_ss.h" +%include "gnuradio/blocks/or_ii.h" +%include "gnuradio/blocks/patterned_interleaver.h" +%include "gnuradio/blocks/pack_k_bits_bb.h" +%include "gnuradio/blocks/packed_to_unpacked_bb.h" +%include "gnuradio/blocks/packed_to_unpacked_ss.h" +%include "gnuradio/blocks/packed_to_unpacked_ii.h" + +GR_SWIG_BLOCK_MAGIC2(blocks, min_ff); +GR_SWIG_BLOCK_MAGIC2(blocks, min_ii); +GR_SWIG_BLOCK_MAGIC2(blocks, min_ss); +GR_SWIG_BLOCK_MAGIC2(blocks, moving_average_cc); +GR_SWIG_BLOCK_MAGIC2(blocks, moving_average_ff); +GR_SWIG_BLOCK_MAGIC2(blocks, moving_average_ii); +GR_SWIG_BLOCK_MAGIC2(blocks, moving_average_ss); +GR_SWIG_BLOCK_MAGIC2(blocks, nlog10_ff); +GR_SWIG_BLOCK_MAGIC2(blocks, not_bb); +GR_SWIG_BLOCK_MAGIC2(blocks, not_ss); +GR_SWIG_BLOCK_MAGIC2(blocks, not_ii); +GR_SWIG_BLOCK_MAGIC2(blocks, or_bb); +GR_SWIG_BLOCK_MAGIC2(blocks, or_ss); +GR_SWIG_BLOCK_MAGIC2(blocks, or_ii); +GR_SWIG_BLOCK_MAGIC2(blocks, patterned_interleaver); +GR_SWIG_BLOCK_MAGIC2(blocks, pack_k_bits_bb); +GR_SWIG_BLOCK_MAGIC2(blocks, packed_to_unpacked_bb); +GR_SWIG_BLOCK_MAGIC2(blocks, packed_to_unpacked_ss); +GR_SWIG_BLOCK_MAGIC2(blocks, packed_to_unpacked_ii); diff --git a/gr-blocks/swig/blocks_swig2.i b/gr-blocks/swig/blocks_swig2.i index 92db800d95..ea25a6bccc 100644 --- a/gr-blocks/swig/blocks_swig2.i +++ b/gr-blocks/swig/blocks_swig2.i @@ -31,26 +31,6 @@ %include "feval.i" %{ -#include "gnuradio/blocks/abs_ff.h" -#include "gnuradio/blocks/abs_ss.h" -#include "gnuradio/blocks/abs_ii.h" -#include "gnuradio/blocks/add_ff.h" -#include "gnuradio/blocks/add_ss.h" -#include "gnuradio/blocks/add_ii.h" -#include "gnuradio/blocks/add_cc.h" -#include "gnuradio/blocks/add_const_bb.h" -#include "gnuradio/blocks/add_const_ff.h" -#include "gnuradio/blocks/add_const_ss.h" -#include "gnuradio/blocks/add_const_ii.h" -#include "gnuradio/blocks/add_const_cc.h" -#include "gnuradio/blocks/add_const_vbb.h" -#include "gnuradio/blocks/add_const_vff.h" -#include "gnuradio/blocks/add_const_vss.h" -#include "gnuradio/blocks/add_const_vii.h" -#include "gnuradio/blocks/add_const_vcc.h" -#include "gnuradio/blocks/and_bb.h" -#include "gnuradio/blocks/and_ss.h" -#include "gnuradio/blocks/and_ii.h" #include "gnuradio/blocks/and_const_bb.h" #include "gnuradio/blocks/and_const_ss.h" #include "gnuradio/blocks/and_const_ii.h" @@ -72,33 +52,8 @@ #include "gnuradio/blocks/complex_to_mag_squared.h" #include "gnuradio/blocks/complex_to_arg.h" #include "gnuradio/blocks/conjugate_cc.h" -#include "gnuradio/blocks/deinterleave.h" -#include "gnuradio/blocks/divide_ff.h" -#include "gnuradio/blocks/divide_ss.h" -#include "gnuradio/blocks/divide_ii.h" -#include "gnuradio/blocks/divide_cc.h" %} -%include "gnuradio/blocks/abs_ff.h" -%include "gnuradio/blocks/abs_ss.h" -%include "gnuradio/blocks/abs_ii.h" -%include "gnuradio/blocks/add_ff.h" -%include "gnuradio/blocks/add_ss.h" -%include "gnuradio/blocks/add_ii.h" -%include "gnuradio/blocks/add_cc.h" -%include "gnuradio/blocks/add_const_bb.h" -%include "gnuradio/blocks/add_const_ff.h" -%include "gnuradio/blocks/add_const_ss.h" -%include "gnuradio/blocks/add_const_ii.h" -%include "gnuradio/blocks/add_const_cc.h" -%include "gnuradio/blocks/add_const_vbb.h" -%include "gnuradio/blocks/add_const_vff.h" -%include "gnuradio/blocks/add_const_vss.h" -%include "gnuradio/blocks/add_const_vii.h" -%include "gnuradio/blocks/add_const_vcc.h" -%include "gnuradio/blocks/and_bb.h" -%include "gnuradio/blocks/and_ss.h" -%include "gnuradio/blocks/and_ii.h" %include "gnuradio/blocks/and_const_bb.h" %include "gnuradio/blocks/and_const_ss.h" %include "gnuradio/blocks/and_const_ii.h" @@ -120,32 +75,7 @@ %include "gnuradio/blocks/complex_to_mag_squared.h" %include "gnuradio/blocks/complex_to_arg.h" %include "gnuradio/blocks/conjugate_cc.h" -%include "gnuradio/blocks/deinterleave.h" -%include "gnuradio/blocks/divide_ff.h" -%include "gnuradio/blocks/divide_ss.h" -%include "gnuradio/blocks/divide_ii.h" -%include "gnuradio/blocks/divide_cc.h" -GR_SWIG_BLOCK_MAGIC2(blocks, abs_ff); -GR_SWIG_BLOCK_MAGIC2(blocks, abs_ss); -GR_SWIG_BLOCK_MAGIC2(blocks, abs_ii); -GR_SWIG_BLOCK_MAGIC2(blocks, add_ff); -GR_SWIG_BLOCK_MAGIC2(blocks, add_ss); -GR_SWIG_BLOCK_MAGIC2(blocks, add_ii); -GR_SWIG_BLOCK_MAGIC2(blocks, add_cc); -GR_SWIG_BLOCK_MAGIC2(blocks, add_const_bb); -GR_SWIG_BLOCK_MAGIC2(blocks, add_const_ff); -GR_SWIG_BLOCK_MAGIC2(blocks, add_const_ss); -GR_SWIG_BLOCK_MAGIC2(blocks, add_const_ii); -GR_SWIG_BLOCK_MAGIC2(blocks, add_const_cc); -GR_SWIG_BLOCK_MAGIC2(blocks, add_const_vbb); -GR_SWIG_BLOCK_MAGIC2(blocks, add_const_vff); -GR_SWIG_BLOCK_MAGIC2(blocks, add_const_vss); -GR_SWIG_BLOCK_MAGIC2(blocks, add_const_vii); -GR_SWIG_BLOCK_MAGIC2(blocks, add_const_vcc); -GR_SWIG_BLOCK_MAGIC2(blocks, and_bb); -GR_SWIG_BLOCK_MAGIC2(blocks, and_ss); -GR_SWIG_BLOCK_MAGIC2(blocks, and_ii); GR_SWIG_BLOCK_MAGIC2(blocks, and_const_bb); GR_SWIG_BLOCK_MAGIC2(blocks, and_const_ss); GR_SWIG_BLOCK_MAGIC2(blocks, and_const_ii); @@ -167,8 +97,3 @@ GR_SWIG_BLOCK_MAGIC2(blocks, complex_to_mag); GR_SWIG_BLOCK_MAGIC2(blocks, complex_to_mag_squared); GR_SWIG_BLOCK_MAGIC2(blocks, complex_to_arg); GR_SWIG_BLOCK_MAGIC2(blocks, conjugate_cc); -GR_SWIG_BLOCK_MAGIC2(blocks, deinterleave); -GR_SWIG_BLOCK_MAGIC2(blocks, divide_ff); -GR_SWIG_BLOCK_MAGIC2(blocks, divide_ss); -GR_SWIG_BLOCK_MAGIC2(blocks, divide_ii); -GR_SWIG_BLOCK_MAGIC2(blocks, divide_cc); diff --git a/gr-blocks/swig/blocks_swig3.i b/gr-blocks/swig/blocks_swig3.i index 629ada54ea..6794b75d57 100644 --- a/gr-blocks/swig/blocks_swig3.i +++ b/gr-blocks/swig/blocks_swig3.i @@ -28,33 +28,6 @@ %include "blocks_swig3_doc.i" %{ -#include "gnuradio/blocks/float_to_char.h" -#include "gnuradio/blocks/float_to_complex.h" -#include "gnuradio/blocks/magphase_to_complex.h" -#include "gnuradio/blocks/float_to_int.h" -#include "gnuradio/blocks/float_to_short.h" -#include "gnuradio/blocks/float_to_uchar.h" -#include "gnuradio/blocks/int_to_float.h" -#include "gnuradio/blocks/integrate_ss.h" -#include "gnuradio/blocks/integrate_ii.h" -#include "gnuradio/blocks/integrate_ff.h" -#include "gnuradio/blocks/integrate_cc.h" -#include "gnuradio/blocks/interleave.h" -#include "gnuradio/blocks/interleaved_short_to_complex.h" -#include "gnuradio/blocks/interleaved_char_to_complex.h" -#include "gnuradio/blocks/keep_m_in_n.h" -#include "gnuradio/blocks/keep_one_in_n.h" -#include "gnuradio/blocks/lfsr_32k_source_s.h" -#include "gnuradio/blocks/max_ff.h" -#include "gnuradio/blocks/max_ii.h" -#include "gnuradio/blocks/max_ss.h" -#include "gnuradio/blocks/min_ff.h" -#include "gnuradio/blocks/min_ii.h" -#include "gnuradio/blocks/min_ss.h" -#include "gnuradio/blocks/moving_average_cc.h" -#include "gnuradio/blocks/moving_average_ff.h" -#include "gnuradio/blocks/moving_average_ii.h" -#include "gnuradio/blocks/moving_average_ss.h" #include "gnuradio/blocks/multiply_ss.h" #include "gnuradio/blocks/multiply_ii.h" #include "gnuradio/blocks/multiply_ff.h" @@ -77,33 +50,6 @@ #include "gnuradio/blocks/mute_cc.h" %} -%include "gnuradio/blocks/float_to_char.h" -%include "gnuradio/blocks/float_to_complex.h" -%include "gnuradio/blocks/magphase_to_complex.h" -%include "gnuradio/blocks/float_to_int.h" -%include "gnuradio/blocks/float_to_short.h" -%include "gnuradio/blocks/float_to_uchar.h" -%include "gnuradio/blocks/int_to_float.h" -%include "gnuradio/blocks/integrate_ss.h" -%include "gnuradio/blocks/integrate_ii.h" -%include "gnuradio/blocks/integrate_ff.h" -%include "gnuradio/blocks/integrate_cc.h" -%include "gnuradio/blocks/interleave.h" -%include "gnuradio/blocks/interleaved_short_to_complex.h" -%include "gnuradio/blocks/interleaved_char_to_complex.h" -%include "gnuradio/blocks/keep_m_in_n.h" -%include "gnuradio/blocks/keep_one_in_n.h" -%include "gnuradio/blocks/lfsr_32k_source_s.h" -%include "gnuradio/blocks/max_ff.h" -%include "gnuradio/blocks/max_ii.h" -%include "gnuradio/blocks/max_ss.h" -%include "gnuradio/blocks/min_ff.h" -%include "gnuradio/blocks/min_ii.h" -%include "gnuradio/blocks/min_ss.h" -%include "gnuradio/blocks/moving_average_cc.h" -%include "gnuradio/blocks/moving_average_ff.h" -%include "gnuradio/blocks/moving_average_ii.h" -%include "gnuradio/blocks/moving_average_ss.h" %include "gnuradio/blocks/multiply_ss.h" %include "gnuradio/blocks/multiply_ii.h" %include "gnuradio/blocks/multiply_ff.h" @@ -125,33 +71,6 @@ %include "gnuradio/blocks/mute_ff.h" %include "gnuradio/blocks/mute_cc.h" -GR_SWIG_BLOCK_MAGIC2(blocks, float_to_char); -GR_SWIG_BLOCK_MAGIC2(blocks, float_to_complex); -GR_SWIG_BLOCK_MAGIC2(blocks, magphase_to_complex); -GR_SWIG_BLOCK_MAGIC2(blocks, float_to_int); -GR_SWIG_BLOCK_MAGIC2(blocks, float_to_short); -GR_SWIG_BLOCK_MAGIC2(blocks, float_to_uchar); -GR_SWIG_BLOCK_MAGIC2(blocks, int_to_float); -GR_SWIG_BLOCK_MAGIC2(blocks, integrate_ss); -GR_SWIG_BLOCK_MAGIC2(blocks, integrate_ii); -GR_SWIG_BLOCK_MAGIC2(blocks, integrate_ff); -GR_SWIG_BLOCK_MAGIC2(blocks, integrate_cc); -GR_SWIG_BLOCK_MAGIC2(blocks, interleave); -GR_SWIG_BLOCK_MAGIC2(blocks, interleaved_short_to_complex); -GR_SWIG_BLOCK_MAGIC2(blocks, interleaved_char_to_complex); -GR_SWIG_BLOCK_MAGIC2(blocks, keep_m_in_n); -GR_SWIG_BLOCK_MAGIC2(blocks, keep_one_in_n); -GR_SWIG_BLOCK_MAGIC2(blocks, lfsr_32k_source_s); -GR_SWIG_BLOCK_MAGIC2(blocks, max_ff); -GR_SWIG_BLOCK_MAGIC2(blocks, max_ii); -GR_SWIG_BLOCK_MAGIC2(blocks, max_ss); -GR_SWIG_BLOCK_MAGIC2(blocks, min_ff); -GR_SWIG_BLOCK_MAGIC2(blocks, min_ii); -GR_SWIG_BLOCK_MAGIC2(blocks, min_ss); -GR_SWIG_BLOCK_MAGIC2(blocks, moving_average_cc); -GR_SWIG_BLOCK_MAGIC2(blocks, moving_average_ff); -GR_SWIG_BLOCK_MAGIC2(blocks, moving_average_ii); -GR_SWIG_BLOCK_MAGIC2(blocks, moving_average_ss); GR_SWIG_BLOCK_MAGIC2(blocks, multiply_ss); GR_SWIG_BLOCK_MAGIC2(blocks, multiply_ii); GR_SWIG_BLOCK_MAGIC2(blocks, multiply_ff); diff --git a/gr-blocks/swig/blocks_swig4.i b/gr-blocks/swig/blocks_swig4.i index 4c2c93e6b1..bb39740123 100644 --- a/gr-blocks/swig/blocks_swig4.i +++ b/gr-blocks/swig/blocks_swig4.i @@ -31,15 +31,6 @@ %include "blocks_swig4_doc.i" %{ -#include "gnuradio/blocks/nlog10_ff.h" -#include "gnuradio/blocks/not_bb.h" -#include "gnuradio/blocks/not_ss.h" -#include "gnuradio/blocks/not_ii.h" -#include "gnuradio/blocks/patterned_interleaver.h" -#include "gnuradio/blocks/pack_k_bits_bb.h" -#include "gnuradio/blocks/packed_to_unpacked_bb.h" -#include "gnuradio/blocks/packed_to_unpacked_ss.h" -#include "gnuradio/blocks/packed_to_unpacked_ii.h" #include "gnuradio/blocks/pdu_filter.h" #include "gnuradio/blocks/pdu_set.h" #include "gnuradio/blocks/pdu_remove.h" @@ -60,15 +51,8 @@ #include "gnuradio/blocks/probe_signal_vi.h" #include "gnuradio/blocks/probe_signal_vf.h" #include "gnuradio/blocks/probe_signal_vc.h" -#include "gnuradio/blocks/or_bb.h" -#include "gnuradio/blocks/or_ss.h" -#include "gnuradio/blocks/or_ii.h" %} -%include "gnuradio/blocks/nlog10_ff.h" -%include "gnuradio/blocks/not_bb.h" -%include "gnuradio/blocks/not_ss.h" -%include "gnuradio/blocks/not_ii.h" %include "gnuradio/blocks/probe_signal_b.h" %include "gnuradio/blocks/probe_signal_s.h" %include "gnuradio/blocks/probe_signal_i.h" @@ -79,14 +63,6 @@ %include "gnuradio/blocks/probe_signal_vi.h" %include "gnuradio/blocks/probe_signal_vf.h" %include "gnuradio/blocks/probe_signal_vc.h" -%include "gnuradio/blocks/or_bb.h" -%include "gnuradio/blocks/or_ss.h" -%include "gnuradio/blocks/or_ii.h" -%include "gnuradio/blocks/pack_k_bits_bb.h" -%include "gnuradio/blocks/packed_to_unpacked_bb.h" -%include "gnuradio/blocks/packed_to_unpacked_ss.h" -%include "gnuradio/blocks/packed_to_unpacked_ii.h" -%include "gnuradio/blocks/patterned_interleaver.h" %include "gnuradio/blocks/pdu_filter.h" %include "gnuradio/blocks/pdu_set.h" %include "gnuradio/blocks/pdu_remove.h" @@ -98,15 +74,6 @@ %include "gnuradio/blocks/plateau_detector_fb.h" %include "gnuradio/blocks/probe_rate.h" -GR_SWIG_BLOCK_MAGIC2(blocks, nlog10_ff); -GR_SWIG_BLOCK_MAGIC2(blocks, not_bb); -GR_SWIG_BLOCK_MAGIC2(blocks, not_ss); -GR_SWIG_BLOCK_MAGIC2(blocks, not_ii); -GR_SWIG_BLOCK_MAGIC2(blocks, patterned_interleaver); -GR_SWIG_BLOCK_MAGIC2(blocks, pack_k_bits_bb); -GR_SWIG_BLOCK_MAGIC2(blocks, packed_to_unpacked_bb); -GR_SWIG_BLOCK_MAGIC2(blocks, packed_to_unpacked_ss); -GR_SWIG_BLOCK_MAGIC2(blocks, packed_to_unpacked_ii); GR_SWIG_BLOCK_MAGIC2(blocks, peak_detector_fb); GR_SWIG_BLOCK_MAGIC2(blocks, peak_detector_ib); GR_SWIG_BLOCK_MAGIC2(blocks, peak_detector_sb); @@ -117,9 +84,6 @@ GR_SWIG_BLOCK_MAGIC2(blocks, pdu_set); GR_SWIG_BLOCK_MAGIC2(blocks, pdu_remove); GR_SWIG_BLOCK_MAGIC2(blocks, pdu_to_tagged_stream); GR_SWIG_BLOCK_MAGIC2(blocks, probe_rate); -GR_SWIG_BLOCK_MAGIC2(blocks, or_bb); -GR_SWIG_BLOCK_MAGIC2(blocks, or_ss); -GR_SWIG_BLOCK_MAGIC2(blocks, or_ii); GR_SWIG_BLOCK_MAGIC2(blocks, probe_signal_b); GR_SWIG_BLOCK_MAGIC2(blocks, probe_signal_s); GR_SWIG_BLOCK_MAGIC2(blocks, probe_signal_i); diff --git a/gr-blocks/swig/blocks_swig5.i b/gr-blocks/swig/blocks_swig5.i index 761b0a855a..da8048370a 100644 --- a/gr-blocks/swig/blocks_swig5.i +++ b/gr-blocks/swig/blocks_swig5.i @@ -31,6 +31,7 @@ %include "blocks_swig5_doc.i" %{ +#include "gnuradio/blocks/pdu.h" #include "gnuradio/blocks/random_pdu.h" #include "gnuradio/blocks/regenerate_bb.h" #include "gnuradio/blocks/repack_bits_bb.h" @@ -50,30 +51,6 @@ #include "gnuradio/blocks/sub_ss.h" #include "gnuradio/blocks/sub_ii.h" #include "gnuradio/blocks/sub_cc.h" -#include "gnuradio/blocks/tag_gate.h" -#include "gnuradio/blocks/tagged_stream_align.h" -#include "gnuradio/blocks/tagged_stream_mux.h" -#include "gnuradio/blocks/tagged_stream_multiply_length.h" -#include "gnuradio/blocks/tagged_stream_to_pdu.h" -#include "gnuradio/blocks/tags_strobe.h" -#include "gnuradio/blocks/tcp_server_sink.h" -#include "gnuradio/blocks/test_tag_variable_rate_ff.h" -#include "gnuradio/blocks/threshold_ff.h" -#include "gnuradio/blocks/transcendental.h" -#include "gnuradio/blocks/tuntap_pdu.h" -#include "gnuradio/blocks/uchar_to_float.h" -#include "gnuradio/blocks/udp_sink.h" -#include "gnuradio/blocks/udp_source.h" -#include "gnuradio/blocks/unpack_k_bits.h" -#include "gnuradio/blocks/unpack_k_bits_bb.h" -#include "gnuradio/blocks/unpacked_to_packed_bb.h" -#include "gnuradio/blocks/unpacked_to_packed_ss.h" -#include "gnuradio/blocks/unpacked_to_packed_ii.h" -#include "gnuradio/blocks/vco_f.h" -#include "gnuradio/blocks/vco_c.h" -#include "gnuradio/blocks/xor_bb.h" -#include "gnuradio/blocks/xor_ss.h" -#include "gnuradio/blocks/xor_ii.h" %} %include "gnuradio/blocks/random_pdu.h" @@ -95,30 +72,6 @@ %include "gnuradio/blocks/sub_ss.h" %include "gnuradio/blocks/sub_ii.h" %include "gnuradio/blocks/sub_cc.h" -%include "gnuradio/blocks/tag_gate.h" -%include "gnuradio/blocks/tagged_stream_align.h" -%include "gnuradio/blocks/tagged_stream_mux.h" -%include "gnuradio/blocks/tagged_stream_multiply_length.h" -%include "gnuradio/blocks/tagged_stream_to_pdu.h" -%include "gnuradio/blocks/tags_strobe.h" -%include "gnuradio/blocks/tcp_server_sink.h" -%include "gnuradio/blocks/test_tag_variable_rate_ff.h" -%include "gnuradio/blocks/threshold_ff.h" -%include "gnuradio/blocks/transcendental.h" -%include "gnuradio/blocks/tuntap_pdu.h" -%include "gnuradio/blocks/uchar_to_float.h" -%include "gnuradio/blocks/udp_sink.h" -%include "gnuradio/blocks/udp_source.h" -%include "gnuradio/blocks/unpack_k_bits.h" -%include "gnuradio/blocks/unpack_k_bits_bb.h" -%include "gnuradio/blocks/unpacked_to_packed_bb.h" -%include "gnuradio/blocks/unpacked_to_packed_ss.h" -%include "gnuradio/blocks/unpacked_to_packed_ii.h" -%include "gnuradio/blocks/vco_f.h" -%include "gnuradio/blocks/vco_c.h" -%include "gnuradio/blocks/xor_bb.h" -%include "gnuradio/blocks/xor_ss.h" -%include "gnuradio/blocks/xor_ii.h" GR_SWIG_BLOCK_MAGIC2(blocks, random_pdu); GR_SWIG_BLOCK_MAGIC2(blocks, regenerate_bb); @@ -139,26 +92,3 @@ GR_SWIG_BLOCK_MAGIC2(blocks, sub_ff); GR_SWIG_BLOCK_MAGIC2(blocks, sub_ss); GR_SWIG_BLOCK_MAGIC2(blocks, sub_ii); GR_SWIG_BLOCK_MAGIC2(blocks, sub_cc); -GR_SWIG_BLOCK_MAGIC2(blocks, tag_gate); -GR_SWIG_BLOCK_MAGIC2(blocks, tagged_stream_align); -GR_SWIG_BLOCK_MAGIC2(blocks, tagged_stream_mux); -GR_SWIG_BLOCK_MAGIC2(blocks, tagged_stream_multiply_length); -GR_SWIG_BLOCK_MAGIC2(blocks, tagged_stream_to_pdu); -GR_SWIG_BLOCK_MAGIC2(blocks, tags_strobe); -GR_SWIG_BLOCK_MAGIC2(blocks, tcp_server_sink); -GR_SWIG_BLOCK_MAGIC2(blocks, test_tag_variable_rate_ff); -GR_SWIG_BLOCK_MAGIC2(blocks, threshold_ff); -GR_SWIG_BLOCK_MAGIC2(blocks, transcendental); -GR_SWIG_BLOCK_MAGIC2(blocks, tuntap_pdu); -GR_SWIG_BLOCK_MAGIC2(blocks, uchar_to_float); -GR_SWIG_BLOCK_MAGIC2(blocks, udp_sink); -GR_SWIG_BLOCK_MAGIC2(blocks, udp_source); -GR_SWIG_BLOCK_MAGIC2(blocks, unpack_k_bits_bb); -GR_SWIG_BLOCK_MAGIC2(blocks, unpacked_to_packed_bb); -GR_SWIG_BLOCK_MAGIC2(blocks, unpacked_to_packed_ss); -GR_SWIG_BLOCK_MAGIC2(blocks, unpacked_to_packed_ii); -GR_SWIG_BLOCK_MAGIC2(blocks, vco_f); -GR_SWIG_BLOCK_MAGIC2(blocks, vco_c); -GR_SWIG_BLOCK_MAGIC2(blocks, xor_bb); -GR_SWIG_BLOCK_MAGIC2(blocks, xor_ss); -GR_SWIG_BLOCK_MAGIC2(blocks, xor_ii); diff --git a/gr-blocks/swig/blocks_swig6.i b/gr-blocks/swig/blocks_swig6.i new file mode 100644 index 0000000000..f4c266814b --- /dev/null +++ b/gr-blocks/swig/blocks_swig6.i @@ -0,0 +1,110 @@ +/* -*- c++ -*- */ +/* + * Copyright 2017 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +#define BLOCKS_API + +%include "gnuradio.i" +%include "gnuradio/blocks/pdu.h" + +%include <gnuradio/endianness.h> + +//load generated python docstrings +%include "blocks_swig6_doc.i" + +%{ +#include "gnuradio/blocks/tag_gate.h" +#include "gnuradio/blocks/tag_share.h" +#include "gnuradio/blocks/tagged_stream_align.h" +#include "gnuradio/blocks/tagged_stream_mux.h" +#include "gnuradio/blocks/tagged_stream_multiply_length.h" +#include "gnuradio/blocks/tagged_stream_to_pdu.h" +#include "gnuradio/blocks/tags_strobe.h" +#include "gnuradio/blocks/tcp_server_sink.h" +#include "gnuradio/blocks/test_tag_variable_rate_ff.h" +#include "gnuradio/blocks/threshold_ff.h" +#include "gnuradio/blocks/transcendental.h" +#include "gnuradio/blocks/tuntap_pdu.h" +#include "gnuradio/blocks/uchar_to_float.h" +#include "gnuradio/blocks/udp_sink.h" +#include "gnuradio/blocks/udp_source.h" +#include "gnuradio/blocks/unpack_k_bits.h" +#include "gnuradio/blocks/unpack_k_bits_bb.h" +#include "gnuradio/blocks/unpacked_to_packed_bb.h" +#include "gnuradio/blocks/unpacked_to_packed_ss.h" +#include "gnuradio/blocks/unpacked_to_packed_ii.h" +#include "gnuradio/blocks/vco_f.h" +#include "gnuradio/blocks/vco_c.h" +#include "gnuradio/blocks/xor_bb.h" +#include "gnuradio/blocks/xor_ss.h" +#include "gnuradio/blocks/xor_ii.h" +%} + +%include "gnuradio/blocks/tag_gate.h" +%include "gnuradio/blocks/tag_share.h" +%include "gnuradio/blocks/tagged_stream_align.h" +%include "gnuradio/blocks/tagged_stream_mux.h" +%include "gnuradio/blocks/tagged_stream_multiply_length.h" +%include "gnuradio/blocks/tagged_stream_to_pdu.h" +%include "gnuradio/blocks/tags_strobe.h" +%include "gnuradio/blocks/tcp_server_sink.h" +%include "gnuradio/blocks/test_tag_variable_rate_ff.h" +%include "gnuradio/blocks/threshold_ff.h" +%include "gnuradio/blocks/transcendental.h" +%include "gnuradio/blocks/tuntap_pdu.h" +%include "gnuradio/blocks/uchar_to_float.h" +%include "gnuradio/blocks/udp_sink.h" +%include "gnuradio/blocks/udp_source.h" +%include "gnuradio/blocks/unpack_k_bits.h" +%include "gnuradio/blocks/unpack_k_bits_bb.h" +%include "gnuradio/blocks/unpacked_to_packed_bb.h" +%include "gnuradio/blocks/unpacked_to_packed_ss.h" +%include "gnuradio/blocks/unpacked_to_packed_ii.h" +%include "gnuradio/blocks/vco_f.h" +%include "gnuradio/blocks/vco_c.h" +%include "gnuradio/blocks/xor_bb.h" +%include "gnuradio/blocks/xor_ss.h" +%include "gnuradio/blocks/xor_ii.h" + +GR_SWIG_BLOCK_MAGIC2(blocks, tag_gate); +GR_SWIG_BLOCK_MAGIC2(blocks, tag_share); +GR_SWIG_BLOCK_MAGIC2(blocks, tagged_stream_align); +GR_SWIG_BLOCK_MAGIC2(blocks, tagged_stream_mux); +GR_SWIG_BLOCK_MAGIC2(blocks, tagged_stream_multiply_length); +GR_SWIG_BLOCK_MAGIC2(blocks, tagged_stream_to_pdu); +GR_SWIG_BLOCK_MAGIC2(blocks, tags_strobe); +GR_SWIG_BLOCK_MAGIC2(blocks, tcp_server_sink); +GR_SWIG_BLOCK_MAGIC2(blocks, test_tag_variable_rate_ff); +GR_SWIG_BLOCK_MAGIC2(blocks, threshold_ff); +GR_SWIG_BLOCK_MAGIC2(blocks, transcendental); +GR_SWIG_BLOCK_MAGIC2(blocks, tuntap_pdu); +GR_SWIG_BLOCK_MAGIC2(blocks, uchar_to_float); +GR_SWIG_BLOCK_MAGIC2(blocks, udp_sink); +GR_SWIG_BLOCK_MAGIC2(blocks, udp_source); +GR_SWIG_BLOCK_MAGIC2(blocks, unpack_k_bits_bb); +GR_SWIG_BLOCK_MAGIC2(blocks, unpacked_to_packed_bb); +GR_SWIG_BLOCK_MAGIC2(blocks, unpacked_to_packed_ss); +GR_SWIG_BLOCK_MAGIC2(blocks, unpacked_to_packed_ii); +GR_SWIG_BLOCK_MAGIC2(blocks, vco_f); +GR_SWIG_BLOCK_MAGIC2(blocks, vco_c); +GR_SWIG_BLOCK_MAGIC2(blocks, xor_bb); +GR_SWIG_BLOCK_MAGIC2(blocks, xor_ss); +GR_SWIG_BLOCK_MAGIC2(blocks, xor_ii); diff --git a/gr-blocks/swig/blocks_swig7.i b/gr-blocks/swig/blocks_swig7.i new file mode 100644 index 0000000000..20ca46dee6 --- /dev/null +++ b/gr-blocks/swig/blocks_swig7.i @@ -0,0 +1,99 @@ +/* -*- c++ -*- */ +/* + * Copyright 2017 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +#define BLOCKS_API +#define GR_RUNTIME_API + +%include "gnuradio.i" + +//load generated python docstrings +%include "blocks_swig7_doc.i" + +%include "feval.i" + +%{ +#include "gnuradio/blocks/deinterleave.h" +#include "gnuradio/blocks/divide_ff.h" +#include "gnuradio/blocks/divide_ss.h" +#include "gnuradio/blocks/divide_ii.h" +#include "gnuradio/blocks/divide_cc.h" +#include "gnuradio/blocks/exponentiate_const_cci.h" +#include "gnuradio/blocks/skiphead.h" +#include "gnuradio/blocks/stream_mux.h" +#include "gnuradio/blocks/stream_to_streams.h" +#include "gnuradio/blocks/stream_to_tagged_stream.h" +#include "gnuradio/blocks/stream_to_vector.h" +#include "gnuradio/blocks/streams_to_stream.h" +#include "gnuradio/blocks/streams_to_vector.h" +#include "gnuradio/blocks/tag_debug.h" +#include "gnuradio/blocks/tagged_file_sink.h" +#include "gnuradio/blocks/tsb_vector_sink_b.h" +#include "gnuradio/blocks/tsb_vector_sink_c.h" +#include "gnuradio/blocks/tsb_vector_sink_f.h" +#include "gnuradio/blocks/tsb_vector_sink_i.h" +#include "gnuradio/blocks/tsb_vector_sink_s.h" +#include "gnuradio/blocks/throttle.h" +%} + +%include "gnuradio/blocks/deinterleave.h" +%include "gnuradio/blocks/divide_ff.h" +%include "gnuradio/blocks/divide_ss.h" +%include "gnuradio/blocks/divide_ii.h" +%include "gnuradio/blocks/divide_cc.h" +%include "gnuradio/blocks/exponentiate_const_cci.h" +%include "gnuradio/blocks/skiphead.h" +%include "gnuradio/blocks/stream_mux.h" +%include "gnuradio/blocks/stream_to_streams.h" +%include "gnuradio/blocks/stream_to_tagged_stream.h" +%include "gnuradio/blocks/stream_to_vector.h" +%include "gnuradio/blocks/streams_to_stream.h" +%include "gnuradio/blocks/streams_to_vector.h" +%include "gnuradio/blocks/tag_debug.h" +%include "gnuradio/blocks/tagged_file_sink.h" +%include "gnuradio/blocks/tsb_vector_sink_b.h" +%include "gnuradio/blocks/tsb_vector_sink_c.h" +%include "gnuradio/blocks/tsb_vector_sink_f.h" +%include "gnuradio/blocks/tsb_vector_sink_i.h" +%include "gnuradio/blocks/tsb_vector_sink_s.h" +%include "gnuradio/blocks/throttle.h" + +GR_SWIG_BLOCK_MAGIC2(blocks, deinterleave); +GR_SWIG_BLOCK_MAGIC2(blocks, divide_ff); +GR_SWIG_BLOCK_MAGIC2(blocks, divide_ss); +GR_SWIG_BLOCK_MAGIC2(blocks, divide_ii); +GR_SWIG_BLOCK_MAGIC2(blocks, divide_cc); +GR_SWIG_BLOCK_MAGIC2(blocks, exponentiate_const_cci); +GR_SWIG_BLOCK_MAGIC2(blocks, skiphead); +GR_SWIG_BLOCK_MAGIC2(blocks, stream_mux); +GR_SWIG_BLOCK_MAGIC2(blocks, stream_to_streams); +GR_SWIG_BLOCK_MAGIC2(blocks, stream_to_tagged_stream); +GR_SWIG_BLOCK_MAGIC2(blocks, stream_to_vector); +GR_SWIG_BLOCK_MAGIC2(blocks, streams_to_stream); +GR_SWIG_BLOCK_MAGIC2(blocks, streams_to_vector); +GR_SWIG_BLOCK_MAGIC2(blocks, tag_debug); +GR_SWIG_BLOCK_MAGIC2(blocks, tagged_file_sink); +GR_SWIG_BLOCK_MAGIC2(blocks, tsb_vector_sink_b); +GR_SWIG_BLOCK_MAGIC2(blocks, tsb_vector_sink_c); +GR_SWIG_BLOCK_MAGIC2(blocks, tsb_vector_sink_f); +GR_SWIG_BLOCK_MAGIC2(blocks, tsb_vector_sink_i); +GR_SWIG_BLOCK_MAGIC2(blocks, tsb_vector_sink_s); +GR_SWIG_BLOCK_MAGIC2(blocks, throttle); diff --git a/gr-blocks/swig/blocks_swig8.i b/gr-blocks/swig/blocks_swig8.i new file mode 100644 index 0000000000..2bf5070bb8 --- /dev/null +++ b/gr-blocks/swig/blocks_swig8.i @@ -0,0 +1,93 @@ +/* -*- c++ -*- */ +/* + * Copyright 2017 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +#define BLOCKS_API + +%include "gnuradio.i" + +//load generated python docstrings +%include "blocks_swig8_doc.i" + +%{ +#include "gnuradio/blocks/abs_ff.h" +#include "gnuradio/blocks/abs_ss.h" +#include "gnuradio/blocks/abs_ii.h" +#include "gnuradio/blocks/add_ff.h" +#include "gnuradio/blocks/add_ss.h" +#include "gnuradio/blocks/add_ii.h" +#include "gnuradio/blocks/add_cc.h" +#include "gnuradio/blocks/add_const_bb.h" +#include "gnuradio/blocks/add_const_ff.h" +#include "gnuradio/blocks/add_const_ss.h" +#include "gnuradio/blocks/add_const_ii.h" +#include "gnuradio/blocks/add_const_cc.h" +#include "gnuradio/blocks/add_const_vbb.h" +#include "gnuradio/blocks/add_const_vff.h" +#include "gnuradio/blocks/add_const_vss.h" +#include "gnuradio/blocks/add_const_vii.h" +#include "gnuradio/blocks/add_const_vcc.h" +#include "gnuradio/blocks/and_bb.h" +#include "gnuradio/blocks/and_ss.h" +#include "gnuradio/blocks/and_ii.h" +%} + +%include "gnuradio/blocks/abs_ff.h" +%include "gnuradio/blocks/abs_ss.h" +%include "gnuradio/blocks/abs_ii.h" +%include "gnuradio/blocks/add_ff.h" +%include "gnuradio/blocks/add_ss.h" +%include "gnuradio/blocks/add_ii.h" +%include "gnuradio/blocks/add_cc.h" +%include "gnuradio/blocks/add_const_bb.h" +%include "gnuradio/blocks/add_const_ff.h" +%include "gnuradio/blocks/add_const_ss.h" +%include "gnuradio/blocks/add_const_ii.h" +%include "gnuradio/blocks/add_const_cc.h" +%include "gnuradio/blocks/add_const_vbb.h" +%include "gnuradio/blocks/add_const_vff.h" +%include "gnuradio/blocks/add_const_vss.h" +%include "gnuradio/blocks/add_const_vii.h" +%include "gnuradio/blocks/add_const_vcc.h" +%include "gnuradio/blocks/and_bb.h" +%include "gnuradio/blocks/and_ss.h" +%include "gnuradio/blocks/and_ii.h" + +GR_SWIG_BLOCK_MAGIC2(blocks, abs_ff); +GR_SWIG_BLOCK_MAGIC2(blocks, abs_ss); +GR_SWIG_BLOCK_MAGIC2(blocks, abs_ii); +GR_SWIG_BLOCK_MAGIC2(blocks, add_ff); +GR_SWIG_BLOCK_MAGIC2(blocks, add_ss); +GR_SWIG_BLOCK_MAGIC2(blocks, add_ii); +GR_SWIG_BLOCK_MAGIC2(blocks, add_cc); +GR_SWIG_BLOCK_MAGIC2(blocks, add_const_bb); +GR_SWIG_BLOCK_MAGIC2(blocks, add_const_ff); +GR_SWIG_BLOCK_MAGIC2(blocks, add_const_ss); +GR_SWIG_BLOCK_MAGIC2(blocks, add_const_ii); +GR_SWIG_BLOCK_MAGIC2(blocks, add_const_cc); +GR_SWIG_BLOCK_MAGIC2(blocks, add_const_vbb); +GR_SWIG_BLOCK_MAGIC2(blocks, add_const_vff); +GR_SWIG_BLOCK_MAGIC2(blocks, add_const_vss); +GR_SWIG_BLOCK_MAGIC2(blocks, add_const_vii); +GR_SWIG_BLOCK_MAGIC2(blocks, add_const_vcc); +GR_SWIG_BLOCK_MAGIC2(blocks, and_bb); +GR_SWIG_BLOCK_MAGIC2(blocks, and_ss); +GR_SWIG_BLOCK_MAGIC2(blocks, and_ii); diff --git a/gr-blocks/swig/blocks_swig9.i b/gr-blocks/swig/blocks_swig9.i new file mode 100644 index 0000000000..872abd9d46 --- /dev/null +++ b/gr-blocks/swig/blocks_swig9.i @@ -0,0 +1,93 @@ +/* -*- c++ -*- */ +/* + * Copyright 2017 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +#define BLOCKS_API + +%include "gnuradio.i" + +//load generated python docstrings +%include "blocks_swig9_doc.i" + +%{ +#include "gnuradio/blocks/float_to_char.h" +#include "gnuradio/blocks/float_to_complex.h" +#include "gnuradio/blocks/magphase_to_complex.h" +#include "gnuradio/blocks/float_to_int.h" +#include "gnuradio/blocks/float_to_short.h" +#include "gnuradio/blocks/float_to_uchar.h" +#include "gnuradio/blocks/int_to_float.h" +#include "gnuradio/blocks/integrate_ss.h" +#include "gnuradio/blocks/integrate_ii.h" +#include "gnuradio/blocks/integrate_ff.h" +#include "gnuradio/blocks/integrate_cc.h" +#include "gnuradio/blocks/interleave.h" +#include "gnuradio/blocks/interleaved_short_to_complex.h" +#include "gnuradio/blocks/interleaved_char_to_complex.h" +#include "gnuradio/blocks/keep_m_in_n.h" +#include "gnuradio/blocks/keep_one_in_n.h" +#include "gnuradio/blocks/lfsr_32k_source_s.h" +#include "gnuradio/blocks/max_ff.h" +#include "gnuradio/blocks/max_ii.h" +#include "gnuradio/blocks/max_ss.h" +%} + +%include "gnuradio/blocks/float_to_char.h" +%include "gnuradio/blocks/float_to_complex.h" +%include "gnuradio/blocks/magphase_to_complex.h" +%include "gnuradio/blocks/float_to_int.h" +%include "gnuradio/blocks/float_to_short.h" +%include "gnuradio/blocks/float_to_uchar.h" +%include "gnuradio/blocks/int_to_float.h" +%include "gnuradio/blocks/integrate_ss.h" +%include "gnuradio/blocks/integrate_ii.h" +%include "gnuradio/blocks/integrate_ff.h" +%include "gnuradio/blocks/integrate_cc.h" +%include "gnuradio/blocks/interleave.h" +%include "gnuradio/blocks/interleaved_short_to_complex.h" +%include "gnuradio/blocks/interleaved_char_to_complex.h" +%include "gnuradio/blocks/keep_m_in_n.h" +%include "gnuradio/blocks/keep_one_in_n.h" +%include "gnuradio/blocks/lfsr_32k_source_s.h" +%include "gnuradio/blocks/max_ff.h" +%include "gnuradio/blocks/max_ii.h" +%include "gnuradio/blocks/max_ss.h" + +GR_SWIG_BLOCK_MAGIC2(blocks, float_to_char); +GR_SWIG_BLOCK_MAGIC2(blocks, float_to_complex); +GR_SWIG_BLOCK_MAGIC2(blocks, magphase_to_complex); +GR_SWIG_BLOCK_MAGIC2(blocks, float_to_int); +GR_SWIG_BLOCK_MAGIC2(blocks, float_to_short); +GR_SWIG_BLOCK_MAGIC2(blocks, float_to_uchar); +GR_SWIG_BLOCK_MAGIC2(blocks, int_to_float); +GR_SWIG_BLOCK_MAGIC2(blocks, integrate_ss); +GR_SWIG_BLOCK_MAGIC2(blocks, integrate_ii); +GR_SWIG_BLOCK_MAGIC2(blocks, integrate_ff); +GR_SWIG_BLOCK_MAGIC2(blocks, integrate_cc); +GR_SWIG_BLOCK_MAGIC2(blocks, interleave); +GR_SWIG_BLOCK_MAGIC2(blocks, interleaved_short_to_complex); +GR_SWIG_BLOCK_MAGIC2(blocks, interleaved_char_to_complex); +GR_SWIG_BLOCK_MAGIC2(blocks, keep_m_in_n); +GR_SWIG_BLOCK_MAGIC2(blocks, keep_one_in_n); +GR_SWIG_BLOCK_MAGIC2(blocks, lfsr_32k_source_s); +GR_SWIG_BLOCK_MAGIC2(blocks, max_ff); +GR_SWIG_BLOCK_MAGIC2(blocks, max_ii); +GR_SWIG_BLOCK_MAGIC2(blocks, max_ss); diff --git a/gr-blocks/tests/CMakeLists.txt b/gr-blocks/tests/CMakeLists.txt index 8f2b28edfa..f6b2b50050 100644 --- a/gr-blocks/tests/CMakeLists.txt +++ b/gr-blocks/tests/CMakeLists.txt @@ -36,9 +36,6 @@ link_directories( ${CPPUNIT_LIBRARY_DIRS} ) -include_directories(${LOG4CPP_INCLUDE_DIRS}) -link_directories(${LOG4CPP_LIBRARY_DIRS}) - ######################################################################## # Build benchmarks and non-registered tests ######################################################################## @@ -50,6 +47,5 @@ set(tests_not_run #single source per test foreach(test_not_run_src ${tests_not_run}) get_filename_component(name ${test_not_run_src} NAME_WE) add_executable(${name} ${test_not_run_src}) - target_link_libraries(${name} test-gnuradio-runtime gnuradio-blocks ${LOG4CPP_LIBRARIES}) + target_link_libraries(${name} test-gnuradio-runtime gnuradio-blocks) endforeach(test_not_run_src) - |