Révision 896
Ajouté par frkanaan il y a environ 4 ans
branch/KANAAN/sp4a12/main.c | ||
---|---|---|
0
|
||
};
|
||
|
||
|
||
//Fonction ? modifier !!!!!
|
||
void traitement(char * trame)
|
||
{
|
||
|
||
printf ("> %s\n",trame);
|
||
}
|
||
|
||
|
||
int trame_cmp(char* a,char* b)
|
||
{
|
||
unsigned char i;
|
||
... | ... | |
return 1;
|
||
}
|
||
|
||
void traitement(char * trame)
|
||
{
|
||
static int count=0;
|
||
count++;
|
||
|
||
if(trame_cmp(trame, "GPGGA"))
|
||
printf ("> %s\n",trame);
|
||
}
|
||
|
||
int decode_int (char c)
|
||
{
|
||
if (c >= '0' && c <= '9')
|
||
... | ... | |
return -1;
|
||
}
|
||
|
||
|
||
// Fonction de tests unitaire pour decode_int
|
||
void test_decode_int()
|
||
{
|
||
char i;
|
||
... | ... | |
return res;
|
||
}
|
||
|
||
// Fonction de tests unitaire
|
||
// Fonction de tests unitaire pour decode_nombre
|
||
void test_decode_nombre()
|
||
{
|
||
if (decode_nombre("135654321",5) != 13564)
|
||
... | ... | |
}
|
||
}
|
||
|
||
/////////////////////////////////
|
||
// fin tp1a
|
||
// debut tp2a
|
||
////////////////////////////////
|
||
|
||
typedef struct
|
||
{
|
||
... | ... | |
printf ("Trames de tests tableau trames:\n");
|
||
int i=0;
|
||
while (trames[i])
|
||
traitement(trames[i++]);
|
||
//traitement(trames[i++]);
|
||
|
||
if (!trame_init())
|
||
exit(-1);
|
Formats disponibles : Unified diff
petite modification sur le tpa12