Function rcl_action_take_cancel_request

Function Documentation

rcl_ret_t rcl_action_take_cancel_request(const rcl_action_server_t *action_server, rmw_request_id_t *request_header, void *ros_cancel_request)

Take a pending cancel request using an action server.

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 ensuring that the type of ros_cancel_request_ and 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.

After receiving a successful cancel request, the appropriate goals can be transitioned to the state CANCELING using rcl_action_process_cancel_request().

Attribute

Adherence

Allocates Memory

No

Thread-Safe

No

Uses Atomics

No

Lock-Free

Yes

Parameters:
  • action_server[in] handle to the action server that will take the cancel request

  • request_header[out] pointer to the cancel request header

  • ros_cancel_request[out] a preallocated ROS cancel request where the request message is copied

Returns:

RCL_RET_OK if the response was sent successfully, or

Returns:

RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or

Returns:

RCL_RET_ACTION_SERVER_INVALID if the action server is invalid, or

Returns:

RCL_RET_ACTION_SERVER_TAKE_FAILED if take failed but no error occurred in the middleware, or

Returns:

RCL_RET_ERROR if an unspecified error occurs.