2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 11:18:27 +08:00

frontend/client: connection parameters

This commit is contained in:
Sebastien Bourdeauducq 2014-10-23 19:07:36 +08:00
parent 7a10cb8c32
commit a0ea83c98a

View File

@ -7,6 +7,12 @@ from artiq.management.pc_rpc import Client
def _get_args():
parser = argparse.ArgumentParser(description="ARTIQ client")
parser.add_argument(
"-s", "--server", default="::1",
help="hostname or IP of the master to connect to")
parser.add_argument(
"--port", default=8888, type=int,
help="TCP port to use to connect to the master")
parser.add_argument(
"-o", "--run-once", default=[], nargs=3,
action="append",
@ -20,7 +26,7 @@ def _get_args():
def main():
args = _get_args()
remote = Client("::1", 8888)
remote = Client(args.server, args.port)
try:
for path, name, timeout in args.run_once:
remote.run_once(