Skip to content

Conversation

@chengweih001
Copy link
Contributor

@chengweih001 chengweih001 commented Aug 4, 2025

Complete the algorithms for bluetooth.SimulateDescriptorResponse, bluetooth.DescriptorEventGenerated, and bluetooth.simulateDescriptor.


Preview | Diff

@reillyeon reillyeon self-requested a review August 4, 2025 22:50
index.bs Outdated
1. Set |params|[`"characteristicUuid"`] to |characteristic|'s <a>UUID</a>.
1. Set |params|[`"descriptorUuid"`] to |descriptor|'s <a>UUID</a>.
1. Set |params|[`"type"`] to |type|.
1. If |type| is `write`, set |params|[`"data"`] to a [=new=] {{Uint8Array}} wrapping a [=new=] {{ArrayBuffer}} containing |bytes|.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed this in the previous PR but since params isn't a WebIDL type I don't think using a Uint8Array is correct here. Isn't there a CDDL type we should be initializing for a byte array?

Copy link
Contributor Author

@chengweih001 chengweih001 Aug 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. Please see the latest patch.

I didn't find anything relative in CDDL spec, but I found one example in https://www.w3.org/TR/webdriver-bidi/#get-the-response-data (for how it populate headers field). I just followed it to init an empty array and populate the array with value.

@chengweih001 chengweih001 merged commit 4706ca3 into WebBluetoothCG:main Aug 5, 2025
2 checks passed
github-actions bot added a commit that referenced this pull request Aug 5, 2025
SHA: 4706ca3
Reason: push, by chengweih001

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Aug 5, 2025
SHA: 4706ca3
Reason: push, by chengweih001

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Aug 5, 2025
SHA: 4706ca3
Reason: push, by chengweih001

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Aug 5, 2025
SHA: 4706ca3
Reason: push, by chengweih001

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants