2019-05-26 23:04:29 +00:00
|
|
|
#ifndef SystemStatus_h
|
|
|
|
#define SystemStatus_h
|
|
|
|
|
2019-12-24 11:19:19 +00:00
|
|
|
#ifdef ESP32
|
|
|
|
#include <WiFi.h>
|
|
|
|
#include <AsyncTCP.h>
|
2020-05-25 10:00:42 +00:00
|
|
|
#include <SPIFFS.h>
|
2019-12-24 11:19:19 +00:00
|
|
|
#elif defined(ESP8266)
|
2019-12-03 23:16:06 +00:00
|
|
|
#include <ESP8266WiFi.h>
|
|
|
|
#include <ESPAsyncTCP.h>
|
2020-05-25 10:00:42 +00:00
|
|
|
#include <FS.h>
|
2019-05-26 23:04:29 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <ArduinoJson.h>
|
2019-11-30 09:58:28 +00:00
|
|
|
#include <AsyncJson.h>
|
2019-12-03 23:16:06 +00:00
|
|
|
#include <ESPAsyncWebServer.h>
|
2019-05-31 18:58:33 +00:00
|
|
|
#include <SecurityManager.h>
|
2019-05-26 23:04:29 +00:00
|
|
|
|
|
|
|
#define MAX_ESP_STATUS_SIZE 1024
|
|
|
|
#define SYSTEM_STATUS_SERVICE_PATH "/rest/systemStatus"
|
|
|
|
|
|
|
|
class SystemStatus {
|
2019-12-03 23:16:06 +00:00
|
|
|
public:
|
|
|
|
SystemStatus(AsyncWebServer* server, SecurityManager* securityManager);
|
2019-05-26 23:04:29 +00:00
|
|
|
|
2019-12-03 23:16:06 +00:00
|
|
|
private:
|
|
|
|
void systemStatus(AsyncWebServerRequest* request);
|
2019-05-26 23:04:29 +00:00
|
|
|
};
|
|
|
|
|
2020-06-09 20:57:44 +00:00
|
|
|
#endif // end SystemStatus_h
|