Function dds_create_writer

Function Documentation

dds_entity_t dds_create_writer(dds_entity_t participant_or_publisher, dds_entity_t topic, const dds_qos_t *qos, const dds_listener_t *listener)

Creates a new instance of a DDS writer.

When a participant is used to create a writer, an implicit publisher is created. This implicit publisher will be deleted automatically when the created writer is deleted.

Parameters
  • participant_or_publisher[in] The participant or publisher on which the writer is being created.

  • topic[in] The topic to write.

  • qos[in] The QoS to set on the new writer (can be NULL).

  • listener[in] Any listener functions associated with the new writer (can be NULL).

Returns

A valid writer handle or an error code.

Returns

>0 A valid writer handle.

Returns

DDS_RETCODE_ERROR An internal error occurred.