Class BluetoothGattService
java.lang.Object
com.github.hypfvieh.bluetooth.wrapper.AbstractBluetoothObject
com.github.hypfvieh.bluetooth.wrapper.BluetoothGattService
Wrapper class which represents a GATT service provided by a remote device.
- Author:
- hypfvieh
-
Constructor Summary
ConstructorsConstructorDescriptionBluetoothGattService(GattService1 _service, BluetoothDevice _device, String _dbusPath, org.freedesktop.dbus.connections.impl.DBusConnection _dbusConnection) -
Method Summary
Modifier and TypeMethodDescriptionGet theBluetoothDeviceinstance which is providing thisBluetoothGattService.Return theBluetoothGattCharacteristicobject for the given UUID.Get the currently available GATT characteristics.
Will issue a query ifrefreshGattCharacteristics()wasn't called before.Object[]From bluez Documentation:protected Class<? extends org.freedesktop.dbus.interfaces.DBusInterface> DBus-Interface class used in this wrapper object.Get the rawGattService1object.getUuid()From bluez Documentation:From bluez Documentation:voidRe-queries the GattCharacteristics from the device.toString()Methods inherited from class com.github.hypfvieh.bluetooth.wrapper.AbstractBluetoothObject
byteListToByteArray, getBluetoothType, getDbusConnection, getDbusPath, getRemoteObjects, getTyped, optionsToVariantMap, setTyped, toPrimitives
-
Constructor Details
-
BluetoothGattService
public BluetoothGattService(GattService1 _service, 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
-
refreshGattCharacteristics
public void refreshGattCharacteristics()Re-queries the GattCharacteristics from the device. -
getGattCharacteristics
Get the currently available GATT characteristics.
Will issue a query ifrefreshGattCharacteristics()wasn't called before.- Returns:
- List, maybe empty but never null
-
getGattCharacteristicByUuid
Return theBluetoothGattCharacteristicobject for the given UUID.- Parameters:
_uuid- uuid- Returns:
- maybe null if not found
-
getUuid
From bluez Documentation:128-bit service UUID.
- Returns:
- uuid, maybe null
-
isPrimary
From bluez Documentation:Indicates whether or not this GATT service is a
primary service. If false, the service is secondary.- Returns:
- maybe null if feature is not supported
-
getIncludes
From bluez Documentation:Not implemented
Array of object paths representing the included
services of this service.- Returns:
- object array, maybe null
- Throws:
BluezNotImplementedException- always - because currently not supported
-
getService
Get the rawGattService1object.- Returns:
GattService1, maybe null
-
getDevice
Get theBluetoothDeviceinstance which is providing thisBluetoothGattService.- Returns:
BluetoothDevice, maybe null
-
toString
-