ot::TestSource Class Reference
#include <TestSource.h>
Inheritance diagram for ot::TestSource:


Public Member Functions | |
| int | isEventGenerator () |
| void | push (void) |
Public Attributes | |
| int | frequency |
| int | offset |
| double | noise |
| Event | event |
| Event | perturbed |
Protected Member Functions | |
| TestSource (int frequency_, int offset_) | |
Friends | |
| class | TestModule |
Detailed Description
Definition at line 96 of file TestSource.h.
Constructor & Destructor Documentation
| ot::TestSource::TestSource | ( | int | frequency_, | |
| int | offset_ | |||
| ) | [inline, protected] |
simple constructor, sets members to initial values
- Parameters:
-
frequency_ initial value for member frequency offset_ initial value for member offset
Definition at line 116 of file TestSource.h.
Member Function Documentation
| int ot::TestSource::isEventGenerator | ( | ) | [inline, virtual] |
tests for EventGenerator interface being present.
Is overriden to return 1 always.
- Returns:
- always 1
Reimplemented from ot::Node.
Definition at line 125 of file TestSource.h.
| void ot::TestSource::push | ( | void | ) |
pushes event down the line.
Needed to access protected updateObservers method in EventGenerator. Note that the implementation of this method is in the file TestModule.cxx !
Definition at line 129 of file TestModule.cxx.
References event, ot::Event::getOrientation(), ot::Event::getPosition(), noise, ot::MathUtils::normalizeQuaternion(), perturbed, ot::Event::setAttribute(), ot::Event::setButton(), ot::Event::setConfidence(), ot::Event::timeStamp(), and ot::Node::updateObservers().
Friends And Related Function Documentation
friend class TestModule [friend] |
Definition at line 136 of file TestSource.h.
Member Data Documentation
the original event
Definition at line 107 of file TestSource.h.
Referenced by ot::TestModule::createNode(), and push().
| double ot::TestSource::noise |
use noise and noise level
Definition at line 105 of file TestSource.h.
Referenced by ot::TestModule::createNode(), and push().
the perturbed event posted to the observers
Definition at line 109 of file TestSource.h.
Referenced by push().
The documentation for this class was generated from the following files: