#!../../bin/linux-x86/sysck

## You may have to change sysck to something else
## everywhere it appears in this file

< envPaths

# IOCs can load settings which are common
# for all IOCs. Such as EPICS_CA_ADDR_LIST, etc...
# The file: pre_st.cmd does the trick
# </afs/slac/g/lcls/build/epics/iocCommon/All/pre_st.cmd


cd ${TOP}

## Register all support components
dbLoadDatabase("dbd/sysck.dbd")
sysck_registerRecordDeviceDriver(pdbbase)

# Load iocAdmin
dbLoadRecords("db/iocAdminSoft.db","IOC=SIOC:SYS0:CK00")

## Load record instances
dbLoadRecords("db/dbExample.vdb","USER=LCLS")
#dbLoadRecords("db/dbExample1.db","user=jingchenHost")
#dbLoadRecords("db/dbExample2.db","user=jingchenHost,no=1,scan=1 second")
#dbLoadRecords("db/dbExample2.db","user=jingchenHost,no=2,scan=2 second")
#dbLoadRecords("db/dbExample2.db","user=jingchenHost,no=3,scan=5 second")
#dbLoadRecords("db/dbSubExample.db","user=jingchenHost")

# Restore PVs from channel watcher
dbRestore("${IOC_DATA}/${IOC}/SIOC-SYS0-CK00.sav", "CK00")

## Set this to see messages from mySub
#var mySubDebug 1

## Load Access Security File
asSetFilename("${TOP}/db/sysckAccessControl.acf")

cd ${TOP}/iocBoot/${IOC}
iocInit()

## Start logging messages before starting sequences.
iocLogInit()

## Log values only on change
caPutLogInit()

## Start any sequence programs
#seq sncExample,"user=jingchenHost"

## Now we need to do a favor for the IRMIS crawler
## All IOCs should dump some common info after initial
## startup.
## The file: post_st.cmd does the trick
#</afs/slac/g/lcls/build/epics/iocCommon/All/post_st.cmd
