CoreDX DDS C Reference Manual
Related Functions | List of all members
DDS_Publisher Struct Reference

The DDS_Publisher configures, creates, manages and destroys DDS_DataWriters. More...

Related Functions

(Note that these are not member functions.)

DDS_ReturnCode_t DDS_Publisher_enable (DDS_Publisher p)
 Enables the DDS_Publisher. More...
 
DDS_InstanceHandle_t DDS_Publisher_get_instance_handle (DDS_Publisher p)
 This operation returns the InstanceHandle_t that identifies the Publisher.
 
DDS_DomainParticipant DDS_Publisher_get_participant (DDS_Publisher p)
 This operation returns the DDS_DomainParticipant this Publisher belongs to.
 
DDS_StatusCondition DDS_Publisher_get_statuscondition (DDS_Publisher p)
 This operation allows access to the DDS_StatusCondition associated with the Publisher. More...
 
DDS_StatusMask DDS_Publisher_get_status_changes (DDS_Publisher p)
 This returns the list of triggered communication statuses in the Publisher. More...
 
DDS_DataWriter DDS_Publisher_create_datawriter (DDS_Publisher p, DDS_Topic a_topic, const DDS_DataWriterQos *qos, DDS_DataWriterListener *a_listener, DDS_StatusMask mask)
 This operation creates a DDS_DataWriter. More...
 
DDS_ReturnCode_t DDS_Publisher_delete_datawriter (DDS_Publisher p, DDS_DataWriter a_datawriter)
 This operation deletes a DataWriter. More...
 
DDS_DataWriter DDS_Publisher_lookup_datawriter (DDS_Publisher p, const char *topic_name)
 This operation retrieves a previously-created DDS_DataWriter contained in the Publisher, attached to a Topic named topic_name. More...
 
DDS_ReturnCode_t DDS_Publisher_delete_contained_entities (DDS_Publisher p)
 This operation deletes all the DataWriters created by means of the DDS_Publisher_create_datawriter() operation on the Publisher p. More...
 
DDS_ReturnCode_t DDS_Publisher_set_qos (DDS_Publisher p, const DDS_PublisherQos *qos)
 Sets the DDS_PublisherQos values. More...
 
DDS_ReturnCode_t DDS_Publisher_get_qos (DDS_Publisher p, DDS_PublisherQos *qos)
 Returns the current DDS_PublisherQos settings held in the Publisher p. More...
 
DDS_ReturnCode_t DDS_Publisher_set_listener (DDS_Publisher p, DDS_PublisherListener *a_listener, DDS_StatusMask mask)
 Installs a DDS_PublisherListener on Publisher p. More...
 
DDS_ReturnCode_t DDS_Publisher_set_listener_cd (DDS_Publisher p, DDS_PublisherListener_cd *a_listener, DDS_StatusMask mask, void *callback_data)
 Installs a DDS_PublisherListener_cd on Publisher p. More...
 
DDS_PublisherListenerDDS_Publisher_get_listener (DDS_Publisher p)
 This operation returns the currently installed DDS_PublisherListener. More...
 
DDS_PublisherListener_cdDDS_Publisher_get_listener_cd (DDS_Publisher p)
 This operation returns the currently installed DDS_PublisherListener_cd. More...
 
DDS_ReturnCode_t DDS_Publisher_suspend_publications (DDS_Publisher p)
 
DDS_ReturnCode_t DDS_Publisher_resume_publications (DDS_Publisher p)
 
DDS_ReturnCode_t DDS_Publisher_begin_coherent_changes (DDS_Publisher p)
 
DDS_ReturnCode_t DDS_Publisher_end_coherent_changes (DDS_Publisher p)
 
DDS_ReturnCode_t DDS_Publisher_wait_for_acknowledgments (DDS_Publisher p, const DDS_Duration_t *max_wait)
 Block until all writers contained by this publisher have received acknowledgements. More...
 
DDS_ReturnCode_t DDS_Publisher_set_default_datawriter_qos (DDS_Publisher p, const DDS_DataWriterQos *qos)
 Sets the default DDS_DataWriterQos held in the Publisher. More...
 
DDS_ReturnCode_t DDS_Publisher_get_default_datawriter_qos (DDS_Publisher p, struct DDS_DataWriterQos *qos)
 Provides access to the default DDS_DataWriterQos settings held in the Publisher p. More...
 
