chrono::synchrono::SynDDSParticipantListener Class Reference

Description

Participant listener that will count the number of participants and store their names to be used later.

#include <SynDDSListener.h>

Inherits DomainParticipantListener.

Public Member Functions

 SynDDSParticipantListener (const std::string &commprefix)
 
virtual void on_participant_discovery (eprosima::fastdds::dds::DomainParticipant *participant, eprosima::fastrtps::rtps::ParticipantDiscoveryInfo &&info) override
 
void BlockUntilMatches (unsigned int matches)
 Wait for the specified number of matches Each subscriber listener has a callback that will be called when a subscriber is matched with a DataWriter. More...
 
std::vector< std::string > GetParticipantNames () const
 Get the names of matched participants When a participant is matched, in the SynChrono world, the participant name is used to designate from which node the participant is responsible for. More...
 

Member Function Documentation

◆ BlockUntilMatches()

void chrono::synchrono::SynDDSParticipantListener::BlockUntilMatches ( unsigned int  matches)
inline

Wait for the specified number of matches Each subscriber listener has a callback that will be called when a subscriber is matched with a DataWriter.

This function blocks until that the matches are achieved. By default, a subscriber will just wait for a single listener.

◆ GetParticipantNames()

std::vector<std::string> chrono::synchrono::SynDDSParticipantListener::GetParticipantNames ( ) const
inline

Get the names of matched participants When a participant is matched, in the SynChrono world, the participant name is used to designate from which node the participant is responsible for.

A subscriber is then created to listen to those messages

Returns
std::vector<std::string>

The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono_synchrono/communication/dds/SynDDSListener.h
  • /builds/uwsbel/chrono/src/chrono_synchrono/communication/dds/SynDDSListener.cpp