You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
1.8 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __TARGET_DISPLAY_HEADER__
  2. #define __TARGET_DISPLAY_HEADER__
  3. #ifndef __linux__
  4. #include <WinSock2.h>
  5. #endif
  6. #include <queue>
  7. #include "../guiClass.h"
  8. #include "../../components/object/objectLGS.h"
  9. #include "../../alg/lgs/mask.h"
  10. #include "../../components/base/basicEventHandler.h"
  11. #include "point2dWidget.h"
  12. class objectLGS;
  13. #define MAX_SIMUL_TARGETS 128
  14. //typedef queue<uint32_t> TargetsFIFO;
  15. typedef struct S_SIMPLE_TARGET{
  16. uint32_t sampleID;
  17. uint16_t range;
  18. uint8_t status;
  19. uint16_t dX;
  20. uint16_t dY;
  21. uint32_t color;
  22. float size;
  23. float x,y,z;
  24. float az, el;
  25. float lat, lon, alt;
  26. } simpleTarget;
  27. //typedef vector<uint32_t> TargetsFIFO;
  28. typedef vector<simpleTarget*> TargetsFIFO;
  29. //typedef struct{
  30. // uint8_t color[3];
  31. // QPoint *points;
  32. // uint16_t count;
  33. //}simplePolygone;
  34. //typedef vector<simplePolygone *> vectorMasking;
  35. //typedef struct{
  36. // uint16_t start;
  37. // uint16_t stop;
  38. //} raySegment;
  39. //typedef struct{
  40. // uint16_t count;
  41. // raySegment *zones;
  42. //} rawRay;
  43. //typedef vector<rawRay *> vectorZoneMask;
  44. class targetDisplay: public basicEventHandler{
  45. protected:
  46. objectLGS *m_pDeviceControl;
  47. thresholdNode *m_pRanges;
  48. uint32_t m_nRangesCount;
  49. uint8_t m_bLastTargetId;
  50. simpleTarget m_aTargets[MAX_SIMUL_TARGETS];
  51. void addTarget( simpleTarget *st );
  52. virtual void updateDisplay( void ){};
  53. virtual void updateBackStage(void){};
  54. public:
  55. targetDisplay();
  56. ~targetDisplay();
  57. virtual bool loadFile(const QString &fileName){ return true; };
  58. virtual void attachLGS(objectLGS *ptr){};
  59. void updateRanges(uint32_t *Ranges, uint32_t count);
  60. bool loadFromFile(char *fName);
  61. void clearTargets(void);
  62. void dispatchEvent( basicEvent *Evt );
  63. };
  64. #endif