rcl_action  master
C API providing common functionality for ROS actions.
Functions
names.h File Reference
#include "rcl_action/visibility_control.h"
#include "rcl_action/types.h"
#include "rcl/allocator.h"
#include "rcl/macros.h"
#include "rcl/types.h"
Include dependency graph for names.h:

Go to the source code of this file.

Functions

RCL_ACTION_PUBLIC rcl_ret_t rcl_action_get_goal_service_name (const char *action_name, rcl_allocator_t allocator, char **goal_service_name)
 Get the goal service name of an action. More...
 
RCL_ACTION_PUBLIC rcl_ret_t rcl_action_get_cancel_service_name (const char *action_name, rcl_allocator_t allocator, char **cancel_service_name)
 Get the cancel service name of an action. More...
 
RCL_ACTION_PUBLIC 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. More...
 
RCL_ACTION_PUBLIC rcl_ret_t rcl_action_get_feedback_topic_name (const char *action_name, rcl_allocator_t allocator, char **feedback_topic_name)
 Get the feedback topic name of an action. More...
 
RCL_ACTION_PUBLIC rcl_ret_t rcl_action_get_status_topic_name (const char *action_name, rcl_allocator_t allocator, char **status_topic_name)
 Get the status topic name of an action. More...
 

Function Documentation

◆ rcl_action_get_goal_service_name()

RCL_ACTION_PUBLIC rcl_ret_t rcl_action_get_goal_service_name ( const char *  action_name,
rcl_allocator_t  allocator,
char **  goal_service_name 
)

Get the goal service name of an action.

This function returns the goal 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
[in]action_nameThe name of the action whose goal service name is being returned.
[in]allocatorA valid allocator to be used.
[out]goal_service_nameEither an allocated string with the action goal 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 goal service name was returned, or
RCL_RET_ACTION_NAME_INVALID if the action name is not valid (i.e. empty), or
RCL_RET_INVALID_ARGUMENT if the action name is NULL, or
RCL_RET_INVALID_ARGUMENT if the allocator is invalid, or
RCL_RET_INVALID_ARGUMENT if the goal service name pointer is NULL or points to a non-NULL pointer, or
RCL_RET_BAD_ALLOC if allocating memory failed.

◆ rcl_action_get_cancel_service_name()

RCL_ACTION_PUBLIC rcl_ret_t rcl_action_get_cancel_service_name ( const char *  action_name,
rcl_allocator_t  allocator,
char **  cancel_service_name 
)

Get the cancel service name of an action.

This function returns the cancel 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
[in]action_nameThe name of the action whose cancel service name is being returned.
[in]allocatorA valid allocator to be used.
[out]cancel_service_nameEither an allocated string with the action cancel 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 cancel service name was returned, or
RCL_RET_ACTION_NAME_INVALID if the action name is not valid (i.e. empty), or
RCL_RET_INVALID_ARGUMENT if the action name is NULL, or
RCL_RET_INVALID_ARGUMENT if the allocator is invalid, or
RCL_RET_INVALID_ARGUMENT if the cancel service name is NULL or points to a non-NULL pointer, or
RCL_RET_BAD_ALLOC if allocating memory failed.

◆ rcl_action_get_result_service_name()

RCL_ACTION_PUBLIC 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
[in]action_nameThe name of the action whose result service name is being returned.
[in]allocatorA valid allocator to be used.
[out]result_service_nameEither 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
RCL_RET_ACTION_NAME_INVALID if the action name is not valid (i.e. empty), or
RCL_RET_INVALID_ARGUMENT if the action name is NULL, or
RCL_RET_INVALID_ARGUMENT if the allocator is invalid, or
RCL_RET_INVALID_ARGUMENT if the result service name pointer is NULL or points to a non-NULL pointer, or
RCL_RET_BAD_ALLOC if allocating memory failed.

◆ rcl_action_get_feedback_topic_name()

RCL_ACTION_PUBLIC rcl_ret_t rcl_action_get_feedback_topic_name ( const char *  action_name,
rcl_allocator_t  allocator,
char **  feedback_topic_name 
)

Get the feedback topic name of an action.

This function returns the feedback topic 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
[in]action_nameThe name of the action whose feedback topic name is being returned.
[in]allocatorA valid allocator to be used.
[out]feedback_topic_nameEither an allocated string with the action feedback topic 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 feedback topic name was returned, or
RCL_RET_ACTION_NAME_INVALID if the action name is not valid (i.e. empty), or
RCL_RET_INVALID_ARGUMENT if the action name is NULL, or
RCL_RET_INVALID_ARGUMENT if the allocator is invalid, or
RCL_RET_INVALID_ARGUMENT if the feedback topic name pointer is NULL or points to a non-NULL pointer, or
RCL_RET_BAD_ALLOC if allocating memory failed.

◆ rcl_action_get_status_topic_name()

RCL_ACTION_PUBLIC rcl_ret_t rcl_action_get_status_topic_name ( const char *  action_name,
rcl_allocator_t  allocator,
char **  status_topic_name 
)

Get the status topic name of an action.

This function returns the status topic 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
[in]action_nameThe name of the action whose status topic name is being returned.
[in]allocatorA valid allocator to be used.
[out]status_topic_nameEither an allocated string with the action status topic 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 status topic name was returned, or
RCL_RET_ACTION_NAME_INVALID if the action name is not valid (i.e. empty), or
RCL_RET_INVALID_ARGUMENT if the action name is NULL, or
RCL_RET_INVALID_ARGUMENT if the allocator is invalid, or
RCL_RET_INVALID_ARGUMENT if the status topic name pointer is NULL or points to a non-NULL pointer, or
RCL_RET_BAD_ALLOC if allocating memory failed.