--- /dev/null
+$:.unshift(File.dirname(__FILE__))
+
+require "socket"
+require "ef/ef2000command"
+
+class EFSocket
+ def initialize(ip, port)
+ @socket = TCPSocket.open(ip, port)
+ ef2000_command = EF2000Command.new
+ @command = ef2000_command.command
+ end
+
+ def put_em(item)
+ puts item
+ @socket.puts(@command[item])
+ puts get_em
+ end
+
+ def get_em
+ string = ""
+ while true do
+ buf = @socket.getc
+ puts buf
+ break if buf == "\r"
+ string << buf
+ end
+ return split(string)
+ end
+
+ def split(string)
+ array = string.chomp.split(/[-,,]/)
+ return array
+ end
+end
+
+=begin
+test = EFSocket.new("192.168.4.136", 5555)
+# test.put_em("init")
+sleep(2)
+s = test.put_em("set_stageA_params")
+if (s[0]=="#Aq")
+ puts "succes"
+ sleep(4)
+ puts test.put_em("goto_stage")
+end
+=end