ROS 2 rclcpp + rcl - jazzy  jazzy
ROS 2 C++ Client Library with ROS Client Library
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
rclcpp::executors::cbg_executor::CBGScheduler::CallbackGroupHandle Struct Referenceabstract
Inheritance diagram for rclcpp::executors::cbg_executor::CBGScheduler::CallbackGroupHandle:
Inheritance graph
[legend]
Collaboration diagram for rclcpp::executors::cbg_executor::CBGScheduler::CallbackGroupHandle:
Collaboration graph
[legend]

Public Member Functions

 CallbackGroupHandle (CBGScheduler &scheduler)
 
 CallbackGroupHandle (const CallbackGroupHandle &)=delete
 
 CallbackGroupHandle (CallbackGroupHandle &&)=delete
 
CallbackGroupHandleoperator= (const CallbackGroupHandle &)=delete
 
CallbackGroupHandleoperator= (CallbackGroupHandle &&)=delete
 
virtual std::function< void(size_t)> get_ready_callback_for_entity (const rclcpp::SubscriptionBase::WeakPtr &entity)=0
 
virtual std::function< void(std::function< void()> executed_callback)> get_ready_callback_for_entity (const rclcpp::TimerBase::WeakPtr &entity)=0
 
virtual std::function< void(size_t)> get_ready_callback_for_entity (const rclcpp::ClientBase::WeakPtr &entity)=0
 
virtual std::function< void(size_t)> get_ready_callback_for_entity (const rclcpp::ServiceBase::WeakPtr &entity)=0
 
virtual std::function< void(size_t, int)> get_ready_callback_for_entity (const rclcpp::Waitable::WeakPtr &entity)=0
 
virtual std::function< void(size_t)> get_ready_callback_for_entity (const CallbackEventType &entity)=0
 
void mark_as_executed ()
 
bool is_ready ()
 

Protected Member Functions

virtual bool has_ready_entities () const =0
 
template<typename add_fun >
void add_ready_entity (const add_fun &fun)
 
void mark_as_skipped ()
 
void mark_as_executing ()
 

Protected Attributes

CBGSchedulerscheduler
 
std::mutex ready_mutex
 

Detailed Description

Definition at line 60 of file scheduler.hpp.

Member Function Documentation

◆ add_ready_entity()

template<typename add_fun >
void rclcpp::executors::cbg_executor::CBGScheduler::CallbackGroupHandle::add_ready_entity ( const add_fun &  fun)
inlineprotected

Executes the given function to add an entity under the ready mutex. Afterwards the function checks if the scheduler needs to be informed that the callback group got ready and informs it if needed.

Definition at line 122 of file scheduler.hpp.

References rclcpp::executors::cbg_executor::CBGScheduler::callback_group_ready().

Here is the call graph for this function:

◆ has_ready_entities()

virtual bool rclcpp::executors::cbg_executor::CBGScheduler::CallbackGroupHandle::has_ready_entities ( ) const
protectedpure virtual

Will always be called under lock of ready_mutex

Implemented in rclcpp::executors::cbg_executor::FirstInFirstOutCallbackGroupHandle.

Referenced by mark_as_executed().

Here is the caller graph for this function:

◆ mark_as_executed()

void rclcpp::executors::cbg_executor::CBGScheduler::CallbackGroupHandle::mark_as_executed ( )
inline

Marks the last removed ready entity as executed.

Definition at line 89 of file scheduler.hpp.

References rclcpp::executors::cbg_executor::CBGScheduler::callback_group_ready(), and has_ready_entities().

Referenced by rclcpp::executors::cbg_executor::CBGScheduler::mark_entity_as_executed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mark_as_executing()

void rclcpp::executors::cbg_executor::CBGScheduler::CallbackGroupHandle::mark_as_executing ( )
inlineprotected

Must be called by derived classes if a ready entity is returned. This call must happen under a lock holding the ready_mutex.

Definition at line 154 of file scheduler.hpp.


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