IOCTL_PMI_GET_MEASUREMENT IOCTL

The IOCTL_PMI_GET_MEASUREMENT request returns the current measurement data from a power meter.

Major Code

IRP_MJ_DEVICE_CONTROL

Input Buffer

The initiator-allocated output buffer that is pointed to by the AssociatedIrp.SystemBuffer member of the IRP.

Input Buffer Length

The Parameters.DeviceIoControl.OutputBufferLength member of the IRP's current I/O stack location (IO_STACK_LOCATION) is set to the size in bytes of the initiator-allocated output buffer that is pointed to by the AssociatedIrp.SystemBuffer member of the IRP. This size must be greater than or equal to sizeof(PMI_MEASUREMENT_DATA) or the request fails with an error status of STATUS_BUFFER_TOO_SMALL.

Output Buffer

If the request completes successfully, the output buffer pointed to by the AssociatedIrp.SystemBuffer member contains a PMI_MEASUREMENT_DATA structure. This structure contains the requested measurement data.

Output Buffer Length

The size of a PMI_MEASUREMENT_DATA structure.

Status Block

The Information member is set to the size, in bytes, of a PMI_MEASUREMENT_DATA structure.

The Status member is set to one of the following values:

Remarks

The IOCTL_PMI_GET_MEASUREMENT request queries the current measurement data from the power meter. This measurement data is sampled and averaged based on the power meter's measurement configuration parameters. The measurement configuration parameters are queried through the IOCTL_PMI_GET_CONFIGURATION request with an input PMI_CONFIGURATION_TYPE value of PmiMeasurementConfiguration.

Requirements

   
Windows version 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

IO_STACK_LOCATION

IRP

PMI_CONFIGURATION_TYPE

PMI_MEASUREMENT_DATA