-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPESetup.h
94 lines (79 loc) · 2.24 KB
/
PESetup.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#include <SCL/SCList.h>
// Datenstrukturen die die erlaubten Sensor- und Displaytypen bestimmen
// --------------------------------------------------------------------
enum SensorType
{
sProcQLen = 0,
sProcQLenFreq,
sProcNumber,
sProcSigWaitTime,
sProcStateFreq,
sProcInSigFreq,
sProcOutSigFreq,
sProcOutReqFreq,
sMachQLen,
sMachQLenFreq,
sMachReqWaitTime,
sMachReqThruTime,
sMachInReqFreq,
sMachUtilization,
sGlobalSigFreq,
sGlobalReqFreq,
sEvent,
sActivity,
numSensorTypes
};
enum DisplayType
{
dCurves, dFixedCurves, dGantt, dFreqs,
numDisplayTypes
};
enum ValIndexType // Achtung, muessen mit den entsprechenden PESTally und
{ // PESCounter-Werten wertemaessig uebereinstimmen
vNum, vMin, vMax, vAvg, vAvI, vVar, vDev, vCNT, vCPT, vCPI, vCQL,
numValIndexTypes
};
// Tabelle aller instanziierten Sensoren
// -------------------------------------
struct SensorDef
{
char name[128];
PESensor* sensor;
int type;
const PDStateTable * stateTable; // nur fuer PESStateFrequency
};
class SensorTable
{
public:
SCBoolean Add(const SensorDef& Sensor);
SCBoolean Get(SensorDef& Sensor);
// private:
struct TEntry //: public TSLinkTo<TEntry>
{
TEntry(const SensorDef& Sensor) : sensor(Sensor) {}
SensorDef sensor;
friend SCStream& operator<< (SCStream& pStream,
const TEntry& pData);
};
typedef SCListIter<TEntry> TEntryIter;
SCList<TEntry> entryList;
};
class DataTypeTable
{
public:
void Add(const PESensor* Sensor, int ValIndex, PDDataType* Data);
SCBoolean Get(const PESensor* Sensor, int ValIndex, PDDataType*& Data);
// private:
struct TEntry //: public TSLinkTo<TEntry>
{
TEntry(PDDataType* DataType, const PESensor* Sensor, int ValIndex)
: dataType(DataType), sensor(Sensor), valIndex(ValIndex) {};
PDDataType* dataType;
const PESensor* sensor; // Schlüssel
int valIndex; // Schlüssel
friend SCStream& operator<< (SCStream& pStream,
const TEntry& pData);
};
SCList<TEntry> entryList;
typedef SCListIter<TEntry> TEntryIter;
};