Skip to content

Commit 13b9616

Browse files
Add optional data field for characteristic and descriptor read operation simulation (#657)
SHA: f41724b Reason: push, by chengweih001 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent a51bacd commit 13b9616

1 file changed

Lines changed: 16 additions & 12 deletions

File tree

index.html

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<link href="https://www.w3.org/StyleSheets/TR/2021/cg-draft" rel="stylesheet">
88
<meta content="Bikeshed version b25686b9f, updated Fri Mar 14 14:15:20 2025 -0700" name="generator">
99
<link href="https://webbluetoothcg.github.io/web-bluetooth/" rel="canonical">
10-
<meta content="bf09eed77f58ce29d742bff3ca9172f4af1f65d5" name="revision">
10+
<meta content="f41724b9313788ddfde0f1c722c9ac5e29bc1771" name="revision">
1111
<meta content="dark light" name="color-scheme">
1212
<link href="https://www.w3.org/StyleSheets/TR/2021/dark.css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css">
1313
<style>
@@ -1010,7 +1010,7 @@
10101010
<div class="head">
10111011
<p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2021/logos/W3C" width="72"> </a> </p>
10121012
<h1 class="p-name no-ref" id="title">Web Bluetooth</h1>
1013-
<p id="w3c-state"><a href="https://www.w3.org/standards/types/#CG-DRAFT">Draft Community Group Report</a>, <time class="dt-updated" datetime="2025-05-06">6 May 2025</time></p>
1013+
<p id="w3c-state"><a href="https://www.w3.org/standards/types/#CG-DRAFT">Draft Community Group Report</a>, <time class="dt-updated" datetime="2025-05-13">13 May 2025</time></p>
10141014
<details open>
10151015
<summary>More details about this document</summary>
10161016
<div data-fill-with="spec-metadata">
@@ -5988,15 +5988,16 @@ <h5 class="heading settled" data-level="12.2.3.10" id="bluetooth-simulatecharact
59885988
<c- s>serviceUuid</c-><c- p>:</c-> <c- nc>bluetooth.BluetoothUuid</c-><c- p>,</c->
59895989
<c- s>characteristicUuid</c-><c- p>:</c-> <c- nc>bluetooth.BluetoothUuid</c-><c- p>,</c->
59905990
<c- s>type</c-><c- p>:</c-> <c- u>"read"</c-> <c- o>/</c-> <c- u>"write"</c-> <c- o>/</c-> <c- u>"subscribe-to-notifications"</c-> <c- o>/</c-> <c- u>"unsubscribe-from-notifications"</c-><c- p>,</c->
5991-
<c- s>code</c-><c- p>:</c-> uint
5991+
<c- s>code</c-><c- p>:</c-> uint<c- p>,</c->
5992+
<c- o>?</c-> <c- s>data</c-><c- p>:</c-> <c- p>[</c-> <c- o>*</c-> uint <c- p>]</c->
59925993
<c- p>}</c->
59935994
</pre>
59945995
<div class="algorithm" data-algorithm="remote end steps for bluetooth.simulateCharacteristicResponse">
59955996
<p class="issue" id="issue-fe8e308f"><a class="self-link" href="#issue-fe8e308f"></a> TODO: Finish the algorithm of bluetooth.simulateCharacteristicResponse.</p>
59965997
</div>
5997-
<div class="example" id="example-cb26d94d">
5998-
<a class="self-link" href="#example-cb26d94d"></a> A <a data-link-type="dfn" href="https://w3c.github.io/webdriver/#dfn-local-ends" id="ref-for-dfn-local-ends①②">local end</a> could simulate a response of success (error code <code>0x00</code> according to <a data-link-type="dfn" href="#error-response" id="ref-for-error-response①">Error Response</a>)
5999-
for a characteristic read operation by sending the following message:
5998+
<div class="example" id="example-9089acd4">
5999+
<a class="self-link" href="#example-9089acd4"></a> A <a data-link-type="dfn" href="https://w3c.github.io/webdriver/#dfn-local-ends" id="ref-for-dfn-local-ends①②">local end</a> could simulate a response of success (error code <code>0x00</code> according to <a data-link-type="dfn" href="#error-response" id="ref-for-error-response①">Error Response</a>)
6000+
with data for a characteristic read operation by sending the following message:
60006001
<pre class="highlight"><c- p>{</c->
60016002
<c- f>"method"</c-><c- p>:</c-> <c- u>"bluetooth.simulateCharacteristicResponse"</c-><c- p>,</c->
60026003
<c- f>"params"</c-><c- p>:</c-> <c- p>{</c->
@@ -6005,7 +6006,8 @@ <h5 class="heading settled" data-level="12.2.3.10" id="bluetooth-simulatecharact
60056006
<c- f>"serviceUuid"</c-><c- p>:</c-> <c- u>"0000180d-0000-1000-8000-00805f9b34fb"</c-><c- p>,</c->
60066007
<c- f>"characteristicUuid"</c-><c- p>:</c-> <c- u>"00002a21-0000-1000-8000-00805f9b34fb"</c-><c- p>,</c->
60076008
<c- f>"type"</c-><c- p>:</c-> <c- u>"read"</c-><c- p>,</c->
6008-
<c- f>"code"</c-><c- p>:</c-> <c- mi>0</c->
6009+
<c- f>"code"</c-><c- p>:</c-> <c- mi>0</c-><c- p>,</c->
6010+
<c- f>"data"</c-><c- p>:</c-> <c- p>[</c-><c- mi>1</c-><c- p>,</c-> <c- mi>2</c-><c- p>]</c->
60096011
<c- p>}</c->
60106012
<c- p>}</c->
60116013
</pre>
@@ -6071,15 +6073,16 @@ <h5 class="heading settled" data-level="12.2.3.12" id="bluetooth-simulatedescrip
60716073
<c- s>characteristicUuid</c-><c- p>:</c-> <c- nc>bluetooth.BluetoothUuid</c-><c- p>,</c->
60726074
<c- s>descriptorUuid</c-><c- p>:</c-> <c- nc>bluetooth.BluetoothUuid</c-><c- p>,</c->
60736075
<c- s>type</c-><c- p>:</c-> <c- u>"read"</c-> <c- o>/</c-> <c- u>"write"</c-><c- p>,</c->
6074-
<c- s>code</c-><c- p>:</c-> uint
6076+
<c- s>code</c-><c- p>:</c-> uint<c- p>,</c->
6077+
<c- o>?</c-> <c- s>data</c-><c- p>:</c-> <c- p>[</c-> <c- o>*</c-> uint <c- p>]</c->
60756078
<c- p>}</c->
60766079
</pre>
60776080
<div class="algorithm" data-algorithm="remote end steps for bluetooth.simulateDescriptorResponse">
60786081
<p class="issue" id="issue-820c7611"><a class="self-link" href="#issue-820c7611"></a> TODO: Finish the algorithm of bluetooth.simulateDescriptorResponse.</p>
60796082
</div>
6080-
<div class="example" id="example-e668027f">
6081-
<a class="self-link" href="#example-e668027f"></a> A <a data-link-type="dfn" href="https://w3c.github.io/webdriver/#dfn-local-ends" id="ref-for-dfn-local-ends①⑤">local end</a> could simulate a response of success (error code <code>0x00</code> according to <a data-link-type="dfn" href="#error-response" id="ref-for-error-response②">Error Response</a>)
6082-
for a descriptor read operation by sending the following message:
6083+
<div class="example" id="example-05504ca3">
6084+
<a class="self-link" href="#example-05504ca3"></a> A <a data-link-type="dfn" href="https://w3c.github.io/webdriver/#dfn-local-ends" id="ref-for-dfn-local-ends①⑤">local end</a> could simulate a response of success (error code <code>0x00</code> according to <a data-link-type="dfn" href="#error-response" id="ref-for-error-response②">Error Response</a>)
6085+
with data for a descriptor read operation by sending the following message:
60836086
<pre class="highlight"><c- p>{</c->
60846087
<c- f>"method"</c-><c- p>:</c-> <c- u>"bluetooth.simulateDescriptorResponse"</c-><c- p>,</c->
60856088
<c- f>"params"</c-><c- p>:</c-> <c- p>{</c->
@@ -6089,7 +6092,8 @@ <h5 class="heading settled" data-level="12.2.3.12" id="bluetooth-simulatedescrip
60896092
<c- f>"characteristicUuid"</c-><c- p>:</c-> <c- u>"00002a21-0000-1000-8000-00805f9b34fb"</c-><c- p>,</c->
60906093
<c- f>"descriptorUuid"</c-><c- p>:</c-> <c- u>"00002901-0000-1000-8000-00805f9b34fb"</c-><c- p>,</c->
60916094
<c- f>"type"</c-><c- p>:</c-> <c- u>"read"</c-><c- p>,</c->
6092-
<c- f>"code"</c-><c- p>:</c-> <c- mi>0</c->
6095+
<c- f>"code"</c-><c- p>:</c-> <c- mi>0</c-><c- p>,</c->
6096+
<c- f>"data"</c-><c- p>:</c-> <c- p>[</c-><c- mi>1</c-><c- p>,</c-> <c- mi>2</c-><c- p>]</c->
60936097
<c- p>}</c->
60946098
<c- p>}</c->
60956099
</pre>

0 commit comments

Comments
 (0)