deleted file which was renamed
This commit is contained in:
parent
ff62ab8427
commit
0a5099e293
@ -1,68 +0,0 @@
|
||||
#include "ThermalMonitor.h"
|
||||
#include "ThermalComponentIF.h"
|
||||
#include "../monitoring/MonitoringIF.h"
|
||||
ThermalMonitor::~ThermalMonitor() {
|
||||
}
|
||||
|
||||
void ThermalMonitor::sendTransitionEvent(float currentValue,
|
||||
ReturnValue_t state) {
|
||||
switch (state) {
|
||||
case MonitoringIF::BELOW_LOW_LIMIT:
|
||||
EventManagerIF::triggerEvent(reportingId,
|
||||
ThermalComponentIF::COMPONENT_TEMP_OOL_LOW, state);
|
||||
break;
|
||||
case MonitoringIF::ABOVE_HIGH_LIMIT:
|
||||
EventManagerIF::triggerEvent(reportingId,
|
||||
ThermalComponentIF::COMPONENT_TEMP_OOL_HIGH, state);
|
||||
break;
|
||||
case ThermalComponentIF::BELOW_OPERATIONAL_LIMIT:
|
||||
EventManagerIF::triggerEvent(reportingId,
|
||||
ThermalComponentIF::COMPONENT_TEMP_LOW, state);
|
||||
break;
|
||||
case ThermalComponentIF::ABOVE_OPERATIONAL_LIMIT:
|
||||
EventManagerIF::triggerEvent(reportingId,
|
||||
ThermalComponentIF::COMPONENT_TEMP_HIGH, state);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool ThermalMonitor::isAboveHighLimit() {
|
||||
if (oldState == ThermalComponentIF::ABOVE_OPERATIONAL_LIMIT) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
ReturnValue_t ThermalMonitor::translateState(ThermalComponentIF::State state, float sample, float lowerLimit,
|
||||
float upperLimit, bool componentIsOperational) {
|
||||
if (ThermalComponentIF::isIgnoredState(state)) {
|
||||
setToUnchecked();
|
||||
return MonitoringIF::UNCHECKED;
|
||||
}
|
||||
switch (state) {
|
||||
case ThermalComponentIF::OUT_OF_RANGE_LOW:
|
||||
return monitorStateIs(MonitoringIF::BELOW_LOW_LIMIT, sample, lowerLimit);
|
||||
case ThermalComponentIF::NON_OPERATIONAL_LOW:
|
||||
if (componentIsOperational) {
|
||||
return monitorStateIs(ThermalComponentIF::BELOW_OPERATIONAL_LIMIT, sample, lowerLimit);
|
||||
} else {
|
||||
return monitorStateIs(HasReturnvaluesIF::RETURN_OK, sample, 0.0);
|
||||
}
|
||||
case ThermalComponentIF::OPERATIONAL:
|
||||
return monitorStateIs(HasReturnvaluesIF::RETURN_OK, sample, 0.0);
|
||||
case ThermalComponentIF::NON_OPERATIONAL_HIGH:
|
||||
if (componentIsOperational) {
|
||||
return monitorStateIs(ThermalComponentIF::ABOVE_OPERATIONAL_LIMIT, sample, upperLimit);
|
||||
} else {
|
||||
return monitorStateIs(HasReturnvaluesIF::RETURN_OK, sample, 0.0);
|
||||
}
|
||||
case ThermalComponentIF::OUT_OF_RANGE_HIGH:
|
||||
return monitorStateIs(MonitoringIF::ABOVE_HIGH_LIMIT, sample, upperLimit);
|
||||
default:
|
||||
//Never reached, all states covered.
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
#ifndef FRAMEWORK_THERMAL_THERMALMONITOR_H_
|
||||
#define FRAMEWORK_THERMAL_THERMALMONITOR_H_
|
||||
|
||||
#include "../monitoring/MonitorReporter.h"
|
||||
#include "ThermalComponentIF.h"
|
||||
|
||||
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_ */
|
Loading…
Reference in New Issue
Block a user