Class MessageDropCalculator

Nested Relationships

Nested Types

Class Documentation

class MessageDropCalculator

Calculates if any messages were not received by a subscriber (e.g. dropped)

Two update paths:

  • registerReceivedMessage(seq): real messages — always counts missing IDs after the first.

  • applyReceivedPublisherUpdate(seq): heartbeats — counts all missing IDs only if no real messages arrived since the last external update.

Not thread-safe

Public Functions

void RegisterReceivedMessage(uint64_t received_message_counter)

Notify arrival of a real subscriber message.

Parameters:

seq – The sequence number received.

Summary GetSummary()

Retrieve and reset the “newDrops” counter.

Returns:

A Summary of drops since last call and since construction.

struct Summary

Snapshot of drop counts. newDrops is the count since the last getSummary() call; totalDrops is the count since construction.

Public Members

bool new_drops = false
uint64_t drops = 0