Function rmw_service_endpoint_info_set_gids
Defined in File service_endpoint_info.h
Function Documentation
-
rmw_ret_t rmw_service_endpoint_info_set_gids(rmw_service_endpoint_info_t *service_endpoint_info, const uint8_t *gids, size_t endpoint_count, size_t size, rcutils_allocator_t *allocator)
Set the endpoint gids in the given service endpoint info data structure.
Copies the value of the
gidsargument to the data structure’sendpoint_gidsmember.Attribute
Adherence
Allocates Memory
Yes
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
gidmember of the givenservice_endpointwhile setting it.
- Parameters:
service_endpoint_info – [inout] Data structure to be populated.
gids – [in] Pointer to a buffer containing endpoint GIDs to set.
endpoint_count – [in] Number of endpoints used to construct the service.
size – [in] Size in bytes of each individual
gid.allocator – [in] Allocator to be used.
- Returns:
RMW_RET_OKif successful, or- Returns:
RMW_RET_INVALID_ARGUMENTifservice_endpoint_infois NULL, or- Returns:
RMW_RET_INVALID_ARGUMENTifgidsis NULL, or- Returns:
RMW_RET_INVALID_ARGUMENTif ‘endpoint_count’ is not 1 or 2, or- Returns:
RMW_RET_INVALID_ARGUMENTifsizeis greater than RMW_GID_STORAGE_SIZE, or- Returns:
RMW_RET_INVALID_ARGUMENTifallocatoris NULL, or- Returns:
RMW_RET_BAD_ALLOCif memory allocation fails, or- Returns:
RMW_RET_ERRORwhen an unspecified error occurs.