Function rmw_service_endpoint_info_set_service_type_hash
Defined in File service_endpoint_info.h
Function Documentation
-
rmw_ret_t rmw_service_endpoint_info_set_service_type_hash(rmw_service_endpoint_info_t *service_endpoint_info, const rosidl_type_hash_t *type_hash)
Set the service type hash in the given service endpoint info data structure.
Assigns the value of the
service_type_hashargument to the data structure’sservice_type_hashmember.Attribute
Adherence
Allocates Memory
No
Thread-Safe
No
Uses Atomics
No
Lock-Free
Yes
Remark
This function sets the RMW error state on failure.
- Thread-safety
Setting a member is a reentrant procedure, but:
Access to the service endpoint info data structure is not synchronized. It is not safe to read or write the
service_type_hashmember of the givenservice_endpointwhile setting it. Concurrentservice_type_hashreads are safe, but concurrent reads and writes are not.
- Parameters:
service_endpoint_info – [inout] Data structure to be populated.
type_hash – [in] Service type hash to be copied.
- Returns:
RMW_RET_OKif successful, or- Returns:
RMW_RET_INVALID_ARGUMENTifservice_endpoint_infois NULL, or- Returns:
RMW_RET_INVALID_ARGUMENTifservice_type_hashis NULL, or- Returns:
RMW_RET_ERRORwhen an unspecified error occurs.