-
Notifications
You must be signed in to change notification settings - Fork 0
/
driverMain.c
46 lines (37 loc) · 921 Bytes
/
driverMain.c
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
/*
* Author: Akhil Tarikere
* Date: 9/3/20
*
* Pre-Condition: Takes in the CLI arguments.
*
*
* Post-Condition: Runs the entire program.
*
*/
#include <stdio.h>
#include "functionPeriodic.h"
#include "functionNonPeriodic.h"
#include "configuration.h"
// ADTs for periodic part.
int numTasks;
Task *tasks;
TaskInstance *jobs;
Frame *frames;
// ADTs for non-periodic part.
AperiodicJob *aperiodicJobs;
SporadicJob *sporadicJobs;
ScheduleFrame *framesData;
FILE *outputFile;
int
main(int argc, char *argv[])
{
outputFile = fopen(OUTPUT_FILE, "w"); // Opening the output file in write mode so that everything is overwritten.
// Calling the periodic task part.
periodicTaskDriver(argc, argv);
// Calling the non-periodic and scheduling part.
nonPeriodicJobDriver();
// Program has finished.
fprintf(outputFile, "-------------------THE END-------------------\n");
fclose(outputFile);
return 0;
}