EnigmaIOT  0.9.8
Secure sensor and gateway platform based on ESP8266 and ESP32
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
GatewayOutput_generic Class Referenceabstract

#include <GwOutput_generic.h>

Inheritance diagram for GatewayOutput_generic:
GatewayOutput_dummy GwOutput_MQTT

Public Member Functions

virtual void configManagerStart (EnigmaIOTGatewayClass *enigmaIotGw)=0
 Called when wifi manager starts config portal. More...
 
virtual void configManagerExit (bool status)=0
 Called when wifi manager exits config portal. More...
 
virtual bool begin ()=0
 Starts output module. More...
 
virtual bool loadConfig ()=0
 Loads output module configuration. More...
 
virtual bool outputControlSend (char *address, uint8_t *data, size_t length)=0
 Send control data from nodes. More...
 
virtual bool newNodeSend (char *address, uint16_t node_id)=0
 Send new node notification. More...
 
virtual bool nodeDisconnectedSend (char *address, gwInvalidateReason_t reason)=0
 Send node disconnection notification. More...
 
virtual bool outputDataSend (char *address, char *data, size_t length, GwOutput_data_type_t type=data)=0
 Send data from nodes. More...
 
virtual void loop ()=0
 Should be called often for module management. More...
 
void setDlCallback (onDlData_t cb)
 Set data processing function. More...
 

Public Attributes

String netName
 EnigmaIOT network name. More...
 
String clientId
 MQTT clientId. More...
 
String gwTopic
 MQTT topic for gateway. More...
 

Protected Member Functions

virtual bool saveConfig ()=0
 Saves output module configuration. More...
 

Protected Attributes

EnigmaIOTGatewayClassenigmaIotGateway
 Pointer to EnigmaIOT gateway instance. More...
 
onDlData_t downlinkCb
 downlink processing function handle More...
 

Detailed Description

Definition at line 31 of file GwOutput_generic.h.

Member Function Documentation

◆ begin()

virtual bool GatewayOutput_generic::begin ( )
pure virtual

Starts output module.

Returns
Returns true if successful. false otherwise

Implemented in GwOutput_MQTT, and GatewayOutput_dummy.

◆ configManagerExit()

virtual void GatewayOutput_generic::configManagerExit ( bool  status)
pure virtual

Called when wifi manager exits config portal.

Parameters
statustrue if configuration was successful

Implemented in GwOutput_MQTT, and GatewayOutput_dummy.

◆ configManagerStart()

virtual void GatewayOutput_generic::configManagerStart ( EnigmaIOTGatewayClass enigmaIotGw)
pure virtual

Called when wifi manager starts config portal.

Parameters
enigmaIotGwPointer to EnigmaIOT gateway instance

Implemented in GwOutput_MQTT, and GatewayOutput_dummy.

◆ loadConfig()

virtual bool GatewayOutput_generic::loadConfig ( )
pure virtual

Loads output module configuration.

Returns
Returns true if load was successful. false otherwise

Implemented in GwOutput_MQTT, and GatewayOutput_dummy.

◆ loop()

virtual void GatewayOutput_generic::loop ( )
pure virtual

Should be called often for module management.

Implemented in GwOutput_MQTT, and GatewayOutput_dummy.

◆ newNodeSend()

virtual bool GatewayOutput_generic::newNodeSend ( char *  address,
uint16_t  node_id 
)
pure virtual

Send new node notification.

Parameters
addressNode Address
node_idNode Id
Returns
Returns true if sending was successful. false otherwise

Implemented in GwOutput_MQTT, and GatewayOutput_dummy.

◆ nodeDisconnectedSend()

virtual bool GatewayOutput_generic::nodeDisconnectedSend ( char *  address,
gwInvalidateReason_t  reason 
)
pure virtual

Send node disconnection notification.

Parameters
addressNode Address
reasonDisconnection reason code
Returns
Returns true if sending was successful. false otherwise

Implemented in GwOutput_MQTT, and GatewayOutput_dummy.

◆ outputControlSend()

virtual bool GatewayOutput_generic::outputControlSend ( char *  address,
uint8_t *  data,
size_t  length 
)
pure virtual

Send control data from nodes.

Parameters
addressNode Address
dataMessage data buffer
lengthData buffer length
Returns
Returns true if sending was successful. false otherwise

Implemented in GwOutput_MQTT, and GatewayOutput_dummy.

◆ outputDataSend()

virtual bool GatewayOutput_generic::outputDataSend ( char *  address,
char *  data,
size_t  length,
GwOutput_data_type_t  type = data 
)
pure virtual

Send data from nodes.

Parameters
addressNode Address
dataMessage data buffer
lengthData buffer length
typeType of message
Returns
Returns true if sending was successful. false otherwise

Implemented in GwOutput_MQTT, and GatewayOutput_dummy.

◆ saveConfig()

virtual bool GatewayOutput_generic::saveConfig ( )
protectedpure virtual

Saves output module configuration.

Returns
Returns true if save was successful. false otherwise

Implemented in GwOutput_MQTT, and GatewayOutput_dummy.

◆ setDlCallback()

void GatewayOutput_generic::setDlCallback ( onDlData_t  cb)
inline

Set data processing function.

Parameters
cbFunction handle

Definition at line 118 of file GwOutput_generic.h.

Member Data Documentation

◆ clientId

String GatewayOutput_generic::clientId

MQTT clientId.

Definition at line 44 of file GwOutput_generic.h.

◆ downlinkCb

onDlData_t GatewayOutput_generic::downlinkCb
protected

downlink processing function handle

Definition at line 34 of file GwOutput_generic.h.

◆ enigmaIotGateway

EnigmaIOTGatewayClass* GatewayOutput_generic::enigmaIotGateway
protected

Pointer to EnigmaIOT gateway instance.

Definition at line 33 of file GwOutput_generic.h.

◆ gwTopic

String GatewayOutput_generic::gwTopic

MQTT topic for gateway.

Definition at line 45 of file GwOutput_generic.h.

◆ netName

String GatewayOutput_generic::netName

EnigmaIOT network name.

Definition at line 43 of file GwOutput_generic.h.


The documentation for this class was generated from the following file: