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
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!, #dev_handle=, #endpoint=, #free_buffer, #memory_type, #status, #submit!, #submit_and_wait, #submit_and_wait!, #timeout=
Constructor Details
#initialize(args = {}) ⇒ BulkStreamTransfer
Returns a new instance of BulkStreamTransfer.
275 276 277 278 279 280 |
# File 'lib/libusb/transfer.rb', line 275 def initialize(args={}) @transfer = Call::Transfer.new Call.libusb_alloc_transfer(0) @transfer[:type] = TRANSFER_TYPE_BULK_STREAM @transfer[:timeout] = 1000 super end |
Instance Method Details
#stream_id ⇒ Fixnum
Get a transfers bulk stream id.
Available since libusb-1.0.19.
295 296 297 |
# File 'lib/libusb/transfer.rb', line 295 def stream_id Call.libusb_transfer_get_stream_id(@transfer) end |
#stream_id=(v) ⇒ Object
Set a transfers bulk stream id.
285 286 287 288 |
# File 'lib/libusb/transfer.rb', line 285 def stream_id=(v) Call.libusb_transfer_set_stream_id(@transfer, v) v end |