VLink  2.0.0
A high-performance communication middleware
dds_conf.h 文件参考

Transport configuration for the dds:// eProsima Fast-DDS / Fast-RTPS transport. 更多...

此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

详细描述

Transport configuration for the dds:// eProsima Fast-DDS / Fast-RTPS transport.

DdsConf is the default cross-machine transport in VLink and binds the dds:// URL scheme to the eProsima Fast-DDS implementation of the OMG DDS specification. It supports the full RTPS wire protocol over UDP/TCP and SHM, scales from a single LAN segment to wide-area deployments, and interoperates with any other compliant DDS vendor on the same Domain. Pub/sub, RPC (request/response over DDS topics) and field-style state synchronisation are all routed through Fast-DDS DataReaders and DataWriters under the hood.

Supported Node Types
Publisher Subscriber Server Client Getter Setter
yes yes yes yes yes yes
URL Format
dds://<topic>[?domain=<N>&depth=<N>&qos=<profile>]
dds://<topic>[?domain=<N>&part=<v>&topic=<v>&pub=<v>&sub=<v>&writer=<v>&reader=<v>]
Component Description
topic DDS topic name; URL host concatenated with the URL path
domain DDS Domain ID (?domain=); defaults from the VLINK_DDS_DOMAIN env var
depth Optional history-depth override; 0 keeps the QoS-selected depth
qos Named QoS profile registered with register_qos() (?qos=)
qos_ext Remaining query keys after domain, depth, qos have been removed
Environment Variables
Variable Description Default
VLINK_DDS_DOMAIN Default DDS Domain ID when ?domain= is not present in URL 0
QoS Registration
Named profiles must be registered before any endpoint that references them is created. A typical reliable + transient-local profile for late-joining subscribers looks like:
vlink::Qos late_joiner;
late_joiner.history.depth = 16;
vlink::DdsConf::register_qos("late_joiner", late_joiner);
Type-Support Registration
For CDR-serialised messages the Fast-DDS TopicDataType factory must be wired to the topic name before any endpoint is opened on that topic. An optional response type can be registered at the same time for RPC topics; the helper automatically appends the "___resp" suffix.
vlink::DdsConf::register_topic<MyMsgPubSubType>("my_topic");
vlink::DdsConf::register_topic<MyReqPubSubType, MyRespPubSubType>("my_rpc");
vlink::DdsConf::register_url<MyMsgPubSubType>("dds://my_topic?domain=1");
Example
vlink::DdsConf::load_global_qos_file("/etc/vlink/dds_profile.xml");
vlink::DdsConf::register_qos("reliable_tl", qos);
auto pub = vlink::Publisher<MyMsg>::create_unique("dds://state?domain=42&qos=reliable_tl");
auto sub = vlink::Subscriber<MyMsg>::create_unique("dds://state?domain=42&qos=reliable_tl");
注解
Compiled only when VLINK_SUPPORT_DDS is defined.
qos and qos_ext are mutually exclusive; setting both forces is_valid() to false.
RPC reply topics are derived by appending "___resp" to the topic name.