OpenMediaVault  0.6 (Kralizec)
The open network attached storage solution
 All Classes Functions Variables Groups Pages
Public Member Functions | Public Attributes | List of all members
OMVPowerManagement Class Reference
Inheritance diagram for OMVPowerManagement:
OMVObject

Public Member Functions

 isStateSupported ($state)
 
 getSupportedStates ()
 
 standby ()
 
 suspend ()
 
 hibernate ()
 
 suspendHybrid ()
 
- Public Member Functions inherited from OMVObject
 __construct ()
 
 getLastError ()
 

Public Attributes

const PM_STATE_NONE = 0x0
 
const PM_STATE_SUSPEND = 0x1
 
const PM_STATE_HIBERNATE = 0x2
 
const PM_STATE_SUSPENDHYBRID = 0x4
 

Additional Inherited Members

- Protected Member Functions inherited from OMVObject
 setLastError ($error)
 
 debug ()
 

Detailed Description

Helper class that implements functions regarding the power management. References: https://www.kernel.org/doc/Documentation/power/swsusp.txt https://wiki.archlinux.org/index.php/Suspend_and_Hibernate

Member Function Documentation

OMVPowerManagement::getSupportedStates ( )

Get all supported power management states.

Returns
The supported power management states.
OMVPowerManagement::hibernate ( )

Put the machine into suspend to disk (STD) mode. If this state is not supported the system will be shut down.

Returns
TRUE if command has been executed sucessfully, otherwise FALSE.
OMVPowerManagement::isStateSupported (   $state)

Checks if the given power management state is supported.

Parameters
stateThe state to check for.
Returns
TRUE if the state is supported, if not then FALSE. In case of an error NULL is returned.
OMVPowerManagement::standby ( )

Put the machine in a sleep state. If suspend to disk (STD) or RAM (STR) is not supported the system will be shut down. The system will be put into one of the following state depending on which state is supported:

Hybrid suspend (STB)

  • Suspend to disk (STD)
  • Suspend to RAM (STR)
  • Shut down and turn of system
    Returns
    TRUE if command has been executed sucessfully, otherwise FALSE.
OMVPowerManagement::suspend ( )

Put the machine into suspend to RAM (STR) mode. If this state is not supported the system will be shut down.

Returns
TRUE if command has been executed sucessfully, otherwise FALSE.
OMVPowerManagement::suspendHybrid ( )

Put the machine into suspend-hybrid (STB) mode. If this state is not supported the system will be shut down.

Returns
TRUE if command has been executed sucessfully, otherwise FALSE.

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