hlit-mon  0.5.2
 All Classes Functions Groups Pages
HlitNodeSensor.h
1 
7 
9 #ifndef HlitNodeSensor_cpp
10 #define HlitNodeSensor_cpp
11 
12 #include <czmq.h>
13 #include <glibtop/cpu.h>
14 #include <glibtop/mem.h>
15 #include <glibtop/netlist.h>
16 #include <glibtop/netload.h>
17 #include <string>
18 #include <vector>
19 
21 public:
22  HlitNodeSensor(char* net_list);
23  virtual ~HlitNodeSensor();
24 
25  void Init();
26  int Update();
27  char* GetJson(const char* name = "static", bool debug = false) const;
28  void Print() const;
29  void GetSpeed(HlitNodeSensor* s1, HlitNodeSensor* s2, int timeout);
30  bool FindAdapter(std::vector<std::string> vctr, std::string adapter) const;
31 
32  glibtop_cpu* GetCpu();
33  glibtop_mem* GetMem();
34  glibtop_netlist* GetNetList();
35  zlistx_t* GetNetArray();
36 
37 private:
38  glibtop_cpu* fCPU;
39  glibtop_mem* fMem;
40  glibtop_netlist* fNetList;
41  zlistx_t* fNetArray;
42  std::vector<std::string> NetVector;
43 };
44 
45 #endif
46