pub struct TimestampedFrame {
pub timestamp_us: u64,
pub id: u32,
pub data: Vec<u8>,
}Expand description
带时间戳的帧
保存 CAN 帧及其硬件时间戳,用于录制和回放。
Fields§
§timestamp_us: u64硬件时间戳(微秒)
⏱️ 时间戳精度: 必须直接使用 frame.timestamp_us(硬件时间戳)
禁止在回调中调用 SystemTime::now(),因为回调执行时间已晚于帧到达时间。
id: u32CAN ID
data: Vec<u8>帧数据(最多 8 bytes)
Trait Implementations§
Source§impl Clone for TimestampedFrame
impl Clone for TimestampedFrame
Source§fn clone(&self) -> TimestampedFrame
fn clone(&self) -> TimestampedFrame
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TimestampedFrame
impl Debug for TimestampedFrame
Source§impl From<&PiperFrame> for TimestampedFrame
impl From<&PiperFrame> for TimestampedFrame
Source§fn from(frame: &PiperFrame) -> TimestampedFrame
fn from(frame: &PiperFrame) -> TimestampedFrame
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TimestampedFrame
impl RefUnwindSafe for TimestampedFrame
impl Send for TimestampedFrame
impl Sync for TimestampedFrame
impl Unpin for TimestampedFrame
impl UnwindSafe for TimestampedFrame
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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