MRPT  1.9.9
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-2018, 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::obs
16 {
17 /** This class stores a message from a CAN BUS with the protocol J1939
18  *
19  * \sa CObservation
20  * \ingroup mrpt_obs_grp
21  */
23 {
25 
26  public:
27  /** Constructor.
28  */
30  : m_pgn(0),
31  m_src_address(0),
32  m_priority(0),
33  m_pdu_format(0),
34  m_pdu_spec(0),
35  m_data_length(0)
36  {
37  }
38 
39  /** Destructor
40  */
42  /** The Parameter Group Number within this frame */
44 
45  /** The address of the source node within this frame */
47 
48  /** The priority */
50 
51  /** PDU Format */
53 
54  /** PDU Specific */
56 
57  /** Data length */
59 
60  /** The data within this frame (0-8 bytes) */
61  std::vector<uint8_t> m_data;
62 
63  /** The ASCII frame */
64  std::vector<char> m_raw_frame;
65 
66  /** Not used */
67  void getSensorPose(mrpt::poses::CPose3D&) const override {}
68  void setSensorPose(const mrpt::poses::CPose3D&) override {}
69  // See base class docs
70  void getDescriptionAsText(std::ostream& o) const override;
71 
72 }; // End of class def.
73 
74 }
75 #endif
76 
77 
unsigned __int16 uint16_t
Definition: rptypes.h:44
This class stores a message from a CAN BUS with the protocol J1939.
unsigned char uint8_t
Definition: rptypes.h:41
This namespace contains representation of robot actions and observations.
void getSensorPose(mrpt::poses::CPose3D &) const override
Not used.
void setSensorPose(const mrpt::poses::CPose3D &) override
A general method to change the sensor pose on the robot.
#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:86
Declares a class that represents any robot&#39;s observation.
Definition: CObservation.h:43
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.
void getDescriptionAsText(std::ostream &o) const override
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
std::vector< uint8_t > m_data
The data within this frame (0-8 bytes)



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020