-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask.h
83 lines (75 loc) · 1.58 KB
/
task.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*
* task.h
*
* Created on: Mar 7, 2013
* Author: ashish
*/
#ifndef TASK_H_
#define TASK_H_
#include<vector>
using namespace std;
struct ResponseTime
{
int time;
int responseTime;
};
class TASK
{
private:
int taskid;
int phase;
int period;
int execution;
int deadline;
int staticdeadline;
float priority;
float qos;
int currExecution;
int nextFireAt;
int status;
float utilization;
float density;
vector<ResponseTime*> RespTime;
int maxRespTime;
int minRespTime;
public:
TASK();
~TASK();
int getTaskId(void);
int getPhase(void);
int getPeriod(void);
int getExecution(void);
int getDeadline(void);
int getStaticDeadline(void);
float getPriority(void);
float getQos(void);
float getUtilization(void);
float getDensity(void);
int getCurrExecution(void);
int getNextFireAt(void);
int getStatus(void);
void setTaskId(int _taskid);
void setPhase(int _phase);
void setPeriod(int _period);
void setExecution(int _execution);
void setDeadline(int _deadline);
void setStaticDeadline(int _staticdeadline);
void setPriority(float _priority);
void setQos(float _qos);
void setUtilization(float _utilization);
void setDensity(float _density);
void setCurrExecution(int _currExecution);
void resetCurrExecution(void);
void setNextFireAt(int _nextFireAt);
void setStatus(int _status);
void insertRespTime(ResponseTime* _RespTime)
{
RespTime.push_back(_RespTime);
}
void insertMinMaxRespTime(int _ResponseTime);
int getMinRespTime(void);
int getMaxRespTime(void);
void updateUtilization_OR_Density(void);
void printTaskParameters(void);
};
#endif /* TASK_H_ */