Main MRPT website > C++ reference for MRPT 1.4.0
obs/CObservationRFID.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-2016, 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 CObservationRFID_H
10 #define CObservationRFID_H
11 
13 #include <mrpt/obs/CObservation.h>
14 #include <mrpt/poses/CPose3D.h>
15 #include <mrpt/poses/CPose2D.h>
16 
17 namespace mrpt
18 {
19 namespace obs
20 {
22 
23  /** This represents one or more RFID tags observed by a receiver.
24  *
25  * \sa CObservation, mrpt::hwdrivers::CImpinjRFID for a software sensor capable of reading this kind of observations.
26  * \ingroup mrpt_obs_grp
27  */
29  {
30  // This must be added to any CSerializable derived class:
32 
33  public:
34  /** Constructor */
36 
37  /** @name The data members
38  * @{ */
39  mrpt::poses::CPose3D sensorPoseOnRobot; //!< The location of the sensing antenna on the robot coordinate framework
40 
41  /** Each of the individual readings of a RFID tag */
43  {
44  TTagReading() : power(-1000) {}
45 
46  double power; //!< The power or signal strength as sensed by the RFID receiver (in dBm)
47  std::string epc; //!< EPC code of the observed tag
48  std::string antennaPort; //!< Port of the antenna that did the reading
49  };
50 
51  /** The vector of individual tag observations */
52  std::vector<TTagReading> tag_readings;
53 
54  inline uint32_t getNtags() const { return tag_readings.size(); }
55 
56  /** @} */
57 
58  void getSensorPose( mrpt::poses::CPose3D &out_sensorPose ) const MRPT_OVERRIDE;
59  /** A general method to change the sensor pose on the robot.
60  * It has no effects in this class
61  * \sa getSensorPose */
62  void setSensorPose( const mrpt::poses::CPose3D &newSensorPose ) MRPT_OVERRIDE;
63  // See base class docs
64  void getDescriptionAsText(std::ostream &o) const MRPT_OVERRIDE;
65 
66  }; // End of class def.
68 
69 
70  } // End of namespace
71 } // End of namespace
72 
73 #endif
mrpt::obs::CObservationRFID::CObservationRFID
CObservationRFID()
Constructor.
mrpt::obs::CObservationRFID::getNtags
uint32_t getNtags() const
Definition: obs/CObservationRFID.h:54
CObservation.h
mrpt::obs::CObservationRFID::TTagReading::antennaPort
std::string antennaPort
Port of the antenna that did the reading.
Definition: obs/CObservationRFID.h:48
mrpt::obs::CObservationRFID::tag_readings
std::vector< TTagReading > tag_readings
The vector of individual tag observations.
Definition: obs/CObservationRFID.h:52
mrpt::obs::CObservationRFID::getDescriptionAsText
void getDescriptionAsText(std::ostream &o) const MRPT_OVERRIDE
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CParticleFilter.h:17
CPose2D.h
mrpt::obs::CObservationRFID::sensorPoseOnRobot
mrpt::poses::CPose3D sensorPoseOnRobot
The location of the sensing antenna on the robot coordinate framework.
Definition: obs/CObservationRFID.h:39
mrpt::obs::CObservationRFID::TTagReading::TTagReading
TTagReading()
Definition: obs/CObservationRFID.h:44
mrpt::obs::CObservationRFID::setSensorPose
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) MRPT_OVERRIDE
A general method to change the sensor pose on the robot.
mrpt::poses::CPose3D
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:73
DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
Definition: CSerializable.h:174
mrpt::obs::CObservationRFID::getSensorPose
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const MRPT_OVERRIDE
A general method to retrieve the sensor pose on the robot.
CPose3D.h
DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
Definition: CSerializable.h:170
mrpt::obs::CObservationRFID
This represents one or more RFID tags observed by a receiver.
Definition: obs/CObservationRFID.h:29
DEFINE_SERIALIZABLE
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Definition: CSerializable.h:147
mrpt::obs::CObservation
Declares a class that represents any robot's observation.
Definition: obs/CObservation.h:48
mrpt::obs::CObservationRFID::TTagReading
Each of the individual readings of a RFID tag.
Definition: obs/CObservationRFID.h:43
mrpt::obs::CObservationRFID::TTagReading::power
double power
The power or signal strength as sensed by the RFID receiver (in dBm)
Definition: obs/CObservationRFID.h:46
CSerializable.h
mrpt::obs::CObservationRFID::TTagReading::epc
std::string epc
EPC code of the observed tag.
Definition: obs/CObservationRFID.h:47
MRPT_OVERRIDE
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
Definition: mrpt_macros.h:28



Page generated by Doxygen 1.8.20 for MRPT 1.4.0 SVN: at Thu Aug 27 02:40:23 UTC 2020