Main MRPT website > C++ reference
MRPT logo
CImpinjRFID.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 CImpinjRFID_H
29 #define CImpinjRFID_H
30 
34 
37 
38 namespace mrpt
39 {
40  namespace hwdrivers
41  {
42  /** This class implements an interface to an Impinj RFID reader. This object connects to a program that does the actual communication with the receiver. This is done because the manufacturer only provides libraries for C# and Java. The program that runs the device must be started after this object
43  */
45  {
47 
48  private:
49 
50  /** Poses (Antenna 1)
51  */
52  float pose_x_1, pose_y_1, pose_z_1, pose_yaw_1, pose_pitch_1, pose_roll_1;
53 
54  /** Poses (Antenna 2)
55  */
56  float pose_x_2, pose_y_2, pose_z_2, pose_yaw_2, pose_pitch_2, pose_roll_2;
57 
58  /** Server port
59  */
60  int port;
61 
62  /** IP of the module (usually 127.0.0.1)
63  */
64  std::string IPm;
65 
66  /** Reader name
67  */
68  std::string reader_name;
69 
70  /** Server socket (listens for the incoming connection)
71  */
73 
74  /** Client socket (handles the connection to the client)
75  */
77 
78  /** Driver executable path
79  */
80  std::string driver_path;
81 
82  /** Connection status
83  */
84  bool connected;
85 
86  /** start the external driver
87  */
88  void startDriver();
89 
90  static void dummy_startDriver(CImpinjRFID *o);
91 
92 
93  public:
94  /** Default constructor.
95  */
96  CImpinjRFID();
97  virtual ~CImpinjRFID();
98 
99  /** Connect to the reader.
100  */
101  void connect();
102 
103  void doProcess();
104 
105  void initialize();
106 
107 
108  void loadConfig_sensorSpecific(
109  const mrpt::utils::CConfigFileBase &configSource,
110  const std::string &section);
111 
112  /** Gets the information of the tags as a timestamped observation
113  * NOTE: Deprecated, use getObservations instead. See CGenericSensor documentation. This function is kept for internal use of the module
114  * \return Returns true if the observation was correct, and false otherwise
115  * \sa mrpt::hwdrivers::CGenericSensor
116  */
117  bool getObservation( mrpt::slam::CObservationRFID &obs );
118 
119 
120  /** Close the connection to the reader.
121  */
122  void closeReader();
123  }; // End of class def.
124 
125  } // End of namespace
126 } // End of namespace
127 #endif



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