RTI Connext Traditional C++ API
Version 5.2.3
Main Page
Modules
Classes
Examples
All
Classes
Functions
Variables
Typedefs
Enumerations
Enumerator
Groups
Pages
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 Traditional C++ API Version 5.2.3
Copyright © Wed Apr 27 2016
Real-Time Innovations, Inc