Expand description
Rust SDR hardware abstraction over multiple radio backends.
Seify provides one API for probing, opening, configuring, and streaming from
SDR devices. Applications can use typed devices when the concrete backend is
known at compile time, or DynDevice when a driver is selected at runtime
through Args.
§Driver features
The default feature set enables the soapy backend. Other backends are
enabled with Cargo features such as rtlsdr, hackrf, hydrasdr, pluto,
uhd, bladerf1, aaronia_http, and dummy.
Async applications that use nusb-based drivers on native targets should
enable exactly one of smol or tokio for runtime integration. For example,
native HackRF, HydraSDR and bladeRF 1 async support combines the driver
feature with either runtime. On wasm32-unknown-unknown, these drivers use
WebUSB without a runtime feature and only their async Seify backends are
available. A worker-based WebUSB application should call
AsyncRegistry::request_permission from a browser-window user gesture, then
probe or open the authorized device inside its worker.
Native Rust drivers are still experimental. For production use and the widest set of stable hardware integrations, prefer the SoapySDR backend.
§Example
use num_complex::Complex32;
use seify::{DynDevice, RxStreamer};
let dev = DynDevice::from_args("driver=soapy")?;
let rx0 = dev.rx(0)?;
let mut rx = rx0.streamer()?;
let mut samples = [Complex32::new(0.0, 0.0); 1024];
rx.activate()?;
let n = rx.read(&mut [&mut samples], 200_000)?;
println!("read {n} samples");Modules§
- dev
- Device development traits and type-erased runtime-dispatch adapters.
- impls
- Hardware drivers, implementing Seify’s capability traits.
Macros§
- impl_
dyn_ async_ device_ backend - Implement runtime dispatch for an asynchronous device backend.
- impl_
dyn_ device_ backend - Implement runtime dispatch for a synchronous device backend.
Structs§
- Agc
- Automatic gain control handle for one channel.
- Antenna
- Antenna control handle for one channel.
- Args
- Arbitrary arguments and parameters.
- Async
Agc - Asynchronous automatic gain control handle for one channel.
- Async
Antenna - Asynchronous antenna control handle for one channel.
- Async
Bandwidth - Asynchronous bandwidth control handle for one channel.
- Async
DcOffset - Asynchronous automatic DC offset correction handle for one channel.
- Async
Device - Wraps an asynchronous driver implementation.
- Async
Frequency - Asynchronous frequency control handle for one channel.
- Async
Gain - Asynchronous gain control handle for one channel.
- Async
Registry - Registry of asynchronous driver discovery/opening backends.
- Async
RxChannel - RX channel handle for asynchronous devices.
- Async
Sample Rate - Asynchronous sample-rate control handle for one channel.
- Async
TxChannel - TX channel handle for asynchronous devices.
- Bandwidth
- Bandwidth control handle for one channel.
- Channel
Capabilities - Structured runtime capabilities for one channel.
- Channel
Controls - Optional controls exposed by one channel.
- DcOffset
- Automatic DC offset correction handle for one channel.
- Device
- Wraps a driver implementation.
- Device
Capabilities - Structured runtime capabilities for a device.
- Device
Descriptor - Discovered device descriptor.
- DynAsync
Device - Runtime-dispatched asynchronous opened device.
- DynDevice
- Runtime-dispatched opened device.
- Frequency
- Frequency control handle for one channel.
- Frequency
Component - Frequency component handle for one channel.
- Gain
- Gain control handle for one channel.
- Gain
Element - Gain element handle for one channel.
- Range
- Nonempty range of finite values, comprised of individual values and/or intervals.
- Registry
- Registry of driver discovery/opening backends.
- RxChannel
- RX channel handle.
- Sample
Rate - Sample-rate control handle for one channel.
- TxChannel
- TX channel handle.
Enums§
- Capability
- Device or channel capability used in semantic errors.
- Direction
- Signal direction.
- Driver
- Supported hardware drivers.
- Driver
Error - Driver-specific error details.
- Error
- Error returned by Seify operations.
- Range
Item - Component of a Range.
Traits§
- AgcControl
- Automatic gain control capability.
- Antenna
Control - Antenna control capability.
- Async
AgcControl - Asynchronous automatic gain control capability.
- Async
Antenna Control - Asynchronous antenna control capability.
- Async
Bandwidth Control - Asynchronous bandwidth control capability.
- Async
DcOffset Control - Asynchronous automatic DC offset correction capability.
- Async
Device Info - Basic asynchronous device metadata.
- Async
Frequency Control - Asynchronous frequency control capability.
- Async
Future Ext - Extension trait for boxing futures into
BoxedFuture. - Async
Gain Control - Asynchronous gain control capability.
- Async
RxDevice - Asynchronous RX streaming capability.
- Async
RxStreamer - Asynchronous receive streamer.
- Async
Sample Rate Control - Asynchronous sample-rate control capability.
- Async
TxDevice - Asynchronous TX streaming capability.
- Async
TxStreamer - Asynchronous transmit streamer.
- Bandwidth
Control - Bandwidth control capability.
- DcOffset
Control - Automatic DC offset correction capability.
- Device
Info - Basic device metadata.
- Frequency
Control - Frequency control capability.
- Gain
Control - Gain control capability.
- Maybe
Send - Marker for types that must be
Sendon native targets. - Maybe
Sync - Marker for types that must be
Syncon native targets. - RxDevice
- RX streaming capability.
- RxStreamer
- Receive samples from a Device through one or multiple channels.
- Sample
Rate Control - Sample-rate control capability.
- TxDevice
- TX streaming capability.
- TxStreamer
- Transmit samples with a Device through one or multiple channels.
Functions§
- enumerate
- Enumerate devices.
- enumerate_
with_ args - Enumerate devices with given
Args.
Type Aliases§
- Boxed
Future - Boxed future used by Seify’s asynchronous API.
- DynAsync
RxStreamer - Type-erased asynchronous RX streamer.
- DynAsync
TxStreamer - Type-erased asynchronous TX streamer.
- DynRx
Streamer - Type-erased RX streamer.
- DynTx
Streamer - Type-erased TX streamer.