Skip to main content

ReadCondition

Struct ReadCondition 

Source
pub struct ReadCondition { /* private fields */ }
Expand description

ReadCondition — Spec §2.2.2.5.8 / §2.2.4.5 Trigger State.

Eine ReadCondition ist an einen DataReader gebunden und triggert true, wenn der Reader Samples enthaelt, die in alle drei Masks (sample_state_mask, view_state_mask, instance_state_mask) passen.

Design: Die Trigger-Logik selbst (das eigentliche “hat der Reader Samples mit diesen Masks?”-Query) ist vom Caller als Closure injiziert, weil der DataReader-Sample-Cache nicht objekt-safe gequeried werden kann ohne weitere Infrastructure- Aenderungen. Der DCPS-API-Konsument (idR DataReader::create_readcondition) liefert die Closure in Form (sm, vm, im) -> bool.

Implementations§

Source§

impl ReadCondition

Source

pub fn new<F>( sample_state_mask: u32, view_state_mask: u32, instance_state_mask: u32, trigger: F, ) -> Arc<Self>
where F: Fn(u32, u32, u32) -> bool + Send + Sync + 'static,

Konstruktor mit Trigger-Closure.

Source

pub fn get_sample_state_mask(&self) -> u32

Spec §2.2.2.5.8 get_sample_state_mask.

Source

pub fn get_view_state_mask(&self) -> u32

Spec §2.2.2.5.8 get_view_state_mask.

Source

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

Source§

fn get_trigger_value(&self) -> bool

True wenn das Ereignis dieser Condition aktuell ansteht. Spec §2.2.2.1.6 get_trigger_value.
Source§

impl Debug for ReadCondition

Source§

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

Formats the value using the given formatter. 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> 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, 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.