EnigmaIOT  0.9.8
Secure sensor and gateway platform based on ESP8266 and ESP32
NodeList.h
Go to the documentation of this file.
1 
9 #ifndef _NODELIST_h
10 #define _NODELIST_h
11 
12 #if defined(ARDUINO) && ARDUINO >= 100
13  #include "Arduino.h"
14 #else
15  #include "WProgram.h"
16 #endif
17 #include "EnigmaIoTconfig.h"
18 #include "Filter.h"
19 
25  INIT,
29  SLEEP
30 };
31 
32 typedef enum {
33  NAME_OK = 0,
35  EMPTY_NAME = -2,
36  TOO_LONG = -3
38 
39 typedef enum node_status status_t;
40 
41 typedef enum {
47  IRRELEVANT = 10,
48  UNKNOWN_REASON = 0
50 
51 typedef enum control_message_type {
52  VERSION = 0x01,
53  VERSION_ANS = 0x81,
54  SLEEP_GET = 0x02,
55  SLEEP_SET = 0x03,
56  SLEEP_ANS = 0x82,
57  IDENTIFY = 0x04,
58  RESET = 0x05,
59  RESET_ANS = 0x85,
60  RSSI_GET = 0x06,
61  RSSI_ANS = 0x86,
62  NAME_GET = 0x07,
63  NAME_ANS = 0x08,
64  NAME_SET = 0x87,
65  RESTART_NODE = 0x09,
67  BRCAST_KEY = 0x10,
68  OTA = 0xEF,
69  OTA_ANS = 0xFF,
70  USERDATA_GET = 0x00,
71  USERDATA_SET = 0x20,
72  INVALID = 0xF0
73  //USERDATA_ANS = 0x90
75 
76 typedef enum ota_status {
83  OTA_FINISHED = 6
85 
89 struct node_instance {
91  uint16_t nodeId;
92  uint8_t key[32];
93  uint16_t lastMessageCounter;
94  uint16_t lastControlCounter;
96  time_t keyValidFrom;
97  time_t lastMessageTime;
99  bool keyValid = false;
100  bool sleepyNode = true;
102 };
103 
104 typedef struct node_instance node_t;
105 
109 class Node {
110 public:
115  Node ();
116 
122  explicit Node (node_t nodeData);
123 
128  uint8_t *getMacAddress () {
129  return mac;
130  }
131 
136  uint16_t getNodeId () {
137  return nodeId;
138  }
139 
144  void setNodeId (uint16_t nodeId) {
145  this->nodeId = nodeId;
146  }
147 
152  char* getNodeName () {
153  if (strlen (nodeName)) {
154  return nodeName;
155  } else {
156  return NULL;
157  }
158  }
159 
164  void setNodeName (const char* name) {
165  memset (nodeName, 0, NODE_NAME_LENGTH);
166  strncpy (nodeName, name, NODE_NAME_LENGTH);
167  }
168 
173  uint8_t *getEncriptionKey () {
174  return key;
175  }
176 
181  void setEncryptionKey (const uint8_t* key);
182 
187  time_t getKeyValidFrom () {
188  return keyValidFrom;
189  }
190 
196  this->keyValidFrom = keyValidFrom;
197  }
198 
203  time_t getLastMessageTime () {
204  return lastMessageTime;
205  }
206 
211  lastMessageTime = millis ();
212  }
213 
218  uint16_t getLastMessageCounter () {
219  return lastMessageCounter;
220  }
221 
226  uint16_t getLastControlCounter () {
227  return lastControlCounter;
228  }
229 
235  return lastDownlinkMsgCounter;
236  }
237 
242  void setLastMessageCounter (uint16_t counter) {
243  lastMessageCounter = counter;
244  }
245 
250  void setLastControlCounter (uint16_t counter) {
251  lastControlCounter = counter;
252  }
253 
258  void setLastDownlinkMsgCounter (uint16_t counter) {
259  lastDownlinkMsgCounter = counter;
260  }
261 
266  void setMacAddress (const uint8_t *macAddress) {
267  if (macAddress) {
268  memcpy (mac, macAddress, 6);
269  }
270  }
271 
276  bool isKeyValid () {
277  return keyValid;
278  }
279 
284  void setKeyValid (bool status) {
285  keyValid = status;
286  }
287 
292  bool isRegistered () {
293  return status == REGISTERED;
294  }
295 
301  return status;
302  }
303 
309  this->status = status;
310  }
311 
316  node_t getNodeData ();
317 
322  void printToSerial (Stream *port = &Serial);
323 
327  void reset ();
328 
334  void setSleepy (bool sleepy) {
335  if (initAsSleepy) {
336  sleepyNode = sleepy;
337  } else {
338  sleepyNode = false;
339  }
340  }
341 
346  void setInitAsSleepy (bool sleepy) {
347  initAsSleepy = sleepy;
348  }
349 
354  bool getInitAsSleepy () {
355  return initAsSleepy;
356  }
357 
363  bool getSleepy () {
364  return sleepyNode;
365  }
366 
374 #ifndef DISABLE_BRCAST
375  return broadcastEnabled;
376 #else
377  return false;
378 #endif
379  }
380 
386  void enableBroadcast (bool broadcast) {
387 #ifndef DISABLE_BRCAST
388  broadcastEnabled = broadcast;
389 #endif
390  }
391 
396  void setBroadcastKeyRequested (bool request) {
397  broadcastKeyRequested = request;
398  }
399 
405  return broadcastKeyRequested;
406  }
407 
412  void updatePacketsRate (float value);
413 
418  int8_t getRSSI () {
419  return rssi;
420  }
421 
426  void setRSSI (int8_t rssi) {
427  this->rssi = rssi;
428  }
429 
434  bool useTimeSync () {
435  return askedTimeSync;
436  }
437 
442  askedTimeSync = true;
443  }
444 
449  uint8_t* getVersion () {
450  return enigmaIOTVersion;
451  }
452 
459  void setVersion (uint8_t major, uint8_t minor, uint8_t incremental) {
460  enigmaIOTVersion[0] = major;
461  enigmaIOTVersion[1] = minor;
462  enigmaIOTVersion[2] = incremental;
463  }
464 
466  size_t qMessageLength;
467  bool qMessagePending = false;
468 
469  uint32_t packetNumber = 0;
470  uint32_t packetErrors = 0;
471  double per = 0;
472  double packetsHour = 0;
473  //int64_t t1, t2, t3, t4; ///< @brief Timestaps to calculate clock offset
474 
475 protected:
476 //#define KEYLENGTH 32
477  bool keyValid;
482  uint16_t nodeId;
483  timer_t keyValidFrom;
484  bool sleepyNode = true;
485  bool broadcastEnabled = false;
486  bool broadcastKeyRequested = false;
488  bool askedTimeSync = false;
490  uint8_t key[KEY_LENGTH];
491  timer_t lastMessageTime;
494  int8_t rssi;
495  uint8_t enigmaIOTVersion[3];
496 
500  void initRateFilter ();
501 
502  friend class NodeList;
503 };
504 
505 
506 class NodeList {
507 public:
508 
512  NodeList ();
513 
519  Node *getNodeFromID (uint16_t nodeId);
520 
526  Node *getNodeFromMAC (const uint8_t* mac);
527 
533  Node* getNodeFromName (const char* name);
534 
541  int8_t checkNodeName (const char* name, const uint8_t* address);
542 
547  Node *findEmptyNode ();
548 
553  uint16_t countActiveNodes ();
554 
560  bool unregisterNode (uint16_t nodeId);
561 
567  bool unregisterNode (const uint8_t* mac);
568 
574  bool unregisterNode (Node *node);
575 
581  Node *getNextActiveNode (uint16_t nodeId);
582 
588  Node *getNextActiveNode (Node* node);
589 
595  Node *getNewNode (const uint8_t* mac);
596 
601  void printToSerial (Stream *port);
602 
608  return &broadcastNode;
609  }
610 
614  void initBroadcastNode ();
615 
622  }
623 
629  }
630 
631 protected:
635 
636 };
637 
638 
639 #endif
640 
OTA_CHECK_OK
@ OTA_CHECK_OK
Definition: NodeList.h:79
Node::lastMessageCounter
uint16_t lastMessageCounter
Last message counter state for specific Node.
Definition: NodeList.h:479
OTA_ERROR_RESTART
@ OTA_ERROR_RESTART
Definition: NodeList.h:43
NodeList::broadcastNode
Node broadcastNode
Node instance that holds data used for broadcast messages. This does not represent any individual nod...
Definition: NodeList.h:633
Node::broadcastKeyRequested
bool broadcastKeyRequested
Node is waiting for broadcast key.
Definition: NodeList.h:486
Node::setLastDownlinkMsgCounter
void setLastDownlinkMsgCounter(uint16_t counter)
Sets counter for last downlink message from gateway.
Definition: NodeList.h:258
VERSION_ANS
@ VERSION_ANS
Definition: NodeList.h:53
IDENTIFY
@ IDENTIFY
Definition: NodeList.h:57
node_instance::lastMessageCounter
uint16_t lastMessageCounter
Last message counter state for specific Node.
Definition: NodeList.h:93
Node::setLastMessageTime
void setLastMessageTime()
Sets current moment as last node message time.
Definition: NodeList.h:210
NodeList::findEmptyNode
Node * findEmptyNode()
Searches for a free place for a new Node instance.
Definition: NodeList.cpp:234
Node::packetNumber
uint32_t packetNumber
Number of packets received from node to gateway.
Definition: NodeList.h:469
SLEEP_SET
@ SLEEP_SET
Definition: NodeList.h:55
RESTART_NODE
@ RESTART_NODE
Definition: NodeList.h:65
NodeList::getNodeFromName
Node * getNodeFromName(const char *name)
Gets node that correspond with given node name.
Definition: NodeList.cpp:174
EMPTY_NAME
@ EMPTY_NAME
Definition: NodeList.h:35
Node::lastMessageTime
timer_t lastMessageTime
Node state.
Definition: NodeList.h:491
USERDATA_SET
@ USERDATA_SET
Definition: NodeList.h:71
ENIGMAIOT_ADDR_LEN
static const size_t ENIGMAIOT_ADDR_LEN
Address size. Mac address = 6 bytes.
Definition: EnigmaIoTconfigAdvanced.h:23
node_instance::lastControlCounter
uint16_t lastControlCounter
Last control message counter state for specific Node.
Definition: NodeList.h:94
Node::setNodeName
void setNodeName(const char *name)
Sets Node name.
Definition: NodeList.h:164
NodeList::printToSerial
void printToSerial(Stream *port)
Dumps node list data to a Stream object.
Definition: NodeList.cpp:340
Node::sleepyNode
bool sleepyNode
Node sleepy definition.
Definition: NodeList.h:484
Node::getVersion
uint8_t * getVersion()
Gets node EnigmaIOT version.
Definition: NodeList.h:449
Node::setStatus
void setStatus(status_t status)
Sets status for finite state machine that represents node.
Definition: NodeList.h:308
MAX_MESSAGE_LENGTH
static const uint8_t MAX_MESSAGE_LENGTH
Maximum payload size on ESP-NOW.
Definition: EnigmaIoTconfigAdvanced.h:21
NodeList::nodes
Node nodes[NUM_NODES]
Static Node array that holds maximum number of supported nodes.
Definition: NodeList.h:632
Node::packetErrors
uint32_t packetErrors
Number of errored packets.
Definition: NodeList.h:470
NODE_NAME_LENGTH
static const uint8_t NODE_NAME_LENGTH
Maximum number of characters of node name.
Definition: EnigmaIoTconfigAdvanced.h:25
UNKNOWN_REASON
@ UNKNOWN_REASON
Definition: NodeList.h:48
SLEEP
@ SLEEP
Definition: NodeList.h:29
Node::qMessagePending
bool qMessagePending
True if message should be sent just after next data message
Definition: NodeList.h:467
Node::isKeyValid
bool isKeyValid()
Gets shared key validity for this node.
Definition: NodeList.h:276
Node::setInitAsSleepy
void setInitAsSleepy(bool sleepy)
Records if node started as a sleepy node or not. If it did not started so it will never accept sleep ...
Definition: NodeList.h:346
NodeList::initBroadcastNode
void initBroadcastNode()
Init broadcast node data.
Definition: NodeList.cpp:161
NodeList::getNewNode
Node * getNewNode(const uint8_t *mac)
Finds a node that correspond with given address of creates a new one if it does not exist.
Definition: NodeList.cpp:324
Node::setNodeId
void setNodeId(uint16_t nodeId)
Sets a new Node identifier.
Definition: NodeList.h:144
Node::broadcastIsEnabled
bool broadcastIsEnabled()
Returns if node broadcast mode is enabled. In that case, node is able to send and receive encrypted b...
Definition: NodeList.h:373
Node::isBroadcastKeyRequested
bool isBroadcastKeyRequested()
Checks if node is waiting for broadcast key.
Definition: NodeList.h:404
BRCAST_KEY
@ BRCAST_KEY
Definition: NodeList.h:67
Node::keyValid
bool keyValid
Node shared key valid.
Definition: NodeList.h:477
NodeList::getNodeFromMAC
Node * getNodeFromMAC(const uint8_t *mac)
Gets node that correspond with given address.
Definition: NodeList.cpp:142
NodeList::lastBroadcastMsgCounter
uint16_t lastBroadcastMsgCounter
Last broadcast message counter state for all nodes, both for data and control messages.
Definition: NodeList.h:634
EnigmaIoTconfig.h
Parameter configuration.
NodeList::NodeList
NodeList()
Node list constructor.
Definition: NodeList.cpp:129
node_instance::key
uint8_t key[32]
Shared key.
Definition: NodeList.h:92
OTA
@ OTA
Definition: NodeList.h:68
NodeList::incLastBroadcastMsgCounter
void incLastBroadcastMsgCounter()
Increments last broadcast message counter stata by one.
Definition: NodeList.h:627
Node::initAsSleepy
bool initAsSleepy
Stores initial sleepy node. If this is false, this node does not accept sleep time changes.
Definition: NodeList.h:487
RESTART_CONFIRM
@ RESTART_CONFIRM
Definition: NodeList.h:66
Node::setRSSI
void setRSSI(int8_t rssi)
Stores last RSSI measurement of Gateway.
Definition: NodeList.h:426
RESET
@ RESET
Definition: NodeList.h:58
Node::getSleepy
bool getSleepy()
Gets node working mode regarding battery saving strategy. If node is sleepy it will turn into deep sl...
Definition: NodeList.h:363
Node::setKeyValid
void setKeyValid(bool status)
Sets shared key validity for this node.
Definition: NodeList.h:284
Node::getNodeData
node_t getNodeData()
Gets a struct that represents node object. May be used for node serialization.
Definition: NodeList.cpp:17
OTA_TIMEOUT
@ OTA_TIMEOUT
Definition: NodeList.h:82
node_instance::lastMessageTime
time_t lastMessageTime
Last time a message was received by Node.
Definition: NodeList.h:97
node_instance::keyValid
bool keyValid
Node shared key valid.
Definition: NodeList.h:99
NodeList::getLastBroadcastMsgCounter
uint16_t getLastBroadcastMsgCounter()
Ask for last broadcast message counter state.
Definition: NodeList.h:620
RSSI_GET
@ RSSI_GET
Definition: NodeList.h:60
status_t
enum node_status status_t
Node state.
Definition: NodeList.h:39
INVALID
@ INVALID
Definition: NodeList.h:72
Node::getStatus
status_t getStatus()
Gets status for finite state machine that represents node.
Definition: NodeList.h:300
OTA_START_ERROR
@ OTA_START_ERROR
Definition: NodeList.h:78
OTA_FINISHED
@ OTA_FINISHED
Definition: NodeList.h:83
Node::nodeId
uint16_t nodeId
Node identifier asigned by gateway.
Definition: NodeList.h:482
Node::getNodeId
uint16_t getNodeId()
Gets Node identifier.
Definition: NodeList.h:136
NodeList::unregisterNode
bool unregisterNode(uint16_t nodeId)
Frees up a node and marks it as available.
Definition: NodeList.cpp:258
Node::getLastMessageTime
time_t getLastMessageTime()
Gets last time that node sent a message.
Definition: NodeList.h:203
Node::setVersion
void setVersion(uint8_t major, uint8_t minor, uint8_t incremental)
Sets node EnigmaIOT version.
Definition: NodeList.h:459
node_instance::nodeId
uint16_t nodeId
Node identifier asigned by gateway.
Definition: NodeList.h:91
Node::setKeyValidFrom
void setKeyValidFrom(time_t keyValidFrom)
Sets time when key was agreed with gateway.
Definition: NodeList.h:195
INIT
@ INIT
Definition: NodeList.h:25
Node::setLastControlCounter
void setLastControlCounter(uint16_t counter)
Sets counter for last received control message from node.
Definition: NodeList.h:250
Node::enigmaIOTVersion
uint8_t enigmaIOTVersion[3]
Protocol version, filled when a version message is received.
Definition: NodeList.h:495
node_instance::sleepyNode
bool sleepyNode
Node sleepy definition.
Definition: NodeList.h:100
RSSI_ANS
@ RSSI_ANS
Definition: NodeList.h:61
Node::lastControlCounter
uint16_t lastControlCounter
Last message counter state for specific Node.
Definition: NodeList.h:480
Node::keyValidFrom
timer_t keyValidFrom
Last time that Node and Gateway agreed a key.
Definition: NodeList.h:483
node_instance::nodeName
char nodeName[NODE_NAME_LENGTH]
Node name. Use as a human friendly name to avoid use of numeric address.
Definition: NodeList.h:101
SLEEP_GET
@ SLEEP_GET
Definition: NodeList.h:54
NAME_OK
@ NAME_OK
Definition: NodeList.h:33
Node::setSleepy
void setSleepy(bool sleepy)
Sets node working mode regarding battery saving strategy. If node is sleepy it will turn into deep sl...
Definition: NodeList.h:334
NodeList::getBroadcastNode
Node * getBroadcastNode()
Gets broadcas node instance.
Definition: NodeList.h:607
Node::initRateFilter
void initRateFilter()
Starts smoothing filter.
Definition: NodeList.cpp:67
Node::askedTimeSync
bool askedTimeSync
Definition: NodeList.h:488
WAIT_FOR_SERVER_HELLO
@ WAIT_FOR_SERVER_HELLO
Definition: NodeList.h:26
USER_RESET
@ USER_RESET
Definition: NodeList.h:46
Node::getLastControlCounter
uint16_t getLastControlCounter()
Gets counter for last received control message from node.
Definition: NodeList.h:226
Node::reset
void reset()
Resets all node fields to a default initial and not registered state.
Definition: NodeList.cpp:106
Node::rssi
int8_t rssi
Stores last RSSI measurement.
Definition: NodeList.h:494
Node::getInitAsSleepy
bool getInitAsSleepy()
Gets initial sleepy mode.
Definition: NodeList.h:354
Node::setEncryptionKey
void setEncryptionKey(const uint8_t *key)
Sets encryption key.
Definition: NodeList.cpp:11
Node::status
status_t status
Current node status. See enum node_status
Definition: NodeList.h:478
Node::packetsHour
double packetsHour
Packet rate for a specific nope.
Definition: NodeList.h:472
control_message_type
control_message_type
Definition: NodeList.h:51
node_instance::lastDownlinkMsgCounter
uint16_t lastDownlinkMsgCounter
Last downlink message counter state for specific Node.
Definition: NodeList.h:95
NodeList::getNextActiveNode
Node * getNextActiveNode(uint16_t nodeId)
Gets next active node by nodeId.
Definition: NodeList.cpp:295
Node::getEncriptionKey
uint8_t * getEncriptionKey()
Gets Node encryption key.
Definition: NodeList.h:173
USERDATA_GET
@ USERDATA_GET
Definition: NodeList.h:70
NUM_NODES
static const int NUM_NODES
Maximum number of nodes that this gateway can handle.
Definition: EnigmaIoTconfig.h:32
ota_status_t
enum ota_status ota_status_t
RESTART_AFTER_OTA
@ RESTART_AFTER_OTA
Definition: NodeList.h:42
FilterClass
Definition: Filter.h:29
node_instance
Struct that define node fields. Used for long term storage needs.
Definition: NodeList.h:89
restartReason_t
restartReason_t
Definition: NodeList.h:41
Node::key
uint8_t key[KEY_LENGTH]
Shared key.
Definition: NodeList.h:490
Node::getLastMessageCounter
uint16_t getLastMessageCounter()
Gets counter for last received message from node.
Definition: NodeList.h:218
Node::lastDownlinkMsgCounter
uint16_t lastDownlinkMsgCounter
Last downlink message counter state for specific Node.
Definition: NodeList.h:481
WAIT_FOR_DOWNLINK
@ WAIT_FOR_DOWNLINK
Definition: NodeList.h:27
OTA_OUT_OF_SEQUENCE
@ OTA_OUT_OF_SEQUENCE
Definition: NodeList.h:81
NAME_ANS
@ NAME_ANS
Definition: NodeList.h:63
node_instance::status
status_t status
Node state.
Definition: NodeList.h:98
Node::setMacAddress
void setMacAddress(const uint8_t *macAddress)
Sets node address.
Definition: NodeList.h:266
Node::mac
uint8_t mac[ENIGMAIOT_ADDR_LEN]
Node address.
Definition: NodeList.h:489
KEY_LENGTH
const uint8_t KEY_LENGTH
Key length used by selected crypto algorythm. The only tested value is 32. Change it only if you know...
Definition: EnigmaIoTconfigAdvanced.h:70
Node::getNodeName
char * getNodeName()
Gets Node name.
Definition: NodeList.h:152
Node::setBroadcastKeyRequested
void setBroadcastKeyRequested(bool request)
Mark node to be waiting for broadcast key.
Definition: NodeList.h:396
CONFIG_RESET
@ CONFIG_RESET
Definition: NodeList.h:45
Node::rateFilter
FilterClass * rateFilter
Filter for message rate smoothing.
Definition: NodeList.h:492
node_instance::keyValidFrom
time_t keyValidFrom
Last time that Node and Gateway agreed a key.
Definition: NodeList.h:96
Node::broadcastEnabled
bool broadcastEnabled
Node is able to send broadcast messages.
Definition: NodeList.h:485
Node::updatePacketsRate
void updatePacketsRate(float value)
Adds a new message rate value for filter calculation.
Definition: NodeList.cpp:101
Node
Class definition for a single sensor Node.
Definition: NodeList.h:109
Node::queuedMessage
uint8_t queuedMessage[MAX_MESSAGE_LENGTH]
Message queued for sending to node in case of sleepy mode.
Definition: NodeList.h:465
NodeList::checkNodeName
int8_t checkNodeName(const char *name, const uint8_t *address)
Check Node name for duplicate.
Definition: NodeList.cpp:201
TOO_LONG
@ TOO_LONG
Definition: NodeList.h:36
ALREADY_USED
@ ALREADY_USED
Definition: NodeList.h:34
UNREGISTERED
@ UNREGISTERED
Definition: NodeList.h:24
NodeList
Definition: NodeList.h:506
Node::enableBroadcast
void enableBroadcast(bool broadcast)
Enables node broadcast mode. Node will request broadcast key to Gateway. When it is received node wil...
Definition: NodeList.h:386
RESET_ANS
@ RESET_ANS
Definition: NodeList.h:59
Node::isRegistered
bool isRegistered()
Gets registration state of this node.
Definition: NodeList.h:292
Node::getMacAddress
uint8_t * getMacAddress()
Gets address from Node.
Definition: NodeList.h:128
VERSION
@ VERSION
Definition: NodeList.h:52
Node::getKeyValidFrom
time_t getKeyValidFrom()
Gets last time that key was agreed with gateway.
Definition: NodeList.h:187
Node::Node
Node()
Plain constructor.
Definition: NodeList.cpp:78
OTA_ANS
@ OTA_ANS
Definition: NodeList.h:69
Node::printToSerial
void printToSerial(Stream *port=&Serial)
Dumps node data to the given stream, Serial by default. This method may be used for debugging.
Definition: NodeList.cpp:32
NAME_GET
@ NAME_GET
Definition: NodeList.h:62
REGISTERED
@ REGISTERED
Definition: NodeList.h:28
node_instance::mac
uint8_t mac[ENIGMAIOT_ADDR_LEN]
Node address.
Definition: NodeList.h:90
nodeNameStatus_t
nodeNameStatus_t
Definition: NodeList.h:32
Node::per
double per
Current packet error rate of a specific node.
Definition: NodeList.h:471
NodeList::getNodeFromID
Node * getNodeFromID(uint16_t nodeId)
Gets node that correspond with given nodeId.
Definition: NodeList.cpp:135
Node::nodeName
char nodeName[NODE_NAME_LENGTH]
Node name. Use as a human friendly name to avoid use of numeric address.
Definition: NodeList.h:493
Node::getLastDownlinkMsgCounter
uint16_t getLastDownlinkMsgCounter()
Gets counter for last downlink message from gateway.
Definition: NodeList.h:234
ota_status
ota_status
Definition: NodeList.h:76
OTA_CHECK_FAIL
@ OTA_CHECK_FAIL
Definition: NodeList.h:80
IRRELEVANT
@ IRRELEVANT
Definition: NodeList.h:47
NodeList::countActiveNodes
uint16_t countActiveNodes()
Gets the number of active nodes (registered or registering)
Definition: NodeList.cpp:247
control_message_type_t
enum control_message_type control_message_type_t
NAME_SET
@ NAME_SET
Definition: NodeList.h:64
Node::qMessageLength
size_t qMessageLength
Queued message length.
Definition: NodeList.h:466
node_status
node_status
State definition for nodes.
Definition: NodeList.h:23
Node::setLastMessageCounter
void setLastMessageCounter(uint16_t counter)
Sets counter for last received message from node.
Definition: NodeList.h:242
SLEEP_ANS
@ SLEEP_ANS
Definition: NodeList.h:56
Node::setTimeSyncEnabled
void setTimeSyncEnabled()
Mark node as time sync enabled.
Definition: NodeList.h:441
Node::useTimeSync
bool useTimeSync()
Gets node info to check if it has requested time sync ever.
Definition: NodeList.h:434
RESTART_REQUESTED
@ RESTART_REQUESTED
Definition: NodeList.h:44
Node::getRSSI
int8_t getRSSI()
Gets last RSSI measurement of Gateway.
Definition: NodeList.h:418
OTA_STARTED
@ OTA_STARTED
Definition: NodeList.h:77
Filter.h
Filter to process message rate or other values.