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

types/ScanResult.h

Committer:
dan_ackme
Date:
2014-08-13
Revision:
13:2b51f5267c92
Parent:
11:ea484e1b7fc4
Child:
16:7f1d6d359787

File content as of revision 13:2b51f5267c92:

/*
 * Copyright 2014, ACKme Networks
 * All Rights Reserved.
 *
 * This is UNPUBLISHED PROPRIETARY SOURCE CODE of ACKme Networks;
 * the contents of this file may not be disclosed to third parties, copied
 * or duplicated in any form, in whole or in part, without the prior
 * written permission of ACKme Networks.
 */

#pragma once



#include "WiconnectTypes.h"
#include "StringUtil.h"


namespace wiconnect
{

/**
 * @ingroup api_network_types
 *
 * @brief Contains single entry from WiFi scan results
 *
 */
class ScanResult
{
public:
    uint8_t getChannel() const;
    NetworkSignalStrength getSignalStrength() const;
    const MacAddress* getMacAddress() const;
    NetworkSecurity getSecurityType() const;
    uint32_t getRate() const;
    const char* getRateStr(char *buffer = NULL) const;
    const Ssid* getSsid() const;

    const ScanResult* getNext() const;
    const ScanResult* getPrevious() const;

protected:
    ScanResult();

    WiconnectResult init(const char *channelStr, const char *rssiStr, const char* macStr, const char *rateStr, const char *secStr, const char *ssidStr);
    ScanResult *next;
    ScanResult *previous;
    uint8_t channel;
    int16_t rssi;
    MacAddress mac;
    uint32_t rate;
    NetworkSecurity security;
    Ssid ssid;

    void* operator new(size_t size);
    void operator delete(void*);

    friend class ScanResultList;
};






}