Wemos8266RelaysLedDisplay/src/WebServer.h

28 lines
699 B
C++

#ifndef WebServer_h_included
#define WebServer_h_included
#include <Arduino.h>
#include <ESPAsyncTCP.h> // https://github.com/me-no-dev/AsyncTCP
#include <ESPAsyncWebServer.h>
#include <FS.h>
#include <IOTAppStory.h>
#include "Relays.h"
#include "Clock.h"
class WebServer {
public:
WebServer(Relays *r, Clock *real_t, Clock *model_t):
relays(r),realTime(real_t),modelTime(model_t), checkSoftwareUpdate_ts(0), rebootDevice_ts(0) {};
void begin();
void loop();
void setIAS(IOTAppStory *_ias) { ias = _ias;};
protected:
Relays *relays;
Clock *realTime, *modelTime;
unsigned long checkSoftwareUpdate_ts, rebootDevice_ts;
IOTAppStory *ias;
};
#endif