HomeWaterLeaksDetection
|
#include "Arduino.h"
#include "vector"
#include "SPI.h"
#include "SD.h"
#include "Setup.h"
#include "Pins.h"
#include "LimitsDefinition.h"
#include "DateTime.h"
#include "EmailSender.h"
#include "DailyOverview.h"
#include "FreeMemoryMeasurement.h"
#include "PulseCounter.h"
#include "LeaksController.h"
#include "ALeakDetectable.h"
#include "LeakDetectionConfig.h"
#include "HighLeakDetection.h"
#include "LowLeakDetection.h"
#include "TotalLeakDetection.h"
Go to the source code of this file.
Functions | |
void | applyDefaultSettings () |
std::vector< String > | split (String &data) |
int | createHighLeakDetection (String data) |
int | createLowLeakDetection (String data) |
int | createTotalLeakDetection (String data) |
int | setSettingsNotification (String data) |
void | loadSettings () |
void | setup () |
void | loop () |
Variables | |
PulseCounter | pulseCounter (SENSOR_PIN) |
std::vector< IControllable * > | controllers |
HighLeakDetection * | highLeakDetection |
LowLeakDetection * | lowLeakDetection |
TotalLeakDetection * | totalLeakDetection |
void applyDefaultSettings | ( | ) |
Definition at line 57 of file main.cpp.
References ALeakDetectable::High, HIGH_LEAK_NORMAL_DEFAULT_CONFIG, highLeakDetection, ALeakDetectable::Low, LOW_LEAK_NORMAL_DEFAULT_CONFIG, lowLeakDetection, pulseCounter, ALeakDetectable::Total, TOTAL_LEAK_NORMAL_DEFAULT_CONFIG, and totalLeakDetection.
Referenced by loadSettings().
int createHighLeakDetection | ( | String | data | ) |
Definition at line 98 of file main.cpp.
References ALeakDetectable::High, HIGH_BYPASS_PIN, highLeakDetection, pulseCounter, split(), and UNUSED.
Referenced by loadSettings().
int createLowLeakDetection | ( | String | data | ) |
Definition at line 118 of file main.cpp.
References ALeakDetectable::Low, LOW_BYPASS_PIN, lowLeakDetection, pulseCounter, split(), and UNUSED.
Referenced by loadSettings().
int createTotalLeakDetection | ( | String | data | ) |
Definition at line 138 of file main.cpp.
References pulseCounter, split(), ALeakDetectable::Total, TOTAL_BYPASS_PIN, totalLeakDetection, and UNUSED.
Referenced by loadSettings().
void loadSettings | ( | ) |
Definition at line 182 of file main.cpp.
References applyDefaultSettings(), createHighLeakDetection(), createLowLeakDetection(), createTotalLeakDetection(), setSettingsNotification(), SETTINGS_FILE_NAME, SS_ETHERNET, and SS_SD_CARD.
Referenced by setup().
void loop | ( | ) |
int setSettingsNotification | ( | String | data | ) |
Definition at line 158 of file main.cpp.
References EmailSender::ALARM, EmailSender::APPLIED_NEW_SETTING, EmailSender::BOOTING, EmailSender::BYPASS, EmailSender::CHANGED_SETTINGS, EmailSender::DAILY_OVERVIEW, EmailSender::enableNotification(), EmailSender::getInstance(), EmailSender::LEAK_DETECTED, EmailSender::RESET, EmailSender::setReceiverEmailAddress(), split(), and EmailSender::VALVE_STATE.
Referenced by loadSettings().
void setup | ( | ) |
Definition at line 228 of file main.cpp.
References Logger::addEntity(), WebServer::addHTMLSource(), LCDController::addItem(), LeaksController::addLeakDetection(), EmailSender::BOOTING, CONFIG_PINS, controllers, Consumption::DAY, Logger::getInstance(), LCDController::getInstance(), FreeMemoryMeasurement::getInstance(), LeaksController::getInstance(), EmailSender::getInstance(), WebServer::getInstance(), DateTime::getInstance(), ALeakDetectable::High, highLeakDetection, loadSettings(), ALeakDetectable::Low, lowLeakDetection, Consumption::MONTH, pulseCounter, EmailSender::sendEmail(), SERIAL_BAUD_RATE, LeaksController::setDailyConsumptionCounter(), LeaksController::setMonthlyConsumptionCounter(), LeaksController::setPulseCounter(), WebServer::setup(), ALeakDetectable::Total, and totalLeakDetection.
std::vector<String> split | ( | String & | data | ) |
Definition at line 82 of file main.cpp.
Referenced by createHighLeakDetection(), createLowLeakDetection(), createTotalLeakDetection(), and setSettingsNotification().
std::vector<IControllable *> controllers |
HighLeakDetection* highLeakDetection |
Definition at line 51 of file main.cpp.
Referenced by applyDefaultSettings(), createHighLeakDetection(), and setup().
LowLeakDetection* lowLeakDetection |
Definition at line 52 of file main.cpp.
Referenced by applyDefaultSettings(), createLowLeakDetection(), and setup().
PulseCounter pulseCounter(SENSOR_PIN) |
Referenced by applyDefaultSettings(), createHighLeakDetection(), createLowLeakDetection(), createTotalLeakDetection(), and setup().
TotalLeakDetection* totalLeakDetection |
Definition at line 53 of file main.cpp.
Referenced by applyDefaultSettings(), createTotalLeakDetection(), and setup().