pub struct Pdo {
pub buffered_value: AtomicCell<Option<[u8; 8]>>,
/* private fields */
}Expand description
Represents a single PDO state
Fields§
§buffered_value: AtomicCell<Option<[u8; 8]>>The last received data value for an RPDO, or ready to transmit data for a TPDO
Implementations§
Source§impl Pdo
impl Pdo
Sourcepub const fn new_with_defaults(
od: &'static [ODEntry<'static>],
defaults: &'static PdoDefaults,
) -> Self
pub const fn new_with_defaults( od: &'static [ODEntry<'static>], defaults: &'static PdoDefaults, ) -> Self
Create a new PDO object with provided defaults
Sourcepub fn set_transmission_type(&self, value: u8)
pub fn set_transmission_type(&self, value: u8)
Set the transmission type for this PDO
Sourcepub fn transmission_type(&self) -> u8
pub fn transmission_type(&self) -> u8
Get the transmission type for this PDO
Sourcepub fn default_cob_id(&self) -> CanId
pub fn default_cob_id(&self) -> CanId
Get the default COB ID for transmission of this PDO
Sourcepub fn sync_update(&self) -> bool
pub fn sync_update(&self) -> bool
This function should be called when a SYNC event occurs
It will return true if the PDO should be sent in response to the SYNC event
Sourcepub fn read_events(&self) -> bool
pub fn read_events(&self) -> bool
Check mapped objects for TPDO event flag
Sourcepub fn init_defaults(&self, node_id: NodeId)
pub fn init_defaults(&self, node_id: NodeId)
Initialize the PDO configuration with its default value
Auto Trait Implementations§
impl !Freeze for Pdo
impl !RefUnwindSafe for Pdo
impl Send for Pdo
impl Sync for Pdo
impl Unpin for Pdo
impl !UnwindSafe for Pdo
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