Trait pico_driver::PicoDriver[][src]

pub trait PicoDriver: Debug + Send + Sync {
Show methods fn get_driver(&self) -> Driver;
fn get_version(&self) -> PicoResult<String>;
fn get_path(&self) -> PicoResult<Option<String>>;
fn enumerate_units(&self) -> PicoResult<Vec<EnumerationResult>>;
fn open_unit(&self, serial: Option<&str>) -> PicoResult<i16>;
fn ping_unit(&self, handle: i16) -> PicoResult<()>;
fn maximum_value(&self, handle: i16) -> PicoResult<i16>;
fn close(&self, handle: i16) -> PicoResult<()>;
fn get_unit_info(
        &self,
        handle: i16,
        info_type: PicoInfo
    ) -> PicoResult<String>;
fn get_channel_ranges(
        &self,
        handle: i16,
        channel: PicoChannel
    ) -> PicoResult<Vec<PicoRange>>;
fn enable_channel(
        &self,
        handle: i16,
        channel: PicoChannel,
        config: &ChannelConfig
    ) -> PicoResult<()>;
fn disable_channel(
        &self,
        handle: i16,
        channel: PicoChannel
    ) -> PicoResult<()>;
fn set_data_buffer(
        &self,
        handle: i16,
        channel: PicoChannel,
        buffer: Arc<RwLock<Pin<Vec<i16>>>>,
        buffer_len: usize
    ) -> PicoResult<()>;
fn start_streaming(
        &self,
        handle: i16,
        sample_config: &SampleConfig
    ) -> PicoResult<SampleConfig>;
fn get_latest_streaming_values<'a>(
        &self,
        handle: i16,
        channels: &[PicoChannel],
        callback: Box<dyn FnMut(usize, usize) + 'a>
    ) -> PicoResult<()>;
fn stop(&self, handle: i16) -> PicoResult<()>; fn check_version(&self) -> Result<(), DriverLoadError> { ... }
}
Expand description

Common trait implemented for every driver

Required methods

fn get_driver(&self) -> Driver[src]

Expand description

Gets the underlying driver type

fn get_version(&self) -> PicoResult<String>[src]

Expand description

Gets the driver version string

fn get_path(&self) -> PicoResult<Option<String>>[src]

Expand description

Gets the path to the loaded driver

fn enumerate_units(&self) -> PicoResult<Vec<EnumerationResult>>[src]

Expand description

Returns a list of discovered serial numbers

fn open_unit(&self, serial: Option<&str>) -> PicoResult<i16>[src]

Expand description

Opens a device, optionally with a specific serial number

fn ping_unit(&self, handle: i16) -> PicoResult<()>[src]

Expand description

Ping a unit to see if it’s still connected

fn maximum_value(&self, handle: i16) -> PicoResult<i16>[src]

Expand description

Get the maximum expected ADC value. This is required to scale to volts

fn close(&self, handle: i16) -> PicoResult<()>[src]

Expand description

Close the specified unit

fn get_unit_info(&self, handle: i16, info_type: PicoInfo) -> PicoResult<String>[src]

Expand description

Get one of the unit info strings

fn get_channel_ranges(
    &self,
    handle: i16,
    channel: PicoChannel
) -> PicoResult<Vec<PicoRange>>
[src]

Expand description

Get valid ranges for the specified channel

fn enable_channel(
    &self,
    handle: i16,
    channel: PicoChannel,
    config: &ChannelConfig
) -> PicoResult<()>
[src]

Expand description

Set up a channel with the supplied config

fn disable_channel(&self, handle: i16, channel: PicoChannel) -> PicoResult<()>[src]

Expand description

Disable a channel

fn set_data_buffer(
    &self,
    handle: i16,
    channel: PicoChannel,
    buffer: Arc<RwLock<Pin<Vec<i16>>>>,
    buffer_len: usize
) -> PicoResult<()>
[src]

Expand description

Give the driver a buffer to write data into

fn start_streaming(
    &self,
    handle: i16,
    sample_config: &SampleConfig
) -> PicoResult<SampleConfig>
[src]

Expand description

Starts the device streaming

fn get_latest_streaming_values<'a>(
    &self,
    handle: i16,
    channels: &[PicoChannel],
    callback: Box<dyn FnMut(usize, usize) + 'a>
) -> PicoResult<()>
[src]

Expand description

Gets the latest streaming values

fn stop(&self, handle: i16) -> PicoResult<()>[src]

Expand description

Stops the device streaming

Loading content...

Provided methods

fn check_version(&self) -> Result<(), DriverLoadError>[src]

Expand description

Check that the driver meets the minimum version tested with these wrappers

Loading content...

Implementors

impl PicoDriver for PS2000Driver[src]

fn get_driver(&self) -> Driver[src]

fn get_version(&self) -> PicoResult<String>[src]

