mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 22:52:19 +03:00
страница конфигураций в процессе
This commit is contained in:
34
src/modules/virtual/Loging/Loging (1).cpp
Normal file
34
src/modules/virtual/Loging/Loging (1).cpp
Normal file
@@ -0,0 +1,34 @@
|
||||
#include "Global.h"
|
||||
#include "classes/IoTItem.h"
|
||||
|
||||
class Loging : public IoTItem {
|
||||
private:
|
||||
String logval;
|
||||
|
||||
public:
|
||||
Loging(String parameters) : IoTItem(parameters) {
|
||||
jsonRead(parameters, F("logid"), logval);
|
||||
}
|
||||
|
||||
// void setValue(IoTValue Value) {
|
||||
// value = Value;
|
||||
// regEvent((String)(int)value.valD, "Loging");
|
||||
// }
|
||||
|
||||
void doByInterval() {
|
||||
String value = getItemValue(logval);
|
||||
if (value == "") {
|
||||
SerialPrint("E", F("Logging"), F("no value set"));
|
||||
} else {
|
||||
regEvent(value, "Logging");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
void* getAPI_Loging(String subtype, String param) {
|
||||
if (subtype == F("Loging")) {
|
||||
return new Loging(param);
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user