Nicolas Borla / Mbed OS ROME2_Robot_Firmware
Committer:
boro
Date:
Tue Mar 09 13:10:40 2021 +0000
Revision:
3:6fe17b8a6d62
Parent:
0:4beb2ea291ec
SDBlockDevice added

Who changed what in which revision?

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