Skip to content
Snippets Groups Projects
Commit 84f68191 authored by Andrea Parenti's avatar Andrea Parenti Committed by Jonathan Correa Magdalena
Browse files

Refactor / 8

parent 840b88e7
No related branches found
No related tags found
2 merge requests!2Draft: Feat/p8003,!1First version
Pipeline #162681 passed
...@@ -72,7 +72,6 @@ class Tempus(Device): ...@@ -72,7 +72,6 @@ class Tempus(Device):
super().__init__(configuration) super().__init__(configuration)
self.background_task = None self.background_task = None
self.monitor_task = background(self._monitor()) self.monitor_task = background(self._monitor())
self.ARGS = [f"root@{self.controllerIp}", "python3"]
self.client = None self.client = None
self.channel = None self.channel = None
self.do_acquire = False self.do_acquire = False
...@@ -167,7 +166,7 @@ class Tempus(Device): ...@@ -167,7 +166,7 @@ class Tempus(Device):
@Slot( @Slot(
displayedName="Initialize", displayedName="Initialize",
description="Run the initialization sequence. This will take about " description="Run the initialization sequence. This will take about "
"45 s", "45 s.",
allowedStates={State.INIT, State.ON}) allowedStates={State.INIT, State.ON})
async def initialize(self): async def initialize(self):
self.state = State.CHANGING self.state = State.CHANGING
...@@ -207,12 +206,12 @@ class Tempus(Device): ...@@ -207,12 +206,12 @@ class Tempus(Device):
@Slot( @Slot(
displayedName="Reset Fast-Links", displayedName="Reset Fast-Links",
description="Reset fast-links. This will take about 30 s", description="Reset fast-links. This will take about 30 s.",
allowedStates={State.ON, State.ACTIVE}) allowedStates={State.ON, State.ACTIVE})
async def resetFastLinks(self): async def resetFastLinks(self):
self.state = State.CHANGING self.state = State.CHANGING
self.commandLog = ( self.commandLog = (
"Resetting fast-links:\nThis will take about 30 s") "Resetting fast-links:\nThis will take about 30 s.")
self.background_task = background(self._reset_fast_links()) self.background_task = background(self._reset_fast_links())
async def _reset_fast_links(self): # XXX test async def _reset_fast_links(self): # XXX test
...@@ -235,8 +234,8 @@ class Tempus(Device): ...@@ -235,8 +234,8 @@ class Tempus(Device):
@Slot( @Slot(
displayedName="Configure", displayedName="Configure",
description="Run the configuration sequence. This can take about " description="Run the configuration sequence. This will take about "
"45 s", "45 s.",
allowedStates={State.ON}) allowedStates={State.ON})
async def configure(self): async def configure(self):
self.state = State.CHANGING self.state = State.CHANGING
...@@ -245,7 +244,7 @@ class Tempus(Device): ...@@ -245,7 +244,7 @@ class Tempus(Device):
"Configuring TEMPUS:\nThis will take about 45 s.\n\n") "Configuring TEMPUS:\nThis will take about 45 s.\n\n")
self.background_task = background(self._configure()) self.background_task = background(self._configure())
async def _configure(self): async def _configure(self): # XXX test
try: try:
await self.send_command( await self.send_command(
f"exec(open('{self.CFG_DIR}/B3_timing_dacs.py').read())") f"exec(open('{self.CFG_DIR}/B3_timing_dacs.py').read())")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment