Function dds_find_topic_scoped¶
Defined in File dds.h
Function Documentation¶
-
dds_entity_t dds_find_topic_scoped(dds_find_scope_t scope, dds_entity_t participant, const char *name, dds_duration_t timeout)¶
Finds a locally created or discovered remote topic by topic name.
Finds a locally created topic or a discovered remote topic based on the topic name. In case the topic is not found, this function will wait for the topic to become available until the provided time out.
In case multiple (discovered) topics are found with the provided name, this function will return an error code. The caller can decide to read DCPSTopic data itself and select one of the topic definitions to create the topic.
The returned topic should be released with dds_delete.
- Parameters
scope – [in] The scope used to find the topic
participant – [in] The handle of the participant the found topic will be created in
name – [in] The name of the topic to find.
timeout – [in] The timeout for waiting for the topic to become available
- Return values
>0 – A valid topic handle.
0 – No topic of this name existed yet
DDS_RETCODE_BAD_PARAMETER – Participant handle or scope invalid
DDS_RETCODE_PRECONDITION_NOT_MET – Multiple topics with the provided name were found.
- Returns
A valid topic handle or an error code.