diff --git a/rmw/include/rmw/rmw.h b/rmw/include/rmw/rmw.h index 24d6d051..dbcafd87 100644 --- a/rmw/include/rmw/rmw.h +++ b/rmw/include/rmw/rmw.h @@ -894,12 +894,16 @@ rmw_count_subscribers( size_t * count); /** - * This function can be used to retrieve a list of all publishers (described by the rmw_participants_t struct) + * Retrieves a list of all publishers (described by the rmw_participants_t struct) * publishing to a specific topic along with its respective qos profile. + * * None of the parameters provided to this function can be NULL. + * * Incorrect or non existent topic names are allowed. + * * \param[in] node the handle to the node being used to query the ROS graph. * \param[in] topic_name the name of the topic for which the list of publishers will be retrieved. + * \param[out] publishers an array of publishers. * \return `RMW_RET_OK` if the list of publishers was retrieved successfully. * \return `RMW_RET_ERROR` if any of the parameters are NULL. * \return `RMW_RET_ERROR` if an unspecified error occurs @@ -908,17 +912,21 @@ RMW_PUBLIC RMW_WARN_UNUSED rmw_ret_t rmw_get_qos_for_publishers( - const rmw_node_t * node, - const char * topic_name, - rmw_participants_t * publishers); + const rmw_node_t * node, + const char * topic_name, + rmw_participants_t * publishers); /** - * This function can be used to retrieve a list of all subscribers (described by the rmw_participants_t struct) + * Retrieves a list of all subscribers (described by the rmw_participants_t struct) * subscribing to a specific topic along with its respective qos profile. + * * None of the parameters provided to this function can be NULL. + * * Incorrect or non existent topic names are allowed. + * * \param[in] node the handle to the node being used to query the ROS graph. * \param[in] topic_name the name of the topic for which the list of subscribers will be retrieved. + * \param[out] subscribers an array of subscribers. * \return `RMW_RET_OK` if the list of publishers was retrieved successfully. * \return `RMW_RET_ERROR` if any of the parameters are NULL. * \return `RMW_RET_ERROR` if an unspecified error occurs @@ -927,9 +935,9 @@ RMW_PUBLIC RMW_WARN_UNUSED rmw_ret_t rmw_get_qos_for_subscribers( - const rmw_node_t * node, - const char * topic_name, - rmw_participants_t * subscribers); + const rmw_node_t * node, + const char * topic_name, + rmw_participants_t * subscribers); RMW_PUBLIC RMW_WARN_UNUSED diff --git a/rmw/include/rmw/types.h b/rmw/include/rmw/types.h index cb7c2d31..2666d453 100644 --- a/rmw/include/rmw/types.h +++ b/rmw/include/rmw/types.h @@ -260,7 +260,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_qos_profile_t bool avoid_ros_namespace_conventions; } rmw_qos_profile_t; -/// Structure to store the name of the participant and its respective qos profile +/// Stores participant name and its qos profile typedef struct RMW_PUBLIC_TYPE rmw_participant_qos_profile_t { /// Name of the participant diff --git a/rmw/src/allocators.c b/rmw/src/allocators.c index dfd521ee..8f554c98 100644 --- a/rmw/src/allocators.c +++ b/rmw/src/allocators.c @@ -158,4 +158,3 @@ rmw_participant_qos_profile_free(rmw_participant_qos_profile_t * participant_qos { rmw_free(participant_qos_profile); } -