![]() |
CANopenNode
CANopen protocol stack
|
Global fail-safe command protocol. More...
Collaboration diagram for GFC:Files | |
| file | CO_GFC.h |
| CANopen Global fail-safe command protocol. | |
Data Structures | |
| struct | CO_GFC_t |
| GFC object. More... | |
Functions | |
| CO_ReturnError_t | CO_GFC_init (CO_GFC_t *GFC, OD_entry_t *OD_1300_gfcParameter, CO_CANmodule_t *GFC_CANdevRx, uint16_t GFC_rxIdx, uint16_t CANidRxGFC, CO_CANmodule_t *GFC_CANdevTx, uint16_t GFC_txIdx, uint16_t CANidTxGFC) |
| Initialize GFC object. | |
| void | CO_GFC_initCallbackEnterSafeState (CO_GFC_t *GFC, void *object, void(*pFunctSignalSafe)(void *object)) |
| Initialize GFC callback function. | |
| CO_ReturnError_t | CO_GFCsend (CO_GFC_t *GFC) |
| Send GFC message. | |
Global fail-safe command protocol.
Very simple consumer/producer protocol. A net can have multiple GFC producer and multiple GFC consumer. On a safety-relevant the producer can send a GFC message (ID 1, DLC 0). The consumer can use this message to start the transition to a safe state. The GFC is optional for the security protocol and is not monitored (timed).
| CO_ReturnError_t CO_GFC_init | ( | CO_GFC_t * | GFC, |
| OD_entry_t * | OD_1300_gfcParameter, | ||
| CO_CANmodule_t * | GFC_CANdevRx, | ||
| uint16_t | GFC_rxIdx, | ||
| uint16_t | CANidRxGFC, | ||
| CO_CANmodule_t * | GFC_CANdevTx, | ||
| uint16_t | GFC_txIdx, | ||
| uint16_t | CANidTxGFC ) |
Initialize GFC object.
Function must be called in the communication reset section.
| GFC | This object will be initialized. |
| OD_1300_gfcParameter | Pointer to Global fail-safe command parameter variable from Object dictionary (index 0x1300). |
| GFC_CANdevRx | CAN device used for SRDO reception. |
| GFC_rxIdx | Index of receive buffer in the above CAN device. |
| CANidRxGFC | GFC CAN ID for reception |
| GFC_CANdevTx | AN device used for SRDO transmission. |
| GFC_txIdx | Index of transmit buffer in the above CAN device. |
| CANidTxGFC | GFC CAN ID for transmission |
| void CO_GFC_initCallbackEnterSafeState | ( | CO_GFC_t * | GFC, |
| void * | object, | ||
| void(* | pFunctSignalSafe )(void *object) ) |
Initialize GFC callback function.
Function initializes optional callback function, that is called when GFC is received. Callback is called from receive function (interrupt).
| GFC | This object. |
| object | Pointer to object, which will be passed to pFunctSignalSafe(). Can be NULL |
| pFunctSignalSafe | Pointer to the callback function. Not called if NULL. |
| CO_ReturnError_t CO_GFCsend | ( | CO_GFC_t * | GFC | ) |
Send GFC message.
It should be called by application, for example after a safety-relevant change.
| GFC | GFC object. |