RTI Connext C++ API
Version 5.0.0
Main Page
Modules
Classes
Examples
Publisher Use Cases
Programming How-To's
Working with publishers.
More...
Working with publishers.
Setting up a publisher
Set up participant
Create a
DDSPublisher
DDS_PublisherQos
publisher_qos;
// MyPublisherListener is user defined and
// extends DDSPublisherListener
DDSPublisherListener
* publisher_listener =
=
new
MyPublisherListener();
// or = NULL
participant->
get_default_publisher_qos
(publisher_qos);
DDSPublisher
* publisher = participant->
create_publisher
(publisher_qos,
publisher_listener,
DDS_STATUS_MASK_ALL
);
if
(publisher == NULL) {
// ... error
};
Tearing down a publisher
Delete
DDSPublisher
:
DDS_ReturnCode_t
retcode;
retcode = participant->
delete_publisher
(publisher);
if
(retcode !=
DDS_RETCODE_OK
) {
// ... check for cause of failure
}
RTI Connext C++ API Version 5.0.0
Copyright © Thu Aug 30 2012
Real-Time Innovations, Inc