startWrite

Creates and emits a DeviceAction.Write.Characteristic using the given writeType

Return

the DeviceAction.Write.Characteristic created

Parameters

newValue

the ByteArray to write

writeType

the WriteType to use


fun <T> startWrite(serializationStrategy: SerializationStrategy<T>, bluetoothFormat: BluetoothFormat = BluetoothFormat, newValue: T, writeType: WriteType): DeviceAction.Write.Characteristic

Creates and emits a DeviceAction.Write.Characteristic to write a given T using the given writeType

Return

the DeviceAction.Write.Characteristic created

Parameters

serializationStrategy

the SerializationStrategy to use to serialize the value.

bluetoothFormat

the BluetoothFormat to use to serialize the value.

newValue

the T to write to the characteristic

writeType

the WriteType to use

Type Parameters

T

the type of the data object to write.


inline fun <T> startWrite(bluetoothFormat: BluetoothFormat = BluetoothFormat, newValue: T, writeType: WriteType): DeviceAction.Write.Characteristic

Creates and emits a DeviceAction.Write.Characteristic to write a given T using the given writeType

Return

the DeviceAction.Write.Characteristic created

Parameters

bluetoothFormat

the BluetoothFormat to use to serialize the value.

newValue

the T to write to the characteristic

writeType

the WriteType to use

Type Parameters

T

the type of the data object to write.