Struct ExecutorEntitiesCollection

Struct Documentation

struct ExecutorEntitiesCollection

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.

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 Functions

bool empty() const

Check if the entities collection is empty.

Returns:

true if all member collections are empty, false otherwise

void clear()

Clear the entities collection.

size_t remove_expired_entities()

Remove entities that have expired weak ownership.

Returns:

The total number of removed entities

Public Members

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.