-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlog.h
28 lines (23 loc) · 1.01 KB
/
log.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
/*
* Copyright (c) 2020 Rohan Khayech
*/
/* Log Header File */
/* Header file for both log_A.c and log_B.c */
/* Both files have the same method declarations, but different implementations */
#ifndef LOG_H
#define LOG_H
#include "lift_sim.h"
/* Clear Log Function */
/* Clears the output file so that it is empty for the fresh output. */
void clearLog();
/* Print Request to Log Function */
/* Prints details of the specified Lift Request to the output file. */
void printRequestToLog(LiftRequest *req);
/* Print Operation to Log Function */
/* Prints details of the specified Lift Operation to the output file. */
/* Takes a lift struct, a lift request, the previous floor of the lift, and the number of moves performed by this operation as arguments. */
void printOperationToLog(Lift* lift, LiftRequest* req,int prevFloor, int moves);
/* Print Totals Function */
/* Prints the total number of requests and movements performed by all three lifts to the output file. */
void printTotals(Lift* l1, Lift* l2, Lift* l3);
#endif