Skip to main content

Scope

Struct Scope 

Source
pub struct Scope<'a> { /* private fields */ }
Expand description

Handle for an oscilloscope net: an instrument (scope) or one of its channels (scope-channel). See the module docs for which actions need a channel net.

Implementations§

Source§

impl<'a> Scope<'a>

Source

pub fn name(&self) -> &str

Name of the net this handle drives.

Source

pub fn enable(&self) -> Result<()>

Turn this net’s channel on.

Source

pub fn disable(&self) -> Result<()>

Turn this net’s channel off.

Source

pub fn is_enabled(&self) -> Result<bool>

Whether this net’s channel is on, as the instrument reports it.

Source

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

Start continuous acquisition.

Source

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

Arm for a single acquisition.

Source

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

Stop acquisition.

Source

pub fn force_trigger(&self) -> Result<()>

Force a trigger now.

Source

pub fn autoscale(&self) -> Result<()>

Let the instrument pick scale, timebase and trigger.

Source

pub fn set_scale(&self, volts_per_div: f64) -> Result<()>

Set this channel’s vertical scale (V/div).

Source

pub fn scale(&self) -> Result<f64>

This channel’s vertical scale (V/div).

Source

pub fn set_timebase(&self, seconds_per_div: f64) -> Result<()>

Set the timebase (s/div).

Source

pub fn timebase(&self) -> Result<f64>

The timebase (s/div).

Source

pub fn set_coupling(&self, mode: &str) -> Result<()>

Set this channel’s input coupling ("dc", "ac"; a Rigol also takes "gnd").

Source

pub fn coupling(&self) -> Result<String>

This channel’s input coupling.

Source

pub fn set_probe(&self, ratio: f64) -> Result<()>

Set this channel’s probe attenuation (1 for 1x, 10 for 10x).

Source

pub fn probe(&self) -> Result<f64>

This channel’s probe attenuation.

Source

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

Set this channel’s vertical offset (V).

Source

pub fn offset(&self) -> Result<f64>

This channel’s vertical offset (V).

Source

pub fn set_time_offset(&self, seconds: f64) -> Result<()>

Move the capture window in time relative to the trigger (s).

Source

pub fn time_offset(&self) -> Result<f64>

The capture window’s time offset from the trigger (s).

Source

pub fn trigger_edge(&self, trigger: &EdgeTrigger) -> Result<()>

Configure the edge trigger, applying only the fields that are set.

Source

pub fn trigger(&self) -> Result<TriggerSettings>

The trigger as the instrument has it.

Source

pub fn measure(&self, m: Measurement) -> Result<Option<f64>>

Read one quantity from this channel. None when the capture does not contain it (a period on a DC level).

Source

pub fn measure_all(&self) -> Result<Measurements>

Every quantity this channel’s capture supports, read from one capture so the values agree with each other.

Source

pub fn command(&self, action: &str, params: Value) -> Result<Value>

Run any other scope action by name with raw JSON params, and return its value (null when it has none): capabilities, get_state, set_acquire, set_trigger_holdoff, set_roll, fft, the cursor actions, and so on.

Trait Implementations§

Source§

impl<'a> Clone for Scope<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Scope<'a>

§

impl<'a> !UnwindSafe for Scope<'a>

§

impl<'a> Freeze for Scope<'a>

§

impl<'a> Send for Scope<'a>

§

impl<'a> Sync for Scope<'a>

§

impl<'a> Unpin for Scope<'a>

§

impl<'a> UnsafeUnpin for Scope<'a>

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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