mirror of https://github.com/m-labs/artiq.git
frontend/client: connection parameters
This commit is contained in:
parent
7a10cb8c32
commit
a0ea83c98a
|
@ -7,6 +7,12 @@ from artiq.management.pc_rpc import Client
|
||||||
|
|
||||||
def _get_args():
|
def _get_args():
|
||||||
parser = argparse.ArgumentParser(description="ARTIQ client")
|
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(
|
parser.add_argument(
|
||||||
"-o", "--run-once", default=[], nargs=3,
|
"-o", "--run-once", default=[], nargs=3,
|
||||||
action="append",
|
action="append",
|
||||||
|
@ -20,7 +26,7 @@ def _get_args():
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
args = _get_args()
|
args = _get_args()
|
||||||
remote = Client("::1", 8888)
|
remote = Client(args.server, args.port)
|
||||||
try:
|
try:
|
||||||
for path, name, timeout in args.run_once:
|
for path, name, timeout in args.run_once:
|
||||||
remote.run_once(
|
remote.run_once(
|
||||||
|
|
Loading…
Reference in New Issue