Main Page | Class List | File List | Class Members | File Members

Counter Class Reference

The whistle counter. More...

#include <Counter.h>

List of all members.

Public Member Functions

 Counter (TimeSpecsType)
 Starts the whistle counter.The start situation is "No Whistle" from a long time.

 ~Counter ()
 Destroys the counter.

int Process (int)
 Processes the current input coming from the perceptron.

float GetReliability ()
 Returns the last whistle's reliability.


Private Attributes

int mPrevious
 previous perceptron's state

TimeSpecsType mSpecs
 Timing specifics: see TimeSpecStruct.h.

unsigned int mEventStackPointer
 Points to the current event.

EventType mpEventStack [5]
 The main event stack.

unsigned int mNumWhistles
 Counter for multiple whistles.

float mReliability
 Current reliability.

float mLastReliability
 Last message's reliability.


Detailed Description

The whistle counter.

It receives the perceptron's output and recognises short, long or multiple whistles.


Constructor & Destructor Documentation

Counter::Counter TimeSpecsType   ) 
 

Starts the whistle counter.The start situation is "No Whistle" from a long time.

Parameters:
tspecs Time specifics used for recognition.
Refer to the manual (Chapter 1) for details

Counter::~Counter  ) 
 

Destroys the counter.


Member Function Documentation

float Counter::GetReliability  ) 
 

Returns the last whistle's reliability.

Reliability is calculated in the Process() function

Returns:
The last whistle's reliability

int Counter::Process int   ) 
 

Processes the current input coming from the perceptron.

Parameters:
status Accepted values are:
+1: A whistle is beeing blown.
-1: No whistles are beeing blown.
Returns:
The message:
NO_WHISTLES if no whistles have been detected
SHORT_WHISTLE if a short whistle followed by a valid long interval has been detected
LONG_WHISTLE if a long whistle followed by a valid long interval has been detected
the multiplicity of the whistle if a multiple whistle followed by a valid long interval has been detected
Whenever this function is called, the stack and the current reliability are updated. A Whistle whose length is greater than ShortSteps, but smaller than LongSteps is recognised as the closer one(short or long) with a maximum reliability of 0.8. Whenever an event (Whistle or Noise) is discarded, as its length is smaller than MinWhistleSteps (or MinIntervalSteps), the current reliability il lowered. For the complete algorithm description, refer to the manual(Chapter 1).


Member Data Documentation

unsigned int Counter::mEventStackPointer [private]
 

Points to the current event.

float Counter::mLastReliability [private]
 

Last message's reliability.

unsigned int Counter::mNumWhistles [private]
 

Counter for multiple whistles.

EventType Counter::mpEventStack[5] [private]
 

The main event stack.

int Counter::mPrevious [private]
 

previous perceptron's state

float Counter::mReliability [private]
 

Current reliability.

TimeSpecsType Counter::mSpecs [private]
 

Timing specifics: see TimeSpecStruct.h.


The documentation for this class was generated from the following file:
Generated on Fri Jul 23 11:36:02 2004 for WhistleRecogniser by doxygen 1.3.7