|
VLink 2.0.0
A high-performance communication middleware
|
Abstract transport node base classes used by all VLink node implementations. 更多...
#include <any>#include <atomic>#include <functional>#include <memory>#include <string>#include "../base/bytes.h"#include "../extension/status.h"#include "../impl/conf.h"#include "../impl/types.h"#include "./intra_data.h"#include "./ssl_options.h"类 | |
| class | vlink::AbstractNode |
| Minimal interface for accessing the underlying native transport handle. 更多... | |
| class | vlink::NodeImpl |
| Abstract base for all VLink transport backend node implementations. 更多... | |
命名空间 | |
| namespace | vlink |
Abstract transport node base classes used by all VLink node implementations.
This header defines two base classes that form the backbone of the VLink transport abstraction:
AbstractNode – minimal interface for retrieving the underlying native transport handle (e.g. a DDS DataWriter pointer).NodeImpl – the main base class for PublisherImpl, SubscriberImpl, ServerImpl, ClientImpl, SetterImpl, and GetterImpl. It provides common infrastructure:| Feature | API |
|---|---|
| Transport initialise | init() / deinit() |
| Zero-copy loan | loan() / return_loan() |
| Suspend / resume | suspend() / resume() |
| Interrupt | interrupt() / reset_interrupted() |
| Property store | set_property() / get_property() |
| Message loop attach | attach() / detach() / get_message_loop() |
| Status callback | register_status_handler() / call_status() |
| Data recording | set_record_path() / try_record() |
| Discovery registration | init_ext() / deinit_ext() |
| Version check | check_version() |
| Global init | global_init() – called once per process |
NodeImpl defines the standardised callback signatures used throughout all transport backends:| Type | Signature | Used by |
|---|---|---|
| ConnectCallback | void(bool) | PublisherImpl, ClientImpl, ServerImpl |
| StatusCallback | void(const Status::BasePtr&) | DDS status events |
| SyncCallback | void() | SetterImpl sync |
| ReqRespCallback | void(uint64_t, const Bytes&, Bytes*) | ServerImpl listen |
| MsgCallback | void(const Bytes&) | SubscriberImpl, GetterImpl |
| IntraMsgCallback | void(const IntraData&) | intra:// subscriber |