Go to the documentation of this file.
37 #define CO_CONFIG_PDO (CO_CONFIG_RPDO_ENABLE | \
38 CO_CONFIG_TPDO_ENABLE | \
39 CO_CONFIG_PDO_SYNC_ENABLE)
42 #if ((CO_CONFIG_PDO) & (CO_CONFIG_RPDO_ENABLE | CO_CONFIG_TPDO_ENABLE)) || defined CO_DOXYGEN
194 #if ((CO_CONFIG_PDO) & CO_CONFIG_PDO_SYNC_ENABLE) || defined CO_DOXYGEN
199 volatile void *CANrxNew[2];
203 volatile void *CANrxNew[1];
206 #if ((CO_CONFIG_PDO) & CO_CONFIG_FLAG_CALLBACK_PRE) || defined CO_DOXYGEN
208 void (*pFunctSignalPre)(
void *object);
245 #if ((CO_CONFIG_PDO) & CO_CONFIG_PDO_SYNC_ENABLE) || defined CO_DOXYGEN
290 #
if ((
CO_CONFIG_PDO) & CO_CONFIG_PDO_SYNC_ENABLE) || defined CO_DOXYGEN
305 #if ((CO_CONFIG_PDO) & CO_CONFIG_FLAG_CALLBACK_PRE) || defined CO_DOXYGEN
320 void (*pFunctSignalPre)(
void *
object));
358 #
if ((
CO_CONFIG_PDO) & CO_CONFIG_PDO_SYNC_ENABLE) || defined CO_DOXYGEN
unsigned long int uint32_t
UNSIGNED32 in CANopen (0007h), 32-bit unsigned integer.
Definition: CO_driver.h:155
Interface between CAN hardware and CANopenNode.
uint32_t COB_IDUsedByRPDO
Communication object identifier for message received.
Definition: CO_PDO.h:87
uint8_t compatibilityEntry
Not used.
Definition: CO_PDO.h:142
uint32_t mappedObject4
Same.
Definition: CO_PDO.h:111
uint32_t mappedObject5
Same.
Definition: CO_PDO.h:169
void * functSignalObjectPre
From CO_RPDO_initCallbackPre() or NULL.
Definition: CO_PDO.h:210
uint32_t mappedObject8
Same.
Definition: CO_PDO.h:172
uint8_t SYNCStartValue
Used with numbered SYNC messages.
Definition: CO_PDO.h:150
RPDO object.
Definition: CO_PDO.h:179
CO_EM_t * em
From CO_RPDO_init()
Definition: CO_PDO.h:180
uint8_t nodeId
From CO_RPDO_init()
Definition: CO_PDO.h:185
uint16_t inhibitTime
Minimum time between transmissions of the PDO in 100micro seconds.
Definition: CO_PDO.h:140
uint8_t sendRequest
If application set this flag, PDO will be later sent by function CO_TPDO_process().
Definition: CO_PDO.h:234
uint16_t defaultCOB_ID
From CO_TPDO_init()
Definition: CO_PDO.h:227
uint16_t CANdevTxIdx
From CO_TPDO_init()
Definition: CO_PDO.h:252
unsigned int uint16_t
UNSIGNED16 in CANopen (0006h), 16-bit unsigned integer.
Definition: CO_driver.h:153
CO_SDO_t * SDO
From CO_RPDO_init()
Definition: CO_PDO.h:181
CO_NMT_internalState_t * operatingState
From CO_RPDO_init()
Definition: CO_PDO.h:184
CO_ReturnError_t
Return values of some CANopen functions.
Definition: CO_driver.h:488
void CO_TPDO_process(CO_TPDO_t *TPDO, bool_t syncWas, uint32_t timeDifference_us, uint32_t *timerNext_us)
Process transmitting PDO messages.
RPDO mapping parameter.
Definition: CO_PDO.h:100
uint32_t mappedObject1
Location and size of the mapped object.
Definition: CO_PDO.h:108
const CO_TPDOMapPar_t * TPDOMapPar
From CO_TPDO_init()
Definition: CO_PDO.h:224
unsigned char bool_t
Boolean data type for general use.
Definition: CO_driver.h:141
uint32_t mappedObject6
Same.
Definition: CO_PDO.h:170
uint8_t restrictionFlags
From CO_RPDO_init()
Definition: CO_PDO.h:187
uint32_t mappedObject6
Same.
Definition: CO_PDO.h:113
uint8_t transmissionType
Transmission type.
Definition: CO_PDO.h:93
uint16_t eventTimer
Time between periodic transmissions of the PDO in milliseconds.
Definition: CO_PDO.h:145
uint8_t maxSubIndex
Equal to 2.
Definition: CO_PDO.h:81
void CO_RPDO_process(CO_RPDO_t *RPDO, bool_t syncWas)
Process received PDO messages.
CO_SDO_t * SDO
From CO_TPDO_init()
Definition: CO_PDO.h:222
CO_NMT_internalState_t * operatingState
From CO_TPDO_init()
Definition: CO_PDO.h:225
uint32_t COB_IDUsedByTPDO
Communication object identifier for transmitting message.
Definition: CO_PDO.h:129
CO_ReturnError_t CO_TPDOsend(CO_TPDO_t *TPDO)
Send TPDO message.
CO_SYNC_t * SYNC
From CO_TPDO_init()
Definition: CO_PDO.h:248
bool_t synchronous
True, if PDO synchronous (transmissionType <= 240)
Definition: CO_PDO.h:197
uint32_t mappedObject3
Same.
Definition: CO_PDO.h:110
uint8_t CO_TPDOisCOS(CO_TPDO_t *TPDO)
Verify Change of State of the PDO.
CANopen Service Data Object - server protocol.
CANopen Synchronisation protocol.
uint8_t numberOfMappedObjects
Actual number of mapped objects from 0 to 8.
Definition: CO_PDO.h:103
uint32_t mappedObject2
Same.
Definition: CO_PDO.h:109
uint32_t mappedObject2
Same.
Definition: CO_PDO.h:166
uint32_t inhibitTimer
Inhibit timer used for inhibit PDO sending translated to microseconds.
Definition: CO_PDO.h:238
uint32_t mappedObject1
Location and size of the mapped object.
Definition: CO_PDO.h:165
uint16_t defaultCOB_ID
From CO_RPDO_init()
Definition: CO_PDO.h:186
uint8_t numberOfMappedObjects
Actual number of mapped objects from 0 to 8.
Definition: CO_PDO.h:160
uint32_t mappedObject7
Same.
Definition: CO_PDO.h:171
uint8_t nodeId
From CO_TPDO_init()
Definition: CO_PDO.h:226
uint32_t mappedObject5
Same.
Definition: CO_PDO.h:112
uint8_t restrictionFlags
From CO_TPDO_init()
Definition: CO_PDO.h:228
uint8_t dataLength
Data length of the received PDO message.
Definition: CO_PDO.h:191
CO_CANmodule_t * CANdevRx
From CO_RPDO_init()
Definition: CO_PDO.h:212
CO_CANtx_t * CANtxBuff
CAN transmit buffer inside CANdev.
Definition: CO_PDO.h:251
RPDO communication parameter.
Definition: CO_PDO.h:80
CO_EM_t * em
From CO_TPDO_init()
Definition: CO_PDO.h:221
#define CO_CONFIG_PDO
Configuration of PDO.
Definition: CO_config.h:453
uint32_t mappedObject8
Same.
Definition: CO_PDO.h:115
CO_SYNC_t * SYNC
From CO_RPDO_init()
Definition: CO_PDO.h:195
const CO_TPDOCommPar_t * TPDOCommPar
From CO_TPDO_init()
Definition: CO_PDO.h:223
uint8_t syncCounter
SYNC counter used for PDO sending.
Definition: CO_PDO.h:247
Emergency object.
Definition: CO_Emergency.h:369
TPDO communication parameter.
Definition: CO_PDO.h:122
uint32_t mappedObject3
Same.
Definition: CO_PDO.h:167
CO_NMT_internalState_t
Internal network state of the CANopen node.
Definition: CO_NMT_Heartbeat.h:77
CANopen Network management and Heartbeat producer protocol.
uint8_t transmissionType
Transmission type.
Definition: CO_PDO.h:137
bool_t valid
True, if PDO is enabled and valid.
Definition: CO_PDO.h:229
uint32_t mappedObject4
Same.
Definition: CO_PDO.h:168
CANopen Emergency protocol.
void CO_RPDO_initCallbackPre(CO_RPDO_t *RPDO, void *object, void(*pFunctSignalPre)(void *object))
Initialize RPDO callback function.
TPDO mapping parameter.
Definition: CO_PDO.h:157
Complete CAN module object.
Definition: CO_driver.h:319
CO_ReturnError_t CO_RPDO_init(CO_RPDO_t *RPDO, CO_EM_t *em, CO_SDO_t *SDO, CO_SYNC_t *SYNC, CO_NMT_internalState_t *operatingState, uint8_t nodeId, uint16_t defaultCOB_ID, uint8_t restrictionFlags, const CO_RPDOCommPar_t *RPDOCommPar, const CO_RPDOMapPar_t *RPDOMapPar, uint16_t idx_RPDOCommPar, uint16_t idx_RPDOMapPar, CO_CANmodule_t *CANdevRx, uint16_t CANdevRxIdx)
Initialize RPDO object.
uint32_t eventTimer
Event timer used for PDO sending translated to microseconds.
Definition: CO_PDO.h:240
uint8_t maxSubIndex
Equal to 6.
Definition: CO_PDO.h:123
const CO_RPDOMapPar_t * RPDOMapPar
From CO_RPDO_init()
Definition: CO_PDO.h:183
SYNC producer and consumer object.
Definition: CO_SYNC.h:75
uint8_t dataLength
Data length of the transmitting PDO message.
Definition: CO_PDO.h:231
uint16_t CANdevRxIdx
From CO_RPDO_init()
Definition: CO_PDO.h:213
bool_t valid
True, if PDO is enabled and valid.
Definition: CO_PDO.h:189
CO_ReturnError_t CO_TPDO_init(CO_TPDO_t *TPDO, CO_EM_t *em, CO_SDO_t *SDO, CO_SYNC_t *SYNC, CO_NMT_internalState_t *operatingState, uint8_t nodeId, uint16_t defaultCOB_ID, uint8_t restrictionFlags, const CO_TPDOCommPar_t *TPDOCommPar, const CO_TPDOMapPar_t *TPDOMapPar, uint16_t idx_TPDOCommPar, uint16_t idx_TPDOMapPar, CO_CANmodule_t *CANdevTx, uint16_t CANdevTxIdx)
Initialize TPDO object.
CO_CANmodule_t * CANdevTx
From CO_TPDO_init()
Definition: CO_PDO.h:250
const CO_RPDOCommPar_t * RPDOCommPar
From CO_RPDO_init()
Definition: CO_PDO.h:182
Configuration object for CAN transmit message for specific CANopenNode Object.
Definition: CO_driver.h:299
TPDO object.
Definition: CO_PDO.h:220
uint8_t sendIfCOSFlags
Each flag bit is connected with one mapPointer.
Definition: CO_PDO.h:244
unsigned char uint8_t
UNSIGNED8 in CANopen (0005h), 8-bit unsigned integer.
Definition: CO_driver.h:151
uint32_t mappedObject7
Same.
Definition: CO_PDO.h:114