CL2.CreateMaskReceiver (FUN)

 

This function of the CAA_CanL2.library registers an identifier area for future calls of CL2.Read. In principle it is identical to “CL2.RegisterId”. In contrast to CL2.RegisterIdArea the area is not created by enumerating the identifiers concerned but by a combination of bit signs and associ­ated mask values. The resulting identifier group can be determined as follows:

Value

0

0

1

1

x: this bit may be either TRUE or FALSE

Mask

0

1

0

1

0: this bit has to be FALSE

Result

X

0

x

1

1: this bit has to be TRUE

Therefore, a mask set to TRUE activates the value in “Value”. If the mask is set to FALSE, the associated value is ignored when filtering messages.

Input:

hDriver

CAA.HANDLE

Handle of CAN interface

cobIdValue

CL2I.COBID

bit sign of identifier of message

cobIdMask

CL2I.COBID

mask for bit sign of cobIdValue

xRTRValue

BOOL

bit sign for RTR flag

xRTRMask

BOOL

mask for bit sign of xRTRValue

x29BitIdValue

BOOL

bit sign of message type

x29IdMask

BOOL

Mask for bit sign of x29BitIdValue

xTransmitValue

BOOL

Bit sign of feedback

xTransmitMask

BOOL

mask for bit sign of xTransmitValue

xAlwaysNewest*

BOOL

TRUE: only the newest message is stored; FALSE: all received messages are stored in chronological order

eEvent*

CB_EVENT

event to be activated when receiving a message

0: no event

xEnableSyncWindow*

BOOL

reception only in Sync window

peError

POINTER TO CL2.ERROR

pointer to error code (enumeration type)

Output:

hRegId

CAA.HANDLE

handle for future read access