triggerRead

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

Parameters

asValue

maps the ByteArray received from the GattResponse.ReadSuccess to the Response that will be returned.

unitBuilder

sets up the response to a triggered read using a UnitReadBuilder.NonMutating

Type Parameters

Response

the type of Response that will be returned when the RemoteAttribute is read.

T

the type of the object to bind to


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.

Parameters

deserializationStrategy

the DeserializationStrategy to map the ByteArray received from the GattResponse.ReadSuccess to the Response that will be returned.

bluetoothFormat

the BluetoothFormat to use for deserialization.

unitBuilder

sets up the response to a triggered read using a UnitReadBuilder.NonMutating

Type Parameters

Response

the type of Response that will be returned when the RemoteAttribute is read.

T

the type of the object to bind to


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

Parameters

unitBuilder

sets up the response to a triggered read using a UnitReadBuilder.NonMutating

Type Parameters

T

the type of the object to bind to


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

Parameters

bluetoothFormat

the BluetoothFormat to use for deserialization.

builder

sets up the response to a triggered read using a RemoteAttributeBinding.ReadBuilder.NonMutating

Type Parameters

Response

the type of Response that will be returned when the RemoteAttribute is read.

Trigger

the type of Trigger that will cause the RemoteAttribute to be read.

T

the type of the object to bind to


@JvmName(name = "triggerReadFromUnit")
inline fun <Response, T> RemoteAttributeBinding.TriggerResponse<Unit, T>.triggerRead(bluetoothFormat: BluetoothFormat = BluetoothFormat, noinline unitBuilder: RemoteAttributeBinding.UnitReadBuilder.NonMutating<T, Response>.() -> Unit)

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

Parameters

bluetoothFormat

the BluetoothFormat to use for deserialization.

unitBuilder

sets up the response to a triggered read using a UnitReadBuilder.NonMutating

Type Parameters

Response

the type of Response that will be returned when the RemoteAttribute is read.

T

the type of the object to bind to