Kvaser Linux CANLIB
|
You can set filters to reduce the number of received messages. CANLIB supports setting of the hardware filters on the CAN interface board. This is done with the canAccept() function.
You set an acceptance code and an acceptance mask which together determine which CAN identifiers are accepted or rejected.
Example. Setting the acceptance filters.
stat = canAccept(hnd, 0xE7, canFILTER_SET_CODE_STD); stat = canAccept(hnd, 0xFF, canFILTER_SET_MASK_STD);
This code snippet will cause all messages with 11-bit identifiers with the lower 8 bits not equalling 0xe7 to be rejected.