From 3332d3d5fc2fac6f50cda847b762eb0442307b9d Mon Sep 17 00:00:00 2001 From: FLorial Jean Baptiste Date: Wed, 6 Dec 2023 15:50:40 +0100 Subject: [PATCH] Add _mount_from_harvester abstract method Not use if I should i it here. but that will prevent key error in other SC Class --- mxcubecore/HardwareObjects/EMBLFlexHCD.py | 2 +- mxcubecore/HardwareObjects/Harvester.py | 20 +++++++++---------- .../abstract/AbstractSampleChanger.py | 4 ++++ 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/mxcubecore/HardwareObjects/EMBLFlexHCD.py b/mxcubecore/HardwareObjects/EMBLFlexHCD.py index 233e62efd5..349500729e 100644 --- a/mxcubecore/HardwareObjects/EMBLFlexHCD.py +++ b/mxcubecore/HardwareObjects/EMBLFlexHCD.py @@ -189,7 +189,7 @@ def init(self): self._update_selection() self.state = self._read_state() - def mount_from_harvester(self): + def _mount_from_harvester(self): return self._harvester and self._harvester_hwo diff --git a/mxcubecore/HardwareObjects/Harvester.py b/mxcubecore/HardwareObjects/Harvester.py index e511ab2eb7..cd74f7c6c3 100644 --- a/mxcubecore/HardwareObjects/Harvester.py +++ b/mxcubecore/HardwareObjects/Harvester.py @@ -3,9 +3,10 @@ [Description] Harvester is use as a replacement of the Dewar sample storage -This hardware object is use in couple with a Sample changer . -and it is compatible with the Crystal Direct Harvester 3. -It has some functionalities, like Harvest Sample, . +This hardware object is use in couple with a Sample changer. +Sample changer load the sample from Harvester instead of dewar. +It is compatible with the Crystal Direct Harvester 3. +It has some functionalities, like Harvest Sample, etc.... [Commands] @@ -15,7 +16,7 @@ harvester wid30harvest:9001 -------------------------------------------------------------------- +----------------------------------------------------------------- """ import gevent import logging @@ -35,11 +36,11 @@ class HarvesterState: Running = 4 Harvesting = 5 ContinueHarvesting = 6 - # Disabled = 6 - # Running = 5 - # StandBy = 6 - # Alarm = 7 - # Fault = 8 + # Disabled = 7 + # Running = 8 + # StandBy = 9 + # Alarm = 10 + # Fault = 11 STATE_DESC = { @@ -76,7 +77,6 @@ def __init__(self, name): def init(self): """ Init """ - # self.centring_calibration_hobj = self.getObjectByRole("centring_calibration") self.exporter_addr = self.get_property("exporter_address") self.crims_upload_url = self.get_property("crims_upload_url") diff --git a/mxcubecore/HardwareObjects/abstract/AbstractSampleChanger.py b/mxcubecore/HardwareObjects/abstract/AbstractSampleChanger.py index 3d579431ea..f920db26b0 100644 --- a/mxcubecore/HardwareObjects/abstract/AbstractSampleChanger.py +++ b/mxcubecore/HardwareObjects/abstract/AbstractSampleChanger.py @@ -715,6 +715,10 @@ def _do_unload(self, sample_slot=None): @abc.abstractmethod def _do_reset(self): return + + @abc.abstractmethod + def _mount_from_harvester(self): + return # ######################## PROTECTED #########################