forked from pauldemarco/flutter_blue
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbluetooth_descriptor.dart
More file actions
26 lines (21 loc) · 854 Bytes
/
bluetooth_descriptor.dart
File metadata and controls
26 lines (21 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright 2017, Paul DeMarco.
// All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
part of flutter_blue;
class BluetoothDescriptor {
static final Guid CCCD = new Guid("00002902-0000-1000-8000-00805f9b34fb");
final Guid uuid;
final Guid serviceUuid; // The service that this descriptor belongs to.
final Guid
characteristicUuid; // The characteristic that this descriptor belongs to.
List<int> value;
BluetoothDescriptor(
{@required this.uuid,
@required this.serviceUuid,
@required this.characteristicUuid});
BluetoothDescriptor.fromProto(protos.BluetoothDescriptor p)
: uuid = new Guid(p.uuid),
serviceUuid = new Guid(p.serviceUuid),
characteristicUuid = new Guid(p.characteristicUuid),
value = p.value;
}