Pinned to some recent date
features/netsocket/WiFiAccessPoint.h@0:fb7af294d5d9, 2016-11-17 (annotated)
- Committer:
- Simon Cooksey
- Date:
- Thu Nov 17 16:43:53 2016 +0000
- Revision:
- 0:fb7af294d5d9
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Simon Cooksey |
0:fb7af294d5d9 | 1 | /* WiFiInterface |
Simon Cooksey |
0:fb7af294d5d9 | 2 | * Copyright (c) 2015 - 2016 ARM Limited |
Simon Cooksey |
0:fb7af294d5d9 | 3 | * |
Simon Cooksey |
0:fb7af294d5d9 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
Simon Cooksey |
0:fb7af294d5d9 | 5 | * you may not use this file except in compliance with the License. |
Simon Cooksey |
0:fb7af294d5d9 | 6 | * You may obtain a copy of the License at |
Simon Cooksey |
0:fb7af294d5d9 | 7 | * |
Simon Cooksey |
0:fb7af294d5d9 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
Simon Cooksey |
0:fb7af294d5d9 | 9 | * |
Simon Cooksey |
0:fb7af294d5d9 | 10 | * Unless required by applicable law or agreed to in writing, software |
Simon Cooksey |
0:fb7af294d5d9 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
Simon Cooksey |
0:fb7af294d5d9 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
Simon Cooksey |
0:fb7af294d5d9 | 13 | * See the License for the specific language governing permissions and |
Simon Cooksey |
0:fb7af294d5d9 | 14 | * limitations under the License. |
Simon Cooksey |
0:fb7af294d5d9 | 15 | */ |
Simon Cooksey |
0:fb7af294d5d9 | 16 | |
Simon Cooksey |
0:fb7af294d5d9 | 17 | #ifndef WIFI_ACCESS_POINT_H |
Simon Cooksey |
0:fb7af294d5d9 | 18 | #define WIFI_ACCESS_POINT_H |
Simon Cooksey |
0:fb7af294d5d9 | 19 | |
Simon Cooksey |
0:fb7af294d5d9 | 20 | #include <string.h> |
Simon Cooksey |
0:fb7af294d5d9 | 21 | #include "netsocket/nsapi_types.h" |
Simon Cooksey |
0:fb7af294d5d9 | 22 | |
Simon Cooksey |
0:fb7af294d5d9 | 23 | /** WiFiAccessPoint class |
Simon Cooksey |
0:fb7af294d5d9 | 24 | * |
Simon Cooksey |
0:fb7af294d5d9 | 25 | * Class that represents a WiFi Access Point |
Simon Cooksey |
0:fb7af294d5d9 | 26 | * Common interface that is shared between WiFi devices |
Simon Cooksey |
0:fb7af294d5d9 | 27 | */ |
Simon Cooksey |
0:fb7af294d5d9 | 28 | class WiFiAccessPoint |
Simon Cooksey |
0:fb7af294d5d9 | 29 | { |
Simon Cooksey |
0:fb7af294d5d9 | 30 | /** WiFiAccessPoint lifetime |
Simon Cooksey |
0:fb7af294d5d9 | 31 | */ |
Simon Cooksey |
0:fb7af294d5d9 | 32 | public: |
Simon Cooksey |
0:fb7af294d5d9 | 33 | WiFiAccessPoint(); |
Simon Cooksey |
0:fb7af294d5d9 | 34 | WiFiAccessPoint(nsapi_wifi_ap_t ap); |
Simon Cooksey |
0:fb7af294d5d9 | 35 | |
Simon Cooksey |
0:fb7af294d5d9 | 36 | /** Get an access point's ssid |
Simon Cooksey |
0:fb7af294d5d9 | 37 | * |
Simon Cooksey |
0:fb7af294d5d9 | 38 | * @return The ssid of the access point |
Simon Cooksey |
0:fb7af294d5d9 | 39 | */ |
Simon Cooksey |
0:fb7af294d5d9 | 40 | const char *get_ssid() const; |
Simon Cooksey |
0:fb7af294d5d9 | 41 | |
Simon Cooksey |
0:fb7af294d5d9 | 42 | /** Get an access point's bssid |
Simon Cooksey |
0:fb7af294d5d9 | 43 | * |
Simon Cooksey |
0:fb7af294d5d9 | 44 | * @return The bssid of the access point |
Simon Cooksey |
0:fb7af294d5d9 | 45 | */ |
Simon Cooksey |
0:fb7af294d5d9 | 46 | const uint8_t *get_bssid() const; |
Simon Cooksey |
0:fb7af294d5d9 | 47 | |
Simon Cooksey |
0:fb7af294d5d9 | 48 | /** Get an access point's security |
Simon Cooksey |
0:fb7af294d5d9 | 49 | * |
Simon Cooksey |
0:fb7af294d5d9 | 50 | * @return The security type of the access point |
Simon Cooksey |
0:fb7af294d5d9 | 51 | */ |
Simon Cooksey |
0:fb7af294d5d9 | 52 | nsapi_security_t get_security() const; |
Simon Cooksey |
0:fb7af294d5d9 | 53 | |
Simon Cooksey |
0:fb7af294d5d9 | 54 | /** Gets the radio signal strength for the access point |
Simon Cooksey |
0:fb7af294d5d9 | 55 | * |
Simon Cooksey |
0:fb7af294d5d9 | 56 | * @return Connection strength in dBm (negative value), |
Simon Cooksey |
0:fb7af294d5d9 | 57 | * or 0 if measurement impossible |
Simon Cooksey |
0:fb7af294d5d9 | 58 | */ |
Simon Cooksey |
0:fb7af294d5d9 | 59 | int8_t get_rssi() const; |
Simon Cooksey |
0:fb7af294d5d9 | 60 | |
Simon Cooksey |
0:fb7af294d5d9 | 61 | /** Get the access point's channel |
Simon Cooksey |
0:fb7af294d5d9 | 62 | * |
Simon Cooksey |
0:fb7af294d5d9 | 63 | * @return The channel of the access point |
Simon Cooksey |
0:fb7af294d5d9 | 64 | */ |
Simon Cooksey |
0:fb7af294d5d9 | 65 | uint8_t get_channel() const; |
Simon Cooksey |
0:fb7af294d5d9 | 66 | |
Simon Cooksey |
0:fb7af294d5d9 | 67 | private: |
Simon Cooksey |
0:fb7af294d5d9 | 68 | nsapi_wifi_ap_t _ap; |
Simon Cooksey |
0:fb7af294d5d9 | 69 | }; |
Simon Cooksey |
0:fb7af294d5d9 | 70 | |
Simon Cooksey |
0:fb7af294d5d9 | 71 | #endif |