Skip to content

Add Handler.initialise(controller) and call during Backend initialisation #59

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

Closed
GDYendell opened this issue Oct 10, 2024 · 0 comments · Fixed by #135
Closed

Add Handler.initialise(controller) and call during Backend initialisation #59

GDYendell opened this issue Oct 10, 2024 · 0 comments · Fixed by #135
Assignees

Comments

@GDYendell
Copy link
Contributor

GDYendell commented Oct 10, 2024

This will enable handlers to do some logic based on fully initialised controllers that currently needs to be done in update every time. For example, filtering a list of child attributes to create status from. By default initialise will do nothing.

This will be called in Controller.initialise (which should be moved to BaseController as it will be needed in sub controllers too). Controllers that already implement initialise (fastcs-odin) will then have to call super().initialise(). It will need to be called with the controller and the attribute it is attached to. This is intended to enable DiamondLightSource/fastcs-odin#21, so it probably makes sense to work on both issues at the same time to make sure the interface works.

Acceptance Criteria

  • Handlers can implement an initialise method that will be called with a initialised controller instance before the backend enters its run loop.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants