Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read aperture/scatterguard hardware on read #782

Closed
DominicOram opened this issue Sep 12, 2024 · 4 comments · Fixed by #789
Closed

Read aperture/scatterguard hardware on read #782

DominicOram opened this issue Sep 12, 2024 · 4 comments · Fixed by #789
Assignees

Comments

@DominicOram
Copy link
Contributor

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
@DiamondJoseph
Copy link
Contributor

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.

@DominicOram
Copy link
Contributor Author

DominicOram commented 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
Copy link
Contributor

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

@dperl-dls
Copy link
Collaborator

I agree that that is a good guideline to have for people writing devices

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants