From 3ad6bdd883bb931eee237934de0083de3cf2a292 Mon Sep 17 00:00:00 2001 From: Furkan Date: Mon, 7 Oct 2024 23:08:46 +0300 Subject: [PATCH] feat: add password field to n1081b config --- configs/n1081b.toml.example | 1 + src/daq/caen/n1081b.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/configs/n1081b.toml.example b/configs/n1081b.toml.example index bdf75da..e34b5db 100644 --- a/configs/n1081b.toml.example +++ b/configs/n1081b.toml.example @@ -1,4 +1,5 @@ daq_job_type="n1081b" host="1.2.3.4" port="8080" +password="password" sections_to_store=["SEC_B", "SEC_D"] \ No newline at end of file diff --git a/src/daq/caen/n1081b.py b/src/daq/caen/n1081b.py index 402cab1..160ad3d 100644 --- a/src/daq/caen/n1081b.py +++ b/src/daq/caen/n1081b.py @@ -16,6 +16,7 @@ class DAQN1081BConfig(DAQJobConfig): host: str port: str + password: str sections_to_store: list[str] @@ -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: