pub struct StatusCondition { /* private fields */ }Expand description
StatusCondition — Spec §2.2.2.1.6, the primary WaitSet hook.
Minimal form: carries an enabled_statuses mask + delegates
trigger_value() to EntityState::status_changes. The object is
fully integrated (set_enabled_statuses, attach to WaitSet).
Implementations§
Source§impl StatusCondition
impl StatusCondition
Sourcepub fn new(state: Arc<EntityState>) -> Self
pub fn new(state: Arc<EntityState>) -> Self
Constructor (internal; created by the entity).
Sourcepub fn set_enabled_statuses(&self, mask: StatusMask)
pub fn set_enabled_statuses(&self, mask: StatusMask)
Sets the enabled_statuses mask. Spec §2.2.2.1.6.
Sourcepub fn enabled_statuses(&self) -> StatusMask
pub fn enabled_statuses(&self) -> StatusMask
Returns the current enabled_statuses mask.
Sourcepub fn trigger_value(&self) -> bool
pub fn trigger_value(&self) -> bool
True if (status_changes & enabled_statuses) != 0. Spec §2.2.2.1.6 trigger_value.
Sourcepub fn get_entity_handle(&self) -> InstanceHandle
pub fn get_entity_handle(&self) -> InstanceHandle
Returns the InstanceHandle of the entity to which this
StatusCondition is bound. Spec DCPS 1.4 §2.2.2.1.9
get_entity() — the Rust API returns the handle instead of a
&dyn Entity pointer, because the same Arc<EntityState> can
be held by multiple entity wrappers (DataReader/DataWriter/…);
the handle is the only identity that is stable beyond the
wrapper granularity.
Sourcepub fn entity_state(&self) -> &Arc<EntityState> ⓘ
pub fn entity_state(&self) -> &Arc<EntityState> ⓘ
Returns a shared reference to the underlying EntityState
(Spec §2.2.2.1.9 — direct path). Lets caller code inspect the
entity’s status mask and lifecycle flags without going through
the entity wrapper.
Trait Implementations§
Source§impl Clone for StatusCondition
impl Clone for StatusCondition
Source§fn clone(&self) -> StatusCondition
fn clone(&self) -> StatusCondition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Condition for StatusCondition
impl Condition for StatusCondition
Source§fn get_trigger_value(&self) -> bool
fn get_trigger_value(&self) -> bool
get_trigger_value.