import time
from pyaubo_agvc_sdk import RpcClient


def login():
    ip = "192.168.192.100"
    port = 30104
    rpc_name = "aa"
    rpc_password = "bb"
    agv = RpcClient()
    agv.setRequestTimeout(10000)

    ret = agv.connect(ip, port)
    print(f"connect result: {ret}")
    ret = agv.login(rpc_name, rpc_password)
    print(f"login result: {ret}")
    return agv


if __name__ == "__main__":
    agv = login()
    agv.disconnect()
