Skip to content
Snippets Groups Projects
Commit bf0a2ed2 authored by Arthur Coolen's avatar Arthur Coolen
Browse files

Task #7054: removed small bugs from these objects

parent aa0f3872
No related branches found
No related tags found
No related merge requests found
V 11
1
LANG:1 0
PANEL,-1 -1 146 73 N "_3DFace" 0
PANEL,-1 -1 273 73 N "_3DFace" 0
"main()
{
baseDP = \"LOFAR_PermSW\";
......@@ -20,7 +20,19 @@ PANEL,-1 -1 146 73 N "_3DFace" 0
}" 0
E E E E 1 -1 -1 0 0 0
E "main()
{
click();
}" 0
"main()
{
rClick();
}" 0
"main()
{
dblClick();
}" 0
1 -1 -1 0 0 0
""0 1
E "#uses \"navPanel.ctl\"
......@@ -30,6 +42,7 @@ dyn_string oldObsConnections; // keep copy latest observations to be disconnec
dyn_string activeObservations;
string activeObsDP = \"\";
string database;
dyn_string stationInputs;
dyn_string connectTo0;
dyn_string connectTo1;
dyn_string connectTo2;
......@@ -41,6 +54,39 @@ bool connected3;
bool selectedObservations=false;
bool bDoubleClicked = false;
// routine for single mouse click
void click() {
// set delay in case double click was meant
delay(0, 100);
if (!bDoubleClicked && dynlen(stationInputs) > 0) {
navPanel_setEvent(\"observationFlow_cobaltInputStream.pnl\",\"EventClick\");
}
}
// routine for double mouse click
void dblClick() {
// indicate this is a doubleClick
bDoubleClicked = true;
if (dynlen(stationInputs) > 0) {
LOG_DEBUG(\"observationFlow_cobaltInputStream.pnl:DoubleClick|Setting currentDatapoint from : \"+g_currentDatapoint+\" to \" + baseDP);
g_currentDatapoint=baseDP;
//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
delay(0, 500);
bDoubleClicked = false;
}
// routine for right mouse click
void rClick() {
if (dynlen(stationInputs) > 0) {
navPanel_setEvent(\"observationFlow_cobaltInputStream.pnl\",\"EventRightClick\");
}
}
void updateActiveObservations(string dp1, dyn_string obs,
string dp2, bool invalid)
......@@ -118,39 +164,40 @@ void monitorRunStates(dyn_string dpList,dyn_string runStates) {
// connect to stationInputStreams from the active observations
void connectStationInputStreams(string runState) {
stationInputs = \"\";
string obsDP=\"\";
dyn_string stream0DPList;
dyn_string stream1DPList;
dyn_string stream2DPList;
dyn_string stream3DPList;
// change all found DP's to contain all the elements that contain the stream.percBad
if (connected0) {
dpDisconnect(\"streamCB0\",connectTo0);
dynClear(connectTo0);
connected0 = false;
}
if (connected1) {
dpDisconnect(\"streamCB1\",connectTo1);
dynClear(connectTo1);
connected1 = false;
}
if (connected2) {
dpDisconnect(\"streamCB2\",connectTo2);
dynClear(connectTo2);
connected2 = false;
}
if (connected3) {
dpDisconnect(\"streamCB3\",connectTo3);
dynClear(connectTo3);
connected3 = false;
}
// change all found DP's to contain all the elements that contain the stream.percBad
if (connected0) {
dpDisconnect(\"streamCB0\",connectTo0);
dynClear(connectTo0);
connected0 = false;
}
if (connected1) {
dpDisconnect(\"streamCB1\",connectTo1);
dynClear(connectTo1);
connected1 = false;
}
if (connected2) {
dpDisconnect(\"streamCB2\",connectTo2);
dynClear(connectTo2);
connected2 = false;
}
if (connected3) {
dpDisconnect(\"streamCB3\",connectTo3);
dynClear(connectTo3);
connected3 = false;
}
if (dynlen(observationsList) == 1 && runState == \"Quiting\") {
setValue(\"streamObject0\", \"foreCol\", \"Lofar_off\");
setValue(\"streamObject1\", \"foreCol\", \"Lofar_off\");
setValue(\"streamObject2\", \"foreCol\", \"Lofar_off\");
setValue(\"streamObject3\", \"foreCol\", \"Lofar_off\");
if (dynlen(observationsList) == 1 && runState == \"Quiting\") {
setValue(\"streamObject0\", \"foreCol\", \"Lofar_off\");
setValue(\"streamObject1\", \"foreCol\", \"Lofar_off\");
setValue(\"streamObject2\", \"foreCol\", \"Lofar_off\");
setValue(\"streamObject3\", \"foreCol\", \"Lofar_off\");
return;
}
......@@ -164,7 +211,7 @@ void connectStationInputStreams(string runState) {
dynClear(stream2DPList);
dynClear(stream3DPList);
// For all observations collect the PermSW streamInfo
dyn_string stationInputs = navFunct_getStationInputForObservation(observationsList[i]);
stationInputs = navFunct_getStationInputForObservation(observationsList[i]);
for (int i=1; i<= dynlen(stationInputs); i++) {
......@@ -327,7 +374,15 @@ LANG:1 0
"streamObject0"
""
1 10 10 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
E E
"main()
{
rClick();
}" 0
"main()
{
dblClick();
}" 0
0 0 0 0 0 0
E E E
0
......@@ -336,12 +391,24 @@ LANG:1 73 All inputbuffers involved in the currently(selected) active observati
1
"dashclr"N "_Transparent"
E E 0 4 1 2 1 E 10 10 40 10
E "main()
{
click();
}" 0
0 4 1 2 1 E 10 10 40 10
4 1
"streamObject3"
""
1 10 40 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
E E
"main()
{
rClick();
}" 0
"main()
{
dblClick();
}" 0
1 0 0 0 0 0
E E E
0
......@@ -350,12 +417,24 @@ LANG:1 73 All inputbuffers involved in the currently(selected) active observati
1
"dashclr"N "_Transparent"
E E 0 4 1 2 1 E 10 40 40 40
E "main()
{
click();
}" 0
0 4 1 2 1 E 10 40 40 40
4 2
"streamObject1"
""
1 10 20 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
E E
"main()
{
rClick();
}" 0
"main()
{
dblClick();
}" 0
2 0 0 0 0 0
E E E
0
......@@ -364,12 +443,24 @@ LANG:1 73 All inputbuffers involved in the currently(selected) active observati
1
"dashclr"N "_Transparent"
E E 0 4 1 2 1 E 10 20 40 20
E "main()
{
click();
}" 0
0 4 1 2 1 E 10 20 40 20
4 3
"streamObject2"
""
1 10 30 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E
E E
"main()
{
rClick();
}" 0
"main()
{
dblClick();
}" 0
3 0 0 0 0 0
E E E
0
......@@ -378,7 +469,11 @@ LANG:1 73 All inputbuffers involved in the currently(selected) active observati
1
"dashclr"N "_Transparent"
E E 0 4 1 2 1 E 10 30 40 30
E "main()
{
click();
}" 0
0 4 1 2 1 E 10 30 40 30
0
LAYER, 1
1
......
......@@ -45,6 +45,7 @@ void updateActiveObservations(string dp1, dyn_string obs,
for (int i=dynlen(obs);i > 0; i--) if (!navFunct_isObservation(obs[i])) dynRemove(obs,i);
activeObservations = obs;
// if there are selected observation check the observationsList if those selected observations still are active
// remove the unactive observations from the list
......@@ -91,7 +92,7 @@ void updateActiveObservations(string dp1, dyn_string obs,
} else if (dynlen(obsConnections) > 0) {
oldObsConnections = obsConnections;
} else {
setValue(\"outputProcsObject\", \"foreCol\", \"Lofar_off\");
setValue(\"outputProcsObject\", \"foreCol\", \"Lofar_off\");
}
}
......@@ -132,7 +133,6 @@ void connectOutputProcs(string runState) {
}
}
// check if the required datapoint for this view is enabled and accessible
if (navFunct_dpReachable(CEPDBName) && dynlen(connectToOutputProcs)>0 ){
if (dpConnect(\"outputProcCB\", connectToOutputProcs) == -1) {
......@@ -155,6 +155,14 @@ void outputProcCB(dyn_string dps, dyn_dyn_bool values)
{
dynClear(locusnodes);
// only needed when there are still observations in the list. sometimes the cb is still fired while
// in fact the observation was already finished.
if (dynlen(observationsList) <= 0) {
setValue(\"outputProcsObject\", \"foreCol\", \"Lofar_off\");
return;
}
// Here we get dropping and locusnodevalues from all involved observations
string toolTipText = \"Dropping outputProcs<br>\";
......
......@@ -184,7 +184,7 @@ void showSelfState(string aDP) {
setValue("selfState.light","backCol","Lofar_invalid");
}
if (!navFunct_dpReachable(aDP+".status.state")) {
updateSelfState("",0,"",true);
updateSelfState("",0,"","","",true);
}
}
else {
......
......@@ -206,7 +206,7 @@ void showChildState(string aDP) {
setValue("childStateBorder","foreCol","Lofar_invalid");
}
if (!navFunct_dpReachable(aDP+".status.childState")) {
updateChildState("",0,"",true);
updateChildState("",0,"","","",true);
}
}
else {
......
......@@ -206,7 +206,7 @@ void showChildState(string aDP) {
setValue("childStateBorder","foreCol","Lofar_invalid");
}
if (!navFunct_dpReachable(aDP+".status.childState")) {
updateChildState("",0,"",true);
updateChildState("",0,"","","",true);
}
}
else {
......
......@@ -54,7 +54,6 @@
// navFunct_getDynString : Returns a dynString from a dyn_dyn[index]
// navFunct_getGPUProcsForObservation : Returns all the GPUProcs for a given observation
// navFunct_getHBABitmap : get the HBABitmap from a given observation on a given station
// navFunct_getInputBuffersForObservations : returns all the InputBuffers that are in use for an observation
// navFunct_getInputBuffersForStation : returns all the InputBuffers that are connected to a station
// navFunct_getLBABitmap : get the LBABitmap from a given observation on a given station
// navFunct_getLocusNodesForObservation : returns all the LocusNOdes that are in use for an observation
......@@ -2245,32 +2244,6 @@ dyn_string navFunct_getStationInputForObservation(string obsName) {
return stationInput;
}
// ***************************
// navFunct_getInputBuffersForObservation
// ***************************
// obsName : the observation in question
//
// Returns a dyn_string containing all InputBuffers used by this observation
// ***************************
//
dyn_string navFunct_getInputBuffersForObservation(string obsName) {
// we only need the number from the observation
if (strpos(obsName,"Observation") >= 0) {
strreplace(obsName,"Observation","");
}
dyn_string inputBuffers;
dyn_dyn_anytype tab;
if (!navFunct_dpReachable(CEPDBName)) return inputBuffers;
string query="SELECT '_online.._value' FROM 'LOFAR_*_InputBuffer*.observationName' REMOTE '"+CEPDBName+"' WHERE '_online.._value' == \""+obsName+"\"";
dpQuery(query,tab);
for(int z=2;z<=dynlen(tab);z++) {
string dp = dpSubStr(tab[z][1],DPSUB_SYS_DP);
dynAppend(inputBuffers,dp);
}
dynSort(inputBuffers);
return inputBuffers;
}
// ***************************
// navFunct_getInputBuffersForStation
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment