Class AgnocastOnlyCallbackIsolatedExecutor

Inheritance Relationships

Base Type

Class Documentation

class AgnocastOnlyCallbackIsolatedExecutor : public agnocast::AgnocastOnlyExecutor

Callback-isolated executor for Stage 2 (Agnocast-only). Assigns a dedicated thread to each callback group. Used with agnocast::Node.

Public Functions

explicit AGNOCAST_PUBLIC AgnocastOnlyCallbackIsolatedExecutor(int next_exec_timeout_ms = 50)

Construct the executor.

Parameters:

next_exec_timeout_ms – Timeout in ms for waiting on the next executable.

~AgnocastOnlyCallbackIsolatedExecutor() override
virtual AGNOCAST_PUBLIC void spin () override

Block the calling thread and process Agnocast callbacks in a loop until cancel() is called.

virtual AGNOCAST_PUBLIC void cancel () override

Request the executor to stop spinning. Causes the current or next spin() call to return.

AGNOCAST_PUBLIC void add_node (const rclcpp::node_interfaces::NodeBaseInterface::SharedPtr &node_ptr, bool notify=false)

Add a node to this executor. Unlike the base class add_node(), this does NOT set the has_executor atomic flag on the node or its callback groups, because the CIE distributes callback groups to child executors which claim ownership individually.

Parameters:
  • node_ptrNode to add.

  • notify – If true, wake the executor so it picks up the change immediately.

AGNOCAST_PUBLIC void add_node (const agnocast::Node::SharedPtr &node_ptr, bool notify=false)

Add a node to this executor.

Parameters:
  • node_ptrNode to add.

  • notify – If true, wake the executor so it picks up the change immediately.