OpenCyphal / pycyphal

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

Added UDPTransportStatistics #280

Closed maksimdrachov closed 1 year ago

maksimdrachov commented 1 year ago

To close: https://github.com/OpenCyphal/pycyphal/issues/279

Create a new zero-initialized/empty entry in the received_datagrams dict when a new session is created using self._statistics.received_datagram.setdefault(...) and pass a reference to it to the session constructor. Let the session update the counters while it exists. When the session is terminated, the corresponding entry in the received_datagram dict is not to be removed.

pavel-kirienko commented 1 year ago

See https://github.com/OpenCyphal/pycyphal/issues/281