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!.
DelayDelays samples.
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?
HackRfWASM + WebUSB source for HackRF.
WasmWsSinkSend samples via a WebSocket.

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

Modules

Structs

Enums