CARMA C++
AzelPlotManager.h
1 #ifndef CARMA_UI_RTD_WINDOWS_AZELPLOTMANAGER_H
2 #define CARMA_UI_RTD_WINDOWS_AZELPLOTMANAGER_H
3 
4 #include <vector>
5 
6 #include "carma/ui/rtd/common/RtAzelPlot.h"
7 
8 
9 namespace carma {
10 
11 namespace monitor {
12 
13 class MonitorSystem;
14 
15 } // namespace carma::monitor
16 
17 
18 namespace ui {
19 namespace rtd {
20 
21 
22 class AzelPlotManager {
23  public:
24  AzelPlotManager( monitor::MonitorSystem & cms,
25  int maxAntNum,
26  int maxSaNum );
27 
28  ~AzelPlotManager( );
29 
30  RtAzelPlotPtr getAzelPlot( const int saNo );
31 
32  void update( );
33 
34  private:
35  void updateCommonInfo( );
36  void updatePerAntInfo( );
37  void updatePerSaInfo( );
38 
39  struct PerAntInfo {
40  bool legit;
41 
42  double reqAz;
43  double reqEl;
44 
45  double actAz;
46  double actEl;
47 
48  explicit PerAntInfo( );
49  };
50 
51  struct PerSaPerAntInfo {
52  bool online;
53 
54  explicit PerSaPerAntInfo( );
55  };
56 
57  struct PerSaInfo {
58  RtAzelPlot::SourceType sourceType;
59  ::std::vector< PerSaPerAntInfo > saPerAntInfo;
60  RtAzelPlotPtr azelPlot;
61 
62  explicit PerSaInfo( );
63  };
64 
65  monitor::MonitorSystem & cms_;
66 
67  const int maxAntNum_;
68  const int maxSaNum_;
69 
70  double windSpeed_;
71  double windDirection_;
72 
73  ::std::vector< PerAntInfo > perAntInfo_;
74 
75  ::std::vector< PerSaInfo > perSaInfo_;
76 };
77 
78 
79 } // namespace carma::ui::rtd
80 } // namespace carma::ui
81 } // namespace carma
82 
83 #endif