[][src]Struct j2534::Interface

pub struct Interface { /* fields omitted */ }

Represents a J2534 library

Methods

impl Interface[src]

pub fn new<S: AsRef<OsStr>>(path: S) -> Result<Interface>[src]

Returns a J2534 library given the path

Arguments

  • path - The absolute path to the J2534 shared library

Example

use j2534::Interface;
let interface = Interface::new("C:\\j2534_driver.dll").unwrap();

pub fn get_last_error(&self) -> Result<String>[src]

Returns a text description of the most recent error

pub fn open<S: Into<Vec<u8>>>(&self, port: S) -> Result<Device>[src]

Creates a Device from the PassThru interface connected to the given port

Arguments

  • port - The port to search for a J2534 device

Example

use j2534::Interface;
let interface = Interface::new("C:\\j2534_driver.dll").unwrap();
let device = interface.open("COM2").unwrap();

pub fn open_any(&self) -> Result<Device>[src]

Creates a Device from any connected PassThru devices

Example

use j2534::Interface;
let interface = Interface::new("C:\\j2534_driver.dll").unwrap();
let device = interface.open_any().unwrap();

pub unsafe fn ioctl(
    &self,
    handle: u32,
    id: IoctlId,
    input: *mut c_void,
    output: *mut c_void
) -> Result<i32>
[src]

General purpose I/O control for modifying device or channel characteristics.

Auto Trait Implementations

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.