EnsuresServicesAvailable
A RemoteCharacteristicBinding that assumes the RemoteCharacteristic being bound to has been discovered.
Functions
Link copied to clipboard
abstract fun <R> R.bindDescriptor(uuid: UUID, update: T.(R) -> T = { this }, binding: RemoteDescriptorBinding<R>.() -> Unit)
open fun <R> R.bindDescriptor(uuidString: String, update: T.(R) -> T = { this }, binding: RemoteDescriptorBinding<R>.() -> Unit)
Binds an object of type R to the RemoteDescriptor at a given UUID and updates the object whenever it changes.
Link copied to clipboard
Binds the object to the RemoteDescriptor at a given UUID.
Link copied to clipboard
open fun observe(builder: RemoteCharacteristicBinding.ObserveBuilder.NonMutating<T, ByteArray>.() -> Unit)
Sets up observation of a ByteArray from the RemoteCharacteristic
abstract fun <Notification> observe(asValue: ByteArray.() -> Notification, builder: RemoteCharacteristicBinding.ObserveBuilder.NonMutating<T, Notification>.() -> Unit)
open fun <Notification> observe(deserializationStrategy: DeserializationStrategy<Notification>, bluetoothFormat: BluetoothFormat = BluetoothFormat, builder: RemoteCharacteristicBinding.ObserveBuilder.NonMutating<T, Notification>.() -> Unit)
Sets up observation of a Notification from the RemoteCharacteristic
Link copied to clipboard
inline fun <Notification, T> RemoteCharacteristicBinding<T>.observe(bluetoothFormat: BluetoothFormat = BluetoothFormat, noinline builder: RemoteCharacteristicBinding.ObserveBuilder.NonMutating<T, Notification>.() -> Unit)
Sets up observation of a Notification from the RemoteCharacteristic