UPowerDevice class
A device being managed by UPower.
Constructors
- UPowerDevice(DBusClient systemBus, DBusObjectPath path)
Properties
- batteryLevel → UPowerDeviceBatteryLevel
-
The battery level. Only applicable for UPowerDeviceType.battery.
no setter
- capacity → double
-
The capacity of this battery as a percentage. Only applicable for UPowerDeviceType.battery.
no setter
- energy → double
-
Amount of energy available in Wh. Only applicable for UPowerDeviceType.battery.
no setter
- energyEmpty → double
-
Amount of energy available in Wh when this battery is considered empty. Only applicable for UPowerDeviceType.battery.
no setter
- energyFull → double
-
Amount of energy available in Wh when this battery is considered full. Only applicable for UPowerDeviceType.battery.
no setter
- energyFullDesign → double
-
Amount of energy available in Wh this battery is designed to hold when full. Only applicable for UPowerDeviceType.battery.
no setter
- energyRate → double
-
Amount of energy being drained from this source in Watts.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasHistory → bool
-
True if this device will return history from getHistory.
no setter
- hasStatistics → bool
-
True if this device will return statistics from getStatistics.
no setter
- iconName → String
-
An icon to show for this device.
no setter
- isPresent → bool
-
True if there is a battery in the bay. Only applicable for UPowerDeviceType.battery.
no setter
- isRechargeable → bool
-
True if this battery can be recharged. Only applicable for UPowerDeviceType.battery.
no setter
- luminosity → double
-
Current luminosity.
no setter
- model → String
-
Name of the model of this device.
no setter
- nativePath → String
-
OS specific native path of this power source.
no setter
- online → bool
-
True if this is currently providing power. Only applicable for UPowerDeviceType.linePower.
no setter
- percentage → double
-
Amount of energy left in this source as a percentage.
no setter
- powerSupply → bool
-
True if this device is used to supply power to the system.
no setter
-
propertiesChanged
→ Stream<
List< String> > -
Stream of property names as they change.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serial → String
-
Unique serial number for this device.
no setter
- state → UPowerDeviceState
-
The battery power state. Only applicable for UPowerDeviceType.battery.
no setter
- technology → UPowerDeviceTechnology
-
The battery technology. Only applicable for UPowerDeviceType.battery.
no setter
- temperature → double
-
Temperature of this device in degrees Celcius. Only applicable for UPowerDeviceType.battery.
no setter
- timeToEmpty → int
-
Estimated time until this source is empty, in seconds.
no setter
- timeToFull → int
-
Estimated time until this source is full, in seconds.
no setter
- type → UPowerDeviceType
-
Type of power source.
no setter
- updateTime → int
-
Time this device was last updated
no setter
- vendor → String
-
Name of the vendor of the device.
no setter
- voltage → double
-
Current voltage of the supply.
no setter
- warningLevel → UPowerDeviceWarningLevel
-
no setter
Methods
-
getHistory(
String type, int resolution, {int timespan = 0}) → Future< List< UPowerDeviceHistoryRecord> > -
Gets history of
type
('rate' or 'charge'). -
getStatistics(
String type) → Future< List< UPowerDeviceStatisticsRecord> > -
Gets statistics on this device of
type
('charging', 'discharging'). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refresh(
) → Future< void> - Refreshes properties of this device.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited