Function rcl_node_get_namespace

Function Documentation

const char *rcl_node_get_namespace(const rcl_node_t *node)

Return the namespace of the node.

This function returns the node’s internal namespace string. This function can fail, and therefore return NULL, if:

  • node is NULL

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

The returned string is only valid as long as the given rcl_node_t is valid. The value of the string may change if the value in the rcl_node_t changes, and therefore copying the string is recommended if this is a concern.

Attribute

Adherence

Allocates Memory

No

Thread-Safe

No

Uses Atomics

No

Lock-Free

Yes

Parameters:

node[in] pointer to the node

Returns:

name string if successful, otherwise NULL