Module futuresdr::blocks

source ·
Expand description

Block Library

Functional/Apply-style Blocks

BlockUsageWebAssembly?
ApplyApply a function to each sample.
ApplyIntoIterApply a function on each input sample to create an iterator and output its values.
ApplyNMApply a function to each N input samples, producing M output samples.
CombineApply a function to combine two streams into one.
FilterApply a function, returning an Option to allow filtering samples.
SinkApply a function to received samples.
SourceRepeatedly apply a function to generate samples.
SplitApply a function to split a stream.
FiniteSourceRepeatedly apply a function to generate samples, using Option values to allow termination.

DSP blocks

BlockUsageWebAssembly?
AgcAutomatic Gain Control
FftCompute an FFT.
FirFIR filter and resampler.
IirIIR filter.

Misc

BlockUsageWebAssembly?
ConsoleSinkLog stream data with log::info!.
HeadCopies only a given number of samples and stops.
NullSinkDrops samples.
NullSourceGenerates a stream of zeros.
SelectorForward the input stream with a given index to the output stream with a given index.
TagDebugDrop samples, printing tags.
ThrottleLimit sample rate.
VectorSinkStore received samples in vector.
VectorSourceStream samples from vector.

Message Passing

BlockUsageWebAssembly?
MessageBurstOutput a given number of messages in one burst and terminate.
MessageCopyForward messages.
MessagePipePush received messages into a channel.
MessageSinkBlack hole for messages.
MessageSourceOutput the same message periodically.

Performance Evaluation

BlockUsageWebAssembly?Feature
CopyCopy input samples to the output.
CopyRandCopy input samples to the output, forwarding only a randomly selected number of samples.
lttng::NullSourceNull source that calls an lttng tracepoint for every batch of produced samples.lttng
lttng:NullSinkNull sink that calls an lttng tracepoint for every batch of received samples.lttng

I/O

BlockUsageWebAssembly?
BlobToUdpPush Blobs into a UDP socket.
ChannelSourcePush samples through a channel into a stream connection.
FileSinkWrite samples to a file.
FileSourceRead samples from a file.
TcpSourceReads samples from a TCP socket.
TcpSinkPush samples into a TCP socket.
WebsocketSinkPush samples in a WebSocket.
[zeromq::PubSink]Push samples into ZeroMQ socket.
[zeromq::SubSource]Read samples from ZeroMQ socket.

SDR Hardware

BlockUsageFeatureWebAssembly?
SeifySinkTransmit samples with a Seify device.seify
SeifySourceReceive samples from a Seify device.seify

Hardware Acceleration

BlockUsageWebAssembly?Feature
[Vulkan]Interface GPU w/ Vulkan.vulkan
[Wgpu]Interface GPU w/ native API.wgpu
[Zynq]Interface Zynq FPGA w/ AXI DMA (async mode).zynq
[ZynqSync]Interface Zynq FPGA w/ AXI DMA (sync mode).zynq

WASM-specific (target wasm32-unknown-unknown)

BlockUsageWebAssembly?
WasmSdrReceive samples from web world.
WasmWsSinkSend samples via a WebSocket.
WasmFreqPush samples to a GUI sink.

Signal Sources

BlockUsageWebAssembly?
SignalSourceCreate signals (sin, cos, square).

Audio (requires audio feature)

BlockUsageWebAssembly?
AudioSinkAudio sink.
AudioSourceAudio source.
FileSourceRead an audio file and output its samples.
WavSinkWrites samples to a WAV file

Re-exports

pub use signal_source::SignalSourceBuilder;
pub use sink::Sink;

Modules

Structs

Apply a function to each sample.
Apply a function on each input sample to create an iterator and output its values.
Apply a function to each N input samples, producing M output samples.
Push Blobs into a UDP socket.
Push samples through a channel into a stream connection.
Apply a function to combine two streams into one.
Log stream data with log::info!.
Copy input samples to the output.
Copy input samples to the output, forwarding only a randomly selected number of samples.
Create a CopyRand block.
Compute an FFT.
Write samples to a file.
FileSourceNon-WebAssembly
Read samples from a file.
Apply a function, returning an Option to allow filtering samples.
Repeatedly apply a function to generate samples, using Option values to allow termination.
FIR filter.
Create a Fir filter.
Fixed point implementation of phase value based on i32 fixed pt radians
Copies only a given number of samples and stops.
IIR filter.
Build an Iir filter.
Output a given number of messages in one burst and terminate.
Forward messages.
Push received messages into a channel.
Black hole for messages.
Output the same message periodically.
MessageSourceBuilderNon-WebAssembly
Repeats a fixed message on an interval
Drop samples.
Generate a stream of zeroes.
Forward the input stream with a given index to the output stream with a given index.
Repeatedly apply a function to generate samples.
Apply a function to split a stream.
Drop samples, printing tags.
Push samples into a TCP socket.
Push samples into a TCP socket.
ThrottleNon-WebAssembly
Limit sample rate.
Store received samples in vector.
Stream samples from vector.
Push samples in a WebSocket.

Enums