-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWifiController.h
37 lines (30 loc) · 955 Bytes
/
WifiController.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
#ifndef WIFI_CONTROLLER_H
#define WIFI_CONTROLLER_H
#include "Arduino.h"
#include "MacAddress.h"
// Represents settings for a WifiController object
struct WifiControllerSettings {
String ssid;
String password;
bool requireLatestFirmware;
int connectionCheckInterval;
WifiControllerSettings(String, String, bool, int);
};
// Provides methods for managing wifi connections
class WifiController {
private:
static String firmwareVersion;
static MacAddress macAddress;
static WifiControllerSettings* settings;
public:
static void init(WifiControllerSettings*);
static bool verifyModule();
static bool verifyFirmware();
static MacAddress getMacAddress();
static void connect();
static void checkConnectionStatus();
static void printAvailableNetworks();
static void printNetwork(byte);
static String statusToString(byte);
};
#endif