Class: UVC::EncodingUnitDescriptor

Inherits:
ClassSpecificVCInterfaceDescriptor show all
Defined in:
lib/uvc.rb

Instance Attribute Summary collapse

Attributes inherited from ClassSpecificVCInterfaceDescriptor

#bDescriptorSubType, #bDescriptorType, #rest

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ClassSpecificVCInterfaceDescriptor

parse_array, #short_inspect

Constructor Details

#initialize(bDescriptorType, bDescriptorSubType, bUnitID, bSourceID, iEncoding, bControlSize, bmControls, bmControlsRuntime) ⇒ EncodingUnitDescriptor

Returns a new instance of EncodingUnitDescriptor.



595
596
597
598
599
600
601
602
603
# File 'lib/uvc.rb', line 595

def initialize(bDescriptorType, bDescriptorSubType, bUnitID, bSourceID, iEncoding, bControlSize, bmControls, bmControlsRuntime)
	super(bDescriptorType, bDescriptorSubType)
	@bUnitID = bUnitID
	@bSourceID = bSourceID
	@iEncoding = iEncoding
	@bControlSize = bControlSize
	@bmControls = bmControls
	@bmControlsRuntime = bmControlsRuntime
end

Instance Attribute Details

#bControlSizeObject (readonly)

Returns the value of attribute bControlSize.



586
587
588
# File 'lib/uvc.rb', line 586

def bControlSize
  @bControlSize
end

#bmControlsObject (readonly)

Returns the value of attribute bmControls.



587
588
589
# File 'lib/uvc.rb', line 587

def bmControls
  @bmControls
end

#bmControlsRuntimeObject (readonly)

Returns the value of attribute bmControlsRuntime.



588
589
590
# File 'lib/uvc.rb', line 588

def bmControlsRuntime
  @bmControlsRuntime
end

#bSourceIDObject (readonly)

Returns the value of attribute bSourceID.



584
585
586
# File 'lib/uvc.rb', line 584

def bSourceID
  @bSourceID
end

#bUnitIDObject (readonly)

Returns the value of attribute bUnitID.



583
584
585
# File 'lib/uvc.rb', line 583

def bUnitID
  @bUnitID
end

#iEncodingObject (readonly)

Returns the value of attribute iEncoding.



585
586
587
# File 'lib/uvc.rb', line 585

def iEncoding
  @iEncoding
end

Class Method Details

.parse(bDescriptorType, bDescriptorSubType, rest) ⇒ Object



590
591
592
593
# File 'lib/uvc.rb', line 590

def self.parse(bDescriptorType, bDescriptorSubType, rest)
	bUnitID, bSourceID, iEncoding, bControlSize, bmControls, bmControlsRuntime = *rest.unpack("ccccB24B24")
	self.new(bDescriptorType, bDescriptorSubType, bUnitID, bSourceID, iEncoding, bControlSize, bmControls, bmControlsRuntime)
end