// Utilisation de SOPHYA pour faciliter les tests ... #include "sopnamsp.h" #include "machdefs.h" // include standard c/c++ #include #include #include #include #include #include "pexceptions.h" // les exceptions SOPHYA // include sophya mesure ressource CPU/memoire ... #include "resusage.h" #include "ctimer.h" #include "timing.h" // #include "array.h" #include "pciewrap.h" int main(int narg, char* arg[]) { if (narg < 2) { cout << "tpciew.cc/Usage: tpciew nread [prtlev=0] " << endl; cout << " nread<=0 --> PCIEWException " << endl; return 1; } int NRead = atoi(arg[1]); int PrtLev = 0; if (narg > 2) PrtLev = atoi(arg[2]); // Sophya modules initialization // TArrayInitiator _inia; //------- AU LIEU DE ------> SophyaInit(); InitTim(); // Initializing the CPU timer cout << " ---------- tpciew.cc Start --- NRead= " << NRead << " PrtLev=" << PrtLev << endl; int rc = 0; try { #define SZ 4096 uint_1 data[SZ]; PCIEWrapper pciw; if (NRead <= 0) { uint_4 nbytes = 1; while(nbytes > 0) nbytes = pciw.NBytesToRead(); pciw.Read(data, SZ); } else { for(int k=0; k NBytesOk=" << nbok << endl; if (PrtLev > 0) { cout << "data[] : "; for(int j=0; j>>> tpciew.cc ------- FIN ----------- RC=" << rc << endl; PrtTim("FIN tpciew.cc"); return rc; }