Skip to main content

Oscilloscope

Struct Oscilloscope 

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

Oscilloscope session view (IVI-inspired / SCPI :TIMebase, :CHANnel, :WAVeform).

Implementations§

Source§

impl Oscilloscope

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_timebase_scale(&mut self, seconds_per_div: f64) -> Result<()>

Sets horizontal timebase scale in seconds per division (SI).

Source

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

Reads horizontal timebase scale in seconds per division (SI).

Source

pub fn set_channel_scale( &mut self, channel: u32, volts_per_div: f64, ) -> Result<()>

Sets vertical scale for a channel in volts per division (SI).

Source

pub fn set_channel_display(&mut self, channel: u32, enabled: bool) -> Result<()>

Enables or disables channel display.

Source

pub fn set_channel_coupling( &mut self, channel: u32, coupling: &str, ) -> Result<()>

Sets channel coupling (DC, AC, or GND).

Source

pub fn set_trigger_source(&mut self, source: &str) -> Result<()>

Sets edge trigger source (e.g. CHAN1, EXT).

Source

pub fn set_trigger_level(&mut self, volts: f64) -> Result<()>

Sets edge trigger level in volts (SI).

Source

pub fn set_trigger_slope(&mut self, slope: &str) -> Result<()>

Sets edge trigger slope (POS or NEG).

Source

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

Starts acquisition.

Source

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

Stops acquisition.

Source

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

Arms a single acquisition.

Source

pub fn measure_vpp(&mut self, channel: u32) -> Result<f64>

Measures peak-to-peak voltage on a channel (SI volts).

Source

pub fn measure_frequency(&mut self, channel: u32) -> Result<f64>

Measures frequency on a channel (SI hertz).

Source

pub fn capture_voltage_trace(&mut self, channel: u32) -> Result<VoltageTrace>

Captures a voltage trace from a channel (1-based). ASCII only; binary #N is deferred.

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