Fawkes API
Fawkes Development Version
|
An ActionExecutor that executes an activity using a Skiller on a remote. More...
Public Member Functions | |
RemoteSkillerActionExecutor (Logger *logger, const std::string &agent_name_key, const std::string &agent_name_value, const std::string &hostname, unsigned short int port, Configuration *config, const std::string &cfg_prefix) | |
Constructor. More... | |
bool | can_execute_activity (std::shared_ptr< gologpp::Activity > activity) const override |
Determine if this executor can execute the given activity. More... | |
![]() | |
SkillerActionExecutor (Logger *logger, BlackBoard *blackboard, Configuration *config, const std::string &cfg_prefix) | |
Constructor. More... | |
virtual | ~SkillerActionExecutor () override |
Destructor. More... | |
void | start (std::shared_ptr< gologpp::Activity > activity) override |
Start the given activity. More... | |
void | stop (std::shared_ptr< gologpp::Grounding< gologpp::Action >> activity) override |
Stop the activity if it is currently running. More... | |
bool | can_execute_activity (std::shared_ptr< gologpp::Activity > activity) const override |
Check if we can execute the given activity. More... | |
virtual void | bb_interface_data_refreshed (Interface *) noexcept override |
Update the status of the activity according to the Skiller status. More... | |
![]() | |
ActionExecutor (Logger *logger) | |
Constructor of an abstract executor. More... | |
![]() | |
BlackBoardInterfaceListener (const char *name_format,...) | |
Constructor. More... | |
virtual | ~BlackBoardInterfaceListener () |
Destructor. More... | |
const char * | bbil_name () const |
Get BBIL name. More... | |
virtual void | bb_interface_data_changed (Interface *interface) noexcept |
BlackBoard data changed notification. More... | |
virtual bool | bb_interface_message_received (Interface *interface, Message *message) noexcept |
BlackBoard message received notification. More... | |
virtual void | bb_interface_writer_added (Interface *interface, Uuid instance_serial) noexcept |
A writing instance has been opened for a watched interface. More... | |
virtual void | bb_interface_writer_removed (Interface *interface, Uuid instance_serial) noexcept |
A writing instance has been closed for a watched interface. More... | |
virtual void | bb_interface_reader_added (Interface *interface, Uuid instance_serial) noexcept |
A reading instance has been opened for a watched interface. More... | |
virtual void | bb_interface_reader_removed (Interface *interface, Uuid instance_serial) noexcept |
A reading instance has been closed for a watched interface. More... | |
Protected Member Functions | |
const char * | name () const |
Get the name of the executor; mainly used for logging. More... | |
![]() | |
const char * | name () const |
Get the name of the executor; mainly used for logging. More... | |
![]() | |
void | bbil_add_data_interface (Interface *interface) |
Add an interface to the data modification watch list. More... | |
void | bbil_add_message_interface (Interface *interface) |
Add an interface to the message received watch list. More... | |
void | bbil_add_reader_interface (Interface *interface) |
Add an interface to the reader addition/removal watch list. More... | |
void | bbil_add_writer_interface (Interface *interface) |
Add an interface to the writer addition/removal watch list. More... | |
void | bbil_remove_data_interface (Interface *interface) |
Remove an interface to the data modification watch list. More... | |
void | bbil_remove_message_interface (Interface *interface) |
Remove an interface to the message received watch list. More... | |
void | bbil_remove_reader_interface (Interface *interface) |
Remove an interface to the reader addition/removal watch list. More... | |
void | bbil_remove_writer_interface (Interface *interface) |
Remove an interface to the writer addition/removal watch list. More... | |
Interface * | bbil_data_interface (const char *iuid) noexcept |
Get interface instance for given UID. More... | |
Interface * | bbil_message_interface (const char *iuid) noexcept |
Get interface instance for given UID. More... | |
Interface * | bbil_reader_interface (const char *iuid) noexcept |
Get interface instance for given UID. More... | |
Interface * | bbil_writer_interface (const char *iuid) noexcept |
Get interface instance for given UID. More... | |
Additional Inherited Members | |
![]() | |
enum | QueueEntryType { DATA = 0 , MESSAGES = 1 , READER = 2 , WRITER = 3 } |
Queue entry type. More... | |
typedef std::list< QueueEntry > | InterfaceQueue |
Queue of additions/removal of interfaces. More... | |
typedef std::map< std::string, Interface * > | InterfaceMap |
Map of currently active event subscriptions. More... | |
![]() | |
BlackBoard * | blackboard_ |
The blackboard to use to access the skiller. More... | |
bool | blackboard_owner_ |
True if this executor is owning its blackboard. More... | |
![]() | |
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... | |
An ActionExecutor that executes an activity using a Skiller on a remote.
The executor connects to a remote blackboard and instructs the remote to execute the respective skill. The mapping of an activity to a skill works the same way as for local skills.
Definition at line 27 of file remote_skiller_executor.h.
fawkes::gpp::RemoteSkillerActionExecutor::RemoteSkillerActionExecutor | ( | Logger * | logger, |
const std::string & | agent_param_name, | ||
const std::string & | agent_param_value, | ||
const std::string & | hostname, | ||
unsigned short int | port, | ||
Configuration * | config, | ||
const std::string & | cfg_prefix | ||
) |
Constructor.
Connect to the given remote host and use that host's skiller interface.
logger | The logger instance to use |
agent_param_name | The parameter key to use for checking if this action should be executed on this agent |
agent_param_value | The name of the remote agent; only execute the action if it matches this agent name |
hostname | The remote hostname to connect to |
port | The port to connect to |
config | The config to read the skill mapping from |
cfg_prefix | The spec-specific config prefix to use |
Definition at line 48 of file remote_skiller_executor.cpp.
References fawkes::gpp::SkillerActionExecutor::blackboard_owner_.
|
overridevirtual |
Determine if this executor can execute the given activity.
activity | The activity to execute. |
Implements fawkes::gpp::ActionExecutor.
Definition at line 67 of file remote_skiller_executor.cpp.
References fawkes::gpp::SkillerActionExecutor::can_execute_activity().
|
protected |
Get the name of the executor; mainly used for logging.
Definition at line 83 of file remote_skiller_executor.cpp.