VLink 2.0.0
A high-performance communication middleware
Loading...
Searching...
No Matches
shm_conf.h File Reference

Transport configuration for the shm:// Iceoryx shared-memory backend. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Detailed Description

Transport configuration for the shm:// Iceoryx shared-memory backend.

ShmConf configures the Iceoryx-based shared-memory transport, which provides zero-copy inter-process communication between processes on the same machine. It requires the Iceoryx RouDi daemon to be running (either externally started or initialised in-process via init_roudi()).

Supported Node Types
shm:// supports all six node types: kPublisher, kSubscriber, kServer, kClient, kSetter, and kGetter.
URL Format
shm://<address>[?event=<name>&domain=<N>&depth=<N>&history=<N>&wait=<0|1>]
Component Description
address Service/topic name; formed from host + "/" + path
event Optional secondary event name (?event=)
domain Iceoryx domain ID (?domain=, default 0)
depth History buffer depth (?depth=, default 0)
history History count (?history=); default 0 for pub/sub, 1 for field
wait Blocking-wait mode for pub/sub (?wait=1); not valid for RPC/field
RouDi Lifecycle
RouDi is the Iceoryx memory manager daemon. It can be started externally (recommended for production) or embedded in the same process:
// Option A: in-process RouDi (single process only):
vlink::ShmConf::init_roudi();
// Option B: connect to external RouDi:
vlink::ShmConf::init_runtime("my_app");
// ... use SHM nodes ...
vlink::ShmConf::deinit_runtime();
Note
This header is compiled only when VLINK_SUPPORT_SHM is defined.
The address and event strings must not exceed 80 characters each.
The wait mode is only valid for kPublisher / kSubscriber nodes; using it with RPC or field nodes causes parse_protocol() to return false.