Function rcl_action_count_clients
Defined in File graph.h
Function Documentation
-
rcl_ret_t rcl_action_count_clients(const rcl_node_t *node, const char *action_name, size_t *count)
Return the number of action clients for a given action name.
The
nodeparameter must point to a valid node.The
action_nameparameter must not beNULL.The
countparameter must not beNULL. Thecountparameter is the output for this function and will be set.This function counts the number of action clients for the given action name across all nodes known in the ROS graph.
The action name is not automatically remapped by this function. If there is a client created with action name
fooand remap rulefoo:=barthen calling this withaction_nameset tobarwill return a count of 1, and withaction_nameset tofoowill return a count of 0.
[1] implementation may need to protect the data structure with a lockAttribute
Adherence
Allocates Memory
Yes
Thread-Safe
No
Uses Atomics
No
Lock-Free
Maybe [1]
- Parameters:
node – [in] the handle to the node being used to query the ROS graph
action_name – [in] the name of the action in question
count – [out] number of action clients for the given action
- Returns:
RCL_RET_OKif the query was successful, or- Returns:
RCL_RET_NODE_INVALIDif the node is invalid, or- Returns:
RCL_RET_INVALID_ARGUMENTif any arguments are invalid, or- Returns:
RCL_RET_ERRORif an unspecified error occurs.