data_manager.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef DATA_MANAGER_H
  2. #define DATA_MANAGER_H
  3. #include <QtCore/qglobal.h>
  4. #include <stdarg.h>
  5. #include "time_manager.h"
  6. #if defined(DATAMANAGER_LIBRARY)
  7. # define DATAMANAGERSHARED_EXPORT Q_DECL_EXPORT
  8. #else
  9. # define DATAMANAGERSHARED_EXPORT Q_DECL_IMPORT
  10. #endif
  11. namespace iv {
  12. class DATAMANAGERSHARED_EXPORT DataManager
  13. {
  14. public:
  15. typedef iv::radar::radarobjectarray RadarDataType;
  16. typedef iv::lidar::objectarray LidarDataType;
  17. // typedef iv::vision::cameraobjectarray CameraDataType;
  18. typedef iv::vision::ObstacleInfo VisionDataType;
  19. typedef std::chrono::system_clock::time_point TimeType;
  20. // typedef std::function<void(RadarDataType&, LidarDataType&,CameraDataType&)> DataCallback;
  21. // typedef std::function<void(RadarDataType&,CameraDataType&)> RVCallback;
  22. typedef std::function<void(RadarDataType&, LidarDataType&,VisionDataType&)> DataCallback;
  23. typedef std::function<void(RadarDataType&,VisionDataType&)> RVCallback;
  24. public:
  25. // void init();
  26. void SetLidar(iv::lidar::objectarray& lidar_object_array);
  27. void SetRadar(iv::radar::radarobjectarray& radar_object_array);
  28. void SetCamera(iv::vision::ObstacleInfo& vision_object_array);
  29. void Ready();
  30. void SetDataCallback(DataCallback callback);
  31. void SetRVCallback(RVCallback rvcallback);
  32. private:
  33. std::shared_ptr<iv::TimeManager> data_manager_ptr_;
  34. std::shared_ptr<iv::TimeManager> rv_manager_ptr_;
  35. };
  36. }
  37. #endif // DATA_MANAGER_H