pub struct ReadCondition { /* private fields */ }Expand description
ReadCondition — Spec §2.2.2.5.8 / §2.2.4.5 trigger state.
A ReadCondition is bound to a DataReader and triggers true when
the reader holds samples that match all three masks
(sample_state_mask, view_state_mask, instance_state_mask).
Design: the trigger logic itself (the actual “does the reader have
samples with these masks?” query) is injected by the caller as a
closure, because the DataReader sample cache cannot be queried in
an object-safe way without further infrastructure changes. The
DCPS API consumer (usually DataReader::create_readcondition)
provides the closure in the form (sm, vm, im) -> bool.
Implementations§
Source§impl ReadCondition
impl ReadCondition
Sourcepub fn new<F>(
sample_state_mask: u32,
view_state_mask: u32,
instance_state_mask: u32,
trigger: F,
) -> Arc<Self> ⓘ
pub fn new<F>( sample_state_mask: u32, view_state_mask: u32, instance_state_mask: u32, trigger: F, ) -> Arc<Self> ⓘ
Constructor with a trigger closure.
Sourcepub fn get_sample_state_mask(&self) -> u32
pub fn get_sample_state_mask(&self) -> u32
Spec §2.2.2.5.8 get_sample_state_mask.
Sourcepub fn get_view_state_mask(&self) -> u32
pub fn get_view_state_mask(&self) -> u32
Spec §2.2.2.5.8 get_view_state_mask.
Sourcepub fn get_instance_state_mask(&self) -> u32
pub fn get_instance_state_mask(&self) -> u32
Spec §2.2.2.5.8 get_instance_state_mask.
Trait Implementations§
Source§impl Condition for ReadCondition
impl Condition for ReadCondition
Source§fn get_trigger_value(&self) -> bool
fn get_trigger_value(&self) -> bool
get_trigger_value.