【发布时间】:2021-06-22 20:16:00
【问题描述】:
我使用 cantools python 包来解码 canbus 消息。我使用我创建的 dbc 文件进行测试。我复制了一个示例文件。当我使用像 419358976 这样的 can id 时,我收到错误消息。但是对于像 350 这样的更小的罐头 ID,它可以工作。 cantools 是否会因扩展帧 ID 而失败?我如何让它工作?
我的扩展 ID 失败的代码如下:
db = cantools.database.load_file('.\\src\\test\\resources\\j1939.dbc')
print(db.decode_message(419358976,b'\xff\xff\xff\xc0\x0c\xff\xff\xff'))
错误:cantools.database.errors.Error: Standard frame id 0x18fee900 is more than 11 bits in message EEC1.
【问题讨论】:
标签: python-3.x can-bus socketcan python-can