class UVC::SelectorUnitDescriptor
Attributes
bNrInPins[R]
bUnitID[R]
baSourceID[R]
iSelector[R]
Public Class Methods
new(bDescriptorType, bDescriptorSubType, bUnitID, bNrInPins, baSourceID, iSelector)
click to toggle source
Calls superclass method
UVC::ClassSpecificVCInterfaceDescriptor::new
# File lib/uvc.rb, line 480 def initialize(bDescriptorType, bDescriptorSubType, bUnitID, bNrInPins, baSourceID, iSelector) super(bDescriptorType, bDescriptorSubType) @bUnitID = bUnitID @bNrInPins = bNrInPins @baSourceID = baSourceID @iSelector = iSelector end
parse(bDescriptorType, bDescriptorSubType, rest)
click to toggle source
# File lib/uvc.rb, line 471 def self.parse(bDescriptorType, bDescriptorSubType, rest) bUnitID, bNrInPins, *baSourceID = *rest.unpack("ccc*") iSelector = nil if baSourceID.size >= bNrInPins iSelector = baSourceID.pop end self.new(bDescriptorType, bDescriptorSubType, bUnitID, bNrInPins, baSourceID, iSelector) end