Sick511FileLaser.h 945 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*************************
  2. sick 511 À×´ï ÎļþÊý¾Ý½âÎö
  3. *************************/
  4. #ifndef __SICK_511_LASER_FILE__HH
  5. #define __SICK_511_LASER_FILE__HH
  6. #include "Laser.h"
  7. #include <fstream>
  8. class CSick511FileLaser :
  9. public CLaser
  10. {
  11. public:
  12. CSick511FileLaser(int id, Automatic::stLaserCalibParam laser_param);
  13. virtual ~CSick511FileLaser();
  14. virtual bool Connect();
  15. virtual void Disconnect();
  16. virtual bool Start();
  17. virtual bool Stop();
  18. protected:
  19. virtual bool RecvData(CBinaryData& data);
  20. virtual DATA_type Data2PointXYZ(CBinaryData* pData, std::vector<CPoint3D>& points);
  21. protected:
  22. int FindHead(char* buf, int b_len);
  23. int FindTail(char* buf, int b_len);
  24. protected:
  25. virtual bool GetData(CBinaryData* pData, std::vector<float>& distance,
  26. float& freq, float& start_angle);
  27. long Str0x2Long(const char* data, int len);
  28. protected:
  29. std::ifstream m_stream_read;
  30. std::string m_file;
  31. bool m_start_read;
  32. std::mutex m_mutex;
  33. };
  34. #endif