Definition and access functions for a BeoSub sensor. More...
#include <BeoSub/BeoSubSensor.H>
Public Member Functions | |
BeoSubSensor (const uint qlen=6, const double decay=1.0) | |
Constructor. | |
~BeoSubSensor () | |
Destructor. | |
void | newMeasurement (const T &val) |
Receive a new measurement value. | |
T | getValue () const |
Get current filtered value. | |
void | reset () |
Clear all past measurements. | |
bool | check () const |
Check whether received values are well behaved. |
Definition and access functions for a BeoSub sensor.
This class encapsulates a basic BeoSub sensor. Sensed data consists of streams of T (the template argument) values. Measurements received (e.g., through BeoChip events) are passed to the BeoSubSensor via the newMeasurement() function. Current filtered value is available via the getValue() function. The class is thread-safe.
Definition at line 53 of file BeoSubSensor.H.
BeoSubSensor< T >::BeoSubSensor | ( | const uint | qlen = 6 , |
|
const double | decay = 1.0 | |||
) | [inline] |
Constructor.
Definition at line 45 of file BeoSubSensor.C.
BeoSubSensor< T >::~BeoSubSensor | ( | ) | [inline] |
Destructor.
Definition at line 53 of file BeoSubSensor.C.
bool BeoSubSensor< T >::check | ( | ) | const [inline] |
Check whether received values are well behaved.
Definition at line 100 of file BeoSubSensor.C.
T BeoSubSensor< T >::getValue | ( | ) | const [inline] |
Get current filtered value.
Definition at line 71 of file BeoSubSensor.C.
References averageBeoSubSensorValue().
Referenced by BeoSubOneBal::updateCompass(), and BeoSubOneBal::updateDepth().
void BeoSubSensor< T >::newMeasurement | ( | const T & | val | ) | [inline] |
Receive a new measurement value.
Definition at line 60 of file BeoSubSensor.C.
Referenced by BeoSubOneBal::updateCompass(), BeoSubOneBal::updateDepth(), and BeoSubSim::updateDepth().
void BeoSubSensor< T >::reset | ( | ) | [inline] |
Clear all past measurements.
Definition at line 90 of file BeoSubSensor.C.