Skip to main content

SpectrumAnalyzer

Struct SpectrumAnalyzer 

Source
pub struct SpectrumAnalyzer { /* private fields */ }
Expand description

Spectrum analyzer session view.

Implementations§

Source§

impl SpectrumAnalyzer

Source

pub fn new(session: InstrumentSession) -> Self

Source

pub fn session(&self) -> &InstrumentSession

Source

pub fn session_mut(&mut self) -> &mut InstrumentSession

Source

pub fn set_center_frequency(&mut self, hz: f64) -> Result<()>

Sets center frequency in hertz (SI).

Source

pub fn set_span(&mut self, hz: f64) -> Result<()>

Sets frequency span in hertz (SI).

Source

pub fn set_rbw(&mut self, hz: f64) -> Result<()>

Sets resolution bandwidth in hertz (SI).

Source

pub fn set_vbw(&mut self, hz: f64) -> Result<()>

Sets video bandwidth in hertz (SI).

Source

pub fn set_ref_level(&mut self, dbm: f64) -> Result<()>

Sets reference level in dBm.

Source

pub fn fetch_trace_ascii(&mut self) -> Result<Vec<f64>>

Fetches TRACE1 as ASCII comma-separated amplitude samples.

Source

pub fn marker_peak(&mut self) -> Result<()>

Moves marker to peak.

Source

pub fn marker_x(&mut self) -> Result<f64>

Reads marker X (typically frequency in Hz).

Source

pub fn marker_y(&mut self) -> Result<f64>

Reads marker Y (typically amplitude in dBm).

Source

pub fn sweep_continuous(&mut self, enabled: bool) -> Result<()>

Enables or disables continuous sweep.

Source

pub fn single_sweep(&mut self) -> Result<()>

Triggers a single sweep.

Source

pub fn wait_opc(&mut self) -> Result<()>

Waits for operation complete (*OPC?).

Source

pub fn write_dialect_command( &mut self, key: &str, vars: &[(&str, String)], ) -> Result<()>

Writes a dialect-formatted command (advanced).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more