Fawkes API  Fawkes Development Version
fawkes::FawkesNetworkAspect Class Reference

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

#include <>>

Inheritance diagram for fawkes::FawkesNetworkAspect:

List of all members.

Public Member Functions

 FawkesNetworkAspect ()
 Constructor.
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

Constructor & Destructor Documentation

fawkes::FawkesNetworkAspect::FawkesNetworkAspect ( )

Constructor.

Definition at line 62 of file fawkes_network.cpp.

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

Virtual empty Destructor.

Definition at line 68 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:
fnethubFawkes network hub instance to use for network communication.

Definition at line 81 of file fawkes_network.cpp.

Referenced by fawkes::FawkesNetworkAspectIniFin::init().


Member Data Documentation

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::init(), ExampleNetworkThread::finalize(), and ExampleNetworkThread::handle_network_message().


The documentation for this class was generated from the following files: