From b5af67e12801953dc41b64b8d21dda94f96e6520 Mon Sep 17 00:00:00 2001 From: Arthur Coolen <coolen@astron.nl> Date: Mon, 14 Mar 2016 09:11:22 +0000 Subject: [PATCH] Task #9209: Added the possibility to keep the last viewed antenna type in the station panel --- .gitattributes | 1 + MAC/Navigator2/panels/Hardware/Station.pnl | 24 +- MAC/Navigator2/panels/main.pnl | 32 +- .../objects/Hardware/AARTFAAC-URIBoard.pnl | 1 + .../panels/objects/systemMainLine.pnl | 1727 +++++++++++++++++ MAC/Navigator2/scripts/libs/navigator.ctl | 7 + 6 files changed, 1772 insertions(+), 20 deletions(-) create mode 100644 MAC/Navigator2/panels/objects/systemMainLine.pnl diff --git a/.gitattributes b/.gitattributes index 252016504a8..bf82c4109b2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4067,6 +4067,7 @@ MAC/Navigator2/panels/objects/navigator_typeSelector.pnl -text MAC/Navigator2/panels/objects/navigator_viewSelection.pnl -text MAC/Navigator2/panels/objects/show_legenda.pnl -text MAC/Navigator2/panels/objects/swlevel.pnl -text +MAC/Navigator2/panels/objects/systemMainLine.pnl -text MAC/Navigator2/pictures/16_empty.gif -text svneol=unset#image/gif MAC/Navigator2/pictures/16_hand_right.gif -text svneol=unset#image/gif MAC/Navigator2/pictures/253.bmp -text svneol=unset#image/bmp diff --git a/MAC/Navigator2/panels/Hardware/Station.pnl b/MAC/Navigator2/panels/Hardware/Station.pnl index 5d5a0f411b3..df293e855ec 100644 --- a/MAC/Navigator2/panels/Hardware/Station.pnl +++ b/MAC/Navigator2/panels/Hardware/Station.pnl @@ -83,7 +83,7 @@ void doAction(string aDP, string anAction) { // Reload if (actionString[1] == \"Reload\") { - redraw(arrayList.text(arrayList.number())); + redraw(g_activeAntennaType); return; } else if (actionString[1] == \"DistChanged\") { // for dist system bound hardware only, if the distsystem went offline we need to replace @@ -116,7 +116,7 @@ void updatePositions(string dp1, float cX, // Check if the update concerns the current view - string txt=arrayList.text(arrayList.number()); + string txt=g_activeAntennaType; if (strpos(dp1,txt) < 0) { //not found match return; @@ -358,8 +358,9 @@ void redraw(string mode) { void updateField() { // Check if the update concerns the current view - string txt= arrayList.text(arrayList.number()); + string txt= g_activeAntennaType; + sysName = dpSubStr(g_currentDatapoint,DPSUB_SYS); string dpt=txt+\"Antenna\"; dyn_string unsortX=dpNames(sysName+\"LOFAR_PIC_\"+txt+\"*.common.deltaX;\",dpt); dyn_string unsortY=dpNames(sysName+\"LOFAR_PIC_\"+txt+\"*.common.deltaY;\",dpt); @@ -509,13 +510,28 @@ LANG:1 0 E E 0 0 0 0 0 1 -E "main(int button) +"main() +{ + zoomFactor=1; + shiftValue=25; + shiftFactorX=0; + shiftFactorY=0; + setValue(\"shift_value\",\"text\",shiftValue); + if (g_activeAntennaType == \"LBA\") { + setValue(\"\", \"number\", 1); + } else { + setValue(\"\", \"number\", 0); + } + updateField(); +}" 0 + "main(int button) { zoomFactor=1; shiftValue=25; shiftFactorX=0; shiftFactorY=0; setValue(\"shift_value\",\"text\",shiftValue); + g_activeAntennaType = arrayList.text(arrayList.number()); updateField(); }" 0 diff --git a/MAC/Navigator2/panels/main.pnl b/MAC/Navigator2/panels/main.pnl index 1d60ce83cb8..e3bbcea9247 100644 --- a/MAC/Navigator2/panels/main.pnl +++ b/MAC/Navigator2/panels/main.pnl @@ -302,7 +302,7 @@ LANG:1 7 swlevel 2 25 "PRIMITIVE_TEXT5" "" -1 155 2 E E E 1 E 1 E N "_WindowText" E N "_Window" E E +1 133 2 E E E 1 E 1 E N "_WindowText" E N "_Window" E E E E 10 0 0 0 0 0 E E E @@ -312,16 +312,16 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 0 E 155 2 196 15 -0 2 2 "0s" 0 0 0 192 0 0 155 2 1 +E E 0 1 1 2 1 E U 0 E 133 2 203 15 +0 2 2 "0s" 0 0 0 192 0 0 133 2 1 1 LANG:1 34 MS Shell Dlg 2,8,-1,5,75,0,0,0,0,0 0 1 -LANG:1 6 stream +LANG:1 11 data stream 2 29 "PRIMITIVE_TEXT6" "" -1 160 15 E E E 1 E 1 E N "_WindowText" E N "_Window" E E +1 150 15 E E E 1 E 1 E N "_WindowText" E N "_Window" E E E E 14 0 0 0 0 0 E E E @@ -331,8 +331,8 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 0 E 160 15 167 28 -0 2 2 "0s" 0 0 0 192 0 0 160 15 1 +E E 0 1 1 2 1 E U 0 E 150 15 157 28 +0 2 2 "0s" 0 0 0 192 0 0 150 15 1 1 LANG:1 34 MS Shell Dlg 2,8,-1,5,75,0,0,0,0,0 0 1 @@ -340,7 +340,7 @@ LANG:1 1 0 2 30 "PRIMITIVE_TEXT7" "" -1 190 15 E E E 1 E 1 E N "_WindowText" E N "_Window" E E +1 180 15 E E E 1 E 1 E N "_WindowText" E N "_Window" E E E E 15 0 0 0 0 0 E E E @@ -350,8 +350,8 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 0 E 190 15 197 28 -0 2 2 "0s" 0 0 0 192 0 0 190 15 1 +E E 0 1 1 2 1 E U 0 E 180 15 187 28 +0 2 2 "0s" 0 0 0 192 0 0 180 15 1 1 LANG:1 34 MS Shell Dlg 2,8,-1,5,75,0,0,0,0,0 0 1 @@ -739,7 +739,7 @@ LANG:1 14 processSubtype 2 117 "PRIMITIVE_TEXT39" "" -1 950 10 E E E 1 E 1 E N "_WindowText" E N "_Window" E E +1 940 10 E E E 1 E 1 E N "_WindowText" E N "_Window" E E E E 54 0 0 0 0 0 E E E @@ -749,12 +749,12 @@ LANG:1 26 #faulty HBA & LBA Antennas 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 0 E 950 10 997 23 -0 2 2 "0s" 0 0 0 192 0 0 950 10 1 +E E 0 1 1 2 1 E U 0 E 940 10 1019 23 +0 2 2 "0s" 0 0 0 192 0 0 940 10 1 1 LANG:1 34 MS Shell Dlg 2,8,-1,5,75,0,0,0,0,0 0 1 -LANG:1 7 streams +LANG:1 13 input streams 2 172 "PRIMITIVE_TEXT40" "" @@ -781,7 +781,7 @@ LANG:1 0 4 28 "LINE1" "" -1 220 0 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E +1 210 0 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E E E 13 0 0 0 0 0 E E E @@ -791,7 +791,7 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 2 1 2 1 E 220 0 220 660 +E E 0 2 1 2 1 E 210 0 210 660 4 33 "LINE2" "" diff --git a/MAC/Navigator2/panels/objects/Hardware/AARTFAAC-URIBoard.pnl b/MAC/Navigator2/panels/objects/Hardware/AARTFAAC-URIBoard.pnl index bc52f093993..9a1c1936709 100644 --- a/MAC/Navigator2/panels/objects/Hardware/AARTFAAC-URIBoard.pnl +++ b/MAC/Navigator2/panels/objects/Hardware/AARTFAAC-URIBoard.pnl @@ -1,6 +1,7 @@ V 11 1 LANG:1 8 URIbard + PANEL,-1 -1 717 319 N "_3DFace" 0 "main() { diff --git a/MAC/Navigator2/panels/objects/systemMainLine.pnl b/MAC/Navigator2/panels/objects/systemMainLine.pnl new file mode 100644 index 00000000000..898c0a166bf --- /dev/null +++ b/MAC/Navigator2/panels/objects/systemMainLine.pnl @@ -0,0 +1,1727 @@ +V 11 +1 +LANG:1 0 +PANEL,-1 -1 1062 56 N "_3DFace" 2 +"$barColor" +"$station" +"main() +{ + bar.backCol($barColor); + bar.foreCol($barColor); + station = $station; + station_text1.text = station; + station_text2.text = station; + + swline1.visible(false); + swline2.visible(false); + swline3.visible(false); + swline4.visible(false); + swline5.visible(false); + swline6.visible(false); + + if ( station == navFunct_bareDBName(CEPDBName) || station == navFunct_bareDBName(MainDBName)) { + setValue(\"stream0-1_text\",\"visible\",false); + setValue(\"stream0-2_text\",\"visible\",false); + setValue(\"stream0-3_text\",\"visible\",false); + setValue(\"stream0-4_text\",\"visible\",false); + setValue(\"stream0-5_text\",\"visible\",false); + setValue(\"stream1-1_text\",\"visible\",false); + setValue(\"stream1-2_text\",\"visible\",false); + setValue(\"stream1-3_text\",\"visible\",false); + setValue(\"stream1-4_text\",\"visible\",false); + setValue(\"stream1-5_text\",\"visible\",false); + } + + if (!navFunct_isCoreStation(station)){ + setValue(\"stream1-1_text\",\"visible\",false); + setValue(\"stream1-2_text\",\"visible\",false); + setValue(\"stream1-3_text\",\"visible\",false); + setValue(\"stream1-4_text\",\"visible\",false); + setValue(\"stream1-5_text\",\"visible\",false); + corestation = false; + } + + SASGateway.visible(false); + PVSSGateway.visible(false); + FeedbackService.visible(false); + MessageRouter.visible(false); + CEPlogProcessor.visible(false); + + // check if station is online, otherwise all can be set offline and nothing is needed to be set + if (!navFunct_dpReachable(station+\":LOFAR\")) { + setAllOffline(); + } else { + connectSWLevel(); + connectDatastreams(); + connectStaticControllers(); + } +} + +void setAllOffline() { + station_text1.foreCol(\"Lofar_dpOffline\"); + station_text2.foreCol(\"Lofar_dpOffline\"); + level1_text.backCol(\"Lofar_dpOffline\"); + level2_text.backCol(\"Lofar_dpOffline\"); + level3_text.backCol(\"Lofar_dpOffline\"); + level4_text.backCol(\"Lofar_dpOffline\"); + level5_text.backCol(\"Lofar_dpOffline\"); + level6_text.backCol(\"Lofar_dpOffline\"); + level7_text.backCol(\"Lofar_dpOffline\"); + level8_text.backCol(\"Lofar_dpOffline\"); + level9_text.backCol(\"Lofar_dpOffline\"); + level10_text.backCol(\"Lofar_dpOffline\"); + level11_text.backCol(\"Lofar_dpOffline\"); + level12_text.backCol(\"Lofar_dpOffline\"); + level13_text.backCol(\"Lofar_dpOffline\"); + level14_text.backCol(\"Lofar_dpOffline\"); + level15_text.backCol(\"Lofar_dpOffline\"); + + setValue(\"stream0-1_text\", \"backCol\",\"Lofar_dpOffline\"); + setValue(\"stream0-2_text\", \"backCol\",\"Lofar_dpOffline\"); + setValue(\"stream0-3_text\", \"backCol\",\"Lofar_dpOffline\"); + setValue(\"stream0-4_text\", \"backCol\",\"Lofar_dpOffline\"); + setValue(\"stream0-5_text\", \"backCol\",\"Lofar_dpOffline\"); + setValue(\"stream1-1_text\", \"backCol\",\"Lofar_dpOffline\"); + setValue(\"stream1-2_text\", \"backCol\",\"Lofar_dpOffline\"); + setValue(\"stream1-3_text\", \"backCol\",\"Lofar_dpOffline\"); + setValue(\"stream1-4_text\", \"backCol\",\"Lofar_dpOffline\"); + setValue(\"stream1-5_text\", \"backCol\",\"Lofar_dpOffline\"); + + SoftwareMonitor.backCol(\"Lofar_dpOffline\"); + LogProcessor.backCol(\"Lofar_dpOffline\"); + ServiceBroker.backCol(\"Lofar_dpOffline\"); + SASGateway.backCol(\"Lofar_dpOffline\"); + PVSSGateway.backCol(\"Lofar_dpOffline\"); + FeedbackService.backCol(\"Lofar_dpOffline\"); + MessageRouter.backCol(\"Lofar_dpOffline\"); + CEPlogProcessor.backCol(\"Lofar_dpOffline\"); + +} + +void connectSWLevel() { + string swDP = station+\":LOFAR_PermSW_Daemons_SoftwareMonitor\"; + + if (dpExists(swDP)) { + showLevels(swDP); + } else { + station_text1.foreCol(\"Lofar_dpdoesnotexist\"); + station_text2.foreCol(\"Lofar_dpdoesnotexist\"); + level1_text.backCol(\"Lofar_dpdoesnotexist\"); + level2_text.backCol(\"Lofar_dpdoesnotexist\"); + level3_text.backCol(\"Lofar_dpdoesnotexist\"); + level4_text.backCol(\"Lofar_dpdoesnotexist\"); + level5_text.backCol(\"Lofar_dpdoesnotexist\"); + level6_text.backCol(\"Lofar_dpdoesnotexist\"); + level7_text.backCol(\"Lofar_dpdoesnotexist\"); + level8_text.backCol(\"Lofar_dpdoesnotexist\"); + level9_text.backCol(\"Lofar_dpdoesnotexist\"); + level10_text.backCol(\"Lofar_dpdoesnotexist\"); + level11_text.backCol(\"Lofar_dpdoesnotexist\"); + level12_text.backCol(\"Lofar_dpdoesnotexist\"); + level13_text.backCol(\"Lofar_dpdoesnotexist\"); + level14_text.backCol(\"Lofar_dpdoesnotexist\"); + level15_text.backCol(\"Lofar_dpdoesnotexist\"); + } +} + +void connectDatastreams() { + //Point to show the datastreamlevel of a certain station + + string dsDP = station+\":LOFAR_PIC_StationInfo\"; + if (dpExists(dsDP)) { + showDatastreams(dsDP); + } +} + +void connectStaticControllers() { + dyn_string connectList; + + + // station, MCU and CCU + FeedbackService.visible(false); + softwareMonitorDP = station+\":LOFAR_PermSW_Daemons_SoftwareMonitor\"; + logProcessorDP = station+\":LOFAR_PermSW_Daemons_LogProcessor\"; + serviceBrokerDP = station+\":LOFAR_PermSW_Daemons_ServiceBroker\"; + + dynAppend(connectList, softwareMonitorDP+\".status.state\"); + dynAppend(connectList, logProcessorDP+\".status.state\"); + dynAppend(connectList, serviceBrokerDP+\".status.state\"); + + // station and MCU only + if (station != navFunct_bareDBName(CEPDBName)) { + PVSSGateway.visible(false); + MessageRouter.visible(false); + CEPlogProcessor.visible(false); + SASGateway.visible(true); + SASGatewayDP = station+\":LOFAR_PermSW_Daemons_SASGateway\"; + dynAppend(connectList, SASGatewayDP+\".status.state\"); + + } + + // MCU only + if (station == navFunct_bareDBName(MainDBName)) { + FeedbackService.visible(true); + feedbackServiceDP = station+\":LOFAR_PermSW_Daemons_FeedbackService\"; + dynAppend(connectList, feedbackServiceDP+\".status.state\"); + } + + // CCU only + if (station == navFunct_bareDBName(CEPDBName)) { + SASGateway.visible(false); + PVSSGateway.visible(true); + MessageRouter.visible(true); + CEPlogProcessor.visible(true); + PVSSGatewayDP = station+\":LOFAR_PermSW_Daemons_PVSSGateway\"; + CEPlogProcessorDP = station+\":LOFAR_PermSW_Daemons_CEPlogProcessor\"; + messageRouterDP = station+\":LOFAR_PermSW_Daemons_MessageRouter\"; + dynAppend(connectList, PVSSGatewayDP+\".status.state\"); + dynAppend(connectList, CEPlogProcessorDP+\".status.state\"); + dynAppend(connectList, messageRouterDP+\".status.state\"); + } + +// DebugN(connectList); + + SoftwareMonitor.toolTipText(softwareMonitorDP); + LogProcessor.toolTipText(logProcessorDP); + ServiceBroker.toolTipText(serviceBrokerDP); + SASGateway.toolTipText(SASGatewayDP); + PVSSGateway.toolTipText(PVSSGatewayDP); + FeedbackService.toolTipText(feedbackServiceDP); + MessageRouter.toolTipText(messageRouterDP); + CEPlogProcessor.toolTipText(CEPlogProcessorDP); + + if (dpConnect(\"updateStaticControllers\", connectList) == -1) { + LOG_ERROR(\"systemMainLine.pnl:reload|Couldn't connect to (some) static controllers: \"+getLastError()); + } +} + +void updateStaticControllers( dyn_string ctrlList, dyn_int statusList) { + int lvl = 0; + + for (int i = 1; i <= dynlen(ctrlList); i++) { + string name = ctrlList[i]; + strreplace(name,\".status.state:_online.._value\",\"\"); + setValue(navFunct_dpGetLastElement(name), \"backCol\", getStateColor(statusList[i])); + } + return; +} + + +// Some controllers need to be updated each time the observationslist is changed +// ObservationControl // MCU +// OnlineControl // CCU +// PythonControl // CCU +// CalibrationControl // Station +// BeamControl // Station +// TBBControl // Station +void connectDynamicControllers() { +} + + + + + + + + + + +void addSWCtrler() { + int xPos_AddSymbol = xPos+235; + int yPos_AddSymbol = yPos+3; + + string addPanelName; + //loop over list and prepare panel with all datastreamobjects + //CCU and MCU machines different layout + if (strpos(station,\"MCU\") >=0 ) { + addPanelName = \"objects/Processes/MCUSWLevelView.pnl\"; + } else if( strpos(station,\"CCU\") >=0) { + addPanelName = \"objects/Processes/CCUSWLevelView.pnl\"; + } else { + addPanelName = \"objects/Processes/stationSWLevelView.pnl\"; + } + string swCtrlRefName=\"swCtrl\"; + + if ( addSymbol( strModuleName, // Stay in this modul + \"\", // Name of this panel + addPanelName, // Panel to add + swCtrlRefName, // Ref of the addedPanel + makeDynString( \"$station:\" + station) , // Define all $values + xPos_AddSymbol, // Xpos of the AddedSymbol + yPos_AddSymbol, // Ypos of the AddedSymbol + 0, // angle + 1 ,1 // zoomX , zoomY + ) < 0 ) { + LOG_ERROR(\"baseLine.pnl:addSWCtrler|Error swCtrl for : \" + station + \" in this panel.\"); + } +} + +void addMemAndHDD() { + int xPos_AddSymbol = xPos+631; + int yPos_AddSymbol = yPos+3; + + string addPanelName = \"objects/Hardware/System_MemAndHDD.pnl\"; + + string memAndHDDRefName=\"memAndHDD\"; + + if ( addSymbol( strModuleName, // Stay in this modul + \"\", // Name of this panel + addPanelName, // Panel to add + memAndHDDRefName, // Ref of the addedPanel + makeDynString( \"$station:\" + station) , // Define all $values + xPos_AddSymbol, // Xpos of the AddedSymbol + yPos_AddSymbol, // Ypos of the AddedSymbol + 0, // angle + 1 ,1 // zoomX , zoomY + ) < 0 ) { + LOG_ERROR(\"baseLine.pnl:addMemAndHDD|Error memAndHDD for : \" + station + \" in this panel.\"); + } +} + +void addStationView() { + int xPos_AddSymbol = xPos+671; + int yPos_AddSymbol = yPos+3; + + string addPanelName = \"objects/Hardware/Station_mainView.pnl\"; + if (strpos(station,\"MCU\") >=0 ||strpos(station,\"CCU\") >=0) return; + + string stationViewRefName=\"stationView\"; + + if ( addSymbol( strModuleName, // Stay in this modul + \"\", // Name of this panel + addPanelName, // Panel to add + stationViewRefName, // Ref of the addedPanel + makeDynString( \"$station:\" + station) , // Define all $values + xPos_AddSymbol, // Xpos of the AddedSymbol + yPos_AddSymbol, // Ypos of the AddedSymbol + 0, // angle + 1 ,1 // zoomX , zoomY + ) < 0 ) { + LOG_ERROR(\"main.pnl:addStationView|Error stationView for : \" + station + \" in this panel.\"); + } +} +" 0 + E "main(int x, int y) +{ + click(this.name); +}" 0 + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + 1 -1 -1 0 0 0 +""0 1 +E "#uses \"navPanel.ctl\" +string station = \"\"; +string baseDP = \"\"; +// controllers and drivers +string softwareMonitorDP = \"\"; +string logProcessorDP = \"\"; +string serviceBrokerDP = \"\"; +string SASGatewayDP = \"\"; +string feedbackServiceDP = \"\"; +string PVSSGatewayDP = \"\"; +string CEPlogProcessorDP = \"\"; +string messageRouterDP = \"\"; + + +bool bDoubleClicked = false; + +int lvlfilled=0; +bool corestation = true; +int ds0filled=0; +int ds1filled=0; + +// routine for single mouse click +void click(string name) { + // set delay in case double click was meant + delay(0, 100); + if (!bDoubleClicked) { + navPanel_setEvent(name,\"EventClick\"); + } +} + +// routine for double mouse click +void dblClick(string name) { + // indicate this is a doubleClick + bDoubleClicked = true; + if (name == station) baseDP=station+\":LOFAR\"; + + if (dpExists(baseDP) ) { + LOG_DEBUG(\"systemMainline.pnl:DoubleClick|Setting currentDatapoint from : \"+g_currentDatapoint+\" to \"+baseDP); + g_currentDatapoint=baseDP; + if (name == station) { + 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(string name) { + +} + + +// **************************************** +// Name: showLevels +// **************************************** +// Connects to the given datapoint .swLevel +// and keep track of history +// +// **************************************** +showLevels(string swDP) +{ + LOG_TRACE(\"systemMainLine.pnl:showLevels| Entered for DP:\" ,swDP); + + string dpLvl = swDP+\".SWLevel\"; + string systemName = dpSubStr(dpLvl,DPSUB_SYS); + string bareDP = dpSubStr(dpLvl,DPSUB_DP_EL_CONF_DET_ATT); + + if (navFunct_dpReachable(dpLvl)) { + if(dpExists(dpLvl)) { + // gather the historical data: + dyn_dyn_anytype tab; + int z; + time tStart; + time tStop; + tStop = getCurrentTime(); + tStart = tStop - 15*3600; // 15 hours of history + + string query=\"\"; + + if (systemName != MainDBName) { + query = \"SELECT ALL '_original.._value','_original.._stime' FROM '\" + dpLvl + \"' REMOTE'\"+systemName +\"' TIMERANGE(\\\"\" + + formatTime(\"%Y.%m.%d %H:%M:%S\",tStart) + \"\\\",\\\"\" + + formatTime(\"%Y.%m.%d %H:%M:%S\",tStop) + \"\\\",1,0) LAST 15\"; + } else { + query = \"SELECT ALL '_original.._value','_original.._stime' FROM '\" + dpLvl + \"' TIMERANGE(\\\"\" + + formatTime(\"%Y.%m.%d %H:%M:%S\",tStart) + \"\\\",\\\"\" + + formatTime(\"%Y.%m.%d %H:%M:%S\",tStop) + \"\\\",1,0) LAST 15\"; + } + + dpQuery(query, tab); + + + for(z=2;z<dynlen(tab);z++) { + addLevel(tab[z][2],tab[z][3]); + } + + // connect to levels + if (dpConnect(\"updateLevel\",dpLvl, + dpLvl+\":_original.._stime\", + dpLvl+\":_online.._invalid\") == -1) { + LOG_ERROR(\"systemMainLine.pnl:showLevels|Couldn't connect to \"+dpLvl+ \" \" + getLastError()); + } + } else { + LOG_DEBUG(\"systemMainLine.pnl:showLevels|error connecting to: \"+ dpLvl); + } + } else { + station_text1.foreCol(\"Lofar_dpOffline\"); + station_text2.foreCol(\"Lofar_dpOffline\"); + } +} + +// **************************************** +// Name: updateLevel +// **************************************** +// callback for showLevels +// +// **************************************** +updateLevel(string dp1, int lvl, + string dp2, string changed, + string dp3, bool invalid) +{ + LOG_TRACE(\"systemMainLine.pnl:showLevels|Level: \"+lvl); + if (invalid) { + station_text1.foreCol(\"Lofar_invalid\"); + station_text2.foreCol(\"Lofar_invalid\"); + } else { + station_text1.foreCol(\"_WindowText\"); + station_text2.foreCol(\"_WindowText\"); + addLevel(lvl,changed); + } +} + +// **************************************** +// Name: addLevel +// **************************************** +// fill the 15 timestamped SWlevels for this Database +// +// **************************************** +addLevel(int lvl,string changed) +{ + LOG_TRACE(\"systemMainLine.pnl:addlevel|lvl: \" + lvl); + + string toolTip = changed+\"<br> level: \"+lvl; + + if (lvl > 100) lvl = 256-lvl; + + swline1.visible(false); + swline2.visible(false); + swline3.visible(false); + swline4.visible(false); + swline5.visible(false); + swline6.visible(false); + switch(lvl) { + case 1: + swline1.visible(true); + break; + case 2: + swline2.visible(true); + break; + case 3: + swline3.visible(true); + break; + case 4: + swline4.visible(true); + break; + case 5: + swline5.visible(true); + break; + case 6: + swline6.visible(true); + break; + } + + string lvlcolor=\"\"; + if (lvl == 0) { + lvlcolor=\"red\"; + } else if (lvl == 1) { + lvlcolor=\"{255,170,0}\"; //orange + } else if (lvl >= 2 && lvl < 6) { + lvlcolor=\"yellow\"; + } else if (lvl == 6) { + lvlcolor=\"green\"; + } else { + lvlcolor = \"white\"; + } + + string oldlvl=\"white\"; + string oldToolTip = \"\"; + for (int i=15-lvlfilled; i< 15 ;i++) { + if (i<=0) continue; + // get the original color and tooltip from the next right point and move it to this point + getValue(\"level\"+(i+1)+\"_text\",\"backCol\",oldlvl); + setValue(\"level\"+(i)+\"_text\",\"backCol\",oldlvl); + getValue(\"level\"+(i+1)+\"_text\",\"toolTipText\",oldToolTip); + setValue(\"level\"+(i)+\"_text\",\"toolTipText\",oldToolTip); + } + // set new values + setValue(\"level15_text\",\"backCol\",lvlcolor); + setValue(\"level15_text\",\"toolTipText\",toolTip); + if (lvlfilled < 14) lvlfilled++; +} + + +// **************************************** +// Name: showDatastreams +// **************************************** +// Connects to the given datapoint .datastream0 && 1 it's historical data (if any) +// and logs all +// +// **************************************** +showDatastreams(string dsDP) +{ + LOG_TRACE(\"systemMainLine.pnl:showLevels| Entered for DP:\" ,dsDP); + + string dpStream0 = dsDP+\".datastream0\"; + string dpStream1 = dsDP+\".datastream1\"; + string systemName = dpSubStr(dpStream0,DPSUB_SYS); + string bareDP = dpSubStr(dpStream0,DPSUB_DP_EL_CONF_DET_ATT); + + if(dpExists(dpStream0)) { + // gather the historical data: + dyn_dyn_anytype tab; + int z; + time tStart; + time tStop; + tStop = getCurrentTime(); + tStart = tStop - 15*3600; // 15 hours of history + + string query=\"\"; + + if (systemName != MainDBName) { + query = \"SELECT ALL '_original.._value','_original.._stime' FROM '\" + dpStream0 + \"' REMOTE'\"+systemName +\"' TIMERANGE(\\\"\" + + formatTime(\"%Y.%m.%d %H:%M:%S\",tStart) + \"\\\",\\\"\" + + formatTime(\"%Y.%m.%d %H:%M:%S\",tStop) + \"\\\",1,0) LAST 5\"; + } else { + query = \"SELECT ALL '_original.._value','_original.._stime' FROM '\" + dpStream0 + \"' TIMERANGE(\\\"\" + + formatTime(\"%Y.%m.%d %H:%M:%S\",tStart) + \"\\\",\\\"\" + + formatTime(\"%Y.%m.%d %H:%M:%S\",tStop) + \"\\\",1,0) LAST 5\"; + } + + dpQuery(query, tab); + + + for(z=2;z<dynlen(tab);z++) { + addStream(0,tab[z][2],tab[z][3]); + } + + // connect to levels + if (dpConnect(\"updateStream0\",dpStream0, + dpStream0+\":_original.._stime\", + dpStream0+\":_online.._invalid\") == -1) { + LOG_ERROR(\"systemMainLine.pnl:showDatastream|Couldn't connect to \"+dpStream0+ \" \" + getLastError()); + } + } else { + LOG_DEBUG(\"systemMainLine.pnl:showDatastream|error connecting to: \"+ dpStream0); + } + + if(dpExists(dpStream1) && corestation) { + // gather the historical data: + dyn_dyn_anytype tab; + int z; + time tStart; + time tStop; + tStop = getCurrentTime(); + tStart = tStop - 15*3600; // 15 hours of history + + string query=\"\"; + + if (systemName != MainDBName) { + query = \"SELECT ALL '_original.._value','_original.._stime' FROM '\" + dpStream1 + \"' REMOTE'\"+systemName +\"' TIMERANGE(\\\"\" + + formatTime(\"%Y.%m.%d %H:%M:%S\",tStart) + \"\\\",\\\"\" + + formatTime(\"%Y.%m.%d %H:%M:%S\",tStop) + \"\\\",1,0) LAST 5\"; + } else { + query = \"SELECT ALL '_original.._value','_original.._stime' FROM '\" + dpStream1 + \"' TIMERANGE(\\\"\" + + formatTime(\"%Y.%m.%d %H:%M:%S\",tStart) + \"\\\",\\\"\" + + formatTime(\"%Y.%m.%d %H:%M:%S\",tStop) + \"\\\",1,0) LAST 5\"; + } + + dpQuery(query, tab); + + + for(z=2;z<dynlen(tab);z++) { + addStream(1,tab[z][2],tab[z][3]); + } + + // connect to levels + if (dpConnect(\"updateStream1\",dpStream1, + dpStream1+\":_original.._stime\", + dpStream1+\":_online.._invalid\") == -1) { + LOG_ERROR(\"systemMainLine.pnl:showDatastream|Couldn't connect to \"+dpStream1+ \" \" + getLastError()); + } + } else { + LOG_DEBUG(\"systemMainLine.pnl:showDatastream|error connecting to: \"+ dpStream1); + } +} + +// **************************************** +// Name: updateStream0 +// **************************************** +// callback for showStreams +// +// **************************************** +updateStream0(string dp1, bool stream, + string dp2, string changed, + string dp3, bool invalid) +{ + LOG_TRACE(\"systemMainLine.pnl:showStream0|stream: \"+stream); + addStream(0,stream,changed); +} + +// **************************************** +// Name: updateStream1 +// **************************************** +// callback for showStreams +// +// **************************************** +updateStream1(string dp1, bool stream, + string dp2, string changed, + string dp3, bool invalid) +{ + LOG_TRACE(\"systemMainLine.pnl:showStream1|Stream: \"+stream); + addStream(1,stream,changed); +} + +// **************************************** +// Name: addStream +// **************************************** +// fill the timestamped datastreamLevels for this Database +// +// **************************************** +addStream(int streamnr,int stream,string changed) +{ + + LOG_TRACE(\"systemMainLine.pnl:addStream|streamnr -stream: \" + streamnr + \" - \"+stream); + + string streamon=\"true\"; + if (!stream) streamon=\"false\"; + string toolTip = changed+\"<br> stream: \"+streamon; + + string streamcolor=\"\"; + if (!stream) { + streamcolor=\"red\"; + } else if (stream) { + streamcolor=\"green\"; + } + + string oldstream=\"white\"; + string oldToolTip = \"\"; + if (streamnr == 0) { + for (int i=5-ds0filled; i< 5 ;i++) { + // get the original color and tooltip from the next right point and move it to this point + if (i == 0) continue; + getValue(\"stream0-\"+(i+1)+\"_text\",\"backCol\",oldstream); + setValue(\"stream0-\"+(i)+\"_text\",\"backCol\",oldstream); + getValue(\"stream0-\"+(i+1)+\"_text\",\"toolTipText\",oldToolTip); + setValue(\"stream0-\"+(i)+\"_text\",\"toolTipText\",oldToolTip); + } + // set new values + setValue(\"stream0-5_text\",\"backCol\",streamcolor); + setValue(\"stream0-5_text\",\"toolTipText\",toolTip); + if (ds0filled < 5) ds0filled++; + } else if (streamnr == 1) { + for (int i=5-ds1filled; i< 5 ;i++) { + // get the original color and tooltip from the next right point and move it to this point + if (i == 0) continue; + getValue(\"stream1-\"+(i+1)+\"_text\",\"backCol\",oldstream); + setValue(\"stream1-\"+(i)+\"_text\",\"backCol\",oldstream); + getValue(\"stream1-\"+(i+1)+\"_text\",\"toolTipText\",oldToolTip); + setValue(\"stream1-\"+(i)+\"_text\",\"toolTipText\",oldToolTip); + } + // set new values + setValue(\"stream1-5_text\",\"backCol\",streamcolor); + setValue(\"stream1-5_text\",\"toolTipText\",toolTip); + if (ds1filled < 5) ds1filled++; + } +}" 0 + 2 +"CBRef" "1" +"EClose" E +"" +DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 +LAYER, 0 +1 +LANG:1 0 +6 3 +"station_highLight" +"" +1 240 10 E E E 1 E 0 E N "_Transparent" E N "Lofar_highLight" E E + "main() +{ + rClick(station); +}" 0 + "main() +{ + dblClick(station); +}" 0 + +3 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +"main() +{ + dpConnect( \"swlevel_stationCallback\",true,DPNAME_NAVIGATOR + g_navigatorID +\".objectTrigger\" ); +} + +void swlevel_stationCallback(string dp1, bool aTrig) { + + LOG_DEBUG(\"systemMainLine.pnl:swlevel_stationCallback|ObjectTrigger Callback on: \"+dp1+\" trigger: \"+aTrig); + LOG_DEBUG(\"systemMainLine.pnl:swlevel_stationCallback|Found highlight : \" + highlight + \" Looking for station\"); + bool bHighlight=false; + if (dynContains(highlight,station)) { + bHighlight=true; + } + LOG_DEBUG(\"systemMainLine.pnl:swlevel_stationCallback|Highlight request: \"+bHighlight); + station_highLight.visible = bHighlight; + +} + +" 0 + "main() +{ + click(station); +}" 0 + 0 1 1 2 1 E U 1 E 0 0 931 15 +6 0 +"bar" +"" +1 0 30 E E E 1 E 1 E N "_3DFace" E N "_3DFace" E E + E E +0 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 0 1 2 1 E U 1 E 3 3 928 12 +2 4 +"station_text2" +"" +1 890 0 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + "main() +{ + rClick(station); +}" 0 + "main(int x, int y) +{ + dblClick(station); +}" 0 + +4 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(station); +}" 0 + 0 1 1 2 1 E U 0 E 890 0 918 13 +0 2 2 "0s" 0 0 0 192 0 0 890 0 1 +1 +LANG:1 34 MS Shell Dlg 2,8,-1,5,50,0,0,0,0,0 +0 1 +LANG:1 5 cs001 +6 76 +"level1_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +55 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -183 -147 1 E 230 150 234 159 +2 77 +"station_text1" +"" +1 0 0 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + "main() +{ + rClick(station); +}" 0 + "main(int x, int y) +{ + dblClick(station); +}" 0 + +56 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(station); +}" 0 + 0 1 1 2 1 E U 0 E 0 0 28 13 +0 2 2 "0s" 0 0 0 192 0 0 0 0 1 +1 +LANG:1 34 MS Shell Dlg 2,8,-1,5,50,0,0,0,0,0 +0 1 +LANG:1 5 cs001 +6 78 +"level2_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +57 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -178 -147 1 E 230 150 234 159 +6 79 +"level3_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +58 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -173 -147 1 E 230 150 234 159 +6 80 +"level4_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +59 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -168 -147 1 E 230 150 234 159 +6 81 +"level5_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +60 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -163 -147 1 E 230 150 234 159 +6 82 +"level6_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +61 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -158 -147 1 E 230 150 234 159 +6 83 +"level7_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +62 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -153 -147 1 E 230 150 234 159 +6 84 +"level8_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +63 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -148 -147 1 E 230 150 234 159 +6 85 +"level9_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +64 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -143 -147 1 E 230 150 234 159 +6 86 +"level10_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +65 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -138 -147 1 E 230 150 234 159 +6 87 +"level11_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +66 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -133 -147 1 E 230 150 234 159 +6 88 +"level12_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +67 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -128 -147 1 E 230 150 234 159 +6 89 +"level13_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +68 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -123 -147 1 E 230 150 234 159 +6 90 +"level14_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +69 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -118 -147 1 E 230 150 234 159 +6 91 +"level15_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +70 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -113 -147 1 E 230 150 234 159 +6 92 +"stream0-1_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +71 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -100 -147 1 E 230 150 234 159 +6 93 +"stream0-2_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +72 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -95 -147 1 E 230 150 234 159 +6 94 +"stream0-3_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +73 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -90 -147 1 E 230 150 234 159 +6 95 +"stream0-4_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +74 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -85 -147 1 E 230 150 234 159 +6 96 +"stream0-5_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +75 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -80 -147 1 E 230 150 234 159 +6 97 +"stream1-1_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +76 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -65 -147 1 E 230 150 234 159 +6 98 +"stream1-2_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +77 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -60 -147 1 E 230 150 234 159 +6 99 +"stream1-3_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +78 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -55 -147 1 E 230 150 234 159 +6 100 +"stream1-4_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +79 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -50 -147 1 E 230 150 234 159 +6 101 +"stream1-5_text" +"" +1 230 150 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(this.name); +}" 0 + "main(int x, int y) +{ + dblClick(this.name); +}" 0 + +80 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main(int x, int y) +{ + click(this.name); +}" 0 + 0 1 1 2 1 E 1 0 1 -45 -147 1 E 230 150 234 159 +6 102 +"LogProcessor" +"" +1 220 30 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + E E +81 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 6 -27 1 E 220 30 234 39 +6 104 +"SoftwareMonitor" +"" +1 220 30 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(station+\"PermSW_Daemons_SoftwareMonitor\"); +}" 0 + "main() +{ + dblClick(station+\"PermSW_Daemons_SoftwareMonitor\"); +}" 0 + +83 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main() +{ + click(station+\"PermSW_Daemons_SoftwareMonitor\"); +}" 0 + 0 1 1 2 1 E 1 0 1 -10 -27 1 E 220 30 234 39 +6 105 +"ServiceBroker" +"" +1 220 30 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + E E +84 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 22 -27 1 E 220 30 234 39 +6 106 +"SASGateway" +"" +1 220 30 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + E E +85 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 38 -27 1 E 220 30 234 39 +6 107 +"FeedbackService" +"" +1 220 30 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + E E +86 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 54 -27 1 E 220 30 234 39 +6 108 +"RECTANGLE6" +"" +1 220 30 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + E E +87 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 104 -27 1 E 220 30 234 39 +4 109 +"swline1" +"" +1 308 3 E E E 1 E 1 E N "_3DText" E N {255,255,255} E E + E E +88 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 3 1 2 1 E 308 3 308 12 +6 110 +"PVSSGateway" +"" +1 220 30 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + E E +89 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 38 -27 1 E 220 30 234 39 +6 111 +"MessageRouter" +"" +1 220 30 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + E E +90 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 54 -27 1 E 220 30 234 39 +6 112 +"CEPlogProcessor" +"" +1 220 30 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + E E +91 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 70 -27 1 E 220 30 234 39 +4 113 +"swline2" +"" +1 348 3 E E E 1 E 1 E N "_3DText" E N {255,255,255} E E + E E +92 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 3 1 2 1 E 348 3 348 12 +4 114 +"swline3" +"" +1 400 3 E E E 1 E 1 E N "_3DText" E N {255,255,255} E E + E E +93 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 3 1 2 1 E 400 3 400 12 +4 115 +"swline4" +"" +1 434 3 E E E 1 E 1 E N "_3DText" E N {255,255,255} E E + E E +94 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 3 1 2 1 E 434 3 434 12 +4 116 +"swline5" +"" +1 474 3 E E E 1 E 1 E N "_3DText" E N {255,255,255} E E + E E +95 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 3 1 2 1 E 474 3 474 12 +4 117 +"swline6" +"" +1 578 3 E E E 1 E 1 E N "_3DText" E N {255,255,255} E E + E E +96 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 3 1 2 1 E 578 3 578 12 +0 +LAYER, 1 +1 +LANG:1 0 +0 +LAYER, 2 +1 +LANG:1 0 +0 +LAYER, 3 +1 +LANG:1 0 +0 +LAYER, 4 +1 +LANG:1 0 +0 +LAYER, 5 +1 +LANG:1 0 +0 +LAYER, 6 +1 +LANG:1 0 +0 +LAYER, 7 +1 +LANG:1 0 +0 +0 diff --git a/MAC/Navigator2/scripts/libs/navigator.ctl b/MAC/Navigator2/scripts/libs/navigator.ctl index eb719358e7a..1dfd683a498 100644 --- a/MAC/Navigator2/scripts/libs/navigator.ctl +++ b/MAC/Navigator2/scripts/libs/navigator.ctl @@ -46,13 +46,20 @@ global bool g_objectReady = true; // Can be used for timing by objects +// store the current datapoint global string g_currentDatapoint = MainDBName+"LOFAR_PIC_Europe"; + +// store the last chosen panel for each tab global string g_lastHardwareDatapoint = MainDBName+"LOFAR_PIC_Europe"; global string g_lastProcessesDatapoint = MainDBName+"LOFAR_PermSW"; global string g_lastObservationsDatapoint = MainDBName+"LOFAR_ObsSW"; global string g_lastPipelinesDatapoint = MainDBName+"LOFAR_ObsSW"; + +// store the current active panel global string g_activePanel = "main.pnl"; +// store the last chosen antenna type +global string g_activeAntennaType = "HBA"; global dyn_string g_observationsList; // holds active observations -- GitLab