From ed2dce58cab02a3f8112d95aa2f36846b3ef9134 Mon Sep 17 00:00:00 2001 From: Arthur Coolen <coolen@astron.nl> Date: Wed, 25 Oct 2017 13:23:01 +0000 Subject: [PATCH] Task #10099: GCFCommon (and prod/test) handled childstate the old way. repaired this, added REPAIRED and MISSING to states --- .../panels/Popups/Popup_SetState.pnl | 8 +++-- MAC/Navigator2/panels/navigator.pnl | 33 ------------------- MAC/Navigator2/scripts/libs/GCFCommon.ctl | 11 ++++--- .../scripts/libs/GCFCommon_prod.ctl | 19 ++++++----- .../scripts/libs/GCFCommon_test.ctl | 15 +++++---- MAC/Navigator2/scripts/transferMPs.ctl | 2 +- 6 files changed, 31 insertions(+), 57 deletions(-) diff --git a/MAC/Navigator2/panels/Popups/Popup_SetState.pnl b/MAC/Navigator2/panels/Popups/Popup_SetState.pnl index 15b1d2fa64c..01d0d35fa3d 100644 --- a/MAC/Navigator2/panels/Popups/Popup_SetState.pnl +++ b/MAC/Navigator2/panels/Popups/Popup_SetState.pnl @@ -20,6 +20,7 @@ mapping _mStateNr; string messageCode = \"\"; dyn_string HBAmodes = makeDynString(\"Free choice\", + \"REPAIRED (REPAIRED)\", \"OSCILLATION (OSC)\", \"FLAT (FLAT)\", \"HIGH NOISE (HN)\", @@ -30,16 +31,19 @@ dyn_string HBAmodes = makeDynString(\"Free choice\", \"C-SUMMATOR (CSUM)\", \"JITTER > 3dB (JIT)\", \"RF element FAIL (E_FAIL)\", - \"MODEM element FAIL (MODEM)\"); + \"MODEM element FAIL (MODEM)\", + \"MISSING (MISSING)\"); dyn_string LBAmodes = makeDynString(\"Free choice\", + \"REPAIRED (REPAIRED)\", \"OSCILLATION (OSC)\", \"FLAT (FLAT)\", \"HIGH NOISE (HN)\", \"SHORT (SHORT)\", \"SPURIOUS (SPUR)\", \"LOW NOISE (LN)\", - \"DOWN (DOWN)\"); + \"DOWN (DOWN)\", + \"MISSING (MISSING)\"); void Init() diff --git a/MAC/Navigator2/panels/navigator.pnl b/MAC/Navigator2/panels/navigator.pnl index 7d01b49dfe1..73dea10b86f 100644 --- a/MAC/Navigator2/panels/navigator.pnl +++ b/MAC/Navigator2/panels/navigator.pnl @@ -244,39 +244,6 @@ LANG:1 12 PUSH_BUTTON1 "main() { navFunct_handleUndockClick(); -}" 0 - E E E -13 93 -"b_iltSwitch" -"" -1 1010.405 11 E E E 1 E 1 E N "_ButtonText" E N "_Button" E E - E E -32 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -0 -1 -LANG:1 35 MS Shell Dlg 2,-1,11,5,75,0,0,0,0,0 -0 991 3 1062 27 - -T -1 -LANG:1 9 iltSwitch -"main() -{ - bool localmode; - g_involved_stations = makeDynString(\"\"); - - dpGet(\"MCU001:LOFAR_PIC_Europe_DE601.localMode.stationSwitch\",localmode); - localmode = !localmode; - dpSet(\"MCU001:LOFAR_PIC_Europe_DE601.localMode.stationSwitch\",localmode); - - dynAppend(g_involved_stations,\"DE601:\"); - navCtrl_handleNavigatorEvent(\"\",\"ILTSwitched\",\"GCFCWD.ctl\"); - }" 0 E E E 1 173 21 "0.0" 18 diff --git a/MAC/Navigator2/scripts/libs/GCFCommon.ctl b/MAC/Navigator2/scripts/libs/GCFCommon.ctl index 55723688739..dfc6702ea43 100644 --- a/MAC/Navigator2/scripts/libs/GCFCommon.ctl +++ b/MAC/Navigator2/scripts/libs/GCFCommon.ctl @@ -207,12 +207,12 @@ void showSelfState(string aDP) { /////////////////////////////////////////////////////////////////////////// void showChildState(string aDP) { // check if the requiered datapoint for this view are accessible - if (dpExists(aDP+".status.childState")) { - if (dpConnect("updateChildState",aDP + ".status.childSumAlert:_alert_hdl.._act_state_color", aDP + ".status.childState:_online.._invalid") == -1) { + if (dpExists(aDP+".status.childSumAlert")) { + if (dpConnect("updateChildState",aDP + ".status.childSumAlert:_alert_hdl.._act_state_color", aDP + ".status.state:_online.._invalid") == -1) { setValue("childStateBorder","foreCol","Lofar_invalid"); } - if (!navFunct_dpReachable(aDP+".status.childState")) { - updateChildState("",0,"","","",true); + if (!navFunct_dpReachable(aDP+".status.childSumAlert")) { + updateChildState("","Lofar_dpOffline","",true); } } else { @@ -231,7 +231,8 @@ void showChildState(string aDP) { /////////////////////////////////////////////////////////////////////////// updateChildState(string dp1, string state, string dp2, bool invalid) { string SymbolCol; - + + if (invalid) { if (dp1 == "") { SymbolCol = "Lofar_dpOffline"; diff --git a/MAC/Navigator2/scripts/libs/GCFCommon_prod.ctl b/MAC/Navigator2/scripts/libs/GCFCommon_prod.ctl index d51e3721f2d..dfc6702ea43 100644 --- a/MAC/Navigator2/scripts/libs/GCFCommon_prod.ctl +++ b/MAC/Navigator2/scripts/libs/GCFCommon_prod.ctl @@ -43,7 +43,7 @@ const string DPNAME_NAVIGATOR = "__navigator"; global string MainDBName = "MCU001:"; global string CEPDBName = "CCU001:"; global unsigned MainDBID = 61; -global int g_MaxNrClaims = 250; // the maximal nr of claims handled by the claimmanager +global int g_MaxNrClaims = 250; // the maximal nr of claims handled by the claimmanager global mapping stateColor; global mapping stateName; @@ -99,7 +99,7 @@ void initLofarColors() { stateNumber ["broken"] = 50; stateNumber ["broken_went"] = 53; stateNumber ["broken_came"] = 56; - stateNumber ["broken_repair"] = 60; + stateNumber ["beyond_repair"] = 60; stateNumber ["dpOffline"] = 70; } @@ -207,12 +207,12 @@ void showSelfState(string aDP) { /////////////////////////////////////////////////////////////////////////// void showChildState(string aDP) { // check if the requiered datapoint for this view are accessible - if (dpExists(aDP+".status.childState")) { - if (dpConnect("updateChildState",aDP + ".status.childState", aDP + ".status.childState:_online.._invalid") == -1) { + if (dpExists(aDP+".status.childSumAlert")) { + if (dpConnect("updateChildState",aDP + ".status.childSumAlert:_alert_hdl.._act_state_color", aDP + ".status.state:_online.._invalid") == -1) { setValue("childStateBorder","foreCol","Lofar_invalid"); } - if (!navFunct_dpReachable(aDP+".status.childState")) { - updateChildState("",0,"","","",true); + if (!navFunct_dpReachable(aDP+".status.childSumAlert")) { + updateChildState("","Lofar_dpOffline","",true); } } else { @@ -229,9 +229,10 @@ void showChildState(string aDP) { // // Added 3-3-2007 A.Coolen /////////////////////////////////////////////////////////////////////////// -updateChildState(string dp1, int state, string dp2, bool invalid) { +updateChildState(string dp1, string state, string dp2, bool invalid) { string SymbolCol; - + + if (invalid) { if (dp1 == "") { SymbolCol = "Lofar_dpOffline"; @@ -240,7 +241,7 @@ updateChildState(string dp1, int state, string dp2, bool invalid) { } } else { - SymbolCol = getStateColor(state); + SymbolCol = state; } setValue("childStateBorder", "foreCol", SymbolCol); } diff --git a/MAC/Navigator2/scripts/libs/GCFCommon_test.ctl b/MAC/Navigator2/scripts/libs/GCFCommon_test.ctl index 4d1109cb73a..6472b8dfe3a 100644 --- a/MAC/Navigator2/scripts/libs/GCFCommon_test.ctl +++ b/MAC/Navigator2/scripts/libs/GCFCommon_test.ctl @@ -207,12 +207,12 @@ void showSelfState(string aDP) { /////////////////////////////////////////////////////////////////////////// void showChildState(string aDP) { // check if the requiered datapoint for this view are accessible - if (dpExists(aDP+".status.childState")) { - if (dpConnect("updateChildState",aDP + ".status.childState", aDP + ".status.childState:_online.._invalid") == -1) { + if (dpExists(aDP+".status.childSumAlert")) { + if (dpConnect("updateChildState",aDP + ".status.childSumAlert:_alert_hdl.._act_state_color", aDP + ".status.state:_online.._invalid") == -1) { setValue("childStateBorder","foreCol","Lofar_invalid"); } - if (!navFunct_dpReachable(aDP+".status.childState")) { - updateChildState("",0,"","","",true); + if (!navFunct_dpReachable(aDP+".status.childSumAlert")) { + updateChildState("","Lofar_dpOffline","",true); } } else { @@ -229,9 +229,10 @@ void showChildState(string aDP) { // // Added 3-3-2007 A.Coolen /////////////////////////////////////////////////////////////////////////// -updateChildState(string dp1, int state, string dp2, bool invalid) { +updateChildState(string dp1, string state, string dp2, bool invalid) { string SymbolCol; - + + if (invalid) { if (dp1 == "") { SymbolCol = "Lofar_dpOffline"; @@ -240,7 +241,7 @@ updateChildState(string dp1, int state, string dp2, bool invalid) { } } else { - SymbolCol = getStateColor(state); + SymbolCol = state; } setValue("childStateBorder", "foreCol", SymbolCol); } diff --git a/MAC/Navigator2/scripts/transferMPs.ctl b/MAC/Navigator2/scripts/transferMPs.ctl index da806d60e5a..e9ed3f6e20c 100644 --- a/MAC/Navigator2/scripts/transferMPs.ctl +++ b/MAC/Navigator2/scripts/transferMPs.ctl @@ -152,7 +152,7 @@ private bool setLeaf() { int aVal; int err; - query = "SELECT '_online.._value' FROM '{_mp_**.**.status.leaf}'"; + query = "SELECT '_online.._value' FROM '_mp_**.**.status.leaf' WHERE '_online.._value' == 1"; if (bDebug) DebugN("transferMPs.ctl:setLeaf|Query: ",query); err = dpQuery(query, tab); -- GitLab