1# BatteryInfo 2 3 4## 概述 5 6电池相关信息。 7 8**起始版本:** 3.1 9 10**相关模块:**[Battery](battery_v20.md) 11 12 13## 汇总 14 15 16### Public 属性 17 18| 名称 | 描述 | 19| -------- | -------- | 20| int [capacity](#capacity) | 表示电池的电量百分比。 | 21| int [voltage](#voltage) | 表示电池的电压。 | 22| int [temperature](#temperature) | 表示电池的温度 | 23| int [healthState](#healthstate) | 表示电池的健康状态,详情可参考[BatteryHealthState](battery_v20.md#batteryhealthstate)。 | 24| int [pluggedType](#pluggedtype) | 表示电池的充电设备类型,详情可参考[BatteryPluggedType](battery_v20.md#batterypluggedtype)。 | 25| int [pluggedMaxCurrent](#pluggedmaxcurrent) | 表示电池的最大充电电流。 | 26| int [pluggedMaxVoltage](#pluggedmaxvoltage) | 表示电池的最大充电电压。 | 27| int [chargeState](#chargestate) | 表示电池的充电状态,详情可参考[BatteryChargeState](battery_v20.md#batterychargestate)。 | 28| int [chargeCounter](#chargecounter) | 表示电池的充电次数。 | 29| int [totalEnergy](#totalenergy) | 表示电池的总容量。 | 30| int [curAverage](#curaverage) | 表示电池的平均电流。 | 31| int [curNow](#curnow) | 表示电池的实时电流。 | 32| int [remainEnergy](#remainenergy) | 表示电池的剩余容量。 | 33| byte [present](#present) | 表示是否支持电池或者电池是否在位。 | 34| String [technology](#technology) | 表示电池的技术型号。 | 35| String [uevent](#uevent) | 事件名 | 36 37 38## 类成员变量说明 39 40 41### capacity 42 43``` 44int BatteryInfo::capacity 45``` 46**描述** 47 48表示电池的电量百分比。 49 50 51### chargeCounter 52 53``` 54int BatteryInfo::chargeCounter 55``` 56**描述** 57 58表示电池的充电次数。 59 60 61### chargeState 62 63``` 64int BatteryInfo::chargeState 65``` 66**描述** 67 68表示电池的充电状态,详情可参考[BatteryChargeState](battery_v20.md#batterychargestate)。 69 70 71### curAverage 72 73``` 74int BatteryInfo::curAverage 75``` 76**描述** 77 78表示电池的平均电流。 79 80 81### curNow 82 83``` 84int BatteryInfo::curNow 85``` 86**描述** 87 88表示电池的实时电流。 89 90 91### healthState 92 93``` 94int BatteryInfo::healthState 95``` 96**描述** 97 98表示电池的健康状态,详情可参考[BatteryHealthState](battery_v20.md#batteryhealthstate)。 99 100 101### pluggedMaxCurrent 102 103``` 104int BatteryInfo::pluggedMaxCurrent 105``` 106**描述** 107 108表示电池的最大充电电流。 109 110 111### pluggedMaxVoltage 112 113``` 114int BatteryInfo::pluggedMaxVoltage 115``` 116**描述** 117 118表示电池的最大充电电压。 119 120 121### pluggedType 122 123``` 124int BatteryInfo::pluggedType 125``` 126**描述** 127 128表示电池的充电设备类型,详情可参考[BatteryPluggedType](battery_v20.md#batterypluggedtype)。 129 130 131### present 132 133``` 134byte BatteryInfo::present 135``` 136**描述** 137 138表示是否支持电池或者电池是否在位。 139 140 141### remainEnergy 142 143``` 144int BatteryInfo::remainEnergy 145``` 146**描述** 147 148表示电池的剩余容量。 149 150 151### technology 152 153``` 154String BatteryInfo::technology 155``` 156**描述** 157 158表示电池的技术型号。 159 160 161### temperature 162 163``` 164int BatteryInfo::temperature 165``` 166**描述** 167 168表示电池的温度 169 170 171### totalEnergy 172 173``` 174int BatteryInfo::totalEnergy 175``` 176**描述** 177 178表示电池的总容量。 179 180 181### uevent 182 183``` 184String BatteryInfo::uevent 185``` 186**描述** 187 188事件名 189 190 191### voltage 192 193``` 194int BatteryInfo::voltage 195``` 196**描述** 197 198表示电池的电压。 199