pub unsafe extern "C" fn dds_create_writer(
participant_or_publisher: dds_entity_t,
topic: dds_entity_t,
qos: *const dds_qos_t,
listener: *const dds_listener_t,
) -> dds_entity_tExpand description
@brief Creates a new instance of a DDS writer. @ingroup writer @component writer
When a participant is used to create a writer, an implicit publisher is created as the writer’s parent. This implicit publisher is deleted automatically when its last child is deleted, which is when the created writer is deleted unless additional children were added to the implicit publisher. It is also deleted as part of the recursive deletion of the participant.
@param[in] participant_or_publisher The participant or publisher on which the writer is being created. @param[in] topic The topic to write. @param[in] qos The QoS to set on the new writer (can be NULL). @param[in] listener Any listener functions associated with the new writer (can be NULL).
@returns A valid writer handle or an error code.
@retval >0 A valid writer handle. @retval DDS_RETCODE_ERROR An internal error occurred. @retval DDS_RETCODE_BAD_PARAMETER One of the parameters is invalid, or the participant and topic do not belong to the same domain participant. @retval DDS_RETCODE_ILLEGAL_OPERATION participant_or_publisher is neither a participant nor a publisher, or the operation is otherwise inappropriate for the supplied entity. @retval DDS_RETCODE_INCONSISTENT_POLICY The requested QoS is inconsistent. @retval DDS_RETCODE_NOT_ALLOWED_BY_SECURITY The configured DDS Security access control plugin denied creation of the writer.