Skip to content

Commit

Permalink
Merge pull request #22 from byuccl/cli_delay
Browse files Browse the repository at this point in the history
Add delay to CLI
  • Loading branch information
jgoeders authored Nov 8, 2024
2 parents 574ba27 + 293506b commit 11064ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name="yinstruments",
packages=find_packages(),
version="1.4.0",
version="1.5.0",
description="Experiment device control scripts for BYU's Configurable Computing Lab (https://ccl.byu.edu/)",
author="Jeff Goeders",
author_email="jeff.goeders@gmail.com",
Expand Down
6 changes: 5 additions & 1 deletion yinstruments/pdu/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def main():
choices=("on", "off", "is_on", "reboot", "get_status"),
)
arguments.add_argument("port_num", type=str, help="Port number to perform action on")
arguments.add_argument("--delay", type=float, help="Delay time for command")
args = arguments.parse_args()

# These four variables are your arguments you will enter into the command line
Expand All @@ -35,7 +36,10 @@ def main():

if dev_type.lower() == "netbooter":
port = 23
pdu = Netbooter(ip_address, port)
if args.delay:
pdu = Netbooter(ip_address, port, command_delay=args.delay)
else:
pdu = Netbooter(ip_address, port)
elif dev_type == "lindy":
port = 80
pdu = Lindy(ip_address, port)
Expand Down

0 comments on commit 11064ea

Please sign in to comment.