|
VLink
2.0.0
A high-performance communication middleware
|
URL-driven configuration dispatcher that selects and forwards to a transport Conf.
More...
#include <map>#include <memory>#include <string>#include <utility>#include "../base/logger.h"#include "./conf.h"#include "../modules/dds_conf.h"#include "../modules/ddsc_conf.h"#include "../modules/ddsr_conf.h"#include "../modules/ddst_conf.h"#include "../modules/fdbus_conf.h"#include "../modules/intra_conf.h"#include "../modules/mqtt_conf.h"#include "../modules/qnx_conf.h"#include "../modules/shm2_conf.h"#include "../modules/shm_conf.h"#include "../modules/someip_conf.h"#include "../modules/zenoh_conf.h"#include "./client_impl.h"#include "./getter_impl.h"#include "./publisher_impl.h"#include "./server_impl.h"#include "./setter_impl.h"#include "./subscriber_impl.h"Go to the source code of this file.
Classes | |
| struct | vlink::Protocol |
| Plain-data record describing the parsed components of a VLink URL. More... | |
| struct | vlink::Url |
Conf subclass that routes virtual calls to the transport selected by a URL string. More... | |
Namespaces | |
| vlink | |
URL-driven configuration dispatcher that selects and forwards to a transport Conf.
This is an internal implementation header used by every public node template to translate a URL string into a concrete transport backend. It also re-exports all transport *Conf headers and the *Impl headers so the impl layer can be pulled in with a single include. Two types are introduced:
UrlParser pipeline. It owns the URL string (after any VLINK_URL_REMAP rewriting) plus the resolved TransportType and the parsed host, path, query dictionary and fragment. Only Url may construct a Protocol – the constructor is private and Url is its only friend.Conf subclass that wraps a Protocol, builds the matching transport Conf in init_target_internal() and forwards every virtual Conf hook to that target. Constructing a Url is the entry point used by every public Node<> template to set up its transport backend.| Field | Meaning |
|---|---|
str | Full URL string after any VLINK_URL_REMAP rewrite. |
transport | Resolved transport backend identifier. |
host | Hostname or IP component, if any. |
path | Topic path component. |
dictionary | Query parameters parsed into a std::map. |
fragment | Fragment identifier following #. |
| URL prefix | Conf class created in init_target_internal() |
|---|---|
intra:// | IntraConf |
shm:// | ShmConf |
shm2:// | Shm2Conf |
zenoh:// | ZenohConf |
dds:// | DdsConf |
ddsc:// | DdscConf |
ddsr:// | DdsrConf |
ddst:// | DdstConf |
someip:// | SomeipConf |
mqtt:// | MqttConf |
fdbus:// | FdbusConf |
qnx:// | QnxConf |
| other | Unsupported; custom schemes are not registered. |
VLINK_URL_USE_REMAP is enabled, the Protocol constructor inspects the VLINK_URL_REMAP environment variable and rewrites the URL before the transport is resolved. This enables transport switching without touching application code.VLINK_URL_USE_PLUGIN is enabled, Url::init_plugins() loads shared libraries listed in the VLINK_URL_PLUGINS environment variable. Each library name must map to an existing TransportType; loaded ConfPluginInterface entries are consulted only for recognized transports whose backend is not linked in. TransportType::kUnknown is not passed to plugins, so arbitrary URL schemes cannot be added through this mechanism.TransportEnableFlag is a bitmask that selects which built-in transports participate in global_init() and init_plugins(). Embedding environments (Android, QNX, etc.) use it to skip transports they cannot support at runtime.*_conf.h header and every *_impl.h header.