|
file | CO_GFC.c |
| CANopen Global fail-safe command protocol.
|
|
file | CO_GFC.h |
| CANopen Global fail-safe command protocol.
|
|
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 0, 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_GFC_init()
Initialize GFC object.
Function must be called in the communication reset section.
- Parameters
-
GFC | This object will be initialized. |
valid | pointer to the valid flag in OD (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 |
- Returns
- CO_ReturnError_t: CO_ERROR_NO or CO_ERROR_ILLEGAL_ARGUMENT.
◆ CO_GFC_initCallbackEnterSafeState()
void CO_GFC_initCallbackEnterSafeState |
( |
CO_GFC_t * |
GFC, |
|
|
void * |
object, |
|
|
void(*)(void *object) |
pFunctSignalSafe |
|
) |
| |
Initialize GFC callback function.
Function initializes optional callback function, that is called when GFC is received. Callback is called from receive function (interrupt).
- Parameters
-
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_GFCsend()
Send GFC message.
It should be called by application, for example after a safety-relevant change.
- Parameters
-
- Returns
- Same as CO_CANsend().