mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
добавил наследника для класса отправки в сокеты
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "Global.h"
|
||||
#include "Web.h"
|
||||
#include "сlasses/sendJson.h"
|
||||
|
||||
#ifdef STANDARD_WEB_SERVER
|
||||
extern void standWebServerInit();
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
#include "Utils/WiFiUtils.h"
|
||||
#include "AsyncWebServer.h"
|
||||
#include "StandWebServer.h"
|
||||
#include "Web.h"
|
||||
#include "сlasses/sendJson.h"
|
||||
|
||||
@@ -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;
|
||||
12
include/сlasses/sendJsonWs.h
Normal file
12
include/сlasses/sendJsonWs.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
#include "Global.h"
|
||||
|
||||
class SendJsonWs;
|
||||
|
||||
class SendJsonWs {
|
||||
public:
|
||||
SendJsonWs();
|
||||
~SendJsonWs();
|
||||
|
||||
void send(String& jsonArrayElement, uint8_t& _num);
|
||||
};
|
||||
Reference in New Issue
Block a user