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
{{ message }}
Repository navigation
Add property to Device and Signal that tracks connection state. #1475
In ophyd v1 each device and signal has a connected property that is updated live if a virtual circuit disconnects or reconnects. In order for a user interface to correctly display device state, it would be good to have something equivalent for ophyd async.
In aioca, this appears to be straightforward by accessing the channel cache via get_channel, though this is coming from a private module. Perhaps it could be re-exported? P4P doesn't have a way to do this, but I've added it in epics-base/p4p#229
Not exactly, I'm more interested in giving users feedback on whether or not devices are connected in a UI (and using that information to display or not display portions of the UI).
How will the UI use this? I imagine it would want to subscribe to changes in connected state instead of polling. You can do this on Signals at the moment with subscribe_reading which gives you back alarm_severity:
A subscription would work, and probably be preferable, but I'm intending to do this on a device level rather than a signal level. It's meant to just have a panel showing the connection state of each device with an option to attempt reconnects. Do we propagate child signal severity up to the device level?
Activity
jwlodek commentedon Nov 3, 2026
In aioca, this appears to be straightforward by accessing the channel cache via
get_channel, though this is coming from a private module. Perhaps it could be re-exported? P4P doesn't have a way to do this, but I've added it in epics-base/p4p#229jacopoabramo commentedon Nov 3, 2026
Is this somehow related to #1416 ?
jwlodek commentedon Nov 3, 2026
Not exactly, I'm more interested in giving users feedback on whether or not devices are connected in a UI (and using that information to display or not display portions of the UI).
jacopoabramo commentedon Nov 3, 2026
Got it. Still I guess it's also something I'd want to have too, it'll tie nicely with a graceful disconnection mechanism in the future
coretl commentedon Nov 10, 2026
How will the UI use this? I imagine it would want to subscribe to changes in connected state instead of polling. You can do this on Signals at the moment with
subscribe_readingwhich gives you backalarm_severity:ophyd-async/src/ophyd_async/epics/core/_aioca.py
Line 323 in 3203e00
I imagine there is already a subscription for updating value, so could use this?
jwlodek commentedon Nov 10, 2026
A subscription would work, and probably be preferable, but I'm intending to do this on a device level rather than a signal level. It's meant to just have a panel showing the connection state of each device with an option to attempt reconnects. Do we propagate child signal severity up to the device level?
jwlodek commentedon Nov 10, 2026
This is what I have in a UI at the beamline currently. I get connection state via the on-connect-hook, but it's not live.