MRPT  2.0.4
CObservationCANBusJ1939.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
11 #include <mrpt/obs/CObservation.h>
13 
14 namespace mrpt::obs
15 {
16 /** This class stores a message from a CAN BUS with the protocol J1939
17  *
18  * \sa CObservation
19  * \ingroup mrpt_obs_grp
20  */
22 {
24 
25  public:
26  /** Constructor.
27  */
28  CObservationCANBusJ1939() = default;
29 
30  /** Destructor
31  */
32  ~CObservationCANBusJ1939() override = default;
33  /** The Parameter Group Number within this frame */
34  uint16_t m_pgn{0};
35 
36  /** The address of the source node within this frame */
37  uint8_t m_src_address{0};
38 
39  /** The priority */
40  uint8_t m_priority{0};
41 
42  /** PDU Format */
43  uint8_t m_pdu_format{0};
44 
45  /** PDU Specific */
46  uint8_t m_pdu_spec{0};
47 
48  /** Data length */
49  uint8_t m_data_length{0};
50 
51  /** The data within this frame (0-8 bytes) */
52  std::vector<uint8_t> m_data;
53 
54  /** The ASCII frame */
55  std::vector<char> m_raw_frame;
56 
57  /** Not used */
58  void getSensorPose(mrpt::poses::CPose3D&) const override {}
59  void setSensorPose(const mrpt::poses::CPose3D&) override {}
60  // See base class docs
61  void getDescriptionAsText(std::ostream& o) const override;
62 
63 }; // End of class def.
64 
65 } // namespace mrpt::obs
~CObservationCANBusJ1939() override=default
Destructor.
This class stores a message from a CAN BUS with the protocol J1939.
CObservationCANBusJ1939()=default
Constructor.
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.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:85
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.
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
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 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020