Notifiable

class Notifiable : LocalCharacteristic, FlowCollector<ByteArray>

A LocalCharacteristic that can be observed

Properties

Link copied to clipboard
open override val descriptors: List<LocalDescriptor>

The list of LocalDescriptor available for this characteristic

Link copied to clipboard

The set of Permission of this characteristic.

Link copied to clipboard
Link copied to clipboard
open override val service: LocalService
Link copied to clipboard

A StateFlow of all com.splendo.kaluga.bluetooth.ConnectedDevice that have subscribed to this LocalCharacteristic.Notifiable

Link copied to clipboard
open override val uuid: UUID
Link copied to clipboard

the com.splendo.kaluga.bluetooth.LocalCharacteristicWrapper to access the platform characteristic

Functions

Link copied to clipboard
open suspend override fun emit(value: ByteArray)
Link copied to clipboard
suspend fun notify(device: ConnectedDevice, value: ByteArray): Boolean

Notifies a com.splendo.kaluga.bluetooth.ConnectedDevice that that the data changed to value

inline suspend fun <Notification> notify(device: ConnectedDevice, notification: Notification, bluetoothFormat: BluetoothFormat = BluetoothFormat): Boolean
suspend fun <Notification> notify(device: ConnectedDevice, notification: Notification, toByteArray: Notification.() -> ByteArray): Boolean
suspend fun <Notification> notify(device: ConnectedDevice, notification: Notification, serializationStrategy: SerializationStrategy<Notification>, bluetoothFormat: BluetoothFormat = BluetoothFormat): Boolean

Notifies a com.splendo.kaluga.bluetooth.ConnectedDevice that that the data changed to notification

Link copied to clipboard
suspend fun notifyAll(value: ByteArray): Boolean

Notifies all com.splendo.kaluga.bluetooth.ConnectedDevice currently subscribed that that the data changed to value

inline suspend fun <Notification> notifyAll(notification: Notification, bluetoothFormat: BluetoothFormat = BluetoothFormat): Boolean
suspend fun <Notification> notifyAll(notification: Notification, toByteArray: Notification.() -> ByteArray): Boolean
suspend fun <Notification> notifyAll(notification: Notification, serializationStrategy: SerializationStrategy<Notification>, bluetoothFormat: BluetoothFormat = BluetoothFormat): Boolean

Notifies all com.splendo.kaluga.bluetooth.ConnectedDevice currently subscribed that that the data changed to notification