NotificationDSL

Sets up notification to notify all com.splendo.kaluga.bluetooth.ConnectedDevice of changes to this LocalCharacteristic whenever a Trigger fires

Type Parameters

Trigger

the type of the Trigger that will cause the notification.

Properties

Functions

Link copied to clipboard
fun triggerNotification(properties: Set<CharacteristicProperty.Notifiable> = setOf(CharacteristicProperty.Notify), encrypted: Boolean = false, toByteArray: Trigger.() -> ByteArray)
fun triggerNotification(properties: Set<CharacteristicProperty.Notifiable> = setOf(CharacteristicProperty.Notify), encrypted: Boolean = false, serializationStrategy: SerializationStrategy<Trigger>, bluetoothFormat: BluetoothFormat = BluetoothFormat)

Makes this LocalCharacteristic a LocalCharacteristic.Notifiable and automatically sends a ByteArray notification upon Trigger This method can only be called once.

Link copied to clipboard
fun LocalCharacteristic.DSL.NotificationDSL<ByteArray>.triggerNotification(properties: Set<CharacteristicProperty.Notifiable> = setOf(CharacteristicProperty.Notify), encrypted: Boolean = false)

Makes this LocalCharacteristic a LocalCharacteristic.Notifiable and automatically sends the ByteArray as a notification This method can only be called once.

inline fun <Trigger> LocalCharacteristic.DSL.NotificationDSL<Trigger>.triggerNotification(properties: Set<CharacteristicProperty.Notifiable> = setOf(CharacteristicProperty.Notify), encrypted: Boolean = false, bluetoothFormat: BluetoothFormat = BluetoothFormat)

Makes this LocalCharacteristic a LocalCharacteristic.Notifiable and automatically sends a ByteArray notification upon Trigger This method can only be called once.