def last_learned_code
	
		data_ffi = ::FFI::MemoryPointer.new(:uchar, 16)
		
		data_length = ::FFI::MemoryPointer.new(:int)
		data_length.write_int(16)

		code_info = ::FFI::MemoryPointer.new(IR_code_info)
		
		Klass.getLastLearnedCode(@handle, data_ffi, data_length, code_info)
		
		data = []
		
		data_length.get_int(0).times { |i|
			 data << data_ffi[i].get_uchar(0).to_s(16)
		}
	
        code_info_struct = IR_code_info.new(code_info)	
	
		[data, data_length.get_int(0), code_info_struct]		
			
	end
def last_learned_code
	
		data_ffi = ::FFI::MemoryPointer.new(:uchar, 16)
		
		data_length = ::FFI::MemoryPointer.new(:int)
		data_length.write_int(16)

		code_info = ::FFI::MemoryPointer.new(IR_code_info)
		
		Klass.getLastLearnedCode(@handle, data_ffi, data_length, code_info)
		
		data = []
		
		data_length.get_int(0).times { |i|
			 data << data_ffi[i].get_uchar(0).to_s(16)
		}
	
        code_info_struct = IR_code_info.new(code_info)	
	
		[data, data_length.get_int(0), code_info_struct]		
			
	end
Gets the last code that was learned.
 @return [Array<String>] returns the last learned code, or raises an error.
 @return [Integer] returns the data length, or raises an error.
 @return [IR_code_info] returns the code info structure for the learned code, or raises an error.