#==============================================================
#
#  Abs:  Initialize SLAC Event Receiver Hardware and load Dbs
#
#  Name: init_evrma.cmd
#
#  Side:  This script expectes the following environment 
#          variables tobe defined upon entry:
#           IOC_NAME   - IOC Device nme,            (ie. SIOC:IN20:LS01)
#           EVR_DEVICE - EVR Device name            (ie. EVR:IN20:LS01)
#
#         Some of the above macros are defined by the script
#         envPaths which is generated during the make build
#         ioc the iocBoot/<facility>/<nodename>
#
#         Upon entering, this script epectes to be at the TOP
#         of the application, so that it can load databases 
#         directly from the "db" directory.
#
#         Upon exit, this script will leave the ioc sitting
#         at the application TOP directory when the following
#         is defined in the Makefile:
#
#  Add eevrmaConfigure for each VEVR before iocInit.
#    eevrmaConfigure <instance> <vevrDevName>
#    where instance = EVR instance, starting from 0, incrementing by 1
#                     for each subsequent card.  Only 1 EVR instance
#                    is allowed for Embedded EVRs.
#
#  Facility: EED Laser Controls
#
#  Auth: 08-Feb-2018, James Morad     (JMORAD)
#  Rev:  dd-mmm-yyyy, Reviewer's Name (USERNAME)
#--------------------------------------------------------------
#  Mod:
#        20-Sep-2021, K. Luchini      (LUCHINI):
#         copy from init_evrma.cmd for lcls
#
#==============================================================

# Debug interest level for EVR Driver
# ErDebug=100

# Here we have an VEVR
eevrmaConfigure(0, "/dev/${VER}")

# Add evrInitialize (after ErConfigure) if a fiducial routine will be
# registered before iocInit driver initialization:
#evrInitialize()
dbLoadRecords("db/EVRPatternSupport-facet.db","DEVICE=${IOC_NAME}")
dbLoadRecords("db/EVRSupport-facet.db","DEVICE=${EVR_DEVICE}")

# End of file


