Skip to main content

RuntimeConfig

Struct RuntimeConfig 

Source
pub struct RuntimeConfig {
Show 15 fields pub tick_period: Duration, pub spdp_period: Duration, pub spdp_multicast_group: Ipv4Addr, pub multicast_interface: Ipv4Addr, pub announce_secure_endpoints: bool, pub wlp_period: Duration, pub participant_lease_duration: Duration, pub user_data: Vec<u8>, pub observability: SharedSink, pub recv_thread_priority: Option<i32>, pub tick_thread_priority: Option<i32>, pub recv_thread_cpus: Option<Vec<usize>>, pub tick_thread_cpus: Option<Vec<usize>>, pub data_representation_offer: Vec<i16>, pub data_rep_match_mode: DataRepMatchMode,
}
Expand description

Konfiguration fuer die Runtime. Exposed via DomainParticipant- Factory-Methoden.

Fields§

§tick_period: Duration

Tick-Periode des Event-Loops. Default 50 ms.

§spdp_period: Duration

SPDP-Announce-Periode. Default 5 s.

§spdp_multicast_group: Ipv4Addr

SPDP-Multicast-Gruppe (IPv4). Default 239.255.0.1 (Spec §9.6.1.4.1).

§multicast_interface: Ipv4Addr

Interface-Address fuer Multicast-Join. Default 0.0.0.0 (Kernel waehlt das Default-Interface).

§announce_secure_endpoints: bool

true → SPDP-Beacon annonciert zusaetzlich die 12 Secure- Discovery-Bits (16..27, DDS-Security 1.2 §7.4.7.1). Default false — nur Standard-Bits werden announced. Wird vom DCPS- Factory gesetzt, sobald eine PolicyEngine konfiguriert ist . Diese Flagge ist auch ohne security-Feature verfuegbar, damit Tests die Bit-Praesenz pruefen koennen, ohne das ganze Crypto-Crate zu aktivieren.

§wlp_period: Duration

WLP-Tick-Periode (Writer-Liveliness-Protocol, RTPS 2.5 §8.4.13). Duration::ZERO → Default participant_lease_duration / 3 (Spec-Empfehlung: drei Misses bevor der Reader den Writer als not-alive markiert). Direkter Override ermoeglicht aggressive Tests.

§participant_lease_duration: Duration

Lease-Duration die im SPDP-Beacon als PARTICIPANT_LEASE_DURATION annonciert wird (Spec-Default 100 s). Wird auch als Basis fuer den AUTOMATIC-WLP-Tick genutzt (wlp_period = participant_lease_duration / 3 wenn wlp_period == Duration::ZERO).

§user_data: Vec<u8>

USER_DATA-Bytes des Participants (DDS 1.4 §2.2.3.1 UserDataQosPolicy). Werden im SPDP-Beacon als PID_USER_DATA (DDSI-RTPS §9.6.3.2) annonciert und auf Empfaengerseite in ParticipantBuiltinTopicData.user_data exponiert. Default leer.

§observability: SharedSink

Observability-Sink. Default ist null_sink() — jeder Event-Emit ist dann ein direkter Return ohne Allokation auf der Konsumenten- Seite. Konsumenten injizieren z.B. zerodds_foundation::observability::StderrJsonSink (JSON-Lines fuer Vector/fluentd/Datadog) oder eine eigene OTLP-Bridge.

§recv_thread_priority: Option<i32>

Sprint D.5d Hebel C — RT-Pinning + Priority. Linux-only; auf macOS/Windows sind die Hooks no-op.

SCHED_FIFO-Prioritaet (1-99) fuer die drei Recv-Worker (SPDP-MC, Metatraffic, User-Data). None = Default-Scheduler (CFS). Some(80) ist Spec-Empfehlung fuer Echtzeit-Pfade. Erfordert CAP_SYS_NICE oder RLIMIT_RTPRIO-erlaubten User.

§tick_thread_priority: Option<i32>

Wie Self::recv_thread_priority, aber fuer den Tick-Worker.

§recv_thread_cpus: Option<Vec<usize>>

CPU-Affinity-Maske fuer die Recv-Worker. None = keine Affinity (Kernel scheduled frei). Liste von CPU-Indizes, z.B. vec![2, 3] fuer Cores 2+3. Wird via sched_setaffinity gesetzt; alle drei Recv-Threads teilen sich dieselbe Maske.

§tick_thread_cpus: Option<Vec<usize>>

Wie Self::recv_thread_cpus, aber fuer den Tick-Worker.

§data_representation_offer: Vec<i16>

D.5g — Default DataRepresentation-Liste die in SEDP-PublicationData und SEDP-SubscriptionData annonciert wird, wenn nicht per-Writer/ Reader (UserWriterConfig/UserReaderConfig) ueberschrieben.

Wichtig: Per Spec strict (XTypes 1.3 §7.6.3.1.2) ist das erste Element der Writer’s “offered” und muss in Reader’s “accepted”-Liste sein damit Match passiert. Default [XCDR1, XCDR2] =Legacy-first → max Interop mit RTI Connext Shapes Demo (XCDR1-only). Pure-XCDR2-Deployments koennen das auf [XCDR2] oder [XCDR2, XCDR1] umstellen fuer Bandbreiten- Effizienz und @appendable/@mutable-Support.

Empty (vec![]) wird per Spec als [XCDR1] interpretiert.

§data_rep_match_mode: DataRepMatchMode

D.5g — Default Match-Mode fuer DataRepresentation-Negotiation.

Strict (XTypes 1.3 §7.6.3.1.2 normativ): writer.first ∈ reader.list = match. Tolerant (Industry-Norm): any-overlap = match, picks first-overlap als wire-format.

Default Tolerant weil Cyclone DDS und FastDDS so matchen — maximiert Interop. Strict-Setting nur fuer formale Spec- Compliance-Tests sinnvoll.

Trait Implementations§

Source§

impl Clone for RuntimeConfig

Source§

fn clone(&self) -> RuntimeConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RuntimeConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RuntimeConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.