GNU Radio 3.6.4.1 C++ API
pfb_synthesizer_ccf.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2010,2012 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  *
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 
24 #ifndef INCLUDED_PFB_SYNTHESIZER_CCF_H
25 #define INCLUDED_PFB_SYNTHESIZER_CCF_H
26 
27 #include <filter/api.h>
28 #include <gr_sync_interpolator.h>
29 
30 namespace gr {
31  namespace filter {
32 
33  /*!
34  * \class pfb_synthesizer_ccf
35  *
36  * \brief Polyphase synthesis filterbank with
37  * gr_complex input, gr_complex output and float taps
38  *
39  * \ingroup filter_blk
40  * \ingroup pfb_blk
41  */
42 
44  {
45  public:
46  // gr::filter::pfb_synthesizer_ccf::sptr
48 
49  /*!
50  * Build the polyphase synthesis filterbank.
51  * \param numchans (unsigned integer) Specifies the number of
52  * channels <EM>M</EM>
53  * \param taps (vector/list of floats) The prototype filter to
54  * populate the filterbank.
55  * \param twox (bool) use 2x oversampling or not (default is no)
56  */
57  static sptr make(unsigned int numchans,
58  const std::vector<float> &taps,
59  bool twox=false);
60 
61  /*!
62  * Resets the filterbank's filter taps with the new prototype filter
63  * \param taps (vector/list of floats) The prototype filter to
64  * populate the filterbank.
65  */
66  virtual void set_taps(const std::vector<float> &taps) = 0;
67 
68  /*!
69  * Print all of the filterbank taps to screen.
70  */
71  virtual void print_taps() = 0;
72 
73  /*!
74  * Return a vector<vector<>> of the filterbank taps
75  */
76  virtual std::vector<std::vector<float> > taps() const = 0;
77 
78  /*!
79  * Set the channel map. Channels are numbers as:
80  * N/2+1 | ... | N-1 | 0 | 1 | 2 | ... | N/2
81  * <------------------- 0 -------------------->
82  * freq
83  *
84  * So input stream 0 goes to channel 0, etc. Setting a new channel
85  * map allows the user to specify where in frequency he/she wants
86  * the input stream to go. This is especially useful to avoid
87  * putting signals into the channels on the edge of the spectrum
88  * which can either wrap around (in the case of odd number of
89  * channels) and be affected by filter rolloff in the transmitter.
90  *
91  * The map must be at least the number of streams being sent to the
92  * block. Less and the algorithm will not have enough data to
93  * properly setup the buffers. Any more channels specified will be
94  * ignored.
95  */
96  virtual void set_channel_map(const std::vector<int> &map) = 0;
97 
98  /*!
99  * Gets the current channel map.
100  */
101  virtual std::vector<int> channel_map() const = 0;
102  };
103 
104  } /* namespace filter */
105 } /* namespace gr */
106 
107 #endif /* INCLUDED_PFB_SYNTHESIZER_CCF_H */