|
ROS 2 rclcpp + rcl - lyrical
lyrical
ROS 2 C++ Client Library with ROS Client Library
|

Classes | |
| struct | CallbackEventType |
| struct | CallbackGroupHandle |
| struct | ExecutableEntity |
| struct | ExecutableEntityWithInfo |
| struct | WaitableWithEventType |
Public Member Functions | |
| CBGScheduler (std::function< void()> sync_function) | |
| CBGScheduler (const CBGScheduler &)=delete | |
| CBGScheduler (CBGScheduler &&)=delete | |
| CBGScheduler & | operator= (const CBGScheduler &)=delete |
| CBGScheduler & | operator= (CBGScheduler &&)=delete |
| CallbackGroupHandle * | add_callback_group (const rclcpp::CallbackGroup::SharedPtr &callback_group) |
| void | remove_callback_group (const CallbackGroupHandle *callback_handle) |
| void | callback_group_ready (CallbackGroupHandle *handle, bool callback_group_was_idle) |
| ExecutableEntityWithInfo | get_next_ready_entity () |
| ExecutableEntityWithInfo | get_next_ready_entity (GlobalEventIdProvider::MonotonicId max_id) |
| virtual ExecutableEntityWithInfo | get_next_ready_entity_intern ()=0 |
| virtual ExecutableEntityWithInfo | get_next_ready_entity_intern (GlobalEventIdProvider::MonotonicId max_id)=0 |
| void | trigger_sync () |
| void | mark_entity_as_executed (const ExecutableEntity &e) |
| void | unblock_one_worker_thread () |
| void | block_worker_thread () |
| void | block_worker_thread_for (std::chrono::nanoseconds timeout) |
| void | release_all_worker_threads () |
Protected Member Functions | |
| virtual std::unique_ptr< CallbackGroupHandle > | get_handle_for_callback_group (const rclcpp::CallbackGroup::SharedPtr &callback_group)=0 |
Protected Attributes | |
| std::function< void()> | sync_function |
| bool | needs_sync = false |
| std::mutex | ready_callback_groups_mutex |
| std::deque< CallbackGroupHandle * > | ready_callback_groups |
| bool | release_workers = false |
| bool | release_worker_once = false |
| std::condition_variable | work_ready_conditional |
| std::list< std::unique_ptr< CallbackGroupHandle > > | callback_groups |
Definition at line 31 of file scheduler.hpp.
|
inlineexplicit |
| sync_function | A special purpose sync function, that shall be executed with high priority if triggered by trigger_sync(); |
Definition at line 194 of file scheduler.hpp.
|
inline |
Will be called, by CallbackGroupHandle if any entity in the cb group is ready for execution and the cb group was idle before
| callback_group_was_idle | Is false, if no entity of the callback group was executed, before this call was made. This means we need to wakeup a a new thread. |
Definition at line 231 of file scheduler.hpp.
References unblock_one_worker_thread().
Referenced by rclcpp::executors::cbg_executor::CBGScheduler::CallbackGroupHandle::add_ready_entity(), and rclcpp::executors::cbg_executor::CBGScheduler::CallbackGroupHandle::mark_as_executed().


|
inline |
Returns the next ready entity that shall be executed. If a entity is removed here, the scheduler may assume that it will be executed, and that the function mark_entity_as_executed will be called afterwards.
Definition at line 257 of file scheduler.hpp.
|
inline |
Must be called, after a entity was executed. This function will normally be used, to mark the associated callback group as ready again.
Definition at line 320 of file scheduler.hpp.
References rclcpp::executors::cbg_executor::CBGScheduler::CallbackGroupHandle::mark_as_executed().

|
inline |
If this function was triggered, a worker thread must be woken up, and the next call to get_next_ready_entity must return a ExecutableEntityWithInfo with the sync function in it.Or reworded if this function is triggered the sync function will be executed as the next exent by the executor.
Definition at line 300 of file scheduler.hpp.
References unblock_one_worker_thread().

|
inline |
Wakes up a worker thread
Definition at line 330 of file scheduler.hpp.
Referenced by callback_group_ready(), and trigger_sync().
