Class BluetoothBattery
java.lang.Object
com.github.hypfvieh.bluetooth.wrapper.AbstractBluetoothObject
com.github.hypfvieh.bluetooth.wrapper.BluetoothBattery
Wrapper class which represents the battery of a remote bluetooth device.
-
Constructor Summary
ConstructorsConstructorDescriptionBluetoothBattery(Battery1 _battery, BluetoothDevice _device, String _dbusPath, org.freedesktop.dbus.connections.impl.DBusConnection _dbusConnection) -
Method Summary
Modifier and TypeMethodDescriptionGetBluetoothDeviceobject where thisBluetoothBatteryobject belongs to.protected Class<? extends org.freedesktop.dbus.interfaces.DBusInterface> DBus-Interface class used in this wrapper object.From bluez Documentation:Get the rawBattery1object wrapped by thisBluetoothBatteryobject.toString()Methods inherited from class com.github.hypfvieh.bluetooth.wrapper.AbstractBluetoothObject
byteListToByteArray, getBluetoothType, getDbusConnection, getDbusPath, getRemoteObjects, getTyped, optionsToVariantMap, setTyped, toPrimitives
-
Constructor Details
-
BluetoothBattery
public BluetoothBattery(Battery1 _battery, BluetoothDevice _device, String _dbusPath, org.freedesktop.dbus.connections.impl.DBusConnection _dbusConnection)
-
-
Method Details
-
getInterfaceClass
DBus-Interface class used in this wrapper object.- Specified by:
getInterfaceClassin classAbstractBluetoothObject- Returns:
- class which implements the interface
-
getDevice
GetBluetoothDeviceobject where thisBluetoothBatteryobject belongs to.- Returns:
- device
-
getRawBattery
Get the rawBattery1object wrapped by thisBluetoothBatteryobject.- Returns:
- rawbattery
-
getPercentage
From bluez Documentation:The percentage of battery left as an unsigned 8-bit integer.
- Returns:
- byte, maybe null
-
toString
-