radar_can.h 557 B

12345678910111213141516171819202122232425262728
  1. #pragma once
  2. #include "../common/comm.h"
  3. #include "../common/notifier.h"
  4. #include "../common/iobuffer.h"
  5. #include "../common/sensor_socket.h"
  6. class CMessageQueue;
  7. class CCanRadarSensor
  8. {
  9. public:
  10. CCanRadarSensor(CMessageQueue *q);
  11. void Notify(struct can_frame *date);
  12. void SetCanBusSensor(SensorCanBus<CCanRadarSensor>* can);
  13. void Start();
  14. void Stop();
  15. private:
  16. void Run();
  17. private:
  18. CMessageQueue* _message;
  19. SensorCanBus<CCanRadarSensor> * _canbus;
  20. bool _run;
  21. std::thread _can_thread;
  22. };