bridge can_link
API Reference Manual  /  4 Model-to-Model Interfaces  / 

can_device

Description
SIM_INTERFACE(can_device) {
        void (*receive)(conf_object_t *obj, can_frame_t *frame);
};
#define CAN_DEVICE_INTERFACE "can_device"

The can_device interface is implemented by CAN controllers. The receive function is called by can-endpoint to pass CAN frame from other can-endpoint to the connected CAN controller.

The CAN frame is expressed by the frame parameter, which is a pointer of can_frame_t. The following is the details of can_frame_t:

Above are the Arbitration Field and Control Field of the physical Standard frame and Extended frame. But the can_frame_t only focus on the logical meanings of such fields and tries to adapt different CAN controllers:
typedef struct {
        /* arbitration field */
        uint32 identifier;
        bool extended;
        bool rtr;
        /* control field */
        uint8 data_length;
        /* data field */
        uint8 data[CAN_DATA_MAX_NUM];
        /* crc field */
        uint16 crc;
} can_frame_t;

Execution Context
Cell Context for all methods.

bridge can_link