#!../../bin/linux-x86_64/amq #This file was created by using the command "awk -f makeIocs.gk halld_test.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","halld_test") ## 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/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