Expand description
Software defined radio
§Getting started
For getting started, have a look at the blocks
module for a selection
of ready-to-use signal processing blocks and see the “Hello World” example
below.
§Hello World example
The following example requires the cpal
feature to be enabled.
use radiorust::prelude::*;
#[tokio::main]
async fn main() {
let morse_keyer = blocks::morse::Keyer::with_message(
4096,
48000.0,
blocks::morse::Speed::from_paris_wpm(16.0),
"<CT> Hello World <AR>",
).unwrap();
let audio_modulator = blocks::FreqShifter::with_shift(700.0);
audio_modulator.feed_from(&morse_keyer);
let playback = blocks::io::audio::cpal::AudioPlayer::new(48000.0, None).unwrap();
playback.feed_from(&audio_modulator);
playback.wait_for_event(|event| {
event.as_any().is::<blocks::morse::events::EndOfMessages>()
}).await;
}
Modules§
- blocks
- Signal processing blocks that can be connected with each other
- bufferpool
- Pools allowing to get buffers that are recycled when dropped
- flow
- Data flow between signal processing blocks
- math
- Mathematic functions helpful for signal processing
- metering
- Metering (e.g. level or bandwidth measurement)
- numbers
- Generic floats and complex numbers
- prelude
- Re-export of certain important items
- signal
Signal
type containing sample data and events, and handling of those events- sync
- Synchonization primitives
- windowing
- Window functions
Macros§
- flt
- Convert number into a generic
Float
type, which must be in scope as “Flt
” - impl_
block_ trait - Implement
Consumer
,Producer
, and/orEventHandling
for a signal processing block