diff --git a/MAC/Navigator2/panels/HardwareTemplatePanel.pnl b/MAC/Navigator2/panels/HardwareTemplatePanel.pnl index f0e216f0592d6f83679e5ba7708680630cf7928b..9b7277406e56673d7da8ca44b12b63d9c68d4522 100644 --- a/MAC/Navigator2/panels/HardwareTemplatePanel.pnl +++ b/MAC/Navigator2/panels/HardwareTemplatePanel.pnl @@ -1,4 +1,4 @@ -V 11 +V 13 1 LANG:1 8 (NoName) PANEL,-1 -1 1075 795 N "_3DFace" 0 @@ -33,7 +33,7 @@ void controlAnObject(string dp1, string element, string dp3, bool invalid) { if (!invalid) { - // this means that the object invalid in the database (offline?) + // this means that the object is invalid in the database (offline?) } else{ // Do whatever is needed with the altered values and the object } @@ -137,9 +137,11 @@ void rClick() { navPanel_setEvent(\"What is rClicked\",\"EventRightClick\"); } " 0 - 2 + 3 "CBRef" "1" "EClose" E +"dpi" "96" +0 0 0 "" DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 LAYER, 0 @@ -156,8 +158,9 @@ E E E 1 LANG:1 0 -1 +2 "dashclr"N "_Transparent" +"antiAliased" "0" E E 0 1 1 0 1 E 1 0 1 -10 0 1 E 0 0 1008 744 0 LAYER, 1 diff --git a/MAC/Navigator2/panels/Test/testAlertRowLOFAR.pnl b/MAC/Navigator2/panels/Test/testAlertRowLOFAR.pnl index c2eaa03058d9ada9e5f50f83f60835a4ea863ecc..96685e846405729efcb7a2ce557a140277f85891 100644 --- a/MAC/Navigator2/panels/Test/testAlertRowLOFAR.pnl +++ b/MAC/Navigator2/panels/Test/testAlertRowLOFAR.pnl @@ -1,12 +1,14 @@ -V 11 +V 13 1 LANG:1 0 PANEL,-1 -1 1123 644 N "_3DFace" 0 E E E E E 1 -1 -1 0 -1 19 ""0 1 -E E 2 +E E 3 "CBRef" "1" "EClose" E +"dpi" "96" +0 0 0 "" DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 LAYER, 0 @@ -26,48 +28,22 @@ LANG:0 0 8 "invertedAppearance" "bool TRUE" -"maxValue" "int 99" -"tickInterval" "int 1" -"value" "int 50" -"backgroundOrigin" "enum 0" -"lineStep" "int 1" "minValue" "int 1" +"lineStep" "int 1" +"backgroundOrigin" "enum 0" +"value" "int 50" +"tickInterval" "int 1" +"maxValue" "int 99" "invertedAppearance" "bool TRUE" 2 -LANG:1 37 MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0 +LANG:1 35 MS Shell Dlg 2,-1,11,5,50,0,0,0,0,0 LANG:0 37 MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0 0 930 200 953 510 12 SliderWidget 0 -E1 1 0 "0" 18 -0 -1 2 0 "0" 19 -0 -1 3 0 "0" 24 -0 -1 4 0 "0" 8 -0 -1 5 0 "0" 9 -0 -1 6 0 "0" 16 -0 -1 7 0 "0" 12 -0 -1 8 0 "0" 14 -0 -1 9 0 "0" 17 -0 -1 10 0 "0" 25 -0 -1 11 0 "0" 15 -0 -1 12 0 "0" 21 -0 -1 13 0 "0" 22 -0 -1 14 0 "0" 0 +E1 18 0 "0" 18 0 -1 15 0 "0" 1 +1 32 0 "0" 1 31 "transform" 0 0 1 0 19.28571428571429 0 -914.2857142857145 0 13 16 @@ -83,7 +59,7 @@ LANG:1 0 0 1 -LANG:1 37 MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0 +LANG:1 35 MS Shell Dlg 2,-1,11,5,50,0,0,0,0,0 0 38 8 192 42 T @@ -125,7 +101,8 @@ LAYER, 7 LANG:1 0 0 3 0 "PANEL_REF0" -1 -"objects\\STD_PANELS\\AESRow.pnl" -1 19 T 0 U +"" "" +"objects/STD_PANELS/AESRow.pnl" -1 19 T 0 U 1 "$AESREGDOLLAR_SCREENTYPE""aes_alertRow_LOFAR" 0 diff --git a/MAC/Navigator2/panels/Test/testStationSumAlertToMCUalert.pnl b/MAC/Navigator2/panels/Test/testStationSumAlertToMCUalert.pnl index 0174696c805d062139f346f6c8014519af7fcad5..970d3cf526bcf482e8597564b894c5c35ede56cd 100644 --- a/MAC/Navigator2/panels/Test/testStationSumAlertToMCUalert.pnl +++ b/MAC/Navigator2/panels/Test/testStationSumAlertToMCUalert.pnl @@ -1,4 +1,4 @@ -V 11 +V 13 1 LANG:1 0 PANEL,-1 -1 500 400 N "_3DFace" 0 @@ -8,7 +8,9 @@ PANEL,-1 -1 500 400 N "_3DFace" 0 }" 0 E E E E 1 -1 -1 0 40 30 ""0 1 -E "string _strCurrentAlertClass; +E "#uses \"navFunct.ctl\" + +string _strCurrentAlertClass; void Init() @@ -18,7 +20,7 @@ void Init() // string strQuery = \"SELECT ALERT '_alert_hdl.._direction', '_alert_hdl.._prior', '_alert_hdl.._class' FROM 'LOFAR.status.childSumAlert' REMOTE 'CS011:'\"; - string strQuery = \"SELECT ALERT '_alert_hdl.._direction', '_alert_hdl.._prior', '_alert_hdl.._class' FROM 'LOFAR_PIC_Cabinet1_Subrack2.status.childSumAlert' REMOTE 'CS011:'\"; + string strQuery = \"SELECT ALERT '_alert_hdl.._direction', '_alert_hdl.._prior', '_alert_hdl.._class' FROM 'LOFAR_PIC.status.childSumAlert' REMOTE ALL\"; dpQueryConnectSingle( \"CallbackAlertLCU\", true, \"\", strQuery ); } @@ -56,12 +58,15 @@ void CallbackAlertLCU( string strIdent, dyn_dyn_anytype ddaAlerts ) int x, iHighestPrio; bool bCame, bRetVal; string strHighestAlertClass; + string db; DebugN( \"CallbackAlertLCU:\" ); - DebugN( ddaAlerts ); + DebugN( \"Ident: \", strIdent ); + DebugN( \"Alerts: \", ddaAlerts ); for( x=2; x<=dynlen(ddaAlerts); x++ ) { + db = dpSubStr(ddaAlerts[x][1],DPSUB_SYS); bool bDirection = ddaAlerts[x][3]; int iPrio = ddaAlerts[x][4]; string strClass = ddaAlerts[x][5]; @@ -79,31 +84,48 @@ void CallbackAlertLCU( string strIdent, dyn_dyn_anytype ddaAlerts ) iHighestPrio = iPrio; } - } + } + + // skip if no station + if (db == MainDBName || db == CEPDBName) return; DebugN( \"strHighestAlertClass = \" + strHighestAlertClass ); + + string mainDP = MainDBName; + if (navFunct_isCoreStation(db)) + { + mainDP+=\"LOFAR_PIC_Core_\"+navFunct_bareDBName(db)+\".status.childSumAlert\"; + } + else if (navFunct_isRemoteStation(db)) + { + mainDP+=\"LOFAR_PIC_Remote_\"+navFunct_bareDBName(db)+\".status.childSumAlert\"; + } + else if (navFunct_isInternationalStation(db)) + { + mainDP+=\"LOFAR_PIC_Europe_\"+navFunct_bareDBName(db)+\".status._childSumAlert\"; + } // Now get state of alert if( bCame ) { // Convert class from system to this sytem - strreplace( strHighestAlertClass, \"CS011:\", \"MCU001:\" ); + strreplace( strHighestAlertClass, db, MainDBName ); DebugTN( \"Setting alert to class: \" + strHighestAlertClass ); - dpDeactivateAlert( \"MCU001:CS011_SumAlert.\", bRetVal ); + dpDeactivateAlert( mainDP, bRetVal ); // Change class and set alert to true - dpSet( \"MCU001:CS011_SumAlert.:_alert_hdl.._class\", strHighestAlertClass, - \"MCU001:CS011_SumAlert.\", true ); + dpSet( mainDP+\":_alert_hdl.._class\", strHighestAlertClass, + mainDP, true ); - dpActivateAlert( \"MCU001:CS011_SumAlert.\", bRetVal ); + dpActivateAlert( mainDP, bRetVal ); } else { DebugTN( \"Reset alert\" ); - dpDeactivateAlert( \"MCU001:CS011_SumAlert.\", bRetVal ); - dpSet( \"MCU001:CS011_SumAlert.\", false ); + dpDeactivateAlert( mainDP, bRetVal ); + dpSet( mainDP, false ); } } @@ -111,9 +133,11 @@ void CallbackAlertLCU( string strIdent, dyn_dyn_anytype ddaAlerts ) " 0 - 2 + 3 "CBRef" "1" "EClose" E +"dpi" "96" +0 0 0 "" DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 LAYER, 0 @@ -132,7 +156,7 @@ LANG:1 0 0 1 -LANG:1 37 MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0 +LANG:1 35 MS Shell Dlg 2,-1,11,5,50,0,0,0,0,0 0 98 48 332 152 T @@ -141,7 +165,7 @@ LANG:1 12 PUSH_BUTTON2 "main() { int iState; - dpGet( \"MCU001:CS011_SumAlert.:_alert_hdl.._act_state\", iState ); + dpGet( \"MCU001:LOFAR_PIC_Europe_PL611.status.childSumAlert:_alert_hdl.._act_state\", iState ); DebugN( \"iState = \" + iState ); }" 0 E E E diff --git a/MAC/Navigator2/panels/objects/Alerts/alarms.pnl b/MAC/Navigator2/panels/objects/Alerts/alarms.pnl index 64b7469ca683121e70546a00d01795db209ba3f1..90cec5c7cf011ab497aa14e24cb5f6fd9075be09 100644 --- a/MAC/Navigator2/panels/objects/Alerts/alarms.pnl +++ b/MAC/Navigator2/panels/objects/Alerts/alarms.pnl @@ -1,4 +1,4 @@ -V 11 +V 13 1 LANG:1 0 PANEL,-1 -1 1242 823 N "_3DFace" 1 @@ -217,6 +217,7 @@ void acknowledgeAlarm(int iPos,string dp,string message,bool save) { g_alarms_copy[ \"STATE\" ][iPos] == BROKEN_WENT) { state = BROKEN; } + // check if the old state in the database is allready lower then the one in the global list. // in that case we need to keep the DB state, since the state could have been changed b4 the ack was done. // and the complete alarm can be removed from the global. @@ -225,6 +226,11 @@ void acknowledgeAlarm(int iPos,string dp,string message,bool save) { if (dpExists(dp)) { dpGet(dp,dpState); + // if state = beyond repair dont change + if (dpState == BEYOND_REPAIR) { + return; + } + if (dpState < state) { needsSave=true; dynRemove(g_alarms_copy[\"DPNAME\" ],iPos); @@ -364,9 +370,11 @@ void acknowledge(string what) { acknowledgeAlarm(ackList[jPos],dp,message,save); } }" 0 - 2 + 3 "CBRef" "1" "EClose" E +"dpi" "96" +0 0 0 "" DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 LAYER, 0 @@ -460,7 +468,7 @@ LANG:1 0 0 1 -LANG:1 34 MS Shell Dlg 2,8,-1,5,50,0,0,0,0,0 +LANG:1 35 MS Shell Dlg 2,-1,11,5,50,0,0,0,0,0 0 -2 -2 122 24 0 1 LANG:1 11 Acknowledge