Fawkes API
Fawkes Development Version
|
#include <>>
Public Types | |
enum | Mode { OPRS, XOPRS } |
OPRS kernel operation mode. More... | |
Public Member Functions | |
OpenPRSAspect (const char *kernel_name, Mode mode=OPRS, const char *local_name=NULL) | |
Constructor. More... | |
virtual | ~OpenPRSAspect () |
Virtual empty destructor. More... | |
void | add_openprs_data_path (const std::string &path) |
Add an OpenPRS data path. More... | |
void | set_openprs_gdb_delay (const bool enable_gdb_delay) |
Enable/disable GDB delay. More... | |
![]() | |
const std::list< const char * > & | get_aspects () const |
Get list of aspect names attached to a aspected thread. More... | |
Protected Attributes | |
LockPtr< OpenPRSComm > | openprs |
const std::string | openprs_kernel_name |
const Mode | openprs_kernel_mode |
const std::string | openprs_local_name |
Additional Inherited Members | |
![]() | |
void | add_aspect (const char *name) |
Add an aspect to a thread. More... | |
OpenPRS kernel creation and communication aspect. This aspect allows access to a specific OpenPRS context through the OpenPRSKernel communication wrapper. The context is created if it does not already exist.
fawkes::OpenPRSAspect::OpenPRSAspect | ( | const char * | kernel_name, |
OpenPRSAspect::Mode | mode = OPRS , |
||
const char * | local_name = NULL |
||
) |
Constructor.
kernel_name | the name of the OpenPRS kernel to connect to. The context may not exist, yet. |
mode | set to XOPRS to run kernel with graphical user interface, OPRS to run headless (default) |
local_name | local name to register with to the message passer. If NULL will be set to "fawkes-|kernel_name|" (where |kernel_name| will be replaced by the value of kernel_name ). |
Definition at line 69 of file openprs.cpp.
|
virtual |
void fawkes::OpenPRSAspect::add_openprs_data_path | ( | const std::string & | path | ) |
Add an OpenPRS data path.
The paths are added to the kernel on intialization and are then searched when including and loading files. Note that this method may only be called in the constructor, i.e. before the aspect is initialized.
path | path to add to search list |
Definition at line 96 of file openprs.cpp.
Referenced by OpenPRSAgentThread::OpenPRSAgentThread().
void fawkes::OpenPRSAspect::set_openprs_gdb_delay | ( | const bool | enable_gdb_delay | ) |
Enable/disable GDB delay.
This can be used to order mod_utils to wait for a few seconds to allow for connecting to the OPRS kernel before it is actually running.
enable_gdb_delay | true to enable delay, false to disable (default) |
Definition at line 110 of file openprs.cpp.
Referenced by OpenPRSAgentThread::OpenPRSAgentThread().
|
protected |
OpenPRS kernel communication wrapper.
Definition at line 60 of file openprs.h.
Referenced by OpenPRSExampleThread::init(), OpenPRSAgentThread::init(), OpenPRSExampleThread::loop(), OpenPRSAgentThread::loop(), and ~OpenPRSAspect().
|
protected |
|
protected |
The name of the kernel created for this thread.
Definition at line 61 of file openprs.h.
Referenced by OpenPRSExampleThread::init(), OpenPRSAgentThread::init(), OpenPRSExampleThread::loop(), and OpenPRSAgentThread::loop().
|
protected |