Scheduler
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
Scheduler::Processor Class Reference

#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< ProcessgetRunningTask ()
 
void setTemperatureModel (TemperatureModel *)
 
TemperatureModelgetTemperatureModel ()
 
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...
 

Detailed Description

Definition at line 28 of file processor.h.

Constructor & Destructor Documentation

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.

Member Function Documentation

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

Returns
the usage as a number between 0.0 (idle) and 1.0 (busy 100% of the time) The value returned is the value computed during the last call to updateUsage

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

Parameters
pif 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.


The documentation for this class was generated from the following files: