# This is the common part of all startup scripts # It is included by all generated scripts # The following variables should be set before: # * IOC the system name of the ioc # * INSTBASE where to boot from # * SLSBASE alias for INSTBASE # * EPICS the epics release (e.g "R3.13.9") # * ARCH the vxWorks architecture (e.g. "T1-ppc604") # Accept SLSBASE or INSTBASE PBASE=0 symFindByName(sysSymTbl,"INSTBASE",&PBASE,0) symFindByName(sysSymTbl,"SLSBASE",&PBASE,0) SLSBASE=*PBASE INSTBASE=*PBASE STRINGBUFFER=malloc(256) # set the prompt sprintf (STRINGBUFFER, "%s (startup.script aborted) > ", IOC) shellPromptSet (STRINGBUFFER) # create some path variables HOME=malloc(80) sprintf (HOME, "/ioc/%s", IOC) CFG=malloc(80) sprintf (CFG, "%s/cfg", HOME) STREAM_PROTOCOL_DIR=malloc(80) sprintf (STREAM_PROTOCOL_DIR, "%s/cfg", HOME) LIB=malloc(80) sprintf (LIB, "%s/iocBoot/%s/%s", INSTBASE, EPICS, ARCH) TEMPLATES=malloc(80) sprintf (TEMPLATES, "%s/iocBoot/templates", INSTBASE) #Load EPICS version dependent script sprintf (STRINGBUFFER, "%s/iocBoot/startup/%s", INSTBASE, EPICS) ioGlobalStdSet (0, open (STRINGBUFFER, 0, 0)) #startup script contiues at /iocBoot/startup/