Monitoring Battery Status
Windows CE for the Auto PC monitors battery status and notifies a user if power drops below a critical level. It does not notify applications of battery status. An application must poll the OS for battery status by calling functions in the power management API. An original equipment manufacturer (OEM) determines what battery information is supplied to the polling application. Generally, the following information is available:
- Alternating current (AC) line status
- Battery status
- Battery life remaining
- Lifetime of the battery
The following list shows the battery status functions included in the power management API.
- BatteryDrvrGetStatus
- Returns the vehicle status and the backup batteries in a BATTERY_STATUS structure.
- BatteryDrvrGetLevels
- Returns the number of levels used by the BatteryFlag and BackupBatteryFlag members of the BATTERY_STATUS structure. The number of levels is determined by the OEM. The levels range from fully charged to fully discharged.
- BatteryDrvrSupportsChangeNotification
- Returns a value that indicates if the hardware can detect that the batteries have been changed.