Struct radiorust::blocks::transform::FreqShifter
source · pub struct FreqShifter<Flt> { /* private fields */ }
Expand description
Complex oscillator and mixer, which shifts all frequencies in an I/Q stream
Implementations
sourceimpl<Flt> FreqShifter<Flt>where
Flt: Float,
impl<Flt> FreqShifter<Flt>where
Flt: Float,
sourcepub fn new() -> Self
pub fn new() -> Self
Create new FreqShifter
block with 1 Hz precision and initial
frequency shift of zero
sourcepub fn with_shift(shift: f64) -> Self
pub fn with_shift(shift: f64) -> Self
Create new FreqShifter
block with 1 Hz precision and given initial
frequency shift
in hertz
sourcepub fn with_precision(precision: f64) -> Self
pub fn with_precision(precision: f64) -> Self
Create new FreqShifter
block with given precision
in hertz and an
initial shift of zero
sourcepub fn with_precision_and_shift(precision: f64, shift: f64) -> Self
pub fn with_precision_and_shift(precision: f64, shift: f64) -> Self
Create new FreqShifter
block with given precision
and shift
, both
in hertz
sourcepub fn precision(&self) -> f64
pub fn precision(&self) -> f64
Get frequency precision in hertz
The precision can’t be changed once the block has been created.
Create a new block with FreqShifter::with_precision
or
FreqShifter::with_precision_and_shift
if you need to change the
frequency precision.
sourcepub fn update_shift<F: FnOnce(&mut f64)>(&self, modify: F)
pub fn update_shift<F: FnOnce(&mut f64)>(&self, modify: F)
Update frequency shift
Trait Implementations
sourceimpl<Flt> Consumer<Samples<Complex<Flt>>> for FreqShifter<Flt>
impl<Flt> Consumer<Samples<Complex<Flt>>> for FreqShifter<Flt>
sourcefn receiver_connector(&self) -> &ReceiverConnector<Samples<Complex<Flt>>>
fn receiver_connector(&self) -> &ReceiverConnector<Samples<Complex<Flt>>>
Obtain reference to
ReceiverConnector
sourcefn feed_from_none(&self)
fn feed_from_none(&self)
Disconnect
Consumer
from any connected Producer
if connectedsourcefn connect_to_producer<P: Producer<T>>(&self, producer: &P)
fn connect_to_producer<P: Producer<T>>(&self, producer: &P)
👎Deprecated since 0.2.0: method has been renamed to
feed_from
Connect
Consumer
to Producer
sourcefn disconnect_from_producer(&self)
fn disconnect_from_producer(&self)
👎Deprecated since 0.2.0: method has been renamed to
feed_from_none
Disconnect
Consumer
from any connected Producer
if connectedsourceimpl<Flt> Producer<Samples<Complex<Flt>>> for FreqShifter<Flt>
impl<Flt> Producer<Samples<Complex<Flt>>> for FreqShifter<Flt>
sourcefn sender_connector(&self) -> &SenderConnector<Samples<Complex<Flt>>>
fn sender_connector(&self) -> &SenderConnector<Samples<Complex<Flt>>>
Obtain reference to
SenderConnector
sourcefn connect_to_consumer<C: Consumer<T>>(&self, consumer: &C)
fn connect_to_consumer<C: Consumer<T>>(&self, consumer: &C)
👎Deprecated since 0.2.0: method has been renamed to
feed_into
Connect
Producer
to Consumer
Auto Trait Implementations
impl<Flt> !RefUnwindSafe for FreqShifter<Flt>
impl<Flt> Send for FreqShifter<Flt>where
Flt: Send + Sync,
impl<Flt> Sync for FreqShifter<Flt>where
Flt: Send + Sync,
impl<Flt> Unpin for FreqShifter<Flt>
impl<Flt> !UnwindSafe for FreqShifter<Flt>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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