您好,我有一个带有MCP2515 canBus设备的Raspberry,用于读取广播的整个值,它只是使用python-can在Python中的这个源:
import can
bus = can.interface.Bus(channel='can0', bustype='socketcan_native')
notifier = can.Notifier(bus, [can.Printer()])
我需要过滤id的结果,它是如何工作的?任何人都可以举例说明是否可以制作过滤器?我在图书馆的网站上观看,这是过滤的网页:https://python-can.readthedocs.io/en/stable/bus.html#filtering
它是如何工作的?非常感谢你的回复。
我认为这意味着什么
def on_message_received:
set_filters(can_filters{"can_id": 0x11, "can_mask": 0x21})
另一个参考[Json] https://github.com/normaldotcom/CANard/blob/master/examples/example_db.json