/************************* sick 511 雷达 文件数据解析 *************************/ #ifndef __SICK_511_LASER_FILE__HH #define __SICK_511_LASER_FILE__HH #include "Laser.h" #include class CSick511FileLaser : public CLaser { public: CSick511FileLaser(int id, Automatic::stLaserCalibParam laser_param); virtual ~CSick511FileLaser(); virtual bool Connect(); virtual void Disconnect(); virtual bool Start(); virtual bool Stop(); protected: virtual bool RecvData(CBinaryData& data); virtual DATA_type Data2PointXYZ(CBinaryData* pData, std::vector& points); protected: int FindHead(char* buf, int b_len); int FindTail(char* buf, int b_len); protected: virtual bool GetData(CBinaryData* pData, std::vector& distance, float& freq, float& start_angle); long Str0x2Long(const char* data, int len); protected: std::ifstream m_stream_read; std::string m_file; bool m_start_read; std::mutex m_mutex; }; #endif