Fawkes API Fawkes Development Version
|
Interface adapter to provide logging facilities. More...
#include <be_adapter.h>
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... | |
![]() | |
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_refreshed (Interface *interface) noexcept |
BlackBoard data refreshed notification. 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 | |
![]() | |
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... | |
![]() | |
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... | |
Interface adapter to provide logging facilities.
Plexil adapter to provide access to the Behavior Engine.
Definition at line 40 of file be_adapter.h.
BehaviorEnginePlexilAdapter::BehaviorEnginePlexilAdapter | ( | PLEXIL::AdapterExecInterface & | execInterface | ) |
Constructor.
execInterface | Reference to the parent AdapterExecInterface object. |
Definition at line 42 of file be_adapter.cpp.
BehaviorEnginePlexilAdapter::BehaviorEnginePlexilAdapter | ( | PLEXIL::AdapterExecInterface & | execInterface, |
pugi::xml_node const | xml | ||
) |
Constructor from configuration XML.
execInterface | Reference to the parent AdapterExecInterface object. |
xml | A const reference to the XML element describing this adapter |
Definition at line 53 of file be_adapter.cpp.
|
virtual |
Destructor.
Definition at line 61 of file be_adapter.cpp.
|
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.
interface | interface instance that you supplied to bbil_add_data_interface() |
Reimplemented from fawkes::BlackBoardInterfaceListener.
Definition at line 382 of file be_adapter.cpp.
void BehaviorEnginePlexilAdapter::executeCommand | ( | PLEXIL::Command * | cmd | ) |
Perform given command.
cmd | command to execute |
Definition at line 332 of file be_adapter.cpp.
References fawkes::Logger::log_warn().
|
virtual |
Initialize adapter.
Definition at line 69 of file be_adapter.cpp.
References fawkes::Configuration::get_string(), fawkes::Logger::log_debug(), fawkes::Logger::log_error(), fawkes::Logger::log_warn(), fawkes::Configuration::ValueIterator::path(), fawkes::Configuration::search(), and fawkes::Exception::what_no_backtrace().
void BehaviorEnginePlexilAdapter::invokeAbort | ( | PLEXIL::Command * | cmd | ) |
Abort currently running execution.
cmd | command to abort |
Definition at line 366 of file be_adapter.cpp.
References fawkes::Logger::log_warn(), and fawkes::Interface::msgq_enqueue().
|
virtual |
Reset adapter.
Definition at line 215 of file be_adapter.cpp.
|
virtual |
Shut adapter down.
Definition at line 224 of file be_adapter.cpp.
References fawkes::BlackBoard::close(), and fawkes::BlackBoard::unregister_listener().
|
virtual |
Start adapter.
Definition at line 177 of file be_adapter.cpp.
References fawkes::BlackBoardInterfaceListener::bbil_add_data_interface(), fawkes::SkillerInterface::exclusive_controller(), fawkes::Uuid::get_string(), fawkes::Interface::has_writer(), fawkes::Logger::log_error(), fawkes::Interface::msgq_enqueue(), fawkes::BlackBoard::open_for_reading(), fawkes::Interface::read(), fawkes::BlackBoard::register_listener(), fawkes::Interface::serial(), and fawkes::Exception::what_no_backtrace().
|
virtual |
Stop adapter.
Definition at line 206 of file be_adapter.cpp.