Struct ecu_diagnostics::hardware::passthru::PassthruCanChannel
source · pub struct PassthruCanChannel { /* private fields */ }
Expand description
Passthru device CAN Channel
Trait Implementations§
source§impl CanChannel for PassthruCanChannel
impl CanChannel for PassthruCanChannel
source§fn set_can_cfg(&mut self, baud: u32, use_extended: bool) -> ChannelResult<()>
fn set_can_cfg(&mut self, baud: u32, use_extended: bool) -> ChannelResult<()>
Sets the CAN network configuration
source§impl Debug for PassthruCanChannel
impl Debug for PassthruCanChannel
source§impl Drop for PassthruCanChannel
impl Drop for PassthruCanChannel
source§impl PacketChannel<CanFrame> for PassthruCanChannel
impl PacketChannel<CanFrame> for PassthruCanChannel
source§fn open(&mut self) -> ChannelResult<()>
fn open(&mut self) -> ChannelResult<()>
Opens the channel, from this point forward,
the network filter will be applied to be fully open
so data has to be polled rapidly to avoid a driver’s
internal buffer from filling up rapidly
source§fn close(&mut self) -> ChannelResult<()>
fn close(&mut self) -> ChannelResult<()>
Closes the channel. Once closed, no more traffic
can be polled or written to the channel.
source§fn write_packets(
&mut self,
packets: Vec<CanFrame>,
timeout_ms: u32
) -> ChannelResult<()>
fn write_packets( &mut self, packets: Vec<CanFrame>, timeout_ms: u32 ) -> ChannelResult<()>
Writes a list of packets to the raw interface
source§fn read_packets(
&mut self,
max: usize,
timeout_ms: u32
) -> ChannelResult<Vec<CanFrame>>
fn read_packets( &mut self, max: usize, timeout_ms: u32 ) -> ChannelResult<Vec<CanFrame>>
Reads a list of packets from the raw interface
source§fn clear_rx_buffer(&mut self) -> ChannelResult<()>
fn clear_rx_buffer(&mut self) -> ChannelResult<()>
Tells the channel to clear its Rx buffer.
This means all pending messages to be read should be wiped from the devices queue,
such that PayloadChannel::read_bytes does not read them
source§fn clear_tx_buffer(&mut self) -> ChannelResult<()>
fn clear_tx_buffer(&mut self) -> ChannelResult<()>
Tells the channel to clear its Tx buffer.
This means all messages that are queued to be sent to the ECU should be wiped.
Auto Trait Implementations§
impl Freeze for PassthruCanChannel
impl RefUnwindSafe for PassthruCanChannel
impl Send for PassthruCanChannel
impl Sync for PassthruCanChannel
impl Unpin for PassthruCanChannel
impl UnwindSafe for PassthruCanChannel
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more