BluetoothCharacteristicWindows constructor

BluetoothCharacteristicWindows({
  1. required DeviceIdentifier remoteId,
  2. required Guid serviceUuid,
  3. required Guid characteristicUuid,
  4. required List<BluetoothDescriptor> descriptors,
  5. required Properties propertiesWinBle,
  6. Guid? secondaryServiceUuid,
})

Implementation

BluetoothCharacteristicWindows({
  required this.remoteId,
  required this.serviceUuid,
  required this.characteristicUuid,
  required this.descriptors,
  required this.propertiesWinBle,
  this.secondaryServiceUuid,
}) : super.fromProto(
        BmBluetoothCharacteristic(
          remoteId: DeviceIdentifier(remoteId.str),
          serviceUuid: serviceUuid,
          secondaryServiceUuid: secondaryServiceUuid,
          characteristicUuid: characteristicUuid,
          descriptors: [
            for (final descriptor in descriptors)
              BmBluetoothDescriptor(
                remoteId: DeviceIdentifier(descriptor.remoteId.str),
                serviceUuid: descriptor.serviceUuid,
                characteristicUuid: descriptor.characteristicUuid,
                descriptorUuid: descriptor.uuid,
              ),
          ],
          properties: BmCharacteristicProperties(
            broadcast: propertiesWinBle.broadcast ?? false,
            read: propertiesWinBle.read ?? false,
            writeWithoutResponse:
                propertiesWinBle.writeWithoutResponse ?? false,
            write: propertiesWinBle.write ?? false,
            notify: propertiesWinBle.notify ?? false,
            indicate: propertiesWinBle.indicate ?? false,
            authenticatedSignedWrites:
                propertiesWinBle.authenticatedSignedWrites ?? false,
            // TODO: implementation missing
            extendedProperties: false,
            // TODO: implementation missing
            notifyEncryptionRequired: false,
            // TODO: implementation missing
            indicateEncryptionRequired: false,
          ),
        ),
      );