pubmodcn;pubmodhandler;usecrate::nmt::states::NmtState;usealloc::vec::Vec;/// Represents the possible actions a POWERLINK node might need to perform
/// in response to an event or a tick.
#[derive(Debug)]pubenumNodeAction{/// The node needs to send a frame over the network.
SendFrame(Vec<u8>),/// The node needs a timer to be set for the specified duration in microseconds.
/// When the timer expires, the application should call `tick()`.
SetTimer(u64),/// No immediate action is required.
NoAction,}/// A trait that defines the common interface for all POWERLINK nodes (MN and CN).
pubtraitNode{/// Processes a raw byte buffer received from the network.
fnprocess_raw_frame(&mutself, buffer:&[u8])-> NodeAction;/// Called periodically by the application to handle time-based events, like timeouts.
fntick(&mutself)-> NodeAction;/// Returns the current NMT state of the node.
fnnmt_state(&self)-> NmtState;}