Fawkes API  Fawkes Development Version
fawkes::gpp::RemoteSkillerActionExecutor Class Reference

An ActionExecutor that executes an activity using a Skiller on a remote. More...

Inheritance diagram for fawkes::gpp::RemoteSkillerActionExecutor:

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...
 
- Public Member Functions inherited from fawkes::gpp::SkillerActionExecutor
 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...
 
- Public Member Functions inherited from fawkes::gpp::ActionExecutor
 ActionExecutor (Logger *logger)
 Constructor of an abstract executor. More...
 
- Public Member Functions inherited from fawkes::BlackBoardInterfaceListener
 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...
 
- Protected Member Functions inherited from fawkes::gpp::SkillerActionExecutor
const char * name () const
 Get the name of the executor; mainly used for logging. More...
 
- Protected Member Functions inherited from fawkes::BlackBoardInterfaceListener
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...
 
Interfacebbil_data_interface (const char *iuid) noexcept
 Get interface instance for given UID. More...
 
Interfacebbil_message_interface (const char *iuid) noexcept
 Get interface instance for given UID. More...
 
Interfacebbil_reader_interface (const char *iuid) noexcept
 Get interface instance for given UID. More...
 
Interfacebbil_writer_interface (const char *iuid) noexcept
 Get interface instance for given UID. More...
 

Additional Inherited Members

- Public Types inherited from fawkes::BlackBoardInterfaceListener
enum  QueueEntryType { DATA = 0 , MESSAGES = 1 , READER = 2 , WRITER = 3 }
 Queue entry type. More...
 
typedef std::list< QueueEntryInterfaceQueue
 Queue of additions/removal of interfaces. More...
 
typedef std::map< std::string, Interface * > InterfaceMap
 Map of currently active event subscriptions. More...
 
- Protected Attributes inherited from fawkes::gpp::SkillerActionExecutor
BlackBoardblackboard_
 The blackboard to use to access the skiller. More...
 
bool blackboard_owner_
 True if this executor is owning its blackboard. More...
 
- Protected Attributes inherited from fawkes::gpp::ActionExecutor
std::shared_ptr< gologpp::Activity > running_activity_
 A pointer to the currently running activity. More...
 
Loggerlogger_
 The logger to use for logging messages. More...
 

Detailed Description

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.

Author
Till Hofmann
See also
SkillerActionExecutor
ActionSkillMapping

Definition at line 27 of file remote_skiller_executor.h.

Constructor & Destructor Documentation

◆ RemoteSkillerActionExecutor()

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.

Parameters
loggerThe logger instance to use
agent_param_nameThe parameter key to use for checking if this action should be executed on this agent
agent_param_valueThe name of the remote agent; only execute the action if it matches this agent name
hostnameThe remote hostname to connect to
portThe port to connect to
configThe config to read the skill mapping from
cfg_prefixThe spec-specific config prefix to use

Definition at line 48 of file remote_skiller_executor.cpp.

References fawkes::gpp::SkillerActionExecutor::blackboard_owner_.

Member Function Documentation

◆ can_execute_activity()

bool fawkes::gpp::RemoteSkillerActionExecutor::can_execute_activity ( std::shared_ptr< gologpp::Activity >  activity) const
overridevirtual

Determine if this executor can execute the given activity.

Parameters
activityThe activity to execute.
Returns
True iff the given activity can be executed by this executor.

Implements fawkes::gpp::ActionExecutor.

Definition at line 67 of file remote_skiller_executor.cpp.

References fawkes::gpp::SkillerActionExecutor::can_execute_activity().

◆ name()

const char * fawkes::gpp::RemoteSkillerActionExecutor::name ( ) const
protected

Get the name of the executor; mainly used for logging.

Returns
The human-readable name of the executor

Definition at line 83 of file remote_skiller_executor.cpp.


The documentation for this class was generated from the following files: