On Jun 17, 2020, at 11:25 AM, Mostafa, Jalal (IPE) via Tech-talk <
tech-talk at aps.anl.gov> wrote:
We have quite "dynamic" configuration files for EPICS i.e. records can change very often (new records, change in the unit of measurement, ...).
Is there a way to load a new database record file after
`iocInit` without restarting the IOC? or even adding records at runtime?
No, sorry. You can change unit strings and scaling at runtime, just modify the EGU and EGUL/EGUF or ESLO/EOFF fields of the records, but adding records after iocInit is not possible at the moment.
The internal IOC data structures that hold the records are not protected by mutexes, so any changes to add new records run the risk of crashing the IOC (people have done that in the past but it was risky). There is no API at all for removing records, and
in recent versions of Base dbLoadRecords() will abort if you try to use it after iocInit.
It should obviously be possible to work out what would need to be done to allow that, but it would take some effort to do and the result could slow down some of the internal IOC facilities. In particular record processing and name searches can currently
happen at any time, run in other tasks, and the code would need to ensure that those operations don’t try to access the data structures while a new record is getting inserted. There would also probably need to be other changes to support record loading, the
parser might need some changes.
If you have resources available (either money or experienced developers) this could be done, but I don’t think it will happen unless & until some lab decides to fund that.
- Andrew
--
Complexity comes for free, simplicity you have to work for.