PMI_EVENT structure (pmi.h)

The PMI_EVENT structure contains information about a power metering and budgeting event that is signaled through the Power Meter Interface (PMI).

Syntax

typedef struct _PMI_EVENT {
  ULONG          Version;
  PMI_EVENT_TYPE EventType;
} PMI_EVENT, *PPMI_EVENT;

Members

Version

A value that specifies the version of this structure. For Windows 7, Windows Server 2008 R2, and later versions of Windows, this value must be 1.

EventType

A PMI_EVENT_TYPE enumeration value that specifies the PMI event type.

Remarks

The PMI_EVENT structure contains information about a power metering or budgeting event. PMI generates an event for a power meter when one of the following occurs:

  • The power meter's power metering or budgeting capabilities have changed.
  • The power meter's power metering or budgeting configurations have changed.
  • The power supply that is monitored by the power meter has exceeded the meter's configured power threshold.
  • The power supply that is monitored by the power meter has exceeded or fallen below the meter's configured power budget.
A user-mode service or application registers for notification of these events through an IOCTL_PMI_REGISTER_EVENT_NOTIFY I/O control (IOCTL) query request.

The PMI_EVENT structure does not contain the current PMI data for the event. Depending on the value of the EventType member, the caller can retrieve the current PMI data through a PMI IOCTL query request. The following table describes the PMI IOCTL to use to query the changed data from a power meter for a query request.

EventType value PMI IOCTL I/O request packet (IRP)
PmiCapabilitiesChangedEvent

IOCTL_PMI_GET_CAPABILITIES

The AssociatedIrp.SystemBuffer member is set to the address of an initiator-allocated buffer that contains any PMI_CAPABILITIES_TYPE enumeration value.
PmiConfigurationChangedEvent

IOCTL_PMI_GET_CONFIGURATION

The AssociatedIrp.SystemBuffer member is set to the address of an initiator-allocated buffer that contains any PMI_CONFIGURATION_TYPE enumeration value.
PmiThresholdEvent

IOCTL_PMI_GET_CONFIGURATION

The AssociatedIrp.SystemBuffer member is set to the address of an initiator-allocated buffer that contains the PMI_CONFIGURATION_TYPE enumeration value or PmiThresholdConfiguration.
PmiBudgetEvent

IOCTL_PMI_GET_CONFIGURATION

The AssociatedIrp.SystemBuffer member is set to the address of an initiator-allocated buffer that contains the PMI_CONFIGURATION_TYPE enumeration value or PmiBudgetConfiguration.
PmiAveragingIntervalChangedEvent

IOCTL_PMI_GET_CONFIGURATION

The AssociatedIrp.SystemBuffer member is set to the address of an initiator-allocated buffer that contains the PMI_CONFIGURATION_TYPE enumeration value or PmiMeasurementConfiguration.

Requirements

Requirement Value
Minimum supported client Available in Windows 7, Windows Server 2008 R2, and later versions of the Windows operating systems.
Header pmi.h (include Pmi.h)

See also

IOCTL_PMI_GET_CAPABILITIES

IOCTL_PMI_GET_CONFIGURATION

IOCTL_PMI_REGISTER_EVENT_NOTIFY

IRP

PMI_CAPABILITIES_TYPE

PMI_CONFIGURATION_TYPE

PMI_EVENT_TYPE