#ifndef _SENSOR_HISTORY_H #define _SENSOR_HISTORY_H class SensorHistory { public: explicit SensorHistory(const int); ~SensorHistory(); void clear(); void addValue(const float); float getAverage() const; float getMin() const; float getMax() const; float getElement(int) const; float getFirst() const; int getSize() const { return _size; }; int getCount() const { return _cnt; }; protected: int _size; int _index; int _cnt; float* _values; }; #endif /* _SENSOR_HISTORY_H */