GNU Radio 3.6.5 C++ API
|
#include <pfb_channelizer_ccf_impl.h>
Public Member Functions | |
pfb_channelizer_ccf_impl (unsigned int nfilts, const std::vector< float > &taps, float oversample_rate) | |
~pfb_channelizer_ccf_impl () | |
void | set_taps (const std::vector< float > &taps) |
void | print_taps () |
std::vector< std::vector< float > > | taps () const |
void | set_channel_map (const std::vector< int > &map) |
std::vector< int > | channel_map () const |
int | general_work (int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) |
compute output items from input items |
gr::filter::pfb_channelizer_ccf_impl::pfb_channelizer_ccf_impl | ( | unsigned int | nfilts, |
const std::vector< float > & | taps, | ||
float | oversample_rate | ||
) |
gr::filter::pfb_channelizer_ccf_impl::~pfb_channelizer_ccf_impl | ( | ) |
std::vector<int> gr::filter::pfb_channelizer_ccf_impl::channel_map | ( | ) | const [virtual] |
Gets the current channel map.
Implements gr::filter::pfb_channelizer_ccf.
int gr::filter::pfb_channelizer_ccf_impl::general_work | ( | int | noutput_items, |
gr_vector_int & | ninput_items, | ||
gr_vector_const_void_star & | input_items, | ||
gr_vector_void_star & | output_items | ||
) | [virtual] |
compute output items from input items
noutput_items | number of output items to write on each output stream |
ninput_items | number of input items available on each input stream |
input_items | vector of pointers to the input items, one entry per input stream |
output_items | vector of pointers to the output items, one entry per output stream |
general_work must call consume or consume_each to indicate how many items were consumed on each input stream.
Reimplemented from gr_block.
void gr::filter::pfb_channelizer_ccf_impl::print_taps | ( | ) | [virtual] |
Print all of the filterbank taps to screen.
Implements gr::filter::pfb_channelizer_ccf.
void gr::filter::pfb_channelizer_ccf_impl::set_channel_map | ( | const std::vector< int > & | map | ) | [virtual] |
Set the channel map. Channels are numbers as:
N/2+1 | ... | N-1 | 0 | 1 | 2 | ... | N/2 <------------------- 0 --------------------> freq
So output stream 0 comes from channel 0, etc. Setting a new channel map allows the user to specify which channel in frequency he/she wants to got to which output stream.
The map should have the same number of elements as the number of output connections from the block. The minimum value of the map is 0 (for the 0th channel) and the maximum number is N-1 where N is the number of channels.
We specify M as the number of output connections made where M <= N, so only M out of N channels are driven to an output stream. The number of items in the channel map should be at least M long. If there are more channels specified, any value in the map over M-1 will be ignored. If the size of the map is less than M the behavior is unknown (we don't wish to check every entry into the work function).
This means that if the channelizer is splitting the signal up into N channels but only M channels are specified in the map (where M <= N), then M output streams must be connected and the map and the channel numbers used must be less than N-1. Output channel number can be reused, too. By default, the map is [0...M-1] with M = N.
Implements gr::filter::pfb_channelizer_ccf.
void gr::filter::pfb_channelizer_ccf_impl::set_taps | ( | const std::vector< float > & | taps | ) | [virtual] |
Resets the filterbank's filter taps with the new prototype filter
taps | (vector/list of floats) The prototype filter to populate the filterbank. |
Implements gr::filter::pfb_channelizer_ccf.
std::vector<std::vector<float> > gr::filter::pfb_channelizer_ccf_impl::taps | ( | ) | const [virtual] |
Return a vector<vector<>> of the filterbank taps
Implements gr::filter::pfb_channelizer_ccf.