GNU Radio 3.6.4.1 C++ API
gr::filter::pfb_channelizer_ccf_impl Class Reference

#include <pfb_channelizer_ccf_impl.h>

Inheritance diagram for gr::filter::pfb_channelizer_ccf_impl:
gr::filter::pfb_channelizer_ccf gr::filter::kernel::polyphase_filterbank gr_block gr_basic_block gr_msg_accepter gruel::msg_accepter

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 More...
 

Additional Inherited Members

- Public Types inherited from gr::filter::pfb_channelizer_ccf
typedef boost::shared_ptr
< pfb_channelizer_ccf
sptr
 
- Static Public Member Functions inherited from gr::filter::pfb_channelizer_ccf
static sptr make (unsigned int numchans, const std::vector< float > &taps, float oversample_rate)
 
- Protected Types inherited from gr_basic_block
enum  vcolor { WHITE, GREY, BLACK }
 
- Protected Member Functions inherited from gr_block
 gr_block (void)
 
 gr_block (const std::string &name, gr_io_signature_sptr input_signature, gr_io_signature_sptr output_signature)
 
void set_fixed_rate (bool fixed_rate)
 
void add_item_tag (unsigned int which_output, uint64_t abs_offset, const pmt::pmt_t &key, const pmt::pmt_t &value, const pmt::pmt_t &srcid=pmt::PMT_F)
 Adds a new tag onto the given output buffer. More...
 
void add_item_tag (unsigned int which_output, const gr_tag_t &tag)
 Adds a new tag onto the given output buffer. More...
 
void remove_item_tag (unsigned int which_input, uint64_t abs_offset, const pmt::pmt_t &key, const pmt::pmt_t &value, const pmt::pmt_t &srcid=pmt::PMT_F)
 Removes a tag from the given input buffer. More...
 
void remove_item_tag (unsigned int which_input, const gr_tag_t &tag)
 Removes a tag from the given input buffer. More...
 
void get_tags_in_range (std::vector< gr_tag_t > &v, unsigned int which_input, uint64_t abs_start, uint64_t abs_end)
 Given a [start,end), returns a vector of all tags in the range. More...
 
void get_tags_in_range (std::vector< gr_tag_t > &v, unsigned int which_input, uint64_t abs_start, uint64_t abs_end, const pmt::pmt_t &key)
 Given a [start,end), returns a vector of all tags in the range with a given key. More...
 
- Protected Attributes inherited from gr_block
std::vector< long > d_max_output_buffer
 
std::vector< long > d_min_output_buffer
 
gruel::mutex d_setlock
 
- Private Member Functions inherited from gr::filter::kernel::polyphase_filterbank
 polyphase_filterbank (unsigned int nfilts, const std::vector< float > &taps)
 
 ~polyphase_filterbank ()
 
void set_taps (const std::vector< float > &taps)
 
void print_taps ()
 
std::vector< std::vector< float > > taps () const
 

Constructor & Destructor Documentation

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 ( )

Member Function Documentation

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

Parameters
noutput_itemsnumber of output items to write on each output stream
ninput_itemsnumber of input items available on each input stream
input_itemsvector of pointers to the input items, one entry per input stream
output_itemsvector of pointers to the output items, one entry per output stream
Returns
number of items actually written to each output stream, or -1 on EOF. It is OK to return a value less than noutput_items. -1 <= return value <= noutput_items

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

Parameters
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.


The documentation for this class was generated from the following file: