diff options
26 files changed, 107 insertions, 662 deletions
diff --git a/gnuradio-core/src/lib/general/Makefile.gen b/gnuradio-core/src/lib/general/Makefile.gen deleted file mode 100644 index f0c477e3d..000000000 --- a/gnuradio-core/src/lib/general/Makefile.gen +++ /dev/null @@ -1,234 +0,0 @@ -# -# This file is machine generated. All edits will be overwritten -# -GENERATED_H = \ - gr_add_cc.h \ - gr_add_const_cc.h \ - gr_add_const_ff.h \ - gr_add_const_ii.h \ - gr_add_const_sf.h \ - gr_add_const_ss.h \ - gr_add_const_vcc.h \ - gr_add_const_vff.h \ - gr_add_const_vii.h \ - gr_add_const_vss.h \ - gr_add_ff.h \ - gr_add_ii.h \ - gr_add_ss.h \ - gr_add_vcc.h \ - gr_add_vff.h \ - gr_add_vii.h \ - gr_add_vss.h \ - gr_chunks_to_symbols_bc.h \ - gr_chunks_to_symbols_bf.h \ - gr_chunks_to_symbols_ic.h \ - gr_chunks_to_symbols_if.h \ - gr_chunks_to_symbols_sc.h \ - gr_chunks_to_symbols_sf.h \ - gr_divide_cc.h \ - gr_divide_ff.h \ - gr_divide_ii.h \ - gr_divide_ss.h \ - gr_multiply_cc.h \ - gr_multiply_const_cc.h \ - gr_multiply_const_ff.h \ - gr_multiply_const_ii.h \ - gr_multiply_const_ss.h \ - gr_multiply_const_vcc.h \ - gr_multiply_const_vff.h \ - gr_multiply_const_vii.h \ - gr_multiply_const_vss.h \ - gr_multiply_ff.h \ - gr_multiply_ii.h \ - gr_multiply_ss.h \ - gr_multiply_vcc.h \ - gr_multiply_vff.h \ - gr_multiply_vii.h \ - gr_multiply_vss.h \ - gr_mute_cc.h \ - gr_mute_ff.h \ - gr_mute_ii.h \ - gr_mute_ss.h \ - gr_noise_source_c.h \ - gr_noise_source_f.h \ - gr_noise_source_i.h \ - gr_noise_source_s.h \ - gr_packed_to_unpacked_bb.h \ - gr_packed_to_unpacked_ii.h \ - gr_packed_to_unpacked_ss.h \ - gr_sig_source_c.h \ - gr_sig_source_f.h \ - gr_sig_source_i.h \ - gr_sig_source_s.h \ - gr_sub_cc.h \ - gr_sub_ff.h \ - gr_sub_ii.h \ - gr_sub_ss.h \ - gr_unpacked_to_packed_bb.h \ - gr_unpacked_to_packed_ii.h \ - gr_unpacked_to_packed_ss.h \ - gr_vector_sink_b.h \ - gr_vector_sink_c.h \ - gr_vector_sink_f.h \ - gr_vector_sink_i.h \ - gr_vector_sink_s.h \ - gr_vector_source_b.h \ - gr_vector_source_c.h \ - gr_vector_source_f.h \ - gr_vector_source_i.h \ - gr_vector_source_s.h - -GENERATED_I = \ - gr_add_cc.i \ - gr_add_const_cc.i \ - gr_add_const_ff.i \ - gr_add_const_ii.i \ - gr_add_const_sf.i \ - gr_add_const_ss.i \ - gr_add_const_vcc.i \ - gr_add_const_vff.i \ - gr_add_const_vii.i \ - gr_add_const_vss.i \ - gr_add_ff.i \ - gr_add_ii.i \ - gr_add_ss.i \ - gr_add_vcc.i \ - gr_add_vff.i \ - gr_add_vii.i \ - gr_add_vss.i \ - gr_chunks_to_symbols_bc.i \ - gr_chunks_to_symbols_bf.i \ - gr_chunks_to_symbols_ic.i \ - gr_chunks_to_symbols_if.i \ - gr_chunks_to_symbols_sc.i \ - gr_chunks_to_symbols_sf.i \ - gr_divide_cc.i \ - gr_divide_ff.i \ - gr_divide_ii.i \ - gr_divide_ss.i \ - gr_multiply_cc.i \ - gr_multiply_const_cc.i \ - gr_multiply_const_ff.i \ - gr_multiply_const_ii.i \ - gr_multiply_const_ss.i \ - gr_multiply_const_vcc.i \ - gr_multiply_const_vff.i \ - gr_multiply_const_vii.i \ - gr_multiply_const_vss.i \ - gr_multiply_ff.i \ - gr_multiply_ii.i \ - gr_multiply_ss.i \ - gr_multiply_vcc.i \ - gr_multiply_vff.i \ - gr_multiply_vii.i \ - gr_multiply_vss.i \ - gr_mute_cc.i \ - gr_mute_ff.i \ - gr_mute_ii.i \ - gr_mute_ss.i \ - gr_noise_source_c.i \ - gr_noise_source_f.i \ - gr_noise_source_i.i \ - gr_noise_source_s.i \ - gr_packed_to_unpacked_bb.i \ - gr_packed_to_unpacked_ii.i \ - gr_packed_to_unpacked_ss.i \ - gr_sig_source_c.i \ - gr_sig_source_f.i \ - gr_sig_source_i.i \ - gr_sig_source_s.i \ - gr_sub_cc.i \ - gr_sub_ff.i \ - gr_sub_ii.i \ - gr_sub_ss.i \ - gr_unpacked_to_packed_bb.i \ - gr_unpacked_to_packed_ii.i \ - gr_unpacked_to_packed_ss.i \ - gr_vector_sink_b.i \ - gr_vector_sink_c.i \ - gr_vector_sink_f.i \ - gr_vector_sink_i.i \ - gr_vector_sink_s.i \ - gr_vector_source_b.i \ - gr_vector_source_c.i \ - gr_vector_source_f.i \ - gr_vector_source_i.i \ - gr_vector_source_s.i - -GENERATED_CC = \ - gr_add_cc.cc \ - gr_add_const_cc.cc \ - gr_add_const_ff.cc \ - gr_add_const_ii.cc \ - gr_add_const_sf.cc \ - gr_add_const_ss.cc \ - gr_add_const_vcc.cc \ - gr_add_const_vff.cc \ - gr_add_const_vii.cc \ - gr_add_const_vss.cc \ - gr_add_ff.cc \ - gr_add_ii.cc \ - gr_add_ss.cc \ - gr_add_vcc.cc \ - gr_add_vff.cc \ - gr_add_vii.cc \ - gr_add_vss.cc \ - gr_chunks_to_symbols_bc.cc \ - gr_chunks_to_symbols_bf.cc \ - gr_chunks_to_symbols_ic.cc \ - gr_chunks_to_symbols_if.cc \ - gr_chunks_to_symbols_sc.cc \ - gr_chunks_to_symbols_sf.cc \ - gr_divide_cc.cc \ - gr_divide_ff.cc \ - gr_divide_ii.cc \ - gr_divide_ss.cc \ - gr_multiply_cc.cc \ - gr_multiply_const_cc.cc \ - gr_multiply_const_ff.cc \ - gr_multiply_const_ii.cc \ - gr_multiply_const_ss.cc \ - gr_multiply_const_vcc.cc \ - gr_multiply_const_vff.cc \ - gr_multiply_const_vii.cc \ - gr_multiply_const_vss.cc \ - gr_multiply_ff.cc \ - gr_multiply_ii.cc \ - gr_multiply_ss.cc \ - gr_multiply_vcc.cc \ - gr_multiply_vff.cc \ - gr_multiply_vii.cc \ - gr_multiply_vss.cc \ - gr_mute_cc.cc \ - gr_mute_ff.cc \ - gr_mute_ii.cc \ - gr_mute_ss.cc \ - gr_noise_source_c.cc \ - gr_noise_source_f.cc \ - gr_noise_source_i.cc \ - gr_noise_source_s.cc \ - gr_packed_to_unpacked_bb.cc \ - gr_packed_to_unpacked_ii.cc \ - gr_packed_to_unpacked_ss.cc \ - gr_sig_source_c.cc \ - gr_sig_source_f.cc \ - gr_sig_source_i.cc \ - gr_sig_source_s.cc \ - gr_sub_cc.cc \ - gr_sub_ff.cc \ - gr_sub_ii.cc \ - gr_sub_ss.cc \ - gr_unpacked_to_packed_bb.cc \ - gr_unpacked_to_packed_ii.cc \ - gr_unpacked_to_packed_ss.cc \ - gr_vector_sink_b.cc \ - gr_vector_sink_c.cc \ - gr_vector_sink_f.cc \ - gr_vector_sink_i.cc \ - gr_vector_sink_s.cc \ - gr_vector_source_b.cc \ - gr_vector_source_c.cc \ - gr_vector_source_f.cc \ - gr_vector_source_i.cc \ - gr_vector_source_s.cc - diff --git a/gnuradio-core/src/lib/gengen/Makefile.am b/gnuradio-core/src/lib/gengen/Makefile.am index 13c821018..db7bee02f 100644 --- a/gnuradio-core/src/lib/gengen/Makefile.am +++ b/gnuradio-core/src/lib/gengen/Makefile.am @@ -38,9 +38,6 @@ core_generator = \ gr_add_const_XX.cc.t \ gr_add_const_XX.h.t \ gr_add_const_XX.i.t \ - gr_add_vXX.cc.t \ - gr_add_vXX.h.t \ - gr_add_vXX.i.t \ gr_add_const_vXX.cc.t \ gr_add_const_vXX.h.t \ gr_add_const_vXX.i.t \ @@ -65,9 +62,6 @@ core_generator = \ gr_multiply_const_XX.cc.t \ gr_multiply_const_XX.h.t \ gr_multiply_const_XX.i.t \ - gr_multiply_vXX.cc.t \ - gr_multiply_vXX.h.t \ - gr_multiply_vXX.i.t \ gr_multiply_const_vXX.cc.t \ gr_multiply_const_vXX.h.t \ gr_multiply_const_vXX.i.t \ diff --git a/gnuradio-core/src/lib/gengen/Makefile.gen b/gnuradio-core/src/lib/gengen/Makefile.gen index 9ffb00ed2..1c529803c 100644 --- a/gnuradio-core/src/lib/gengen/Makefile.gen +++ b/gnuradio-core/src/lib/gengen/Makefile.gen @@ -15,10 +15,6 @@ GENERATED_H = \ gr_add_ff.h \ gr_add_ii.h \ gr_add_ss.h \ - gr_add_vcc.h \ - gr_add_vff.h \ - gr_add_vii.h \ - gr_add_vss.h \ gr_and_bb.h \ gr_and_const_bb.h \ gr_and_const_ii.h \ @@ -61,10 +57,6 @@ GENERATED_H = \ gr_multiply_ff.h \ gr_multiply_ii.h \ gr_multiply_ss.h \ - gr_multiply_vcc.h \ - gr_multiply_vff.h \ - gr_multiply_vii.h \ - gr_multiply_vss.h \ gr_mute_cc.h \ gr_mute_ff.h \ gr_mute_ii.h \ @@ -128,10 +120,6 @@ GENERATED_I = \ gr_add_ff.i \ gr_add_ii.i \ gr_add_ss.i \ - gr_add_vcc.i \ - gr_add_vff.i \ - gr_add_vii.i \ - gr_add_vss.i \ gr_and_bb.i \ gr_and_const_bb.i \ gr_and_const_ii.i \ @@ -174,10 +162,6 @@ GENERATED_I = \ gr_multiply_ff.i \ gr_multiply_ii.i \ gr_multiply_ss.i \ - gr_multiply_vcc.i \ - gr_multiply_vff.i \ - gr_multiply_vii.i \ - gr_multiply_vss.i \ gr_mute_cc.i \ gr_mute_ff.i \ gr_mute_ii.i \ @@ -241,10 +225,6 @@ GENERATED_CC = \ gr_add_ff.cc \ gr_add_ii.cc \ gr_add_ss.cc \ - gr_add_vcc.cc \ - gr_add_vff.cc \ - gr_add_vii.cc \ - gr_add_vss.cc \ gr_and_bb.cc \ gr_and_const_bb.cc \ gr_and_const_ii.cc \ @@ -287,10 +267,6 @@ GENERATED_CC = \ gr_multiply_ff.cc \ gr_multiply_ii.cc \ gr_multiply_ss.cc \ - gr_multiply_vcc.cc \ - gr_multiply_vff.cc \ - gr_multiply_vii.cc \ - gr_multiply_vss.cc \ gr_mute_cc.cc \ gr_mute_ff.cc \ gr_mute_ii.cc \ diff --git a/gnuradio-core/src/lib/gengen/generate_common.py b/gnuradio-core/src/lib/gengen/generate_common.py index 992e2c0da..9bd6bcc9c 100755 --- a/gnuradio-core/src/lib/gengen/generate_common.py +++ b/gnuradio-core/src/lib/gengen/generate_common.py @@ -47,8 +47,6 @@ reg_roots = [ 'gr_multiply_XX', 'gr_divide_XX', 'gr_mute_XX', - 'gr_add_vXX', - 'gr_multiply_vXX', 'gr_add_const_vXX', 'gr_multiply_const_vXX', 'gr_integrate_XX', diff --git a/gnuradio-core/src/lib/gengen/gr_add_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_add_XX.cc.t index d29c9b40a..2e44c5ea7 100644 --- a/gnuradio-core/src/lib/gengen/gr_add_XX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_add_XX.cc.t @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2004 Free Software Foundation, Inc. + * Copyright 2004, 2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -30,15 +30,16 @@ #include <gr_io_signature.h> @SPTR_NAME@ -gr_make_@BASE_NAME@ () +gr_make_@BASE_NAME@ (size_t vlen) { - return @SPTR_NAME@ (new @NAME@ ()); + return @SPTR_NAME@ (new @NAME@ (vlen)); } -@NAME@::@NAME@ () +@NAME@::@NAME@ (size_t vlen) : gr_sync_block ("@BASE_NAME@", - gr_make_io_signature (1, -1, sizeof (@I_TYPE@)), - gr_make_io_signature (1, 1, sizeof (@O_TYPE@))) + gr_make_io_signature (1, -1, sizeof (@I_TYPE@)*vlen), + gr_make_io_signature (1, 1, sizeof (@O_TYPE@)*vlen)), + d_vlen (vlen) { } @@ -51,7 +52,7 @@ int int ninputs = input_items.size (); - for (int i = 0; i < noutput_items; i++){ + for (int i = 0; i < noutput_items*d_vlen; i++){ @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i]; for (int j = 1; j < ninputs; j++) acc += ((@I_TYPE@ *) input_items[j])[i]; diff --git a/gnuradio-core/src/lib/gengen/gr_add_XX.h.t b/gnuradio-core/src/lib/gengen/gr_add_XX.h.t index 6bfcef072..20c042c8e 100644 --- a/gnuradio-core/src/lib/gengen/gr_add_XX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_add_XX.h.t @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2004 Free Software Foundation, Inc. + * Copyright 2004, 2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -30,7 +30,7 @@ class @NAME@; typedef boost::shared_ptr<@NAME@> @SPTR_NAME@; -@SPTR_NAME@ gr_make_@BASE_NAME@ (); +@SPTR_NAME@ gr_make_@BASE_NAME@ (size_t vlen = 1); /*! * \brief output = sum (input_0, input_1, ...) @@ -40,9 +40,11 @@ typedef boost::shared_ptr<@NAME@> @SPTR_NAME@; */ class @NAME@ : public gr_sync_block { - friend @SPTR_NAME@ gr_make_@BASE_NAME@ (); + friend @SPTR_NAME@ gr_make_@BASE_NAME@ (size_t vlen); - @NAME@ (); + @NAME@ (size_t vlen); + + size_t d_vlen; public: diff --git a/gnuradio-core/src/lib/gengen/gr_add_XX.i.t b/gnuradio-core/src/lib/gengen/gr_add_XX.i.t index a4bc4ce67..f7726ccf6 100644 --- a/gnuradio-core/src/lib/gengen/gr_add_XX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_add_XX.i.t @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2004 Free Software Foundation, Inc. + * Copyright 2004, 2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -24,10 +24,10 @@ GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@) -@SPTR_NAME@ gr_make_@BASE_NAME@ (); +@SPTR_NAME@ gr_make_@BASE_NAME@ (size_t vlen = 1); class @NAME@ : public gr_sync_block { private: - @NAME@ (); + @NAME@ (size_t vlen); }; diff --git a/gnuradio-core/src/lib/gengen/gr_add_vXX.cc.t b/gnuradio-core/src/lib/gengen/gr_add_vXX.cc.t deleted file mode 100755 index 10b420ff9..000000000 --- a/gnuradio-core/src/lib/gengen/gr_add_vXX.cc.t +++ /dev/null @@ -1,65 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -// @WARNING@ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <@NAME@.h> -#include <gr_io_signature.h> - -@SPTR_NAME@ -gr_make_@BASE_NAME@ (size_t nitems_per_block) -{ - return @SPTR_NAME@ (new @NAME@ (nitems_per_block)); -} - -@NAME@::@NAME@ (size_t nitems_per_block) - : gr_sync_block ("@BASE_NAME@", - gr_make_io_signature (1, -1, sizeof (@I_TYPE@)*nitems_per_block), - gr_make_io_signature (1, 1, sizeof (@O_TYPE@)*nitems_per_block)) -{ -} - -int -@NAME@::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0]; - - int ninputs = input_items.size (); - int nitems_per_block = output_signature()->sizeof_stream_item(0)/sizeof(@I_TYPE@); - - for (int i = 0; i < noutput_items; i++){ - for (int j = 0; j < nitems_per_block; j++){ - @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i*nitems_per_block+j]; - for (int k = 1; k < ninputs; k++) - acc += ((@I_TYPE@ *) input_items[k])[i*nitems_per_block+j]; - - *optr++ = (@O_TYPE@) acc; - } - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_add_vXX.h.t b/gnuradio-core/src/lib/gengen/gr_add_vXX.h.t deleted file mode 100755 index 595195bba..000000000 --- a/gnuradio-core/src/lib/gengen/gr_add_vXX.h.t +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -// @WARNING@ - -#ifndef @GUARD_NAME@ -#define @GUARD_NAME@ - -#include <gr_sync_block.h> - -class @NAME@; -typedef boost::shared_ptr<@NAME@> @SPTR_NAME@; - -@SPTR_NAME@ gr_make_@BASE_NAME@ (size_t nitems_per_block); - -/*! - * \brief output = sum (input_0, input_1, ...) - * \ingroup math - * - * Add across all input vectors. - */ -class @NAME@ : public gr_sync_block -{ - friend @SPTR_NAME@ gr_make_@BASE_NAME@ (size_t nitems_per_block); - - @NAME@ (size_t nitems_per_block); - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_add_vXX.i.t b/gnuradio-core/src/lib/gengen/gr_add_vXX.i.t deleted file mode 100755 index 34e978281..000000000 --- a/gnuradio-core/src/lib/gengen/gr_add_vXX.i.t +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -// @WARNING@ - -GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@) - -@SPTR_NAME@ gr_make_@BASE_NAME@ (size_t nitems_per_block); - -class @NAME@ : public gr_sync_block -{ - private: - @NAME@ (size_t nitems_per_block); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_multiply_XX.cc.t index 200013511..000c5e0bd 100644 --- a/gnuradio-core/src/lib/gengen/gr_multiply_XX.cc.t +++ b/gnuradio-core/src/lib/gengen/gr_multiply_XX.cc.t @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2004 Free Software Foundation, Inc. + * Copyright 2004, 2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -30,15 +30,16 @@ #include <gr_io_signature.h> @SPTR_NAME@ -gr_make_@BASE_NAME@ () +gr_make_@BASE_NAME@ (size_t vlen) { - return @SPTR_NAME@ (new @NAME@ ()); + return @SPTR_NAME@ (new @NAME@ (vlen)); } -@NAME@::@NAME@ () +@NAME@::@NAME@ (size_t vlen) : gr_sync_block ("@BASE_NAME@", - gr_make_io_signature (1, -1, sizeof (@I_TYPE@)), - gr_make_io_signature (1, 1, sizeof (@O_TYPE@))) + gr_make_io_signature (1, -1, sizeof (@I_TYPE@)*vlen), + gr_make_io_signature (1, 1, sizeof (@O_TYPE@)*vlen)), + d_vlen (vlen) { } @@ -51,7 +52,7 @@ int int ninputs = input_items.size (); - for (int i = 0; i < noutput_items; i++){ + for (int i = 0; i < noutput_items*d_vlen; i++){ @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i]; for (int j = 1; j < ninputs; j++) acc *= ((@I_TYPE@ *) input_items[j])[i]; diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_XX.h.t b/gnuradio-core/src/lib/gengen/gr_multiply_XX.h.t index 409825871..f7cd9b138 100644 --- a/gnuradio-core/src/lib/gengen/gr_multiply_XX.h.t +++ b/gnuradio-core/src/lib/gengen/gr_multiply_XX.h.t @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2004 Free Software Foundation, Inc. + * Copyright 2004, 2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -30,7 +30,7 @@ class @NAME@; typedef boost::shared_ptr<@NAME@> @SPTR_NAME@; -@SPTR_NAME@ gr_make_@BASE_NAME@ (); +@SPTR_NAME@ gr_make_@BASE_NAME@ (size_t vlen = 1); /*! * \brief output = prod (input_0, input_1, ...) @@ -40,9 +40,11 @@ typedef boost::shared_ptr<@NAME@> @SPTR_NAME@; */ class @NAME@ : public gr_sync_block { - friend @SPTR_NAME@ gr_make_@BASE_NAME@ (); + friend @SPTR_NAME@ gr_make_@BASE_NAME@ (size_t vlen); - @NAME@ (); + @NAME@ (size_t vlen); + + size_t d_vlen; public: diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_XX.i.t b/gnuradio-core/src/lib/gengen/gr_multiply_XX.i.t index a4bc4ce67..f7726ccf6 100644 --- a/gnuradio-core/src/lib/gengen/gr_multiply_XX.i.t +++ b/gnuradio-core/src/lib/gengen/gr_multiply_XX.i.t @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2004 Free Software Foundation, Inc. + * Copyright 2004, 2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -24,10 +24,10 @@ GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@) -@SPTR_NAME@ gr_make_@BASE_NAME@ (); +@SPTR_NAME@ gr_make_@BASE_NAME@ (size_t vlen = 1); class @NAME@ : public gr_sync_block { private: - @NAME@ (); + @NAME@ (size_t vlen); }; diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_vXX.cc.t b/gnuradio-core/src/lib/gengen/gr_multiply_vXX.cc.t deleted file mode 100755 index 2aff6f685..000000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_vXX.cc.t +++ /dev/null @@ -1,65 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -// @WARNING@ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <@NAME@.h> -#include <gr_io_signature.h> - -@SPTR_NAME@ -gr_make_@BASE_NAME@ (size_t nitems_per_block) -{ - return @SPTR_NAME@ (new @NAME@ (nitems_per_block)); -} - -@NAME@::@NAME@ (size_t nitems_per_block) - : gr_sync_block ("@BASE_NAME@", - gr_make_io_signature (1, -1, sizeof (@I_TYPE@)*nitems_per_block), - gr_make_io_signature (1, 1, sizeof (@O_TYPE@)*nitems_per_block)) -{ -} - -int -@NAME@::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0]; - - int ninputs = input_items.size (); - int nitems_per_block = output_signature()->sizeof_stream_item(0)/sizeof(@I_TYPE@); - - for (int i = 0; i < noutput_items; i++){ - for (int j = 0; j < nitems_per_block; j++){ - @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i*nitems_per_block+j]; - for (int k = 1; k < ninputs; k++) - acc *= ((@I_TYPE@ *) input_items[k])[i*nitems_per_block+j]; - - *optr++ = (@O_TYPE@) acc; - } - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_vXX.h.t b/gnuradio-core/src/lib/gengen/gr_multiply_vXX.h.t deleted file mode 100755 index 41feeddcc..000000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_vXX.h.t +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -// @WARNING@ - -#ifndef @GUARD_NAME@ -#define @GUARD_NAME@ - -#include <gr_sync_block.h> - -class @NAME@; -typedef boost::shared_ptr<@NAME@> @SPTR_NAME@; - -@SPTR_NAME@ gr_make_@BASE_NAME@ (size_t nitems_per_block); - -/*! - * \brief output = prod (input_0, input_1, ...) - * \ingroup math - * - * Element-wise multiply across all input vectors. - */ -class @NAME@ : public gr_sync_block -{ - friend @SPTR_NAME@ gr_make_@BASE_NAME@ (size_t nitems_per_block); - - @NAME@ (size_t nitems_per_block); - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_vXX.i.t b/gnuradio-core/src/lib/gengen/gr_multiply_vXX.i.t deleted file mode 100755 index 34e978281..000000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_vXX.i.t +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -// @WARNING@ - -GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@) - -@SPTR_NAME@ gr_make_@BASE_NAME@ (size_t nitems_per_block); - -class @NAME@ : public gr_sync_block -{ - private: - @NAME@ (size_t nitems_per_block); -}; diff --git a/gnuradio-core/src/python/gnuradio/gr/__init__.py b/gnuradio-core/src/python/gnuradio/gr/__init__.py index 249328156..6f939c470 100644 --- a/gnuradio-core/src/python/gnuradio/gr/__init__.py +++ b/gnuradio-core/src/python/gnuradio/gr/__init__.py @@ -1,5 +1,5 @@ # -# Copyright 2003,2004,2006,2008 Free Software Foundation, Inc. +# Copyright 2003,2004,2006,2008,2009 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -55,3 +55,12 @@ parallel_to_serial = vector_to_stream # Force the preference database to be initialized from prefs import prefs +#alias old gr_add_vXX and gr_multiply_vXX +add_vcc = add_cc +add_vff = add_ff +add_vii = add_ii +add_vss = add_ss +multiply_vcc = multiply_cc +multiply_vff = multiply_ff +multiply_vii = multiply_ii +multiply_vss = multiply_ss diff --git a/grc/data/platforms/python/block_tree.xml b/grc/data/platforms/python/block_tree.xml index 7e13aaff6..4e6ff01c4 100644 --- a/grc/data/platforms/python/block_tree.xml +++ b/grc/data/platforms/python/block_tree.xml @@ -42,9 +42,9 @@ </cat> <cat> <name>Operators</name> - <block>gr_add_vxx</block> + <block>gr_add_xx</block> <block>gr_sub_xx</block> - <block>gr_multiply_vxx</block> + <block>gr_multiply_xx</block> <block>gr_divide_xx</block> <block>gr_nlog10_ff</block> diff --git a/grc/data/platforms/python/blocks/Makefile.am b/grc/data/platforms/python/blocks/Makefile.am index 506648d45..a97266fba 100644 --- a/grc/data/platforms/python/blocks/Makefile.am +++ b/grc/data/platforms/python/blocks/Makefile.am @@ -59,7 +59,7 @@ dist_ourdata_DATA = \ blks2_wfm_tx.xml \ const_source_x.xml \ gr_add_const_vxx.xml \ - gr_add_vxx.xml \ + gr_add_xx.xml \ gr_agc2_xx.xml \ gr_agc_xx.xml \ gr_and_xx.xml \ @@ -124,7 +124,7 @@ dist_ourdata_DATA = \ gr_mpsk_receiver_cc.xml \ gr_mpsk_sync_cc.xml \ gr_multiply_const_vxx.xml \ - gr_multiply_vxx.xml \ + gr_multiply_xx.xml \ gr_mute_xx.xml \ gr_nlog10_ff.xml \ gr_noise_source_x.xml \ diff --git a/grc/data/platforms/python/blocks/gr_add_vxx.xml b/grc/data/platforms/python/blocks/gr_add_xx.xml index 479cdaae4..97ed9283c 100644 --- a/grc/data/platforms/python/blocks/gr_add_vxx.xml +++ b/grc/data/platforms/python/blocks/gr_add_xx.xml @@ -7,7 +7,7 @@ --> <block> <name>Add</name> - <key>gr_add_vxx</key> + <key>gr_add_xx</key> <import>from gnuradio import gr</import> <make>gr.add_v$(type.fcn)($vlen)</make> <param> diff --git a/grc/data/platforms/python/blocks/gr_multiply_vxx.xml b/grc/data/platforms/python/blocks/gr_multiply_xx.xml index ea0d555b6..60f65c274 100644 --- a/grc/data/platforms/python/blocks/gr_multiply_vxx.xml +++ b/grc/data/platforms/python/blocks/gr_multiply_xx.xml @@ -7,7 +7,7 @@ --> <block> <name>Multiply</name> - <key>gr_multiply_vxx</key> + <key>gr_multiply_xx</key> <import>from gnuradio import gr</import> <make>gr.multiply_v$(type.fcn)($vlen)</make> <param> diff --git a/grc/examples/audio/dial_tone.grc b/grc/examples/audio/dial_tone.grc index 6f96d9748..ac8cbef27 100644 --- a/grc/examples/audio/dial_tone.grc +++ b/grc/examples/audio/dial_tone.grc @@ -45,10 +45,10 @@ </param> </block> <block> - <key>gr_add_vxx</key> + <key>gr_add_xx</key> <param> <key>id</key> - <value>gr_add_vxx</value> + <value>gr_add_xx</value> </param> <param> <key>_enabled</key> @@ -350,26 +350,26 @@ </block> <connection> <source_block_id>gr_sig_source_x0</source_block_id> - <sink_block_id>gr_add_vxx</sink_block_id> + <sink_block_id>gr_add_xx</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> <source_block_id>gr_sig_source_x</source_block_id> - <sink_block_id>gr_add_vxx</sink_block_id> + <sink_block_id>gr_add_xx</sink_block_id> <source_key>0</source_key> <sink_key>1</sink_key> </connection> <connection> <source_block_id>gr_noise_source_x</source_block_id> - <sink_block_id>gr_add_vxx</sink_block_id> + <sink_block_id>gr_add_xx</sink_block_id> <source_key>0</source_key> <sink_key>2</sink_key> </connection> <connection> - <source_block_id>gr_add_vxx</source_block_id> + <source_block_id>gr_add_xx</source_block_id> <sink_block_id>audio_sink</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> -</flow_graph>
\ No newline at end of file +</flow_graph> diff --git a/grc/examples/simple/ber_simulation.grc b/grc/examples/simple/ber_simulation.grc index 8d7d74565..618add29c 100644 --- a/grc/examples/simple/ber_simulation.grc +++ b/grc/examples/simple/ber_simulation.grc @@ -422,10 +422,10 @@ </param> </block> <block> - <key>gr_add_vxx</key> + <key>gr_add_xx</key> <param> <key>id</key> - <value>gr_add_vxx</value> + <value>gr_add_xx</value> </param> <param> <key>_enabled</key> @@ -526,20 +526,20 @@ <sink_key>1</sink_key> </connection> <connection> - <source_block_id>gr_add_vxx</source_block_id> + <source_block_id>gr_add_xx</source_block_id> <sink_block_id>gr_constellation_decoder_cb</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> <source_block_id>gr_chunks_to_symbols_xx</source_block_id> - <sink_block_id>gr_add_vxx</sink_block_id> + <sink_block_id>gr_add_xx</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> <source_block_id>gr_noise_source_x</source_block_id> - <sink_block_id>gr_add_vxx</sink_block_id> + <sink_block_id>gr_add_xx</sink_block_id> <source_key>0</source_key> <sink_key>1</sink_key> </connection> @@ -556,7 +556,7 @@ <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_add_vxx</source_block_id> + <source_block_id>gr_add_xx</source_block_id> <sink_block_id>wxgui_scopesink2_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> diff --git a/grc/examples/trellis/interference_cancellation.grc b/grc/examples/trellis/interference_cancellation.grc index 32e09f7f0..e93babd78 100644 --- a/grc/examples/trellis/interference_cancellation.grc +++ b/grc/examples/trellis/interference_cancellation.grc @@ -384,10 +384,10 @@ </param> </block> <block> - <key>gr_add_vxx</key> + <key>gr_add_xx</key> <param> <key>id</key> - <value>gr_add_vxx_0</value> + <value>gr_add_xx_0</value> </param> <param> <key>_enabled</key> @@ -481,10 +481,10 @@ </param> </block> <block> - <key>gr_multiply_vxx</key> + <key>gr_multiply_xx</key> <param> <key>id</key> - <value>gr_multiply_vxx_0</value> + <value>gr_multiply_xx_0</value> </param> <param> <key>_enabled</key> @@ -562,10 +562,10 @@ </param> </block> <block> - <key>gr_multiply_vxx</key> + <key>gr_multiply_xx</key> <param> <key>id</key> - <value>gr_multiply_vxx_1</value> + <value>gr_multiply_xx_1</value> </param> <param> <key>_enabled</key> @@ -740,10 +740,10 @@ </param> </block> <block> - <key>gr_multiply_vxx</key> + <key>gr_multiply_xx</key> <param> <key>id</key> - <value>gr_multiply_vxx_2</value> + <value>gr_multiply_xx_2</value> </param> <param> <key>_enabled</key> @@ -918,10 +918,10 @@ </param> </block> <block> - <key>gr_multiply_vxx</key> + <key>gr_multiply_xx</key> <param> <key>id</key> - <value>gr_multiply_vxx_2_0</value> + <value>gr_multiply_xx_2_0</value> </param> <param> <key>_enabled</key> @@ -1607,10 +1607,10 @@ </param> </block> <block> - <key>gr_add_vxx</key> + <key>gr_add_xx</key> <param> <key>id</key> - <value>gr_add_vxx_1</value> + <value>gr_add_xx_1</value> </param> <param> <key>_enabled</key> @@ -1801,19 +1801,19 @@ </connection> <connection> <source_block_id>gr_multiply_const_vxx_0</source_block_id> - <sink_block_id>gr_add_vxx_0</sink_block_id> + <sink_block_id>gr_add_xx_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_add_vxx_0</source_block_id> - <sink_block_id>gr_add_vxx_1</sink_block_id> + <source_block_id>gr_add_xx_0</source_block_id> + <sink_block_id>gr_add_xx_1</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> <source_block_id>gr_noise_source_x_0</source_block_id> - <sink_block_id>gr_add_vxx_1</sink_block_id> + <sink_block_id>gr_add_xx_1</sink_block_id> <source_key>0</source_key> <sink_key>1</sink_key> </connection> @@ -1825,24 +1825,24 @@ </connection> <connection> <source_block_id>gr_multiply_const_vxx_1</source_block_id> - <sink_block_id>gr_add_vxx_0</sink_block_id> + <sink_block_id>gr_add_xx_0</sink_block_id> <source_key>0</source_key> <sink_key>1</sink_key> </connection> <connection> <source_block_id>gr_sub_xx_0</source_block_id> - <sink_block_id>gr_multiply_vxx_0</sink_block_id> + <sink_block_id>gr_multiply_xx_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> <source_block_id>gr_sub_xx_0</source_block_id> - <sink_block_id>gr_multiply_vxx_0</sink_block_id> + <sink_block_id>gr_multiply_xx_0</sink_block_id> <source_key>0</source_key> <sink_key>1</sink_key> </connection> <connection> - <source_block_id>gr_multiply_vxx_0</source_block_id> + <source_block_id>gr_multiply_xx_0</source_block_id> <sink_block_id>gr_short_to_float_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> @@ -1854,7 +1854,7 @@ <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_multiply_vxx_2</source_block_id> + <source_block_id>gr_multiply_xx_2</source_block_id> <sink_block_id>gr_short_to_float_1</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> @@ -1866,7 +1866,7 @@ <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_add_vxx_1</source_block_id> + <source_block_id>gr_add_xx_1</source_block_id> <sink_block_id>trellis_viterbi_combined_xx_1</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> @@ -1897,13 +1897,13 @@ </connection> <connection> <source_block_id>gr_sub_xx_1</source_block_id> - <sink_block_id>gr_multiply_vxx_2</sink_block_id> + <sink_block_id>gr_multiply_xx_2</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> <source_block_id>gr_sub_xx_1</source_block_id> - <sink_block_id>gr_multiply_vxx_2</sink_block_id> + <sink_block_id>gr_multiply_xx_2</sink_block_id> <source_key>0</source_key> <sink_key>1</sink_key> </connection> @@ -1914,7 +1914,7 @@ <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_add_vxx_1</source_block_id> + <source_block_id>gr_add_xx_1</source_block_id> <sink_block_id>gr_sub_xx_2</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> @@ -1944,7 +1944,7 @@ <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_multiply_vxx_1</source_block_id> + <source_block_id>gr_multiply_xx_1</source_block_id> <sink_block_id>gr_short_to_float_2</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> @@ -1963,18 +1963,18 @@ </connection> <connection> <source_block_id>gr_sub_xx_3</source_block_id> - <sink_block_id>gr_multiply_vxx_1</sink_block_id> + <sink_block_id>gr_multiply_xx_1</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> <source_block_id>gr_sub_xx_3</source_block_id> - <sink_block_id>gr_multiply_vxx_1</sink_block_id> + <sink_block_id>gr_multiply_xx_1</sink_block_id> <source_key>0</source_key> <sink_key>1</sink_key> </connection> <connection> - <source_block_id>gr_add_vxx_1</source_block_id> + <source_block_id>gr_add_xx_1</source_block_id> <sink_block_id>trellis_viterbi_combined_xx_2</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> @@ -2010,7 +2010,7 @@ <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_multiply_vxx_2_0</source_block_id> + <source_block_id>gr_multiply_xx_2_0</source_block_id> <sink_block_id>gr_short_to_float_1_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> @@ -2023,13 +2023,13 @@ </connection> <connection> <source_block_id>gr_sub_xx_1_0</source_block_id> - <sink_block_id>gr_multiply_vxx_2_0</sink_block_id> + <sink_block_id>gr_multiply_xx_2_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> <source_block_id>gr_sub_xx_1_0</source_block_id> - <sink_block_id>gr_multiply_vxx_2_0</sink_block_id> + <sink_block_id>gr_multiply_xx_2_0</sink_block_id> <source_key>0</source_key> <sink_key>1</sink_key> </connection> @@ -2046,7 +2046,7 @@ <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_add_vxx_1</source_block_id> + <source_block_id>gr_add_xx_1</source_block_id> <sink_block_id>gr_sub_xx_2_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> @@ -2064,7 +2064,7 @@ <sink_key>1</sink_key> </connection> <connection> - <source_block_id>gr_add_vxx_1</source_block_id> + <source_block_id>gr_add_xx_1</source_block_id> <sink_block_id>wxgui_scopesink2_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> diff --git a/grc/examples/usrp/usrp_two_tone_loopback.grc b/grc/examples/usrp/usrp_two_tone_loopback.grc index 30f5409b3..e3c635d46 100644 --- a/grc/examples/usrp/usrp_two_tone_loopback.grc +++ b/grc/examples/usrp/usrp_two_tone_loopback.grc @@ -479,10 +479,10 @@ </param> </block> <block> - <key>gr_add_vxx</key> + <key>gr_add_xx</key> <param> <key>id</key> - <value>gr_add_vxx</value> + <value>gr_add_xx</value> </param> <param> <key>_enabled</key> @@ -613,19 +613,19 @@ </block> <connection> <source_block_id>gr_sig_source_x</source_block_id> - <sink_block_id>gr_add_vxx</sink_block_id> + <sink_block_id>gr_add_xx</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> <source_block_id>gr_sig_source_x0</source_block_id> - <sink_block_id>gr_add_vxx</sink_block_id> + <sink_block_id>gr_add_xx</sink_block_id> <source_key>0</source_key> <sink_key>1</sink_key> </connection> <connection> <source_block_id>gr_noise_source_x</source_block_id> - <sink_block_id>gr_add_vxx</sink_block_id> + <sink_block_id>gr_add_xx</sink_block_id> <source_key>0</source_key> <sink_key>2</sink_key> </connection> @@ -636,9 +636,9 @@ <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_add_vxx</source_block_id> + <source_block_id>gr_add_xx</source_block_id> <sink_block_id>usrp_simple_sink_x</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> -</flow_graph>
\ No newline at end of file +</flow_graph> diff --git a/grc/src/utils/converter.py b/grc/src/utils/converter.py index 36cdd065f..34fc438fd 100644 --- a/grc/src/utils/converter.py +++ b/grc/src/utils/converter.py @@ -81,10 +81,10 @@ def convert(file_path, platform): #convert instances of gui_coordinate and gui_rotation xml = etree.parse(file_path) for find, replace in ( - ('gui_coordinate', '_coordinate'), - ('gui_rotation', '_rotation'), + ('gr_add_vxx', 'gr_add_xx'), + ('gr_multiply_vxx', 'gr_multiply_xx'), ): - keys = xml.xpath('/flow_graph/block/param[key="%s"]/key'%find) + keys = xml.xpath('/flow_graph/block[key="%s"]/key'%find) for key in keys: key.text = replace changed = True |