class UVC::CameraTerminalDescriptor

Attributes

bControlSize[R]
bmControls[R]
wObjectiveFocalLengthMax[R]
wObjectiveFocalLengthMin[R]
wOcularFocalLength[R]

Public Class Methods

new(bDescriptorType, bDescriptorSubType, bTerminalID, wTerminalType, bAssocTerminal, iTerminal, wObjectiveFocalLengthMin, wObjectiveFocalLengthMax, wOcularFocalLength, bControlSize, bmControls) click to toggle source
Calls superclass method UVC::InputTerminalDescriptor::new
# File lib/uvc.rb, line 384
def initialize(bDescriptorType, bDescriptorSubType, bTerminalID, wTerminalType, bAssocTerminal, iTerminal, wObjectiveFocalLengthMin, wObjectiveFocalLengthMax, wOcularFocalLength, bControlSize, bmControls)
        super(bDescriptorType, bDescriptorSubType, bTerminalID, wTerminalType, bAssocTerminal, iTerminal)
        @wObjectiveFocalLengthMin = wObjectiveFocalLengthMin
        @wObjectiveFocalLengthMax = wObjectiveFocalLengthMax
        @wOcularFocalLength = wOcularFocalLength
        @bControlSize = bControlSize
        @bmControls = Controls.new(bmControls)
end
parse(bDescriptorType, bDescriptorSubType, bTerminalID, wTerminalType, bAssocTerminal, iTerminal, rest) click to toggle source
# File lib/uvc.rb, line 379
def self.parse(bDescriptorType, bDescriptorSubType, bTerminalID, wTerminalType, bAssocTerminal, iTerminal, rest)
        wObjectiveFocalLengthMin, wObjectiveFocalLengthMax, wOcularFocalLength, bControlSize, bmControls = *rest.unpack("vvvcB24")
        self.new(bDescriptorType, bDescriptorSubType, bTerminalID, wTerminalType, bAssocTerminal, iTerminal, wObjectiveFocalLengthMin, wObjectiveFocalLengthMax, wOcularFocalLength, bControlSize, bmControls)
end

Public Instance Methods

short_inspect() click to toggle source
# File lib/uvc.rb, line 454
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