Function dds_resolve_type

Function Documentation

dds_return_t dds_resolve_type(dds_entity_t entity, const dds_typeid_t *type_id, dds_duration_t timeout, struct ddsi_sertype **sertype)

This function resolves the type for the provided type identifier, which can e.g. be retrieved from endpoint or topic discovery data.

Remark

The resulting type from the sertype out parameter is refcounted and needs to be dereferenced at some point. This can be done by creating a topic using dds_create_topic_generic, which takes over the ownership of the type or alternatively by using ddsi_sertype_unref to release the reference.

Parameters
  • entity[in] A domain entity or an entity bound to a domain, such as a participant, reader or writer.

  • type_id[in] Type identifier

  • timeout[in] Timeout for waiting for requested type information to be available

  • sertype[out] The type information, or NULL if the type could not be resolved

Return values
  • DDS_RETCODE_OK – The operation was successful.

  • DDS_BAD_PARAMETER – The entity parameter is not a valid parameter, type_id or type name is not provided, or the sertype out parameter is NULL

  • DDS_RETCODE_NOT_FOUND – A type with the provided type_id and type_name was not found

  • DDS_RETCODE_ILLEGAL_OPERATION – The operation is invoked on an inappropriate object.

Returns

A dds_return_t indicating success or failure.