Class: UVC::SelectorUnitDescriptor
- Inherits:
-
ClassSpecificVCInterfaceDescriptor
- Object
- ClassSpecificVCInterfaceDescriptor
- UVC::SelectorUnitDescriptor
- Defined in:
- lib/uvc.rb
Instance Attribute Summary collapse
-
#baSourceID ⇒ Object
readonly
Returns the value of attribute baSourceID.
-
#bNrInPins ⇒ Object
readonly
Returns the value of attribute bNrInPins.
-
#bUnitID ⇒ Object
readonly
Returns the value of attribute bUnitID.
-
#iSelector ⇒ Object
readonly
Returns the value of attribute iSelector.
Attributes inherited from ClassSpecificVCInterfaceDescriptor
#bDescriptorSubType, #bDescriptorType, #rest
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(bDescriptorType, bDescriptorSubType, bUnitID, bNrInPins, baSourceID, iSelector) ⇒ SelectorUnitDescriptor
constructor
A new instance of SelectorUnitDescriptor.
Methods inherited from ClassSpecificVCInterfaceDescriptor
Constructor Details
#initialize(bDescriptorType, bDescriptorSubType, bUnitID, bNrInPins, baSourceID, iSelector) ⇒ SelectorUnitDescriptor
Returns a new instance of SelectorUnitDescriptor.
480 481 482 483 484 485 486 |
# File 'lib/uvc.rb', line 480 def initialize(bDescriptorType, bDescriptorSubType, bUnitID, bNrInPins, baSourceID, iSelector) super(bDescriptorType, bDescriptorSubType) @bUnitID = bUnitID @bNrInPins = bNrInPins @baSourceID = baSourceID @iSelector = iSelector end |
Instance Attribute Details
#baSourceID ⇒ Object (readonly)
Returns the value of attribute baSourceID.
468 469 470 |
# File 'lib/uvc.rb', line 468 def baSourceID @baSourceID end |
#bNrInPins ⇒ Object (readonly)
Returns the value of attribute bNrInPins.
467 468 469 |
# File 'lib/uvc.rb', line 467 def bNrInPins @bNrInPins end |
#bUnitID ⇒ Object (readonly)
Returns the value of attribute bUnitID.
466 467 468 |
# File 'lib/uvc.rb', line 466 def bUnitID @bUnitID end |
#iSelector ⇒ Object (readonly)
Returns the value of attribute iSelector.
469 470 471 |
# File 'lib/uvc.rb', line 469 def iSelector @iSelector end |
Class Method Details
.parse(bDescriptorType, bDescriptorSubType, rest) ⇒ Object
471 472 473 474 475 476 477 478 |
# File 'lib/uvc.rb', line 471 def self.parse(bDescriptorType, bDescriptorSubType, rest) bUnitID, bNrInPins, *baSourceID = *rest.unpack("ccc*") iSelector = nil if baSourceID.size >= bNrInPins iSelector = baSourceID.pop end self.new(bDescriptorType, bDescriptorSubType, bUnitID, bNrInPins, baSourceID, iSelector) end |