diff options
-rw-r--r-- | gnuradio-core/src/lib/general/gr_vco_f.cc | 58 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_vco_f.h | 75 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_vco_f.i | 38 | ||||
-rw-r--r-- | gr-audio/examples/grc/cvsd_sweep.grc | 2 | ||||
-rwxr-xr-x | gr-filter/examples/chirp_channelize.py | 2 | ||||
-rw-r--r-- | grc/blocks/block_tree.xml | 4 | ||||
-rw-r--r-- | grc/blocks/gr_vco_f.xml | 35 |
7 files changed, 2 insertions, 212 deletions
diff --git a/gnuradio-core/src/lib/general/gr_vco_f.cc b/gnuradio-core/src/lib/general/gr_vco_f.cc deleted file mode 100644 index 0899bc77e0..0000000000 --- a/gnuradio-core/src/lib/general/gr_vco_f.cc +++ /dev/null @@ -1,58 +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_vco_f.h> -#include <gr_io_signature.h> -#include <math.h> - -gr_vco_f_sptr -gr_make_vco_f(double sampling_rate, double sensitivity, double amplitude) -{ - return gnuradio::get_initial_sptr(new gr_vco_f(sampling_rate, sensitivity, amplitude)); -} - - -gr_vco_f::gr_vco_f(double sampling_rate, double sensitivity, double amplitude) - : gr_sync_block("vco_f", - gr_make_io_signature(1, 1, sizeof(float)), - gr_make_io_signature(1, 1, sizeof(float))), - d_sampling_rate(sampling_rate), d_sensitivity(sensitivity), d_amplitude(amplitude), - d_k(d_sensitivity/d_sampling_rate) -{ -} - -int -gr_vco_f::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const float *input = (const float *)input_items[0]; - float *output = (float *)output_items[0]; - - d_vco.cos(output, input, noutput_items, d_k, d_amplitude); - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/general/gr_vco_f.h b/gnuradio-core/src/lib/general/gr_vco_f.h deleted file mode 100644 index 83f6a9773e..0000000000 --- a/gnuradio-core/src/lib/general/gr_vco_f.h +++ /dev/null @@ -1,75 +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_VCO_F_H -#define INCLUDED_GR_VCO_F_H - -#include <gr_core_api.h> -#include <gr_sync_block.h> -#include <gr_fxpt_vco.h> - -/*! - * \brief VCO - Voltage controlled oscillator - * \ingroup misc - * - * \param sampling_rate sampling rate (Hz) - * \param sensitivity units are radians/sec/volt - * \param amplitude output amplitude - */ -class gr_vco_f; -typedef boost::shared_ptr<gr_vco_f> gr_vco_f_sptr; - - -GR_CORE_API gr_vco_f_sptr gr_make_vco_f(double sampling_rate, double sensitivity, double amplitude); - -/*! - * \brief VCO - Voltage controlled oscillator - * \ingroup modulator_blk - * - * input: float stream of control voltages; output: float oscillator output - */ -class GR_CORE_API gr_vco_f : public gr_sync_block -{ - friend GR_CORE_API gr_vco_f_sptr gr_make_vco_f(double sampling_rate, double sensitivity, double amplitude); - - /*! - * \brief VCO - Voltage controlled oscillator - * - * \param sampling_rate sampling rate (Hz) - * \param sensitivity units are radians/sec/volt - * \param amplitude output amplitude - */ - gr_vco_f(double sampling_rate, double sensitivity, double amplitude); - - double d_sampling_rate; - double d_sensitivity; - double d_amplitude; - double d_k; - gr_fxpt_vco d_vco; - -public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif /* INCLUDED_GR_VCO_F_H */ diff --git a/gnuradio-core/src/lib/general/gr_vco_f.i b/gnuradio-core/src/lib/general/gr_vco_f.i deleted file mode 100644 index 8ecf314116..0000000000 --- a/gnuradio-core/src/lib/general/gr_vco_f.i +++ /dev/null @@ -1,38 +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,vco_f); - -/*! - * \brief VCO - Voltage controlled oscillator - * - * \param sampling_rate sampling rate (Hz) - * \param sensitivity units are radians/sec/volt - * \param amplitude output amplitude - */ -gr_vco_f_sptr gr_make_vco_f(double sampling_rate, double sensitivity, double amplitude); - - -class gr_vco_f : public gr_sync_block { - private: - gr_vco_f(double sampling_rate, double sensitivity, double amplitude); -}; diff --git a/gr-audio/examples/grc/cvsd_sweep.grc b/gr-audio/examples/grc/cvsd_sweep.grc index 2fb4c4cc7b..496fd4f8e7 100644 --- a/gr-audio/examples/grc/cvsd_sweep.grc +++ b/gr-audio/examples/grc/cvsd_sweep.grc @@ -111,7 +111,7 @@ </param> </block> <block> - <key>gr_vco_f</key> + <key>blocks_vco_f</key> <param> <key>id</key> <value>vco</value> diff --git a/gr-filter/examples/chirp_channelize.py b/gr-filter/examples/chirp_channelize.py index ef69aa0e02..aedd5c4892 100755 --- a/gr-filter/examples/chirp_channelize.py +++ b/gr-filter/examples/chirp_channelize.py @@ -74,7 +74,7 @@ class pfb_top_block(gr.top_block): # Build a VCO controlled by either the sinusoid or single chirp tone # Then convert this to a complex signal - self.vco = gr.vco_f(self._fs, 225, 1) + self.vco = blocks.vco_f(self._fs, 225, 1) self.f2c = blocks.float_to_complex() self.head = blocks.head(gr.sizeof_gr_complex, self._N) diff --git a/grc/blocks/block_tree.xml b/grc/blocks/block_tree.xml index ecf1cc0002..9614c6ae02 100644 --- a/grc/blocks/block_tree.xml +++ b/grc/blocks/block_tree.xml @@ -25,10 +25,6 @@ <block>blks2_packet_encoder</block> </cat> <cat> - <name>Modulators</name> - <block>gr_vco_f</block> - </cat> - <cat> <name>Error Correction</name> <cat> <name>Trellis</name> diff --git a/grc/blocks/gr_vco_f.xml b/grc/blocks/gr_vco_f.xml deleted file mode 100644 index e49c539651..0000000000 --- a/grc/blocks/gr_vco_f.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##VCO -################################################### - --> -<block> - <name>VCO</name> - <key>gr_vco_f</key> - <import>from gnuradio import gr</import> - <make>gr.vco_f($samp_rate, $sensitivity, $amplitude)</make> - <param> - <name>Sample Rate</name> - <key>samp_rate</key> - <type>real</type> - </param> - <param> - <name>Sensitivity</name> - <key>sensitivity</key> - <type>real</type> - </param> - <param> - <name>Amplitude</name> - <key>amplitude</key> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>float</type> - </sink> - <source> - <name>out</name> - <type>float</type> - </source> -</block> |