94 lines
3.9 KiB
Plaintext
94 lines
3.9 KiB
Plaintext
# set EPICS according to BASE or default to 3.14.12
|
|
epicsEnvSet EPICS R$(EPICS_RELEASE=$(BASE=3.14.12))
|
|
|
|
# Start Logging
|
|
date 'epicsEnvSet IOC_STARTTIME "%Y-%m-%dT%H:%M:%S"' > /tmp/$(IOC).starttime
|
|
< /tmp/$(IOC).starttime
|
|
system "rm /tmp/$(IOC).starttime"
|
|
epicsEnvSet EPICS_IOC_LOG_INET $(EPICS_IOC_LOG_INET=gfa-syslog)
|
|
epicsEnvSet EPICS_IOC_LOG_PORT $(EPICS_IOC_LOG_PORT=1514)
|
|
|
|
# iocLogPrefix will fail for EPICS 3 but that's OK
|
|
iocLogPrefix "$(IOC) "
|
|
iocLogInit
|
|
errlog "starting EPICS $(EPICS) at $(IOC_STARTTIME)"
|
|
|
|
# Set up CA search lists for different networks
|
|
# ip command is supported by IFC1210, Moxa (old and new), Deltatau, Zynq, NI, SL6, RHEL7, Debian10
|
|
# To test: Gigafrost, rPI
|
|
system "ip a s `ip r|awk '/^default /{print $5;exit}'`|awk -F'[/ ]+' -vP='epicsEnvSet IP_ADDR' '/inet /{print P,$3;exit}'>/tmp/$(IOC).net"
|
|
< /tmp/$(IOC).net
|
|
system "rm /tmp/$(IOC).net"
|
|
|
|
# Default: Automatic, we will switch it off when necessary
|
|
epicsEnvSet EPICS_CA_AUTO_ADDR_LIST YES
|
|
epicsEnvUnset EPICS_CA_ADDR_LIST
|
|
|
|
# Office (only officicial EPICS subnets, not SLS beamlines!)
|
|
ifEnvSet $(IP_ADDR) ~129.129.130.* EPICS_CA_ADDR_LIST "129.129.131.255 129.129.137.255"
|
|
ifEnvSet $(IP_ADDR) ~129.129.131.* EPICS_CA_ADDR_LIST "129.129.130.255 129.129.137.255"
|
|
ifEnvSet $(IP_ADDR) ~129.129.137.* EPICS_CA_ADDR_LIST "129.129.130.255 129.129.131.255"
|
|
|
|
# SLS machine network
|
|
ifEnvSet $(IP_ADDR) ~172.22.* EPICS_CA_ADDR_LIST "172.22.4.255 172.22.5.255 172.22.6.255 172.22.7.255 172.22.120.255 172.22.121.255"
|
|
ifEnvSet $(IP_ADDR) ~172.22.* EPICS_CA_AUTO_ADDR_LIST NO
|
|
|
|
# Metro Lab
|
|
ifEnvSet $(IP_ADDR) ~129.129.128.* EPICS_CA_ADDR_LIST "129.129.128.255"
|
|
ifEnvSet $(IP_ADDR) ~129.129.128.* EPICS_CA_AUTO_ADDR_LIST NO
|
|
|
|
# SwissFEL machine networks
|
|
# with directed broadcasts
|
|
ifEnvSet $(IP_ADDR) ~172.26.* EPICS_CA_ADDR_LIST "172.26.0.255 172.26.2.255 172.26.8.255 172.26.16.255 172.26.24.255 172.26.32.255 172.26.40.255 172.26.110.255 172.26.111.255 172.26.120.255 saresa-cagw.psi.ch:5062 saresb-cagw.psi.ch:5062 saresc-cagw.psi.ch:5062 satese-cagw.psi.ch:5062 satesf-cagw.psi.ch:5062"
|
|
ifEnvSet $(IP_ADDR) ~172.26.* EPICS_CA_AUTO_ADDR_LIST NO
|
|
|
|
# SwissFEL end stations to machine via gateway
|
|
ifEnvSet $(IP_ADDR) ~129.129.242.* EPICS_CA_ADDR_LIST sf-saresa-cagw:5062
|
|
ifEnvSet $(IP_ADDR) ~129.129.243.* EPICS_CA_ADDR_LIST sf-saresb-cagw:5062
|
|
ifEnvSet $(IP_ADDR) ~129.129.244.* EPICS_CA_ADDR_LIST sf-saresc-cagw:5062
|
|
ifEnvSet $(IP_ADDR) ~129.129.245.* EPICS_CA_ADDR_LIST sf-satesd-cagw:5062
|
|
ifEnvSet $(IP_ADDR) ~129.129.246.* EPICS_CA_ADDR_LIST sf-satese-cagw:5062
|
|
ifEnvSet $(IP_ADDR) ~129.129.247.* EPICS_CA_ADDR_LIST sf-satesf-cagw:5062
|
|
|
|
# HIPA
|
|
ifEnvSet $(IP_ADDR) ~172.19.* EPICS_CA_ADDR_LIST "172.19.10.255 172.19.30.255 172.19.32.255"
|
|
ifEnvSet $(IP_ADDR) ~172.19.* EPICS_CA_AUTO_ADDR_LIST NO
|
|
|
|
# PROSCAN
|
|
ifEnvSet $(IP_ADDR) ~172.25.* EPICS_CA_ADDR_LIST "172.25.60.255 172.25.11.255"
|
|
ifEnvSet $(IP_ADDR) ~172.25.* EPICS_CA_AUTO_ADDR_LIST NO
|
|
|
|
# WLHA
|
|
ifEnvSet $(IP_ADDR) ~172.21.11.* EPICS_CA_ADDR_LIST 172.21.11.255
|
|
ifEnvSet $(IP_ADDR) ~172.21.11.* EPICS_CA_AUTO_ADDR_LIST NO
|
|
|
|
# set some search paths
|
|
epicsEnvSet EPICS_DRIVER_PATH "bin/R$(EPICS_RELEASE)_$(EPICS_HOST_ARCH):bin:snl:$(EPICS_MODULES=/ioc/modules)"
|
|
epicsEnvSet CFG, $(PWD)/cfg
|
|
epicsEnvSet STREAM_PROTOCOL_PATH, .:$(PWD)/cfg
|
|
|
|
# Allow non-monotonic breaktables
|
|
var dbBptNotMonotonic 1
|
|
|
|
# Quiet warnings about unresolved macros in comments
|
|
var dbQuietMacroWarnings 1
|
|
|
|
# IOC monitoring
|
|
require iocStats $(iocStats_VERSION=ifexists)
|
|
|
|
# Database Upload
|
|
require iocinfo $(iocinfo_VERSION=ifexists)
|
|
|
|
# caPutLog
|
|
epicsEnvSet EPICS_CA_PUT_LOG_ADDR, "gfa-syslog:1515"
|
|
# Set EPICS_CA_PUT_LOG_PREFIX for EPICS 3 but not for 7 because there we have iocLogPrefix
|
|
epicsEnvSet EPICS_CA_PUT_LOG_PREFIX_CMD_3 "epicsEnvSet EPICS_CA_PUT_LOG_PREFIX $(IOC)"
|
|
$(EPICS_CA_PUT_LOG_PREFIX_CMD_$(EPICS_VERSION_MAJOR=3)=)
|
|
require caPutLog $(caPutLog_VERSION=ifexists)
|
|
|
|
# sw installation version number
|
|
require versionnumbers ifexists
|
|
|
|
# autoSR location
|
|
epicsEnvSet SRBASE /ioc/data
|