#!../../bin/linux-x86_64/amq #This file was created by using the command "awk -f makeIocs.gk clasrun.clasprod.daq.HallB_DAQ.dat" on Thu Feb 08 16:52:04 EST 2018 < envPaths cd ${TOP} ## Register all support components dbLoadDatabase "dbd/amq.dbd" amq_registerRecordDeviceDriver pdbbase # ConnectMQ("tcp://gluon27:61616","clasrun.clasprod.daq.HallB_DAQ") ## Load record instances #The RAWMESG key means don't parse for JSON, but writes the whole message into #a waveform PV up to NELM characters. TYPE must be CHAR. #Eg. dbLoadRecords("db/amqStringArray.db","P=B,K=RAWMSG,N=200") #Now PVs pulling from json objects #There are 4 types: #1 Int #2 Double #3 Array of Ints #4 Array of Doubles #5 String #Types 1 and 2 for into aiRecords #Types 3,4,5 go into waveformRecords (with FTVL=DBR_LONG, DBR_DOUBLE, DBR_CHAR respectively) #The required macros are: #P = Prefix #K = json key #N = No of elements in the array, if required dbLoadRecords("db/amqStringArray.db","P=hd:daq:RAWMSG,K=RAWMSG,N=1000,TH=0,THH=0,HSV=NO_ALARM,HHSV=NO_ALARM") dbLoadRecords("db/amqInt.db","P=hd:daq:LiveTime,K=LiveTime,TH=10,THH=20,HSV=MINOR,HHSV=MAJOR") dbLoadRecords("db/amqDouble.db","P=hd:daq:EventRate,K=EventRate,TH=10,THH=20,HSV=MINOR,HHSV=MAJOR") dbLoadRecords("db/amqIntArray.db","P=hd:daq:TestScalers,K=TestScalers,N=20,TH=10,THH=20,HSV=MINOR,HHSV=MAJOR") dbLoadRecords("db/amqFloatArray.db","P=hd:daq:TestVals,K=TestVals,N=20,TH=5,THH=10,HSV=MINOR,HHSV=MAJOR") dbLoadRecords("db/amqStringArray.db","P=hd:daq:NameAddress,K=NameAddress,N=100,TH=0,THH=0,HSV=NO_ALARM,HHSV=NO_ALARM") dbLoadRecords("db/amqHistogram.db","P=hd:daq:TestHist,K=TestHist,N=100,NE=101,TH=10,THH=20,HSV=MINOR,HHSV=MAJOR") dbLoadRecords("db/amqIntArray.db","P=hd:daq:FTScalers,K=FTScalers,N=100,TH=0,THH=30,HSV=NO_ALARM,HHSV=MAJOR") dbLoadRecords("db/amqDoubleArray.db","P=hd:daq:FTClusterPosition,K=FTClusterPosition,N=1000,TH=0,THH=30,HSV=NO_ALARM,HHSV=MAJOR") dbLoadRecords("db/amqDoubleArray.db","P=hd:daq:FTClusterEnergy,K=FTClusterEnergy,N=1000,TH=0,THH=30,HSV=NO_ALARM,HHSV=MAJOR") dbLoadRecords("db/amqDoubleArray.db","P=hd:daq:FTClusterNHits,K=FTClusterNHits,N=9,TH=0,THH=30,HSV=NO_ALARM,HHSV=MAJOR") dbLoadRecords("db/amqDoubleArray.db","P=hd:daq:FTClusterPositionHodo,K=FTClusterPositionHodo,N=1000,TH=0,THH=30,HSV=NO_ALARM,HHSV=MAJOR") dbLoadRecords("db/amqDoubleArray.db","P=hd:daq:FTClusterEnergyHodo,K=FTClusterEnergyHodo,N=1000,TH=0,THH=30,HSV=NO_ALARM,HHSV=MAJOR") dbLoadRecords("db/amqDoubleArray.db","P=hd:daq:FTClusterNHitsHodo,K=FTClusterNHitsHodo,N=9,TH=0,THH=30,HSV=NO_ALARM,HHSV=MAJOR") dbLoadRecords("db/amqDoubleArray.db","P=hd:daq:trig2vtp_VTPGT_TRIGGERBITS,K=trig2vtp_VTPGT_TRIGGERBITS,N=32,TH=0,THH=30,HSV=NO_ALARM,HHSV=MAJOR") dbLoadRecords("db/amqDoubleArray.db","P=hd:daq:adcecal1vtp_VTPECS_CLUSTERS,K=adcecal1vtp_VTPECS_CLUSTERS,N=4,TH=0,THH=30,HSV=NO_ALARM,HHSV=MAJOR") dbLoadRecords("db/amqDoubleArray.db","P=hd:daq:adcecal2vtp_VTPECS_CLUSTERS,K=adcecal2vtp_VTPECS_CLUSTERS,N=4,TH=0,THH=30,HSV=NO_ALARM,HHSV=MAJOR") dbLoadRecords("db/amqDoubleArray.db","P=hd:daq:adcecal3vtp_VTPECS_CLUSTERS,K=adcecal3vtp_VTPECS_CLUSTERS,N=4,TH=0,THH=30,HSV=NO_ALARM,HHSV=MAJOR") dbLoadRecords("db/amqDoubleArray.db","P=hd:daq:adcecal4vtp_VTPECS_CLUSTERS,K=adcecal4vtp_VTPECS_CLUSTERS,N=4,TH=0,THH=30,HSV=NO_ALARM,HHSV=MAJOR") dbLoadRecords("db/amqDoubleArray.db","P=hd:daq:adcecal5vtp_VTPECS_CLUSTERS,K=adcecal5vtp_VTPECS_CLUSTERS,N=4,TH=0,THH=30,HSV=NO_ALARM,HHSV=MAJOR") dbLoadRecords("db/amqDoubleArray.db","P=hd:daq:adcecal6vtp_VTPECS_CLUSTERS,K=adcecal6vtp_VTPECS_CLUSTERS,N=4,TH=0,THH=30,HSV=NO_ALARM,HHSV=MAJOR") dbLoadRecords("db/amqDoubleArray.db","P=hd:daq:adcpcal1vtp_VTPPCS_CLUSTERS,K=adcpcal1vtp_VTPPCS_CLUSTERS,N=4,TH=0,THH=30,HSV=NO_ALARM,HHSV=MAJOR") dbLoadRecords("db/amqDoubleArray.db","P=hd:daq:adcpcal2vtp_VTPPCS_CLUSTERS,K=adcpcal2vtp_VTPPCS_CLUSTERS,N=4,TH=0,THH=30,HSV=NO_ALARM,HHSV=MAJOR") dbLoadRecords("db/amqDoubleArray.db","P=hd:daq:adcpcal3vtp_VTPPCS_CLUSTERS,K=adcpcal3vtp_VTPPCS_CLUSTERS,N=4,TH=0,THH=30,HSV=NO_ALARM,HHSV=MAJOR") dbLoadRecords("db/amqDoubleArray.db","P=hd:daq:adcpcal4vtp_VTPPCS_CLUSTERS,K=adcpcal4vtp_VTPPCS_CLUSTERS,N=4,TH=0,THH=30,HSV=NO_ALARM,HHSV=MAJOR") dbLoadRecords("db/amqDoubleArray.db","P=hd:daq:adcpcal5vtp_VTPPCS_CLUSTERS,K=adcpcal5vtp_VTPPCS_CLUSTERS,N=4,TH=0,THH=30,HSV=NO_ALARM,HHSV=MAJOR") dbLoadRecords("db/amqDoubleArray.db","P=hd:daq:adcpcal6vtp_VTPPCS_CLUSTERS,K=adcpcal6vtp_VTPPCS_CLUSTERS,N=4,TH=0,THH=30,HSV=NO_ALARM,HHSV=MAJOR") dbLoadRecords("db/iocAdminSoft.db","IOC=$(IOC)") cd ${TOP}/iocBoot/${IOC} iocInit #Need this to start responding to messages after all records are defined StartMQ() dbl > pv.list