Main MRPT website > C++ reference for MRPT 1.5.9
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-2017, 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 
13 #include <mrpt/obs/CObservation.h>
14 
15 namespace mrpt
16 {
17 namespace obs
18 {
19  DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE( CObservationCANBusJ1939 , CObservation, OBS_IMPEXP)
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.
74  DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE( CObservationCANBusJ1939 , CObservation, OBS_IMPEXP)
75 
76  } // End of namespace
77 } // End of namespace
78 
79 #endif
unsigned __int16 uint16_t
Definition: rptypes.h:46
void setSensorPose(const mrpt::poses::CPose3D &) MRPT_OVERRIDE
A general method to change the sensor pose on the robot.
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
This class stores a message from a CAN BUS with the protocol J1939.
unsigned char uint8_t
Definition: rptypes.h:43
#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...
void getSensorPose(mrpt::poses::CPose3D &) const MRPT_OVERRIDE
Not used.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:72
Declares a class that represents any robot&#39;s observation.
std::vector< char > m_raw_frame
The ASCII frame.
uint16_t m_pgn
The Parameter Group Number within this frame.
uint8_t m_src_address
The address of the source node within this frame.
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
std::vector< uint8_t > m_data
The data within this frame (0-8 bytes)



Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020