From 7c29b77051581a501caddaac0cd2adcee3da99d9 Mon Sep 17 00:00:00 2001
From: timmmooney <mooney@aps.anl.gov>
Date: Fri, 14 May 2004 21:54:59 +0000
Subject: [PATCH] Split out save_restore.cmd from st.cmd, include the database
 load in save_restore.cmd

---
 iocBoot/iocUnix/save_restore.cmd    | 16 ++++++++++------
 iocBoot/iocUnix/st.cmd              |  9 ++++-----
 iocBoot/iocvxWorks/save_restore.cmd | 16 ++++++++++------
 iocBoot/iocvxWorks/st.cmd           | 11 +++++------
 4 files changed, 29 insertions(+), 23 deletions(-)

diff --git a/iocBoot/iocUnix/save_restore.cmd b/iocBoot/iocUnix/save_restore.cmd
index 312c393..f045af6 100644
--- a/iocBoot/iocUnix/save_restore.cmd
+++ b/iocBoot/iocUnix/save_restore.cmd
@@ -1,4 +1,11 @@
 ### save_restore setup
+#
+# The rest this file does not require modification for standard use, but...
+# If you want save_restore to manage its own NFS mount, specify the name and
+# IP address of the file server to which save files should be written.
+# This currently is supported only on vxWorks.
+#save_restoreSet_NFSHost("oxygen", "164.54.52.4")
+
 # status-PV prefix
 save_restoreSet_status_prefix("xxx:")
 # Debug-output level
@@ -14,11 +21,6 @@ save_restoreSet_NumSeqFiles(3)
 # Time interval between sequenced backups
 save_restoreSet_SeqPeriodInSeconds(300)
 
-# If you want save_restore to manage its own NFS mount, specify the name and
-# IP address of the file server to which save files should be written.
-# This currently is supported only on vxWorks.
-#save_restoreSet_NFSHost("oxygen", "164.54.52.4")
-
 # specify where save files should be
 set_savefile_path(startup, "autosave")
 
@@ -32,7 +34,7 @@ set_pass1_restoreFile("auto_settings.sav")
 # specify directories in which to to search for included request files
 set_requestfile_path(startup, "")
 set_requestfile_path(startup, "autosave")
-set_requestfile_path(autosave, "autosaveApp/Db")
+set_requestfile_path(autosave, "asApp/Db")
 set_requestfile_path(calc, "calcApp/Db")
 #set_requestfile_path(camac, "camacApp/Db")
 set_requestfile_path(ccd, "ccdApp/Db")
@@ -49,3 +51,5 @@ set_requestfile_path(quadem, "quadEMApp/Db")
 set_requestfile_path(sscan, "sscanApp/Db")
 set_requestfile_path(std, "stdApp/Db")
 set_requestfile_path(vme, "vmeApp/Db")
+
+dbLoadRecords("$(AUTOSAVE)/asApp/Db/save_restoreStatus.db", "P=xxx:")
diff --git a/iocBoot/iocUnix/st.cmd b/iocBoot/iocUnix/st.cmd
index 1d88cc7..8c0bace 100644
--- a/iocBoot/iocUnix/st.cmd
+++ b/iocBoot/iocUnix/st.cmd
@@ -35,8 +35,6 @@ initSerialServer("serial2", "serial2", 1000, 20, "")
 #initSerialServer("serial5","serial5",1000,20,"") 
 #initSerialServer("serial6","serial6",1000,20,"") 
  
-< save_restore.cmd
-
 # need more entries in wait/scan-record channel-access queue?
 #var recDynLinkQsize, 1024
 
@@ -45,9 +43,10 @@ initSerialServer("serial2", "serial2", 1000, 20, "")
 # plot doesn't display
 epicsEnvSet EPICS_CA_MAX_ARRAY_BYTES 64008
 
-### save_restore
-#dbLoadRecords("$(AUTOSAVE)asApp/Db/SR_array_test.vdb", "P=xxx:,N=10")
-dbLoadRecords("$(AUTOSAVE)asApp/Db/save_restoreStatus.db", "P=xxx:")
+### save_restore setup
+# We presume a suitable initHook routine was compiled into the executable.
+# See also create_monitor_set(), after iocInit() .
+< save_restore.cmd
 
 # Love Controllers
 #var devLoveDebug,1
