VLink 2.0.0
A high-performance communication middleware
载入中...
搜索中...
未找到
vlink::CalculateSample类 参考final

Thread-safe, per-GUID cumulative sample loss counter. 更多...

#include <calculate_sample.h>

vlink::CalculateSample 的协作图:

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.

构造及析构函数说明

◆ CalculateSample()

vlink::CalculateSample::CalculateSample ( )
noexcept

Default constructor.

这是这个函数的调用关系图:

◆ ~CalculateSample()

vlink::CalculateSample::~CalculateSample ( )
noexcept

Destructor.

函数调用图:

成员函数说明

◆ get_lost()

uint64_t vlink::CalculateSample::get_lost ( ) const
nodiscardnoexcept

Returns the cumulative number of lost samples across all senders.

Accumulated from every gap detected since the last reset.

返回
Total lost sample count.
函数调用图:
这是这个函数的调用关系图:

◆ get_total()

uint64_t vlink::CalculateSample::get_total ( ) const
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.

返回
Total expected sample count, or 0 if no data has been received.
函数调用图:
这是这个函数的调用关系图:

◆ update()

void vlink::CalculateSample::update ( uint64_t seq,
uint64_t guid = 0 )
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.

参数
seqSequence number of the received message.
guidSender identifier (GUID). Use 0 for single-sender streams.
函数调用图:
这是这个函数的调用关系图:

该类的文档由以下文件生成: