Gbox 4.20
Grow box automation and monitoring - <a href='https://sites.google.com/site/growboxguy/'>https://sites.google.com/site/growboxguy/</a>
 
Loading...
Searching...
No Matches
ELClient.h File Reference

Definitions for ELClient. More...

#include <avr/pgmspace.h>
#include <HardwareSerial.h>
#include <Arduino.h>
#include "ELClientResponse.h"
#include "FP.h"
Include dependency graph for ELClient.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ELClientProtocol
 
class  ELClient
 

Macros

#define ESP_TIMEOUT   2000
 

Enumerations

enum  CmdName {
  CMD_NULL = 0 , CMD_SYNC , CMD_RESP_V , CMD_RESP_CB ,
  CMD_WIFI_STATUS , CMD_CB_ADD , CMD_CB_EVENTS , CMD_GET_TIME ,
  CMD_MQTT_SETUP = 10 , CMD_MQTT_PUBLISH , CMD_MQTT_SUBSCRIBE , CMD_MQTT_LWT ,
  CMD_REST_SETUP = 20 , CMD_REST_REQUEST , CMD_REST_SETHEADER , CMD_WEB_SETUP = 30 ,
  CMD_WEB_DATA , CMD_SOCKET_SETUP = 40 , CMD_SOCKET_SEND
}
 
enum  WIFI_STATUS {
  STATION_IDLE = 0 , STATION_CONNECTING , STATION_WRONG_PASSWORD , STATION_NO_AP_FOUND ,
  STATION_CONNECT_FAIL , STATION_GOT_IP
}
 

Detailed Description

Definitions for ELClient.

Definition in file ELClient.h.

Macro Definition Documentation

◆ ESP_TIMEOUT

#define ESP_TIMEOUT   2000

Default timeout for TCP requests when waiting for a response

Definition at line 14 of file ELClient.h.

Enumeration Type Documentation

◆ CmdName

enum CmdName
Enumerator
CMD_NULL 

null, mainly to prevent 0 from doing something bad

CMD_SYNC 

Synchronize, starts the protocol

CMD_RESP_V 

Response with a value

CMD_RESP_CB 

Response with a callback

CMD_WIFI_STATUS 

Get the wifi status

CMD_CB_ADD 

Add a custom callback

CMD_CB_EVENTS 

???

CMD_GET_TIME 

Get current time in seconds since the unix epoch

CMD_MQTT_SETUP 

Register callback functions

CMD_MQTT_PUBLISH 

Publish MQTT topic

CMD_MQTT_SUBSCRIBE 

Subscribe to MQTT topic

CMD_MQTT_LWT 

Define MQTT last will

CMD_REST_SETUP 

Setup REST connection

CMD_REST_REQUEST 

Make request to REST server

CMD_REST_SETHEADER 

Define HTML header

CMD_WEB_SETUP 

web-server setup

CMD_WEB_DATA 

used for publishing web-server data

CMD_SOCKET_SETUP 

Setup socket connection

CMD_SOCKET_SEND 

Send socket packet

Definition at line 18 of file ELClient.h.

◆ WIFI_STATUS

Enumerator
STATION_IDLE 

Idle status

STATION_CONNECTING 

Trying to connect

STATION_WRONG_PASSWORD 

Connection error, wrong password

STATION_NO_AP_FOUND 

Connection error, AP not found

STATION_CONNECT_FAIL 

Connection error, connection failed

STATION_GOT_IP 

Connected, received IP

Definition at line 45 of file ELClient.h.