diff --git a/iocBoot/iocvxWorks/save_restore.cmd b/iocBoot/iocvxWorks/save_restore.cmd
index 64b0da9..1e05c96 100644
--- a/iocBoot/iocvxWorks/save_restore.cmd
+++ b/iocBoot/iocvxWorks/save_restore.cmd
@@ -1,4 +1,11 @@
 ### save_restore setup
+#
+# The rest this file does not require modification for standard use, but...
+# If you want save_restore to manage its own NFS mount, specify the name and
+# IP address of the file server to which save files should be written.
+# This currently is supported only on vxWorks.
+save_restoreSet_NFSHost("oxygen", "164.54.52.4")
+
 # status-PV prefix
 save_restoreSet_status_prefix("xxx:")
 # Debug-output level
@@ -14,11 +21,6 @@ save_restoreSet_NumSeqFiles(3)
 # Time interval between sequenced backups
 save_restoreSet_SeqPeriodInSeconds(300)
 
-# If you want save_restore to manage its own NFS mount, specify the name and
-# IP address of the file server to which save files should be written.
-# This currently is supported only on vxWorks.
-save_restoreSet_NFSHost("oxygen", "164.54.52.4")
-
 # specify where save files should be
 set_savefile_path(startup, "autosave")
 
@@ -32,7 +34,7 @@ set_pass1_restoreFile("auto_settings.sav")
 # specify directories in which to to search for included request files
 set_requestfile_path(startup, "")
 set_requestfile_path(startup, "autosave")
-set_requestfile_path(autosave, "autosaveApp/Db")
+set_requestfile_path(autosave, "asApp/Db")
 set_requestfile_path(calc, "calcApp/Db")
 #set_requestfile_path(camac, "camacApp/Db")
 set_requestfile_path(ccd, "ccdApp/Db")
@@ -49,3 +51,5 @@ set_requestfile_path(quadem, "quadEMApp/Db")
 set_requestfile_path(sscan, "sscanApp/Db")
 set_requestfile_path(std, "stdApp/Db")
 set_requestfile_path(vme, "vmeApp/Db")
+
+dbLoadRecords("$(AUTOSAVE)/asApp/Db/save_restoreStatus.db", "P=xxx:")
diff --git a/iocBoot/iocvxWorks/st.cmd b/iocBoot/iocvxWorks/st.cmd
index 89e911a..30cf057 100644
--- a/iocBoot/iocvxWorks/st.cmd
+++ b/iocBoot/iocvxWorks/st.cmd
@@ -41,8 +41,6 @@ localMessageRouterStart(0)
 # This IOC configures the MPF server code locally
 #< st_mpfserver.cmd
 
-< save_restore.cmd
-
 # override address, interrupt vector, etc. information in module_types.h
 #module_types()
 
@@ -60,6 +58,11 @@ putenv "EPICS_CA_MAX_ARRAY_BYTES=64008"
 dbLoadDatabase("../../dbd/iocxxxVX.dbd")
 iocxxxVX_registerRecordDeviceDriver(pdbbase)
 
+### save_restore setup
+# We presume a suitable initHook routine was compiled into xxx.munch.
+# See also create_monitor_set(), after iocInit() .
+< save_restore.cmd
+
 ##############################################################################
 
 # Insertion-device control
@@ -143,10 +146,6 @@ oms58Setup(3, 8, 0x4000, 190, 5, 10)
 
 ###############################################################################
 
-### save_restore
-dbLoadRecords("$(AUTOSAVE)/asApp/Db/SR_array_test.vdb", "P=xxx:,N=10")
-dbLoadRecords("$(AUTOSAVE)/asApp/Db/save_restoreStatus.db", "P=xxx:")
-
 ### Scalers: Joerger VSC8/16
 #dbLoadRecords("$(VME)/vmeApp/Db/Jscaler.db","P=xxx:,S=scaler1,C=0")
 dbLoadRecords("$(STD)/stdApp/Db/scaler.db","P=xxx:,S=scaler1,C=0,DTYP=Joerger VSC8/16,FREQ=10000000")
-- 
GitLab