Function rcl_service_get_rmw_handle
Defined in File service.h
Function Documentation
-
rmw_service_t *rcl_service_get_rmw_handle(const rcl_service_t *service)
Return the rmw service handle.
The handle returned is a pointer to the internally held rmw handle. This function can fail, and therefore return
NULL
, if the:service is
NULL
service is invalid (never called init, called fini, or invalid)
The returned handle is made invalid if the service is finalized or if rcl_shutdown() is called. The returned handle is not guaranteed to be valid for the life time of the service as it may be finalized and recreated itself. Therefore it is recommended to get the handle from the service using this function each time it is needed and avoid use of the handle concurrently with functions that might change it.
Attribute
Adherence
Allocates Memory
No
Thread-Safe
No
Uses Atomics
No
Lock-Free
Yes
- Parameters:
service – [in] pointer to the rcl service
- Returns:
rmw service handle if successful, otherwise
NULL