pcdshub / lightpath

LCLS Lightpath Module
https://pcdshub.github.io/lightpath
Other
4 stars 9 forks source link

ENH: add `state_summary` to LightpathState, for showing select device signal information #158

Open tangkong opened 1 year ago

tangkong commented 1 year ago

Expected Behavior

From discussions on #157

I wonder if there is any metadata we could slide into the LightpathState dataclass to use in this space in an efficient way instead of the ad hoc "grab a few signals and make widgets".

Possible Solution

Just as an idea for a follow-up for what to do with the space, what if we extend like:

@dataclass class LightpathState: inserted: bool removed: bool transmission: float output_branch: str state_summary: str = "" And then devices can provide text to lightpath to include in a label. Just a small idea, there are probably better ways to do this.

Context

157

The commands widget was removed, and along with it the visibility of hinted signals. it might be nice to see these return, if performance issues can be solved. Implementing this should come with careful consideration of which components are being "woken up" and the ensuing performance impacts

Your Environment

pcds-5.4.2+lightpath pr's

ZLLentz commented 1 year ago

I think collecting the extra display data as "the device picks a string at the same time as when it figures out if its inserted" is going to be pretty efficient compared to previous "inspect the device, do some cagets, check the metadata" that needed to go on previously