filtermechanism for BufferedCAN
The BufferedCAN feature provides a central management for all CAN I/O. Right now, however, all software modules (i.e. threads) that are interested in CAN communication have to filter messages by themselves. This is a rather inefficient approach since individual components typically are interested in only very few specific messages.
As a proposed solution, a subscription mechanism could be implemented where each subscriber can specify an individual filter. The BufferedCAN driver would then notify subscribers only if an according message has been received. These filters can also be used when retrieving messages from the buffer so that subscribers can fetch the next message directly instead of scanning the buffer by themselves.
This filter approach could even be extended to hardware filters in order to reduce ISR overhead. If the number of available hardware filters does not suffice, though, there must be an appropriate solution to add further filters. A naive implementation would deactivate all hardware filtering in that case, but smart modification of existing filters might be more efficient.