diff --git a/index.bs b/index.bs index 28bce08..9a6dcc1 100644 --- a/index.bs +++ b/index.bs @@ -5018,8 +5018,18 @@ referenced. ## Definitions ## {#bluetooth-bidi-definitions}
-bluetooth.BluetoothServiceUuid = text;
+bluetooth.BluetoothUuid = text;
bluetooth.BluetoothManufacturerData = { key: uint, data: tstr };
+bluetooth.CharacteristicProperties = {
+ ? broadcast: bool,
+ ? read: bool,
+ ? writeWithoutResponse: bool,
+ ? write: bool,
+ ? notify: bool,
+ ? indicate: bool,
+ ? authenticatedSignedWrites: bool,
+ ? extendedProperties: bool
+}
+bluetooth.SimulateService = (
+ method: "bluetooth.simulateService",
+ params: bluetooth.SimulateServiceParameters,
+)
+
+bluetooth.SimulateServiceParameters = {
+ context: text,
+ address: text,
+ uuid: bluetooth.BluetoothUuid,
+ type: "add" / "remove",
+}
+
+
+
+{
+ "method": "bluetooth.simulateService",
+ "params": {
+ "context": "cxt-d03fdd81",
+ "address": "09:09:09:09:09:09",
+ "uuid": "0000180d-0000-1000-8000-00805f9b34fb",
+ "type": "add"
+ }
+}
+
+
+{
+ "method": "bluetooth.simulateService",
+ "params": {
+ "context": "cxt-d03fdd81",
+ "address": "09:09:09:09:09:09",
+ "uuid": "0000180d-0000-1000-8000-00805f9b34fb",
+ "type": "remove"
+ }
+}
+
+
+bluetooth.SimulateCharacteristic = (
+ method: "bluetooth.simulateCharacteristic",
+ params: bluetooth.SimulateCharacteristicParameters,
+)
+
+bluetooth.SimulateCharacteristicParameters = {
+ context: text,
+ address: text,
+ serviceUuid: bluetooth.BluetoothUuid,
+ characteristicUuid: bluetooth.BluetoothUuid,
+ ? characteristicProperties: bluetooth.CharacteristicProperties,
+ type: "add" / "remove"
+}
+
+
+
+{
+ "method": "bluetooth.simulateCharacteristic",
+ "params": {
+ "context": "cxt-d03fdd81",
+ "address": "09:09:09:09:09:09",
+ "serviceUuid": "0000180d-0000-1000-8000-00805f9b34fb",
+ "characteristicUuid": "00002a21-0000-1000-8000-00805f9b34fb",
+ "characteristicProperties": {
+ "read": true,
+ "write": true,
+ "notify": true
+ },
+ "type": "add"
+ }
+}
+
+
+{
+ "method": "bluetooth.simulateCharacteristic",
+ "params": {
+ "context": "cxt-d03fdd81",
+ "address": "09:09:09:09:09:09",
+ "serviceUuid": "0000180d-0000-1000-8000-00805f9b34fb",
+ "characteristicUuid": "00002a21-0000-1000-8000-00805f9b34fb",
+ "type": "remove"
+ }
+}
+
+
+bluetooth.SimulateCharacteristicResponse = (
+ method: "bluetooth.simulateCharacteristicResponse",
+ params: bluetooth.SimulateCharacteristicResponseParameters,
+)
+
+bluetooth.SimulateCharacteristicResponseParameters = {
+ context: text,
+ address: text,
+ serviceUuid: bluetooth.BluetoothUuid,
+ characteristicUuid: bluetooth.BluetoothUuid,
+ type: "read" / "write" / "subscribe-to-notifications" / "unsubscribe-from-notifications",
+ code: uint
+}
+
+
+
+{
+ "method": "bluetooth.simulateCharacteristicResponse",
+ "params": {
+ "context": "cxt-d03fdd81",
+ "address": "09:09:09:09:09:09",
+ "serviceUuid": "0000180d-0000-1000-8000-00805f9b34fb",
+ "characteristicUuid": "00002a21-0000-1000-8000-00805f9b34fb",
+ "type": "read",
+ "code": 0
+ }
+}
+
+
+bluetooth.SimulateDescriptor = (
+ method: "bluetooth.simulateDescriptor",
+ params: bluetooth.SimulateDescriptorParameters,
+)
+
+bluetooth.SimulateDescriptorParameters = {
+ context: text,
+ address: text,
+ serviceUuid: bluetooth.BluetoothUuid,
+ characteristicUuid: bluetooth.BluetoothUuid,
+ descriptorUuid: bluetooth.BluetoothUuid,
+ type: "add" / "remove"
+}
+
+
+
+{
+ "method": "bluetooth.simulateDescriptor",
+ "params": {
+ "context": "cxt-d03fdd81",
+ "address": "09:09:09:09:09:09",
+ "serviceUuid": "0000180d-0000-1000-8000-00805f9b34fb",
+ "characteristicUuid": "00002a21-0000-1000-8000-00805f9b34fb",
+ "descriptorUuid": "00002901-0000-1000-8000-00805f9b34fb",
+ "type": "add"
+ }
+}
+
+
+{
+ "method": "bluetooth.simulateDescriptor",
+ "params": {
+ "context": "cxt-d03fdd81",
+ "address": "09:09:09:09:09:09",
+ "serviceUuid": "0000180d-0000-1000-8000-00805f9b34fb",
+ "characteristicUuid": "00002a21-0000-1000-8000-00805f9b34fb",
+ "descriptorUuid": "00002901-0000-1000-8000-00805f9b34fb",
+ "type": "remove"
+ }
+}
+
+
+bluetooth.SimulateDescriptorResponse = (
+ method: "bluetooth.simulateDescriptorResponse",
+ params: bluetooth.SimulateDescriptorResponseParameters,
+)
+
+bluetooth.SimulateDescriptorResponseParameters = {
+ context: text,
+ address: text,
+ serviceUuid: bluetooth.BluetoothUuid,
+ characteristicUuid: bluetooth.BluetoothUuid,
+ descriptorUuid: bluetooth.BluetoothUuid,
+ type: "read" / "write",
+ code: uint
+}
+
+
+
+{
+ "method": "bluetooth.simulateDescriptorResponse",
+ "params": {
+ "context": "cxt-d03fdd81",
+ "address": "09:09:09:09:09:09",
+ "serviceUuid": "0000180d-0000-1000-8000-00805f9b34fb",
+ "characteristicUuid": "00002a21-0000-1000-8000-00805f9b34fb",
+ "descriptorUuid": "00002901-0000-1000-8000-00805f9b34fb",
+ "type": "read",
+ "code": 0
+ }
+}
+
+
+bluetooth.CharacteristicEventGenerated = (
+ method: "bluetooth.characteristicEventGenerated",
+ params: bluetooth.CharacteristicEventGeneratedParameters
+)
+
+bluetooth.CharacteristicEventGeneratedParameters = {
+ context: text,
+ address: text,
+ serviceUuid: bluetooth.BluetoothUuid,
+ characteristicUuid: bluetooth.BluetoothUuid,
+ type: "read" / "write-with-response" / "write-without-response" / "subscribe-to-notifications" / "unsubscribe-from-notifications",
+ ? data: [ * uint ]
+}
+
+
+
+bluetooth.DescriptorEventGenerated = (
+ method: "bluetooth.descriptorEventGenerated",
+ params: bluetooth.DescriptorEventGeneratedParameters
+)
+
+bluetooth.DescriptorEventGeneratedParameters = {
+ context: text,
+ address: text,
+ serviceUuid: bluetooth.BluetoothUuid,
+ characteristicUuid: bluetooth.BluetoothUuid,
+ descriptorUuid: bluetooth.BluetoothUuid,
+ type: "read" / "write",
+ ? data: [ * uint ]
+}
+
+
+