Main MRPT website > C++ reference for MRPT 1.9.9
Functions
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 55 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 184 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 279 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 132 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 85 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 221 of file CWirelessPower.cpp.

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




Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST