BluetoothRemoteGATTDescriptor

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

Giao diện BluetoothRemoteGATTDescriptor của Web Bluetooth API cung cấp một bộ mô tả GATT, dùng để cung cấp thêm thông tin về giá trị của một đặc tính.

Thuộc tính thể hiện

BluetoothRemoteGATTDescriptor.characteristic Read only Experimental

Trả về BluetoothRemoteGATTCharacteristic mà bộ mô tả này thuộc về.

BluetoothRemoteGATTDescriptor.uuid Read only Experimental

Trả về UUID của bộ mô tả đặc tính, ví dụ "00002902-0000-1000-8000-00805f9b34fb" cho bộ mô tả Client Characteristic Configuration.

BluetoothRemoteGATTDescriptor.value Read only Experimental

Trả về giá trị bộ mô tả hiện đang được lưu trong bộ nhớ đệm. Giá trị này được cập nhật khi giá trị của bộ mô tả được đọc.

Phương thức thể hiện

BluetoothRemoteGATTDescriptor.readValue() Experimental

Trả về một Promise hoàn tất với một ArrayBuffer chứa một bản sao của thuộc tính value nếu có sẵn và được hỗ trợ. Nếu không, nó sẽ ném ra lỗi.

BluetoothRemoteGATTDescriptor.writeValue() Experimental

Đặt thuộc tính value thành các byte chứa trong một ArrayBuffer và trả về một Promise.

Thông số kỹ thuật

Specification
Web Bluetooth
# bluetoothgattdescriptor-interface

Tương thích trình duyệt