radar_can.h 645 B

1234567891011121314151617181920212223242526272829303132
  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. //新增
  16. uint16_t bcd2dec(uint8_t data0, uint8_t data1);
  17. private:
  18. void Run();
  19. private:
  20. CMessageQueue* _message;
  21. SensorCanBus<CCanRadarSensor> * _canbus;
  22. bool _run;
  23. struct RadarData _data;
  24. int32_t _count;
  25. };