Application note 0564-04: Send Indications
This document is an amendment to the user manual of the CANopen Library from port.
Â
In the CANopen Library 4.4.p77 there are two new indications introduced. The purpose for this indication is to signal to the application that message to send was given to the CANopen Library buffers. The Indication tells the application if it was successful, the CAN-line and CANopen service dependend information. To enable this this applications the following defines have to be set in the CANopen Designtool under Hardware Configuration/Advanced Configuration.
Â
Â
compiler define | Design Tool setting |
CO_CONFIG_PDO_SEND_IND | Enables the send indication for transmit PDOs. |
CO_CONFIG_SYNC_SEND_IND | Enables the send indication for a transmit sync. |
Â
Â
If the application wants to use the indications, two callbacks have to be implemented.
For PDOs is the prototype:
Â
void sendPdoInd(UNSIGNED16 pdoNr, UNSIGNED8 reason, RET_T returnCode CO_COMMA_LINE_PARA_DECL);
Â
Parameter description:
parameter | description |
pdoNr | Is the Number of the PDO which caused this callback. |
reason | Is the reason for trying a send. The values are: SEND_PDO_IND_RTRÂ Â Â Â Â SEND_PDO_IND_TIMEÂ Â Â SEND_PDO_IND_SYNCÂ Â Â Â Â SEND_PDO_IND_ACYC |
returnCode | If this value is unequal to CO_OK the transmission to the CANopen Library buffer failed. |
Â
For SYNCs is the prototype:
Â
void sendSyncInd(UNSIGNED8 syncCnt, RET_T returnCode CO_COMMA_LINE_PARA_DECL);
Â
Parameter description:
parameter | description |
syncCnt | Is the sync counter value of this specific sync message. |
returnCode | If this value is unequal to CO_OK the transmission to the CANopen Library buffer failed. |
Â
Â
Â
Â
Â
Â
Â
Â
Â