|
VLink 2.0.0
A high-performance communication middleware
|
Type-safe field-model reader for VLink topics. More...
#include <functional>#include <memory>#include <mutex>#include <optional>#include <string>#include "./base/condition_variable.h"#include "./impl/getter_impl.h"#include "./node.h"#include "./internal/getter-inl.h"Go to the source code of this file.
Classes | |
| class | vlink::Getter< ValueT, SecT > |
| Type-safe field reader for the VLink field communication model. More... | |
| class | vlink::SecurityGetter< ValueT > |
Convenience alias for Getter with message security enabled. More... | |
Namespaces | |
| namespace | vlink |
Type-safe field-model reader for VLink topics.
Getter<ValueT, SecT> is the read side of the VLink field model. It maintains the latest value published by any matching Setter on the same URL. Unlike Subscriber, it retains only the most recent value rather than queuing a history of updates.
| Feature | Getter<T> | Subscriber<T> |
|---|---|---|
| Value retention | Latest value cached | No caching |
| Transport role | kGetter | kSubscriber |
| Blocking read | wait_for_value() | N/A |
| Change-reporting filter | set_change_reporting(true) | No built-in filter |
| Cross-transport use | As subscriber: mark_as_subscriber() | As getter: mark_as_getter() |
get() and wait_for_value() both require a prior Setter write to return a value. Before any Setter has written, get() returns std::nullopt and wait_for_value() blocks until one does.| ValueT | Value type. Must satisfy Serializer::is_supported(). |
| SecT | Security mode; defaults to SecurityType::kWithoutSecurity. |