#include <gnuradio/filter/pfb_arb_resampler.h>
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 |
( |
| ) |
|
unsigned int gr::filter::kernel::pfb_arb_resampler_ccc::decimation_rate |
( |
| ) |
const |
|
inline |
int gr::filter::kernel::pfb_arb_resampler_ccc::filter |
( |
gr_complex * |
output, |
|
|
gr_complex * |
input, |
|
|
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
-
output | The output samples at the new sample rate. |
input | An input vector of samples to be resampled |
n_to_read | Number 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: