Go to the documentation of this file.
56 #ifndef __SIM_LOC_RESULT_PORT_PARSER_H_INCLUDED
57 #define __SIM_LOC_RESULT_PORT_PARSER_H_INCLUDED
82 virtual bool decode(
const std::vector<uint8_t> & binary_data);
88 virtual std::vector<uint8_t>
encode(
void);
105 static void parseAssert(
bool assertion,
const std::string & assertion_msg,
const std::string & info,
const std::string & file,
int line);
117 template<
typename T>
size_t copyBytesToValue(
const std::vector<uint8_t> & binary_data,
size_t start_byte, T & value,
const std::string & info =
"",
bool little_endian =
false);
128 template<
typename T>
size_t copyBytesToArray(
const std::vector<uint8_t> & binary_data,
size_t start_byte, std::vector<T> & dst_array,
const std::string & info =
"");
152 virtual uint16_t
computeChecksum(
const std::vector<uint8_t> & binary_data,
bool binary_data_with_trailer =
true);
169 virtual size_t decodeResultPortHeader(
const std::vector<uint8_t> & binary_data,
size_t start_byte, sick_scan::SickLocResultPortHeaderMsg & telegram_header);
179 virtual size_t decodeResultPortPayload(
const std::vector<uint8_t> & binary_data,
size_t start_byte, sick_scan::SickLocResultPortPayloadMsg & telegram_payload);
189 virtual size_t decodeResultPortTrailer(
const std::vector<uint8_t> & binary_data,
size_t start_byte, sick_scan::SickLocResultPortCrcMsg & telegram_trailer);
197 template<
typename T>
void encodePushValue(T value, std::vector<uint8_t> & binary_data,
bool little_endian =
false);
204 virtual void encodeResultPortHeader(
const sick_scan::SickLocResultPortHeaderMsg & telegram_header, std::vector<uint8_t> & binary_data);
211 virtual void encodeResultPortPayload(
const sick_scan::SickLocResultPortPayloadMsg & telegram_payload, std::vector<uint8_t> & binary_data);
231 #endif // __SIM_LOC_RESULT_PORT_PARSER_H_INCLUDED
size_t copyBytesToArray(const std::vector< uint8_t > &binary_data, size_t start_byte, std::vector< T > &dst_array, const std::string &info="")
virtual std::vector< uint8_t > encode(void)
virtual bool isLittleEndianPayload(uint16_t payload_type)
virtual size_t decodeResultPortPayload(const std::vector< uint8_t > &binary_data, size_t start_byte, sick_scan::SickLocResultPortPayloadMsg &telegram_payload)
void encodePushValue(T value, std::vector< uint8_t > &binary_data, bool little_endian=false)
virtual uint16_t computeChecksum(const std::vector< uint8_t > &binary_data, bool binary_data_with_trailer=true)
sick_scan::SickLocResultPortTelegramMsg m_result_port_telegram
the result port telegram decoded from binary data
virtual size_t decodeResultPortTrailer(const std::vector< uint8_t > &binary_data, size_t start_byte, sick_scan::SickLocResultPortCrcMsg &telegram_trailer)
virtual size_t decodeResultPortHeader(const std::vector< uint8_t > &binary_data, size_t start_byte, sick_scan::SickLocResultPortHeaderMsg &telegram_header)
virtual bool decode(const std::vector< uint8_t > &binary_data)
virtual void encodeResultPortHeader(const sick_scan::SickLocResultPortHeaderMsg &telegram_header, std::vector< uint8_t > &binary_data)
static void parseAssert(bool assertion, const std::string &assertion_msg, const std::string &info, const std::string &file, int line)
virtual sick_scan::SickLocResultPortTelegramMsg & getTelegramMsg(void)
ResultPortParser(const std::string &frame_id="")
std::string m_publish_frame_id
frame_id of published ros messages (type SickLocResultPortTelegramMsg)
virtual void encodeResultPortTrailer(uint16_t checksum, std::vector< uint8_t > &binary_data)
size_t copyBytesToValue(const std::vector< uint8_t > &binary_data, size_t start_byte, T &value, const std::string &info="", bool little_endian=false)
bool m_little_endian_payload
true if payload type is 0x06c2 (little endian), default: false (payload encoded in big endian format)
virtual void encodeResultPortPayload(const sick_scan::SickLocResultPortPayloadMsg &telegram_payload, std::vector< uint8_t > &binary_data)
virtual const sick_scan::SickLocResultPortTelegramMsg & getTelegramMsg(void) const
sick_scan
Author(s): Michael Lehning
, Jochen Sprickerhof , Martin Günther
autogenerated on Thu Sep 8 2022 02:30:19