Structure describing properties of a variable, located in specific index and sub-index inside the Object Dictionary. More...
#include <CO_ODinterface.h>
Data Fields | |
uint16_t | index |
Object Dictionary index. | |
uint8_t | subIndex |
Object Dictionary sub-index. | |
uint8_t | subEntriesCount |
Number of sub-entries in OD object. More... | |
OD_attr_t | attribute |
Attribute bit-field of the OD sub-object, see OD_attributes_t. | |
OD_flagsPDO_t * | flagsPDO |
Pointer to PDO flags bit-field. More... | |
Structure describing properties of a variable, located in specific index and sub-index inside the Object Dictionary.
Structure is initialized with OD_getSub() function.
uint8_t OD_subEntry_t::subEntriesCount |
Number of sub-entries in OD object.
For VAR is 1, for ARRAY is maxSubIndex + 1, for RECORD maxSubIndex may be larger, if there is a gap between sub-indexes.
OD_flagsPDO_t* OD_subEntry_t::flagsPDO |
Pointer to PDO flags bit-field.
This is optional extension of OD object. If OD object has enabled this extension, then each sub-element is coupled with own flagsPDO variable of size 8 to 64 bits (size is configurable by OD_flagsPDO_t). Flag is useful, when variable is mapped to RPDO or TPDO.
If sub-element is mapped to RPDO, then bit0 is set to 1 each time, when any RPDO writes new data into variable. Application may clear bit0.
If sub-element is mapped to TPDO, then TPDO will set one bit on the time, it is sent. First TPDO will set bit1, second TPDO will set bit2, etc. Up to 63 TPDOs can use flagsPDO.
Another functionality is with asynchronous TPDOs, to which variable may be mapped. If corresponding bit is 0, TPDO will be sent. This means, that if application sets variable pointed by flagsPDO to zero, it will trigger sending all asynchronous TPDOs (up to first 63), to which variable is mapped.