Class: LIBUSB::BulkStreamTransfer
- Defined in:
- lib/libusb/transfer.rb
Overview
Transfer class for USB bulk transfers using USB-3.0 streams.
Available since libusb-1.0.19.
Constant Summary
Constants inherited from Transfer
Transfer::TransferStatusToError
Instance Attribute Summary
Attributes inherited from Transfer
#allow_device_memory, #dev_handle
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ BulkStreamTransfer
constructor
A new instance of BulkStreamTransfer.
-
#stream_id ⇒ Fixnum
Get a transfers bulk stream id.
-
#stream_id=(v) ⇒ Object
Set a transfers bulk stream id.
Methods inherited from Transfer
#actual_buffer, #actual_length, #alloc_buffer, #buffer, #buffer=, #callback=, #cancel!, #endpoint=, #free_buffer, #memory_type, #status, #submit!, #submit_and_wait, #submit_and_wait!, #timeout, #timeout=
Constructor Details
#initialize(args = {}) ⇒ BulkStreamTransfer
Returns a new instance of BulkStreamTransfer.
304 305 306 307 308 309 |
# File 'lib/libusb/transfer.rb', line 304 def initialize(args={}) @transfer = Call::Transfer.new Call.libusb_alloc_transfer(0) @transfer[:type] = TRANSFER_TYPE_BULK_STREAM @transfer[:timeout] = 1000 super end |
Class Method Details
.new ⇒ Object
300 301 302 |
# File 'lib/libusb/transfer.rb', line 300 def self.new(*) super end |
Instance Method Details
#stream_id ⇒ Fixnum
Get a transfers bulk stream id.
Available since libusb-1.0.19.
324 325 326 |
# File 'lib/libusb/transfer.rb', line 324 def stream_id Call.libusb_transfer_get_stream_id(@transfer) end |
#stream_id=(v) ⇒ Object
Set a transfers bulk stream id.
314 315 316 317 |
# File 'lib/libusb/transfer.rb', line 314 def stream_id=(v) Call.libusb_transfer_set_stream_id(@transfer, v) v end |