Trait uavcan_core::TransportFrame
[−]
[src]
pub trait TransportFrame { fn with_data(id: u32, data: &[u8]) -> Self; fn with_length(id: u32, length: usize) -> Self; fn set_data_length(&mut self, length: usize); fn max_data_length() -> usize; fn data(&self) -> &[u8]; fn data_as_mut(&mut self) -> &mut [u8]; fn id(&self) -> u32; fn tail_byte(&self) -> TailByte { ... } fn is_start_frame(&self) -> bool { ... } fn is_end_frame(&self) -> bool { ... } fn is_single_frame(&self) -> bool { ... } }
The TransportFrame is uavcan cores main interface to the outside world
This will in >99% of situations be a CAN2.0B frame But in theory both CAN-FD and other protocols which gives similar guarantees as CAN can also be used
Required Methods
fn with_data(id: u32, data: &[u8]) -> Self
with_data(id: u32, data: &[u]) -> TransportFrame creates a TransportFrame with an 28 bits ID and data between 0 and the return value ofget_max_data_length()
fn with_length(id: u32, length: usize) -> Self
fn set_data_length(&mut self, length: usize)
fn max_data_length() -> usize
fn data(&self) -> &[u8]
fn data_as_mut(&mut self) -> &mut [u8]
fn id(&self) -> u32
Provided Methods
fn tail_byte(&self) -> TailByte
fn is_start_frame(&self) -> bool
fn is_end_frame(&self) -> bool
fn is_single_frame(&self) -> bool
Implementors
impl TransportFrame for CanFrame