EnigmaIOT  0.9.8
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 #if defined(ARDUINO) && ARDUINO >= 100
13 #include "Arduino.h"
14 #else
15 #include "WProgram.h"
16 #endif
17 
18 #include <EnigmaIOTGateway.h>
19 #include <GwOutput_generic.h>
20 
22 protected:
23  //EnigmaIOTGatewayClass* enigmaIotGateway; ///< @brief Pointer to EnigmaIOT gateway instance
24  //onDlData_t downlinkCb; ///< @brief downlink processing function handle
25 
30  bool saveConfig ();
31 
32 public:
33  //String netName; ///< @brief EnigmaIOT network name
34  //String clientId; ///< @brief clientId
35  //String gwTopic; ///< @brief topic for gateway
36 
37  //virtual int send () = 0;
38  //virtual void onReveive () = 0;
39 
44  void configManagerStart (EnigmaIOTGatewayClass* enigmaIotGw);
45 
50  void configManagerExit (bool status);
51 
56  bool begin ();
57 
62  bool loadConfig ();
63 
71  bool outputControlSend (char* address, uint8_t* data, size_t length);
72 
79  bool newNodeSend (char* address, uint16_t node_id);
80 
87  bool nodeDisconnectedSend (char* address, gwInvalidateReason_t reason);
88 
97  bool outputDataSend (char* address, char* data, size_t length, GwOutput_data_type_t type = data);
98 
102  void loop ();
103 
109  downlinkCb = cb;
110  }
111 };
112 
114 
115 #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
EnigmaIOTGatewayClass
Main gateway class. Manages communication with nodes and sends data to upper layer.
Definition: EnigmaIOTGateway.h:120
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:72
GwOutput
GatewayOutput_dummy GwOutput
Definition: GwOutput_dummy.cpp:29
GatewayOutput_dummy::begin
bool begin()
Starts output module.
Definition: GwOutput_dummy.cpp:47
GatewayOutput_generic::downlinkCb
onDlData_t downlinkCb
downlink processing function handle
Definition: GwOutput_generic.h:34
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: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
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
EnigmaIOTGateway.h
Library to build a gateway for EnigmaIoT system.
gwInvalidateReason_t
gwInvalidateReason_t
Key invalidation reason definition.
Definition: EnigmaIOTGateway.h:75
status
@ status
Definition: GwOutput_generic.h:25
GatewayOutput_dummy::setDlCallback
void setDlCallback(onDlData_t cb)
Set data processing function.
Definition: GwOutput_dummy.h:108