The following #includes are needed for the examples on this page
#include <dds/pub/ddspub.hpp>
#include <dds/domain/ddsdomain.hpp>
#include <dds/core/ddscore.hpp>
Setting up a publisher
- Create a Publisher with each of the available constructors
ExamplePublisherListener *listener = new ExamplePublisherListener;
publisher3.close();
Looking up Publishers
- Lookup Publishers
void howto_lookup_publishers()
{
create_and_retain_publisher(participant);
create_and_retain_publisher(participant);
create_and_retain_publisher(participant);
std::vector<dds::pub::Publisher> publishers1;
int publisher_count =
publisher_count =
for (std::vector<dds::pub::Publisher>::iterator it = publishers1.begin();
it != publishers1.end();
it++) {
(*it).close();
}
}
{
}
Tearing down a publisher