ot::NetworkSinkModule Class Reference
[Network Classes]

#include <NetworkSinkModule.h>

Inheritance diagram for ot::NetworkSinkModule:

Inheritance graph
[legend]
Collaboration diagram for ot::NetworkSinkModule:

Collaboration graph
[legend]
List of all members.

Detailed Description

The module and factory to drive the transmission of tracker events via the network. It grabs the events from various NetworkSink nodes and distributes them to specified multicast groups or unicast datagrams.

Author:
Gerhard Reitmayr, Mathis Csisinko, Jochen von Spiczak


Public Member Functions

 NetworkSinkModule ()
virtual ~NetworkSinkModule ()
virtual void init (StringTable &attributes, ConfigNode *localTree)
virtual NodecreateNode (const std::string &name, StringTable &attributes)
virtual void start ()
virtual void close ()
virtual void pullEvent ()

Protected Member Functions

void convertFloatsHToNl (std::vector< float > &floats, float *result, int num)

Static Protected Member Functions

static void runUnicastTransceiver (void *data)

Protected Attributes

SinkVector nodes
 list of NetworkSink nodes
MulticastSenderVector multicasts
 list of MulticastSender objects
UnicastSenderVector unicasts
 list of UnicastSender objects
std::string serverName
 server name
bool blockMulticast


Constructor & Destructor Documentation

ot::NetworkSinkModule::NetworkSinkModule  ) 
 

basic constructor

ot::NetworkSinkModule::~NetworkSinkModule  )  [virtual]
 

destructor


Member Function Documentation

void ot::NetworkSinkModule::close  )  [virtual]
 

closes the module and closes any communication sockets.

Reimplemented from ot::Module.

void ot::NetworkSinkModule::convertFloatsHToNl std::vector< float > &  floats,
float *  result,
int  num
[protected]
 

converts floats to network byte order.

Parameters:
floats vector of floats to convert
result pointer where to store the result ( can be floats )
num number of floats to convert

Node * ot::NetworkSinkModule::createNode const std::string &  name,
StringTable attributes
[virtual]
 

This method is called to construct a new Node. It compares name to the NetworkSink element name, and if it matches creates a new NetworkSink node.

Parameters:
name reference to string containing element name refenrence to StringMap containing attribute values
Returns:
pointer to new Node or NULL. The new Node must be allocated with new !

Implements ot::NodeFactory.

void ot::NetworkSinkModule::init StringTable attributes,
ConfigNode localTree
[virtual]
 

initializes the tracker module.

Parameters:
attributes StringMap of elements attribute values. Should be possibly , but is not for convenience.
localTree pointer to root of configuration nodes tree

Reimplemented from ot::Module.

void ot::NetworkSinkModule::pullEvent  )  [virtual]
 

pulls event information out of the tracker tree. It checks the modified member on each NetworkSink node and if a new value is stored it inserts it into the apropriate network data buffer. Then it sends any non-empty data buffers to the network.

Reimplemented from ot::Module.

void ot::NetworkSinkModule::runUnicastTransceiver void *  data  )  [static, protected]
 

Runs the unicast transceiver thread. The function reads from and writes to the network and parses network packages.

Parameters:
data the unicast receiver

void ot::NetworkSinkModule::start  )  [virtual]
 

This method is called after initialisation is finished and before the main loop is started. It opens the sockets needed for communication.

Reimplemented from ot::Module.


Member Data Documentation

bool ot::NetworkSinkModule::blockMulticast [protected]
 

MulticastSenderVector ot::NetworkSinkModule::multicasts [protected]
 

list of MulticastSender objects

SinkVector ot::NetworkSinkModule::nodes [protected]
 

list of NetworkSink nodes

std::string ot::NetworkSinkModule::serverName [protected]
 

server name

UnicastSenderVector ot::NetworkSinkModule::unicasts [protected]
 

list of UnicastSender objects


The documentation for this class was generated from the following files:
Generated on Wed Feb 28 15:33:32 2007 for NaviTrack by  doxygen 1.4.6