Class: UVC::OutputTerminalDescriptor

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

Constructor Details

#initialize(bDescriptorType, bDescriptorSubType, bTerminalID, wTerminalType, bAssocTerminal, bSourceID, iTerminal, rest = nil) ⇒ OutputTerminalDescriptor

Returns a new instance of OutputTerminalDescriptor.



349
350
351
352
353
354
355
356
357
# File 'lib/uvc.rb', line 349

def initialize(bDescriptorType, bDescriptorSubType, bTerminalID, wTerminalType, bAssocTerminal, bSourceID, iTerminal, rest=nil)
	super(bDescriptorType, bDescriptorSubType)
	@bTerminalID = bTerminalID
	@wTerminalType = wTerminalType
	@bAssocTerminal = bAssocTerminal
	@bSourceID = bSourceID
	@iTerminal = iTerminal
	@rest = rest
end

Instance Attribute Details

#bAssocTerminalObject (readonly)

Returns the value of attribute bAssocTerminal.



340
341
342
# File 'lib/uvc.rb', line 340

def bAssocTerminal
  @bAssocTerminal
end

#bSourceIDObject (readonly)

Returns the value of attribute bSourceID.



341
342
343
# File 'lib/uvc.rb', line 341

def bSourceID
  @bSourceID
end

#bTerminalIDObject (readonly)

Returns the value of attribute bTerminalID.



338
339
340
# File 'lib/uvc.rb', line 338

def bTerminalID
  @bTerminalID
end

#iTerminalObject (readonly)

Returns the value of attribute iTerminal.



342
343
344
# File 'lib/uvc.rb', line 342

def iTerminal
  @iTerminal
end

#wTerminalTypeObject (readonly)

Returns the value of attribute wTerminalType.



339
340
341
# File 'lib/uvc.rb', line 339

def wTerminalType
  @wTerminalType
end

Class Method Details

.parse(bDescriptorType, bDescriptorSubType, rest) ⇒ Object



344
345
346
347
# File 'lib/uvc.rb', line 344

def self.parse(bDescriptorType, bDescriptorSubType, rest)
	bTerminalID, wTerminalType, bAssocTerminal, bSourceID, iTerminal, rest = *rest.unpack("cvccca*")
	self.new(bDescriptorType, bDescriptorSubType, bTerminalID, wTerminalType, bAssocTerminal, bSourceID, iTerminal, rest)
end

Instance Method Details

#bUnitIDObject



359
360
361
# File 'lib/uvc.rb', line 359

def bUnitID
	@bTerminalID
end

#short_inspectObject



363
364
365
366
367
368
369
# File 'lib/uvc.rb', line 363

def short_inspect
	"%s bUnitID=%d %s" % [
		self.class.name.sub(/Descriptor$/, ''),
		self.bUnitID,
		self.wTerminalType == TT_STREAMING ? "streaming" : "vendor"
	]
end