Function rmw_destroy_service
Defined in File rmw.h
Function Documentation
-
rmw_ret_t rmw_destroy_service(rmw_node_t *node, rmw_service_t *service)
Destroy and unregister a service server from its node.
This function will reclaim all associated resources, including the service server itself. Use of a destroyed service server is undefined behavior. This function will return early if a logical error, such as
RMW_RET_INVALID_ARGUMENTorRMW_RET_INCORRECT_RMW_IMPLEMENTATION, ensues, leaving the given service server unchanged. Otherwise, it will proceed despite errors.
[1] rmw implementation defined, check the implementation documentationAttribute
Adherence
Allocates Memory
No
Thread-Safe
No
Uses Atomics
Maybe [1]
Lock-Free
Maybe [1]
- Parameters:
node – [in] Node with which the given service server is registered.
service – [in] Service server to be destroyed.
- Pre:
Given
nodemust be the one the service server was registered with.- Pre:
Given
servicemust be a valid service server, as returned by rmw_create_service().- Returns:
RMW_RET_OKif successful, or- Returns:
RMW_RET_INVALID_ARGUMENTifnodeisNULL, or- Returns:
RMW_RET_INVALID_ARGUMENTifserviceisNULL, or- Returns:
RMW_RET_INCORRECT_RMW_IMPLEMENTATIONif thenodeimplementation identifier does not match this implementation, or- Returns:
RMW_RET_INCORRECT_RMW_IMPLEMENTATIONif theserviceimplementation identifier does not match this implementation, or- Returns:
RMW_RET_ERRORif an unspecified error occurs.