mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 13:27:14 +02:00
receiver +4 and +10 to get only data out of the whole data with frame index etc
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@418 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -695,15 +695,15 @@ int slsReceiverFuncs::read_frame(){
|
||||
if((index%2)!=index2%2){
|
||||
//ideal situation (should be odd, even(index+1))
|
||||
if(index%2){
|
||||
memcpy(retval,((char*) origVal)+2, onedatasize);
|
||||
memcpy((((char*)retval)+onedatasize), ((char*) origVal)+8+onedatasize, onedatasize);
|
||||
memcpy(retval,((char*) origVal)+4, onedatasize);
|
||||
memcpy((((char*)retval)+onedatasize), ((char*) origVal)+10+onedatasize, onedatasize);
|
||||
break;
|
||||
}
|
||||
|
||||
//swap to even,odd
|
||||
if(index2%2){
|
||||
memcpy((((char*)retval)+onedatasize),((char*) origVal)+2, onedatasize);
|
||||
memcpy(retval, ((char*) origVal)+8+onedatasize, onedatasize);
|
||||
memcpy((((char*)retval)+onedatasize),((char*) origVal)+4, onedatasize);
|
||||
memcpy(retval, ((char*) origVal)+10+onedatasize, onedatasize);
|
||||
index=index2;
|
||||
break;
|
||||
}
|
||||
@ -717,13 +717,12 @@ int slsReceiverFuncs::read_frame(){
|
||||
if(count==20){
|
||||
cout << "same type: index:" << index << "\tindex2:" << index2 << endl;
|
||||
/**send garbage with -1 index to try again*/
|
||||
memcpy(retval,((char*) origVal)+2, onedatasize);
|
||||
memcpy((((char*)retval)+onedatasize), ((char*) origVal)+8+onedatasize, onedatasize);
|
||||
memcpy(retval,((char*) origVal)+4, onedatasize);
|
||||
memcpy((((char*)retval)+onedatasize), ((char*) origVal)+10+onedatasize, onedatasize);
|
||||
}
|
||||
|
||||
arg=((index - startIndex)/2)-1;
|
||||
|
||||
|
||||
#ifdef VERBOSE
|
||||
cout << "\nstartIndex:" << startIndex << endl;
|
||||
cout << "fName:" << fName << endl;
|
||||
|
Reference in New Issue
Block a user