Go to the documentation of this file.
9 #ifndef CCANBusReader_H
10 #define CCANBusReader_H
59 bool tryToOpenComms(std::string *err_msg=NULL);
60 bool waitContinuousSampleFrame(
62 uint8_t &out_pdu_format,
63 uint8_t &out_pdu_spec,
64 uint8_t &out_src_address,
65 uint8_t &out_data_length,
67 std::vector<uint8_t> &out_data,
68 std::vector<char> &out_raw_frame);
70 bool sendCANBusReaderSpeed();
71 bool CANBusOpenChannel();
72 bool CANBusCloseChannel();
73 bool CANBusAutoPoll();
76 bool setupSerialComms();
77 bool queryVersion(
bool printOutVersion =
false);
78 bool waitACK(uint16_t timeout_ms);
79 bool waitForVersion(uint16_t timeout,
bool printOutVersion =
false);
80 bool waitIncomingFrame(uint16_t timeout);
82 bool sendCommandToCANReader(
const uint8_t *cmd,
const uint16_t cmd_len,
bool wait =
true);
84 uint8_t m_received_frame_buffer[2000];
97 void loadConfig_sensorSpecific(
99 const std::string &iniSection );
140 void doProcessSimple(
141 bool &outThereIsObservation,
143 bool &hardwareError );
unsigned int m_nTries_current
bool getCANReaderTimeStamping()
This base class provides a common printf-like method to send debug information to std::cout,...
void setCANReaderSpeed(const unsigned int speed)
Sets the CAN reader speed when connecting to the CAN Bus.
void setSerialPort(const std::string &port)
Changes the serial port to connect to (call prior to 'doProcess'), for example "COM1" or "ttyS0".
unsigned int getCurrentConnectTry() const
If performing several tries in ::initialize(), this is the current try loop number.
std::string m_com_port
If set to non-empty, the serial port will be attempted to be opened automatically when this class is ...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
bool m_CANBusChannel_isOpen
unsigned int m_nTries_connect
Default = 1.
int m_com_baudRate
Baudrate: 9600, 38400, 500000.
unsigned int getCANReaderSpeed()
void setCANReaderTimeStamping(bool setTimestamp=false)
Enables/Disables the addition of a timestamp according to the arrival time to the converter (default=...
bool m_canreader_timestamp
This class allows loading and storing values and vectors of different types from a configuration text...
This class stores a message from a CAN BUS with the protocol J1939.
A communications serial port built as an implementation of a utils::CStream.
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
This "software driver" implements the communication protocol for interfacing a SICK LMS 2XX laser sca...
CSerialPort * m_mySerialPort
Will be !=NULL only if I created it, so I must destroy it at the end.
void setBaudRate(int baud)
Changes the serial port baud rate (call prior to 'doProcess'); valid values are 9600,...
std::string getSerialPort() const
Page generated by Doxygen 1.8.17 for MRPT 1.4.0 SVN: at Sat Jan 18 22:37:07 UTC 2020 | | |