pub struct ControlledNode<'s> { /* private fields */ }Expand description
Represents a complete POWERLINK Controlled Node (CN). This struct owns and manages all protocol layers and state machines.
Implementations§
Source§impl<'s> ControlledNode<'s>
impl<'s> ControlledNode<'s>
Sourcepub fn new(
od: ObjectDictionary<'s>,
mac_address: MacAddress,
) -> Result<Self, PowerlinkError>
pub fn new( od: ObjectDictionary<'s>, mac_address: MacAddress, ) -> Result<Self, PowerlinkError>
Creates a new Controlled Node.
The application is responsible for creating and populating the Object Dictionary with device-specific parameters (e.g., Identity Object 0x1018) before passing it to this constructor. This function will then read the necessary configuration from the OD to initialize the NMT state machine.
Trait Implementations§
Source§impl<'s> Node for ControlledNode<'s>
impl<'s> Node for ControlledNode<'s>
Source§fn process_raw_frame(&mut self, buffer: &[u8]) -> NodeAction
fn process_raw_frame(&mut self, buffer: &[u8]) -> NodeAction
Processes a raw byte buffer received from the network.
Source§fn tick(&mut self) -> NodeAction
fn tick(&mut self) -> NodeAction
Called periodically by the application to handle time-based events, like timeouts.
Auto Trait Implementations§
impl<'s> !RefUnwindSafe for ControlledNode<'s>
impl<'s> !Send for ControlledNode<'s>
impl<'s> !Sync for ControlledNode<'s>
impl<'s> !UnwindSafe for ControlledNode<'s>
impl<'s> Freeze for ControlledNode<'s>
impl<'s> Unpin for ControlledNode<'s>
impl<'s> UnsafeUnpin for ControlledNode<'s>
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