readDescriptor method

Future<DescriptorWithValue> readDescriptor(
  1. String serviceUuid,
  2. String characteristicUuid,
  3. String descriptorUuid, {
  4. String? transactionId,
})

Reads value of Descriptor matching specified UUIDs.

Returns Descriptor object matching specified serviceUuid, characteristicUuid and descriptorUuid. Latest value of the descriptor will be stored inside returned object. Optional transactionId could be used to cancel operation.

Will result in error if discovery was not done during this connection.

Implementation

Future<DescriptorWithValue> readDescriptor(
  String serviceUuid,
  String characteristicUuid,
  String descriptorUuid, {
  String? transactionId,
}) =>
    _manager.readDescriptorForPeripheral(
      this,
      serviceUuid,
      characteristicUuid,
      descriptorUuid,
      transactionId ?? TransactionIdGenerator.getNextId(),
    );