我试图运行代码在CAN上发送UDS扩展诊断请求。
from uds import Uds PCM = Uds(resId=0x200, reqId=0x250, transportProtocol="CAN", interface="vector", channel="0", appName="CANoe") response = PCM.send([0x10, 0x03])
但我得到以下类型错误:
Traceback (most recent call last): File "C:\__work__\Karol_projects\main.py", line 26, in <module> PCM = Uds(resId=0x200, reqId=0x250, transportProtocol="CAN", interface="vector", channel="0", appName="CANoe") File "C:\__work__\Karol_projects\venv\lib\site-packages\uds\uds_communications\Uds\Uds.py", line 43, in __init__ self.tp = tpFactory(self.__transportProtocol, configPath=configPath, **kwargs) File "C:\__work__\Karol_projects\venv\lib\site-packages\uds\uds_communications\TransportProtocols\TpFactory.py", line 37, in __call__ return CanTp(configPath=configPath, **kwargs) File "C:\__work__\Karol_projects\venv\lib\site-packages\uds\uds_communications\TransportProtocols\Can\CanTp.py", line 96, in __init__