00001 /* +---------------------------------------------------------------------------+ 00002 | The Mobile Robot Programming Toolkit (MRPT) C++ library | 00003 | | 00004 | http://www.mrpt.org/ | 00005 | | 00006 | Copyright (C) 2005-2011 University of Malaga | 00007 | | 00008 | This software was written by the Machine Perception and Intelligent | 00009 | Robotics Lab, University of Malaga (Spain). | 00010 | Contact: Emil Khatib <emilkhatib@gmail.com> | 00011 | | 00012 | This file is part of the MRPT project. | 00013 | | 00014 | MRPT is free software: you can redistribute it and/or modify | 00015 | it under the terms of the GNU General Public License as published by | 00016 | the Free Software Foundation, either version 3 of the License, or | 00017 | (at your option) any later version. | 00018 | | 00019 | MRPT is distributed in the hope that it will be useful, | 00020 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 00021 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 00022 | GNU General Public License for more details. | 00023 | | 00024 | You should have received a copy of the GNU General Public License | 00025 | along with MRPT. If not, see <http://www.gnu.org/licenses/>. | 00026 | | 00027 +---------------------------------------------------------------------------+ */ 00028 #ifndef CWirelessPower_H 00029 #define CWirelessPower_H 00030 00031 #include <mrpt/hwdrivers/CGenericSensor.h> 00032 #include <mrpt/slam/CObservationWirelessPower.h> 00033 #include <mrpt/utils/CConfigFileBase.h> 00034 00035 namespace mrpt 00036 { 00037 namespace hwdrivers 00038 { 00039 /** This class implements a wireless power probe. 00040 * \sa mrpt::slam::CWirelessPowerGridMap2D, mrpt::slam::CObservationWirelessPower 00041 * \ingroup mrpt_hwdrivers_grp 00042 */ 00043 class HWDRIVERS_IMPEXP CWirelessPower : public mrpt::hwdrivers::CGenericSensor 00044 { 00045 DEFINE_GENERIC_SENSOR(CWirelessPower) 00046 00047 private: 00048 /** SSID of the WiFi network 00049 */ 00050 std::string ssid; 00051 00052 /** GUID of the WiFi interface 00053 */ 00054 std::string guid; 00055 00056 /** Handle to the WLAN server (Windows) 00057 */ 00058 void* hClient; 00059 00060 public: 00061 /** Default constructor. 00062 */ 00063 CWirelessPower(); 00064 virtual ~CWirelessPower(){}; 00065 00066 /** Set the SSID and GUID of the target network. 00067 * \exception std::exception In case there is a failure 00068 * \param ssid_ SSID of the target network 00069 * \param guid_ GUID of the network interface 00070 */ 00071 void setNet(std::string ssid_, std::string guid_); 00072 00073 void doProcess(){}; 00074 void loadConfig_sensorSpecific( 00075 const mrpt::utils::CConfigFileBase &configSource, 00076 const std::string §ion); 00077 00078 /** Gets a list of the interfaces 00079 * \exception std::exception In case there is a failure 00080 * \return std::vector returns the identifiers (GUID) of the available interfaces 00081 */ 00082 std::vector<std::string> ListInterfaces(); 00083 00084 00085 /** Gets the power of a given network 00086 * \exception std::exception In case there is a failure 00087 * \return Returns the power (0-100). 00088 */ 00089 int GetPower(); 00090 00091 00092 /** Gets the power of a given network as a timestamped observation 00093 * \return Returns true if the observation was correct, and false otherwise 00094 */ 00095 00096 bool getObservation( mrpt::slam::CObservationWirelessPower &outObservation ); 00097 00098 00099 /** Gets a list of the networks available for an interface 00100 * \exception std::exception In case there is a failure 00101 * \return std::vector returns handles to the available networks of a given interface 00102 */ 00103 std::vector<std::string> ListNetworks(); 00104 00105 }; // End of class def. 00106 00107 } // End of namespace 00108 } // End of namespace 00109 #endif
| Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011 |