[−][src]Struct j2534::Interface
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]
&self,
handle: u32,
id: IoctlId,
input: *mut c_void,
output: *mut c_void
) -> Result<i32>
General purpose I/O control for modifying device or channel characteristics.
Auto Trait Implementations
impl RefUnwindSafe for Interface
impl Send for Interface
impl Sync for Interface
impl Unpin for Interface
impl UnwindSafe for Interface
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,