Function rcl_node_get_rcl_instance_id

Function Documentation

uint64_t rcl_node_get_rcl_instance_id(const rcl_node_t *node)

Return the associated rcl instance id.

This id is stored when rcl_node_init is called and can be compared with the value returned by rcl_get_instance_id() to check if this node was created in the current rcl context (since the latest call to rcl_init().

This function can fail, and therefore return 0, if:

  • node is NULL

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

This function will succeed even if rcl_shutdown() has been called since the node was created.

Attribute

Adherence

Allocates Memory

No

Thread-Safe

No

Uses Atomics

No

Lock-Free

Yes

Parameters:

node[in] pointer to the rcl node

Returns:

rcl instance id captured during node init or 0 on error