Fawkes API
Fawkes Development Version
|
Thread aspect to participate in the Fawkes Network protocol. More...
#include <>>
Public Member Functions | |
FawkesNetworkAspect () | |
Constructor. More... | |
virtual | ~FawkesNetworkAspect () |
Virtual empty Destructor. More... | |
void | init_FawkesNetworkAspect (FawkesNetworkHub *fnethub) |
Set the logger. More... | |
![]() | |
const std::list< const char * > & | get_aspects () const |
Get list of aspect names attached to a aspected thread. More... | |
Protected Attributes | |
FawkesNetworkHub * | fnethub |
This is the Fawkes network hub member used to access the Fawkes network protocol. More... | |
Additional Inherited Members | |
![]() | |
void | add_aspect (const char *name) |
Add an aspect to a thread. More... | |
Thread aspect to participate in the Fawkes Network protocol.
Give this aspect to your thread to make use of the Fawkes network protocol. The protocol is designed to transport short messages over the network (information and control data). With this aspect you can easily inject messages into the stream and and receive messages from connected clients. The component ID has to be unique. To ensure this have a look at netcomm/fawkes/component_ids.h.
It is guaranteed that if used properly from within plugins that initFawkesNetworkAspect() is called before the thread is started and that you can access the Fawkes network hub via the fnethub member.
In most cases you should implement Thread::init() to register your FawkesNetworkHandler.
Definition at line 35 of file fawkes_network.h.
fawkes::FawkesNetworkAspect::FawkesNetworkAspect | ( | ) |
Constructor.
Definition at line 62 of file fawkes_network.cpp.
References fawkes::Aspect::add_aspect().
|
virtual |
Virtual empty Destructor.
Definition at line 68 of file fawkes_network.cpp.
void fawkes::FawkesNetworkAspect::init_FawkesNetworkAspect | ( | FawkesNetworkHub * | fnethub | ) |
Set the logger.
It is guaranteed that this is called for a thread having the Fawkes netwok aspect before Thread::start() is called (when running regularly inside Fawkes).
fnethub | Fawkes network hub instance to use for network communication. |
Definition at line 81 of file fawkes_network.cpp.
References fnethub.
Referenced by fawkes::FawkesNetworkAspectIniFin::init().
|
protected |
This is the Fawkes network hub member used to access the Fawkes network protocol.
The logger will remain valid for the whole lifetime of the thread.
Definition at line 44 of file fawkes_network.h.
Referenced by ExampleNetworkThread::finalize(), ExampleNetworkThread::handle_network_message(), ExampleNetworkThread::init(), and init_FawkesNetworkAspect().