started the basics for sending every nth frame from receiver to gui.incomplete and will be implemented later

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@506 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d
2013-04-11 12:00:44 +00:00
parent 02376bbc62
commit 778cd97317
12 changed files with 174 additions and 16 deletions

View File

@ -56,6 +56,7 @@ slsReceiverFunctionList::slsReceiverFunctionList():
guiData(NULL),
guiFileName(NULL),
currframenum(0),
nFrameToGui(0),
writeReceiverData(0),
pwriteReceiverDataArg(0),
startAcquisitionCallBack(NULL),
@ -410,6 +411,9 @@ int slsReceiverFunctionList::startWriting(){
cout << "Max Frames Per File:" << maxFramesPerFile << endl;
if (writeReceiverData)
cout << "Note: Data Write has been defined exernally" << endl;
if(nFrameToGui)
cout << " Not implemented yet: Sending every " << nFrameToGui << "th frame to gui" << endl;
cout << "Ready!" << endl;
//by default, we read/write everything
@ -485,12 +489,15 @@ int slsReceiverFunctionList::startWriting(){
} else {
if(sfilefd)
fwrite(wbuf, 1, bufferSize, sfilefd);
else
else{
cout << "You do not have permissions to overwrite: " << savefilename << endl;
usleep(50000);
}
}
}
//copies gui data and sets/resets guiDataReady
if(guiData){
//if (cbAction>=2)
@ -501,6 +508,7 @@ int slsReceiverFunctionList::startWriting(){
guiDataReady=0;
framesInFile++;
// delete [] dataWriteFrame->buffer;
fifofree->push(wbuf);