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