1
0
Fork 0
mirror of https://github.com/RobotechLille/cdf2018-principal synced 2024-06-28 22:19:00 +02:00
cdf2018-principal/chef/src/debug.h

38 lines
638 B
C
Raw Normal View History

#ifndef __DEBUG_H_
#define __DEBUG_H_
#include <pthread.h>
2018-04-04 16:17:13 +02:00
#include <time.h>
2018-05-02 08:26:35 +02:00
#include <stdbool.h>
2018-04-04 16:17:13 +02:00
2018-05-01 13:34:05 +02:00
// Constantes
2018-05-06 18:35:26 +02:00
#define DEBUG_INTERVAL_IDLE 1000
#define DEBUG_INTERVAL_ACTIVE 50
2018-04-29 09:38:49 +02:00
// Structures
2018-05-02 08:26:35 +02:00
enum debugArgTypes {
d,
f,
ld,
lf,
s
};
2018-04-29 09:38:49 +02:00
struct debugArg {
enum debugArgTypes type;
void* var;
struct debugArg* next;
};
// Public
void configureDebug(); // Avant tous les configure
void registerDebugVar(char* name, enum debugArgTypes type, void* var);
void startDebug(); // Après tous les configure
void deconfigureDebug();
2018-05-02 08:26:35 +02:00
void debugSetActive(bool active);
2018-04-29 09:38:49 +02:00
// Private
2018-05-02 08:26:35 +02:00
void* TaskDebug(void* pdata);
2018-04-29 09:38:49 +02:00
#endif