1 |
#include <iostream> |
2 |
#include <string> |
3 |
#include <stdlib.h> // used for system("XXSX") calls |
4 |
#include "SubPipe.h" |
5 |
#include "Config.h" |
6 |
#ifndef XMLFORMATTER_H /* Has the file been INCLUDE'd already? */ |
7 |
#define XMLFORMATTER_H yes |
8 |
#include "XMLFormatter.h" |
9 |
#endif |
10 |
|
11 |
|
12 |
#define MAX_UNIQUE_VALUES = 40; |
13 |
|
14 |
using std::string; |
15 |
|
16 |
class SysMon { |
17 |
|
18 |
public: |
19 |
SysMon(Config config, int printDebug); // constructor |
20 |
int collect(); // collect data for an averager |
21 |
string getData(); // return the data from averages, or a snapshot if no data is avaible |
22 |
int getSequence(){ return sequence; }; // inline |
23 |
|
24 |
private: |
25 |
SubPipe * p; |
26 |
int sequence; // sequence number for the packets |
27 |
int debug; // print debug info? |
28 |
string titles[60]; // names for the packet info |
29 |
string values[60]; // values for those packet infos |
30 |
int titlepointer; // where have we got up to? |
31 |
int checks; // number of checks since the last packet |
32 |
}; // class |