mbed-os

Dependents:   cobaLCDJoyMotor_Thread odometry_omni_3roda_v3 odometry_omni_3roda_v1 odometry_omni_3roda_v2 ... more

Committer:
be_bryan
Date:
Mon Dec 11 17:54:04 2017 +0000
Revision:
0:b74591d5ab33
motor ++

Who changed what in which revision?

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