diff --git a/script/local.py b/script/local.py index b47ce2f..7b5ba98 100644 --- a/script/local.py +++ b/script/local.py @@ -11,7 +11,21 @@ class RobotTCP(TcpDevice): def __init__(self, name, server): TcpDevice.__init__(self, name, server) - def run(self): - print "Done" + def execute(self, system, command, *argv): + #print "Done" + cmd = str(system) + "," + str(command) + for arg in argv: + cmd = cmd + "," + str(arg) + cmd = cmd + "\n\r" + ret = "" + try: + ret = robot.write(cmd) + finally: + getLogger().info(cmd + " ret = " + ret) + return ret -#add_device(RobotTCP("robot_tcp", "127.0.0.1:3333"), force = True) \ No newline at end of file + def mount(self, puck, sample): + return self.execute('1', '1', puck, sample) + + +add_device(RobotTCP("robot_tcp", "127.0.0.1:3333"), force = True) \ No newline at end of file