17 #include "rclcpp/experimental/executable_list.hpp"
21 ExecutableList::ExecutableList()
22 : number_of_subscriptions(0),
24 number_of_services(0),
26 number_of_waitables(0)
29 ExecutableList::~ExecutableList()
33 ExecutableList::clear()
36 this->number_of_timers = 0;
38 this->subscription.clear();
39 this->number_of_subscriptions = 0;
41 this->service.clear();
42 this->number_of_services = 0;
45 this->number_of_clients = 0;
47 this->waitable.clear();
48 this->number_of_waitables = 0;
52 ExecutableList::add_subscription(rclcpp::SubscriptionBase::SharedPtr subscription)
54 this->subscription.push_back(std::move(subscription));
55 this->number_of_subscriptions++;
59 ExecutableList::add_timer(rclcpp::TimerBase::SharedPtr timer)
61 this->timer.push_back(std::move(timer));
62 this->number_of_timers++;
66 ExecutableList::add_service(rclcpp::ServiceBase::SharedPtr service)
68 this->service.push_back(std::move(service));
69 this->number_of_services++;
73 ExecutableList::add_client(rclcpp::ClientBase::SharedPtr client)
75 this->client.push_back(std::move(client));
76 this->number_of_clients++;
80 ExecutableList::add_waitable(rclcpp::Waitable::SharedPtr waitable)
82 this->waitable.push_back(std::move(waitable));
83 this->number_of_waitables++;
This class contains subscriptionbase, timerbase, etc. which can be used to run callbacks.