Class: LIBUSB::Bos::SsUsbDeviceCapability
- Inherits:
-
FFI::ManagedStruct
- Object
- FFI::ManagedStruct
- LIBUSB::Bos::SsUsbDeviceCapability
- Includes:
- GenericMethods
- Defined in:
- lib/libusb/bos.rb
Overview
A structure representing the SuperSpeed USB Device Capability descriptor This descriptor is documented in section 9.6.2.2 of the USB 3.0 specification. All multiple-byte fields are represented in host-endian format.
Instance Method Summary collapse
-
#bFunctionalitySupport ⇒ Integer
The lowest speed at which all the functionality supported by the device is available to the user.
-
#bm_ltm_support? ⇒ Boolean
Supports Latency Tolerance Messages (LTM).
-
#bmAttributes ⇒ Integer
Bitmap encoding of supported device level features.
-
#bU1DevExitLat ⇒ Integer
U1 Device Exit Latency.
-
#bU2DevExitLat ⇒ Integer
U2 Device Exit Latency.
- #inspect ⇒ Object
-
#supported_speeds ⇒ Array<Symbol>
Speeds supported by this device when operating in SuperSpeed mode Call::SupportedSpeeds.
-
#wSpeedSupported ⇒ Integer
Bitmap encoding of the speed supported by this device when operating in SuperSpeed mode.
Methods included from GenericMethods
#bDescriptorType, #bDevCapabilityType, #bLength, #dev_capability_data
Instance Method Details
#bFunctionalitySupport ⇒ Integer
The lowest speed at which all the functionality supported by the device is available to the user. For example if the device supports all its functionality when connected at full speed and above then it sets this value to 1.
0 - low speed 1 - full speed 2 - high speed 3 - super speed
168 169 170 |
# File 'lib/libusb/bos.rb', line 168 def bFunctionalitySupport self[:bFunctionalitySupport] end |
#bm_ltm_support? ⇒ Boolean
Returns Supports Latency Tolerance Messages (LTM).
129 130 131 |
# File 'lib/libusb/bos.rb', line 129 def bm_ltm_support? (bmAttributes & BM_LTM_SUPPORT) != 0 end |
#bmAttributes ⇒ Integer
Bitmap encoding of supported device level features. A value of one in a bit location indicates a feature is supported; a value of zero indicates it is not supported.
124 125 126 |
# File 'lib/libusb/bos.rb', line 124 def bmAttributes self[:bmAttributes] end |
#bU1DevExitLat ⇒ Integer
Returns U1 Device Exit Latency.
173 174 175 |
# File 'lib/libusb/bos.rb', line 173 def bU1DevExitLat self[:bU1DevExitLat] end |
#bU2DevExitLat ⇒ Integer
Returns U2 Device Exit Latency.
178 179 180 |
# File 'lib/libusb/bos.rb', line 178 def bU2DevExitLat self[:bU2DevExitLat] end |
#inspect ⇒ Object
133 134 135 136 137 138 |
# File 'lib/libusb/bos.rb', line 133 def inspect attrs = Call::SsUsbDeviceCapabilityAttributes.to_h.map do |k,v| (bmAttributes & v) != 0 ? k.to_s : nil end "\#<#{self.class} #{attrs.compact.join(",")} #{supported_speeds.join(",")}>" end |
#supported_speeds ⇒ Array<Symbol>
Returns speeds supported by this device when operating in SuperSpeed mode Call::SupportedSpeeds.
151 152 153 154 155 156 |
# File 'lib/libusb/bos.rb', line 151 def supported_speeds speeds = Call::SupportedSpeeds.to_h.map do |k,v| (wSpeedSupported & v) != 0 ? k : nil end speeds.compact end |
#wSpeedSupported ⇒ Integer
Bitmap encoding of the speed supported by this device when operating in SuperSpeed mode.
145 146 147 |
# File 'lib/libusb/bos.rb', line 145 def wSpeedSupported self[:wSpeedSupported] end |