pub struct SocketCanIsoTp { /* private fields */ }Expand description
Kernel ISO-TP endpoint using a single socket.
Implementations§
Source§impl SocketCanIsoTp
impl SocketCanIsoTp
Sourcepub fn open(
iface: &str,
rx_id: Id,
tx_id: Id,
options: &IsoTpKernelOptions,
) -> Result<Self, Error>
pub fn open( iface: &str, rx_id: Id, tx_id: Id, options: &IsoTpKernelOptions, ) -> Result<Self, Error>
Open a kernel ISO-TP socket on iface with fixed RX/TX CAN IDs.
Sourcepub fn set_rx_flow_control(&mut self, fc: RxFlowControl) -> Result<(), Error>
pub fn set_rx_flow_control(&mut self, fc: RxFlowControl) -> Result<(), Error>
Update receive-side FlowControl parameters (BS/STmin) used by the kernel.
This applies CAN_ISOTP_RECV_FC at runtime. For best dynamic behavior, enable
flags::CAN_ISOTP_DYN_FC_PARMS when opening the socket (kernel-dependent).
Trait Implementations§
Source§impl AsRawFd for SocketCanIsoTp
impl AsRawFd for SocketCanIsoTp
Source§impl Debug for SocketCanIsoTp
impl Debug for SocketCanIsoTp
Source§impl IsoTpEndpoint for SocketCanIsoTp
impl IsoTpEndpoint for SocketCanIsoTp
Source§fn send_to(
&mut self,
_to: u8,
payload: &[u8],
timeout: Duration,
) -> Result<(), SendError<Self::Error>>
fn send_to( &mut self, _to: u8, payload: &[u8], timeout: Duration, ) -> Result<(), SendError<Self::Error>>
Send a payload to a specific peer address.
Auto Trait Implementations§
impl Freeze for SocketCanIsoTp
impl RefUnwindSafe for SocketCanIsoTp
impl Send for SocketCanIsoTp
impl Sync for SocketCanIsoTp
impl Unpin for SocketCanIsoTp
impl UnsafeUnpin for SocketCanIsoTp
impl UnwindSafe for SocketCanIsoTp
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more