Skip to content

Commit eb37093

Browse files
sloretzBlast545
authored andcommitted
Doc rcl_pub/etc_fini() must come before rcl_node_fini() (#625)
Signed-off-by: Shane Loretz <[email protected]> Signed-off-by: Jorge Perez <[email protected]>
1 parent 2183ad5 commit eb37093

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

rcl/include/rcl/client.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ rcl_client_init(
174174
* Lock-Free | Yes
175175
*
176176
* \param[inout] client handle to the client to be finalized
177-
* \param[in] node handle to the node used to create the client
177+
* \param[in] node a valid (not finalized) handle to the node used to create the client
178178
* \return `RCL_RET_OK` if client was finalized successfully, or
179179
* \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or
180180
* \return `RCL_RET_NODE_INVALID` if the node is invalid, or

rcl/include/rcl/node.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,13 @@ rcl_node_init(
153153
* Destroys any automatically created infrastructure and deallocates memory.
154154
* After calling, the rcl_node_t can be safely deallocated.
155155
*
156-
* Any middleware primitives created by the user, e.g. publishers, services, etc.,
157-
* are invalid after deinitialization.
156+
* All middleware primitives created by the user, e.g. publishers, services, etc,
157+
* which were created from this node must be finalized using their respective
158+
* `rcl_*_fini()` functions before this is called.
159+
* \sa rcl_publisher_fini()
160+
* \sa rcl_subscription_fini()
161+
* \sa rcl_client_fini()
162+
* \sa rcl_service_fini()
158163
*
159164
* <hr>
160165
* Attribute | Adherence

rcl/include/rcl/publisher.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ rcl_publisher_init(
172172
* Lock-Free | Yes
173173
*
174174
* \param[inout] publisher handle to the publisher to be finalized
175-
* \param[in] node handle to the node used to create the publisher
175+
* \param[in] node a valid (not finalized) handle to the node used to create the publisher
176176
* \return `RCL_RET_OK` if publisher was finalized successfully, or
177177
* \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or
178178
* \return `RCL_RET_PUBLISHER_INVALID` if the publisher is invalid, or

rcl/include/rcl/service.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ rcl_service_init(
173173
* Lock-Free | Yes
174174
*
175175
* \param[inout] service handle to the service to be deinitialized
176-
* \param[in] node handle to the node used to create the service
176+
* \param[in] node a valid (not finalized) handle to the node used to create the service
177177
* \return `RCL_RET_OK` if service was deinitialized successfully, or
178178
* \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or
179179
* \return `RCL_RET_SERVICE_INVALID` if the service is invalid, or

rcl/include/rcl/subscription.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ rcl_subscription_init(
175175
* Lock-Free | Yes
176176
*
177177
* \param[inout] subscription handle to the subscription to be deinitialized
178-
* \param[in] node handle to the node used to create the subscription
178+
* \param[in] node a valid (not finalized) handle to the node used to create the subscription
179179
* \return `RCL_RET_OK` if subscription was deinitialized successfully, or
180180
* \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or
181181
* \return `RCL_RET_SUBSCRIPTION_INVALID` if the subscription is invalid, or

0 commit comments

Comments
 (0)