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
RegisterIdAreaERROR.NO_ERROR if area was registered successfully, else appropriate error code
Input
hReceiverIdCAA.HANDLERetrun value of CreateIdAreaReceiver
cobIdStartCL2I.COBIDstart id of message to be received
cobIdEndCL2I.COBIDend id of message to be received
xRTRValueBOOLValue RTR bit; only evaluated if
xRTRMaskis set toTRUExRTRMaskBOOLMask RTR bit
x29BitIdValueBOOLValue 29 Bit Id; only evaluated if
x29BitIdMaskis set toTRUEx29BitIdMaskBOOLMask 29 Bit Id
xTransmitValueBOOLValue Transmit message; only evaluated if
xTransmitMaskis set toTRUExTransmitMaskBOOLMask Transmit message