Fawkes API Fawkes Development Version
|
Abstract class to execute a Golog++ activity. More...
Public Member Functions | |
ActionExecutor (Logger *logger) | |
Constructor of an abstract executor. More... | |
virtual void | start (std::shared_ptr< gologpp::Activity > activity)=0 |
Start the given activity. More... | |
virtual void | stop (std::shared_ptr< gologpp::Grounding< gologpp::Action > > activity)=0 |
Stop the given activity. More... | |
virtual bool | can_execute_activity (std::shared_ptr< gologpp::Activity > activity) const =0 |
Determine if this executor can execute the given activity. More... | |
Protected Attributes | |
std::shared_ptr< gologpp::Activity > | running_activity_ |
A pointer to the currently running activity. More... | |
Logger * | logger_ |
The logger to use for logging messages. More... | |
Abstract class to execute a Golog++ activity.
Any implementation is expected to give feedback about the execution by directly calling the activity's update function.
Definition at line 34 of file action_executor.h.
fawkes::gpp::ActionExecutor::ActionExecutor | ( | fawkes::Logger * | logger | ) |
Constructor of an abstract executor.
logger | The logger to use |
Definition at line 58 of file action_executor.cpp.
|
pure virtual |
Determine if this executor can execute the given activity.
activity | The activity to execute. |
Implemented in fawkes::gpp::BBMessageActionExecutor, fawkes::gpp::PrintActionExecutor, fawkes::gpp::RemoteSkillerActionExecutor, fawkes::gpp::SkillerActionExecutor, and fawkes::gpp::SleepActionExecutor.
|
pure virtual |
Start the given activity.
activity | The activity to execute. |
Implemented in fawkes::gpp::BBMessageActionExecutor, fawkes::gpp::PrintActionExecutor, fawkes::gpp::SkillerActionExecutor, and fawkes::gpp::SleepActionExecutor.
|
pure virtual |
Stop the given activity.
The executor is expected to keep track of the currently executed activity. Only stop the activity if the executor is actually executing it. If the given activity is not executed by this executor, do nothing.
activity | The activity to stop. |
Implemented in fawkes::gpp::BBMessageActionExecutor, fawkes::gpp::PrintActionExecutor, fawkes::gpp::SkillerActionExecutor, and fawkes::gpp::SleepActionExecutor.
|
protected |
The logger to use for logging messages.
Definition at line 44 of file action_executor.h.
Referenced by fawkes::gpp::SkillerActionExecutor::SkillerActionExecutor(), fawkes::gpp::BBMessageActionExecutor::start(), fawkes::gpp::PrintActionExecutor::start(), fawkes::gpp::SkillerActionExecutor::start(), fawkes::gpp::BBMessageActionExecutor::stop(), and fawkes::gpp::PrintActionExecutor::stop().
|
protected |
A pointer to the currently running activity.
Definition at line 43 of file action_executor.h.
Referenced by fawkes::gpp::SkillerActionExecutor::start(), and fawkes::gpp::SkillerActionExecutor::stop().