fn get_path(&self) -> PicoResult<Option<String>>[src]

fn enumerate_units(&self) -> PicoResult<Vec<EnumerationResult>>[src]

fn open_unit(&self, serial: Option<&str>) -> PicoResult<i16>[src]

fn ping_unit(&self, handle: i16) -> PicoResult<()>[src]

fn maximum_value(&self, _: i16) -> PicoResult<i16>[src]

fn close(&self, handle: i16) -> PicoResult<()>[src]

fn get_unit_info(&self, handle: i16, info_type: PicoInfo) -> PicoResult<String>[src]

fn get_channel_ranges(
    &self,
    handle: i16,
    channel: PicoChannel
) -> PicoResult<Vec<PicoRange>>
[src]

fn enable_channel(
    &self,
    handle: i16,
    channel: PicoChannel,
    config: &ChannelConfig
) -> PicoResult<()>
[src]

fn disable_channel(&self, handle: i16, channel: PicoChannel) -> PicoResult<()>[src]

fn set_data_buffer(
    &self,
    handle: i16,
    channel: PicoChannel,
    buffer: Arc<RwLock<Pin<Vec<i16>>>>,
    _buffer_len: usize
) -> PicoResult<()>
[src]

fn start_streaming(
    &self,
    handle: i16,
    sample_config: &SampleConfig
) -> PicoResult<SampleConfig>
[src]

fn get_latest_streaming_values<'a>(
    &self,
    handle: i16,
    _channels: &[PicoChannel],
    callback: Box<dyn FnMut(usize, usize) + 'a>
) -> PicoResult<()>
[src]

fn stop(&self, handle: i16) -> PicoResult<()>[src]

impl PicoDriver for PS2000ADriver[src]

fn get_driver(&self) -> Driver[src]

fn get_version(&self) -> PicoResult<String>[src]

fn get_path(&self) -> PicoResult<Option<String>>[src]

fn enumerate_units(&self) -> PicoResult<Vec<EnumerationResult>>[src]

fn open_unit(&self, serial: Option<&str>) -> PicoResult<i16>[src]

fn ping_unit(&self, handle: i16) -> PicoResult<()>[src]

fn maximum_value(&self, handle: i16) -> PicoResult<i16>[src]

fn close(&self, handle: i16) -> PicoResult<()>[src]

fn get_unit_info(&self, handle: i16, info_type: PicoInfo) -> PicoResult<String>[src]

fn get_channel_ranges(
    &self,
    handle: i16,
    channel: PicoChannel
) -> PicoResult<Vec<PicoRange>>
[src]

fn enable_channel(
    &self,
    handle: i16,
    channel: PicoChannel,
    config: &ChannelConfig
) -> PicoResult<()>
[src]

fn disable_channel(&self, handle: i16, channel: PicoChannel) -> PicoResult<()>[src]

fn set_data_buffer(
    &self,
    handle: i16,
    channel: PicoChannel,
    buffer: Arc<RwLock<Pin<Vec<i16>>>>,
    buffer_len: usize
) -> PicoResult<()>
[src]

fn start_streaming(
    &self,
    handle: i16,
    sample_config: &SampleConfig
) -> PicoResult<SampleConfig>
[src]

fn get_latest_streaming_values<'a>(
    &self,
    handle: i16,
    _channels: &[PicoChannel],
    callback: Box<dyn FnMut(usize, usize) + 'a>
) -> PicoResult<()>
[src]

fn stop(&self, handle: i16) -> PicoResult<()>[src]

impl PicoDriver for PS3000ADriver[src]

fn get_driver(&self) -> Driver[src]

fn get_version(&self) -> PicoResult<String>[src]

fn get_path(&self) -> PicoResult<Option<String>>[src]

fn enumerate_units(&self) -> PicoResult<Vec<EnumerationResult>>[src]

fn open_unit(&self, serial: Option<&str>) -> PicoResult<i16>[src]

fn ping_unit(&self, handle: i16) -> PicoResult<()>[src]

fn maximum_value(&self, handle: i16) -> PicoResult<i16>[src]

fn close(&self, handle: i16) -> PicoResult<()>[src]

fn get_unit_info(&self, handle: i16, info_type: PicoInfo) -> PicoResult<String>[src]

fn get_channel_ranges(
    &self,
    handle: i16,
    channel: PicoChannel
) -> PicoResult<Vec<PicoRange>>
[src]

fn enable_channel(
    &self,
    handle: i16,
    channel: PicoChannel,
    config: &ChannelConfig
) -> PicoResult<()>
[src]

fn disable_channel(&self, handle: i16, channel: PicoChannel) -> PicoResult<()>[src]

fn set_data_buffer(
    &self,
    handle: i16,
    channel: PicoChannel,
    buffer: Arc<RwLock<Pin<Vec<i16>>>>,
    buffer_len: usize
) -> PicoResult<()>
[src]

