ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/host/c++/SysMon.h
Revision: 1.4
Committed: Tue Mar 27 00:04:30 2001 UTC (23 years, 8 months ago) by ab11
Content type: text/plain
Branch: MAIN
CVS Tags: PROJECT_COMPLETION
Changes since 1.3: +11 -12 lines
Log Message:
tidied up and removed dead code.

File Contents

# Content
1 #include <iostream>
2 #include <string>
3 #include <stdlib.h>
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 #define MAX_UNIQUE_VALUES = 40;
12
13 using std::string;
14
15 class SysMon {
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
21 int getSequence(){ return sequence; }; // inline
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 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