#pragma once #include "../common/comm.h" #include "../common/notifier.h" #include "../common/iobuffer.h" #include "../common/sensor_socket.h" class CMessageQueue; class CCanRadarSensor { public: CCanRadarSensor(CMessageQueue *q); void Notify(struct can_frame *date); void SetCanBusSensor(SensorCanBus* can); void Start(); void Stop(); //新增 uint16_t bcd2dec(uint8_t data0, uint8_t data1); private: void Run(); private: CMessageQueue* _message; SensorCanBus * _canbus; bool _run; struct RadarData _data; int32_t _count; };