Function rcl_node_get_rmw_handle

Function Documentation

rmw_node_t *rcl_node_get_rmw_handle(const rcl_node_t *node)

Return the rmw node handle.

The handle returned is a pointer to the internally held rmw handle. This function can fail, and therefore return NULL, if:

  • node is NULL

  • node has not been initialized (the implementation is invalid)

The returned handle is made invalid if the node is finalized or if rcl_shutdown() is called. The returned handle is not guaranteed to be valid for the life time of the node as it may be finalized and recreated itself. Therefore it is recommended to get the handle from the node 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:

node[in] pointer to the rcl node

Returns:

rmw node handle if successful, otherwise NULL