#ifndef IVDECISION_H #define IVDECISION_H #include "ivmodule.h" #include "modulecomm.h" #include "gps_type.h" #include "gpsimu.pb.h" #include "radarobjectarray.pb.h" #include #include namespace iv { class ivdecision : public ivmodule { public: ivdecision(); public: virtual void modulerun(); public: virtual void rundecision() = 0; virtual void sharemsg() = 0; private: std::string strgpsmsgname = "hcp2_gpsimu"; std::string strlidarmsgname = "lidar_obs"; std::string strradarmsgname = "radar"; std::string strmapmsgname = "tracemap"; std::string strmobileyemsgname = "mobileye"; private: void * mpagpsmsg; void * mpalidarmsg; void * mparadarmsg; void * mpamapmsg; void * mpamobileyemsg; private: void UpdateGPSMsg(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname); void UpdateRADARMsg(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname); private: iv::GPSData mNowGPS; std::shared_ptr mGPSIMUptr = 0; qint64 mnGPSUpdateTime = 0; QMutex mMutexGPS; std::shared_ptr mRADAR = 0; qint64 mnRADARUpdateTime = 0; QMutex mMutexRADAR; private: const qint64 mnNewThresh = 1000; //3 seconds public: bool GetGPS(iv::GPSData & xGPSData); bool GetRADAR(std::shared_ptr & xRADAR); // void GetLidarPtr(); // void GetRadar(); // void GetMap(); // bool IsMapUpdate(); // void GetMobileye(); }; } #endif // IVDECISION_H