|
YARP CiA-402 EtherCAT Device 0.6.0
YARP device plugin for EtherCAT CiA-402 drives
|
Lightweight view over a slave's TxPDO image. More...
#include <CiA402/EthercatManager.h>
Public Member Functions | |
| TxView (const uint8_t *base, const std::unordered_map< TxField, FieldInfo > *map) | |
| Construct a view. | |
| bool | has (TxField f) const |
| Check if a given field is available in the current mapping. | |
| template<typename T> | |
| T | get (TxField f, T fallback={}) const |
| Read a field from the TxPDO image with a typed accessor. | |
Lightweight view over a slave's TxPDO image.
Provides presence checks and typed accessors to values mapped into the device TxPDO. Lifetime note: this is a non-owning view, valid as long as the underlying process image buffer remains alive and unmoved.
Definition at line 88 of file EthercatManager.h.
|
inline |
Construct a view.
| base | Pointer to the beginning of the raw TxPDO buffer for a slave. |
| map | Pointer to the field map describing where each entry is. |
Definition at line 96 of file EthercatManager.h.
|
inline |
Read a field from the TxPDO image with a typed accessor.
Supports any trivially copyable type whose size matches the mapped field (commonly 8/16/32-bit integers or IEEE-754 REALs coming from the drive). If the field is not present or the size does not match, the fallback is returned.
Definition at line 117 of file EthercatManager.h.
|
inline |
Check if a given field is available in the current mapping.
Definition at line 105 of file EthercatManager.h.