Пример #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
Пример #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 {}
Пример #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 {}
Пример #4
0
 def run(self):
     response = clienttcp.tcpConnection(self.host, self.port, self.frames)
     if response is not None:
         self.responseRecived.emit(response)
Пример #5
0
 def run(self):
     response = clienttcp.tcpConnection(self.host, self.port, self.frames)
     if response is not None:
         self.responseRecived.emit(response)
Пример #6
0
def getAxesVelocity(host, port):
    response = clienttcp.tcpConnection(host, port, "(G,A,s,*)")
    if response is not None:
        return parseAxesVelocity(response)
    return None
Пример #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
Пример #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
Пример #9
0
def getAllValues(host, port, param):
    response = clienttcp.tcpConnection(host, port, "(G," + param + ",*)")
    if response is not None:
        return parseGetAllValuesResponse(response)
    return None
Пример #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
Пример #11
0
def echo(host, port):
    response = clienttcp.tcpConnection(host, port, "(?)")
    if response is not None:
        return True
    return False
Пример #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
Пример #13
0
def getAllValues(host, port, param):
    response = clienttcp.tcpConnection(host, port, "(G," + param + ",*)")
    if response is not None:
        return parseGetAllValuesResponse(response)
    return None
Пример #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
Пример #15
0
def echo(host, port):
    response = clienttcp.tcpConnection(host, port, "(?)")
    if response is not None:
        return True
    return False
Пример #16
0
def getAxesVelocity(host, port):
    response = clienttcp.tcpConnection(host, port, "(G,A,s,*)")
    if response is not None:
        return parseAxesVelocity(response)
    return None