RegisterIdArea
(FUN)
FUNCTION RegisterIdArea : ERROR
This function registers a CAN identifier area to an IdAreaReceiver created by CreateIdAreaReceiver.
If the parameter cobIdStart
equals cobIdEnd
only one identifier is registered.
The values of the masks activate the evaluation of the value parameters.
If the mask value is FALSE
the value parameter is ignored.
Receivers can be also used for Tx loopback. If xTransmitMask
is set to FALSE
or xTransmitMask
and xTransmitValue
are set to TRUE
CAN messages which are sent via Write will be received (applies to all transmit messages on the CAN interface).
Use function IsTransmitMessage to distinguish between receive and transmit messages.
Note
Current implementation of this receiver type does not support 29 bit identifiers. Set x29BitIdValue
always to FALSE
and
x29BitIdMask
to TRUE
. Otherwise an error will be returned.
Example
See CreateIdAreaReceiver.
- InOut:
Scope
Name
Type
Comment
Return
RegisterIdArea
ERROR.NO_ERROR if area was registered successfully, else appropriate error code
Input
hReceiverId
CAA.HANDLE
Retrun value of CreateIdAreaReceiver
cobIdStart
CL2I.COBID
start id of message to be received
cobIdEnd
CL2I.COBID
end id of message to be received
xRTRValue
BOOL
Value RTR bit; only evaluated if
xRTRMask
is set toTRUE
xRTRMask
BOOL
Mask RTR bit
x29BitIdValue
BOOL
Value 29 Bit Id; only evaluated if
x29BitIdMask
is set toTRUE
x29BitIdMask
BOOL
Mask 29 Bit Id
xTransmitValue
BOOL
Value Transmit message; only evaluated if
xTransmitMask
is set toTRUE
xTransmitMask
BOOL
Mask Transmit message