|
VLink
2.0.0
A high-performance communication middleware
|
Transport-neutral base for field-model getter (latest-value reader) implementations. 更多...
#include "./node_impl.h"类 | |
| class | vlink::GetterImpl |
| Field-model receive base class shared by every transport-specific getter. 更多... | |
命名空间 | |
| vlink | |
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.
impl_type with kGetter, which the discovery and recording layers use to label outputs originating from this node.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.| 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) |
| 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 |