[−][src]Struct j2534::PassThruMsg
A message sent a received from the device
Fields
protocol_id: u32
rx_status: u32
tx_flags: u32
timestamp: u32
data_size: u32
extra_data_index: u32
data: [u8; 4128]
Implementations
impl PassThruMsg
[src]
pub fn new_raw(
protocol: Protocol,
rx_status: RxStatus,
tx_flags: TxFlags,
timestamp: u32,
data_size: u32,
extra_data_index: u32,
data: [u8; 4128]
) -> PassThruMsg
[src]
protocol: Protocol,
rx_status: RxStatus,
tx_flags: TxFlags,
timestamp: u32,
data_size: u32,
extra_data_index: u32,
data: [u8; 4128]
) -> PassThruMsg
pub fn new(protocol: Protocol) -> PassThruMsg
[src]
pub fn new_can(id: u32, data: &[u8]) -> PassThruMsg
[src]
Creates a new CAN message. The data size must be less than or equal to 8 bytes.
pub fn new_isotp(id: u32, data: &[u8]) -> PassThruMsg
[src]
Creates a new ISO 15765-2 (ISO-TP) message. ISO-TP is a transport-layer protocol that uses multiple CAN messages to transmit up to 4095 bytes per packet. The data size must be less than or equal to 4095.
pub fn can_message(&self) -> Option<(u32, &[u8])>
[src]
Returns the CAN ID and payload. Also use this method for reading ISO-TP messages.
Returns None
if the protocol is not CAN or ISO15765 or if the message is too short.
pub fn isotp_message(&self) -> Option<(u32, &[u8])>
[src]
Alias to PassThruMsg::can_message
pub fn rx_status(self, rx_status: RxStatus) -> Self
[src]
Sets the rx status of the message
pub fn tx_flags(self, tx_flags: TxFlags) -> Self
[src]
Sets the transmit flags of the message
pub fn transmitted(&self) -> bool
[src]
Returns true if this is an echo of a message transmitted by the PassThru device.
pub fn first_frame(&self) -> bool
[src]
Returns true if this message indicates the first frame of a ISO15765 packet has been received.
Trait Implementations
impl Clone for PassThruMsg
[src]
pub fn clone(&self) -> PassThruMsg
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for PassThruMsg
[src]
impl Debug for PassThruMsg
[src]
impl Default for PassThruMsg
[src]
pub fn default() -> PassThruMsg
[src]
Auto Trait Implementations
impl RefUnwindSafe for PassThruMsg
[src]
impl Send for PassThruMsg
[src]
impl Sync for PassThruMsg
[src]
impl Unpin for PassThruMsg
[src]
impl UnwindSafe for PassThruMsg
[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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,