Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers WiFiAccessPoint.h Source File

WiFiAccessPoint.h

00001 /* WiFiInterface
00002  * Copyright (c) 2015 - 2016 ARM Limited
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef WIFI_ACCESS_POINT_H
00018 #define WIFI_ACCESS_POINT_H
00019 
00020 #include <string.h>
00021 #include "netsocket/nsapi_types.h"
00022 
00023 /** WiFiAccessPoint class
00024  *
00025  *  Class that represents a WiFi Access Point
00026  *  Common interface that is shared between WiFi devices
00027  */
00028 class WiFiAccessPoint {
00029     /** WiFiAccessPoint lifetime
00030      */
00031 public:
00032     WiFiAccessPoint();
00033     WiFiAccessPoint(nsapi_wifi_ap_t ap);
00034 
00035     /** Get an access point's ssid
00036      *
00037      *  @return The ssid of the access point
00038      */
00039     const char *get_ssid() const;
00040 
00041     /** Get an access point's bssid
00042      *
00043      *  @return The bssid of the access point
00044      */
00045     const uint8_t *get_bssid() const;
00046 
00047     /** Get an access point's security
00048      *
00049      *  @return The security type of the access point
00050      */
00051     nsapi_security_t get_security() const;
00052 
00053     /** Gets the radio signal strength for the access point
00054      *
00055      *  @return         Connection strength in dBm (negative value),
00056      *                  or 0 if measurement impossible
00057      */
00058     int8_t get_rssi() const;
00059 
00060     /** Get the access point's channel
00061      *
00062      *  @return The channel of the access point
00063      */
00064     uint8_t get_channel() const;
00065 
00066 private:
00067     nsapi_wifi_ap_t _ap;
00068 };
00069 
00070 #endif