ENTS-tock
Environmental NeTworked Sensor firmware on Tock OS
Loading...
Searching...
No Matches
ModuleIrrigation Class Reference

Irrigation module for the esp32. More...

#include <module_handler/include/modules/irrigation.hpp>

Inheritance diagram for ModuleIrrigation:
ModuleHandler::Module

Public Member Functions

 ModuleIrrigation (void)
 
 ~ModuleIrrigation (void)
 
void OnReceive (const Esp32Command &cmd)
 
size_t OnRequest (uint8_t *buffer)
 
void CheckAutoIrrigation ()
 
- Public Member Functions inherited from ModuleHandler::Module
 Module (void)
 Construct a new Module object.
 
 ~Module (void)
 Destroy the Module object.
 
int State (void)
 Get the current state of the module.
 
int Type ()
 Get the message type associated with the module.
 
void Reset (void)
 Resets the module to default state.
 

Additional Inherited Members

- Protected Attributes inherited from ModuleHandler::Module
int state = 0
 
int type = 0
 

Detailed Description

Irrigation module for the esp32.

The irrigation module supports opening and closing an irrigation value that is connect to the esp32.

Definition at line 29 of file irrigation.hpp.

Constructor & Destructor Documentation

◆ ModuleIrrigation()

ModuleIrrigation::ModuleIrrigation ( void  )

Definition at line 21 of file irrigation.cpp.

References ModuleHandler::Module::type.

◆ ~ModuleIrrigation()

ModuleIrrigation::~ModuleIrrigation ( void  )

Definition at line 25 of file irrigation.cpp.

Member Function Documentation

◆ CheckAutoIrrigation()

void ModuleIrrigation::CheckAutoIrrigation ( )

Handles irrigation based on soil moisture measurements

Definition at line 48 of file irrigation.cpp.

References auto_irrigation_enabled, check_interval, CheckIrrigationConditions(), and GetSimpleSoilMoisture().

Referenced by loop().

◆ OnReceive()

void ModuleIrrigation::OnReceive ( const Esp32Command &  cmd)
virtual
See also
ModuleHandler::Module.OnReceive

Implements ModuleHandler::Module.

Definition at line 29 of file irrigation.cpp.

References Check().

◆ OnRequest()

size_t ModuleIrrigation::OnRequest ( uint8_t *  buffer)
virtual
See also
ModuleHandler::Module.OnRequest

Implements ModuleHandler::Module.

Definition at line 43 of file irrigation.cpp.

References buffer.


The documentation for this class was generated from the following files: