#==============================================================
#
#  Abs:  Load MPS files and configure
#
#  Name: init_mps.cmd 
#
#  Side: Upon entry to this script, the following macros
#        are expected:
#     BOARD_IP         - IP address for carrier board
#     FPGA_IP          - FPGA IP Address and Slot number
#     YAML_CONFIG_FILE - Yam configuration filename
#     TOP_YAML_FILE    - Top Yaml filename, ex)<ioc>.yaml
#     DICT_FILE        - Dictionary file for manual,
#                        string empty of none.
#     IOC_DATA         - data dir path, wwrite access
#     IOC              - IOC name (from envpath)
#
#  Facility: EED Motion Control
#
#  Auth: dd-mmm-2018, Author's Name   (USERNAME)
#  Rev:  dd-mmm-yyyy, Reviewer's Name (USERNAME)
#--------------------------------------------------------------
#  Mod:
#        14-Oct-2024, Namrata Balakrishnan (namrata)
#           Updated function call based on L2MpsAsyn version 4.1.2
#
#==============================================================
# Configure asyn port driver
# L2MPSASYNConfig(
#    Port Name,    # the name given to this port driver
#    APP ID,       # the unique application ID
#    MPS Prefix)   # the MPS PV prefix

epicsEnvSet("L2MPSASYN_PORT","l2mpsasyn_port")

L2MPSASYNConfig("${L2MPSASYN_PORT}","${APP_ID}","${L2MPS_PREFIX}")

dbLoadRecords("db/mps.db","P=${L2MPS_PREFIX},PORT=${L2MPSASYN_PORT}")

