Compartir a través de


SYSTEM_POWER_STATUS_EX2 (Windows CE 5.0)

Send Feedback

This structure contains information about the power status of the system.

typedef struct _SYSTEM_POWER_STATUS_EX2 {  BYTE ACLineStatus;  BYTE BatteryFlag;  BYTE BatteryLifePercent;BYTE Reserved1;DWORDBatteryLifeTime;DWORDBatteryFullLifeTime;  BYTEReserved2;  BYTEBackupBatteryFlag;  BYTEBackupBatteryLifePercent;  BYTEReserved3;  DWORDBackupBatteryLifeTime;  DWORDBackupBatteryFullLifeTime;  DWORDBatteryVoltage;  DWORDBatteryCurrent;  DWORDBatteryAverageCurrent;  DWORDBatteryAverageInterval;  DWORDBatterymAHourConsumed;  DWORDBatteryTemperature;  DWORDBackupBatteryVoltage;  BYTEBatteryChemistry;
  //  Add any extra information after the BatteryChemistry member.
} SYSTEM_POWER_STATUS_EX2, *PSYSTEM_POWER_STATUS_EX2, *LPSYSTEM_POWER_STATUS_EX2;

Members

  • ACLineStatus
    AC power status. This member can be one of the values in the following table.

    Value Description
    AC_LINE_OFFLINE Offline
    AC_LINE_ONLINE Online
    AC_LINE_BACKUP_POWER Backup Power
    AC_LINE_UNKNOWN Unknown status

    All other values are reserved.

  • BatteryFlag
    Battery charge status. This member can be a combination of the values in the following table. All other values are reserved.

    Value Description
    BATTERY_FLAG_HIGH High
    BATTERY_FLAG_LOW Low
    BATTERY_FLAG_CRITICAL Critical
    BATTERY_FLAG_CHARGING Charging
    BATTERY_FLAG_NO_BATTERY No system battery
    BATTERY_FLAG_UNKNOWN Unknown status
  • BatteryLifePercent
    Percentage of full battery charge remaining. This member can be a value in the range 0 to 100, or BATTERY_PERCENTAGE_UNKNOWN if the status is unknown. All other values are reserved.

  • Reserved1
    Reserved; set to zero.

  • BatteryLifeTime
    Number of seconds of battery life remaining, or BATTERY_LIFE_UNKNOWN if remaining seconds are unknown.

  • BatteryFullLifeTime
    Number of seconds of battery life when at full charge, or BATTERY_LIFE_UNKNOWN if full battery lifetime is unknown.

  • Reserved2
    Reserved; set to zero.

  • BackupBatteryFlag
    Backup battery charge status. This member can be a combination of the following values:

    • BATTERY_FLAG_HIGH
    • BATTERY_FLAG_CRITICAL
    • BATTERY_FLAG_CHARGING
    • BATTERY_FLAG_NO_BATTERY
    • BATTERY_FLAG_UNKNOWN
    • BATTERY_FLAG_LOW
  • BackupBatteryLifePercent
    Percentage of full backup battery charge remaining. This value must be in the range 0 to 100, or BATTERY_PERCENTAGE_UNKNOWN.

  • Reserved3
    Reserved; set to zero.

  • BackupBatteryLifeTime
    Number of seconds of backup battery life remaining, or BATTERY_LIFE_UNKNOWN if remaining seconds are unknown.

  • BackupBatteryFullLifeTime
    Number of seconds of backup battery life when at full charge, or BATTERY_LIFE_UNKNOWN if full battery lifetime is unknown.

  • BatteryVoltage
    Amount of battery voltage in millivolts (mV). This member can have a value in the range of 0 to 65,535.

  • BatteryCurrent
    Amount of instantaneous current drain in milliamperes (mA). This member can have a value in the range of 0 to 32,767 for charge, or 0 to –32,768 for discharge.

  • BatteryAverageCurrent
    Short-term average of device current drain (mA). This member can have a value in the range of 0 to 32,767 for charge, or 0 to –32,768 for discharge.

  • BatteryAverageInterval
    Time constant in milliseconds (ms) of integration used in reporting BatteryAverageCurrent.

  • BatterymAHourConsumed
    Long-term cumulative average discharge in milliamperes per hour (mAH). This member can have a value in the range of 0 to –32,768. This value can be reset by charging or changing the batteries.

  • BatteryTemperature
    Battery temperature in degrees Celsius. This member can have a value in the range of –3,276.8 to 3,276.7; the increments are 0.1 degrees Celsius.

  • BackupBatteryVoltage
    Backup battery voltage in mV.

  • BatteryChemistry
    This can be one of the values in the following table.

    Value Description
    BATTERY_CHEMISTRY_ALKALINE Alkaline battery.
    BATTERY_CHEMISTRY_NICD Nickel Cadmium battery.
    BATTERY_CHEMISTRY_NIMH Nickel Metal Hydride battery.
    BATTERY_CHEMISTRY_LION Lithium Ion battery.
    BATTERY_CHEMISTRY_LIPOLY Lithium Polymer battery.
    BATTERY_CHEMISTRY_ZINCAIR Zinc Air battery.
    BATTERY_CHEMISTRY_UNKNOWN Battery chemistry is unknown.

Remarks

To return additional battery information, such as information about an extra battery, provide a data buffer larger than SYSTEM_POWER_STATUS_EX2 in the GetSystemPowerStatusEx2 function. Any extra information must be added after the BatteryChemistry member of the SYSTEM_POWER_STATUS_EX2 structure. There must be support for this implemented in the battery driver, and the implementation of this support varies depending on the hardware platform.

Requirements

OS Versions: Windows CE 2.12 and later.
Header: Winbase.h.

See Also

GetSystemPowerStatusEx2 | System Information Structures

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.