Fork of the excellent esp8266-react - https://github.com/rjwats/esp8266-react
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
688 B

  1. #ifndef SystemStatus_h
  2. #define SystemStatus_h
  3. #if defined(ESP8266)
  4. #include <ESP8266WiFi.h>
  5. #include <ESPAsyncTCP.h>
  6. #elif defined(ESP_PLATFORM)
  7. #include <WiFi.h>
  8. #include <AsyncTCP.h>
  9. #endif
  10. #include <ESPAsyncWebServer.h>
  11. #include <ArduinoJson.h>
  12. #include <AsyncArduinoJson6.h>
  13. #include <SecurityManager.h>
  14. #define MAX_ESP_STATUS_SIZE 1024
  15. #define SYSTEM_STATUS_SERVICE_PATH "/rest/systemStatus"
  16. class SystemStatus {
  17. public:
  18. SystemStatus(AsyncWebServer *server, SecurityManager* securityManager);
  19. private:
  20. AsyncWebServer* _server;
  21. SecurityManager* _securityManager;
  22. void systemStatus(AsyncWebServerRequest *request);
  23. };
  24. #endif // end SystemStatus_h