- From: Jeffrey Yasskin via GitHub <sysbot+gh@w3.org>
- Date: Mon, 12 Oct 2015 22:56:09 +0000
- To: public-web-bluetooth-log@w3.org
It's definitely possible that some characteristics will be easier to use as a `UInt8Array`, in which case the author would need to write `new UInt8Array(view.buffer)` explicitly. Some characteristics may also store an array of 16- or 32-bit integers, but in those cases authors will need to use `DataView` over `UInt16Array` because they'll need to select the byte ordering of the remote data, rather than their platform's ordering. (Worse, most platforms are little-endian, which matches the common Bluetooth ordering, so if authors use `UInt16Array`, they'll get the right answers on their development machines but break on big-endian implementations ... if any of those exist.) I don't have data on this, but I expect the balance of convenience points toward returning `DataView`. -- GitHub Notif of comment by jyasskin See https://github.com/WebBluetoothCG/web-bluetooth/issues/172#issuecomment-147543684
Received on Monday, 12 October 2015 22:56:11 UTC