AIM
 All Classes Functions Variables Typedefs Enumerations
Loudness Class Reference
Inheritance diagram for Loudness:
AIM

Public Member Functions

 Loudness (std::string name="loudness", uint minNPoints=1 *60 *6, bool debug=false)
 
void doTick ()
 
- Public Member Functions inherited from AIM
 AIM (std::string name="")
 
 AIM (const AIM &other)
 
AIMoperator= (const AIM &rhs)
 
virtual void addDataSubscriber (const std::string &key, AIM *subscriber)
 
virtual void removeDataSubscriber (const std::string &key)
 
virtual AIMValue setProperty (const std::string &key, AIMValue value)
 
virtual AIMValue getProperty (std::string key) const
 
virtual void sendData ()
 
virtual void addData (const AIMData &data)
 
virtual std::string exportProperties ()
 
virtual std::vector< std::pair
< std::string, AIMValue > > 
getOutputData (bool clear_output=false)
 
virtual std::vector< std::pair
< std::string, AIMValue > > 
getInputData (bool clear_input=false)
 
virtual AIMgetDataSubscriber (std::string subscriber)
 
virtual const std::map
< std::string, AIMValue > & 
getProperties ()
 
virtual std::string getName () const
 
virtual std::vector< AIMValuegetRequirements () const
 
virtual bool requirementsAreUpdated (bool reset=true) const
 
virtual void setProperties (const std::map< std::string, AIMValue > &properties)
 

Additional Inherited Members

- Public Types inherited from AIM
typedef std::pair< std::string,
AIMValue
AIMData
 
typedef std::queue< AIMDataAIMDataQueue
 
typedef std::queue< AIMValueAIMValueQueue
 
typedef std::map< std::string,
AIMValueQueue
InputDataQueue
 
- Static Public Attributes inherited from AIM
static const std::string VERSION = AIM_VERSION
 
- Protected Member Functions inherited from AIM
void setDataSubscribers (const std::map< std::string, AIM * > &subscribers)
 
void setInputDataQueue (const InputDataQueue &inputDataQueue)
 
void setOutputDataQueue (const AIMDataQueue &outputDataQueue)
 
- Protected Attributes inherited from AIM
std::string name
 
std::vector< AIMValuerequirements
 
bool requirementsUpdated
 
std::map< std::string, AIM * > dataSubscribers
 
std::map< std::string, AIMValueproperties
 
InputDataQueue inputDataQueue
 
AIMDataQueue outputDataQueue
 

Constructor & Destructor Documentation

Loudness::Loudness ( std::string  name = "loudness",
uint  minNPoints = 1*60*6,
bool  debug = false 
)

Init module with name and minimum number of points needed

Set the requirement for noise sensor (no sample frequency is enforced) and initializes the properties in the module

Parameters
nameModule name (default loudness)
minNPointsMinimal number of datapoints needed before starting to calculate loudness (default 360, based on 1 per minute
debugIf debug is true, it starts outputting right away and also stores the variables used to calculate min max normalization

Member Function Documentation

void Loudness::doTick ( )
virtual

Process one new incoming datapoint

This method checks if min and max values have been set, updates them if the new value increases the range, and normalizes the value within the range indicated by the min and max values.

Reimplemented from AIM.


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