debugging

This commit is contained in:
Dhanya Maliakal 2016-11-08 12:20:53 +01:00
parent 5316316c66
commit 6b67122a8e

View File

@ -2141,10 +2141,9 @@ int UDPStandardImplementation::prepareAndListenBuffer(int ithread, int cSize, ch
header = (jfrau_packet_header_t*)(buffer[ithread] + offset); header = (jfrau_packet_header_t*)(buffer[ithread] + offset);
currentpnum = (*( (uint8_t*) header->packetNumber)); currentpnum = (*( (uint8_t*) header->packetNumber));
//cout<<"1 currentpnum:"<<currentpnum<<endl; //cout<<"1 currentpnum:"<<currentpnum<<endl;
totalListeningPacketCount[ithread]++;
while(true){ while(true){
totalListeningPacketCount[ithread]++;
//correct packet //correct packet
if(currentpnum == pnum){ if(currentpnum == pnum){
@ -2167,6 +2166,7 @@ int UDPStandardImplementation::prepareAndListenBuffer(int ithread, int cSize, ch
totalIgnoredPacketCount[ithread] += (packetsPerFrame - pnum); totalIgnoredPacketCount[ithread] += (packetsPerFrame - pnum);
return 0; return 0;
} }
totalListeningPacketCount[ithread]++;
header = (jfrau_packet_header_t*)(buffer[ithread] + offset); header = (jfrau_packet_header_t*)(buffer[ithread] + offset);
currentpnum = (*( (uint8_t*) header->packetNumber)); currentpnum = (*( (uint8_t*) header->packetNumber));
//cout<<"next currentpnum :"<<currentpnum<<endl; //cout<<"next currentpnum :"<<currentpnum<<endl;
@ -2185,9 +2185,11 @@ int UDPStandardImplementation::prepareAndListenBuffer(int ithread, int cSize, ch
totalIgnoredPacketCount[ithread]++; totalIgnoredPacketCount[ithread]++;
receivedSize = udpSocket[ithread]->ReceiveDataOnly(buffer[ithread] + offset); receivedSize = udpSocket[ithread]->ReceiveDataOnly(buffer[ithread] + offset);
if(!receivedSize) return 0; if(!receivedSize) return 0;
totalListeningPacketCount[ithread]++;
header = (jfrau_packet_header_t*)(buffer[ithread] + offset); header = (jfrau_packet_header_t*)(buffer[ithread] + offset);
currentpnum = (*( (uint8_t*) header->packetNumber)); currentpnum = (*( (uint8_t*) header->packetNumber));
//cout<<"trying to find: currentpnum:"<<currentpnum<<endl; //cout<<"trying to find: currentpnum:"<<currentpnum<<endl;
} }
} }
}//----- got a whole frame ------- }//----- got a whole frame -------