mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-29 07:32:18 +03:00
Добавляем сценарии https://github.com/biveraxe/IoTScenario
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <WString.h>
|
||||
struct IoTValue {
|
||||
float valD = 0;
|
||||
String valS = "";
|
||||
bool isDecimal = true;
|
||||
};
|
||||
|
||||
class IoTItem {
|
||||
public:
|
||||
@@ -9,7 +13,7 @@ class IoTItem {
|
||||
|
||||
void loop();
|
||||
virtual void doByInterval();
|
||||
virtual void execute(String command, String param);
|
||||
virtual IoTValue execute(String command, std::vector<IoTValue> ¶m);
|
||||
|
||||
void regEvent(String value, String consoleInfo);
|
||||
void regEvent(float value, String consoleInfo);
|
||||
@@ -21,6 +25,8 @@ class IoTItem {
|
||||
unsigned long prevMillis;
|
||||
unsigned long difference;
|
||||
|
||||
IoTValue value; // хранение основного значения, котрое обновляется из сценария, execute(), loop() или doByInterval()
|
||||
|
||||
protected:
|
||||
String _subtype;
|
||||
String _id;
|
||||
@@ -34,3 +40,5 @@ class IoTItem {
|
||||
int _map4;
|
||||
int _round; // 1, 10, 100, 1000, 10000
|
||||
};
|
||||
|
||||
IoTItem* findIoTItem(String name); // поиск экземпляра элемента модуля по имени
|
||||
|
||||
Reference in New Issue
Block a user