Struct PS2000Loader

Source
pub struct PS2000Loader {
Show 34 fields pub ps2000_apply_fix: Result<unsafe extern "C" fn(u32, u16), Error>, pub ps2000_open_unit: Result<unsafe extern "C" fn() -> i16, Error>, pub ps2000_get_unit_info: Result<unsafe extern "C" fn(i16, *mut i8, i16, i16) -> i16, Error>, pub ps2000_flash_led: Result<unsafe extern "C" fn(i16) -> i16, Error>, pub ps2000_close_unit: Result<unsafe extern "C" fn(i16) -> i16, Error>, pub ps2000_set_channel: Result<unsafe extern "C" fn(i16, i16, i16, i16, i16) -> i16, Error>, pub ps2000_get_timebase: Result<unsafe extern "C" fn(i16, i16, i32, *mut i32, *mut i16, i16, *mut i32) -> i16, Error>, pub ps2000_set_trigger: Result<unsafe extern "C" fn(i16, i16, i16, i16, i16, i16) -> i16, Error>, pub ps2000_set_trigger2: Result<unsafe extern "C" fn(i16, i16, i16, i16, f32, i16) -> i16, Error>, pub ps2000_run_block: Result<unsafe extern "C" fn(i16, i32, i16, i16, *mut i32) -> i16, Error>, pub ps2000_run_streaming: Result<unsafe extern "C" fn(i16, i16, i32, i16) -> i16, Error>, pub ps2000_run_streaming_ns: Result<unsafe extern "C" fn(i16, u32, u32, u32, i16, u32, u32) -> i16, Error>, pub ps2000_ready: Result<unsafe extern "C" fn(i16) -> i16, Error>, pub ps2000_stop: Result<unsafe extern "C" fn(i16) -> i16, Error>, pub ps2000_get_values: Result<unsafe extern "C" fn(i16, *mut i16, *mut i16, *mut i16, *mut i16, *mut i16, i32) -> i32, Error>, pub ps2000_get_times_and_values: Result<unsafe extern "C" fn(i16, *mut i32, *mut i16, *mut i16, *mut i16, *mut i16, *mut i16, i16, i32) -> i32, Error>, pub ps2000_last_button_press: Result<unsafe extern "C" fn(i16) -> i16, Error>, pub ps2000_set_ets: Result<unsafe extern "C" fn(i16, i16, i16, i16) -> i32, Error>, pub ps2000_set_led: Result<unsafe extern "C" fn(i16, i16) -> i16, Error>, pub ps2000_open_unit_async: Result<unsafe extern "C" fn() -> i16, Error>, pub ps2000_open_unit_progress: Result<unsafe extern "C" fn(*mut i16, *mut i16) -> i16, Error>, pub ps2000_get_streaming_last_values: Result<unsafe extern "C" fn(i16, Option<extern "C" fn(*mut *mut i16, i16, u32, i16, i16, u32)>) -> i16, Error>, pub ps2000_overview_buffer_status: Result<unsafe extern "C" fn(i16, *mut i16) -> i16, Error>, pub ps2000_get_streaming_values: Result<unsafe extern "C" fn(i16, *mut f64, *mut i16, *mut i16, *mut i16, *mut i16, *mut i16, *mut i16, *mut i16, *mut i16, *mut i16, *mut u32, *mut i16, u32, u32) -> u32, Error>, pub ps2000_get_streaming_values_no_aggregation: Result<unsafe extern "C" fn(i16, *mut f64, *mut i16, *mut i16, *mut i16, *mut i16, *mut i16, *mut u32, *mut i16, u32) -> u32, Error>, pub ps2000_set_light: Result<unsafe extern "C" fn(i16, i16) -> i16, Error>, pub ps2000_set_sig_gen_arbitrary: Result<unsafe extern "C" fn(i16, i32, u32, u32, u32, u32, u32, *mut u8, i32, u32, u32) -> i16, Error>, pub ps2000_set_sig_gen_built_in: Result<unsafe extern "C" fn(i16, i32, u32, u32, f32, f32, f32, f32, u32, u32) -> i16, Error>, pub ps2000SetAdvTriggerChannelProperties: Result<unsafe extern "C" fn(i16, *mut tPS2000TriggerChannelProperties, i16, i32) -> i16, Error>, pub ps2000SetAdvTriggerChannelConditions: Result<unsafe extern "C" fn(i16, *mut tPS2000TriggerConditions, i16) -> i16, Error>, pub ps2000SetAdvTriggerChannelDirections: Result<unsafe extern "C" fn(i16, u32, u32, u32, u32, u32) -> i16, Error>, pub ps2000SetPulseWidthQualifier: Result<unsafe extern "C" fn(i16, *mut tPS2000PwqConditions, i16, u32, u32, u32, u32) -> i16, Error>, pub ps2000SetAdvTriggerDelay: Result<unsafe extern "C" fn(i16, u32, f32) -> i16, Error>, pub ps2000PingUnit: Result<unsafe extern "C" fn(i16) -> i16, Error>, /* private fields */
}

