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§
Sourcefn process(
&mut self,
data_in: &[Input],
) -> Result<Option<Vec<Output>>, ErrorsJSL>
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.
Sourcefn flush(&mut self) -> Result<Option<Vec<Output>>, ErrorsJSL>
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§
impl StreamOperator<ArrayBase<OwnedRepr<Complex<f64>>, Dim<[usize; 1]>>, ArrayBase<OwnedRepr<Complex<f64>>, Dim<[usize; 1]>>> for StateSpace
impl StreamOperator<ArrayBase<OwnedRepr<Complex<f64>>, Dim<[usize; 1]>>, Complex<f64>> for CriticallySampledPolyphaseSynthesisFilterBank
impl StreamOperator<ArrayBase<OwnedRepr<Complex<f64>>, Dim<[usize; 1]>>, Complex<f64>> for OversampledPolyphaseSynthesisFilterBank
impl StreamOperator<ArrayBase<OwnedRepr<Complex<f64>>, Dim<[usize; 1]>>, KalmanResult> for KalmanFilter
impl StreamOperator<Complex<f64>, ArrayBase<OwnedRepr<Complex<f64>>, Dim<[usize; 1]>>> for CriticallySampledPolyphaseAnalysisFilterBank
impl StreamOperator<Complex<f64>, ArrayBase<OwnedRepr<Complex<f64>>, Dim<[usize; 1]>>> for OversampledPolyphaseAnalysisFilterBank
impl StreamOperator<Complex<f64>, Complex<f64>> for ChannelImpairment
impl StreamOperator<Complex<f64>, Complex<f64>> for ChannelReceiver
impl StreamOperator<Complex<f64>, Complex<f64>> for ChannelTransmitter
impl StreamOperator<Complex<f64>, Complex<f64>> for DecisionFeedbackEqualizer
Decision-directed streaming: each input sample yields the equalized (pre-slicer) sample.
impl StreamOperator<Complex<f64>, Complex<f64>> for DiscreteLinearFilter<Complex<f64>>
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
impl StreamOperator<Complex<f64>, Complex<f64>> for MuellerTimingRecovery
impl StreamOperator<Complex<f64>, Complex<f64>> for NonLinearityTransformer<Complex<f64>>
impl StreamOperator<Complex<f64>, f64> for FmDemodulator
impl StreamOperator<f64, Complex<f64>> for ChannelReceiver
impl StreamOperator<f64, Complex<f64>> for ChannelTransmitter
impl StreamOperator<f64, Complex<f64>> for FmModulator
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.
impl StreamOperator<f64, PidOutput> for PidController
impl StreamOperator<f64, f64> for BiquadFilter
impl StreamOperator<f64, f64> for BoxcarIntegrator<f64>
impl StreamOperator<f64, f64> for DiscreteLinearFilter<f64>
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.
impl StreamOperator<f64, f64> for NonLinearityTransformer<f64>
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).
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.
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.
impl<T: IsAnalytic> StreamOperator<T, T> for FftFir<T>
impl<T: IsAnalytic> StreamOperator<T, T> for OverlapAddFir<T>
impl<T: IsAnalytic> StreamOperator<T, T> for PolyphaseArbitraryResampler<T>
impl<T: IsAnalytic> StreamOperator<T, T> for PolyphaseIntegerResampler<T>
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.
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.