2018-07-12 16:29:32 +02:00
|
|
|
#ifndef FRAMEWORK_THERMAL_THERMALMONITOR_H_
|
|
|
|
#define FRAMEWORK_THERMAL_THERMALMONITOR_H_
|
|
|
|
|
|
|
|
#include <framework/monitoring/MonitorReporter.h>
|
|
|
|
#include <framework/thermal/ThermalComponentIF.h>
|
|
|
|
|
2020-02-15 18:26:25 +01:00
|
|
|
/**
|
|
|
|
* What does it do. How to use it.
|
|
|
|
*/
|
2018-07-12 16:29:32 +02:00
|
|
|
class ThermalMonitor: public MonitorReporter<float> {
|
|
|
|
public:
|
|
|
|
template<typename ... Args>
|
|
|
|
ThermalMonitor(Args ... args) :
|
|
|
|
MonitorReporter<float>(std::forward<Args>(args)...) {
|
|
|
|
}
|
|
|
|
~ThermalMonitor();
|
|
|
|
ReturnValue_t translateState(ThermalComponentIF::State state, float sample,
|
|
|
|
float lowerLimit, float upperLimit, bool componentIsOperational = true);
|
|
|
|
|
|
|
|
bool isAboveHighLimit();
|
|
|
|
protected:
|
|
|
|
virtual void sendTransitionEvent(float currentValue, ReturnValue_t state);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* FRAMEWORK_THERMAL_THERMALMONITOR_H_ */
|