Share via


Define New System Power States (Compact 2013)

3/26/2014

You can use Windows Embedded Compact 2013 to define the system power states for your platform. Typically, you use one of three approaches to define system power states for your platform:

  • Configure existing system power states to exhibit different behavior.
  • Add new system power states by modifying the Platform Manager PDD source code.
  • Completely replace existing system power state functionality with a system power state implementation of your own design.

This flexibility makes it possible for you to define a custom power management model that is appropriate for your platform. A simple platform might have only two system power states such as On and Off, while platforms with more specialized requirements might have ten or more system power states. You are not restricted to the range of system power states provided in the Power Manager sample PDD; you can modify the sample PDD source code to add additional system power states. Note that, unlike system power states, you cannot define new device power states-device power states (D0, D1, D2, D3, and D4 are fixed).

The characteristics of your custom system power states depend on your platform. You can define system power states that are situational, controlling device power based on location or environment. For example, a platform could have additional states to describe whether it is connected to a battery or charging from a solar panel. A platform with wireless features might have several states to describe whether it is in-range or out of range of an access point. Some platforms have system power states that manage multiple display modes, such as whether the entire display is powered on, the entire display is powered off, or only the display backlight is powered off.

The system power states implemented in the Power Manager sample PDD are appropriate for most Windows Embedded Compact-based platforms. Typically, you add additional states only when you need to handle special requirements. To create new system power states, you add registry settings to configure the characteristics of those states and you extend the functionality of the PDD source code to handle additional state transitions.

To define a new system power state

  1. Create a new registry key to establish the new system power state and include registry values that specify the properties of that state.

  2. Derive a new system power state class from the base PowerState class to define your system power state.

  3. Implement methods for your new system power state class to define functionality for transitioning to and from that state on the occurrence of an event.

  4. Implement platform-specific functionality, if required, to support your new system power state.

The process of registry key creation is the same as when you configure existing system power states: you create a registry key with the name of that system power state and include registry values that specify the properties of that state. See Configure System Power States for more about system power state registry key creation.

In This Section

See Also

Concepts

Implement System Power States