Function rcl_action_get_result_service_name

Function Documentation

rcl_ret_t rcl_action_get_result_service_name(const char *action_name, rcl_allocator_t allocator, char **result_service_name)

Get the result service name of an action.

This function returns the result service name for a given action name that must be used by action clients and action servers to successfully communicate with each other.

Attribute

Adherence

Allocates Memory

Yes

Thread-Safe

No

Uses Atomics

No

Lock-Free

Yes

Parameters:
  • action_name[in] The name of the action whose result service name is being returned.

  • allocator[in] A valid allocator to be used.

  • result_service_name[out] Either an allocated string with the action result service name, or NULL if the function failed to allocate memory for it. Must refer to a NULL pointer upon call.

Returns:

RCL_RET_OK if the action result service name was returned, or

Returns:

RCL_RET_ACTION_NAME_INVALID if the action name is not valid (i.e. empty), or

Returns:

RCL_RET_INVALID_ARGUMENT if the action name is NULL, or

Returns:

RCL_RET_INVALID_ARGUMENT if the allocator is invalid, or

Returns:

RCL_RET_INVALID_ARGUMENT if the result service name pointer is NULL or points to a non-NULL pointer, or

Returns:

RCL_RET_BAD_ALLOC if allocating memory failed.