mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
добавил буффер char
This commit is contained in:
@@ -9,3 +9,4 @@
|
||||
#include "classes/NotAsync.h"
|
||||
#include "ESPConfiguration.h"
|
||||
#include "MqttClient.h"
|
||||
#include "classes/CommandBuf.h"
|
||||
|
||||
28
include/classes/CommandBuf.h
Normal file
28
include/classes/CommandBuf.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
#include "Global.h"
|
||||
|
||||
#define MAX_COMMAND_LENGTH 16
|
||||
#define BUFFER 128
|
||||
|
||||
class CommandBuf;
|
||||
|
||||
class CommandBuf {
|
||||
public:
|
||||
CommandBuf();
|
||||
~CommandBuf();
|
||||
|
||||
void addCommand(const char* command);
|
||||
|
||||
void printCommands();
|
||||
|
||||
String getLastCommand();
|
||||
|
||||
private:
|
||||
struct CharBufferStruct {
|
||||
char command[MAX_COMMAND_LENGTH + 1];
|
||||
};
|
||||
CharBufferStruct* commandList;
|
||||
int commandCount = 0;
|
||||
};
|
||||
|
||||
extern CommandBuf* myBuf;
|
||||
Reference in New Issue
Block a user