Class: UVC::OutputTerminalDescriptor
- Inherits:
-
ClassSpecificVCInterfaceDescriptor
- Object
- ClassSpecificVCInterfaceDescriptor
- UVC::OutputTerminalDescriptor
- Defined in:
- lib/uvc.rb
Instance Attribute Summary collapse
-
#bAssocTerminal ⇒ Object
readonly
Returns the value of attribute bAssocTerminal.
-
#bSourceID ⇒ Object
readonly
Returns the value of attribute bSourceID.
-
#bTerminalID ⇒ Object
readonly
Returns the value of attribute bTerminalID.
-
#iTerminal ⇒ Object
readonly
Returns the value of attribute iTerminal.
-
#wTerminalType ⇒ Object
readonly
Returns the value of attribute wTerminalType.
Attributes inherited from ClassSpecificVCInterfaceDescriptor
#bDescriptorSubType, #bDescriptorType, #rest
Class Method Summary collapse
Instance Method Summary collapse
- #bUnitID ⇒ Object
-
#initialize(bDescriptorType, bDescriptorSubType, bTerminalID, wTerminalType, bAssocTerminal, bSourceID, iTerminal, rest = nil) ⇒ OutputTerminalDescriptor
constructor
A new instance of OutputTerminalDescriptor.
- #short_inspect ⇒ Object
Methods inherited from ClassSpecificVCInterfaceDescriptor
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
#bAssocTerminal ⇒ Object (readonly)
Returns the value of attribute bAssocTerminal.
340 341 342 |
# File 'lib/uvc.rb', line 340 def bAssocTerminal @bAssocTerminal end |
#bSourceID ⇒ Object (readonly)
Returns the value of attribute bSourceID.
341 342 343 |
# File 'lib/uvc.rb', line 341 def bSourceID @bSourceID end |
#bTerminalID ⇒ Object (readonly)
Returns the value of attribute bTerminalID.
338 339 340 |
# File 'lib/uvc.rb', line 338 def bTerminalID @bTerminalID end |
#iTerminal ⇒ Object (readonly)
Returns the value of attribute iTerminal.
342 343 344 |
# File 'lib/uvc.rb', line 342 def iTerminal @iTerminal end |
#wTerminalType ⇒ Object (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
#bUnitID ⇒ Object
359 360 361 |
# File 'lib/uvc.rb', line 359 def bUnitID @bTerminalID end |
#short_inspect ⇒ Object
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 |