epics-modules / lua

Lua Scripting Record for EPICS
https://epics-modules.github.io/lua/
7 stars 4 forks source link

Inputs not updating under Base 3.16 #4

Open keenanlang opened 7 years ago

keenanlang commented 7 years ago

Describe the issue

Updating INPA-INPJ with a constant link doesn't update A-J in the record when compiled with Epics base 3.16, however the record behaves as expected under 3.14.12.5

Expected behaviour

Entering in a value such as "10" to the 'INPA' field should update the value in the 'A' field.

Actual behaviour

'A' field stays at 0.0000

Build Environment Architecture: linux-x86_64 Epics Base Version: 3.16.1 Dependent Module Versions: asyn 4-31

keenanlang commented 5 years ago

This appears to be due to a change in the way links are handled in 3.16 onward.

https://bugs.launchpad.net/epics-base/+bug/1824277

anjohnson commented 5 years ago

NB: The expected behavior has only ever applied to record types that mark their input link fields as special(SPC_MOD) and then reinitialize constant links in their special() routine. That is true for the calcout record in Base, plus probably most if not all synApps record types, but not for the Base calc record or most other record types that I know about.

Unfortunately the code I just looked at in the aCalcout::special() routine isn't going to work on Base 7.x when someone puts a JSON link address into an input link, since that code assumes that any link that isn't a CONSTANT must be a PV_LINK, which is no longer true.

Once I have released a fix for the launchpad bug we should probably meet to work out what changes are going to be needed to fix all your modules.