[][src]Struct rtlsdr_mt::Controller

pub struct Controller(_);

Controls hardware parameters.

Methods

impl Controller[src]

pub fn sample_rate(&self) -> u32[src]

Get the current sample rate (megasamples/sec).

pub fn set_sample_rate(&mut self, rate: u32) -> Result<()>[src]

Set the sample rate (megasamples/sec).

pub fn center_freq(&self) -> u32[src]

Get the current center frequency (Hz).

pub fn set_center_freq(&mut self, freq: u32) -> Result<()>[src]

Set the center frequency (Hz).

pub fn set_bandwidth(&mut self, bw: u32) -> Result<()>[src]

Set tuner bandwidth (Hz).

Note that this is not bit DEPTH which is fixed at 8 in hardware.

pub fn ppm(&self) -> i32[src]

Get the current frequency correction (ppm).

pub fn set_ppm(&mut self, ppm: i32) -> Result<()>[src]

Set the frequency correction (ppm).

pub fn enable_agc(&mut self) -> Result<()>[src]

Enable the hardware AGC.

Note that this also disables manual tuner gain.

pub fn disable_agc(&mut self) -> Result<()>[src]

Disable the hardware AGC.

Note that this also enables manual tuner gain.

pub fn tuner_gains<'a>(&self, gains: &'a mut TunerGains) -> &'a [i32][src]

Get the list of valid tuner gain values.

Each value represents a dB gain with the decimal place shifted right. For example, the value 496 represents 49.6dB.

pub fn tuner_gain(&self) -> i32[src]

Get the current tuner gain in the same format as that returned by tuner_gains().

pub fn set_tuner_gain(&mut self, gain: i32) -> Result<()>[src]

Set the tuner gain in the same format as that returned by tuner_gains().

Note that this also disables the hardware AGC.

pub fn cancel_async_read(&mut self)[src]

Cancel an asynchronous read if one is running.

Trait Implementations

impl Send for Controller[src]

Auto Trait Implementations

impl !Sync for Controller

impl Unpin for Controller

impl UnwindSafe for Controller

impl RefUnwindSafe for Controller

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]