def setAllValues(host, port, param, values): response = clienttcp.tcpConnection( host, port, "(S," + param + ",*," + ",".join([str(v) for v in values]) + ")") if response is not None: return parseGetAllValuesResponse(response) return None
def setParams(params, host, port): frames = "" for p in params: frames += "(S," + ",".join(p) + ")" print frames response = clienttcp.tcpConnection(host, port, frames) if response is not None: return parseGetValuesResponse(response) return {}
def run(self): response = clienttcp.tcpConnection(self.host, self.port, self.frames) if response is not None: self.responseRecived.emit(response)
def getAxesVelocity(host, port): response = clienttcp.tcpConnection(host, port, "(G,A,s,*)") if response is not None: return parseAxesVelocity(response) return None
def setAxesVelocity(host, port, values): response = clienttcp.tcpConnection(host, port, "(S,A,s,*," + ",".join([str(v) for v in values]) + ")") if response is not None: return parseAxesVelocity(response) return None
def setAllValues(host, port, param, values): response = clienttcp.tcpConnection(host, port, "(S," + param + ",*," + ",".join([str(v) for v in values]) + ")") if response is not None: return parseGetAllValuesResponse(response) return None
def getAllValues(host, port, param): response = clienttcp.tcpConnection(host, port, "(G," + param + ",*)") if response is not None: return parseGetAllValuesResponse(response) return None
def getParam(param, host, port): response = clienttcp.tcpConnection(host, port, "(G," + param +")") print response if response is not None: return parseGetValuesResponse(response) return None
def echo(host, port): response = clienttcp.tcpConnection(host, port, "(?)") if response is not None: return True return False
def setAxesVelocity(host, port, values): response = clienttcp.tcpConnection( host, port, "(S,A,s,*," + ",".join([str(v) for v in values]) + ")") if response is not None: return parseAxesVelocity(response) return None
def getParam(param, host, port): response = clienttcp.tcpConnection(host, port, "(G," + param + ")") print response if response is not None: return parseGetValuesResponse(response) return None