Go to the documentation of this file. 1 #ifndef HIGH_LEAK_DETECTION_H
2 #define HIGH_LEAK_DETECTION_H
58 void reset()
override;
89 const String getLogDescription()
const override;
93 const String getLogID()
const override;
98 const String
getRow(
int row)
const override;
220 #ifdef EMAIL_NOTIFICATION
227 virtual void sendEmailLeakDetected();
LeakDetectionConfig_t alarmConfig
alarm configuration for when there's nobody in the house
Type type
the type of the water leak detection algorithm
HighLeakDetection * highLeakDetection
std::map< int, String(*)(const HighLeakDetection &highLeakDetection)> htmlData
A map of different values (keys) and their associated functions which returns the appropriate values.
HighLeakDetection(PulseCounter *pulseCounter, Type type, LeakDetectionConfig_t normalConfig, LeakDetectionConfig_t alarmConfig)
Constructor of the class.
friend String HTML_resetLimitSecsAlarm(const HighLeakDetection &highLeakDetection)
Associated function for returing the reset time (secs) in the alarm configuration.
~HighLeakDetection()
Descrutor of the class.
float getPercentLeakDetectionReset() const
Returns percentage information about how close a high-water leak is from being detected.
String getFormatOfSettingsToSave() override
Returns the current settings of the algorithm.
friend String HTML_activePercentage(const HighLeakDetection &highLeakDetection)
Associated function for returing the [%] information about how close a leak is from being detected.
void reset() override
Resets the algorithm.
friend String HTML_detectedTime(const HighLeakDetection &highLeakDetection)
Associated function for returing the detection time of a high-water leak.
void testResetLeak() override
Tests if the high-water the algorithm should be reset based on inactivity of pulse on the input pin.
friend String HTML_resetLimitMins(const HighLeakDetection &highLeakDetection)
Associated function for returing the reset time (mins) in the normal configuration.
const String getRow(int row) const override
Returns the content of the row given as a parameter.
int pulseCount
number of pulses detected so far
friend String HTML_bypass(const HighLeakDetection &highLeakDetection)
Associated function for returing information about the state of the bypass.
friend String HTML_resetPercentage(const HighLeakDetection &highLeakDetection)
Associated function for returing the [%] information about how close the algorithm is from being rese...
friend String HTML_detectionLimitAlarm(const HighLeakDetection &highLeakDetection)
Associated function for returing the limit (detection) in terms of the alarm configuration.
friend String HTML_resetLimitHoursAlarm(const HighLeakDetection &highLeakDetection)
Associated function for returing the reset time (hours) in the alarm configuration.
Type
The type of the water leak detection algorithm.
friend String HTML_detectionLimit(const HighLeakDetection &highLeakDetection)
Associated function for returing the limit (detection) in terms of the normal configuration.
friend String HTML_resetLimitMinsAlarm(const HighLeakDetection &highLeakDetection)
Associated function for returing the reset time (mins) in the alarm configuration.
const String getHTMLData(const int id) const override
Since this class is registered as a source of data for the HTML content, it needs return the appropri...
friend String HTML_resetLimitDaysAlarm(const HighLeakDetection &highLeakDetection)
Associated function for returing the reset time (days) in the alarm configuration.
friend String HTML_activePercentageColor(const HighLeakDetection &highLeakDetection)
Associated function for returing a color according to [%] information about how close a leak is from ...
friend String HTML_detectedText(const HighLeakDetection &highLeakDetection)
Associated function for returing information about a high-water leak being detected (2)
void testActiveLeak() override
Tests if a high-water leak has occurred, and if so, it will set the appropriate variables and flags.
friend String HTML_resetLimitDays(const HighLeakDetection &highLeakDetection)
Associated function for returing the reset time (days) in the normal configuration.
PulseCounter * pulseCounter
instance of a pulse counter (input of the system)
float getPercentLeakDetected() const
Returns percentage information about how close the algorithm is from being reset.
friend String HTML_resetLimitSecs(const HighLeakDetection &highLeakDetection)
Associated function for returing the reset time (secs) in the normal configuration.
void update() override
Updates the algorithm.
friend String HTML_detected(const HighLeakDetection &highLeakDetection)
Associated function for returing information about a high-water leak being detected (1)
LeakDetectionConfig_t normalConfig
normal configuarion for when the house is occupied
friend String HTML_resetLimitHours(const HighLeakDetection &highLeakDetection)
Associated function for returing the reset time (hours) in the normal configuration.