ThrottleInterface Class Reference

class caring about throttling the cpu while load changes More...

#include <throttle_interface.h>

List of all members.

Public Member Functions

 ThrottleInterface ()
 constructor
bool updateCPUState (EventManagement *eM)
 checks all cpus whether they should get throttled
bool throttle (int percent=-1)
 throttles cpus
bool dethrottle ()
 dethrottles cpus
void restart ()
 resets the object and clears all local values
void disableThrottling ()
 disables throttling

Private Attributes

unsigned long _msecs_cpu_idle
 timeout when processor.low event should be thrown if it stays under the limit for this time
bool _cpu_is_idle
 whether cpu is currently idle
PROCESSOR_EVENT_STATE _event_state
 indicates whether an processor event was thrown
bool _throttling_supported
 defines whether throttling is supported


Detailed Description

class caring about throttling the cpu while load changes


Constructor & Destructor Documentation

ThrottleInterface::ThrottleInterface  ) 
 

constructor


Member Function Documentation

bool ThrottleInterface::dethrottle  ) 
 

dethrottles cpus

Returns:
true if throttling supported, false otherwise

void ThrottleInterface::disableThrottling  ) 
 

disables throttling

void ThrottleInterface::restart  ) 
 

resets the object and clears all local values

this may be used to start evaluating from the beginning

bool ThrottleInterface::throttle int  percent = -1  ) 
 

throttles cpus

Parameters:
percent throttle cpus to that percentage -1 means maximum throttling
Returns:
true if throttling supported, false otherwise

bool ThrottleInterface::updateCPUState EventManagement eM  ) 
 

checks all cpus whether they should get throttled

Returns:
false if something went wrong, true otherwise


Member Data Documentation

bool ThrottleInterface::_cpu_is_idle [private]
 

whether cpu is currently idle

this does not reflect whether the cpu is throttled. This variable has to be true long enough for the cpu being throttled

PROCESSOR_EVENT_STATE ThrottleInterface::_event_state [private]
 

indicates whether an processor event was thrown

value of 1 indicates that processor.low event has been thrown, value of 0 indicates, that it has not thrown till now

unsigned long ThrottleInterface::_msecs_cpu_idle [private]
 

timeout when processor.low event should be thrown if it stays under the limit for this time

bool ThrottleInterface::_throttling_supported [private]
 

defines whether throttling is supported


The documentation for this class was generated from the following files:
Generated on Mon Mar 27 09:27:20 2006 for Powersave Daemon by  doxygen 1.4.6