Fields§

§ps2000_apply_fix: Result<unsafe extern "C" fn(u32, u16), Error>§ps2000_open_unit: Result<unsafe extern "C" fn() -> i16, Error>§ps2000_get_unit_info: Result<unsafe extern "C" fn(i16, *mut i8, i16, i16) -> i16, Error>§ps2000_flash_led: Result<unsafe extern "C" fn(i16) -> i16, Error>§ps2000_close_unit: Result<unsafe extern "C" fn(i16) -> i16, Error>§ps2000_set_channel: Result<unsafe extern "C" fn(i16, i16, i16, i16, i16) -> i16, Error>§ps2000_get_timebase: Result<unsafe extern "C" fn(i16, i16, i32, *mut i32, *mut i16, i16, *mut i32) -> i16, Error>§ps2000_set_trigger: Result<unsafe extern "C" fn(i16, i16, i16, i16, i16, i16) -> i16, Error>§ps2000_set_trigger2: Result<unsafe extern "C" fn(i16, i16, i16, i16, f32, i16) -> i16, Error>§ps2000_run_block: Result<unsafe extern "C" fn(i16, i32, i16, i16, *mut i32) -> i16, Error>§ps2000_run_streaming: Result<unsafe extern "C" fn(i16, i16, i32, i16) -> i16, Error>§ps2000_run_streaming_ns: Result<unsafe extern "C" fn(i16, u32, u32, u32, i16, u32, u32) -> i16, Error>§ps2000_ready: Result<unsafe extern "C" fn(i16) -> i16, Error>§ps2000_stop: Result<unsafe extern "C" fn(i16) -> i16, Error>§ps2000_get_values: Result<unsafe extern "C" fn(i16, *mut i16, *mut i16, *mut i16, *mut i16, *mut i16, i32) -> i32, Error>§ps2000_get_times_and_values: Result<unsafe extern "C" fn(i16, *mut i32, *mut i16, *mut i16, *mut i16, *mut i16, *mut i16, i16, i32) -> i32, Error>§ps2000_last_button_press: Result<unsafe extern "C" fn(i16) -> i16, Error>§ps2000_set_ets: Result<unsafe extern "C" fn(i16, i16, i16, i16) -> i32, Error>§ps2000_set_led: Result<unsafe extern "C" fn(i16, i16) -> i16, Error>§ps2000_open_unit_async: Result<unsafe extern "C" fn() -> i16, Error>§ps2000_open_unit_progress: Result<unsafe extern "C" fn(*mut i16, *mut i16) -> i16, Error>§ps2000_get_streaming_last_values: Result<unsafe extern "C" fn(i16, Option<extern "C" fn(*mut *mut i16, i16, u32, i16, i16, u32)>) -> i16, Error>§ps2000_overview_buffer_status: Result<unsafe extern "C" fn(i16, *mut i16) -> i16, Error>§ps2000_get_streaming_values: Result<unsafe extern "C" fn(i16, *mut f64, *mut i16, *mut i16, *mut i16, *mut i16, *mut i16, *mut i16, *mut i16, *mut i16, *mut i16, *mut u32, *mut i16, u32, u32) -> u32, Error>§ps2000_get_streaming_values_no_aggregation: Result<unsafe extern "C" fn(i16, *mut f64, *mut i16, *mut i16, *mut i16, *mut i16, *mut i16, *mut u32, *mut i16, u32) -> u32, Error>§ps2000_set_light: Result<unsafe extern "C" fn(i16, i16) -> i16, Error>§ps2000_set_sig_gen_arbitrary: Result<unsafe extern "C" fn(i16, i32, u32, u32, u32, u32, u32, *mut u8, i32, u32, u32) -> i16, Error>§ps2000_set_sig_gen_built_in: Result<unsafe extern "C" fn(i16, i32, u32, u32, f32, f32, f32, f32, u32, u32) -> i16, Error>§ps2000SetAdvTriggerChannelProperties: Result<unsafe extern "C" fn(i16, *mut tPS2000TriggerChannelProperties, i16, i32) -> i16, Error>§ps2000SetAdvTriggerChannelConditions: Result<unsafe extern "C" fn(i16, *mut tPS2000TriggerConditions, i16) -> i16, Error>§ps2000SetAdvTriggerChannelDirections: Result<unsafe extern "C" fn(i16, u32, u32, u32, u32, u32) -> i16, Error>§ps2000SetPulseWidthQualifier: Result<unsafe extern "C" fn(i16, *mut tPS2000PwqConditions, i16, u32, u32, u32, u32) -> i16, Error>§ps2000SetAdvTriggerDelay: Result<unsafe extern "C" fn(i16, u32, f32) -> i16, Error>§ps2000PingUnit: Result<unsafe extern "C" fn(i16) -> i16, Error>

