VLink  2.0.0
A high-performance communication middleware
shm2_conf.h File Reference

Transport configuration for the shm2:// Iceoryx2 (next-generation) shared-memory transport. 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 shm2:// Iceoryx2 (next-generation) shared-memory transport.

Shm2Conf binds the shm2:// URL scheme to the Iceoryx2 shared-memory transport, the next-generation successor to the shm:// Iceoryx backend. Iceoryx2 keeps the zero-copy semantics of its predecessor but eliminates the standalone RouDi daemon: every participating process maps the shared-memory service directly. This simplifies deployment in containerised and read-only root-filesystem environments while preserving the same loan / release flow.

Shared-Memory Layout
Iceoryx2 service (file-backed POSIX SHM segment)
+-----------------------------------------------+
| Per-publisher slot pool of fixed-size chunks |
| +------+ +------+ +------+ +------+ +------+ |
| | slot | | slot | | slot | | slot | | ... | |
| +------+ +------+ +------+ +------+ +------+ |
+--------^--------------------------^-----------+
| loan() | release()
| |
Publisher process Subscriber process
Loan / Release Flow
Publisher: slot = loan(size); fill(slot); publish(slot);
\
\--> per-subscriber notification queue
\
Subscriber: slot = take(); \--> slot arrival
consume(slot); release(slot);
Supported Node Types
Publisher Subscriber Server Client Getter Setter
yes yes yes yes yes yes
URL Format
shm2://<address>[?event=<name>&domain=<N>&depth=<N>&history=<N>&wait=<ms>][#<size>]
Component Description
address Iceoryx2 service/topic name (URL host concatenated with path)
event Optional secondary event name (?event=)
domain Domain ID (?domain=); defaults to 0
depth Queue / loan capacity override; 0 uses the Iceoryx2 default
history History count; URL default 0, or 1 for field nodes
wait Blocking-wait timeout in ms; pub/sub only
size Per-message memory size from URL fragment (see size syntax below)
Size Fragment Syntax
The URL fragment selects the per-message shared-memory chunk size. Supported suffixes are case-insensitive: B, K/KB, M/MB, G/GB. The value must fall in (0, kMaxMemSize].
shm2://my_topic#1M // 1 MiB per message
shm2://my_topic#512K // 512 KiB per message
shm2://my_topic // default: 128 bytes per message
Backend-Specific Options
Option Purpose Default
size Per-message chunk size 128 B
kMaxMemSize Hard upper bound on size 32 MiB
depth Slot pool capacity backend default
history Late-joining replay count 0 / 1
Note
Compiled only when VLINK_SUPPORT_SHM2 is defined.
address and event must each be at most 80 characters long.
wait mode is only valid for kPublisher / kSubscriber endpoints; using it with RPC or field nodes causes parse_protocol() to return false.
is_valid() additionally requires size in (0, kMaxMemSize] and domain, depth, history to be non-negative.