Open keelung-yang opened 2 years ago
See also #1208
Filtering by blacklist/whitelist given by a set
should be fairly efficient too even for large numbers of IDs. Maybe there is even a special data structure for integer sets outside the standard library.
Some MCUs, such as STM32 and NXP LPCxxx, support filtering messages by list or range of CAN-IDs. Some CAN devices, which using such MCUs, provide list-only or both list and mask filters in official development library.
Maybe filtering by mask is the most popular ways, but filtering by list shouldn't be ignored. In python-can, only filtering by mask is supported currently.