CanMsgWrite

Description

This function splits a CAN frame into the linked signals.

Prototype

CPU_INT16S CanMsgWrite(CPU_INT16S  paraId,
                       void       *buffer,
                       CPU_INT16U  size);

Parameter

Meaning

msgId

Unique message identifier

buffer

Pointer to CAN frame of type CANFRM

size

Size of buffer in bytes (must be equal to sizeof(CANFRM))

Return Value

One of the error codes CAN_ERR_MSGID, CAN_ERR_NULLPTR or CAN_ERR_FRMSIZE if an error is detected. Otherwise the number of bytes of a CAN frame is returned.