BluetoothEmulation🧪
该域允许配置虚拟蓝牙设备以测试''web-bluetooth API''。
EN
This domain allows configuring virtual Bluetooth devices to test the web-bluetooth API.
✅️️ Methods
🔨BluetoothEmulation.addCharacteristic
向由|serviceId|表示的服务添加一个具有|characteristicUuid|和|properties|特性的特征。
EN
Adds a characteristic with |characteristicUuid| and |properties| to the service represented by |serviceId|.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| serviceId | ✔️ | string | |||
| characteristicUuid | ✔️ | string | |||
| properties | ✔️ | CharacteristicProperties |
| 返回对象 | 类型 | 描述 | 原文 |
|---|---|---|---|
| characteristicId | string | 一个唯一标识此特征的标识符。 | ENAn identifier that uniquely represents this characteristic. |
🔨BluetoothEmulation.addDescriptor
向由 |characteristicId| 表示的特性添加一个具有 |descriptorUuid| 的描述符。
EN
Adds a descriptor with |descriptorUuid| to the characteristic respresented by |characteristicId|.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| characteristicId | ✔️ | string | |||
| descriptorUuid | ✔️ | string |
| 返回对象 | 类型 | 描述 | 原文 |
|---|---|---|---|
| descriptorId | string | 一个唯一标识此描 述符的标识符。 | ENAn identifier that uniquely represents this descriptor. |
🔨BluetoothEmulation.addService
将带有 |serviceUuid| 的服务添加到地址为 |address| 的外围设备中。
EN
Adds a service with |serviceUuid| to the peripheral with |address|.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| address | ✔️ | string | |||
| serviceUuid | ✔️ | string |
| 返回对象 | 类型 | 描述 | 原文 |
|---|---|---|---|
| serviceId | string | 唯一标识此服务的标识符。 | ENAn identifier that uniquely represents this service. |