Power Requirements on Devices

In some situations applications may want to influence the Power Manager's administration of system power states. For example, a pager application might want to keep "COM3:" at D3 or higher, even in a suspend state, so that an incoming page will wake the system. Or a streaming audio application may want to keep the network card and audio system at full power, even when the system is on battery power and has been idle for a while. The Power Manager provides the SetPowerRequirement API to support applications that have special power management needs.

The SetPowerRequirement API allows applications to ask that the Power Manager set a lower bound on device power states. If a power requirement is in effect, the Power Manager will not allow devices to set their own power state below that specified by the requirement. When the Power Manager changes system power states, it will normally keep device requirements in force even if they maintain a device's power state at a level higher than allowed by the system power state.

Device power requirements are normally set aside when the OS suspends. During an OS suspend state, the CPU is stopped and interrupts are not serviced. If an application is using a device that might be able to operate during a suspend state, it can set the POWER_FORCE flag when it calls SetPowerRequirement. It is the responsibility of a device driver to disable itself if the OS suspends.

The Power Manager may set aside device power requirements under other circumstances as well. For example, an OEM may choose to interpret the OS power state POWER_STATE_CRITICAL flag as indicating that the battery level of the OS is critically low and all devices should be turned off.

See Also

Application Interface

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.