CL2.Read (FUN)

 

This function of the CAA_CanL2.library returns the handle of the oldest unread message in the queue to the receiving structure. "CL2.LostMes­sages”* contains the number of message lost since the last call due to an overflow of the queue.

A message read with CL2.Read must always be acknowledged and released via CL2.FreeMessage and can be duplicated beforehand with CL2.CloneMessage.

Please also note that the contents of “hMessage” may not be changed as such changes would affect the received message (not the copy) and consequently also affect all others who receive the message

Input:

hRegId

CAA.HANDLE

handle of identifier registered

pctMsgLeft

CAA.COUNT

peError

POINTER TO CL2.ERROR

pointer to error code (enumeration type)

Output:

hMessage

CAA.HANDLE

handle of CAN message