DNM MOCK ALL OTHER DEVICES

This commit is contained in:
perl_d committed 2026-08-07 15:13:52 +02:00
1 parent 3af118fb64
commit 5b8728c37d
2 files changed
+9 -7

No files matched your search

+2 -1
View File
@@ -6,6 +6,7 @@ from collections.abc import Callable
from datetime import UTC, datetime
from math import ceil
from pathlib import Path
from unittest.mock import MagicMock
from aarecommon.config.beamline import cfg_get
from aarecommon.config.logger import setup_logger
@@ -277,7 +278,7 @@ class AareDAQ:
self._dispatch = get_beamline_dispatch()
self._mlbox = self._dispatch.get_mlbox()
self._devs = BeamlineDevices(bl)
self._jfjoch = JFJochWrapper(bl)
self._jfjoch = MagicMock() # JFJochWrapper(bl)
self._bl = bl.value.upper()
self._beamline = bl
self._aare = AareWrapper(bl)
+7 -6
View File
@@ -1,5 +1,6 @@
# Abstractions of devices for beamline
import time
from unittest.mock import MagicMock
# Each "standard" device needs three elements:
# - property to read device value
@@ -26,20 +27,20 @@ class BeamlineDevices:
def __init__(self, beamline: MXBeamline):
self._beamline = beamline
BEAMLINE = beamline.value.upper()
self.tell = make_tell_client(beamline)
self.aerotech = aerotech.AerotechController(beamline)
self.tell = MagicMock() # make_tell_client(beamline)
self.aerotech = MagicMock() # aerotech.AerotechController(beamline)
logger.debug("initialising BEC worker")
self.bec_worker = BECClientWorker(beamline)
logger.debug("initialising BEC worker done")
self._smargon = smargon.Smargon(beamline)
self.exp_shutter = ExperimentalHutchShutter(beamline=self._beamline)
self._smargon = MagicMock() # smargon.Smargon(beamline)
self.exp_shutter = MagicMock() # ExperimentalHutchShutter(beamline=self._beamline)
self.dtz_mod = cfg_get("daq.detector_distance_limit_modifier", 1.0)
# TODO convert epics pvs to BEC -> need to get all samcam signals into a device
# BEC device for pss state also good
# Personnel Safety System: gates whether the robot is allowed to move.
self.pss = PssState(beamline=self._beamline)
self._sample_cam = epicsAD(f"{BEAMLINE}-ES-MS:")
self.pss = MagicMock() # PssState(beamline=self._beamline)
self._sample_cam = MagicMock() # epicsAD(f"{BEAMLINE}-ES-MS:")
def restart_bec_worker(self, simulated: bool = False) -> None:
try: