#include #include #include "simulateFlux.h" #include "power.h" #include "initialParameters.h" #include "queue.h" bool rawDataWriteFlag; int nRow = 100000; int nCol = 9; double freqEch = 250; Pqueue firstRawDataQueue; int selectionCaptors[] = {1,2,3,4,5,6,7,8}; int sizeSelectionArray = 8; int cptData = 0; int cptFile = 1; double period = 0; double invTimeBandWidth = 0; void *threadCalcul(void *vargp){ Pqueue rawDataQueue = firstRawDataQueue; char* fileName; while(rawDataWriteFlag){ while(queueGetNextE(rawDataQueue) != NULL){ rawDataQueue = queueGetNextE(rawDataQueue); fileName = queueGetTabChar(rawDataQueue); power(fileName,nRow,nCol,period,invTimeBandWidth); /*remove(queueGetTabChar(rawDataQueue)); rawDataQueue = queueRmFrstE(rawDataQueue);*/ } } } int main(int argc , char** argv){ rawDataWriteFlag = true; period = 1 / freqEch; invTimeBandWidth = 1 /(nRow * period); firstRawDataQueue = queueCreateEmpty(); // change this for create empty pthread_t rawData; pthread_create(&rawData , NULL, simulateFlux, (void *)&rawData); pthread_t calcul; pthread_create(&calcul , NULL, threadCalcul, (void *)&calcul); pthread_exit(NULL); }