Skip to main content

Module blocks

Module blocks 

Source
Expand description

Library of common blocks that are not tied to a specific technology.

§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.

§Streams

BlockUsageWebAssembly?
StreamDeinterleaverStream Deinterleave
StreamDuplicatorStream Duplicator

§DSP blocks

BlockUsageWebAssembly?
FftCompute an FFT.
FirFIR filter and resampler.
IirIIR filter.
PfbArbResamplerPolyphase Arbitrary Rate Resampler
PfbChannelizerPolyphase Channelizer
PfbSynthesizerPolyphase Synthesizer
XlatingFirXlating FIR filter and decimator.

§Misc

BlockUsageWebAssembly?
DelayDelays samples.
HeadCopies only a given number of samples and stops.
MovingAvgApplies an exponential moving average over a window samples.
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?
MessageAnnotatorWrap every message in a DictStrPmt and add fixed additional fields, to facilitate multiplexing w/o losing the source association
MessageApplyApply a function to each message, emitting the result as a new message.
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.

§I/O

BlockUsageWebAssembly?
BlobToUdpPush blobs into a UDP socket.
ChannelSourcePush samples through a channel into a stream connection.
ChannelSinkRead samples from Flowgraph and send them into a channel
FileSinkWrite samples to a file.
FileSourceRead samples from a file.
TcpSourceReads samples from a TCP socket.
TcpSinkPush samples into a TCP socket.
UdpSourceReads samples from a UDP socket.
WebsocketSinkPush samples in a WebSocket.
WebsocketPmtSinkPush samples from Pmts a WebSocket.
zeromq::PubSinkPush samples into ZeroMQ socket.
zeromq::SubSourceRead samples from ZeroMQ socket.

§SDR Hardware

BlockUsageFeatureWebAssembly?
seify::SinkTransmit samples with a Seify device.seify
seify::SourceReceive samples from a Seify device.seify
seify::AsyncSinkTransmit samples with an async Seify device.seify
seify::AsyncSourceReceive samples from an async Seify device.seify

§Hardware Acceleration

BlockUsageWebAssembly?Feature
WgpuInterface GPU w/ native API.wgpu

§WASM-specific (target wasm32-unknown-unknown)

BlockUsageWebAssembly?
WasmWsSinkSend samples via a WebSocket.

§Signal Sources

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

§Audio (requires audio feature)

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

Re-exports§

pub use signal_source::FixedPointPhase;
pub use signal_source::SignalSource;
pub use signal_source::SignalSourceBuilder;
pub use xlating_fir::XlatingFir;

Modules§

signal_source
SignalSource using Lookup Tables
xlating_fir
Frequency Xlating FIR

Structs§

Apply
Apply a function to each sample.
ApplyIntoIter
Apply a function on each input sample to create an iterator and output its values.
ApplyNM
Apply a function to each N input samples, producing M output samples.
BlobToUdp
Push Blobs into a UDP socket.
ChannelSink
Get samples out of a Flowgraph into a channel.
ChannelSource
Push samples through a channel into a stream connection.
Combine
Apply a function to combine two streams into one.
Copy
Copy input samples to the output.
Delay
Delays samples.
Fft
Compute an FFT.
FileSink
Write samples to a file.
FileSource
Read samples from a file.
Filter
Apply a function, returning an Option to allow filtering samples.
FiniteSource
Repeatedly apply a function to generate samples, using Option values to allow termination.
Fir
FIR filter.
FirBuilder
Create a Fir filter.
Head
Copies only a given number of samples and stops.
Iir
IIR filter.
IirBuilder
Create an Iir filter with default stream buffers.
MessageAnnotator
Add fixed fields to messages.
MessageApply
This Block applies a callback function to incoming messages, emitting the result as a new message.
MessageBurst
Output a given number of messages in one burst and terminate.
MessageCopy
Forward messages.
MessagePipe
Push received messages into a channel.
MessageSink
Black hole for messages.
MessageSource
Output the same message periodically.
MessageSourceBuilder
Repeats a fixed message on an interval
MovingAvg
Reads chunks of size WIDTH and outputs an exponential moving average over a window of specified size.
NullSink
Drop samples.
NullSource
Generate a stream of zeroes.
PfbArbResampler
Polyphase arbitrary rate resampler.
PfbChannelizer
Polyphase channelizer.
PfbSynthesizer
Polyphase Synthesizer.
Selector
Forward the input stream with a given index to the output stream with a given index.
Sink
Apply a function to received samples.
Source
Repeatedly apply a function to generate samples.
Split
Apply a function to split a stream.
StreamDeinterleaver
Deinterleave one stream into num_channels output streams.
StreamDuplicator
Duplicate one input stream into N output streams.
TagDebug
Drop samples, printing tags.
TcpSink
Push samples into a TCP socket.
TcpSource
Read samples from a TCP socket.
Throttle
Limit sample rate.
UdpSource
Read samples from a UDP socket.
VectorSink
Store received samples in vector.
VectorSource
Stream samples from vector.
WebsocketPmtSink
Push Samples from PMTs in a WebSocket.
WebsocketSink
Push samples in a WebSocket.
WebsocketSinkBuilder
Build a WebsocketSink.

Enums§

FftDirection
Fft direction.
SelectorDropPolicy
Drop Policy for Selector block
WebsocketSinkMode
Operation mode for WebsocketSink.