Changeset 452 in flair-src for trunk/lib/FlairCore/src
- Timestamp:
- Oct 1, 2021, 3:42:02 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/ui_com.cpp
r445 r452 553 553 //must be called with mutex locked 554 554 void ui_com::UpdateSendData(const SendData *obj) { 555 // Printf("UpdateSendData %s\n",obj->ObjectName().c_str()); 555 556 // le mutex est deja pris par l'appellant 556 557 size_t id, i; … … 615 616 for (size_t i = 0; i < pushedDatas.size(); i++) { 616 617 if (pushedDatas.at(i).period==obj->SendPeriod() && pushedDatas.at(i).nb_buffering==obj->NbBuffering()) { 617 //Printf("match item %i, period %i nb buff %i \n",i,obj->SendPeriod(),obj->NbBuffering());618 //Printf("match item %i, period %i nb buff %i, size %i\n",i,obj->SendPeriod(),obj->NbBuffering(),pushedDatas.at(i).final_size); 618 619 match=true; 619 620 } … … 628 629 tmp.final_size=0; 629 630 for (size_t i = 0; i < datasToSend.size(); i++) { 630 //Printf("data % i/%i %i %i\n",i,datasToSend.size(),datasToSend.at(i)->SendPeriod() ,datasToSend.at(i)->NbBuffering());631 //Printf("data %s %i/%i %i %i\n",datasToSend.at(i)->ObjectName().c_str(),i,datasToSend.size(),datasToSend.at(i)->SendPeriod() ,datasToSend.at(i)->NbBuffering()); 631 632 if (datasToSend.at(i)->IsEnabled() && datasToSend.at(i)->SendPeriod() == obj->SendPeriod() && datasToSend.at(i)->NbBuffering()==obj->NbBuffering()) { 632 633 tmp.final_size+=datasToSend.at(i)->SendSize(); … … 652 653 void ui_com::UpdateDataToSendBufferSize(const SendData *obj) { 653 654 if(!obj->IsEnabled()) return; 654 655 //Printf("UpdateDataToSendBufferSize %s\n",obj->ObjectName().c_str()); 655 656 send_mutex->GetMutex(); 656 657 … … 667 668 } 668 669 669 ptr->final_size=sizeof(char)+sizeof(uint16_t);//header+period 670 ptr->final_size=0; 671 //Printf("actual %i\n",ptr->final_size); 672 for (size_t i = 0; i < datasToSend.size(); i++) { 673 //Printf("data %s %i/%i %i %i\n",datasToSend.at(i)->ObjectName().c_str(),i,datasToSend.size(),datasToSend.at(i)->SendPeriod() ,datasToSend.at(i)->NbBuffering()); 674 if (datasToSend.at(i)->IsEnabled() && datasToSend.at(i)->SendPeriod() == obj->SendPeriod() && datasToSend.at(i)->NbBuffering()==obj->NbBuffering()) { 675 ptr->final_size+=datasToSend.at(i)->SendSize(); 676 //Printf("add %i\n",datasToSend.at(i)->SendSize()); 677 } 678 } 679 ptr->final_size*=obj->NbBuffering(); 680 ptr->final_size+=sizeof(char)+sizeof(uint16_t);//header+period 670 681 if(ptr->nb_buffering>1) ptr->final_size+=sizeof(uint16_t);//+nb_buffering 671 ptr->final_size+=obj->SendSize()*obj->NbBuffering();682 672 683 //Printf("final %i\n",ptr->final_size); 673 684 free(ptr->buf);
Note:
See TracChangeset
for help on using the changeset viewer.