Expand description
Library of common blocks that are not tied to a specific technology.
§Block Library
§Functional/Apply-style Blocks
| Block | Usage | WebAssembly? |
|---|---|---|
| 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. | ✅ |
| Combine | Apply a function to combine two streams into one. | ✅ |
| Filter | Apply a function, returning an Option to allow filtering samples. | ✅ |
| Sink | Apply a function to received samples. | ✅ |
| Source | Repeatedly apply a function to generate samples. | ✅ |
| Split | Apply a function to split a stream. | ✅ |
| FiniteSource | Repeatedly apply a function to generate samples, using Option values to allow termination. | ✅ |
§Streams
| Block | Usage | WebAssembly? |
|---|---|---|
| StreamDeinterleaver | Stream Deinterleave | ✅ |
| StreamDuplicator | Stream Duplicator | ✅ |
§DSP blocks
| Block | Usage | WebAssembly? |
|---|---|---|
| Fft | Compute an FFT. | ✅ |
| Fir | FIR filter and resampler. | ✅ |
| Iir | IIR filter. | ✅ |
| PfbArbResampler | Polyphase Arbitrary Rate Resampler | ✅ |
| PfbChannelizer | Polyphase Channelizer | ✅ |
| PfbSynthesizer | Polyphase Synthesizer | ✅ |
| XlatingFir | Xlating FIR filter and decimator. | ✅ |
§Misc
| Block | Usage | WebAssembly? |
|---|---|---|
| Delay | Delays samples. | ✅ |
| Head | Copies only a given number of samples and stops. | ✅ |
| MovingAvg | Applies an exponential moving average over a window samples. | ✅ |
| NullSink | Drops samples. | ✅ |
| NullSource | Generates a stream of zeros. | ✅ |
| Selector | Forward the input stream with a given index to the output stream with a given index. | ✅ |
| TagDebug | Drop samples, printing tags. | ✅ |
| Throttle | Limit sample rate. | ✅ |
| VectorSink | Store received samples in vector. | ✅ |
| VectorSource | Stream samples from vector. | ✅ |
§Message Passing
| Block | Usage | WebAssembly? |
|---|---|---|
| MessageAnnotator | Wrap every message in a DictStrPmt and add fixed additional fields, to facilitate multiplexing w/o losing the source association | ✅ |
| MessageApply | Apply a function to each message, 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. | ✅ |
§Performance Evaluation
| Block | Usage | WebAssembly? | Feature |
|---|---|---|---|
| Copy | Copy input samples to the output. | ✅ |
§I/O
| Block | Usage | WebAssembly? |
|---|---|---|
| BlobToUdp | Push blobs into a UDP socket. | ❌ |
| ChannelSource | Push samples through a channel into a stream connection. | ✅ |
| ChannelSink | Read samples from Flowgraph and send them into a channel | ✅ |
| FileSink | Write samples to a file. | ❌ |
| FileSource | Read samples from a file. | ❌ |
| TcpSource | Reads samples from a TCP socket. | ❌ |
| TcpSink | Push samples into a TCP socket. | ❌ |
| UdpSource | Reads samples from a UDP socket. | ❌ |
| WebsocketSink | Push samples in a WebSocket. | ❌ |
| WebsocketPmtSink | Push samples from Pmts a WebSocket. | ❌ |
zeromq::PubSink | Push samples into ZeroMQ socket. | ❌ |
zeromq::SubSource | Read samples from ZeroMQ socket. | ❌ |
§SDR Hardware
| Block | Usage | Feature | WebAssembly? |
|---|---|---|---|
seify::Sink | Transmit samples with a Seify device. | seify | ❌ |
seify::Source | Receive samples from a Seify device. | seify | ❌ |
seify::AsyncSink | Transmit samples with an async Seify device. | seify | ✅ |
seify::AsyncSource | Receive samples from an async Seify device. | seify | ✅ |
§Hardware Acceleration
| Block | Usage | WebAssembly? | Feature |
|---|---|---|---|
Wgpu | Interface GPU w/ native API. | ✅ | wgpu |
§WASM-specific (target wasm32-unknown-unknown)
| Block | Usage | WebAssembly? |
|---|---|---|
| WasmWsSink | Send samples via a WebSocket. | ✅ |
§Signal Sources
| Block | Usage | WebAssembly? |
|---|---|---|
| SignalSource | Create signals (sin, cos, square). | ✅ |
§Audio (requires audio feature)
| Block | Usage | WebAssembly? |
|---|---|---|
audio::AudioSink | Audio sink. | ❌ |
audio::AudioSource | Audio source. | ❌ |
audio::FileSource | Read an audio file and output its samples. | ❌ |
audio::WavSink | Writes 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.
- Apply
Into Iter - 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.
- Blob
ToUdp - Push Blobs into a UDP socket.
- Channel
Sink - Get samples out of a Flowgraph into a channel.
- Channel
Source - 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.
- File
Sink - Write samples to a file.
- File
Source - Read samples from a file.
- Filter
- Apply a function, returning an Option to allow filtering samples.
- Finite
Source - 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
Iirfilter with default stream buffers. - Message
Annotator - Add fixed fields to messages.
- Message
Apply - This
Blockapplies a callback function to incoming messages, emitting the result as a new message. - Message
Burst - Output a given number of messages in one burst and terminate.
- Message
Copy - Forward messages.
- Message
Pipe - Push received messages into a channel.
- Message
Sink - Black hole for messages.
- Message
Source - Output the same message periodically.
- Message
Source Builder - Repeats a fixed message on an interval
- Moving
Avg - Reads chunks of size
WIDTHand outputs an exponential moving average over a window of specified size. - Null
Sink - Drop samples.
- Null
Source - Generate a stream of zeroes.
- PfbArb
Resampler - 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.
- Stream
Deinterleaver - Deinterleave one stream into
num_channelsoutput streams. - Stream
Duplicator - Duplicate one input stream into
Noutput 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.
- Vector
Sink - Store received samples in vector.
- Vector
Source - Stream samples from vector.
- Websocket
PmtSink - Push Samples from PMTs in a WebSocket.
- Websocket
Sink - Push samples in a WebSocket.
- Websocket
Sink Builder - Build a WebsocketSink.
Enums§
- FftDirection
- Fft direction.
- Selector
Drop Policy - Drop Policy for
Selectorblock - Websocket
Sink Mode - Operation mode for WebsocketSink.