-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobal.h
68 lines (55 loc) · 1.54 KB
/
global.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef GLOBAL_H
#define GLOBAL_H
#define HALF_SECOND 500000000 /* value in nanoseconds */
#define QUARTER_SECOND 250000000
#define PERIOD_LOCALISER 600000000
#include "includes.h"
/* @descripteurs des tâches */
extern RT_TASK tcommuniquer;
extern RT_TASK tconnect;
extern RT_TASK tdeplacer;
extern RT_TASK tenvoyer;
extern RT_TASK tbattery;
extern RT_TASK twatchdog;
extern RT_TASK tlocaliser;
extern RT_TASK tcalibrer;
/* @descripteurs des mutex */
extern RT_MUTEX mutexEtat;
extern RT_MUTEX mutexMove;
extern RT_MUTEX mutexCamera;
extern RT_MUTEX mutexImage;
extern RT_MUTEX mutexPosition;
extern RT_MUTEX mutexArena;
extern RT_MUTEX mutexCalibration;
/* @descripteurs des sempahore */
extern RT_SEM semDetectArena; // ACTION_FIND_ARENA
extern RT_SEM semConnecterRobot;
extern RT_SEM semWatchdog;
extern RT_SEM semBatterie;
extern RT_SEM semLocalisation;
/* @descripteurs des files de messages */
extern RT_QUEUE queueMsgGUI;
/* @variables partagées */
extern int etatCommMoniteur;
extern int etatCommRobot;
extern int etatLocalisation;
extern char calibration;
extern DServer *serveur;
extern DRobot *robot;
extern DMovement *move;
extern DImage *image;
extern DArena *arena;
/* @constantes */
extern int MSG_QUEUE_SIZE;
extern int PRIORITY_TCOMMUNIQUER;
extern int PRIORITY_TCONNECT;
extern int PRIORITY_TDEPLACER;
extern int PRIORITY_TENVOYER;
extern int PRIORITY_TWATCHDOG;
//liuzp add start
extern int PRIORITY_BATTERY;
extern int PRIORITY_WATCHDOG;
extern int PRIORITY_LOCALISER;
extern int PRIORITY_CALIBRER;
//liuzp add end
#endif /* GLOBAL_H */