mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 23:10:02 +02:00

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@478 951219d9-93cf-4727-9268-0efd64621fa3
29 lines
699 B
C++
29 lines
699 B
C++
|
|
#include "UHRIXCallback.h"
|
|
|
|
|
|
int UHRIXCallbackDataFunc(char* d, int np, FILE* fd, void* p){
|
|
int i,j,jmax=6;
|
|
u_int16_t da;
|
|
|
|
|
|
//#ifdef VERBOSE
|
|
//printf("UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU Receiver Data received \n");
|
|
if (d==NULL)
|
|
printf("no data received\n");
|
|
else{
|
|
// printf("received %d bytes of data\n",np);
|
|
// printf("index:%d\n",(int)(*(int*)d));
|
|
for ( i=0; i<(np-4)/2-jmax+1; i++)
|
|
{
|
|
//((int16_t *)d)[i+2] -= ((int16_t *)d)[i+3];
|
|
//((int16_t *)d)[i+2] *= ((int16_t *)d)[i+2];
|
|
for (j=1; j<jmax; j++) ((int16_t *)d)[i+2] += ((int16_t *)d)[i+2+j];
|
|
}
|
|
}
|
|
|
|
//printf("UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU Finished \n");
|
|
//#endif
|
|
return 0;
|
|
}
|