Struct bxcan::Frame [−][src]
pub struct Frame { /* fields omitted */ }
Expand description
A CAN data or remote frame.
Implementations
impl Frame
[src]
impl Frame
[src]pub fn new_remote(id: impl Into<Id>, dlc: u8) -> Self
[src]
pub fn new_remote(id: impl Into<Id>, dlc: u8) -> Self
[src]Creates a new remote frame with configurable data length code (DLC).
Panics
This function will panic if dlc
is not inside the valid range 0..=8
.
pub fn is_extended(&self) -> bool
[src]
pub fn is_extended(&self) -> bool
[src]Returns true if this frame is an extended frame.
pub fn is_standard(&self) -> bool
[src]
pub fn is_standard(&self) -> bool
[src]Returns true if this frame is a standard frame.
pub fn is_remote_frame(&self) -> bool
[src]
pub fn is_remote_frame(&self) -> bool
[src]Returns true if this frame is a remote frame.
pub fn is_data_frame(&self) -> bool
[src]
pub fn is_data_frame(&self) -> bool
[src]Returns true if this frame is a data frame.
pub fn priority(&self) -> FramePriority
[src]
pub fn priority(&self) -> FramePriority
[src]Returns the priority of this frame.
Trait Implementations
impl Frame for Frame
[src]
impl Frame for Frame
[src]fn new(id: impl Into<Id>, data: &[u8]) -> Result<Self, ()>
[src]
fn new(id: impl Into<Id>, data: &[u8]) -> Result<Self, ()>
[src]Creates a new frame. Returns an error when the data slice is too long. Read more
fn new_remote(id: impl Into<Id>, dlc: usize) -> Result<Self, ()>
[src]
fn new_remote(id: impl Into<Id>, dlc: usize) -> Result<Self, ()>
[src]Creates a new remote frame (RTR bit set). Returns an error when the data length code (DLC) is not valid. Read more
fn is_extended(&self) -> bool
[src]
fn is_extended(&self) -> bool
[src]Returns true if this frame is a extended frame.
fn is_standard(&self) -> bool
[src]
fn is_standard(&self) -> bool
[src]Returns true if this frame is a standard frame.
fn is_remote_frame(&self) -> bool
[src]
fn is_remote_frame(&self) -> bool
[src]Returns true if this frame is a remote frame.
fn is_data_frame(&self) -> bool
[src]
fn is_data_frame(&self) -> bool
[src]Returns true if this frame is a data frame.