move .h in include

This commit is contained in:
quentin.perret 2022-12-01 17:29:47 +01:00
parent 011eecc81b
commit bf4f35ca29
21 changed files with 62 additions and 46 deletions

7
.vscode/launch.json vendored Normal file
View file

@ -0,0 +1,7 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": []
}

View file

@ -16,6 +16,10 @@
"type_traits": "c", "type_traits": "c",
"simulateflux.h": "c", "simulateflux.h": "c",
"pthread.h": "c", "pthread.h": "c",
"types.h": "c" "types.h": "c",
"average.h": "c",
"queue.h": "c",
"growthrate.h": "c",
"stdbool.h": "c"
} }
} }

View file

@ -1,8 +1,8 @@
#include "average.h" #include "include/average.h"
#include "getArray.h" #include "include/getArray.h"
#include "fileGestion.h" #include "include/fileGestion.h"
#include "initialParameters.h" #include "include/initialParameters.h"
#include "queue.h" #include "include/queue.h"
/** /**
* @brief realize the average calcul * @brief realize the average calcul
* *

View file

@ -1,4 +1,4 @@
#include "b2hd.h" #include "include/b2hd.h"
#include <time.h> #include <time.h>

View file

@ -5,13 +5,13 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "fileGestion.h" #include "include/fileGestion.h"
#include "getArray.h" #include "include/getArray.h"
#include "growthRate.h" #include "include/growthRate.h"
#include "power.c" #include "include/power.h"
#include "simulateFlux.h" #include "include/simulateFlux.h"
#include "queue.h" #include "include/queue.h"
#include "average.h" #include "include/average.h"
//#include "b2hd.h" //#include "b2hd.h"
bool rawDataWriteFlag; bool rawDataWriteFlag;

View file

@ -1,4 +1,4 @@
#include "fileGestion.h" #include "include/fileGestion.h"
/** /**
* @brief function that delete nRow lign in the beginning of the file rawData.csv . This function is necessary to not deal with the same ligns over and over * @brief function that delete nRow lign in the beginning of the file rawData.csv . This function is necessary to not deal with the same ligns over and over

View file

@ -1,6 +1,6 @@
#include "getArray.h" #include "include/getArray.h"
#include "fileGestion.h" #include "include/fileGestion.h"
#include "initialParameters.h" #include "include/initialParameters.h"
//#include <string.h> //#include <string.h>
long **getlongArray(int N, int M) /* Allocate the array */ long **getlongArray(int N, int M) /* Allocate the array */

View file

@ -1,7 +1,7 @@
#include "initialParameters.h" #include "include/initialParameters.h"
#include "fileGestion.h" #include "include/fileGestion.h"
#include "getArray.h" #include "include/getArray.h"
#include "growthRate.h" #include "include/growthRate.h"
/** /**
* @brief calculate de growth rate between to point next to each other * @brief calculate de growth rate between to point next to each other
* *

View file

@ -1,15 +1,16 @@
#include <pthread.h> #include <pthread.h>
#include <stdbool.h> #include <stdbool.h>
#include "simulateFlux.h"
#include "power.h" #include "include/simulateFlux.h"
#include "initialParameters.h" #include "include/power.h"
#include "queue.h" #include "include/initialParameters.h"
#include "average.h" #include "include/queue.h"
#include "growthRate.h" #include "include/average.h"
#include "getArray.h" #include "include/growthRate.h"
#include "include/getArray.h"
bool rawDataWriteFlag; bool rawDataWriteFlag;
int nRowRawData = 500; int nRowRawData = 5000;
int nRowGR = 150; int nRowGR = 150;
int nCol = 1; int nCol = 1;
double freqEch = 250; double freqEch = 250;
@ -19,7 +20,7 @@ int nbRowIgnore = 19;
Pqueue firstRawDataQueue; Pqueue firstRawDataQueue;
// Captor 1 2 3 4 5 6 7 8 // Captor 1 2 3 4 5 6 7 8
bool selectionCaptors[] = {true, false, true, false, false, false, true, false}; bool selectionCaptors[] = {true, false, false, false, false, false, true, false};
int cptData = 0; int cptData = 0;
int cptFile = 1; int cptFile = 1;
@ -56,6 +57,7 @@ void *threadCalculAverage(void *vargp)
{ {
rawDataQueue = queueGetNextE(rawDataQueue); rawDataQueue = queueGetNextE(rawDataQueue);
fileName = queueGetTabChar(rawDataQueue); fileName = queueGetTabChar(rawDataQueue);
printf("%s\n", fileName);
averageFunction(fileName, NULL); averageFunction(fileName, NULL);
remove(fileName); remove(fileName);
} }
@ -142,6 +144,7 @@ int main(int argc, char **argv)
nCol++; nCol++;
} }
} }
printf("%d", nCol);
rawDataWriteFlag = true; rawDataWriteFlag = true;
@ -156,12 +159,12 @@ int main(int argc, char **argv)
exit(1); exit(1);
} }
// pthread_t calculAverage; pthread_t calculAverage;
// if (pthread_create(&calculAverage, NULL, threadCalculAverage, "threadCalculAverage")) if (pthread_create(&calculAverage, NULL, threadCalculAverage, "threadCalculAverage"))
// { {
// perror("threadCalculAverage() error"); perror("threadCalculAverage() error");
// exit(1); exit(1);
// } }
// pthread_t calculGrowthRate; // pthread_t calculGrowthRate;
// if (pthread_create(&calculGrowthRate, NULL, threadCalculGrowthRate, "threadCalculGrowthRate")) // if (pthread_create(&calculGrowthRate, NULL, threadCalculGrowthRate, "threadCalculGrowthRate"))

View file

@ -1,9 +1,10 @@
#include <math.h> #include <math.h>
#include "power.h"
#include "getArray.h" #include "include/power.h"
#include "fileGestion.h" #include "include/getArray.h"
#include "initialParameters.h" #include "include/fileGestion.h"
#include "queue.h" #include "include/initialParameters.h"
#include "include/queue.h"
/** /**
* @brief realize the powerThreadFunction calcul * @brief realize the powerThreadFunction calcul

View file

@ -3,7 +3,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <stdbool.h> #include <stdbool.h>
#include "queue.h"
#include "include/queue.h"
/** /**
* @brief struct queue struct used for queueing string name * @brief struct queue struct used for queueing string name

View file

@ -1,6 +1,6 @@
#include "simulateFlux.h" #include "include/simulateFlux.h"
#include "initialParameters.h" #include "include/initialParameters.h"
#include "queue.h" #include "include/queue.h"
#include <time.h> #include <time.h>
#include <errno.h> #include <errno.h>