USBOutTransferResult
Khả dụng hạn chế
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Note: This feature is available in Web Workers.
Giao diện USBOutTransferResult của WebUSB API cung cấp kết quả từ lệnh gọi các phương thức transferOut() và controlTransferOut() của giao diện USBDevice. Nó đại diện cho kết quả từ yêu cầu truyền dữ liệu từ USB host đến thiết bị USB.
Hàm khởi tạo
USBOutTransferResult()Thử nghiệm-
Tạo một đối tượng
USBOutTransferResultmới với các trườngstatusvàbytesWrittenđược cung cấp.
Thuộc tính phiên bản
USBOutTransferResult.bytesWrittenRead only Thử nghiệm-
Trả về số byte từ yêu cầu truyền đã được gửi đến thiết bị.
USBOutTransferResult.statusRead only Thử nghiệm-
Trả về trạng thái của yêu cầu truyền, một trong:
"ok"- Truyền thành công."stall"- Thiết bị chỉ ra lỗi bằng cách tạo điều kiện stall trên endpoint. Stall trên endpoint bulk hoặc interrupt phải được xóa bằng cách gọiclearHalt()trước khitransferOut()có thể được gọi lại.
Thông số kỹ thuật
| Thông số kỹ thuật |
|---|
| WebUSB API> # usbouttransferresult> |