Class: LIBUSB::Bos::Usb20Extension
- Inherits:
-
FFI::ManagedStruct
- Object
- FFI::ManagedStruct
- LIBUSB::Bos::Usb20Extension
- Includes:
- GenericMethods
- Defined in:
- lib/libusb/bos.rb
Overview
A structure representing the USB 2.0 Extension descriptor This descriptor is documented in section 9.6.2.1 of the USB 3.0 specification. All multiple-byte fields are represented in host-endian format.
Instance Method Summary collapse
-
#bm_lpm_support? ⇒ Boolean
Supports Link Power Management (LPM).
-
#bmAttributes ⇒ Object
Bitmap encoding of supported device level features.
- #inspect ⇒ Object
Methods included from GenericMethods
#bDescriptorType, #bDevCapabilityType, #bLength, #dev_capability_data
Instance Method Details
#bm_lpm_support? ⇒ Boolean
86 87 88 |
# File 'lib/libusb/bos.rb', line 86 def bm_lpm_support? (bmAttributes & BM_LPM_SUPPORT) != 0 end |
#bmAttributes ⇒ Object
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.
81 82 83 |
# File 'lib/libusb/bos.rb', line 81 def bmAttributes self[:bmAttributes] end |
#inspect ⇒ Object
90 91 92 93 94 95 |
# File 'lib/libusb/bos.rb', line 90 def inspect attrs = Call::Usb20ExtensionAttributes.to_h.map do |k, v| (bmAttributes & v) ? k.to_s : nil end "\#<#{self.class} #{attrs.compact.join(",")}>" end |