My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
MonitorPointManager.h
1 #ifndef GCP_UTIL_MONITORPOINTMANAGER_H
2 #define GCP_UTIL_MONITORPOINTMANAGER_H
3 
11 #include <map>
12 #include <string>
13 #include <vector>
14 
15 #include "gcp/control/code/unix/libunix_src/common/regmap.h"
16 
17 namespace gcp {
18  namespace util {
19 
20  class ArrayMapDataFrameManager;
21  class CoordRange;
22  class MonitorPoint;
23  class RegMapDataFrameManager;
24 
26  public:
27 
34 
38  virtual ~MonitorPointManager();
39 
45  MonitorPoint* addMonitorPoint(char* regMapName, char* boardName,
46  char* blockName,
47  CoordRange* range=0);
48 
49  MonitorPoint* addMonitorPoint(std::string regMapName,
50  std::string boardName,
51  std::string blockName,
52  CoordRange* range=0);
53 
54  MonitorPoint* addMonitorPoint(char* regMapName, char* boardName,
55  char* blockName,
56  int index);
57 
58  MonitorPoint* addMonitorPoint(char* boardName, char* blockName,
59  CoordRange* range=0);
60 
61  MonitorPoint* addMonitorPoint(char* boardName, char* blockName,
62  int index);
63 
67  MonitorPoint* findMonitorPoint(char* boardName, char* blockName,
68  CoordRange* range=0, bool doThrow=true);
69 
70  MonitorPoint* findMonitorPoint(char* regMapName, char* boardName,
71  char* blockName,
72  CoordRange* range=0, bool doThrow=true);
73 
74  MonitorPoint* findMonitorPoint(std::string boardName,
75  std::string blockName,
76  CoordRange* range=0, bool doThrow=true);
77 
78  MonitorPoint* findMonitorPoint(std::string regMapName,
79  std::string boardName,
80  std::string blockName,
81  CoordRange* range=0, bool doThrow=true);
82 
83 
84  // Remove a single monitor point maintained by this object
85 
86  void remMonitorPoint(std::string regMapName,
87  std::string boardName,
88  std::string blockName,
89  CoordRange* range=0);
90 
91  void remMonitorPoint(std::string boardName,
92  std::string blockName,
93  CoordRange* range=0);
94 
95  void remMonitorPoint(std::ostringstream& os);
96 
97  // Reset all monitor points managed by this object
98 
99  void reset();
100 
101  // Clear all monitor points managed by this object
102 
103  void clear();
104 
105  // List monitor points managed by this object
106 
107  void list();
108 
109  // Return a list of all monitor points
110 
111  std::vector<std::string> getList(bool sort=false);
112 
116  friend std::ostream& operator<<(std::ostream& os,
117  MonitorPointManager& mp);
118 
119  // Return a formatted printout of a single monitor point
120 
121  std::string formatReg(std::string regMapName, std::string boardName, std::string blockName,
122  CoordRange* range);
123 
124  RegMapBlock* findReg(std::string regmap, std::string board, std::string block);
125 
126  private:
127 
128  bool isArrMap_;
129  RegMapDataFrameManager* regMapFm_;
130  ArrayMapDataFrameManager* arrMapFm_;
131 
132  std::vector<MonitorPoint*> monitorPoints_;
133  std::map<std::string, MonitorPoint*> monitorMap_;
134 
135  }; // End class Monitor
136 
137  } // End namespace util
138 } // End namespace gcp
139 
140 
141 
142 #endif // End #ifndef GCP_UTIL_MONITORPOINTMANAGER_H
MonitorPointManager()
Definition: MonitorPointManager.cc:15
virtual ~MonitorPointManager()
Definition: MonitorPointManager.cc:40
void reset()
Definition: MonitorPointManager.cc:295
void clear()
Definition: MonitorPointManager.cc:305
std::vector< std::string > getList(bool sort=false)
Definition: MonitorPointManager.cc:330
void list()
Definition: MonitorPointManager.cc:319
Definition: MonitorPoint.h:32
Definition: CoordRange.h:20
MonitorPoint * findMonitorPoint(char *boardName, char *blockName, CoordRange *range=0, bool doThrow=true)
Definition: MonitorPointManager.cc:262
std::string formatReg(std::string regMapName, std::string boardName, std::string blockName, CoordRange *range)
Definition: MonitorPointManager.cc:357
friend std::ostream & operator<<(std::ostream &os, MonitorPointManager &mp)
Definition: ArrayMapDataFrameManager.h:28
MonitorPoint * addMonitorPoint(char *regMapName, char *boardName, char *blockName, CoordRange *range=0)
Definition: MonitorPointManager.cc:63
Definition: MonitorPointManager.h:25
Definition: RegMapDataFrameManager.h:26