Skip to content
Snippets Groups Projects
Commit 9cf5d5cb authored by Douglas Araujo's avatar Douglas Araujo
Browse files

Merge branch 'add_namespace_variables' into 'master'

E3-1399: Add namespace to iocsh variables

See merge request !28
parents 52fef2f4 e3467a1f
No related branches found
No related tags found
1 merge request!28E3-1399: Add namespace to iocsh variables
Pipeline #171678 passed with warnings
EPICS_MODULE_NAME:=autosave
EPICS_MODULE_TAG:=tags/R5-10-2
E3_MODULE_VERSION:=5.10.2+2
E3_MODULE_VERSION:=5.10.2+3
E3_MODULE_NAME:=$(EPICS_MODULE_NAME)
E3_MODULE_SRC_PATH:=$(EPICS_MODULE_NAME)
......
#- Define autosave environment variables from shell environment, with suitable defaults
#- INCOMPLETE - Optional: Ok to save/restore save sets with missing values?
#- Default: 1
#- CA_RECONNECT - Optional: Retry connecting to PVs whose initial connection
#- attempt failed?, Default: 1
#- DATED_BACKUP - Optional: Save dated backup files?
#- Default: 1
#- CA_RECONNECT - Optional: Retry connecting to PVs whose initial connection
#- attempt failed?, Default: 1
#- NUM_SEQ - Optional: Number of sequenced backup files to write
#- Default: 3
#- SEQ_PERIOD - Optional: Time interval in seconds between sequenced backups
#- - Default: 300
#- VALUES_FILES_PASS0 - Optional: Filename, Default: values_pass0
#- VALUES_FILES_PASS1 - Optional: Filename, Default: values_pass1
#- SETTINGS_FILES - Optional: Filename, Default : settings
#- WAVEFORM_FILES - Optional: Filename, Default : waveform
#- VALUES_PERIOD_PASS0 - Optional, Default 5
#- VALUES_PERIOD_PASS1 - Optional, Default 10
#- SETTINGS_PERIOD - Optional, Default 5
#- WAVEFORM_PERIOD - Optional, Default 30
#- AUTOSAVE_INCOMPLETE - Optional: Ok to save/restore save sets with missing values?
#- Default: 1
#- AUTOSAVE_CA_RECONNECT - Optional: Retry connecting to PVs whose initial connection
#- attempt failed?, Default: 1
#- AUTOSAVE_DATED_BACKUP - Optional: Save dated backup files?
#- Default: 1
#- AUTOSAVE_NUM_SEQ - Optional: Number of sequenced backup files to write
#- Default: 3
#- AUTOSAVE_SEQ_PERIOD - Optional: Time interval in seconds between sequenced backups
#- Default: 300
#- AUTOSAVE_VALUES_FILES_PASS0 - Optional: Filename, Default: values_pass0
#- AUTOSAVE_VALUES_FILES_PASS1 - Optional: Filename, Default: values_pass1
#- AUTOSAVE_SETTINGS_FILES - Optional: Filename, Default : settings
#- AUTOSAVE_VALUES_PERIOD_PASS0 - Optional, Default 5
#- AUTOSAVE_VALUES_PERIOD_PASS1 - Optional, Default 10
#- AUTOSAVE_SETTINGS_PERIOD - Optional, Default 5
set_savefile_path ("$(AS_TOP)/$(IOCDIR)", "/save")
set_requestfile_path ("$(AS_TOP)/$(IOCDIR)", "/req")
......@@ -34,40 +30,40 @@ save_restoreSet_status_prefix("$(IOCNAME):as-")
save_restoreSet_Debug(0)
#- Ok to save/restore save sets with missing values (no CA connection to PV)?
save_restoreSet_IncompleteSetsOk($(INCOMPLETE=1))
save_restoreSet_IncompleteSetsOk($(AUTOSAVE_INCOMPLETE=1))
#- Tell save_restore to writed dated backup files.
save_restoreSet_DatedBackupFiles($(DATED_BACKUP=1))
save_restoreSet_DatedBackupFiles($(AUTOSAVE_DATED_BACKUP=1))
#- Tell save_restore to save sequence files.
#- save_restore to to maintain three copies of each *.sav file
save_restoreSet_NumSeqFiles($(NUM_SEQ=3))
save_restoreSet_NumSeqFiles($(AUTOSAVE_NUM_SEQ=3))
#- at 5 minute intervals
save_restoreSet_SeqPeriodInSeconds($(SEQ_PERIOD=300))
save_restoreSet_SeqPeriodInSeconds($(AUTOSAVE_SEQ_PERIOD=300))
#- should periodically retry connecting to PVs whose initial connection attempt failed
save_restoreSet_CAReconnect($(CA_RECONNECT=1))
save_restoreSet_CAReconnect($(AUTOSAVE_CA_RECONNECT=1))
#- Time interval in seconds between forced save-file writes. (-1 means forever).
#- This is intended to get save files written even if the normal trigger mechanism is broken.
save_restoreSet_CallbackTimeout(-1)
#- pass0 : save files are to be restored before record initialization
set_pass0_restoreFile("$(SETTINGS_FILES=settings).sav")
set_pass0_restoreFile("$(VALUES_FILES_PASS0=values_pass0).sav")
set_pass0_restoreFile("$(AUTOSAVE_SETTINGS_FILES=settings).sav")
set_pass0_restoreFile("$(AUTOSAVE_VALUES_FILES_PASS0=values_pass0).sav")
#- pass1 : save files are to be restored after record initialization
set_pass1_restoreFile("$(SETTINGS_FILES=settings).sav")
set_pass1_restoreFile("$(VALUES_FILES_PASS1=values_pass1).sav")
set_pass1_restoreFile("$(AUTOSAVE_SETTINGS_FILES=settings).sav")
set_pass1_restoreFile("$(AUTOSAVE_VALUES_FILES_PASS1=values_pass1).sav")
dbLoadRecords("save_restoreStatus.db", "P=$(IOCNAME):as-, DEAD_SECONDS=5")
#- Note afterInit supplied by require
afterInit("makeAutosaveFileFromDbInfo('$(AS_TOP)/$(IOCDIR)/req/$(SETTINGS_FILES=settings).req','autosaveFields')")
afterInit("makeAutosaveFileFromDbInfo('$(AS_TOP)/$(IOCDIR)/req/$(VALUES_FILES_PASS0=values_pass0).req','autosaveFields_pass0')")
afterInit("makeAutosaveFileFromDbInfo('$(AS_TOP)/$(IOCDIR)/req/$(VALUES_FILES_PASS1=values_pass1).req','autosaveFields_pass1')")
afterInit("makeAutosaveFileFromDbInfo('$(AS_TOP)/$(IOCDIR)/req/$(AUTOSAVE_SETTINGS_FILES=settings).req','autosaveFields')")
afterInit("makeAutosaveFileFromDbInfo('$(AS_TOP)/$(IOCDIR)/req/$(AUTOSAVE_VALUES_FILES_PASS0=values_pass0).req','autosaveFields_pass0')")
afterInit("makeAutosaveFileFromDbInfo('$(AS_TOP)/$(IOCDIR)/req/$(AUTOSAVE_VALUES_FILES_PASS1=values_pass1).req','autosaveFields_pass1')")
#- Note afterInit supplied by require
#- We don't need PREFIX, because generated req files has the hard-code PV names from DBInfo : info tag
afterInit("create_monitor_set('$(SETTINGS_FILES=settings).req','$(SETTINGS_PERIOD=5)')")
afterInit("create_monitor_set('$(VALUES_FILES_PASS0=values_pass0).req','$(VALUES_PASS0_PERIOD=5)')")
afterInit("create_monitor_set('$(VALUES_FILES_PASS1=values_pass1).req','$(VALUES_PASS1_PERIOD=10)')")
afterInit("create_monitor_set('$(AUTOSAVE_SETTINGS_FILES=settings).req','$(AUTOSAVE_SETTINGS_PERIOD=5)')")
afterInit("create_monitor_set('$(AUTOSAVE_VALUES_FILES_PASS0=values_pass0).req','$(AUTOSAVE_VALUES_PASS0_PERIOD=5)')")
afterInit("create_monitor_set('$(AUTOSAVE_VALUES_FILES_PASS1=values_pass1).req','$(AUTOSAVE_VALUES_PASS1_PERIOD=10)')")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment