Class GraphCache
Defined in File graph_cache.hpp
Class Documentation
-
class GraphCache
=============================================================================
Public Types
-
using GraphCacheEventCallback = std::function<void(int32_t change)>
Signature for a function that will be invoked by the GraphCache when a QoS event is detected.
Public Functions
-
explicit GraphCache(const zenoh::Id &zid)
Constructor.
- Parameters:
id – The id of the zenoh session that is building the graph cache. This is used to infer which entities originated from the current session so that appropriate event callbacks may be triggered.
-
void parse_put(const std::string &keyexpr, bool ignore_from_current_session = false)
-
void parse_del(const std::string &keyexpr, bool ignore_from_current_session = false)
-
rmw_ret_t get_node_names(rcutils_string_array_t *node_names, rcutils_string_array_t *node_namespaces, rcutils_string_array_t *enclaves, rcutils_allocator_t *allocator) const
-
rmw_ret_t get_topic_names_and_types(rcutils_allocator_t *allocator, bool no_demangle, rmw_names_and_types_t *topic_names_and_types) const
-
rmw_ret_t publisher_count_matched_subscriptions(const liveliness::TopicInfo &pub_topic_info, size_t *subscription_count)
-
rmw_ret_t subscription_count_matched_publishers(const liveliness::TopicInfo &sub_topic_info, size_t *publisher_count)
-
rmw_ret_t get_service_names_and_types(rcutils_allocator_t *allocator, rmw_names_and_types_t *service_names_and_types) const
-
rmw_ret_t count_publishers(const char *topic_name, size_t *count) const
-
rmw_ret_t count_subscriptions(const char *topic_name, size_t *count) const
-
rmw_ret_t count_services(const char *service_name, size_t *count) const
-
rmw_ret_t count_clients(const char *service_name, size_t *count) const
-
rmw_ret_t get_entity_names_and_types_by_node(liveliness::EntityType entity_type, rcutils_allocator_t *allocator, const char *node_name, const char *node_namespace, bool no_demangle, rmw_names_and_types_t *names_and_types) const
-
rmw_ret_t get_entities_info_by_topic(liveliness::EntityType entity_type, rcutils_allocator_t *allocator, const char *topic_name, bool no_demangle, rmw_topic_endpoint_info_array_t *endpoints_info) const
-
rmw_ret_t service_server_is_available(const liveliness::TopicInfo &client_topic_info, bool *is_available) const
-
void set_qos_event_callback(std::size_t entity_gid_hash, const rmw_zenoh_event_type_t &event_type, GraphCacheEventCallback callback)
Set a qos event callback for an entity from the current session.
Note
The callback will be removed when the entity is removed from the graph.
-
void remove_qos_event_callbacks(std::size_t entity_gid_hash)
Remove all qos event callbacks for an entity.
-
using GraphCacheEventCallback = std::function<void(int32_t change)>