class mrpt::hwdrivers::CImpinjRFID
Overview
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
#include <mrpt/hwdrivers/CImpinjRFID.h> class CImpinjRFID: public mrpt::hwdrivers::CGenericSensor { public: // construction CImpinjRFID(); // methods void connect(); virtual void doProcess(); virtual void initialize(); virtual void loadConfig_sensorSpecific(const mrpt::config::CConfigFileBase& configSource, const std::string& section); bool getObservation(mrpt::obs::CObservationRFID& obs); void closeReader(); };
Inherited Members
public: // typedefs typedef std::shared_ptr<CGenericSensor> Ptr; typedef std::multimap<mrpt::system::TTimeStamp, mrpt::serialization::CSerializable::Ptr> TListObservations; typedef std::pair<mrpt::system::TTimeStamp, mrpt::serialization::CSerializable::Ptr> TListObsPair; // enums enum TSensorState; // methods virtual const mrpt::hwdrivers::TSensorClassId* GetRuntimeClass() const = 0; TSensorState getState() const; double getProcessRate() const; std::string getSensorLabel() const; void setSensorLabel(const std::string& sensorLabel); void enableVerbose(bool enabled = true); bool isVerboseEnabled() const; CGenericSensor& operator = (const CGenericSensor&); virtual void loadConfig(const mrpt::config::CConfigFileBase& configSource, const std::string& section); virtual void initialize(); virtual void doProcess() = 0; virtual TListObservations getObservations(); virtual void setPathForExternalImages(] const std::string& directory); virtual void setExternalImageFormat(const std::string& ext); virtual void setExternalImageJPEGQuality(const unsigned int quality); virtual unsigned int getExternalImageJPEGQuality() const; static void registerClass(const TSensorClassId* pNewClass); static CGenericSensor* createSensor(const std::string& className); static Ptr createSensorPtr(const std::string& className);
Construction
CImpinjRFID()
Default constructor.
Methods
void connect()
Connect to the reader.
virtual void doProcess()
This method will be invoked at a minimum rate of “process_rate” (Hz)
Parameters:
This |
method must throw an exception with a descriptive message if some critical error is found. |
virtual void initialize()
This method can or cannot be implemented in the derived class, depending on the need for it.
Parameters:
This |
method must throw an exception with a descriptive message if some critical error is found. |
virtual 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)
Parameters:
This |
method must throw an exception with a descriptive message if some critical parameter is missing or has an invalid value. |
bool getObservation(mrpt::obs::CObservationRFID& obs)
Gets the information of the tags as a timestamped observation NOTE: Deprecated, use getObservations instead.
See CGenericSensor documentation. This function is kept for internal use of the module
Returns:
Returns true if the observation was correct, and false otherwise
See also:
mrpt::hwdrivers::CGenericSensor
void closeReader()
Close the connection to the reader.