Go to the documentation of this file. 1 #ifndef A_LEAK_DETECTABLE_H
2 #define A_LEAK_DETECTABLE_H
4 #include "ArduinoSTL.h"
33 #ifdef EMAIL_NOTIFICATION
179 #ifdef EMAIL_NOTIFICATION
LeakDetectionConfig_t alarmConfig
alarm configuration for when there's nobody in the house
@ Total
total water leak detection algorithm
String timeOfDetection
time when the leak has been detected
virtual ~ALeakDetectable()
Destructor of the class.
int requestUpdateAlarmConfig
flag if the new alarms config should be applied
void changeStateOfHomeAlarm(bool state)
Changes the state of the home alarm.
Type type
the type of the water leak detection algorithm
String getType() const
Returns the type of the water leak detection algorithm.
@ Low
low water leak detection algorithm
Type
different types of e-mail that can be sent to the user
int resetWhenDetected
the reset value (%) when a leak was detected
LeakDetectionConfig_t * config
pointer to the current configuration
bool detected
indication if a leak has been detected
void updateAlarmConfig(LeakDetectionConfig_t newAlarmConfig)
Updates the alarm settings.
@ High
high water leak detection algorithm
virtual void update()=0
This method is called for updating its state.
virtual String getFormatOfSettingsToSave()=0
Returns a string containing the current settings of the detection algorithm.
void updateNormalConfig(LeakDetectionConfig_t newNormalConfig)
Updates the normal settings.
void applyNewConfig()
Applies the new config configuration.
int stateOfHomeAlarm
the current state of the home alarm
int isActive() const
Returns a flag whether of not a leak has been detected and the bypass is off.
LeakDetectionConfig_t newNormalConfig
new parameters of the normal config when the user changes them
LeakDetectionConfig_t getAlarmConfig()
Returns the current alarm config.
Type
The type of the water leak detection algorithm.
virtual void testActiveLeak()=0
Test is a water leak has been detected.
int active
indication if a leak has been detected + bypass is off
LeakDetectionConfig_t newAlarmConfig
new parameters of the alarm config when the user changes them
int oldBypassValue
old bypass value (used for sending e-mails)
LeakDetectionConfig_t getNormalConfig()
Returns the current normal config.
PulseCounter * pulseCounter
instance of a pulse counter (input of the system)
int requestUpdateNormalConfig
flag if the new normal config should be applied
virtual void testResetLeak()=0
Test is a water leak has been detected.
virtual void reset()=0
This method resets the algorithm.
LeakDetectionConfig_t normalConfig
normal configuarion for when the house is occupied
ALeakDetectable(PulseCounter *pulseCounter, Type type, LeakDetectionConfig_t normalConfig, LeakDetectionConfig_t alarmConfig)
Constructor of the class.