An application that intends to publish information needs the following Entities: DomainParticipant, Topic, Publisher, and DataWriter. All Entities have a corresponding specialized Listener and a set of QosPolicies. A Listener is how Connext DDS notifies your application of status changes relevant to the Entity. The QosPolicies allow your application to configure the behavior and resources of the Entity.
You may have multiple Publishers, each managing a different set of DataWriters, or you may choose to use one Publisher for all your DataWriters.
For more information, see Creating Publishers Explicitly vs. Implicitly.
Figure 1 shows how these Entities are related, as well as the methods defined for each Entity.
Publishers are used to perform the operations listed in . You can find more information about the operations by looking in the section listed under the Reference column. For details such as formal parameters and return codes, please see the API Reference HTML documentation.
Some operations cannot be used within a listener callback, see Restricted Operations in Listener Callbacks.
Working with ... |
Operation |
Description |
Reference |
DataWriters |
begin_coherent_ |
Indicates that the application will begin a coherent set of modifications. |
|
create_datawriter |
Creates a DataWriter that will belong to the Publisher. |
||
create_datawriter_ |
Sets the DataWriter’s QoS based on a specified QoS profile. |
||
copy_from_topic_qos |
Copies relevant QosPolicies from a Topic into a DataWriterQoS structure. |
||
DataWriters |
delete_contained_ |
Deletes all of the DataWriters that were created by the Publisher. |
|
delete_datawriter |
Deletes a DataWriter that belongs to the Publisher. |
||
end_coherent_changes |
Ends the coherent set initiated by begin_coherent_changes(). |
||
DataWriters |
get_all_datawriters |
Retrieves all the DataWriters created from this Publisher. |
|
get_default_ |
Copies the Publisher’s default DataWriterQoS values into a DataWriterQos structure. |
||
get_status_changes |
Will always return 0 since there are no Statuses currently defined for Publishers. |
||
lookup_datawriter |
Retrieves a DataWriter previously created for a specific Topic. |
||
DataWriters |
set_default_datawriter_qos |
Sets or changes the default DataWriterQos values. |
|
set_default_datawriter_ |
Sets or changes the default DataWriterQos values based on a QoS profile. |
||
wait_for_ |
Blocks until all data written by the Publisher’s reliable DataWriters are acknowledged by all matched reliable DataReaders, or until the a specified timeout duration, max_wait, elapses. |
||
is_sample_app_acknowledged |
Indicates if a sample has been application-acknowledged by all the matching DataReaders that were alive when the sample was written. If a DataReader does not enable application acknowledgment (by setting the ReliabilityQosPolicy's acknowledgment_kind to a value other than DDS_PROTOCOL_ACKNOWLEDGMENT_MODE), the sample is considered application-acknowledged for that DataReader. |
||
Libraries and Profiles |
get_default_library |
Gets the Publisher’s default QoS profile library. |
Getting and Setting the Publisher’s Default QoS Profile and Library |
get_default_profile |
Gets the Publisher’s default QoS profile. |
||
get_default_profile_ |
Gets the library that contains the Publisher’s default QoS profile. |
||
set_default_library |
Sets the default library for a Publisher. |
||
set_default_profile |
Sets the default profile for a Publisher. |
||
Participants |
get_participant |
Gets the DomainParticipant that was used to create the Publisher. |
|
Publishers |
enable |
Enables the Publisher. |
|
equals |
Compares two Publisher’s QoS structures for equality. |
||
get_qos |
Gets the Publisher’s current QosPolicy settings. This is most often used in preparation for calling set_qos(). |
||
set_qos |
Sets the Publisher’s QoS. You can use this operation to change the values for the Publisher’s QosPolicies. Note, however, that not all QosPolicies can be changed after the Publisher has been created. |
||
set_qos_with_profile |
Sets the Publisher’s QoS based on a specified QoS profile. |
||
Publishers |
get_listener |
Gets the currently installed Listener. |
|
set_listener |
Sets the Publisher’s Listener. If you created the Publisher without a Listener, you can use this operation to add one later. |
||
suspend_publications |
Provides a hint that multiple data-objects within the Publisher are about to be written.Connext DDS does not currently use this hint. |
||
resume_publications |
Reverses the action of suspend_publications(). |
© 2017 RTI