diff --git a/MAC/Navigator2/panels/Hardware/HBAAntenna.pnl b/MAC/Navigator2/panels/Hardware/HBAAntenna.pnl index 6bb4423a979cdf28a395c044f5d47406e31b3d71..2b5ad4f9aae5ff9b8021a0b1c5d636b498cd5b0e 100644 --- a/MAC/Navigator2/panels/Hardware/HBAAntenna.pnl +++ b/MAC/Navigator2/panels/Hardware/HBAAntenna.pnl @@ -35,22 +35,6 @@ PANEL,-1 -1 1047 803 N "_3DFace" 0 void prepareHardwareList() { dynAppend(g_stationList,navFunct_bareDBName(sysName)); dynAppend(g_HBAList,hbaNr); - dynAppend(g_elementList,0); - dynAppend(g_elementList,1); - dynAppend(g_elementList,2); - dynAppend(g_elementList,3); - dynAppend(g_elementList,4); - dynAppend(g_elementList,5); - dynAppend(g_elementList,6); - dynAppend(g_elementList,7); - dynAppend(g_elementList,8); - dynAppend(g_elementList,9); - dynAppend(g_elementList,10); - dynAppend(g_elementList,11); - dynAppend(g_elementList,12); - dynAppend(g_elementList,13); - dynAppend(g_elementList,14); - dynAppend(g_elementList,15); } // @@ -232,7 +216,7 @@ E "main() 2 18 "theHBAAntenna" "" -1 80.04925642195182 24 E E E 1 E 1 E N "_WindowText" E N "_Window" E E +1 82.41960194758174 24 E E E 1 E 1 E N "_WindowText" E N "_Window" E E E E 235 0 0 0 0 0 E E E diff --git a/MAC/Navigator2/panels/Hardware/LOFAR_Remote.pnl b/MAC/Navigator2/panels/Hardware/LOFAR_Remote.pnl index 640fe8fcd145d907f1309da212e995c824a27a15..852debc891b2052a6450b70aa07125ab626dfcdb 100644 --- a/MAC/Navigator2/panels/Hardware/LOFAR_Remote.pnl +++ b/MAC/Navigator2/panels/Hardware/LOFAR_Remote.pnl @@ -13,7 +13,7 @@ PANEL,-1 -1 1075 795 N "_3DFace" 0 void prepareHardwareList() { dynAppend(g_stationList,navFunct_bareDBName(CEPDBName)); dynAppend(g_stationList,\"Core\"); - dynAppend(g_stationList,\"RS104\"); +// dynAppend(g_stationList,\"RS104\"); dynAppend(g_stationList,\"RS106\"); // dynAppend(g_stationList,\"RS107\"); dynAppend(g_stationList,\"RS205\"); @@ -21,18 +21,19 @@ void prepareHardwareList() { // dynAppend(g_stationList,\"RS207\"); dynAppend(g_stationList,\"RS208\"); dynAppend(g_stationList,\"RS210\"); + dynAppend(g_stationList,\"RS305\"); dynAppend(g_stationList,\"RS306\"); dynAppend(g_stationList,\"RS307\"); // dynAppend(g_stationList,\"RS308\"); // dynAppend(g_stationList,\"RS309\"); dynAppend(g_stationList,\"RS310\"); // dynAppend(g_stationList,\"RS311\"); - dynAppend(g_stationList,\"RS404\"); +// dynAppend(g_stationList,\"RS404\"); dynAppend(g_stationList,\"RS406\"); dynAppend(g_stationList,\"RS407\"); // dynAppend(g_stationList,\"RS408\"); dynAppend(g_stationList,\"RS409\"); - dynAppend(g_stationList,\"RS410\"); +// dynAppend(g_stationList,\"RS410\"); // dynAppend(g_stationList,\"RS411\"); // dynAppend(g_stationList,\"RS412\"); // dynAppend(g_stationList,\"RS413\"); @@ -102,7 +103,7 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 0 1 E U 2 1 0 "pictures/LOFAR_Remote.jpg" 13434828 E 0 0 1008 744 +E E 0 1 1 0 1 E 1 0 1 -10 0 2 1 0 "pictures/LOFAR_Remote.jpg" 13434828 E 0 0 1008 744 1 7 10 "" 2 0 1 8 10 "1" 1 @@ -157,12 +158,6 @@ E E 0 1 1 0 1 E U 2 1 0 "pictures/LOFAR_Remote.jpg" 13434828 E 0 0 1008 744 0 1 33 21 "" 1 0 -1 34 22 "" 2 -0 -1 35 22 "1" 1 -0 -1 36 22 "" 1 -0 1 37 24 "" 2 0 1 38 24 "1" 1 @@ -181,18 +176,6 @@ E E 0 1 1 0 1 E U 2 1 0 "pictures/LOFAR_Remote.jpg" 13434828 E 0 0 1008 744 0 1 45 30 "" 1 0 -1 46 32 "" 2 -0 -1 47 32 "1" 1 -0 -1 48 32 "" 1 -0 -1 49 33 "" 2 -0 -1 50 33 "1" 1 -0 -1 51 33 "" 1 -0 1 52 34 "" 2 0 1 53 34 "1" 1 @@ -251,15 +234,15 @@ LANG:1 6 Layer8 1 "$Station""RS106" 3 12 "PANEL_REF13" -1 -"objects\\Hardware\\Station_small.pnl" 457 486 T 33 0.7424242424242424 0 0.7407407407407407 238.1779915092959 117.1415586739259 +"objects\\Hardware\\Station_small.pnl" 457 486 T 33 0.7424242424242424 0 0.7407407407407407 228.1779915092959 117.1415586739259 1 "$Station""RS208" 3 14 "PANEL_REF15" -1 -"objects\\Hardware\\Station_small.pnl" 457 486 T 35 0.7424242424242424 0 0.7407407407407407 178.1779915092959 -22.85844132607411 +"objects\\Hardware\\Station_small.pnl" 457 486 T 35 0.7424242424242424 0 0.7407407407407407 168.1779915092959 -22.85844132607411 1 "$Station""RS306" 3 15 "PANEL_REF16" -1 -"objects\\Hardware\\Station_small.pnl" 457 486 T 36 0.7424242424242424 0 0.7407407407407407 158.1779915092959 37.14155867392589 +"objects\\Hardware\\Station_small.pnl" 457 486 T 36 0.7424242424242424 0 0.7407407407407407 148.1779915092959 37.14155867392589 1 "$Station""RS307" 3 16 "PANEL_REF17" -1 @@ -273,19 +256,15 @@ LANG:1 6 Layer8 "objects\\Hardware\\Core_smalll.pnl" 506 345 T 41 1 0 1 53 -24.00000000000001 0 3 20 "PANEL_REF21" -1 -"objects\\Hardware\\Station_small.pnl" 457 486 T 41 0.7424242424242424 0 0.7407407407407407 198.1779915092959 -342.8584413260741 +"objects\\Hardware\\Station_small.pnl" 457 486 T 41 0.7424242424242424 0 0.7407407407407407 188.1779915092959 -342.8584413260741 1 "$Station""RS509" 3 21 "PANEL_REF22" -1 "objects\\Hardware\\Station_small.pnl" 757 157 T 41 0.7241379310344828 0 0.7241379310344828 29.60217891054469 23.74010994502748 1 "$Station""RS508" -3 22 "PANEL_REF23" -1 -"objects\\Hardware\\Station_small.pnl" 257 337 T 42 0.7241379310344828 0 0.7241379310344828 21.6711444277861 33.39528235882058 -1 -"$Station""RS410" 3 24 "PANEL_REF25" -1 -"objects\\Hardware\\Station_small.pnl" 477 317 T 44 0.7241379310344828 0 0.7241379310344828 32.3607996001999 37.87804097951029 +"objects\\Hardware\\Station_small.pnl" 477 317 T 44 0.7241379310344828 0 0.7241379310344828 22.3607996001999 37.87804097951029 1 "$Station""RS409" 3 27 "PANEL_REF28" -1 @@ -296,14 +275,6 @@ LANG:1 6 Layer8 "objects\\Hardware\\Station_small.pnl" 667 337 T 50 0.7241379310344828 0 0.7241379310344828 44.77459270364821 33.39528235882058 1 "$Station""RS406" -3 32 "PANEL_REF33" -1 -"objects\\Hardware\\Station_small.pnl" 747 347 T 52 0.7241379310344828 0 0.7241379310344828 36.84355822088949 56.15390304847583 -1 -"$Station""RS104" -3 33 "PANEL_REF34" -1 -"objects\\Hardware\\Station_small.pnl" 677 377 T 53 0.7241379310344828 0 0.7241379310344828 47.5332133933033 44.42976511744132 -1 -"$Station""RS404" 3 34 "PANEL_REF35" -1 "objects\\Hardware\\Station_small.pnl" 737 447 T 54 0.7241379310344828 0 0.7241379310344828 34.08493753123429 33.74010994502753 1 @@ -313,11 +284,11 @@ LANG:1 6 Layer8 1 "$Station""RS310" 3 41 "PANEL_REF42" -1 -"objects\\Hardware\\Station_small.pnl" 367 497 T 61 0.7241379310344828 0 0.7241379310344828 42.01597201399299 57.53321339330336 +"objects\\Hardware\\Station_small.pnl" 367 497 T 61 0.7241379310344828 0 0.7241379310344828 32.01597201399299 57.53321339330336 1 "$Station""RS310" 3 42 "PANEL_REF43" -1 -"objects\\Hardware\\Station_small.pnl" 617 697 T 61 0.7241379310344828 0 0.7241379310344828 80.98148925537228 192.7056271864067 +"objects\\Hardware\\Station_small.pnl" 617 697 T 61 0.7241379310344828 0 0.7241379310344828 70.98148925537228 192.7056271864067 1 "$Station""RS210" 0 diff --git a/MAC/Navigator2/panels/Hardware/Station.pnl b/MAC/Navigator2/panels/Hardware/Station.pnl index b95f69d23d1c8483ef8ab76bc6425ee4a4d31a0c..bf506f38d0e1508114fbc747681c860a26af2147 100644 --- a/MAC/Navigator2/panels/Hardware/Station.pnl +++ b/MAC/Navigator2/panels/Hardware/Station.pnl @@ -241,10 +241,11 @@ void redraw(string mode) { g_stationList[1] = navFunct_bareDBName(sysName); LOG_DEBUG(\"Station.pnl:redraw|Mode: \"+mode); - if (strpos(mode,\"LBA\") > -1) { + + if (mode == \"LBA\") { addPanelName = \"objects/Hardware/Station_LBA.pnl\"; angle=0; - } else if (strpos(mode,\"HBA\") > -1) { + } else if (mode == \"HBA\") { addPanelName = \"objects/Hardware/Station_HBA.pnl\"; angle=HBA0Angle; } @@ -306,19 +307,16 @@ void redraw(string mode) { YRCU = 2*i-1 - NRSP*8; } - if (isCore && strpos(mode,\"HBA\") > -1) { + if (isCore && mode == \"HBA\") { if (i > 24) angle=HBA1Angle; } - string xDP=baseDP+\"_PIC_Cabinet\"+navFunct_receiver2Cabinet(XRCU)+\"_Subrack\"+ + string xDP=baseDP+\"_PIC_Cabinet\"+navFunct_receiver2Cabinet(XRCU)+\"_Subrack\"+ navFunct_receiver2Subrack(XRCU)+\"_RSPBoard\"+navFunct_receiver2RSP(XRCU)+\"_RCU\"+XRCU; string yDP=baseDP+\"_PIC_Cabinet\"+navFunct_receiver2Cabinet(YRCU)+\"_Subrack\"+ navFunct_receiver2Subrack(YRCU)+\"_RSPBoard\"+navFunct_receiver2RSP(YRCU)+\"_RCU\"+YRCU; - if (i-1 < NRSP*8/2) { -// dynAppend(g_RCUList,XRCU); -// dynAppend(g_RCUList,YRCU); - dynAppend(g_HBAList,navFunct_receiver2HBA(XRCU)); - } + if (mode == \"HBA\") dynAppend(g_HBAList,i-1); + if (mode == \"LBA\") dynAppend(g_LBAList,i-1); refNames[ref]=\"ant\"+(ref); xPos_AddSymbol = (mainpanel_midX+shiftFactorX) + (antennaOffsetsX[i] * expandFactorX); yPos_AddSymbol = (mainpanel_midY+shiftFactorY) - (antennaOffsetsY[i] * expandFactorY); diff --git a/MAC/Navigator2/panels/main.pnl b/MAC/Navigator2/panels/main.pnl index dbc7e00d26b2ba2ca60f14e8c239cb005ec1b423..d14600310e487eef5b14d7e7720cb780f88f76b7 100644 --- a/MAC/Navigator2/panels/main.pnl +++ b/MAC/Navigator2/panels/main.pnl @@ -6,28 +6,29 @@ PANEL,-1 -1 1010 745 N "_3DFace" 0 { // Initialise the Panel navPanel_initPanel(\"fw_viewBox\"); - - baseDP=g_currentDatapoint; strPanelName = \"antennaField\"; - strModuleName = myModuleName(); + strModuleName = myModuleName(); + + baseDP=g_currentDatapoint; + stationList = makeDynString(\"CS001\",\"CS002\",\"CS003\",\"CS004\",\"CS005\",\"CS006\",\"RS007\", \"CS011\",\"CS013\",\"CS017\", \"CS021\",\"CS024\",\"CS026\",\"CS028\", \"CS030\",\"CS031\",\"CS032\", - \"RS101\",\"RS103\",\"RS201\",\"RS301\",\"RS302\",\"RS401\",\"RS501\", + \"CS101\",\"CS103\",\"CS201\",\"CS301\",\"CS302\",\"CS401\",\"CS501\", \"RS106\", - \"RS205\",\"rs208\",\"RS210\", + \"RS205\",\"RS208\",\"RS210\", \"RS305\",\"RS306\",\"RS307\",\"RS310\", \"RS406\",\"RS407\",\"RS409\", \"RS503\",\"RS508\",\"RS509\", \"DE601\",\"DE602\",\"DE603\",\"DE604\",\"RS605\",\"FR606\",\"SE607\",\"UK608\", \"CCU001\",\"MCU001\"); - + redraw(); +} -} // // Callback for dpConnect to action point. @@ -75,6 +76,14 @@ dyn_string swCtrlRefNames; string strPanelName; string strModuleName; string baseDP=\"\"; +dyn_string station_procList; +dyn_string station_result; + +void prepareHardwareList() { + + g_stationList = stationList; +} + void clearSWLevelRefNames() { // remove all symbols because new ones will be added @@ -101,9 +110,14 @@ void clearSwCtrlRefNames() { } void redraw() { - + dynClear(station_result); + dynClear(station_procList); + navFunct_clearGlobalLists(); - + + // set the hardware selectable items for this screen + prepareHardwareList(); + string addPanelName = \"objects/swlevel.pnl\"; if (dynlen(SWLevelRefNames) > 0) { @@ -129,8 +143,7 @@ void redraw() { // set panel to ready g_objectReady=true; - - navPanel_setEvent(\"swlevel.pnl\",\"Update\"); + navPanel_setEvent(\"main.pnl:redraw\",\"Update\"); } @@ -193,8 +206,9 @@ void addDatastreams() { void addSWCtrlers() { int xPos_AddSymbol = 235; - int yPos_AddSymbol = 28; + int yPos_AddSymbol = 28; int ref = 1; + string addPanelName = \"objects/Processes/stationSWLevelView.pnl\"; //loop over list and prepare panel with all datastreamobjects for (int i=1; i<= dynlen(stationList); i++) { @@ -217,7 +231,52 @@ void addSWCtrlers() { } yPos_AddSymbol += 10; ref++; + addStationProcesses(stationList[i]+\":\"); + } + dpSet(DPNAME_NAVIGATOR + g_navigatorID + \".processesList\",station_result); + +} + +void addStationProcesses(string selectedStation) { + if (!navFunct_dpReachable(selectedStation)) { + return; + } + int z; + dyn_dyn_anytype tab; + //PermSW + PermSW_Daemons + string query=\"SELECT '_original.._value' FROM 'LOFAR_PermSW_*.status.state' REMOTE '\" +selectedStation + \"'\"; + + dpQuery(query, tab); + LOG_TRACE(\"main.pnl:addStationProcesses|Found: \"+ tab); + + + dyn_string aDS=navFunct_getDynString(tab, 2,1); + dynSortAsc(aDS); + for(z=1;z<=dynlen(aDS);z++){ + + // strip .status.state from station_result + string aS = dpSubStr(aDS[z],DPSUB_SYS_DP); + + // keep Path to work with + string path=aS; + + + // strip all including PermsSW out of the string + strreplace(aS,selectedStation+dpSubStr(baseDP,DPSUB_DP)+\"_PermSW_\",\"\"); + + // Remainder should be PermsSW Programs + Daemons split on _ + dyn_string spl=strsplit(aS,\"_\"); + if (dynlen(spl) > 1) { // Daemon + dynAppend(station_result,navFunct_dpStripLastElement(path)+\",\"+spl[2]+\",\"+path); + dynAppend(station_procList,path); + } else { // Program + dynAppend(station_result,\",\"+spl[1]+\",\"+path); + if (spl[1] != \"Daemons\") { + dynAppend(station_procList,path); + } + } } + LOG_TRACE(\"main.pnl:addStationProcesses|station_result composed: \"+ station_result); }" 0 2 "CBRef" "1" diff --git a/MAC/Navigator2/panels/objects/Hardware/Station_HBA.pnl b/MAC/Navigator2/panels/objects/Hardware/Station_HBA.pnl index 3666f151c55701c1c3e2f400aae6e5a7afb1f200..871f20c292d9f34bca900763582dda8cf167abd3 100644 --- a/MAC/Navigator2/panels/objects/Hardware/Station_HBA.pnl +++ b/MAC/Navigator2/panels/objects/Hardware/Station_HBA.pnl @@ -15,7 +15,11 @@ PANEL,-1 -1 241 145 N "_3DFace" 4 curHBA= $aNr; sysName=dpSubStr(baseDP,DPSUB_SYS); string aS=sysName+\"LOFAR_PIC_HBA\"; - if (curHBA < 10) aS+=\"0\"; + extrazero=\"\"; + if (curHBA < 10) { + aS+=\"0\"; + extrazero=\"0\"; + } string antennaDP=aS+curHBA; string RCUX; string RCUY; @@ -54,7 +58,7 @@ PANEL,-1 -1 241 145 N "_3DFace" 4 strToolTip += \"<br> -> RSP\" + rspboard; strToolTip += \"<br> -> RCU\" + curXRCU + \" && RCU\" + curYRCU; strToolTip += \"<br>---------\"; - strToolTip += \"<br> (HBA\" + curHBA + \")\"; + strToolTip += \"<br> (HBA\" + extrazero+curHBA + \")\"; strToolTip += \"<br> diff from centerOL:\" + $aX; strToolTip += \"<br> diff from centerNB:\" + $aY; @@ -155,6 +159,7 @@ string baseDPX; string baseDPY; string RCUXDP; string RCUYDP; +string extrazero=\"\"; int cabinet; int subrack; @@ -170,7 +175,7 @@ void click() { // set delay in case double click was meant delay(0, 100); if (!bDoubleClicked) { - navPanel_setEvent(\"HBA\"+curHBA,\"EventClick\"); + navPanel_setEvent(\"HBA\"+extrazero+curHBA,\"EventClick\"); } } @@ -184,7 +189,7 @@ void dblClick() { if (dpExists(baseDP) ) { LOG_DEBUG(\"Station_HBA.pnl:DoubleClick|Setting currentDatapoint from : \"+g_currentDatapoint+\" to \"+baseDP); g_currentDatapoint=baseDP; - navPanel_setEvent(\"HBA\"+curHBA,\"ChangePanel\"); + navPanel_setEvent(\"HBA\"+extrazero+curHBA,\"ChangePanel\"); } // set delay to avoid click event will be triggered @@ -194,7 +199,7 @@ void dblClick() { // routine for right mouse click void rClick() { - navPanel_setEvent(\"HBA\"+curHBA,\"EventRightClick\"); + navPanel_setEvent(\"HBA\"+extrazero+curHBA,\"EventRightClick\"); }" 0 2 "CBRef" "1" @@ -315,9 +320,9 @@ LANG:1 0 void StationCallback(string dp1, bool aTrig) { LOG_DEBUG(\"Station_HBA.pnl:StationCallback|ObjectTrigger Callback on: \"+dp1+\" trigger: \"+aTrig); - LOG_DEBUG(\"Station_HBA.pnl:StationCallback|Found highlight : \" + highlight + \" Looking for HBA\" + curHBA); + LOG_DEBUG(\"Station_HBA.pnl:StationCallback|Found highlight : \" + highlight + \" Looking for HBA\" + extrazero+curHBA); bool bHighlight=false; - if (dynContains(highlight,\"HBA\"+curHBA)) { + if (dynContains(highlight,\"HBA\"+extrazero+curHBA)) { bHighlight=true; } LOG_DEBUG(\"Station_HBA.pnl:StationCallback|Highlight request: \"+bHighlight); diff --git a/MAC/Navigator2/panels/objects/Hardware/Station_LBA.pnl b/MAC/Navigator2/panels/objects/Hardware/Station_LBA.pnl index 4aaed194d539d2cccc86c48bab627189e0c747f0..eba73d055f5937a6da741349e9766b6ffdbd8f7e 100644 --- a/MAC/Navigator2/panels/objects/Hardware/Station_LBA.pnl +++ b/MAC/Navigator2/panels/objects/Hardware/Station_LBA.pnl @@ -1,4 +1,4 @@ -V 10 +V 11 3 LANG:1 4 aLBA LANG:6 0 @@ -15,8 +15,15 @@ PANEL,-1 -1 241 145 N "_3DFace" 4 curLBA= $aNr; sysName=dpSubStr(baseDP,DPSUB_SYS); string aS=sysName+\"LOFAR_PIC_LBA\"; - if (curLBA < 10) aS+=\"0\"; - if (curLBA < 100) aS+=\"0\"; + extrazero=\"\"; + if (curLBA < 100) { + extrazero+=\"0\"; + aS+=\"0\"; + } + if (curLBA < 10){ + aS+=\"0\"; + extrazero+=\"0\"; + } string antennaDP=aS+curLBA; string RCUX; string RCUY; @@ -47,14 +54,14 @@ PANEL,-1 -1 241 145 N "_3DFace" 4 string strColor = \"yellow\"; - string strToolTip=\"Antenna: \"+curLBA; + string strToolTip=\"Antenna: \"+extrazero+curLBA; strToolTip += \" located on: Cabinet:\" + cabinet; strToolTip += \" ->Subrack\" + subrack; strToolTip += \" -> TBB\" + tbboard; strToolTip += \" -> RSP\" + rspboard; strToolTip += \" -> RCU\" + curXRCU + \" && RCU\" + curYRCU; strToolTip += \"---------\"; - strToolTip += \" (LBA\" + curLBA + \")\"; + strToolTip += \" (LBA\" + extrazero+curLBA + \")\"; strToolTip += \"\\n diff from centerOL:\" + $aX; strToolTip += \"\\n diff from centerNB:\" + $aY; @@ -143,6 +150,8 @@ string baseDPX; string baseDPY; string RCUXDP; string RCUYDP; +string extrazero=\"\"; + int cabinet; int subrack; @@ -158,7 +167,7 @@ void click() { // set delay in case double click was meant delay(0, 100); if (!bDoubleClicked) { - navPanel_setEvent(\"RCU\"+curXRCU+\"|RCU\"+curYRCU,\"EventClick\"); + navPanel_setEvent(\"LBA\"+extrazero+curLBA,\"EventClick\"); } } @@ -182,7 +191,7 @@ void dblClick() { // routine for right mouse click void rClick() { - navPanel_setEvent(\"Antenna\"+curLBA,\"EventRightClick\"); + navPanel_setEvent(\"Antenna\"+extrazero+curLBA,\"EventRightClick\"); }" 0 2 "CBRef" "1" @@ -277,10 +286,9 @@ LANG:1 0 void StationCallback(string dp1, bool aTrig) { LOG_DEBUG(\"Station_LBA.pnl:StationCallback|ObjectTrigger Callback on: \"+dp1+\" trigger: \"+aTrig); - LOG_DEBUG(\"Station_LBA.pnl:StationCallback|Found highlight : \" + highlight + \" Looking for RCU\" + curXRCU + - \" or RCU\" + curYRCU); + LOG_DEBUG(\"Station_LBA.pnl:StationCallback|Found highlight : \" + highlight + \" Looking for LBA\" + extrazero+curLBA); bool bHighlight=false; - if (dynContains(highlight,\"RCU\"+curXRCU) ||dynContains(highlight,\"RCU\"+curYRCU) ) { + if (dynContains(highlight,\"LBA\"+extrazero+curLBA )) { bHighlight=true; } LOG_DEBUG(\"Station_LBA.pnl:StationCallback|Highlight request: \"+bHighlight); @@ -373,14 +381,13 @@ LANG:30 0 { click(); }" 0 - 0 1 1 0 1 E U 0 E 13 11 25 28 + 0 1 1 0 1 E U 0 E 12 11 26 27 0 2 0 "0s" 0 0 0 193 0 0 19 11 1 3 -LANG:1 87 -*-Arial-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,697,0,0,0,0,0,0,0,0,Arial +LANG:1 26 Arial,-1,13,5,69,0,0,0,0,0 LANG:6 105 -microsoft windows-Arial-bold-r-normal-*-*-120-100-100-*-*-iso8859-1|-13,0,0,0,700,0,0,0,0,3,2,1,34,Arial LANG:30 105 -microsoft windows-Arial-bold-r-normal-*-*-120-100-100-*-*-iso8859-1|-13,0,0,0,700,0,0,0,0,3,2,1,34,Arial -0 "" -3 +0 3 LANG:1 2 nr LANG:6 2 nr LANG:30 2 nr @@ -413,4 +420,4 @@ LAYER, 7 1 LANG:1 6 Layer8 0 -0 \ No newline at end of file +0 diff --git a/MAC/Navigator2/panels/objects/Processes/controller_small.pnl b/MAC/Navigator2/panels/objects/Processes/controller_small.pnl index a754e250625d1c60594868cb73b4bcdab7be3f33..77bbcdb11d7bab123dfe41cdb043370afa8f744f 100644 --- a/MAC/Navigator2/panels/objects/Processes/controller_small.pnl +++ b/MAC/Navigator2/panels/objects/Processes/controller_small.pnl @@ -1,11 +1,12 @@ -V 10 +V 11 1 LANG:1 0 PANEL,-1 -1 1031 124 N "_3DFace" 1 "$name" "main() { - name.text($name); + dyn_string spl = strsplit($name,\"_\"); + name.text(spl[dynlen(spl)]); baseDP = g_currentDatapoint; database=dpSubStr(baseDP,DPSUB_SYS); @@ -190,9 +191,8 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 158 4 992 27 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 158 4 992 27 EE 0 0 1 3 1 "error" 13 1 0 "s" 1 LANG:1 5 error E @@ -216,9 +216,8 @@ LANG:1 0 LANG:1 2 #1 10 150 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -0 0 0 1 7 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 0 0 0 1 7 1 0 2 6 "name" @@ -245,12 +244,11 @@ E "main() { click(); }" 0 - 0 1 1 2 1 E U 1 E 31 9 61 23 + 0 1 1 2 1 E U 1 E 31 9 61 22 0 2 2 "0s" 0 0 0 192 0 0 31 9 1 1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 LANG:1 4 name 0 LAYER, 1 @@ -281,7 +279,7 @@ LAYER, 7 1 LANG:1 0 0 -3 0 "selfState" +3 0 "selfState" -1 "objects\\lofar_self_state.pnl" 9.500000000000011 9.5 T 1 1 0 0.882352941176471 -0.499999999999993 -1.382352941176475 0 -0 \ No newline at end of file +0 diff --git a/MAC/Navigator2/panels/objects/Processes/stationSWLevelView.pnl b/MAC/Navigator2/panels/objects/Processes/stationSWLevelView.pnl index c38abba4a042ebb95737e7d3d41f8cf8ba3b5523..d2c8d4850d116ff39d7547791514b6b71b530f73 100644 --- a/MAC/Navigator2/panels/objects/Processes/stationSWLevelView.pnl +++ b/MAC/Navigator2/panels/objects/Processes/stationSWLevelView.pnl @@ -116,7 +116,7 @@ LANG:1 0 "$name""PermSW_Daemons_ServiceBroker" "$station""$station" 3 4 "PANEL_REF4" -1 -"objects\\Processes\\SWControler_small.pnl" 50 0 T 21 1 0 1 -2 0 +"objects\\Processes\\SWControler_small.pnl" 50 0 T 21 U 2 "$name""PermSW_Daemons_SASGateway" "$station""$station" diff --git a/MAC/Navigator2/panels/objects/datastreamLevel.pnl b/MAC/Navigator2/panels/objects/datastreamLevel.pnl index cf5f0af7e4088b966e874aa241a52434183732f3..14676da10aee8ea960f791661acbdf929c08292b 100644 --- a/MAC/Navigator2/panels/objects/datastreamLevel.pnl +++ b/MAC/Navigator2/panels/objects/datastreamLevel.pnl @@ -15,15 +15,58 @@ PANEL,-1 -1 251 88 N "_3DFace" 1 showDatastreams(); } }" 0 - E E E E 1 -1 -1 0 0 0 + E "main(int x, int y) +{ + click(); +}" 0 + "main() +{ + rClick(); +}" 0 + "main(int x, int y) +{ + dblClick(); +}" 0 + 1 -1 -1 0 0 0 ""0 1 E "#uses \"navPanel.ctl\" string station = \"\"; string baseDP=\"\"; +bool bDoubleClicked = false; + int filled0=0; int filled1=0; +// routine for single mouse click +void click() { + // set delay in case double click was meant + delay(0, 100); + if (!bDoubleClicked) { + navPanel_setEvent(station,\"EventClick\"); + } +} + +// routine for double mouse click +void dblClick() { + // indicate this is a doubleClick + bDoubleClicked = true; + + if (dpExists(baseDP) ) { + LOG_DEBUG(\"datastreamLevel.pnl:DoubleClick|Setting currentDatapoint from : \"+g_currentDatapoint+\" to \"+baseDP); + g_currentDatapoint=baseDP; + navPanel_setEvent(station,\"ChangePanel\"); + } + + // set delay to avoid click event will be triggered + delay(0, 500); + bDoubleClicked = false; +} + +// routine for right mouse click +void rClick() { + +} // **************************************** // Name: showDatastreams @@ -209,7 +252,15 @@ LANG:1 0 "stream0-1_text" "" 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E - E E + "main() +{ + rClick(); +}" 0 + "main(int x, int y) +{ + dblClick(); +}" 0 + 0 0 0 0 0 0 E E E 0 @@ -218,12 +269,24 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 -230 -140 1 E 230 150 234 159 +E "main(int x, int y) +{ + click(); +}" 0 + 0 1 1 2 1 E 1 0 1 -230 -140 1 E 230 150 234 159 6 2 "stream0-2_text" "" 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E - E E + "main() +{ + rClick(); +}" 0 + "main(int x, int y) +{ + dblClick(); +}" 0 + 2 0 0 0 0 0 E E E 0 @@ -232,12 +295,24 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 -225 -140 1 E 230 150 234 159 +E "main(int x, int y) +{ + click(); +}" 0 + 0 1 1 2 1 E 1 0 1 -225 -140 1 E 230 150 234 159 6 3 "stream0-3_text" "" 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E - E E + "main() +{ + rClick(); +}" 0 + "main(int x, int y) +{ + dblClick(); +}" 0 + 3 0 0 0 0 0 E E E 0 @@ -246,12 +321,24 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 -220 -140 1 E 230 150 234 159 +E "main(int x, int y) +{ + click(); +}" 0 + 0 1 1 2 1 E 1 0 1 -220 -140 1 E 230 150 234 159 6 4 "stream0-4_text" "" 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E - E E + "main() +{ + rClick(); +}" 0 + "main(int x, int y) +{ + dblClick(); +}" 0 + 4 0 0 0 0 0 E E E 0 @@ -260,12 +347,24 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 -215 -140 1 E 230 150 234 159 +E "main(int x, int y) +{ + click(); +}" 0 + 0 1 1 2 1 E 1 0 1 -215 -140 1 E 230 150 234 159 6 5 "stream0-5_text" "" 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E - E E + "main() +{ + rClick(); +}" 0 + "main(int x, int y) +{ + dblClick(); +}" 0 + 5 0 0 0 0 0 E E E 0 @@ -274,12 +373,24 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 -210 -140 1 E 230 150 234 159 +E "main(int x, int y) +{ + click(); +}" 0 + 0 1 1 2 1 E 1 0 1 -210 -140 1 E 230 150 234 159 6 8 "stream1-1_text" "" 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E - E E + "main() +{ + rClick(); +}" 0 + "main(int x, int y) +{ + dblClick(); +}" 0 + 8 0 0 0 0 0 E E E 0 @@ -288,12 +399,24 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 -195 -140 1 E 230 150 234 159 +E "main(int x, int y) +{ + click(); +}" 0 + 0 1 1 2 1 E 1 0 1 -195 -140 1 E 230 150 234 159 6 9 "stream1-2_text" "" 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E - E E + "main() +{ + rClick(); +}" 0 + "main(int x, int y) +{ + dblClick(); +}" 0 + 9 0 0 0 0 0 E E E 0 @@ -302,12 +425,24 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 -190 -140 1 E 230 150 234 159 +E "main(int x, int y) +{ + click(); +}" 0 + 0 1 1 2 1 E 1 0 1 -190 -140 1 E 230 150 234 159 6 10 "stream1-3_text" "" 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E - E E + "main() +{ + rClick(); +}" 0 + "main(int x, int y) +{ + dblClick(); +}" 0 + 10 0 0 0 0 0 E E E 0 @@ -316,12 +451,24 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 -185 -140 1 E 230 150 234 159 +E "main(int x, int y) +{ + click(); +}" 0 + 0 1 1 2 1 E 1 0 1 -185 -140 1 E 230 150 234 159 6 11 "stream1-4_text" "" 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E - E E + "main() +{ + rClick(); +}" 0 + "main(int x, int y) +{ + dblClick(); +}" 0 + 11 0 0 0 0 0 E E E 0 @@ -330,12 +477,24 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 -180 -140 1 E 230 150 234 159 +E "main(int x, int y) +{ + click(); +}" 0 + 0 1 1 2 1 E 1 0 1 -180 -140 1 E 230 150 234 159 6 12 "stream1-5_text" "" 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E - E E + "main() +{ + rClick(); +}" 0 + "main(int x, int y) +{ + dblClick(); +}" 0 + 12 0 0 0 0 0 E E E 0 @@ -344,7 +503,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 -175 -140 1 E 230 150 234 159 +E "main(int x, int y) +{ + click(); +}" 0 + 0 1 1 2 1 E 1 0 1 -175 -140 1 E 230 150 234 159 2 16 "PRIMITIVE_TEXT1" "" diff --git a/MAC/Navigator2/panels/objects/swlevel.pnl b/MAC/Navigator2/panels/objects/swlevel.pnl index a88023126f034dd3a4a857f2634977bfb6b8106f..09c37045a9c70fa34f6e47b1dfe9eae8ed524055 100644 --- a/MAC/Navigator2/panels/objects/swlevel.pnl +++ b/MAC/Navigator2/panels/objects/swlevel.pnl @@ -19,19 +19,7 @@ PANEL,-1 -1 251 88 N "_3DFace" 1 } } " 0 - E "main(int x, int y) -{ - click(); -}" 0 - "main() -{ - rClick(); -}" 0 - "main(int x, int y) -{ - dblClick(); -}" 0 - 1 -1 -1 0 0 0 + E E E E 1 -1 -1 0 0 0 ""0 1 E "#uses \"navPanel.ctl\" string station = \"\"; @@ -41,23 +29,30 @@ bool bDoubleClicked = false; int filled=0; // routine for single mouse click -void click() { +void click(string name) { // set delay in case double click was meant delay(0, 100); if (!bDoubleClicked) { - navPanel_setEvent(station,\"EventClick\"); + navPanel_setEvent(name,\"EventClick\"); } } // routine for double mouse click -void dblClick() { +void dblClick(string name) { // indicate this is a doubleClick bDoubleClicked = true; + if (name == station) baseDP=station+\":LOFAR\"; if (dpExists(baseDP) ) { LOG_DEBUG(\"swlevel.pnl:DoubleClick|Setting currentDatapoint from : \"+g_currentDatapoint+\" to \"+baseDP); g_currentDatapoint=baseDP; - navPanel_setEvent(station,\"ChangePanel\"); + if (name == station) { + DebugN(\"dblClic with: \"+name+\" currentDP: \"+g_currentDatapoint); + navPanel_setEvent(station,\"ChangePanel\"); + } else { + //we also have to set the tabctrl to think this was initiated from the ProcessesTab, otherwise we will get the wrong panel. + navPanel_setEvent(\"Processes\",\"ChangeTab\"); + } } // set delay to avoid click event will be triggered @@ -66,7 +61,7 @@ void dblClick() { } // routine for right mouse click -void rClick() { +void rClick(string name) { } @@ -199,11 +194,11 @@ LANG:1 0 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E "main() { - rClick(); + rClick(this.name); }" 0 "main(int x, int y) { - dblClick(); + dblClick(this.name); }" 0 0 0 0 0 0 0 @@ -216,20 +211,20 @@ LANG:1 0 "dashclr"N "_Transparent" E "main(int x, int y) { - click(); + click(this.name); }" 0 0 1 1 2 1 E 1 0 1 -180 -140 1 E 230 150 234 159 2 1 "station_text" "" -1 10 9 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E +1 10 10 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E "main() { - rClick(); + rClick(station); }" 0 "main(int x, int y) { - dblClick(); + dblClick(station); }" 0 1 0 0 0 0 0 @@ -242,10 +237,10 @@ LANG:1 0 "dashclr"N "_Transparent" E "main(int x, int y) { - click(); + click(station); }" 0 - 0 1 1 2 1 E U 0 E 10 9 38 22 -0 2 2 "0s" 0 0 0 192 0 0 10 9 1 + 0 1 1 2 1 E U 0 E 10 10 38 23 +0 2 2 "0s" 0 0 0 192 0 0 10 10 1 1 LANG:1 34 MS Shell Dlg 2,8,-1,5,50,0,0,0,0,0 0 1 @@ -256,11 +251,11 @@ LANG:1 5 cs001 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E "main() { - rClick(); + rClick(this.name); }" 0 "main(int x, int y) { - dblClick(); + dblClick(this.name); }" 0 2 0 0 0 0 0 @@ -273,7 +268,7 @@ LANG:1 0 "dashclr"N "_Transparent" E "main(int x, int y) { - click(); + click(this.name); }" 0 0 1 1 2 1 E 1 0 1 -175 -140 1 E 230 150 234 159 6 3 @@ -282,11 +277,11 @@ E "main(int x, int y) 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E "main() { - rClick(); + rClick(this.name); }" 0 "main(int x, int y) { - dblClick(); + dblClick(this.name); }" 0 3 0 0 0 0 0 @@ -299,7 +294,7 @@ LANG:1 0 "dashclr"N "_Transparent" E "main(int x, int y) { - click(); + click(this.name); }" 0 0 1 1 2 1 E 1 0 1 -170 -140 1 E 230 150 234 159 6 4 @@ -308,11 +303,11 @@ E "main(int x, int y) 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E "main() { - rClick(); + rClick(this.name); }" 0 "main(int x, int y) { - dblClick(); + dblClick(this.name); }" 0 4 0 0 0 0 0 @@ -325,7 +320,7 @@ LANG:1 0 "dashclr"N "_Transparent" E "main(int x, int y) { - click(); + click(this.name); }" 0 0 1 1 2 1 E 1 0 1 -165 -140 1 E 230 150 234 159 6 5 @@ -334,11 +329,11 @@ E "main(int x, int y) 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E "main() { - rClick(); + rClick(this.name); }" 0 "main(int x, int y) { - dblClick(); + dblClick(this.name); }" 0 5 0 0 0 0 0 @@ -351,7 +346,7 @@ LANG:1 0 "dashclr"N "_Transparent" E "main(int x, int y) { - click(); + click(this.name); }" 0 0 1 1 2 1 E 1 0 1 -160 -140 1 E 230 150 234 159 6 6 @@ -360,11 +355,11 @@ E "main(int x, int y) 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E "main() { - rClick(); + rClick(this.name); }" 0 "main(int x, int y) { - dblClick(); + dblClick(this.name); }" 0 6 0 0 0 0 0 @@ -377,7 +372,7 @@ LANG:1 0 "dashclr"N "_Transparent" E "main(int x, int y) { - click(); + click(this.name); }" 0 0 1 1 2 1 E 1 0 1 -155 -140 1 E 230 150 234 159 6 7 @@ -386,11 +381,11 @@ E "main(int x, int y) 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E "main() { - rClick(); + rClick(this.name); }" 0 "main(int x, int y) { - dblClick(); + dblClick(this.name); }" 0 7 0 0 0 0 0 @@ -403,7 +398,7 @@ LANG:1 0 "dashclr"N "_Transparent" E "main(int x, int y) { - click(); + click(this.name); }" 0 0 1 1 2 1 E 1 0 1 -150 -140 1 E 230 150 234 159 6 8 @@ -412,11 +407,11 @@ E "main(int x, int y) 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E "main() { - rClick(); + rClick(this.name); }" 0 "main(int x, int y) { - dblClick(); + dblClick(this.name); }" 0 8 0 0 0 0 0 @@ -429,7 +424,7 @@ LANG:1 0 "dashclr"N "_Transparent" E "main(int x, int y) { - click(); + click(this.name); }" 0 0 1 1 2 1 E 1 0 1 -145 -140 1 E 230 150 234 159 6 9 @@ -438,11 +433,11 @@ E "main(int x, int y) 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E "main() { - rClick(); + rClick(this.name); }" 0 "main(int x, int y) { - dblClick(); + dblClick(this.name); }" 0 9 0 0 0 0 0 @@ -455,7 +450,7 @@ LANG:1 0 "dashclr"N "_Transparent" E "main(int x, int y) { - click(); + click(this.name); }" 0 0 1 1 2 1 E 1 0 1 -140 -140 1 E 230 150 234 159 6 10 @@ -464,11 +459,11 @@ E "main(int x, int y) 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E "main() { - rClick(); + rClick(this.name); }" 0 "main(int x, int y) { - dblClick(); + dblClick(this.name); }" 0 10 0 0 0 0 0 @@ -481,7 +476,7 @@ LANG:1 0 "dashclr"N "_Transparent" E "main(int x, int y) { - click(); + click(this.name); }" 0 0 1 1 2 1 E 1 0 1 -135 -140 1 E 230 150 234 159 6 11 @@ -490,11 +485,11 @@ E "main(int x, int y) 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E "main() { - rClick(); + rClick(this.name); }" 0 "main(int x, int y) { - dblClick(); + dblClick(this.name); }" 0 11 0 0 0 0 0 @@ -507,7 +502,7 @@ LANG:1 0 "dashclr"N "_Transparent" E "main(int x, int y) { - click(); + click(this.name); }" 0 0 1 1 2 1 E 1 0 1 -130 -140 1 E 230 150 234 159 6 12 @@ -516,11 +511,11 @@ E "main(int x, int y) 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E "main() { - rClick(); + rClick(this.name); }" 0 "main(int x, int y) { - dblClick(); + dblClick(this.name); }" 0 12 0 0 0 0 0 @@ -533,7 +528,7 @@ LANG:1 0 "dashclr"N "_Transparent" E "main(int x, int y) { - click(); + click(this.name); }" 0 0 1 1 2 1 E 1 0 1 -125 -140 1 E 230 150 234 159 6 13 @@ -542,11 +537,11 @@ E "main(int x, int y) 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E "main() { - rClick(); + rClick(this.name); }" 0 "main(int x, int y) { - dblClick(); + dblClick(this.name); }" 0 13 0 0 0 0 0 @@ -559,7 +554,7 @@ LANG:1 0 "dashclr"N "_Transparent" E "main(int x, int y) { - click(); + click(this.name); }" 0 0 1 1 2 1 E 1 0 1 -120 -140 1 E 230 150 234 159 6 14 @@ -568,11 +563,11 @@ E "main(int x, int y) 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E "main() { - rClick(); + rClick(this.name); }" 0 "main(int x, int y) { - dblClick(); + dblClick(this.name); }" 0 14 0 0 0 0 0 @@ -585,7 +580,7 @@ LANG:1 0 "dashclr"N "_Transparent" E "main(int x, int y) { - click(); + click(this.name); }" 0 0 1 1 2 1 E 1 0 1 -115 -140 1 E 230 150 234 159 6 15 @@ -594,11 +589,11 @@ E "main(int x, int y) 1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E "main() { - rClick(); + rClick(this.name); }" 0 "main(int x, int y) { - dblClick(); + dblClick(this.name); }" 0 15 0 0 0 0 0 @@ -611,7 +606,7 @@ LANG:1 0 "dashclr"N "_Transparent" E "main(int x, int y) { - click(); + click(this.name); }" 0 0 1 1 2 1 E 1 0 1 -110 -140 1 E 230 150 234 159 0 diff --git a/MAC/Navigator2/scripts/libs/navFunct.ctl b/MAC/Navigator2/scripts/libs/navFunct.ctl index b00b85372d385f356f58173c7b693ad7c22ba243..9960d887c1f99d66e0f5b0e3863948189c65d2ba 100644 --- a/MAC/Navigator2/scripts/libs/navFunct.ctl +++ b/MAC/Navigator2/scripts/libs/navFunct.ctl @@ -26,61 +26,64 @@ // // Functions and procedures // -// navFunct_splitEvent : Splits an event string into the essentials -// navFunct_splitAction : Splits an actionstring into a dyn_string action + params -// navFunct_queryConnectObservations : Queryconnect to keep track of all observations -// navFunct_updateObservations : Callback for the above query -// navFunct_getArmFromStation : Returns the armposition code from a stationName -// navFunct_getArmFromStation : Returns the ringName from a stationName -// navFunct_receiver2Cabinet : Returns the CabinetNr for a RecieverNr -// navFunct_receiver2Subrack : Returns the SubrackNr for a RecieverNr -// navFunct_receiver2RSP : Returns the RSPNr for a RecieverNr -// navFunct_receiver2HBA : Returns the HBANr for a RecieverNr -// navFunct_RSP2Cabinet : Returns the CabinetNr for a given RSP -// navFunct_RSP2Subrack : Returns the SubrackNr for a given RSP -// navFunct_TBB2Cabinet : Returns the CabinetNr for a given TBB -// navFunct_TBB2Subrack : Returns the SubrackNr for a given TBB -// navFunct_subrack2Cabinet : Returns the CabinetNr for a given Subrack -// navFunct_locusNode2OSRack : Returns the OSRackNr for a given LocusNode +// navFunct_acknowledgePanel : Returns acknowledge on a given action +// navFunct_bareDBName : Returns a DatabaseName without the : (if any) // navFunct_BGPMidplane2BGPRack : Returns the BGPRackNr for a given BGPMidplane -// navFunct_IONode2BGPMidplane : Returns the BGPMidplaneNr for a given IONode -// navFunct_dpStripLastElement : Returns DP string without last element -// navFunct_dpGetLastElement : Returns last element from DP +// navFunct_CEPName2DPName : Translates Rxx-Mx-Nxx-Jxx names to _BGP_Midplane_IONode names +// navFunct_CEPName2inputBuf : returns ionr from CEPname +// navFunct_clearGlobalLists : clear all temporarily global hardware,observation and processes lists.. // navFunct_dpGetFullPathAsTypes : Returns full dp path (maincu && station components) as dynstring) -// navFunct_getDPFromTypePath : Returns Dpname derived from currentDatapoint,typeList and chosen type +// navFunct_dpGetLastElement : Returns last element from DP +// navFunct_dpHasPanels : checkes if a given DP has loadable panels. +// navFunct_DPName2CEPName : Translates _BGP_Midplane_IONode names to Rxx-Mx-Nxx-Jxx names +// navFunct_dpReachable : looks if the databpoint on a dist system is also reachable +// navFunct_dpStripLastElement : Returns DP string without last element // navFunct_dynToString : Returns a dynArray as a , seperated string -// navFunct_getDynString : Returns a dynString from a dyn_dyn[index] -// navFunct_bareDBName : Returns a DatabaseName without the : (if any) -// navFunct_findFirstOne : Returns the number of a given array that is true for a certain range -// navFunct_acknowledgePanel : Returns acknowledge on a given action -// navFunct_getPathLessOne : Returns path less last leaf/node -// navFunct_hardware2Obs : Looks if a piece of hardware maps to an observation // navFunct_fillHardwareLists : Fill g_StationList, g_CabinetList,g_SubrackList,gRSPList,g_RCUList and g_TBBList +// navFunct_fillHardwareTree : Prepare the DP for HardwareTrees // navFunct_fillObservationsList : Fill g_observationList +// navFunct_fillObservationsTree : Prepare the DP for ObservationTrees // navFunct_fillProcessesList : Fill g_processList -// navFunct_fillHardwareTree : Prepare the DP for HardwareTrees // navFunct_fillProcessesTree : Prepare the DP for ProcessTrees -// navFunct_fillObservationsTree : Prepare the DP for ObservationTrees -// navFunct_clearGlobalLists : clear all temporarily global hardware,observation and processes lists.. -// navFunct_listToDynString : puts [a,b,d] lists into dynstrings // navFunct_fillStationLists : fill global lists with core/europe and remote stations +// navFunct_findFirstOne : Returns the number of a given array that is true for a certain range +// navFunct_formatInt : returns a string with the int preceeded by zeros +// navFunct_getArmFromStation : Returns the armposition code from a stationName +// navFunct_getDPFromTypePath : Returns Dpname derived from currentDatapoint,typeList and chosen type +// navFunct_getDynString : Returns a dynString from a dyn_dyn[index] +// navFunct_getHBABitmap : get the HBABitmap from a given observation on a given station +// navFunct_getLBABitmap : get the LBABitmap from a given observation on a given station +// navFunct_getLogColor : returns the color that belongs to a log level +// navFunct_getLogLevel : returns the level from a logline +// navFunct_getPathLessOne : Returns path less last leaf/node +// navFunct_getReceiverBitmap : returns the stations receiverBitMap for a given observation +// navFunct_getRingFromStation : Returns the ringName from a stationName // navFunct_getStationFromDP : get the stationname out of a DP name (if any) -// navFunct_dpReachable : looks if the databpoint on a dist system is also reachable -// navFunct_dpHasPanels : checkes if a given DP has loadable panels. -// navFunct_waitObjectReady : Loops till object Read or breaks out with error. -// navFunct_CEPName2DPName : Translates Rxx-Mx-Nxx-Jxx names to _BGP_Midplane_IONode names -// navFunct_DPName2CEPName : Translates _BGP_Midplane_IONode names to Rxx-Mx-Nxx-Jxx names +// navFunct_hardware2Obs : Looks if a piece of hardware maps to an observation // navFunct_inputBuf2CEPName : Translates inputBufferNr 2 the Rxx-Mx-Nxx-Jxx name -// navFunct_getReceiverBitmap : returns the stations receiverBitMap for a given observation +// navFunct_IONode2BGPMidplane : Returns the BGPMidplaneNr for a given IONode +// navFunct_IONode2DPName : returns the DP name based on the ionode number. +// navFunct_isBGPSwitch : returns the BGPSwitch setting (True = BGPRack1, False=BGPRack0) +// navFunct_listToDynString : puts [a,b,d] lists into dynstrings +// navFunct_locusNode2OSRack : Returns the OSRackNr for a given LocusNode // navFunct_ObsToTemp : returns the temp observationname +// navFunct_queryConnectObservations : Queryconnect to keep track of all observations +// navFunct_receiver2Cabinet : Returns the CabinetNr for a RecieverNr +// navFunct_receiver2HBA : Returns the HBANr for a RecieverNr +// navFunct_receiver2RSP : Returns the RSPNr for a RecieverNr +// navFunct_receiver2Subrack : Returns the SubrackNr for a RecieverNr +// navFunct_RSP2Cabinet : Returns the CabinetNr for a given RSP +// navFunct_RSP2Subrack : Returns the SubrackNr for a given RSP +// navFunct_splitAction : Splits an actionstring into a dyn_string action + params +// navFunct_splitEvent : Splits an event string into the essentials +// navFunct_stationNameToIONode : returns the IONode belonging to a station +// navFunct_subrack2Cabinet : Returns the CabinetNr for a given Subrack +// navFunct_TBB2Cabinet : Returns the CabinetNr for a given TBB +// navFunct_TBB2Subrack : Returns the SubrackNr for a given TBB // navFunct_TempToObs : returns the observationname from the temp -// navFunct_getLogColor : returns the color that belongs to a log level -// navFunct_getLogLevel : returns the level from a logline -//navFunct_CEPName2inputBuf : returns ionr from CEPname -//navFunct_stationNameToIONode : returns the IONode belonging to a station -//navFunct_isBGPSwitch : returns the BGPSwitch setting (True = BGPRack1, False=BGPRack0) -//navFunct_IONode2DPName : returns the DP name based on the ionode number. -//navFunct_formatInt : returns a string with the int preceeded by zeros +// navFunct_updateObservations : Callback for the above query +// navFunct_waitObjectReady : Loops till object Read or breaks out with error. + #uses "GCFLogging.ctl" #uses "GCFCommon.ctl" @@ -206,6 +209,61 @@ string navFunct_getReceiverBitmap(string db,string obsname) { } +// **************************************** +// Name : avFunct_getHBABitmap +// **************************************** +// Description: +// Search if on a given station a given observation has a HBABitMap +// This is used to determine what hardware is used for that observation on that station +// +// Returns: +// The HBABitMap +// *************************************** +string navFunct_getHBABitmap(string db,string obsname) { + string HBABitmap; + if (obsname == "") { + return HBABitmap; + } + + + string dp = claimManager_nameToRealName(obsname); + string aDP=navFunct_bareDBName(db)+":"+dpSubStr(dp,DPSUB_DP); + + if (dpExists(aDP+".HBABitmap")) { + dpGet(aDP+".HBABitmap",HBABitmap); + } + return HBABitmap; + +} + +// **************************************** +// Name : avFunct_getLBABitmap +// **************************************** +// Description: +// Search if on a given station a given observation has a LBABitMap +// This is used to determine what hardware is used for that observation on that station +// +// Returns: +// The LBABitMap +// *************************************** +string navFunct_getLBABitmap(string db,string obsname) { + string LBABitmap; + if (obsname == "") { + return LBABitmap; + } + + + string dp = claimManager_nameToRealName(obsname); + string aDP=navFunct_bareDBName(db)+":"+dpSubStr(dp,DPSUB_DP); + + if (dpExists(aDP+".LBABitmap")) { + dpGet(aDP+".LBABitmap",LBABitmap); + } + return LBABitmap; + +} + + void navFunct_updateObservations(string dp1, dyn_string active, string dp2, dyn_string planned, string dp3, dyn_string finished) { @@ -417,6 +475,7 @@ int navFunct_receiver2HBA(int receiverNr) { return floor(receiverNr/2); } + // **************************************** // Name : navFunct_receiver2Cabinet // **************************************** @@ -1002,7 +1061,8 @@ bool navFunct_hardware2Obs(string stationName, string observation, dyn_string obsStations = navFunct_listToDynString(g_observations[ "STATIONLIST" ][iPos]); string receiverBitmap = navFunct_getReceiverBitmap(stationName,observation); - + string HBABitmap = navFunct_getHBABitmap(stationName,observation); + string LBABitmap = navFunct_getLBABitmap(stationName,observation); @@ -1039,13 +1099,6 @@ bool navFunct_hardware2Obs(string stationName, string observation, return flag; } else { - // the station is involved in the stationList, but since receiverbitmap has been moved - // to the station database it is possible that the station is offline, so the receiverbitmap can be empty, in that case it is - // not meaning that the station is not involved. So we won't check for an empty receiverBitmap anymore -// if (receiverBitmap == "" && stationName) { -// LOG_ERROR("navFunct.ctl:navFunct_hardware2Obs|Empty receiverBitmap"); -// return false; -// } if (objectName == "Station") { flag = true; @@ -1074,13 +1127,13 @@ bool navFunct_hardware2Obs(string stationName, string observation, flag = true; } } else if (objectName == "HBA") { - if (receiverBitmap != "" && (receiverBitmap[(intData*2)] == "1" || receiverBitmap[((intData*2)+1)] == "1")) { + if (HBABitmap != "" && HBABitmap[intData] == "1") { flag = true; - } - } else if (objectName == "element") { // needs to be done when element is added to the receiverbitmap -// if (receiverBitmap != "" && (receiverBitmap[(intData*2)] == "1" || receiverBitmap[((intData*2)+1)] == "1")) { + } + } else if (objectName == "LBA") { + if (LBABitmap != "" && LBABitmap[intData] == "1") { flag = true; -// } + } } else if (objectName == "SPU") { flag = true; } else if (objectName == "Clock") { @@ -1309,16 +1362,17 @@ void navFunct_fillObservationsList() { } if (!found) { - // check Element - for (int c = 1; c<=dynlen(g_elementList); c++) { - if (navFunct_hardware2Obs(station, g_observations["NAME"][i],"element","",g_elementList[c])) { - // we found one involved Element, so obs can be included and we can skip the rest + // check LBAAntenna + for (int c = 1; c<=dynlen(g_LBAList); c++) { + if (navFunct_hardware2Obs(station, g_observations["NAME"][i],"LBA","",g_LBAList[c])) { + // we found one involved LBA, so obs can be included and we can skip the rest found = true; } if (found) break; } } + if (found && !dynContains(g_observationsList, shortObs)){ dynAppend(g_observationsList,shortObs); } @@ -1533,22 +1587,17 @@ void navFunct_fillHardwareTree() { dynAppend(result,connectTo+",HBA"+extrah+g_HBAList[i]+","+dp); } } - - // add Elements - if (dynlen(g_elementList) > 0) { - for (int i = 1; i <= dynlen(g_HBAList); i++) { - string extrah = ""; - if (g_HBAList[i] < 10) extrah = "0"; - connectTo = station+":LOFAR_PIC_HBA"+extrah+g_HBAList[i]; - for (int j = 1; j <= dynlen(g_elementList); j++) { - string extra = ""; - if (g_elementList[j] < 10) extra = "0"; - string dpel = station+":LOFAR_PIC_HBA"+extrah+g_HBAList[i] + ".element" + extra +g_elementList[j]; - dynAppend(result,connectTo+",element"+extra+g_elementList[j]+","+dpel); - } + // add LBAAntennas + if (dynlen(g_LBAList) > 0) { + for (int i = 1; i <= dynlen(g_LBAList); i++) { + connectTo = station+":LOFAR"; + string extrah = ""; + if (g_LBAList[i] < 100) extrah = "0"; + if (g_LBAList[i] < 10) extrah = "00"; + dp = station+":LOFAR_PIC_LBA"+extrah+g_LBAList[i]; + dynAppend(result,connectTo+",LBA"+extrah+g_LBAList[i]+","+dp); } } - } } @@ -1624,7 +1673,7 @@ void navFunct_clearGlobalLists() { dynClear(g_TBBList); dynClear(g_RCUList); dynClear(g_HBAList); - dynClear(g_elementList); + dynClear(g_LBAList); dynClear(g_BGPRackList); dynClear(g_BGPMidplaneList); dynClear(g_IONodeList); diff --git a/MAC/Navigator2/scripts/libs/navigator.ctl b/MAC/Navigator2/scripts/libs/navigator.ctl index b845ea1aa233a09df2689d3ef7d101e078e0c0a7..76a316fdcfcbcf98b881159da96f19a3c96cc34d 100644 --- a/MAC/Navigator2/scripts/libs/navigator.ctl +++ b/MAC/Navigator2/scripts/libs/navigator.ctl @@ -64,7 +64,7 @@ global dyn_int g_RSPList; // holds valid RSP's for choices in the v global dyn_int g_TBBList; // holds valid TBB's for choices in the viewBox global dyn_int g_RCUList; // holds valid RCU's for choices in the viewBox global dyn_int g_HBAList; // holds valid HBAAntenna's for choices in the viewBox -global dyn_int g_elementList; // holds valid HBA Elements's for choices in the viewBox +global dyn_int g_LBAList; // holds valid LBAAntenna's for choices in the viewBox // CEP based globals global dyn_int g_BGPRackList; // holds valid bgpracks for choices in viewBox global dyn_int g_BGPMidplaneList; // holds valid bgpmidplanes for choices in viewBox @@ -102,10 +102,10 @@ void navigator_handleEventInitialize() } else { g_standAlone = true; // can be used to check if we are in standalone mode (== station only mode) } - g_currentDatapoint = MainDBName+"LOFAR"; - g_lastHardwareDatapoint = MainDBName+"LOFAR"; - g_lastProcessesDatapoint = MainDBName+"LOFAR_PermSW"; - g_lastObservationsDatapoint = MainDBName+"LOFAR_ObsSW"; + g_currentDatapoint = MainDBName+"LOFAR"; + g_lastHardwareDatapoint = MainDBName+"LOFAR"; + g_lastProcessesDatapoint = MainDBName+"LOFAR_PermSW"; + g_lastObservationsDatapoint = MainDBName+"LOFAR_ObsSW"; // Set the global statecolors/colornames, we need to do this before we //start the rest of the framework, because the other processes need these diff --git a/MAC/Navigator2/scripts/transferMPs.ctl b/MAC/Navigator2/scripts/transferMPs.ctl index df3585c138e95c0c3b66906f9f6587ad801625db..07d9e15215ea0b03c96e47f803e4e4fc34803679 100644 --- a/MAC/Navigator2/scripts/transferMPs.ctl +++ b/MAC/Navigator2/scripts/transferMPs.ctl @@ -8,19 +8,25 @@ bool bDebug=false; void main() { // connect to debugflag to be able to switch debug on/off during run - if (dpExists("scriptInfo.transferMPs.debug")) { + if (dpExists("scriptInfo.transferMPs.debug")) { dpConnect("debugCB",true,"scriptInfo.transferMPs.debug"); } else { DebugTN("transferMPs.ctl:main|scriptInfo.transferMPs.runDone point not found in Database"); - exit(); } if (dpExists("scriptInfo.transferMPs.runDone")) { dpConnect("startTransferMP",true,"scriptInfo.transferMPs.runDone"); } else { DebugTN("transferMPs.ctl:main|scriptInfo.transferMPs.runDone point not found in Database"); - exit(); } + + //Check all .state and .childState points in the database if they are invalid, invalid points mean that they never have been initialised and thus are new + // in the database. These will be set to operational initialy + if (setOperational()) { + DebugTN("transferMPs.ctl:main|set new points to Operational done"); + } else { + DebugTN("transferMPs.ctl:main|set new points to Operational failed"); + } } private void debugCB(string dp1, bool debug) { @@ -93,6 +99,36 @@ private void startTransferMP(string dp1, bool done ) { DebugTN("MPTransfer Done."); } +private bool setOperational() { + + dyn_dyn_anytype tab; + string dp=""; + string query=""; + int z; + int aVal; + int err; + + query = "SELECT '_online.._invalid' FROM '{**.**.status.childState,**.**.status.state}' WHERE '_online.._invalid' == 1"; + + if (bDebug) DebugN("transferMPs.ctl:setOperational|Query: ",query); + err = dpQuery(query, tab); + + if (err < 0) { + if (bDebug) DebugN("transferMPs.ctl:setOperational|Error " + err + " while getting query."); + return false; + } + + for(z=2;z<=dynlen(tab);z++) { + + dp = tab[z][1]; + // filter out the _mp_ points + if (strpos(dp,"_mp_") < 0) { + dpSet(dp,10); + } + } + return true; +} + bool skipDP(string dp) { // We only want to look at our own DB points that have a _mp_ sadly enough PVSS // keeps some of their own datapoints in the database, and there is no way to