[][src]Struct j2534::Device

pub struct Device<'a> { /* fields omitted */ }

A device created with Interface::open

Implementations

impl<'a> Device<'a>[src]

pub fn read_version(&self) -> Result<VersionInfo, Error>[src]

Reads the version info of the device

pub fn set_programming_voltage(
    &self,
    pin_number: u32,
    voltage: u32
) -> Result<(), Error>
[src]

Outputs a programmable voltage on the specified J1962 connector pin. Only one pin can have a specified voltage applied at a time. The only exception: it is permissible to program pin 15 for SHORT_TO_GROUND, and another pin to a voltage level. When switching pins, the user application must disable the first voltage (VOLTAGE_OFF option) before enabling the second.

Arguments

  • pin_number - The J1962 connector pin to which the PassThru device will apply the specified voltage
  • voltage - The voltage value (in millivolts) that will be applied to the specified pin

pub fn connect(
    &self,
    protocol: Protocol,
    flags: ConnectFlags,
    baudrate: u32
) -> Result<Channel<'_>, Error>
[src]

Creates a channel

Arguments

  • protocol - Protocol to use with the channel
  • flags - Protocol-specific flags. This is usually set to zero
  • baudrate - Initial baud rate for the channel

pub fn read_battery_voltage(&self) -> Result<u32, Error>[src]

Returns the battery voltage in millivolts read from Pin 16 on the J1962 connector.

pub fn read_programming_voltage(&self) -> Result<u32, Error>[src]

Returns the current output voltage for ECU reprogramming in millivolts.

Trait Implementations

impl<'a> Drop for Device<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Device<'a>[src]

impl<'a> !Send for Device<'a>[src]

impl<'a> !Sync for Device<'a>[src]

impl<'a> Unpin for Device<'a>[src]

impl<'a> UnwindSafe for Device<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.