-
Notifications
You must be signed in to change notification settings - Fork 0
/
BluetoothRemoteGATTDescriptor.cljs
111 lines (78 loc) · 3.67 KB
/
BluetoothRemoteGATTDescriptor.cljs
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
(ns web.bluetooth.BluetoothRemoteGATTDescriptor
"The BluetoothRemoteGATTDescriptor interface of the Web Bluetooth
provides a GATT Descriptor, which provides further information
a characteristic’s value."
(:refer-clojure :exclude [uuid]))
(defn read-value
"Method.
The BluetoothRemoteGATTDescriptor.readValue() method returns
`js.Promise` that resolves to an `js.ArrayBuffer` holding a duplicate
the value property if it is available and supported. Otherwise
throws an error.
`BluetoothRemoteGATTDescriptor.readValue().then(function(value[]) { ... })`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTDescriptor/readValue`"
[this & args]
(-> this .-readValue (.apply this (clj->js args))))
(defn write-value
"Method.
The BluetoothRemoteGATTDescriptor.writeValue() method sets the
property to the bytes contained in an `js.ArrayBuffer` and returns
`js.Promise`.
`BluetoothRemoteGATTDescriptor.writeValue(array[]).then(function() { ... })`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTDescriptor/writeValue`"
[this & args]
(-> this .-writeValue (.apply this (clj->js args))))
(defn characteristic
"Property.
The BluetoothRemoteGATTDescriptor.characteristic read-only property
the `web.bluetooth.BluetoothRemoteGATTCharacteristic` this descriptor
to.
`var characteristic = BluetoothRemoteGATTCharacteristic.characteristic`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTDescriptor/characteristic`"
[this]
(-> this (.-characteristic)))
(defn set-characteristic!
"Property.
The BluetoothRemoteGATTDescriptor.characteristic read-only property
the `web.bluetooth.BluetoothRemoteGATTCharacteristic` this descriptor
to.
`var characteristic = BluetoothRemoteGATTCharacteristic.characteristic`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTDescriptor/characteristic`"
[this val]
(aset this "characteristic" val))
(defn uuid
"Property.
The BluetoothRemoteGATTDescriptor.uuid read-only property returns
UUID of the characteristic descriptor, for example '00002902-0000-1000-8000-00805f9b34fb'
theClient Characteristic Configuration descriptor.
`var uuid = BluetoothRemoteGATTDescriptor.uuid`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTDescriptor/uuid`"
[this]
(-> this (.-uuid)))
(defn set-uuid!
"Property.
The BluetoothRemoteGATTDescriptor.uuid read-only property returns
UUID of the characteristic descriptor, for example '00002902-0000-1000-8000-00805f9b34fb'
theClient Characteristic Configuration descriptor.
`var uuid = BluetoothRemoteGATTDescriptor.uuid`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTDescriptor/uuid`"
[this val]
(aset this "uuid" val))
(defn value
"Property.
The BluetoothRemoteGATTDescriptor.value read-only property returns
`js.ArrayBuffer` containing the currently cached descriptor value.
value gets updated when the value of the descriptor is read.
`var characteristic = BluetoothRemoteGATTDescriptor.characteristic`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTDescriptor/value`"
[this]
(-> this (.-value)))
(defn set-value!
"Property.
The BluetoothRemoteGATTDescriptor.value read-only property returns
`js.ArrayBuffer` containing the currently cached descriptor value.
value gets updated when the value of the descriptor is read.
`var characteristic = BluetoothRemoteGATTDescriptor.characteristic`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTDescriptor/value`"
[this val]
(aset this "value" val))