triggerWrite

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

Parameters

asByte

maps the Trigger to a ByteArray to write.

builder

sets up the response to a triggered write using a WriteBuilder.NonMutating


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.

Parameters

serializationStrategy

the SerializationStrategy to map the Data to a ByteArray to write.

bluetoothFormat

the BluetoothFormat to use for serialization.

mapper

maps the Trigger to the Data to write.

builder

sets up the response to a triggered write using a WriteBuilder.NonMutating

Type Parameters

Data

the type of data to write to the RemoteAttribute.


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.

Parameters

serializationStrategy

the SerializationStrategy to map the Trigger to a ByteArray to write.

bluetoothFormat

the BluetoothFormat to use for serialization.

builder

sets up the response to a triggered write using a WriteBuilder.NonMutating