|
VLink
2.0.0
A high-performance communication middleware
|
Tracks expected and lost sample counts grouped by sender GUID. More...
#include <calculate_sample.h>
Public Member Functions | |
| CalculateSample () noexcept | |
| Constructs an empty counter. More... | |
| ~CalculateSample () noexcept | |
| Releases all per-sender state. More... | |
| void | update (uint64_t seq, uint64_t guid=0) noexcept |
Records a sequence number received from guid. More... | |
| uint64_t | get_total () const noexcept |
| Returns the total number of expected samples across all senders. More... | |
| uint64_t | get_lost () const noexcept |
| Returns the cumulative number of lost samples across all senders. More... | |
Tracks expected and lost sample counts grouped by sender GUID.
One instance is created per subscriber / getter when latency-and-loss tracking is enabled. The guid parameter of update() lets a single receiver account for multiple senders without their streams interfering.
|
noexcept |
Constructs an empty counter.
|
noexcept |
Releases all per-sender state.
|
noexcept |
Returns the cumulative number of lost samples across all senders.
|
noexcept |
Returns the total number of expected samples across all senders.
Computed as the sum of (expected - first) over every tracked GUID. The value includes both received and lost samples.
0 when no data has been observed yet.
|
noexcept |
Records a sequence number received from guid.
Updates the per-sender counters according to the algorithm described at file scope. Acquires the exclusive side of the shared mutex.
| seq | Sequence number reported by the transport. |
| guid | Sender identifier; pass 0 when there is exactly one source. |