Skip to main content

SedpStack

Struct SedpStack 

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

SEDP-Stack fuer einen Participant.

Implementations§

Source§

impl SedpStack

Source

pub fn new(local_prefix: GuidPrefix, vendor_id: VendorId) -> Self

Erzeugt einen neuen Stack fuer den lokalen Participant. Alle Endpoints sind initial ohne Remote-Proxies — die werden ueber on_participant_discovered verdrahtet.

Source

pub fn local_prefix(&self) -> GuidPrefix

Lokaler GuidPrefix dieses Stacks.

Source

pub fn cache(&self) -> &DiscoveredEndpointsCache

Read-only-Zugriff auf den DiscoveredEndpointsCache.

Source

pub fn cache_mut(&mut self) -> &mut DiscoveredEndpointsCache

Mutable-Zugriff auf den Cache. Wird primaer fuer Tests (Discovery-Match injizieren ohne Live-UDP) und WP 2.5 find_topic-Verifikation verwendet.

Source

pub fn announce_publication( &mut self, p: &PublicationBuiltinTopicData, ) -> Result<Vec<OutboundDatagram>, WireError>

Kuendigt eine lokale Publication an alle bereits entdeckten Remote-SEDP-Reader an.

§Errors

Encoder-Fehler.

Source

pub fn announce_publication_with_shm_locator( &mut self, p: &PublicationBuiltinTopicData, locator_bytes: &[u8], ) -> Result<Vec<OutboundDatagram>, WireError>

ADR-0006: Publication mit PID_SHM_LOCATOR (Vendor-PID 0x8001).

§Errors

Encoder-Fehler oder Inject-Fehler.

Source

pub fn announce_subscription( &mut self, s: &SubscriptionBuiltinTopicData, ) -> Result<Vec<OutboundDatagram>, WireError>

Kuendigt eine lokale Subscription an.

§Errors

Encoder-Fehler.

Source

pub fn on_participant_discovered(&mut self, p: &DiscoveredParticipant)

Verdrahtet die SEDP-Endpoints fuer einen neu entdeckten Participant. Liest p.data.builtin_endpoint_set + Unicast- Locators und registriert die passenden Proxies.

Source

pub fn on_participant_lost(&mut self, prefix: GuidPrefix) -> (usize, usize)

Ein Participant ist verloren (SPDP-Lease-Timeout). Cascade- Cleanup: alle Proxies mit diesem Prefix raus, Cache-Eintraege loeschen. Liefert (removed_pub_proxies, removed_sub_proxies).

Source

pub fn handle_datagram( &mut self, datagram: &[u8], now: Duration, ) -> Result<SedpEvents, SedpReaderError>

Verarbeitet ein eingehendes RTPS-Datagramm an den SEDP-Stack. Routed die Submessages nach Ziel-EntityId an den passenden Endpoint und aktualisiert den Cache. Liefert die deltaartig neu-entdeckten Samples zurueck.

§Errors

Wire-Decode-Fehler oder fehlerhafte PL_CDR-Payloads.

Source

pub fn tick( &mut self, now: Duration, ) -> Result<Vec<OutboundDatagram>, WireError>

Tick ueber alle Endpoints. Liefert HEARTBEATs + Resends von den Writern plus ACKNACK/NACK_FRAG von den Readern.

§Errors

Wire-Encode-Fehler.

Source

pub fn pub_writer(&self) -> &SedpPublicationsWriter

Read-only-Zugriff auf die internen Endpoints (Diagnose/Tests).

Source

pub fn pub_reader(&self) -> &SedpPublicationsReader

dito.

Source

pub fn sub_writer(&self) -> &SedpSubscriptionsWriter

dito.

Source

pub fn sub_reader(&self) -> &SedpSubscriptionsReader

dito.

Trait Implementations§

Source§

impl Debug for SedpStack

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.