read
Requests a read of the value of the attribute from the device and suspends until the value is received.
Return
the GattResponse.ReadResponse received from the device
suspend fun <T> read(deserializationStrategy: DeserializationStrategy<T>, bluetoothFormat: BluetoothFormat = BluetoothFormat): T
Requests a read of the a value of T of the attribute from the device and suspends until the value is received.
Return
the value of type T received from the device
Parameters
deserializationStrategy
the DeserializationStrategy to use to deserialize the value
bluetoothFormat
the BluetoothFormat to use to deserialize the value
Type Parameters
T
the type of the data object to read
Throws
if the read fails
Requests a read of the a value of T of the attribute from the device and suspends until the value is received.
Return
the value of type T received from the device
Parameters
bluetoothFormat
the BluetoothFormat to use to deserialize the value
Type Parameters
T
the type of the data object to read
Throws
if the read fails