Skip to main content

TypeLookup

Struct TypeLookup 

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

The TypeLookup service endpoints of one participant.

Implementations§

Source§

impl TypeLookup

Source

pub const BUILTIN_ENDPOINTS: u32

The bits of availableBuiltinEndpoints for the endpoints provided here (DDS-XTypes 1.3 Table 62).

Source

pub fn new( prefix: GuidPrefix, vendor_id: VendorId, writer: WriterConfig, reader: ReaderConfig, ) -> Self

The endpoints of the participant prefix. They are RELIABLE, KEEP_ALL and VOLATILE (7.6.3.3.3).

Source

pub fn is_server(p: &ParticipantData) -> bool

Whether the participant p serves TypeLookup requests: it has the request reader and the reply writer.

Source

pub fn add_participant(&mut self, p: &ParticipantData, now: Instant)

Connects with the endpoints of a discovered participant, as far as its availableBuiltinEndpoints says it has them. The local participant is ignored.

Source

pub fn remove_participant(&mut self, prefix: &GuidPrefix)

Disconnects from a participant that is gone, and forgets the requests made to it.

Source

pub fn request( &mut self, server: GuidPrefix, call: TypeLookupCall, ) -> SampleIdentity

Sends call to the participant server. It goes at the next Self::poll; the reply comes from Self::handle_message.

Source

pub fn is_requested(&self, id: &TypeIdentifier) -> bool

Whether a getTypes request for id is waiting for its reply.

Source

pub fn pending(&self) -> usize

The number of requests not answered yet.

Source

pub fn handle_message( &mut self, bytes: &[u8], now: Instant, registry: &TypeRegistry, ) -> Vec<TypeLookupReplied>

Processes one received RTPS message: answers the requests to this participant from registry, and returns the replies to ours.

Source

pub fn poll(&mut self, now: Instant) -> Vec<Outgoing>

The datagrams due at now.

Source

pub fn next_deadline(&self) -> Option<Instant>

When Self::poll next has something to do, if no message comes in before.

Trait Implementations§

Source§

impl Debug for TypeLookup

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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.