Skip to content

Implement Asynchronous Transmission #1

@Finwood

Description

@Finwood

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:

  1. Either change the implementation to only wait for a frame to be queued, not ACK'ed
  2. Or make this behavior configurable

Either way, the latency shall be reduced from 30 ms to below 1 ms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions