AccessPoint.h
Go to the documentation of this file.
1 /****
2  * Sming Framework Project - Open Source framework for high efficiency native ESP8266 development.
3  * Created 2015 by Skurydin Alexey
4  * http://github.com/SmingHub/Sming
5  * All files of the Sming Core are provided under the LGPL v3 license.
6  *
7  * AccessPoint.h
8  *
9  ****/
10 
11 #pragma once
12 
13 #include <WString.h>
14 #include <IpAddress.h>
15 #include <MacAddress.h>
16 #include "BssInfo.h"
17 
33 {
34 public:
36  {
37  }
38 
43  virtual void enable(bool enabled, bool save = false) = 0;
44 
48  virtual bool isEnabled() const = 0;
49 
59  virtual bool config(const String& ssid, String password, WifiAuthMode mode, bool hidden = false, int channel = 7,
60  int beaconInterval = 200) = 0;
61 
65  virtual IpAddress getIP() const = 0;
66 
71  virtual bool setIP(IpAddress address) = 0;
72 
76  virtual MacAddress getMacAddress() const = 0;
77 
82  String getMAC(char sep = '\0') const;
83 
87  virtual IpAddress getNetworkMask() const = 0;
88 
92  virtual IpAddress getNetworkGateway() const = 0;
93 
97  virtual IpAddress getNetworkBroadcast() const = 0;
98 
102  virtual String getSSID() const = 0;
103 
107  virtual String getPassword() const = 0;
108 };
109 
118 
A class to make it easier to handle and pass around IP addresses.
Definition: IpAddress.h:37
virtual IpAddress getIP() const =0
Get WiFi AP IP address.
virtual String getPassword() const =0
Get WiFi access point password.
virtual bool config(const String &ssid, String password, WifiAuthMode mode, bool hidden=false, int channel=7, int beaconInterval=200)=0
Configure WiFi AP.
String getMAC(char sep='\0') const
Get WiFi AP MAC address.
WifiAuthMode
Definition: BssInfo.h:18
The String class.
Definition: WString.h:136
A network hardware (MAC) address.
Definition: MacAddress.h:38
virtual MacAddress getMacAddress() const =0
Get WiFi AP MAC address.
virtual ~AccessPointClass()
Definition: AccessPoint.h:35
AccessPointClass & WifiAccessPoint
Global instance of WiFi access point object.
Access point class.
Definition: AccessPoint.h:32
virtual IpAddress getNetworkBroadcast() const =0
Get WiFi AP broadcast address.
virtual String getSSID() const =0
Get WiFi access point SSID.
virtual IpAddress getNetworkMask() const =0
Get WiFi AP network mask.
virtual void enable(bool enabled, bool save=false)=0
Enable or disable WiFi AP.
virtual bool setIP(IpAddress address)=0
Set WiFi AP IP addres.
virtual IpAddress getNetworkGateway() const =0
Get WiFi AP default gateway.
virtual bool isEnabled() const =0
Get WiFi AP enable status.