GNU Radio Manual and C++ API Reference  3.7.4.1
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
gr::filter::kernel::pfb_arb_resampler_ccc Class Reference

#include <gnuradio/filter/pfb_arb_resampler.h>

Public Member Functions

 pfb_arb_resampler_ccc (float rate, const std::vector< gr_complex > &taps, unsigned int filter_size)
 
 ~pfb_arb_resampler_ccc ()
 
void set_taps (const std::vector< gr_complex > &taps)
 
std::vector< std::vector
< gr_complex > > 
taps () const
 
void print_taps ()
 
void set_rate (float rate)
 
void set_phase (float ph)
 
float phase () const
 
unsigned int taps_per_filter () const
 
unsigned int interpolation_rate () const
 
unsigned int decimation_rate () const
 
float fractional_rate () const
 
int group_delay () const
 
float phase_offset (float freq, float fs)
 
int filter (gr_complex *input, gr_complex *output, int n_to_read, int &n_read)
 

Constructor & Destructor Documentation

gr::filter::kernel::pfb_arb_resampler_ccc::pfb_arb_resampler_ccc ( float  rate,
const std::vector< gr_complex > &  taps,
unsigned int  filter_size 
)

Creates a kernel to perform arbitrary resampling on a set of samples.

Parameters
rate(float) Specifies the resampling rate to use
taps(vector/list of complex) The prototype filter to populate the filterbank. The taps * should be generated at the filter_size sampling rate.
filter_size(unsigned int) The number of filters in the filter bank. This is directly related to quantization noise introduced during the resampling. Defaults to 32 filters.
gr::filter::kernel::pfb_arb_resampler_ccc::~pfb_arb_resampler_ccc ( )

Member Function Documentation

unsigned int gr::filter::kernel::pfb_arb_resampler_ccc::decimation_rate ( ) const
inline
int gr::filter::kernel::pfb_arb_resampler_ccc::filter ( gr_complex input,
gr_complex output,
int  n_to_read,
int &  n_read 
)

Performs the filter operation that resamples the signal.

This block takes in a stream of samples and outputs a resampled and filtered stream. This block should be called such that the output has rate * n_to_read amount of space available in the output buffer.

Parameters
inputAn input vector of samples to be resampled
outputThe output samples at the new sample rate.
n_to_readNumber of samples to read from input.
n_read(out) Number of samples actually read from input.
Returns
Number of samples put into output.
float gr::filter::kernel::pfb_arb_resampler_ccc::fractional_rate ( ) const
inline
int gr::filter::kernel::pfb_arb_resampler_ccc::group_delay ( ) const
inline

Get the group delay of the filter.

unsigned int gr::filter::kernel::pfb_arb_resampler_ccc::interpolation_rate ( ) const
inline
float gr::filter::kernel::pfb_arb_resampler_ccc::phase ( ) const

Gets the current phase of the resampler in radians (2 to 2pi).

float gr::filter::kernel::pfb_arb_resampler_ccc::phase_offset ( float  freq,
float  fs 
)

Calculates the phase offset expected by a sine wave of frequency freq and sampling rate fs (assuming input sine wave has 0 degree phase).

void gr::filter::kernel::pfb_arb_resampler_ccc::print_taps ( )

Print all of the filterbank taps to screen.

void gr::filter::kernel::pfb_arb_resampler_ccc::set_phase ( float  ph)

Sets the current phase offset in radians (0 to 2pi).

void gr::filter::kernel::pfb_arb_resampler_ccc::set_rate ( float  rate)

Sets the resampling rate of the block.

void gr::filter::kernel::pfb_arb_resampler_ccc::set_taps ( const std::vector< gr_complex > &  taps)

Resets the filterbank's filter taps with the new prototype filter

Parameters
taps(vector/list of complex) The prototype filter to populate the filterbank.
std::vector<std::vector<gr_complex> > gr::filter::kernel::pfb_arb_resampler_ccc::taps ( ) const

Return a vector<vector<>> of the filterbank taps

unsigned int gr::filter::kernel::pfb_arb_resampler_ccc::taps_per_filter ( ) const

Gets the number of taps per filter.


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