BluetoothRemoteGATTCharacteristic
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。
Web Bluetooth API の BluetoothRemoteGattCharacteristic インターフェイスは、GATT キャラクタリスティックを表します。これは、周辺機器のサービスに関する詳細情報を提供する基本的なデータ要素です。
インスタンスプロパティ
BluetoothRemoteGATTCharacteristic.service読取専用 Experimental-
このキャラクタリスティックが属する
BluetoothRemoteGATTServiceを返します。 BluetoothRemoteGATTCharacteristic.uuid読取専用 Experimental-
このキャラクタリスティックの UUID を表す文字列を返します。たとえば、Heart Rate Measurement characteristic は
'00002a37-0000-1000-8000-00805f9b34fb'です。 BluetoothRemoteGATTCharacteristic.properties読取専用 Experimental-
このキャラクタリスティックのプロパティを返します。
BluetoothRemoteGATTCharacteristic.value読取専用 Experimental-
現在キャッシュされているキャラクタリスティックの値です。この値は、キャラクタリスティックの値が読まれるか、ノーティフィケーションやインディケーションによって更新されると更新されます。
イベント
oncharacteristicvaluechangedExperimental-
characteristicvaluechangedイベント用のイベントハンドラーです。
インスタンスメソッド
BluetoothRemoteGATTCharacteristic.getDescriptor()Experimental-
指定のディスクリプター UUID に対応する最初の
BluetoothRemoteGATTDescriptorで解決するPromiseを返します。 BluetoothRemoteGATTCharacteristic.getDescriptors()Experimental-
指定のディスクリプター UUID に対応するすべての
BluetoothRemoteGATTDescriptorオブジェクトのArrayで解決するPromiseを返します。 BluetoothRemoteGATTCharacteristic.readValue()Experimental-
利用可能で対応していれば、
valueプロパティの複製が格納されたDataViewで解決するPromiseを返します。そうでない場合は、エラーを投げます。 BluetoothRemoteGATTCharacteristic.writeValue(value)非推奨;-
valueプロパティを渡されたArrayBufferに格納されたバイト列に設定し、WriteCharacteristicValue(this=this, value=value, response="optional") を呼び出し、結果のPromiseを返します。 BluetoothRemoteGATTCharacteristic.writeValueWithResponse(value)Experimental-
valueプロパティを渡されたArrayBufferに格納されたバイト列に設定し、WriteCharacteristicValue(this=this, value=value, response="required") を呼び出し、結果のPromiseを返します。 BluetoothRemoteGATTCharacteristic.writeValueWithoutResponse(value)Experimental-
valueプロパティを渡されたArrayBufferに格納されたバイト列に設定し、WriteCharacteristicValue(this=this, value=value, response="never") を呼び出し、結果のPromiseを返します。 BluetoothRemoteGATTCharacteristic.startNotifications()Experimental-
navigator.bluetoothが活動中のノーティフィケーションコンテキストに追加されたら解決するPromiseを返します。 BluetoothRemoteGATTCharacteristic.stopNotifications()Experimental-
navigator.bluetoothが活動中のノーティフィケーションコンテキストから削除されたら解決するPromiseを返します。
仕様書
| Specification |
|---|
| Web Bluetooth> # bluetoothgattcharacteristic-interface> |
ブラウザーの互換性
Loading…