CreateMessage (FUN)

FUNCTION CreateMessage : CAA.HANDLE

This function 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, cobld, data length and RTR flag of the message. Such a message must either be sent with Write or released with FreeMessage. It can also be duplicated by use of CloneMessage.

Example

See Write.

InOut:

Scope

Name

Type

Comment

Return

CreateMessage

CAA.HANDLE

new message handle or CAA.gc_hINVALID if no resources left

Input

hDriver

CAA.HANDLE

handle of CAN interface

cobID

CL2I.COBID

cob ID

usiLength

USINT

length of valid data bytes

xRTR

BOOL

RTR bit

x29BitID

BOOL

29 Bit ID

peError

POINTER TO ERROR

optional pointer to error enum