Script execution
This commit is contained in:
@@ -28,7 +28,7 @@ class RobotTCP(TcpDevice):
|
||||
rx = self.sendReceive(tx, None, self.trailer , 0, self.timeout, self.retries).strip()
|
||||
self.getLogger().finer("RX = " + str(rx))
|
||||
if rx[:3] != id:
|
||||
raise Exception("Received invalid message id")
|
||||
raise Exception("Received invalid message id: " + str(rx[:3]) + " - expecting:" + id )
|
||||
if rx[3] == "*":
|
||||
raise Exception(rx[4:])
|
||||
return rx[4:]
|
||||
@@ -41,7 +41,14 @@ class RobotTCP(TcpDevice):
|
||||
msg = msg + "," + str(arg)
|
||||
ret = self.call(msg)
|
||||
return ret;
|
||||
|
||||
|
||||
def get_event():
|
||||
id = "EVT"
|
||||
rx = self.sendReceive(id + " ", None, self.trailer , 0, self.timeout, self.retries).strip()
|
||||
if rx[:3] != id:
|
||||
raise Exception("Received invalid message id: " + str(rx[:3]) + " - expecting:" + id )
|
||||
if len(rx) < 5: return None
|
||||
return rx[4:]
|
||||
|
||||
def mount(self, puck, sample):
|
||||
return self.execute('Mount', puck, sample)
|
||||
|
||||
Reference in New Issue
Block a user