Class: LIBUSB::SsCompanion

Inherits:
FFI::ManagedStruct
  • Object
show all
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

Instance Method Details

#bDescriptorTypeObject

Descriptor type.

Will have value LIBUSB::DT_SS_ENDPOINT_COMPANION in this context.



37
38
39
# File 'lib/libusb/ss_companion.rb', line 37

def bDescriptorType
  self[:bDescriptorType]
end

#bLengthObject

Size of this descriptor (in bytes)



30
31
32
# File 'lib/libusb/ss_companion.rb', line 30

def bLength
  self[:bLength]
end

#bmAttributesObject

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



49
50
51
# File 'lib/libusb/ss_companion.rb', line 49

def bmAttributes
  self[:bmAttributes]
end

#bMaxBurstObject

The maximum number of packets the endpoint can send or recieve as part of a burst.



42
43
44
# File 'lib/libusb/ss_companion.rb', line 42

def bMaxBurst
  self[:bMaxBurst]
end

#inspectObject



60
61
62
# File 'lib/libusb/ss_companion.rb', line 60

def inspect
  "\#<#{self.class} burst: #{bMaxBurst} attrs: #{bmAttributes}>"
end

#wBytesPerIntervalObject

The total number of bytes this EP will transfer every service interval.

valid only for periodic EPs.



56
57
58
# File 'lib/libusb/ss_companion.rb', line 56

def wBytesPerInterval
  self[:wBytesPerInterval]
end