Skip to content

Commit

Permalink
feat: add password field to n1081b config
Browse files Browse the repository at this point in the history
  • Loading branch information
furkan-bilgin committed Oct 7, 2024
1 parent 2f582af commit 3ad6bdd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions configs/n1081b.toml.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
daq_job_type="n1081b"
host="1.2.3.4"
port="8080"
password="password"
sections_to_store=["SEC_B", "SEC_D"]
3 changes: 2 additions & 1 deletion src/daq/caen/n1081b.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
class DAQN1081BConfig(DAQJobConfig):
host: str
port: str
password: str
sections_to_store: list[str]


Expand All @@ -34,7 +35,7 @@ def __init__(self, config: DAQN1081BConfig):

def start(self):
self.device.connect()
success = self.device.login("password")
success = self.device.login(self.config.password)
if not success:
raise Exception("Login failed")
while True:
Expand Down

0 comments on commit 3ad6bdd

Please sign in to comment.