EnigmaIOT  0.9.8
Secure sensor and gateway platform based on ESP8266 and ESP32
GwOutput_dummy.cpp
Go to the documentation of this file.
1 
11 #include <Arduino.h>
12 #include "GwOutput_dummy.h"
13 #include <ESPAsyncWebServer.h>
14 #include <helperFunctions.h>
15 #include <EnigmaIOTdebug.h>
16 
17 #ifdef ESP32
18 #include <SPIFFS.h>
19 #include "esp_system.h"
20 #include "esp_event.h"
21 #include "esp_tls.h"
22 #elif defined(ESP8266)
23 #include <Hash.h>
24 #endif // ESP32
25 
26 #include <FS.h>
27 
28 
30 
32 
33 }
34 
36  return true;
37 }
38 
40  return true;
41 }
42 
44 
45 }
46 
48  DEBUG_INFO ("Begin");
49  return true;
50 }
51 
52 
54 
55 }
56 
57 bool GatewayOutput_dummy::outputDataSend (char* address, char* data, size_t length, GwOutput_data_type_t type) {
58  DEBUG_WARN ("Output data send. Address %s. Data %.*s", address, length, data);
59  return true;
60 }
61 
62 bool GatewayOutput_dummy::outputControlSend (char* address, uint8_t* data, size_t length) {
63  DEBUG_INFO ("Output control send. Address %s. Data %s", address, printHexBuffer (data, length));
64  return true;
65 }
66 
67 bool GatewayOutput_dummy::newNodeSend (char* address, uint16_t node_id) {
68  DEBUG_WARN ("New node: %s NodeID: %d", address, node_id);
69  return true;
70 }
71 
73  DEBUG_WARN ("Node %s disconnected. Reason %d", address, reason);
74  return true;
75 }
GatewayOutput_dummy::loadConfig
bool loadConfig()
Loads output module configuration.
Definition: GwOutput_dummy.cpp:39
GatewayOutput_dummy::configManagerStart
void configManagerStart(EnigmaIOTGatewayClass *enigmaIotGw)
Called when wifi manager starts config portal.
Definition: GwOutput_dummy.cpp:31
EnigmaIOTGatewayClass
Main gateway class. Manages communication with nodes and sends data to upper layer.
Definition: EnigmaIOTGateway.h:120
GatewayOutput_dummy::nodeDisconnectedSend
bool nodeDisconnectedSend(char *address, gwInvalidateReason_t reason)
Send node disconnection notification.
Definition: GwOutput_dummy.cpp:72
GwOutput
GatewayOutput_dummy GwOutput
Definition: GwOutput_dummy.cpp:29
GatewayOutput_dummy::begin
bool begin()
Starts output module.
Definition: GwOutput_dummy.cpp:47
printHexBuffer
char * printHexBuffer(const uint8_t *buffer, uint16_t len)
Debug helper function that generates a string that represent a buffer hexadecimal values.
Definition: helperFunctions.cpp:16
GatewayOutput_dummy::loop
void loop()
Should be called often for module management.
Definition: GwOutput_dummy.cpp:53
GatewayOutput_dummy::saveConfig
bool saveConfig()
Saves output module configuration.
Definition: GwOutput_dummy.cpp:35
GatewayOutput_dummy::newNodeSend
bool newNodeSend(char *address, uint16_t node_id)
Send new node notification.
Definition: GwOutput_dummy.cpp:67
GwOutput_data_type_t
enum GwOutput_data_type GwOutput_data_type_t
GatewayOutput_dummy::outputControlSend
bool outputControlSend(char *address, uint8_t *data, size_t length)
Send control data from nodes.
Definition: GwOutput_dummy.cpp:62
GatewayOutput_dummy
Definition: GwOutput_dummy.h:21
GatewayOutput_dummy::configManagerExit
void configManagerExit(bool status)
Called when wifi manager exits config portal.
Definition: GwOutput_dummy.cpp:43
data
@ data
Definition: GwOutput_generic.h:23
helperFunctions.h
Auxiliary function definition.
GatewayOutput_dummy::outputDataSend
bool outputDataSend(char *address, char *data, size_t length, GwOutput_data_type_t type=data)
Send data from nodes.
Definition: GwOutput_dummy.cpp:57
gwInvalidateReason_t
gwInvalidateReason_t
Key invalidation reason definition.
Definition: EnigmaIOTGateway.h:75
EnigmaIOTdebug.h
Auxiliary functions for debugging over Serial.
status
@ status
Definition: GwOutput_generic.h:25
GwOutput_dummy.h
Dummy Gateway output module.