pub struct CanRemoteFrame(/* private fields */);
Expand description
The classic CAN 2.0 remote request frame.
This is is meant to request a transmission by another node on the bus. It contain no data.
This is highly compatible with the can_frame
from libc.
(ref)
Implementations§
Trait Implementations§
Source§impl AsPtr for CanRemoteFrame
impl AsPtr for CanRemoteFrame
Source§fn as_ptr(&self) -> *const Self::Inner
fn as_ptr(&self) -> *const Self::Inner
Gets a pointer to the CAN frame structure that is compatible with the Linux C API.
Source§fn as_mut_ptr(&mut self) -> *mut Self::Inner
fn as_mut_ptr(&mut self) -> *mut Self::Inner
Gets a mutable pointer to the CAN frame structure that is compatible with the Linux C API.
Source§fn as_bytes_mut(&mut self) -> &[u8] ⓘ
fn as_bytes_mut(&mut self) -> &[u8] ⓘ
Source§impl AsRef<can_frame> for CanRemoteFrame
impl AsRef<can_frame> for CanRemoteFrame
Source§impl Clone for CanRemoteFrame
impl Clone for CanRemoteFrame
Source§fn clone(&self) -> CanRemoteFrame
fn clone(&self) -> CanRemoteFrame
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CanRemoteFrame
impl Debug for CanRemoteFrame
Source§impl Default for CanRemoteFrame
impl Default for CanRemoteFrame
Source§impl Frame for CanRemoteFrame
impl Frame for CanRemoteFrame
Source§fn new_remote(id: impl Into<Id>, dlc: usize) -> Option<Self>
fn new_remote(id: impl Into<Id>, dlc: usize) -> Option<Self>
Create a new remote transmission request frame.
This will set the RTR flag in the CAN ID word.
Source§fn is_extended(&self) -> bool
fn is_extended(&self) -> bool
Check if frame uses 29-bit extended ID format.
Source§fn is_remote_frame(&self) -> bool
fn is_remote_frame(&self) -> bool
Check if frame is a remote transmission request.
Source§fn data(&self) -> &[u8] ⓘ
fn data(&self) -> &[u8] ⓘ
A slice into the actual data. Slice will always be <= 8 bytes in length
Source§fn is_standard(&self) -> bool
fn is_standard(&self) -> bool
Source§fn is_data_frame(&self) -> bool
fn is_data_frame(&self) -> bool
Source§impl Frame for CanRemoteFrame
impl Frame for CanRemoteFrame
Source§fn set_id(&mut self, id: impl Into<Id>)
fn set_id(&mut self, id: impl Into<Id>)
Sets the CAN ID for the frame.
This will set the RTR flag in the CAN ID word.
Source§fn set_data(&mut self, data: &[u8]) -> Result<(), ConstructionError>
fn set_data(&mut self, data: &[u8]) -> Result<(), ConstructionError>
Sets the data payload of the frame. For the Remote frame, this just updates the DLC to the length of the data slice.
Source§fn from_raw_id(id: u32, data: &[u8]) -> Option<Self>
fn from_raw_id(id: u32, data: &[u8]) -> Option<Self>
Source§fn remote_from_raw_id(id: u32, dlc: usize) -> Option<Self>
fn remote_from_raw_id(id: u32, dlc: usize) -> Option<Self>
Source§fn is_error_frame(&self) -> bool
fn is_error_frame(&self) -> bool
Source§impl From<CanRemoteFrame> for CanAnyFrame
impl From<CanRemoteFrame> for CanAnyFrame
Source§fn from(frame: CanRemoteFrame) -> Self
fn from(frame: CanRemoteFrame) -> Self
Source§impl From<CanRemoteFrame> for CanFrame
impl From<CanRemoteFrame> for CanFrame
Source§fn from(frame: CanRemoteFrame) -> Self
fn from(frame: CanRemoteFrame) -> Self
Create a CanFrame
from a remote frame
Source§impl TryFrom<CanAnyFrame> for CanRemoteFrame
impl TryFrom<CanAnyFrame> for CanRemoteFrame
Source§type Error = ConstructionError
type Error = ConstructionError
Source§impl TryFrom<CanFrame> for CanRemoteFrame
impl TryFrom<CanFrame> for CanRemoteFrame
Source§impl TryFrom<can_frame> for CanRemoteFrame
impl TryFrom<can_frame> for CanRemoteFrame
Source§impl UpperHex for CanRemoteFrame
impl UpperHex for CanRemoteFrame
impl Copy for CanRemoteFrame
Auto Trait Implementations§
impl Freeze for CanRemoteFrame
impl RefUnwindSafe for CanRemoteFrame
impl Send for CanRemoteFrame
impl Sync for CanRemoteFrame
impl Unpin for CanRemoteFrame
impl UnwindSafe for CanRemoteFrame
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ControllerSpecificErrorInformation for Twhere
T: Frame,
impl<T> ControllerSpecificErrorInformation for Twhere
T: Frame,
Source§fn get_ctrl_err(&self) -> Option<&[u8]>
fn get_ctrl_err(&self) -> Option<&[u8]>
Get the controller specific error information.
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>
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>
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