Fawkes API
Fawkes Development Version
|
Interface adapter to provide logging facilities. More...
#include <remote_adapter.h>
Public Member Functions | |
FawkesRemotePlexilAdapter (PLEXIL::AdapterExecInterface &execInterface) | |
Constructor. More... | |
FawkesRemotePlexilAdapter (PLEXIL::AdapterExecInterface &execInterface, pugi::xml_node const xml) | |
Constructor from configuration XML. More... | |
virtual | ~FawkesRemotePlexilAdapter () |
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 | fam_event (const char *filename, unsigned int mask) |
![]() | |
virtual | ~FamListener () |
Virtual empty destructor. More... | |
Additional Inherited Members | |
![]() | |
static const unsigned int | FAM_ACCESS = 0x00000001 |
File was accessed. More... | |
static const unsigned int | FAM_MODIFY = 0x00000002 |
File was modified. More... | |
static const unsigned int | FAM_ATTRIB = 0x00000004 |
Metadata changed. More... | |
static const unsigned int | FAM_CLOSE_WRITE = 0x00000008 |
Writtable file was closed. More... | |
static const unsigned int | FAM_CLOSE_NOWRITE = 0x00000010 |
Unwrittable file closed. More... | |
static const unsigned int | FAM_CLOSE = (FAM_CLOSE_WRITE | FAM_CLOSE_NOWRITE) |
Close. More... | |
static const unsigned int | FAM_OPEN = 0x00000020 |
File was opened. More... | |
static const unsigned int | FAM_MOVED_FROM = 0x00000040 |
File was moved from X. More... | |
static const unsigned int | FAM_MOVED_TO = 0x00000080 |
File was moved to Y. More... | |
static const unsigned int | FAM_MOVE = (FAM_MOVED_FROM | FAM_MOVED_TO) |
Moves. More... | |
static const unsigned int | FAM_CREATE = 0x00000100 |
Subfile was created. More... | |
static const unsigned int | FAM_DELETE = 0x00000200 |
Subfile was deleted. More... | |
static const unsigned int | FAM_DELETE_SELF = 0x00000400 |
Self was deleted. More... | |
static const unsigned int | FAM_MOVE_SELF = 0x00000800 |
Self was moved. More... | |
static const unsigned int | FAM_UNMOUNT = 0x00002000 |
Backing fs was unmounted. More... | |
static const unsigned int | FAM_Q_OVERFLOW = 0x00004000 |
Event queued overflowed. More... | |
static const unsigned int | FAM_IGNORED = 0x00008000 |
File was ignored. More... | |
static const unsigned int | FAM_ONLYDIR = 0x01000000 |
Only watch the path if it is a directory. More... | |
static const unsigned int | FAM_DONT_FOLLOW = 0x02000000 |
Do not follow a sym link. More... | |
static const unsigned int | FAM_MASK_ADD = 0x20000000 |
Add to the mask of an already existing watch. More... | |
static const unsigned int | FAM_ISDIR = 0x40000000 |
Event occurred against dir. More... | |
static const unsigned int | FAM_ONESHOT = 0x80000000 |
Only send event once. More... | |
static const unsigned int | FAM_ALL_EVENTS |
All events which a program can wait on. More... | |
Interface adapter to provide logging facilities.
Plexil adapter to provide access to the FawkesRemote.
Definition at line 47 of file remote_adapter.h.
FawkesRemotePlexilAdapter::FawkesRemotePlexilAdapter | ( | PLEXIL::AdapterExecInterface & | execInterface | ) |
Constructor.
execInterface | Reference to the parent AdapterExecInterface object. |
Definition at line 55 of file remote_adapter.cpp.
FawkesRemotePlexilAdapter::FawkesRemotePlexilAdapter | ( | 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 65 of file remote_adapter.cpp.
|
virtual |
Destructor.
Definition at line 72 of file remote_adapter.cpp.
void FawkesRemotePlexilAdapter::executeCommand | ( | PLEXIL::Command * | cmd | ) |
Perform given command.
cmd | command to execute |
Definition at line 234 of file remote_adapter.cpp.
|
virtual |
Event has been raised.
filename | name of the file that triggered the event |
mask | mask indicating the event. Currently inotify event flags are used, see inotify.h. |
Implements fawkes::FamListener.
Definition at line 148 of file remote_adapter.cpp.
References fawkes::NavGraph::clear(), fawkes::FamListener::FAM_DELETE, fawkes::FamListener::FAM_IGNORED, fawkes::FamListener::FAM_MODIFY, fawkes::load_yaml_navgraph(), fawkes::LockPtr< T_CppObject >::lock(), fawkes::NavGraph::notify_of_change(), fawkes::NavGraph::set_notifications_enabled(), fawkes::LockPtr< T_CppObject >::unlock(), and fawkes::Exception::what_no_backtrace().
|
virtual |
Initialize adapter.
Definition at line 80 of file remote_adapter.cpp.
References fawkes::load_yaml_navgraph(), and fawkes::Exception::what_no_backtrace().
void FawkesRemotePlexilAdapter::invokeAbort | ( | PLEXIL::Command * | cmd | ) |
Abort currently running execution.
cmd | command to abort |
Definition at line 255 of file remote_adapter.cpp.
|
virtual |
Reset adapter.
Definition at line 209 of file remote_adapter.cpp.
|
virtual |
Shut adapter down.
Definition at line 218 of file remote_adapter.cpp.
References fawkes::Clock::finalize().
|
virtual |
Start adapter.
Definition at line 191 of file remote_adapter.cpp.
|
virtual |
Stop adapter.
Definition at line 200 of file remote_adapter.cpp.