Commit 2dd70f48 authored by Perceval Guillou's avatar Perceval Guillou
Browse files

add the possibility to define a default counterController for a bliss...

add the possibility to define a default counterController for a bliss controller added in default chain
parent 27be99fa
......@@ -369,6 +369,10 @@ class BlissController(CounterContainer):
""" return the low level hardware controller interface """
raise NotImplementedError
def _get_default_chain_counter_controller(self):
""" return the counter controller that shoud be used with the DefaultAcquisitionChain (i.e for standard step by step scans) """
raise NotImplementedError
def _get_subitem_default_class_name(self, cfg, parent_key):
# Called when the class key cannot be found in the item_config.
# Then a default class must be returned. The choice of the item_class is usually made from the parent_key value.
......@@ -16,6 +16,7 @@ from bliss.common.measurementgroup import (
from bliss.common.counter import CalcCounter, Counter
from bliss.controllers.counter import CounterController, CalcCounterController
from bliss.controllers.bliss_controller import BlissController
from bliss.scanning.chain import AcquisitionChain
from bliss.scanning.acquisition.timer import SoftwareTimerMaster
......@@ -294,8 +295,10 @@ class DefaultAcquisitionChain:
controller = device._counter_controller
elif isinstance(device, CounterController):
controller = device
elif isinstance(device, BlissController):
controller = device._get_default_chain_counter_controller()
msg = "default_chain config: device object must be a CounterController or a Counter,"
msg = "default_chain config: device object must be a CounterController, a Counter or a BlissController"
msg += f" instead received '{}' of type {type(device)} !"
raise ValueError(msg)
......@@ -6,12 +6,6 @@
- m2
- class: Session
name: empty
setup-file: ./
icat-mapping: icat
config-objects: []
- class: Session
name: test_session
setup-file: ./
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment