fixed some probelems wuth scans for receiver and also scans for allframes/frameindex

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@654 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d
2013-08-16 12:59:42 +00:00
parent 97aa35a388
commit 3098664c8f
10 changed files with 38 additions and 33 deletions

View File

@ -459,7 +459,7 @@ int slsReceiverFunctionList::startListening(){
else
startFrameIndex = ((((uint32_t)(*((uint32_t*)buffer))) & (frameIndexMask)) >> frameIndexOffset);
//cout<<"startFrameIndex:"<<startFrameIndex<<endl;
cout<<"startFrameIndex:"<<startFrameIndex<<endl;
prevframenum=startFrameIndex;
measurementStarted = true;
}
@ -600,9 +600,9 @@ int slsReceiverFunctionList::startWriting(){
cout << savefilename << endl;
else{
if(!frameIndexOffset)
packetloss = ((currframenum-prevframenum-(packetsPerFrame*framesInFile))/(double)(packetsPerFrame*framesInFile))*100.000;
packetloss = (int)(((currframenum-prevframenum-(packetsPerFrame*framesInFile))/(double)(packetsPerFrame*framesInFile))*100.000);
else
packetloss = ((currframenum-prevframenum-(framesInFile))/(double)(framesInFile))*100.000;
packetloss = (int)(((currframenum-prevframenum-(framesInFile))/(double)(framesInFile))*100.000);
cout << savefilename
<< "\tpacket loss " << setw(4)<<fixed << setprecision(4) << packetloss
<< "%\tframenum "
@ -714,6 +714,7 @@ int slsReceiverFunctionList::startWriting(){
break;
}
}
cout << "RealTime Frames Caught:" << framesCaught << endl;
cout << "Total Frames Caught:"<< totalFramesCaught << endl;

View File

@ -1179,6 +1179,9 @@ int slsReceiverFuncs::gotthard_read_frame(){
#endif
}else{
index=(uint32_t)(*(uint32_t*)raw);
#ifdef VERBOSE
cout<<"index:"<<index<<endl;
#endif
if(shortFrame==-1)
index2= (uint32_t)(*((uint32_t*)((char*)(raw+onebuffersize))));
memcpy(origVal,raw,bufferSize);
@ -1213,9 +1216,10 @@ int slsReceiverFuncs::gotthard_read_frame(){
}
#ifdef VERBOSE
cout << "\nstartIndex:" << startIndex << endl;
if(arg!=-1){
cout << "fName:" << fName << endl;
cout << "index:" << arg << endl;
cout << "findex:" << arg << endl;
}
#endif
@ -1268,11 +1272,11 @@ int slsReceiverFuncs::set_read_frequency(){
if (lockStatus==1 && socket->differentClients==1){//necessary???
sprintf(mess,"Receiver locked by %s\n", socket->lastClientIP);
ret=FAIL;
}
}/*
else if((slsReceiverList->getStatus()==RUNNING) && (index >= 0)){
ret = FAIL;
strcpy(mess,"cannot set up receiver mode when receiver is running\n");
}
}*/
else
retval=slsReceiverList->setNFrameToGui(index);
}

View File

@ -2,10 +2,10 @@
#define SVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware/slsReceiver"
//#define SVNREPPATH ""
#define SVNREPUUID "951219d9-93cf-4727-9268-0efd64621fa3"
//#define SVNREV 0x649
//#define SVNREV 0x652
//#define SVNKIND ""
//#define SVNSCHED ""
#define SVNAUTH "l_maliakal_d"
#define SVNREV 0x649
#define SVNDATE 0x20130808
#define SVNREV 0x652
#define SVNDATE 0x20130813
//