This commit is contained in:
Aurélien Gauthier 2022-06-10 17:21:08 +02:00
commit 012de80d21
5 changed files with 41 additions and 4 deletions

Binary file not shown.

View file

@ -19,10 +19,9 @@ int main(int argc , char** argv){
double period = 1 / freqEch; double period = 1 / freqEch;
double invTimeBandWidth = 1 /(nRow * period); double invTimeBandWidth = 1 /(nRow * period);
Pqueue new = createE
/*
pthread_t rawData; pthread_t rawData;
pthread_create(&rawData , NULL, simulateFlux, (void *)&rawData); pthread_create(&rawData , NULL, simulateFlux, (void *)&rawData);
pthread_exit(NULL); pthread_exit(NULL);
*/
} }

View file

@ -23,7 +23,11 @@ typedef struct queue *Pqueue;
* *
* @return Pqueue * @return Pqueue
*/ */
<<<<<<< HEAD
Pqueue queueCreateEmpty(){ Pqueue queueCreateEmpty(){
=======
Pqueue createE(int lenChar){
>>>>>>> 2e7253c43c8e65a98686582d853147831016103f
Pqueue new = (Pqueue) malloc(sizeof(struct queue)); Pqueue new = (Pqueue) malloc(sizeof(struct queue));
assert(new); assert(new);
new->charLen = 0; new->charLen = 0;
@ -99,6 +103,7 @@ char * queueGetTabChar(Pqueue elem){
return elem->tabChar; return elem->tabChar;
} }
<<<<<<< HEAD
/************ ************/ /************ ************/
/** /**
@ -113,6 +118,24 @@ Pqueue queueCreateE(int lenChar, const char* _tabChar){
queueSetTabChar(new, lenChar, _tabChar); queueSetTabChar(new, lenChar, _tabChar);
new->pNextE = NULL; new->pNextE = NULL;
return new; return new;
=======
void setCharLen(Pqueue elem , int _charLen){
assert(elem);
elem->charLen = _charLen;
}
void setTabChar(Pqueue elem , int _charLen , char *_tabChar){
assert(elem);
elem->charLen = _charLen;
elem->tabChar = (char *) malloc(_charLen * sizeof(char));
elem->tabChar = _tabChar;
>>>>>>> 2e7253c43c8e65a98686582d853147831016103f
}
void setNextE(Pqueue elem , Pqueue next){
assert(elem);
assert(next);
elem -> pNextE = next;
} }
/** /**
@ -177,10 +200,18 @@ Pqueue queueAddLastQ(Pqueue elem, const char* str, int len){
previous = tmp; previous = tmp;
tmp = queueGetNextE(tmp); tmp = queueGetNextE(tmp);
} }
<<<<<<< HEAD
tmp = queueCreateE(len); tmp = queueCreateE(len);
tmp->tabChar = str; tmp->tabChar = str;
tmp->charLen = len; tmp->charLen = len;
return tmp; return tmp;
=======
tmp -> pNextE = createE(len);
Pqueue next = getNextE(tmp);
next->tabChar = str;
next->charLen = len;
return next;
>>>>>>> 2e7253c43c8e65a98686582d853147831016103f
} }
/** /**

View file

@ -10,8 +10,15 @@ Pqueue getNextE(Pqueue elem);
char * gettabChar(Pqueue elem); char * gettabChar(Pqueue elem);
//Setters //Setters
<<<<<<< HEAD
Pqueue setCharLen(Pqueue elem , int _charLen); Pqueue setCharLen(Pqueue elem , int _charLen);
Pqueue setTabChar(Pqueue elem , int _charLen, const char *_tabChar); Pqueue setTabChar(Pqueue elem , int _charLen, const char *_tabChar);
=======
void setCharLen(Pqueue elem , int _charLen);
void setTabChar(Pqueue elem , int _charLen , char *_tabChar);
void setNextE(Pqueue elem , Pqueue next);
>>>>>>> 2e7253c43c8e65a98686582d853147831016103f
Pqueue addLastQ(Pqueue elem, const char* str, int len); Pqueue addLastQ(Pqueue elem, const char* str, int len);
//Removers //Removers

View file

@ -107,7 +107,7 @@ bool writeOneRawData(FILE *rawDataFile){
} }
} }
cptData++; cptData++;
sleep(0.004); //simul la freq ech //sleep(0.004); //simul la freq ech
return true; return true;
} }
else { else {