You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following #769 a side effect of this is that we're no longer reading the state of the hardware whenever we read selected_aperture. This means that the device itself is holding on to the state of the beamline based on what state it last moved to. This means that the state could be wrong if:
The device has just been initialised
The hardware has been moved via EPICS/manually
There was a failure in moving the device
Acceptance Criteria
Hardware is read when the device is read
The device holds no assumptions about the state of the hardware
selected_aperture and radius are both going to be cached in the soft_signal state, so if you're modifying the handling of one should adjust the other too. Mea culpa.
I wonder if we should try and write a general rule in the docs of "devices should avoid holding state and instead read the state of the hardware when read"? Thoughts @callumforrester, @dperl-dls, @coretl?
Activity
DiamondJoseph commentedon Sep 13, 2024
selected_apertureandradiusare both going to be cached in the soft_signal state, so if you're modifying the handling of one should adjust the other too. Mea culpa.DominicOram commentedon Sep 13, 2024
I wonder if we should try and write a general rule in the docs of "devices should avoid holding state and instead read the state of the hardware when read"? Thoughts @callumforrester, @dperl-dls, @coretl?
DiamondJoseph commentedon Sep 13, 2024
Would be nice if there was some utility for making a soft_signal backed by some function that may read other parts of device state
d-perl commentedon Sep 13, 2024
I agree that that is a good guideline to have for people writing devices