triggerNotification
fun triggerNotification(properties: Set<CharacteristicProperty.Notifiable> = setOf(CharacteristicProperty.Notify), encrypted: Boolean = false, toByteArray: Trigger.() -> ByteArray)
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.
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.
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