epics-modules / autosave

APS BCDA synApps module: autosave
https://epics-modules.github.io/autosave/
Other
8 stars 31 forks source link

for enums save number and string #7

Open dirk-zimoch opened 7 years ago

dirk-zimoch commented 7 years ago

This patch saves enums as index number and string. During restore, it tries to restore the string first. Only if that fails, it restored the index number. This can make a difference if new choices are inserted in the middle or choices are re-ordered. Examples are new breakpoint tables for the LINR field inserted in some other order than the date of implementation (e.g. alphabetically). The idea is that if the enum sorting changes, people usually want to have the old string choice restored (the user interface of enums), not the index number (the implementation).

This modification has originally been implemented by David Maden at SLS in 2005.

timmmooney commented 7 years ago

I like this idea. Thanks. However, I need to modify verify.c for compatibility with this, or refactor so that verify.c uses code in save_restore.c and dbrestore to read and write .sav files.