|
VLink 2.0.0
A high-performance communication middleware
|
Type-safe field-model writer for VLink topics. More...
#include <memory>#include <mutex>#include <optional>#include <string>#include "./impl/setter_impl.h"#include "./node.h"#include "./internal/setter-inl.h"Go to the source code of this file.
Classes | |
| class | vlink::Setter< ValueT, SecT > |
| Type-safe field writer for the VLink field communication model. More... | |
| class | vlink::SecuritySetter< ValueT > |
Convenience alias for Setter with message security enabled. More... | |
Namespaces | |
| namespace | vlink |
Type-safe field-model writer for VLink topics.
Setter<ValueT, SecT> is the write side of the VLink field model. Each call to set() serialises the value and writes it to the transport as the new "latest value" for the topic. All Getter nodes on the same URL will be notified of the update.
| Feature | Setter<T> | Publisher<T> |
|---|---|---|
| Transport role | kSetter | kPublisher |
| Value retention | Last value re-sent to late getters | No re-send to late subs |
| Sync callback on connect | Yes – sync() callback | No |
| Cross-transport use | As publisher: mark_as_publisher() | As setter: mark_as_setter() |
Getter connects after the Setter has already written, the transport fires the sync() callback registered internally. The Setter re-sends its cached value so the late Getter receives the current state immediately: | ValueT | Value type. Must satisfy Serializer::is_supported(). |
| SecT | Security mode; defaults to SecurityType::kWithoutSecurity. |