BssInfo.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  * BssInfo.h - WiFi Basic Service Set Information
8  *
9  ****/
10 
11 #pragma once
12 
13 #include <WString.h>
14 #include <WVector.h>
15 #include <MacAddress.h>
16 
17 #ifdef ARCH_HOST
19  AUTH_OPEN = 0,
25 };
26 #else
27 #include <esp_systemapi.h>
28 typedef AUTH_MODE WifiAuthMode;
29 #endif
30 
31 class BssInfo
32 {
33 public:
37  bool isOpen() const
38  {
39  return authorization == AUTH_OPEN;
40  }
41 
46 
50  uint32_t getHashId() const
51  {
52  return bssid.getHash();
53  }
54 
55 public:
59  uint8_t channel;
60  int16_t rssi;
61  bool hidden;
62 };
63 
String getAuthorizationMethodName() const
Get BSS authorisation method name.
uint8_t channel
Channel number.
Definition: BssInfo.h:59
String ssid
SSID.
Definition: BssInfo.h:56
uint32_t getHash() const
Generate a simple 32-bit hash from the MAC address.
Vector class template.
Definition: WVector.h:29
WifiAuthMode authorization
Authorisation mode.
Definition: BssInfo.h:58
WifiAuthMode
Definition: BssInfo.h:18
int16_t rssi
RSSI level.
Definition: BssInfo.h:60
The String class.
Definition: WString.h:136
A network hardware (MAC) address.
Definition: MacAddress.h:38
Definition: BssInfo.h:21
uint32_t getHashId() const
Get BSS hash ID.
Definition: BssInfo.h:50
Vector< BssInfo > BssList
List of BSS.
Definition: BssInfo.h:64
MacAddress bssid
BSS ID.
Definition: BssInfo.h:57
Definition: BssInfo.h:19
Definition: BssInfo.h:20
bool isOpen() const
Get BSS open status.
Definition: BssInfo.h:37
Definition: BssInfo.h:22
bool hidden
True if AP is hidden.
Definition: BssInfo.h:61
Definition: BssInfo.h:24
Definition: BssInfo.h:31
Definition: BssInfo.h:23