Confirmed users
891
edits
| Line 164: | Line 164: | ||
; Description | ; Description | ||
: Read the characteristic value from the remote device. | : Read the characteristic value from the remote device. The cached value property will also be updated after retrieving the value. | ||
; | ; Return | ||
: A Promise to indicate whether the operation is resolved or rejected. | : A Promise to indicate whether the operation is resolved or rejected. The Promise is resolved along with the value retrieved from the remote device. | ||
=== writeValue(ArrayBuffer value) === | === writeValue(ArrayBuffer value) === | ||
| Line 181: | Line 179: | ||
; Return | ; Return | ||
: A Promise to indicate whether the operation is resolved or rejected. | : A Promise to indicate whether the operation is resolved or rejected. The Promise is resolved along with the characteristic value after this write operation. | ||
=== startNotifications() === | === startNotifications() === | ||
| Line 190: | Line 187: | ||
; Return | ; Return | ||
: A Promise to indicate whether the operation is resolved or rejected. | : A Promise to indicate whether the operation is resolved or rejected. The Promise is rejected if there is no Client Characteristic Configuration descriptor (CCCD) for this characteristic. | ||
=== stopNotifications() === | === stopNotifications() === | ||
| Line 199: | Line 195: | ||
; Return | ; Return | ||
: A Promise to indicate whether the operation is resolved or rejected. | : A Promise to indicate whether the operation is resolved or rejected. The Promise is rejected if there is no Client Characteristic Configuration descriptor (CCCD) for this characteristic. | ||
=== findDescriptor(DOMString uuid) === | === findDescriptor(DOMString uuid) === | ||
; Description | ; Description | ||
: The method finds a descriptor of this characteristic from the descriptors property by the given UUID. | : The method finds a descriptor of this characteristic from the descriptors property by the given UUID. When multiple descriptors with the same UUID exist, the first one is returned. | ||
; Parameters | ; Parameters | ||
| Line 214: | Line 208: | ||
; Return | ; Return | ||
: The first descriptor with the given uuid in descriptors property. | : The first descriptor with the given uuid in descriptors property. | ||
: A null pointer is returned if no descriptor is found by the given | : A null pointer is returned if no descriptor is found by the given UUID. | ||
; Sample | ; Sample | ||