Module: LIBUSB::Bos::GenericMethods
- Included in:
- ContainerId, DeviceCapability, PlatformDescriptor, SsUsbDeviceCapability, Usb20Extension
- Defined in:
- lib/libusb/bos.rb
Instance Method Summary collapse
-
#bDescriptorType ⇒ Integer
in this context.
-
#bDevCapabilityType ⇒ Integer
Device Capability type.
-
#bLength ⇒ Integer
Size of this descriptor (in bytes).
-
#dev_capability_data ⇒ String
Device Capability data (bLength - 3 bytes).
- #inspect ⇒ Object
Instance Method Details
#bDescriptorType ⇒ Integer
in this context.
32 33 34 |
# File 'lib/libusb/bos.rb', line 32 def bDescriptorType self[:bDescriptorType] end |
#bDevCapabilityType ⇒ Integer
Returns Device Capability type.
37 38 39 |
# File 'lib/libusb/bos.rb', line 37 def bDevCapabilityType self[:bDevCapabilityType] end |
#bLength ⇒ Integer
Returns Size of this descriptor (in bytes).
26 27 28 |
# File 'lib/libusb/bos.rb', line 26 def bLength self[:bLength] end |
#dev_capability_data ⇒ String
Returns Device Capability data (bLength - 3 bytes).
46 47 48 |
# File 'lib/libusb/bos.rb', line 46 def dev_capability_data pointer.read_bytes(bLength - 3) end |
#inspect ⇒ Object
41 42 43 |
# File 'lib/libusb/bos.rb', line 41 def inspect "\#<#{self.class} cap: #{bDevCapabilityType} data: #{dev_capability_data.unpack1("H*")}>" end |