-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move controllers/clients to frontend
1 parent
c3953d8
commit d315268
Showing
8 changed files
with
78 additions
and
75 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import argparse | ||
|
||
from artiq.devices.lda.driver import Lda, Ldasim | ||
from artiq.management.pc_rpc import simple_server_loop | ||
|
||
|
||
def main(): | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument('-d', '--device', default="LDA-102", | ||
choices=["LDA-102", "LDA-602", "sim"]) | ||
parser.add_argument('--bind', default="::1", | ||
help="hostname or IP address to bind to") | ||
parser.add_argument('-p', '--port', default=8890, type=int, | ||
help="TCP port to listen to") | ||
parser.add_argument('-s', '--serial', default=None, | ||
help="USB serial number of the device") | ||
args = parser.parse_args() | ||
|
||
if args.device == "sim": | ||
lda = Ldasim() | ||
else: | ||
lda = Lda(args.serial, args.device) | ||
|
||
simple_server_loop(lda, "lda", | ||
args.bind, args.port) | ||
|
||
if __name__ == "__main__": | ||
main() |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import argparse | ||
import logging | ||
|
||
from artiq.devices.pdq2.driver import Pdq2 | ||
from artiq.management.pc_rpc import simple_server_loop | ||
|
||
|
||
def _get_args(): | ||
parser = argparse.ArgumentParser(description="PDQ2 controller") | ||
parser.add_argument("--bind", default="::1", | ||
help="hostname or IP address to bind to") | ||
parser.add_argument("-p", "--port", default=8889, type=int, | ||
help="TCP port to listen to") | ||
parser.add_argument( | ||
"-s", "--serial", default=None, | ||
help="device (FT245R) serial string [first]") | ||
parser.add_argument( | ||
"-d", "--debug", default=False, action="store_true", | ||
help="debug communications") | ||
return parser.parse_args() | ||
|
||
|
||
def main(): | ||
args = _get_args() | ||
|
||
if args.debug: | ||
logging.basicConfig(level=logging.DEBUG) | ||
else: | ||
logging.basicConfig(level=logging.WARNING) | ||
|
||
dev = Pdq2(serial=args.serial) | ||
try: | ||
simple_server_loop(dev, "pdq2", args.bind, args.port, | ||
id_parameters="serial="+str(args.serial)) | ||
finally: | ||
dev.close() | ||
|
||
if __name__ == "__main__": | ||
main() |