GNU Radio 3.6.0 C++ API
decim_fir.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2011-2012 Free Software Foundation, Inc.
00003  * 
00004  * This file is part of GNU Radio
00005  * 
00006  * GNU Radio is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 3, or (at your option)
00009  * any later version.
00010  * 
00011  * GNU Radio is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  * 
00016  * You should have received a copy of the GNU General Public License
00017  * along with GNU Radio; see the file COPYING.  If not, write to
00018  * the Free Software Foundation, Inc., 51 Franklin Street,
00019  * Boston, MA 02110-1301, USA.
00020  */
00021 
00022 #ifndef INCLUDED_GR_EXTRAS_DECIM_FIR_H
00023 #define INCLUDED_GR_EXTRAS_DECIM_FIR_H
00024 
00025 #include <gnuradio/extras/api.h>
00026 #include <gr_sync_decimator.h>
00027 #include <vector>
00028 #include <complex>
00029 
00030 namespace gnuradio{ namespace extras{
00031 
00032 class GR_EXTRAS_API decim_fir : virtual public gr_sync_decimator{
00033 public:
00034     typedef boost::shared_ptr<decim_fir> sptr;
00035     typedef std::vector<std::complex<double> > taps_type;
00036 
00037     //! Make a new FIR filter complex float input, taps, output type
00038     static sptr make_fc32_fc32_fc32(
00039         const taps_type &taps,
00040         const size_t decim = 1
00041     );
00042 
00043     //! Make a new FIR filter float input, taps, output type
00044     static sptr make_f32_f32_f32(
00045         const taps_type &taps,
00046         const size_t decim = 1
00047     );
00048 
00049     //! Set the taps for this FIR filter
00050     virtual void set_taps(const taps_type &taps) = 0;
00051 
00052     //! Get the taps set on this FIR filter
00053     virtual taps_type get_taps(void) = 0;
00054 
00055 };
00056 
00057 }}
00058 
00059 #endif /* INCLUDED_GR_EXTRAS_DECIM_FIR_H */