ot::VRPNModule Class Reference
[Network Classes]
The module and factory to drive the VRPN nodes.
More...
#include <VRPNModule.h>
Inheritance diagram for ot::VRPNModule:


Public Member Functions | |
| VRPNModule () | |
| virtual | ~VRPNModule () |
| virtual void | init (StringTable &attributes, ConfigNode *localTree) |
| virtual Node * | createNode (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 | ( | ) |
| VRPNModule::~VRPNModule | ( | ) | [virtual] |
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
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] |
int ot::VRPNModule::port [protected] |
VRPNSinkVector ot::VRPNModule::sinks [protected] |
list of sink nodes
Definition at line 94 of file VRPNModule.h.
Referenced by createNode(), pullEvent(), start(), and ~VRPNModule().
VRPNSourceVector ot::VRPNModule::sources [protected] |
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: