Scheduler
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
rlScheduler
maxTempEstimator
envelopeDetector.cpp
Go to the documentation of this file.
1
10
#include "
envelopeDetector.h
"
11
12
#include <
scheduler/system.h
>
13
#include <
scheduler/processor.h
>
14
15
using namespace
RlScheduler
;
16
17
EnvelopeDetector::EnvelopeDetector
(
double
d) :
18
decayCoeff(d),
19
proc(
Scheduler
::System::getInstance()->getProc())
20
{
21
}
22
23
double
EnvelopeDetector::getMaximumTemperature
()
24
{
25
/*FIXME using exponential decay this way makes the max temperature converge
26
to 0 degrees Celcius. There is no reason for that. To what value should we make it converge?
27
To average temperature? absolute zero? ambient temperature? ...
28
I would say average temperature. But a bit complicated to implement...*/
29
maxTemp *= decayCoeff;
30
double
currentTemp = proc->
getTemperature
();
31
maxTemp = (maxTemp > currentTemp) ? maxTemp : currentTemp;
32
return
maxTemp;
33
}
envelopeDetector.h
Scheduler::Processor::getTemperature
double getTemperature() const
Definition:
processor.cpp:185
processor.h
RlScheduler::EnvelopeDetector::EnvelopeDetector
EnvelopeDetector(double decayCoeff)
Definition:
envelopeDetector.cpp:17
Scheduler
Definition:
schedulerActions.h:21
system.h
RlScheduler
Definition:
actions.h:24
RlScheduler::EnvelopeDetector::getMaximumTemperature
double getMaximumTemperature() override
Definition:
envelopeDetector.cpp:23
Generated on Sun Nov 26 2017 17:01:36 for Scheduler by
1.8.11