OpenTracker

An Open Architecture for Reconfigurable Tracking based on XML | Contact

ot::VRPNModule Class Reference
[Network Classes]

The module and factory to drive the VRPN nodes. More...

#include <VRPNModule.h>

Inheritance diagram for ot::VRPNModule:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

Protected Attributes

VRPNSinkVector sinks
VRPNSourceVector sources
std::string ip
int port
vrpn_Connection * connection

Detailed Description

The module and factory to drive the VRPN nodes.

It constructs VRPNNode nodes via the NodeFactory interface and registers VRPNs with them after parsing

Author:
Gerhard Reitmayr

Definition at line 89 of file VRPNModule.h.


Constructor & Destructor Documentation

VRPNModule::VRPNModule (  ) 

constructor method.

Definition at line 63 of file VRPNModule.cxx.

VRPNModule::~VRPNModule (  )  [virtual]

Destructor method, clears nodes member.

Definition at line 69 of file VRPNModule.cxx.

References sinks, and sources.


Member Function Documentation

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

This method is called to construct a new Node.

It compares name to the VRPNSink and VRPNSource element name, and if it matches creates a new VRPNSink or VRPNSource 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.

Definition at line 95 of file VRPNModule.cxx.

References ot::VRPNSink::BUTTON, ot::VRPNSource::BUTTON, ot::StringTable::get(), ot::VRPNSink::name, ot::VRPNSource::name, sinks, sources, ot::VRPNSink::station, ot::VRPNSource::station, ot::VRPNSink::TRACKER, ot::VRPNSource::TRACKER, ot::VRPNSink::type, and ot::VRPNSource::type.

void VRPNModule::init ( StringTable attributes,
ConfigNode localTree 
) [virtual]

initializes the tracker module.

This class provides an implementation that sets the initialization flag to true. Subclasses should call this method, if they override it, before doing anything else. It takes the attributes of the element configuring this module and a local tree consisting of the children of the element. This tree must be build of Nodes.

Parameters:
attributes StringTable 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 85 of file VRPNModule.cxx.

References ot::StringTable::get(), ot::Module::init(), ip, and port.

void VRPNModule::pullEvent (  )  [virtual]

pulls event information out of the tracker tree.

It enables the module to query any EventQueue or TimeDependend node in the shared memory. It is called after pushEvent was executed on each module.

Reimplemented from ot::Module.

Definition at line 161 of file VRPNModule.cxx.

References connection, and sinks.

void VRPNModule::pushEvent (  )  [virtual]

pushes event information into the tracker tree.

It enables the module to push new data into the tree by updating EventGenerator nodes and thereby triggering an event.

Reimplemented from ot::Module.

Definition at line 152 of file VRPNModule.cxx.

References sources.

void VRPNModule::start (  )  [virtual]

This method is called after initialisation is finished and before the main loop is started.

It allows the module to finish any setups that need to be done before entering the main loop.

Reimplemented from ot::Module.

Definition at line 131 of file VRPNModule.cxx.

References connection, ip, port, sinks, and sources.


Member Data Documentation

vrpn_Connection* ot::VRPNModule::connection [protected]

Connection object for VRPNSink servers.

Definition at line 102 of file VRPNModule.h.

Referenced by pullEvent(), and start().

std::string ot::VRPNModule::ip [protected]

interface for VRPNSink servers to use

Definition at line 98 of file VRPNModule.h.

Referenced by init(), and start().

int ot::VRPNModule::port [protected]

port for VRPNSink servers to use

Definition at line 100 of file VRPNModule.h.

Referenced by init(), and start().

list of sink nodes

Definition at line 94 of file VRPNModule.h.

Referenced by createNode(), pullEvent(), start(), and ~VRPNModule().

list of source nodes

Definition at line 96 of file VRPNModule.h.

Referenced by createNode(), pushEvent(), start(), and ~VRPNModule().


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

copyright (c) 2006 Graz University of Technology