Skip to content

Commit f41724b

Browse files
authored
Add optional data field for characteristic and descriptor read operation simulation (#657)
1 parent bf09eed commit f41724b

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

index.bs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5791,7 +5791,8 @@ bluetooth.SimulateCharacteristicResponseParameters = {
57915791
serviceUuid: bluetooth.BluetoothUuid,
57925792
characteristicUuid: bluetooth.BluetoothUuid,
57935793
type: "read" / "write" / "subscribe-to-notifications" / "unsubscribe-from-notifications",
5794-
code: uint
5794+
code: uint,
5795+
? data: [ * uint ]
57955796
}
57965797
</pre>
57975798

@@ -5803,7 +5804,7 @@ Issue: TODO: Finish the algorithm of bluetooth.simulateCharacteristicResponse.
58035804

58045805
<div class="example">
58055806
A [=local end=] could simulate a response of success (error code `0x00` according to <a>Error Response</a>)
5806-
for a characteristic read operation by sending the following message:
5807+
with data for a characteristic read operation by sending the following message:
58075808

58085809
<pre highlight="json">
58095810
{
@@ -5814,7 +5815,8 @@ for a characteristic read operation by sending the following message:
58145815
"serviceUuid": "0000180d-0000-1000-8000-00805f9b34fb",
58155816
"characteristicUuid": "00002a21-0000-1000-8000-00805f9b34fb",
58165817
"type": "read",
5817-
"code": 0
5818+
"code": 0,
5819+
"data": [1, 2]
58185820
}
58195821
}
58205822
</pre>
@@ -5895,7 +5897,8 @@ bluetooth.SimulateDescriptorResponseParameters = {
58955897
characteristicUuid: bluetooth.BluetoothUuid,
58965898
descriptorUuid: bluetooth.BluetoothUuid,
58975899
type: "read" / "write",
5898-
code: uint
5900+
code: uint,
5901+
? data: [ * uint ]
58995902
}
59005903
</pre>
59015904

@@ -5907,7 +5910,7 @@ Issue: TODO: Finish the algorithm of bluetooth.simulateDescriptorResponse.
59075910

59085911
<div class="example">
59095912
A [=local end=] could simulate a response of success (error code `0x00` according to <a>Error Response</a>)
5910-
for a descriptor read operation by sending the following message:
5913+
with data for a descriptor read operation by sending the following message:
59115914

59125915
<pre highlight="json">
59135916
{
@@ -5919,7 +5922,8 @@ for a descriptor read operation by sending the following message:
59195922
"characteristicUuid": "00002a21-0000-1000-8000-00805f9b34fb",
59205923
"descriptorUuid": "00002901-0000-1000-8000-00805f9b34fb",
59215924
"type": "read",
5922-
"code": 0
5925+
"code": 0,
5926+
"data": [1, 2]
59235927
}
59245928
}
59255929
</pre>

0 commit comments

Comments
 (0)