Function rmw_topic_endpoint_info_set_gid
Defined in File topic_endpoint_info.h
Function Documentation
-
rmw_ret_t rmw_topic_endpoint_info_set_gid(rmw_topic_endpoint_info_t *topic_endpoint_info, const uint8_t *gid, size_t size)
Set the endpoint gid in the given topic endpoint info data structure.
Copies the value of the
gid
argument to the data structure’sendpoint_gid
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
gid
member of the giventopic_endpoint
while setting it.
- Parameters:
topic_endpoint_info – [inout] Data structure to be populated.
gid – [in] Endpoint gid to be set.
size – [in] Size of the given
gid
.
- Returns:
RMW_RET_OK
if successful, or- Returns:
RMW_RET_INVALID_ARGUMENT
iftopic_endpoint_info
is NULL, or- Returns:
RMW_RET_INVALID_ARGUMENT
ifgid
is NULL, or- Returns:
RMW_RET_INVALID_ARGUMENT
ifsize
is greater than RMW_GID_STORAGE_SIZE, or- Returns:
RMW_RET_ERROR
when an unspecified error occurs.