class UVC::ProcessingUnitDescriptor

Attributes

bControlSize[R]
bSourceID[R]
bUnitID[R]
bmControls[R]
bmVideoStandards[R]
iProcessing[R]
wMaxMultiplier[R]

Public Class Methods

new(bDescriptorType, bDescriptorSubType, bUnitID, bSourceID, wMaxMultiplier, bControlSize, bmControls, iProcessing, bmVideoStandards) click to toggle source
# File lib/uvc.rb, line 504
def initialize(bDescriptorType, bDescriptorSubType, bUnitID, bSourceID, wMaxMultiplier, bControlSize, bmControls, iProcessing, bmVideoStandards)
        super(bDescriptorType, bDescriptorSubType)
        @bUnitID = bUnitID
        @bSourceID = bSourceID
        @wMaxMultiplier = wMaxMultiplier
        @bControlSize = bControlSize
        @bmControls = Controls.new(bmControls)
        @iProcessing = iProcessing
        @bmVideoStandards = bmVideoStandards
end
parse(bDescriptorType, bDescriptorSubType, rest) click to toggle source
# File lib/uvc.rb, line 498
def self.parse(bDescriptorType, bDescriptorSubType, rest)
        bUnitID, bSourceID, wMaxMultiplier, bControlSize, rest = *rest.unpack("ccvca*")
        bmControls, iProcessing, bmVideoStandards = *rest.unpack("B#{bControlSize * 8}cB8")
        self.new(bDescriptorType, bDescriptorSubType, bUnitID, bSourceID, wMaxMultiplier, bControlSize, bmControls, iProcessing, bmVideoStandards)
end

Public Instance Methods

short_inspect() click to toggle source
# File lib/uvc.rb, line 571
def short_inspect
        "%s bUnitID=%d\n  %s" % [
                self.class.name.sub(/Descriptor$/, ''),
                self.bUnitID,
                Controls::BITS.select {|n|
                        self.bmControls.send(n)
                }.join("  \n")
        ]
end