fn start_streaming(
    &self,
    handle: i16,
    sample_config: &SampleConfig
) -> PicoResult<SampleConfig>
[src]

fn get_latest_streaming_values<'a>(
    &self,
    handle: i16,
    _channels: &[PicoChannel],
    callback: Box<dyn FnMut(usize, usize) + 'a>
) -> PicoResult<()>
[src]

fn stop(&self, handle: i16) -> PicoResult<()>[src]

impl PicoDriver for PS4000Driver[src]

fn get_driver(&self) -> Driver[src]

fn get_version(&self) -> PicoResult<String>[src]

fn get_path(&self) -> PicoResult<Option<String>>[src]

fn enumerate_units(&self) -> PicoResult<Vec<EnumerationResult>>[src]

fn open_unit(&self, serial: Option<&str>) -> PicoResult<i16>[src]

fn ping_unit(&self, handle: i16) -> PicoResult<()>[src]

fn maximum_value(&self, handle: i16) -> PicoResult<i16>[src]

fn close(&self, handle: i16) -> PicoResult<()>[src]

fn get_unit_info(&self, handle: i16, info_type: PicoInfo) -> PicoResult<String>[src]

fn get_channel_ranges(
    &self,
    handle: i16,
    channel: PicoChannel
) -> PicoResult<Vec<PicoRange>>
[src]

fn enable_channel(
    &self,
    handle: i16,
    channel: PicoChannel,
    config: &ChannelConfig
) -> PicoResult<()>
[src]

fn disable_channel(&self, handle: i16, channel: PicoChannel) -> PicoResult<()>[src]

fn set_data_buffer(
    &self,
    handle: i16,
    channel: PicoChannel,
    buffer: Arc<RwLock<Pin<Vec<i16>>>>,
    buffer_len: usize
) -> PicoResult<()>
[src]

fn start_streaming(
    &self,
    handle: i16,
    sample_config: &SampleConfig
) -> PicoResult<SampleConfig>
[src]

fn get_latest_streaming_values<'a>(
    &self,
    handle: i16,
    _channels: &[PicoChannel],
    callback: Box<dyn FnMut(usize, usize) + 'a>
) -> PicoResult<()>
[src]

fn stop(&self, handle: i16) -> PicoResult<()>[src]

impl PicoDriver for PS4000ADriver[src]

fn get_driver(&self) -> Driver[src]

fn get_version(&self) -> PicoResult<String>[src]

fn get_path(&self) -> PicoResult<Option<String>>[src]

fn enumerate_units(&self) -> PicoResult<Vec<EnumerationResult>>[src]

fn open_unit(&self, serial: Option<&str>) -> PicoResult<i16>[src]

fn ping_unit(&self, handle: i16) -> PicoResult<()>[src]

fn maximum_value(&self, handle: i16) -> PicoResult<i16>[src]

fn close(&self, handle: i16) -> PicoResult<()>[src]

fn get_unit_info(&self, handle: i16, info_type: PicoInfo) -> PicoResult<String>[src]

fn get_channel_ranges(
    &self,
    handle: i16,
    channel: PicoChannel
) -> PicoResult<Vec<PicoRange>>
[src]

fn enable_channel(
    &self,
    handle: i16,
    channel: PicoChannel,
    config: &ChannelConfig
) -> PicoResult<()>
[src]

fn disable_channel(&self, handle: i16, channel: PicoChannel) -> PicoResult<()>[src]

fn set_data_buffer(
    &self,
    handle: i16,
    channel: PicoChannel,
    buffer: Arc<RwLock<Pin<Vec<i16>>>>,
    buffer_len: usize
) -> PicoResult<()>
[src]

fn start_streaming(
    &self,
    handle: i16,
    sample_config: &SampleConfig
) -> PicoResult<SampleConfig>
[src]

fn get_latest_streaming_values<'a>(
    &self,
    handle: i16,
    _channels: &[PicoChannel],
    callback: Box<dyn FnMut(usize, usize) + 'a>
) -> PicoResult<()>
[src]

fn stop(&self, handle: i16) -> PicoResult<()>[src]

impl PicoDriver for PS5000ADriver[src]

fn get_driver(&self) -> Driver[src]

fn get_version(&self) -> PicoResult<String>[src]

fn get_path(&self) -> PicoResult<Option<String>>[src]

fn enumerate_units(&self) -> PicoResult<Vec<EnumerationResult>>[src]

fn open_unit(&self, serial: Option<&str>) -> PicoResult<i16>[src]

fn ping_unit(&self, handle: i16) -> PicoResult<()>[src]

fn maximum_value(&self, handle: i16) -> PicoResult<i16>[src]

fn close(&self, handle: i16) -> PicoResult<()>[src]

