Skip to content

Commit

Permalink
add comments for add/remove callback group
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Pena <[email protected]>
  • Loading branch information
peterpena committed Aug 4, 2020
1 parent 9962fd4 commit c68a82c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,29 @@ class StaticExecutorEntitiesCollector final
size_t
get_number_of_ready_guard_conditions() override;

/// Add a callback group to an executor.
/**
* Add callback group to `weak_groups_to_nodes` and `weak_nodes_to_guard_conditions`.
* 'allow_executor_to_add' is set to false so it is not added by another executor.
* \param[in] group_ptr a shared ptr that points to a callback group
* \param[in] node_ptr a shared pointer that points to a node base interface
* the executor is blocked at the rmw layer while waiting for work and it is notified that a new
* callback group was added, it will wake up.
*/
RCLCPP_PUBLIC
void
add_callback_group(
rclcpp::CallbackGroup::SharedPtr group_ptr,
rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr);

/// Remove callback group from the executor
/**
* Remove callback group from `weak_groups_to_nodes` and `weak_nodes_to_guard_conditions`.
* \param[in] group_ptr a shared ptr that points to a callback group
* \param[in] notify True to trigger the interrupt guard condition during this function. If
* the executor is blocked at the rmw layer while waiting for work and it is notified that a new
* callback group was added, it will wake up.
*/
RCLCPP_PUBLIC
bool
remove_callback_group(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class StaticSingleThreadedExecutor : public rclcpp::Executor
/// Add a callback group to an executor.
/**
* If the callback group or node has been associated to an executor, throw
* an exception. Otherwise, add to the `entities_collector`
* an exception. Otherwise, add to `entities_collector`
* \param[in] group_ptr a shared ptr that points to a callback group
* \param[in] node_ptr a shared pointer that points to a node base interface
* \param[in] notify True to trigger the interrupt guard condition during this function. If
Expand Down

0 comments on commit c68a82c

Please sign in to comment.