NAME
zerodds-router - DDS routing-service daemon
SYNOPSIS
zerodds-router run --routes
FILE [--types SHAPES.json]
[--config YAML] [--set
PATH=VALUE]...
zerodds-router validate --routes
FILE
zerodds-router [--config
YAML] [--set PATH=VALUE]...
--check-config
DESCRIPTION
zerodds-router is a DDS-to-DDS forwarding daemon: it copies samples between DDS endpoints that differ in domain, topic, or partition, optionally filtering and transforming each sample on the way. It is a native in-DDS routing service, not a protocol bridge — both ends speak RTPS.
Each route declares an input and an output endpoint (domain, topic, type name, partitions, QoS). A route may carry a content filter (an SQL-like expression that drops non-matching samples) and a field transform (rename / set-const). A built-in loop guard prevents a sample from being re-forwarded on a domain that is both an input and an output.
COMMANDS
- run
-
Start the router and forward until SIGINT/SIGTERM.
- validate
-
Parse and validate the config, print the resolved routes, and exit without joining any domain.
OPTIONS
- --routes FILE
-
Route configuration. The format is chosen by extension: a .xml path is parsed as XML, anything else as JSON. Required. An element, attribute or key the router does not read is refused with its name (XML also with its line); in JSON, keys beginning with _ are comments.
- --types SHAPES.json
-
A JSON array of type shapes describing each route's type_name, e.g. [{ "name": "ns::T", "members": [{ "name": "v", "kind": "u32" }] }]. Required only for routes that use a filter or transform, which must understand the sample's fields. Plain raw-byte forwards (type_name zerodds::RawBytes) need no shapes.
- --config YAML
-
The DDS runtime configuration: base file, with drop-ins in its sibling YAML.d directory. Without it, the system configuration directory (/etc/zerodds on Linux) is read. A .json or .xml path is refused with a pointer to --routes.
- --set PATH=VALUE
-
One runtime setting above every file, repeatable.
- --check-config
-
Validate and print the effective runtime configuration with the origin of every value, then exit (0 valid, 1 invalid).
- -V, --version
-
Print version and exit.
CONFIGURATION
The config has a top-level name and a list of routes. Each route has input and output endpoints; optional filter, transform, loop_guard (default true) and preserve_source_timestamp (default false). An endpoint has domain, topic, type_name, optional partition and qos (reliability, durability, ownership, ...). See /usr/share/zerodds/configs/router.json.example for a working two-route configuration.
SIGNALS
SIGINT and SIGTERM trigger a graceful shutdown; the per-route metrics (forwarded, dropped by loop guard, dropped by filter, lifecycle, errors) are printed before exit. There is no SIGHUP reload — edit the config and restart the service.
FILES
- /etc/zerodds/router.json
-
Default configuration read by the /usr/lib/systemd/system/zerodds-router.service systemd unit.
- /usr/share/zerodds/configs/router.json.example
-
Shipped example configuration.
EXIT STATUS
- 0
-
A clean validate, a clean shutdown, or --check-config found the configuration valid.
- 1
-
An invalid route file or configuration value, or a startup failure.
- 2
-
The command line was wrong (no or an unknown command, a route file given with --config), or a configuration file could not be read or does not parse.
SEE ALSO
zerodds-admin(1), zerodds-spy(1)
AUTHOR
ZeroDDS Contributors.
BEZEICHNUNG
zerodds-router - Daemon für den DDS-Routing-Service
ÜBERSICHT
zerodds-router run --routes
DATEI [--types SHAPES.json]
[--config YAML] [--set
PFAD=WERT]...
zerodds-router validate --routes
DATEI
zerodds-router [--config
YAML] [--set PFAD=WERT]...
--check-config
BESCHREIBUNG
zerodds-router ist ein Weiterleitungs-Daemon von DDS nach DDS: Er kopiert Samples zwischen DDS-Endpunkten, die sich in Domäne, Topic oder Partition unterscheiden, und filtert und transformiert jedes Sample auf dem Weg, wenn gewünscht. Er ist ein nativer Routing-Service innerhalb von DDS, keine Protokoll-Bridge — beide Enden sprechen RTPS.
Jede Route deklariert einen input- und einen output-Endpunkt (Domäne, Topic, Typname, Partitionen, QoS). Eine Route kann einen Inhalts- filter tragen (einen SQL-ähnlichen Ausdruck, der nicht passende Samples verwirft) und eine Feld- transform (Umbenennen / konstanten Wert setzen). Ein eingebauter Schleifenschutz verhindert, dass ein Sample erneut in eine Domäne weitergeleitet wird, die zugleich Eingang und Ausgang ist.
BEFEHLE
- run
-
Startet den Router und leitet weiter bis SIGINT/SIGTERM.
- validate
-
Parst und prüft die Konfiguration, gibt die aufgelösten Routen aus und beendet sich, ohne einer Domäne beizutreten.
OPTIONEN
- --routes DATEI
-
Routen-Konfiguration. Das Format wird an der Endung erkannt: Ein Pfad auf .xml wird als XML geparst, alles andere als JSON. Pflicht. Ein Element, Attribut oder Schlüssel, den der Router nicht liest, wird mit seinem Namen abgelehnt (bei XML auch mit seiner Zeile); in JSON sind Schlüssel, die mit _ beginnen, Kommentare.
- --types SHAPES.json
-
Ein JSON-Array von Typ-Formen, die den type_name jeder Route beschreiben, z. B. [{ "name": "ns::T", "members": [{ "name": "v", "kind": "u32" }] }]. Nur Pflicht für Routen, die einen filter oder eine transform verwenden, die die Felder des Samples verstehen müssen. Reine Weiterleitungen roher Bytes (type_name zerodds::RawBytes) brauchen keine Formen.
- --config YAML
-
Die Konfiguration der DDS-Laufzeitumgebung: Basisdatei, mit Drop-ins im danebenliegenden Verzeichnis YAML.d. Ohne diese Option wird das System-Konfigurationsverzeichnis (/etc/zerodds unter Linux) gelesen. Ein Pfad auf .json oder .xml wird mit einem Verweis auf --routes abgelehnt.
- --set PFAD=WERT
-
Eine Laufzeit-Einstellung über allen Dateien, wiederholbar.
- --check-config
-
Prüft die wirksame Laufzeitkonfiguration und gibt sie mit der Herkunft jedes Werts aus, dann Ende (0 gültig, 1 ungültig).
- -V, --version
-
Gibt die Version aus und beendet sich.
KONFIGURATION
Die Konfiguration hat auf oberster Ebene einen name und eine Liste von routes. Jede Route hat input- und output-Endpunkte; optional filter, transform, loop_guard (Standard true) und preserve_source_timestamp (Standard false). Ein Endpunkt hat domain, topic, type_name, optional partition und qos (reliability, durability, ownership, ...). Siehe /usr/share/zerodds/configs/router.json.example für eine funktionierende Konfiguration mit zwei Routen.
SIGNALE
SIGINT und SIGTERM lösen ein geordnetes Beenden aus; die Metriken je Route (weitergeleitet, vom Schleifenschutz verworfen, vom Filter verworfen, Lebenszyklus, Fehler) werden vor dem Ende ausgegeben. Es gibt kein Neuladen über SIGHUP — die Konfiguration ändern und den Dienst neu starten.
DATEIEN
- /etc/zerodds/router.json
-
Standardkonfiguration, die die systemd-Unit /usr/lib/systemd/system/zerodds-router.service liest.
- /usr/share/zerodds/configs/router.json.example
-
Mitgelieferte Beispielkonfiguration.
EXIT-STATUS
- 0
-
Ein sauberes validate, ein sauberes Beenden, oder --check-config hat die Konfiguration als gültig befunden.
- 1
-
Eine ungültige Routen-Datei oder ein ungültiger Konfigurationswert, oder ein Fehler beim Start.
- 2
-
Die Kommandozeile war falsch (kein oder ein unbekannter Befehl, eine Routen-Datei mit --config angegeben), oder eine Konfigurationsdatei war nicht lesbar oder nicht parsebar.
SIEHE AUCH
zerodds-admin(1), zerodds-spy(1)
AUTOR
ZeroDDS Contributors.