fn get_unit_info(&self, handle: i16, info_type: PicoInfo) -> PicoResult<String>[src]

fn get_channel_ranges(
    &self,
    handle: i16,
    channel: PicoChannel
) -> PicoResult<Vec<PicoRange>>
[src]

fn enable_channel(
    &self,
    handle: i16,
    channel: PicoChannel,
    config: &ChannelConfig
) -> PicoResult<()>
[src]

fn disable_channel(&self, handle: i16, channel: PicoChannel) -> PicoResult<()>[src]

fn set_data_buffer(
    &self,
    handle: i16,
    channel: PicoChannel,
    buffer: Arc<RwLock<Pin<Vec<i16>>>>,
    buffer_len: usize
) -> PicoResult<()>
[src]

fn start_streaming(
    &self,
    handle: i16,
    sample_config: &SampleConfig
) -> PicoResult<SampleConfig>
[src]

fn get_latest_streaming_values<'a>(
    &self,
    handle: i16,
    _channels: &[PicoChannel],
    callback: Box<dyn FnMut(usize, usize) + 'a>
) -> PicoResult<()>
[src]

fn stop(&self, handle: i16) -> PicoResult<()>[src]

impl PicoDriver for PS6000Driver[src]

fn get_driver(&self) -> Driver[src]

fn get_version(&self) -> PicoResult<String>[src]

fn get_path(&self) -> PicoResult<Option<String>>[src]

fn enumerate_units(&self) -> PicoResult<Vec<EnumerationResult>>[src]

fn open_unit(&self, serial: Option<&str>) -> PicoResult<i16>[src]

fn ping_unit(&self, handle: i16) -> PicoResult<()>[src]

fn maximum_value(&self, handle: i16) -> PicoResult<i16>[src]

fn close(&self, handle: i16) -> PicoResult<()>[src]

fn get_unit_info(&self, handle: i16, info_type: PicoInfo) -> PicoResult<String>[src]

fn get_channel_ranges(
    &self,
    handle: i16,
    channel: PicoChannel
) -> PicoResult<Vec<PicoRange>>
[src]

fn enable_channel(
    &self,
    handle: i16,
    channel: PicoChannel,
    config: &ChannelConfig
) -> PicoResult<()>
[src]

fn disable_channel(&self, handle: i16, channel: PicoChannel) -> PicoResult<()>[src]

fn set_data_buffer(
    &self,
    handle: i16,
    channel: PicoChannel,
    buffer: Arc<RwLock<Pin<Vec<i16>>>>,
    buffer_len: usize
) -> PicoResult<()>
[src]

fn start_streaming(
    &self,
    handle: i16,
    sample_config: &SampleConfig
) -> PicoResult<SampleConfig>
[src]

fn get_latest_streaming_values<'a>(
    &self,
    handle: i16,
    _channels: &[PicoChannel],
    callback: Box<dyn FnMut(usize, usize) + 'a>
) -> PicoResult<()>
[src]

fn stop(&self, handle: i16) -> PicoResult<()>[src]

impl PicoDriver for PS6000ADriver[src]

fn get_driver(&self) -> Driver[src]

fn get_version(&self) -> PicoResult<String>[src]

fn get_path(&self) -> PicoResult<Option<String>>[src]

fn enumerate_units(&self) -> PicoResult<Vec<EnumerationResult>>[src]

fn open_unit(&self, serial: Option<&str>) -> PicoResult<i16>[src]

fn ping_unit(&self, handle: i16) -> PicoResult<()>[src]

fn maximum_value(&self, handle: i16) -> PicoResult<i16>[src]

fn close(&self, handle: i16) -> PicoResult<()>[src]

fn get_unit_info(&self, handle: i16, info_type: PicoInfo) -> PicoResult<String>[src]

fn get_channel_ranges(
    &self,
    handle: i16,
    channel: PicoChannel
) -> PicoResult<Vec<PicoRange>>
[src]

fn enable_channel(
    &self,
    handle: i16,
    channel: PicoChannel,
    config: &ChannelConfig
) -> PicoResult<()>
[src]

fn disable_channel(&self, handle: i16, channel: PicoChannel) -> PicoResult<()>[src]

fn set_data_buffer(
    &self,
    handle: i16,
    channel: PicoChannel,
    buffer: Arc<RwLock<Pin<Vec<i16>>>>,
    buffer_len: usize
) -> PicoResult<()>
[src]

fn start_streaming(
    &self,
    handle: i16,
    sample_config: &SampleConfig
) -> PicoResult<SampleConfig>
[src]

fn get_latest_streaming_values<'a>(
    &self,
    handle: i16,
    channels: &[PicoChannel],
    callback: Box<dyn FnMut(usize, usize) + 'a>
) -> PicoResult<()>
[src]

fn stop(&self, handle: i16) -> PicoResult<()>[src]

Loading content...