Struct futuresdr::blocks::FirBuilder
source · [−]pub struct FirBuilder {}
Expand description
Creates a generic FIR filter.
Uses the futuredsp
to pick the optimal FIR implementation for the given
constraints.
Note that there must be an implementation of futuredsp::TapsAccessor for the taps object you pass in, see docs for details.
Additionally, there must be an available core (implementation of
futuredsp::UnaryKernel) available for the specified SampleType
and
TapsType
. See the futuredsp docs for available
implementations.
Inputs
in
: Input
Outputs
out
: Output
Usage
use futuresdr::blocks::FirBuilder;
use futuresdr::runtime::Flowgraph;
use num_complex::Complex;
let mut fg = Flowgraph::new();
let fir = fg.add_block(FirBuilder::new::<f32, f32, _>([1.0, 2.0, 3.0]));
let fir = fg.add_block(FirBuilder::new::<Complex<f32>, f32, _>(&[1.0, 2.0, 3.0]));
let fir = fg.add_block(FirBuilder::new::<f32, f32, _>(vec![1.0, 2.0, 3.0]));
let fir = fg.add_block(FirBuilder::new_resampling_with_taps::<f32, f32, _>(3, 2, vec![1.0, 2.0, 3.0]));
Implementations
sourceimpl FirBuilder
impl FirBuilder
sourcepub fn new<SampleType, TapType, Taps>(taps: Taps) -> Block where
SampleType: 'static + Send,
TapType: 'static,
Taps: 'static + TapsAccessor,
NonResamplingFirKernel<SampleType, Taps>: UnaryKernel<SampleType>,
pub fn new<SampleType, TapType, Taps>(taps: Taps) -> Block where
SampleType: 'static + Send,
TapType: 'static,
Taps: 'static + TapsAccessor,
NonResamplingFirKernel<SampleType, Taps>: UnaryKernel<SampleType>,
Create a new non-resampling FIR filter with the specified taps.
sourcepub fn new_resampling<SampleType>(interp: usize, decim: usize) -> Block where
SampleType: 'static + Send,
PolyphaseResamplingFirKernel<SampleType, Vec<f32>>: UnaryKernel<SampleType>,
pub fn new_resampling<SampleType>(interp: usize, decim: usize) -> Block where
SampleType: 'static + Send,
PolyphaseResamplingFirKernel<SampleType, Vec<f32>>: UnaryKernel<SampleType>,
Create a new rationally resampling FIR filter that changes the sampling
rate by a factor interp/decim
. The interpolation filter is constructed
using default parameters.
sourcepub fn new_resampling_with_taps<SampleType, TapType, Taps>(
interp: usize,
decim: usize,
taps: Taps
) -> Block where
SampleType: 'static + Send,
TapType: 'static,
Taps: 'static + TapsAccessor,
PolyphaseResamplingFirKernel<SampleType, Taps>: UnaryKernel<SampleType>,
pub fn new_resampling_with_taps<SampleType, TapType, Taps>(
interp: usize,
decim: usize,
taps: Taps
) -> Block where
SampleType: 'static + Send,
TapType: 'static,
Taps: 'static + TapsAccessor,
PolyphaseResamplingFirKernel<SampleType, Taps>: UnaryKernel<SampleType>,
Create a new rationally resampling FIR filter that changes the sampling
rate by a factor interp/decim
and uses taps
as the interpolation/decimation filter.
The length of taps
must be divisible by interp
.
Auto Trait Implementations
impl RefUnwindSafe for FirBuilder
impl Send for FirBuilder
impl Sync for FirBuilder
impl Unpin for FirBuilder
impl UnwindSafe for FirBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more