Fawkes API
Fawkes Development Version
|
OpenPRS kernel creation and communication aspect. More...
#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 |
OpenPRS kernel communication wrapper. More... | |
const std::string | openprs_kernel_name |
The name of the kernel created for this thread. More... | |
const Mode | openprs_kernel_mode |
The kernel mode, can be OPRS or XOPRS (with graphical interface). More... | |
const std::string | openprs_local_name |
The local message passer name for communication. More... | |
Friends | |
class | OpenPRSAspectIniFin |
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 68 of file openprs.cpp.
References fawkes::Aspect::add_aspect(), and openprs_local_name.
|
virtual |
Virtual empty destructor.
Definition at line 81 of file openprs.cpp.
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 94 of file openprs.cpp.
References openprs.
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 109 of file openprs.cpp.
References openprs.
Referenced by OpenPRSAgentThread::OpenPRSAgentThread().
|
protected |
OpenPRS kernel communication wrapper.
Definition at line 57 of file openprs.h.
Referenced by add_openprs_data_path(), OpenPRSExampleThread::init(), OpenPRSAgentThread::init(), fawkes::OpenPRSAspectIniFin::init(), OpenPRSExampleThread::loop(), OpenPRSAgentThread::loop(), and set_openprs_gdb_delay().
|
protected |
The kernel mode, can be OPRS or XOPRS (with graphical interface).
Definition at line 59 of file openprs.h.
Referenced by fawkes::OpenPRSAspectIniFin::init().
|
protected |
The name of the kernel created for this thread.
Definition at line 58 of file openprs.h.
Referenced by fawkes::OpenPRSAspectIniFin::finalize(), OpenPRSExampleThread::init(), OpenPRSAgentThread::init(), fawkes::OpenPRSAspectIniFin::init(), OpenPRSExampleThread::loop(), and OpenPRSAgentThread::loop().
|
protected |
The local message passer name for communication.
Definition at line 60 of file openprs.h.
Referenced by fawkes::OpenPRSAspectIniFin::init(), and OpenPRSAspect().