chrono::synchrono::SynDDSPublisher Class Reference
Description
DDS publisher wrapper. Sends information on a topic.
#include <SynDDSPublisher.h>
Public Member Functions | |
SynDDSPublisher (eprosima::fastdds::dds::Publisher *publisher, eprosima::fastdds::dds::DataWriter *writer, SynDDSDataWriterListener *listener, std::shared_ptr< SynDDSTopic > topic) | |
Construct a new SynDDSPublisher object. More... | |
~SynDDSPublisher () | |
Destroy the SynDDSPublisher object. | |
void | DeleteDDSEntities (eprosima::fastdds::dds::DomainParticipant *participant) |
Delete underlying DDS objects using the passed participant. More... | |
bool | Publish (void *message) |
Publish a message on the publishers topic Currently only can publish to one topic. More... | |
void | WaitForMatches (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... | |
eprosima::fastdds::dds::Publisher * | GetPublisher () |
eprosima::fastdds::dds::DataWriter * | GetDataWriter () |
Constructor & Destructor Documentation
◆ SynDDSPublisher()
chrono::synchrono::SynDDSPublisher::SynDDSPublisher | ( | eprosima::fastdds::dds::Publisher * | publisher, |
eprosima::fastdds::dds::DataWriter * | writer, | ||
SynDDSDataWriterListener * | listener, | ||
std::shared_ptr< SynDDSTopic > | topic | ||
) |
Construct a new SynDDSPublisher object.
Member Function Documentation
◆ DeleteDDSEntities()
void chrono::synchrono::SynDDSPublisher::DeleteDDSEntities | ( | eprosima::fastdds::dds::DomainParticipant * | participant | ) |
Delete underlying DDS objects using the passed participant.
◆ Publish()
bool chrono::synchrono::SynDDSPublisher::Publish | ( | void * | message | ) |
Publish a message on the publishers topic Currently only can publish to one topic.
- Parameters
-
message the type supported message that will be distributed on the topic
◆ WaitForMatches()
void chrono::synchrono::SynDDSPublisher::WaitForMatches | ( | 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.
This function blocks until that the matches are achieved. By default, a subscriber will just wait for a single listener.
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono_synchrono/communication/dds/SynDDSPublisher.h
- /builds/uwsbel/chrono/src/chrono_synchrono/communication/dds/SynDDSPublisher.cpp