mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-26 08:10:02 +02:00
got rid of eth taking weird values error and also checks for fifo empty before you stop writing data
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@477 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
bb07b6db7d
commit
9d8b621adf
@ -3,16 +3,23 @@
|
|||||||
|
|
||||||
|
|
||||||
int UHRIXCallbackDataFunc(char* d, int np, FILE* fd, void* p){
|
int UHRIXCallbackDataFunc(char* d, int np, FILE* fd, void* p){
|
||||||
|
int i;
|
||||||
|
|
||||||
//#ifdef VERBOSE
|
//#ifdef VERBOSE
|
||||||
printf("UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU Receiver Data received \n");
|
//printf("UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU Receiver Data received \n");
|
||||||
if (d==NULL)
|
if (d==NULL)
|
||||||
printf("no data received\n");
|
printf("no data received\n");
|
||||||
else{
|
else{
|
||||||
printf("received %d bytes of data\n",np);
|
// printf("received %d bytes of data\n",np);
|
||||||
printf("index:%d\n",(int)(*(int*)d));
|
// printf("index:%d\n",(int)(*(int*)d));
|
||||||
|
for ( i=0; i<(np-4)/2; i++)
|
||||||
|
{
|
||||||
|
d[i*2+4]=i;
|
||||||
|
d[i*2+5]=0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU Finished \n");
|
//printf("UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU Finished \n");
|
||||||
//#endif
|
//#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -287,7 +287,7 @@ int slsReceiverFunctionList::startListening(){
|
|||||||
// very end of the program.
|
// very end of the program.
|
||||||
do {
|
do {
|
||||||
|
|
||||||
|
if (strchr(eth,'.')!=NULL) strcpy(eth,"");
|
||||||
|
|
||||||
if(!strlen(eth)){
|
if(!strlen(eth)){
|
||||||
cout<<"warning:eth is empty.listening to all"<<endl;
|
cout<<"warning:eth is empty.listening to all"<<endl;
|
||||||
@ -420,7 +420,7 @@ int slsReceiverFunctionList::startWriting(){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
while(listening_thread_running){
|
while(listening_thread_running || (!fifo->isEmpty())){
|
||||||
|
|
||||||
//when it reaches maxFramesPerFile,start writing new file
|
//when it reaches maxFramesPerFile,start writing new file
|
||||||
if (framesInFile == maxFramesPerFile) {
|
if (framesInFile == maxFramesPerFile) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user