Main MRPT website > C++ reference for MRPT 1.9.9
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-2017, 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 #include <memory>
19 
20 namespace mrpt
21 {
22 namespace hwdrivers
23 {
24 /** This class implements an interface to an Impinj RFID reader. This object
25  * connects to a program that does the actual communication with the receiver.
26  * This is done because the manufacturer only provides libraries for C# and
27  * Java. The program that runs the device must be started after this object
28  */
30 {
32 
33  private:
34  /** Poses (Antenna 1)
35  */
37 
38  /** Poses (Antenna 2)
39  */
41 
42  /** Server port
43  */
44  int port;
45 
46  /** IP of the module (usually 127.0.0.1)
47  */
49 
50  /** Reader name
51  */
53 
54  /** Server socket (listens for the incoming connection)
55  */
56  std::unique_ptr<mrpt::comms::CServerTCPSocket> server;
57 
58  /** Client socket (handles the connection to the client)
59  */
60  std::unique_ptr<mrpt::comms::CClientTCPSocket> client;
61 
62  /** Driver executable path
63  */
65 
66  /** Connection status
67  */
68  bool connected;
69 
70  /** start the external driver
71  */
72  void startDriver();
73 
74  static void dummy_startDriver(CImpinjRFID* o);
75 
76  public:
77  /** Default constructor.
78  */
79  CImpinjRFID();
80  virtual ~CImpinjRFID();
81 
82  /** Connect to the reader.
83  */
84  void connect();
85 
86  void doProcess();
87 
88  void initialize();
89 
91  const mrpt::utils::CConfigFileBase& configSource,
92  const std::string& section);
93 
94  /** Gets the information of the tags as a timestamped observation
95  * NOTE: Deprecated, use getObservations instead. See CGenericSensor
96  * documentation. This function is kept for internal use of the module
97  * \return Returns true if the observation was correct, and false otherwise
98  * \sa mrpt::hwdrivers::CGenericSensor
99  */
101 
102  /** Close the connection to the reader.
103  */
104  void closeReader();
105 }; // End of class def.
106 
107 } // End of namespace
108 } // End of namespace
109 #endif
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
CImpinjRFID()
Default constructor.
Definition: CImpinjRFID.cpp:24
This class implements an interface to an Impinj RFID reader.
Definition: CImpinjRFID.h:29
void initialize()
This method can or cannot be implemented in the derived class, depending on the need for it...
Definition: CImpinjRFID.cpp:31
std::unique_ptr< mrpt::comms::CClientTCPSocket > client
Client socket (handles the connection to the client)
Definition: CImpinjRFID.h:60
bool connected
Connection status.
Definition: CImpinjRFID.h:68
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:48
void doProcess()
This method will be invoked at a minimum rate of "process_rate" (Hz)
std::string driver_path
Driver executable path.
Definition: CImpinjRFID.h:64
void startDriver()
start the external driver
Definition: CImpinjRFID.cpp:47
void loadConfig_sensorSpecific(const mrpt::utils::CConfigFileBase &configSource, const std::string &section)
Loads specific configuration for the device from a given source of configuration parameters, for example, an ".ini" file, loading from the section "[iniSection]" (see utils::CConfigFileBase and derived classes)
Definition: CImpinjRFID.cpp:67
float pose_x_1
Poses (Antenna 1)
Definition: CImpinjRFID.h:36
GLsizei const GLchar ** string
Definition: glext.h:4101
static void dummy_startDriver(CImpinjRFID *o)
Definition: CImpinjRFID.cpp:46
#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.
float pose_x_2
Poses (Antenna 2)
Definition: CImpinjRFID.h:40
void connect()
Connect to the reader.
bool getObservation(mrpt::obs::CObservationRFID &obs)
Gets the information of the tags as a timestamped observation NOTE: Deprecated, use getObservations i...
std::unique_ptr< mrpt::comms::CServerTCPSocket > server
Server socket (listens for the incoming connection)
Definition: CImpinjRFID.h:56
std::string reader_name
Reader name.
Definition: CImpinjRFID.h:52
This represents one or more RFID tags observed by a receiver.
void closeReader()
Close the connection to the reader.



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019