rcl_action
master
C API providing common functionality for ROS actions.
|
Go to the source code of this file.
Functions | |
RCL_ACTION_PUBLIC rcl_ret_t | rcl_action_get_client_names_and_types_by_node (const rcl_node_t *node, rcl_allocator_t *allocator, const char *node_name, const char *node_namespace, rcl_names_and_types_t *action_names_and_types) |
Get a list of action names and types for action clients associated with a node. More... | |
RCL_ACTION_PUBLIC rcl_ret_t | rcl_action_get_server_names_and_types_by_node (const rcl_node_t *node, rcl_allocator_t *allocator, const char *node_name, const char *node_namespace, rcl_names_and_types_t *action_names_and_types) |
Get a list of action names and types for action servers associated with a node. More... | |
RCL_ACTION_PUBLIC rcl_ret_t | rcl_action_get_names_and_types (const rcl_node_t *node, rcl_allocator_t *allocator, rcl_names_and_types_t *action_names_and_types) |
Return a list of action names and their types. More... | |
RCL_ACTION_PUBLIC rcl_ret_t rcl_action_get_client_names_and_types_by_node | ( | const rcl_node_t * | node, |
rcl_allocator_t * | allocator, | ||
const char * | node_name, | ||
const char * | node_namespace, | ||
rcl_names_and_types_t * | action_names_and_types | ||
) |
Get a list of action names and types for action clients associated with a node.
The node
parameter must point to a valid node.
The action_names_and_types
parameter must be allocated and zero initialized. This function allocates memory for the returned list of names and types and so it is the callers responsibility to pass action_names_and_types
to rcl_names_and_types_fini() when it is no longer needed. Failing to do so will result in leaked memory.
The returned names are not automatically remapped by this function. Attempting to create action clients or action servers with names returned by this function may not result in the desired action name depending on the remap rules in use.
Attribute | Adherence |
---|---|
Allocates Memory | Yes |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Maybe [1] |
[1] implementation may need to protect the data structure with a lock
[in] | node | the handle to the node being used to query the ROS graph |
[in] | allocator | allocator for allocating space for strings |
[in] | node_name | the node name of the actions to return |
[in] | node_namespace | the node namespace of the actions to return |
[out] | action_names_and_types | list of action names and their types |
RCL_RET_OK
if the query was successful, or RCL_RET_NODE_INVALID
if the node is invalid, or RCL_RET_INVALID_ARGUMENT
if any arguments are invalid, or RCL_RET_ERROR
if an unspecified error occurs. RCL_ACTION_PUBLIC rcl_ret_t rcl_action_get_server_names_and_types_by_node | ( | const rcl_node_t * | node, |
rcl_allocator_t * | allocator, | ||
const char * | node_name, | ||
const char * | node_namespace, | ||
rcl_names_and_types_t * | action_names_and_types | ||
) |
Get a list of action names and types for action servers associated with a node.
This function returns a list of action names and types for action servers associated with the provided node name.
The node
parameter must point to a valid node.
The action_names_and_types
parameter must be allocated and zero initialized. This function allocates memory for the returned list of names and types and so it is the callers responsibility to pass action_names_and_types
to rcl_names_and_types_fini() when it is no longer needed. Failing to do so will result in leaked memory.
The returned names are not automatically remapped by this function. Attempting to create action clients or action servers with names returned by this function may not result in the desired action name depending on the remap rules in use.
Attribute | Adherence |
---|---|
Allocates Memory | Yes |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Maybe [1] |
[1] implementation may need to protect the data structure with a lock
[in] | node | the handle to the node being used to query the ROS graph |
[in] | allocator | allocator for allocating space for strings |
[in] | node_name | the node name of the actions to return |
[in] | node_namespace | the node namespace of the actions to return |
[out] | action_names_and_types | list of action names and their types |
RCL_RET_OK
if the query was successful, or RCL_RET_NODE_INVALID
if the node is invalid, or RCL_RET_INVALID_ARGUMENT
if any arguments are invalid, or RCL_RET_ERROR
if an unspecified error occurs. RCL_ACTION_PUBLIC rcl_ret_t rcl_action_get_names_and_types | ( | const rcl_node_t * | node, |
rcl_allocator_t * | allocator, | ||
rcl_names_and_types_t * | action_names_and_types | ||
) |
Return a list of action names and their types.
This function returns a list of action names and types in the ROS graph.
The node
parameter must point to a valid node.
The action_names_and_types
parameter must be allocated and zero initialized. This function allocates memory for the returned list of names and types and so it is the callers responsibility to pass action_names_and_types
to rcl_names_and_types_fini() when it is no longer needed. Failing to do so will result in leaked memory.
The returned names are not automatically remapped by this function. Attempting to create action clients or action servers with names returned by this function may not result in the desired action name depending on the remap rules in use.
Attribute | Adherence |
---|---|
Allocates Memory | Yes |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Maybe [1] |
[1] implementation may need to protect the data structure with a lock
[in] | node | the handle to the node being used to query the ROS graph |
[in] | allocator | allocator for allocating space for strings |
[out] | action_names_and_types | list of action names and types |
RCL_RET_OK
if the query was successful, or RCL_RET_NODE_INVALID
if the node is invalid, or RCL_RET_INVALID_ARGUMENT
if any arguments are invalid, or RCL_RET_ERROR
if an unspecified error occurs.