pub struct CANFrameMachine { /* private fields */ }Expand description
A state machine designed to process and construct raw CAN frames.
Trait Implementations§
Source§impl Default for CANFrameMachine
impl Default for CANFrameMachine
Source§impl MachineTrans<u8> for CANFrameMachine
impl MachineTrans<u8> for CANFrameMachine
Source§fn initial(&mut self)
fn initial(&mut self)
Resets the machine’s state and the CAN frame data to their initial conditions.
Source§fn transit(&mut self, x: u8)
fn transit(&mut self, x: u8)
Consumes an input byte and transitions the state machine according to the current state.
Processes the input byte x and transitions the state machine to the next state
as part of building a CAN frame.
Source§fn observe(&self) -> Self::Observation
fn observe(&self) -> Self::Observation
Observes the current machine state to check for a completed CAN frame.
Returns Some(CANFrame) if in a final state with a valid frame, otherwise None.
Source§type Observation = Option<CANFrame>
type Observation = Option<CANFrame>
An associated type for capturing the machine’s state or output observations.
Auto Trait Implementations§
impl Freeze for CANFrameMachine
impl RefUnwindSafe for CANFrameMachine
impl Send for CANFrameMachine
impl Sync for CANFrameMachine
impl Unpin for CANFrameMachine
impl UnsafeUnpin for CANFrameMachine
impl UnwindSafe for CANFrameMachine
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