PO_FX_DEVICE_V1 structure (wdm.h)
The PO_FX_DEVICE structure describes the power attributes of a device to the power management framework (PoFx).
Syntax
typedef struct _PO_FX_DEVICE_V1 {
ULONG Version;
ULONG ComponentCount;
PPO_FX_COMPONENT_ACTIVE_CONDITION_CALLBACK ComponentActiveConditionCallback;
PPO_FX_COMPONENT_IDLE_CONDITION_CALLBACK ComponentIdleConditionCallback;
PPO_FX_COMPONENT_IDLE_STATE_CALLBACK ComponentIdleStateCallback;
PPO_FX_DEVICE_POWER_REQUIRED_CALLBACK DevicePowerRequiredCallback;
PPO_FX_DEVICE_POWER_NOT_REQUIRED_CALLBACK DevicePowerNotRequiredCallback;
PPO_FX_POWER_CONTROL_CALLBACK PowerControlCallback;
PVOID DeviceContext;
PO_FX_COMPONENT_V1 Components[ANYSIZE_ARRAY];
} PO_FX_DEVICE_V1, *PPO_FX_DEVICE_V1;
Members
Version
The version number of this structure. If the driver will register for performance state support with PoFx, set this member to PO_FX_VERSION_V2. Otherwise, set this member to PO_FX_VERSION_V1.
ComponentCount
The number of elements in the Components array. Additionally, this member specifies the number of components in the device.
ComponentActiveConditionCallback
A pointer to the ComponentActiveConditionCallback callback routine that is implemented by the device driver.
ComponentIdleConditionCallback
A pointer to the ComponentIdleConditionCallback callback routine that is implemented by the device driver.
ComponentIdleStateCallback
A pointer to the ComponentIdleStateCallback callback routine that is implemented by the device driver.
DevicePowerRequiredCallback
A pointer to the DevicePowerRequiredCallback callback routine that is implemented by the device driver.
DevicePowerNotRequiredCallback
A pointer to the DevicePowerNotRequiredCallback callback routine that is implemented by the device driver.
PowerControlCallback
A pointer to the PowerControlCallback callback routine that is implemented by the device driver.
DeviceContext
A pointer to a caller-allocated device context. This pointer is passed as a parameter to each driver-implemented callback function that is pointed to by this structure. The device driver uses this context to store information about the current power state of the device. This context is opaque to PoFx.
Components[ANYSIZE_ARRAY]
This member is the first element in an array of one or more PO_FX_COMPONENT elements. If the array contains more than one element, the additional elements immediately follow the PO_FX_DEVICE structure. The array contains one element for each component in the device. The Fx power state of each component can be controlled independently of the Fx power states of the other components in the device. The ANYSIZE_ARRAY constant is defined to be 1 in the Ntdef.h header file.
Remarks
To register a device with PoFx, a driver calls the PoFxRegisterDevice routine and supplies, as a parameter, a pointer to a PO_FX_DEVICE structure that describes the device.
Each element in the Components array describes the power state attributes of one component in the device. Each component in the device is identified by its Components array index. Routines such as PoFxActivateComponent and PoFxCompleteIdleCondition use the array index of a component to identify the component.
A device driver is not required to implement all six callback routines. The driver can set a function pointer in the PO_FX_DEVICE structure to NULL if the driver does not implement the corresponding callback routine. However, certain callback routines must be implemented. Specifically, if one or more components in a device has more than one Fx state, the driver must implement ComponentIdleStateCallback, ComponentActiveConditionCallback, and ComponentIdleConditionCallback routines. Otherwise, device registration fails and PoFxRegisterDevice returns STATUS_INVALID_PARAMETER.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Supported starting with Windows 8. |
Header | wdm.h (include Wudfwdm.h) |
See also
ComponentActiveConditionCallback
ComponentIdleConditionCallback