Fawkes API  Fawkes Development Version
BehaviorEnginePlexilAdapter Class Reference

Interface adapter to provide logging facilities. More...

#include <be_adapter.h>

Inheritance diagram for BehaviorEnginePlexilAdapter:

Public Member Functions

 BehaviorEnginePlexilAdapter (PLEXIL::AdapterExecInterface &execInterface)
 Constructor. More...
 
 BehaviorEnginePlexilAdapter (PLEXIL::AdapterExecInterface &execInterface, pugi::xml_node const xml)
 Constructor from configuration XML. More...
 
virtual ~BehaviorEnginePlexilAdapter ()
 Destructor. More...
 
virtual bool initialize ()
 Initialize adapter. More...
 
virtual bool start ()
 Start adapter. More...
 
virtual bool stop ()
 Stop adapter. More...
 
virtual bool reset ()
 Reset adapter. More...
 
virtual bool shutdown ()
 Shut adapter down. More...
 
void executeCommand (PLEXIL::Command *cmd)
 Perform given command. More...
 
void invokeAbort (PLEXIL::Command *cmd)
 Abort currently running execution. More...
 
virtual void bb_interface_data_refreshed (fawkes::Interface *interface) noexcept
 BlackBoard data refreshed notification. 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...
 

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 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...
 

Detailed Description

Interface adapter to provide logging facilities.

Plexil adapter to provide access to the Behavior Engine.

Author
Tim Niemueller

Definition at line 40 of file be_adapter.h.

Constructor & Destructor Documentation

◆ BehaviorEnginePlexilAdapter() [1/2]

BehaviorEnginePlexilAdapter::BehaviorEnginePlexilAdapter ( PLEXIL::AdapterExecInterface &  execInterface)

Constructor.

Parameters
execInterfaceReference to the parent AdapterExecInterface object.

Definition at line 42 of file be_adapter.cpp.

◆ BehaviorEnginePlexilAdapter() [2/2]

BehaviorEnginePlexilAdapter::BehaviorEnginePlexilAdapter ( PLEXIL::AdapterExecInterface &  execInterface,
pugi::xml_node const  xml 
)

Constructor from configuration XML.

Parameters
execInterfaceReference to the parent AdapterExecInterface object.
xmlA const reference to the XML element describing this adapter
Note
The instance maintains a shared pointer to the XML.

Definition at line 53 of file be_adapter.cpp.

◆ ~BehaviorEnginePlexilAdapter()

BehaviorEnginePlexilAdapter::~BehaviorEnginePlexilAdapter ( )
virtual

Destructor.

Definition at line 61 of file be_adapter.cpp.

Member Function Documentation

◆ bb_interface_data_refreshed()

void BehaviorEnginePlexilAdapter::bb_interface_data_refreshed ( fawkes::Interface interface)
virtualnoexcept

BlackBoard data refreshed notification.

This is called whenever the data in an interface that you registered for is refreshed. This happens when a writer calls the Interface::write(), regardless of whether any data have changed.

Parameters
interfaceinterface instance that you supplied to bbil_add_data_interface()
See also
bb_interface_data_changed

Reimplemented from fawkes::BlackBoardInterfaceListener.

Definition at line 382 of file be_adapter.cpp.

◆ executeCommand()

void BehaviorEnginePlexilAdapter::executeCommand ( PLEXIL::Command *  cmd)

Perform given command.

Parameters
cmdcommand to execute

Definition at line 332 of file be_adapter.cpp.

References fawkes::Logger::log_warn().

◆ initialize()

bool BehaviorEnginePlexilAdapter::initialize ( )
virtual

◆ invokeAbort()

void BehaviorEnginePlexilAdapter::invokeAbort ( PLEXIL::Command *  cmd)

Abort currently running execution.

Parameters
cmdcommand to abort

Definition at line 366 of file be_adapter.cpp.

References fawkes::Logger::log_warn(), and fawkes::Interface::msgq_enqueue().

◆ reset()

bool BehaviorEnginePlexilAdapter::reset ( void  )
virtual

Reset adapter.

Returns
true if successful, false otherwise.

Definition at line 215 of file be_adapter.cpp.

◆ shutdown()

bool BehaviorEnginePlexilAdapter::shutdown ( )
virtual

Shut adapter down.

Returns
true if successful, false otherwise.

Definition at line 224 of file be_adapter.cpp.

References fawkes::BlackBoard::close(), and fawkes::BlackBoard::unregister_listener().

◆ start()

◆ stop()

bool BehaviorEnginePlexilAdapter::stop ( )
virtual

Stop adapter.

Returns
true if successful, false otherwise.

Definition at line 206 of file be_adapter.cpp.


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