Changeset 444 in flair-src for trunk/lib/FlairCore/src/ui_com.cpp
- Timestamp:
- Sep 10, 2021, 2:37:55 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/ui_com.cpp
r443 r444 389 389 dataToSend->CopyDatas(ptr->buf+ptr->actual_size); 390 390 ptr->actual_size+=dataToSend->SendSize(); 391 Printf("nb buffered %i/%i\n",ptr->actual_size,ptr->final_size);392 Printf("pushed size %i period %i nb buffering %i\n",dataToSend->SendSize(),dataToSend->SendPeriod(),dataToSend->NbBuffering());391 //Printf("nb buffered %i/%i\n",ptr->actual_size,ptr->final_size); 392 //Printf("pushed size %i period %i nb buffering %i\n",dataToSend->SendSize(),dataToSend->SendPeriod(),dataToSend->NbBuffering()); 393 393 if(ptr->actual_size>=ptr->final_size) {//par securité on test aussi le cas ou supérieur 394 Printf("ready to send\n");394 //Printf("ready to send\n"); 395 395 SendNRT(ptr->buf, ptr->actual_size,ptr->period); 396 396 //clean … … 615 615 if(bufSize!=0) bufSize+=sizeof(char)+sizeof(uint16_t)+sizeof(uint16_t);//header+period+nb_buffering 616 616 if(bufSize!=(*pushedDatasIterator).final_size && bufSize!=0) { 617 Printf("change buf size %i->%i\n",(*pushedDatasIterator).final_size,bufSize);617 //Printf("change buf size %i->%i\n",(*pushedDatasIterator).final_size,bufSize); 618 618 (*pushedDatasIterator).actual_size=0; 619 619 (*pushedDatasIterator).final_size=bufSize; … … 622 622 } 623 623 if(bufSize==0) { 624 Printf("delete buf\n");624 //Printf("delete buf\n"); 625 625 free((*pushedDatasIterator).buf); 626 626 pushedDatasIterator = pushedDatas.erase(pushedDatasIterator); … … 635 635 for (size_t i = 0; i < pushedDatas.size(); i++) { 636 636 if (pushedDatas.at(i).period==obj->SendPeriod() && pushedDatas.at(i).nb_buffering==obj->NbBuffering()) { 637 Printf("match item %i, period %i nb buff %i\n",i,obj->SendPeriod(),obj->NbBuffering());637 //Printf("match item %i, period %i nb buff %i\n",i,obj->SendPeriod(),obj->NbBuffering()); 638 638 match=true; 639 639 } … … 641 641 //create new one 642 642 if(!match) { 643 printf("no match\n");643 //printf("no match\n"); 644 644 PushedData_t tmp; 645 645 tmp.period=obj->SendPeriod(); … … 648 648 tmp.final_size=0; 649 649 for (size_t i = 0; i < datasToSend.size(); i++) { 650 Printf("data %i/%i %i %i\n",i,datasToSend.size(),datasToSend.at(i)->SendPeriod() ,datasToSend.at(i)->NbBuffering());650 //Printf("data %i/%i %i %i\n",i,datasToSend.size(),datasToSend.at(i)->SendPeriod() ,datasToSend.at(i)->NbBuffering()); 651 651 if (datasToSend.at(i)->IsEnabled() && datasToSend.at(i)->SendPeriod() == obj->SendPeriod() && datasToSend.at(i)->NbBuffering()==obj->NbBuffering()) { 652 652 tmp.final_size+=datasToSend.at(i)->SendSize(); 653 Printf("add %i\n",datasToSend.at(i)->SendSize());653 //Printf("add %i\n",datasToSend.at(i)->SendSize()); 654 654 } 655 655 } 656 656 tmp.final_size*=obj->NbBuffering(); 657 657 tmp.final_size+=sizeof(char)+sizeof(uint16_t)+sizeof(uint16_t);//header+period+nb_buffering 658 printf("final size %i\n",tmp.final_size);658 //printf("final size %i\n",tmp.final_size); 659 659 tmp.buf=(char*)malloc(tmp.final_size); 660 660 if(tmp.buf!=NULL) { … … 665 665 } 666 666 } 667 Printf("nb buf %i\n",pushedDatas.size());667 //Printf("nb buf %i\n",pushedDatas.size()); 668 668 return; 669 669 } … … 688 688 689 689 void ui_com::UpdateDataToSendBufferSize(const SendData *obj) { 690 if(!obj->IsEnabled()) return; 691 690 692 send_mutex->GetMutex(); 691 693
Note:
See TracChangeset
for help on using the changeset viewer.