Skip to main content

ControlledNode

Struct ControlledNode 

Source
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>

Source

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>

Source§

fn process_raw_frame(&mut self, buffer: &[u8]) -> NodeAction

Processes a raw byte buffer received from the network.
Source§

fn tick(&mut self) -> NodeAction

Called periodically by the application to handle time-based events, like timeouts.
Source§

fn nmt_state(&self) -> NmtState

Returns the current NMT state of the node.

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.