OpenCyphal / pycyphal

Python implementation of the Cyphal protocol stack.
https://pycyphal.readthedocs.io/
MIT License
119 stars 106 forks source link

Capture/tracing API: Put a lower bound on the auto-detected transfer-ID timeout #161

Open pavel-kirienko opened 3 years ago

pavel-kirienko commented 3 years ago

Python VM cannot be relied on to deliver repeatable real-time performance. When tracing a high-rate session in real-time, spurious transfer-ID timeout events may occur which may lead to duplication of transfers. To fix this, a sensible lower bound ca. 100 ms should be introduced here:

UAVCAN/serial, UAVCAN/UDP: https://github.com/UAVCAN/pyuavcan/blob/master/pyuavcan/transport/commons/high_overhead_transport/_alien_transfer_reassembler.py#L49

UAVCAN/CAN: https://github.com/UAVCAN/pyuavcan/blob/master/pyuavcan/transport/can/_tracer.py#L124