Changeset 3627 in Sophya


Ignore:
Timestamp:
May 22, 2009, 6:33:35 PM (16 years ago)
Author:
ansari
Message:

Amelioration gestion arguments ds tmtacq.cc , Reza 21/05/2009

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/AddOn/TAcq/tmtacq.cc

    r3623 r3627  
    5757 
    5858 if (narg < 8) {
    59    cout << "\n Usage: tmtacq CardNum PaquetSize NFrameDMA NFiles NBlocPerFile NMaxProc DataDirPath [AcqMode] [NPaqMemZone][HardCtlC]" << endl;
     59   cout << "\n Usage: tmtacq CardNum PaquetSize NFrameDMA NFiles NBlocPerFile NMaxProc DataDirPath [AcqMode] [MemZoneMgr][HardCtlC]" << endl;
    6060   cout << " - CardNum : PCI-Express card number (=1,2)" << endl;
    6161   cout << " - PaquetSize or FrameSize (=DATA+HDR+TRL_Size)  " << endl;
     
    9090   cout << "   mononsw->Test with a single thread PCIEReaderChecker, But no swap paquet " << endl;
    9191   cout << endl;
    92    cout << " - NPaqMemZone : Number of paquets in one memory data bloc (Default=128) " << endl;
     92   cout << " - MemZoneMgr: nZones,NPaq =Number of Zones and number of paquet in each zone (Default=8,128) " << endl;
    9393   cout << " -HardCtlC : Y y (direct interrpution by CtrlC ) default (no) " << endl;
    9494  return 1;
     
    153153  cout << "tmtacq[1] - starting acq program under card " << card <<  " FrameSize= " << sizeFrame << endl;
    154154
    155   uint_4 nZones = 10;  // Nombre de zones memoires
     155  uint_4 nZones = 8;  // Nombre de zones memoires
    156156  uint_4 nPaqZone = 128;  // 128 Paquets / zone memoire - valeur par defaut
    157   if (narg > 9)    // pour traiter eventuellement un arret brutal par CtlC mettre le 9eme arg a Y
    158     { string val = arg[9];
    159       if ( ( val == "Y")||( val == "y")) ;
    160       else {
    161         act.sa_handler=Stop;
    162         sigaction(SIGINT,&act,NULL);   
    163         if ( atoi(arg[9]) > 0)  nPaqZone=atoi(arg[9]);
    164       }
    165     }
    166   else {
     157  if (narg > 9)  {
     158    int ia1, ia2;
     159    sscanf(arg[9],"%d,%d", &ia1, &ia2);
     160    nZones = ia1;  nPaqZone = ia2;
     161  }
     162
     163  bool fg_hard_ctrlc = false;
     164  if (narg > 10)    // pour traiter eventuellement un arret brutal par CtlC mettre le 10eme arg a Y
     165    if ((*arg[10]=='y')||(*arg[10]=='Y'))  fg_hard_ctrlc=true;
     166  if (!fg_hard_ctrlc) {
    167167    act.sa_handler=Stop;
    168168    sigaction(SIGINT,&act,NULL);       
    169169  }
     170
    170171  uint_4 PaqSZ =sizeFrame;  // Taille de paquets
    171172  // uint_4 dmaSize  = nbFrameDMA*PaqSZ ;  // plantage
Note: See TracChangeset for help on using the changeset viewer.