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: GuidGUID 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: boolReliable kind.
Implementations§
Source§impl WriterProxy
impl WriterProxy
Sourcepub fn new(
remote_writer_guid: Guid,
unicast_locators: Vec<Locator>,
multicast_locators: Vec<Locator>,
is_reliable: bool,
) -> Self
pub fn new( remote_writer_guid: Guid, unicast_locators: Vec<Locator>, multicast_locators: Vec<Locator>, is_reliable: bool, ) -> Self
Creates a fresh proxy.
Sourcepub fn refresh_locators(
&mut self,
unicast_locators: Vec<Locator>,
multicast_locators: Vec<Locator>,
)
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.
Sourcepub fn update_from_heartbeat(
&mut self,
first_sn: SequenceNumber,
last_sn: SequenceNumber,
)
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.
Sourcepub fn received_change_set(&mut self, sn: SequenceNumber)
pub fn received_change_set(&mut self, sn: SequenceNumber)
Marks an SN as received.
Sourcepub fn irrelevant_change_set(&mut self, sn: SequenceNumber)
pub fn irrelevant_change_set(&mut self, sn: SequenceNumber)
Marks an SN as irrelevant (via GAP).
Sourcepub fn is_known(&self, sn: SequenceNumber) -> bool
pub fn is_known(&self, sn: SequenceNumber) -> bool
True if the SN is already received or marked irrelevant.
Sourcepub fn missing_changes(&self, max_count: usize) -> Vec<SequenceNumber>
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.
Sourcepub fn has_missing_changes(&self) -> bool
pub fn has_missing_changes(&self) -> bool
True if there are missing SNs.
Sourcepub fn first_available_sn(&self) -> SequenceNumber
pub fn first_available_sn(&self) -> SequenceNumber
Getter: smallest announced SN.
Sourcepub fn last_available_sn(&self) -> SequenceNumber
pub fn last_available_sn(&self) -> SequenceNumber
Getter: largest announced SN.
Sourcepub fn highest_received_sn(&self) -> SequenceNumber
pub fn highest_received_sn(&self) -> SequenceNumber
Getter: highest received SN.
Sourcepub fn acknack_base(&self) -> SequenceNumber
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
impl Clone for WriterProxy
Source§fn clone(&self) -> WriterProxy
fn clone(&self) -> WriterProxy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more