42 for (i = 0; i <
n; i++) out << m_data[i];
44 n = m_raw_frame.size();
46 for (i = 0; i <
n; i++) out <<
uint8_t(m_raw_frame[i]);
48 out << sensorLabel << timestamp;
77 for (i = 0; i < n; ++i) in >> m_data[i];
80 m_raw_frame.resize(
n);
82 for (i = 0; i <
n; ++i)
85 m_raw_frame[i] = char(aux);
101 o <<
"Priority: " <<
format(
"0x%02X", m_priority)
102 <<
" [Dec: " << int(m_priority) <<
"]" << endl;
103 o <<
"Parameter Group Number (PGN): " <<
format(
"0x%04X", m_pgn)
104 <<
" [Dec: " << int(m_pgn) <<
"]" << endl;
105 o <<
"PDU Format: " <<
format(
"0x%02X", m_pdu_format)
106 <<
" [Dec: " << int(m_pdu_format) <<
"]" << endl;
107 o <<
"PDU Spec: " <<
format(
"0x%02X", m_pdu_spec)
108 <<
" [Dec: " << int(m_pdu_spec) <<
"]" << endl;
109 o <<
"Source address: " <<
format(
"0x%02X", m_src_address)
110 <<
" [Dec: " << int(m_src_address) <<
"]" << endl;
111 o <<
"Data length: " <<
format(
"0x%02X", m_data_length)
112 <<
" [Dec: " << int(m_data_length) <<
"]" << endl;
114 for (
uint8_t k = 0; k < m_data.size(); ++k)
115 o <<
format(
"0x%02X", m_data[k]) <<
" ";
117 for (
uint8_t k = 0; k < m_data.size(); ++k) o <<
int(m_data[k]) <<
" ";
121 for (
uint8_t k = 0; k < m_raw_frame.size(); ++k) o << m_raw_frame[k];
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
This class stores a message from a CAN BUS with the protocol J1939.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
void readFromStream(mrpt::utils::CStream &in, int version) override
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly...
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
This namespace contains representation of robot actions and observations.
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Declares a class that represents any robot's observation.
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
void getDescriptionAsText(std::ostream &o) const override
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
unsigned __int32 uint32_t
virtual void getDescriptionAsText(std::ostream &o) const
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...