Skip to main content

Module entity

Module entity 

Source
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):

  1. Lifecycle: create_*enable() → operational → delete_*. Before enable() the entity is inert (no discovery, no wire activity); set_qos on all fields is allowed.
  2. set_qos after enable(): only fields with “Changeable=YES” may be changed — otherwise DdsError::ImmutablePolicy (§2.2.3 Tab. 2.13 column “Changeable”).
  3. enable() is idempotent. If the parent entity (participant) has entity_factory.autoenable_created_entities=TRUE, children are automatically enabled on creation.
  4. StatusCondition is the hook for the WaitSettrigger_value() returns true when a status whose bit is in the enabled_statuses mask is active.
  5. 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§

EntityState
Atomic container for the entity lifecycle.
StatusCondition
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_name was not changed after enable. Used in set_qos impls:

Type Aliases§

StatusMask
StatusMask — 32-bit bitmask of the status kinds (DCPS §2.2.4.1). Values from crate::psm_constants::status.