Changeset 3883 in Sophya for trunk/AddOn/TAcq/racqueth.cc
- Timestamp:
- Sep 23, 2010, 7:59:29 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AddOn/TAcq/racqueth.cc
r3764 r3883 433 433 if (ReadNextAllFibers()) { fgok=false; break; } 434 434 totnpaqrd_++; 435 if ((prtlev_>0)&&(totnpaqrd_%prtmodulo_==0)) { 436 cout << "EthernetReader: NbPaq/Link=" << totnpaqrd_ << " NSameFC=" 437 << totsamefc_ << " / NPaqFib0Read=" << totnpqrd_[0] 438 << " FracSameFC=" << 100*totsamefc_/totnpqrd_[0] << " %" << endl; 439 } 435 440 } 436 441 437 442 MoveToNextTarget(); // Pour faire traiter le dernier paquet si plein 438 443 MZoneManage(true); // Nettoyage final 439 usleep(50000); // Attente de traitement du dernier paquet440 memgr_.Stop(); // Arret441 444 442 445 cout << " ------------------ EthernetReader::run() END ----------------- " << endl; 443 446 ts.SetNow(); 444 447 tm.SplitQ(); 445 cout << " END reading TotNPaq/Link=" << totnpaqrd_ << " :" << ts ; 446 if (rdsamefc_) cout << " NSameFC=" << totsamefc_ << endl; 447 else cout << endl; 448 cout << " END reading TotNPaq/Link=" << totnpaqrd_ << " :" << ts << endl; 449 cout << "... NbPaq/Link=" << totnpaqrd_ << " NSameFC=" 450 << totsamefc_ << " / NPaqLink[0]_Read=" << totnpqrd_[0] 451 << " FracSameFC=" << 100*totsamefc_/totnpqrd_[0] << " %" << endl; 452 448 453 for(size_t fib=0; fib<(size_t)memgr_.NbFibres(); fib++) { 449 454 int perc=0; … … 459 464 cout << " ---------------------------------------------------------- " << endl; 460 465 466 usleep(50000); // Attente de traitement du dernier paquet 467 memgr_.Stop(); // Arret 468 461 469 } // Fin du bloc try 462 470 catch (std::exception& exc) { … … 480 488 if (ReadNext(fib)) return true; // probleme 481 489 } 482 if (!rdsamefc_ || (memgr_.NbFibres()<2)) { 483 totsamefc_++; return false; // c'est OK 484 } 485 uint_8 cfc=curfc_[0]; 486 bool fgsamefc=true; 487 for(size_t fib=1; fib<memgr_.NbFibres(); fib++) { 488 if (curfc_[fib]!=cfc) { 489 fgsamefc=false; 490 if (curfc_[fib] > cfc) cfc=curfc_[fib]; 491 } 492 } 493 if (fgsamefc) { 494 totsamefc_++; return false; // c'est OK , same framecounter 495 } 496 else { // else !fgsame 497 for(uint_4 fib=0; fib<memgr_.NbFibres(); fib++) { 498 while (curfc_[fib]<cfc) { 499 if (ReadNext(fib)) return true; // probleme 500 } 501 } 502 } // fin de else !fgsame 503 totsamefc_++; 504 return false; // c'est OK 490 if (!rdsamefc_ || (memgr_.NbFibres()<2)) { 491 uint_8 cfc=curfc_[0]; 492 bool fgsamefc=true; 493 for(size_t fib=1; fib<memgr_.NbFibres(); fib++) { 494 if (curfc_[fib]!=cfc) fgsamefc=false; 495 } 496 if (fgsamefc) totsamefc_++; 497 return false; // c'est OK 498 } 499 // On va essayer de lire jusqu'a avoir same_frame_counter 500 bool echec=true; 501 while (echec) { 502 uint_8 cfc=curfc_[0]; 503 bool fgsamefc=true; 504 for(size_t fib=1; fib<memgr_.NbFibres(); fib++) { 505 if (curfc_[fib]!=cfc) { 506 fgsamefc=false; 507 if (curfc_[fib] > cfc) cfc=curfc_[fib]; 508 } 509 } 510 if (fgsamefc) { 511 totsamefc_++; echec=false; return false; // c'est OK , same framecounter 512 } 513 else { // else !fgsame 514 for(uint_4 fib=0; fib<memgr_.NbFibres(); fib++) { 515 while (curfc_[fib]<cfc) { 516 if (ReadNext(fib)) return true; // probleme 517 } 518 } 519 } // fin de else !fgsame 520 } // fin de while(echec): lecture jusqu'a same_frame_counter 521 522 return true; // probleme 505 523 } 506 524
Note:
See TracChangeset
for help on using the changeset viewer.