mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-14 05:47:14 +02:00
fixed bug rx_hostname being hostname or ip in zmqsockt, and num packets correctly reflects num good frames
This commit is contained in:
@ -53,7 +53,6 @@ public:
|
|||||||
if (ptr == NULL)
|
if (ptr == NULL)
|
||||||
return;
|
return;
|
||||||
strcpy(ip, ptr);
|
strcpy(ip, ptr);
|
||||||
delete ptr;
|
|
||||||
}
|
}
|
||||||
sprintf (serverAddress, "tcp://%s:%d", ip, portno);
|
sprintf (serverAddress, "tcp://%s:%d", ip, portno);
|
||||||
|
|
||||||
|
@ -300,11 +300,16 @@ void DataProcessor::StopProcessing(char* buf) {
|
|||||||
|
|
||||||
/** buf includes only the standard header */
|
/** buf includes only the standard header */
|
||||||
void DataProcessor::ProcessAnImage(char* buf) {
|
void DataProcessor::ProcessAnImage(char* buf) {
|
||||||
numFramesCaught++;
|
|
||||||
numTotalFramesCaught++;
|
|
||||||
|
|
||||||
sls_detector_header* header = (sls_detector_header*) (buf);
|
sls_detector_header* header = (sls_detector_header*) (buf);
|
||||||
uint64_t fnum = header->frameNumber;
|
uint64_t fnum = header->frameNumber;
|
||||||
|
uint32_t nump = header->packetNumber;
|
||||||
|
if (nump == generalData->packetsPerFrame) {
|
||||||
|
numFramesCaught++;
|
||||||
|
numTotalFramesCaught++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
if (!index) cprintf(BLUE,"DataProcessing %d: fnum:%lu\n", index, fnum);
|
if (!index) cprintf(BLUE,"DataProcessing %d: fnum:%lu\n", index, fnum);
|
||||||
#endif
|
#endif
|
||||||
|
@ -519,12 +519,12 @@ void UDPStandardImplementation::stopReceiver(){
|
|||||||
if (missingpackets) {
|
if (missingpackets) {
|
||||||
cprintf(RED, "\n[Port %d]\n",udpPortNum[i]);
|
cprintf(RED, "\n[Port %d]\n",udpPortNum[i]);
|
||||||
cprintf(RED, "Missing Packets\t\t: %lld\n",(long long int)missingpackets);
|
cprintf(RED, "Missing Packets\t\t: %lld\n",(long long int)missingpackets);
|
||||||
cprintf(RED, "Frames Processed\t: %lld\n",(long long int)dataProcessor[i]->GetNumFramesCaught());
|
cprintf(RED, "Complete Frames\t: %lld\n",(long long int)dataProcessor[i]->GetNumFramesCaught());
|
||||||
cprintf(RED, "Last Frame Caught\t: %lld\n",(long long int)listener[i]->GetLastFrameIndexCaught());
|
cprintf(RED, "Last Frame Caught\t: %lld\n",(long long int)listener[i]->GetLastFrameIndexCaught());
|
||||||
}else{
|
}else{
|
||||||
cprintf(GREEN, "\n[Port %d]\n",udpPortNum[i]);
|
cprintf(GREEN, "\n[Port %d]\n",udpPortNum[i]);
|
||||||
cprintf(GREEN, "Missing Packets\t\t: %lld\n",(long long int)missingpackets);
|
cprintf(GREEN, "Missing Packets\t\t: %lld\n",(long long int)missingpackets);
|
||||||
cprintf(GREEN, "Frames Processed\t: %lld\n",(long long int)dataProcessor[i]->GetNumFramesCaught());
|
cprintf(GREEN, "Complete Frames\t: %lld\n",(long long int)dataProcessor[i]->GetNumFramesCaught());
|
||||||
cprintf(GREEN, "Last Frame Caught\t: %lld\n",(long long int)listener[i]->GetLastFrameIndexCaught());
|
cprintf(GREEN, "Last Frame Caught\t: %lld\n",(long long int)listener[i]->GetLastFrameIndexCaught());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user