ROS 2 rclcpp + rcl - kilted  kilted
ROS 2 C++ Client Library with ROS Client Library
Public Types | Public Member Functions | Public Attributes | List of all members
rclcpp::executors::ExecutorEntitiesCollection Struct Reference

Represent the total set of entities for a single executor. More...

#include <rclcpp/executors/executor_entities_collection.hpp>

Collaboration diagram for rclcpp::executors::ExecutorEntitiesCollection:
Collaboration graph
[legend]

Public Types

using TimerCollection = EntityCollection< rcl_timer_t, rclcpp::TimerBase >
 Collection type for timer entities.
 
using SubscriptionCollection = EntityCollection< rcl_subscription_t, rclcpp::SubscriptionBase >
 Collection type for subscription entities.
 
using ClientCollection = EntityCollection< rcl_client_t, rclcpp::ClientBase >
 Collection type for client entities.
 
using ServiceCollection = EntityCollection< rcl_service_t, rclcpp::ServiceBase >
 Collection type for service entities.
 
using WaitableCollection = EntityCollection< rclcpp::Waitable, rclcpp::Waitable >
 Collection type for waitable entities.
 
using GuardConditionCollection = EntityCollection< rcl_guard_condition_t, rclcpp::GuardCondition >
 Collection type for guard condition entities.
 

Public Member Functions

bool empty () const
 Check if the entities collection is empty. More...
 
void clear ()
 Clear the entities collection.
 
size_t remove_expired_entities ()
 Remove entities that have expired weak ownership. More...
 

Public Attributes

TimerCollection timers
 Collection of timers currently in use by the executor.
 
SubscriptionCollection subscriptions
 Collection of subscriptions currently in use by the executor.
 
ClientCollection clients
 Collection of clients currently in use by the executor.
 
ServiceCollection services
 Collection of services currently in use by the executor.
 
GuardConditionCollection guard_conditions
 Collection of guard conditions currently in use by the executor.
 
WaitableCollection waitables
 Collection of waitables currently in use by the executor.
 

Detailed Description

Represent the total set of entities for a single executor.

This allows the entities to be stored from ExecutorEntitiesCollector. The structure also makes in convenient to re-evaluate when entities have been added or removed.

Definition at line 135 of file executor_entities_collection.hpp.

Member Function Documentation

◆ empty()

bool rclcpp::executors::ExecutorEntitiesCollection::empty ( ) const

Check if the entities collection is empty.

Returns
true if all member collections are empty, false otherwise

Definition at line 21 of file executor_entities_collection.cpp.

References clients, guard_conditions, services, subscriptions, timers, and waitables.

◆ remove_expired_entities()

size_t rclcpp::executors::ExecutorEntitiesCollection::remove_expired_entities ( )

Remove entities that have expired weak ownership.

Returns
The total number of removed entities

Definition at line 42 of file executor_entities_collection.cpp.

References clients, guard_conditions, services, subscriptions, timers, and waitables.


The documentation for this struct was generated from the following files: