mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 21:07:13 +02:00
fixed packetloss print
This commit is contained in:
@ -23,7 +23,7 @@ typedef int int32_t;
|
|||||||
#define MAX_FRAMES_PER_FILE 20000
|
#define MAX_FRAMES_PER_FILE 20000
|
||||||
#define SHORT_MAX_FRAMES_PER_FILE 100000
|
#define SHORT_MAX_FRAMES_PER_FILE 100000
|
||||||
#define MOENCH_MAX_FRAMES_PER_FILE 1000
|
#define MOENCH_MAX_FRAMES_PER_FILE 1000
|
||||||
#define EIGER_MAX_FRAMES_PER_FILE 5
|
#define EIGER_MAX_FRAMES_PER_FILE 2000
|
||||||
#define JFRAU_MAX_FRAMES_PER_FILE 2000
|
#define JFRAU_MAX_FRAMES_PER_FILE 2000
|
||||||
#define JFCTB_MAX_FRAMES_PER_FILE 100000
|
#define JFCTB_MAX_FRAMES_PER_FILE 100000
|
||||||
|
|
||||||
|
@ -1570,11 +1570,15 @@ int UDPStandardImplementation::createNewFile(int ithread){
|
|||||||
frameNumberInPreviousFile[ithread] = startFrameIndex -1;
|
frameNumberInPreviousFile[ithread] = startFrameIndex -1;
|
||||||
|
|
||||||
printf("\nThread:%d File:%s\n"
|
printf("\nThread:%d File:%s\n"
|
||||||
"\ttotalpacketsinfile:%d\tPackets Lost:%d\tCurrentFrameNumber:%lld\tPreviousFrameNumber:%lld\n",
|
//"\ttotalpacketsinfile:%d\t"
|
||||||
|
"Packets Lost:%d"
|
||||||
|
//"\tCurrentFrameNumber:%lld\tPreviousFrameNumber:%lld"
|
||||||
|
"\n",
|
||||||
ithread,completeFileName[ithread],
|
ithread,completeFileName[ithread],
|
||||||
totalPacketsInFile[ithread],
|
//totalPacketsInFile[ithread],
|
||||||
( ((int)(currentFrameNumber[ithread]-frameNumberInPreviousFile[ithread])*packetsPerFrame) - totalPacketsInFile[ithread]),
|
( ((int)(currentFrameNumber[ithread]-frameNumberInPreviousFile[ithread])*packetsPerFrame) - totalPacketsInFile[ithread])
|
||||||
currentFrameNumber[ithread],frameNumberInPreviousFile[ithread]);
|
//,currentFrameNumber[ithread],frameNumberInPreviousFile[ithread]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//write file header
|
//write file header
|
||||||
@ -2251,7 +2255,7 @@ void UDPStandardImplementation::stopListening(int ithread, int numbytes){
|
|||||||
listeningThreadsMask^=(1<<ithread);
|
listeningThreadsMask^=(1<<ithread);
|
||||||
//#ifdef DEBUG4
|
//#ifdef DEBUG4
|
||||||
//cprintf(BLUE,"Listening_Thread %d: Resetting mask of listening thread. New Mask: 0x%x", ithread, listeningThreadsMask);
|
//cprintf(BLUE,"Listening_Thread %d: Resetting mask of listening thread. New Mask: 0x%x", ithread, listeningThreadsMask);
|
||||||
FILE_LOG(logINFO) << "Listening Thread of " << udpPortNum[ithread] << "got " << totalListeningPacketCount[ithread] << " packets";
|
FILE_LOG(logINFO) << "Listening Thread of " << udpPortNum[ithread] << " got " << totalListeningPacketCount[ithread] << " packets";
|
||||||
//cprintf(BLUE,"Listening_Thread %d: Frames listened to :%d\n",ithread, (totalListeningPacketCount[ithread]/packetsPerFrame));
|
//cprintf(BLUE,"Listening_Thread %d: Frames listened to :%d\n",ithread, (totalListeningPacketCount[ithread]/packetsPerFrame));
|
||||||
//#endif
|
//#endif
|
||||||
pthread_mutex_unlock(&(statusMutex));
|
pthread_mutex_unlock(&(statusMutex));
|
||||||
@ -2623,11 +2627,15 @@ void UDPStandardImplementation::stopWriting(int ithread, char* wbuffer){
|
|||||||
frameNumberInPreviousFile[ithread] = startFrameIndex-1;
|
frameNumberInPreviousFile[ithread] = startFrameIndex-1;
|
||||||
|
|
||||||
printf("\nThread:%d File:%s\n"
|
printf("\nThread:%d File:%s\n"
|
||||||
"\ttotalpacketsinfile:%d\tPackets Lost:%d\tCurrentFrameNumber:%lld\tPreviousFrameNumber:%lld\n",
|
//"\ttotalpacketsinfile:%d\t"
|
||||||
|
"Packets Lost:%d"
|
||||||
|
//"\tCurrentFrameNumber:%lld\tPreviousFrameNumber:%lld"
|
||||||
|
"\n",
|
||||||
ithread,completeFileName[ithread],
|
ithread,completeFileName[ithread],
|
||||||
totalPacketsInFile[ithread],
|
//totalPacketsInFile[ithread],
|
||||||
( ((int)(currentFrameNumber[ithread]-frameNumberInPreviousFile[ithread])*packetsPerFrame) - totalPacketsInFile[ithread]),
|
( ((int)(currentFrameNumber[ithread]-frameNumberInPreviousFile[ithread])*packetsPerFrame) - totalPacketsInFile[ithread])
|
||||||
currentFrameNumber[ithread],frameNumberInPreviousFile[ithread]);
|
//,currentFrameNumber[ithread],frameNumberInPreviousFile[ithread]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
closeFile(ithread);
|
closeFile(ithread);
|
||||||
pthread_mutex_lock(&statusMutex);
|
pthread_mutex_lock(&statusMutex);
|
||||||
@ -2815,10 +2823,7 @@ void UDPStandardImplementation::writeFileWithoutCompression(int ithread, char* w
|
|||||||
packetsCaught += packetsWritten;
|
packetsCaught += packetsWritten;
|
||||||
totalPacketsCaught += packetsWritten;
|
totalPacketsCaught += packetsWritten;
|
||||||
pthread_mutex_unlock(&writeMutex);
|
pthread_mutex_unlock(&writeMutex);
|
||||||
currentFrameNumber[ithread] += lastFrameNumberInFile[ithread];
|
currentFrameNumber[ithread] = lastFrameNumberInFile[ithread];
|
||||||
if(!ithread)cprintf(BLUE,"currentFrameNumber[ithread]:%d\n",currentFrameNumber[ithread]);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user