EnigmaIOT
0.9.8
Secure sensor and gateway platform based on ESP8266 and ESP32
|
Library to build a node for EnigmaIoT system. More...
#include "WProgram.h"
#include "EnigmaIoTconfig.h"
#include "cryptModule.h"
#include "helperFunctions.h"
#include "Comms_hal.h"
#include "NodeList.h"
#include <cstddef>
#include <cstdint>
#include <ESPAsyncWebServer.h>
#include <ESPAsyncWiFiManager.h>
Go to the source code of this file.
Classes | |
struct | rtcmem_data_t |
Context data to be stored con persistent storage to be used after wake from sleep mode. More... | |
class | EnigmaIOTNodeClass |
Main node class. Manages communication with gateway and allows sending and receiving user data. More... | |
Macros | |
#define | LED_ON LOW |
#define | LED_OFF !LED_ON |
Typedefs | |
typedef nodeMessageType | nodeMessageType_t |
typedef void(* | onNodeDataRx_t) (const uint8_t *mac, const uint8_t *buf, uint8_t len, nodeMessageType_t command, nodePayloadEncoding_t payloadEncoding) |
typedef void(* | onConnected_t) () |
typedef void(* | onDisconnected_t) (nodeInvalidateReason_t reason) |
typedef void(* | onWiFiManagerExit_t) (bool status) |
typedef void(* | onWiFiManagerStarted_t) (void) |
Enumerations | |
enum | nodeMessageType { SENSOR_DATA = 0x01, SENSOR_BRCAST_DATA = 0x81, UNENCRYPTED_NODE_DATA = 0x11, DOWNSTREAM_DATA_SET = 0x02, DOWNSTREAM_BRCAST_DATA_SET = 0x82, DOWNSTREAM_DATA_GET = 0x12, DOWNSTREAM_BRCAST_DATA_GET = 0x92, CONTROL_DATA = 0x03, DOWNSTREAM_CTRL_DATA = 0x04, HA_DISCOVERY_MESSAGE = 0x08, DOWNSTREAM_BRCAST_CTRL_DATA = 0x84, CLOCK_REQUEST = 0x05, CLOCK_RESPONSE = 0x06, NODE_NAME_SET = 0x07, NODE_NAME_RESULT = 0x17, BROADCAST_KEY_REQUEST = 0x08, BROADCAST_KEY_RESPONSE = 0x18, CLIENT_HELLO = 0xFF, SERVER_HELLO = 0xFE, INVALIDATE_KEY = 0xFB } |
Message code definition. More... | |
enum | nodePayloadEncoding_t { RAW = 0x00, CAYENNELPP = 0x81, PROT_BUF = 0x82, MSG_PACK = 0x83, BSON = 0x84, CBOR = 0x85, SMILE = 0x86 } |
enum | dataMessageType_t { DATA_TYPE, CONTROL_TYPE, HA_DISC_TYPE } |
enum | nodeInvalidateReason_t { UNKNOWN_ERROR = 0x00, WRONG_CLIENT_HELLO = 0x01, WRONG_DATA = 0x03, UNREGISTERED_NODE = 0x04, KEY_EXPIRED = 0x05 } |
Key invalidation reason definition. More... | |
Variables | |
EnigmaIOTNodeClass | EnigmaIOTNode |
Library to build a node for EnigmaIoT system.
Definition in file EnigmaIOTNode.h.
#define LED_OFF !LED_ON |
Definition at line 30 of file EnigmaIOTNode.h.
#define LED_ON LOW |
Definition at line 29 of file EnigmaIOTNode.h.
typedef nodeMessageType nodeMessageType_t |
Definition at line 113 of file EnigmaIOTNode.h.
typedef void(* onConnected_t) () |
Definition at line 124 of file EnigmaIOTNode.h.
typedef void(* onDisconnected_t) (nodeInvalidateReason_t reason) |
Definition at line 125 of file EnigmaIOTNode.h.
typedef void(* onNodeDataRx_t) (const uint8_t *mac, const uint8_t *buf, uint8_t len, nodeMessageType_t command, nodePayloadEncoding_t payloadEncoding) |
Definition at line 123 of file EnigmaIOTNode.h.
typedef void(* onWiFiManagerExit_t) (bool status) |
Definition at line 126 of file EnigmaIOTNode.h.
typedef void(* onWiFiManagerStarted_t) (void) |
Definition at line 127 of file EnigmaIOTNode.h.
enum dataMessageType_t |
Enumerator | |
---|---|
DATA_TYPE | User data message |
CONTROL_TYPE | Control message |
HA_DISC_TYPE | Home Assistant Discovery message |
Definition at line 68 of file EnigmaIOTNode.h.
Key invalidation reason definition.
Enumerator | |
---|---|
UNKNOWN_ERROR | Unknown error. Not used by the moment |
WRONG_CLIENT_HELLO | ClientHello message received was invalid |
WRONG_DATA | Data message received could not be decrypted successfuly |
UNREGISTERED_NODE | Data received from an unregistered node |
KEY_EXPIRED | Node key has reached maximum validity time |
Definition at line 78 of file EnigmaIOTNode.h.
enum nodeMessageType |
Message code definition.
Definition at line 35 of file EnigmaIOTNode.h.
Definition at line 58 of file EnigmaIOTNode.h.
|
extern |
Definition at line 2719 of file EnigmaIOTNode.cpp.