This function of the CAA_CanL2.library allocates a new message from the data pool of the driver and makes it available via its handle “hMessage”. In addition, the function sets the identifier, cobold format, data length and RTR flag of the message. Such a message must either be sent with CL2.Write or released with CL2.FreeMessage. It can also be duplicated by use of “CL2.CloneMessage”. If there are no resources left for the message “CL2.CreateMessage” returns “CAA.gc_hINVALID”.
hDriver |
CAA.HANDLE |
Handle of CAN interface |
cobId |
CL2I.COBID |
Message ID |
usiLength |
USINT |
number of data bytes in message |
xRTR* |
BOOL |
RTR flag of message |
x29BitID* |
BOOL |
FALSE: 11 Bit-Ids only; TRUE: 29 Bit-Ids also supported |
peError |
POINTER TO CL2.ERROR |
pointer to error code (enumeration type) |
hMessage |
CAA.HANDLE |
handle of message |