Skip to main content

dds_create_topic_sertype

Function dds_create_topic_sertype 

Source
pub unsafe extern "C" fn dds_create_topic_sertype(
    participant: dds_entity_t,
    name: *const c_char,
    sertype: *mut *mut ddsi_sertype,
    qos: *const dds_qos_t,
    listener: *const dds_listener_t,
    sedp_plist: *const ddsi_plist,
) -> dds_entity_t
Expand description

@brief Creates a new topic with provided type handling. @ingroup topic @component topic

The name for the type is taken from the provided “sertype” object. Type matching is done on a combination of topic name and type name. Each successful call to dds_create_topic creates a new topic entity sharing the same QoS settings with all other topics of the same name.

In case this function returns a valid handle, the ownership of the provided sertype is handed over to Cyclone. On return, the caller gets in the sertype parameter a pointer to the sertype that is actually used by the topic. This can be the provided sertype (if this sertype was not yet known in the domain), or a sertype thas was already known in the domain.

@param[in] participant Participant on which to create the topic. @param[in] name Topic name @param[in,out] sertype Internal description of the type . On return, the sertype parameter is set to the actual sertype that is used by the topic. @param[in] qos QoS to set on the new topic (can be NULL). @param[in] listener Any listener functions associated with the new topic (can be NULL). @param[in] sedp_plist Ignored (should be NULL, may be enforced in the future).

@returns A valid, unique topic handle or an error code. Iff a valid handle, the domain takes ownership of provided serdata.

@retval >=0 A valid unique topic handle. @retval DDS_RETCODE_BAD_PARAMETER Either participant, descriptor, name or qos is invalid. @retval DDS_RETCODE_INCONSISTENT_POLICY QoS mismatch between qos and an existing topic’s QoS. @retval DDS_RETCODE_PRECONDITION_NOT_MET Mismatch between type name in sertype and pre-existing topic’s type name.