DDS_ReturnCode_t DDS_Publisher_copy_from_topic_qos (DDS_Publisher p, struct DDS_DataWriterQos *a_datawriter_qos, const DDS_TopicQos *a_topic_qos)
 This operation copies the QoS settings in a_topic_qos to the corresponding settings in a_datawriter_qos. More...
 

Detailed Description

The DDS_Publisher configures, creates, manages and destroys DDS_DataWriters.

Friends And Related Function Documentation

DDS_ReturnCode_t DDS_Publisher_begin_coherent_changes ( DDS_Publisher  p)
related
Not Yet Supported:
This operation is not yet implemented.
DDS_ReturnCode_t DDS_Publisher_copy_from_topic_qos ( DDS_Publisher  p,
struct DDS_DataWriterQos a_datawriter_qos,
const DDS_TopicQos a_topic_qos 
)
related

This operation copies the QoS settings in a_topic_qos to the corresponding settings in a_datawriter_qos.

The a_datawriter_qos parameter is populated with a copy of the QoS policies from the a_topic_qos structure. QoS entries in the datawriter qos structure will be overwritten with the values from the topic.

DDS_DataWriter DDS_Publisher_create_datawriter ( DDS_Publisher  p,
DDS_Topic  a_topic,
const DDS_DataWriterQos qos,
DDS_DataWriterListener a_listener,
DDS_StatusMask  mask 
)
related

This operation creates a DDS_DataWriter.

The created DataWriter is contained within the Publisher p. It is associated with the Topic, ContentFilteredTopic, or MultiTopic indicated by a_topic, and has the DDS_DataWriterQos indicated by qos. The qos argument may be passed DDS_DATAWRITER_QOS_DEFAULT, which indicates that the Publisher should use its currently configured default data writer QoS values. The DDS_DataWriterListener a_listener, is installed at creation time.

The created DataWriter (if not NULL) must be destroyed by a call to DDS_Publisher_delete_datawriter().

This routine will fail if the provided QoS settings are internally inconsistent. In this case, the routine will return NULL.

DDS_ReturnCode_t DDS_Publisher_delete_contained_entities ( DDS_Publisher  p)
related

This operation deletes all the DataWriters created by means of the DDS_Publisher_create_datawriter() operation on the Publisher p.

This routine will recursively call the corresponding delete_contained_entities() operation on each of the contained DataWriter objects. After successful execution, the application may delete the Publisher by calling DDS_DomainParticipant_delete_publisher().

If any of the objects cannot be deleted, this routine will return DDS_RETCODE_PRECONDITION_NOT_MET.

DDS_ReturnCode_t DDS_Publisher_delete_datawriter ( DDS_Publisher  p,
DDS_DataWriter  a_datawriter 
)
related

This operation deletes a DataWriter.

If the provided DataWriter a_datawriter was not created by Publisher p, the routine will fail and will return DDS_RETCODE_PRECONDITION_NOT_MET.

DDS_ReturnCode_t DDS_Publisher_enable ( DDS_Publisher  p)
related

Enables the DDS_Publisher.

A Publisher is created either enabled or not based on the DDS_DomainParticipantQos setting entity_factory. When a Publisher is not enabled, only the following sub-set of all Publisher operations are legal:

  • operations to get and set QoS policies,
  • factory operations (create, delete),
  • get_statuscondition(),
  • get_status_changes(),
  • lookup operations

Any other operation may return the DDS_NOT_ENABLED error. DDS_Publisher_enable() may be called on an already enabled Subscriber [it will have no effect].

DDS_ReturnCode_t DDS_Publisher_end_coherent_changes ( DDS_Publisher  p)
related
Not Yet Supported:
This operation is not yet implemented.
DDS_ReturnCode_t DDS_Publisher_get_default_datawriter_qos ( DDS_Publisher  p,
struct DDS_DataWriterQos qos 
)
related

Provides access to the default DDS_DataWriterQos settings held in the Publisher p.

The provided qos argument is populated with the current default qos settings.

DDS_PublisherListener * DDS_Publisher_get_listener ( DDS_Publisher  p)
related

This operation returns the currently installed DDS_PublisherListener.

Note
Because the infrastructure makes a copy of the listener provided in DDS_Publisher_set_listener(), the returned structure pointer will not match the pointer originally provided. However, the function pointers within the structure will match. Also, the application should not free the data referenced by the returned pointer.
DDS_PublisherListener_cd * DDS_Publisher_get_listener_cd ( DDS_Publisher  p)
related

This operation returns the currently installed DDS_PublisherListener_cd.

