123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- #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 <QMutex>
- #include <memory>
- 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<iv::gps::gpsimu> mGPSIMUptr = 0;
- qint64 mnGPSUpdateTime = 0;
- QMutex mMutexGPS;
- std::shared_ptr<iv::radar::radarobjectarray> 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<iv::radar::radarobjectarray> & xRADAR);
- // void GetLidarPtr();
- // void GetRadar();
- // void GetMap();
- // bool IsMapUpdate();
- // void GetMobileye();
- };
- }
- #endif // IVDECISION_H
|