From 5ec52d004b7d7aaa00d29fb253c4f01cc97b6e29 Mon Sep 17 00:00:00 2001 From: Jacob Perron Date: Tue, 12 Feb 2019 09:31:19 -0800 Subject: [PATCH] Fix rcl_action documentation (#380) * Fix rcl_action_goal_info_t documentation * Fix rcl_action_expire_goals documentation * Fix information about thread safety Signed-off-by: Jacob Perron --- rcl_action/include/rcl_action/action_server.h | 11 +++++------ rcl_action/include/rcl_action/types.h | 6 +----- rcl_action/include/rcl_action/wait.h | 4 ++-- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/rcl_action/include/rcl_action/action_server.h b/rcl_action/include/rcl_action/action_server.h index 46a46b2..6252957 100644 --- a/rcl_action/include/rcl_action/action_server.h +++ b/rcl_action/include/rcl_action/action_server.h @@ -354,11 +354,11 @@ rcl_action_send_goal_response( * rcl_ret_t ret = rcl_action_take_goal_request(&action_server, &goal_request); * // ... error handling * // If the goal is accepted, then tell the action server - * // First, create and populate a goal info message (rcl type) + * // First, create a goal info message * rcl_action_goal_info_t goal_info = rcl_action_get_zero_initialized_goal_info(); - * ret = rcl_action_goal_info_init(&goal_info, &action_server); - * // ... error handling, and populate with goal ID and timestamp - * ret = rcl_action_accept_new_goal(&action_server, &goal_info, NULL); + * // ... populate goal_info.uuid (unique_identifier_msgs/UUID) + * // ... populate goal_info.stamp (builtin_interfaces/Time) + * rcl_action_goal_handle_t * goal_handle = rcl_action_accept_new_goal(&action_server, &goal_info); * // ... error_handling * // ... Populate goal response (client library type) * ret = rcl_action_send_goal_response(&action_server, &goal_response); @@ -370,7 +370,7 @@ rcl_action_send_goal_response( * Attribute | Adherence * ------------------ | ------------- * Allocates Memory | Yes - * Thread-Safe | Yes + * Thread-Safe | No * Uses Atomics | No * Lock-Free | Yes * @@ -602,7 +602,6 @@ rcl_action_send_result_response( * * \param[in] action_server handle to the action server from which expired goals * will be cleared. - * \param[in] expired_goals_allocator allocator to use to allocate expired_goals output * \param[inout] expired_goals the identifiers of goals that expired, or set to `NULL` if unused * \param[inout] expired_goals_capacity the allocated size of `expired_goals`, or 0 if unused * \param[out] num_expired the number of expired goals, or set to `NULL` if unused diff --git a/rcl_action/include/rcl_action/types.h b/rcl_action/include/rcl_action/types.h index 21358a3..d87b067 100644 --- a/rcl_action/include/rcl_action/types.h +++ b/rcl_action/include/rcl_action/types.h @@ -104,11 +104,7 @@ typedef enum rcl_action_goal_event_t GOAL_EVENT_NUM_EVENTS } rcl_action_goal_event_t; -/// Return a rcl_action_goal_info_t with members set to `NULL`. -/** - * Should be called to get a null rcl_action_goal_info_t before passing to - * rcl_action_goal_info_init(). - */ +/// Return a rcl_action_goal_info_t with members set to zero values. RCL_ACTION_PUBLIC RCL_WARN_UNUSED rcl_action_goal_info_t diff --git a/rcl_action/include/rcl_action/wait.h b/rcl_action/include/rcl_action/wait.h index 741592c..b2d707a 100644 --- a/rcl_action/include/rcl_action/wait.h +++ b/rcl_action/include/rcl_action/wait.h @@ -122,7 +122,7 @@ rcl_action_wait_set_add_action_server( * Attribute | Adherence * ------------------ | ------------- * Allocates Memory | No - * Thread-Safe | No + * Thread-Safe | Yes * Uses Atomics | No * Lock-Free | Yes * @@ -162,7 +162,7 @@ rcl_action_client_wait_set_get_num_entities( * Attribute | Adherence * ------------------ | ------------- * Allocates Memory | No - * Thread-Safe | No + * Thread-Safe | Yes * Uses Atomics | No * Lock-Free | Yes *