# BatteryInfo ## 概述 ç”µæ± ç›¸å…³ä¿¡æ¯ã€‚ **起始版本:** 3.1 **相关模å—:**[Battery](battery_v20.md) ## 汇总 ### Public 属性 | åç§° | æè¿° | | -------- | -------- | | int [capacity](#capacity) | è¡¨ç¤ºç”µæ± çš„ç”µé‡ç™¾åˆ†æ¯”。 | | int [voltage](#voltage) | è¡¨ç¤ºç”µæ± çš„ç”µåŽ‹ã€‚ | | int [temperature](#temperature) | è¡¨ç¤ºç”µæ± çš„æ¸©åº¦ | | int [healthState](#healthstate) | è¡¨ç¤ºç”µæ± çš„å¥åº·çжæ€ï¼Œè¯¦æƒ…å¯å‚考[BatteryHealthState](battery_v20.md#batteryhealthstate)。 | | int [pluggedType](#pluggedtype) | è¡¨ç¤ºç”µæ± çš„å……ç”µè®¾å¤‡ç±»åž‹ï¼Œè¯¦æƒ…å¯å‚考[BatteryPluggedType](battery_v20.md#batterypluggedtype)。 | | int [pluggedMaxCurrent](#pluggedmaxcurrent) | è¡¨ç¤ºç”µæ± çš„æœ€å¤§å……ç”µç”µæµã€‚ | | int [pluggedMaxVoltage](#pluggedmaxvoltage) | è¡¨ç¤ºç”µæ± çš„æœ€å¤§å……ç”µç”µåŽ‹ã€‚ | | int [chargeState](#chargestate) | è¡¨ç¤ºç”µæ± çš„å……ç”µçŠ¶æ€ï¼Œè¯¦æƒ…å¯å‚考[BatteryChargeState](battery_v20.md#batterychargestate)。 | | int [chargeCounter](#chargecounter) | è¡¨ç¤ºç”µæ± çš„å……ç”µæ¬¡æ•°ã€‚ | | int [totalEnergy](#totalenergy) | è¡¨ç¤ºç”µæ± çš„æ€»å®¹é‡ã€‚ | | int [curAverage](#curaverage) | è¡¨ç¤ºç”µæ± çš„å¹³å‡ç”µæµã€‚ | | int [curNow](#curnow) | è¡¨ç¤ºç”µæ± çš„å®žæ—¶ç”µæµã€‚ | | int [remainEnergy](#remainenergy) | è¡¨ç¤ºç”µæ± çš„å‰©ä½™å®¹é‡ã€‚ | | byte [present](#present) | è¡¨ç¤ºæ˜¯å¦æ”¯æŒç”µæ± æˆ–è€…ç”µæ± æ˜¯å¦åœ¨ä½ã€‚ | | String [technology](#technology) | è¡¨ç¤ºç”µæ± çš„æŠ€æœ¯åž‹å·ã€‚ | | String [uevent](#uevent) | 事件å | ## ç±»æˆå‘˜å˜é‡è¯´æ˜Ž ### capacity ``` int BatteryInfo::capacity ``` **æè¿°** è¡¨ç¤ºç”µæ± çš„ç”µé‡ç™¾åˆ†æ¯”。 ### chargeCounter ``` int BatteryInfo::chargeCounter ``` **æè¿°** è¡¨ç¤ºç”µæ± çš„å……ç”µæ¬¡æ•°ã€‚ ### chargeState ``` int BatteryInfo::chargeState ``` **æè¿°** è¡¨ç¤ºç”µæ± çš„å……ç”µçŠ¶æ€ï¼Œè¯¦æƒ…å¯å‚考[BatteryChargeState](battery_v20.md#batterychargestate)。 ### curAverage ``` int BatteryInfo::curAverage ``` **æè¿°** è¡¨ç¤ºç”µæ± çš„å¹³å‡ç”µæµã€‚ ### curNow ``` int BatteryInfo::curNow ``` **æè¿°** è¡¨ç¤ºç”µæ± çš„å®žæ—¶ç”µæµã€‚ ### healthState ``` int BatteryInfo::healthState ``` **æè¿°** è¡¨ç¤ºç”µæ± çš„å¥åº·çжæ€ï¼Œè¯¦æƒ…å¯å‚考[BatteryHealthState](battery_v20.md#batteryhealthstate)。 ### pluggedMaxCurrent ``` int BatteryInfo::pluggedMaxCurrent ``` **æè¿°** è¡¨ç¤ºç”µæ± çš„æœ€å¤§å……ç”µç”µæµã€‚ ### pluggedMaxVoltage ``` int BatteryInfo::pluggedMaxVoltage ``` **æè¿°** è¡¨ç¤ºç”µæ± çš„æœ€å¤§å……ç”µç”µåŽ‹ã€‚ ### pluggedType ``` int BatteryInfo::pluggedType ``` **æè¿°** è¡¨ç¤ºç”µæ± çš„å……ç”µè®¾å¤‡ç±»åž‹ï¼Œè¯¦æƒ…å¯å‚考[BatteryPluggedType](battery_v20.md#batterypluggedtype)。 ### present ``` byte BatteryInfo::present ``` **æè¿°** è¡¨ç¤ºæ˜¯å¦æ”¯æŒç”µæ± æˆ–è€…ç”µæ± æ˜¯å¦åœ¨ä½ã€‚ ### remainEnergy ``` int BatteryInfo::remainEnergy ``` **æè¿°** è¡¨ç¤ºç”µæ± çš„å‰©ä½™å®¹é‡ã€‚ ### technology ``` String BatteryInfo::technology ``` **æè¿°** è¡¨ç¤ºç”µæ± çš„æŠ€æœ¯åž‹å·ã€‚ ### temperature ``` int BatteryInfo::temperature ``` **æè¿°** è¡¨ç¤ºç”µæ± çš„æ¸©åº¦ ### totalEnergy ``` int BatteryInfo::totalEnergy ``` **æè¿°** è¡¨ç¤ºç”µæ± çš„æ€»å®¹é‡ã€‚ ### uevent ``` String BatteryInfo::uevent ``` **æè¿°** 事件å ### voltage ``` int BatteryInfo::voltage ``` **æè¿°** è¡¨ç¤ºç”µæ± çš„ç”µåŽ‹ã€‚