WLED/wled00/NodeStruct.h

35 wiersze
1014 B
C
Czysty Zwykły widok Historia

2021-03-09 15:23:19 +00:00
#ifndef WLED_NODESTRUCT_H
#define WLED_NODESTRUCT_H
2021-01-22 15:17:18 +00:00
/*********************************************************************************************\
* NodeStruct from the ESP Easy project (https://github.com/letscontrolit/ESPEasy)
\*********************************************************************************************/
#include <map>
#include <IPAddress.h>
2021-03-09 16:21:19 +00:00
#define NODE_TYPE_ID_UNDEFINED 0
#define NODE_TYPE_ID_ESP8266 82
#define NODE_TYPE_ID_ESP32 32
2021-01-22 15:17:18 +00:00
/*********************************************************************************************\
* NodeStruct
\*********************************************************************************************/
struct NodeStruct
{
String nodeName;
IPAddress ip;
uint8_t unit;
uint8_t age;
uint8_t nodeType;
uint32_t build;
2021-03-09 15:23:19 +00:00
NodeStruct() : age(0), nodeType(0), build(0)
{
for (uint8_t i = 0; i < 4; ++i) { ip[i] = 0; }
}
2021-01-22 15:17:18 +00:00
};
typedef std::map<uint8_t, NodeStruct> NodesMap;
2021-03-09 15:23:19 +00:00
#endif // WLED_NODESTRUCT_H