Note
Because the infrastructure does not make a copy of the listener provided in DDS_Publisher_set_listener_cd(), the returned structure pointer will match the pointer originally provided. The application should not free the data referenced by the returned pointer.
DDS_ReturnCode_t DDS_Publisher_get_qos ( DDS_Publisher  p,
DDS_PublisherQos qos 
)
related

Returns the current DDS_PublisherQos settings held in the Publisher p.

The qos parameter is populated with a copy of the current Publisher QoS properties.

Note
The qos structure may contain sequences or strings that are populated with dynamic memory. The caller is responsible for freeing the dynamic memory of these items.
For example, the sequence 'qos->group_data' may have dynamically allocated memory assigned. This can be released by a call to seq_clear(&qos->group_data).
DDS_StatusMask DDS_Publisher_get_status_changes ( DDS_Publisher  p)
related

This returns the list of triggered communication statuses in the Publisher.

If the Publisher is not enabled, all statuses will be untriggered. The list returned by get_status_changes may be empty. The list of statuses returned by get_status_changes operation contains statuses that are triggered on the Publisher itself and does not include statuses from contained DataWriter objects.

DDS_StatusCondition DDS_Publisher_get_statuscondition ( DDS_Publisher  p)
related

This operation allows access to the DDS_StatusCondition associated with the Publisher.

The returned condition can be added to a DDS_WaitSet.

DDS_DataWriter DDS_Publisher_lookup_datawriter ( DDS_Publisher  p,
const char *  topic_name 
)
related

This operation retrieves a previously-created DDS_DataWriter contained in the Publisher, attached to a Topic named topic_name.

If multiple DataWriters are found, one of them will be returned. If no matching DataWriter is found, this routine will return NULL.

DDS_ReturnCode_t DDS_Publisher_resume_publications ( DDS_Publisher  p)
related
Not Yet Supported:
This operation is not yet implemented.
DDS_ReturnCode_t DDS_Publisher_set_default_datawriter_qos ( DDS_Publisher  p,
const DDS_DataWriterQos qos 
)
related

Sets the default DDS_DataWriterQos held in the Publisher.

This default qos will be used during subsequent calls to DDS_Publisher_create_datawriter() if the special DDS_DATAWRITER_QOS_DEFAULT value is provided for qos.
This routine may fail if the provided qos argument is not internally consistent. In this case, DDS_INCONSISTENT_POLICY will be returned, and no changes will be made to the Publisher.

DDS_ReturnCode_t DDS_Publisher_set_listener ( DDS_Publisher  p,
DDS_PublisherListener a_listener,
DDS_StatusMask  mask 
)
related

Installs a DDS_PublisherListener on Publisher p.

Only one listener may be attached to a Publisher at a time. A call to set_listener() will replace any current listener with a_listener.

a_listener can be NULL, which indicates a listener that does nothing.

The infrastructure will make an internal copy of the listener structure so that it need not be persisted by the application.

DDS_ReturnCode_t DDS_Publisher_set_listener_cd ( DDS_Publisher  p,
DDS_PublisherListener_cd a_listener,
DDS_StatusMask  mask,
void *  callback_data 
)
related

Installs a DDS_PublisherListener_cd on Publisher p.

Only one listener may be attached to a Publisher at a time. A call to set_listener_cd() will replace any current listener with a_listener.

a_listener can be NULL, which indicates a listener that does nothing.

The infrastructure will not make an internal copy of the listener structure which means that it must be persisted by the application.

DDS_ReturnCode_t DDS_Publisher_set_qos ( DDS_Publisher  p,
const DDS_PublisherQos qos 
)
related

Sets the DDS_PublisherQos values.

These QoS values affect the behavior of the DDS_Publisher.

DDS_ReturnCode_t DDS_Publisher_suspend_publications ( DDS_Publisher  p)
related
Not Yet Supported:
This operation is not yet implemented.
DDS_ReturnCode_t DDS_Publisher_wait_for_acknowledgments ( DDS_Publisher  p,
const DDS_Duration_t max_wait 
)
related

Block until all writers contained by this publisher have received acknowledgements.

This routine will block until all data written by contained writers has been acknowledged, or until the 'max_wait' duration has passed. 'max_wait' can be set to INFINITE, in which case this routine may block indefinitely.

Return values
DDS_RETCODE_TIME_OUTreturned if 'max_wait' passes before all acks are received
DDS_RETCODE_OKreturned if all acks have been received before 'max_wait'

© 2009-2017 Twin Oaks Computing, Inc
Castle Rock, CO 80108
All rights reserved.