|
VLink 2.0.0
A high-performance communication middleware
|
Thread-safe, per-GUID cumulative sample loss counter. 更多...
#include <calculate_sample.h>
Public 成员函数 | |
| CalculateSample () noexcept | |
| Default constructor. | |
| ~CalculateSample () noexcept | |
| Destructor. | |
| void | update (uint64_t seq, uint64_t guid=0) noexcept |
| Processes an incoming sequence number for the given sender. | |
| uint64_t | get_total () const noexcept |
| Returns the total number of expected samples across all senders. | |
| uint64_t | get_lost () const noexcept |
| Returns the cumulative number of lost samples across all senders. | |
Thread-safe, per-GUID cumulative sample loss counter.
Instantiated once per SubscriberImpl or GetterImpl that has latency/loss tracking enabled. The guid parameter allows a single subscriber to track messages from multiple publishers independently.
|
noexcept |
Default constructor.
|
noexcept |
Destructor.
|
nodiscardnoexcept |
Returns the cumulative number of lost samples across all senders.
Accumulated from every gap detected since the last reset.
|
nodiscardnoexcept |
Returns the total number of expected samples across all senders.
Computed as the sum of (expected - first) for every tracked GUID. This includes both successfully delivered and lost samples.
|
noexcept |
Processes an incoming sequence number for the given sender.
Detects gaps in the sequence and accumulates the loss count. Out-of-order or wrap-around sequences larger than UINT32_MAX are treated as resets and do not increment the loss counter.
| seq | Sequence number of the received message. |
| guid | Sender identifier (GUID). Use 0 for single-sender streams. |