12345678910111213141516171819202122232425262728293031323334353637 |
- /*************************
- sick 511 À×´ï ÎļþÊý¾Ý½âÎö
- *************************/
- #ifndef __SICK_511_LASER_FILE__HH
- #define __SICK_511_LASER_FILE__HH
- #include "Laser.h"
- #include <fstream>
- 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<CPoint3D>& points);
- protected:
- int FindHead(char* buf, int b_len);
- int FindTail(char* buf, int b_len);
- protected:
- virtual bool GetData(CBinaryData* pData, std::vector<float>& 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
|