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
mrpt::obs::CObservationCANBusJ1939::getSensorPose
void getSensorPose(mrpt::poses::CPose3D &) const override
Not used.
Definition: CObservationCANBusJ1939.h:58
mrpt::obs::CObservationCANBusJ1939::m_data
std::vector< uint8_t > m_data
The data within this frame (0-8 bytes)
Definition: CObservationCANBusJ1939.h:52
DEFINE_SERIALIZABLE
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Definition: CSerializable.h:152
mrpt::obs::CObservationCANBusJ1939::m_priority
uint8_t m_priority
The priority.
Definition: CObservationCANBusJ1939.h:40
mrpt::obs::CObservationCANBusJ1939::~CObservationCANBusJ1939
~CObservationCANBusJ1939() override=default
Destructor.
mrpt::obs
This namespace contains representation of robot actions and observations.
Definition: CParticleFilter.h:17
mrpt::obs::CObservationCANBusJ1939::setSensorPose
void setSensorPose(const mrpt::poses::CPose3D &) override
A general method to change the sensor pose on the robot.
Definition: CObservationCANBusJ1939.h:59
mrpt::poses::CPose3D
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:85
mrpt::obs::CObservationCANBusJ1939::CObservationCANBusJ1939
CObservationCANBusJ1939()=default
Constructor.
mrpt::obs::CObservationCANBusJ1939::m_data_length
uint8_t m_data_length
Data length
Definition: CObservationCANBusJ1939.h:49
mrpt::obs::CObservationCANBusJ1939
This class stores a message from a CAN BUS with the protocol J1939.
Definition: CObservationCANBusJ1939.h:21
mrpt::obs::CObservationCANBusJ1939::m_src_address
uint8_t m_src_address
The address of the source node within this frame.
Definition: CObservationCANBusJ1939.h:37
mrpt::obs::CObservationCANBusJ1939::m_raw_frame
std::vector< char > m_raw_frame
The ASCII frame.
Definition: CObservationCANBusJ1939.h:55
CObservation.h
mrpt::obs::CObservationCANBusJ1939::getDescriptionAsText
void getDescriptionAsText(std::ostream &o) const override
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
Definition: CObservationCANBusJ1939.cpp:79
mrpt::obs::CObservation
Declares a class that represents any robot's observation.
Definition: CObservation.h:43
mrpt::obs::CObservationCANBusJ1939::m_pgn
uint16_t m_pgn
The Parameter Group Number within this frame.
Definition: CObservationCANBusJ1939.h:34
CSerializable.h
mrpt::obs::CObservationCANBusJ1939::m_pdu_spec
uint8_t m_pdu_spec
PDU Specific.
Definition: CObservationCANBusJ1939.h:46
mrpt::obs::CObservationCANBusJ1939::m_pdu_format
uint8_t m_pdu_format
PDU Format.
Definition: CObservationCANBusJ1939.h:43



Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Sun Jul 19 17:54:30 UTC 2020