PowerSourceImpl
Implementation of the PowerSource
interface. This class provides details about a power source, including its name, device name, capacity, voltage, amperage, and more. It also offers methods for accessing information about the power source's status, such as whether it is charging or discharging, as well as the estimated remaining time for use.
Author
N7ghtm4r3
Parameters
The PowerSource
object containing the actual power source data retrieved from the hardware.
See also
Properties
capacityUnits
The capacity units of the power source (e.g., "mWh", "Wh")
currentCapacity
The current capacity of the power source in the given capacity units
cycleCount
The cycle count of the power source, representing the number of charge-discharge cycles
designCapacity
The design capacity of the power source in the given capacity units
deviceName
The device name of the power source (e.g., "BAT0", "AC")
isCharging
Whether the power source is currently charging
isDischarging
Whether the power source is currently discharging
isPowerOnLine
Whether the power source is currently connected to the power line (e.g., AC power)
manufacturer
The manufacturer of the power source (e.g., "Samsung", "LG")
maxCapacity
The maximum capacity of the power source in the given capacity units
powerUsageRate
The current power usage rate of the power source in watts
remainingCapacityPercent
The remaining battery capacity as a percentage of the total capacity (0-100%)
serialNumber
The serial number of the power source
temperature
The temperature of the power source in Celsius
timeRemainingEstimated
The estimated time remaining on the power source, in minutes
timeRemainingInstant
The instantaneous time remaining on the power source, in minutes
updateAttributes
Whether the attributes of the power source have been updated