public class BatteryHealthData
extends java.lang.Object
Constructor and Description |
---|
BatteryHealthData() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBatteryStyle()
Gets the battery style (the type of battery)
Known types include
PH Battery is a power handle
SB 1166 battery
XL Standard Varta XL battery (e.g.
|
java.lang.Integer |
getCycleCount()
Gets the number of times the battery has been charged or null if not available
|
java.lang.Integer |
getDesignCapacity()
Gets the (original) design capacity of the battery in mAh or null if not available
|
java.lang.Integer |
getFullyChargedCapacity()
Gets the predicted capacity of the battery when fully charged in mAh or null if not available
|
java.lang.String |
getRawValue()
Get the raw ASCII Protocol Health Data string
|
java.lang.Integer |
getRemainingCapacity()
Gets the remaining capacity of the current charge of the battery in mAh or null if not available
To calculate remaining charge as a percentage use:
100 * (RemainingCapacity / FullyChargedCapacity)
|
java.lang.Integer |
getStateOfHealth()
Gets the state of health (%) of the battery or null if not available
|
java.lang.Integer |
getVoltage()
Gets the reported battery voltage in mV or null if not available
|
static BatteryHealthData |
parse(java.lang.String value) |
void |
setBatteryStyle(java.lang.String batteryStyle) |
void |
setCycleCount(java.lang.Integer cycleCount) |
void |
setDesignCapacity(java.lang.Integer designCapacity) |
void |
setFullyChargedCapacity(java.lang.Integer fullyChargedCapacity) |
void |
setRemainingCapacity(java.lang.Integer remainingCapacity) |
void |
setStateOfHealth(java.lang.Integer stateOfHealth) |
void |
setVoltage(java.lang.Integer voltage) |
public java.lang.String getRawValue()
public java.lang.String getBatteryStyle()
public void setBatteryStyle(java.lang.String batteryStyle)
public java.lang.Integer getVoltage()
public void setVoltage(java.lang.Integer voltage)
public java.lang.Integer getCycleCount()
public void setCycleCount(java.lang.Integer cycleCount)
public java.lang.Integer getDesignCapacity()
public void setDesignCapacity(java.lang.Integer designCapacity)
public java.lang.Integer getFullyChargedCapacity()
public void setFullyChargedCapacity(java.lang.Integer fullyChargedCapacity)
public java.lang.Integer getRemainingCapacity()
public void setRemainingCapacity(java.lang.Integer remainingCapacity)
public java.lang.Integer getStateOfHealth()
public void setStateOfHealth(java.lang.Integer stateOfHealth)
public static BatteryHealthData parse(java.lang.String value)