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
impl RosParticipant
Sourcepub fn new(domain_id: u32) -> Result<RosParticipant>
pub fn new(domain_id: u32) -> Result<RosParticipant>
A participant in DDS domain domain_id (the ROS_DOMAIN_ID).
Sourcepub fn with_config(config: ParticipantConfig) -> Result<RosParticipant>
pub fn with_config(config: ParticipantConfig) -> Result<RosParticipant>
A participant of config. Its USER_DATA gets enclave=/; unless
it already has an enclave.
Sourcepub fn participant(&self) -> &DomainParticipant
pub fn participant(&self) -> &DomainParticipant
The DDS participant.
Sourcepub fn create_node(&self, namespace: &str, name: &str) -> Result<Node>
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.
Sourcepub fn writer_of(&self, info: &SampleInfo) -> Option<DiscoveredEndpoint>
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
impl Clone for RosParticipant
Auto Trait Implementations§
impl !RefUnwindSafe for RosParticipant
impl !UnwindSafe for RosParticipant
impl Forget for RosParticipant
impl Freeze for RosParticipant
impl Move for RosParticipant
impl Send for RosParticipant
impl Sync for RosParticipant
impl Unpin for RosParticipant
impl UnsafeUnpin for RosParticipant
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more