Main MRPT website > C++ reference
MRPT logo
CWirelessPower.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | The Mobile Robot Programming Toolkit (MRPT) C++ library |
3  | |
4  | http://www.mrpt.org/ |
5  | |
6  | Copyright (C) 2005-2012 University of Malaga |
7  | |
8  | This software was written by the Machine Perception and Intelligent |
9  | Robotics Lab, University of Malaga (Spain). |
10  | Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> |
11  | |
12  | This file is part of the MRPT project. |
13  | |
14  | MRPT is free software: you can redistribute it and/or modify |
15  | it under the terms of the GNU General Public License as published by |
16  | the Free Software Foundation, either version 3 of the License, or |
17  | (at your option) any later version. |
18  | |
19  | MRPT is distributed in the hope that it will be useful, |
20  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
21  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22  | GNU General Public License for more details. |
23  | |
24  | You should have received a copy of the GNU General Public License |
25  | along with MRPT. If not, see <http://www.gnu.org/licenses/>. |
26  | |
27  +---------------------------------------------------------------------------+ */
28 #ifndef CWirelessPower_H
29 #define CWirelessPower_H
30 
34 
35 namespace mrpt
36 {
37  namespace hwdrivers
38  {
39  /** This class implements a wireless power probe.
40  * \sa mrpt::slam::CWirelessPowerGridMap2D, mrpt::slam::CObservationWirelessPower
41  * \ingroup mrpt_hwdrivers_grp
42  */
44  {
46 
47  private:
48  /** SSID of the WiFi network
49  */
50  std::string ssid;
51 
52  /** GUID of the WiFi interface
53  */
54  std::string guid;
55 
56  /** Handle to the WLAN server (Windows)
57  */
58  void* hClient;
59 
60  /** Poses
61  */
62  float pose_x, pose_y, pose_z, pose_yaw, pose_pitch, pose_roll;
63 
64  public:
65  /** Default constructor.
66  */
68  virtual ~CWirelessPower(){};
69 
70  /** Set the SSID and GUID of the target network.
71  * \exception std::exception In case there is a failure
72  * \param ssid_ SSID of the target network
73  * \param guid_ GUID of the network interface
74  */
75  void setNet(std::string ssid_, std::string guid_);
76 
77  void doProcess();
78  void loadConfig_sensorSpecific(
79  const mrpt::utils::CConfigFileBase &configSource,
80  const std::string &section);
81 
82  /** Gets a list of the interfaces
83  * \exception std::exception In case there is a failure
84  * \return std::vector returns the identifiers (GUID) of the available interfaces
85  */
86  std::vector<std::string> ListInterfaces();
87 
88 
89  /** Gets the power of a given network
90  * \exception std::exception In case there is a failure
91  * \return Returns the power (0-100).
92  */
93  int GetPower();
94 
95 
96  /** Gets the power of a given network as a timestamped observation
97  * NOTE: Deprecated, use getObservations instead. See CGenericSensor documentation. This function is kept for internal use of the module
98  * \return Returns true if the observation was correct, and false otherwise
99  * \sa mrpt::hwdrivers::CGenericSensor
100  */
101 
102  bool getObservation( mrpt::slam::CObservationWirelessPower &outObservation );
103 
104 
105  /** Gets a list of the networks available for an interface
106  * \exception std::exception In case there is a failure
107  * \return std::vector returns handles to the available networks of a given interface
108  */
109  std::vector<std::string> ListNetworks();
110 
111  }; // End of class def.
112 
113  } // End of namespace
114 } // End of namespace
115 #endif



Page generated by Doxygen 1.8.3 for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013