readableAlwaysSuccess
Makes this LocalCharacteristic readable by a com.splendo.kaluga.bluetooth.ConnectedDevice to always return GattResponse.ReadSuccess Cannot be called if readable, or readableAlwaysSuccess has been called before
Parameters
true if reading from the characteristic should be encrypted. This will result in Permission.READ_ENCRYPTION_REQUIRED. Otherwise will add Permission.READABLE
the function to call when reading from the characteristic. This contains the com.splendo.kaluga.bluetooth.ConnectedDevice and the offset of the data to read and should return the ByteArray being read.
Makes this LocalCharacteristic readable by a com.splendo.kaluga.bluetooth.ConnectedDevice to always return GattResponse.ReadSuccess Cannot be called if readable, or readableAlwaysSuccess has been called before
Parameters
true if reading from the characteristic should be encrypted. This will result in Permission.READ_ENCRYPTION_REQUIRED. Otherwise will add Permission.READABLE
the BluetoothFormat to use to encode the T to a ByteArray
the function to call when reading from the characteristic. This contains the com.splendo.kaluga.bluetooth.ConnectedDevice and the offset of the data to read and should return the T being read.
Type Parameters
the type of the data being read