Function rcl_service_server_is_available
Defined in File graph.h
Function Documentation
-
rcl_ret_t rcl_service_server_is_available(const rcl_node_t *node, const rcl_client_t *client, bool *is_available)
Check if a service server is available for the given service client.
This function will return true for
is_available
if there is a service server available for the given client.The
node
parameter must point to a valid node.The
client
parameter must point to a valid client.The given client and node must match, i.e. the client must have been created using the given node.
The
is_available
parameter must not beNULL
, and must point a bool variable. The result of the check will be stored in theis_available
parameter.In the event that error handling needs to allocate memory, this function will try to use the node’s allocator.
Attribute
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
client – [in] the handle to the service client being queried
is_available – [out] set to true if there is a service server available, else false
- Returns:
RCL_RET_OK if the check was made successfully (regardless of the service readiness), or
- Returns:
RCL_RET_NODE_INVALID if the node is invalid, or
- Returns:
RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or
- Returns:
RCL_RET_ERROR if an unspecified error occurs.