Scheduler
|
#include <processor.h>
Public Member Functions | |
Processor (std::shared_ptr< Utils::Configuration >) | |
~Processor () | |
double | getFreq () const |
get the current frequency of the processor More... | |
void | setFreq (double) |
set the current frequency of the processor More... | |
double | getMinFreq () const |
get the minimum frequency at which this processor can operate More... | |
double | getMaxFreq () const |
get the maximum frequency at which this processor can operate More... | |
double | getUsage () const |
get the current usage of the processor More... | |
void | updateUsage () |
updates the value of the usage percentage. More... | |
void | reinitTicks () |
void | updateTicks () |
bool | isRunning (std::shared_ptr< Process > p) const |
returns true if the processor is running the task provided as argument More... | |
void | setRunning (std::shared_ptr< Process > p) |
std::shared_ptr< Process > | getRunningTask () |
void | setTemperatureModel (TemperatureModel *) |
TemperatureModel * | getTemperatureModel () |
void | updateTemperature (double timeInterval) |
double | getTemperature () const |
void | printReports (std::string folder) const |
void | printTemperatureReport (std::string folder) const |
void | printEnergyReport (std::string folder) const |
void | printUsageReport (std::string folder) const |
void | printFreqReport (std::string folder) const |
bool | isBusy () const |
return true if the processor is running any task More... | |
void | power (bool p) |
power the processor on or off More... | |
bool | powered () const |
return true if the processor is powered on More... | |
Definition at line 28 of file processor.h.
Processor::Processor | ( | std::shared_ptr< Utils::Configuration > | c | ) |
Definition at line 25 of file processor.cpp.
Processor::~Processor | ( | ) |
Definition at line 29 of file processor.cpp.
double Processor::getFreq | ( | ) | const |
get the current frequency of the processor
Definition at line 130 of file processor.cpp.
double Processor::getMaxFreq | ( | ) | const |
get the maximum frequency at which this processor can operate
Definition at line 34 of file processor.cpp.
double Processor::getMinFreq | ( | ) | const |
get the minimum frequency at which this processor can operate
Definition at line 39 of file processor.cpp.
std::shared_ptr< Process > Processor::getRunningTask | ( | ) |
Definition at line 92 of file processor.cpp.
double Processor::getTemperature | ( | ) | const |
Definition at line 185 of file processor.cpp.
TemperatureModel * Processor::getTemperatureModel | ( | ) |
Definition at line 116 of file processor.cpp.
double Processor::getUsage | ( | ) | const |
get the current usage of the processor
Definition at line 44 of file processor.cpp.
bool Processor::isBusy | ( | ) | const |
return true if the processor is running any task
Definition at line 72 of file processor.cpp.
bool Processor::isRunning | ( | std::shared_ptr< Process > | p | ) | const |
returns true if the processor is running the task provided as argument
Definition at line 78 of file processor.cpp.
void Processor::power | ( | bool | p | ) |
power the processor on or off
p | if true, power on, otherwise, power off |
Definition at line 174 of file processor.cpp.
bool Processor::powered | ( | ) | const |
return true if the processor is powered on
Definition at line 179 of file processor.cpp.
void Processor::printEnergyReport | ( | std::string | folder | ) | const |
Definition at line 142 of file processor.cpp.
void Processor::printFreqReport | ( | std::string | folder | ) | const |
Definition at line 155 of file processor.cpp.
void Processor::printReports | ( | std::string | folder | ) | const |
Definition at line 160 of file processor.cpp.
void Processor::printTemperatureReport | ( | std::string | folder | ) | const |
Definition at line 137 of file processor.cpp.
void Processor::printUsageReport | ( | std::string | folder | ) | const |
Definition at line 150 of file processor.cpp.
void Processor::reinitTicks | ( | ) |
Definition at line 67 of file processor.cpp.
void Processor::setFreq | ( | double | f | ) |
set the current frequency of the processor
Definition at line 121 of file processor.cpp.
void Processor::setRunning | ( | std::shared_ptr< Process > | p | ) |
Definition at line 84 of file processor.cpp.
void Processor::setTemperatureModel | ( | TemperatureModel * | model | ) |
Definition at line 111 of file processor.cpp.
void Processor::updateTemperature | ( | double | timeInterval | ) |
Definition at line 100 of file processor.cpp.
void Processor::updateTicks | ( | ) |
Definition at line 169 of file processor.cpp.
void Processor::updateUsage | ( | ) |
updates the value of the usage percentage.
Definition at line 49 of file processor.cpp.