From cecd9c8ab97175b9c97901579f239ef464824611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Petitdemange?= Date: Thu, 31 Aug 2023 13:37:11 +0200 Subject: [PATCH] plugin: can start several plugin of same class type. plugin_list attribute can now return several device address of the same plugin type. --- Lima/Server/LimaCCDs.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Lima/Server/LimaCCDs.py b/Lima/Server/LimaCCDs.py index f1df9ed..7f1ca00 100755 --- a/Lima/Server/LimaCCDs.py +++ b/Lima/Server/LimaCCDs.py @@ -61,7 +61,7 @@ LimaCameraType = None # from EnvHelper import setup_lima_env # LimaCameraType = setup_lima_env(sys.argv) -from .EnvHelper import get_sub_devices +from .EnvHelper import get_sub_devices, get_device_class_map from .EnvHelper import get_lima_camera_type, get_lima_device_name from .EnvHelper import get_camera_module, get_plugin_module from .AttrHelper import get_attr_4u @@ -1750,9 +1750,11 @@ class LimaCCDs(PyTango.LatestDeviceImpl): def read_plugin_list(self, attr): returnList = [] - for key, value in six.iteritems(get_sub_devices()): - returnList.append(key.lower().replace("deviceserver", "")) - returnList.append(value) + for klass, devices in get_device_class_map().items(): + klass_name = klass.lower().replace("deviceserver", "") + for device_name in devices: + returnList.append(klass_name) + returnList.append(device_name) attr.set_value(returnList) def read_shared_memory_names(self, attr): -- GitLab