Skip to main content

Crate seify

Crate seify 

Source
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.
AsyncAgc
Asynchronous automatic gain control handle for one channel.
AsyncAntenna
Asynchronous antenna control handle for one channel.
AsyncBandwidth
Asynchronous bandwidth control handle for one channel.
AsyncDcOffset
Asynchronous automatic DC offset correction handle for one channel.
AsyncDevice
Wraps an asynchronous driver implementation.
AsyncFrequency
Asynchronous frequency control handle for one channel.
AsyncGain
Asynchronous gain control handle for one channel.
AsyncRegistry
Registry of asynchronous driver discovery/opening backends.
AsyncRxChannel
RX channel handle for asynchronous devices.
AsyncSampleRate
Asynchronous sample-rate control handle for one channel.
AsyncTxChannel
TX channel handle for asynchronous devices.
Bandwidth
Bandwidth control handle for one channel.
ChannelCapabilities
Structured runtime capabilities for one channel.
ChannelControls
Optional controls exposed by one channel.
DcOffset
Automatic DC offset correction handle for one channel.
Device
Wraps a driver implementation.
DeviceCapabilities
Structured runtime capabilities for a device.
DeviceDescriptor
Discovered device descriptor.
DynAsyncDevice
Runtime-dispatched asynchronous opened device.
DynDevice
Runtime-dispatched opened device.
Frequency
Frequency control handle for one channel.
FrequencyComponent
Frequency component handle for one channel.
Gain
Gain control handle for one channel.
GainElement
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.
SampleRate
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.
DriverError
Driver-specific error details.
Error
Error returned by Seify operations.
RangeItem
Component of a Range.

Traits§

AgcControl
Automatic gain control capability.
AntennaControl
Antenna control capability.
AsyncAgcControl
Asynchronous automatic gain control capability.
AsyncAntennaControl
Asynchronous antenna control capability.
AsyncBandwidthControl
Asynchronous bandwidth control capability.
AsyncDcOffsetControl
Asynchronous automatic DC offset correction capability.
AsyncDeviceInfo
Basic asynchronous device metadata.
AsyncFrequencyControl
Asynchronous frequency control capability.
AsyncFutureExt
Extension trait for boxing futures into BoxedFuture.
AsyncGainControl
Asynchronous gain control capability.
AsyncRxDevice
Asynchronous RX streaming capability.
AsyncRxStreamer
Asynchronous receive streamer.
AsyncSampleRateControl
Asynchronous sample-rate control capability.
AsyncTxDevice
Asynchronous TX streaming capability.
AsyncTxStreamer
Asynchronous transmit streamer.
BandwidthControl
Bandwidth control capability.
DcOffsetControl
Automatic DC offset correction capability.
DeviceInfo
Basic device metadata.
FrequencyControl
Frequency control capability.
GainControl
Gain control capability.
MaybeSend
Marker for types that must be Send on native targets.
MaybeSync
Marker for types that must be Sync on native targets.
RxDevice
RX streaming capability.
RxStreamer
Receive samples from a Device through one or multiple channels.
SampleRateControl
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§

BoxedFuture
Boxed future used by Seify’s asynchronous API.
DynAsyncRxStreamer
Type-erased asynchronous RX streamer.
DynAsyncTxStreamer
Type-erased asynchronous TX streamer.
DynRxStreamer
Type-erased RX streamer.
DynTxStreamer
Type-erased TX streamer.