![]() |
Kvaser CANLIB: Welcome to Kvaser CANLIB!
|
Explanation of the code and mask format used by the canAccept(), canSetAcceptanceFilter(), and canObjBufSetFilter() functions:
A binary 1 in a mask means "the corresponding bit in the code is relevant"
A binary 0 in a mask means "the corresponding bit in the code is not relevant"
A relevant binary 1 in a code means "the corresponding bit in the identifier must be 1"
A relevant binary 0 in a code means "the corresponding bit in the identifier must be 0"
In other words, the message is accepted if ((code XOR id) AND mask) == 0.