ENTS-tock
Environmental NeTworked Sensor firmware on Tock OS
Loading...
Searching...
No Matches
webserver.hpp
Go to the documentation of this file.
1#ifndef LIB_IRRIGATION_INCLUDE_WEBSERVER_HPP
2#define LIB_IRRIGATION_INCLUDE_WEBSERVER_HPP
3
4#include <libents/proto/controller.pb.h>
5
9void SetupServer();
10
14void HandleClient();
15
16#endif // LIB_IRRIGATION_INCLUDE_WEBSERVER_HPP
17
21IrrigationCommand_State GetSolenoidState();
22
26void SetSolenoidState(IrrigationCommand_State newState);
27
28// Auto irrigation control functions
29void EnableAutoIrrigation(float min_thresh, float max_thresh);
32float GetMinThreshold();
33float GetMaxThreshold();
34unsigned long GetCheckInterval();
35void SetCheckInterval(unsigned long interval_ms);
void SetCheckInterval(unsigned long interval_ms)
IrrigationCommand_State GetSolenoidState()
Get the current solenoid state.
Definition webserver.cpp:30
void SetupServer()
Setup endpoints for the webserver.
void EnableAutoIrrigation(float min_thresh, float max_thresh)
bool IsAutoIrrigationEnabled()
void SetSolenoidState(IrrigationCommand_State newState)
Set the solenoid state.
Definition webserver.cpp:33
float GetMaxThreshold()
float GetCurrentMoistureFromCache()
float GetSimpleSoilMoisture()
unsigned long GetCheckInterval()
void HandleClient()
Handle requests from the webserver.
void CheckIrrigationConditions()
float GetMinThreshold()
void DisableAutoIrrigation()