Main MRPT website > C++ reference
MRPT logo
CImpinjRFID.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-2014, 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 CImpinjRFID_H
10 #define CImpinjRFID_H
11 
15 
18 
19 namespace mrpt
20 {
21  namespace hwdrivers
22  {
23  /** 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
24  */
26  {
28 
29  private:
30 
31  /** Poses (Antenna 1)
32  */
33  float pose_x_1, pose_y_1, pose_z_1, pose_yaw_1, pose_pitch_1, pose_roll_1;
34 
35  /** Poses (Antenna 2)
36  */
37  float pose_x_2, pose_y_2, pose_z_2, pose_yaw_2, pose_pitch_2, pose_roll_2;
38 
39  /** Server port
40  */
41  int port;
42 
43  /** IP of the module (usually 127.0.0.1)
44  */
45  std::string IPm;
46 
47  /** Reader name
48  */
49  std::string reader_name;
50 
51  /** Server socket (listens for the incoming connection)
52  */
54 
55  /** Client socket (handles the connection to the client)
56  */
58 
59  /** Driver executable path
60  */
61  std::string driver_path;
62 
63  /** Connection status
64  */
65  bool connected;
66 
67  /** start the external driver
68  */
69  void startDriver();
70 
71  static void dummy_startDriver(CImpinjRFID *o);
72 
73 
74  public:
75  /** Default constructor.
76  */
77  CImpinjRFID();
78  virtual ~CImpinjRFID();
79 
80  /** Connect to the reader.
81  */
82  void connect();
83 
84  void doProcess();
85 
86  void initialize();
87 
88 
89  void loadConfig_sensorSpecific(
90  const mrpt::utils::CConfigFileBase &configSource,
91  const std::string &section);
92 
93  /** Gets the information of the tags as a timestamped observation
94  * NOTE: Deprecated, use getObservations instead. See CGenericSensor documentation. This function is kept for internal use of the module
95  * \return Returns true if the observation was correct, and false otherwise
96  * \sa mrpt::hwdrivers::CGenericSensor
97  */
98  bool getObservation( mrpt::slam::CObservationRFID &obs );
99 
100 
101  /** Close the connection to the reader.
102  */
103  void closeReader();
104  }; // End of class def.
105 
106  } // End of namespace
107 } // End of namespace
108 #endif
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
This class implements an interface to an Impinj RFID reader.
Definition: CImpinjRFID.h:25
mrpt::utils::CServerTCPSocket * server
Server socket (listens for the incoming connection)
Definition: CImpinjRFID.h:53
A TCP socket that can be wait for client connections to enter.
bool connected
Connection status.
Definition: CImpinjRFID.h:65
This class allows loading and storing values and vectors of different types from a configuration text...
std::string IPm
IP of the module (usually 127.0.0.1)
Definition: CImpinjRFID.h:45
std::string driver_path
Driver executable path.
Definition: CImpinjRFID.h:61
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
This represents one or more RFID tags observed by a receiver.
mrpt::utils::CClientTCPSocket * client
Client socket (handles the connection to the client)
Definition: CImpinjRFID.h:57
#define HWDRIVERS_IMPEXP
A TCP socket that can be connected to a TCP server, implementing MRPT's CStream interface for passing...
std::string reader_name
Reader name.
Definition: CImpinjRFID.h:49



Page generated by Doxygen 1.8.8 for MRPT 1.2.2 SVN:Unversioned directory at Tue Oct 14 02:14:08 UTC 2014