|
RADLib
RADical C++ application framework
|
Power manager with read-only status helpers and explicit dangerous actions. More...
#include <RADPower.h>
Public Member Functions | |
| PowerManager (PowerPaths paths={}) | |
| Creates a power manager using paths. More... | |
| std::vector< PowerSupplyInfo > | powerSupplies () const |
| Lists power supplies. More... | |
| std::vector< ThermalZoneInfo > | thermalZones () const |
| Lists thermal zones. More... | |
| std::vector< CpuGovernorInfo > | cpuGovernors () const |
| Lists CPU governors. More... | |
| bool | setCpuGovernor (const std::string &cpu, const std::string &governor, std::string *error=nullptr) const |
| Sets CPU governor for one CPU directory. More... | |
| PowerActionPlan | requestAction (PowerAction action, bool execute=false) const |
| Prepares or executes a system power action. execute must be true to mutate host state. More... | |
| const PowerPaths & | paths () const |
| Returns configured paths. More... | |
Power manager with read-only status helpers and explicit dangerous actions.
|
explicit |
Creates a power manager using paths.
| std::vector<CpuGovernorInfo> RADPower::PowerManager::cpuGovernors | ( | ) | const |
Lists CPU governors.
| const PowerPaths& RADPower::PowerManager::paths | ( | ) | const |
Returns configured paths.
| std::vector<PowerSupplyInfo> RADPower::PowerManager::powerSupplies | ( | ) | const |
Lists power supplies.
| PowerActionPlan RADPower::PowerManager::requestAction | ( | PowerAction | action, |
| bool | execute = false |
||
| ) | const |
Prepares or executes a system power action. execute must be true to mutate host state.
| bool RADPower::PowerManager::setCpuGovernor | ( | const std::string & | cpu, |
| const std::string & | governor, | ||
| std::string * | error = nullptr |
||
| ) | const |
Sets CPU governor for one CPU directory.
| std::vector<ThermalZoneInfo> RADPower::PowerManager::thermalZones | ( | ) | const |
Lists thermal zones.