Struct ecu_diagnostics::hardware::socketcan::SocketCanCanChannel
source · pub struct SocketCanCanChannel { /* private fields */ }
Expand description
SocketCAN CAN channel
Trait Implementations§
source§impl CanChannel for SocketCanCanChannel
impl CanChannel for SocketCanCanChannel
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<()>
SocketCAN ignores this function as the channel is pre-configured by the OS’ kernel.
source§impl Debug for SocketCanCanChannel
impl Debug for SocketCanCanChannel
source§impl Drop for SocketCanCanChannel
impl Drop for SocketCanCanChannel
source§impl PacketChannel<CanFrame> for SocketCanCanChannel
impl PacketChannel<CanFrame> for SocketCanCanChannel
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 SocketCanCanChannel
impl RefUnwindSafe for SocketCanCanChannel
impl Send for SocketCanCanChannel
impl Sync for SocketCanCanChannel
impl Unpin for SocketCanCanChannel
impl UnwindSafe for SocketCanCanChannel
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