123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #ifndef IVDETECTION_RADAR_H
- #define IVDETECTION_RADAR_H
- #include "ivdetection.h"
- #include "modulecomm.h"
- #include <QMutex>
- #include <QWaitCondition>
- #include "canmsg.pb.h"
- #include "canraw.pb.h"
- #include "radarobjectarray.pb.h"
- namespace iv {
- class ivdetection_radar : public ivdetection
- {
- public:
- ivdetection_radar();
- public:
- void setcanmsgname(const std::string str);
- void setradarmsgname(const std::string str);
- private:
- void UpdateCANMsg(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname);
- void ShareRadarMsg(void * pa,iv::radar::radarobjectarray * pradar);
- public:
- virtual int DecodeCANMsg(iv::radar::radarobjectarray & xradar,iv::can::canraw *prawmsg) = 0;
- public:
- virtual void modulerun();
- private:
- void * mpmsgcan;
- void * mpmsgradar;
- std::string mstrcanmsgname;
- std::string mstrradarmsgname;
- bool mbUpdateCANMsg = false;
- iv::can::canmsg mCANMsg;
- QMutex mMutex;
- QMutex mWaitMutex;
- QWaitCondition mwc;
- };
- }
- #endif // IVDETECTION_RADAR_H
|