EnigmaIOT  0.9.8
Secure sensor and gateway platform based on ESP8266 and ESP32
Macros | Functions | Variables
EnigmaIOTGatewayMQTT.cpp File Reference
#include <Arduino.h>
#include "GwOutput_mqtt.h"
#include <WiFiClient.h>
#include <ArduinoOTA.h>
#include <CayenneLPP.h>
#include <EnigmaIOTGateway.h>
#include <helperFunctions.h>
#include <EnigmaIOTdebug.h>
#include <espnow_hal.h>
#include <ArduinoJson.h>
#include <ESPAsyncWiFiManager.h>

Go to the source code of this file.

Macros

#define LED_BUILTIN   5
 
#define BLUE_LED   LED_BUILTIN
 
#define RED_LED   LED_BUILTIN
 

Functions

void flashConnectionLed (void *led)
 
void startConnectionFlash (int period)
 
void stopConnectionFlash ()
 
void arduinoOTAConfigure ()
 
void wifiManagerExit (boolean status)
 
void wifiManagerStarted ()
 
void processRxControlData (char *macStr, uint8_t *data, uint8_t length)
 
void doRestart ()
 
void processRxData (uint8_t *mac, uint8_t *buffer, uint8_t length, uint16_t lostMessages, bool control, gatewayPayloadEncoding_t payload_type, char *nodeName=NULL)
 
void onDownlinkData (uint8_t *address, char *nodeName, control_message_type_t msgType, char *data, unsigned int len)
 
void newNodeConnected (uint8_t *mac, uint16_t node_id, char *nodeName=nullptr)
 
void nodeDisconnected (uint8_t *mac, gwInvalidateReason_t reason)
 
void setup ()
 
void loop ()
 

Variables

const int connectionLed = LED_BUILTIN
 
bool connectionLedFlashing = false
 
bool restartRequested = false
 
time_t restartRequestTime
 

Macro Definition Documentation

◆ BLUE_LED

#define BLUE_LED   LED_BUILTIN

Definition at line 60 of file EnigmaIOTGatewayMQTT.cpp.

◆ LED_BUILTIN

#define LED_BUILTIN   5

Definition at line 57 of file EnigmaIOTGatewayMQTT.cpp.

◆ RED_LED

#define RED_LED   LED_BUILTIN

Definition at line 61 of file EnigmaIOTGatewayMQTT.cpp.

Function Documentation

◆ arduinoOTAConfigure()

void arduinoOTAConfigure ( )

Definition at line 113 of file EnigmaIOTGatewayMQTT.cpp.

◆ doRestart()

void doRestart ( )

Definition at line 184 of file EnigmaIOTGatewayMQTT.cpp.

◆ flashConnectionLed()

void flashConnectionLed ( void *  led)

Definition at line 76 of file EnigmaIOTGatewayMQTT.cpp.

◆ loop()

void loop ( )

Definition at line 488 of file EnigmaIOTGatewayMQTT.cpp.

◆ newNodeConnected()

void newNodeConnected ( uint8_t *  mac,
uint16_t  node_id,
char *  nodeName = nullptr 
)

Definition at line 330 of file EnigmaIOTGatewayMQTT.cpp.

◆ nodeDisconnected()

void nodeDisconnected ( uint8_t *  mac,
gwInvalidateReason_t  reason 
)

Definition at line 352 of file EnigmaIOTGatewayMQTT.cpp.

◆ onDownlinkData()

void onDownlinkData ( uint8_t *  address,
char *  nodeName,
control_message_type_t  msgType,
char *  data,
unsigned int  len 
)

Definition at line 281 of file EnigmaIOTGatewayMQTT.cpp.

◆ processRxControlData()

void processRxControlData ( char *  macStr,
uint8_t *  data,
uint8_t  length 
)

Definition at line 171 of file EnigmaIOTGatewayMQTT.cpp.

◆ processRxData()

void processRxData ( uint8_t *  mac,
uint8_t *  buffer,
uint8_t  length,
uint16_t  lostMessages,
bool  control,
gatewayPayloadEncoding_t  payload_type,
char *  nodeName = NULL 
)

Definition at line 213 of file EnigmaIOTGatewayMQTT.cpp.

◆ setup()

void setup ( )

Definition at line 382 of file EnigmaIOTGatewayMQTT.cpp.

◆ startConnectionFlash()

void startConnectionFlash ( int  period)

Definition at line 81 of file EnigmaIOTGatewayMQTT.cpp.

◆ stopConnectionFlash()

void stopConnectionFlash ( )

Definition at line 97 of file EnigmaIOTGatewayMQTT.cpp.

◆ wifiManagerExit()

void wifiManagerExit ( boolean  status)

Definition at line 163 of file EnigmaIOTGatewayMQTT.cpp.

◆ wifiManagerStarted()

void wifiManagerStarted ( )

Definition at line 167 of file EnigmaIOTGatewayMQTT.cpp.

Variable Documentation

◆ connectionLed

const int connectionLed = LED_BUILTIN

Definition at line 69 of file EnigmaIOTGatewayMQTT.cpp.

◆ connectionLedFlashing

bool connectionLedFlashing = false

Definition at line 70 of file EnigmaIOTGatewayMQTT.cpp.

◆ restartRequested

bool restartRequested = false

Definition at line 72 of file EnigmaIOTGatewayMQTT.cpp.

◆ restartRequestTime

time_t restartRequestTime

Definition at line 73 of file EnigmaIOTGatewayMQTT.cpp.