Class: UVC::InputTerminalDescriptor
- Inherits:
-
ClassSpecificVCInterfaceDescriptor
- Object
- ClassSpecificVCInterfaceDescriptor
- UVC::InputTerminalDescriptor
- Defined in:
- lib/uvc.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#bAssocTerminal ⇒ Object
readonly
Returns the value of attribute bAssocTerminal.
-
#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, iTerminal, rest = nil) ⇒ InputTerminalDescriptor
constructor
A new instance of InputTerminalDescriptor.
- #short_inspect ⇒ Object
Methods inherited from ClassSpecificVCInterfaceDescriptor
Constructor Details
#initialize(bDescriptorType, bDescriptorSubType, bTerminalID, wTerminalType, bAssocTerminal, iTerminal, rest = nil) ⇒ InputTerminalDescriptor
Returns a new instance of InputTerminalDescriptor.
316 317 318 319 320 321 322 323 |
# File 'lib/uvc.rb', line 316 def initialize(bDescriptorType, bDescriptorSubType, bTerminalID, wTerminalType, bAssocTerminal, iTerminal, rest=nil) super(bDescriptorType, bDescriptorSubType) @bTerminalID = bTerminalID @wTerminalType = wTerminalType @bAssocTerminal = bAssocTerminal @iTerminal = iTerminal @rest = rest end |
Instance Attribute Details
#bAssocTerminal ⇒ Object (readonly)
Returns the value of attribute bAssocTerminal.
303 304 305 |
# File 'lib/uvc.rb', line 303 def bAssocTerminal @bAssocTerminal end |
#bTerminalID ⇒ Object (readonly)
Returns the value of attribute bTerminalID.
301 302 303 |
# File 'lib/uvc.rb', line 301 def bTerminalID @bTerminalID end |
#iTerminal ⇒ Object (readonly)
Returns the value of attribute iTerminal.
304 305 306 |
# File 'lib/uvc.rb', line 304 def iTerminal @iTerminal end |
#wTerminalType ⇒ Object (readonly)
Returns the value of attribute wTerminalType.
302 303 304 |
# File 'lib/uvc.rb', line 302 def wTerminalType @wTerminalType end |
Class Method Details
.parse(bDescriptorType, bDescriptorSubType, rest) ⇒ Object
306 307 308 309 310 311 312 313 314 |
# File 'lib/uvc.rb', line 306 def self.parse(bDescriptorType, bDescriptorSubType, rest) bTerminalID, wTerminalType, bAssocTerminal, iTerminal, rest = *rest.unpack("cvcca*") case wTerminalType when ITT_CAMERA CameraTerminalDescriptor.parse(bDescriptorType, bDescriptorSubType, bTerminalID, wTerminalType, bAssocTerminal, iTerminal, rest) else self.new(bDescriptorType, bDescriptorSubType, bTerminalID, wTerminalType, bAssocTerminal, iTerminal, rest) end end |
Instance Method Details
#bUnitID ⇒ Object
325 326 327 |
# File 'lib/uvc.rb', line 325 def bUnitID @bTerminalID end |
#short_inspect ⇒ Object
329 330 331 332 333 334 |
# File 'lib/uvc.rb', line 329 def short_inspect "%s bUnitID=%d" % [ self.class.name.sub(/Descriptor$/, ''), self.bUnitID ] end |