#==============================================================
#
#  Abs:  Generic piece of startup script for soft IOCs
#
#  Name: st.softgeneric.cmd
#
#  Side: Upon entry to this script, the following macros
#        are expected:
#            IOC_NAME - IOC devices name (i.e. SIOC:LI20:KY01)
#            ACF_INIT - channel access initalization script,
#                       including path
#
#        All other macros used within this script
#        are set from the file iocBoot/<ioc>/envPaths
#
#  Facility:  LCLS Klystron (High Power RF)
#
#  Auth: 05-Jan-2010, Kristi Luchini  (LUCHINI)
#  Rev:  dd-mmm-yyyy, Reviewer's Name (USERNAME)
#--------------------------------------------------------------
#  Mod:
#        28-Apr-2014, K. Luchini      (LUCHINI):
#          replace macro LOCA with IOC_NAME
#          add comments listing macros expected
#
#==============================================================
#
# Set environment variables
< envPaths

# iocAdmin environment variables
epicsEnvSet("ENGINEER"   , "Kristi Luchini")
epicsEnvSet("IOC_RESTORE", "${IOC_DATA}/${IOC}/restore")
epicsEnvSet("IOC_BOOT"   , "${TOP}/iocBoot/${IOC}")
epicsEnvSet("STARTUP"    , "${EPICS_IOCS}/${IOC}")
epicsEnvSet("ST_CMD"     , "startup.cmd")

# Change to the top of the app
cd ${TOP}

# Location of stream protocol files
epicsEnvSet("STREAM_PROTOCOL_PATH", "${TOP}/db")

# Load EPICS Database
dbLoadDatabase("dbd/HighPowerRF.dbd")
HighPowerRF_registerRecordDeviceDriver(pdbbase)

# Load record instances
dbLoadRecords("db/iocAdminSoft.db","IOC=${IOC_NAME}")
dbLoadRecords("db/iocRelease.db"  ,"IOC=${IOC_NAME}")

# Load Channel Access Security configuration file
< ${ACF_INIT}

# End of script