Implementations§

Source§

impl PS2000Loader

Source

pub unsafe fn new<P>(path: P) -> Result<PS2000Loader, Error>
where P: AsRef<OsStr>,

Source

pub unsafe fn ps2000_apply_fix(&self, a: u32, b: u16)

Source

pub unsafe fn ps2000_open_unit(&self) -> i16

Source

pub unsafe fn ps2000_get_unit_info( &self, handle: i16, string: *mut i8, string_length: i16, line: i16, ) -> i16

Source

pub unsafe fn ps2000_flash_led(&self, handle: i16) -> i16

Source

pub unsafe fn ps2000_close_unit(&self, handle: i16) -> i16

Source

pub unsafe fn ps2000_set_channel( &self, handle: i16, channel: i16, enabled: i16, dc: i16, range: i16, ) -> i16

Source

pub unsafe fn ps2000_get_timebase( &self, handle: i16, timebase: i16, no_of_samples: i32, time_interval: *mut i32, time_units: *mut i16, oversample: i16, max_samples: *mut i32, ) -> i16

Source

pub unsafe fn ps2000_set_trigger( &self, handle: i16, source: i16, threshold: i16, direction: i16, delay: i16, auto_trigger_ms: i16, ) -> i16

Source

pub unsafe fn ps2000_set_trigger2( &self, handle: i16, source: i16, threshold: i16, direction: i16, delay: f32, auto_trigger_ms: i16, ) -> i16

Source

pub unsafe fn ps2000_run_block( &self, handle: i16, no_of_values: i32, timebase: i16, oversample: i16, time_indisposed_ms: *mut i32, ) -> i16

Source

pub unsafe fn ps2000_run_streaming( &self, handle: i16, sample_interval_ms: i16, max_samples: i32, windowed: i16, ) -> i16

Source

pub unsafe fn ps2000_run_streaming_ns( &self, handle: i16, sample_interval: u32, time_units: u32, max_samples: u32, auto_stop: i16, noOfSamplesPerAggregate: u32, overview_buffer_size: u32, ) -> i16

Source

pub unsafe fn ps2000_ready(&self, handle: i16) -> i16

Source

pub unsafe fn ps2000_stop(&self, handle: i16) -> i16

Source

pub unsafe fn ps2000_get_values( &self, handle: i16, buffer_a: *mut i16, buffer_b: *mut i16, buffer_c: *mut i16, buffer_d: *mut i16, overflow: *mut i16, no_of_values: i32, ) -> i32

Source

