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-2018, 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::hwdrivers
21 {
22 /** This class implements an interface to an Impinj RFID reader. This object
23  * connects to a program that does the actual communication with the receiver.
24  * This is done because the manufacturer only provides libraries for C# and
25  * Java. The program that runs the device must be started after this object
26  */
28 {
30 
31  private:
32  /** Poses (Antenna 1)
33  */
35 
36  /** Poses (Antenna 2)
37  */
39 
40  /** Server port
41  */
42  int port;
43 
44  /** IP of the module (usually 127.0.0.1)
45  */
47 
48  /** Reader name
49  */
51 
52  /** Server socket (listens for the incoming connection)
53  */
54  std::unique_ptr<mrpt::comms::CServerTCPSocket> server;
55 
56  /** Client socket (handles the connection to the client)
57  */
58  std::unique_ptr<mrpt::comms::CClientTCPSocket> client;
59 
60  /** Driver executable path
61  */
63 
64  /** Connection status
65  */
66  bool connected;
67 
68  /** start the external driver
69  */
70  void startDriver();
71 
72  static void dummy_startDriver(CImpinjRFID* o);
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 
89  const mrpt::config::CConfigFileBase& configSource,
90  const std::string& section);
91 
92  /** Gets the information of the tags as a timestamped observation
93  * NOTE: Deprecated, use getObservations instead. See CGenericSensor
94  * 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  */
99 
100  /** Close the connection to the reader.
101  */
102  void closeReader();
103 }; // End of class def.
104 
105 }
106 #endif
107 
108 
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
CImpinjRFID()
Default constructor.
Definition: CImpinjRFID.cpp:25
This class implements an interface to an Impinj RFID reader.
Definition: CImpinjRFID.h:27
Contains classes for various device interfaces.
void initialize()
This method can or cannot be implemented in the derived class, depending on the need for it...
Definition: CImpinjRFID.cpp:32
std::unique_ptr< mrpt::comms::CClientTCPSocket > client
Client socket (handles the connection to the client)
Definition: CImpinjRFID.h:58
bool connected
Connection status.
Definition: CImpinjRFID.h:66
std::string IPm
IP of the module (usually 127.0.0.1)
Definition: CImpinjRFID.h:46
This class allows loading and storing values and vectors of different types from a configuration text...
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:62
void startDriver()
start the external driver
Definition: CImpinjRFID.cpp:48
float pose_x_1
Poses (Antenna 1)
Definition: CImpinjRFID.h:34
GLsizei const GLchar ** string
Definition: glext.h:4101
static void dummy_startDriver(CImpinjRFID *o)
Definition: CImpinjRFID.cpp:47
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
float pose_x_2
Poses (Antenna 2)
Definition: CImpinjRFID.h:38
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:54
std::string reader_name
Reader name.
Definition: CImpinjRFID.h:50
This represents one or more RFID tags observed by a receiver.
void loadConfig_sensorSpecific(const mrpt::config::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 config::CConfigFileBase and derived classes)
Definition: CImpinjRFID.cpp:68
void closeReader()
Close the connection to the reader.



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020