Skip to content
Snippets Groups Projects
Commit fb528553 authored by Arno Schoenmakers's avatar Arno Schoenmakers
Browse files

Task #7144: Adpated create_db_files and PVSSDataPoints.base to solve issues in #7144

parent 2a3c6627
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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@
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment