MRPT  2.0.4
CImpinjRFID.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
14 
17 #include <memory>
18 
19 namespace mrpt::hwdrivers
20 {
21 /** This class implements an interface to an Impinj RFID reader. This object
22  * connects to a program that does the actual communication with the receiver.
23  * This is done because the manufacturer only provides libraries for C# and
24  * Java. The program that runs the device must be started after this object
25  */
27 {
29 
30  private:
31  /** Poses (Antenna 1)
32  */
34 
35  /** Poses (Antenna 2)
36  */
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  */
53  std::unique_ptr<mrpt::comms::CServerTCPSocket> server;
54 
55  /** Client socket (handles the connection to the client)
56  */
57  std::unique_ptr<mrpt::comms::CClientTCPSocket> client;
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  public:
74  /** Default constructor.
75  */
76  CImpinjRFID();
77  ~CImpinjRFID() override;
78 
79  /** Connect to the reader.
80  */
81  void connect();
82 
83  void doProcess() override;
84 
85  void initialize() override;
86 
88  const mrpt::config::CConfigFileBase& configSource,
89  const std::string& section) override;
90 
91  /** Gets the information of the tags as a timestamped observation
92  * NOTE: Deprecated, use getObservations instead. See CGenericSensor
93  * documentation. This function is kept for internal use of the module
94  * \return Returns true if the observation was correct, and false otherwise
95  * \sa mrpt::hwdrivers::CGenericSensor
96  */
98 
99  /** Close the connection to the reader.
100  */
101  void closeReader();
102 }; // End of class def.
103 
104 } // namespace mrpt::hwdrivers
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:26
Contains classes for various device interfaces.
std::unique_ptr< mrpt::comms::CClientTCPSocket > client
Client socket (handles the connection to the client)
Definition: CImpinjRFID.h:57
bool connected
Connection status.
Definition: CImpinjRFID.h:65
void loadConfig_sensorSpecific(const mrpt::config::CConfigFileBase &configSource, const std::string &section) override
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:67
std::string IPm
IP of the module (usually 127.0.0.1)
Definition: CImpinjRFID.h:45
This class allows loading and storing values and vectors of different types from a configuration text...
void initialize() override
This method can or cannot be implemented in the derived class, depending on the need for it...
Definition: CImpinjRFID.cpp:31
std::string driver_path
Driver executable path.
Definition: CImpinjRFID.h:61
void startDriver()
start the external driver
Definition: CImpinjRFID.cpp:47
float pose_x_1
Poses (Antenna 1)
Definition: CImpinjRFID.h:33
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...
float pose_x_2
Poses (Antenna 2)
Definition: CImpinjRFID.h:37
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:53
void doProcess() override
This method will be invoked at a minimum rate of "process_rate" (Hz)
std::string reader_name
Reader name.
Definition: CImpinjRFID.h:49
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 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020