Skip to main content

WriterProxy

Struct WriterProxy 

Source
pub struct WriterProxy {
    pub remote_writer_guid: Guid,
    pub unicast_locators: Vec<Locator>,
    pub multicast_locators: Vec<Locator>,
    pub is_reliable: bool,
    /* private fields */
}
Expand description

Reader-seitiger State fuer einen Remote-Writer.

Fields§

§remote_writer_guid: Guid

GUID des Remote-Writer-Endpoints.

§unicast_locators: Vec<Locator>

Unicast-Locators des Writers (z.B. fuer gerichtete Re-Sends).

§multicast_locators: Vec<Locator>

Multicast-Locators.

§is_reliable: bool

Reliable-Kind.

Implementations§

Source§

impl WriterProxy

Source

pub fn new( remote_writer_guid: Guid, unicast_locators: Vec<Locator>, multicast_locators: Vec<Locator>, is_reliable: bool, ) -> Self

Erzeugt einen frischen Proxy.

Source

pub fn update_from_heartbeat( &mut self, first_sn: SequenceNumber, last_sn: SequenceNumber, )

Verarbeitet einen HEARTBEAT.

Gemaess §8.4.15: first_sn ist die kleinste SN, die der Writer re-liefern kann; last_sn die groesste annoncierte.

Source

pub fn received_change_set(&mut self, sn: SequenceNumber)

Markiert eine SN als empfangen.

Source

pub fn irrelevant_change_set(&mut self, sn: SequenceNumber)

Markiert eine SN als irrelevant (per GAP).

Source

pub fn is_known(&self, sn: SequenceNumber) -> bool

True wenn SN bereits empfangen oder als irrelevant markiert.

Source

pub fn missing_changes(&self, max_count: usize) -> Vec<SequenceNumber>

Liefert alle fehlenden SNs (weder empfangen noch irrelevant) im Bereich [first_available_sn, last_available_sn].

Vektor ist nach SN aufsteigend sortiert. Begrenzt auf max_count Eintraege — der erwartete RTPS-Bitmap-Window ist 256 SNs.

Source

pub fn has_missing_changes(&self) -> bool

True wenn fehlende SNs vorhanden sind.

Source

pub fn first_available_sn(&self) -> SequenceNumber

Getter: kleinste annoncierte SN.

Source

pub fn last_available_sn(&self) -> SequenceNumber

Getter: groesste annoncierte SN.

Source

pub fn highest_received_sn(&self) -> SequenceNumber

Getter: hoechste empfangene SN.

Source

pub fn acknack_base(&self) -> SequenceNumber

Passender AckNack-Base: kleinste noch nicht acked SN.

Convention: alle SN < acknack_base sind acked. Wir liefern die kleinste noch-nicht-empfangene-oder-irrelevante SN in [first, last+1].

Trait Implementations§

Source§

impl Clone for WriterProxy

Source§

fn clone(&self) -> WriterProxy

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WriterProxy

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.