VLink  2.0.0
A high-performance communication middleware
getter_impl.h 文件参考

Transport-neutral base for field-model getter (latest-value reader) implementations. 更多...

#include "./node_impl.h"
getter_impl.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

class  vlink::GetterImpl
 Field-model receive base class shared by every transport-specific getter. 更多...
 

命名空间

 

详细描述

Transport-neutral base for field-model getter (latest-value reader) implementations.

This is an internal implementation header used by the public Getter template; applications should depend on getter.h instead. GetterImpl extends NodeImpl with the field-model receive semantics: a single value is tracked per topic, and the getter is notified whenever the matching SetterImpl writes a new value. Optional latency / loss tracking mirrors the interface found on SubscriberImpl so that both receivers expose the same diagnostics.

ImplType
The constructor stamps impl_type with kGetter, which the discovery and recording layers use to label outputs originating from this node.
Lifecycle
  • Constructed by the matching Conf::create_getter().
  • listen() is called by the public Getter once the user installs a callback; is_listened flips to true on success.
  • init() / deinit() inherited from NodeImpl bring the underlying transport up and tear it down.
  • set_latency_and_lost_enabled() may be toggled before or after listening.
Role table
Capability Provider
Wire receive callback Subclass override of listen()
Latency / loss reporting Subclass override of the optional getters
Listen state flag is_listened (set by Getter)
Internal API contract
Method Default Subclass duty
listen(MsgCallback&&) Pure virtual Bind transport callback
set_latency_and_lost_enabled(bool) No-op Toggle tracking
is_latency_and_lost_enabled() const Returns false Report tracking state
get_latency() const Returns 0 Latest measured latency
get_lost() const Returns zero SampleLostInfo Cumulative loss stats