empty fifo at receiver start and comment waiting for packet

This commit is contained in:
Dhanya Maliakal 2015-11-17 12:27:18 +01:00
parent 777f04331d
commit 73f8d065b3

View File

@ -956,7 +956,9 @@ void UDPStandardImplementation::startReadout(){
prev = -1;
//wait as long as there is change from prev totalP
while(prev != totalP){
#ifdef DEBUG5
cprintf(MAGENTA,"waiting for all packets totalP:%d\n",totalP);
#endif
usleep(5000);/* Need to find optimal time (exposure time and acquisition period) **/
prev = totalP;
totalP=0;
@ -2240,6 +2242,13 @@ void UDPStandardImplementation::waitWritingBufferForNextAcquisition(int ithread)
#endif
//pop fifo so that its empty
char* temp;
while(!fifo[ithread]->isEmpty()){
cout << ithread << ":emptied buffer in fifo" << endl;
fifo[ithread]->pop(temp);
}
//create file
if((1<<ithread)&createFileMask){
if(dataCompressionEnable){