mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
recovery
This commit is contained in:
41
include/items/vSensorNode.h
Normal file
41
include/items/vSensorNode.h
Normal file
@@ -0,0 +1,41 @@
|
||||
#ifdef EnableSensorNode
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "Global.h"
|
||||
|
||||
class SensorNode;
|
||||
|
||||
typedef std::vector<SensorNode> MySensorNodeVector;
|
||||
|
||||
struct paramsSensorNode {
|
||||
String tm1;
|
||||
String tm2;
|
||||
String key;
|
||||
float c;
|
||||
float k;
|
||||
};
|
||||
|
||||
class SensorNode {
|
||||
public:
|
||||
SensorNode(const paramsSensorNode& params);
|
||||
~SensorNode();
|
||||
|
||||
void loop();
|
||||
void onChange(String newValue, String incommingKey);
|
||||
void publish();
|
||||
|
||||
private:
|
||||
paramsSensorNode _params;
|
||||
long _minutesPassed;
|
||||
String _updateTime;
|
||||
|
||||
unsigned long prevMillis;
|
||||
unsigned long difference;
|
||||
};
|
||||
|
||||
extern MySensorNodeVector* mySensorNode;
|
||||
|
||||
extern void nodeSensor();
|
||||
extern void publishTimes();
|
||||
#endif
|
||||
Reference in New Issue
Block a user