Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

fix: make Qt taurus extensions inherit from base extensions #1691

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

reszelaz
Copy link
Collaborator

Qt taurus extensions do not inherit from the base extensions,
but directly from a TangoDevice (taurus). As a consequence, all
the extended logic is not available. Make the two existing Qt taurus
extension classes (QPool and QMeasurementGroup) inherit from
the base extension classes.

MeasurementGroup (base extension) already implements all
the configuration attribute methods. Remove the duplicated code
and use the base extension implementation.

Strictly speaking, this breaks the compatibility of the
getConfiguration() method. Before it was returning a dict and now
it returns MGConfiguration object.

I have tested using this script:

from pprint import pprint
from taurus import Device
from sardana.taurus.qt.qtcore.tango.sardana import registerExtensions

registerExtensions()

door = Device("door/zreszela/1")
exp_conf = door.getExperimentConfiguration()
pprint(exp_conf)
mnt_grp = Device(exp_conf["ActiveMntGrp"])
# this contains all channels' configuration parameters
channels = mnt_grp.getChannels()
pprint(channels)
# this contains channels enabled configuration only
enabled = mnt_grp.getEnabled()
pprint(enabled)

I also quickly checked if the expconf is still operational.

Fixes #1688. @kklmn I don't know if you have any possibility to validate if it works for you.
Your eventual feedback here could speed up the integration process.
Many thanks!

Qt taurus extensions do not inherit from the base extensions,
but directly from a TangoDevice (taurus). As a consequence, all
the extended logic is not available. Make the two existing Qt taurus
extension classes (QPool and QMeasurementGroup) inherit from
the base extension classes.
MeasurementGroup (base extension) already implements all
the configuration attribute methods. Remove the duplicated code
and use the base extension implementation.

Strictly speaking, this breaks the compatibility of the
getConfiguration() method. Before it was returning a dict and now
it returns MGConfiguration object.
@reszelaz reszelaz added the bug label Sep 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

list of Channel names in active Measurement Group
1 participant