Class: UVC::VCInterfaceHeaderDescriptor

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, bcdUVC, wTotalLength, dwClockFrequency, bInCollection, baInterfaceNr) ⇒ VCInterfaceHeaderDescriptor

Returns a new instance of VCInterfaceHeaderDescriptor.



290
291
292
293
294
295
296
297
# File 'lib/uvc.rb', line 290

def initialize(bDescriptorType, bDescriptorSubType, bcdUVC, wTotalLength, dwClockFrequency, bInCollection, baInterfaceNr)
	super(bDescriptorType, bDescriptorSubType)
	@bcdUVC = bcdUVC
	@wTotalLength = wTotalLength
	@dwClockFrequency = dwClockFrequency
	@bInCollection = bInCollection
	@baInterfaceNr = baInterfaceNr
end

Instance Attribute Details

#baInterfaceNrObject (readonly)

Returns the value of attribute baInterfaceNr.



283
284
285
# File 'lib/uvc.rb', line 283

def baInterfaceNr
  @baInterfaceNr
end

#bcdUVCObject (readonly)

Returns the value of attribute bcdUVC.



279
280
281
# File 'lib/uvc.rb', line 279

def bcdUVC
  @bcdUVC
end

#bInCollectionObject (readonly)

Returns the value of attribute bInCollection.



282
283
284
# File 'lib/uvc.rb', line 282

def bInCollection
  @bInCollection
end

#dwClockFrequencyObject (readonly)

Returns the value of attribute dwClockFrequency.



281
282
283
# File 'lib/uvc.rb', line 281

def dwClockFrequency
  @dwClockFrequency
end

#wTotalLengthObject (readonly)

Returns the value of attribute wTotalLength.



280
281
282
# File 'lib/uvc.rb', line 280

def wTotalLength
  @wTotalLength
end

Class Method Details

.parse(bDescriptorType, bDescriptorSubType, rest) ⇒ Object



285
286
287
288
# File 'lib/uvc.rb', line 285

def self.parse(bDescriptorType, bDescriptorSubType, rest)
	bcdUVC, wTotalLength, dwClockFrequency, bInCollection, *baInterfaceNr = *rest.unpack("H4vVcc*")
	self.new(bDescriptorType, bDescriptorSubType, bcdUVC, wTotalLength, dwClockFrequency, bInCollection, baInterfaceNr)
end