2022-06-09 17:34:24 +02:00
|
|
|
#include <pthread.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include "simulateFlux.h"
|
2022-06-01 12:32:04 +02:00
|
|
|
#include "power.h"
|
2022-06-07 14:28:32 +02:00
|
|
|
#include "initialParameters.h"
|
2022-06-10 15:05:04 +02:00
|
|
|
#include "queue.h"
|
2022-06-01 12:32:04 +02:00
|
|
|
|
2022-06-10 10:10:28 +02:00
|
|
|
bool rawDataWriteFlag = 0, stopFlag = 0;
|
2022-06-09 17:34:24 +02:00
|
|
|
int nRow = 100000;
|
|
|
|
int nCol = 9;
|
|
|
|
double freqEch = 250;
|
|
|
|
|
2022-06-10 17:22:01 +02:00
|
|
|
Pqueue firstRawDataQueue;
|
2022-06-10 15:05:04 +02:00
|
|
|
|
2022-06-09 17:34:24 +02:00
|
|
|
int selectionCaptors[] = {1,2,3,4,5,6,7,8};
|
|
|
|
int sizeSelectionArray = 8;
|
2022-06-10 10:10:28 +02:00
|
|
|
|
2022-06-10 17:22:01 +02:00
|
|
|
int cptData = 0;
|
|
|
|
int cptFile = 1;
|
|
|
|
|
|
|
|
double period = 0;
|
|
|
|
double invTimeBandWidth = 0;
|
|
|
|
|
|
|
|
|
2022-06-01 12:32:04 +02:00
|
|
|
int main(int argc , char** argv){
|
2022-06-09 17:34:24 +02:00
|
|
|
|
2022-06-10 17:22:01 +02:00
|
|
|
period = 1 / freqEch;
|
|
|
|
invTimeBandWidth = 1 /(nRow * period);
|
|
|
|
firstRawDataQueue = NULL; // change this for create empty
|
2022-06-10 15:50:27 +02:00
|
|
|
|
2022-06-09 17:34:24 +02:00
|
|
|
pthread_t rawData;
|
|
|
|
pthread_create(&rawData , NULL, simulateFlux, (void *)&rawData);
|
2022-06-10 17:22:01 +02:00
|
|
|
|
|
|
|
pthread_t power;
|
|
|
|
pthread_create(&power , NULL, threadCalcul, (void *)&power);
|
|
|
|
|
2022-06-09 17:34:24 +02:00
|
|
|
pthread_exit(NULL);
|
2022-06-10 15:50:27 +02:00
|
|
|
|
2022-06-10 17:22:01 +02:00
|
|
|
|
2022-06-01 12:32:04 +02:00
|
|
|
}
|