-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSCHED.H
48 lines (35 loc) · 984 Bytes
/
SCHED.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
/* Scheduler Structures and Definitions */
#define MIN_EVENT 4 /* minimum result to trigger an event */
#define MAX_EVENT 29 /* maximum */
#define YELL_EVENT 1 /* Yell command enable */
#define MINS_HR 60 /* minutes in an hour */
#define DAYS_WK 7 /* days in a week */
#define MINS_DAY (24 * 60) /* minutes in an hour */
#define MINS_WK (MINS_DAY * DAYS_WK)
#define SCHEDS (5 * DAYS_WK) /* size of time table */
/* Standard time of day structure. */
struct _time {
int year,month,day,daywk;
int hour,mins,sec;
};
/* Scheduler time structure. */
struct _sched {
struct _time time;
int len;
int cond; /* condition */
int trigger;
int result; /* returned value */
char tag; /* schedule tag */
int a,b,c,d,e;
} sched[SCHEDS];
char tag; /* handy local copy of the tag */
int event; /* handy local copy of the current event */
char _daynames[7][4] = {
"Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat"
};