ENTS-tock
Environmental NeTworked Sensor firmware on Tock OS
Loading...
Searching...
No Matches
webserver.hpp File Reference
#include <libents/proto/controller.pb.h>

Go to the source code of this file.

Functions

void SetupServer ()
 Setup endpoints for the webserver.
 
void HandleClient ()
 Handle requests from the webserver.
 
IrrigationCommand_State GetSolenoidState ()
 Get the current solenoid state.
 
void SetSolenoidState (IrrigationCommand_State newState)
 Set the solenoid state.
 
void EnableAutoIrrigation (float min_thresh, float max_thresh)
 
void DisableAutoIrrigation ()
 
bool IsAutoIrrigationEnabled ()
 
float GetMinThreshold ()
 
float GetMaxThreshold ()
 
unsigned long GetCheckInterval ()
 
void SetCheckInterval (unsigned long interval_ms)
 
float GetSimpleSoilMoisture ()
 
void CheckIrrigationConditions ()
 
float GetCurrentMoistureFromCache ()
 

Function Documentation

◆ CheckIrrigationConditions()

◆ DisableAutoIrrigation()

void DisableAutoIrrigation ( )

Definition at line 192 of file irrigation.cpp.

References auto_irrigation_enabled.

Referenced by HandleAutoToggle().

◆ EnableAutoIrrigation()

void EnableAutoIrrigation ( float  min_thresh,
float  max_thresh 
)

◆ GetCheckInterval()

unsigned long GetCheckInterval ( )

Definition at line 203 of file irrigation.cpp.

References check_interval.

Referenced by HandleAutoIrrigationSetup(), and HandleStatus().

◆ GetCurrentMoistureFromCache()

float GetCurrentMoistureFromCache ( )

Definition at line 209 of file irrigation.cpp.

Referenced by GetCurrentMoisture().

◆ GetMaxThreshold()

float GetMaxThreshold ( )

Definition at line 201 of file irrigation.cpp.

References moisture_max_threshold.

Referenced by HandleAutoToggle(), and HandleStatus().

◆ GetMinThreshold()

float GetMinThreshold ( )

Definition at line 199 of file irrigation.cpp.

References moisture_min_threshold.

Referenced by HandleAutoToggle(), and HandleStatus().

◆ GetSimpleSoilMoisture()

float GetSimpleSoilMoisture ( )

Definition at line 107 of file irrigation.cpp.

References formatTimeRFC1123().

Referenced by ModuleIrrigation::CheckAutoIrrigation().

◆ GetSolenoidState()

IrrigationCommand_State GetSolenoidState ( )

Get the current solenoid state.

Definition at line 30 of file webserver.cpp.

References currentSolenoidState.

Referenced by CheckIrrigationConditions(), HandleState(), and HandleStatus().

◆ HandleClient()

void HandleClient ( )

Handle requests from the webserver.

Definition at line 103 of file webserver.cpp.

References UpdateTimedOperation().

Referenced by loop().

◆ IsAutoIrrigationEnabled()

bool IsAutoIrrigationEnabled ( )

Definition at line 197 of file irrigation.cpp.

References auto_irrigation_enabled.

Referenced by HandleMoisture(), and HandleStatus().

◆ SetCheckInterval()

void SetCheckInterval ( unsigned long  interval_ms)

Definition at line 205 of file irrigation.cpp.

References check_interval.

Referenced by HandleAutoIrrigationSetup().

◆ SetSolenoidState()

void SetSolenoidState ( IrrigationCommand_State  newState)

Set the solenoid state.

Definition at line 33 of file webserver.cpp.

References currentSolenoidState.

Referenced by CheckIrrigationConditions(), HandleAutoToggle(), HandleClose(), HandleOpen(), and UpdateTimedOperation().

◆ SetupServer()

void SetupServer ( )

Setup endpoints for the webserver.

Definition at line 108 of file webserver.cpp.

References HandleAutoIrrigationSetup(), HandleAutoToggle(), HandleClose(), HandleMoisture(), HandleOpen(), HandleState(), HandleStatus(), and HandleTimed().

Referenced by setup().