MRPT  1.9.9
CWirelessPower.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
14 
15 namespace mrpt::hwdrivers
16 {
17 /** This class implements a wireless power probe.
18  * \sa mrpt::maps::CWirelessPowerGridMap2D,
19  * mrpt::obs::CObservationWirelessPower
20  * \ingroup mrpt_hwdrivers_grp
21  */
23 {
25 
26  private:
27  /** SSID of the WiFi network
28  */
30 
31  /** GUID of the WiFi interface
32  */
34 
35  /** Handle to the WLAN server (Windows)
36  */
37  void* hClient;
38 
39  /** Poses
40  */
42 
43  public:
44  /** Default constructor.
45  */
47  ~CWirelessPower() override = default;
48 
49  /** Set the SSID and GUID of the target network.
50  * \exception std::exception In case there is a failure
51  * \param ssid_ SSID of the target network
52  * \param guid_ GUID of the network interface
53  */
54  void setNet(std::string ssid_, std::string guid_);
55 
56  void doProcess() override;
58  const mrpt::config::CConfigFileBase& configSource,
59  const std::string& section) override;
60 
61  /** Gets a list of the interfaces
62  * \exception std::exception In case there is a failure
63  * \return std::vector returns the identifiers (GUID) of the available
64  * interfaces
65  */
66  std::vector<std::string> ListInterfaces();
67 
68  /** Gets the power of a given network
69  * \exception std::exception In case there is a failure
70  * \return Returns the power (0-100).
71  */
72  int GetPower();
73 
74  /** Gets the power of a given network as a timestamped observation
75  * NOTE: Deprecated, use getObservations instead. See CGenericSensor
76  * documentation. This function is kept for internal use of the module
77  * \return Returns true if the observation was correct, and false otherwise
78  * \sa mrpt::hwdrivers::CGenericSensor
79  */
80 
82 
83  /** Gets a list of the networks available for an interface
84  * \exception std::exception In case there is a failure
85  * \return std::vector returns handles to the available networks of a given
86  * interface
87  */
88  std::vector<std::string> ListNetworks();
89 
90 }; // End of class def.
91 
92 } // namespace mrpt::hwdrivers
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
~CWirelessPower() override=default
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:4116
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.
void loadConfig_sensorSpecific(const mrpt::config::CConfigFileBase &configSource, const std::string &section) override
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)
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.
void doProcess() override
This method will be invoked at a minimum rate of "process_rate" (Hz)
int GetPower()
Gets the power of a given network.
void * hClient
Handle to the WLAN server (Windows)



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019