notifyAll

suspend fun notifyAll(value: ByteArray): Boolean

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

Return

true if the notification was successfully sent to all com.splendo.kaluga.bluetooth.server.ConnectedDevice, false otherwise

Parameters

value

the new data


suspend fun <Notification> notifyAll(notification: Notification, toByteArray: Notification.() -> ByteArray): Boolean

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

Return

true if the notification was successfully sent to all com.splendo.kaluga.bluetooth.server.ConnectedDevice, false otherwise

Parameters

notification

the new data

toByteArray

method to convert the Notification to a ByteArray

Type Parameters

Notification

the type of the data to notify


suspend fun <Notification> notifyAll(notification: Notification, serializationStrategy: SerializationStrategy<Notification>, bluetoothFormat: BluetoothFormat = BluetoothFormat): Boolean

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

Return

true if the notification was successfully sent to all com.splendo.kaluga.bluetooth.server.ConnectedDevice, false otherwise

Parameters

notification

the new data

serializationStrategy

the SerializationStrategy to use to encode the Notification to a ByteArray

bluetoothFormat

the BluetoothFormat to use to encode the Notification to a ByteArray

Type Parameters

Notification

the type of the data to notify


inline suspend fun <Notification> notifyAll(notification: Notification, bluetoothFormat: BluetoothFormat = BluetoothFormat): Boolean

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

Return

true if the notification was successfully sent to all com.splendo.kaluga.bluetooth.server.ConnectedDevice, false otherwise

Parameters

notification

the new data

bluetoothFormat

the BluetoothFormat to use to encode the Notification to a ByteArray

Type Parameters

Notification

the type of the data to notify