Main MRPT website > C++ reference for MRPT 1.4.0
obs/CObservationCANBusJ1939.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 CObservationCANBusJ1939_H
10#define CObservationCANBusJ1939_H
11
14
15namespace mrpt
16{
17namespace obs
18{
20
21 /** This class stores a message from a CAN BUS with the protocol J1939
22 *
23 * \sa CObservation
24 * \ingroup mrpt_obs_grp
25 */
27 {
28 // This must be added to any CSerializable derived class:
30
31 public:
32 /** Constructor.
33 */
35 m_pgn(0), m_src_address(0), m_priority(0), m_pdu_format(0), m_pdu_spec(0), m_data_length(0)
36 { }
37
38 /** Destructor
39 */
41 { }
42
43 /** The Parameter Group Number within this frame */
45
46 /** The address of the source node within this frame */
48
49 /** The priority */
51
52 /** PDU Format */
54
55 /** PDU Specific */
57
58 /** Data length */
60
61 /** The data within this frame (0-8 bytes) */
62 std::vector<uint8_t> m_data;
63
64 /** The ASCII frame */
65 std::vector<char> m_raw_frame;
66
67 /** Not used */
70 // See base class docs
71 void getDescriptionAsText(std::ostream &o) const MRPT_OVERRIDE;
72
73 }; // End of class def.
75
76 } // End of namespace
77} // End of namespace
78
79#endif
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
#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...
This class stores a message from a CAN BUS with the protocol J1939.
void setSensorPose(const mrpt::poses::CPose3D &) MRPT_OVERRIDE
A general method to change the sensor pose on the robot.
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...
uint8_t m_src_address
The address of the source node within this frame.
void getSensorPose(mrpt::poses::CPose3D &) const MRPT_OVERRIDE
Not used.
uint16_t m_pgn
The Parameter Group Number within this frame.
std::vector< uint8_t > m_data
The data within this frame (0-8 bytes)
std::vector< char > m_raw_frame
The ASCII frame.
Declares a class that represents any robot's observation.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition CPose3D.h:73
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
Definition mrpt_macros.h:28
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
unsigned int uint16_t
Definition pstdint.h:170
unsigned char uint8_t
Definition pstdint.h:143



Page generated by Doxygen 1.9.7 for MRPT 1.4.0 SVN: at Tue Jun 13 14:27:49 UTC 2023