ESPSomfy-RTS/Network.h
Robert Strouse dcd90a4c29 Update to 1.1.0
* Reduced socket traffic on load.
* Added code to check max socket connections and reconnect when a slot becomes available.
* Improve load times for Shade Manager
2023-02-05 10:20:53 -08:00

31 lines
654 B
C++

#include <Arduino.h>
#ifndef Network_h
#define Network_h
class Network {
protected:
unsigned long lastEmit = 0;
int lastRSSI = 0;
int lastChannel = 0;
public:
String ssid;
String mac;
int channel;
int strength;
int disconnected = 0;
int connectAttempts = 0;
long connectStart = 0;
long connectTime = 0;
bool openSoftAP();
bool connect();
void setConnected();
int getStrengthByMac(const char *mac);
int getStrengthBySSID(const char *ssid);
bool setup();
void loop();
void end();
void emitSockets();
void emitSockets(uint8_t num);
uint32_t getChipId();
};
#endif