def on_raw_data(obj=nil, &block)
	  @on_raw_data_obj = obj
      @on_raw_data = Proc.new { |device, obj_ptr, raw_data, data_length|
		data = []
		data_length.times { |i|		
			data << raw_data[i].get_int(0)
		}
		
	    yield self, data, data_length, object_for(obj_ptr)
	}
      Klass.set_OnRawData_Handler(@handle, @on_raw_data, pointer_for(obj))
    end
def on_raw_data(obj=nil, &block)
	  @on_raw_data_obj = obj
      @on_raw_data = Proc.new { |device, obj_ptr, raw_data, data_length|
		data = []
		data_length.times { |i|		
			data << raw_data[i].get_int(0)
		}
		
	    yield self, data, data_length, object_for(obj_ptr)
	}
      Klass.set_OnRawData_Handler(@handle, @on_raw_data, pointer_for(obj))
    end
Sets a raw data handler callback function. This is called whenever a new IR data is available.  Data is in the form of an array of microsecond pulse values. This can be used if the user wishes to do their own data decoding, or for codes that the PhidgetIR cannot automatically recognize.

 @param [String] obj Object to pass to the callback function. This is optional.
 @param [Proc] Block When the callback is executed, the device and object are yielded to this block.
 @example
   ir.on_raw_data do |device, raw_data, data_length, obj|
	    puts "Raw data: #{raw_data}, length: #{data_length}"
   end
 As this runs in it's own thread, be sure that all errors are properly handled or the thread will halt and not fire any more.
 @return [Boolean] returns true or raises an error