Rtos API example

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 {
00030     /** WiFiAccessPoint lifetime
00031      */
00032 public:
00033     WiFiAccessPoint();
00034     WiFiAccessPoint(nsapi_wifi_ap_t ap);
00035 
00036     /** Get an access point's ssid
00037      *
00038      *  @return The ssid of the access point
00039      */
00040     const char *get_ssid() const;
00041 
00042     /** Get an access point's bssid
00043      *
00044      *  @return The bssid of the access point
00045      */
00046     const uint8_t *get_bssid() const;
00047 
00048     /** Get an access point's security
00049      *
00050      *  @return The security type of the access point
00051      */
00052     nsapi_security_t get_security() const;
00053 
00054     /** Gets the radio signal strength for the access point
00055      *
00056      *  @return         Connection strength in dBm (negative value),
00057      *                  or 0 if measurement impossible
00058      */
00059     int8_t get_rssi() const;
00060 
00061     /** Get the access point's channel
00062      *
00063      *  @return The channel of the access point
00064      */
00065     uint8_t get_channel() const;
00066 
00067 private:
00068     nsapi_wifi_ap_t _ap;
00069 };
00070 
00071 #endif