22 #include "ready_entity.hpp"
23 #include "scheduler.hpp"
24 #include "global_event_id_provider.hpp"
30 namespace cbg_executor
36 : CallbackGroupHandle(scheduler) {}
38 std::function<void(
size_t)> get_ready_callback_for_entity(
39 const rclcpp::SubscriptionBase::WeakPtr & entity)
final;
40 std::function<void(std::function<
void()> executed_callback)> get_ready_callback_for_entity(
41 const rclcpp::TimerBase::WeakPtr & entity)
final;
42 std::function<void(
size_t)> get_ready_callback_for_entity(
43 const rclcpp::ClientBase::WeakPtr & entity)
final;
44 std::function<void(
size_t)> get_ready_callback_for_entity(
45 const rclcpp::ServiceBase::WeakPtr & entity)
final;
46 std::function<void(
size_t,
47 int)> get_ready_callback_for_entity(
const rclcpp::Waitable::WeakPtr & entity)
final;
48 std::function<void(
size_t)> get_ready_callback_for_entity(
51 std::optional<CBGScheduler::ExecutableEntity> get_next_ready_entity();
52 std::optional<CBGScheduler::ExecutableEntity> get_next_ready_entity(
53 GlobalEventIdProvider::MonotonicId max_id);
57 return !ready_entities.empty();
61 std::deque<ReadyEntity> ready_entities;
71 GlobalEventIdProvider::MonotonicId max_id)
final;
74 std::unique_ptr<CallbackGroupHandle> get_handle_for_callback_group(
75 const rclcpp::CallbackGroup::SharedPtr & callback_group)
final;
77 std::vector<std::unique_ptr<FirstInFirstOutCallbackGroupHandle>> callback_group_handles;
CBGScheduler(std::function< void()> sync_function)
Versions of rosidl_typesupport_cpp::get_message_type_support_handle that handle adapted types.
bool has_ready_entities() const final