TriggerResponse
Sets up binding to respond to a Trigger
Functions
Link copied to clipboard
open fun triggerRead(builder: RemoteAttributeBinding.ReadBuilder.NonMutating<T, Trigger, ByteArray>.() -> Unit)
abstract fun <Response> triggerRead(asValue: ByteArray.() -> Response, builder: RemoteAttributeBinding.ReadBuilder.NonMutating<T, Trigger, Response>.() -> Unit)
open fun <Response> triggerRead(deserializationStrategy: DeserializationStrategy<Response>, bluetoothFormat: BluetoothFormat = BluetoothFormat, unitBuilder: RemoteAttributeBinding.ReadBuilder.NonMutating<T, Trigger, Response>.() -> Unit)
Responds to a Trigger to cause the RemoteAttribute to be read.
Link copied to clipboard
fun <T> RemoteAttributeBinding.TriggerResponse<Unit, T>.triggerRead(unitBuilder: RemoteAttributeBinding.UnitReadBuilder.NonMutating<T, ByteArray>.() -> Unit)
inline fun <Response, T> RemoteAttributeBinding.TriggerResponse<Unit, T>.triggerRead(bluetoothFormat: BluetoothFormat = BluetoothFormat, noinline unitBuilder: RemoteAttributeBinding.UnitReadBuilder.NonMutating<T, Response>.() -> Unit)
fun <Response, T> RemoteAttributeBinding.TriggerResponse<Unit, T>.triggerRead(asValue: ByteArray.() -> Response, unitBuilder: RemoteAttributeBinding.UnitReadBuilder.NonMutating<T, Response>.() -> Unit)
fun <Response, T> RemoteAttributeBinding.TriggerResponse<Unit, T>.triggerRead(deserializationStrategy: DeserializationStrategy<Response>, bluetoothFormat: BluetoothFormat = BluetoothFormat, unitBuilder: RemoteAttributeBinding.UnitReadBuilder.NonMutating<T, Response>.() -> Unit)
Responds to a Unit to cause the RemoteAttribute to be read.
inline fun <Response, Trigger, T> RemoteAttributeBinding.TriggerResponse<Trigger, T>.triggerRead(bluetoothFormat: BluetoothFormat = BluetoothFormat, noinline builder: RemoteAttributeBinding.ReadBuilder.NonMutating<T, Trigger, Response>.() -> Unit)
Responds to a Trigger to cause the RemoteAttribute to be read.
Link copied to clipboard
abstract fun triggerWrite(asByte: Trigger.() -> ByteArray, builder: RemoteAttributeBinding.WriteBuilder.NonMutating<T, Trigger>.() -> Unit)
Responds to a Trigger to cause the RemoteAttribute to be written to.
open fun triggerWrite(serializationStrategy: SerializationStrategy<Trigger>, bluetoothFormat: BluetoothFormat = BluetoothFormat, builder: RemoteAttributeBinding.WriteBuilder.NonMutating<T, Trigger>.() -> Unit)
Responds to a Trigger to write it to the RemoteAttribute.
open fun <Data> triggerWrite(serializationStrategy: SerializationStrategy<Data>, bluetoothFormat: BluetoothFormat = BluetoothFormat, mapper: Trigger.() -> Data, builder: RemoteAttributeBinding.WriteBuilder.NonMutating<T, Trigger>.() -> Unit)
Responds to a Trigger to have Data written to the RemoteAttribute.
Link copied to clipboard
fun <T> RemoteAttributeBinding.TriggerResponse<ByteArray, T>.triggerWrite(builder: RemoteAttributeBinding.WriteBuilder.NonMutating<T, ByteArray>.() -> Unit)
Responds to a ByteArray to write it to the RemoteAttribute.
inline fun <Trigger, T> RemoteAttributeBinding.TriggerResponse<Trigger, T>.triggerWrite(bluetoothFormat: BluetoothFormat = BluetoothFormat, noinline builder: RemoteAttributeBinding.WriteBuilder.NonMutating<T, Trigger>.() -> Unit)
Consumes Trigger from a Channel to write it to the RemoteAttribute.
inline fun <Trigger, Data, T> RemoteAttributeBinding.TriggerResponse<Trigger, T>.triggerWrite(bluetoothFormat: BluetoothFormat = BluetoothFormat, noinline mapper: Trigger.() -> Data, noinline builder: RemoteAttributeBinding.WriteBuilder.NonMutating<T, Trigger>.() -> Unit)
Responds to a Trigger to have Data written to the RemoteAttribute.