ot::NetworkSinkModule Class Reference
[Network Classes]
The module and factory to drive the transmission of tracker events via the network.
More...
#include <NetworkSinkModule.h>
Inheritance diagram for ot::NetworkSinkModule:


Public Member Functions | |
| NetworkSinkModule () | |
| virtual | ~NetworkSinkModule () |
| virtual void | init (StringTable &attributes, ConfigNode *localTree) |
| virtual Node * | createNode (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 |
| MulticastSenderVector | multicasts |
| UnicastSenderVector | unicasts |
| std::string | serverName |
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
Definition at line 90 of file NetworkSinkModule.h.
Constructor & Destructor Documentation
| ot::NetworkSinkModule::NetworkSinkModule | ( | ) |
| ot::NetworkSinkModule::~NetworkSinkModule | ( | ) | [virtual] |
destructor
Definition at line 166 of file NetworkSinkModule.cxx.
References multicasts, and unicasts.
Member Function Documentation
| void ot::NetworkSinkModule::close | ( | ) | [virtual] |
closes the module and closes any communication sockets.
Reimplemented from ot::Module.
Definition at line 304 of file NetworkSinkModule.cxx.
References multicasts, and unicasts.
| 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
Definition at line 464 of file NetworkSinkModule.cxx.
| 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
Implements ot::NodeFactory.
Definition at line 193 of file NetworkSinkModule.cxx.
References ot::NetworkSender::data, ot::StringTable::get(), LOG_ACE_INFO(), ot::magicNum, FlexibleTrackerDataRecord::maxStationNum, multicasts, nodes, ot::revNum, and unicasts.
| 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.
Definition at line 179 of file NetworkSinkModule.cxx.
References ot::StringTable::containsKey(), ot::StringTable::get(), ot::Module::init(), and serverName.
| 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.
Definition at line 321 of file NetworkSinkModule.cxx.
References LOG_ACE_ERROR(), multicasts, nodes, and unicasts.
| 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
Definition at line 481 of file NetworkSinkModule.cxx.
References ot::UnicastSender::addresses, ot::UnicastSender::mutex, ot::UdpSender::socket, ot::UnicastSender::stop, and ot::Module::stop().
Referenced by start().
| 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.
Definition at line 266 of file NetworkSinkModule.cxx.
References multicasts, nodes, runUnicastTransceiver(), ot::Module::start(), and unicasts.
Member Data Documentation
list of MulticastSender objects
Definition at line 97 of file NetworkSinkModule.h.
Referenced by close(), createNode(), pullEvent(), start(), and ~NetworkSinkModule().
SinkVector ot::NetworkSinkModule::nodes [protected] |
list of NetworkSink nodes
Definition at line 95 of file NetworkSinkModule.h.
Referenced by createNode(), pullEvent(), and start().
std::string ot::NetworkSinkModule::serverName [protected] |
UnicastSenderVector ot::NetworkSinkModule::unicasts [protected] |
list of UnicastSender objects
Definition at line 99 of file NetworkSinkModule.h.
Referenced by close(), createNode(), pullEvent(), start(), and ~NetworkSinkModule().
The documentation for this class was generated from the following files: