Skip to main content

RosParticipant

Struct RosParticipant 

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

A DDS participant that ROS 2 sees as the participant of ROS 2 nodes.

It announces enclave=/; in its USER_DATA, as ROS 2 participants do, and its nodes on ros_discovery_info. Clones share the participant.

Implementations§

Source§

impl RosParticipant

Source

pub fn new(domain_id: u32) -> Result<RosParticipant>

A participant in DDS domain domain_id (the ROS_DOMAIN_ID).

Source

pub fn with_config(config: ParticipantConfig) -> Result<RosParticipant>

A participant of config. Its USER_DATA gets enclave=/; unless it already has an enclave.

Source

pub fn participant(&self) -> &DomainParticipant

The DDS participant.

Source

pub fn gid(&self) -> [u8; 16]

The GID of the participant: the 16 octets of its GUID.

Source

pub fn create_node(&self, namespace: &str, name: &str) -> Result<Node>

A node name in namespace (/ or /a/b), announced at once. The node is gone when the Node is dropped.

Source

pub fn writer_of(&self, info: &SampleInfo) -> Option<DiscoveredEndpoint>

The writer of a sample, as discovered: its participant and its USER_DATA (with UserData::parse), for instance to know that it is not a ROS 2 program but another bridge. None when it is not (or no longer) known, and for the writers of this participant.

Trait Implementations§

Source§

impl Clone for RosParticipant

Source§

fn clone(&self) -> Self

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 RosParticipant

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for RosParticipant

§

impl !UnwindSafe for RosParticipant

§

impl Forget for RosParticipant

§

impl Freeze for RosParticipant
where *const ArcInner<Context> is !null: Freeze, PhantomData<ArcInner<Context>>: Freeze,

§

impl Move for RosParticipant

§

impl Send for RosParticipant
where Arc<Context>: Send,

§

impl Sync for RosParticipant
where Arc<Context>: Sync,

§

impl Unpin for RosParticipant
where Arc<Context>: Unpin,

§

impl UnsafeUnpin for RosParticipant
where *const ArcInner<Context> is !null: UnsafeUnpin, PhantomData<ArcInner<Context>>: UnsafeUnpin,

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> Same for T

Source§

type Output = T

Should always be Self
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 = !

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.