openmediavault  4.0 (Arrakis)
The open network attached storage solution
Public Member Functions | Public Attributes | List of all members
OMV\System\PowerManagement Class Reference

Public Member Functions

 isStateSupported ($state)
 
 getSupportedStates ()
 
 reboot ()
 
 shutdown ()
 
 standby ()
 
 suspend ()
 
 hibernate ()
 
 suspendHybrid ()
 

Public Attributes

const STATE_NONE = 0x0
 
const STATE_SUSPEND = 0x1
 
const STATE_HIBERNATE = 0x2
 
const STATE_SUSPENDHYBRID = 0x4
 

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

◆ getSupportedStates()

OMV\System\PowerManagement::getSupportedStates ( )

Get all supported power management states.

Returns
The supported power management states.

◆ hibernate()

OMV\System\PowerManagement::hibernate ( )

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

Returns
None.

◆ isStateSupported()

OMV\System\PowerManagement::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.

◆ reboot()

OMV\System\PowerManagement::reboot ( )

Reboot the machine.

Returns
None.

◆ shutdown()

OMV\System\PowerManagement::shutdown ( )

Shut down the machine.

Returns
None.

◆ standby()

OMV\System\PowerManagement::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
    None.

◆ suspend()

OMV\System\PowerManagement::suspend ( )

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

Returns
None.

◆ suspendHybrid()

OMV\System\PowerManagement::suspendHybrid ( )

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

Returns
None.

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