-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPCUpdater.cpp
61 lines (48 loc) · 1.61 KB
/
PCUpdater.cpp
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
/******************************************************************************\
Datei : PCUpdater.cpp
Inhalt:
Autor : Christian Rodemeyer, Marc Diefenbruch
Datum : 10.10.98
Status: Verbessert von MD
\******************************************************************************/
#include "PCUpdater.h"
#if _SC_DMALLOC
#include <dmalloc.h>
#endif
SCStream& operator<< (SCStream& pStream, const PCUpdater&)
{
return pStream;
}
/******************************************************************************\
PCCurveUpdater: Transport von Daten zu einem PDCurve-Datenbehälter.
\******************************************************************************/
PCCurveUpdater::PCCurveUpdater(PDCurve * Curve,
const PESensor * Sensor,
int ValIndex) :
curve (Curve),
sensor (Sensor),
valIndex (ValIndex)
{
}
void PCCurveUpdater::Update(void)
{
double Value = sensor->GetValue(valIndex);
if (Value >= 0)
curve->AddPoint(sensor->Now(), Value);
}
/******************************************************************************\
PCFreqUpdater:
\******************************************************************************/
PCFreqUpdater::PCFreqUpdater(PDFrequency * Frequency,
const PESensor * Sensor) :
freq (Frequency),
sensor (Sensor)
{
}
void PCFreqUpdater::Update(void)
{
// hier muss nichts mehr gemacht werden, da nun
// das PDFrequency-Objekt, welches in Sensor enthalten
// ist die ganze Arbeit macht. freq ist in Zeiger
// auf dieses enthaltene Objekt. MD
}