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_ARGUMENT
orRMW_RET_INCORRECT_RMW_IMPLEMENTATION
, ensues, leaving the given service server unchanged. Otherwise, it will proceed despite errors.Attribute
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
node
must be the one the service server was registered with.- Pre:
Given
service
must be a valid service server, as returned by rmw_create_service().- Returns:
RMW_RET_OK
if successful, or- Returns:
RMW_RET_INVALID_ARGUMENT
ifnode
isNULL
, or- Returns:
RMW_RET_INVALID_ARGUMENT
ifservice
isNULL
, or- Returns:
RMW_RET_INCORRECT_RMW_IMPLEMENTATION
if thenode
implementation identifier does not match this implementation, or- Returns:
RMW_RET_INCORRECT_RMW_IMPLEMENTATION
if theservice
implementation identifier does not match this implementation, or- Returns:
RMW_RET_ERROR
if an unspecified error occurs.