mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
реорганизация файлов, перенос лишнего, рабочая версия
This commit is contained in:
@@ -1,46 +0,0 @@
|
||||
#pragma once
|
||||
#include "Global.h"
|
||||
#ifdef QUEUE_FROM_STR
|
||||
#include <queue>
|
||||
//#include <iostream> долбанный стрим сука
|
||||
|
||||
using namespace std;
|
||||
|
||||
struct QueueItems {
|
||||
String myword;
|
||||
uint8_t num;
|
||||
};
|
||||
|
||||
class QueueFromStruct;
|
||||
|
||||
class QueueFromStruct {
|
||||
public:
|
||||
QueueFromStruct();
|
||||
~QueueFromStruct();
|
||||
|
||||
void push(QueueItems word);
|
||||
void pop();
|
||||
QueueItems front();
|
||||
bool empty();
|
||||
|
||||
private:
|
||||
queue<QueueItems> queue1;
|
||||
QueueItems tmpItem;
|
||||
};
|
||||
|
||||
extern QueueFromStruct* filesQueue;
|
||||
|
||||
//=======проверка очереди из структур=================
|
||||
// myQueueStruct = new QueueFromStruct;
|
||||
// QueueItems myItem;
|
||||
// myItem.myword = "word1";
|
||||
// myQueueStruct->push(myItem);
|
||||
// myItem.myword = "word2";
|
||||
// myQueueStruct->push(myItem);
|
||||
// myItem.myword = "word3";
|
||||
// myQueueStruct->push(myItem);
|
||||
// Serial.println(myQueueStruct->front().myword);
|
||||
// Serial.println(myQueueStruct->front().myword);
|
||||
// Serial.println(myQueueStruct->front().myword);
|
||||
|
||||
#endif
|
||||
@@ -1,31 +0,0 @@
|
||||
#pragma once
|
||||
#include "Global.h"
|
||||
#ifdef QUEUE_FROM_STR
|
||||
#include "classes/QueueFromStruct.h"
|
||||
|
||||
class SendJson;
|
||||
|
||||
class SendJson {
|
||||
public:
|
||||
SendJson();
|
||||
~SendJson();
|
||||
|
||||
void addFileToQueue(String path, uint8_t num);
|
||||
|
||||
void loop();
|
||||
|
||||
void sendWs(String& jsonArrayElement);
|
||||
|
||||
void sendMqtt(String& jsonArrayElement);
|
||||
|
||||
QueueItems myItem;
|
||||
|
||||
private:
|
||||
File file;
|
||||
String _path;
|
||||
uint8_t _num;
|
||||
bool sendingInProgress = false;
|
||||
};
|
||||
|
||||
extern SendJson* sendJsonFiles;
|
||||
#endif
|
||||
Reference in New Issue
Block a user