Function rmw_dds_common::qos_profile_get_best_available_for_topic_subscription
Defined in File qos.hpp
Function Documentation
-
rmw_ret_t rmw_dds_common::qos_profile_get_best_available_for_topic_subscription(const rmw_node_t *node, const char *topic_name, rmw_qos_profile_t *qos_profile, const GetEndpointInfoByTopicFunction &get_endpoint_info)
Update a subscription QoS profile so that it is compatible with discovered publishers.
If any policies in
qos_profileare set to BEST_AVAILABLE, thenget_endpoint_infowill be called to query endpoint information for adapting the QoS policies.For rules related to adapting ‘best available’ policies, see `qos_profile_get_best_available_for_subscription`.
This function allocates memory with the node’s context allocator.
- Parameters:
node – [in] Node used to query the graph.
topic_name – [in] Query info for publishers on this topic name.
qos_profile – [inout] Any policies that are set to ‘best available’ will by updated based on publisher endpoint QoS policies.
get_endpoint_info – [in] The function used to query for publisher endpoint information. I.e. an implementation of
rmw_get_publishers_info_by_topic.
- Returns:
RMW_RET_OKif the operation was successful, or- Returns:
RMW_RET_INVALID_ARGUMENTifnodeisnullptr, or- Returns:
RMW_RET_INVALID_ARGUMENTiftopic_nameisnullptr, or- Returns:
RMW_RET_INVALID_ARGUMENTifqos_profileisnullptr, or- Returns:
RMW_RET_INCORRECT_RMW_IMPLEMENTATIONif thenodeimplementation identifier does not match this implementation, or- Returns:
RMW_RET_BAD_ALLOCif memory allocation fails, or- Returns:
RMW_RET_ERRORif there is an unexpected error.