diff options
Diffstat (limited to 'gnuradio-core/src/lib/general')
-rw-r--r-- | gnuradio-core/src/lib/general/CMakeLists.txt | 4 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/general.i | 6 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/general_generated.i | 12 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_delay.cc | 129 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_delay.h | 61 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_delay.i | 35 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_log2_const.h | 47 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_rms_cf.cc | 71 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_rms_cf.h | 61 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_rms_cf.i | 33 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_rms_ff.cc | 71 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_rms_ff.h | 61 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_rms_ff.i | 33 |
13 files changed, 0 insertions, 624 deletions
diff --git a/gnuradio-core/src/lib/general/CMakeLists.txt b/gnuradio-core/src/lib/general/CMakeLists.txt index c562224009..de75dee7b8 100644 --- a/gnuradio-core/src/lib/general/CMakeLists.txt +++ b/gnuradio-core/src/lib/general/CMakeLists.txt @@ -105,7 +105,6 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/gr_fxpt.h ${CMAKE_CURRENT_SOURCE_DIR}/gr_fxpt_nco.h ${CMAKE_CURRENT_SOURCE_DIR}/gr_fxpt_vco.h - ${CMAKE_CURRENT_SOURCE_DIR}/gr_log2_const.h ${CMAKE_CURRENT_SOURCE_DIR}/gr_math.h ${CMAKE_CURRENT_SOURCE_DIR}/gr_misc.h ${CMAKE_CURRENT_SOURCE_DIR}/gr_nco.h @@ -152,7 +151,6 @@ set(gr_core_general_triple_threats gr_complex_to_interleaved_short gr_complex_to_xxx gr_copy - gr_delay gr_endian_swap gr_fake_channel_coder_pp gr_feval @@ -170,8 +168,6 @@ set(gr_core_general_triple_threats gr_random_pdu gr_regenerate_bb gr_remez - gr_rms_cf - gr_rms_ff gr_skiphead gr_stretch_ff gr_test diff --git a/gnuradio-core/src/lib/general/general.i b/gnuradio-core/src/lib/general/general.i index 53dcac6fb6..092582475d 100644 --- a/gnuradio-core/src/lib/general/general.i +++ b/gnuradio-core/src/lib/general/general.i @@ -38,10 +38,7 @@ //#include <gr_endianness.h> #include <gr_endian_swap.h> #include <gr_firdes.h> -#include <gr_delay.h> #include <gr_random_pdu.h> -#include <gr_rms_cf.h> -#include <gr_rms_ff.h> #include <gr_fake_channel_coder_pp.h> #include <gr_throttle.h> #include <gr_transcendental.h> @@ -87,10 +84,7 @@ //%include "gr_endianness.i" %include "gr_endian_swap.i" %include "gr_firdes.i" -%include "gr_delay.i" %include "gr_random_pdu.i" -%include "gr_rms_cf.i" -%include "gr_rms_ff.i" %include "gr_fake_channel_coder_pp.i" %include "gr_throttle.i" %include "gr_transcendental.i" diff --git a/gnuradio-core/src/lib/general/general_generated.i b/gnuradio-core/src/lib/general/general_generated.i index 251406c99e..900237214e 100644 --- a/gnuradio-core/src/lib/general/general_generated.i +++ b/gnuradio-core/src/lib/general/general_generated.i @@ -6,9 +6,6 @@ #include <gr_mute_ff.h> #include <gr_mute_ii.h> #include <gr_mute_ss.h> -#include <gr_packed_to_unpacked_bb.h> -#include <gr_packed_to_unpacked_ii.h> -#include <gr_packed_to_unpacked_ss.h> #include <gr_probe_signal_b.h> #include <gr_probe_signal_s.h> #include <gr_probe_signal_i.h> @@ -19,9 +16,6 @@ #include <gr_probe_signal_vi.h> #include <gr_probe_signal_vf.h> #include <gr_probe_signal_vc.h> -#include <gr_unpacked_to_packed_bb.h> -#include <gr_unpacked_to_packed_ii.h> -#include <gr_unpacked_to_packed_ss.h> #include <gr_vector_sink_b.h> #include <gr_vector_sink_c.h> #include <gr_vector_sink_f.h> @@ -38,9 +32,6 @@ %include <gr_mute_ff.i> %include <gr_mute_ii.i> %include <gr_mute_ss.i> -%include <gr_packed_to_unpacked_bb.i> -%include <gr_packed_to_unpacked_ii.i> -%include <gr_packed_to_unpacked_ss.i> %include <gr_probe_signal_b.i> %include <gr_probe_signal_s.i> %include <gr_probe_signal_i.i> @@ -51,9 +42,6 @@ %include <gr_probe_signal_vi.i> %include <gr_probe_signal_vf.i> %include <gr_probe_signal_vc.i> -%include <gr_unpacked_to_packed_bb.i> -%include <gr_unpacked_to_packed_ii.i> -%include <gr_unpacked_to_packed_ss.i> %include <gr_vector_sink_b.i> %include <gr_vector_sink_c.i> %include <gr_vector_sink_f.i> diff --git a/gnuradio-core/src/lib/general/gr_delay.cc b/gnuradio-core/src/lib/general/gr_delay.cc deleted file mode 100644 index 8f728948df..0000000000 --- a/gnuradio-core/src/lib/general/gr_delay.cc +++ /dev/null @@ -1,129 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007,2010,2012 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <gr_delay.h> -#include <gr_io_signature.h> -#include <string.h> - -gr_delay_sptr -gr_make_delay (size_t itemsize, int delay) -{ - return gnuradio::get_initial_sptr(new gr_delay (itemsize, delay)); -} - -gr_delay::gr_delay (size_t itemsize, int delay) - : gr_block ("delay", - gr_make_io_signature (1, -1, itemsize), - gr_make_io_signature (1, -1, itemsize)), - d_itemsize(itemsize) -{ - set_delay(delay); - d_delta = 0; -} - -void -gr_delay::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - // make sure all inputs have noutput_items available - unsigned ninputs = ninput_items_required.size (); - for (unsigned i = 0; i < ninputs; i++) - ninput_items_required[i] = noutput_items; -} - -void -gr_delay::set_delay (int d) -{ - // only set a new delta if there is a change in the delay; this - // protects from quickly-repeated calls to this function that would - // end with d_delta=0. - if(d != delay()) { - gruel::scoped_lock l(d_mutex_delay); - int old = delay(); - set_history(d+1); - d_delta += delay() - old; - } -} - -int -gr_delay::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - gruel::scoped_lock l(d_mutex_delay); - assert(input_items.size() == output_items.size()); - - const char *iptr; - char *optr; - int cons, ret; - - // No change in delay; just memcpy ins to outs - if(d_delta == 0) { - for(size_t i = 0; i < input_items.size(); i++) { - iptr = (const char *) input_items[i]; - optr = (char *) output_items[i]; - std::memcpy(optr, iptr, noutput_items*d_itemsize); - } - cons = noutput_items; - ret = noutput_items; - } - - // Skip over d_delta items on the input - else if(d_delta < 0) { - int n_to_copy, n_adj; - int delta = -d_delta; - n_to_copy = std::max(0, noutput_items-delta); - n_adj = std::min(delta, noutput_items); - for(size_t i = 0; i < input_items.size(); i++) { - iptr = (const char *) input_items[i]; - optr = (char *) output_items[i]; - std::memcpy(optr, iptr+delta*d_itemsize, n_to_copy*d_itemsize); - } - cons = noutput_items; - ret = n_to_copy; - delta -= n_adj; - d_delta = -delta; - } - - //produce but not consume (inserts zeros) - else { // d_delta > 0 - int n_from_input, n_padding; - n_from_input = std::max(0, noutput_items-d_delta); - n_padding = std::min(d_delta, noutput_items); - for(size_t i = 0; i < input_items.size(); i++) { - iptr = (const char *) input_items[i]; - optr = (char *) output_items[i]; - std::memset(optr, 0, n_padding*d_itemsize); - std::memcpy(optr, iptr, n_from_input*d_itemsize); - } - cons = n_from_input; - ret = noutput_items; - d_delta -= n_padding; - } - - consume_each(cons); - return ret; -} diff --git a/gnuradio-core/src/lib/general/gr_delay.h b/gnuradio-core/src/lib/general/gr_delay.h deleted file mode 100644 index ed05c47f43..0000000000 --- a/gnuradio-core/src/lib/general/gr_delay.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007,2012 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef INCLUDED_GR_DELAY_H -#define INCLUDED_GR_DELAY_H - -#include <gr_core_api.h> -#include <gr_block.h> -#include <gruel/thread.h> - -class gr_delay; -typedef boost::shared_ptr<gr_delay> gr_delay_sptr; - -GR_CORE_API gr_delay_sptr gr_make_delay (size_t itemsize, int delay); - -/*! - * \brief delay the input by a certain number of samples - * \ingroup misc_blk - */ -class GR_CORE_API gr_delay : public gr_block -{ - friend GR_CORE_API gr_delay_sptr gr_make_delay (size_t itemsize, int delay); - - gr_delay (size_t itemsize, int delay); - - void forecast (int noutput_items, gr_vector_int &ninput_items_required); - - size_t d_itemsize; - int d_delta; - gruel::mutex d_mutex_delay; - - public: - int delay () const { return history()-1; } - void set_delay (int delay); - - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/general/gr_delay.i b/gnuradio-core/src/lib/general/gr_delay.i deleted file mode 100644 index f3d49891d7..0000000000 --- a/gnuradio-core/src/lib/general/gr_delay.i +++ /dev/null @@ -1,35 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -GR_SWIG_BLOCK_MAGIC(gr,delay) - - gr_delay_sptr gr_make_delay (size_t itemsize, int delay); - -class gr_delay : public gr_block -{ - private: - gr_delay (size_t itemsize, int delay); - - public: - int delay() const { return history()-1; } - void set_delay (int delay) { set_history(delay+1); } -}; diff --git a/gnuradio-core/src/lib/general/gr_log2_const.h b/gnuradio-core/src/lib/general/gr_log2_const.h deleted file mode 100644 index 40afcf8b80..0000000000 --- a/gnuradio-core/src/lib/general/gr_log2_const.h +++ /dev/null @@ -1,47 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2006 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - - -/* - * a bit of template hackery... - */ -#ifndef INCLUDED_GR_LOG2_CONST_H -#define INCLUDED_GR_LOG2_CONST_H - -#include <gr_core_api.h> -#include <assert.h> - -template<unsigned int k> static inline int gr_log2_const() { assert(0); return 0; } - -template<> inline int gr_log2_const<1>() { return 0; } -template<> inline int gr_log2_const<2>() { return 1; } -template<> inline int gr_log2_const<4>() { return 2; } -template<> inline int gr_log2_const<8>() { return 3; } -template<> inline int gr_log2_const<16>() { return 4; } -template<> inline int gr_log2_const<32>() { return 5; } -template<> inline int gr_log2_const<64>() { return 6; } -template<> inline int gr_log2_const<128>() { return 7; } -template<> inline int gr_log2_const<256>() { return 8; } -template<> inline int gr_log2_const<512>() { return 9; } -template<> inline int gr_log2_const<1024>(){ return 10; } - -#endif /* INCLUDED_GR_LOG2_CONST_H */ diff --git a/gnuradio-core/src/lib/general/gr_rms_cf.cc b/gnuradio-core/src/lib/general/gr_rms_cf.cc deleted file mode 100644 index 44eb2221ea..0000000000 --- a/gnuradio-core/src/lib/general/gr_rms_cf.cc +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2005,2010 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <gr_rms_cf.h> -#include <gr_io_signature.h> -#include <cmath> - -gr_rms_cf_sptr -gr_make_rms_cf(double alpha) -{ - return gnuradio::get_initial_sptr(new gr_rms_cf(alpha)); -} - -gr_rms_cf::gr_rms_cf (double alpha) - : gr_sync_block ("rms_cf", - gr_make_io_signature(1, 1, sizeof(gr_complex)), - gr_make_io_signature(1, 1, sizeof(float))), - d_iir(alpha) -{ - -} - -gr_rms_cf::~gr_rms_cf() -{ -} - - -int -gr_rms_cf::work(int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const gr_complex *in = (const gr_complex *) input_items[0]; - float *out = (float *) output_items[0]; - - for (int i = 0; i < noutput_items; i++){ - double mag_sqrd = in[i].real()*in[i].real() + in[i].imag()*in[i].imag(); - double f = d_iir.filter(mag_sqrd); - out[i] = sqrt(f); - } - - return noutput_items; -} - -void -gr_rms_cf::set_alpha(double alpha) -{ - d_iir.set_taps(alpha); -} diff --git a/gnuradio-core/src/lib/general/gr_rms_cf.h b/gnuradio-core/src/lib/general/gr_rms_cf.h deleted file mode 100644 index 9e701aa6a0..0000000000 --- a/gnuradio-core/src/lib/general/gr_rms_cf.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2005 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ -#ifndef INCLUDED_GR_RMS_CF_H -#define INCLUDED_GR_RMS_CF_H - -#include <gr_core_api.h> -#include <gr_sync_block.h> -#include <gr_single_pole_iir.h> - -class gr_rms_cf; -typedef boost::shared_ptr<gr_rms_cf> gr_rms_cf_sptr; - -GR_CORE_API gr_rms_cf_sptr -gr_make_rms_cf (double alpha = 0.0001); - -/*! - * \brief RMS average power - * \ingroup math_blk - */ -class GR_CORE_API gr_rms_cf : public gr_sync_block -{ - gr_single_pole_iir<double,double,double> d_iir; - bool d_unmuted; - - friend GR_CORE_API gr_rms_cf_sptr - gr_make_rms_cf (double alpha); - - gr_rms_cf (double alpha); - -public: - ~gr_rms_cf (); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - bool unmuted () const { return d_unmuted; } - - void set_alpha (double alpha); -}; - -#endif /* INCLUDED_GR_RMS_CF_H */ diff --git a/gnuradio-core/src/lib/general/gr_rms_cf.i b/gnuradio-core/src/lib/general/gr_rms_cf.i deleted file mode 100644 index a668200eef..0000000000 --- a/gnuradio-core/src/lib/general/gr_rms_cf.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2005 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -GR_SWIG_BLOCK_MAGIC(gr,rms_cf); - -gr_rms_cf_sptr -gr_make_rms_cf (double alpha = 0.0001); - -class gr_rms_cf : public gr_sync_block -{ -public: - bool unmuted () const { return d_unmuted; } - void set_alpha (double alpha); -}; diff --git a/gnuradio-core/src/lib/general/gr_rms_ff.cc b/gnuradio-core/src/lib/general/gr_rms_ff.cc deleted file mode 100644 index 233f419cd2..0000000000 --- a/gnuradio-core/src/lib/general/gr_rms_ff.cc +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2005,2010 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <gr_rms_ff.h> -#include <gr_io_signature.h> -#include <cmath> - -gr_rms_ff_sptr -gr_make_rms_ff(double alpha) -{ - return gnuradio::get_initial_sptr(new gr_rms_ff(alpha)); -} - -gr_rms_ff::gr_rms_ff (double alpha) - : gr_sync_block ("rms_ff", - gr_make_io_signature(1, 1, sizeof(float)), - gr_make_io_signature(1, 1, sizeof(float))), - d_iir(alpha) -{ - -} - -gr_rms_ff::~gr_rms_ff() -{ -} - - -int -gr_rms_ff::work(int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const float *in = (const float *) input_items[0]; - float *out = (float *) output_items[0]; - - for (int i = 0; i < noutput_items; i++){ - double mag_sqrd = in[i]*in[i]; - double f = d_iir.filter(mag_sqrd); - out[i] = sqrt(f); - } - - return noutput_items; -} - -void -gr_rms_ff::set_alpha(double alpha) -{ - d_iir.set_taps(alpha); -} diff --git a/gnuradio-core/src/lib/general/gr_rms_ff.h b/gnuradio-core/src/lib/general/gr_rms_ff.h deleted file mode 100644 index 30cf7f9d9f..0000000000 --- a/gnuradio-core/src/lib/general/gr_rms_ff.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2005 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ -#ifndef INCLUDED_GR_RMS_FF_H -#define INCLUDED_GR_RMS_FF_H - -#include <gr_core_api.h> -#include <gr_sync_block.h> -#include <gr_single_pole_iir.h> - -class gr_rms_ff; -typedef boost::shared_ptr<gr_rms_ff> gr_rms_ff_sptr; - -GR_CORE_API gr_rms_ff_sptr -gr_make_rms_ff (double alpha = 0.0001); - -/*! - * \brief RMS average power - * \ingroup math_blk - */ -class GR_CORE_API gr_rms_ff : public gr_sync_block -{ - gr_single_pole_iir<double,double,double> d_iir; - bool d_unmuted; - - friend GR_CORE_API gr_rms_ff_sptr - gr_make_rms_ff (double alpha); - - gr_rms_ff (double alpha); - -public: - ~gr_rms_ff (); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - bool unmuted () const { return d_unmuted; } - - void set_alpha (double alpha); -}; - -#endif /* INCLUDED_GR_RMS_FF_H */ diff --git a/gnuradio-core/src/lib/general/gr_rms_ff.i b/gnuradio-core/src/lib/general/gr_rms_ff.i deleted file mode 100644 index 00b03f5d4b..0000000000 --- a/gnuradio-core/src/lib/general/gr_rms_ff.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2005 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -GR_SWIG_BLOCK_MAGIC(gr,rms_ff); - -gr_rms_ff_sptr -gr_make_rms_ff (double alpha = 0.0001); - -class gr_rms_ff : public gr_sync_block -{ -public: - bool unmuted () const { return d_unmuted; } - void set_alpha (double alpha); -}; |