Script execution

This commit is contained in:
gac-S_Changer
2017-02-21 12:35:01 +01:00
parent f61c992a2e
commit 74640b3980

View File

@@ -21,10 +21,12 @@ class RobotTCP(TcpDevice):
tx = tx + msg_id + " " + msg
if (len(tx)>127):
raise Exception("Exceeded maximum message size")
self.getLogger().finer("TX = " + str(tx))
self.getLogger().finer("TX = '" + str(tx)+ "'")
print "TX = '" + str(tx)+ "'"
if (self.trailer != None): tx = tx + self.trailer
rx = self.sendReceive(tx, None, self.trailer , 0, self.timeout, self.retries)
self.getLogger().finer("RX = " + str(rx))
self.getLogger().finer("RX = '" + str(rx) + "'")
print "RX = '" + str(rx) + "'"
if rx[:3] != msg_id:
print rx
raise Exception("Received invalid message id: " + str(rx[:3]) + " - expecting:" + msg_id )