|
VLink
2.0.0
A high-performance communication middleware
|
Common CRTP base for every VLink communication primitive. More...
#include <atomic>#include <memory>#include <mutex>#include <optional>#include <string>#include "./extension/security.h"#include "./impl/node_impl.h"#include "./internal/node-inl.h"Go to the source code of this file.
Classes | |
| class | vlink::Node< ImplT, SecT > |
| Transport-agnostic CRTP base for all VLink communication primitives. More... | |
Namespaces | |
| vlink | |
Common CRTP base for every VLink communication primitive.
Node<ImplT, SecT> is the polymorphic base class shared by all six VLink communication primitives. It owns the transport-specific implementation pointer (impl_), drives the node lifecycle, and exposes the cross-cutting services that every primitive needs: zero-copy loans, peer-discovery toggling, message-loop attachment, recording, security installation, profiling, and SSL/TLS configuration.
* +--------------------------------------------------------------+ * | User-facing primitives | * | Publisher<T> Subscriber<T> Setter<T> Getter<T> | * | Client<Req,Resp> Server<Req,Resp> | * +-----------------------------+--------------------------------+ * | inherits * +-----------------------------v--------------------------------+ * | Node<ImplT, SecT> | * | lifecycle | loans | properties | profiler | ssl | security | * +-----------------------------+--------------------------------+ * | owns std::unique_ptr<ImplT> * +-----------------------------v--------------------------------+ * | ImplT (PublisherImpl, SubscriberImpl, SetterImpl, ...) | * +-----------------------------+--------------------------------+ * | dispatches to transport * +-----------------------------v--------------------------------+ * | Transport back-ends | * | intra | shm | shm2 | dds | ddsc | zenoh | someip | ... | * +--------------------------------------------------------------+ *
* +------------+ constructor +------------+ init() +------------+ * | (uninited) |------------------>| parsed |------------->| active | * | | parse URL / Conf | (impl_) | init_ext | (using API)| * +------------+ +------------+ +------------+ * ^ | * | init() | interrupt() * | v * +------+------+ +-------------+ * | deinited |<-----------| blocking | * | | deinit() | wait aborts| * +-------------+ +-------------+ * | * | destructor (calls deinit if active) * v * destroyed *
| Step | Method | Notes |
|---|---|---|
| Construction | constructor | Parses URL, creates impl via Conf factory. |
| Initialisation | init() | Runs impl init + init_ext, samples loans. |
| Active | publish / listen / ... | Normal operation. |
| Interrupt | interrupt() | Aborts blocking waits immediately. |
| Deinitialisation | deinit() | interrupt() then impl deinit + deinit_ext. |
| Destruction | destructor | Auto-deinits if still active. |
ImplType | Primitive that uses it | Direction |
|---|---|---|
kPublisher | Publisher<T> | Event write |
kSubscriber | Subscriber<T> | Event read |
kClient | Client<Req,Resp> | RPC caller |
kServer | Server<Req,Resp> | RPC handler |
kSetter | Setter<T> | Field write |
kGetter | Getter<T> | Field read |
Security* primitive aliases to enable per-message encryption. The Security::Config aggregate is passed as the second constructor argument; omitting it (or passing an empty aggregate) uses the built-in default symmetric slot: intra:// and dds:// CDR payloads do not support per-message security; constructing a Security* primitive there is a fatal.| ImplT | Concrete transport implementation derived from NodeImpl. |
| SecT | Security mode: kWithoutSecurity (default) or kWithSecurity. |