observe
abstract fun <Notification> observe(asValue: ByteArray.() -> Notification, builder: RemoteCharacteristicBinding.ObserveBuilder.NonMutating<T, Notification>.() -> Unit)
Sets up observation of a Notification from the RemoteCharacteristic
Parameters
asValue
the function that converts the ByteArray to the Notification
builder
sets up the observation response to a new Notification
Type Parameters
Notification
the type of Notification to receive from the RemoteCharacteristic
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
Parameters
deserializationStrategy
the DeserializationStrategy to use to convert the ByteArray to the Notification
bluetoothFormat
the BluetoothFormat to use to convert the ByteArray to the Notification
builder
sets up the observation response to a new Notification
Type Parameters
Notification
the type of Notification to receive from the RemoteCharacteristic
open fun observe(builder: RemoteCharacteristicBinding.ObserveBuilder.NonMutating<T, ByteArray>.() -> Unit)
Sets up observation of a ByteArray from the RemoteCharacteristic
Parameters
builder
sets up the observation response to a new ByteArray