Function rcl_action_take_status
Defined in File action_client.h
Function Documentation
-
rcl_ret_t rcl_action_take_status(const rcl_action_client_t *action_client, void *ros_status_array)
Take a ROS status message using a rcl_action_client_t.
The caller is responsible for ensuring that the type of
ros_status_arrayand the type associate with the client (via the type support) match. Passing a different type produces undefined behavior and cannot be checked by this function and therefore no deliberate error will occur.- Todo:
TODO(jacobperron) blocking of take?
- Todo:
TODO(jacobperron) pre-, during-, and post-conditions for message ownership?
- Todo:
TODO(jacobperron) is this thread-safe?
The caller is responsible for allocating the
ros_status_arraystruct with a zero-initialization (the internal array should not be allocated). If there is a successful take, thenros_status_arrayis populated with the allocator given in the action client options. It is the callers responsibility to deallocate theros_status_arraystruct using the allocator given in the action client options.Attribute
Adherence
Allocates Memory
Yes
Thread-Safe
No
Uses Atomics
No
Lock-Free
Yes
- Parameters:
action_client – [in] handle to the client that will take status message
ros_status_array – [out] pointer to ROS aciton_msgs/StatusArray message that will be populated with information about goals that have accepted the cancel request.
- Returns:
RCL_RET_OKif the response was taken successfully, or- Returns:
RCL_RET_INVALID_ARGUMENTif any arguments are invalid, or- Returns:
RCL_RET_ACTION_CLIENT_INVALIDif the action client is invalid, or- Returns:
RCL_RET_BAD_ALLOCif allocating memory failed, or- Returns:
RCL_RET_ACTION_CLIENT_TAKE_FAILEDif take failed but no error occurred in the middleware, or- Returns:
RCL_RET_ERRORif an unspecified error occurs.