GNU Radio v3.6.2-149-ga6d285d9 C++ API
|
00001 /* -*- c++ -*- */ 00002 /* 00003 * Copyright 2010,2012 Free Software Foundation, Inc. 00004 * 00005 * This file is part of GNU Radio 00006 * 00007 * GNU Radio is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 3, or (at your option) 00010 * any later version. 00011 * 00012 * GNU Radio is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with GNU Radio; see the file COPYING. If not, write to 00019 * the Free Software Foundation, Inc., 51 Franklin Street, 00020 * Boston, MA 02110-1301, USA. 00021 */ 00022 00023 00024 #ifndef INCLUDED_PFB_SYNTHESIZER_CCF_H 00025 #define INCLUDED_PFB_SYNTHESIZER_CCF_H 00026 00027 #include <filter/api.h> 00028 #include <gr_sync_interpolator.h> 00029 00030 namespace gr { 00031 namespace filter { 00032 00033 /*! 00034 * \class pfb_synthesizer_ccf 00035 * 00036 * \brief Polyphase synthesis filterbank with 00037 * gr_complex input, gr_complex output and float taps 00038 * 00039 * \ingroup filter_blk 00040 * \ingroup pfb_blk 00041 */ 00042 00043 class FILTER_API pfb_synthesizer_ccf : virtual public gr_sync_interpolator 00044 { 00045 public: 00046 // gr::filter::pfb_synthesizer_ccf::sptr 00047 typedef boost::shared_ptr<pfb_synthesizer_ccf> sptr; 00048 00049 /*! 00050 * Build the polyphase synthesis filterbank. 00051 * \param numchans (unsigned integer) Specifies the number of 00052 * channels <EM>M</EM> 00053 * \param taps (vector/list of floats) The prototype filter to 00054 * populate the filterbank. 00055 * \param twox (bool) use 2x oversampling or not (default is no) 00056 */ 00057 static sptr make(unsigned int numchans, 00058 const std::vector<float> &taps, 00059 bool twox=false); 00060 00061 /*! 00062 * Resets the filterbank's filter taps with the new prototype filter 00063 * \param taps (vector/list of floats) The prototype filter to 00064 * populate the filterbank. 00065 */ 00066 virtual void set_taps(const std::vector<float> &taps) = 0; 00067 00068 /*! 00069 * Print all of the filterbank taps to screen. 00070 */ 00071 virtual void print_taps() = 0; 00072 00073 /*! 00074 * Return a vector<vector<>> of the filterbank taps 00075 */ 00076 virtual std::vector<std::vector<float> > taps() const = 0; 00077 00078 /*! 00079 * Set the channel map. Channels are numbers as: 00080 * N/2+1 | ... | N-1 | 0 | 1 | 2 | ... | N/2 00081 * <------------------- 0 --------------------> 00082 * freq 00083 * 00084 * So input stream 0 goes to channel 0, etc. Setting a new channel 00085 * map allows the user to specify where in frequency he/she wants 00086 * the input stream to go. This is especially useful to avoid 00087 * putting signals into the channels on the edge of the spectrum 00088 * which can either wrap around (in the case of odd number of 00089 * channels) and be affected by filter rolloff in the transmitter. 00090 * 00091 * The map must be at least the number of streams being sent to the 00092 * block. Less and the algorithm will not have enough data to 00093 * properly setup the buffers. Any more channels specified will be 00094 * ignored. 00095 */ 00096 virtual void set_channel_map(const std::vector<int> &map) = 0; 00097 00098 /*! 00099 * Gets the current channel map. 00100 */ 00101 virtual std::vector<int> channel_map() const = 0; 00102 }; 00103 00104 } /* namespace filter */ 00105 } /* namespace gr */ 00106 00107 #endif /* INCLUDED_PFB_SYNTHESIZER_CCF_H */