[−][src]Struct j2534::Device
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]
&self,
pin_number: u32,
voltage: u32
) -> Result<(), Error>
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 voltagevoltage
- 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]
&self,
protocol: Protocol,
flags: ConnectFlags,
baudrate: u32
) -> Result<Channel<'_>, Error>
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
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]
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,
pub 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.
pub 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>,