Functions

Link copied to clipboard
abstract fun <R> R.bindDescriptor(uuid: UUID, update: T.(R) -> T = { this }, binding: RemoteDescriptorBinding.RequiresServicesDiscovered<R>.() -> Unit)
open fun <R> R.bindDescriptor(uuidString: String, update: T.(R) -> T = { this }, binding: RemoteDescriptorBinding.RequiresServicesDiscovered<R>.() -> Unit)

Binds an object of type R to the RemoteDescriptor at a given UUID whenever it is available and updates the object whenever it changes.

Link copied to clipboard
abstract fun <Trigger> Flow<Trigger>.collectTo(trigger: RemoteAttributeBinding.TriggerResponse<Trigger, T>.() -> Unit)

Collects this Flow and responds to its Trigger

Link copied to clipboard
abstract fun <Trigger> Channel<Trigger>.consumeTo(trigger: RemoteAttributeBinding.TriggerResponse<Trigger, T>.() -> Unit)

Consumes this Channel and responds to its Trigger

Link copied to clipboard

Binds the object to the RemoteDescriptor at a given UUID whenever it is available.

Link copied to clipboard
Link copied to clipboard

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

Sets up observation of a Notification from the RemoteCharacteristic

Link copied to clipboard
abstract fun onAvailable(action: T.() -> Unit)

Sets up a Transformation action when RemoteService become available.

Link copied to clipboard
abstract fun onUnavailable(action: T.() -> Unit)

Sets up a Transformation action when RemoteService become unavailable.