Function rcl_node_get_graph_guard_condition

Function Documentation

const rcl_guard_condition_t *rcl_node_get_graph_guard_condition(const rcl_node_t *node)

Return a guard condition which is triggered when the ROS graph changes.

The handle returned is a pointer to an internally held rcl guard condition. This function can fail, and therefore return NULL, if:

  • node is NULL

  • node is invalid

The returned handle is made invalid if the node is finialized or if rcl_shutdown() is called.

The guard condition will be triggered anytime a change to the ROS graph occurs. A ROS graph change includes things like (but not limited to) a new publisher advertises, a new subscription is created, a new service becomes available, a subscription is canceled, etc.

Todo:

TODO(wjwwood): link to exhaustive list of graph events

Attribute

Adherence

Allocates Memory

No

Thread-Safe

No

Uses Atomics

No

Lock-Free

Yes

Parameters:

node[in] pointer to the rcl node

Returns:

rcl guard condition handle if successful, otherwise NULL