Currently, the send() function waits for a transmission to complete (for timeout != 0). This leads to ~30 ms delay for each transmission, because communication with the USBtingo device is slow.
|
if timeout != 0: |
|
if not txconfirmation.wait_confirmed(timeout): |
|
raise CanTimeoutError() |
The can.BusABC.send() function specifies that the timeout may also be interpreted as the maximum time until a frame is placed into the transmission queue:
- timeout (float | None) – If > 0, wait up to this many seconds for message to be ACK’ed or for transmit queue to be ready depending on driver implementation.
The USBtingoBus.send() function shall be modified in one of these ways:
- Either change the implementation to only wait for a frame to be queued, not ACK'ed
- Or make this behavior configurable
Either way, the latency shall be reduced from 30 ms to below 1 ms.
Currently, the
send()function waits for a transmission to complete (fortimeout!= 0). This leads to ~30 ms delay for each transmission, because communication with the USBtingo device is slow.python-can-usbtingo/usbtingobus.py
Lines 297 to 299 in ade7464
The
can.BusABC.send()function specifies that the timeout may also be interpreted as the maximum time until a frame is placed into the transmission queue:The
USBtingoBus.send()function shall be modified in one of these ways:Either way, the latency shall be reduced from 30 ms to below 1 ms.