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

Bug756: check directory for conffiles. solved bug in claimManager.ctl: new...

Bug756: check directory for conffiles. solved bug in claimManager.ctl: new name wasn't filled in strObjectNames
parent c34b7a66
No related branches found
No related tags found
No related merge requests found
......@@ -1277,40 +1277,40 @@ LANG:1 5 claim
int status = dpWaitForValue( dpNamesWait, conditions, dpNamesReturn, returnValues, 25 );
if ( status == -1 ) {
LOG_DEBUG( \"Error in dpWaitFor Value\" );
LOG_DEBUG( \"Event_Viewer.pnl:Error in dpWaitFor Value\" );
LOG_DEBUG( \"dpNamesWait : \" + dpNamesWait );
LOG_DEBUG( \"Event_Viewer.pnl:dpNamesWait : \" + dpNamesWait );
LOG_DEBUG( \"conditions : \" + conditions );
LOG_DEBUG( \"Event_Viewer.pnl:conditions : \" + conditions );
LOG_DEBUG( \"dpNamesReturn : \" + dpNamesReturn );
LOG_DEBUG( \"Event_Viewer.pnl:dpNamesReturn : \" + dpNamesReturn );
LOG_DEBUG( \"returnValues : \" + returnValues );
} else if ( dynlen(getLastError()) != 0 ) {
LOG_DEBUG( \"Error returned in message dpWaitForValue\" );
LOG_DEBUG( \"Event_Viewer.pnl:Error returned in message dpWaitForValue\" );
// Reaction: e.g. output
LOG_DEBUG( getLastError() );
LOG_DEBUG( \"dpNamesWait : \" + dpNamesWait );
LOG_DEBUG( \"Event_Viewer.pnl:dpNamesWait : \" + dpNamesWait );
LOG_DEBUG( \"conditions : \" + conditions );
LOG_DEBUG( \"Event_Viewer.pnl:conditions : \" + conditions );
LOG_DEBUG( \"dpNamesReturn : \" + dpNamesReturn );
LOG_DEBUG( \"returnValues : \" + returnValues );
LOG_DEBUG( \"Event_Viewer.pnl:returnValues : \" + returnValues );
} else {
LOG_DEBUG( \"dpWaitForValue : everything ok\" );
LOG_DEBUG( \"Event_Viewer.pnl:dpWaitForValue : everything ok\" );
LOG_DEBUG( \"dpNamesWait : \" + dpNamesWait );
LOG_DEBUG( \"Event_Viewer.pnl:dpNamesWait : \" + dpNamesWait );
LOG_DEBUG( \"conditions : \" + conditions );
LOG_DEBUG( \"Event_Viewer.pnl:conditions : \" + conditions );
LOG_DEBUG( \"dpNamesReturn : \" + dpNamesReturn );
LOG_DEBUG( \"Event_Viewer.pnl:dpNamesReturn : \" + dpNamesReturn );
LOG_DEBUG( \"returnValues : \" + returnValues );
LOG_DEBUG( \"Event_Viewer.pnl:returnValues : \" + returnValues );
LOG_DEBUG(\"Set txt_response to: \"+ returnValues[3]);
setValue(\"txt_response\",\"text\",returnValues[3]);
......
......@@ -154,12 +154,19 @@ void claimManager_queryConnectClaim_Callback(
strName = aResult[t][2];
tClaimDate = aResult[t][3];
LOG_DEBUG("claimManager.ctl:claimManager_queryConnectClaim_Callback| strDP : "+ strDP);
LOG_DEBUG("claimManager.ctl:claimManager_queryConnectClaim_Callback| strName : "+strName);
LOG_DEBUG("claimManager.ctl:claimManager_queryConnectClaim_Callback| tClaimDate: "+tClaimDate);
// We are claimed when the date is not 1970
bClaimed = year( tClaimDate ) != 1970;
// Do we already have this name
iPos = dynContains( strClaimDPName, strDP );
LOG_DEBUG("claimManager.ctl:claimManager_queryConnectClaim_Callback| found old claim at postion: "+ iPos);
// When we have the claim, and the datapoint is now 'not claimed'
// then
if( !bClaimed && (iPos > 0))
......@@ -174,6 +181,10 @@ void claimManager_queryConnectClaim_Callback(
{
dynAppend( strClaimDPName , strDP );
dynAppend( strClaimObjectName , strName );
} else if( bClaimed && (iPos > 0 )) {
// When we do have the item and it gets 'Claimed'
// then we have to alter the
strClaimObjectName[iPos] = strName;
}
}
}
......@@ -50,8 +50,17 @@ main()
bool showDebug = true;
string strCurConfig;
// string strDataDir = "/opt/lofar/etc/";
string strDataDir = "c:/data/CS20_CCU001/data/configs/";
string strDataDir = "";
string strDataDir = "";
if (isDir("/opt/lofar/etc/") ) {
strDataDir = "/opt/lofar/etc/";
} else if ( isDir ("c:/data/CS20_CS010/data/configs/") ) {
strDataDir = "c:/data/CS20_CS010/data/configs/";
} else {
DebugN("Could not find datadair to work with, leaving and no antenne data read.");
return;
}
string strConfFile = strDataDir+"StationBGPconnections.conf";
dyn_string dynStr_fileContent;
......
......@@ -55,8 +55,17 @@ main()
H = 3; // ArrayIndexnumber of dda_splittedLinesAntConfFile;
string strCurConfig;
// string strDataDir = "/opt/lofar/etc/";
string strDataDir = "c:/data/CS20_CS010/data/configs/";
string strDataDir = "";
if (isDir("/opt/lofar/etc/") ) {
strDataDir = "/opt/lofar/etc/";
} else if ( isDir ("c:/data/CS20_CS010/data/configs/") ) {
strDataDir = "c:/data/CS20_CS010/data/configs/";
} else {
DebugN("Could not find datadair to work with, leaving and no antenne data read.");
return;
}
string strAntArrayConfFile = strDataDir+"AntennaArrays.conf";
string strRemoteStationConfFile = strDataDir+"RemoteStation.conf";
......
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