pub unsafe fn ps2000_get_times_and_values( &self, handle: i16, times: *mut i32, buffer_a: *mut i16, buffer_b: *mut i16, buffer_c: *mut i16, buffer_d: *mut i16, overflow: *mut i16, time_units: i16, no_of_values: i32, ) -> i32

Source

pub unsafe fn ps2000_last_button_press(&self, handle: i16) -> i16

Source

pub unsafe fn ps2000_set_ets( &self, handle: i16, mode: i16, ets_cycles: i16, ets_interleave: i16, ) -> i32

Source

pub unsafe fn ps2000_set_led(&self, handle: i16, state: i16) -> i16

Source

pub unsafe fn ps2000_open_unit_async(&self) -> i16

Source

pub unsafe fn ps2000_open_unit_progress( &self, handle: *mut i16, progress_percent: *mut i16, ) -> i16

Source

pub unsafe fn ps2000_get_streaming_last_values( &self, handle: i16, arg1: Option<extern "C" fn(*mut *mut i16, i16, u32, i16, i16, u32)>, ) -> i16

Source

pub unsafe fn ps2000_overview_buffer_status( &self, handle: i16, previous_buffer_overrun: *mut i16, ) -> i16

Source

pub unsafe fn ps2000_get_streaming_values( &self, handle: i16, start_time: *mut f64, pbuffer_a_max: *mut i16, pbuffer_a_min: *mut i16, pbuffer_b_max: *mut i16, pbuffer_b_min: *mut i16, pbuffer_c_max: *mut i16, pbuffer_c_min: *mut i16, pbuffer_d_max: *mut i16, pbuffer_d_min: *mut i16, overflow: *mut i16, triggerAt: *mut u32, triggered: *mut i16, no_of_values: u32, noOfSamplesPerAggregate: u32, ) -> u32

Source

pub unsafe fn ps2000_get_streaming_values_no_aggregation( &self, handle: i16, start_time: *mut f64, pbuffer_a: *mut i16, pbuffer_b: *mut i16, pbuffer_c: *mut i16, pbuffer_d: *mut i16, overflow: *mut i16, triggerAt: *mut u32, trigger: *mut i16, no_of_values: u32, ) -> u32

Source

pub unsafe fn ps2000_set_light(&self, handle: i16, state: i16) -> i16

Source

pub unsafe fn ps2000_set_sig_gen_arbitrary( &self, handle: i16, offsetVoltage: i32, pkToPk: u32, startDeltaPhase: u32, stopDeltaPhase: u32, deltaPhaseIncrement: u32, dwellCount: u32, arbitraryWaveform: *mut u8, arbitraryWaveformSize: i32, sweepType: u32, sweeps: u32, ) -> i16

Source

pub unsafe fn ps2000_set_sig_gen_built_in( &self, handle: i16, offsetVoltage: i32, pkToPk: u32, waveType: u32, startFrequency: f32, stopFrequency: f32, increment: f32, dwellTime: f32, sweepType: u32, sweeps: u32, ) -> i16

Source

pub unsafe fn ps2000SetAdvTriggerChannelProperties( &self, handle: i16, channelProperties: *mut tPS2000TriggerChannelProperties, nChannelProperties: i16, autoTriggerMilliseconds: i32, ) -> i16

Source

pub unsafe fn ps2000SetAdvTriggerChannelConditions( &self, handle: i16, conditions: *mut tPS2000TriggerConditions, nConditions: i16, ) -> i16

Source

pub unsafe fn ps2000SetAdvTriggerChannelDirections( &self, handle: i16, channelA: u32, channelB: u32, channelC: u32, channelD: u32, ext: u32, ) -> i16

Source

pub unsafe fn ps2000SetPulseWidthQualifier( &self, handle: i16, conditions: *mut tPS2000PwqConditions, nConditions: i16, direction: u32, lower: u32, upper: u32, type_: u32, ) -> i16

Source

pub unsafe fn ps2000SetAdvTriggerDelay( &self, handle: i16, delay: u32, preTriggerDelay: f32, ) -> i16

Source

pub unsafe fn ps2000PingUnit(&self, handle: i16) -> i16

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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