class mrpt::obs::CObservationCANBusJ1939¶
This class stores a message from a CAN BUS with the protocol J1939.
See also:
#include <mrpt/obs/CObservationCANBusJ1939.h> class CObservationCANBusJ1939: public mrpt::obs::CObservation { public: // fields uint16_t m_pgn {0}; uint8_t m_src_address {0}; uint8_t m_priority {0}; uint8_t m_pdu_format {0}; uint8_t m_pdu_spec {0}; uint8_t m_data_length {0}; std::vector<uint8_t> m_data; std::vector<char> m_raw_frame; // methods virtual void getSensorPose(mrpt::poses::CPose3D&) const; virtual void setSensorPose(const mrpt::poses::CPose3D& newSensorPose); virtual void getDescriptionAsText(std::ostream& o) const; };
Inherited Members¶
public: // fields mrpt::system::TTimeStamp timestamp {mrpt::system::now()}; std::string sensorLabel; // methods mrpt::system::TTimeStamp getTimeStamp() const; virtual mrpt::system::TTimeStamp getOriginalReceivedTimeStamp() const; virtual void load() const; virtual void unload(); template <class METRICMAP> bool insertObservationInto( METRICMAP* theMap, const mrpt::poses::CPose3D* robotPose = nullptr ) const; virtual void getSensorPose(mrpt::poses::CPose3D& out_sensorPose) const = 0; void getSensorPose(mrpt::math::TPose3D& out_sensorPose) const; virtual void setSensorPose(const mrpt::poses::CPose3D& newSensorPose) = 0; void setSensorPose(const mrpt::math::TPose3D& newSensorPose); virtual void getDescriptionAsText(std::ostream& o) const; std::string getDescriptionAsTextValue() const;
Fields¶
uint16_t m_pgn {0}
The Parameter Group Number within this frame.
uint8_t m_src_address {0}
The address of the source node within this frame.
uint8_t m_priority {0}
The priority.
uint8_t m_pdu_format {0}
PDU Format.
uint8_t m_pdu_spec {0}
PDU Specific.
uint8_t m_data_length {0}
Data length.
std::vector<uint8_t> m_data
The data within this frame (0-8 bytes)
std::vector<char> m_raw_frame
The ASCII frame.
Methods¶
virtual void getSensorPose(mrpt::poses::CPose3D&) const
Not used.
virtual void setSensorPose(const mrpt::poses::CPose3D& newSensorPose)
A general method to change the sensor pose on the robot.
Note that most sensors will use the full (6D) CPose3D, but see the derived classes for more details or special cases.
See also:
virtual void getDescriptionAsText(std::ostream& o) const
Build a detailed, multi-line textual description of the observation contents and dump it to the output stream.
If overried by derived classes, call base CObservation::getDescriptionAsText() first to show common information.
This is the text that appears in RawLogViewer when selecting an object in the dataset