Function rmw_node_get_graph_guard_condition
Defined in File rmw.h
Function Documentation
-
const rmw_guard_condition_t *rmw_node_get_graph_guard_condition(const rmw_node_t *node)
Return a guard condition which is triggered when the ROS graph changes.
The guard condition will be triggered anytime a change to the ROS graph occurs. A ROS graph change occurs whenever:
A node joins or leaves the ROS graph. This change will be reflected in rmw_get_node_names() and rmw_get_node_names_with_enclaves() outcome.
A topic subscription joins or leaves the ROS graph. This change will be reflected in rmw_get_topic_names_and_types(), rmw_get_subscriber_names_and_types_by_node(), and rmw_get_subscriptions_info_by_topic() outcome.
A topic publisher joins or leaves the ROS graph. This change will be reflected in rmw_get_topic_names_and_types(), rmw_get_publisher_names_and_types_by_node(), and rmw_get_publishers_info_by_topic() outcome.
A topic subscription matches a topic publisher with compatible QoS policies. This change will be reflected in rmw_subscription_count_matched_publishers() outcome.
A topic publisher matches a topic subscription with compatible QoS policies. This change will be reflected in rmw_publisher_count_matched_subscriptions() outcome.
A service server joins or leaves the ROS graph. This change will be reflected in rmw_get_service_names_and_types() and rmw_get_service_names_and_types_by_node() outcome.
A service client joins or leaves the ROS graph. This change will be reflected in rmw_get_service_names_and_types() and rmw_get_client_names_and_types_by_node() outcome.
A service client matches a service server with compatible QoS policies. This change will be reflected in rmw_service_server_is_available() outcome.
The guard condition is owned and internally held by the
node
. It will be invalidated ifnode
is finalized using rmw_destroy_node(). It is undefined behavior to use an invalidated guard condition.Attribute
Adherence
Allocates Memory
No
Thread-Safe
Yes
Uses Atomics
No
Lock-Free
Yes
Note
The state of the ROS graph, and any changes that may take place, are reported as seen by the associated
node
.- Parameters:
node – [in] Node to retrieve the guard condition from.
- Pre:
Given
node
must be a valid node handle, as returned by rmw_create_node().- Returns:
Guard condition if successful, or
NULL
ifnode
isNULL
, or an unspecified error occurs.