mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 05:17:13 +02:00
some insignificant tuning in slsReceiver
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@364 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -576,6 +576,7 @@ int slsReceiverFuncs::read_frame(){
|
|||||||
|
|
||||||
int index=-1,index2=-1;
|
int index=-1,index2=-1;
|
||||||
int startIndex=-1;
|
int startIndex=-1;
|
||||||
|
int count=0;
|
||||||
|
|
||||||
strcpy(mess,"Could not read frame\n");
|
strcpy(mess,"Could not read frame\n");
|
||||||
|
|
||||||
@ -584,31 +585,28 @@ int slsReceiverFuncs::read_frame(){
|
|||||||
#ifdef SLS_RECEIVER_FUNCTION_LIST
|
#ifdef SLS_RECEIVER_FUNCTION_LIST
|
||||||
|
|
||||||
//wait till you get first frame 1. to get index(from startindex 2. filename corresponds to buffer value
|
//wait till you get first frame 1. to get index(from startindex 2. filename corresponds to buffer value
|
||||||
if(startIndex==-1){
|
ret=FAIL;
|
||||||
ret=FAIL;
|
strcpy(mess,"did not start index\n");
|
||||||
strcpy(mess,"did not start index\n");
|
for(int i=0;i<10;i++){
|
||||||
for(int i=0;i<10;i++){
|
startIndex=slsReceiverList->getStartFrameIndex();
|
||||||
startIndex=slsReceiverList->getStartFrameIndex();
|
if(startIndex!=-1){
|
||||||
if(startIndex==-1)
|
ret=OK;
|
||||||
usleep(1000000);
|
break;
|
||||||
else {
|
}else
|
||||||
ret=OK;
|
usleep(1000000);
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//got atleast first frame, read buffer
|
//got atleast first frame, read buffer
|
||||||
if(ret==OK){
|
if(ret==OK){
|
||||||
int count=0;
|
|
||||||
ret=FAIL;
|
ret=FAIL;
|
||||||
while(count<20){
|
while(count<20){
|
||||||
//get frame
|
//get frame
|
||||||
raw=slsReceiverList->readFrame(fName);
|
raw=slsReceiverList->readFrame(fName);
|
||||||
//(int)(*(int*)buffer)
|
|
||||||
index=(int)(*(int*)raw);
|
index=(int)(*(int*)raw);
|
||||||
index2= (int)(*((int*)((char*)(raw+onebuffersize))));
|
index2= (int)(*((int*)((char*)(raw+onebuffersize))));
|
||||||
memcpy(origVal,raw,BUFFER_SIZE);
|
memcpy(origVal,raw,BUFFER_SIZE);
|
||||||
|
raw=NULL;
|
||||||
//cout<<"index:"<<index<<"\tindex2:"<<index2<<endl;
|
//cout<<"index:"<<index<<"\tindex2:"<<index2<<endl;
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user