pub struct Oscilloscope { /* private fields */ }Expand description
Oscilloscope session view (IVI-inspired / SCPI :TIMebase, :CHANnel, :WAVeform).
Implementations§
Source§impl Oscilloscope
impl Oscilloscope
pub fn new(session: InstrumentSession) -> Self
pub fn session(&self) -> &InstrumentSession
pub fn session_mut(&mut self) -> &mut InstrumentSession
Sourcepub fn set_timebase_scale(&mut self, seconds_per_div: f64) -> Result<()>
pub fn set_timebase_scale(&mut self, seconds_per_div: f64) -> Result<()>
Sets horizontal timebase scale in seconds per division (SI).
Sourcepub fn read_timebase_scale(&mut self) -> Result<f64>
pub fn read_timebase_scale(&mut self) -> Result<f64>
Reads horizontal timebase scale in seconds per division (SI).
Sourcepub fn set_channel_scale(
&mut self,
channel: u32,
volts_per_div: f64,
) -> Result<()>
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).
Sourcepub fn set_channel_display(&mut self, channel: u32, enabled: bool) -> Result<()>
pub fn set_channel_display(&mut self, channel: u32, enabled: bool) -> Result<()>
Enables or disables channel display.
Sourcepub fn set_channel_coupling(
&mut self,
channel: u32,
coupling: &str,
) -> Result<()>
pub fn set_channel_coupling( &mut self, channel: u32, coupling: &str, ) -> Result<()>
Sets channel coupling (DC, AC, or GND).
Sourcepub fn set_trigger_source(&mut self, source: &str) -> Result<()>
pub fn set_trigger_source(&mut self, source: &str) -> Result<()>
Sets edge trigger source (e.g. CHAN1, EXT).
Sourcepub fn set_trigger_level(&mut self, volts: f64) -> Result<()>
pub fn set_trigger_level(&mut self, volts: f64) -> Result<()>
Sets edge trigger level in volts (SI).
Sourcepub fn set_trigger_slope(&mut self, slope: &str) -> Result<()>
pub fn set_trigger_slope(&mut self, slope: &str) -> Result<()>
Sets edge trigger slope (POS or NEG).
Sourcepub fn measure_vpp(&mut self, channel: u32) -> Result<f64>
pub fn measure_vpp(&mut self, channel: u32) -> Result<f64>
Measures peak-to-peak voltage on a channel (SI volts).
Sourcepub fn measure_frequency(&mut self, channel: u32) -> Result<f64>
pub fn measure_frequency(&mut self, channel: u32) -> Result<f64>
Measures frequency on a channel (SI hertz).
Sourcepub fn capture_voltage_trace(&mut self, channel: u32) -> Result<VoltageTrace>
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§
impl !RefUnwindSafe for Oscilloscope
impl !Sync for Oscilloscope
impl !UnwindSafe for Oscilloscope
impl Freeze for Oscilloscope
impl Send for Oscilloscope
impl Unpin for Oscilloscope
impl UnsafeUnpin for Oscilloscope
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