Function rmw_create_client
Defined in File rmw.h
Function Documentation
-
rmw_client_t *rmw_create_client(const rmw_node_t *node, const rosidl_service_type_support_t *type_support, const char *service_name, const rmw_qos_profile_t *qos_policies)
Create a service client that can send requests to and receive replies from a service server.
This function can fail, and therefore return
NULL, if:nodeisNULL, ornodedoes not belong to this implementation i.e. it does not have a matching implementation identifier, ortype_supportisNULL, orservice_nameisNULL, orservice_nameis an empty string, or(if ROS namespace conventions apply)
service_nameis invalid by rmw_validate_full_topic_name() definition, orqos_profileisNULL, orqos_profilehas invalid or unknown policies, ormemory allocation fails during service client creation, or
an unspecified error occurs.
[1] rmw implementation defined, check the implementation documentationAttribute
Adherence
Allocates Memory
Yes
Thread-Safe
No
Uses Atomics
Maybe [1]
Lock-Free
Maybe [1]
- Parameters:
node – [in] Node with which to register this service client.
type_support – [in] Type support of the service to be used.
service_name – [in] Name of the service to be used, often a fully qualified service name unless
qos_profileis configured to avoid ROS namespace conventions i.e. to create a native service client.qos_policies – [in] QoS policies for this service client’s connections.
- Pre:
Given
nodemust be a valid node, as returned by rmw_create_node().- Pre:
Given
type_supportmust be a validrosidlservice type support, as returned by ROSIDL_GET_SRV_TYPE_SUPPORT().- Returns:
rmw service client handle, or
NULLif there was an error.