Class: LIBUSB::SsCompanion
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- LIBUSB::SsCompanion
- Defined in:
- lib/libusb/ss_companion.rb
Overview
A structure representing the superspeed endpoint companion descriptor.
This descriptor is documented in section 9.6.7 of the USB 3.0 specification. All multiple-byte fields are represented in host-endian format.
Instance Method Summary collapse
-
#bDescriptorType ⇒ Object
Descriptor type.
-
#bLength ⇒ Object
Size of this descriptor (in bytes).
-
#bmAttributes ⇒ Object
In bulk EP: bits 4:0 represents the maximum number of streams the EP supports.
-
#bMaxBurst ⇒ Object
The maximum number of packets the endpoint can send or recieve as part of a burst.
-
#initialize(ctx, *args) ⇒ SsCompanion
constructor
A new instance of SsCompanion.
- #inspect ⇒ Object
-
#wBytesPerInterval ⇒ Object
The total number of bytes this EP will transfer every service interval.
Constructor Details
#initialize(ctx, *args) ⇒ SsCompanion
Returns a new instance of SsCompanion.
31 32 33 34 35 |
# File 'lib/libusb/ss_companion.rb', line 31 def initialize(ctx, *args) super(*args) register_context(ctx, :libusb_free_ss_endpoint_companion_descriptor) end |
Instance Method Details
#bDescriptorType ⇒ Object
Descriptor type.
Will have value LIBUSB::DT_SS_ENDPOINT_COMPANION in this context.
45 46 47 |
# File 'lib/libusb/ss_companion.rb', line 45 def bDescriptorType self[:bDescriptorType] end |
#bLength ⇒ Object
Size of this descriptor (in bytes)
38 39 40 |
# File 'lib/libusb/ss_companion.rb', line 38 def bLength self[:bLength] end |
#bmAttributes ⇒ Object
In bulk EP: bits 4:0 represents the maximum number of streams the EP supports.
In isochronous EP: bits 1:0 represents the Mult - a zero based value that determines the maximum number of packets within a service interval
57 58 59 |
# File 'lib/libusb/ss_companion.rb', line 57 def bmAttributes self[:bmAttributes] end |
#bMaxBurst ⇒ Object
The maximum number of packets the endpoint can send or recieve as part of a burst.
50 51 52 |
# File 'lib/libusb/ss_companion.rb', line 50 def bMaxBurst self[:bMaxBurst] end |
#inspect ⇒ Object
68 69 70 |
# File 'lib/libusb/ss_companion.rb', line 68 def inspect "\#<#{self.class} burst: #{bMaxBurst} attrs: #{bmAttributes}>" end |
#wBytesPerInterval ⇒ Object
The total number of bytes this EP will transfer every service interval.
valid only for periodic EPs.
64 65 66 |
# File 'lib/libusb/ss_companion.rb', line 64 def wBytesPerInterval self[:wBytesPerInterval] end |