triggerNotification

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.

Parameters

properties

the CharacteristicProperty.Notifiable of the characteristic. Must not be empty

encrypted

true if subscribing to the characteristic should be encrypted.


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.

Parameters

properties

the CharacteristicProperty.Notifiable of the characteristic. Must not be empty

encrypted

true if subscribing to the characteristic should be encrypted.

bluetoothFormat

the BluetoothFormat to use to encode the Trigger to a ByteArray

Type Parameters

Trigger

the type of the data being collected