добавил наследника для класса отправки в сокеты

This commit is contained in:
Dmitry Borisenko
2021-12-28 00:01:01 +01:00
parent 4a7b130b26
commit be35992c84
9 changed files with 54 additions and 37 deletions

View File

@@ -1,6 +1,6 @@
#pragma once
#include "Global.h"
#include "Web.h"
#include "сlasses/sendJson.h"
#ifdef STANDARD_WEB_SERVER
extern void standWebServerInit();

View File

@@ -5,4 +5,4 @@
#include "Utils/WiFiUtils.h"
#include "AsyncWebServer.h"
#include "StandWebServer.h"
#include "Web.h"
#include "сlasses/sendJson.h"

View File

@@ -1,21 +1,23 @@
#pragma once
#include "Global.h"
#include "сlasses/sendJsonWs.h"
class StreamJsonArray;
class SendJson;
class StreamJsonArray {
class SendJson : SendJsonWs {
public:
StreamJsonArray();
~StreamJsonArray();
SendJson();
~SendJson();
void sendFile(String path, uint8_t num);
void loop();
uint8_t _num;
private:
File file;
String _path;
uint8_t _num;
};
extern StreamJsonArray* myStreamJsonArray;
extern SendJson* mySendJson;

View File

@@ -0,0 +1,12 @@
#pragma once
#include "Global.h"
class SendJsonWs;
class SendJsonWs {
public:
SendJsonWs();
~SendJsonWs();
void send(String& jsonArrayElement, uint8_t& _num);
};