Script execution

This commit is contained in:
gac-S_Changer
2017-02-20 18:09:19 +01:00
parent 6d22caa71d
commit 1bd326f6a8

View File

@@ -29,12 +29,14 @@ class RobotTCP(TcpDevice):
self.getLogger().finer("RX = " + str(rx))
if rx[:3] != id:
raise Exception("Received invalid message id")
if rx[3] == "*":
raise Exception(rx[4:])
return rx[4:]
def execute(self, command, *argv):
msg = str(command)
#if len(argv>10):
# raise Exception("Exceeded maximum number of parameters")
if len(argv)>10:
raise Exception("Exceeded maximum number of parameters")
for arg in argv:
msg = msg + "," + str(arg)
ret = self.call(msg)