MRPT  1.9.9
CWirelessPower.cpp File Reference
#include "hwdrivers-precomp.h"
#include <mrpt/hwdrivers/CWirelessPower.h>
#include <iostream>
#include <windows.h>
#include <wlanapi.h>
#include <objbase.h>
#include <wtypes.h>
Include dependency graph for CWirelessPower.cpp:

Go to the source code of this file.

Functions

voidConnectWlanServerW ()
 Gets a connection to the server. More...
 
std::vector< PWLAN_INTERFACE_INFO > ListInterfacesW (HANDLE hClient)
 Gets a list of the interfaces available in the system (in Windows format) More...
 
std::string GUID2Str (const GUID &ifaceGuid)
 Transforms a GUID structure (in Windows format) to a string. More...
 
PWLAN_INTERFACE_INFO GetInterfaceW (std::string guid, HANDLE hClient)
 Gets a handle to the interface that has been set by setNet() (in Windows format) More...
 
std::vector< PWLAN_AVAILABLE_NETWORK > ListNetworksW (PWLAN_INTERFACE_INFO iface, HANDLE hClient)
 Gets a list of the networks available for an interface (in Windows format) More...
 
PWLAN_AVAILABLE_NETWORK GetNetworkW (HANDLE hClient, const std::string &ssid, const std::string &guid)
 Gets a handle to the network that has been set by setNet() (in Windows format) More...
 

Function Documentation

◆ ConnectWlanServerW()

void* ConnectWlanServerW ( )

Gets a connection to the server.

Exceptions
std::exceptionIn case there is a failure (happens when WiFi is not started)

Definition at line 56 of file CWirelessPower.cpp.

References THROW_EXCEPTION.

Referenced by mrpt::hwdrivers::CWirelessPower::loadConfig_sensorSpecific().

◆ GetInterfaceW()

PWLAN_INTERFACE_INFO GetInterfaceW ( std::string  guid,
HANDLE  hClient 
)

Gets a handle to the interface that has been set by setNet() (in Windows format)

Exceptions
std::exceptionIn case there is a failure
Returns
PWLAN_INTERFACE_INFO returns a handle to the interface

Definition at line 185 of file CWirelessPower.cpp.

References GUID2Str(), and ListInterfacesW().

Referenced by GetNetworkW(), and mrpt::hwdrivers::CWirelessPower::ListNetworks().

◆ GetNetworkW()

PWLAN_AVAILABLE_NETWORK GetNetworkW ( HANDLE  hClient,
const std::string ssid,
const std::string guid 
)

Gets a handle to the network that has been set by setNet() (in Windows format)

Exceptions
std::exceptionIn case there is a failure
Returns
PWLAN_AVAILABLE_NETWORK returns a handle to the network

Definition at line 280 of file CWirelessPower.cpp.

References GetInterfaceW(), and ListNetworksW().

Referenced by mrpt::hwdrivers::CWirelessPower::GetPower().

◆ GUID2Str()

std::string GUID2Str ( const GUID &  ifaceGuid)

Transforms a GUID structure (in Windows format) to a string.

Exceptions
std::exceptionIn case there is a failure
Returns
std::string returns a string containing the GUID

Definition at line 133 of file CWirelessPower.cpp.

References THROW_EXCEPTION.

Referenced by GetInterfaceW(), and mrpt::hwdrivers::CWirelessPower::ListInterfaces().

◆ ListInterfacesW()

std::vector<PWLAN_INTERFACE_INFO> ListInterfacesW ( HANDLE  hClient)

Gets a list of the interfaces available in the system (in Windows format)

Exceptions
std::exceptionIn case there is a failure
Returns
std::vector returns handles to the available interfaces

Definition at line 86 of file CWirelessPower.cpp.

References THROW_EXCEPTION.

Referenced by GetInterfaceW(), and mrpt::hwdrivers::CWirelessPower::ListInterfaces().

◆ ListNetworksW()

std::vector<PWLAN_AVAILABLE_NETWORK> ListNetworksW ( PWLAN_INTERFACE_INFO  iface,
HANDLE  hClient 
)

Gets a list of the networks available for an interface (in Windows format)

Exceptions
std::exceptionIn case there is a failure
Returns
std::vector returns handles to the available networks of a given interface
Parameters
ifacehandle to the WiFi interface

Definition at line 222 of file CWirelessPower.cpp.

Referenced by GetNetworkW(), and mrpt::hwdrivers::CWirelessPower::ListNetworks().




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020