Working with publishers.
More...
Working with publishers.
Setting up a publisher
- Create a Publisher
PublisherQos publisher_qos = new PublisherQos();
PublisherListener publisher_listener = null;
try {
participant.get_default_publisher_qos(publisher_qos);
} catch (DDS.Exception) {
Console.WriteLine("***Error: failed to get default publisher qos");
}
Publisher publisher = participant.create_publisher(
publisher_qos,
publisher_listener,
if (publisher == null) {
Console.WriteLine("***Error: failed to create publisher");
}
Tearing down a publisher
- Delete Publisher:
try {
participant.delete_publisher(ref publisher);
} catch (DDS.Exception) {
Console.WriteLine("***Error: failed to delete publisher");
}