Host library for controlling a WiConnect enabled Wi-Fi module.
Dependents: wiconnect-ota_example wiconnect-web_setup_example wiconnect-test-console wiconnect-tcp_server_example ... more
ScanResult.h
00001 /** 00002 * ACKme WiConnect Host Library is licensed under the BSD licence: 00003 * 00004 * Copyright (c)2014 ACKme Networks. 00005 * All rights reserved. 00006 * 00007 * Redistribution and use in source and binary forms, with or without modification, 00008 * are permitted provided that the following conditions are met: 00009 * 00010 * 1. Redistributions of source code must retain the above copyright notice, 00011 * this list of conditions and the following disclaimer. 00012 * 2. Redistributions in binary form must reproduce the above copyright notice, 00013 * this list of conditions and the following disclaimer in the documentation 00014 * and/or other materials provided with the distribution. 00015 * 3. The name of the author may not be used to endorse or promote products 00016 * derived from this software without specific prior written permission. 00017 * 00018 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS AND ANY EXPRESS OR IMPLIED 00019 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00020 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 00021 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00022 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 00023 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00024 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00025 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 00026 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 00027 * OF SUCH DAMAGE. 00028 */ 00029 #pragma once 00030 00031 00032 00033 #include "api/WiconnectTypes.h" 00034 #include "api/StringUtil.h" 00035 00036 00037 namespace wiconnect 00038 { 00039 00040 /** 00041 * @ingroup api_network_types 00042 * 00043 * @brief Contains single entry from WiFi scan results 00044 * 00045 */ 00046 class ScanResult 00047 { 00048 public: 00049 uint8_t getChannel() const; 00050 NetworkSignalStrength getSignalStrength() const; 00051 const MacAddress* getMacAddress() const; 00052 NetworkSecurity getSecurityType() const; 00053 uint32_t getRate() const; 00054 const char* getRateStr(char *buffer = NULL) const; 00055 const Ssid* getSsid() const; 00056 00057 const ScanResult* getNext() const; 00058 const ScanResult* getPrevious() const; 00059 00060 protected: 00061 ScanResult(); 00062 00063 WiconnectResult init(const char *channelStr, const char *rssiStr, const char* macStr, const char *rateStr, const char *secStr, const char *ssidStr); 00064 ScanResult *next; 00065 ScanResult *previous; 00066 uint8_t channel; 00067 int16_t rssi; 00068 MacAddress mac; 00069 uint32_t rate; 00070 NetworkSecurity security; 00071 Ssid ssid; 00072 00073 #ifdef WICONNECT_ENABLE_MALLOC 00074 void* operator new(size_t size); 00075 void operator delete(void*); 00076 #endif 00077 00078 friend class ScanResultList; 00079 }; 00080 00081 00082 00083 00084 00085 00086 }
Generated on Tue Jul 12 2022 17:35:58 by 1.7.2