Expand description
Entity lifecycle (DDS DCPS 1.4 §2.2.2.1) — common base for
DomainParticipant, Publisher, Subscriber, Topic,
DataWriter, DataReader.
Spec behavior (§2.2.2.1.1 entity base):
- Lifecycle:
create_*→enable()→ operational →delete_*. Beforeenable()the entity is inert (no discovery, no wire activity); set_qos on all fields is allowed. - set_qos after
enable(): only fields with “Changeable=YES” may be changed — otherwiseDdsError::ImmutablePolicy(§2.2.3 Tab. 2.13 column “Changeable”). - enable() is idempotent. If the parent entity (participant)
has
entity_factory.autoenable_created_entities=TRUE, children are automatically enabled on creation. - StatusCondition is the hook for the
WaitSet—trigger_value()returns true when a status whose bit is in theenabled_statusesmask is active. - InstanceHandle is unique per entity (a local 64-bit counter,
not on the wire — see
crate::instance_handle).
This module provides the low-level Entity trait + EntityState
as a building block. The implementations (Publisher, DataWriter,
…) hold an Arc<EntityState> and delegate the trait methods.
Structs§
- Entity
State - Atomic container for the entity lifecycle.
- Status
Condition StatusCondition— Spec §2.2.2.1.6, the primary WaitSet hook.
Traits§
- Entity
- Entity trait — common lifecycle API of the 6 entity types (DCPS §2.2.2.1).
Functions§
- immutable_
if_ enabled - Helper function: validates that a QoS field
policy_namewas not changed after enable. Used inset_qosimpls:
Type Aliases§
- Status
Mask StatusMask— 32-bit bitmask of the status kinds (DCPS §2.2.4.1). Values fromcrate::psm_constants::status.