RuntimeConfig, field by field
The runnable companion to the RuntimeConfig chapter: the full field-list struct literal, started against a real runtime, plus the page's three recipe variants as compiled functions.
- Example:
runtime-config - Repository: zero-dds-snippets
What it shows
tick_period,spdp_period,spdp_multicast_group,multicast_interface,announce_secure_endpoints,wlp_period,participant_lease_durationandobservability.- The three "common combinations" from the page are folded in as functions rather than sibling projects, each doc-commented with the anchor it covers:
sandbox_test_config(),production_with_monitoring_config()andhard_realtime_config(). - Only the full field-list config is actually started live; the three recipes vary fields the full config already exercises, so proving they compile is enough.
Build and run
cargo run
Output
runtime-config: DcpsRuntime started on domain 11 with the full field-list config
Taken verbatim from the example's own README.
See also
RuntimeConfig, Feld für Feld
Der lauffähige Begleiter zum RuntimeConfig-Kapitel: das vollständige Struct-Literal, gegen eine echte Runtime gestartet, plus die drei Rezept-Varianten der Seite als kompilierte Funktionen.
- Beispiel:
runtime-config - Repository: zero-dds-snippets
Was es zeigt
tick_period,spdp_period,spdp_multicast_group,multicast_interface,announce_secure_endpoints,wlp_period,participant_lease_durationundobservability.- Die drei „Common combinations“ der Seite stecken als Funktionen darin statt als Geschwisterprojekte, jede mit dem Anker kommentiert, den sie abdeckt:
sandbox_test_config(),production_with_monitoring_config()undhard_realtime_config(). - Nur die vollständige Konfiguration wird tatsächlich live gestartet; die drei Rezepte variieren Felder, die die volle Konfiguration schon abdeckt, also genügt der Nachweis, dass sie kompilieren.
Bauen und ausführen
cargo run
Ausgabe
runtime-config: DcpsRuntime started on domain 11 with the full field-list config
Wörtlich aus dem README des Beispiels übernommen.