caproto icon indicating copy to clipboard operation
caproto copied to clipboard

caproto pyepics get_timevars updates value

Open teddyrendahl opened this issue 5 years ago • 1 comments

I honestly do not think this behavior is wrong so to speak, but felt it was worth pointing out that it is different than the pyepics behavior. In caproto we update the internal stored value of the PV when get_timevars is called.

https://github.com/caproto/caproto/blob/ce1c542713eed2895846e23aed35270280ce0447/caproto/threading/pyepics_compat.py#L572

In pyepics, count=1 is used to retrieve only the metadata

https://github.com/pyepics/pyepics/blob/f8c08aeb695aeb02aa9fd73695c086af7e289745/epics/ca.py#L1769

This will lead to a difference in value between the two libraries when:

  1. A user is not monitoring the PV
  2. The user requests the latest metadata
  3. The user checks the last seen value of the PV

teddyrendahl avatar Jul 16 '19 16:07 teddyrendahl