Ejemplo n.º 1
0
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
Ejemplo n.º 2
0
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 {}
Ejemplo n.º 3
0
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 {}
Ejemplo n.º 4
0
 def run(self):
     response = clienttcp.tcpConnection(self.host, self.port, self.frames)
     if response is not None:
         self.responseRecived.emit(response)
Ejemplo n.º 5
0
 def run(self):
     response = clienttcp.tcpConnection(self.host, self.port, self.frames)
     if response is not None:
         self.responseRecived.emit(response)
Ejemplo n.º 6
0
def getAxesVelocity(host, port):
    response = clienttcp.tcpConnection(host, port, "(G,A,s,*)")
    if response is not None:
        return parseAxesVelocity(response)
    return None
Ejemplo n.º 7
0
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
Ejemplo n.º 8
0
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
Ejemplo n.º 9
0
def getAllValues(host, port, param):
    response = clienttcp.tcpConnection(host, port, "(G," + param + ",*)")
    if response is not None:
        return parseGetAllValuesResponse(response)
    return None
Ejemplo n.º 10
0
def getParam(param, host, port):
    response = clienttcp.tcpConnection(host, port, "(G," + param +")")
    print response
    if response is not None:
        return parseGetValuesResponse(response)
    return None
Ejemplo n.º 11
0
def echo(host, port):
    response = clienttcp.tcpConnection(host, port, "(?)")
    if response is not None:
        return True
    return False
Ejemplo n.º 12
0
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
Ejemplo n.º 13
0
def getAllValues(host, port, param):
    response = clienttcp.tcpConnection(host, port, "(G," + param + ",*)")
    if response is not None:
        return parseGetAllValuesResponse(response)
    return None
Ejemplo n.º 14
0
def getParam(param, host, port):
    response = clienttcp.tcpConnection(host, port, "(G," + param + ")")
    print response
    if response is not None:
        return parseGetValuesResponse(response)
    return None
Ejemplo n.º 15
0
def echo(host, port):
    response = clienttcp.tcpConnection(host, port, "(?)")
    if response is not None:
        return True
    return False
Ejemplo n.º 16
0
def getAxesVelocity(host, port):
    response = clienttcp.tcpConnection(host, port, "(G,A,s,*)")
    if response is not None:
        return parseAxesVelocity(response)
    return None