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-side state for one remote writer.

Fields§

§remote_writer_guid: Guid

GUID of the remote writer endpoint.

§unicast_locators: Vec<Locator>

Unicast locators of the writer (e.g. for directed 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

Creates a fresh proxy.

Source

pub fn refresh_locators( &mut self, unicast_locators: Vec<Locator>, multicast_locators: Vec<Locator>, )

Updates only the locators (re-discovery of the same writer), without touching the reliability state (SN bounds, received/irrelevant). A renewed SPDP/SEDP announce must not discard the reader progress — otherwise the reader falsely reports “nothing missing” after a HEARTBEAT and the writer never delivers the DATA.

Source

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

Processes a HEARTBEAT.

Per §8.4.15: first_sn is the smallest SN the writer can re-deliver; last_sn the largest announced.

Source

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

Marks an SN as received.

Source

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

Marks an SN as irrelevant (via GAP).

Source

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

True if the SN is already received or marked irrelevant.

Source

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

Returns all missing SNs (neither received nor irrelevant) in the range [first_available_sn, last_available_sn].

The vector is sorted ascending by SN. Limited to max_count entries — the expected RTPS bitmap window is 256 SNs.

Source

pub fn has_missing_changes(&self) -> bool

True if there are missing SNs.

Source

pub fn first_available_sn(&self) -> SequenceNumber

Getter: smallest announced SN.

Source

pub fn last_available_sn(&self) -> SequenceNumber

Getter: largest announced SN.

Source

pub fn highest_received_sn(&self) -> SequenceNumber

Getter: highest received SN.

Source

pub fn acknack_base(&self) -> SequenceNumber

Matching AckNack base: smallest not-yet-acked SN.

Convention: all SN < acknack_base are acked. We return the smallest not-yet-received-or-irrelevant 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.