fawkes::FawkesNetworkAspect Class Reference
[Fawkes Thread Aspects]

Thread aspect to participate in the Fawkes Network protocol. More...

#include <aspect/fawkes_network.h>

Inheritance diagram for fawkes::FawkesNetworkAspect:

[legend]
List of all members.

Public Member Functions

virtual ~FawkesNetworkAspect ()
 Virtual empty Destructor.
void init_FawkesNetworkAspect (FawkesNetworkHub *fnethub)
 Set the logger.

Protected Attributes

FawkesNetworkHubfnethub
 This is the Fawkes network hub member used to access the Fawkes network protocol.

Detailed Description

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.

Author:
Tim Niemueller

Definition at line 31 of file fawkes_network.h.


Constructor & Destructor Documentation

fawkes::FawkesNetworkAspect::~FawkesNetworkAspect (  )  [virtual]

Virtual empty Destructor.

Definition at line 59 of file fawkes_network.cpp.


Member Function Documentation

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).

Parameters:
fnethub Fawkes network hub instance to use for network communication.

Definition at line 72 of file fawkes_network.cpp.

References fnethub.


Member Data Documentation

FawkesNetworkHub fawkes::FawkesNetworkAspect::fnethub [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 39 of file fawkes_network.h.

Referenced by ExampleNetworkThread::finalize(), ExampleNetworkThread::handle_network_message(), ExampleNetworkThread::init(), and init_FawkesNetworkAspect().


The documentation for this class was generated from the following files:
Generated on Tue Feb 22 13:31:37 2011 for Fawkes API by  doxygen 1.4.7