-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathWrapperWiFi.h
47 lines (34 loc) · 843 Bytes
/
WrapperWiFi.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef WrapperWiFi_h
#define WrapperWiFi_h
#include <WiFi.h>
#include "BaseHeader.h"
#include <EnhancedThread.h>
class WrapperWiFi : public EnhancedThread {
public:
enum class ConnectionState {
NONE,
WAIT_CONNECT,
WAIT_IP,
CONNECTED,
DISCONNECTED
};
WrapperWiFi() {};
WrapperWiFi(const char* ssid, const char* password);
WrapperWiFi(const char* ssid, const char* password, const byte ip[4], const byte subnet[4], const byte dns[4]);
void
begin(),
loop();
void
reconnect();
void apMode();
WrapperWiFi::ConnectionState getStatus();
void mDnsAdvertiseSetup();
private:
const char* _ssid;
const char* _password;
byte _ip[4];
byte _subnet[4];
byte _dns[4];
ConnectionState _state = ConnectionState::NONE;
};
#endif