Power Manager MDD and PDD Layers (Compact 7)

3/12/2014

The Power Manager model device driver (MDD) layer implements the platform-independent functionality of Power Manager, such as maintaining lists of device drivers and applications and servicing the API functions that are used for communications between Power Manager, applications, and device drivers. The Power Manager MDD source code is available at the following location:

%_WINCEROOT%\Public\Common\Oak\Drivers\Pm\Mdd

The build system uses this source code to generate the library Pm_mdd_lib.lib; it links this library into the Power Manager dynamic link library, Pm.dll.

The Power Manager platform dependent driver (PDD) layer is responsible for deciding when and how to manage system power state transitions. It monitors the platform's system power states and events (such as a "low battery" event) to determine what the next system power state should be. The PDD layer notifies device drivers and applications of system power state changes through data structures maintained in the MDD. The PDD layer is also responsible for changing device power states when the MDD calls it to do so.

The PDD layer source code is separated into common code and platform-specific code. The common code provides the following functionality:

  • Creates message queues for receiving notifications from applications and device drivers.
  • Initializes variables used to update the platform's power status.
  • Refreshes Power Manager's power source and power level variables.
  • Reads messages from the notification queue.
  • Sends battery notifications and reacts to power button press and release notifications.

The Power Manager PDD layer common code is available in the following location:

%_WINCEROOT%\Public\Common\Oak\Drivers\Pm\Pdd\Common

The build system uses this source code to generate the library Pm_pdd_common_lib.lib; it links this library into the Power Manager dynamic link library, Pm.dll.

The Power Manager PDD layer platform-specific code implements Platform Manager functionality that is unique to your hardware and your system power state definitions. This code resides in your platform directory at the following location:

%_WINCEROOT%\Platform\<your platform>\Src\Drivers\Pm\Pdd

The build system compiles the code in this location and links it with Pm_mdd_lib.lib and Pm_pdd_common_lib.lib to create the Power Manager library for your platform, Pm.dll.

For information about integrating Platform Manager sample PDD source code into your platform directory, see Implement System Power States.

See Also

Concepts

Power Manager