pub enum DeviceConfig {}Trait Implementations§
Source§impl Clone for DeviceConfig
impl Clone for DeviceConfig
Source§fn clone(&self) -> DeviceConfig
fn clone(&self) -> DeviceConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeviceConfig
impl Debug for DeviceConfig
Source§impl FromStr for DeviceConfig
impl FromStr for DeviceConfig
Source§fn from_str(s: &str) -> Result<Self>
fn from_str(s: &str) -> Result<Self>
Parse device configuration from URL-style string
Supported formats:
rtlsdr://[device_index]?freq=<hz>&rate=<hz>&gain=<db|auto>&bias_tee=<bool>soapy://<driver>?freq=<hz>&rate=<hz>&gain=<db|auto>&bias_tee=<bool>pluto://<uri>?freq=<hz>&gain=<db|auto>
For RTL-SDR, if device_index is omitted, it defaults to 0 (first device).
For PlutoSDR, the URI can be:
- An IP address:
pluto://192.168.2.1 - With ip: prefix:
pluto://ip:192.168.2.1 - USB device:
pluto://usb:orpluto:///usb:1.18.5(use triple slash for URIs with colons/dots)
Frequency and sample rate values support SI suffixes (k/K, M, G):
1090M= 1,090,000,000 Hz2.4M= 2,400,000 Hz1090000000(raw Hz values also supported)
§Examples
use desperado::DeviceConfig;
use std::str::FromStr;
// RTL-SDR with SI suffixes (most convenient)
let config = DeviceConfig::from_str("rtlsdr://0?freq=1090M&rate=2.4M&gain=auto").unwrap();
// RTL-SDR with raw Hz values
let config = DeviceConfig::from_str("rtlsdr://0?freq=1090000000&rate=2400000&gain=auto").unwrap();
// RTL-SDR first available device (implicit device 0)
let config = DeviceConfig::from_str("rtlsdr://?freq=1090M&rate=2.4M&gain=49.6").unwrap();use desperado::DeviceConfig;
use std::str::FromStr;
// PlutoSDR with IP address
let config = DeviceConfig::from_str("pluto://192.168.2.1?freq=1090M&rate=2.4M&gain=40").unwrap();
// PlutoSDR with explicit ip: prefix
let config = DeviceConfig::from_str("pluto://ip:192.168.2.1?freq=1090M&rate=2.4M&gain=40").unwrap();
// PlutoSDR via USB (use triple slash for USB URIs with version numbers)
let config = DeviceConfig::from_str("pluto:///usb:1.18.5?freq=1090M&rate=2.4M&gain=40").unwrap();Source§impl PartialEq for DeviceConfig
impl PartialEq for DeviceConfig
impl StructuralPartialEq for DeviceConfig
Auto Trait Implementations§
impl Freeze for DeviceConfig
impl RefUnwindSafe for DeviceConfig
impl Send for DeviceConfig
impl Sync for DeviceConfig
impl Unpin for DeviceConfig
impl UnwindSafe for DeviceConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more