CAN Interface

The interface component provides an interface to the hardware driver.


      CO_NODE o-- CO_IF : Node
      CO_IF_DRV *-- CO_IF : Drv
      CO_IF_FRM -- CO_IF
      class CO_IF {
        +COIfCanRead(destination) int16_t
        +COIfCanSend(source) int16_t


The class CO_IF is defined within co_if.h and is responsible for the interface management. The following data members are in this class

Data Member Type Description
Node CO_NODE* pointer to parent node
Drv CO_IF_DRV driver specific CAN bus identification

Note: The data within this structure must never be manipulated without the corresponding class member functions. This can lead to unpredictable behavior of the node.


The following table describes the API functions of the CANopen interface module. These functions are implemented within the source file: co_if.c/h

COIfCanClose() This function closes the CAN interface.
COIfCanRead() This function waits for the next CAN frame on the interface without a timeout.
COIfCanReset() This function resets the CAN interface and flushes all already buffered CAN frames.
COIfCanSend() This function sends the given CAN frame to the interface without delay.