diff --git a/MAC/Deployment/data/PVSS/bin/create_db_files b/MAC/Deployment/data/PVSS/bin/create_db_files index 045a6d43f3319dd1f4c3c185ccb09417a511857c..49362e51d75704a5614cc2a8dd4b8ab3be59436c 100755 --- a/MAC/Deployment/data/PVSS/bin/create_db_files +++ b/MAC/Deployment/data/PVSS/bin/create_db_files @@ -93,15 +93,16 @@ concatfile() # create_ring_station_list() { + # Only create info for existing stations, which have a height != 0 in StationInfo.dat # stationname ID stationType ... cleanlist ${STATIONINFOFILE} | awk '{ - if ($3 == "C") { + if ($3 == "C" && substr($6,1,1) != "0") { print "Core_"$1 } - else if ($3 == "R") { + else if ($3 == "R" && substr($6,1,1) != "0") { print "Remote_"$1 } - else { + else if (substr($6,1,1) != "0") { print "Europe_"$1 } } ' >>/tmp/rslist @@ -114,15 +115,16 @@ create_ring_station_list() # create_stationfield_list() { + # Only create info for existing stations, which have a height != 0 in StationInfo.dat # stationname ID stationType ... cleanlist ${STATIONINFOFILE} | awk '{ - if ($3 == "C") { + if ($3 == "C" && substr($6,1,1) != "0") { print $1"HBA0" print $1"HBA1" print $1"HBA" - print $1"LBA" + print $1"LBA" } - else { + else if (substr($6,1,1) != "0") { print $1"HBA" print $1"LBA" } @@ -416,10 +418,12 @@ substitute_CtrlDebug() # substitute_uriboard() { - awk -v nrURIs=$NRURIS -v hasAartFaac = $AARTFAAC' + + awk -v nrURIs=$NRURIS -v hasAartFaac=$AARTFAAC ' { hasuri=index($1,"@uriboard@"); - if (hasuri > 0 && hasAartFaac) { + if (hasuri > 0 ) { + if (hasAartFaac == 1) { for (uriNr = 0; uriNr < nrURIs; uriNr++) { dpname=$1; cNr=0; @@ -427,14 +431,45 @@ substitute_uriboard() newname = sprintf("Cabinet%1d_URIBoard%1d",cNr,uriNr); sub("@uriboard@", newname, dpname); print dpname" "$2; - } - } + } + } + else { + print " "; + } + } else { print $1" "$2; } } ' } + + +# +# substitute_uniboard +# +# syntax of the lines must be: dp dpt +# +substitute_uniboard() +{ + awk -v hasAartFaac=$AARTFAAC ' + { + hasuni=index($1,"_@uniboard@"); + if (hasuni > 0 ) { + if (hasAartFaac == 1) { + dpname=$1; + sub("_@uniboard@", "", dpname); + print dpname" "$2; + } + else { + print " "; + } + } + else { + print $1" "$2; + } + } ' +} # # substitute_fpga # @@ -442,10 +477,11 @@ substitute_uriboard() # substitute_fpga() { - awk -v nrFPGAs=$NRFPGAS ' + awk -v nrFPGAs=$NRFPGAS -v hasAartFaac=$AARTFAAC ' { hasfpga=index($1,"@fpga@"); if (hasfpga > 0) { + if (hasAartFaac == 1) { for (fpgaNr = 0; fpgaNr < nrFPGAs; fpgaNr++) { dpname=$1; newname = sprintf("FPGA%1d",fpgaNr); @@ -453,6 +489,10 @@ substitute_fpga() print dpname" "$2; } } + else { + print " "; + } + } else { print $1" "$2; } @@ -1069,6 +1109,7 @@ create_dp_file() substitute_Cabinet_SubRack | \ substitute_fpga | \ substitute_uriboard | \ + substitute_uniboard | \ substitute_Cabinet | \ substitute_cluster_node | \ substitute_cluster | \ @@ -1459,7 +1500,7 @@ if [ "${DBTYPE}" == "S" ]; then let NRLBAS=`grep -s ${STNNAME}[[:space:]] ${STATIONINFOFILE} | awk '{ print $9 }'` let NRHBAS=`grep -s ${STNNAME}[[:space:]] ${STATIONINFOFILE} | awk '{ print $10 }'` HASAARTFAAC=`grep -s ${STNNAME}[[:space:]] ${STATIONINFOFILE} | awk '{ print $13 }'` - if [ "${HASAARTFAAC}" == "Yes" }; then + if [ "${HASAARTFAAC}" == "Yes" ]; then let AARTFAAC=1 fi fi diff --git a/MAC/Deployment/data/PVSS/data/PVSSDataPoints.base b/MAC/Deployment/data/PVSS/data/PVSSDataPoints.base index 6829f6430664a3cda6969705736668781b161658..dc964681118d4e3363ffc3406134ecda0d41a64a 100644 --- a/MAC/Deployment/data/PVSS/data/PVSSDataPoints.base +++ b/MAC/Deployment/data/PVSS/data/PVSSDataPoints.base @@ -85,7 +85,7 @@ SubRack SRCK S N LOFAR_PIC_@cabinet@_@subrack@ RSPBoard RSP S N LOFAR_PIC_@cabinet@_@subrack@_@RSPBoard@ RCU RCU S N LOFAR_PIC_@cabinet@_@subrack@_@RSPBoard@_@rcu@ TBBoard TBB S Y LOFAR_PIC_@cabinet@_@subrack@_@TBBoard@ -UniBoard UNI S N LOFAR_PIC_Cabinet1_UniBoard +UniBoard UNI S N LOFAR_PIC_Cabinet1_UniBoard_@uniboard@ FPGA FPGA S Y LOFAR_PIC_Cabinet1_UniBoard_@fpga@ URIBoard URI S Y LOFAR_PIC_@uriboard@ LBAAntenna LBA S Y LOFAR_PIC_@lbaantenna@