Skip to main content

StreamOperator

Trait StreamOperator 

Source
pub trait StreamOperator<Input, Output>: StreamOperatorManagement {
    // Required methods
    fn process(
        &mut self,
        data_in: &[Input],
    ) -> Result<Option<Vec<Output>>, ErrorsJSL>;
    fn flush(&mut self) -> Result<Option<Vec<Output>>, ErrorsJSL>;
}

Required Methods§

Source

fn process( &mut self, data_in: &[Input], ) -> Result<Option<Vec<Output>>, ErrorsJSL>

Processes a chunk of input data and produces a corresponding chunk of output data. The input and output types can be defined based on the specific requirements of the application, such as audio samples, video frames, or other types of data. This method is called repeatedly as new data becomes available in the stream.

Source

fn flush(&mut self) -> Result<Option<Vec<Output>>, ErrorsJSL>

Flushes any remaining data in the operator’s internal buffers and produces any final output data. This method is typically called at the end of a stream or when the operator needs to be shut down, allowing it to perform any necessary cleanup or final computations before the stream is terminated.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl StreamOperator<ArrayBase<OwnedRepr<Complex<f64>>, Dim<[usize; 1]>>, ArrayBase<OwnedRepr<Complex<f64>>, Dim<[usize; 1]>>> for StateSpace

Source§

impl StreamOperator<ArrayBase<OwnedRepr<Complex<f64>>, Dim<[usize; 1]>>, Complex<f64>> for CriticallySampledPolyphaseSynthesisFilterBank

Source§

impl StreamOperator<ArrayBase<OwnedRepr<Complex<f64>>, Dim<[usize; 1]>>, Complex<f64>> for OversampledPolyphaseSynthesisFilterBank

Source§

impl StreamOperator<ArrayBase<OwnedRepr<Complex<f64>>, Dim<[usize; 1]>>, KalmanResult> for KalmanFilter

Source§

impl StreamOperator<Complex<f64>, ArrayBase<OwnedRepr<Complex<f64>>, Dim<[usize; 1]>>> for CriticallySampledPolyphaseAnalysisFilterBank

Source§

impl StreamOperator<Complex<f64>, ArrayBase<OwnedRepr<Complex<f64>>, Dim<[usize; 1]>>> for OversampledPolyphaseAnalysisFilterBank

Source§

impl StreamOperator<Complex<f64>, Complex<f64>> for ChannelImpairment

Source§

impl StreamOperator<Complex<f64>, Complex<f64>> for ChannelReceiver

Source§

impl StreamOperator<Complex<f64>, Complex<f64>> for ChannelTransmitter

Source§

impl StreamOperator<Complex<f64>, Complex<f64>> for DecisionFeedbackEqualizer

Decision-directed streaming: each input sample yields the equalized (pre-slicer) sample.

Source§

impl StreamOperator<Complex<f64>, Complex<f64>> for DiscreteLinearFilter<Complex<f64>>

Source§

impl StreamOperator<Complex<f64>, Complex<f64>> for FrequencyMixer

This is a complex-valued mixer that takes a complex-valued input signal and produces a complex-valued output by multiplying the input signal with a complex exponential based on the current phase. This type of mixer is commonly used for applications such as quadrature amplitude modulation (QAM) or for up-converting a baseband signal to a higher frequency in a transmitter, as well as for down-converting a signal to baseband in a receiver. It can also be used for frequency translation in spectral processing applications, such as shifting the frequency of a signal for analysis or filtering purposes

Source§

impl StreamOperator<Complex<f64>, Complex<f64>> for MuellerTimingRecovery

Source§

impl StreamOperator<Complex<f64>, Complex<f64>> for NonLinearityTransformer<Complex<f64>>

Source§

impl StreamOperator<Complex<f64>, f64> for FmDemodulator

Source§

impl StreamOperator<f64, Complex<f64>> for ChannelReceiver

Source§

impl StreamOperator<f64, Complex<f64>> for ChannelTransmitter

Source§

impl StreamOperator<f64, Complex<f64>> for FmModulator

Source§

impl StreamOperator<f64, Complex<f64>> for FrequencyMixer

This is a complex-valued mixer that produces a complex-valued output by multiplying the input signal with a complex exponential based on the current phase. This type of mixer is commonly used for applications such as quadrature amplitude modulation (QAM) or for up-converting a baseband signal to a higher frequency in a transmitter.

Source§

impl StreamOperator<f64, PidOutput> for PidController

Source§

impl StreamOperator<f64, f64> for BiquadFilter

Source§

impl StreamOperator<f64, f64> for BoxcarIntegrator<f64>

Source§

impl StreamOperator<f64, f64> for DiscreteLinearFilter<f64>

Source§

impl StreamOperator<f64, f64> for FrequencyMixer

This is a real-valued mixer that produces a real-valued output by multiplying the input signal with the cosine of the current phase. This type of mixer is commonly used for applications such as amplitude modulation (AM) or for down-converting a signal to baseband in a receiver.

Source§

impl StreamOperator<f64, f64> for NonLinearityTransformer<f64>

Source§

impl<T: Clone> StreamOperator<T, T> for AddressableShiftRegister<T>

As a stream operator the register is a pure delay: each output is the input from capacity samples earlier (the initial value for the first capacity outputs).

Source§

impl<T: Clone> StreamOperator<T, T> for PingPongBuffer<T>

As a stream operator the buffer re-blocks a stream: it emits whole blocks as they complete (so the output is the input delayed by up to one block) and never overruns because it drains immediately. flush emits the final partial block as-is.

Source§

impl<T: IsAnalytic> StreamOperator<T, T> for FarrowFilter<T>

Streaming operation at the position set by FarrowFilter::set_mu: each input sample yields one output, a copy of the signal delayed by delay_at(mu) samples.

Source§

impl<T: IsAnalytic> StreamOperator<T, T> for FftFir<T>

Source§

impl<T: IsAnalytic> StreamOperator<T, T> for OverlapAddFir<T>

Source§

impl<T: IsAnalytic> StreamOperator<T, T> for PolyphaseArbitraryResampler<T>

Source§

impl<T: IsAnalytic> StreamOperator<T, T> for PolyphaseIntegerResampler<T>

Source§

impl<W: Waveform> StreamOperator<(), <W as Waveform>::Output> for NcoSource<W>

Free-running operation: the number of input items is the number of samples produced.

Source§

impl<W: Waveform> StreamOperator<f64, <W as Waveform>::Output> for NcoSource<W>

Frequency-modulated operation: each input is a frequency offset in Hz for that sample.