Function rmw_topic_endpoint_info_set_topic_type_hash
Defined in File topic_endpoint_info.h
Function Documentation
-
rmw_ret_t rmw_topic_endpoint_info_set_topic_type_hash(rmw_topic_endpoint_info_t *topic_endpoint_info, const rosidl_type_hash_t *type_hash)
Set the topic type hash in the given topic endpoint info data structure.
Assigns the value of the
topic_type_hash
argument to the data structure’stopic_type_hash
member.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 topic endpoint info data structure is not synchronized. It is not safe to read or write the
topic_type_hash
member of the giventopic_endpoint
while setting it. Concurrenttopic_type_hash
reads are safe, but concurrent reads and writes are not.
- Parameters:
topic_endpoint_info – [inout] Data structure to be populated.
topic_type_hash – [in] Topic type hash to be copied.
- Returns:
RMW_RET_OK
if successful, or- Returns:
RMW_RET_INVALID_ARGUMENT
iftopic_endpoint_info
is NULL, or- Returns:
RMW_RET_INVALID_ARGUMENT
iftopic_type_hash
is NULL, or- Returns:
RMW_RET_ERROR
when an unspecified error occurs.