40 const uint32_t Ntags = tag_readings.size();
44 for (
uint32_t i=0;i<Ntags;i++) out << tag_readings[i].power;
45 for (
uint32_t i=0;i<Ntags;i++) out << tag_readings[i].epc;
46 for (
uint32_t i=0;i<Ntags;i++) out << tag_readings[i].antennaPort;
50 out << sensorPoseOnRobot;
73 Ntags = atoi(ntags.c_str());
81 tag_readings.resize(Ntags);
82 for (
uint32_t i=0;i<Ntags;i++) in >> tag_readings[i].power;
83 for (
uint32_t i=0;i<Ntags;i++) in >> tag_readings[i].epc;
84 for (
uint32_t i=0;i<Ntags;i++) in >> tag_readings[i].antennaPort;
95 in >> sensorPoseOnRobot;
96 else sensorPoseOnRobot =
CPose3D();
108 out_sensorPose=sensorPoseOnRobot;
113 sensorPoseOnRobot = newSensorPose;
120 std::cout <<
"Number of RFID tags sensed: " << tag_readings.size() << std::endl << std::endl;
122 for (
size_t i=0;i<tag_readings.size();i++)
126 <<
": Power=" << rfid.
power 128 <<
" | EPC=" << rfid.
epc << std::endl;
std::string antennaPort
Port of the antenna that did the reading.
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) MRPT_OVERRIDE
A general method to change the sensor pose on the robot.
IMPLEMENTS_SERIALIZABLE(CLogFileRecord_FullEval, CHolonomicLogFileRecord, mrpt::nav) IMPLEMENTS_SERIALIZABLE(CHolonomicFullEval
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
std::string epc
EPC code of the observed tag.
This namespace contains representation of robot actions and observations.
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const MRPT_OVERRIDE
A general method to retrieve the sensor pose on the robot.
double power
The power or signal strength as sensed by the RFID receiver (in dBm)
GLsizei const GLchar ** string
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
#define INVALID_TIMESTAMP
Represents an invalid timestamp, where applicable.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Declares a class that represents any robot's observation.
void readFromStream(mrpt::utils::CStream &in, int version)
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly...
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...
Each of the individual readings of a RFID tag.
This represents one or more RFID tags observed by a receiver.
unsigned __int32 uint32_t
void writeToStream(mrpt::utils::CStream &out, int *getVersion) const
Introduces a pure virtual method responsible for writing to a CStream.
virtual void getDescriptionAsText(std::ostream &o) const
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...