MRPT  1.9.9
CWirelessPower.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #ifndef CWirelessPower_H
10 #define CWirelessPower_H
11 
15 
16 namespace mrpt::hwdrivers
17 {
18 /** This class implements a wireless power probe.
19  * \sa mrpt::maps::CWirelessPowerGridMap2D,
20  * mrpt::obs::CObservationWirelessPower
21  * \ingroup mrpt_hwdrivers_grp
22  */
24 {
26 
27  private:
28  /** SSID of the WiFi network
29  */
31 
32  /** GUID of the WiFi interface
33  */
35 
36  /** Handle to the WLAN server (Windows)
37  */
38  void* hClient;
39 
40  /** Poses
41  */
43 
44  public:
45  /** Default constructor.
46  */
48  virtual ~CWirelessPower(){};
49 
50  /** Set the SSID and GUID of the target network.
51  * \exception std::exception In case there is a failure
52  * \param ssid_ SSID of the target network
53  * \param guid_ GUID of the network interface
54  */
55  void setNet(std::string ssid_, std::string guid_);
56 
57  void doProcess();
59  const mrpt::config::CConfigFileBase& configSource,
60  const std::string& section);
61 
62  /** Gets a list of the interfaces
63  * \exception std::exception In case there is a failure
64  * \return std::vector returns the identifiers (GUID) of the available
65  * interfaces
66  */
67  std::vector<std::string> ListInterfaces();
68 
69  /** Gets the power of a given network
70  * \exception std::exception In case there is a failure
71  * \return Returns the power (0-100).
72  */
73  int GetPower();
74 
75  /** Gets the power of a given network as a timestamped observation
76  * NOTE: Deprecated, use getObservations instead. See CGenericSensor
77  * documentation. This function is kept for internal use of the module
78  * \return Returns true if the observation was correct, and false otherwise
79  * \sa mrpt::hwdrivers::CGenericSensor
80  */
81 
83 
84  /** Gets a list of the networks available for an interface
85  * \exception std::exception In case there is a failure
86  * \return std::vector returns handles to the available networks of a given
87  * interface
88  */
89  std::vector<std::string> ListNetworks();
90 
91 }; // End of class def.
92 
93 }
94 #endif
95 
96 
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
void loadConfig_sensorSpecific(const mrpt::config::CConfigFileBase &configSource, const std::string &section)
Loads specific configuration for the device from a given source of configuration parameters, for example, an ".ini" file, loading from the section "[iniSection]" (see config::CConfigFileBase and derived classes)
Contains classes for various device interfaces.
std::string guid
GUID of the WiFi interface.
CWirelessPower()
Default constructor.
This class allows loading and storing values and vectors of different types from a configuration text...
bool getObservation(mrpt::obs::CObservationWirelessPower &outObservation)
Gets the power of a given network as a timestamped observation NOTE: Deprecated, use getObservations ...
This class implements a wireless power probe.
std::string ssid
SSID of the WiFi network.
GLsizei const GLchar ** string
Definition: glext.h:4101
This represents a measurement of the wireless strength perceived by the robot.
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
std::vector< std::string > ListNetworks()
Gets a list of the networks available for an interface.
std::vector< std::string > ListInterfaces()
Gets a list of the interfaces.
void setNet(std::string ssid_, std::string guid_)
Set the SSID and GUID of the target network.
int GetPower()
Gets the power of a given network.
void doProcess()
This method will be invoked at a minimum rate of "process_rate" (Hz)
void * hClient
Handle to the WLAN server (Windows)



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