Function rcl_service_fini

Function Documentation

rcl_ret_t rcl_service_fini(rcl_service_t *service, rcl_node_t *node)

Finalize a rcl_service_t.

After calling, the node will no longer listen for requests for this service. (assuming this is the only service of this type in this node).

After calling, calls to rcl_wait(), rcl_take_request(), and rcl_send_response() will fail when using this service. Additionally rcl_wait() will be interrupted if currently blocking. However, the given node handle is still valid.

Attribute

Adherence

Allocates Memory

Yes

Thread-Safe

No

Uses Atomics

No

Lock-Free

Yes

Parameters:
  • service[inout] handle to the service to be deinitialized

  • node[in] a valid (not finalized) handle to the node used to create the service

Returns:

RCL_RET_OK if service was deinitialized successfully, or

Returns:

RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or

Returns:

RCL_RET_SERVICE_INVALID if the service is invalid, or

Returns:

RCL_RET_NODE_INVALID if the node is invalid, or

Returns:

RCL_RET_ERROR if an unspecified error occurs.