pub struct NodeState<const N_RPDO: usize, const N_TPDO: usize> { /* private fields */ }Expand description
The NodeState provides config-dependent storage to the Node object
The node state has to get instantiated (statically) by zencan-build, based on the device config
file. It is then provided to the node by the application when it is instantiated, and accessed
via the NodeStateAccess trait.
Implementations§
Source§impl<const N_RPDO: usize, const N_TPDO: usize> NodeState<N_RPDO, N_TPDO>
impl<const N_RPDO: usize, const N_TPDO: usize> NodeState<N_RPDO, N_TPDO>
Sourcepub const fn pdo_sync(&'static self) -> &'static ObjectFlagSync
pub const fn pdo_sync(&'static self) -> &'static ObjectFlagSync
Access the pdo_sync as a const function
This is required so that it can be shared with the objects in generated code
Sourcepub const fn storage_context(&'static self) -> &'static StorageContext
pub const fn storage_context(&'static self) -> &'static StorageContext
Access the storage_context as a const function
Trait Implementations§
Source§impl<const N_RPDO: usize, const N_TPDO: usize> NodeStateAccess for NodeState<N_RPDO, N_TPDO>
impl<const N_RPDO: usize, const N_TPDO: usize> NodeStateAccess for NodeState<N_RPDO, N_TPDO>
Source§fn get_pdo_sync(&self) -> &ObjectFlagSync
fn get_pdo_sync(&self) -> &ObjectFlagSync
Get the PDO flag sync object
Source§fn storage_context(&self) -> &StorageContext
fn storage_context(&self) -> &StorageContext
Get the storage context object
Auto Trait Implementations§
impl<const N_RPDO: usize, const N_TPDO: usize> !Freeze for NodeState<N_RPDO, N_TPDO>
impl<const N_RPDO: usize, const N_TPDO: usize> !RefUnwindSafe for NodeState<N_RPDO, N_TPDO>
impl<const N_RPDO: usize, const N_TPDO: usize> Send for NodeState<N_RPDO, N_TPDO>
impl<const N_RPDO: usize, const N_TPDO: usize> Sync for NodeState<N_RPDO, N_TPDO>
impl<const N_RPDO: usize, const N_TPDO: usize> Unpin for NodeState<N_RPDO, N_TPDO>
impl<const N_RPDO: usize, const N_TPDO: usize> !UnwindSafe for NodeState<N_RPDO, N_TPDO>
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