pcdshub / typhos

Automatic-yet-customizable Graphical User Interface Generation for Ophyd Devices
http://pcdshub.github.io/typhos
Other
16 stars 26 forks source link

FIX: write pv assumption #475

Closed klauer closed 2 years ago

klauer commented 2 years ago

Description

_write_pv and _read_pv are generally good assumptions for EpicsSignalBase and its subclasses. However, typhos should be lenient if/when access to these attributes fails.

pcdsdevices may also require adjustments to PytmcSignalRO, but that shouldn't affect this PR.

Motivation and Context

Closes #474 Closes #473

How Has This Been Tested?

Test suite and interactively with problematic PytmcSignalRO signal.

Where Has This Been Documented?

Issue and PR text.

ZLLentz commented 2 years ago

I think this looks correct to me, and should work for both the pyepics and caproto backends.

Do you remember exactly which device was throwing this error so we can test it? If not, I can start opening all the screens again.

klauer commented 2 years ago

I don't recall the device, but it had a PytmcSignalRO if I recall correctly, so that should narrow it down.

ZLLentz commented 2 years ago

That was enough to find it: the devices are rtdsl0 and rtdsk0, whose subdevices have a state setpoint that is a PytmcSignalRO... so they don't function as movable state devices. I think they need an additional fix in pcdsdevices but this probably removes the terminal spam error (I'll check)

ZLLentz commented 2 years ago

The aforementioned screens are very happy with this PR. We can check if they would actually move their respective devices over the PAMM but I think this should be merged.

klauer commented 2 years ago

Nice - OK! 👍 This was totally untested, so thanks for the test run.

ZLLentz commented 2 years ago

ah right I'll just make sure the filters move on the screen after lunch and then press merge

ZLLentz commented 2 years ago

OK the device on the pcdsdevices side definitely needs a looking at but this is pretty good for all normal devices and it removes the error