Traitement-signal-plantes/Code-C/main.c

40 lines
800 B
C

#include <pthread.h>
#include <stdbool.h>
#include "simulateFlux.h"
#include "power.h"
#include "initialParameters.h"
#include "queue.h"
bool rawDataWriteFlag = 0, stopFlag = 0;
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;
int main(int argc , char** argv){
period = 1 / freqEch;
invTimeBandWidth = 1 /(nRow * period);
firstRawDataQueue = NULL; // change this for create empty
pthread_t rawData;
pthread_create(&rawData , NULL, simulateFlux, (void *)&rawData);
pthread_t power;
pthread_create(&power , NULL, threadCalcul, (void *)&power);
pthread_exit(NULL);
}