class UVC::UVCDevice::UVCError
Attributes
code[R]
Public Class Methods
new(code = nil, msg = nil)
click to toggle source
Calls superclass method
# File lib/uvc.rb, line 753 def initialize(code = nil, msg = nil) @code = code super(msg || "error with code %#04x: %s" % [code, error_description]) end
Public Instance Methods
error_description()
click to toggle source
# File lib/uvc.rb, line 758 def error_description case @code when 0x00 "No error" when 0x01 "Not ready" when 0x02 "Wrong state" when 0x03 "Power" when 0x04 "Out of range" when 0x05 "Invalid unit" when 0x06 "Invalid control" when 0x07 "Invalid Request" when 0x08 "Invalid value within range" else "unknown" end end