Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #60 +/- ##
==========================================
+ Coverage 84.61% 85.30% +0.68%
==========================================
Files 4 4
Lines 312 313 +1
==========================================
+ Hits 264 267 +3
+ Misses 48 46 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
GDYendell
left a comment
There was a problem hiding this comment.
Keep the naming consistent between the method and attribute / parent and child just to make it clear they are all the same thing.
Remove the subsystem stale parameters as discussed and then I think it should be good to go.
|
I have realised this idea is still not quite right, because the sub controllers will fight over setting stale parameters and it could get set False by one sub controller when another is still stale. I think we also need to have only one queue and have the top level do the updates for the queue and set stale_parameters. So what we pass down to the sub_controllers is the queue. And perhaps that queue should store attributes, rather than parameter names. What do you think @jsouter ? |
Yeah, that's why I thought we might as well keep the stale_parameters attribute on the subcontrollers since the top controller needs to keep track of all their states anyway.
I can have a try, I think it makes sense to still have the queue separate the parameters for each subsystem, I don't believe there's any response to any put request that suggests that you need to update a parameter belonging to a different subsystem. |
This is true, but if they are each fetching parameters in their own queue then can't just set the parent stale_parameters because there could be two subsystems that are stale at the same time and the first one that finishes fetching will wrongly set the top level to False. It needs to be an AND of the subsystem states, but also be synchronous and not updated on a poll loop. |
Okay, now have it so that the subcontrollers queue_updates sets the stale parameter and adds the config_update coros to an asyncio.Queue that is handled by the top controller which clears stale when the queue is empty. Now the subcontrollers don't need or have an update method of their own. |
20c383e to
ff0ced8
Compare
… to queue updates Remove stale_parameters from subcontrollers
…ock and stale_parameter to subsystem controllers
GDYendell
left a comment
There was a problem hiding this comment.
I think we are close now!
No problem! I've got another local branch to bring it up to compatibility with new FastCS, though I'll wait until something has been merged to settle how the handlers deal with controllers. |
Closes #54
tested against eiger sim, will try and test against a real detector soon