-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwifi_manager.h
41 lines (35 loc) · 1.41 KB
/
wifi_manager.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
/*
* @Author: Jakub Witowski
* @Project name: iBeacon
* @File name: wifi_manager.h
*/
#ifndef _WIFI_MANAGER_H_
#define _WIFI_MANAGER_H_
/* ==================================================================== */
/* ========================== include files =========================== */
/* ==================================================================== */
#include <ESP8266WiFi.h>
#include "nvm_manager.h"
#include "server_manager.h"
/* ==================================================================== */
/* ============================= defines ============================== */
/* ==================================================================== */
#define WIFI_IS_CONNECTED() (WL_CONNECTED == WiFi.status())
#define WIFI_IS_DISCONNECTED() (WL_CONNECTED != WiFi.status())
/* ==================================================================== */
/* ============================ classes =============================== */
/* ==================================================================== */
class WiFi_Manager
{
public:
void WiFi_Connect();
void WiFi_Restore();
void WiFi_establish_connection_timeout_event();
void WiFi_reconnect_failed_timeout_event();
/* Connection lost related methods */
void WiFi_set_connection_lost_flag();
void WiFi_clear_connection_lost_flag();
bool WiFi_get_connection_lost_flag();
};
#endif /* _WIFI_MANAGER_H_ */
/* EOF */