Function dds_create_topic_sertype

Function Documentation

dds_entity_t dds_create_topic_sertype(dds_entity_t participant, const char *name, struct ddsi_sertype **sertype, const dds_qos_t *qos, const dds_listener_t *listener, const struct ddsi_plist *sedp_plist)

Creates a new topic with provided type handling.

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.

Parameters
  • participant[in] Participant on which to create the topic.

  • name[in] Topic name

  • sertype[inout] Internal description of the type . On return, the sertype parameter is set to the actual sertype that is used by the topic.

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

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

  • sedp_plist[in] Topic description to be published as part of discovery (if NULL, not published).

Return values
  • >=0 – A valid unique topic handle.

  • DDS_RETCODE_BAD_PARAMETER – Either participant, descriptor, name or qos is invalid.

  • DDS_RETCODE_BAD_PARAMETER – Either participant, descriptor, name or qos is invalid.

  • DDS_RETCODE_INCONSISTENT_POLICY – QoS mismatch between qos and an existing topic’s QoS.

  • DDS_RETCODE_PRECONDITION_NOT_MET – Mismatch between type name in sertype and pre-existing topic’s type name.

Returns

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