Class: UVC::CameraTerminalDescriptor::Controls

Inherits:
Object
  • Object
show all
Defined in:
lib/uvc.rb

Constant Summary collapse

BITS =

D0: Scanning Mode D1: Auto-Exposure Mode D2: Auto-Exposure Priority D3: Exposure Time (Absolute) D4: Exposure Time (Relative) D5: Focus (Absolute) D6 : Focus (Relative) D7: Iris (Absolute) D8 : Iris (Relative) D9: Zoom (Absolute) D10: Zoom (Relative) D11: PanTilt (Absolute) D12: PanTilt (Relative) D13: Roll (Absolute) D14: Roll (Relative) D15: Reserved D16: Reserved D17: Focus, Auto D18: Privacy D19: Focus, Simple D20: Window D21: Region of Interest D22 – D23: Reserved, set to zero

[
	:Scanning_Mode,
	:Auto_Exposure_Mode,
	:Auto_Exposure_Priority,
	:Exposure_Time_Absolute,
	:Exposure_Time_Relative,
	:Focus_Absolute,
	:Focus_Relative,
	:Iris_Absolute,
	:Iris_Relative,
	:Zoom_Absolute,
	:Zoom_Relative,
	:PanTilt_Absolute,
	:PanTilt_Relative,
	:Roll_Absolute,
	:Roll_Relative,
	:Reserved,
	:Reserved,
	:Focus_Auto,
	:Privacy,
	:Focus_Simple,
	:Window,
	:Region_of_Interest,
]

Instance Method Summary collapse

Constructor Details

#initialize(bits) ⇒ Controls

Returns a new instance of Controls.



446
447
448
449
450
451
# File 'lib/uvc.rb', line 446

def initialize(bits)
	bits = bits.reverse
	BITS.each_with_index do |name, index|
		instance_variable_set "@#{name}", bits[index] === "1"
	end
end