valueOrNull
fun <T> Flow<RemoteCharacteristic?>.valueOrNull(deserializationStrategy: DeserializationStrategy<T>, bluetoothFormat: BluetoothFormat = BluetoothFormat): Flow<T?>
Gets a (Flow of) T value from a Flow of an RemoteCharacteristic or null if data is unavailable This method will automatically subscribe/unsubscribe to the RemoteCharacteristic when the Flow is collected
Return
the Flow of the T value of the RemoteCharacteristic in the given Flow or null if data is unavailable
Parameters
bluetoothFormat
the BluetoothFormat to use to deserialize the ByteArray to T
Type Parameters
T
the type of the data to receive
inline fun <T> Flow<RemoteCharacteristic?>.valueOrNull(bluetoothFormat: BluetoothFormat = BluetoothFormat): Flow<T?>
Gets a (Flow of) T value from a Flow of an RemoteCharacteristic This method will automatically subscribe/unsubscribe to the RemoteCharacteristic when the Flow is collected
Return
the Flow of the T value of the RemoteCharacteristic in the given Flow
Parameters
bluetoothFormat
the BluetoothFormat to use to deserialize the ByteArray to T
Type Parameters
T
the type of the data to receive