|
VLink
2.1.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/fdbus_conf.h"#include "../modules/intra_conf.h"#include "../modules/mqtt_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 |
someip:// | SomeipConf |
mqtt:// | MqttConf |
fdbus:// | FdbusConf |
| 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, the complete VLINK_URL_PLUGINS value selects one mutually exclusive mode. A case-insensitive value of auto lets Url::load_for_plugin() load the fixed vlink- <module> library for a recognized, unlinked transport on first use. An empty value or case-insensitive none disables plugin loading. Any other non-empty value is parsed as the explicit preload list used by Url::init_plugins(). Explicitly listed modules are loaded process-wide even when the first caller has that backend linked, because linked availability is a property of each caller's compilation target. The value is sampled when the process-wide plugin manager is first initialized; later environment changes have no effect. Linked backends keep precedence, and TransportType::kUnknown is never 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(). Embedding environments (Android, QNX, etc.) use it to skip transports they cannot support at runtime. The legacy parameter on init_plugins() is retained for source compatibility but does not filter the explicit preload list selected by VLINK_URL_PLUGINS.*_conf.h header and every *_impl.h header.