TriggerResponse

Sets up binding to respond to a Trigger

Functions

Link copied to clipboard
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
@JvmName(name = "triggerReadFromUnit")
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(deserializationStrategy: DeserializationStrategy<Response>, bluetoothFormat: BluetoothFormat = BluetoothFormat, unitBuilder: RemoteAttributeBinding.UnitReadBuilder.NonMutating<T, Response>.() -> Unit)

Responds to a Unit to cause the RemoteAttribute to be read.

Responds to a Trigger to cause the RemoteAttribute to be read.

Link copied to clipboard

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

Responds to a ByteArray to write it to the RemoteAttribute.

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.