mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 19:30:03 +02:00
added the print temp losses
This commit is contained in:
parent
964c76ac60
commit
5f4a38416a
@ -1604,9 +1604,10 @@ int UDPStandardImplementation::createNewFile(int ithread){
|
||||
if(totalWritingPacketCount[ithread]){
|
||||
frameNumberInPreviousFile[ithread] = currentFrameNumber[ithread];
|
||||
totalPacketsInFile[ithread] = 0;
|
||||
}else
|
||||
}else{
|
||||
frameNumberInPreviousFile[ithread] = -1;
|
||||
|
||||
frameNumberInPreviousCheck[ithread] = -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2905,6 +2906,30 @@ void UDPStandardImplementation::handleWithoutMissingPackets(int ithread, char* w
|
||||
fwrite(wbuffer + HEADER_SIZE_NUM_TOT_PACKETS, 1, oneDataSize*packetsPerFrame+fifoBufferHeaderSize-HEADER_SIZE_NUM_TOT_PACKETS, sfilefd[ithread]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Print packet loss and filenames
|
||||
if( (currentFrameNumber[ithread]%(maxFramesPerFile/10)) == 0){
|
||||
printf("\nThread:%d"
|
||||
"\t\tPackets Lost:%d"
|
||||
"\tPacketsFromLastCheck:%lld"
|
||||
"\tCurrentFrameNumber:%lld"
|
||||
"\tPreviousFrameNumber:%lld\n",
|
||||
ithread,
|
||||
( ((int)(currentFrameNumber[ithread]-frameNumberInPreviousCheck[ithread])*packetsPerFrame) - totalWritingPacketCountFromLastCheck[ithread]),
|
||||
totalWritingPacketCountFromLastCheck[ithread],
|
||||
currentFrameNumber[ithread],
|
||||
frameNumberInPreviousCheck[ithread]
|
||||
);
|
||||
|
||||
//reset counters for each new file
|
||||
frameNumberInPreviousCheck[ithread] = currentFrameNumber[ithread];
|
||||
totalWritingPacketCountFromLastCheck[ithread] = 0;
|
||||
}
|
||||
|
||||
|
||||
if(npackets!=128) exit(-1);/******************/
|
||||
totalWritingPacketCountFromLastCheck[ithread]+= npackets;
|
||||
totalPacketsInFile[ithread] += npackets;
|
||||
totalWritingPacketCount[ithread] += npackets;
|
||||
lastFrameNumberInFile[ithread] = tempframenumber;
|
||||
@ -2923,34 +2948,6 @@ void UDPStandardImplementation::handleWithoutMissingPackets(int ithread, char* w
|
||||
if(numberofWriterThreads > 1)
|
||||
pthread_mutex_unlock(&writeMutex);
|
||||
|
||||
|
||||
//Print packet loss and filenames
|
||||
if(totalWritingPacketCountFromLastCheck[ithread] && (currentFrameNumber[ithread]%(maxFramesPerFile/10)) == 0){
|
||||
printf("\nThread:%d"
|
||||
"\t\tPackets Lost:%d"
|
||||
"\tPacketsFromLastCheck:%lld"
|
||||
"\tCurrentFrameNumber:%lld"
|
||||
"\tPreviousFrameNumber:%lld\n",
|
||||
ithread,
|
||||
( ((int)(currentFrameNumber[ithread]-frameNumberInPreviousCheck[ithread])*packetsPerFrame) - totalWritingPacketCountFromLastCheck[ithread]),
|
||||
totalWritingPacketCountFromLastCheck[ithread],
|
||||
currentFrameNumber[ithread],
|
||||
frameNumberInPreviousCheck[ithread]
|
||||
);
|
||||
|
||||
//reset counters for each new file
|
||||
if(totalWritingPacketCountFromLastCheck[ithread]){
|
||||
frameNumberInPreviousCheck[ithread] = currentFrameNumber[ithread];
|
||||
totalWritingPacketCountFromLastCheck[ithread] = 0;
|
||||
}else
|
||||
frameNumberInPreviousCheck[ithread] = -1;
|
||||
}
|
||||
|
||||
if(npackets!=128) exit(-1);/******************/
|
||||
totalWritingPacketCountFromLastCheck[ithread]+= npackets;
|
||||
|
||||
|
||||
|
||||
}
|
||||
#ifdef DEBUG4
|
||||
cprintf(GREEN,"Writing_Thread: Writing done\nGoing to copy frame\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user