Skip to content

Count lost feedback packets using the robot's sequence numbers - #16

Merged
FLo-ABB merged 1 commit into
FLo-ABB:mainfrom
albsve2:count-lost-packets
Nov 9, 2026
Merged

FLo-ABB merged 1 commit into
FLo-ABB:mainfrom
albsve2:count-lost-packets

Conversation

@albsve2

@albsve2 albsve2 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Closes #15.

The EGM manual states that the sequence number is increased by one for each message, which makes it possible to detect lost messages.
This adds EGM.lost_packets, which counts gaps in the robot's header.seqno as packets are received.

  • A gap from 3 to 6 counts 2 lost packets.
  • A lower or equal sequence number (e.g. a new EGM session) restarts the count from there without counting anything as lost.
  • Packets skipped by receive_latest() are not counted: they arrived but were discarded, which is what skipped reports.

Tested with a local UDP socket acting as the robot: sequence 1, 2, 3, 6, 7 gives 2 lost packets, a restart at 1 adds nothing, and packets drained by receive_latest() are not counted as lost.

@FLo-ABB
FLo-ABB merged commit 467da90 into FLo-ABB:main Nov 9, 2026
2 checks passed
@FLo-ABB

FLo-ABB commented Nov 9, 2026

Copy link
Copy Markdown
Owner

No breaking code, feature added. Nice, thanks @albsve2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Count lost feedback packets using the robots sequence numbers

2 participants