EnigmaIOT  0.9.3
Secure sensor and gateway platform based on ESP8266 and ESP32
GwOutput_dummy.h
Go to the documentation of this file.
1 
9 #ifndef _GWOUT_DUMMY_h
10 #define _GWOUT_DUMMY_h
11 
12 #include <Arduino.h>
13 #include <EnigmaIOTGateway.h>
14 #include <GwOutput_generic.h>
15 
16 #if defined(ARDUINO) && ARDUINO >= 100
17 #include "arduino.h"
18 #else
19 #include "WProgram.h"
20 #endif
21 
23 protected:
26 
31  bool saveConfig ();
32 
33 public:
34  String netName;
35  String clientId;
36  String gwTopic;
37 
38  //virtual int send () = 0;
39  //virtual void onReveive () = 0;
40 
45  void configManagerStart (EnigmaIOTGatewayClass* enigmaIotGw);
46 
51  void configManagerExit (bool status);
52 
57  bool begin ();
58 
63  bool loadConfig ();
64 
72  bool outputControlSend (char* address, uint8_t* data, size_t length);
73 
80  bool newNodeSend (char* address, uint16_t node_id);
81 
88  bool nodeDisconnectedSend (char* address, gwInvalidateReason_t reason);
89 
98  bool outputDataSend (char* address, char* data, size_t length, GwOutput_data_type_t type = data);
99 
103  void loop ();
104 
110  downlinkCb = cb;
111  }
112 };
113 
115 
116 #endif // _GWOUT_DUMMY_h
GatewayOutput_dummy::loadConfig
bool loadConfig()
Loads output module configuration.
Definition: GwOutput_dummy.cpp:39
GatewayOutput_generic
Definition: GwOutput_generic.h:31
GatewayOutput_dummy::configManagerStart
void configManagerStart(EnigmaIOTGatewayClass *enigmaIotGw)
Called when wifi manager starts config portal.
Definition: GwOutput_dummy.cpp:31
GatewayOutput_dummy::netName
String netName
EnigmaIOT network name.
Definition: GwOutput_dummy.h:34
EnigmaIOTGatewayClass
Main gateway class. Manages communication with nodes and sends data to upper layer.
Definition: EnigmaIOTGateway.h:204
GwOutput_generic.h
Generic Gateway output module template.
GatewayOutput_dummy::nodeDisconnectedSend
bool nodeDisconnectedSend(char *address, gwInvalidateReason_t reason)
Send node disconnection notification.
Definition: GwOutput_dummy.cpp:73
GwOutput
GatewayOutput_dummy GwOutput
Definition: GwOutput_dummy.cpp:29
GatewayOutput_dummy::clientId
String clientId
clientId
Definition: GwOutput_dummy.h:35
GatewayOutput_dummy::begin
bool begin()
Starts output module.
Definition: GwOutput_dummy.cpp:48
onDlData_t
std::function< void(uint8_t *address, char *nodeName, control_message_type_t msgType, char *data, unsigned int len)> onDlData_t
Definition: GwOutput_generic.h:29
GatewayOutput_dummy::loop
void loop()
Should be called often for module management.
Definition: GwOutput_dummy.cpp:54
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:68
GwOutput_data_type_t
enum GwOutput_data_type GwOutput_data_type_t
GatewayOutput_dummy::downlinkCb
onDlData_t downlinkCb
downlink processing function handle
Definition: GwOutput_dummy.h:25
GatewayOutput_dummy::enigmaIotGateway
EnigmaIOTGatewayClass * enigmaIotGateway
Pointer to EnigmaIOT gateway instance.
Definition: GwOutput_dummy.h:24
GatewayOutput_dummy::outputControlSend
bool outputControlSend(char *address, uint8_t *data, size_t length)
Send control data from nodes.
Definition: GwOutput_dummy.cpp:63
GatewayOutput_dummy
Definition: GwOutput_dummy.h:22
GatewayOutput_dummy::configManagerExit
void configManagerExit(bool status)
Called when wifi manager exits config portal.
Definition: GwOutput_dummy.cpp:44
data
@ data
Definition: GwOutput_generic.h:23
GatewayOutput_dummy::gwTopic
String gwTopic
topic for gateway
Definition: GwOutput_dummy.h:36
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:58
EnigmaIOTGateway.h
Library to build a gateway for EnigmaIoT system.
gwInvalidateReason_t
gwInvalidateReason_t
Key invalidation reason definition.
Definition: EnigmaIOTGateway.h:64
status
@ status
Definition: GwOutput_generic.h:25
GatewayOutput_dummy::setDlCallback
void setDlCallback(onDlData_t cb)
Set data processing function.
Definition: GwOutput_dummy.h:109